/*! For license information please see 949.1772639691507.js.LICENSE.txt */ (self.webpackChunkdataneo=self.webpackChunkdataneo||[]).push([[949],{ZMjL(e,t,r){"use strict";r.d(t,{$:()=>o});var n=r("fBG3");function o(e,t){t.silentMultipleInit||n.Vy.error(`${e} is already initialized.`)}},Wm6P(e,t,r){"use strict";r.d(t,{Z:()=>s,m:()=>a});var n=r("v3rh"),o=r("DIDV"),i=r("fBG3");function a(e){const t={version:"6.30.1",onReady(e){e()},...e};return Object.defineProperty(t,"_setDebug",{get:()=>o.pM,enumerable:!1}),t}function s(e,t,r){const o=e[t];o&&!o.q&&o.version&&i.Vy.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=r,o&&o.q&&o.q.forEach(e=>(0,n.y)(e,"onReady callback threw an error:")())}},q7oZ(e,t,r){"use strict";r.d(t,{l:()=>a,q:()=>i});var n=r("DIDV"),o=r("k0ez");function i(e,t,r,n,o){return a(e,t,[r],n,o)}function a(e,t,r,i,{once:a,capture:s,passive:l}={}){const c=(0,n.dm)(t=>{(t.isTrusted||t.__ddIsTrusted||e.allowUntrustedEvents)&&(a&&p(),i(t))}),u=l?{capture:s,passive:l}:s,d=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,f=(0,o.W)(d,"addEventListener");function p(){const e=(0,o.W)(d,"removeEventListener");r.forEach(r=>e.call(t,r,c,u))}return r.forEach(e=>f.call(t,e,c,u)),{stop:p}}},LGu8(e,t,r){"use strict";r.d(t,{B9:()=>f,DQ:()=>m,OR:()=>c,Ri:()=>l,TV:()=>s,z$:()=>h});var n=r("fBG3"),o=r("pX5O"),i=r("Hz1A"),a=r("EdLy");function s(e,t,r=0,n){const o=new Date;o.setTime(o.getTime()+r);const i=`expires=${o.toUTCString()}`,a=n&&n.crossSite?"none":"strict",s=n&&n.domain?`;domain=${n.domain}`:"",l=n&&n.secure?";secure":"",c=n&&n.partitioned?";partitioned":"";document.cookie=`${e}=${t};${i};path=/;samesite=${a}${s}${l}${c}`}function l(e){return(0,i.rx)(document.cookie,e)}function c(e){return(0,i.Dh)(document.cookie).get(e)||[]}let u,d;function f(e){return u||(u=(0,i.it)(document.cookie)),u.get(e)}function p(e,t){s(e,"",0,t)}function h(e){if(void 0===document.cookie||null===document.cookie)return!1;try{const t=`dd_cookie_test_${(0,i.lk)()}`,r="test";s(t,r,o.iW,e);const n=l(t)===r;return p(t,e),n}catch(e){return n.Vy.error(e),!1}}function m(e=location.hostname,t=document.referrer){if(void 0===d){const r=function(e,t){try{return e||(0,a.c$)(t).hostname}catch(e){}}(e,t);if(r){const e=`dd_site_test_${(0,i.lk)()}`,t="test",n=r.split(".");let a=n.pop();for(;n.length&&!l(e);)a=`${n.pop()}.${a}`,s(e,t,o.OY,{domain:a});p(e,{domain:a}),d=a}}return d}},Gd1n(e,t,r){"use strict";r.d(t,{h:()=>i});var n=r("k0ez"),o=r("Ziog");function i(e,t){return(0,n.W)((0,o.VZ)(),"fetch")(e,t)}},BNZG(e,t,r){"use strict";r.d(t,{i:()=>h});var n=r("Zn7e"),o=r("DIDV"),i=r("FDU9"),a=r("pX5O"),s=r("EdLy"),l=r("Ziog"),c=r("N/so"),u=r("PXye"),d=r("zwU6");let f;const p=[];function h({responseBodyAction:e}={}){return e&&p.push(e),f||(f=new i.cP(e=>{if(!l.J2.fetch)return;const{stop:t}=(0,n.H)(l.J2,"fetch",t=>function({parameters:e,onPostCall:t,handlingStack:r},n){const[i,l]=e;let f=l&&l.method;void 0===f&&i instanceof Request&&(f=i.method);const h=void 0!==f?String(f).toUpperCase():"GET",m=i instanceof Request?i.url:(0,s.l2)(String(i)),g={state:"start",init:l,input:i,method:h,startClocks:(0,a.M8)(),url:m,handlingStack:r};n.notify(g),e[0]=g.input,e[1]=g.init,t(e=>{(async function(e,t,r){var n,o;const i=r;let a;i.state="resolve";try{a=await t}catch(t){return i.status=0,i.isAborted=(null===(o=null===(n=i.init)||void 0===n?void 0:n.signal)||void 0===o?void 0:o.aborted)||t instanceof DOMException&&t.code===DOMException.ABORT_ERR,i.error=t,void e.notify(i)}i.response=a,i.status=a.status,i.responseType=a.type,i.isAborted=!1;const s=p.reduce((e,t)=>Math.max(e,t(i)),0);if(0!==s){const e=(0,d.i)(a);if(e&&e.body)try{const t=await async function(e,t){const r=e.getReader(),n=[];for(;;){const e=await r.read();if(e.done)break;t.collectStreamBody&&n.push(e.value)}return r.cancel().catch(u.l),t.collectStreamBody?(0,c.wh)(n):void 0}(e.body,{collectStreamBody:2===s});i.responseBody=t&&(new TextDecoder).decode(t)}catch(e){}}e.notify(i)})(n,e,g).catch(o.Dx)})}(t,e),{computeHandlingStack:!0});return t})),f}},Ihxy(e,t,r){"use strict";r.d(t,{Kp:()=>c,_T:()=>l,y5:()=>s});var n=r("FDU9"),o=r("TiVH"),i=r("Ziog"),a=r("q7oZ");const s={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function l(e){return new n.cP(t=>{if(i.Wq)return;const{stop:r}=(0,a.l)(e,window,["visibilitychange","freeze"],e=>{"visibilitychange"===e.type&&"hidden"===document.visibilityState?t.notify({reason:s.HIDDEN}):"freeze"===e.type&&t.notify({reason:s.FROZEN})},{capture:!0}),n=(0,a.q)(e,window,"beforeunload",()=>{t.notify({reason:s.UNLOADING})}).stop;return()=>{r(),n()}})}function c(e){return(0,o.KQ)(s).includes(e)}},"21en"(e,t,r){"use strict";r.d(t,{H:()=>i,N:()=>a});var n=r("PXye"),o=r("q7oZ");function i(e,t,r){if(document.readyState===t||"complete"===document.readyState)return r(),{stop:n.l};const i="complete"===t?"load":"DOMContentLoaded";return(0,o.q)(e,window,i,r,{once:!0})}function a(e,t){return new Promise(r=>{i(e,t,r)})}},geVX(e,t,r){"use strict";r.d(t,{G:()=>d});var n=r("Zn7e"),o=r("FDU9"),i=r("pX5O"),a=r("EdLy"),s=r("uKaK"),l=r("q7oZ");let c;const u=new WeakMap;function d(e){return c||(c=function(e){return new o.cP(t=>{const{stop:r}=(0,n.H)(XMLHttpRequest.prototype,"open",f),{stop:o}=(0,n.H)(XMLHttpRequest.prototype,"send",r=>{!function({target:e,parameters:[t],handlingStack:r},o,a){const c=u.get(e);if(!c)return;const d=c;d.state="start",d.startClocks=(0,i.M8)(),d.isAborted=!1,d.xhr=e,d.handlingStack=r,d.requestBody=t;let f=!1;const{stop:p}=(0,n.H)(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&h()}),h=()=>{if(m(),p(),f)return;f=!0;const t=c;t.state="complete",t.duration=(0,i.vk)(d.startClocks.timeStamp,(0,i.nx)()),t.status=e.status,"string"==typeof e.response&&(t.responseBody=e.response),a.notify((0,s.yG)(t))},{stop:m}=(0,l.q)(o,e,"loadend",h);a.notify(d)}(r,e,t)},{computeHandlingStack:!0}),{stop:a}=(0,n.H)(XMLHttpRequest.prototype,"abort",p);return()=>{r(),o(),a()}})}(e)),c}function f({target:e,parameters:[t,r]}){u.set(e,{state:"open",method:String(t).toUpperCase(),url:(0,a.l2)(String(r))})}function p({target:e}){const t=u.get(e);t&&(t.isAborted=!0)}},"3nhb"(e,t,r){"use strict";r.d(t,{t:()=>f});var n=r("FDU9"),o=r("yrsg"),i=r("Zn7e"),a=r("pX5O"),s=r("RE+S"),l=r("Ziog"),c=r("aI0c"),u=r("7ql9");function d(){return new n.cP(e=>{const t=(t,r)=>{const n=(0,c.As)({stackTrace:r,originalError:t,startClocks:(0,a.M8)(),nonErrorPrefix:"Uncaught",source:u.g.SOURCE,handling:"unhandled"});e.notify(n)},{stop:r}=(n=t,(0,i.H)((0,l.VZ)(),"onerror",({parameters:[e,t,r,o,i]})=>{let a;(0,c.bJ)(i)||(a=(0,s.h)(e,t,r,o)),n(null!=i?i:e,a)}));var n;const{stop:o}=function(e){return(0,i.H)((0,l.VZ)(),"onunhandledrejection",({parameters:[t]})=>{e(t.reason||"Empty reason")})}(t);return()=>{r(),o()}})}function f(){const e=new n.dX(500),t=(0,o.B)(d)().subscribe(t=>{e.notify({type:0,error:t})});return{observable:e,stop:()=>{t.unsubscribe()}}}},xkkU(e,t,r){"use strict";r.d(t,{WA:()=>m,uT:()=>g,bX:()=>v,hO:()=>_,Sz:()=>b});var n=r("v3rh"),o=r("fBG3"),i=r("I4oo"),a=r("uKaK"),s=r("jyQ1"),l=r("h49T"),c=r("Ziog"),u=r("IpeG"),d=r("yrsg");const f=["chrome-extension://","moz-extension://"];function p(e){return f.some(t=>e.includes(t))}var h=r("yKqS");const m={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},g={ALL:"all",SAMPLED:"sampled"};function y(e,t){return null==e||"string"==typeof e||(o.Vy.error(`${t} must be defined as a string`),!1)}function v(e,t){return!(void 0!==e&&!(0,i.fp)(e)&&(o.Vy.error(`${t} Sample Rate should be a number between 0 and 100`),1))}function b(e,t){var r,i,f,m,g,b,_,x,w,A;if(e&&e.clientToken)if(void 0===e.allowedTrackingOrigins||Array.isArray(e.allowedTrackingOrigins)){if((!(S=e.site)||"string"!=typeof S||/(datadog|ddog|datad0g|dd0g)/.test(S)||(o.Vy.error(`Site should be a valid Datadog site. ${o.xG} ${o.fH}/getting_started/site/.`),0))&&v(e.sessionSampleRate,"Session")&&v(e.telemetrySampleRate,"Telemetry")&&v(e.telemetryConfigurationSampleRate,"Telemetry Configuration")&&v(e.telemetryUsageSampleRate,"Telemetry Usage")&&y(e.version,"Version")&&y(e.env,"Env")&&y(e.service,"Service")&&function(e,t){const r=(0,d.B)((0,c.VZ)().location),n=r?r.origin:"",i=e.allowedTrackingOrigins;if(!i)return!function(e,t=""){return!p(e)&&p(t.split("\n").filter(e=>{const t=e.trim();return t.length&&/^at\s+|@/.test(t)})[1]||"")}(n,t)||(o.Vy.error("Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided."),!1);const a=(0,u.K)(i,n);return a||o.Vy.error("SDK initialized on a non-allowed domain."),a}(e,null!=t?t:"")){var S;if(void 0===e.trackingConsent||(0,a.Rj)(l.w,e.trackingConsent))return{beforeSend:e.beforeSend&&(0,n.y)(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:c.Wq?void 0:(0,s.nd)(e),sessionSampleRate:null!==(r=e.sessionSampleRate)&&void 0!==r?r:100,telemetrySampleRate:null!==(i=e.telemetrySampleRate)&&void 0!==i?i:20,telemetryConfigurationSampleRate:null!==(f=e.telemetryConfigurationSampleRate)&&void 0!==f?f:5,telemetryUsageSampleRate:null!==(m=e.telemetryUsageSampleRate)&&void 0!==m?m:5,service:null!==(g=e.service)&&void 0!==g?g:void 0,env:null!==(b=e.env)&&void 0!==b?b:void 0,version:null!==(_=e.version)&&void 0!==_?_:void 0,datacenter:null!==(x=e.datacenter)&&void 0!==x?x:void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:null!==(w=e.trackingConsent)&&void 0!==w?w:l.w.GRANTED,trackAnonymousUser:null===(A=e.trackAnonymousUser)||void 0===A||A,storeContextsAcrossPages:!!e.storeContextsAcrossPages,betaEncodeCookieOptions:!!e.betaEncodeCookieOptions,variant:e.variant,sdkVersion:e.sdkVersion,...(0,h.T)(e)};o.Vy.error('Tracking Consent should be either "granted" or "not-granted"')}}else o.Vy.error("Allowed Tracking Origins must be an array");else o.Vy.error("Client Token is not configured, we will not send any data.")}function _(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:Array.isArray(e.sessionPersistence)?e.sessionPersistence[0]:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),beta_encode_cookie_options:e.betaEncodeCookieOptions,source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}},VjQA(e,t,r){"use strict";r.d(t,{G:()=>l,n:()=>s});var n=r("pX5O"),o=r("EdLy"),i=r("Hz1A"),a=r("zDtL");function s(e,t,r){const a=function(e,t){const r=`/api/v2/${t}`,n=e.proxy;if("string"==typeof n){const e=(0,o.l2)(n);return t=>`${e}?ddforward=${encodeURIComponent(`${r}?${t}`)}`}if("function"==typeof n)return e=>n({path:r,parameters:e});const i=l(t,e);return e=>`https://${i}${r}?${e}`}(e,t);return{build(o,s){const l=function({clientToken:e,internalAnalyticsSubdomain:t,source:r="browser"},o,a,{retry:s,encoding:l},c=[]){const u=[`ddsource=${r}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.30.1")}`,"dd-evp-origin=browser",`dd-request-id=${(0,i.lk)()}`].concat(c);return l&&u.push(`dd-evp-encoding=${l}`),"rum"===o&&(u.push(`batch_time=${(0,n.nx)()}`,`_dd.api=${a}`),s&&u.push(`_dd.retry_count=${s.count}`,`_dd.retry_after=${s.lastFailureStatus}`)),t&&u.reverse(),u.join("&")}(e,t,o,s,r);return a(l)},trackType:t}}function l(e,t){const{site:r=a.NW,internalAnalyticsSubdomain:n}=t;if("logs"===e&&t.usePciIntake&&r===a.NW)return a.$A;if(n&&r===a.NW)return`${n}.${a.NW}`;if(r===a.TC)return`http-intake.logs.${r}`;const o=r.split("."),i=o.pop();return`browser-intake-${o.join("-")}.${i}`}},yKqS(e,t,r){"use strict";r.d(t,{T:()=>i,w:()=>a});var n=r("zDtL"),o=r("VjQA");function i(e){const t=e.site||n.NW,r=function(e){return"flutter"===e||"unity"===e?e:"browser"}(e.source),i=function(e){return{logsEndpointBuilder:(0,o.n)(e,"logs"),rumEndpointBuilder:(0,o.n)(e,"rum"),profilingEndpointBuilder:(0,o.n)(e,"profile"),sessionReplayEndpointBuilder:(0,o.n)(e,"replay"),exposuresEndpointBuilder:(0,o.n)(e,"exposures"),flagEvaluationEndpointBuilder:(0,o.n)(e,"flagevaluation")}}({...e,site:t,source:r}),a=function(e){if(!e.replica)return;const t={...e,site:n.NW,clientToken:e.replica.clientToken};return{logsEndpointBuilder:(0,o.n)(t,"logs"),rumEndpointBuilder:(0,o.n)(t,"rum",[`application.id=${e.replica.applicationId}`])}}({...e,site:t,source:r});return{replica:a,site:t,source:r,...i}}function a(e){return n.Ih.every(t=>e.includes(t))}},QaFg(e,t,r){"use strict";r.d(t,{q:()=>o});var n=r("Ziog");function o(){var e;const t=n.J2.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:null===(e=t.connection)||void 0===e?void 0:e.effectiveType}}},NgUp(e,t,r){"use strict";r.d(t,{l:()=>h});var n=r("aI0c"),o=r("FDU9"),i=r("fBG3"),a=r("DIDV"),s=r("5El4"),l=r("YHPH"),c=r("7ql9"),u=r("RE+S"),d=r("jIMw"),f=r("pX5O");let p={};function h(e){const t=e.map(e=>(p[e]||(p[e]=function(e){return new o.cP(t=>{const r=i.JZ[e];return i.JZ[e]=(...o)=>{r.apply(console,o);const p=(0,d.uC)("console error");(0,a.um)(()=>{t.notify(function(e,t,r){const o=e.map(e=>function(e){return"string"==typeof e?(0,s.a)(e):(0,n.bJ)(e)?(0,d.NR)((0,u.T)(e)):(0,l.s)((0,s.a)(e),void 0,2)}(e)).join(" ");if(t===i.bP.error){const i=e.find(n.bJ),a=(0,n.As)({originalError:i,handlingStack:r,startClocks:(0,f.M8)(),source:c.g.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return a.message=o,{api:t,message:o,handlingStack:r,error:a}}return{api:t,message:o,error:void 0,handlingStack:r}}(o,e,p))})},()=>{i.JZ[e]=r}})}(e)),p[e]));return(0,o.Fx)(...t)}},bqVu(e,t,r){"use strict";r.d(t,{N:()=>n,Q:()=>o});const n={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},o={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"}},Bswk(e,t,r){"use strict";r.d(t,{D:()=>u});var n=r("vjAG"),o=r("5El4"),i=r("FDU9"),a=r("fBG3"),s=r("FMiR");function l(e,t,r){const n={...e};for(const[e,{required:o,type:i}]of Object.entries(t))"string"!==i||c(n[e])||(n[e]=String(n[e])),o&&c(n[e])&&a.Vy.warn(`The property ${e} of ${r} is required; context will not be sent to the intake.`);return n}function c(e){return null==e||""===e}function u(e="",{propertiesConfig:t={}}={}){let r={};const c=new i.cP,u={getContext:()=>(0,n.Go)(r),setContext:n=>{!function(e){const t="object"===(0,s.P)(e);return t||a.Vy.error("Unsupported context:",e),t}(n)?u.clearContext():r=(0,o.a)(l(n,t,e)),c.notify()},setContextProperty:(n,i)=>{r=(0,o.a)(l({...r,[n]:i},t,e)),c.notify()},removeContextProperty:n=>{delete r[n],l(r,t,e),c.notify()},clearContext:()=>{r={},c.notify()},changeObservable:c};return u}},yGs3(e,t,r){"use strict";r.d(t,{P:()=>a,q:()=>i});var n=r("Zv/8"),o=r("DIDV");function i(e,t,r,i){return(0,o.dm)((...o)=>(i&&(0,n.Q6)({feature:i}),e()[t][r](...o)))}function a(e,t,r){e.changeObservable.subscribe(()=>{const n=e.getContext();r.add(e=>e[t].setContext(n))})}},"9dSU"(e,t,r){"use strict";r.d(t,{Ck:()=>s});var n=r("q7oZ"),o=r("vjAG"),i=r("uKaK");const a=[];function s(e,t,r,s){const l=function(e,t){return`_dd_c_${e}_${t}`}(r,s);a.push((0,n.q)(e,window,"storage",({key:e})=>{l===e&&t.setContext(u())})),t.changeObservable.subscribe(function(){localStorage.setItem(l,JSON.stringify(t.getContext()))});const c=(0,o.kg)(u(),t.getContext());function u(){const e=localStorage.getItem(l);return e?JSON.parse(e):{}}(0,i.RI)(c)||t.setContext(c)}},yDic(e,t,r){"use strict";r.d(t,{B:()=>s,K:()=>l});var n=r("9dSU"),o=r("Ig5h"),i=r("uKaK"),a=r("Bswk");function s(e,t,r){const a=l();return t.storeContextsAcrossPages&&(0,n.Ck)(t,a,r,4),e.register(0,()=>{const e=a.getContext();return(0,i.RI)(e)||!e.id?o.$O:{account:e}}),a}function l(){return(0,a.D)("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}},WW3m(e,t,r){"use strict";r.d(t,{F:()=>i,s:()=>a});var n=r("9dSU"),o=r("Bswk");function i(e,t,r,o){const i=a();return t.storeContextsAcrossPages&&(0,n.Ck)(t,i,r,2),e.register(0,()=>{const e=i.getContext();return o?{context:e}:e}),i}function a(){return(0,o.D)("global context")}},SHtM(e,t,r){"use strict";r.d(t,{$:()=>s,Y:()=>l});var n=r("9dSU"),o=r("Ig5h"),i=r("Bswk"),a=r("uKaK");function s(e,t,r,i){const s=l();return t.storeContextsAcrossPages&&(0,n.Ck)(t,s,i,1),e.register(0,({eventType:e,startTime:n})=>{const i=s.getContext(),l=r.findTrackedSession(n);return l&&l.anonymousId&&!i.anonymous_id&&t.trackAnonymousUser&&(i.anonymous_id=l.anonymousId),(0,a.RI)(i)?o.$O:{type:e,usr:i}}),e.register(1,({startTime:e})=>{var t;return{anonymous_id:null===(t=r.findTrackedSession(e))||void 0===t?void 0:t.anonymousId}}),s}function l(){return(0,i.D)("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}},aI0c(e,t,r){"use strict";r.d(t,{$X:()=>h,As:()=>u,bJ:()=>m,e6:()=>l});var n=r("5El4"),o=r("YHPH"),i=r("RE+S"),a=r("jIMw"),s=r("FMiR");const l="No stack, consider using an instance of Error";function c({originalError:e,stackTrace:t,source:r,useFallbackStack:n=!0,nonErrorPrefix:o}){const s=m(e);return!t&&s&&(t=(0,i.T)(e)),{source:r,type:t?t.name:void 0,message:d(t,s,o,e),stack:t?(0,a.Yn)(t):n?l:void 0}}function u({stackTrace:e,originalError:t,handlingStack:r,componentStack:n,startClocks:o,nonErrorPrefix:i,useFallbackStack:a=!0,source:s,handling:l}){return{startClocks:o,handling:l,handlingStack:r,componentStack:n,originalError:t,...c({originalError:t,stackTrace:e,source:s,useFallbackStack:a,nonErrorPrefix:i}),causes:m(t)?g(t,s):void 0,fingerprint:f(t),context:p(t)}}function d(e,t,r,i){return(null==e?void 0:e.message)&&(null==e?void 0:e.name)?e.message:t?"Empty message":r?`${r} ${(0,o.s)((0,n.a)(i))}`:(0,o.s)((0,n.a)(i))}function f(e){return m(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function p(e){if((0,s.O)(e))return e.dd_context}function h(e){var t;return null===(t=/@ (.+)/.exec(e))||void 0===t?void 0:t[1]}function m(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}function g(e,t){const r=[];let n=e.cause;for(;null!=n&&r.length<10;){const e=c({originalError:n,source:t,useFallbackStack:!1});r.push(e),n=m(n)?n.cause:void 0}return r.length?r:void 0}},"7ql9"(e,t,r){"use strict";r.d(t,{g:()=>n});const n={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"}},RaEg(e,t,r){"use strict";r.d(t,{$:()=>a});var n=r("bgI0"),o=r("pX5O"),i=r("7ql9");function a(e,t,r=3e3){let a=0,s=!1;return{isLimitReached(){if(0===a&&(0,n.wg)(()=>{a=0},o.iW),a+=1,a<=r||s)return s=!1,!1;if(a===r+1){s=!0;try{t({message:`Reached max number of ${e}s by minute: ${r}`,source:i.g.AGENT,startClocks:(0,o.M8)()})}finally{s=!1}}return!0}}}},zDtL(e,t,r){"use strict";r.d(t,{$A:()=>l,Bb:()=>n,Ih:()=>c,NW:()=>i,R8:()=>s,TC:()=>o,dV:()=>a});const n="datad0g.com",o="dd0g-gov.com",i="datadoghq.com",a="datadoghq.eu",s="ddog-gov.com",l="pci.browser-intake-datadoghq.com",c=["ddsource","dd-api-key","dd-request-id"]},"h/Zm"(e,t,r){"use strict";r.d(t,{V:()=>u,u:()=>d});var n=r("jIMw"),o=r("DIDV"),i=r("FDU9"),a=r("q7oZ"),s=r("Hz1A"),l=r("7ql9"),c=r("pX5O");const u={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function d(e,t){const r=[];t.includes(u.cspViolation)&&r.push(function(e){return new i.cP(t=>{const{stop:r}=(0,a.q)(e,document,"securitypolicyviolation",e=>{t.notify(function(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return f({type:e.effectiveDirective,message:`${u.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:p(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${(0,s._R)(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}(e))});return r})}(e));const n=t.filter(e=>e!==u.cspViolation);return n.length&&r.push(function(e){return new i.cP(t=>{if(!window.ReportingObserver)return;const r=(0,o.dm)((e,r)=>e.forEach(e=>t.notify(function(e){const{type:t,body:r}=e;return f({type:r.id,message:`${t}: ${r.message}`,originalError:e,stack:p(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)})}(e)))),n=new window.ReportingObserver(r,{types:e,buffered:!0});return n.observe(),()=>{n.disconnect()}})}(n)),(0,i.Fx)(...r)}function f(e){return{startClocks:(0,c.M8)(),source:l.g.REPORT,handling:"unhandled",...e}}function p(e,t,r,o,i){return r?(0,n.Yn)({name:e,message:t,stack:[{func:"?",url:r,line:null!=o?o:void 0,column:null!=i?i:void 0}]}):void 0}},J5kD(e,t,r){"use strict";r.d(t,{Y:()=>o,v:()=>n});const n={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},o={FETCH:n.FETCH,XHR:n.XHR}},TUkY(e,t,r){"use strict";r.d(t,{AQ:()=>o,HB:()=>i,Q_:()=>l,_P:()=>a,gB:()=>s});var n=r("pX5O");const o=4*n.MA,i=15*n.iW,a=n.$H,s="0",l={COOKIE:"cookie",MEMORY:"memory",LOCAL_STORAGE:"local-storage"}},Lg0b(e,t,r){"use strict";r.d(t,{ox:()=>A});var n=r("FDU9"),o=r("WrbB"),i=r("pX5O"),a=r("q7oZ"),s=r("bgI0"),l=r("Zv/8"),c=r("wzgf"),u=r("LGu8"),d=r("VECG"),f=r("TiVH"),p=r("DIDV"),h=r("TUkY"),m=r("jyQ1"),g=r("FbtF"),y=r("PL+z"),v=r("tLpm"),b=r("hI5M");const _=i.iW,x=h.AQ;let w=[];function A(e,t,r,u){const A=new n.cP,C=new n.cP,E=(0,m.oC)(e.sessionStoreStrategyType,e,t,r);w.push(()=>E.stop());const T=(0,o.qj)({expireDelay:x});if(w.push(()=>T.stop()),E.renewObservable.subscribe(()=>{T.add(I(),(0,i.$S)()),A.notify()}),E.expireObservable.subscribe(()=>{C.notify(),T.closeActive((0,i.$S)())}),E.expandOrRenewSession(),T.add(I(),(0,i.Oc)().relative),(0,d.sr)(d.R9.SHORT_SESSION_INVESTIGATION)){const t=E.getSession();t&&function(e,t){if(!window.cookieStore||!t.created)return;const r=Number(t.created),n=(0,i.x3)(),{stop:o}=(0,a.q)(e,cookieStore,"change",function(e){const a=(0,f.Uk)(e.changed,e=>e.name===v.Z);if(!a)return;const s=(0,i.x3)()-r;if(s>14*i.iW)o();else{const e=(0,g.H9)(a.value);if(e.id&&e.id!==t.id){o();const r=(0,i.x3)()-n;S().then(n=>{(0,l.A2)("Session cookie changed",{time:r,session_age:s,old:t,new:e,cookie:n})}).catch(p.Dx)}}});w.push(o)}(e,t)}function I(){const r=E.getSession();return r?{id:r.id,trackingType:r[t],isReplayForced:!!r.forcedReplay,anonymousId:r.anonymousId}:(async function(e){const t=e.sessionStoreStrategyType;if(!t)return;let r,n;t.type===h.Q_.COOKIE?(r=(0,y.Hv)(t.cookieOptions,e),n={cookie:await S(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):r=(0,b.dX)(),(0,l.A2)("Unexpected session state",{sessionStoreStrategyType:t.type,session:r,isSyntheticsTest:(0,c.Fs)(),createdTimestamp:null==r?void 0:r.created,expireTimestamp:null==r?void 0:r.expire,...n})}(e).catch(()=>{}),{id:"invalid",trackingType:h.gB,isReplayForced:!1,anonymousId:void 0})}return u.observable.subscribe(()=>{u.isGranted()?E.expandOrRenewSession():E.expire(!1)}),function(e){const{stop:t}=(0,a.l)(e,window,["click","touchstart","keydown","scroll"],()=>{u.isGranted()&&E.expandOrRenewSession()},{capture:!0,passive:!0});w.push(t)}(e),function(e){const t=()=>{"visible"===document.visibilityState&&E.expandSession()},{stop:r}=(0,a.q)(e,document,"visibilitychange",t);w.push(r);const n=(0,s.yb)(t,_);w.push(()=>{(0,s.vG)(n)})}(e),function(e){const{stop:t}=(0,a.q)(e,window,"resume",()=>E.restartSession(),{capture:!0});w.push(t)}(e),{findSession:(e,t)=>T.find(e,t),renewObservable:A,expireObservable:C,sessionStateUpdateObservable:E.sessionStateUpdateObservable,expire:E.expire,updateSessionState:E.updateSessionState}}async function S(){let e;return e="cookieStore"in window?await window.cookieStore.getAll(v.Z):document.cookie.split(/\s*;\s*/).filter(e=>e.startsWith(v.Z)),{count:e.length,domain:(0,u.DQ)()||"undefined",...e}}},FbtF(e,t,r){"use strict";r.d(t,{oT:()=>f,zn:()=>l,W3:()=>d,TE:()=>c,c$:()=>u,H9:()=>h,D9:()=>p});var n=r("uKaK"),o=r("TiVH"),i=r("pX5O"),a=r("TUkY");const s=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function l(e,t){const r={isExpired:"1"};return t.trackAnonymousUser&&(null==e?void 0:e.anonymousId)&&(r.anonymousId=null==e?void 0:e.anonymousId),r}function c(e){return(0,n.RI)(e)}function u(e){return!c(e)}function d(e){return void 0!==e.isExpired||!((void 0===(t=e).created||(0,i.x3)()-Number(t.created)"anonymousId"===e?`aid=${t}`:`${e}=${t}`).join("&")}function h(e){const t={};return function(e){return!!e&&(-1!==e.indexOf("&")||s.test(e))}(e)&&e.split("&").forEach(e=>{const r=s.exec(e);if(null!==r){const[,e,n]=r;"aid"===e?t.anonymousId=n:t[e]=n}}),t}},jyQ1(e,t,r){"use strict";r.d(t,{nd:()=>E,oC:()=>I});var n=r("bgI0"),o=r("FDU9"),i=r("pX5O"),a=r("PXye"),s=r("Hz1A"),l=r("fBG3"),c=r("PL+z"),u=r("FbtF"),d=r("hI5M");const f=i.OY,p=[];let h;function m(e,t,r=0){var n;const{isLockEnabled:o,persistSession:a,expireSession:l}=t,c=e=>a({...e,lock:f}),d=()=>{const{lock:e,...r}=t.retrieveSession();return{session:r,lock:e&&!v(e)?e:void 0}};if(h||(h=e),e!==h)return void p.push(e);if(o&&r>=100)return void y(t);let f,m=d();if(o){if(m.lock)return void g(e,t,r);if(f=(0,s.lk)()+"--"+(0,i.nx)(),c(m.session),m=d(),m.lock!==f)return void g(e,t,r)}let b=e.process(m.session);if(o&&(m=d(),m.lock!==f))g(e,t,r);else{if(b&&((0,u.W3)(b)?l(b):((0,u.oT)(b),o?c(b):a(b))),o&&(!b||!(0,u.W3)(b))){if(m=d(),m.lock!==f)return void g(e,t,r);a(m.session),b=m.session}null===(n=e.after)||void 0===n||n.call(e,b||m.session),y(t)}}function g(e,t,r){(0,n.wg)(()=>{m(e,t,r+1)},10)}function y(e){h=void 0;const t=p.shift();t&&m(t,e)}function v(e){const[,t]=e.split("--");return!t||(0,i.vk)(Number(t),(0,i.nx)())>f}var b=r("TUkY"),_=r("Ziog"),x=r("uKaK");const w="_DD_SESSION";function A(){const e=(0,_.VZ)();return e[w]||(e[w]={}),(0,x.yG)(e[w])}function S(e){(0,_.VZ)()[w]=(0,x.yG)(e)}const C=i.OY;function E(e){const{sessionPersistence:t}=e,r=function(e,t){return Array.isArray(e)?e:void 0!==e?[e]:t.allowFallbackToLocalStorage?[b.Q_.COOKIE,b.Q_.LOCAL_STORAGE]:[b.Q_.COOKIE]}(t,e);for(const t of r){const r=T(t,e);if(void 0!==r)return r}}function T(e,t){switch(e){case b.Q_.COOKIE:return(0,c.ge)(t);case b.Q_.LOCAL_STORAGE:return(0,d.aW)();case b.Q_.MEMORY:return{type:b.Q_.MEMORY};default:return void l.Vy.error(`Invalid session persistence '${String(e)}'`)}}function I(e,t,r,l,f=function(e,t){return e.type===b.Q_.COOKIE?(0,c.iA)(t,e.cookieOptions):e.type===b.Q_.LOCAL_STORAGE?(0,d.eh)(t):function(e){return{expireSession:t=>function(e,t){S((0,u.zn)(e,t))}(t,e),isLockEnabled:!1,persistSession:S,retrieveSession:A}}(t)}(e,t)){const p=new o.cP,h=new o.cP,g=new o.cP,y=(0,n.yb)(function(){const e=f.retrieveSession();(0,u.W3)(e)?m({process:e=>(0,u.W3)(e)?(0,u.zn)(e,t):void 0,after:w},f):w(e)},C);let v;E();const{throttled:_,cancel:x}=(0,a.n)(()=>{m({process:e=>{if((0,u.TE)(e))return;const n=w(e);return function(e){if((0,u.TE)(e))return!1;const n=l(e[r]);e[r]=n,delete e.isExpired,n===b.gB||e.id||(e.id=(0,s.lk)(),e.created=String((0,i.x3)())),t.trackAnonymousUser&&!e.anonymousId&&(e.anonymousId=(0,s.lk)())}(n),n},after:e=>{(0,u.c$)(e)&&!T()&&function(e){v=e,p.notify()}(e),v=e}},f)},C);function w(e){return(0,u.W3)(e)&&(e=(0,u.zn)(e,t)),T()&&(function(e){return v.id!==e.id||v[r]!==e[r]}(e)?(v=(0,u.zn)(v,t),h.notify()):(g.notify({previousState:v,newState:e}),v=e)),e}function E(){m({process:e=>{if((0,u.TE)(e))return e.anonymousId=(0,s.lk)(),(0,u.zn)(e,t)},after:e=>{v=e}},f)}function T(){return void 0!==(null==v?void 0:v[r])}return{expandOrRenewSession:_,expandSession:function(){m({process:e=>T()?w(e):void 0},f)},getSession:()=>v,renewObservable:p,expireObservable:h,sessionStateUpdateObservable:g,restartSession:E,expire:e=>{x(),!1===e&&v&&delete v.anonymousId,f.expireSession(v),w((0,u.zn)(v,t))},stop:()=>{(0,n.vG)(y)},updateSessionState:function(e){m({process:t=>({...t,...e}),after:w},f)}}}},"PL+z"(e,t,r){"use strict";r.d(t,{iA:()=>u,Hv:()=>f,ge:()=>c});var n=r("uKaK"),o=r("ZNwq"),i=r("LGu8"),a=r("tLpm"),s=r("FbtF"),l=r("TUkY");function c(e){const t=function(e){const t={};if(t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){const e=(0,i.DQ)();if(!e)return;t.domain=e}return t}(e);return t&&(0,i.z$)(t)?{type:l.Q_.COOKIE,cookieOptions:t}:void 0}function u(e,t){const r={isLockEnabled:(0,o.F2)(),persistSession:r=>d(t,e,r,l.HB),retrieveSession:()=>f(t,e),expireSession:r=>d(t,e,(0,s.zn)(r,e),l.AQ)};return function(e){if(!(0,i.B9)(a.Z)){const t=(0,i.B9)("_dd"),r=(0,i.B9)("_dd_r"),n=(0,i.B9)("_dd_l"),o={};t&&(o.id=t),n&&/^[01]$/.test(n)&&(o.logs=n),r&&/^[012]$/.test(r)&&(o.rum=r),(0,s.c$)(o)&&((0,s.oT)(o),e.persistSession(o))}}(r),r}function d(e,t,r,o){let c=(0,s.D9)(r);t.betaEncodeCookieOptions&&(c=(0,s.D9)({...r,...(0,n.RI)(r)?{}:{c:p(e)}})),(0,i.TV)(a.Z,c,t.trackAnonymousUser?l._P:o,e)}function f(e,t){if(t.betaEncodeCookieOptions)return function(e){const t=(0,i.OR)(a.Z),r=p(e);let n;for(const e of t.reverse())if(n=(0,s.H9)(e),n.c===r)break;return null==n||delete n.c,null!=n?n:{}}(e);const r=(0,i.Ri)(a.Z);return(0,s.H9)(r)}function p(e){let t=0;return t|=0,t|=(e.domain?e.domain.split(".").length-1:0)<<1,t|=e.crossSite?1:0,t.toString(16)}},hI5M(e,t,r){"use strict";r.d(t,{aW:()=>s,dX:()=>u,eh:()=>l});var n=r("Hz1A"),o=r("TUkY"),i=r("FbtF"),a=r("tLpm");function s(){try{const e=(0,n.lk)(),t=`_dd_test_${e}`;localStorage.setItem(t,e);const r=localStorage.getItem(t);return localStorage.removeItem(t),e===r?{type:o.Q_.LOCAL_STORAGE}:void 0}catch(e){return}}function l(e){return{isLockEnabled:!1,persistSession:c,retrieveSession:u,expireSession:t=>function(e,t){c((0,i.zn)(e,t))}(t,e)}}function c(e){localStorage.setItem(a.Z,(0,i.D9)(e))}function u(){const e=localStorage.getItem(a.Z);return(0,i.H9)(e)}},tLpm(e,t,r){"use strict";r.d(t,{Z:()=>n});const n="_dd_s"},wzgf(e,t,r){"use strict";r.d(t,{Fs:()=>p,IM:()=>f,ao:()=>d});var n=r("LGu8"),o=r("Ziog"),i=r("uKaK");const a="datadog-synthetics-",s=`${a}public-id`,l=`${a}result-id`,c=`${a}injects-rum`,u=`${a}rum-context`;function d(){return!o.Wq&&Boolean(o.J2._DATADOG_SYNTHETICS_INJECTS_RUM||(0,n.B9)(c))}function f(){const e=function(){const e=o.J2._DATADOG_SYNTHETICS_RUM_CONTEXT;if(e)return e;const t=(0,n.B9)(u);return t?(0,i.XU)(decodeURIComponent(t)):{test_id:window._DATADOG_SYNTHETICS_PUBLIC_ID||(0,n.B9)(s),result_id:window._DATADOG_SYNTHETICS_RESULT_ID||(0,n.B9)(l)}}();return"object"==typeof(t=e)&&null!==t&&"string"==typeof t.test_id&&"string"==typeof t.result_id?e:void 0;var t}function p(){return Boolean(f())}},sL8f(e,t,r){"use strict";r.d(t,{NQ:()=>i,iP:()=>a,m5:()=>o});var n=r("fBG3");function o(e){const{env:t,service:r,version:n,datacenter:o,sdkVersion:a,variant:s}=e,l=[i("sdk_version",null!=a?a:"6.30.1")];return t&&l.push(i("env",t)),r&&l.push(i("service",r)),n&&l.push(i("version",n)),o&&l.push(i("datacenter",o)),s&&l.push(i("variant",s)),l}function i(e,t){const r=t?`${e}:${t}`:e;return(r.length>200||function(e){return!!function(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch(e){return!1}}()&&new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e)}(r))&&n.Vy.warn(`Tag ${r} doesn't meet tag requirements and will be sanitized. ${n.xG} ${n.fH}/getting_started/tagging/#defining-tags`),a(r)}function a(e){return e.replace(/,/g,"_")}},"Zv/8"(e,t,r){"use strict";r.d(t,{Rr:()=>F,A2:()=>L,VJ:()=>N,Gk:()=>z,Q6:()=>B,a5:()=>D});var n=r("fBG3"),o=r("aI0c"),i=r("jIMw"),a=r("VECG"),s=r("sL8f"),l=r("zDtL"),c=r("FDU9"),u=r("pX5O"),d=r("DIDV"),f=r("wRiy"),p=r("I4oo"),h=r("YHPH"),m=r("vjAG"),g=r("RE+S"),y=r("QaFg"),v=r("fbvQ"),b=r("kTsJ"),_=r("GZz+"),x=r("Zs30"),w=r("mWzl"),A=r("Ihxy"),S=r("Ig5h"),C=r("Ziog"),E=r("PXye");const T="log",I="configuration",k="usage",M=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost",""],R=[l.R8];let P;function O(){return P||(P=new c.dX(100)),P}function D(e,t,r){const n=new c.cP,{enabled:o,metricsEnabled:i}=function(e,t,r,n,o=1,i=15){const l={},c=!R.includes(t.site)&&(0,p.ic)(t.telemetrySampleRate),g={[T]:c,[I]:c&&(0,p.ic)(t.telemetryConfigurationSampleRate),[k]:c&&(0,p.ic)(t.telemetryUsageSampleRate),metric:c&&(0,p.ic)(o)},v={is_local_file:"file:"===(null===(_=C.J2.location)||void 0===_?void 0:_.protocol),is_worker:C.Wq},b=O();var _;return b.subscribe(({rawEvent:o,metricName:c})=>{if(c&&!g.metric||!g[o.type])return;const d=c||o.status||o.type;let p=l[d];if(p||(p=l[d]=new Set),p.size>=i)return;const b=(0,h.s)(o);if(p.has(b))return;const _=r.triggerHook(1,{startTime:(0,u.M8)().relative});if(_===S.ug)return;const x=function(e,r,n,o){const i={type:"telemetry",date:(0,u.M8)().timeStamp,service:r,version:"6.30.1",source:"browser",_dd:{format_version:2},telemetry:(0,m.kg)(n,{runtime_env:o,connectivity:(0,y.q)(),sdk_setup:"npm"}),ddtags:(0,s.m5)(t).join(","),experimental_features:Array.from((0,a.q7)())};return(0,m.kg)(i,e)}(_,e,o,v);n.notify(x),(0,f.b)("telemetry",x),p.add(b)}),b.unbuffer(),(0,d.Bd)(N),{enabled:c,metricsEnabled:g.metric}}(e,t,r,n),{stop:g}=function(e,t){const r=[];if((0,v.d0)()){const e=(0,v.Y9)(),n=t.subscribe(t=>e.send("internal_telemetry",t));r.push(n.unsubscribe)}else{const n=[e.rumEndpointBuilder];e.replica&&function(e){return e.site===l.Bb}(e)&&n.push(e.replica.rumEndpointBuilder);const o=(0,b.X)({encoder:(0,w.N)(),request:(0,_.sA)(n,E.l),flushController:(0,x.tO)({pageMayExitObservable:(0,A._T)(e),sessionExpireObservable:new c.cP})});r.push(o.stop);const i=t.subscribe(o.add);r.push(i.unsubscribe)}return{stop:()=>r.forEach(e=>e())}}(t,n);return{stop:g,enabled:o,metricsEnabled:i}}function L(e,t){(0,d.oO)(n.bP.debug,e,t),O().notify({rawEvent:{type:T,message:e,status:"debug",...t}})}function N(e,t){O().notify({rawEvent:{type:T,status:"error",...j(e),...t}})}function F(e){O().notify({rawEvent:{type:I,configuration:e}})}function z(e,t){O().notify({rawEvent:{type:T,message:e,status:"debug",...t},metricName:e})}function B(e){O().notify({rawEvent:{type:k,usage:e}})}function j(e){if((0,o.bJ)(e)){const t=(0,g.T)(e);return{error:{kind:t.name,stack:(0,i.Yn)($(t))},message:t.message}}return{error:{stack:o.e6},message:`Uncaught ${(0,h.s)(e)}`}}function $(e){return e.stack=e.stack.filter(e=>!e.url||M.some(t=>e.url.startsWith(t))),e}},h49T(e,t,r){"use strict";r.d(t,{D:()=>i,w:()=>o});var n=r("FDU9");const o={GRANTED:"granted",NOT_GRANTED:"not-granted"};function i(e){const t=new n.cP;return{tryToInit(t){e||(e=t)},update(r){e=r,t.notify()},isGranted:()=>e===o.GRANTED,observable:t}}},Ig5h(e,t,r){"use strict";r.d(t,{$O:()=>i,XP:()=>a,ug:()=>o});var n=r("vjAG");const o="DISCARDED",i="SKIPPED";function a(){const e={};return{register:(t,r)=>(e[t]||(e[t]=[]),e[t].push(r),{unregister:()=>{e[t]=e[t].filter(e=>e!==r)}}),triggerHook(t,r){const a=e[t]||[],s=[];for(const e of a){const t=e(r);if(t===o)return o;t!==i&&s.push(t)}return(0,n.kg)(...s)}}}},kmbF(e,t,r){"use strict";r.d(t,{D:()=>n});class n{constructor(){this.callbacks={}}notify(e,t){const r=this.callbacks[e];r&&r.forEach(e=>e(t))}subscribe(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(e=>t!==e)}}}}},yOVQ(e,t,r){"use strict";r.d(t,{O:()=>o});var n=r("IJTo");function o(){const e=[];return{add:t=>{e.push(t)>500&&e.splice(0,1)},remove:t=>{(0,n.Ai)(e,t)},drain:t=>{e.forEach(e=>e(t)),e.length=0}}}},v3rh(e,t,r){"use strict";r.d(t,{y:()=>o});var n=r("fBG3");function o(e,t){return(...r)=>{try{return e(...r)}catch(e){n.Vy.error(t,e)}}}},fBG3(e,t,r){"use strict";r.d(t,{JZ:()=>o,Vy:()=>s,Xs:()=>c,Z9:()=>i,bP:()=>n,fH:()=>l,xG:()=>u});const n={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},o=console,i={};Object.keys(n).forEach(e=>{i[e]=o[e]});const a="Datadog Browser SDK:",s={debug:i.debug.bind(o,a),log:i.log.bind(o,a),info:i.info.bind(o,a),warn:i.warn.bind(o,a),error:i.error.bind(o,a)},l="https://docs.datadoghq.com",c=`${l}/real_user_monitoring/browser/troubleshooting`,u="More details:"},mWzl(e,t,r){"use strict";r.d(t,{N:()=>o});var n=r("N/so");function o(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(r,o){const i=(0,n.WW)(r);t+=i,e+=r,o&&o(i)},finish(e){e(this.finishSync())},finishSync(){const r={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,r},estimateEncodedBytesCount:e=>e.length}}},VECG(e,t,r){"use strict";r.d(t,{Aq:()=>a,R9:()=>n,q7:()=>l,sr:()=>s});var n,o=r("uKaK");!function(e){e.TRACK_INTAKE_REQUESTS="track_intake_requests",e.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",e.FEATURE_OPERATION_VITAL="feature_operation_vital",e.SHORT_SESSION_INVESTIGATION="short_session_investigation",e.START_STOP_ACTION="start_stop_action",e.START_STOP_RESOURCE="start_stop_resource",e.USE_CHANGE_RECORDS="use_change_records",e.LCP_SUBPARTS="lcp_subparts",e.INP_SUBPARTS="inp_subparts"}(n||(n={}));const i=new Set;function a(e){Array.isArray(e)&&e.filter(e=>(0,o.Rj)(n,e)).forEach(e=>{i.add(e)})}function s(e){return i.has(e)}function l(){return i}},k0ez(e,t,r){"use strict";r.d(t,{W:()=>o});var n=r("Ziog");function o(e,t){const r=(0,n.VZ)();let o;return r.Zone&&"function"==typeof r.Zone.__symbol__&&(o=e[r.Zone.__symbol__(t)]),o||(o=e[t]),o}},Ziog(e,t,r){"use strict";function n(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}r.d(t,{J2:()=>o,VZ:()=>n,Wq:()=>i});const o=n(),i="WorkerGlobalScope"in o},Zn7e(e,t,r){"use strict";r.d(t,{H:()=>s,t:()=>l});var n=r("bgI0"),o=r("DIDV"),i=r("PXye"),a=r("jIMw");function s(e,t,r,{computeHandlingStack:n}={}){let s=e[t];if("function"!=typeof s){if(!(t in e)||"string"!=typeof t||!t.startsWith("on"))return{stop:i.l};s=i.l}let l=!1;const c=function(){if(l)return s.apply(this,arguments);const e=Array.from(arguments);let t;(0,o.um)(r,null,[{target:this,parameters:e,onPostCall:e=>{t=e},handlingStack:n?(0,a.uC)("instrumented method"):void 0}]);const i=s.apply(this,e);return t&&(0,o.um)(t,null,[i]),i};return e[t]=c,{stop:()=>{l=!0,e[t]===c&&(e[t]=s)}}}function l(e,t,r){const o=Object.getOwnPropertyDescriptor(e,t);if(!o||!o.set||!o.configurable)return{stop:i.l};const a=i.l;let s=(e,t)=>{(0,n.wg)(()=>{s!==a&&r(e,t)},0)};const l=function(e){o.set.call(this,e),s(this,e)};return Object.defineProperty(e,t,{set:l}),{stop:()=>{var r;(null===(r=Object.getOwnPropertyDescriptor(e,t))||void 0===r?void 0:r.set)===l&&Object.defineProperty(e,t,o),s=a}}}},IpeG(e,t,r){"use strict";r.d(t,{K:()=>a,V:()=>i});var n=r("fBG3"),o=r("FMiR");function i(e){const t=(0,o.P)(e);return"string"===t||"function"===t||e instanceof RegExp}function a(e,t,r=!1){return e.some(e=>{try{if("function"==typeof e)return e(t);if(e instanceof RegExp)return e.test(t);if("string"==typeof e)return r?t.startsWith(e):e===t}catch(e){n.Vy.error(e)}return!1})}},vjAG(e,t,r){"use strict";r.d(t,{Go:()=>i,kg:()=>a});var n=r("FMiR");function o(e,t,r=function(){if("undefined"!=typeof WeakSet){const e=new WeakSet;return{hasAlreadyBeenSeen(t){const r=e.has(t);return r||e.add(t),r}}}const e=[];return{hasAlreadyBeenSeen(t){const r=e.indexOf(t)>=0;return r||e.push(t),r}}}()){if(void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,e)}if(r.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const n=Array.isArray(e)?e:[];for(let e=0;en}),new Map},DIDV(e,t,r){"use strict";r.d(t,{Bd:()=>a,Dx:()=>d,Ed:()=>l,dm:()=>c,oO:()=>f,pM:()=>s,um:()=>u});var n=r("fBG3");let o,i=!1;function a(e){o=e}function s(e){i=e}function l(e,t,r){const n=r.value;r.value=function(...e){return(o?c(n):n).apply(this,e)}}function c(e){return function(...t){return u(e,this,t)}}function u(e,t,r){try{return e.apply(t,r)}catch(e){d(e)}}function d(e){if(f(e),o)try{o(e)}catch(e){f(e)}}function f(...e){i&&n.Vy.error("[MONITOR]",...e)}},FDU9(e,t,r){"use strict";r.d(t,{dX:()=>l,cP:()=>a,Fx:()=>s});var n=r("DIDV"),o=r("Ziog");function i(e){var t;const r=null===(t=o.J2.queueMicrotask)||void 0===t?void 0:t.bind(o.J2);"function"==typeof r?r((0,n.dm)(e)):Promise.resolve().then((0,n.dm)(e))}class a{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.addObserver(e),{unsubscribe:()=>this.removeObserver(e)}}notify(e){this.observers.forEach(t=>t(e))}addObserver(e){this.observers.push(e),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(e){this.observers=this.observers.filter(t=>e!==t),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function s(...e){return new a(t=>{const r=e.map(e=>e.subscribe(e=>t.notify(e)));return()=>r.forEach(e=>e.unsubscribe())})}class l extends a{constructor(e){super(),this.maxBufferSize=e,this.buffer=[]}notify(e){this.buffer.push(e),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(e)}subscribe(e){let t=!1;const r={unsubscribe:()=>{t=!0,this.removeObserver(e)}};return i(()=>{for(const r of this.buffer){if(t)return;e(r)}t||this.addObserver(e)}),r}unbuffer(){i(()=>{this.maxBufferSize=this.buffer.length=0})}}},O2SO(e,t,r){"use strict";r.d(t,{BB:()=>a});var n=r("bgI0"),o=r("DIDV"),i=r("pX5O");function a(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const r=window.requestIdleCallback((0,o.dm)(e),t);return()=>window.cancelIdleCallback(r)}return function(e){const t=(0,i.x3)(),r=(0,n.wg)(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-((0,i.x3)()-t))})},0);return()=>(0,n.DJ)(r)}(e)}},wRiy(e,t,r){"use strict";r.d(t,{b:()=>o});var n=r("Ziog");function o(e,t){const r=n.J2.__ddBrowserSdkExtensionCallback;r&&r({type:e,payload:t})}},YHPH(e,t,r){"use strict";r.d(t,{M:()=>i,s:()=>o});var n=r("PXye");function o(e,t,r){if("object"!=typeof e||null===e)return JSON.stringify(e);const n=i(Object.prototype),o=i(Array.prototype),a=i(Object.getPrototypeOf(e)),s=i(e);try{return JSON.stringify(e,t,r)}catch(e){return""}finally{n(),o(),a(),s()}}function i(e){const t=e,r=t.toJSON;return r?(delete t.toJSON,()=>{t.toJSON=r}):n.l}},"5El4"(e,t,r){"use strict";r.d(t,{a:()=>s});var n=r("fBG3"),o=r("N/so"),i=r("YHPH");const a=220*o._m;function s(e,t=a){const r=(0,i.M)(Object.prototype),n=(0,i.M)(Array.prototype),o=[],s=new WeakMap,c=l(e,"$",void 0,o,s),d=JSON.stringify(c);let f=d?d.length:0;if(!(f>t)){for(;o.length>0&&ft){u(t,"truncated",e);break}r.target[i]=a}else for(const i in r.source)if(Object.prototype.hasOwnProperty.call(r.source,i)){const a=l(r.source[i],r.path,i,o,s);if(void 0!==a&&(f+=JSON.stringify(a).length+n+i.length+3,n=1),f>t){u(t,"truncated",e);break}r.target[i]=a}}return r(),n(),c}u(t,"discarded",e)}function l(e,t,r,n,o){const i=function(e){const t=e;if(t&&"function"==typeof t.toJSON)try{return t.toJSON()}catch(e){}return e}(e);if(!i||"object"!=typeof i)return"bigint"==typeof(a=i)?`[BigInt] ${a.toString()}`:"function"==typeof a?`[Function] ${a.name||"unknown"}`:"symbol"==typeof a?`[Symbol] ${a.description||a.toString()}`:a;var a;const s=c(i);if("[Object]"!==s&&"[Array]"!==s&&"[Error]"!==s)return s;const l=e;if(o.has(l))return`[Reference seen at ${o.get(l)}]`;const u=void 0!==r?`${t}.${r}`:t,d=Array.isArray(i)?[]:{};return o.set(l,u),n.push({source:i,target:d,path:u}),d}function c(e){try{if(e instanceof Event)return{type:(t=e).type,isTrusted:t.isTrusted,currentTarget:t.currentTarget?c(t.currentTarget):null,target:t.target?c(t.target):null};if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const r=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(r&&r[1])return`[${r[1]}]`}catch(e){}var t;return"[Unserializable]"}function u(e,t,r){n.Vy.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,r)}},"RE+S"(e,t,r){"use strict";r.d(t,{T:()=>i,h:()=>m});var n=r("FMiR");const o="?";function i(e){var t,r;const n=[];let i=h(e,"stack");const a=String(e);if(i&&i.startsWith(a)&&(i=i.slice(a.length)),i&&i.split("\n").forEach(e=>{const t=function(e){const t=l.exec(e);if(!t)return;const r=t[2]&&0===t[2].indexOf("native"),n=t[2]&&0===t[2].indexOf("eval"),i=c.exec(t[2]);return n&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:r?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||o,line:t[3]?+t[3]:void 0,url:r?void 0:t[2]}}(e)||function(e){const t=u.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||o,line:t[3]?+t[3]:void 0,url:t[2]}}(e)||function(e){const t=d.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||o,line:+t[3],url:t[2]}}(e)||function(e){const t=f.exec(e);if(!t)return;const r=t[3]&&t[3].indexOf(" > eval")>-1,n=p.exec(t[3]);return r&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||o,line:t[4]?+t[4]:void 0,url:t[3]}}(e);t&&(!t.func&&t.line&&(t.func=o),n.push(t))}),n.length>0&&function(){if(void 0!==v)return v;class e extends Error{constructor(){super(),this.name="Error"}}const[t,r]=[e,Error].map(e=>new e);return v=y(Object.getPrototypeOf(t))&&r.stack!==t.stack,v}()&&e instanceof Error){const i=[];let a=e;for(;(a=Object.getPrototypeOf(a))&&y(a);){const e=(null===(t=a.constructor)||void 0===t?void 0:t.name)||o;i.push(e)}for(let e=i.length-1;e>=0&&(null===(r=n[0])||void 0===r?void 0:r.func)===i[e];e--)n.shift()}return{message:h(e,"message"),name:h(e,"name"),stack:n}}const a="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet||\\w+\\.|\\/).*?)",s="(?::(\\d+))",l=new RegExp(`^\\s*at (.*?) ?\\(${a}${s}?${s}?\\)?\\s*$`,"i"),c=new RegExp(`\\((\\S*)${s}${s}\\)`),u=new RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${a}${s}?${s}??\\s*$`,"i"),d=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,p=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function h(e,t){return(0,n.O)(e)&&"string"==typeof e[t]?e[t]:void 0}function m(e,t,r,n){if(void 0===t)return;const{name:o,message:i}=function(e){let t,r;return"[object String]"==={}.toString.call(e)&&([,t,r]=g.exec(e)),{name:t,message:r}}(e);return{name:o,message:i,stack:[{url:t,column:n,line:r}]}}const g=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function y(e){return String(e.constructor).startsWith("class ")}let v},jIMw(e,t,r){"use strict";r.d(t,{NR:()=>s,Yn:()=>a,uC:()=>i});var n=r("DIDV"),o=r("RE+S");function i(e){const t=new Error(e);let r;return t.name="HandlingStack",(0,n.um)(()=>{const e=(0,o.T)(t);e.stack=e.stack.slice(2),r=a(e)}),r}function a(e){let t=s(e);return e.stack.forEach(e=>{const r="?"===e.func?"":e.func,n=e.args&&e.args.length>0?`(${e.args.join(", ")})`:"",o=e.line?`:${e.line}`:"",i=e.line&&e.column?`:${e.column}`:"";t+=`\n at ${r}${n} @ ${e.url}${o}${i}`}),t}function s(e){return`${e.name||"Error"}: ${e.message}`}},bgI0(e,t,r){"use strict";r.d(t,{DJ:()=>s,vG:()=>c,wg:()=>a,yb:()=>l});var n=r("k0ez"),o=r("DIDV"),i=r("Ziog");function a(e,t){return(0,n.W)((0,i.VZ)(),"setTimeout")((0,o.dm)(e),t)}function s(e){(0,n.W)((0,i.VZ)(),"clearTimeout")(e)}function l(e,t){return(0,n.W)((0,i.VZ)(),"setInterval")((0,o.dm)(e),t)}function c(e){(0,n.W)((0,i.VZ)(),"clearInterval")(e)}},IJTo(e,t,r){"use strict";function n(e){const t=new Set;return e.forEach(e=>t.add(e)),Array.from(t)}function o(e,t){const r=e.indexOf(t);r>=0&&e.splice(r,1)}function i(e){return Array.isArray(e)&&e.length>0}r.d(t,{Ai:()=>o,EI:()=>i,R3:()=>n})},ZNwq(e,t,r){"use strict";function n(){return 0===a()}function o(){return 1===a()}let i;function a(){return null!=i?i:i=function(e=window){var t;const r=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(r)?0:0===(null===(t=e.navigator.vendor)||void 0===t?void 0:t.indexOf("Apple"))||/safari/i.test(r)&&!/chrome|android/i.test(r)?1:2}()}r.d(t,{F2:()=>n,nr:()=>o})},"N/so"(e,t,r){"use strict";r.d(t,{WW:()=>a,_m:()=>n,iH:()=>o,wh:()=>s});const n=1024,o=1024*n,i=/[^\u0000-\u007F]/;function a(e){return i.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length}function s(e){if(1===e.length)return e[0];const t=e.reduce((e,t)=>e+t.length,0),r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}},PXye(e,t,r){"use strict";r.d(t,{l:()=>i,n:()=>o});var n=r("bgI0");function o(e,t,r){const o=!r||void 0===r.leading||r.leading,i=!r||void 0===r.trailing||r.trailing;let a,s,l=!1;return{throttled:(...r)=>{l?a=r:(o?e(...r):a=r,l=!0,s=(0,n.wg)(()=>{i&&a&&e(...a),l=!1,a=void 0},t))},cancel:()=>{(0,n.DJ)(s),l=!1,a=void 0}}}function i(){}},I4oo(e,t,r){"use strict";function n(e){return 0!==e&&100*Math.random()<=e}function o(e,t){return+e.toFixed(t)}function i(e){return a(e)&&e>=0&&e<=100}function a(e){return"number"==typeof e}r.d(t,{Et:()=>a,LI:()=>o,fp:()=>i,ic:()=>n})},uKaK(e,t,r){"use strict";function n(e){try{return JSON.parse(e)}catch(e){}}function o(e){return{...e}}function i(e,t){return Object.keys(e).some(r=>e[r]===t)}function a(e){return 0===Object.keys(e).length}function s(e,t){const r={};for(const n of Object.keys(e))r[n]=t(e[n]);return r}r.d(t,{LG:()=>s,RI:()=>a,Rj:()=>i,XU:()=>n,yG:()=>o})},TiVH(e,t,r){"use strict";function n(e,t){for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(t(n,r,e))return n}}function o(e){return Object.values(e)}function i(e){return Object.entries(e)}r.d(t,{KQ:()=>o,Uk:()=>n,WP:()=>i})},zwU6(e,t,r){"use strict";function n(e){return e>=500}function o(e){try{return e.clone()}catch(e){return}}r.d(t,{G:()=>n,i:()=>o})},Hz1A(e,t,r){"use strict";function n(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n)}r.d(t,{Dh:()=>a,_R:()=>l,it:()=>s,lk:()=>n,rx:()=>i});const o=/(\S+?)\s*=\s*(.+?)(?:;|$)/g;function i(e,t){for(o.lastIndex=0;;){const r=o.exec(e);if(!r)break;if(r[1]===t)return r[2]}}function a(e){const t=new Map;for(o.lastIndex=0;;){const r=o.exec(e);if(!r)break;{const e=r[1],n=r[2];t.has(e)?t.get(e).push(n):t.set(e,[n])}}return t}function s(e){const t=new Map;for(o.lastIndex=0;;){const r=o.exec(e);if(!r)break;t.set(r[1],r[2])}return t}function l(e,t,r=""){const n=e.charCodeAt(t-1),o=n>=55296&&n<=56319?t+1:t;return e.length<=o?e:`${e.slice(0,o)}${r}`}},pX5O(e,t,r){"use strict";r.d(t,{$H:()=>s,$S:()=>m,FR:()=>l,Gw:()=>b,M8:()=>g,MA:()=>a,OY:()=>o,Oc:()=>y,TP:()=>d,Zj:()=>f,gs:()=>_,iW:()=>i,jR:()=>c,nx:()=>h,pu:()=>x,vk:()=>v,x3:()=>p});var n=r("I4oo");const o=1e3,i=60*o,a=60*i,s=24*a*365;function l(e){return{relative:e,timeStamp:u(e)}}function c(e){return{relative:_(e),timeStamp:e}}function u(e){const t=p()-performance.now();return t>A()?Math.round(b(t,e)):function(e){return Math.round(b(A(),e))}(e)}function d(){return Math.round(p()-b(A(),performance.now()))}function f(e){return(0,n.Et)(e)?(0,n.LI)(1e6*e,0):e}function p(){return(new Date).getTime()}function h(){return p()}function m(){return performance.now()}function g(){return{relative:m(),timeStamp:h()}}function y(){return{relative:0,timeStamp:A()}}function v(e,t){return t-e}function b(e,t){return e+t}function _(e){return e-A()}function x(e){return eo,P:()=>n})},EdLy(e,t,r){"use strict";r.d(t,{AY:()=>i,L2:()=>a,c$:()=>s,l2:()=>o});var n=r("Ziog");function o(e){return s(e,location.href).href}function i(e){try{return!!s(e)}catch(e){return!1}}function a(e){const t=s(e).pathname;return"/"===t[0]?t:`/${t}`}function s(e,t){const{URL:r}=function(){if(!l){let e,t;try{e=document.createElement("iframe"),e.style.display="none",document.body.appendChild(e),t=e.contentWindow}catch(e){t=n.J2}l={URL:t.URL},null==e||e.remove()}return l}();try{return void 0!==t?new r(e,t):new r(e)}catch(e){throw new Error(`Failed to construct URL: ${String(e)}`)}}let l},WrbB(e,t,r){"use strict";r.d(t,{qj:()=>u});var n=r("bgI0"),o=r("IJTo"),i=r("pX5O");const a=1/0,s=i.iW;let l;const c=new Set;function u({expireDelay:e,maxEntries:t}){let r=[];l||(l=(0,n.yb)(()=>{c.forEach(e=>e())},s));const u=()=>{const t=(0,i.$S)()-e;for(;r.length>0&&r[r.length-1].endTime{(0,o.Ai)(r,i)},close:e=>{i.endTime=e}};return t&&r.length>=t&&r.pop(),r.unshift(i),i},find:function(e=1/0,t={returnInactive:!1}){for(const n of r)if(n.startTime<=e){if(t.returnInactive||e<=n.endTime)return n.value;break}},closeActive:function(e){const t=r[0];t&&t.endTime===a&&t.close(e)},findAll:function(e=1/0,t=0){const n=(0,i.Gw)(e,t);return r.filter(t=>t.startTime<=n&&e<=t.endTime).map(e=>e.value)},reset:function(){r=[]},stop:function(){c.delete(u),0===c.size&&l&&((0,n.vG)(l),l=void 0)}}}},kTsJ(e,t,r){"use strict";r.d(t,{X:()=>c});var n=r("fBG3"),o=r("TiVH"),i=r("Ihxy"),a=r("YHPH"),s=r("N/so");const l=256*s._m;function c({encoder:e,request:t,flushController:r}){let c={};const d=r.flushObservable.subscribe(r=>function(r){const n=(0,o.KQ)(c).join("\n");c={};const a=(0,i.Kp)(r.reason),l=a?t.sendOnExit:t.send;if(a&&e.isAsync){const t=e.finishSync();t.outputBytesCount&&l(u(t));const r=[t.pendingData,n].filter(Boolean).join("\n");r&&l({data:r,bytesCount:(0,s.WW)(r)})}else n&&e.write(e.isEmpty?n:`\n${n}`),e.finish(e=>{l(u(e))})}(r));function f(t,o){const i=(0,a.s)(t),u=e.estimateEncodedBytesCount(i);u>=l?n.Vy.warn(`Discarded a message whose size was bigger than the maximum allowed size ${l/s._m}KiB. ${n.xG} ${n.Xs}/#technical-limitations`):(function(e){return void 0!==e&&void 0!==c[e]}(o)&&function(t){const n=c[t];delete c[t];const o=e.estimateEncodedBytesCount(n);r.notifyAfterRemoveMessage(o)}(o),function(t,n,o){r.notifyBeforeAddMessage(n),void 0!==o?(c[o]=t,r.notifyAfterAddMessage()):e.write(e.isEmpty?t:`\n${t}`,e=>{r.notifyAfterAddMessage(e-n)})}(i,u,o))}return{flushController:r,add:f,upsert:f,stop:d.unsubscribe}}function u(e){let t;return t="string"==typeof e.output?e.output:new Blob([e.output],{type:"text/plain"}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}},fbvQ(e,t,r){"use strict";r.d(t,{Ww:()=>i,Y9:()=>o,d0:()=>a});var n=r("Ziog");function o(){const e=(0,n.VZ)().DatadogEventBridge;if(e)return{getCapabilities(){var t;return JSON.parse((null===(t=e.getCapabilities)||void 0===t?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return null===(t=e.getPrivacyLevel)||void 0===t?void 0:t.call(e)},getAllowedWebViewHosts:()=>JSON.parse(e.getAllowedWebViewHosts()),send(t,r,n){const o=n?{id:n}:void 0;e.send(JSON.stringify({eventType:t,event:r,view:o}))}}}function i(e){const t=o();return!!t&&t.getCapabilities().includes(e)}function a(e){var t;void 0===e&&(e=null===(t=(0,n.VZ)().location)||void 0===t?void 0:t.hostname);const r=o();return!!r&&r.getAllowedWebViewHosts().some(t=>e===t||e.endsWith(`.${t}`))}},Zs30(e,t,r){"use strict";r.d(t,{tO:()=>u});var n=r("Ziog"),o=r("FDU9"),i=r("bgI0"),a=r("pX5O"),s=r("GZz+");const l=30*a.OY,c=n.Wq?1:50;function u({pageMayExitObservable:e,sessionExpireObservable:t}){const r=e.subscribe(e=>p(e.reason)),n=t.subscribe(()=>p("session_expire")),a=new o.cP(()=>()=>{r.unsubscribe(),n.unsubscribe()});let u,d=0,f=0;function p(e){if(0===f)return;const t=f,r=d;f=0,d=0,h(),a.notify({reason:e,messagesCount:t,bytesCount:r})}function h(){(0,i.DJ)(u),u=void 0}return{flushObservable:a,get messagesCount(){return f},notifyBeforeAddMessage(e){d+e>=s.AK&&p("bytes_limit"),f+=1,d+=e,void 0===u&&(u=(0,i.wg)(()=>{p("duration_limit")},l))},notifyAfterAddMessage(e=0){d+=e,f>=c?p("messages_limit"):d>=s.AK&&p("bytes_limit")},notifyAfterRemoveMessage(e){d-=e,f-=1,0===f&&h()}}}},"GZz+"(e,t,r){"use strict";r.d(t,{AK:()=>_,sA:()=>x});var n=r("Gd1n"),o=r("DIDV"),i=r("FDU9"),a=r("N/so"),s=r("bgI0"),l=r("pX5O"),c=r("zwU6"),u=r("7ql9");const d=80*a._m,f=20*a.iH,p=l.iW,h=l.OY;function m(e,t,r,n,o,i){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?y(e,t,r,i,{onSuccess:()=>v(0,t,r,n,o,i),onFailure:()=>{t.queuedPayloads.enqueue(e)||i.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e}),g(t,r,n,o,i)}}):t.queuedPayloads.enqueue(e)||i.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e})}function g(e,t,r,n,o){2===e.transportStatus&&(0,s.wg)(()=>{y(e.queuedPayloads.first(),e,t,o,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=h,v(1,e,t,r,n,o)},onFailure:()=>{e.currentBackoffTime=Math.min(p,2*e.currentBackoffTime),g(e,t,r,n,o)}})},e.currentBackoffTime)}function y(e,t,r,n,{onSuccess:o,onFailure:i}){t.bandwidthMonitor.add(e),r(e,r=>{t.bandwidthMonitor.remove(e),function(e){return"opaque"!==e.type&&(0===e.status&&!navigator.onLine||408===e.status||429===e.status||(0,c.G)(e.status))}(r)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:r.status},n.notify({type:"failure",bandwidth:t.bandwidthMonitor.stats(),payload:e}),i()):(t.transportStatus=0,n.notify({type:"success",bandwidth:t.bandwidthMonitor.stats(),payload:e}),o())})}function v(e,t,r,n,o,i){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:`Reached max ${n} events size queued for upload: ${f/a.iH}MiB`,source:u.g.AGENT,startClocks:(0,l.M8)()}),t.queueFullReported=!0);const s=t.queuedPayloads;for(t.queuedPayloads=b();s.size()>0;)m(s.dequeue(),t,r,n,o,i)}function b(){const e=[];return{bytesCount:0,enqueue(t){return!this.isFull()&&(e.push(t),this.bytesCount+=t.bytesCount,!0)},first:()=>e[0],dequeue(){const t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:()=>e.length,isFull(){return this.bytesCount>=f}}}const _=16*a._m;function x(e,t,r=_){const n=new i.cP,o={transportStatus:0,currentBackoffTime:h,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=d&&this.ongoingRequestCount<32},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}},queuedPayloads:b(),queueFullReported:!1};return{observable:n,send:r=>{for(const i of e)m(r,o,(e,t)=>{S(i,e,t)},i.trackType,t,n)},sendOnExit:t=>{for(const n of e)w(n,r,t)}}}function w(e,t,r){if(navigator.sendBeacon&&r.bytesCountnull==r?void 0:r({status:e.status,type:e.type}))).catch((0,o.dm)(()=>null==r?void 0:r({status:0})))}},R2ED(e,t,r){"use strict";r.d(t,{yf:()=>be});var n=r("Wm6P"),o=r("Ziog"),i=r("h49T"),a=r("3nhb"),s=r("yrsg"),l=r("DIDV"),c=r("Zv/8"),u=r("yGs3"),d=r("bqVu"),f=r("5El4"),p=r("vjAG"),h=r("ZMjL"),m=r("Bswk"),g=r("aI0c"),y=r("7ql9"),v=r("pX5O"),b=r("jIMw"),_=r("sL8f");function x(e,t,r){const n=r.getHandler(),o=Array.isArray(n)?n:[n];return A[e]>=A[r.getLevel()]&&o.includes(t)}const w={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},A={[w.ok]:0,[w.debug]:1,[w.info]:2,[w.notice]:4,[w.warn]:5,[w.error]:6,[w.critical]:7,[w.alert]:8,[w.emerg]:9};function S(e,{includeMessage:t=!1}={}){return{stack:e.stack,kind:e.type,message:t?e.message:void 0,causes:e.causes,fingerprint:e.fingerprint,handling:e.handling}}const C="http",E=Object.keys(w);class T{constructor(e,t,r=C,n=w.debug,o={}){this.handleLogStrategy=e,this.handlerType=r,this.level=n,this.contextManager=(0,m.D)("logger"),this.tags=[],this.contextManager.setContext(o),t&&this.contextManager.setContextProperty("logger",{name:t})}logImplementation(e,t,r=w.info,n,o){const i=(0,f.a)(t);let a;if(null!=n){const e=(0,g.As)({originalError:n,nonErrorPrefix:"Provided",source:y.g.LOGGER,handling:"handled",startClocks:(0,v.M8)()});a=(0,p.kg)({error:S(e,{includeMessage:!0})},e.context,i)}else a=i;this.handleLogStrategy({message:(0,f.a)(e),context:a,status:r},this,o)}log(e,t,r=w.info,n){let o;x(r,C,this)&&(o=(0,b.uC)("log")),this.logImplementation(e,t,r,n,o)}setContext(e){this.contextManager.setContext(e)}getContext(){return this.contextManager.getContext()}setContextProperty(e,t){this.contextManager.setContextProperty(e,t)}removeContextProperty(e){this.contextManager.removeContextProperty(e)}clearContext(){this.contextManager.clearContext()}addTag(e,t){this.tags.push((0,_.NQ)(e,t))}removeTagsWithKey(e){const t=(0,_.iP)(e);this.tags=this.tags.filter(e=>e!==t&&!e.startsWith(`${t}:`))}getTags(){return this.tags.slice()}setHandler(e){this.handlerType=e}getHandler(){return this.handlerType}setLevel(e){this.level=e}getLevel(){return this.level}}function I(e){return function(t,r,n){let o;x(e,C,this)&&(o=(0,b.uC)("log")),this.logImplementation(t,r,e,n,o)}}function k(){return o.Wq?{}:{view:{referrer:document.referrer,url:window.location.href}}}(function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);i>3&&a&&Object.defineProperty(t,r,a)})([l.Ed],T.prototype,"logImplementation",null),T.prototype.ok=I(w.ok),T.prototype.debug=I(w.debug),T.prototype.info=I(w.info),T.prototype.notice=I(w.notice),T.prototype.warn=I(w.warn),T.prototype.error=I(w.error),T.prototype.critical=I(w.critical),T.prototype.alert=I(w.alert),T.prototype.emerg=I(w.emerg);var M=r("wRiy"),R=r("Ihxy"),P=r("fbvQ"),O=r("wzgf"),D=r("yDic"),L=r("SHtM"),N=r("WW3m"),F=r("Lg0b"),z=r("FDU9"),B=r("I4oo");function j(e,t){return"0"===(r=t)||"1"===r?t:(0,B.ic)(e.sessionSampleRate)?"1":"0";var r}var $=r("RaEg"),U=r("Ig5h"),V=r("fBG3"),H=r("NgUp");const G={[V.bP.log]:w.info,[V.bP.debug]:w.debug,[V.bP.info]:w.info,[V.bP.warn]:w.warn,[V.bP.error]:w.error};var W=r("h/Zm"),q=r("PXye"),Z=r("geVX"),Y=r("J5kD"),X=r("BNZG"),K=r("yKqS"),J=r("zwU6"),Q=r("RE+S"),ee=r("Hz1A");function te(e){return Y.Y.XHR===e?"XHR":"Fetch"}const re=r("kmbF").D;const ne={[w.ok]:V.bP.debug,[w.debug]:V.bP.debug,[w.info]:V.bP.info,[w.notice]:V.bP.info,[w.warn]:V.bP.warn,[w.error]:V.bP.error,[w.critical]:V.bP.error,[w.alert]:V.bP.error,[w.emerg]:V.bP.error};var oe=r("kTsJ"),ie=r("mWzl"),ae=r("GZz+"),se=r("Zs30");const le="logs";function ce(e,t,r,n,i){const a=new re,s=[];a.subscribe(1,e=>(0,M.b)("logs",e));const l=function(e){return t=>{e.notify(0,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:y.g.AGENT,status:w.error}}),(0,c.A2)("Error reported to customer",{"error.message":t.message})}}(a),u=(0,R._T)(e),d=!e.sessionStoreStrategyType||(0,P.d0)()||(0,O.ao)()?function(e){const t="1"===j(e)?{}:void 0;return{findTrackedSession:()=>t,expireObservable:new z.cP}}(e):function(e,t){const r=(0,F.ox)(e,"logs",t=>j(e,t),t);return{findTrackedSession:(e,t={returnInactive:!1})=>{const n=r.findSession(e,t);return n&&"1"===n.trackingType?{id:n.id,anonymousId:n.anonymousId}:void 0},expireObservable:r.expireObservable}}(e,r);!function(e,t){function r(){return t.isGranted()?U.$O:U.ug}e.register(0,r),e.register(1,r)}(i,r),function(e,t,r){e.register(0,({startTime:e})=>{const n=r.findTrackedSession(e);return r.findTrackedSession(e,{returnInactive:!0})?{service:t.service,session_id:n?n.id:void 0,session:n?{id:n.id}:void 0}:U.ug}),e.register(1,({startTime:e})=>{const t=r.findTrackedSession(e);return t&&t.id?{session:{id:t.id}}:U.$O})}(i,e,d);const f=(0,D.B)(i,e,le),h=(0,L.$)(i,e,d,le),m=(0,N.F)(i,e,le,!1);!function(e){const t=o.J2;function r(e){const r=function(e,t){if(t&&t.getInternalContext)return t.getInternalContext(e)}(e,(0,O.ao)()?t.DD_RUM_SYNTHETICS:t.DD_RUM);if(r)return r}e.register(0,({startTime:e})=>r(e)||U.$O),e.register(1,({startTime:e})=>{var t,n;const o=r(e);return o?{application:{id:o.application_id},view:{id:null===(t=o.view)||void 0===t?void 0:t.id},action:{id:null===(n=o.user_action)||void 0===n?void 0:n.id}}:U.$O})}(i),function(e,t){if(!e.forwardErrorsToLogs)return{stop:q.l};(o.Wq?new z.cP:(0,Z.G)(e)).subscribe(e=>{"complete"===e.state&&n(Y.Y.XHR,e)}),(0,X.i)({responseBodyAction:e=>r(e)?2:0}).subscribe(e=>{"resolve"===e.state&&n(Y.Y.FETCH,e)});function r(e){return!(0,K.w)(e.url)&&(function(e){return 0===e.status&&"opaque"!==e.responseType}(e)||(0,J.G)(e.status))}function n(n,o){if(!r(o))return;const i="error"in o&&o.error?(0,b.Yn)((0,Q.T)(o.error)):o.responseBody||"Failed to load",a={isAborted:o.isAborted,handlingStack:o.handlingStack};t.notify(0,{rawLogsEvent:{message:`${te(n)} error ${o.method} ${o.url}`,date:o.startClocks.timeStamp,error:{stack:(0,ee._R)(i,e.requestErrorResponseLengthLimit,"..."),handling:void 0},http:{method:o.method,status_code:o.status,url:o.url},status:w.error,origin:y.g.NETWORK},domainContext:a})}}(e,a),function(e,t,r){if(!e.forwardErrorsToLogs)return{stop:q.l};r.subscribe(e=>{if(0===e.type){const r=e.error;t.notify(0,{rawLogsEvent:{message:r.message,date:r.startClocks.timeStamp,error:S(r),origin:y.g.SOURCE,status:w.error},messageContext:r.context})}})}(e,a,n),n.unbuffer(),function(e,t){(0,H.l)(e.forwardConsoleLogs).subscribe(e=>{var r;const n={rawLogsEvent:{date:(0,v.nx)(),message:e.message,origin:y.g.CONSOLE,error:e.error&&S(e.error),status:G[e.api]},messageContext:null===(r=e.error)||void 0===r?void 0:r.context,domainContext:{handlingStack:e.handlingStack}};t.notify(0,n)})}(e,a),function(e,t){(0,W.u)(e,e.forwardReports).subscribe(e=>{let r,n=e.message;const o="deprecation"===e.originalError.type?w.warn:w.error;o===w.error?r=S(e):e.stack&&(n+=` Found in ${(0,g.$X)(e.stack)}`),t.notify(0,{rawLogsEvent:{date:(0,v.nx)(),message:n,origin:y.g.REPORT,error:r,status:o}})})}(e,a);const{handleLog:A}=function(e){return{handleLog:function(t,r,n,o,i){const a=(0,p.kg)(r.getContext(),t.context);if(x(t.status,"console",r)&&function({status:e,message:t},r){V.Z9[ne[e]].call(V.JZ,t,r)}(t,a),x(t.status,C,r)){const s={rawLogsEvent:{date:i||(0,v.nx)(),message:t.message,status:t.status,origin:y.g.LOGGER},messageContext:a,savedCommonContext:o,ddtags:r.getTags()};n&&(s.domainContext={handlingStack:n}),e.notify(0,s)}}}}(a);if(function(e,t,r,n,o){const i=E.concat(["custom"]),a={};i.forEach(e=>{a[e]=(0,$.$)(e,o,void 0)}),t.subscribe(0,({rawLogsEvent:o,messageContext:i,savedCommonContext:s,domainContext:l,ddtags:c=[]})=>{var u,d;const f=(0,v.gs)(o.date),h=s||n(),m=r.triggerHook(0,{startTime:f});if(m===U.ug)return;const g=(0,_.m5)(e),b=(0,p.kg)({view:h.view},m,o,i,{ddtags:g.concat(c).join(",")});!1===(null===(u=e.beforeSend)||void 0===u?void 0:u.call(e,b,l))||b.origin!==y.g.AGENT&&(null!==(d=a[b.status])&&void 0!==d?d:a.custom).isLimitReached()||t.notify(1,b)})}(e,a,i,t,l),(0,P.d0)())!function(e){const t=(0,P.Y9)();e.subscribe(1,e=>{t.send("log",e)})}(a);else{const{stop:t}=function(e,t,r,n,o){const i=[e.logsEndpointBuilder];e.replica&&i.push(e.replica.logsEndpointBuilder);const a=(0,oe.X)({encoder:(0,ie.N)(),request:(0,ae.sA)(i,r),flushController:(0,se.tO)({pageMayExitObservable:n,sessionExpireObservable:o.expireObservable})});return t.subscribe(1,e=>{a.add(e)}),a}(e,a,l,u,d);s.push(()=>t())}var T;return{handleLog:A,getInternalContext:(T=d,{get:e=>{const t=T.findTrackedSession(e);if(t)return{session_id:t.id}}}).get,accountContext:f,globalContext:m,userContext:h,stop:()=>{s.forEach(e=>e())}}}var ue=r("yOVQ"),de=r("VECG");const fe=U.XP;var pe=r("N/so"),he=r("xkkU"),me=r("TiVH"),ge=r("IJTo");const ye=32*pe._m;function ve(e,t,r){return void 0===e?[]:"all"===e||Array.isArray(e)&&e.every(e=>t.includes(e))?"all"===e?t:(0,ge.R3)(e):void V.Vy.error(`${r} should be "all" or an array with allowed values "${t.join('", "')}"`)}const be=function(){const e=(0,i.D)(),t=(0,a.t)().observable;let r=function(e,t,r){const n=(0,ue.O)(),o=(0,N.s)();(0,u.P)(o,d.N.globalContext,n);const i=(0,D.K)();(0,u.P)(i,d.N.accountContext,n);const a=(0,L.Y)();let l,f;(0,u.P)(a,d.N.userContext,n);const p=fe(),m=t.observable.subscribe(g);function g(){if(!f||!l||!t.isGranted())return;(0,s.B)(c.a5)("browser-logs-sdk",f,p),m.unsubscribe();const e=r(l,f,p);n.drain(e)}return{init(e,r){if(!e)return void V.Vy.error("Missing configuration");if((0,de.Aq)(e.enableExperimentalFeatures),(0,P.d0)()&&(e=function(e){return{...e,clientToken:"empty"}}(e)),l=e,(0,c.Rr)(function(e){const t=(0,he.hO)(e);return{forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports,use_pci_intake:e.usePciIntake,...t}}(e)),f)return void(0,h.$)("DD_LOGS",e);const n=function(e,t){!0===e.usePciIntake&&e.site&&"datadoghq.com"!==e.site&&V.Vy.warn("PCI compliance for Logs is only available for Datadog organizations in the US1 site. Default intake will be used.");const r=(0,he.Sz)(e,t),n=ve(e.forwardConsoleLogs,(0,me.KQ)(V.bP),"Forward Console Logs"),o=ve(e.forwardReports,(0,me.KQ)(W.V),"Forward Reports");if(r&&n&&o)return e.forwardErrorsToLogs&&!n.includes(V.bP.error)&&n.push(V.bP.error),{forwardErrorsToLogs:!1!==e.forwardErrorsToLogs,forwardConsoleLogs:n,forwardReports:o,requestErrorResponseLengthLimit:ye,...r}}(e,r);n&&(f=n,(0,X.i)().subscribe(q.l),t.tryToInit(n.trackingConsent),g())},get initConfiguration(){return l},globalContext:o,accountContext:i,userContext:a,getInternalContext:q.l,handleLog(t,r,o,i=e(),a=(0,v.nx)()){n.add(e=>e.handleLog(t,r,o,i,a))}}}(k,e,(n,o,i)=>{const a=(0,s.B)(ce)(o,k,e,t,i);return r=function(e,t){return{init:e=>{(0,h.$)("DD_LOGS",e)},initConfiguration:e,...t}}(n,a),a});const o=()=>r,m={},g=new T((...e)=>r.handleLog(...e));return(0,n.m)({logger:g,init:e=>{const t=(new Error).stack;(0,l.um)(()=>r.init(e,t))},setTrackingConsent:(0,l.dm)(t=>{e.update(t),(0,c.Q6)({feature:"set-tracking-consent",tracking_consent:t})}),getGlobalContext:(0,u.q)(o,d.N.globalContext,d.Q.getContext),setGlobalContext:(0,u.q)(o,d.N.globalContext,d.Q.setContext),setGlobalContextProperty:(0,u.q)(o,d.N.globalContext,d.Q.setContextProperty),removeGlobalContextProperty:(0,u.q)(o,d.N.globalContext,d.Q.removeContextProperty),clearGlobalContext:(0,u.q)(o,d.N.globalContext,d.Q.clearContext),createLogger:(0,l.dm)((e,t={})=>(m[e]=new T((...e)=>r.handleLog(...e),(0,f.a)(e),t.handler,t.level,(0,f.a)(t.context)),m[e])),getLogger:(0,l.dm)(e=>m[e]),getInitConfiguration:(0,l.dm)(()=>(0,p.Go)(r.initConfiguration)),getInternalContext:(0,l.dm)(e=>r.getInternalContext(e)),setUser:(0,u.q)(o,d.N.userContext,d.Q.setContext),getUser:(0,u.q)(o,d.N.userContext,d.Q.getContext),setUserProperty:(0,u.q)(o,d.N.userContext,d.Q.setContextProperty),removeUserProperty:(0,u.q)(o,d.N.userContext,d.Q.removeContextProperty),clearUser:(0,u.q)(o,d.N.userContext,d.Q.clearContext),setAccount:(0,u.q)(o,d.N.accountContext,d.Q.setContext),getAccount:(0,u.q)(o,d.N.accountContext,d.Q.getContext),setAccountProperty:(0,u.q)(o,d.N.accountContext,d.Q.setContextProperty),removeAccountProperty:(0,u.q)(o,d.N.accountContext,d.Q.removeContextProperty),clearAccount:(0,u.q)(o,d.N.accountContext,d.Q.clearContext)})}();(0,n.Z)((0,o.VZ)(),"DD_LOGS",be)},ywQB(e,t,r){"use strict";r.d(t,{X2:()=>A,eT:()=>Vt,o:()=>Ut,$m:()=>Bt,NT:()=>jt,Wd:()=>$t,bb:()=>v,K:()=>b,do:()=>ht,wP:()=>co,wI:()=>dt,W3:()=>we,PJ:()=>Wt,dT:()=>Zt,$4:()=>ft,Gn:()=>hn,zL:()=>mn,dx:()=>so,rf:()=>Qt,pB:()=>vn,wR:()=>ut,g1:()=>yn,nS:()=>st,XS:()=>lt,p_:()=>ct,$5:()=>Ye,AB:()=>io,jR:()=>qt,ei:()=>We,ap:()=>Xt,Ie:()=>Yt});var n=r("h49T"),o=r("3nhb"),i=r("mWzl"),a=r("yrsg"),s=r("jIMw"),l=r("DIDV"),c=r("Zv/8"),u=r("Wm6P"),d=r("vjAG"),f=r("5El4"),p=r("pX5O"),h=r("VECG"),m=r("yGs3"),g=r("bqVu"),y=r("ZMjL");const v={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},b={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},_="initial_load",x="route_change",w="bf_cache",A={CLICK:"click",CUSTOM:"custom",TAP:"tap",SCROLL:"scroll",SWIPE:"swipe",APPLICATION_START:"application_start",BACK:"back"},S="error_click",C="dead_click",E="duration";var T=r("Hz1A");function I({vitalsByName:e,vitalsByReference:t},r,n={}){const o={name:r,startClocks:(0,p.M8)(),...n},i={__dd_vital_reference:!0};return e.set(r,o),t.set(i,o),i}function k(e,{vitalsByName:t,vitalsByReference:r},n,o={}){const i="string"==typeof n?t.get(n):r.get(n);i&&(e(function(e,t,r,n){var o;return{name:e.name,type:E,startClocks:t,duration:(0,p.vk)(t.timeStamp,n.timeStamp),context:(0,d.kg)(e.context,r.context),description:null!==(o=r.description)&&void 0!==o?o:e.description,handlingStack:e.handlingStack}}(i,i.startClocks,o,(0,p.M8)())),"string"==typeof n?t.delete(n):r.delete(n))}function M(e){const{startClocks:t,type:r,name:n,description:o,context:i,handlingStack:a}=e,s={id:(0,T.lk)(),type:r,name:n,description:o,...r===E?{duration:(0,p.Zj)(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:s,type:v.VITAL,context:i},startClocks:t,duration:r===E?e.duration:void 0,domainContext:a?{handlingStack:a}:{}}}function R(e,t,r){if(e)for(const n of e){const e=n[t];e&&e(r)}}var P=r("yOVQ"),O=r("WW3m"),D=r("SHtM"),L=r("yDic"),N=r("fbvQ"),F=r("fBG3"),z=r("PXye"),B=r("BNZG"),j=r("wzgf"),$=r("Ig5h");const U=$.XP;var V=r("xkkU"),H=r("I4oo"),G=r("uKaK"),W=r("IJTo"),q=r("IpeG"),Z=r("FMiR");const Y=["tracecontext","datadog"];function X(e){const t=new Set;return(0,W.EI)(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(e=>{var r;null===(r=K(e))||void 0===r||r.propagatorTypes.forEach(e=>t.add(e))}),Array.from(t)}function K(e){return(0,q.V)(e)?{match:e,propagatorTypes:Y}:(0,Z.O)(e)&&(0,q.V)(e.match)&&(null===e.propagatorTypes||void 0===e.propagatorTypes||Array.isArray(e.propagatorTypes))?{match:e.match,propagatorTypes:e.propagatorTypes||Y}:void 0}function J(e){return(0,W.EI)(e)&&e.some(e=>(0,Z.O)(e)&&e.trackResponseErrors)}var Q=r("LGu8"),ee=r("Gd1n"),te=r("VjQA");const re=/[a-zA-Z_$]/,ne=/[a-zA-Z0-9_$]/,oe=/[0-9]/,ie=/[a-fA-F0-9]/,ae={0:()=>!1,1:()=>!1,2:e=>re.test(e),3:e=>ne.test(e),4:e=>"."===e,5:e=>"["===e,6:e=>"]"===e,7:e=>oe.test(e),8:e=>"'\"".includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>"\\"===e,12:(e,t)=>void 0===t.escapeSequence?`${t.quote}/\\bfnrtu`.includes(e):!!(t.escapeSequence.startsWith("u")&&t.escapeSequence.length<5)&&ie.test(e)},se={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},le=[2,3,7,10],ce=[4,5,6];function ue(e){return"\"'/\\bfnrt".includes(e)||e.startsWith("u")&&5===e.length}const de={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function fe(e){return e.startsWith("u")?String.fromCharCode(parseInt(e.slice(1),16)):de[e]}const pe=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function he(e,t){let r;const n=function(){const e={fetch:{}};return{get:()=>e,increment:(t,r)=>{e[t]||(e[t]={}),e[t][r]||(e[t][r]=0),e[t][r]=e[t][r]+1}}}(),o=await async function(e){let t;try{t=await(0,ee.h)(function(e){return e.remoteConfigurationProxy?e.remoteConfigurationProxy:`https://sdk-configuration.${(0,te.G)("rum",e)}/v1/${encodeURIComponent(e.remoteConfigurationId)}.json`}(e))}catch(e){t=void 0}if(!t||!t.ok)return{ok:!1,error:new Error("Error fetching the remote configuration.")};const r=await t.json();return r.rum?{ok:!0,value:r.rum}:{ok:!1,error:new Error("No remote configuration for RUM.")}}(e);return o.ok?(n.increment("fetch","success"),r=function(e,t,r,n){const o={...e};return pe.forEach(e=>{e in t&&(o[e]=i(t[e]))}),Object.keys(r).forEach(e=>{var n;void 0!==t[e]&&(n=r[e],t[e].forEach(({key:e,value:t})=>{n.setContextProperty(e,i(t))}))}),o;function i(e){if(Array.isArray(e))return e.map(i);if((0,Z.O)(e)){if("rcSerializedType"in e){const t=e.rcSerializedType;switch(t){case"string":return e.value;case"regex":return me(e.value);case"dynamic":return function(e){const t=e.strategy;let r;switch(t){case"cookie":r=function({name:e}){const t=(0,Q.Ri)(e);return n.increment("cookie",void 0!==t?"success":"missing"),t}(e);break;case"dom":r=function({selector:e,attribute:t}){let r;try{r=document.querySelector(e)}catch(t){return F.Vy.error(`Invalid selector in the remote configuration: '${e}'`),void n.increment("dom","failure")}if(!r)return void n.increment("dom","missing");if(function(e,t){return"password"===e.getAttribute("type")&&"value"===t}(r,t))return F.Vy.error(`Forbidden element selected by the remote configuration: '${e}'`),void n.increment("dom","failure");const o=void 0!==t?r.getAttribute(t):r.textContent;if(null!==o)return n.increment("dom","success"),o;n.increment("dom","missing")}(e);break;case"js":r=function({path:e}){let t=window;const r=function(e){const t=[];let r,n=0;const o={quote:void 0,escapeSequence:void 0};let i="";for(const a of e){if(r=se[n].find(e=>ae[e](a,o)),!r)return[];if(void 0!==o.escapeSequence&&12!==r){if(!ue(o.escapeSequence))return[];i+=fe(o.escapeSequence),o.escapeSequence=void 0}le.includes(r)?i+=a:ce.includes(r)&&""!==i?(t.push(i),i=""):12===r?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${a}`:a:8===r?o.quote=a:9===r&&(o.quote=void 0),n=r}return se[n].includes(1)?(""!==i&&t.push(i),t):[]}(e);if(0===r.length)return F.Vy.error(`Invalid JSON path in the remote configuration: '${e}'`),void n.increment("js","failure");for(const o of r){if(!(o in t))return void n.increment("js","missing");try{t=t[o]}catch(t){return F.Vy.error(`Error accessing: '${e}'`,t),void n.increment("js","failure")}}return n.increment("js","success"),t}(e);break;case"localStorage":r=function({key:e}){let t;try{t=localStorage.getItem(e)}catch(e){return void n.increment("localStorage","failure")}return n.increment("localStorage",null!==t?"success":"missing"),null!=t?t:void 0}(e);break;default:return void F.Vy.error(`Unsupported remote configuration: "strategy": "${t}"`)}const o=e.extractor;return void 0!==o&&"string"==typeof r?function(e,t){const r=me(e.value);if(void 0===r)return;const n=r.exec(t);if(null===n)return;const[o,i]=n;return i||o}(o,r):r}(e);default:return void F.Vy.error(`Unsupported remote configuration: "rcSerializedType": "${t}"`)}}return(0,G.LG)(e,i)}return e}}(e,o.value,t,n)):(n.increment("fetch","failure"),F.Vy.error(o.error)),(0,c.Gk)("remote configuration metrics",{metrics:n.get()}),r}function me(e){try{return new RegExp(e)}catch(t){F.Vy.error(`Invalid regex in the remote configuration: '${e}'`)}}function ge({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},r,n,o){const i=(0,P.O)(),s=(0,O.s)();ye(s,g.N.globalContext,i);const u=(0,D.Y)();ye(u,g.N.userContext,i);const d=(0,L.K)();let m,v,b,_,x;ye(d,g.N.accountContext,i);const w=U(),A=r.observable.subscribe(C),S={};function C(){if(!b||!_||!r.isGranted())return;let e;if(x||(x=(0,a.B)(c.a5)("browser-rum-sdk",_,w)),A.unsubscribe(),_.trackViewsManually){if(!m)return;i.remove(m.callback),e=m.options}const t=o(_,v,e,x,w);i.drain(t)}function E(e,n){const o=(0,N.d0)();if(o&&(e=function(e){var t,r;return{...e,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:null!==(t=e.defaultPrivacyLevel)&&void 0!==t?t:null===(r=(0,N.Y9)())||void 0===r?void 0:r.getPrivacyLevel()}}(e)),b=e,(0,c.Rr)(function(e){var t;const r=(0,V.hO)(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:(0,W.EI)(e.allowedTracingUrls),use_allowed_graph_ql_urls:(0,W.EI)(e.allowedGraphQlUrls),use_track_graph_ql_payload:(n=e.allowedGraphQlUrls,(0,W.EI)(n)&&n.some(e=>(0,Z.O)(e)&&e.trackPayload)),use_track_graph_ql_response_errors:J(e.allowedGraphQlUrls),selected_tracing_propagators:X(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:(0,W.EI)(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,track_bfcache_views:e.trackBfcacheViews,track_early_requests:e.trackEarlyRequests,plugins:null===(t=e.plugins)||void 0===t?void 0:t.map(e=>{var t;return{name:e.name,...null===(t=e.getConfigurationTelemetry)||void 0===t?void 0:t.call(e)}}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:e.remoteConfigurationId,profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,...r};var n}(e)),_)return void(0,y.$)("DD_RUM",e);const i=function(e,t){var r,n,o,i,a,s,l;if(void 0===e.trackFeatureFlagsForEvents||Array.isArray(e.trackFeatureFlagsForEvents)||F.Vy.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId)return void F.Vy.error("Application ID is not configured, no RUM data will be collected.");if(!(0,V.bX)(e.sessionReplaySampleRate,"Session Replay")||!(0,V.bX)(e.traceSampleRate,"Trace"))return;if(void 0!==e.excludedActivityUrls&&!Array.isArray(e.excludedActivityUrls))return void F.Vy.error("Excluded Activity Urls should be an array");const c=function(e){if(void 0===e.allowedTracingUrls)return[];if(!Array.isArray(e.allowedTracingUrls))return void F.Vy.error("Allowed Tracing URLs should be an array");if(0!==e.allowedTracingUrls.length&&void 0===e.service)return void F.Vy.error("Service needs to be configured when tracing is enabled");const t=[];return e.allowedTracingUrls.forEach(e=>{const r=K(e);r?t.push(r):F.Vy.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",e)}),t}(e);if(!c)return;const u=(0,V.Sz)(e,t),d=function(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return F.Vy.warn("allowedGraphQlUrls should be an array"),[];const t=[];return e.allowedGraphQlUrls.forEach(e=>{(0,q.V)(e)?t.push({match:e,trackPayload:!1,trackResponseErrors:!1}):(0,Z.O)(e)&&(0,q.V)(e.match)&&t.push({match:e.match,trackPayload:!!e.trackPayload,trackResponseErrors:!!e.trackResponseErrors})}),t}(e);if(!u)return;const f=null!==(r=e.sessionReplaySampleRate)&&void 0!==r?r:0;return{applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,betaTrackActionsInShadowDom:!!e.betaTrackActionsInShadowDom,sessionReplaySampleRate:f,startSessionReplayRecordingManually:void 0!==e.startSessionReplayRecordingManually?!!e.startSessionReplayRecordingManually:0===f,traceSampleRate:null!==(n=e.traceSampleRate)&&void 0!==n?n:100,rulePsr:(0,H.Et)(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:c,excludedActivityUrls:null!==(o=e.excludedActivityUrls)&&void 0!==o?o:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!(null!==(i=e.trackUserInteractions)&&void 0!==i&&!i),trackViewsManually:!!e.trackViewsManually,trackResources:!(null!==(a=e.trackResources)&&void 0!==a&&!a),trackLongTasks:!(null!==(s=e.trackLongTasks)&&void 0!==s&&!s),trackBfcacheViews:!!e.trackBfcacheViews,trackEarlyRequests:!!e.trackEarlyRequests,subdomain:e.subdomain,defaultPrivacyLevel:(0,G.Rj)(V.WA,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:V.WA.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,traceContextInjection:(0,G.Rj)(V.uT,e.traceContextInjection)?e.traceContextInjection:V.uT.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:null!==(l=e.profilingSampleRate)&&void 0!==l?l:0,propagateTraceBaggage:!!e.propagateTraceBaggage,allowedGraphQlUrls:d,...u}}(e,n);i&&(o||i.sessionStoreStrategyType?i.compressIntakeRequests&&!o&&t&&(v=t(i,"Datadog RUM",z.l),!v)||(_=i,(0,B.i)().subscribe(z.l),r.tryToInit(i.trackingConsent),C()):F.Vy.warn("No storage available for session. We will not send any data."))}const T=e=>{i.add(t=>t.addDurationVital(e))};return{init(t,r,n){t?((0,h.Aq)(t.enableExperimentalFeatures),b=t,e&&(0,j.ao)()||(R(t.plugins,"onInit",{initConfiguration:t,publicApi:r}),t.remoteConfigurationId?he(t,{user:u,context:s}).then(e=>{e&&E(e,n)}).catch(l.Dx):E(t,n))):F.Vy.error("Missing configuration")},get initConfiguration(){return b},getInternalContext:z.l,stopSession:z.l,addTiming(e,t=(0,p.nx)()){i.add(r=>r.addTiming(e,t))},startView(e,t=(0,p.M8)()){const r=r=>{r.startView(e,t)};i.add(r),m||(m={options:e,callback:r},C())},setViewName(e){i.add(t=>t.setViewName(e))},setViewContext(e){i.add(t=>t.setViewContext(e))},setViewContextProperty(e,t){i.add(r=>r.setViewContextProperty(e,t))},getViewContext:()=>S,globalContext:s,userContext:u,accountContext:d,addAction(e){i.add(t=>t.addAction(e))},startAction(e,t){const r=(0,p.M8)();i.add(n=>n.startAction(e,t,r))},stopAction(e,t){const r=(0,p.M8)();i.add(n=>n.stopAction(e,t,r))},startResource(e,t){const r=(0,p.M8)();i.add(n=>n.startResource(e,t,r))},stopResource(e,t){const r=(0,p.M8)();i.add(n=>n.stopResource(e,t,r))},addError(e){i.add(t=>t.addError(e))},addFeatureFlagEvaluation(e,t){i.add(r=>r.addFeatureFlagEvaluation(e,t))},startDurationVital:(e,t)=>I(n,e,t),stopDurationVital(e,t){k(T,n,e,t)},addDurationVital:T,addOperationStepVital:(e,t,r,n)=>{i.add(o=>o.addOperationStepVital((0,f.a)(e),t,(0,f.a)(r),(0,f.a)(n)))}}}function ye(e,t,r){e.changeObservable.subscribe(()=>{const n=e.getContext();r.add(e=>e[t].setContext(n))})}var ve=r("wRiy"),be=r("Ihxy"),_e=r("FDU9"),xe=r("k0ez");function we(){let e;const t=window;if(t.Zone&&(e=(0,xe.W)(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const r=new t.MutationObserver(z.l),n=(0,xe.W)(r,"originalInstance");e=n&&n.constructor}return e||(e=t.MutationObserver),e}var Ae=r("Zn7e");const Se=r("kmbF").D;var Ce=r("TUkY"),Ee=r("WrbB");const Te=Ce.AQ;var Ie=r("geVX"),ke=r("J5kD"),Me=r("EdLy"),Re=r("yKqS");const Pe="initial_document",Oe=[[ke.v.DOCUMENT,e=>Pe===e],[ke.v.XHR,e=>"xmlhttprequest"===e],[ke.v.FETCH,e=>"fetch"===e],[ke.v.BEACON,e=>"beacon"===e],[ke.v.CSS,(e,t)=>/\.css$/i.test(t)],[ke.v.JS,(e,t)=>/\.js$/i.test(t)],[ke.v.IMAGE,(e,t)=>["image","img","icon"].includes(e)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)],[ke.v.FONT,(e,t)=>null!==/\.(woff|eot|woff2|ttf)$/i.exec(t)],[ke.v.MEDIA,(e,t)=>["audio","video"].includes(e)||null!==/\.(mp3|mp4)$/i.exec(t)]];function De(e){const t=e.name;if(!(0,Me.AY)(t))return ke.v.OTHER;const r=(0,Me.L2)(t);for(const[t,n]of Oe)if(n(e.initiatorType,r))return t;return ke.v.OTHER}function Le(...e){for(let t=1;te[t])return!1;return!0}function Ne(e){return"xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType}function Fe(e){if(!Be(e))return;const{startTime:t,fetchStart:r,workerStart:n,redirectStart:o,redirectEnd:i,domainLookupStart:a,domainLookupEnd:s,connectStart:l,secureConnectionStart:c,connectEnd:u,requestStart:d,responseStart:f,responseEnd:p}=e,h={download:je(t,f,p),first_byte:je(t,d,f)};return 0=0}function Be(e){const t=Le(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),r=!function(e){return e.redirectEnd>e.startTime}(e)||Le(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart);return t&&r}function je(e,t,r){if(e<=t&&t<=r)return{duration:(0,p.Zj)((0,p.vk)(t,r)),start:(0,p.Zj)((0,p.vk)(e,t))}}function $e(e){return""===e.nextHopProtocol?void 0:e.nextHopProtocol}function Ue(e){return""===e.deliveryType?"other":e.deliveryType}function Ve(e){if(e.startTime>>=1),{toString(e=10){let r=t[1],n=t[0],o="";do{const t=r%e*4294967296+n;r=Math.floor(r/e),n=Math.floor(t/e),o=(t%e).toString(e)+o}while(r||n);return o}}}function Je(e){return e.toString(16).padStart(16,"0")}function Qe(e){0!==e.status||e.isAborted||(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function et(e,t,r,n,o,i){const a=r.findTrackedSession();if(!a)return;const s=e.allowedTracingUrls.find(e=>(0,q.K)([e.match],t.url,!0));if(!s)return;const l=Ye(a.id,e.traceSampleRate);(l||e.traceContextInjection===V.uT.ALL)&&(t.traceSampled=l,t.traceId=Ke(64),t.spanId=Xe(),i(function(e,t,r,n,o,i,a,s){const l={};if(o.forEach(n=>{switch(n){case"datadog":Object.assign(l,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":r?"1":"0","x-datadog-trace-id":e.toString()});break;case"tracecontext":Object.assign(l,{traceparent:`00-0000000000000000${Je(e)}-${Je(t)}-0${r?"1":"0"}`,tracestate:`dd=s:${r?"1":"0"};o:rum`});break;case"b3":Object.assign(l,{b3:`${Je(e)}-${Je(t)}-${r?"1":"0"}`});break;case"b3multi":Object.assign(l,{"X-B3-TraceId":Je(e),"X-B3-SpanId":Je(t),"X-B3-Sampled":r?"1":"0"})}}),s.propagateTraceBaggage){const e={"session.id":n},t=i.getContext().id;"string"==typeof t&&(e["user.id"]=t);const r=a.getContext().id;"string"==typeof r&&(e["account.id"]=r);const o=Object.entries(e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join(",");o&&(l.baggage=o)}return l}(t.traceId,t.spanId,t.traceSampled,a.id,s.propagatorTypes,n,o,e)))}const tt=32*r("N/so")._m;function rt(e,t){return t.allowedGraphQlUrls.find(t=>(0,q.K)([t.match],e))}let nt=1;function ot(){const e=nt;return nt+=1,e}function it(e){return(0,H.Et)(e)&&e<0?void 0:e}function at(e){return e.nodeType===Node.TEXT_NODE}function st(e){return e.nodeType===Node.ELEMENT_NODE}function lt(e){return st(e)&&Boolean(e.shadowRoot)}function ct(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&st(t.host)}function ut(e){return e.childNodes.length>0||lt(e)}function dt(e,t){let r=e.firstChild;for(;r;)t(r),r=r.nextSibling;lt(e)&&t(e.shadowRoot)}function ft(e){return ct(e)?e.host:e.parentNode}function pt(e){if(e.parentElement)return e.parentElement;const t=e.parentNode;return t&&ct(t)?t.host:null}var ht,mt=r("bgI0"),gt=r("q7oZ");function yt(e,t){return new _e.cP(r=>{if(!window.PerformanceObserver)return;const n=e=>{const t=function(e){return e.filter(e=>!function(e){return!(e.entryType!==ht.RESOURCE||He(e.name)&&ze(e))}(e))}(e);t.length>0&&r.notify(t)};let o,i=!0;const a=new PerformanceObserver((0,l.dm)(e=>{i?o=(0,mt.wg)(()=>n(e.getEntries())):n(e.getEntries())}));try{a.observe(t)}catch(e){if([ht.RESOURCE,ht.NAVIGATION,ht.LONG_TASK,ht.PAINT].includes(t.type)){t.buffered&&(o=(0,mt.wg)(()=>n(performance.getEntriesByType(t.type))));try{a.observe({entryTypes:[t.type]})}catch(e){return}}}let s;return i=!1,function(e){!vt&&void 0!==window.performance&&"getEntries"in performance&&"addEventListener"in performance&&(vt=(0,gt.q)(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()}))}(e),bt(ht.FIRST_INPUT)||t.type!==ht.FIRST_INPUT||({stop:s}=function(e,t){const r=(0,p.x3)();let n=!1;const{stop:o}=(0,gt.l)(e,window,["click","mousedown","keydown","touchstart","pointerdown"],t=>{if(!t.cancelable)return;const r={entryType:"first-input",processingStart:(0,p.$S)(),processingEnd:(0,p.$S)(),startTime:t.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};"pointerdown"===t.type?function(e,t){(0,gt.l)(e,window,["pointerup","pointercancel"],e=>{"pointerup"===e.type&&i(t)},{once:!0})}(e,r):i(r)},{passive:!0,capture:!0});return{stop:o};function i(e){if(!n){n=!0,o();const i=e.processingStart-e.startTime;i>=0&&i<(0,p.x3)()-r&&t(e)}}}(e,e=>{n([e])})),()=>{a.disconnect(),s&&s(),(0,mt.DJ)(o)}})}let vt;function bt(e){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(e)}!function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"}(ht||(ht={}));const _t="data-dd-excluded-activity-mutations";function xt(e,t,r,n,o,i){const s=(0,a.B)(wt)(e,t,r,n);let c,u=!1;const d=(0,mt.wg)((0,l.dm)(()=>g({hadActivity:!1})),100),f=void 0!==i?(0,mt.wg)((0,l.dm)(()=>g({hadActivity:!0,end:(0,p.nx)()})),i):void 0,h=s.subscribe(({isBusy:e})=>{(0,mt.DJ)(d),(0,mt.DJ)(c);const t=(0,p.nx)();e||(c=(0,mt.wg)((0,l.dm)(()=>g({hadActivity:!0,end:t})),100))}),m=()=>{u=!0,(0,mt.DJ)(d),(0,mt.DJ)(c),(0,mt.DJ)(f),h.unsubscribe()};function g(e){u||(m(),o(e))}return{stop:m}}function wt(e,t,r,n){return new _e.cP(o=>{const i=[];let a,s=0;return i.push(t.subscribe(e=>{e.every(St)||l()}),r.subscribe(l),yt(n,{type:ht.RESOURCE}).subscribe(e=>{e.some(e=>!At(n,e.name))&&l()}),e.subscribe(7,e=>{At(n,e.url)||(void 0===a&&(a=e.requestIndex),s+=1,l())}),e.subscribe(8,e=>{At(n,e.url)||void 0===a||e.requestIndex{i.forEach(e=>e.unsubscribe())};function l(){o.notify({isBusy:s>0})}})}function At(e,t){return(0,q.K)(e.excludedActivityUrls,t)}function St(e){const t="characterData"===e.type?e.target.parentElement:e.target;return Boolean(t&&st(t)&&t.matches(`[${_t}], [${_t}] *`))}const Ct="data-dd-action-name",Et="Masked Element",Tt=[Ct,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],It=[Ot,function(e){if(e.id&&!Pt(e.id))return`#${CSS.escape(e.id)}`}],kt=[Ot,function(e){if("BODY"===e.tagName)return;const t=e.classList;for(let r=0;re.matches(r);else{const e=zt(`${r}:scope`,n);o=t=>null!==t.querySelector(e)}let i=e.previousElementSibling;for(;i;){if(o(i))return!1;i=i.previousElementSibling}for(i=e.nextElementSibling;i;){if(o(i))return!1;i=i.nextElementSibling}return!0}function zt(e,t){return t?`${e}>${t}`:e}const Bt={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:V.WA.ALLOW,MASK:V.WA.MASK,MASK_USER_INPUT:V.WA.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:V.WA.MASK_UNLESS_ALLOWLISTED},jt="data-dd-privacy",$t="hidden",Ut="***",Vt="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",Ht={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function Gt(e){return`[${jt}="${e}"], .dd-privacy-${e}`}function Wt(e,t,r){if(r&&r.has(e))return r.get(e);const n=ft(e),o=n?Wt(n,t,r):t,i=qt(Zt(e),o);return r&&r.set(e,i),i}function qt(e,t){switch(t){case Bt.HIDDEN:case Bt.IGNORE:return t}switch(e){case Bt.ALLOW:case Bt.MASK:case Bt.MASK_USER_INPUT:case Bt.MASK_UNLESS_ALLOWLISTED:case Bt.HIDDEN:case Bt.IGNORE:return e;default:return t}}function Zt(e){if(st(e)){if("BASE"===e.tagName)return Bt.ALLOW;if("INPUT"===e.tagName){const t=e;if("password"===t.type||"email"===t.type||"tel"===t.type)return Bt.MASK;if("hidden"===t.type)return Bt.MASK;const r=t.getAttribute("autocomplete");if(r&&(r.startsWith("cc-")||r.endsWith("-password")))return Bt.MASK}return e.matches(Gt(Bt.HIDDEN))?Bt.HIDDEN:e.matches(Gt(Bt.MASK))?Bt.MASK:e.matches(Gt(Bt.MASK_UNLESS_ALLOWLISTED))?Bt.MASK_UNLESS_ALLOWLISTED:e.matches(Gt(Bt.MASK_USER_INPUT))?Bt.MASK_USER_INPUT:e.matches(Gt(Bt.ALLOW))?Bt.ALLOW:function(e){if("SCRIPT"===e.nodeName)return!0;if("LINK"===e.nodeName){const e=t("rel");return/preload|prefetch/i.test(e)&&"script"===t("as")||"shortcut icon"===e||"icon"===e}if("META"===e.nodeName){const r=t("name"),n=t("rel"),o=t("property");return/^msapplication-tile(image|color)$/.test(r)||"application-name"===r||"icon"===n||"apple-touch-icon"===n||"shortcut icon"===n||"keywords"===r||"description"===r||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(r)||"pinterest"===r||"robots"===r||"googlebot"===r||"bingbot"===r||e.hasAttribute("http-equiv")||"author"===r||"generator"===r||"framework"===r||"publisher"===r||"progid"===r||/^article:/.test(o)||/^product:/.test(o)||"google-site-verification"===r||"yandex-verification"===r||"csrf-token"===r||"p:domain_verify"===r||"verify-v1"===r||"verification"===r||"shopify-checkout-api-token"===r}function t(t){return(e.getAttribute(t)||"").toLowerCase()}return!1}(e)?Bt.IGNORE:void 0}}function Yt(e,t){switch(t){case Bt.MASK:case Bt.HIDDEN:case Bt.IGNORE:return!0;case Bt.MASK_UNLESS_ALLOWLISTED:return at(e)?!!Kt(e.parentNode)||!er(e.textContent||""):Kt(e);case Bt.MASK_USER_INPUT:return at(e)?Kt(e.parentNode):Kt(e);default:return!1}}function Xt(e,t,r,n,o){if(n!==Bt.MASK&&n!==Bt.MASK_UNLESS_ALLOWLISTED)return!1;if(t===jt||Tt.includes(t)||t===o.actionNameAttribute)return!1;switch(t){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return"A"===e&&"href"===t||"IFRAME"===e&&"srcdoc"===t||!(!r||!t.startsWith("data-"))||!("IMG"!==e&&"SOURCE"!==e||"src"!==t&&"srcset"!==t)}function Kt(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;const t=e;if("INPUT"===t.tagName)switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!Ht[t.tagName]}const Jt=e=>e.replace(/\S/g,"x");function Qt(e,t){var r;const n=null===(r=e.parentElement)||void 0===r?void 0:r.tagName;let o=e.textContent||"";if("HEAD"===n&&!o.trim())return;const i=t;if("SCRIPT"===n)o=Ut;else if(i===Bt.HIDDEN)o=Ut;else if(Yt(e,i))if("DATALIST"===n||"SELECT"===n||"OPTGROUP"===n){if(!o.trim())return}else o="OPTION"===n?Ut:i===Bt.MASK_UNLESS_ALLOWLISTED?tr(o):Jt(o);return o}function er(e){var t;return!e||!e.trim()||(null===(t=window.$DD_ALLOW)||void 0===t?void 0:t.has(e.toLocaleLowerCase()))||!1}function tr(e,t){return er(e)?e:t||Jt(e)}function rr({lifeCycle:e,isChildEvent:t,onChange:r=z.l}){const n={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=e.subscribe(13,e=>{var o;if("view"!==e.type&&"vital"!==e.type&&t(e))switch(e.type){case v.ERROR:n.errorCount+=1,r();break;case v.ACTION:n.actionCount+=1,e.action.frustration&&(n.frustrationCount+=e.action.frustration.type.length),r();break;case v.LONG_TASK:n.longTaskCount+=1,r();break;case v.RESOURCE:(null===(o=e._dd)||void 0===o?void 0:o.discarded)||(n.resourceCount+=1,r())}});return{stop:()=>{o.unsubscribe()},eventCounts:n}}const nr=5*p.iW;function or(e){const t=(0,Ee.qj)({expireDelay:nr}),r=new Map;function n(e){var t;r.delete(e.key),null===(t=e.eventCounts)||void 0===t||t.stop()}function o(){r.forEach(e=>{n(e)}),t.reset()}const i=e.subscribe(10,o);return{start:function(o,i,a,s){const l=(0,T.lk)(),c=t.add(l,i.relative),u=r.get(o);u&&n(u);const d=(null==s?void 0:s.isChildEvent)?rr({lifeCycle:e,isChildEvent:s.isChildEvent(l)}):void 0;r.set(o,{id:l,key:o,startClocks:i,data:a,historyEntry:c,eventCounts:d})},stop:function(e,t,o){var i;const a=r.get(e);if(!a)return;const s=o?(0,d.kg)(a.data,o):a.data;a.historyEntry.close(t.relative);const l=(0,p.vk)(a.startClocks.timeStamp,t.timeStamp),c=null===(i=a.eventCounts)||void 0===i?void 0:i.eventCounts;return n(a),{...s,id:a.id,startClocks:a.startClocks,duration:l,counts:c}},discard:function(e){var t;const o=r.get(e);if(!o)return;const i=null===(t=o.eventCounts)||void 0===t?void 0:t.eventCounts;return n(o),o.historyEntry.remove(),{...o.data,id:o.id,startClocks:o.startClocks,counts:i}},getCounts:function(e){var t,n;return null===(n=null===(t=r.get(e))||void 0===t?void 0:t.eventCounts)||void 0===n?void 0:n.eventCounts},findId:function(e){return t.findAll(e)},stopAll:function(){i.unsubscribe(),o(),t.stop()}}}const ir=p.OY;function ar(e,t){const r=function(e,t){let r=e;for(;r;){if(r.matches(t))return r;r=pt(r)}return null}(e,`[${t}]`);if(r)return dr(ur(r.getAttribute(t).trim()))}const sr=[(e,t,r)=>{if("labels"in e&&e.labels&&e.labels.length>0)return pr(e.labels[0],t,r)},e=>{if("INPUT"===e.nodeName){const t=e,r=t.getAttribute("type");if("button"===r||"submit"===r||"reset"===r)return{name:t.value,nameSource:"text_content"}}},(e,t,r)=>{if("BUTTON"===e.nodeName||"LABEL"===e.nodeName||"button"===e.getAttribute("role"))return pr(e,t,r)},(e,t,r)=>fr(e,"aria-label",t,r),(e,t,r)=>{const n=e.getAttribute("aria-labelledby");if(n)return{name:n.split(/\s+/).map(t=>function(e,t){const r=e.getRootNode();if(r instanceof ShadowRoot){const e=r.getElementById(t);if(e)return e}return e.ownerDocument?e.ownerDocument.getElementById(t):null}(e,t)).filter(e=>Boolean(e)).map(e=>hr(e,t,r)).join(" "),nameSource:"text_content"}},(e,t,r)=>fr(e,"alt",t,r),(e,t,r)=>fr(e,"name",t,r),(e,t,r)=>fr(e,"title",t,r),(e,t,r)=>fr(e,"placeholder",t,r),(e,t,r)=>{if("options"in e&&e.options.length>0)return pr(e.options[0],t,r)}],lr=[(e,t,r)=>pr(e,t,r)];function cr(e,t,r,n){let o=e,i=0;for(;i<=10&&o&&"BODY"!==o.nodeName&&"HTML"!==o.nodeName&&"HEAD"!==o.nodeName;){for(const e of t){const t=e(o,r,n);if(t){const{name:e,nameSource:r}=t,n=e&&e.trim();if(n)return{name:dr(ur(n)),nameSource:r}}}if("FORM"===o.nodeName)break;o=pt(o),i+=1}}function ur(e){return e.replace(/\s+/g," ")}function dr(e){return e.length>100?`${(0,T._R)(e,100)} [...]`:e}function fr(e,t,r,n){const{enablePrivacyForActionName:o,defaultPrivacyLevel:i}=r;let a=e.getAttribute(t);if(a&&o){const o=Wt(e,i,n);Xt(e.tagName,t,a,o,r)&&(a=tr(a,Et))}else a||(a="");return{name:a,nameSource:"standard_attribute"}}function pr(e,t,r){return{name:hr(e,t,r)||"",nameSource:"text_content"}}function hr(e,t,r){if(e.isContentEditable)return;const{enablePrivacyForActionName:n,actionNameAttribute:o,defaultPrivacyLevel:i}=t;if((0,h.sr)(h.R9.USE_TREE_WALKER_FOR_ACTION_NAME))return function(e,t,r,n,o){const i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,function(e){const i=Wt(e,n,o);if(r&&i&&Yt(e,i))return NodeFilter.FILTER_REJECT;if(st(e)){if(e.hasAttribute(Ct)||t&&e.hasAttribute(t))return NodeFilter.FILTER_REJECT;const r=getComputedStyle(e);if("visible"!==r.visibility||"none"===r.display||r.contentVisibility&&"visible"!==r.contentVisibility)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT});let a="";for(;i.nextNode();){const e=i.currentNode;st(e)?("BR"===e.nodeName||"P"===e.nodeName||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(e).display))&&(a+=" "):a+=e.textContent||""}return a.replace(/\s+/g," ").trim()}(e,o,n,i,r);if("innerText"in e){let t=e.innerText;const r=r=>{const n=e.querySelectorAll(r);for(let e=0;e0&&(t=t.replace(e,""))}}};return r(`[${Ct}]`),o&&r(`[${o}]`),n&&r(`${Gt(Bt.HIDDEN)}, ${Gt(Bt.MASK)}`),t}return e.textContent}function mr(){const e=window.getSelection();return!e||e.isCollapsed}function gr(e){return e.target instanceof Element&&!1!==e.isPrimary}function yr(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return"LABEL"===t.tagName&&t.hasAttribute("for")&&(t=document.getElementById(t.getAttribute("for"))),!t||!t.matches('input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *')}const vr=10*p.OY,br=new Map;function _r(e,t){br.set(e,t),br.forEach((e,t)=>{(0,p.vk)(t,(0,p.$S)())>vr&&br.delete(t)})}function xr(e){return t=>void 0!==t.action&&void 0!==t.action.id&&t.action.id.includes(e)}function wr(e,t,r,n){const o=or(e),i=new _e.cP;let a;e.subscribe(5,c),e.subscribe(11,c);const{stop:s}=function(e,{onPointerDown:t,onPointerUp:r}){let n,o,i={selection:!1,input:!1,scroll:!1};const a=[(0,gt.q)(e,window,"pointerdown",e=>{gr(e)&&(n=mr(),i={selection:!1,input:!1,scroll:!1},o=t(e))},{capture:!0}),(0,gt.q)(e,window,"selectionchange",()=>{n&&mr()||(i.selection=!0)},{capture:!0}),(0,gt.q)(e,window,"scroll",()=>{i.scroll=!0},{capture:!0,passive:!0}),(0,gt.q)(e,window,"pointerup",e=>{if(gr(e)&&o){const t=i;r(o,e,()=>t),o=void 0}},{capture:!0}),(0,gt.q)(e,window,"input",()=>{i.input=!0},{capture:!0})];return{stop:()=>{a.forEach(e=>e.stop())}}}(n,{onPointerDown:o=>function(e,t,r,n,o){const i=e.betaTrackActionsInShadowDom?Ar(n):n.target;let a;if(a=e.enablePrivacyForActionName?Wt(i,e.defaultPrivacyLevel):Bt.ALLOW,a===Bt.HIDDEN)return;const s=function(e,t,r){const n=r.betaTrackActionsInShadowDom?Ar(e):e.target,o=n.getBoundingClientRect(),i=Mt(n,r.actionNameAttribute);i&&_r(e.timeStamp,i);const{name:a,nameSource:s}=function(e,t,r=Bt.ALLOW){const n=new Map,{actionNameAttribute:o}=t,i=ar(e,Ct)||o&&ar(e,o);return i?{name:i,nameSource:"custom_attribute"}:r===Bt.MASK?{name:Et,nameSource:"mask_placeholder"}:cr(e,sr,t,n)||cr(e,lr,t,n)||{name:"",nameSource:"blank"}}(n,r,t);return{type:A.CLICK,target:{width:Math.round(o.width),height:Math.round(o.height),selector:i},position:{x:Math.round(e.clientX-o.left),y:Math.round(e.clientY-o.top)},name:a,nameSource:s}}(n,a,e);let l=!1;return xt(t,r,o,e,e=>{l=e.hadActivity},100),{clickActionBase:s,hadActivityOnPointerDown:()=>l}}(n,e,t,o,r),onPointerUp:({clickActionBase:a,hadActivityOnPointerDown:s},c,u)=>{!function(e,t,r,n,o,i,a,s,l,c,u){var d;const f=Sr(t,o,c,s,l);a(f);const h=null===(d=null==s?void 0:s.target)||void 0===d?void 0:d.selector;h&&_r(l.timeStamp,h);const{stop:m}=xt(t,r,n,e,e=>{e.hadActivity&&e.end{f.stop(e.timeStamp)}),y=t.subscribe(11,()=>{f.stop((0,p.nx)())}),v=i.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{y.unsubscribe(),g.unsubscribe(),m(),v.unsubscribe()})}(n,e,t,r,o,i,l,a,c,u,s)}});return{stop:()=>{c(),i.notify(),s(),o.stopAll()},findActionId:o.findId};function l(e){if(!a||!a.tryAppend(e)){const t=e.clone();a=function(e,t){const r=[];let n,o=0;function i(e){e.stopObservable.subscribe(a),r.push(e),(0,mt.DJ)(n),n=(0,mt.wg)(s,ir)}function a(){1===o&&r.every(e=>e.isStopped())&&(o=2,t(r))}function s(){(0,mt.DJ)(n),0===o&&(o=1,a())}return i(e),{tryAppend:e=>{return 0===o&&(r.length>0&&(t=r[r.length-1].event,n=e.event,!(t.target===n.target&&(a=t,l=n,Math.sqrt(Math.pow(a.clientX-l.clientX,2)+Math.pow(a.clientY-l.clientY,2))<=100)&&t.timeStamp-n.timeStamp<=ir))?(s(),!1):(i(e),!0));var t,n,a,l},stop:()=>{s()}}}(e,e=>{!function(e,t){const{isRage:r}=function(e,t){if(function(e){if(e.some(e=>e.getUserActivity().selection||e.getUserActivity().scroll))return!1;for(let t=0;te.getUserActivity().selection);return e.forEach(e=>{e.hasError&&e.addFrustration(S),yr(e)&&!r&&e.addFrustration(C)}),{isRage:!1}}(e,t);r?(e.forEach(e=>e.discard()),t.stop((0,p.nx)()),t.validate(e.map(e=>e.event))):(t.discard(),e.forEach(e=>e.validate()))}(e,t),a=void 0})}}function c(){a&&a.stop()}}function Ar(e){if(e.composed&<(e.target)&&"function"==typeof e.composedPath){const t=e.composedPath();if(t.length>0&&t[0]instanceof Element)return t[0]}return e.target}function Sr(e,t,r,n,o){const i=(0,T.lk)(),a=(0,p.FR)(o.timeStamp);t.start(i,a,n,{isChildEvent:xr});let s,l=0;const c=[],u=new _e.cP;function d(e){0===l&&(l=1,s=e?t.stop(i,(0,p.jR)(e)):t.discard(i),u.notify())}return{event:o,stop:d,stopObservable:u,get hasError(){var e;const r=null!==(e=null==s?void 0:s.counts)&&void 0!==e?e:t.getCounts(i);return!!r&&r.errorCount>0},get hasPageActivity(){return s&&"duration"in s},getUserActivity:r,addFrustration:e=>{c.push(e)},get startClocks(){return a},isStopped:()=>1===l||2===l,clone:()=>Sr(e,t,r,n,o),validate:t=>{if(d(),1!==l)return;if(!s)return;const r={frustrationTypes:c,events:null!=t?t:[o],event:o,...s,counts:s.counts};e.notify(0,r),l=2},discard:()=>{d(),l=2}}}function Cr(e){const t=function(e){return"events"in e}(e),r=it((0,p.Zj)(e.duration));return{rawRumEvent:{type:v.ACTION,date:e.startClocks.timeStamp,action:{id:e.id,target:{name:e.name},type:e.type,...void 0!==r&&{loading_time:r},...e.counts&&{error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},frustration:{type:e.frustrationTypes}},...t?{_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:{context:e.context}},duration:e.duration,startClocks:e.startClocks,domainContext:t?{events:e.events}:{handlingStack:e.handlingStack}}}var Er=r("aI0c"),Tr=r("7ql9"),Ir=r("NgUp"),kr=r("h/Zm");var Mr=r("O2SO");const Rr=p.OY;function Pr(){const e=[];function t(t){let n;if(t.didTimeout){const e=performance.now();n=()=>30-(performance.now()-e)}else n=t.timeRemaining.bind(t);for(;n()>0&&e.length;)e.shift()();e.length&&r()}function r(){(0,Mr.BB)(t,{timeout:Rr})}return{push(t){1===e.push(t)&&r()},stop(){e.length=0}}}const Or=new WeakSet;function Dr(e){return(0,p.Gw)(e.startTime,e.duration)}var Lr=r("21en");const Nr=2*p.iW;function Fr(e){const t=function(e){const t=e.querySelector("meta[name=dd-trace-id]"),r=e.querySelector("meta[name=dd-trace-time]");return zr(t&&t.content,r&&r.content)}(e)||function(e){const t=function(e){for(let t=0;t=0;t-=1){const r=e.body.childNodes[t],n=Br(r);if(n)return n;if(!at(r))break}}(e);if(t)return zr((0,T.rx)(t,"trace-id"),(0,T.rx)(t,"trace-time"))}(e);if(t&&!(t.traceTime<=(0,p.x3)()-Nr))return t.traceId}function zr(e,t){const r=t&&Number(t);if(e&&r)return{traceId:e,traceTime:r}}function Br(e){if(e&&function(e){return e.nodeType===Node.COMMENT_NODE}(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function jr(){if(bt(ht.NAVIGATION)){const e=performance.getEntriesByType(ht.NAVIGATION)[0];if(e)return e}const e=function(){const e={},t=performance.timing;for(const r in t)if((0,H.Et)(t[r])){const n=r,o=t[n];e[n]=0===o?0:(0,p.gs)(o)}return e}(),t={entryType:ht.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function $r(e){return e.responseStart>=0&&e.responseStart<=(0,p.$S)()?e.responseStart:void 0}function Ur(e,t){(0,Lr.H)(e,"interactive",()=>{const e=(0,a.B)(jr)(),r=Object.assign(e.toJSON(),{entryType:ht.RESOURCE,initiatorType:Pe,duration:e.responseEnd,traceId:Fr(document),toJSON:()=>({...r,toJSON:void 0})});t(r)})}function Vr(e,t,r){const n=(0,a.B)(Pr)();let o;const i=t.trackEarlyRequests;i?o=function(e){const t=new Set,r=e.subscribe(8,e=>{t.add(e),t.size>1e3&&((0,c.A2)("Too many requests"),t.delete(t.values().next().value))});return{getMatchingRequest(e){let r,n=1/0;for(const o of t){const t=e.startTime-o.startClocks.relative;0<=t&&t{l(()=>function(e,t,r){const n=function(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const r=t.filter(e=>!Or.has(e)).filter(e=>ze(e)&&Be(e)).filter(t=>{return r=t,n=e.startClocks.relative,o=Dr({startTime:e.startClocks.relative,duration:e.duration}),r.startTime>=n-1&&Dr(r)<=(0,p.Gw)(o,1);var r,n,o});return 1===r.length?(Or.add(r[0]),r[0].toJSON()):void 0}(e);return Gr(n,e,r,t)}(e,t,r))});const s=yt(t,{type:ht.RESOURCE,buffered:!0}).subscribe(e=>{for(const n of e)!i&&Ne(n)||l(()=>Hr(n,t,r,o))});function l(t){n.push(()=>{const r=t();r&&e.notify(12,r)})}(0,a.B)(Ur)(t,e=>{l(()=>Hr(e,t,r,o))});const u=or(e),d=function(e,t){return{startResource:function(e,r={},n=(0,p.M8)()){var o;const i=null!==(o=r.resourceKey)&&void 0!==o?o:e;t.start(i,n,{url:e,...r})},stopResource:function(r,n={},o=(0,p.M8)()){var i;const a=null!==(i=n.resourceKey)&&void 0!==i?i:r,s=t.stop(a,o,{context:n.context,type:n.type});s&&function(t,r,n,o,i){const a=i?(0,p.vk)(r.relative,i.relative):void 0,s={date:r.timeStamp,type:v.RESOURCE,resource:{id:t,type:n.type||ke.v.OTHER,url:We(n.url),duration:void 0!==a?(0,p.Zj)(a):void 0,method:n.method,status_code:o},_dd:{},context:n.context};e.notify(12,{rawRumEvent:s,startClocks:r,duration:a,domainContext:{isManual:!0}})}(s.id,s.startClocks,s,n.statusCode,o)}}}(e,u);return{startResource:d.startResource,stopResource:d.stopResource,stop:()=>{n.stop(),s.unsubscribe(),u.stopAll()}}}function Hr(e,t,r,n){return Gr(e,Ne(e)&&n?n.getMatchingRequest(e):void 0,r,t)}function Gr(e,t,r,n){if(!e&&!t)return;const o=t?function(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}(t,n):function(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Xe().toString(),rule_psr:t.rulePsr}}}(e,n);if(!n.trackResources&&!o)return;const i=e?(0,p.FR)(e.startTime):t.startClocks,a=e?function(e){const{duration:t,startTime:r,responseEnd:n}=e;return 0===t&&r{var t;return{message:e.message,path:e.path,locations:e.locations,code:null===(t=e.extensions)||void 0===t?void 0:t.code}}):void 0}(e.responseBody);t&&(r.error_count=t.length,r.errors=t)}return r}}(e,r)}(t,n),l=(0,d.kg)({date:i.timeStamp,resource:{id:(0,T.lk)(),duration:(0,p.Zj)(a),type:t?t.type===ke.Y.XHR?ke.v.XHR:ke.v.FETCH:De(e),method:t?t.method:void 0,status_code:t?t.status:(c=e.responseStatus,0===c?void 0:c),url:t?We(t.url):e.name,protocol:e&&$e(e),delivery_type:e&&Ue(e),graphql:s},type:v.RESOURCE,_dd:{discarded:!n.trackResources}},o,e&&function(e){const{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...Ve(e),...Fe(e)}}}(e));var c;return{startClocks:i,duration:a,rawRumEvent:l,domainContext:Wr(e,t)}}function Wr(e,t){if(t){const r={performanceEntry:e,isAborted:t.isAborted,handlingStack:t.handlingStack};return t.type===ke.Y.XHR?{xhr:t.xhr,...r}:{requestInput:t.input,requestInit:t.init,response:t.response,error:t.error,...r}}return{performanceEntry:e}}function qr(){try{return(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch(e){return}}var Zr=r("Bswk");const Yr=10*p.iW;const Xr=10*p.iW;function Kr(e,t,r,n){let o=1/0;const{stop:i}=(0,gt.l)(e,r,["pointerdown","keydown"],e=>{o=e.timeStamp},{capture:!0,once:!0});let a=0;const s=yt(e,{type:ht.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(r=>{const i=(0,qe.Uk)(r,e=>e.entryType===ht.LARGEST_CONTENTFUL_PAINT&&e.startTimea);if(i){let t;i.element&&(t=Mt(i.element,e.actionNameAttribute));const r=""===(s=i).url?void 0:s.url,o=i.startTime,l=(0,h.sr)(h.R9.LCP_SUBPARTS)?function(e,t){const r=$r(jr());if(void 0===r)return;const n=e?function(e,t){const r=function(){if(bt(ht.RESOURCE))return performance.getEntriesByType(ht.RESOURCE)}();if(r)return(0,qe.Uk)(r,r=>r.name===e&&r.startTime<=t)}(e,t):void 0,o=n?Math.max(r,n.requestStart||n.startTime):r,i=Math.min(t,Math.max(o,(null==n?void 0:n.responseEnd)||0));return{loadDelay:o-r,loadTime:i-o,renderDelay:t-i}}(r,o):void 0;n({value:o,targetSelector:t,resourceUrl:r,subParts:l}),a=i.size}var s});return{stop:()=>{i(),s.unsubscribe()}}}function Jr(e,t,r=window){if("hidden"===document.visibilityState)return{timeStamp:0,stop:z.l};if(bt(ht.VISIBILITY_STATE)){const e=performance.getEntriesByType(ht.VISIBILITY_STATE).filter(e=>"hidden"===e.name).find(e=>e.startTime>=t.relative);if(e)return{timeStamp:e.startTime,stop:z.l}}let n=1/0;const{stop:o}=(0,gt.l)(e,r,["pagehide","visibilitychange"],e=>{"pagehide"!==e.type&&"hidden"!==document.visibilityState||(n=e.timeStamp,o())},{capture:!0});return{get timeStamp(){return n},stop:o}}function Qr(e,t,r,n){const o={},{stop:i}=function(e,t){return function(e,t){let r;const{stop:n}=(0,Lr.H)(e,"complete",()=>{r=(0,mt.wg)(()=>t())});return{stop:()=>{n(),(0,mt.DJ)(r)}}}(e,()=>{const e=(0,a.B)(jr)();(function(e){return e.loadEventEnd<=0})(e)||t(function(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:$r(e)}}(e))})}(e,e=>{r(e.loadEvent),o.navigationTimings=e,n()}),s=Jr(e,t),{stop:l}=function(e,t){return{stop:yt(e,{type:ht.PAINT,buffered:!0}).subscribe(e=>{const r=e.find(e=>"first-contentful-paint"===e.name&&e.startTime{o.largestContentfulPaint=e,n()}),{stop:u}=function(e,t){const r=yt(e,{type:ht.FIRST_INPUT,buffered:!0}).subscribe(r=>{const i=r.find(e=>e.startTime=0?t:0,time:i.startTime,targetSelector:r},o.firstInput=a,n()}var a});return{stop:()=>{r.unsubscribe()}}}(e,s);return{stop:function(){i(),l(),c(),u(),s.stop()},initialViewMetrics:o}}const en=(e,t)=>e*t,tn=e=>en(e.previousRect.width,e.previousRect.height)+en(e.currentRect.width,e.currentRect.height)-((e,t)=>{const r=Math.max(e.left,t.left),n=Math.max(e.top,t.top),o=Math.min(e.right,t.right),i=Math.min(e.bottom,t.bottom);return r>=o||n>=i?0:en(o-r,i-n)})(e.previousRect,e.currentRect);function rn(e){let t;for(const r of e)if(r.node&&st(r.node)){const e=tn(r);(!t||tn(t)sn?ln:window.performance.interactionCount||0,fn=1*p.iW;function pn(e){return Math.min(e,fn)}function hn(){let e;const t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(e)}function mn(){let e;const t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(e)}let gn;function yn(e){return gn||(gn=function(e){return new _e.cP(t=>{const{throttled:r}=(0,z.n)(()=>{t.notify(vn())},200);return(0,gt.q)(e,window,"resize",r,{capture:!0,passive:!0}).stop})}(e)),gn}function vn(){const e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const bn=p.OY;function _n(e,t,r,n,o,i,a){const s={},{stop:c,setLoadEvent:u}=function(e,t,r,n,i,a){let l=i===_,c=!0;const u=[],d=Jr(n,a);function f(){if(!c&&!l&&u.length>0){const t=Math.max(...u);t{c&&(c=!1,e.hadActivity&&u.push((0,p.vk)(a.timeStamp,e.end)),f())});return{stop:()=>{h(),d.stop()},setLoadEvent:e=>{l&&(l=!1,u.push(e),f())}}}(e,t,r,n,i,a),{stop:d}=function(e,t,r,n=function(e,t=bn){return new _e.cP(r=>{if(window.ResizeObserver){const n=(0,z.n)(function(){r.notify(function(){const e=mn(),{height:t}=vn();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}())},t,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,i=new ResizeObserver((0,l.dm)(n.throttled));o&&i.observe(o);const a=(0,gt.q)(e,window,"scroll",n.throttled,{passive:!0});return()=>{n.cancel(),i.disconnect(),a.stop()}}})}(e)){let o=0,i=0,a=0;const s=n.subscribe(({scrollDepth:e,scrollTop:n,scrollHeight:s})=>{let l=!1;if(e>o&&(o=e,l=!0),s>i){i=s;const e=(0,p.$S)();a=(0,p.vk)(t.relative,e),l=!0}l&&r({maxDepth:Math.min(o,i),maxDepthScrollTop:n,maxScrollHeight:i,maxScrollHeightTime:a})});return{stop:()=>s.unsubscribe()}}(n,a,e=>{s.scroll=e}),{stop:f}=function(e,t,r){if(!bt(ht.LAYOUT_SHIFT)||!("WeakRef"in window))return{stop:z.l};let n,o=0;r({value:0});const i=function(){let e,t,r=0,n=0;return{update:o=>{let i;return void 0===e||o.startTime-t>=an||o.startTime-e>=on?(e=t=o.startTime,n=r=o.value,i=!0):(r+=o.value,t=o.startTime,i=o.value>n,i&&(n=o.value)),{cumulatedValue:r,isMaxValue:i}}}}(),a=yt(e,{type:ht.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var s;for(const l of a){if(l.hadRecentInput||l.startTimeo){o=a;const t=null===(s=null==n?void 0:n.target)||void 0===s?void 0:s.deref();r({value:(0,H.LI)(o,4),targetSelector:t&&Mt(t,e.actionNameAttribute),time:null==n?void 0:n.time,previousRect:(null==n?void 0:n.previousRect)?nn(n.previousRect):void 0,currentRect:(null==n?void 0:n.currentRect)?nn(n.currentRect):void 0,devicePixelRatio:null==n?void 0:n.devicePixelRatio})}}});return{stop:()=>{a.unsubscribe()}}}(n,a.relative,e=>{s.cumulativeLayoutShift=e,o()}),{stop:m,getInteractionToNextPaint:g,setViewEnd:y}=function(e,t,r){if(!(bt(ht.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint:()=>{},setViewEnd:z.l,stop:z.l};let n,o=1/0;const{getViewInteractionCount:i,stopViewInteractionCount:a}=function(e){"interactionCount"in performance||sn||(sn=new window.PerformanceObserver((0,l.dm)(e=>{e.getEntries().forEach(e=>{const t=e;t.interactionId&&(cn=Math.min(cn,t.interactionId),un=Math.max(un,t.interactionId),ln=(un-cn)/7+1)})})),sn.observe({type:"event",buffered:!0,durationThreshold:0}));const t=e===_?0:dn();let r={stopped:!1};function n(){return dn()-t}return{getViewInteractionCount:()=>r.stopped?r.interactionCount:n(),stopViewInteractionCount:()=>{r={stopped:!0,interactionCount:n()}}}}(r),s=function(e){const t=[];function r(){t.sort((e,t)=>t.duration-e.duration).splice(10)}return{process(e){const n=t.findIndex(t=>e.interactionId===t.interactionId),o=t[t.length-1];-1!==n?e.duration>t[n].duration&&(t[n]=e,r()):(t.length<10||e.duration>o.duration)&&(t.push(e),r())},estimateP98Interaction(){const r=Math.min(t.length-1,Math.floor(e()/50));return t[r]},isTracked:e=>t.some(t=>t.interactionId===e)}}(i),c=(0,h.sr)(h.R9.INP_SUBPARTS)?function(e){const t=new Map;function r(e,t){e.startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd)}return{process(e){if(void 0===e.interactionId||!e.processingStart||!e.processingEnd)return;const n=e.startTime+e.duration,o=t.get(e.interactionId);if(o)r(o,e);else{for(const[,o]of t.entries())if(Math.abs(n-o.referenceRenderTime)<=8)return r(o,e),void t.set(e.interactionId,o);t.set(e.interactionId,{startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,referenceRenderTime:n})}},pruneUntracked(){for(const[r]of t)e.isTracked(r)||t.delete(r)},computeSubParts(e,r){if(!e.processingStart||!e.processingEnd||void 0===e.interactionId)return;const n=t.get(e.interactionId);if(!n)return;const o=Math.max(n.startTime+r,n.processingStart),i=Math.min(n.processingEnd,o);return{inputDelay:(0,p.vk)(n.startTime,n.processingStart),processingDuration:(0,p.vk)(n.processingStart,i),presentationDelay:(0,p.vk)(i,o)}},stop(){t.clear()}}}(s):null,u=yt(e,{type:ht.FIRST_INPUT,buffered:!0}).subscribe(f),d=yt(e,{type:ht.EVENT,durationThreshold:40,buffered:!0}).subscribe(f);function f(r){for(const e of r)e.interactionId&&e.startTime>=t&&e.startTime<=o&&(s.process(e),null==c||c.process(e));null==c||c.pruneUntracked();const i=s.estimateP98Interaction();i&&function(r){const o=(0,p.vk)(t,r.startTime);if(!n||r.duration!==n.duration||o!==n.startTime){let t=function(e){const t=br.get(e);return br.delete(e),t}(r.startTime);!t&&r.target&&st(r.target)&&(t=Mt(r.target,e.actionNameAttribute)),n={duration:r.duration,startTime:o,targetSelector:t}}c&&(n.subParts=c.computeSubParts(r,pn(n.duration)))}(i)}return{getInteractionToNextPaint:()=>n?{value:pn(n.duration),targetSelector:n.targetSelector,time:n.startTime,subParts:n.subParts}:i()?{value:0}:void 0,setViewEnd:e=>{o=e,a()},stop:()=>{d.unsubscribe(),u.unsubscribe(),null==c||c.stop()}}}(n,a.relative,i);return{stop:()=>{c(),f(),d()},stopINPTracking:m,setLoadEvent:u,setViewEnd:y,getCommonViewMetrics:()=>(s.interactionToNextPaint=g(),s)}}const xn=5*p.iW,wn=5*p.iW;function An(e,t,r,n,o,i,s){const l=new Set;let c,u,d=f(_,(0,p.Oc)(),s);function f(o,i,s){const c=function(e,t,r,n,o,i=(0,p.M8)(),s){const l=(0,T.lk)(),c=new _e.cP,u={};let d,f=0;const h=(0,G.yG)((0,a.B)(window.location)),m=(0,Zr.D)();let g=!0,y=null==s?void 0:s.name;const v=(null==s?void 0:s.service)||n.service,b=(null==s?void 0:s.version)||n.version,x=null==s?void 0:s.context,A=null==s?void 0:s.handlingStack;x&&m.setContext(x);const S={id:l,name:y,startClocks:i,service:v,version:b,context:x};e.notify(1,S),e.notify(2,S);const{throttled:C,cancel:E}=(0,z.n)(V,3e3,{leading:!1}),{setLoadEvent:I,setViewEnd:k,stop:M,stopINPTracking:R,getCommonViewMetrics:P}=_n(e,t,r,n,U,o,i),{stop:O,initialViewMetrics:D}=o===_?Qr(n,i,I,U):{stop:z.l,initialViewMetrics:{}};o===w&&function(e,t,r){var n,o;n=e.relative,o=e=>{t.firstContentfulPaint=e,t.largestContentfulPaint={value:e},r()},requestAnimationFrame(()=>{requestAnimationFrame(()=>{o((0,p.vk)(n,(0,p.$S)()))})})}(i,D,U);const{stop:L,eventCounts:N}=function(e,t,r){const{stop:n,eventCounts:o}=rr({lifeCycle:e,isChildEvent:e=>e.view.id===t,onChange:r});return{stop:n,eventCounts:o}}(e,l,U),B=(0,mt.yb)(V,xn),j=e.subscribe(11,e=>{e.reason===be.y5.UNLOADING&&V()});function $(){e.notify(3,{id:l,name:y,context:m.getContext(),startClocks:i,sessionIsActive:g})}function U(){$(),C()}function V(){E(),$(),f+=1;const t=void 0===d?(0,p.nx)():d.timeStamp;e.notify(4,{customTimings:u,documentVersion:f,id:l,name:y,service:v,version:b,context:m.getContext(),loadingType:o,location:h,handlingStack:A,startClocks:i,commonViewMetrics:P(),initialViewMetrics:D,duration:(0,p.vk)(i.timeStamp,t),isActive:void 0===d,sessionIsActive:g,eventCounts:N})}return V(),m.changeObservable.subscribe(U),{get name(){return y},service:v,version:b,contextManager:m,stopObservable:c,end(t={}){var r,n;d||(d=null!==(r=t.endClocks)&&void 0!==r?r:(0,p.M8)(),g=null===(n=t.sessionIsActive)||void 0===n||n,e.notify(5,{endClocks:d}),e.notify(6,{endClocks:d}),(0,mt.vG)(B),k(d.relative),M(),j.unsubscribe(),V(),(0,mt.wg)(()=>{this.stop()},wn))},stop(){O(),L(),R(),c.notify()},addTiming(e,t){if(d)return;const r=(0,p.pu)(t)?t:(0,p.vk)(i.timeStamp,t);u[function(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&F.Vy.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}(e)]=r,U()},setViewName(e){y=e,V()}}}(e,t,r,n,o,i,s);return l.add(c),c.stopObservable.subscribe(()=>{l.delete(c)}),c}return e.subscribe(10,()=>{d=f(x,void 0,{name:d.name,service:d.service,version:d.version,context:d.contextManager.getContext()})}),e.subscribe(9,()=>{d.end({sessionIsActive:!1})}),i&&(u=function(e){return e.subscribe(({oldLocation:e,newLocation:t})=>{var r,n;n=t,((r=e).pathname!==n.pathname||!function(e){const t=e.substring(1);return""!==t&&!!document.getElementById(t)}(n.hash)&&Sn(n.hash)!==Sn(r.hash))&&(d.end(),d=f(x))})}(o),n.trackBfcacheViews&&(c=function(e){const{stop:t}=(0,gt.q)(e,window,"pageshow",e=>{e.persisted&&(e=>{d.end();const t=(0,p.FR)(e.timeStamp);d=f(w,t,void 0)})(e)},{capture:!0});return t}(n))),{addTiming:(e,t=(0,p.nx)())=>{d.addTiming(e,t)},startView:(e,t)=>{d.end({endClocks:t}),d=f(x,t,e)},setViewContext:e=>{d.contextManager.setContext(e)},setViewContextProperty:(e,t)=>{d.contextManager.setContextProperty(e,t)},setViewName:e=>{d.setViewName(e)},getViewContext:()=>d.contextManager.getContext(),stop:()=>{u&&u.unsubscribe(),c&&c(),d.end(),l.forEach(e=>e.stop())}}}function Sn(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Cn({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:r,firstInput:n,largestContentfulPaint:o}){return{cls:e&&{score:e.value,timestamp:(0,p.Zj)(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:r&&{timestamp:(0,p.Zj)(r)},fid:n&&{duration:(0,p.Zj)(n.delay),timestamp:(0,p.Zj)(n.time),target_selector:n.targetSelector},inp:t&&{duration:(0,p.Zj)(t.value),timestamp:(0,p.Zj)(t.time),target_selector:t.targetSelector,sub_parts:t.subParts?{input_delay:(0,p.Zj)(t.subParts.inputDelay),processing_duration:(0,p.Zj)(t.subParts.processingDuration),presentation_delay:(0,p.Zj)(t.subParts.presentationDelay)}:void 0},lcp:o&&{timestamp:(0,p.Zj)(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl,sub_parts:o.subParts?{load_delay:(0,p.Zj)(o.subParts.loadDelay),load_time:(0,p.Zj)(o.subParts.loadTime),render_delay:(0,p.Zj)(o.subParts.renderDelay)}:void 0}}}var En=r("Lg0b");var Tn=r("kTsJ"),In=r("GZz+"),kn=r("Zs30");const Mn=Ce.AQ;function Rn(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const Pn=Ce.AQ,On=10*p.OY;let Dn,Ln;function Nn(){0!==Dn.batchCount&&((0,c.Gk)("Customer data measures",Dn),zn())}function Fn(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function zn(){Dn={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0}}}const Bn=Ce.AQ;function jn(e,t,r){if(0!==e.length)return e.slice(-r).reverse().map(({state:e,startTime:r})=>({state:e,start:(0,p.Zj)((0,p.vk)(t,r))}))}function $n(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}const Un=p.OY;function Vn(e,t){let r=(0,T.rx)(document.cookie,e);const n=(0,mt.yb)(()=>{const n=(0,T.rx)(document.cookie,e);n!==r&&(r=n,t(n))},Un);return()=>{(0,mt.vG)(n)}}const Hn="datadog-ci-visibility-test-execution-id";function Gn(e,t){const r=(0,T.lk)(),n=(0,p.Zj)(e.duration),o={date:t.timeStamp,type:v.LONG_TASK,_dd:{discarded:!1}};return e.entryType===ht.LONG_TASK?{...o,long_task:{id:r,entry_type:b.LONG_TASK,duration:n}}:{...o,long_task:{id:r,entry_type:b.LONG_ANIMATION_FRAME,duration:n,blocking_duration:(0,p.Zj)(e.blockingDuration),first_ui_event_timestamp:(0,p.Zj)(e.firstUIEventTimestamp),render_start:(0,p.Zj)(e.renderStart),style_and_layout_start:(0,p.Zj)(e.styleAndLayoutStart),start_time:(0,p.Zj)(e.startTime),scripts:e.scripts.map(e=>({duration:(0,p.Zj)(e.duration),pause_duration:(0,p.Zj)(e.pauseDuration),forced_style_and_layout_duration:(0,p.Zj)(e.forcedStyleAndLayoutDuration),start_time:(0,p.Zj)(e.startTime),execution_start:(0,p.Zj)(e.executionStart),source_url:e.sourceURL,source_function_name:e.sourceFunctionName,source_char_position:e.sourceCharPosition,invoker:e.invoker,invoker_type:e.invokerType,window_attribution:e.windowAttribution}))}}}var Wn=r("RaEg"),qn=r("sL8f");function Zn(e,t,r){const n=(0,d.Go)(e),o=r(n);return(0,qe.WP)(t).forEach(([t,r])=>Yn(e,n,t.split(/\.|(?=\[\])/),r)),o}function Yn(e,t,r,n){const[o,...i]=r;if("[]"!==o){if(Xn(e)&&Xn(t))return i.length>0?Yn(e[o],t[o],i,n):void function(e,t,r,n){const o=(0,Z.P)(r);o===n?e[t]=(0,f.a)(r):"object"!==n||"undefined"!==o&&"null"!==o||(e[t]={})}(e,o,t[o],n)}else Array.isArray(e)&&Array.isArray(t)&&e.forEach((e,r)=>Yn(e,t[r],i,n))}function Xn(e){return"object"===(0,Z.P)(e)}const Kn={"view.name":"string","view.url":"string","view.referrer":"string"},Jn={context:"object"},Qn={service:"string",version:"string"};let eo;var to=r("QaFg");const ro=[v.ACTION,v.ERROR,v.LONG_TASK,v.RESOURCE,v.VITAL];var no=r("RE+S");function oo(e,t,r,n,o,i,s,u,m,g,y){const b=[],_=new Se;_.subscribe(13,e=>(0,ve.b)("rum",e));const x=e=>{_.notify(14,{error:e}),(0,c.A2)("Error reported to customer",{"error.message":e.message})},w=(0,be._T)(e),C=w.subscribe(e=>{_.notify(11,e)});b.push(()=>C.unsubscribe());const E=(0,N.d0)()?function(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:(0,N.Ww)("records")?1:0};return{findTrackedSession:()=>e,expire:z.l,expireObservable:new _e.cP,setForcedReplay:z.l}}():function(e,t,r){const n=(0,En.ox)(e,"rum",t=>function(e,t){return"0"===(r=t)||"1"===r||"2"===r?t:(0,H.ic)(e.sessionSampleRate)?(0,H.ic)(e.sessionReplaySampleRate)?"1":"2":"0";var r}(e,t),r);return n.expireObservable.subscribe(()=>{t.notify(9)}),n.renewObservable.subscribe(()=>{t.notify(10)}),n.sessionStateUpdateObservable.subscribe(({previousState:e,newState:t})=>{if(!e.forcedReplay&&t.forcedReplay){const e=n.findSession();e&&(e.isReplayForced=!0)}}),{findTrackedSession:e=>{const t=n.findSession(e);if(t&&"0"!==t.trackingType)return{id:t.id,sessionReplay:"1"===t.trackingType?1:t.isReplayForced?2:0,anonymousId:t.anonymousId}},expire:n.expire,expireObservable:n.expireObservable,setForcedReplay:()=>n.updateSessionState({forcedReplay:"1"})}}(e,_,i);if((0,N.d0)())!function(e){const t=(0,N.Y9)();e.subscribe(13,e=>{t.send("rum",e)})}(_);else{const t=function(e,t,r,n,o,i){const a=[e.rumEndpointBuilder];e.replica&&a.push(e.replica.rumEndpointBuilder);const s=(0,Tn.X)({encoder:i(2),request:(0,In.sA)(a,r),flushController:(0,kn.tO)({pageMayExitObservable:n,sessionExpireObservable:o})});return t.subscribe(13,e=>{e.type===v.VIEW?s.upsert(e,e.view.id):s.add(e)}),s}(e,_,x,w,E.expireObservable,o);b.push(()=>t.stop()),function(e,t,r){e.metricsEnabled&&(zn(),Ln=!1,t.subscribe(13,()=>{Ln=!0}),r.subscribe(({bytesCount:e,messagesCount:t})=>{Ln&&(Ln=!1,Dn.batchCount+=1,Fn(Dn.batchBytesCount,e),Fn(Dn.batchMessagesCount,t))}),(0,mt.yb)(Nn,On))}(m,_,t.flushController.flushObservable)}!function(e,t){e.register(1,()=>t.isGranted()?$.$O:$.ug)}(g,i);const{stop:R}=function(e,t){if(!t.metricsEnabled)return{stop:z.l};const{unsubscribe:r}=e.subscribe(4,({initialViewMetrics:e})=>{var t,n;e.largestContentfulPaint&&e.navigationTimings&&((0,c.Gk)("Initial view metrics",{metrics:(t=e.largestContentfulPaint,n=e.navigationTimings,{lcp:{value:t.value},navigation:{domComplete:n.domComplete,domContentLoaded:n.domContentLoaded,domInteractive:n.domInteractive,firstByte:n.firstByte,loadEvent:n.loadEvent}})}),r())});return{stop:r}}(_,m);b.push(R);const{stop:P,...U}=function(e,t,r,n,o,i,s,u,m,g){const y=[],b=function(){const e=we();return new _e.cP(t=>{if(!e)return;const r=new e((0,l.dm)(e=>t.notify(e)));return r.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>r.disconnect()})}(),_=function(e){let t=(0,G.yG)(location);return new _e.cP(r=>{const{stop:n}=function(e,t){const{stop:r}=(0,Ae.H)(Rn("pushState"),"pushState",({onPostCall:e})=>{e(t)}),{stop:n}=(0,Ae.H)(Rn("replaceState"),"replaceState",({onPostCall:e})=>{e(t)}),{stop:o}=(0,gt.q)(e,window,"popstate",t);return{stop:()=>{r(),n(),o()}}}(e,i),{stop:o}=function(e,t){return(0,gt.q)(e,window,"hashchange",t)}(e,i);function i(){if(t.href===location.href)return;const e=(0,G.yG)(location);r.notify({newLocation:e,oldLocation:t}),t=e}return()=>{n(),o()}})}(r),{observable:x,stop:w}=function(){const e=new _e.cP,{stop:t}=(0,Ae.H)(window,"open",()=>e.notify());return{observable:e,stop:t}}();y.push(w),function(e,t,r){e.register(0,({eventType:e})=>{const n=t.source;return{type:e,_dd:{format_version:2,drift:(0,p.TP)(),configuration:{session_sample_rate:(0,H.LI)(t.sessionSampleRate,3),session_replay_sample_rate:(0,H.LI)(t.sessionReplaySampleRate,3),profiling_sample_rate:(0,H.LI)(t.profilingSampleRate,3),trace_sample_rate:(0,H.LI)(t.traceSampleRate,3),beta_encode_cookie_options:t.betaEncodeCookieOptions},browser_sdk_version:(0,N.d0)()?"6.30.1":void 0,sdk_name:r},application:{id:t.applicationId},date:(0,p.nx)(),source:n}}),e.register(1,()=>({application:{id:t.applicationId}}))}(t,r,m);const C=function(e,t,r=500){const n=(0,Ee.qj)({expireDelay:Bn,maxEntries:4e3});let o;bt(ht.VISIBILITY_STATE)&&performance.getEntriesByType(ht.VISIBILITY_STATE).forEach(e=>{a("hidden"===e.name?"hidden":"active",e.startTime)}),a($n(),(0,p.$S)());const{stop:i}=(0,gt.l)(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],e=>{a(function(e){return"freeze"===e.type?"frozen":"pagehide"===e.type?e.persisted?"frozen":"terminated":$n()}(e),e.timeStamp)},{capture:!0});function a(e,t=(0,p.$S)()){e!==o&&(o=e,n.closeActive(t),n.add({state:o,startTime:t},t))}function s(e,t,r){return n.findAll(t,r).some(t=>t.state===e)}return e.register(0,({startTime:e,duration:t=0,eventType:o})=>o===v.VIEW?{type:o,_dd:{page_states:jn(n.findAll(e,t),e,r)}}:o===v.ACTION||o===v.ERROR?{type:o,view:{in_foreground:s("active",e,0)}}:$.$O),{wasInPageStateDuringPeriod:s,addPageState:a,stop:()=>{i(),n.stop()}}}(t,r);y.push(()=>C.stop());const E=function(e){const t=(0,Ee.qj)({expireDelay:Te});return e.subscribe(1,e=>{t.add(function(e){return{service:e.service,version:e.version,context:e.context,id:e.id,name:e.name,startClocks:e.startClocks}}(e),e.startClocks.relative)}),e.subscribe(6,({endClocks:e})=>{t.closeActive(e.relative)}),e.subscribe(3,e=>{const r=t.find(e.startClocks.relative);r&&(e.name&&(r.name=e.name),e.context&&(r.context=e.context),r.sessionIsActive=e.sessionIsActive)}),e.subscribe(10,()=>{t.reset()}),{findView:e=>t.find(e),stop:()=>{t.stop()}}}(e);y.push(()=>E.stop());const R=function(e,t,r){const n=(0,Ee.qj)({expireDelay:Mn});let o;e.subscribe(1,({startClocks:e})=>{const t=(0,a.B)(location).href;n.add(s({url:t,referrer:o||document.referrer}),e.relative),o=t}),e.subscribe(6,({endClocks:e})=>{n.closeActive(e.relative)});const i=r.subscribe(({newLocation:e})=>{const t=n.find();if(t){const r=(0,p.$S)();n.closeActive(r),n.add(s({url:e.href,referrer:t.referrer}),r)}});function s({url:e,referrer:t}){return{url:e,referrer:t}}return t.register(0,({startTime:e,eventType:t})=>{const r=n.find(e);return r?{type:t,view:{url:r.url,referrer:r.referrer}}:$.ug}),{findUrl:e=>n.find(e),stop:()=>{i.unsubscribe(),n.stop()}}}(e,t,_);y.push(()=>R.stop());const P=function(e,t,r){const n=(0,Ee.qj)({expireDelay:Pn});return e.subscribe(1,({startClocks:e})=>{n.add({},e.relative)}),e.subscribe(6,({endClocks:e})=>{n.closeActive(e.relative)}),t.register(0,({startTime:e,eventType:t})=>{if(!r.trackFeatureFlagsForEvents.concat([v.VIEW,v.ERROR]).includes(t))return $.$O;const o=n.find(e);return!o||(0,G.RI)(o)?$.$O:{type:t,feature_flags:o}}),{addFeatureFlagEvaluation:(e,t)=>{const r=n.find();r&&(r[e]=t)}}}(e,t,r);(function(e,t,r,n){e.register(0,({eventType:e,startTime:o})=>{const i=t.findTrackedSession(o),a=n.findView(o);if(!i||!a)return $.ug;let s,l,c;return e===v.VIEW?(s=!!r.getReplayStats(a.id)||void 0,l=1===i.sessionReplay,c=!!a.sessionIsActive&&void 0):s=!!r.isRecording()||void 0,{type:e,session:{id:i.id,type:"user",has_replay:s,sampled_for_replay:l,is_active:c}}}),e.register(1,({startTime:e})=>{const r=t.findTrackedSession(e);return r?{session:{id:r.id}}:$.$O})})(t,n,o,E),function(e){e.register(0,({eventType:e})=>({type:e,connectivity:(0,to.q)()}))}(t);const U=(0,O.F)(t,r,"rum",!0),V=(0,D.$)(t,r,n,"rum"),W=(0,L.B)(t,r,"rum"),q=function(e,t,r,n,o){const{unsubscribe:i}=e.subscribe(0,t=>{e.notify(12,Cr(t))}),a=z.l;let s;o.trackUserInteractions&&(s=wr(e,r,n,o));const l=function(e,t){const r=or(e);return{addAction:function(e){t({id:(0,T.lk)(),frustrationTypes:[],...e})},startAction:function(e,t={},n=(0,p.M8)()){var o;const i=null!==(o=t.actionKey)&&void 0!==o?o:e;r.start(i,n,{name:e,...t},{isChildEvent:xr})},stopAction:function(e,n={},o=(0,p.M8)()){var i;const a=null!==(i=n.actionKey)&&void 0!==i?i:e,s=r.stop(a,o,n);if(!s)return;const l=[];s.counts&&s.counts.errorCount>0&&l.push(S);const c={...s,type:s.type||A.CUSTOM,frustrationTypes:l};t(c)},findActionId:r.findId,stop:r.stopAll}}(e,t=>{e.notify(12,Cr(t))}),c={findActionId:e=>{var t;const r=l.findActionId(e),n=null!==(t=null==s?void 0:s.findActionId(e))&&void 0!==t?t:[];return r.concat(n)}};return t.register(0,({startTime:e,eventType:t})=>{if(t!==v.ERROR&&t!==v.RESOURCE&&t!==v.LONG_TASK)return $.$O;const r=t===v.LONG_TASK?(0,p.Gw)(e,1):e,n=c.findActionId(r);return n.length?{type:t,action:{id:n}}:$.$O}),t.register(1,({startTime:e})=>({action:{id:c.findActionId(e)}})),{addAction:l.addAction,startAction:l.startAction,stopAction:l.stopAction,actionContexts:c,stop:()=>{i(),a(),l.stop(),null==s||s.stop()}}}(e,t,b,x,r);y.push(q.stop);const Z=function(e){return{addEvent:(t,r,n,o)=>{ro.includes(r.type)&&e.notify(12,{startClocks:(0,p.FR)(t),rawRumEvent:r,domainContext:n,duration:o})}}}(e),Y=function(e,t){let r;const n=requestAnimationFrame((0,l.dm)(()=>{r=vn()})),o=yn(t).subscribe(e=>{r=e}).unsubscribe;return e.register(0,({eventType:e})=>({type:e,display:r?{viewport:r}:void 0})),{stop:()=>{o(),n&&cancelAnimationFrame(n)}}}(t,r);y.push(Y.stop);const X=function(e,t,r=function(e,t){const r=window.cookieStore?function(e){return(t,r)=>(0,gt.q)(e,window.cookieStore,"change",e=>{const n=e.changed.find(e=>e.name===t)||e.deleted.find(e=>e.name===t);n&&r(n.value)}).stop}(e):Vn;return new _e.cP(e=>r(t,t=>e.notify(t)))}(e,Hn)){var n;let o=(0,Q.B9)(Hn)||(null===(n=window.Cypress)||void 0===n?void 0:n.env("traceId"));const i=r.subscribe(e=>{o=e});return t.register(0,({eventType:e})=>"string"!=typeof o?$.$O:{type:e,session:{type:"ci_test"},ci_test:{test_execution_id:o}}),{stop:()=>{i.unsubscribe()}}}(r,t);y.push(X.stop),function(e){e.register(0,({eventType:e})=>(0,j.Fs)()?{type:e,session:{type:"synthetics"},synthetics:{...(0,j.IM)(),injected:(0,j.ao)()}}:$.$O)}(t),function(e,t,r,n,o){eo={[v.VIEW]:{"view.performance.lcp.resource_url":"string",...Jn,...Kn,...Qn},[v.ERROR]:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...Jn,...Kn,...Qn},[v.RESOURCE]:{"resource.url":"string","resource.graphql.variables":"string",...Jn,...Kn,...Qn},[v.ACTION]:{"action.target.name":"string",...Jn,...Kn,...Qn},[v.LONG_TASK]:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...Jn,...Kn,...Qn},[v.VITAL]:{...Jn,...Kn,...Qn}};const i={[v.ERROR]:(0,Wn.$)(v.ERROR,n,o),[v.ACTION]:(0,Wn.$)(v.ACTION,n,o),[v.VITAL]:(0,Wn.$)(v.VITAL,n,o)};t.subscribe(12,({startClocks:n,duration:o,rawRumEvent:a,domainContext:s})=>{const l=r.triggerHook(0,{eventType:a.type,rawRumEvent:a,domainContext:s,startTime:n.relative,duration:o});if(l===$.ug)return;const c=(0,d.kg)(l,a,{ddtags:(0,qn.m5)(e).join(",")});(function(e,t,r,n){var o;if(t){const n=Zn(e,eo[e.type],e=>t(e,r));if(!1===n&&e.type!==v.VIEW)return!1;!1===n&&F.Vy.warn("Can't dismiss view events using beforeSend!")}return!(null===(o=n[e.type])||void 0===o?void 0:o.isLimitReached())})(c,e.beforeSend,s,i)&&((0,G.RI)(c.context)&&delete c.context,t.notify(13,c))})}(r,e,t,g);const{addTiming:K,startView:J,setViewName:ee,setViewContext:te,setViewContextProperty:re,getViewContext:ne,stop:oe}=function(e,t,r,n,o,i,a,s,l){return e.subscribe(4,t=>e.notify(12,function(e,t,r){var n,o,i,a,s,l,c,u,d,f,h,m,g,y,b,_,x,w;const A=r.getReplayStats(e.id),S=null===(o=null===(n=e.commonViewMetrics)||void 0===n?void 0:n.cumulativeLayoutShift)||void 0===o?void 0:o.devicePixelRatio,C={_dd:{document_version:e.documentVersion,replay_stats:A,cls:S?{device_pixel_ratio:S}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:v.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:null===(i=e.commonViewMetrics.cumulativeLayoutShift)||void 0===i?void 0:i.value,cumulative_layout_shift_time:(0,p.Zj)(null===(a=e.commonViewMetrics.cumulativeLayoutShift)||void 0===a?void 0:a.time),cumulative_layout_shift_target_selector:null===(s=e.commonViewMetrics.cumulativeLayoutShift)||void 0===s?void 0:s.targetSelector,first_byte:(0,p.Zj)(null===(l=e.initialViewMetrics.navigationTimings)||void 0===l?void 0:l.firstByte),dom_complete:(0,p.Zj)(null===(c=e.initialViewMetrics.navigationTimings)||void 0===c?void 0:c.domComplete),dom_content_loaded:(0,p.Zj)(null===(u=e.initialViewMetrics.navigationTimings)||void 0===u?void 0:u.domContentLoaded),dom_interactive:(0,p.Zj)(null===(d=e.initialViewMetrics.navigationTimings)||void 0===d?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:(0,p.Zj)(e.initialViewMetrics.firstContentfulPaint),first_input_delay:(0,p.Zj)(null===(f=e.initialViewMetrics.firstInput)||void 0===f?void 0:f.delay),first_input_time:(0,p.Zj)(null===(h=e.initialViewMetrics.firstInput)||void 0===h?void 0:h.time),first_input_target_selector:null===(m=e.initialViewMetrics.firstInput)||void 0===m?void 0:m.targetSelector,interaction_to_next_paint:(0,p.Zj)(null===(g=e.commonViewMetrics.interactionToNextPaint)||void 0===g?void 0:g.value),interaction_to_next_paint_time:(0,p.Zj)(null===(y=e.commonViewMetrics.interactionToNextPaint)||void 0===y?void 0:y.time),interaction_to_next_paint_target_selector:null===(b=e.commonViewMetrics.interactionToNextPaint)||void 0===b?void 0:b.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:(0,p.Zj)(null===(_=e.initialViewMetrics.largestContentfulPaint)||void 0===_?void 0:_.value),largest_contentful_paint_target_selector:null===(x=e.initialViewMetrics.largestContentfulPaint)||void 0===x?void 0:x.targetSelector,load_event:(0,p.Zj)(null===(w=e.initialViewMetrics.navigationTimings)||void 0===w?void 0:w.loadEvent),loading_time:it((0,p.Zj)(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:Cn(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:(0,p.Zj)(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:(0,p.Zj)(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:qr()}};return(0,G.RI)(e.customTimings)||(C.view.custom_timings=(0,G.LG)(e.customTimings,p.Zj)),{rawRumEvent:C,startClocks:e.startClocks,duration:e.duration,domainContext:{location:e.location,handlingStack:e.handlingStack}}}(t,r,a))),t.register(0,({startTime:e,eventType:t})=>{const r=s.findView(e);return r?{type:t,service:r.service,version:r.version,context:r.context,view:{id:r.id,name:r.name}}:$.ug}),t.register(1,({startTime:e})=>{var t;return{view:{id:null===(t=s.findView(e))||void 0===t?void 0:t.id}}}),An(e,n,o,r,i,!r.trackViewsManually,l)}(e,t,r,b,x,_,o,E,i);(function(e){const t=window,r=new Map;function n(){t.DD_SOURCE_CODE_CONTEXT&&((0,qe.WP)(t.DD_SOURCE_CODE_CONTEXT).forEach(([e,t])=>{const n=(0,no.T)({stack:e}).stack[0];n.url?r.has(n.url)||r.set(n.url,t):(0,c.VJ)("Source code context: missing frame url",{stack:e})}),t.DD_SOURCE_CODE_CONTEXT={})}n(),e.register(0,({domainContext:e,rawRumEvent:t})=>{if(n(),0===r.size)return $.$O;const o=function(e,t){var r,n;if("long_task"===t.type&&"long-animation-frame"===t.long_task.entry_type)return null===(r=t.long_task.scripts[0])||void 0===r?void 0:r.source_url;let o;return"handlingStack"in e&&(o=e.handlingStack),"error"===t.type&&t.error.stack&&(o=t.error.stack),null===(n=(0,no.T)({stack:o}).stack[0])||void 0===n?void 0:n.url}(e,t),i=o&&r.get(o);return i?{type:t.type,service:i.service,version:i.version}:$.$O})})(t),y.push(oe);const ie=Vr(e,r,C);y.push(ie.stop);const{stop:ae}=function(e,t){const r=bt(ht.LONG_ANIMATION_FRAME)?ht.LONG_ANIMATION_FRAME:ht.LONG_TASK,n=yt(t,{type:r,buffered:!0}).subscribe(r=>{for(const n of r){if(!t.trackLongTasks)break;const r=(0,p.FR)(n.startTime),o=Gn(n,r);e.notify(12,{rawRumEvent:o,startClocks:r,duration:n.duration,domainContext:{performanceEntry:n}})}});return{stop:()=>n.unsubscribe()}}(e,r);y.push(ae);const{addError:se}=function(e,t,r){const n=new _e.cP;return r.subscribe(e=>{0===e.type&&n.notify(e.error)}),function(e){(0,Ir.l)([F.bP.error]).subscribe(t=>e.notify(t.error))}(n),function(e,t){(0,kr.u)(e,[kr.V.cspViolation,kr.V.intervention]).subscribe(e=>t.notify(e))}(t,n),n.subscribe(t=>e.notify(14,{error:t})),function(e){return e.subscribe(14,({error:t})=>{e.notify(12,function(e){const t={date:e.startClocks.timeStamp,error:{id:(0,T.lk)(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:v.ERROR,context:e.context},r={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startClocks:e.startClocks,domainContext:r}}(t))}),{addError:({error:t,handlingStack:r,componentStack:n,startClocks:o,context:i})=>{const a=(0,Er.As)({originalError:t,handlingStack:r,componentStack:n,startClocks:o,nonErrorPrefix:"Provided",source:Tr.g.CUSTOM,handling:"handled"});a.context=(0,d.kg)(a.context,i),e.notify(14,{error:a})}}}(e)}(e,r,u);!function(e,t,r,n,o){const i=function(e,t,r,n){return{clearTracingIfNeeded:Qe,traceFetch:o=>et(e,o,t,r,n,e=>{var t;if(o.input instanceof Request&&!(null===(t=o.init)||void 0===t?void 0:t.headers))o.input=new Request(o.input),Object.keys(e).forEach(t=>{o.input.headers.append(t,e[t])});else{o.init=(0,G.yG)(o.init);const t=[];o.init.headers instanceof Headers?o.init.headers.forEach((e,r)=>{t.push([r,e])}):Array.isArray(o.init.headers)?o.init.headers.forEach(e=>{t.push(e)}):o.init.headers&&Object.keys(o.init.headers).forEach(e=>{t.push([e,o.init.headers[e]])}),o.init.headers=t.concat((0,qe.WP)(e))}}),traceXhr:(o,i)=>et(e,o,t,r,n,e=>{Object.keys(e).forEach(t=>{i.setRequestHeader(t,e[t])})})}}(t,r,n,o);!function(e,t,r){(0,Ie.G)(t).subscribe(t=>{const n=t;if(He(n.url))switch(n.state){case"start":r.traceXhr(n,n.xhr),n.requestIndex=ot(),e.notify(7,{requestIndex:n.requestIndex,url:n.url});break;case"complete":r.clearTracingIfNeeded(n),e.notify(8,{duration:n.duration,method:n.method,requestIndex:n.requestIndex,spanId:n.spanId,startClocks:n.startClocks,status:n.status,traceId:n.traceId,traceSampled:n.traceSampled,type:ke.Y.XHR,url:n.url,xhr:n.xhr,isAborted:n.isAborted,handlingStack:n.handlingStack,requestBody:n.requestBody,responseBody:n.responseBody})}})}(e,t,i),function(e,t,r){(0,B.i)({responseBodyAction:e=>{var r;return(null===(r=rt(e.url,t))||void 0===r?void 0:r.trackResponseErrors)?2:1}}).subscribe(t=>{var n;const o=t;if(He(o.url))switch(o.state){case"start":r.traceFetch(o),o.requestIndex=ot(),e.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"resolve":r.clearTracingIfNeeded(o),e.notify(8,{duration:(0,p.vk)(o.startClocks.timeStamp,(0,p.nx)()),method:o.method,requestIndex:o.requestIndex,responseType:o.responseType,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:ke.Y.FETCH,url:o.url,response:o.response,init:o.init,input:o.input,isAborted:o.isAborted,handlingStack:o.handlingStack,requestBody:null===(n=o.init)||void 0===n?void 0:n.body,responseBody:o.responseBody})}})}(e,t,i)}(e,r,n,V,W);const le=function(e,t,r){function n(r){(function(e){return!t.wasInPageStateDuringPeriod("frozen",e.startClocks.relative,e.duration)})(r)&&e.notify(12,M(r))}return{addOperationStepVital:function(t,r,n,o){if(!(0,h.sr)(h.R9.FEATURE_OPERATION_VITAL))return;const{operationKey:i,context:a,description:s}=n||{},l={name:t,type:"operation_step",operationKey:i,failureReason:o,stepType:r,startClocks:(0,p.M8)(),context:(0,f.a)(a),description:s};e.notify(12,M(l))},addDurationVital:n,startDurationVital:(e,t={})=>I(r,e,t),stopDurationVital:(e,t={})=>{k(n,r,e,t)}}}(e,C,s),ce=function(e,t,r,n,o){return{get:i=>{const a=r.findView(i),s=o.findUrl(i),l=t.findTrackedSession(i);if(l&&a&&s){const t=n.findActionId(i);return{application_id:e,session_id:l.id,user_action:t?{id:t}:void 0,view:{id:a.id,name:a.name,referrer:s.referrer,url:s.url}}}}}}(r.applicationId,n,E,q.actionContexts,R);return{addAction:q.addAction,startAction:q.startAction,stopAction:q.stopAction,startResource:ie.startResource,stopResource:ie.stopResource,addEvent:Z.addEvent,addError:se,addTiming:K,addFeatureFlagEvaluation:P.addFeatureFlagEvaluation,startView:J,setViewContext:te,setViewContextProperty:re,getViewContext:ne,setViewName:ee,viewHistory:E,getInternalContext:ce.get,startDurationVital:le.startDurationVital,stopDurationVital:le.stopDurationVital,addDurationVital:le.addDurationVital,addOperationStepVital:le.addOperationStepVital,globalContext:U,userContext:V,accountContext:W,stop:()=>y.forEach(e=>e())}}(_,g,e,E,t,n,s,u,y,x);return b.push(P),u.unbuffer(),b.push(()=>r.stop()),{...U,lifeCycle:_,session:E,stopSession:()=>E.expire(),telemetry:m,stop:()=>{b.forEach(e=>e())},hooks:g}}function io(e,t,r={}){const v=(0,n.D)(),b={vitalsByName:new Map,vitalsByReference:new WeakMap},_=(0,o.t)().observable;let x=ge(r,v,b,(n,o,s,l,c)=>{const u=o&&r.createDeflateEncoder?e=>r.createDeflateEncoder(n,o,e):i.N,d=(0,a.B)(oo)(n,e,t,s,u,v,b,_,l,c,r.sdkName);return e.onRumStart(d.lifeCycle,n,d.session,d.viewHistory,o,d.telemetry),t.onRumStart(d.lifeCycle,d.hooks,n,d.session,d.viewHistory,u),x=function(e,t){return{init:e=>{(0,y.$)("DD_RUM",e)},initConfiguration:e.initConfiguration,...t}}(x,d),R(n.plugins,"onRumStart",{strategy:x,addEvent:d.addEvent}),d});const w=()=>x,S=(0,u.m)({init:e=>{const t=(new Error).stack;(0,l.um)(()=>x.init(e,S,t))},setTrackingConsent:(0,l.dm)(e=>{v.update(e),(0,c.Q6)({feature:"set-tracking-consent",tracking_consent:e})}),setViewName:(0,l.dm)(e=>{x.setViewName(e),(0,c.Q6)({feature:"set-view-name"})}),setViewContext:(0,l.dm)(e=>{x.setViewContext(e),(0,c.Q6)({feature:"set-view-context"})}),setViewContextProperty:(0,l.dm)((e,t)=>{x.setViewContextProperty(e,t),(0,c.Q6)({feature:"set-view-context-property"})}),getViewContext:(0,l.dm)(()=>((0,c.Q6)({feature:"set-view-context-property"}),x.getViewContext())),getInternalContext:(0,l.dm)(e=>x.getInternalContext(e)),getInitConfiguration:(0,l.dm)(()=>(0,d.Go)(x.initConfiguration)),addAction:(e,t)=>{const r=(0,s.uC)("action");(0,l.um)(()=>{x.addAction({name:(0,f.a)(e),context:(0,f.a)(t),startClocks:(0,p.M8)(),type:A.CUSTOM,handlingStack:r}),(0,c.Q6)({feature:"add-action"})})},startAction:(0,l.dm)((e,t)=>{x.initConfiguration&&!(0,h.sr)(h.R9.START_STOP_ACTION)||x.startAction((0,f.a)(e),{type:(0,f.a)(t&&t.type),context:(0,f.a)(t&&t.context),actionKey:t&&t.actionKey})}),stopAction:(0,l.dm)((e,t)=>{x.initConfiguration&&!(0,h.sr)(h.R9.START_STOP_ACTION)||x.stopAction((0,f.a)(e),{type:(0,f.a)(t&&t.type),context:(0,f.a)(t&&t.context),actionKey:t&&t.actionKey})}),startResource:(0,l.dm)((e,t)=>{x.initConfiguration&&!(0,h.sr)(h.R9.START_STOP_RESOURCE)||x.startResource((0,f.a)(e),{type:(0,f.a)(t&&t.type),method:(0,f.a)(t&&t.method),context:(0,f.a)(t&&t.context),resourceKey:t&&t.resourceKey})}),stopResource:(0,l.dm)((e,t)=>{x.initConfiguration&&!(0,h.sr)(h.R9.START_STOP_RESOURCE)||x.stopResource((0,f.a)(e),{type:(0,f.a)(t&&t.type),statusCode:t&&t.statusCode,context:(0,f.a)(t&&t.context),resourceKey:t&&t.resourceKey})}),addError:(e,t)=>{const r=(0,s.uC)("error");(0,l.um)(()=>{x.addError({error:e,handlingStack:r,context:(0,f.a)(t),startClocks:(0,p.M8)()}),(0,c.Q6)({feature:"add-error"})})},addTiming:(0,l.dm)((e,t)=>{x.addTiming((0,f.a)(e),t)}),setGlobalContext:(0,m.q)(w,g.N.globalContext,g.Q.setContext,"set-global-context"),getGlobalContext:(0,m.q)(w,g.N.globalContext,g.Q.getContext,"get-global-context"),setGlobalContextProperty:(0,m.q)(w,g.N.globalContext,g.Q.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:(0,m.q)(w,g.N.globalContext,g.Q.removeContextProperty,"remove-global-context-property"),clearGlobalContext:(0,m.q)(w,g.N.globalContext,g.Q.clearContext,"clear-global-context"),setUser:(0,m.q)(w,g.N.userContext,g.Q.setContext,"set-user"),getUser:(0,m.q)(w,g.N.userContext,g.Q.getContext,"get-user"),setUserProperty:(0,m.q)(w,g.N.userContext,g.Q.setContextProperty,"set-user-property"),removeUserProperty:(0,m.q)(w,g.N.userContext,g.Q.removeContextProperty,"remove-user-property"),clearUser:(0,m.q)(w,g.N.userContext,g.Q.clearContext,"clear-user"),setAccount:(0,m.q)(w,g.N.accountContext,g.Q.setContext,"set-account"),getAccount:(0,m.q)(w,g.N.accountContext,g.Q.getContext,"get-account"),setAccountProperty:(0,m.q)(w,g.N.accountContext,g.Q.setContextProperty,"set-account-property"),removeAccountProperty:(0,m.q)(w,g.N.accountContext,g.Q.removeContextProperty,"remove-account-property"),clearAccount:(0,m.q)(w,g.N.accountContext,g.Q.clearContext,"clear-account"),startView:e=>{const t=(0,s.uC)("view");(0,l.um)(()=>{const r="object"==typeof e?e:{name:e};x.startView({...r,handlingStack:t}),(0,c.Q6)({feature:"start-view"})})},stopSession:(0,l.dm)(()=>{x.stopSession(),(0,c.Q6)({feature:"stop-session"})}),addFeatureFlagEvaluation:(0,l.dm)((e,t)=>{x.addFeatureFlagEvaluation((0,f.a)(e),(0,f.a)(t)),(0,c.Q6)({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:(0,l.dm)(()=>e.getSessionReplayLink()),startSessionReplayRecording:(0,l.dm)(t=>{e.start(t),(0,c.Q6)({feature:"start-session-replay-recording",force:t&&t.force})}),stopSessionReplayRecording:(0,l.dm)(()=>e.stop()),addDurationVital:(e,t)=>{const r=(0,s.uC)("vital");(0,l.um)(()=>{(0,c.Q6)({feature:"add-duration-vital"}),x.addDurationVital({name:(0,f.a)(e),type:E,startClocks:(0,p.jR)(t.startTime),duration:t.duration,context:(0,f.a)(t&&t.context),description:(0,f.a)(t&&t.description),handlingStack:r})})},startDurationVital:(e,t)=>{const r=(0,s.uC)("vital");return(0,l.um)(()=>((0,c.Q6)({feature:"start-duration-vital"}),x.startDurationVital((0,f.a)(e),{context:(0,f.a)(t&&t.context),description:(0,f.a)(t&&t.description),handlingStack:r})))},stopDurationVital:(0,l.dm)((e,t)=>{(0,c.Q6)({feature:"stop-duration-vital"}),x.stopDurationVital("string"==typeof e?(0,f.a)(e):e,{context:(0,f.a)(t&&t.context),description:(0,f.a)(t&&t.description)})}),startFeatureOperation:(0,l.dm)((e,t)=>{(0,c.Q6)({feature:"add-operation-step-vital",action_type:"start"}),x.addOperationStepVital(e,"start",t)}),succeedFeatureOperation:(0,l.dm)((e,t)=>{(0,c.Q6)({feature:"add-operation-step-vital",action_type:"succeed"}),x.addOperationStepVital(e,"end",t)}),failFeatureOperation:(0,l.dm)((e,t,r)=>{(0,c.Q6)({feature:"add-operation-step-vital",action_type:"fail"}),x.addOperationStepVital(e,"end",r,t)})});return S}var ao=r("zDtL");function so(e,{session:t,viewContext:r,errorType:n}){const o=t?t.id:"no-session-id",i=[];void 0!==n&&i.push(`error-type=${n}`),r&&(i.push(`seed=${r.id}`),i.push(`from=${r.startClocks.timeStamp}`));const a=function(e){const t=e.site,r=e.subdomain||function(e){switch(e.site){case ao.NW:case ao.dV:return"app";case ao.Bb:return"dd";default:return}}(e);return`https://${r?`${r}.`:""}${t}`}(e);return`${a}/rum/replay/sessions/${o}?${i.join("&")}`}var lo=r("YHPH");function co(e,t,r,n){const o=(0,In.sA)([e.profilingEndpointBuilder],e=>{t.notify(14,{error:e}),(0,c.A2)("Error reported to customer",{"error.message":e.message})}),i=r(n);return{async send({event:e,...t}){const r=new FormData,n=(0,lo.s)(e);if(!n)throw new Error("Failed to serialize event");r.append("event",new Blob([n],{type:"application/json"}),"event.json");let a=n.length;for(const[e,n]of(0,qe.WP)(t)){const t=(0,lo.s)(n);if(!t)throw new Error("Failed to serialize attachment");const o=await uo(i,t);a+=o.outputBytesCount,r.append(e,new Blob([o.output]),e)}o.send({data:r,bytesCount:a})}}}function uo(e,t){return new Promise(r=>{e.write(t),e.finish(e=>{r(e)})})}},"r8T/"(e,t,r){"use strict";let n;function o(e){return c(e).segments_count}function i(e){c(e).segments_count+=1}function a(e){c(e).records_count+=1}function s(e,t){c(e).segments_total_raw_size+=t}function l(e){return null==n?void 0:n.get(e)}function c(e){let t;return n||(n=new Map),n.has(e)?t=n.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},n.set(e,t),n.size>1e3&&function(){if(!n)return;const e=n.keys().next().value;e&&n.delete(e)}()),t}r.d(t,{$1:()=>a,H5:()=>i,K_:()=>o,L7:()=>s,lv:()=>l})},OVUg(e,t,r){"use strict";r.d(t,{L:()=>L});var n=r("Wm6P"),o=r("Ziog"),i=r("ywQB"),a=r("fbvQ"),s=r("PXye"),l=r("r8T/"),c=r("q7oZ"),u=r("N/so");function d(e,t,r){let n,o=0,i=[],a=!0,s=0;const l=[],{stop:d}=(0,c.q)(e,t,"message",({data:e})=>{if("wrote"!==e.type||e.streamId!==r)return;const t=l[0];t&&(t.id===e.id?(l.shift(),o+=e.additionalBytesCount,i.push(e.result),n=e.trailer,t.writeCallback?t.writeCallback(e.result.byteLength):t.finishCallback&&t.finishCallback()):t.id{delete e.writeCallback}),l[l.length-1].finishCallback=()=>e(f())):e(f())},finishSync(){p();const e=l.map(e=>e.data).join("");return l.length=0,{...f(),pendingData:e}},estimateEncodedBytesCount:e=>e.length/8,stop(){d()}}}var f=r("pX5O"),p=r("yrsg"),h=r("bgI0"),m=r("fBG3"),g=r("Zv/8");function y({configuredUrl:e,error:t,source:r,scriptType:n}){if(m.Vy.error(`${r} failed to start: an error occurred while initializing the ${n}:`,t),t instanceof Event||t instanceof Error&&((o=t.message).includes("Content Security Policy")||o.includes("requires 'TrustedScriptURL'"))){let t;t=e?`Please make sure the ${n} URL ${e} is correct and CSP is correctly configured.`:"Please make sure CSP is correctly configured.",m.Vy.error(`${t} See documentation at ${m.fH}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else"worker"===n&&(0,g.VJ)(t);var o}const v=30*f.OY;function b(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,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,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&is){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindexa&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindexa&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.30.1"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let _={status:0};function x(e,t,r){switch(0===_.status&&function(e,t){try{const r=(0,p.B)(b)(e),{stop:n}=(0,c.q)(e,r,"error",r=>{A(e,t,r)}),{stop:o}=(0,c.q)(e,r,"message",({data:r})=>{var n;"errored"===r.type?A(e,t,r.error,r.streamId):"initialized"===r.type&&(n=r.version,1===_.status&&(_={status:3,worker:_.worker,stop:_.stop,version:n}))});r.postMessage({action:"init"}),(0,h.wg)(()=>function(e){1===_.status&&(m.Vy.error(`${e} failed to start: a timeout occurred while initializing the Worker`),_.initializationFailureCallbacks.forEach(e=>e()),_={status:2})}(t),v),_={status:1,worker:r,stop:()=>{n(),o()},initializationFailureCallbacks:[]}}catch(r){A(e,t,r)}}(e,t),_.status){case 1:return _.initializationFailureCallbacks.push(r),_.worker;case 3:return _.worker}}function w(){return _.status}function A(e,t,r,n){1===_.status||0===_.status?(y({configuredUrl:e.workerUrl,error:r,source:t,scriptType:"worker"}),1===_.status&&_.initializationFailureCallbacks.forEach(e=>e()),_={status:2}):(0,g.VJ)(r,{worker_version:3===_.status&&_.version,stream_id:n})}function S(){return"function"==typeof Array.from&&"function"==typeof CSSSupportsRule&&"function"==typeof URL.createObjectURL&&"forEach"in NodeList.prototype}var C=r("FDU9"),E=r("21en"),T=r("DIDV");function I(e,t,r,n,o,a,l){let c,u=0;t.subscribe(9,()=>{2!==u&&3!==u||(m(),u=1)}),t.subscribe(10,()=>{1===u&&h()});const d=new C.cP;!function(e,t){if(!e.metricsEnabled)return{stop:s.l};let r,n,o;const{unsubscribe:i}=t.subscribe(e=>{switch(e.type){case"start":r={forced:e.forced,timestamp:(0,f.nx)()},n=void 0,o=void 0;break;case"document-ready":r&&(n=(0,f.vk)(r.timestamp,(0,f.nx)()));break;case"recorder-settled":r&&(o=(0,f.vk)(r.timestamp,(0,f.nx)()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":i(),r&&(0,g.Gk)("Recorder init metrics",{metrics:(t=r.forced,a=o,s=(0,f.vk)(r.timestamp,(0,f.nx)()),l=e.type,c=n,{forced:t,loadRecorderModuleDuration:a,recorderInitDuration:s,result:l,waitForDocReadyDuration:c})})}var t,a,s,l,c})}(l,d);const p=async i=>{d.notify({type:"start",forced:i});const[s]=await Promise.all([k(d,{type:"recorder-settled"},o()),k(d,{type:"document-ready"},(0,E.N)(e,"interactive"))]);if(2!==u)return void d.notify({type:"aborted"});if(!s)return u=0,void d.notify({type:"recorder-load-failed"});const f=a();if(!f)return u=0,void d.notify({type:"deflate-encoder-load-failed"});({stop:c}=s(t,e,r,n,f,l)),u=3,d.notify({type:"succeeded"})};function h(e){const t=r.findTrackedSession();if(function(e,t){return!e||0===e.sessionReplay&&(!t||!t.force)}(t,e))return void(u=1);if(function(e){return 2===e||3===e}(u))return;u=2;const n=function(e,t){return t&&t.force&&0===e.sessionReplay}(t,e)||!1;p(n).catch(T.Dx),n&&r.setForcedReplay()}function m(){3===u&&(null==c||c()),u=0}return{start:h,stop:m,getSessionReplayLink:()=>function(e,t,r,n){const o=t.findTrackedSession(),a=function(e,t){return S()?e?0===e.sessionReplay?"incorrect-session-plan":t?void 0:"replay-not-started":"rum-not-tracked":"browser-not-supported"}(o,n),s=r.findView();return(0,i.dx)(e,{viewContext:s,errorType:a,session:o})}(e,r,n,0!==u),isRecording:()=>3===u}}async function k(e,t,r){try{return await r}finally{e.notify(t)}}async function M(){return(await r.e(777).then(r.bind(r,"rvgI"))).startRecording}var R=r("Ig5h");async function P(){return(await r.e(12).then(r.bind(r,"464S"))).createRumProfiler}const O=function(e){if((0,a.d0)()&&!(0,a.Ww)("records")||!S())return{start:s.l,stop:s.l,getReplayStats:()=>{},onRumStart:s.l,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:t,shouldStartImmediately:r}=function(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:s.l},shouldStartImmediately:t=>1===e||0===e&&!t.startSessionReplayRecordingManually}}();return{start:e=>t.start(e),stop:()=>t.stop(),getSessionReplayLink:()=>t.getSessionReplayLink(),onRumStart:function(n,o,i,a,s,l){let c;t=I(o,n,i,a,e,function(){return c||(null!=s||(s=x(o,"Datadog Session Replay",()=>t.stop())),s&&(c=d(o,s,1))),c},l),r(o)&&t.start()},isRecording:()=>3===w()&&t.isRecording(),getReplayStats:e=>3===w()?(0,l.lv)(e):void 0}}(async function(){try{return await(0,p.B)(M)()}catch(e){y({error:e,source:"Recorder",scriptType:"module"})}}),D=function(){let e;return{onRumStart:function(t,r,n,a,s,l){const c=a.findTrackedSession();if(!c)return;if(!(0,i.$5)(c.id,n.profilingSampleRate))return;const u=function(e){let t={status:"starting"};return e.register(0,({eventType:e})=>e!==i.bb.VIEW&&e!==i.bb.LONG_TASK&&e!==i.bb.ACTION&&e!==i.bb.VITAL?R.$O:{type:e,_dd:{profiling:t}}),{get:()=>t,set:e=>{t=e}}}(r);void 0!==(0,o.VZ)().Profiler?async function(){try{return await(0,p.B)(P)()}catch(e){y({error:e,source:"Profiler",scriptType:"module"})}}().then(r=>{r?(e=r(n,t,a,u,l,s,void 0),e.start()):u.set({status:"error",error_reason:"failed-to-lazy-load"})}).catch(T.Dx):u.set({status:"error",error_reason:"not-supported-by-browser"})},stop:()=>{null==e||e.stop()}}}(),L=(0,i.AB)(O,D,{startDeflateWorker:x,createDeflateEncoder:d,sdkName:"rum"});(0,n.Z)((0,o.VZ)(),"DD_RUM",L)},EwZD(e,t,r){"use strict";r.d(t,{A:()=>ne});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?u(_,--v):0,g--,10===b&&(g=1,m--),b}function S(){return b=v2||I(b)>3?"":" "}function O(e,t){for(;--t&&S()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return T(e,E()+(t<6&&32==C()&&32==S()))}function D(e){for(;S();)switch(b){case e:return v;case 34:case 39:34!==e&&39!==e&&D(b);break;case 40:41===e&&D(e);break;case 92:S()}return v}function L(e,t){for(;S()&&e+b!==57&&(e+b!==84||47!==C()););return"/*"+T(t,v-1)+"*"+i(47===e?e:S())}function N(e){for(;!I(C());)S();return T(e,v)}var F="-ms-",z="-moz-",B="-webkit-",j="comm",$="rule",U="decl",V="@keyframes";function H(e,t){for(var r="",n=p(e),o=0;o0&&f(z)-y&&h(b>32?X(z+";",n,r,y-1):X(l(z," ","")+";",n,r,y-2),p);break;case 59:z+=";";default:if(h(F=Z(z,t,r,m,g,o,d,k,M=[],D=[],y),a),123===I)if(0===g)q(z,t,F,F,M,a,y,d,D);else switch(99===v&&110===u(z,3)?100:v){case 100:case 108:case 109:case 115:q(e,F,F,n&&h(Z(e,F,F,0,0,o,d,k,o,M=[],y),D),o,D,y,d,n?M:D);break;default:q(z,F,F,F,[""],D,0,d,D)}}m=g=b=0,x=T=1,k=z="",y=s;break;case 58:y=1+f(z),b=_;default:if(x<1)if(123==I)--x;else if(125==I&&0==x++&&125==A())continue;switch(z+=i(I),I*x){case 38:T=g>0?1:(z+="\f",-1);break;case 44:d[m++]=(f(z)-1)*T,T=1;break;case 64:45===C()&&(z+=R(S())),v=C(),g=y=f(k=z+=N(E())),I++;break;case 45:45===_&&2==f(z)&&(x=0)}}return a}function Z(e,t,r,n,i,a,c,u,f,h,m){for(var g=i-1,y=0===i?a:[""],v=p(y),b=0,_=0,w=0;b0?y[A]+" "+S:l(S,/&\f/g,y[A])))&&(f[w++]=C);return x(e,t,r,0===i?$:u,f,h,m)}function Y(e,t,r){return x(e,t,r,j,i(b),d(e,2,-2),0)}function X(e,t,r,n){return x(e,t,r,U,d(e,0,n),d(e,n+1,-1),n)}var K=function(e,t,r){for(var n=0,o=0;n=o,o=C(),38===n&&12===o&&(t[r]=1),!I(o);)S();return T(e,v)},J=new WeakMap,Q=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(r))&&!n){J.set(e,!0);for(var o=[],a=function(e,t){return M(function(e,t){var r=-1,n=44;do{switch(I(n)){case 0:38===n&&12===C()&&(t[r]=1),e[r]+=K(v-1,t,r);break;case 2:e[r]+=R(n);break;case 4:if(44===n){e[++r]=58===C()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=i(n)}}while(n=S());return e}(k(e),t))}(t,o),s=r.props,l=0,c=0;l6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+z+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?te(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,f(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+B)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===u(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+F+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return B+e+F+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+F+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+F+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+F+e+e}return e}var re=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case U:e.return=te(e.value,e.length);break;case V:return H([w(e,{value:l(e.value,"@","@"+B)})],n);case $:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return H([w(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return H([w(e,{props:[l(t,/:(plac\w+)/,":"+B+"input-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,F+"input-$1")]})],n)}return""})}}],ne=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var o,i,a=e.stylisPlugins||re,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;ri});var n=r("fezH"),o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=(0,n.A)(function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})},fezH(e,t,r){"use strict";function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}r.d(t,{A:()=>n})},m4uV(e,t,r){"use strict";r.d(t,{C:()=>c,E:()=>g,T:()=>d,c:()=>h,h:()=>f,w:()=>u});var n=r("q1tI"),o=r("EwZD"),i=r("eVQB"),a=r("zd00"),s=r("xLBD"),l=n.createContext("undefined"!=typeof HTMLElement?(0,o.A)({key:"css"}):null),c=l.Provider,u=function(e){return(0,n.forwardRef)(function(t,r){var o=(0,n.useContext)(l);return e(t,o,r)})},d=n.createContext({}),f={}.hasOwnProperty,p="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",h=function(e,t){var r={};for(var n in t)f.call(t,n)&&(r[n]=t[n]);return r[p]=e,r},m=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,i.SF)(t,r,n),(0,s.s)(function(){return(0,i.sk)(t,r,n)}),null},g=u(function(e,t,r){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var s=e[p],l=[o],c="";"string"==typeof e.className?c=(0,i.Rk)(t.registered,l,e.className):null!=e.className&&(c=e.className+" ");var u=(0,a.J)(l,void 0,n.useContext(d));c+=t.key+"-"+u.name;var h={};for(var g in e)f.call(e,g)&&"css"!==g&&g!==p&&(h[g]=e[g]);return h.className=c,r&&(h.ref=r),n.createElement(n.Fragment,null,n.createElement(m,{cache:t,serialized:u,isStringTag:"string"==typeof s}),n.createElement(s,h))})},AeFk(e,t,r){"use strict";r.d(t,{AH:()=>f,i7:()=>p,mL:()=>d});var n,o,i=r("m4uV"),a=r("q1tI"),s=r("eVQB"),l=r("xLBD"),c=r("zd00"),u=(r("EwZD"),r("2mql"),function(e,t){var r=arguments;if(null==t||!i.h.call(t,"css"))return a.createElement.apply(void 0,r);var n=r.length,o=new Array(n);o[0]=i.E,o[1]=(0,i.c)(e,t);for(var s=2;sh});var n={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=r("fezH"),i=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},c=(0,o.A)(function(e){return s(e)?e:e.replace(i,"-$&").toLowerCase()}),u=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,function(e,t,r){return f={name:t,styles:r,next:f},t})}return 1===n[e]||s(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,r){if(null==r)return"";var n=r;if(void 0!==n.__emotion_styles)return n;switch(typeof r){case"boolean":return"";case"object":var o=r;if(1===o.anim)return f={name:o.name,styles:o.styles,next:f},o.name;var i=r;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)f={name:a.name,styles:a.styles,next:f},a=a.next;return i.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:f}}},xLBD(e,t,r){"use strict";var n;r.d(t,{i:()=>s,s:()=>a});var o=r("q1tI"),i=!!(n||(n=r.t(o,2))).useInsertionEffect&&(n||(n=r.t(o,2))).useInsertionEffect,a=i||function(e){return e()},s=i||o.useLayoutEffect},eVQB(e,t,r){"use strict";function n(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(e[r]+";"):r&&(n+=r+" ")}),n}r.d(t,{Rk:()=>n,SF:()=>o,sk:()=>i});var o=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},i=function(e,t,r){o(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},"5uKZ"(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")},VPSz(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline")},UpJP(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10h5v-2h-5c-4.34 0-8-3.66-8-8s3.66-8 8-8 8 3.66 8 8v1.43c0 .79-.71 1.57-1.5 1.57s-1.5-.78-1.5-1.57V12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5c1.38 0 2.64-.56 3.54-1.47.65.89 1.77 1.47 2.96 1.47 1.97 0 3.5-1.6 3.5-3.57V12c0-5.52-4.48-10-10-10m0 13c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3"}),"AlternateEmail")},"5zhj"(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},pso9(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown")},A1HJ(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp")},ByUY(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 7V3H2v18h20V7zM6 19H4v-2h2zm0-4H4v-2h2zm0-4H4V9h2zm0-4H4V5h2zm4 12H8v-2h2zm0-4H8v-2h2zm0-4H8V9h2zm0-4H8V5h2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8zm-2-8h-2v2h2zm0 4h-2v2h2z"}),"Business")},OwGX(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel")},PivD(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined")},WZMm(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H6l-2 2V4h16z"}),"ChatBubbleOutline")},MLTJ(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M22 7h-9v2h9zm0 8h-9v2h9zM5.54 11 2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}),"Checklist")},"+kmO"(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear")},H6AK(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},NQch(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"CloudUploadOutlined")},zTT9(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy")},"2eRf"(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline")},Omwb(e,t,r){"use strict";var n=r("JMD1");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r("jelL")),i=r("nKUr");t.default=(0,o.default)((0,i.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord")},"4CZ7"(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11zM8 21V7h6v5h5v9z"}),"FileCopyOutlined")},iZN0(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M11 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2M5 18c.2-.63 2.57-1.68 4.96-1.94l2.04-2c-.39-.04-.68-.06-1-.06-2.67 0-8 1.34-8 4v2h9l-2-2zm15.6-5.5-5.13 5.17-2.07-2.08L12 17l3.47 3.5L22 13.91z"}),"HowToRegOutlined")},AaLx(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79zm9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75zM7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1"}),"LocalPhoneOutlined")},M9bS(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)([(0,i.jsx)("path",{d:"M17 7h2v2h-2zm0 4h2v2h-2zm0 4h2v2h-2zM1 11v10h6v-5h2v5h6V11L8 6zm12 8h-2v-5H5v5H3v-7l5-3.5 5 3.5z"},"0"),(0,i.jsx)("path",{d:"M10 3v1.97l2 1.43V5h9v14h-4v2h6V3z"},"1")],"MapsHomeWorkOutlined")},QUIK(e,t,r){"use strict";var n=r("JMD1");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r("jelL")),i=r("nKUr");t.default=(0,o.default)((0,i.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore")},nEB7(e,t,r){"use strict";var n=r("JMD1");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r("jelL")),i=r("nKUr");t.default=(0,o.default)((0,i.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext")},MMUX(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M13 8c0-2.21-1.79-4-4-4S5 5.79 5 8s1.79 4 4 4 4-1.79 4-4m-2 0c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2M1 18v2h16v-2c0-2.66-5.33-4-8-4s-8 1.34-8 4m2 0c.2-.71 3.3-2 6-2 2.69 0 5.78 1.28 6 2zm17-3v-3h3v-2h-3V7h-2v3h-3v2h3v3z"}),"PersonAddAlt")},iasa(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"}),"PersonOutline")},sQkp(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"Place")},LUv1(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow")},stHU(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M7 11v2h10v-2zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"RemoveCircleOutline")},"1LPE"(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 6.5c3.79 0 7.17 2.13 8.82 5.5-1.65 3.37-5.02 5.5-8.82 5.5S4.83 15.37 3.18 12C4.83 8.63 8.21 6.5 12 6.5m0-2C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5m0 5c1.38 0 2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5-2.5-1.12-2.5-2.5 1.12-2.5 2.5-2.5m0-2c-2.48 0-4.5 2.02-4.5 4.5s2.02 4.5 4.5 4.5 4.5-2.02 4.5-4.5-2.02-4.5-4.5-4.5"}),"RemoveRedEyeOutlined")},Nb3f(e,t,r){"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search")},"0S3V"(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)([(0,o.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,o.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime")},MBYA(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown")},"rT/t"(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp")},XpBv(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined")},ndO2(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutlineOutlined")},"9UmJ"(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79zm9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75zM7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1"}),"LocalPhoneOutlined")},jVY6(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonAdd")},"8k4i"(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"}),"PhoneIphone")},jelL(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r("dzX4")},vZhi(e,t,r){"use strict";r.d(t,{A:()=>w});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("xeev"),s=r("DSU1"),l=r("aGM9"),c=r("Vn7y"),u=r("W9AN"),d=r("5I82"),f=r("bann"),p=r("yXLF"),h=r("d70t"),m=r("TkYO");function g(e){return(0,m.Ay)("MuiLoadingButton",e)}const y=(0,r("PYeY").A)("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var v=r("nKUr");const b=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],_=(0,c.Ay)(d.A,{shouldForwardProp:e=>(e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e)(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${y.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${y.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>(0,o.A)({[`& .${y.startIconLoadingStart}, & .${y.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${y.loading}`]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${y.startIconLoadingStart}, & .${y.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${y.startIconLoadingStart}, & .${y.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),x=(0,c.Ay)("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.loadingIndicator,t[`loadingIndicator${(0,a.A)(r.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>(0,o.A)({position:"absolute",visibility:"visible",display:"flex"},"start"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{left:"small"===t.size?10:14},"start"===t.loadingPosition&&"text"===t.variant&&{left:6},"center"===t.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},"end"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{right:"small"===t.size?10:14},"end"===t.loadingPosition&&"text"===t.variant&&{right:6},"start"===t.loadingPosition&&t.fullWidth&&{position:"relative",left:-10},"end"===t.loadingPosition&&t.fullWidth&&{position:"relative",right:-10})),w=i.forwardRef(function(e,t){const r=i.useContext(f.A),c=(0,h.A)(r,e),d=(0,u.b)({props:c,name:"MuiLoadingButton"}),{children:m,disabled:y=!1,id:w,loading:A=!1,loadingIndicator:S,loadingPosition:C="center",variant:E="text"}=d,T=(0,n.A)(d,b),I=(0,s.A)(w),k=null!=S?S:(0,v.jsx)(p.A,{"aria-labelledby":I,color:"inherit",size:16}),M=(0,o.A)({},d,{disabled:y,loading:A,loadingIndicator:k,loadingPosition:C,variant:E}),R=(e=>{const{loading:t,loadingPosition:r,classes:n}=e,i={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${(0,a.A)(r)}`],endIcon:[t&&`endIconLoading${(0,a.A)(r)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${(0,a.A)(r)}`]},s=(0,l.A)(i,g,n);return(0,o.A)({},n,s)})(M),P=A?(0,v.jsx)(x,{className:R.loadingIndicator,ownerState:M,children:k}):null;return(0,v.jsxs)(_,(0,o.A)({disabled:y||A,id:I,ref:t},T,{variant:E,classes:R,ownerState:M,children:["end"===M.loadingPosition?m:P,"end"===M.loadingPosition?P:m]}))})},FCQL(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("tCRK"),u=r("Hggz"),d=r("TkYO");function f(e){return(0,d.Ay)("MuiTimeline",e)}(0,r("PYeY").A)("MuiTimeline",["root","positionLeft","positionRight","positionAlternate","positionAlternateReverse"]);var p=r("TQpw"),h=r("nKUr");const m=["position","className"],g=(0,l.Ay)("ul",{name:"MuiTimeline",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.position&&t[(0,p.A)(r.position)]]}})({display:"flex",flexDirection:"column",padding:"6px 16px",flexGrow:1}),y=i.forwardRef(function(e,t){const r=(0,c.A)({props:e,name:"MuiTimeline"}),{position:l="right",className:d}=r,y=(0,o.A)(r,m),v=(0,n.A)({},r,{position:l}),b=(e=>{const{position:t,classes:r}=e,n={root:["root",t&&(0,p.A)(t)]};return(0,s.A)(n,f,r)})(v),_=i.useMemo(()=>({position:l}),[l]);return(0,h.jsx)(u.A.Provider,{value:_,children:(0,h.jsx)(g,(0,n.A)({className:(0,a.A)(b.root,d),ownerState:v,ref:t},y))})})},Hggz(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext({})},hj7j(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("tCRK"),u=r("TkYO");function d(e){return(0,u.Ay)("MuiTimelineConnector",e)}(0,r("PYeY").A)("MuiTimelineConnector",["root"]);var f=r("nKUr");const p=["className"],h=(0,l.Ay)("span",{name:"MuiTimelineConnector",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.grey[400],flexGrow:1})),m=i.forwardRef(function(e,t){const r=(0,c.A)({props:e,name:"MuiTimelineConnector"}),{className:i}=r,l=(0,o.A)(r,p),u=r,m=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d,t)})(u);return(0,f.jsx)(h,(0,n.A)({className:(0,a.A)(m.root,i),ownerState:u,ref:t},l))})},xrqJ(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("tCRK"),l=r("Vn7y"),c=r("aGM9"),u=r("Gqia"),d=r("Hggz"),f=r("ZKBN"),p=r("TQpw"),h=r("nKUr");const m=["className"],g=(0,l.Ay)(u.A,{name:"MuiTimelineContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[(0,p.A)(r.position)]]}})(({ownerState:e})=>(0,o.A)({flex:1,padding:"6px 16px",textAlign:"left"},"left"===e.position&&{textAlign:"right"})),y=i.forwardRef(function(e,t){const r=(0,s.A)({props:e,name:"MuiTimelineContent"}),{className:l}=r,u=(0,n.A)(r,m),{position:y}=i.useContext(d.A),v=(0,o.A)({},r,{position:y||"right"}),b=(e=>{const{position:t,classes:r}=e,n={root:["root",(0,p.A)(t)]};return(0,c.A)(n,f.J,r)})(v);return(0,h.jsx)(g,(0,o.A)({component:"div",className:(0,a.A)(b.root,l),ownerState:v,ref:t},u))})},ZKBN(e,t,r){"use strict";r.d(t,{A:()=>i,J:()=>o});var n=r("TkYO");function o(e){return(0,n.Ay)("MuiTimelineContent",e)}const i=(0,r("PYeY").A)("MuiTimelineContent",["root","positionLeft","positionRight","positionAlternate","positionAlternateReverse"])},T4Oe(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("Vn7y"),l=r("tCRK"),c=r("xeev"),u=r("aGM9"),d=r("TkYO");function f(e){return(0,d.Ay)("MuiTimelineDot",e)}(0,r("PYeY").A)("MuiTimelineDot",["root","filled","outlined","filledGrey","outlinedGrey","filledPrimary","outlinedPrimary","filledSecondary","outlinedSecondary"]);var p=r("nKUr");const h=["className","color","variant"],m=(0,s.Ay)("span",{name:"MuiTimelineDot",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t["inherit"!==r.color&&`${r.variant}${(0,c.A)(r.color)}`],t[r.variant]]}})(({ownerState:e,theme:t})=>(0,o.A)({display:"flex",alignSelf:"baseline",borderStyle:"solid",borderWidth:2,padding:4,borderRadius:"50%",boxShadow:(t.vars||t).shadows[1],margin:"11.5px 0"},"filled"===e.variant&&(0,o.A)({borderColor:"transparent"},"inherit"!==e.color&&(0,o.A)({},"grey"===e.color?{color:(t.vars||t).palette.grey[50],backgroundColor:(t.vars||t).palette.grey[400]}:{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main})),"outlined"===e.variant&&(0,o.A)({boxShadow:"none",backgroundColor:"transparent"},"inherit"!==e.color&&(0,o.A)({},"grey"===e.color?{borderColor:(t.vars||t).palette.grey[400]}:{borderColor:(t.vars||t).palette[e.color].main})))),g=i.forwardRef(function(e,t){const r=(0,l.A)({props:e,name:"MuiTimelineDot"}),{className:i,color:s="grey",variant:d="filled"}=r,g=(0,n.A)(r,h),y=(0,o.A)({},r,{color:s,variant:d}),v=(e=>{const{color:t,variant:r,classes:n}=e,o={root:["root",r,"inherit"!==t&&`${r}${(0,c.A)(t)}`]};return(0,u.A)(o,f,n)})(y);return(0,p.jsx)(m,(0,o.A)({className:(0,a.A)(v.root,i),ownerState:y,ref:t},g))})},Gbc4(e,t,r){"use strict";r.d(t,{A:()=>x});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("M3M6"),l=r("Vn7y"),c=r("tCRK"),u=r("aGM9"),d=r("ZKBN"),f=r("PYeY");const p=(0,f.A)("MuiTimelineOppositeContent",["root","positionLeft","positionRight","positionAlternate","positionAlternateReverse"]);var h=r("Hggz"),m=r("TkYO");function g(e){return(0,m.Ay)("MuiTimelineItem",e)}(0,f.A)("MuiTimelineItem",["root","positionLeft","positionRight","positionAlternate","positionAlternateReverse","missingOppositeContent"]);var y=r("TQpw"),v=r("nKUr");const b=["position","className"],_=(0,l.Ay)("li",{name:"MuiTimelineItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[(0,y.A)(r.position)]]}})(({ownerState:e})=>(0,o.A)({listStyle:"none",display:"flex",position:"relative",minHeight:70},"left"===e.position&&{flexDirection:"row-reverse"},("alternate"===e.position||"alternate-reverse"===e.position)&&{[`&:nth-of-type(${"alternate"===e.position?"even":"odd"})`]:{flexDirection:"row-reverse",[`& .${d.A.root}`]:{textAlign:"right"},[`& .${p.root}`]:{textAlign:"left"}}},!e.hasOppositeContent&&{"&::before":{content:'""',flex:1,padding:"6px 16px"}})),x=i.forwardRef(function(e,t){const r=(0,c.A)({props:e,name:"MuiTimelineItem"}),{position:l,className:d}=r,f=(0,n.A)(r,b),{position:p}=i.useContext(h.A);let m=!1;i.Children.forEach(r.children,e=>{(0,s.A)(e,["TimelineOppositeContent"])&&(m=!0)});const x=(0,o.A)({},r,{position:l||p||"right",hasOppositeContent:m}),w=(e=>{const{position:t,classes:r,hasOppositeContent:n}=e,o={root:["root",(0,y.A)(t),!n&&"missingOppositeContent"]};return(0,u.A)(o,g,r)})(x),A=i.useMemo(()=>({position:x.position}),[x.position]);return(0,v.jsx)(h.A.Provider,{value:A,children:(0,v.jsx)(_,(0,o.A)({className:(0,a.A)(w.root,d),ownerState:x,ref:t},f))})})},xJGF(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("tCRK"),u=r("TkYO");function d(e){return(0,u.Ay)("MuiTimelineSeparator",e)}(0,r("PYeY").A)("MuiTimelineSeparator",["root"]);var f=r("nKUr");const p=["className"],h=(0,l.Ay)("div",{name:"MuiTimelineSeparator",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",flex:0,alignItems:"center"}),m=i.forwardRef(function(e,t){const r=(0,c.A)({props:e,name:"MuiTimelineSeparator"}),{className:i}=r,l=(0,o.A)(r,p),u=r,m=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d,t)})(u);return(0,f.jsx)(h,(0,n.A)({className:(0,a.A)(m.root,i),ownerState:u,ref:t},l))})},TQpw(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("xeev");function o(e){return"alternate-reverse"===e?"positionAlternateReverse":`position${(0,n.A)(e)}`}},aipG(e,t,r){"use strict";r.d(t,{A:()=>b});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("awfS"),d=r("G43+"),f=r("nPiN"),p=r("1vOf"),h=r("AcvT"),m=r("wDxH"),g=r("nKUr");const y=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],v=(0,l.Ay)(d.A,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${m.A.region}`]:t.region},t.root,!r.square&&t.rounded,!r.disableGutters&&t.gutters]}})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${m.A.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${m.A.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}},({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${m.A.expanded}`]:{margin:"16px 0"}}}]})),b=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiAccordion"}),{children:l,className:d,defaultExpanded:b=!1,disabled:_=!1,disableGutters:x=!1,expanded:w,onChange:A,square:S=!1,slots:C={},slotProps:E={},TransitionComponent:T,TransitionProps:I}=r,k=(0,o.A)(r,y),[M,R]=(0,p.A)({controlled:w,default:b,name:"Accordion",state:"expanded"}),P=i.useCallback(e=>{R(!M),A&&A(e,!M)},[M,A,R]),[O,...D]=i.Children.toArray(l),L=i.useMemo(()=>({expanded:M,disabled:_,disableGutters:x,toggle:P}),[M,_,x,P]),N=(0,n.A)({},r,{square:S,disabled:_,disableGutters:x,expanded:M}),F=(e=>{const{classes:t,square:r,expanded:n,disabled:o,disableGutters:i}=e,a={root:["root",!r&&"rounded",n&&"expanded",o&&"disabled",!i&&"gutters"],region:["region"]};return(0,s.A)(a,m.d,t)})(N),z=(0,n.A)({transition:T},C),B=(0,n.A)({transition:I},E),[j,$]=(0,h.A)("transition",{elementType:u.A,externalForwardedProps:{slots:z,slotProps:B},ownerState:N});return(0,g.jsxs)(v,(0,n.A)({className:(0,a.A)(F.root,d),ref:t,ownerState:N,square:S},k,{children:[(0,g.jsx)(f.A.Provider,{value:L,children:O}),(0,g.jsx)(j,(0,n.A)({in:M,timeout:"auto"},$,{children:(0,g.jsx)("div",{"aria-labelledby":O.props.id,id:O.props["aria-controls"],role:"region",className:F.region,children:D})}))]}))})},nPiN(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext({})},wDxH(e,t,r){"use strict";r.d(t,{A:()=>a,d:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAccordion",e)}const a=(0,n.A)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"])},fQ5S(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("zD2o"),d=r("nKUr");const f=["className"],p=(0,l.Ay)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(1,2,2)})),h=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiAccordionDetails"}),{className:i}=r,l=(0,o.A)(r,f),h=r,m=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},u.n,t)})(h);return(0,d.jsx)(p,(0,n.A)({className:(0,a.A)(m.root,i),ref:t,ownerState:h},l))})},zD2o(e,t,r){"use strict";r.d(t,{A:()=>a,n:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAccordionDetails",e)}const a=(0,n.A)("MuiAccordionDetails",["root"])},"1MYv"(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("+8pU"),d=r("nPiN"),f=r("33M2"),p=r("nKUr");const h=["children","className","expandIcon","focusVisibleClassName","onClick"],m=(0,l.Ay)(u.A,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${f.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${f.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${f.A.disabled})`]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{[`&.${f.A.expanded}`]:{minHeight:64}}}]}}),g=(0,l.Ay)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${f.A.expanded}`]:{margin:"20px 0"}}}]})),y=(0,l.Ay)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${f.A.expanded}`]:{transform:"rotate(180deg)"}})),v=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiAccordionSummary"}),{children:l,className:u,expandIcon:v,focusVisibleClassName:b,onClick:_}=r,x=(0,o.A)(r,h),{disabled:w=!1,disableGutters:A,expanded:S,toggle:C}=i.useContext(d.A),E=(0,n.A)({},r,{expanded:S,disabled:w,disableGutters:A}),T=(e=>{const{classes:t,expanded:r,disabled:n,disableGutters:o}=e,i={root:["root",r&&"expanded",n&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",r&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",r&&"expanded"]};return(0,s.A)(i,f.T,t)})(E);return(0,p.jsxs)(m,(0,n.A)({focusRipple:!1,disableRipple:!0,disabled:w,component:"div","aria-expanded":S,className:(0,a.A)(T.root,u),focusVisibleClassName:(0,a.A)(T.focusVisible,b),onClick:e=>{C&&C(e),_&&_(e)},ref:t,ownerState:E},x,{children:[(0,p.jsx)(g,{className:T.content,ownerState:E,children:l}),v&&(0,p.jsx)(y,{className:T.expandIconWrapper,ownerState:E,children:v})]}))})},"33M2"(e,t,r){"use strict";r.d(t,{A:()=>a,T:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAccordionSummary",e)}const a=(0,n.A)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"])},gwor(e,t,r){"use strict";r.d(t,{A:()=>k});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("W9AN"),d=r("AcvT"),f=r("xeev"),p=r("G43+"),h=r("0g/e"),m=r("OGDC"),g=r("M7pN"),y=r("nKUr");const v=(0,g.A)((0,y.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),b=(0,g.A)((0,y.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),_=(0,g.A)((0,y.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),x=(0,g.A)((0,y.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined");var w=r("2i9d");const A=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],S=(0,c.Ay)(p.A,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,f.A)(r.color||r.severity)}`]]}})(({theme:e})=>{const t="light"===e.palette.mode?l.e$:l.a,r="light"===e.palette.mode?l.a:l.e$;return(0,o.A)({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(([,e])=>e.main&&e.light).map(([n])=>({props:{colorSeverity:n,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${n}StandardBg`]:r(e.palette[n].light,.9),[`& .${h.A.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(([,e])=>e.main&&e.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${h.A.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,e])=>e.main&&e.dark).map(([t])=>({props:{colorSeverity:t,variant:"filled"},style:(0,o.A)({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)})}))]})}),C=(0,c.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),E=(0,c.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),T=(0,c.Ay)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),I={success:(0,y.jsx)(v,{fontSize:"inherit"}),warning:(0,y.jsx)(b,{fontSize:"inherit"}),error:(0,y.jsx)(_,{fontSize:"inherit"}),info:(0,y.jsx)(x,{fontSize:"inherit"})},k=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiAlert"}),{action:i,children:l,className:c,closeText:p="Close",color:g,components:v={},componentsProps:b={},icon:_,iconMapping:x=I,onClose:k,role:M="alert",severity:R="success",slotProps:P={},slots:O={},variant:D="standard"}=r,L=(0,n.A)(r,A),N=(0,o.A)({},r,{color:g,severity:R,variant:D,colorSeverity:g||R}),F=(e=>{const{variant:t,color:r,severity:n,classes:o}=e,i={root:["root",`color${(0,f.A)(r||n)}`,`${t}${(0,f.A)(r||n)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,s.A)(i,h.X,o)})(N),z={slots:(0,o.A)({closeButton:v.CloseButton,closeIcon:v.CloseIcon},O),slotProps:(0,o.A)({},b,P)},[B,j]=(0,d.A)("closeButton",{elementType:m.A,externalForwardedProps:z,ownerState:N}),[$,U]=(0,d.A)("closeIcon",{elementType:w.A,externalForwardedProps:z,ownerState:N});return(0,y.jsxs)(S,(0,o.A)({role:M,elevation:0,ownerState:N,className:(0,a.A)(F.root,c),ref:t},L,{children:[!1!==_?(0,y.jsx)(C,{ownerState:N,className:F.icon,children:_||x[R]||I[R]}):null,(0,y.jsx)(E,{ownerState:N,className:F.message,children:l}),null!=i?(0,y.jsx)(T,{ownerState:N,className:F.action,children:i}):null,null==i&&k?(0,y.jsx)(T,{ownerState:N,className:F.action,children:(0,y.jsx)(B,(0,o.A)({size:"small","aria-label":p,title:p,color:"inherit",onClick:k},j,{children:(0,y.jsx)($,(0,o.A)({fontSize:"small"},U))}))}):null]}))})},"0g/e"(e,t,r){"use strict";r.d(t,{A:()=>a,X:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAlert",e)}const a=(0,n.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"])},rzlW(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("Gqia"),d=r("SKrR"),f=r("nKUr");const p=["className"],h=(0,l.Ay)(u.A,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2})),m=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiAlertTitle"}),{className:i}=r,l=(0,o.A)(r,p),u=r,m=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.x,t)})(u);return(0,f.jsx)(h,(0,n.A)({gutterBottom:!0,component:"div",ownerState:u,ref:t,className:(0,a.A)(m.root,i)},l))})},SKrR(e,t,r){"use strict";r.d(t,{A:()=>a,x:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAlertTitle",e)}const a=(0,n.A)("MuiAlertTitle",["root"])},"8cYg"(e,t,r){"use strict";r.d(t,{A:()=>H});var n,o,i=r("Nlia"),a=r("+9dH"),s=r("q1tI"),l=r("juqV"),c=r("aGM9"),u=r("dcYk"),d=r("RI6h"),f=r("usZy"),p=r("BkAX"),h=r("G43+"),m=r("OGDC"),g=r("Ifci"),y=r("Zqw4"),v=r("G5wc"),b=r("y9Q0"),_=r("XYkD"),x=r("2i9d"),w=r("smxg"),A=r("Vn7y"),S=r("W9AN"),C=r("zkiJ"),E=r("xeev"),T=r("ZfBw"),I=r("nKUr");const k=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],M=["ref"],R=["key"],P=["key"],O=(0,A.Ay)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{fullWidth:n,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=r;return[{[`& .${C.A.tag}`]:t.tag},{[`& .${C.A.tag}`]:t[`tagSize${(0,E.A)(s)}`]},{[`& .${C.A.inputRoot}`]:t.inputRoot},{[`& .${C.A.input}`]:t.input},{[`& .${C.A.input}`]:a&&t.inputFocused},t.root,n&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${C.A.focused} .${C.A.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${C.A.clearIndicator}`]:{visibility:"visible"}},[`& .${C.A.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${C.A.inputRoot}`]:{[`.${C.A.hasPopupIcon}&, .${C.A.hasClearIcon}&`]:{paddingRight:30},[`.${C.A.hasPopupIcon}.${C.A.hasClearIcon}&`]:{paddingRight:56},[`& .${C.A.input}`]:{width:0,minWidth:30}},[`& .${y.A.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${y.A.root}.${v.A.sizeSmall}`]:{[`& .${y.A.input}`]:{padding:"2px 4px 3px 0"}},[`& .${b.A.root}`]:{padding:9,[`.${C.A.hasPopupIcon}&, .${C.A.hasClearIcon}&`]:{paddingRight:39},[`.${C.A.hasPopupIcon}.${C.A.hasClearIcon}&`]:{paddingRight:65},[`& .${C.A.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${C.A.endAdornment}`]:{right:9}},[`& .${b.A.root}.${v.A.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${C.A.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${_.A.root}`]:{paddingTop:19,paddingLeft:8,[`.${C.A.hasPopupIcon}&, .${C.A.hasClearIcon}&`]:{paddingRight:39},[`.${C.A.hasPopupIcon}.${C.A.hasClearIcon}&`]:{paddingRight:65},[`& .${_.A.input}`]:{padding:"7px 4px"},[`& .${C.A.endAdornment}`]:{right:9}},[`& .${_.A.root}.${v.A.sizeSmall}`]:{paddingBottom:1,[`& .${_.A.input}`]:{padding:"2.5px 4px"}},[`& .${v.A.hiddenLabel}`]:{paddingTop:8},[`& .${_.A.root}.${v.A.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${C.A.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${_.A.root}.${v.A.hiddenLabel}.${v.A.sizeSmall}`]:{[`& .${C.A.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${C.A.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${C.A.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${C.A.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${C.A.inputRoot}`]:{flexWrap:"wrap"}}}]}),D=(0,A.Ay)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),L=(0,A.Ay)(m.A,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),N=(0,A.Ay)(m.A,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>(0,a.A)({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),F=(0,A.Ay)(f.A,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${C.A.option}`]:t.option},t.popper,r.disablePortal&&t.popperDisablePortal]}})(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})),z=(0,A.Ay)(h.A,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>(0,a.A)({},e.typography.body1,{overflow:"auto"})),B=(0,A.Ay)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),j=(0,A.Ay)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),$=(0,A.Ay)("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${C.A.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${C.A.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${C.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,u.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${C.A.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,u.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${C.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,u.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),U=(0,A.Ay)(p.A,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),V=(0,A.Ay)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${C.A.option}`]:{paddingLeft:24}}),H=s.forwardRef(function(e,t){var r,u,p,m;const y=(0,S.b)({props:e,name:"MuiAutocomplete"}),{autoComplete:v=!1,autoHighlight:b=!1,autoSelect:_=!1,blurOnSelect:A=!1,ChipProps:H,className:G,clearIcon:W=n||(n=(0,I.jsx)(x.A,{fontSize:"small"})),clearOnBlur:q=!y.freeSolo,clearOnEscape:Z=!1,clearText:Y="Clear",closeText:X="Close",componentsProps:K={},defaultValue:J=(y.multiple?[]:null),disableClearable:Q=!1,disableCloseOnSelect:ee=!1,disabled:te=!1,disabledItemsFocusable:re=!1,disableListWrap:ne=!1,disablePortal:oe=!1,filterSelectedOptions:ie=!1,forcePopupIcon:ae="auto",freeSolo:se=!1,fullWidth:le=!1,getLimitTagsText:ce=e=>`+${e}`,getOptionLabel:ue,groupBy:de,handleHomeEndKeys:fe=!y.freeSolo,includeInputInList:pe=!1,limitTags:he=-1,ListboxComponent:me="ul",ListboxProps:ge,loading:ye=!1,loadingText:ve="Loading…",multiple:be=!1,noOptionsText:_e="No options",openOnFocus:xe=!1,openText:we="Open",PaperComponent:Ae=h.A,PopperComponent:Se=f.A,popupIcon:Ce=o||(o=(0,I.jsx)(w.A,{})),readOnly:Ee=!1,renderGroup:Te,renderInput:Ie,renderOption:ke,renderTags:Me,selectOnFocus:Re=!y.freeSolo,size:Pe="medium",slotProps:Oe={}}=y,De=(0,i.A)(y,k),{getRootProps:Le,getInputProps:Ne,getInputLabelProps:Fe,getPopupIndicatorProps:ze,getClearProps:Be,getTagProps:je,getListboxProps:$e,getOptionProps:Ue,value:Ve,dirty:He,expanded:Ge,id:We,popupOpen:qe,focused:Ze,focusedTag:Ye,anchorEl:Xe,setAnchorEl:Ke,inputValue:Je,groupedOptions:Qe}=(0,d.A)((0,a.A)({},y,{componentName:"Autocomplete"})),et=!Q&&!te&&He&&!Ee,tt=(!se||!0===ae)&&!1!==ae,{onMouseDown:rt}=Ne(),{ref:nt}=null!=ge?ge:{},ot=$e(),{ref:it}=ot,at=(0,i.A)(ot,M),st=(0,T.A)(it,nt),lt=ue||(e=>{var t;return null!=(t=e.label)?t:e}),ct=(0,a.A)({},y,{disablePortal:oe,expanded:Ge,focused:Ze,fullWidth:le,getOptionLabel:lt,hasClearIcon:et,hasPopupIcon:tt,inputFocused:-1===Ye,popupOpen:qe,size:Pe}),ut=(e=>{const{classes:t,disablePortal:r,expanded:n,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:d}=e,f={root:["root",n&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${(0,E.A)(d)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",r&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,c.A)(f,C.r,t)})(ct);let dt;if(be&&Ve.length>0){const e=e=>(0,a.A)({className:ut.tag,disabled:te},je(e));dt=Me?Me(Ve,e,ct):Ve.map((t,r)=>{const n=e({index:r}),{key:o}=n,s=(0,i.A)(n,R);return(0,I.jsx)(g.A,(0,a.A)({label:lt(t),size:Pe},s,H),o)})}if(he>-1&&Array.isArray(dt)){const e=dt.length-he;!Ze&&e>0&&(dt=dt.splice(0,he),dt.push((0,I.jsx)("span",{className:ut.tag,children:ce(e)},dt.length)))}const ft=Te||(e=>(0,I.jsxs)("li",{children:[(0,I.jsx)(U,{className:ut.groupLabel,ownerState:ct,component:"div",children:e.group}),(0,I.jsx)(V,{className:ut.groupUl,ownerState:ct,children:e.children})]},e.key)),pt=ke||((e,t)=>{const{key:r}=e,n=(0,i.A)(e,P);return(0,I.jsx)("li",(0,a.A)({},n,{children:lt(t)}),r)}),ht=(e,t)=>{const r=Ue({option:e,index:t});return pt((0,a.A)({},r,{className:ut.option}),e,{selected:r["aria-selected"],index:t,inputValue:Je},ct)},mt=null!=(r=Oe.clearIndicator)?r:K.clearIndicator,gt=null!=(u=Oe.paper)?u:K.paper,yt=null!=(p=Oe.popper)?p:K.popper,vt=null!=(m=Oe.popupIndicator)?m:K.popupIndicator;return(0,I.jsxs)(s.Fragment,{children:[(0,I.jsx)(O,(0,a.A)({ref:t,className:(0,l.A)(ut.root,G),ownerState:ct},Le(De),{children:Ie({id:We,disabled:te,fullWidth:!0,size:"small"===Pe?"small":void 0,InputLabelProps:Fe(),InputProps:(0,a.A)({ref:Ke,className:ut.inputRoot,startAdornment:dt,onClick:e=>{e.target===e.currentTarget&&rt(e)}},(et||tt)&&{endAdornment:(0,I.jsxs)(D,{className:ut.endAdornment,ownerState:ct,children:[et?(0,I.jsx)(L,(0,a.A)({},Be(),{"aria-label":Y,title:Y,ownerState:ct},mt,{className:(0,l.A)(ut.clearIndicator,null==mt?void 0:mt.className),children:W})):null,tt?(0,I.jsx)(N,(0,a.A)({},ze(),{disabled:te,"aria-label":qe?X:we,title:qe?X:we,ownerState:ct},vt,{className:(0,l.A)(ut.popupIndicator,null==vt?void 0:vt.className),children:Ce})):null]})}),inputProps:(0,a.A)({className:ut.input,disabled:te,readOnly:Ee},Ne())})})),Xe?(0,I.jsx)(F,(0,a.A)({as:Se,disablePortal:oe,style:{width:Xe?Xe.clientWidth:null},ownerState:ct,role:"presentation",anchorEl:Xe,open:qe},yt,{className:(0,l.A)(ut.popper,null==yt?void 0:yt.className),children:(0,I.jsxs)(z,(0,a.A)({ownerState:ct,as:Ae},gt,{className:(0,l.A)(ut.paper,null==gt?void 0:gt.className),children:[ye&&0===Qe.length?(0,I.jsx)(B,{className:ut.loading,ownerState:ct,children:ve}):null,0!==Qe.length||se||ye?null:(0,I.jsx)(j,{className:ut.noOptions,ownerState:ct,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:_e}),Qe.length>0?(0,I.jsx)($,(0,a.A)({as:me,className:ut.listbox,ownerState:ct},at,ge,{ref:st,children:Qe.map((e,t)=>de?ft({key:e.key,group:e.group,children:e.options.map((t,r)=>ht(t,e.index+r))}):ht(e,t))})):null]}))})):null]})})},zkiJ(e,t,r){"use strict";r.d(t,{A:()=>a,r:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAutocomplete",e)}const a=(0,n.A)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"])},PgD1(e,t,r){"use strict";r.d(t,{A:()=>b});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("M7pN"),d=r("nKUr");const f=(0,u.A)((0,d.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");var p=r("/9V9"),h=r("AcvT");const m=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],g=(0,l.Ay)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],r.colorDefault&&t.colorDefault]}})(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,o.A)({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:(0,o.A)({backgroundColor:e.palette.grey[400]},e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})))}]})),y=(0,l.Ay)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),v=(0,l.Ay)(f,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"}),b=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiAvatar"}),{alt:l,children:u,className:f,component:b="div",slots:_={},slotProps:x={},imgProps:w,sizes:A,src:S,srcSet:C,variant:E="circular"}=r,T=(0,n.A)(r,m);let I=null;const k=function({crossOrigin:e,referrerPolicy:t,src:r,srcSet:n}){const[o,a]=i.useState(!1);return i.useEffect(()=>{if(!r&&!n)return;a(!1);let o=!0;const i=new Image;return i.onload=()=>{o&&a("loaded")},i.onerror=()=>{o&&a("error")},i.crossOrigin=e,i.referrerPolicy=t,i.src=r,n&&(i.srcset=n),()=>{o=!1}},[e,t,r,n]),o}((0,o.A)({},w,{src:S,srcSet:C})),M=S||C,R=M&&"error"!==k,P=(0,o.A)({},r,{colorDefault:!R,component:b,variant:E}),O=(e=>{const{classes:t,variant:r,colorDefault:n}=e,o={root:["root",r,n&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,s.A)(o,p.k,t)})(P),[D,L]=(0,h.A)("img",{className:O.img,elementType:y,externalForwardedProps:{slots:_,slotProps:{img:(0,o.A)({},w,x.img)}},additionalProps:{alt:l,src:S,srcSet:C,sizes:A},ownerState:P});return I=R?(0,d.jsx)(D,(0,o.A)({},L)):u||0===u?u:M&&l?l[0]:(0,d.jsx)(v,{ownerState:P,className:O.fallback}),(0,d.jsx)(g,(0,o.A)({as:b,ownerState:P,className:(0,a.A)(O.root,f),ref:t},T,{children:I}))})},"/9V9"(e,t,r){"use strict";r.d(t,{A:()=>a,k:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAvatar",e)}const a=(0,n.A)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"])},FLH5(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("PgD1"),d=r("/9V9"),f=r("mFFh"),p=r("nKUr");const h=["children","className","component","componentsProps","max","renderSurplus","slotProps","spacing","total","variant"],m={small:-16,medium:null},g=(0,l.Ay)("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>(0,o.A)({[`& .${f.A.avatar}`]:t.avatar},t.root)})(({theme:e,ownerState:t})=>{const r=t.spacing&&void 0!==m[t.spacing]?m[t.spacing]:-t.spacing;return{[`& .${d.A.root}`]:{border:`2px solid ${(e.vars||e).palette.background.default}`,boxSizing:"content-box",marginLeft:null!=r?r:-8,"&:last-child":{marginLeft:0}},display:"flex",flexDirection:"row-reverse"}}),y=i.forwardRef(function(e,t){var r;const l=(0,c.b)({props:e,name:"MuiAvatarGroup"}),{children:d,className:m,component:y="div",componentsProps:v={},max:b=5,renderSurplus:_,slotProps:x={},spacing:w="medium",total:A,variant:S="circular"}=l,C=(0,n.A)(l,h);let E=b<2?2:b;const T=(0,o.A)({},l,{max:b,spacing:w,component:y,variant:S}),I=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],avatar:["avatar"]},f.n,t)})(T),k=i.Children.toArray(d).filter(e=>i.isValidElement(e)),M=A||k.length;M===E&&(E+=1),E=Math.min(M+1,E);const R=Math.min(k.length,E-1),P=Math.max(M-E,M-R,0),O=_?_(P):`+${P}`,D=null!=(r=x.additionalAvatar)?r:v.additionalAvatar;return(0,p.jsxs)(g,(0,o.A)({as:y,ownerState:T,className:(0,a.A)(I.root,m),ref:t},C,{children:[P?(0,p.jsx)(u.A,(0,o.A)({variant:S},D,{className:(0,a.A)(I.avatar,null==D?void 0:D.className),children:O})):null,k.slice(0,R).reverse().map(e=>i.cloneElement(e,{className:(0,a.A)(e.props.className,I.avatar),variant:e.props.variant||S}))]}))})},mFFh(e,t,r){"use strict";r.d(t,{A:()=>a,n:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAvatarGroup",e)}const a=(0,n.A)("MuiAvatarGroup",["root","avatar"])},"Sk+A"(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("hGmu"),d=r("/LIu"),f=r("nKUr");const p=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],h=(0,l.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>(0,o.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),m=i.forwardRef(function(e,t){var r,i,l;const m=(0,c.b)({props:e,name:"MuiBackdrop"}),{children:g,className:y,component:v="div",components:b={},componentsProps:_={},invisible:x=!1,open:w,slotProps:A={},slots:S={},TransitionComponent:C=u.A,transitionDuration:E}=m,T=(0,n.A)(m,p),I=(0,o.A)({},m,{component:v,invisible:x}),k=(e=>{const{classes:t,invisible:r}=e,n={root:["root",r&&"invisible"]};return(0,s.A)(n,d.R,t)})(I),M=null!=(r=A.root)?r:_.root;return(0,f.jsx)(C,(0,o.A)({in:w,timeout:E},T,{children:(0,f.jsx)(h,(0,o.A)({"aria-hidden":!0},M,{as:null!=(i=null!=(l=S.root)?l:b.Root)?i:v,className:(0,a.A)(k.root,y,null==M?void 0:M.className),ownerState:(0,o.A)({},I,null==M?void 0:M.ownerState),classes:k,ref:t,children:g}))}))})},"/LIu"(e,t,r){"use strict";r.d(t,{A:()=>a,R:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiBackdrop",e)}const a=(0,n.A)("MuiBackdrop",["root","invisible"])},"Ow/F"(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("VGa/"),l=r("aGM9"),c=r("0Ydi");var u=r("Vn7y"),d=r("W9AN"),f=r("xeev"),p=r("k30w"),h=r("nKUr");const m=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],g=(0,u.Ay)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),y=(0,u.Ay)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.badge,t[r.variant],t[`anchorOrigin${(0,f.A)(r.anchorOrigin.vertical)}${(0,f.A)(r.anchorOrigin.horizontal)}${(0,f.A)(r.overlap)}`],"default"!==r.color&&t[`color${(0,f.A)(r.color)}`],r.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(t=e.vars)?t:e).palette).filter(t=>{var r,n;return(null!=(r=e.vars)?r:e).palette[t].main&&(null!=(n=e.vars)?n:e).palette[t].contrastText}).map(t=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),v=i.forwardRef(function(e,t){var r,i,u,v,b,_;const x=(0,d.b)({props:e,name:"MuiBadge"}),{anchorOrigin:w={vertical:"top",horizontal:"right"},className:A,component:S,components:C={},componentsProps:E={},children:T,overlap:I="rectangular",color:k="default",invisible:M=!1,max:R=99,badgeContent:P,slots:O,slotProps:D,showZero:L=!1,variant:N="standard"}=x,F=(0,o.A)(x,m),{badgeContent:z,invisible:B,max:j,displayValue:$}=function(e){const{badgeContent:t,invisible:r=!1,max:n=99,showZero:o=!1}=e,i=(0,s.A)({badgeContent:t,max:n});let a=r;!1!==r||0!==t||o||(a=!0);const{badgeContent:l,max:c=n}=a?i:e;return{badgeContent:l,invisible:a,max:c,displayValue:l&&Number(l)>c?`${c}+`:l}}({max:R,invisible:M,badgeContent:P,showZero:L}),U=(0,s.A)({anchorOrigin:w,color:k,overlap:I,variant:N,badgeContent:P}),V=B||null==z&&"dot"!==N,{color:H=k,overlap:G=I,anchorOrigin:W=w,variant:q=N}=V?U:x,Z="dot"!==q?$:void 0,Y=(0,n.A)({},x,{badgeContent:z,invisible:V,max:j,displayValue:Z,showZero:L,anchorOrigin:W,color:H,overlap:G,variant:q}),X=(e=>{const{color:t,anchorOrigin:r,invisible:n,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,n&&"invisible",`anchorOrigin${(0,f.A)(r.vertical)}${(0,f.A)(r.horizontal)}`,`anchorOrigin${(0,f.A)(r.vertical)}${(0,f.A)(r.horizontal)}${(0,f.A)(o)}`,`overlap${(0,f.A)(o)}`,"default"!==t&&`color${(0,f.A)(t)}`]};return(0,l.A)(s,p.w,a)})(Y),K=null!=(r=null!=(i=null==O?void 0:O.root)?i:C.Root)?r:g,J=null!=(u=null!=(v=null==O?void 0:O.badge)?v:C.Badge)?u:y,Q=null!=(b=null==D?void 0:D.root)?b:E.root,ee=null!=(_=null==D?void 0:D.badge)?_:E.badge,te=(0,c.A)({elementType:K,externalSlotProps:Q,externalForwardedProps:F,additionalProps:{ref:t,as:S},ownerState:Y,className:(0,a.A)(null==Q?void 0:Q.className,X.root,A)}),re=(0,c.A)({elementType:J,externalSlotProps:ee,ownerState:Y,className:(0,a.A)(X.badge,null==ee?void 0:ee.className)});return(0,h.jsxs)(K,(0,n.A)({},te,{children:[T,(0,h.jsx)(J,(0,n.A)({},re,{children:Z}))]}))})},k30w(e,t,r){"use strict";r.d(t,{A:()=>a,w:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiBadge",e)}const a=(0,n.A)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"])},U831(e,t,r){"use strict";r.d(t,{A:()=>b});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("n+sr"),l=r("xTOY"),c=r("0kTp"),u=r("aoPf"),d=r("nKUr");const f=["className","component"];var p=r("Oory"),h=r("BlEZ"),m=r("WTO6"),g=r("ht/8");const y=(0,h.A)(),v=function(e={}){const{themeId:t,defaultTheme:r,defaultClassName:p="MuiBox-root",generateClassName:h}=e,m=(0,s.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(l.A);return i.forwardRef(function(e,i){const s=(0,u.A)(r),l=(0,c.A)(e),{className:g,component:y="div"}=l,v=(0,o.A)(l,f);return(0,d.jsx)(m,(0,n.A)({as:y,ref:i,className:(0,a.A)(g,h?h(p):p),theme:t&&s[t]||s},v))})}({themeId:m.A,defaultTheme:y,defaultClassName:g.A.root,generateClassName:p.A.generate}),b=v},"ht/8"(e,t,r){"use strict";r.d(t,{A:()=>n});const n=(0,r("PYeY").A)("MuiBox",["root"])},"5I82"(e,t,r){"use strict";r.d(t,{A:()=>S});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("d70t"),l=r("aGM9"),c=r("dcYk"),u=r("Vn7y"),d=r("XM18"),f=r("W9AN"),p=r("+8pU"),h=r("xeev"),m=r("0ANx"),g=r("bann"),y=r("6z4e"),v=r("nKUr");const b=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],_=e=>(0,o.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),x=(0,u.Ay)(p.A,{shouldForwardProp:e=>(0,d.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,h.A)(r.color)}`],t[`size${(0,h.A)(r.size)}`],t[`${r.variant}Size${(0,h.A)(r.size)}`],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var r,n;const i="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],a="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return(0,o.A)({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":(0,o.A)({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":(0,o.A)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${m.A.focusVisible}`]:(0,o.A)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${m.A.disabled}`]:(0,o.A)({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${(0,c.X4)(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(r=(n=e.palette).getContrastText)?void 0:r.call(n,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${m.A.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${m.A.disabled}`]:{boxShadow:"none"}}),w=(0,u.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${(0,h.A)(r.size)}`]]}})(({ownerState:e})=>(0,o.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},_(e))),A=(0,u.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${(0,h.A)(r.size)}`]]}})(({ownerState:e})=>(0,o.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},_(e))),S=i.forwardRef(function(e,t){const r=i.useContext(g.A),c=i.useContext(y.A),u=(0,s.A)(r,e),d=(0,f.b)({props:u,name:"MuiButton"}),{children:p,color:_="primary",component:S="button",className:C,disabled:E=!1,disableElevation:T=!1,disableFocusRipple:I=!1,endIcon:k,focusVisibleClassName:M,fullWidth:R=!1,size:P="medium",startIcon:O,type:D,variant:L="text"}=d,N=(0,n.A)(d,b),F=(0,o.A)({},d,{color:_,component:S,disabled:E,disableElevation:T,disableFocusRipple:I,fullWidth:R,size:P,type:D,variant:L}),z=(e=>{const{color:t,disableElevation:r,fullWidth:n,size:i,variant:a,classes:s}=e,c={root:["root",a,`${a}${(0,h.A)(t)}`,`size${(0,h.A)(i)}`,`${a}Size${(0,h.A)(i)}`,`color${(0,h.A)(t)}`,r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${(0,h.A)(i)}`],endIcon:["icon","endIcon",`iconSize${(0,h.A)(i)}`]},u=(0,l.A)(c,m.B,s);return(0,o.A)({},s,u)})(F),B=O&&(0,v.jsx)(w,{className:z.startIcon,ownerState:F,children:O}),j=k&&(0,v.jsx)(A,{className:z.endIcon,ownerState:F,children:k}),$=c||"";return(0,v.jsxs)(x,(0,o.A)({ownerState:F,className:(0,a.A)(r.className,z.root,C,$),component:S,disabled:E,focusRipple:!I,focusVisibleClassName:(0,a.A)(z.focusVisible,M),ref:t,type:D},N,{classes:z,children:[B,p,j]}))})},"0ANx"(e,t,r){"use strict";r.d(t,{A:()=>a,B:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiButton",e)}const a=(0,n.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"])},"+8pU"(e,t,r){"use strict";r.d(t,{A:()=>O});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("ZfBw"),d=r("KXty"),f=r("8rms"),p=r("DLU/"),h=r("AeFk"),m=r("J13E"),g=r("nKUr");var y=r("Bz0O");const v=["center","classes","className"];let b,_,x,w,A=e=>e;const S=(0,h.i7)(b||(b=A` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `)),C=(0,h.i7)(_||(_=A` 0% { opacity: 1; } 100% { opacity: 0; } `)),E=(0,h.i7)(x||(x=A` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `)),T=(0,l.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),I=(0,l.Ay)(function(e){const{className:t,classes:r,pulsate:n=!1,rippleX:o,rippleY:s,rippleSize:l,in:c,onExited:u,timeout:d}=e,[f,p]=i.useState(!1),h=(0,a.A)(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),m={width:l,height:l,top:-l/2+s,left:-l/2+o},y=(0,a.A)(r.child,f&&r.childLeaving,n&&r.childPulsate);return c||f||p(!0),i.useEffect(()=>{if(!c&&null!=u){const e=setTimeout(u,d);return()=>{clearTimeout(e)}}},[u,c,d]),(0,g.jsx)("span",{className:h,style:m,children:(0,g.jsx)("span",{className:y})})},{name:"MuiTouchRipple",slot:"Ripple"})(w||(w=A` opacity: 0; position: absolute; &.${0} { opacity: 0.3; transform: scale(1); animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } &.${0} { animation-duration: ${0}ms; } & .${0} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${0} { opacity: 0; animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } & .${0} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${0}; animation-duration: 2500ms; animation-timing-function: ${0}; animation-iteration-count: infinite; animation-delay: 200ms; } `),y.A.rippleVisible,S,550,({theme:e})=>e.transitions.easing.easeInOut,y.A.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,y.A.child,y.A.childLeaving,C,550,({theme:e})=>e.transitions.easing.easeInOut,y.A.childPulsate,E,({theme:e})=>e.transitions.easing.easeInOut),k=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiTouchRipple"}),{center:s=!1,classes:l={},className:u}=r,d=(0,o.A)(r,v),[f,h]=i.useState([]),b=i.useRef(0),_=i.useRef(null);i.useEffect(()=>{_.current&&(_.current(),_.current=null)},[f]);const x=i.useRef(!1),w=(0,m.A)(),A=i.useRef(null),S=i.useRef(null),C=i.useCallback(e=>{const{pulsate:t,rippleX:r,rippleY:n,rippleSize:o,cb:i}=e;h(e=>[...e,(0,g.jsx)(I,{classes:{ripple:(0,a.A)(l.ripple,y.A.ripple),rippleVisible:(0,a.A)(l.rippleVisible,y.A.rippleVisible),ripplePulsate:(0,a.A)(l.ripplePulsate,y.A.ripplePulsate),child:(0,a.A)(l.child,y.A.child),childLeaving:(0,a.A)(l.childLeaving,y.A.childLeaving),childPulsate:(0,a.A)(l.childPulsate,y.A.childPulsate)},timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:o},b.current)]),b.current+=1,_.current=i},[l]),E=i.useCallback((e={},t={},r=()=>{})=>{const{pulsate:n=!1,center:o=s||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&x.current)return void(x.current=!1);"touchstart"===(null==e?void 0:e.type)&&(x.current=!0);const a=i?null:S.current,l=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:r}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(r-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===A.current&&(A.current=()=>{C({pulsate:n,rippleX:c,rippleY:u,rippleSize:d,cb:r})},w.start(80,()=>{A.current&&(A.current(),A.current=null)})):C({pulsate:n,rippleX:c,rippleY:u,rippleSize:d,cb:r})},[s,C,w]),k=i.useCallback(()=>{E({},{pulsate:!0})},[E]),M=i.useCallback((e,t)=>{if(w.clear(),"touchend"===(null==e?void 0:e.type)&&A.current)return A.current(),A.current=null,void w.start(0,()=>{M(e,t)});A.current=null,h(e=>e.length>0?e.slice(1):e),_.current=t},[w]);return i.useImperativeHandle(t,()=>({pulsate:k,start:E,stop:M}),[k,E,M]),(0,g.jsx)(T,(0,n.A)({className:(0,a.A)(y.A.root,l.root,u),ref:S},d,{children:(0,g.jsx)(p.A,{component:null,exit:!0,children:f})}))});var M=r("fy4x");const R=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],P=(0,l.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${M.A.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),O=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiButtonBase"}),{action:l,centerRipple:p=!1,children:h,className:m,component:y="button",disabled:v=!1,disableRipple:b=!1,disableTouchRipple:_=!1,focusRipple:x=!1,LinkComponent:w="a",onBlur:A,onClick:S,onContextMenu:C,onDragLeave:E,onFocus:T,onFocusVisible:I,onKeyDown:O,onKeyUp:D,onMouseDown:L,onMouseLeave:N,onMouseUp:F,onTouchEnd:z,onTouchMove:B,onTouchStart:j,tabIndex:$=0,TouchRippleProps:U,touchRippleRef:V,type:H}=r,G=(0,o.A)(r,R),W=i.useRef(null),q=i.useRef(null),Z=(0,u.A)(q,V),{isFocusVisibleRef:Y,onFocus:X,onBlur:K,ref:J}=(0,f.A)(),[Q,ee]=i.useState(!1);v&&Q&&ee(!1),i.useImperativeHandle(l,()=>({focusVisible:()=>{ee(!0),W.current.focus()}}),[]);const[te,re]=i.useState(!1);i.useEffect(()=>{re(!0)},[]);const ne=te&&!b&&!v;function oe(e,t,r=_){return(0,d.A)(n=>(t&&t(n),!r&&q.current&&q.current[e](n),!0))}i.useEffect(()=>{Q&&x&&!b&&te&&q.current.pulsate()},[b,x,Q,te]);const ie=oe("start",L),ae=oe("stop",C),se=oe("stop",E),le=oe("stop",F),ce=oe("stop",e=>{Q&&e.preventDefault(),N&&N(e)}),ue=oe("start",j),de=oe("stop",z),fe=oe("stop",B),pe=oe("stop",e=>{K(e),!1===Y.current&&ee(!1),A&&A(e)},!1),he=(0,d.A)(e=>{W.current||(W.current=e.currentTarget),X(e),!0===Y.current&&(ee(!0),I&&I(e)),T&&T(e)}),me=()=>{const e=W.current;return y&&"button"!==y&&!("A"===e.tagName&&e.href)},ge=i.useRef(!1),ye=(0,d.A)(e=>{x&&!ge.current&&Q&&q.current&&" "===e.key&&(ge.current=!0,q.current.stop(e,()=>{q.current.start(e)})),e.target===e.currentTarget&&me()&&" "===e.key&&e.preventDefault(),O&&O(e),e.target===e.currentTarget&&me()&&"Enter"===e.key&&!v&&(e.preventDefault(),S&&S(e))}),ve=(0,d.A)(e=>{x&&" "===e.key&&q.current&&Q&&!e.defaultPrevented&&(ge.current=!1,q.current.stop(e,()=>{q.current.pulsate(e)})),D&&D(e),S&&e.target===e.currentTarget&&me()&&" "===e.key&&!e.defaultPrevented&&S(e)});let be=y;"button"===be&&(G.href||G.to)&&(be=w);const _e={};"button"===be?(_e.type=void 0===H?"button":H,_e.disabled=v):(G.href||G.to||(_e.role="button"),v&&(_e["aria-disabled"]=v));const xe=(0,u.A)(t,J,W),we=(0,n.A)({},r,{centerRipple:p,component:y,disabled:v,disableRipple:b,disableTouchRipple:_,focusRipple:x,tabIndex:$,focusVisible:Q}),Ae=(e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,i={root:["root",t&&"disabled",r&&"focusVisible"]},a=(0,s.A)(i,M.W,o);return r&&n&&(a.root+=` ${n}`),a})(we);return(0,g.jsxs)(P,(0,n.A)({as:be,className:(0,a.A)(Ae.root,m),ownerState:we,onBlur:pe,onClick:S,onContextMenu:ae,onFocus:he,onKeyDown:ye,onKeyUp:ve,onMouseDown:ie,onMouseLeave:ce,onMouseUp:le,onDragLeave:se,onTouchEnd:de,onTouchMove:fe,onTouchStart:ue,ref:xe,tabIndex:v?-1:$,type:H},_e,G,{children:[h,ne?(0,g.jsx)(k,(0,n.A)({ref:Z,center:p},U)):null]}))})},fy4x(e,t,r){"use strict";r.d(t,{A:()=>a,W:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiButtonBase",e)}const a=(0,n.A)("MuiButtonBase",["root","disabled","focusVisible"])},Bz0O(e,t,r){"use strict";r.d(t,{A:()=>a,O:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTouchRipple",e)}const a=(0,n.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"])},"9qDT"(e,t,r){"use strict";r.d(t,{A:()=>b});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("X+zv"),u=r("xeev"),d=r("Vn7y"),f=r("W9AN"),p=r("XjyF"),h=r("bann"),m=r("6z4e"),g=r("nKUr");const y=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],v=(0,d.Ay)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${p.A.grouped}`]:t.grouped},{[`& .${p.A.grouped}`]:t[`grouped${(0,u.A)(r.orientation)}`]},{[`& .${p.A.grouped}`]:t[`grouped${(0,u.A)(r.variant)}`]},{[`& .${p.A.grouped}`]:t[`grouped${(0,u.A)(r.variant)}${(0,u.A)(r.orientation)}`]},{[`& .${p.A.grouped}`]:t[`grouped${(0,u.A)(r.variant)}${(0,u.A)(r.color)}`]},{[`& .${p.A.firstButton}`]:t.firstButton},{[`& .${p.A.lastButton}`]:t.lastButton},{[`& .${p.A.middleButton}`]:t.middleButton},t.root,t[r.variant],!0===r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,"vertical"===r.orientation&&t.vertical]}})(({theme:e,ownerState:t})=>(0,o.A)({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},"vertical"===t.orientation&&{flexDirection:"column"},{[`& .${p.A.grouped}`]:(0,o.A)({minWidth:40,"&:hover":(0,o.A)({},"contained"===t.variant&&{boxShadow:"none"})},"contained"===t.variant&&{boxShadow:"none"}),[`& .${p.A.firstButton},& .${p.A.middleButton}`]:(0,o.A)({},"horizontal"===t.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===t.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===t.variant&&"horizontal"===t.orientation&&{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${p.A.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},"text"===t.variant&&"vertical"===t.orientation&&{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${p.A.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},"text"===t.variant&&"inherit"!==t.color&&{borderColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:(0,l.X4)(e.palette[t.color].main,.5)},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"transparent"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"transparent"},"contained"===t.variant&&"horizontal"===t.orientation&&{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${p.A.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},"contained"===t.variant&&"vertical"===t.orientation&&{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${p.A.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},"contained"===t.variant&&"inherit"!==t.color&&{borderColor:(e.vars||e).palette[t.color].dark},{"&:hover":(0,o.A)({},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"currentColor"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"currentColor"})}),[`& .${p.A.lastButton},& .${p.A.middleButton}`]:(0,o.A)({},"horizontal"===t.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===t.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===t.variant&&"horizontal"===t.orientation&&{marginLeft:-1},"outlined"===t.variant&&"vertical"===t.orientation&&{marginTop:-1})})),b=i.forwardRef(function(e,t){const r=(0,f.b)({props:e,name:"MuiButtonGroup"}),{children:l,className:d,color:b="primary",component:_="div",disabled:x=!1,disableElevation:w=!1,disableFocusRipple:A=!1,disableRipple:S=!1,fullWidth:C=!1,orientation:E="horizontal",size:T="medium",variant:I="outlined"}=r,k=(0,n.A)(r,y),M=(0,o.A)({},r,{color:b,component:_,disabled:x,disableElevation:w,disableFocusRipple:A,disableRipple:S,fullWidth:C,orientation:E,size:T,variant:I}),R=(e=>{const{classes:t,color:r,disabled:n,disableElevation:o,fullWidth:i,orientation:a,variant:l}=e,c={root:["root",l,"vertical"===a&&"vertical",i&&"fullWidth",o&&"disableElevation"],grouped:["grouped",`grouped${(0,u.A)(a)}`,`grouped${(0,u.A)(l)}`,`grouped${(0,u.A)(l)}${(0,u.A)(a)}`,`grouped${(0,u.A)(l)}${(0,u.A)(r)}`,n&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,s.A)(c,p.C,t)})(M),P=i.useMemo(()=>({className:R.grouped,color:b,disabled:x,disableElevation:w,disableFocusRipple:A,disableRipple:S,fullWidth:C,size:T,variant:I}),[b,x,w,A,S,C,T,I,R.grouped]),O=(0,c.A)(l),D=O.length,L=e=>{const t=0===e,r=e===D-1;return t&&r?"":t?R.firstButton:r?R.lastButton:R.middleButton};return(0,g.jsx)(v,(0,o.A)({as:_,role:"group",className:(0,a.A)(R.root,d),ref:t,ownerState:M},k,{children:(0,g.jsx)(h.A.Provider,{value:P,children:O.map((e,t)=>(0,g.jsx)(m.A.Provider,{value:L(t),children:e},t))})}))})},"6z4e"(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext(void 0)},bann(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext({})},XjyF(e,t,r){"use strict";r.d(t,{A:()=>a,C:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiButtonGroup",e)}const a=(0,n.A)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"])},wYCo(e,t,r){"use strict";r.d(t,{A:()=>C});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("J1Ai"),u=r("M7pN"),d=r("nKUr");const f=(0,u.A)((0,d.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),p=(0,u.A)((0,d.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,u.A)((0,d.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var m=r("xeev"),g=r("W9AN"),y=r("Vn7y"),v=r("XM18"),b=r("Ifs3");const _=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],x=(0,y.Ay)(c.A,{shouldForwardProp:e=>(0,v.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${(0,m.A)(r.size)}`],"default"!==r.color&&t[`color${(0,m.A)(r.color)}`]]}})(({theme:e,ownerState:t})=>(0,o.A)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${b.A.checked}, &.${b.A.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${b.A.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),w=(0,d.jsx)(p,{}),A=(0,d.jsx)(f,{}),S=(0,d.jsx)(h,{}),C=i.forwardRef(function(e,t){var r,l;const c=(0,g.b)({props:e,name:"MuiCheckbox"}),{checkedIcon:u=w,color:f="primary",icon:p=A,indeterminate:h=!1,indeterminateIcon:y=S,inputProps:v,size:C="medium",className:E}=c,T=(0,n.A)(c,_),I=h?y:p,k=h?y:u,M=(0,o.A)({},c,{color:f,indeterminate:h,size:C}),R=(e=>{const{classes:t,indeterminate:r,color:n,size:i}=e,a={root:["root",r&&"indeterminate",`color${(0,m.A)(n)}`,`size${(0,m.A)(i)}`]},l=(0,s.A)(a,b.w,t);return(0,o.A)({},t,l)})(M);return(0,d.jsx)(x,(0,o.A)({type:"checkbox",inputProps:(0,o.A)({"data-indeterminate":h},v),icon:i.cloneElement(I,{fontSize:null!=(r=I.props.fontSize)?r:C}),checkedIcon:i.cloneElement(k,{fontSize:null!=(l=k.props.fontSize)?l:C}),ownerState:M,ref:t,className:(0,a.A)(R.root,E)},T,{classes:R}))})},Ifs3(e,t,r){"use strict";r.d(t,{A:()=>a,w:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiCheckbox",e)}const a=(0,n.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"])},Ifci(e,t,r){"use strict";r.d(t,{A:()=>w});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("M7pN"),u=r("nKUr");const d=(0,c.A)((0,u.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");var f=r("ZfBw"),p=r("xeev"),h=r("+8pU"),m=r("W9AN"),g=r("Vn7y"),y=r("wmaj");const v=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],b=(0,g.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{color:n,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=r;return[{[`& .${y.A.avatar}`]:t.avatar},{[`& .${y.A.avatar}`]:t[`avatar${(0,p.A)(s)}`]},{[`& .${y.A.avatar}`]:t[`avatarColor${(0,p.A)(n)}`]},{[`& .${y.A.icon}`]:t.icon},{[`& .${y.A.icon}`]:t[`icon${(0,p.A)(s)}`]},{[`& .${y.A.icon}`]:t[`iconColor${(0,p.A)(o)}`]},{[`& .${y.A.deleteIcon}`]:t.deleteIcon},{[`& .${y.A.deleteIcon}`]:t[`deleteIcon${(0,p.A)(s)}`]},{[`& .${y.A.deleteIcon}`]:t[`deleteIconColor${(0,p.A)(n)}`]},{[`& .${y.A.deleteIcon}`]:t[`deleteIcon${(0,p.A)(l)}Color${(0,p.A)(n)}`]},t.root,t[`size${(0,p.A)(s)}`],t[`color${(0,p.A)(n)}`],i&&t.clickable,i&&"default"!==n&&t[`clickableColor${(0,p.A)(n)})`],a&&t.deletable,a&&"default"!==n&&t[`deletableColor${(0,p.A)(n)}`],t[l],t[`${l}${(0,p.A)(n)}`]]}})(({theme:e,ownerState:t})=>{const r="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return(0,o.A)({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${y.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${y.A.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:r,fontSize:e.typography.pxToRem(12)},[`& .${y.A.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${y.A.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${y.A.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${y.A.icon}`]:(0,o.A)({marginLeft:5,marginRight:-6},"small"===t.size&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&(0,o.A)({color:e.vars?e.vars.palette.Chip.defaultIconColor:r},"default"!==t.color&&{color:"inherit"})),[`& .${y.A.deleteIcon}`]:(0,o.A)({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:(0,l.X4)(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,l.X4)(e.palette.text.primary,.4)}},"small"===t.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==t.color&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:(0,l.X4)(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},"small"===t.size&&{height:24},"default"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${y.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&"default"!==t.color&&{[`&.${y.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>(0,o.A)({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${y.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&"default"!==t.color&&{[`&:hover, &.${y.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>(0,o.A)({},"outlined"===t.variant&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${y.A.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${y.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${y.A.avatar}`]:{marginLeft:4},[`& .${y.A.avatarSmall}`]:{marginLeft:2},[`& .${y.A.icon}`]:{marginLeft:4},[`& .${y.A.iconSmall}`]:{marginLeft:2},[`& .${y.A.deleteIcon}`]:{marginRight:5},[`& .${y.A.deleteIconSmall}`]:{marginRight:3}},"outlined"===t.variant&&"default"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,l.X4)(e.palette[t.color].main,.7)}`,[`&.${y.A.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${y.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,l.X4)(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${y.A.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,l.X4)(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),_=(0,g.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:r}=e,{size:n}=r;return[t.label,t[`label${(0,p.A)(n)}`]]}})(({ownerState:e})=>(0,o.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===e.variant&&{paddingLeft:11,paddingRight:11},"small"===e.size&&{paddingLeft:8,paddingRight:8},"small"===e.size&&"outlined"===e.variant&&{paddingLeft:7,paddingRight:7}));function x(e){return"Backspace"===e.key||"Delete"===e.key}const w=i.forwardRef(function(e,t){const r=(0,m.b)({props:e,name:"MuiChip"}),{avatar:l,className:c,clickable:g,color:w="default",component:A,deleteIcon:S,disabled:C=!1,icon:E,label:T,onClick:I,onDelete:k,onKeyDown:M,onKeyUp:R,size:P="medium",variant:O="filled",tabIndex:D,skipFocusWhenDisabled:L=!1}=r,N=(0,n.A)(r,v),F=i.useRef(null),z=(0,f.A)(F,t),B=e=>{e.stopPropagation(),k&&k(e)},j=!(!1===g||!I)||g,$=j||k?h.A:A||"div",U=(0,o.A)({},r,{component:$,disabled:C,size:P,color:w,iconColor:i.isValidElement(E)&&E.props.color||w,onDelete:!!k,clickable:j,variant:O}),V=(e=>{const{classes:t,disabled:r,size:n,color:o,iconColor:i,onDelete:a,clickable:l,variant:c}=e,u={root:["root",c,r&&"disabled",`size${(0,p.A)(n)}`,`color${(0,p.A)(o)}`,l&&"clickable",l&&`clickableColor${(0,p.A)(o)}`,a&&"deletable",a&&`deletableColor${(0,p.A)(o)}`,`${c}${(0,p.A)(o)}`],label:["label",`label${(0,p.A)(n)}`],avatar:["avatar",`avatar${(0,p.A)(n)}`,`avatarColor${(0,p.A)(o)}`],icon:["icon",`icon${(0,p.A)(n)}`,`iconColor${(0,p.A)(i)}`],deleteIcon:["deleteIcon",`deleteIcon${(0,p.A)(n)}`,`deleteIconColor${(0,p.A)(o)}`,`deleteIcon${(0,p.A)(c)}Color${(0,p.A)(o)}`]};return(0,s.A)(u,y.f,t)})(U),H=$===h.A?(0,o.A)({component:A||"div",focusVisibleClassName:V.focusVisible},k&&{disableRipple:!0}):{};let G=null;k&&(G=S&&i.isValidElement(S)?i.cloneElement(S,{className:(0,a.A)(S.props.className,V.deleteIcon),onClick:B}):(0,u.jsx)(d,{className:(0,a.A)(V.deleteIcon),onClick:B}));let W=null;l&&i.isValidElement(l)&&(W=i.cloneElement(l,{className:(0,a.A)(V.avatar,l.props.className)}));let q=null;return E&&i.isValidElement(E)&&(q=i.cloneElement(E,{className:(0,a.A)(V.icon,E.props.className)})),(0,u.jsxs)(b,(0,o.A)({as:$,className:(0,a.A)(V.root,c),disabled:!(!j||!C)||void 0,onClick:I,onKeyDown:e=>{e.currentTarget===e.target&&x(e)&&e.preventDefault(),M&&M(e)},onKeyUp:e=>{e.currentTarget===e.target&&(k&&x(e)?k(e):"Escape"===e.key&&F.current&&F.current.blur()),R&&R(e)},ref:z,tabIndex:L&&C?-1:D,ownerState:U},H,N,{children:[W||q,(0,u.jsx)(_,{className:(0,a.A)(V.label),ownerState:U,children:T}),G]}))})},wmaj(e,t,r){"use strict";r.d(t,{A:()=>a,f:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiChip",e)}const a=(0,n.A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"])},yXLF(e,t,r){"use strict";r.d(t,{A:()=>C});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("AeFk"),c=r("xeev"),u=r("W9AN"),d=r("Vn7y"),f=r("SYse"),p=r("nKUr");const h=["className","color","disableShrink","size","style","thickness","value","variant"];let m,g,y,v,b=e=>e;const _=(0,l.i7)(m||(m=b` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `)),x=(0,l.i7)(g||(g=b` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } `)),w=(0,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,c.A)(r.color)}`]]}})(({ownerState:e,theme:t})=>(0,o.A)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>"indeterminate"===e.variant&&(0,l.AH)(y||(y=b` animation: ${0} 1.4s linear infinite; `),_)),A=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),S=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${(0,c.A)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>(0,o.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&(0,l.AH)(v||(v=b` animation: ${0} 1.4s ease-in-out infinite; `),x)),C=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiCircularProgress"}),{className:i,color:l="primary",disableShrink:d=!1,size:m=40,style:g,thickness:y=3.6,value:v=0,variant:b="indeterminate"}=r,_=(0,n.A)(r,h),x=(0,o.A)({},r,{color:l,disableShrink:d,size:m,thickness:y,value:v,variant:b}),C=(e=>{const{classes:t,variant:r,color:n,disableShrink:o}=e,i={root:["root",r,`color${(0,c.A)(n)}`],svg:["svg"],circle:["circle",`circle${(0,c.A)(r)}`,o&&"circleDisableShrink"]};return(0,s.A)(i,f.b,t)})(x),E={},T={},I={};if("determinate"===b){const e=2*Math.PI*((44-y)/2);E.strokeDasharray=e.toFixed(3),I["aria-valuenow"]=Math.round(v),E.strokeDashoffset=`${((100-v)/100*e).toFixed(3)}px`,T.transform="rotate(-90deg)"}return(0,p.jsx)(w,(0,o.A)({className:(0,a.A)(C.root,i),style:(0,o.A)({width:m,height:m},T,g),ownerState:x,ref:t,role:"progressbar"},I,_,{children:(0,p.jsx)(A,{className:C.svg,ownerState:x,viewBox:"22 22 44 44",children:(0,p.jsx)(S,{className:C.circle,style:E,ownerState:x,cx:44,cy:44,r:(44-y)/2,fill:"none",strokeWidth:y})})}))})},SYse(e,t,r){"use strict";r.d(t,{A:()=>a,b:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiCircularProgress",e)}const a=(0,n.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"])},zX2i(e,t,r){"use strict";r.d(t,{x:()=>u});var n=r("q1tI"),o=r("N0rN"),i=r("nXnS"),a=r("p4lV"),s=r("cP2J"),l=r("nKUr");function c(e){return e.substring(2).toLowerCase()}function u(e){const{children:t,disableReactTree:r=!1,mouseEvent:u="onClick",onClickAway:d,touchEvent:f="onTouchEnd"}=e,p=n.useRef(!1),h=n.useRef(null),m=n.useRef(!1),g=n.useRef(!1);n.useEffect(()=>(setTimeout(()=>{m.current=!0},0),()=>{m.current=!1}),[]);const y=(0,o.A)((0,s.A)(t),h),v=(0,i.A)(e=>{const t=g.current;g.current=!1;const n=(0,a.A)(h.current);if(!m.current||!h.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth-1:!n.documentElement.contains(e.target)||h.current.contains(e.target),o||!r&&t||d(e)}),b=e=>r=>{g.current=!0;const n=t.props[e];n&&n(r)},_={ref:y};return!1!==f&&(_[f]=b(f)),n.useEffect(()=>{if(!1!==f){const e=c(f),t=(0,a.A)(h.current),r=()=>{p.current=!0};return t.addEventListener(e,v),t.addEventListener("touchmove",r),()=>{t.removeEventListener(e,v),t.removeEventListener("touchmove",r)}}},[v,f]),!1!==u&&(_[u]=b(u)),n.useEffect(()=>{if(!1!==u){const e=c(u),t=(0,a.A)(h.current);return t.addEventListener(e,v),()=>{t.removeEventListener(e,v)}}},[v,u]),(0,l.jsx)(n.Fragment,{children:n.cloneElement(t,_)})}},awfS(e,t,r){"use strict";r.d(t,{A:()=>A});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("XOob"),l=r("J13E"),c=r("aGM9"),u=r("Vn7y"),d=r("W9AN"),f=r("hqVE"),p=r("AiGX"),h=r("UnQg"),m=r("ZfBw"),g=r("LwNo"),y=r("nKUr");const v=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],b=(0,u.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],"entered"===r.state&&t.entered,"exited"===r.state&&!r.in&&"0px"===r.collapsedSize&&t.hidden]}})(({theme:e,ownerState:t})=>(0,o.A)({height:0,overflow:"hidden",transition:e.transitions.create("height")},"horizontal"===t.orientation&&{height:"auto",width:0,transition:e.transitions.create("width")},"entered"===t.state&&(0,o.A)({height:"auto",overflow:"visible"},"horizontal"===t.orientation&&{width:"auto"}),"exited"===t.state&&!t.in&&"0px"===t.collapsedSize&&{visibility:"hidden"})),_=(0,u.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>(0,o.A)({display:"flex",width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})),x=(0,u.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>(0,o.A)({width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})),w=i.forwardRef(function(e,t){const r=(0,d.b)({props:e,name:"MuiCollapse"}),{addEndListener:u,children:w,className:A,collapsedSize:S="0px",component:C,easing:E,in:T,onEnter:I,onEntered:k,onEntering:M,onExit:R,onExited:P,onExiting:O,orientation:D="vertical",style:L,timeout:N=f.p0.standard,TransitionComponent:F=s.Ay}=r,z=(0,n.A)(r,v),B=(0,o.A)({},r,{orientation:D,collapsedSize:S}),j=(e=>{const{orientation:t,classes:r}=e,n={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,c.A)(n,g.E,r)})(B),$=(0,h.A)(),U=(0,l.A)(),V=i.useRef(null),H=i.useRef(),G="number"==typeof S?`${S}px`:S,W="horizontal"===D,q=W?"width":"height",Z=i.useRef(null),Y=(0,m.A)(t,Z),X=e=>t=>{if(e){const r=Z.current;void 0===t?e(r):e(r,t)}},K=()=>V.current?V.current[W?"clientWidth":"clientHeight"]:0,J=X((e,t)=>{V.current&&W&&(V.current.style.position="absolute"),e.style[q]=G,I&&I(e,t)}),Q=X((e,t)=>{const r=K();V.current&&W&&(V.current.style.position="");const{duration:n,easing:o}=(0,p.c)({style:L,timeout:N,easing:E},{mode:"enter"});if("auto"===N){const t=$.transitions.getAutoHeightDuration(r);e.style.transitionDuration=`${t}ms`,H.current=t}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[q]=`${r}px`,e.style.transitionTimingFunction=o,M&&M(e,t)}),ee=X((e,t)=>{e.style[q]="auto",k&&k(e,t)}),te=X(e=>{e.style[q]=`${K()}px`,R&&R(e)}),re=X(P),ne=X(e=>{const t=K(),{duration:r,easing:n}=(0,p.c)({style:L,timeout:N,easing:E},{mode:"exit"});if("auto"===N){const r=$.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${r}ms`,H.current=r}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[q]=G,e.style.transitionTimingFunction=n,O&&O(e)});return(0,y.jsx)(F,(0,o.A)({in:T,onEnter:J,onEntered:ee,onEntering:Q,onExit:te,onExited:re,onExiting:ne,addEndListener:e=>{"auto"===N&&U.start(H.current||0,e),u&&u(Z.current,e)},nodeRef:Z,timeout:"auto"===N?null:N},z,{children:(e,t)=>(0,y.jsx)(b,(0,o.A)({as:C,className:(0,a.A)(j.root,A,{entered:j.entered,exited:!T&&"0px"===G&&j.hidden}[e]),style:(0,o.A)({[W?"minWidth":"minHeight"]:G},L),ref:Y},t,{ownerState:(0,o.A)({},B,{state:e}),children:(0,y.jsx)(_,{ownerState:(0,o.A)({},B,{state:e}),className:j.wrapper,ref:V,children:(0,y.jsx)(x,{ownerState:(0,o.A)({},B,{state:e}),className:j.wrapperInner,children:w})})}))}))});w.muiSupportAuto=!0;const A=w},LwNo(e,t,r){"use strict";r.d(t,{A:()=>a,E:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiCollapse",e)}const a=(0,n.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"])},"8JWP"(e,t,r){"use strict";r.d(t,{A:()=>w});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("TkYO"),l=r("aGM9"),c=r("unMj"),u=r("sdrl"),d=r("M82X"),f=r("Tazo"),p=r("nKUr");const h=["className","component","disableGutters","fixed","maxWidth","classes"],m=(0,f.A)(),g=(0,d.A)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${(0,c.A)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),y=e=>(0,u.A)({props:e,name:"MuiContainer",defaultTheme:m});var v=r("xeev"),b=r("Vn7y"),_=r("W9AN");const x=function(e={}){const{createStyledComponent:t=g,useThemeProps:r=y,componentName:u="MuiContainer"}=e,d=t(({theme:e,ownerState:t})=>(0,o.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}),({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce((t,r)=>{const n=r,o=e.breakpoints.values[n];return 0!==o&&(t[e.breakpoints.up(n)]={maxWidth:`${o}${e.breakpoints.unit}`}),t},{}),({theme:e,ownerState:t})=>(0,o.A)({},"xs"===t.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},t.maxWidth&&"xs"!==t.maxWidth&&{[e.breakpoints.up(t.maxWidth)]:{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`}})),f=i.forwardRef(function(e,t){const i=r(e),{className:f,component:m="div",disableGutters:g=!1,fixed:y=!1,maxWidth:v="lg"}=i,b=(0,n.A)(i,h),_=(0,o.A)({},i,{component:m,disableGutters:g,fixed:y,maxWidth:v}),x=((e,t)=>{const{classes:r,fixed:n,disableGutters:o,maxWidth:i}=e,a={root:["root",i&&`maxWidth${(0,c.A)(String(i))}`,n&&"fixed",o&&"disableGutters"]};return(0,l.A)(a,e=>(0,s.Ay)(t,e),r)})(_,u);return(0,p.jsx)(d,(0,o.A)({as:m,ownerState:_,className:(0,a.A)(x.root,f),ref:t},b))});return f}({createStyledComponent:(0,b.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${(0,v.A)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,_.b)({props:e,name:"MuiContainer"})}),w=x},L9aa(e,t,r){"use strict";r.d(t,{Ay:()=>u,qy:()=>l,rf:()=>c});var n=r("+9dH"),o=r("q1tI"),i=r("W9AN"),a=r("n6jG"),s=r("nKUr");const l=(e,t)=>(0,n.A)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),c=e=>(0,n.A)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),u=function(e){const t=(0,i.b)({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:u=!1}=t;return(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(a.A,{styles:e=>((e,t=!1)=>{var r;const o={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([t,r])=>{var n;o[e.getColorSchemeSelector(t).replace(/\s*&/,"")]={colorScheme:null==(n=r.palette)?void 0:n.mode}});let i=(0,n.A)({html:l(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,n.A)({margin:0},c(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},o);const a=null==(r=e.components)||null==(r=r.MuiCssBaseline)?void 0:r.styleOverrides;return a&&(i=[i,a]),i})(e,u)}),r]})}},W9AN(e,t,r){"use strict";r.d(t,{b:()=>o}),r("q1tI");var n=r("jAoP");function o(e){return(0,n.b)(e)}r("nKUr")},umvS(e,t,r){"use strict";r.d(t,{A:()=>C});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("A3c4"),c=r("xeev"),u=r("X6EC"),d=r("hGmu"),f=r("G43+"),p=r("W9AN"),h=r("Vn7y"),m=r("plnp"),g=r("aMd+"),y=r("Sk+A"),v=r("UnQg"),b=r("nKUr");const _=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],x=(0,h.Ay)(y.A,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),w=(0,h.Ay)(u.A,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),A=(0,h.Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.container,t[`scroll${(0,c.A)(r.scroll)}`]]}})(({ownerState:e})=>(0,o.A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),S=(0,h.Ay)(f.A,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`scrollPaper${(0,c.A)(r.scroll)}`],t[`paperWidth${(0,c.A)(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>(0,o.A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===t.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===t.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===t.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${m.A.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&"xs"!==t.maxWidth&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${m.A.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${m.A.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),C=i.forwardRef(function(e,t){const r=(0,p.b)({props:e,name:"MuiDialog"}),u=(0,v.A)(),h={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{"aria-describedby":y,"aria-labelledby":C,BackdropComponent:E,BackdropProps:T,children:I,className:k,disableEscapeKeyDown:M=!1,fullScreen:R=!1,fullWidth:P=!1,maxWidth:O="sm",onBackdropClick:D,onClick:L,onClose:N,open:F,PaperComponent:z=f.A,PaperProps:B={},scroll:j="paper",TransitionComponent:$=d.A,transitionDuration:U=h,TransitionProps:V}=r,H=(0,n.A)(r,_),G=(0,o.A)({},r,{disableEscapeKeyDown:M,fullScreen:R,fullWidth:P,maxWidth:O,scroll:j}),W=(e=>{const{classes:t,scroll:r,maxWidth:n,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${(0,c.A)(r)}`],paper:["paper",`paperScroll${(0,c.A)(r)}`,`paperWidth${(0,c.A)(String(n))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return(0,s.A)(a,m.f,t)})(G),q=i.useRef(),Z=(0,l.A)(C),Y=i.useMemo(()=>({titleId:Z}),[Z]);return(0,b.jsx)(w,(0,o.A)({className:(0,a.A)(W.root,k),closeAfterTransition:!0,components:{Backdrop:x},componentsProps:{backdrop:(0,o.A)({transitionDuration:U,as:E},T)},disableEscapeKeyDown:M,onClose:N,open:F,ref:t,onClick:e=>{L&&L(e),q.current&&(q.current=null,D&&D(e),N&&N(e,"backdropClick"))},ownerState:G},H,{children:(0,b.jsx)($,(0,o.A)({appear:!0,in:F,timeout:U,role:"presentation"},V,{children:(0,b.jsx)(A,{className:(0,a.A)(W.container),onMouseDown:e=>{q.current=e.target===e.currentTarget},ownerState:G,children:(0,b.jsx)(S,(0,o.A)({as:z,elevation:24,role:"dialog","aria-describedby":y,"aria-labelledby":Z},B,{className:(0,a.A)(W.paper,B.className),ownerState:G,children:(0,b.jsx)(g.A.Provider,{value:Y,children:I})}))})}))}))})},"aMd+"(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext({})},plnp(e,t,r){"use strict";r.d(t,{A:()=>a,f:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDialog",e)}const a=(0,n.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"])},TFnf(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("CnVR"),d=r("nKUr");const f=["className","disableSpacing"],p=(0,l.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})(({ownerState:e})=>(0,o.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),h=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:l=!1}=r,h=(0,n.A)(r,f),m=(0,o.A)({},r,{disableSpacing:l}),g=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,s.A)(n,u.C,t)})(m);return(0,d.jsx)(p,(0,o.A)({className:(0,a.A)(g.root,i),ownerState:m,ref:t},h))})},CnVR(e,t,r){"use strict";r.d(t,{A:()=>a,C:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDialogActions",e)}const a=(0,n.A)("MuiDialogActions",["root","spacing"])},GVSF(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("KUP3"),d=r("HaXu"),f=r("nKUr");const p=["className","dividers"],h=(0,l.Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>(0,o.A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${d.A.root} + &`]:{paddingTop:0}})),m=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiDialogContent"}),{className:i,dividers:l=!1}=r,d=(0,n.A)(r,p),m=(0,o.A)({},r,{dividers:l}),g=(e=>{const{classes:t,dividers:r}=e,n={root:["root",r&&"dividers"]};return(0,s.A)(n,u.E,t)})(m);return(0,f.jsx)(h,(0,o.A)({className:(0,a.A)(g.root,i),ownerState:m,ref:t},d))})},KUP3(e,t,r){"use strict";r.d(t,{A:()=>a,E:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDialogContent",e)}const a=(0,n.A)("MuiDialogContent",["root","dividers"])},akmu(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("XM18"),u=r("W9AN"),d=r("Gqia"),f=r("PTxh"),p=r("nKUr");const h=["children","className"],m=(0,l.Ay)(d.A,{shouldForwardProp:e=>(0,c.A)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),g=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiDialogContentText"}),{className:i}=r,l=(0,n.A)(r,h),c=(e=>{const{classes:t}=e,r=(0,s.A)({root:["root"]},f.D,t);return(0,o.A)({},t,r)})(l);return(0,p.jsx)(m,(0,o.A)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:l,className:(0,a.A)(c.root,i)},r,{classes:c}))})},PTxh(e,t,r){"use strict";r.d(t,{A:()=>a,D:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDialogContentText",e)}const a=(0,n.A)("MuiDialogContentText",["root"])},b7jQ(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Gqia"),c=r("Vn7y"),u=r("W9AN"),d=r("HaXu"),f=r("aMd+"),p=r("nKUr");const h=["className","id"],m=(0,c.Ay)(l.A,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),g=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiDialogTitle"}),{className:l,id:c}=r,g=(0,o.A)(r,h),y=r,v=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.t,t)})(y),{titleId:b=c}=i.useContext(f.A);return(0,p.jsx)(m,(0,n.A)({component:"h2",className:(0,a.A)(v.root,l),ownerState:y,ref:t,variant:"h6",id:null!=c?c:b},g))})},HaXu(e,t,r){"use strict";r.d(t,{A:()=>a,t:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDialogTitle",e)}const a=(0,n.A)("MuiDialogTitle",["root"])},"A+QN"(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("W9AN"),d=r("WOV/"),f=r("nKUr");const p=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],h=(0,c.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>(0,o.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,l.X4)(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>(0,o.A)({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>(0,o.A)({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>(0,o.A)({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>(0,o.A)({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),m=(0,c.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>(0,o.A)({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),g=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiDivider"}),{absolute:i=!1,children:l,className:c,component:g=(l?"div":"hr"),flexItem:y=!1,light:v=!1,orientation:b="horizontal",role:_=("hr"!==g?"separator":void 0),textAlign:x="center",variant:w="fullWidth"}=r,A=(0,n.A)(r,p),S=(0,o.A)({},r,{absolute:i,component:g,flexItem:y,light:v,orientation:b,role:_,textAlign:x,variant:w}),C=(e=>{const{absolute:t,children:r,classes:n,flexItem:o,light:i,orientation:a,textAlign:l,variant:c}=e,u={root:["root",t&&"absolute",c,i&&"light","vertical"===a&&"vertical",o&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===l&&"vertical"!==a&&"textAlignRight","left"===l&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]};return(0,s.A)(u,d.K,n)})(S);return(0,f.jsx)(h,(0,o.A)({as:g,className:(0,a.A)(C.root,c),role:_,ref:t,ownerState:S},A,{children:l?(0,f.jsx)(m,{className:C.wrapper,ownerState:S,children:l}):null}))});g.muiSkipListHighlight=!0;const y=g},"WOV/"(e,t,r){"use strict";r.d(t,{A:()=>a,K:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDivider",e)}const a=(0,n.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"])},"6EZ2"(e,t,r){"use strict";r.d(t,{$b:()=>E,Ay:()=>I,iB:()=>T});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("St5x"),c=r("X6EC"),u=r("ta8z"),d=r("G43+"),f=r("xeev"),p=r("UnQg"),h=r("W9AN"),m=r("Vn7y"),g=r("XM18"),y=r("5oni"),v=r("nKUr");const b=["BackdropProps"],_=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],x=(e,t)=>{const{ownerState:r}=e;return[t.root,("permanent"===r.variant||"persistent"===r.variant)&&t.docked,t.modal]},w=(0,m.Ay)(c.A,{name:"MuiDrawer",slot:"Root",overridesResolver:x})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),A=(0,m.Ay)("div",{shouldForwardProp:g.A,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:x})({flex:"0 0 auto"}),S=(0,m.Ay)(d.A,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`paperAnchor${(0,f.A)(r.anchor)}`],"temporary"!==r.variant&&t[`paperAnchorDocked${(0,f.A)(r.anchor)}`]]}})(({theme:e,ownerState:t})=>(0,o.A)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===t.anchor&&{left:0},"top"===t.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===t.anchor&&{right:0},"bottom"===t.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===t.anchor&&"temporary"!==t.variant&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},"top"===t.anchor&&"temporary"!==t.variant&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},"right"===t.anchor&&"temporary"!==t.variant&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"bottom"===t.anchor&&"temporary"!==t.variant&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),C={left:"right",right:"left",top:"down",bottom:"up"};function E(e){return-1!==["left","right"].indexOf(e)}function T({direction:e},t){return"rtl"===e&&E(t)?C[t]:t}const I=i.forwardRef(function(e,t){const r=(0,h.b)({props:e,name:"MuiDrawer"}),c=(0,p.A)(),d=(0,l.I)(),m={enter:c.transitions.duration.enteringScreen,exit:c.transitions.duration.leavingScreen},{anchor:g="left",BackdropProps:x,children:E,className:I,elevation:k=16,hideBackdrop:M=!1,ModalProps:{BackdropProps:R}={},onClose:P,open:O=!1,PaperProps:D={},SlideProps:L,TransitionComponent:N=u.A,transitionDuration:F=m,variant:z="temporary"}=r,B=(0,n.A)(r.ModalProps,b),j=(0,n.A)(r,_),$=i.useRef(!1);i.useEffect(()=>{$.current=!0},[]);const U=T({direction:d?"rtl":"ltr"},g),V=g,H=(0,o.A)({},r,{anchor:V,elevation:k,open:O,variant:z},j),G=(e=>{const{classes:t,anchor:r,variant:n}=e,o={root:["root"],docked:[("permanent"===n||"persistent"===n)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,f.A)(r)}`,"temporary"!==n&&`paperAnchorDocked${(0,f.A)(r)}`]};return(0,s.A)(o,y.S,t)})(H),W=(0,v.jsx)(S,(0,o.A)({elevation:"temporary"===z?k:0,square:!0},D,{className:(0,a.A)(G.paper,D.className),ownerState:H,children:E}));if("permanent"===z)return(0,v.jsx)(A,(0,o.A)({className:(0,a.A)(G.root,G.docked,I),ownerState:H,ref:t},j,{children:W}));const q=(0,v.jsx)(N,(0,o.A)({in:O,direction:C[U],timeout:F,appear:$.current},L,{children:W}));return"persistent"===z?(0,v.jsx)(A,(0,o.A)({className:(0,a.A)(G.root,G.docked,I),ownerState:H,ref:t},j,{children:q})):(0,v.jsx)(w,(0,o.A)({BackdropProps:(0,o.A)({},x,R,{transitionDuration:F}),className:(0,a.A)(G.root,G.modal,I),open:O,ownerState:H,onClose:P,hideBackdrop:M,ref:t},j,B,{children:q}))})},"5oni"(e,t,r){"use strict";r.d(t,{A:()=>a,S:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDrawer",e)}const a=(0,n.A)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"])},hGmu(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("XOob"),s=r("cP2J"),l=r("UnQg"),c=r("AiGX"),u=r("ZfBw"),d=r("nKUr");const f=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],p={entering:{opacity:1},entered:{opacity:1}},h=i.forwardRef(function(e,t){const r=(0,l.A)(),h={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:m,appear:g=!0,children:y,easing:v,in:b,onEnter:_,onEntered:x,onEntering:w,onExit:A,onExited:S,onExiting:C,style:E,timeout:T=h,TransitionComponent:I=a.Ay}=e,k=(0,o.A)(e,f),M=i.useRef(null),R=(0,u.A)(M,(0,s.A)(y),t),P=e=>t=>{if(e){const r=M.current;void 0===t?e(r):e(r,t)}},O=P(w),D=P((e,t)=>{(0,c.q)(e);const n=(0,c.c)({style:E,timeout:T,easing:v},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),_&&_(e,t)}),L=P(x),N=P(C),F=P(e=>{const t=(0,c.c)({style:E,timeout:T,easing:v},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),A&&A(e)}),z=P(S);return(0,d.jsx)(I,(0,n.A)({appear:g,in:b,nodeRef:M,onEnter:D,onEntered:L,onEntering:O,onExit:F,onExited:z,onExiting:N,addEndListener:e=>{m&&m(M.current,e)},timeout:T},k,{children:(e,t)=>i.cloneElement(y,(0,n.A)({style:(0,n.A)({opacity:0,visibility:"exited"!==e||b?void 0:"hidden"},p[e],E,y.props.style),ref:R},t))}))})},fJ4Q(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("w9Qe"),s=r("aGM9"),l=r("kmWS"),c=r("Vn7y"),u=r("XM18"),d=r("W9AN"),f=r("XYkD"),p=r("nKUr");const h=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],m=(0,c.Ay)(l.Sh,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...(0,l.WC)(e,t),!r.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var r;const n="light"===e.palette.mode,i=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,o.A)({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a}},[`&.${f.A.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a},[`&.${f.A.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(r=(e.vars||e).palette[t.color||"primary"])?void 0:r.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${f.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${f.A.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${f.A.disabled}, .${f.A.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${f.A.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&(0,o.A)({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))}),g=(0,c.Ay)(l.f3,{name:"MuiFilledInput",slot:"Input",overridesResolver:l.Oj})(({theme:e,ownerState:t})=>(0,o.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),y=i.forwardRef(function(e,t){var r,i,c,u;const y=(0,d.b)({props:e,name:"MuiFilledInput"}),{components:v={},componentsProps:b,fullWidth:_=!1,inputComponent:x="input",multiline:w=!1,slotProps:A,slots:S={},type:C="text"}=y,E=(0,n.A)(y,h),T=(0,o.A)({},y,{fullWidth:_,inputComponent:x,multiline:w,type:C}),I=(e=>{const{classes:t,disableUnderline:r}=e,n={root:["root",!r&&"underline"],input:["input"]},i=(0,s.A)(n,f.N,t);return(0,o.A)({},t,i)})(y),k={root:{ownerState:T},input:{ownerState:T}},M=(null!=A?A:b)?(0,a.A)(k,null!=A?A:b):k,R=null!=(r=null!=(i=S.root)?i:v.Root)?r:m,P=null!=(c=null!=(u=S.input)?u:v.Input)?c:g;return(0,p.jsx)(l.Ay,(0,o.A)({slots:{root:R,input:P},componentsProps:M,fullWidth:_,inputComponent:x,multiline:w,ref:t,type:C},E,{classes:I}))});y.muiName="Input";const v=y},XYkD(e,t,r){"use strict";r.d(t,{A:()=>l,N:()=>s});var n=r("+9dH"),o=r("PYeY"),i=r("TkYO"),a=r("G5wc");function s(e){return(0,i.Ay)("MuiFilledInput",e)}const l=(0,n.A)({},a.A,(0,o.A)("MuiFilledInput",["root","underline","input"]))},"Fg+5"(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("Vn7y"),u=r("AOhz"),d=r("xeev"),f=r("M3M6"),p=r("i8Gg"),h=r("XR1s"),m=r("nKUr");const g=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],y=(0,c.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,o.A)({},t.root,t[`margin${(0,d.A)(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>(0,o.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),v=i.forwardRef(function(e,t){const r=(0,l.b)({props:e,name:"MuiFormControl"}),{children:c,className:v,color:b="primary",component:_="div",disabled:x=!1,error:w=!1,focused:A,fullWidth:S=!1,hiddenLabel:C=!1,margin:E="none",required:T=!1,size:I="medium",variant:k="outlined"}=r,M=(0,n.A)(r,g),R=(0,o.A)({},r,{color:b,component:_,disabled:x,error:w,fullWidth:S,hiddenLabel:C,margin:E,required:T,size:I,variant:k}),P=(e=>{const{classes:t,margin:r,fullWidth:n}=e,o={root:["root","none"!==r&&`margin${(0,d.A)(r)}`,n&&"fullWidth"]};return(0,s.A)(o,h.c,t)})(R),[O,D]=i.useState(()=>{let e=!1;return c&&i.Children.forEach(c,t=>{if(!(0,f.A)(t,["Input","Select"]))return;const r=(0,f.A)(t,["Select"])?t.props.input:t;r&&(0,u.gr)(r.props)&&(e=!0)}),e}),[L,N]=i.useState(()=>{let e=!1;return c&&i.Children.forEach(c,t=>{(0,f.A)(t,["Input","Select"])&&((0,u.lq)(t.props,!0)||(0,u.lq)(t.props.inputProps,!0))&&(e=!0)}),e}),[F,z]=i.useState(!1);x&&F&&z(!1);const B=void 0===A||x?F:A;let j;const $=i.useMemo(()=>({adornedStart:O,setAdornedStart:D,color:b,disabled:x,error:w,filled:L,focused:B,fullWidth:S,hiddenLabel:C,size:I,onBlur:()=>{z(!1)},onEmpty:()=>{N(!1)},onFilled:()=>{N(!0)},onFocus:()=>{z(!0)},registerEffect:j,required:T,variant:k}),[O,b,x,w,L,B,S,C,j,T,I,k]);return(0,m.jsx)(p.A.Provider,{value:$,children:(0,m.jsx)(y,(0,o.A)({as:_,ownerState:R,className:(0,a.A)(P.root,v),ref:t},M,{children:c}))})})},i8Gg(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext(void 0)},XR1s(e,t,r){"use strict";r.d(t,{A:()=>a,c:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiFormControl",e)}const a=(0,n.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"])},"1ODS"(e,t,r){"use strict";function n({props:e,states:t,muiFormControl:r}){return t.reduce((t,n)=>(t[n]=e[n],r&&void 0===e[n]&&(t[n]=r[n]),t),{})}r.d(t,{A:()=>n})},"7EOP"(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("i8Gg");function i(){return n.useContext(o.A)}},O3LO(e,t,r){"use strict";r.d(t,{A:()=>_});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("7EOP"),c=r("1eI8"),u=r("Gqia"),d=r("xeev"),f=r("Vn7y"),p=r("W9AN"),h=r("1L54"),m=r("1ODS"),g=r("nKUr");const y=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],v=(0,f.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${h.A.label}`]:t.label},t.root,t[`labelPlacement${(0,d.A)(r.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>(0,o.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${h.A.disabled}`]:{cursor:"default"}},"start"===t.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===t.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===t.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${h.A.label}`]:{[`&.${h.A.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),b=(0,f.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${h.A.error}`]:{color:(e.vars||e).palette.error.main}})),_=i.forwardRef(function(e,t){var r,f;const _=(0,p.b)({props:e,name:"MuiFormControlLabel"}),{className:x,componentsProps:w={},control:A,disabled:S,disableTypography:C,label:E,labelPlacement:T="end",required:I,slotProps:k={}}=_,M=(0,n.A)(_,y),R=(0,l.A)(),P=null!=(r=null!=S?S:A.props.disabled)?r:null==R?void 0:R.disabled,O=null!=I?I:A.props.required,D={disabled:P,required:O};["checked","name","onChange","value","inputRef"].forEach(e=>{void 0===A.props[e]&&void 0!==_[e]&&(D[e]=_[e])});const L=(0,m.A)({props:_,muiFormControl:R,states:["error"]}),N=(0,o.A)({},_,{disabled:P,labelPlacement:T,required:O,error:L.error}),F=(e=>{const{classes:t,disabled:r,labelPlacement:n,error:o,required:i}=e,a={root:["root",r&&"disabled",`labelPlacement${(0,d.A)(n)}`,o&&"error",i&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,s.A)(a,h.u,t)})(N),z=null!=(f=k.typography)?f:w.typography;let B=E;return null==B||B.type===u.A||C||(B=(0,g.jsx)(u.A,(0,o.A)({component:"span"},z,{className:(0,a.A)(F.label,null==z?void 0:z.className),children:B}))),(0,g.jsxs)(v,(0,o.A)({className:(0,a.A)(F.root,x),ownerState:N,ref:t},M,{children:[i.cloneElement(A,D),O?(0,g.jsxs)(c.A,{display:"block",children:[B,(0,g.jsxs)(b,{ownerState:N,"aria-hidden":!0,className:F.asterisk,children:[" ","*"]})]}):B]}))})},"1L54"(e,t,r){"use strict";r.d(t,{A:()=>a,u:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiFormControlLabel",e)}const a=(0,n.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"])},"4ycN"(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("C559"),d=r("7EOP"),f=r("1ODS"),p=r("nKUr");const h=["className","row"],m=(0,l.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.row&&t.row]}})(({ownerState:e})=>(0,o.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),g=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiFormGroup"}),{className:i,row:l=!1}=r,g=(0,n.A)(r,h),y=(0,d.A)(),v=(0,f.A)({props:r,muiFormControl:y,states:["error"]}),b=(0,o.A)({},r,{row:l,error:v.error}),_=(e=>{const{classes:t,row:r,error:n}=e,o={root:["root",r&&"row",n&&"error"]};return(0,s.A)(o,u.c,t)})(b);return(0,p.jsx)(m,(0,o.A)({className:(0,a.A)(_.root,i),ownerState:b,ref:t},g))})},C559(e,t,r){"use strict";r.d(t,{A:()=>a,c:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiFormGroup",e)}const a=(0,n.A)("MuiFormGroup",["root","row","error"])},sbgx(e,t,r){"use strict";r.d(t,{A:()=>v});var n,o=r("Nlia"),i=r("+9dH"),a=r("q1tI"),s=r("juqV"),l=r("aGM9"),c=r("1ODS"),u=r("7EOP"),d=r("Vn7y"),f=r("xeev"),p=r("Vv3p"),h=r("W9AN"),m=r("nKUr");const g=["children","className","component","disabled","error","filled","focused","margin","required","variant"],y=(0,d.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size&&t[`size${(0,f.A)(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})(({theme:e,ownerState:t})=>(0,i.A)({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${p.A.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${p.A.error}`]:{color:(e.vars||e).palette.error.main}},"small"===t.size&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),v=a.forwardRef(function(e,t){const r=(0,h.b)({props:e,name:"MuiFormHelperText"}),{children:a,className:d,component:v="p"}=r,b=(0,o.A)(r,g),_=(0,u.A)(),x=(0,c.A)({props:r,muiFormControl:_,states:["variant","size","disabled","error","filled","focused","required"]}),w=(0,i.A)({},r,{component:v,contained:"filled"===x.variant||"outlined"===x.variant,variant:x.variant,size:x.size,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required}),A=(e=>{const{classes:t,contained:r,size:n,disabled:o,error:i,filled:a,focused:s,required:c}=e,u={root:["root",o&&"disabled",i&&"error",n&&`size${(0,f.A)(n)}`,r&&"contained",s&&"focused",a&&"filled",c&&"required"]};return(0,l.A)(u,p.h,t)})(w);return(0,m.jsx)(y,(0,i.A)({as:v,ownerState:w,className:(0,s.A)(A.root,d),ref:t},b,{children:" "===a?n||(n=(0,m.jsx)("span",{className:"notranslate",children:"​"})):a}))})},Vv3p(e,t,r){"use strict";r.d(t,{A:()=>a,h:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiFormHelperText",e)}const a=(0,n.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"])},VEoa(e,t,r){"use strict";r.d(t,{A:()=>v,d:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("1ODS"),c=r("7EOP"),u=r("xeev"),d=r("W9AN"),f=r("Vn7y"),p=r("4Qvy"),h=r("nKUr");const m=["children","className","color","component","disabled","error","filled","focused","required"],g=(0,f.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,o.A)({},t.root,"secondary"===e.color&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>(0,o.A)({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${p.A.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${p.A.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${p.A.error}`]:{color:(e.vars||e).palette.error.main}})),y=(0,f.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${p.A.error}`]:{color:(e.vars||e).palette.error.main}})),v=i.forwardRef(function(e,t){const r=(0,d.b)({props:e,name:"MuiFormLabel"}),{children:i,className:f,component:v="label"}=r,b=(0,n.A)(r,m),_=(0,c.A)(),x=(0,l.A)({props:r,muiFormControl:_,states:["color","required","focused","disabled","error","filled"]}),w=(0,o.A)({},r,{color:x.color||"primary",component:v,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required}),A=(e=>{const{classes:t,color:r,focused:n,disabled:o,error:i,filled:a,required:l}=e,c={root:["root",`color${(0,u.A)(r)}`,o&&"disabled",i&&"error",a&&"filled",n&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return(0,s.A)(c,p.Z,t)})(w);return(0,h.jsxs)(g,(0,o.A)({as:v,ownerState:w,className:(0,a.A)(A.root,f),ref:t},b,{children:[i,x.required&&(0,h.jsxs)(y,{ownerState:w,"aria-hidden":!0,className:A.asterisk,children:[" ","*"]})]}))})},"4Qvy"(e,t,r){"use strict";r.d(t,{A:()=>a,Z:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiFormLabel",e)}const a=(0,n.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"])},n6jG(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r("+9dH"),o=(r("q1tI"),r("OH6s")),i=r("j5nT"),a=r("WTO6"),s=r("nKUr");const l=function(e){return(0,s.jsx)(o.A,(0,n.A)({},e,{defaultTheme:i.A,themeId:a.A}))}},UVCh(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("J13E"),s=r("cP2J"),l=r("XOob"),c=r("UnQg"),u=r("AiGX"),d=r("ZfBw"),f=r("nKUr");const p=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function h(e){return`scale(${e}, ${e**2})`}const m={entering:{opacity:1,transform:h(1)},entered:{opacity:1,transform:"none"}},g="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),y=i.forwardRef(function(e,t){const{addEndListener:r,appear:y=!0,children:v,easing:b,in:_,onEnter:x,onEntered:w,onEntering:A,onExit:S,onExited:C,onExiting:E,style:T,timeout:I="auto",TransitionComponent:k=l.Ay}=e,M=(0,o.A)(e,p),R=(0,a.A)(),P=i.useRef(),O=(0,c.A)(),D=i.useRef(null),L=(0,d.A)(D,(0,s.A)(v),t),N=e=>t=>{if(e){const r=D.current;void 0===t?e(r):e(r,t)}},F=N(A),z=N((e,t)=>{(0,u.q)(e);const{duration:r,delay:n,easing:o}=(0,u.c)({style:T,timeout:I,easing:b},{mode:"enter"});let i;"auto"===I?(i=O.transitions.getAutoHeightDuration(e.clientHeight),P.current=i):i=r,e.style.transition=[O.transitions.create("opacity",{duration:i,delay:n}),O.transitions.create("transform",{duration:g?i:.666*i,delay:n,easing:o})].join(","),x&&x(e,t)}),B=N(w),j=N(E),$=N(e=>{const{duration:t,delay:r,easing:n}=(0,u.c)({style:T,timeout:I,easing:b},{mode:"exit"});let o;"auto"===I?(o=O.transitions.getAutoHeightDuration(e.clientHeight),P.current=o):o=t,e.style.transition=[O.transitions.create("opacity",{duration:o,delay:r}),O.transitions.create("transform",{duration:g?o:.666*o,delay:g?r:r||.333*o,easing:n})].join(","),e.style.opacity=0,e.style.transform=h(.75),S&&S(e)}),U=N(C);return(0,f.jsx)(k,(0,n.A)({appear:y,in:_,nodeRef:D,onEnter:z,onEntered:B,onEntering:F,onExit:$,onExited:U,onExiting:j,addEndListener:e=>{"auto"===I&&R.start(P.current||0,e),r&&r(D.current,e)},timeout:"auto"===I?null:I},M,{children:(e,t)=>i.cloneElement(v,(0,n.A)({style:(0,n.A)({opacity:0,transform:h(.75),visibility:"exited"!==e||_?void 0:"hidden"},m[e],T,v.props.style),ref:L},t))}))});y.muiSupportAuto=!0;const v=y},OGDC(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("W9AN"),d=r("+8pU"),f=r("xeev"),p=r("5iV1"),h=r("nKUr");const m=["edge","children","className","color","disabled","disableFocusRipple","size"],g=(0,c.Ay)(d.A,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"default"!==r.color&&t[`color${(0,f.A)(r.color)}`],r.edge&&t[`edge${(0,f.A)(r.edge)}`],t[`size${(0,f.A)(r.size)}`]]}})(({theme:e,ownerState:t})=>(0,o.A)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12}),({theme:e,ownerState:t})=>{var r;const n=null==(r=(e.vars||e).palette)?void 0:r[t.color];return(0,o.A)({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&(0,o.A)({color:null==n?void 0:n.main},!t.disableRipple&&{"&:hover":(0,o.A)({},n&&{backgroundColor:e.vars?`rgba(${n.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(n.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${p.A.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),y=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiIconButton"}),{edge:i=!1,children:l,className:c,color:d="default",disabled:y=!1,disableFocusRipple:v=!1,size:b="medium"}=r,_=(0,n.A)(r,m),x=(0,o.A)({},r,{edge:i,color:d,disabled:y,disableFocusRipple:v,size:b}),w=(e=>{const{classes:t,disabled:r,color:n,edge:o,size:i}=e,a={root:["root",r&&"disabled","default"!==n&&`color${(0,f.A)(n)}`,o&&`edge${(0,f.A)(o)}`,`size${(0,f.A)(i)}`]};return(0,s.A)(a,p.G,t)})(x);return(0,h.jsx)(g,(0,o.A)({className:(0,a.A)(w.root,c),centerRipple:!0,focusRipple:!v,disabled:y,ref:t},_,{ownerState:x,children:l}))})},"5iV1"(e,t,r){"use strict";r.d(t,{A:()=>a,G:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiIconButton",e)}const a=(0,n.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"])},WdHY(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("aGM9"),s=r("w9Qe"),l=r("kmWS"),c=r("Vn7y"),u=r("XM18"),d=r("W9AN"),f=r("Zqw4"),p=r("nKUr");const h=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],m=(0,c.Ay)(l.Sh,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...(0,l.WC)(e,t),!r.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),(0,o.A)({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${f.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${f.A.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${f.A.disabled}, .${f.A.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${f.A.disabled}:before`]:{borderBottomStyle:"dotted"}})}),g=(0,c.Ay)(l.f3,{name:"MuiInput",slot:"Input",overridesResolver:l.Oj})({}),y=i.forwardRef(function(e,t){var r,i,c,u;const y=(0,d.b)({props:e,name:"MuiInput"}),{disableUnderline:v,components:b={},componentsProps:_,fullWidth:x=!1,inputComponent:w="input",multiline:A=!1,slotProps:S,slots:C={},type:E="text"}=y,T=(0,n.A)(y,h),I=(e=>{const{classes:t,disableUnderline:r}=e,n={root:["root",!r&&"underline"],input:["input"]},i=(0,a.A)(n,f.B,t);return(0,o.A)({},t,i)})(y),k={root:{ownerState:{disableUnderline:v}}},M=(null!=S?S:_)?(0,s.A)(null!=S?S:_,k):k,R=null!=(r=null!=(i=C.root)?i:b.Root)?r:m,P=null!=(c=null!=(u=C.input)?u:b.Input)?c:g;return(0,p.jsx)(l.Ay,(0,o.A)({slots:{root:R,input:P},slotProps:M,fullWidth:x,inputComponent:w,multiline:A,ref:t,type:E},T,{classes:I}))});y.muiName="Input";const v=y},Zqw4(e,t,r){"use strict";r.d(t,{A:()=>l,B:()=>s});var n=r("+9dH"),o=r("PYeY"),i=r("TkYO"),a=r("G5wc");function s(e){return(0,i.Ay)("MuiInput",e)}const l=(0,n.A)({},a.A,(0,o.A)("MuiInput",["root","underline","input"]))},EfzM(e,t,r){"use strict";r.d(t,{A:()=>b});var n,o=r("Nlia"),i=r("+9dH"),a=r("q1tI"),s=r("juqV"),l=r("aGM9"),c=r("xeev"),u=r("Gqia"),d=r("i8Gg"),f=r("7EOP"),p=r("Vn7y"),h=r("S9h2"),m=r("W9AN"),g=r("nKUr");const y=["children","className","component","disablePointerEvents","disableTypography","position","variant"],v=(0,p.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,c.A)(r.position)}`],!0===r.disablePointerEvents&&t.disablePointerEvents,t[r.variant]]}})(({theme:e,ownerState:t})=>(0,i.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${h.A.positionStart}&:not(.${h.A.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})),b=a.forwardRef(function(e,t){const r=(0,m.b)({props:e,name:"MuiInputAdornment"}),{children:p,className:b,component:_="div",disablePointerEvents:x=!1,disableTypography:w=!1,position:A,variant:S}=r,C=(0,o.A)(r,y),E=(0,f.A)()||{};let T=S;S&&E.variant,E&&!T&&(T=E.variant);const I=(0,i.A)({},r,{hiddenLabel:E.hiddenLabel,size:E.size,disablePointerEvents:x,position:A,variant:T}),k=(e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:o,size:i,variant:a}=e,s={root:["root",r&&"disablePointerEvents",o&&`position${(0,c.A)(o)}`,a,n&&"hiddenLabel",i&&`size${(0,c.A)(i)}`]};return(0,l.A)(s,h.P,t)})(I);return(0,g.jsx)(d.A.Provider,{value:null,children:(0,g.jsx)(v,(0,i.A)({as:_,ownerState:I,className:(0,s.A)(k.root,b),ref:t},C,{children:"string"!=typeof p||w?(0,g.jsxs)(a.Fragment,{children:["start"===A?n||(n=(0,g.jsx)("span",{className:"notranslate",children:"​"})):null,p]}):(0,g.jsx)(u.A,{color:"text.secondary",children:p})}))})})},S9h2(e,t,r){"use strict";r.d(t,{A:()=>a,P:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiInputAdornment",e)}const a=(0,n.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"])},kmWS(e,t,r){"use strict";r.d(t,{Ay:()=>k,Oj:()=>C,Sh:()=>E,WC:()=>S,f3:()=>T});var n=r("Nlia"),o=r("+9dH"),i=r("KRkT"),a=r("q1tI"),s=r("juqV"),l=r("aGM9"),c=r("gU+W"),u=r("ICY4"),d=r("1ODS"),f=r("i8Gg"),p=r("7EOP"),h=r("Vn7y"),m=r("W9AN"),g=r("xeev"),y=r("ZfBw"),v=r("6q60"),b=r("n6jG"),_=r("AOhz"),x=r("G5wc"),w=r("nKUr");const A=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],S=(e,t)=>{const{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,"small"===r.size&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${(0,g.A)(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},C=(e,t)=>{const{ownerState:r}=e;return[t.input,"small"===r.size&&t.inputSizeSmall,r.multiline&&t.inputMultiline,"search"===r.type&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]},E=(0,h.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:S})(({theme:e,ownerState:t})=>(0,o.A)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${x.A.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&(0,o.A)({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),T=(0,h.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:C})(({theme:e,ownerState:t})=>{const r="light"===e.palette.mode,n=(0,o.A)({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),i={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,o.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${x.A.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${x.A.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})}),I=(0,w.jsx)(b.A,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),k=a.forwardRef(function(e,t){var r;const h=(0,m.b)({props:e,name:"MuiInputBase"}),{"aria-describedby":b,autoComplete:S,autoFocus:C,className:k,components:M={},componentsProps:R={},defaultValue:P,disabled:O,disableInjectingGlobalStyles:D,endAdornment:L,fullWidth:N=!1,id:F,inputComponent:z="input",inputProps:B={},inputRef:j,maxRows:$,minRows:U,multiline:V=!1,name:H,onBlur:G,onChange:W,onClick:q,onFocus:Z,onKeyDown:Y,onKeyUp:X,placeholder:K,readOnly:J,renderSuffix:Q,rows:ee,slotProps:te={},slots:re={},startAdornment:ne,type:oe="text",value:ie}=h,ae=(0,n.A)(h,A),se=null!=B.value?B.value:ie,{current:le}=a.useRef(null!=se),ce=a.useRef(),ue=a.useCallback(e=>{},[]),de=(0,y.A)(ce,j,B.ref,ue),[fe,pe]=a.useState(!1),he=(0,p.A)(),me=(0,d.A)({props:h,muiFormControl:he,states:["color","disabled","error","hiddenLabel","size","required","filled"]});me.focused=he?he.focused:fe,a.useEffect(()=>{!he&&O&&fe&&(pe(!1),G&&G())},[he,O,fe,G]);const ge=he&&he.onFilled,ye=he&&he.onEmpty,ve=a.useCallback(e=>{(0,_.lq)(e)?ge&&ge():ye&&ye()},[ge,ye]);(0,v.A)(()=>{le&&ve({value:se})},[se,ve,le]),a.useEffect(()=>{ve(ce.current)},[]);let be=z,_e=B;V&&"input"===be&&(_e=ee?(0,o.A)({type:void 0,minRows:ee,maxRows:ee},_e):(0,o.A)({type:void 0,maxRows:$,minRows:U},_e),be=u.A),a.useEffect(()=>{he&&he.setAdornedStart(Boolean(ne))},[he,ne]);const xe=(0,o.A)({},h,{color:me.color||"primary",disabled:me.disabled,endAdornment:L,error:me.error,focused:me.focused,formControl:he,fullWidth:N,hiddenLabel:me.hiddenLabel,multiline:V,size:me.size,startAdornment:ne,type:oe}),we=(e=>{const{classes:t,color:r,disabled:n,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:f,size:p,startAdornment:h,type:m}=e,y={root:["root",`color${(0,g.A)(r)}`,n&&"disabled",o&&"error",c&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${(0,g.A)(p)}`,d&&"multiline",h&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",n&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",h&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return(0,l.A)(y,x.g,t)})(xe),Ae=re.root||M.Root||E,Se=te.root||R.root||{},Ce=re.input||M.Input||T;return _e=(0,o.A)({},_e,null!=(r=te.input)?r:R.input),(0,w.jsxs)(a.Fragment,{children:[!D&&I,(0,w.jsxs)(Ae,(0,o.A)({},Se,!(0,c.A)(Ae)&&{ownerState:(0,o.A)({},xe,Se.ownerState)},{ref:t,onClick:e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),q&&q(e)}},ae,{className:(0,s.A)(we.root,Se.className,k,J&&"MuiInputBase-readOnly"),children:[ne,(0,w.jsx)(f.A.Provider,{value:null,children:(0,w.jsx)(Ce,(0,o.A)({ownerState:xe,"aria-invalid":me.error,"aria-describedby":b,autoComplete:S,autoFocus:C,defaultValue:P,disabled:me.disabled,id:F,onAnimationStart:e=>{ve("mui-auto-fill-cancel"===e.animationName?ce.current:{value:"x"})},name:H,placeholder:K,readOnly:J,required:me.required,rows:ee,value:se,onKeyDown:Y,onKeyUp:X,type:oe},_e,!(0,c.A)(Ce)&&{as:be,ownerState:(0,o.A)({},xe,_e.ownerState)},{ref:de,className:(0,s.A)(we.input,_e.className,J&&"MuiInputBase-readOnly"),onBlur:e=>{G&&G(e),B.onBlur&&B.onBlur(e),he&&he.onBlur?he.onBlur(e):pe(!1)},onChange:(e,...t)=>{if(!le){const t=e.target||ce.current;if(null==t)throw new Error((0,i.A)(1));ve({value:t.value})}B.onChange&&B.onChange(e,...t),W&&W(e,...t)},onFocus:e=>{me.disabled?e.stopPropagation():(Z&&Z(e),B.onFocus&&B.onFocus(e),he&&he.onFocus?he.onFocus(e):pe(!0))}}))}),L,Q?Q((0,o.A)({},me,{startAdornment:ne})):null]}))]})})},G5wc(e,t,r){"use strict";r.d(t,{A:()=>a,g:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiInputBase",e)}const a=(0,n.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"])},AOhz(e,t,r){"use strict";function n(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function o(e,t=!1){return e&&(n(e.value)&&""!==e.value||t&&n(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}r.d(t,{gr:()=>i,lq:()=>o})},kQF4(e,t,r){"use strict";r.d(t,{A:()=>_});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("aGM9"),s=r("juqV"),l=r("1ODS"),c=r("7EOP"),u=r("VEoa"),d=r("4Qvy"),f=r("W9AN"),p=r("xeev"),h=r("Vn7y"),m=r("XM18"),g=r("eKIA"),y=r("nKUr");const v=["disableAnimation","margin","shrink","variant","className"],b=(0,h.Ay)(u.A,{shouldForwardProp:e=>(0,m.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${d.A.asterisk}`]:t.asterisk},t.root,r.formControl&&t.formControl,"small"===r.size&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,r.focused&&t.focused,t[r.variant]]}})(({theme:e,ownerState:t})=>(0,o.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===t.size&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},"filled"===t.variant&&(0,o.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&(0,o.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===t.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===t.variant&&(0,o.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),_=i.forwardRef(function(e,t){const r=(0,f.b)({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:u,className:d}=r,h=(0,n.A)(r,v),m=(0,c.A)();let _=u;void 0===_&&m&&(_=m.filled||m.focused||m.adornedStart);const x=(0,l.A)({props:r,muiFormControl:m,states:["size","variant","required","focused"]}),w=(0,o.A)({},r,{disableAnimation:i,formControl:m,shrink:_,size:x.size,variant:x.variant,required:x.required,focused:x.focused}),A=(e=>{const{classes:t,formControl:r,size:n,shrink:i,disableAnimation:s,variant:l,required:c}=e,u={root:["root",r&&"formControl",!s&&"animated",i&&"shrink",n&&"normal"!==n&&`size${(0,p.A)(n)}`,l],asterisk:[c&&"asterisk"]},d=(0,a.A)(u,g.R,t);return(0,o.A)({},t,d)})(w);return(0,y.jsx)(b,(0,o.A)({"data-shrink":_,ownerState:w,ref:t,className:(0,s.A)(A.root,d)},h,{classes:A}))})},eKIA(e,t,r){"use strict";r.d(t,{A:()=>a,R:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiInputLabel",e)}const a=(0,n.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"])},"4WJT"(e,t,r){"use strict";r.d(t,{A:()=>P});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("AeFk"),c=r("dcYk"),u=r("St5x"),d=r("xeev"),f=r("Vn7y"),p=r("W9AN"),h=r("HkBA"),m=r("nKUr");const g=["className","color","value","valueBuffer","variant"];let y,v,b,_,x,w,A=e=>e;const S=(0,l.i7)(y||(y=A` 0% { left: -35%; right: 100%; } 60% { left: 100%; right: -90%; } 100% { left: 100%; right: -90%; } `)),C=(0,l.i7)(v||(v=A` 0% { left: -200%; right: 100%; } 60% { left: 107%; right: -8%; } 100% { left: 107%; right: -8%; } `)),E=(0,l.i7)(b||(b=A` 0% { opacity: 1; background-position: 0 -23px; } 60% { opacity: 0; background-position: 0 -23px; } 100% { opacity: 1; background-position: -200px -23px; } `)),T=(e,t)=>"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,c.a)(e.palette[t].main,.62):(0,c.e$)(e.palette[t].main,.5),I=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${(0,d.A)(r.color)}`],t[r.variant]]}})(({ownerState:e,theme:t})=>(0,o.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:T(t,e.color)},"inherit"===e.color&&"buffer"!==e.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===e.variant&&{backgroundColor:"transparent"},"query"===e.variant&&{transform:"rotate(180deg)"})),k=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.dashed,t[`dashedColor${(0,d.A)(r.color)}`]]}})(({ownerState:e,theme:t})=>{const r=T(t,e.color);return(0,o.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===e.color&&{opacity:.3},{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},(0,l.AH)(_||(_=A` animation: ${0} 3s infinite linear; `),E)),M=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.bar,t[`barColor${(0,d.A)(r.color)}`],("indeterminate"===r.variant||"query"===r.variant)&&t.bar1Indeterminate,"determinate"===r.variant&&t.bar1Determinate,"buffer"===r.variant&&t.bar1Buffer]}})(({ownerState:e,theme:t})=>(0,o.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===e.color?"currentColor":(t.vars||t).palette[e.color].main},"determinate"===e.variant&&{transition:"transform .4s linear"},"buffer"===e.variant&&{zIndex:1,transition:"transform .4s linear"}),({ownerState:e})=>("indeterminate"===e.variant||"query"===e.variant)&&(0,l.AH)(x||(x=A` width: auto; animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; `),S)),R=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.bar,t[`barColor${(0,d.A)(r.color)}`],("indeterminate"===r.variant||"query"===r.variant)&&t.bar2Indeterminate,"buffer"===r.variant&&t.bar2Buffer]}})(({ownerState:e,theme:t})=>(0,o.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==e.variant&&{backgroundColor:"inherit"===e.color?"currentColor":(t.vars||t).palette[e.color].main},"inherit"===e.color&&{opacity:.3},"buffer"===e.variant&&{backgroundColor:T(t,e.color),transition:"transform .4s linear"}),({ownerState:e})=>("indeterminate"===e.variant||"query"===e.variant)&&(0,l.AH)(w||(w=A` width: auto; animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; `),C)),P=i.forwardRef(function(e,t){const r=(0,p.b)({props:e,name:"MuiLinearProgress"}),{className:i,color:l="primary",value:c,valueBuffer:f,variant:y="indeterminate"}=r,v=(0,n.A)(r,g),b=(0,o.A)({},r,{color:l,variant:y}),_=(e=>{const{classes:t,variant:r,color:n}=e,o={root:["root",`color${(0,d.A)(n)}`,r],dashed:["dashed",`dashedColor${(0,d.A)(n)}`],bar1:["bar",`barColor${(0,d.A)(n)}`,("indeterminate"===r||"query"===r)&&"bar1Indeterminate","determinate"===r&&"bar1Determinate","buffer"===r&&"bar1Buffer"],bar2:["bar","buffer"!==r&&`barColor${(0,d.A)(n)}`,"buffer"===r&&`color${(0,d.A)(n)}`,("indeterminate"===r||"query"===r)&&"bar2Indeterminate","buffer"===r&&"bar2Buffer"]};return(0,s.A)(o,h.l,t)})(b),x=(0,u.I)(),w={},A={bar1:{},bar2:{}};if(("determinate"===y||"buffer"===y)&&void 0!==c){w["aria-valuenow"]=Math.round(c),w["aria-valuemin"]=0,w["aria-valuemax"]=100;let e=c-100;x&&(e=-e),A.bar1.transform=`translateX(${e}%)`}if("buffer"===y&&void 0!==f){let e=(f||0)-100;x&&(e=-e),A.bar2.transform=`translateX(${e}%)`}return(0,m.jsxs)(I,(0,o.A)({className:(0,a.A)(_.root,i),ownerState:b,role:"progressbar"},w,{ref:t},v,{children:["buffer"===y?(0,m.jsx)(k,{className:_.dashed,ownerState:b}):null,(0,m.jsx)(M,{className:_.bar1,ownerState:b,style:A.bar1}),"determinate"===y?null:(0,m.jsx)(R,{className:_.bar2,ownerState:b,style:A.bar2})]}))})},HkBA(e,t,r){"use strict";r.d(t,{A:()=>a,l:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiLinearProgress",e)}const a=(0,n.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"])},H9le(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("cwku"),d=r("sK9B"),f=r("nKUr");const p=["children","className","component","dense","disablePadding","subheader"],h=(0,l.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})(({ownerState:e})=>(0,o.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),m=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiList"}),{children:l,className:m,component:g="ul",dense:y=!1,disablePadding:v=!1,subheader:b}=r,_=(0,n.A)(r,p),x=i.useMemo(()=>({dense:y}),[y]),w=(0,o.A)({},r,{component:g,dense:y,disablePadding:v}),A=(e=>{const{classes:t,disablePadding:r,dense:n,subheader:o}=e,i={root:["root",!r&&"padding",n&&"dense",o&&"subheader"]};return(0,s.A)(i,d.H,t)})(w);return(0,f.jsx)(u.A.Provider,{value:x,children:(0,f.jsxs)(h,(0,o.A)({as:g,className:(0,a.A)(A.root,m),ref:t,ownerState:w},_,{children:[b,l]}))})})},cwku(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext({})},sK9B(e,t,r){"use strict";r.d(t,{A:()=>a,H:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiList",e)}const a=(0,n.A)("MuiList",["root","padding","dense","subheader"])},ZvkB(e,t,r){"use strict";r.d(t,{Ay:()=>C});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("gU+W"),u=r("Vn7y"),d=r("W9AN"),f=r("+8pU"),p=r("M3M6"),h=r("6q60"),m=r("ZfBw"),g=r("cwku"),y=r("wCeY"),v=r("6l0j"),b=r("DFFc"),_=r("nKUr");const x=["className"],w=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],A=(0,u.Ay)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters,!r.disablePadding&&t.padding,r.button&&t.button,r.hasSecondaryAction&&t.secondaryAction]}})(({theme:e,ownerState:t})=>(0,o.A)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&(0,o.A)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${v.A.root}`]:{paddingRight:48}},{[`&.${y.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${y.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${y.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${y.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${y.A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),S=(0,u.Ay)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),C=i.forwardRef(function(e,t){const r=(0,d.b)({props:e,name:"MuiListItem"}),{alignItems:l="center",autoFocus:u=!1,button:v=!1,children:C,className:E,component:T,components:I={},componentsProps:k={},ContainerComponent:M="li",ContainerProps:{className:R}={},dense:P=!1,disabled:O=!1,disableGutters:D=!1,disablePadding:L=!1,divider:N=!1,focusVisibleClassName:F,secondaryAction:z,selected:B=!1,slotProps:j={},slots:$={}}=r,U=(0,n.A)(r.ContainerProps,x),V=(0,n.A)(r,w),H=i.useContext(g.A),G=i.useMemo(()=>({dense:P||H.dense||!1,alignItems:l,disableGutters:D}),[l,H.dense,P,D]),W=i.useRef(null);(0,h.A)(()=>{u&&W.current&&W.current.focus()},[u]);const q=i.Children.toArray(C),Z=q.length&&(0,p.A)(q[q.length-1],["ListItemSecondaryAction"]),Y=(0,o.A)({},r,{alignItems:l,autoFocus:u,button:v,dense:G.dense,disabled:O,disableGutters:D,disablePadding:L,divider:N,hasSecondaryAction:Z,selected:B}),X=(e=>{const{alignItems:t,button:r,classes:n,dense:o,disabled:i,disableGutters:a,disablePadding:l,divider:c,hasSecondaryAction:u,selected:d}=e,f={root:["root",o&&"dense",!a&&"gutters",!l&&"padding",c&&"divider",i&&"disabled",r&&"button","flex-start"===t&&"alignItemsFlexStart",u&&"secondaryAction",d&&"selected"],container:["container"]};return(0,s.A)(f,y._,n)})(Y),K=(0,m.A)(W,t),J=$.root||I.Root||A,Q=j.root||k.root||{},ee=(0,o.A)({className:(0,a.A)(X.root,Q.className,E),disabled:O},V);let te=T||"li";return v&&(ee.component=T||"div",ee.focusVisibleClassName=(0,a.A)(y.A.focusVisible,F),te=f.A),Z?(te=ee.component||T?te:"div","li"===M&&("li"===te?te="div":"li"===ee.component&&(ee.component="div")),(0,_.jsx)(g.A.Provider,{value:G,children:(0,_.jsxs)(S,(0,o.A)({as:M,className:(0,a.A)(X.container,R),ref:K,ownerState:Y},U,{children:[(0,_.jsx)(J,(0,o.A)({},Q,!(0,c.A)(J)&&{as:te,ownerState:(0,o.A)({},Y,Q.ownerState)},ee,{children:q})),q.pop()]}))})):(0,_.jsx)(g.A.Provider,{value:G,children:(0,_.jsxs)(J,(0,o.A)({},Q,{as:te,ref:K},!(0,c.A)(J)&&{ownerState:(0,o.A)({},Y,Q.ownerState)},ee,{children:[q,z&&(0,_.jsx)(b.A,{children:z})]}))})})},wCeY(e,t,r){"use strict";r.d(t,{A:()=>a,_:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItem",e)}const a=(0,n.A)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"])},a6xD(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("cwku"),c=r("Vn7y"),u=r("W9AN"),d=r("FUPx"),f=r("nKUr");const p=["className"],h=(0,c.Ay)("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})(({ownerState:e})=>(0,o.A)({minWidth:56,flexShrink:0},"flex-start"===e.alignItems&&{marginTop:8})),m=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiListItemAvatar"}),{className:c}=r,m=(0,n.A)(r,p),g=i.useContext(l.A),y=(0,o.A)({},r,{alignItems:g.alignItems}),v=(e=>{const{alignItems:t,classes:r}=e,n={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,s.A)(n,d.Z,r)})(y);return(0,f.jsx)(h,(0,o.A)({className:(0,a.A)(v.root,c),ownerState:y,ref:t},m))})},FUPx(e,t,r){"use strict";r.d(t,{A:()=>a,Z:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItemAvatar",e)}const a=(0,n.A)("MuiListItemAvatar",["root","alignItemsFlexStart"])},"6l0j"(e,t,r){"use strict";r.d(t,{A:()=>a,Y:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItemButton",e)}const a=(0,n.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"])},mkGA(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("xkXe"),d=r("cwku"),f=r("nKUr");const p=["className"],h=(0,l.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>(0,o.A)({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),m=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiListItemIcon"}),{className:l}=r,m=(0,n.A)(r,p),g=i.useContext(d.A),y=(0,o.A)({},r,{alignItems:g.alignItems}),v=(e=>{const{alignItems:t,classes:r}=e,n={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,s.A)(n,u.f,r)})(y);return(0,f.jsx)(h,(0,o.A)({className:(0,a.A)(v.root,l),ownerState:y,ref:t},m))})},xkXe(e,t,r){"use strict";r.d(t,{A:()=>a,f:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItemIcon",e)}const a=(0,n.A)("MuiListItemIcon",["root","alignItemsFlexStart"])},DFFc(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("cwku"),d=r("RD6q"),f=r("nKUr");const p=["className"],h=(0,l.Ay)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.disableGutters&&t.disableGutters]}})(({ownerState:e})=>(0,o.A)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),m=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiListItemSecondaryAction"}),{className:l}=r,m=(0,n.A)(r,p),g=i.useContext(u.A),y=(0,o.A)({},r,{disableGutters:g.disableGutters}),v=(e=>{const{disableGutters:t,classes:r}=e,n={root:["root",t&&"disableGutters"]};return(0,s.A)(n,d.g,r)})(y);return(0,f.jsx)(h,(0,o.A)({className:(0,a.A)(v.root,l),ownerState:y,ref:t},m))});m.muiName="ListItemSecondaryAction";const g=m},RD6q(e,t,r){"use strict";r.d(t,{A:()=>a,g:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItemSecondaryAction",e)}const a=(0,n.A)("MuiListItemSecondaryAction",["root","disableGutters"])},T4Ez(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Gqia"),c=r("cwku"),u=r("W9AN"),d=r("Vn7y"),f=r("R6o4"),p=r("nKUr");const h=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],m=(0,d.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${f.A.primary}`]:t.primary},{[`& .${f.A.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})(({ownerState:e})=>(0,o.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),g=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiListItemText"}),{children:d,className:g,disableTypography:y=!1,inset:v=!1,primary:b,primaryTypographyProps:_,secondary:x,secondaryTypographyProps:w}=r,A=(0,n.A)(r,h),{dense:S}=i.useContext(c.A);let C=null!=b?b:d,E=x;const T=(0,o.A)({},r,{disableTypography:y,inset:v,primary:!!C,secondary:!!E,dense:S}),I=(e=>{const{classes:t,inset:r,primary:n,secondary:o,dense:i}=e,a={root:["root",r&&"inset",i&&"dense",n&&o&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,s.A)(a,f.b,t)})(T);return null==C||C.type===l.A||y||(C=(0,p.jsx)(l.A,(0,o.A)({variant:S?"body2":"body1",className:I.primary,component:null!=_&&_.variant?void 0:"span",display:"block"},_,{children:C}))),null==E||E.type===l.A||y||(E=(0,p.jsx)(l.A,(0,o.A)({variant:"body2",className:I.secondary,color:"text.secondary",display:"block"},w,{children:E}))),(0,p.jsxs)(m,(0,o.A)({className:(0,a.A)(I.root,g),ownerState:T,ref:t},A,{children:[C,E]}))})},R6o4(e,t,r){"use strict";r.d(t,{A:()=>a,b:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItemText",e)}const a=(0,n.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"])},BkAX(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("xeev"),d=r("cXnk"),f=r("nKUr");const p=["className","color","component","disableGutters","disableSticky","inset"],h=(0,l.Ay)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"default"!==r.color&&t[`color${(0,u.A)(r.color)}`],!r.disableGutters&&t.gutters,r.inset&&t.inset,!r.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>(0,o.A)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},"primary"===t.color&&{color:(e.vars||e).palette.primary.main},"inherit"===t.color&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),m=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiListSubheader"}),{className:i,color:l="default",component:m="li",disableGutters:g=!1,disableSticky:y=!1,inset:v=!1}=r,b=(0,n.A)(r,p),_=(0,o.A)({},r,{color:l,component:m,disableGutters:g,disableSticky:y,inset:v}),x=(e=>{const{classes:t,color:r,disableGutters:n,inset:o,disableSticky:i}=e,a={root:["root","default"!==r&&`color${(0,u.A)(r)}`,!n&&"gutters",o&&"inset",!i&&"sticky"]};return(0,s.A)(a,d.g,t)})(_);return(0,f.jsx)(h,(0,o.A)({as:m,className:(0,a.A)(x.root,i),ref:t,ownerState:_},b))});m.muiSkipListHighlight=!0;const g=m},cXnk(e,t,r){"use strict";r.d(t,{A:()=>a,g:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListSubheader",e)}const a=(0,n.A)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"])},"4enW"(e,t,r){"use strict";r.d(t,{A:()=>S});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("St5x"),c=r("0Ydi"),u=r("IXjO"),d=r("FZC7"),f=r("Vn7y"),p=r("XM18"),h=r("W9AN"),m=r("k/XA"),g=r("nKUr");const y=["onEntering"],v=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],b={vertical:"top",horizontal:"right"},_={vertical:"top",horizontal:"left"},x=(0,f.Ay)(d.Ay,{shouldForwardProp:e=>(0,p.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),w=(0,f.Ay)(d.IJ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),A=(0,f.Ay)(u.A,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),S=i.forwardRef(function(e,t){var r,u;const d=(0,h.b)({props:e,name:"MuiMenu"}),{autoFocus:f=!0,children:p,className:S,disableAutoFocusItem:C=!1,MenuListProps:E={},onClose:T,open:I,PaperProps:k={},PopoverClasses:M,transitionDuration:R="auto",TransitionProps:{onEntering:P}={},variant:O="selectedMenu",slots:D={},slotProps:L={}}=d,N=(0,o.A)(d.TransitionProps,y),F=(0,o.A)(d,v),z=(0,l.I)(),B=(0,n.A)({},d,{autoFocus:f,disableAutoFocusItem:C,MenuListProps:E,onEntering:P,PaperProps:k,transitionDuration:R,TransitionProps:N,variant:O}),j=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],paper:["paper"],list:["list"]},m.e,t)})(B),$=f&&!C&&I,U=i.useRef(null);let V=-1;i.Children.map(p,(e,t)=>{i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===O&&e.props.selected||-1===V)&&(V=t))});const H=null!=(r=D.paper)?r:w,G=null!=(u=L.paper)?u:k,W=(0,c.A)({elementType:D.root,externalSlotProps:L.root,ownerState:B,className:[j.root,S]}),q=(0,c.A)({elementType:H,externalSlotProps:G,ownerState:B,className:j.paper});return(0,g.jsx)(x,(0,n.A)({onClose:T,anchorOrigin:{vertical:"bottom",horizontal:z?"right":"left"},transformOrigin:z?b:_,slots:{paper:H,root:D.root},slotProps:{root:W,paper:q},open:I,ref:t,transitionDuration:R,TransitionProps:(0,n.A)({onEntering:(e,t)=>{U.current&&U.current.adjustStyleForScrollbar(e,{direction:z?"rtl":"ltr"}),P&&P(e,t)}},N),ownerState:B},F,{classes:M,children:(0,g.jsx)(A,(0,n.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),T&&T(e,"tabKeyDown"))},actions:U,autoFocus:f&&(-1===V||C),autoFocusItem:$,variant:O},E,{className:(0,a.A)(j.list,E.className),children:p}))}))})},"k/XA"(e,t,r){"use strict";r.d(t,{A:()=>a,e:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiMenu",e)}const a=(0,n.A)("MuiMenu",["root","paper","list"])},LutX(e,t,r){"use strict";r.d(t,{A:()=>A});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("XM18"),d=r("W9AN"),f=r("cwku"),p=r("+8pU"),h=r("6q60"),m=r("ZfBw"),g=r("WOV/"),y=r("xkXe"),v=r("R6o4"),b=r("BCtw"),_=r("nKUr");const x=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],w=(0,c.Ay)(p.A,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>(0,o.A)({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${b.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${b.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${b.A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${b.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${b.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${g.A.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${g.A.inset}`]:{marginLeft:52},[`& .${v.A.root}`]:{marginTop:0,marginBottom:0},[`& .${v.A.inset}`]:{paddingLeft:36},[`& .${y.A.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&(0,o.A)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${y.A.root} svg`]:{fontSize:"1.25rem"}}))),A=i.forwardRef(function(e,t){const r=(0,d.b)({props:e,name:"MuiMenuItem"}),{autoFocus:l=!1,component:c="li",dense:u=!1,divider:p=!1,disableGutters:g=!1,focusVisibleClassName:y,role:v="menuitem",tabIndex:A,className:S}=r,C=(0,n.A)(r,x),E=i.useContext(f.A),T=i.useMemo(()=>({dense:u||E.dense||!1,disableGutters:g}),[E.dense,u,g]),I=i.useRef(null);(0,h.A)(()=>{l&&I.current&&I.current.focus()},[l]);const k=(0,o.A)({},r,{dense:T.dense,divider:p,disableGutters:g}),M=(e=>{const{disabled:t,dense:r,divider:n,disableGutters:i,selected:a,classes:l}=e,c={root:["root",r&&"dense",t&&"disabled",!i&&"gutters",n&&"divider",a&&"selected"]},u=(0,s.A)(c,b.Z,l);return(0,o.A)({},l,u)})(r),R=(0,m.A)(I,t);let P;return r.disabled||(P=void 0!==A?A:-1),(0,_.jsx)(f.A.Provider,{value:T,children:(0,_.jsx)(w,(0,o.A)({ref:R,role:v,tabIndex:P,component:c,focusVisibleClassName:(0,a.A)(M.focusVisible,y),className:(0,a.A)(M.root,S)},C,{ownerState:k,classes:M}))})})},BCtw(e,t,r){"use strict";r.d(t,{A:()=>a,Z:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiMenuItem",e)}const a=(0,n.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"])},IXjO(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("rdfb"),s=r("H9le");const l=r("Omxi").A;var c=r("ZfBw"),u=r("6q60"),d=r("nKUr");const f=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function p(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function h(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function m(e,t){if(void 0===t)return!0;let r=e.innerText;return void 0===r&&(r=e.textContent),r=r.trim().toLowerCase(),0!==r.length&&(t.repeating?r[0]===t.keys[0]:0===r.indexOf(t.keys.join("")))}function g(e,t,r,n,o,i){let a=!1,s=o(e,t,!!t&&r);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!n&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&m(s,i)&&!t)return s.focus(),!0;s=o(e,s,r)}return!1}const y=i.forwardRef(function(e,t){const{actions:r,autoFocus:y=!1,autoFocusItem:v=!1,children:b,className:_,disabledItemsFocusable:x=!1,disableListWrap:w=!1,onKeyDown:A,variant:S="selectedMenu"}=e,C=(0,o.A)(e,f),E=i.useRef(null),T=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,u.A)(()=>{y&&E.current.focus()},[y]),i.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const r=!E.current.style.width;if(e.clientHeight{i.isValidElement(e)?(e.props.disabled||("selectedMenu"===S&&e.props.selected||-1===k)&&(k=t),k===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(k+=1,k>=b.length&&(k=-1))):k===t&&(k+=1,k>=b.length&&(k=-1))});const M=i.Children.map(b,(e,t)=>{if(t===k){const t={};return v&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===S&&(t.tabIndex=0),i.cloneElement(e,t)}return e});return(0,d.jsx)(s.A,(0,n.A)({role:"menu",ref:I,className:_,onKeyDown:e=>{const t=E.current,r=e.key,n=(0,a.A)(t).activeElement;if("ArrowDown"===r)e.preventDefault(),g(t,n,w,x,p);else if("ArrowUp"===r)e.preventDefault(),g(t,n,w,x,h);else if("Home"===r)e.preventDefault(),g(t,null,w,x,p);else if("End"===r)e.preventDefault(),g(t,null,w,x,h);else if(1===r.length){const o=T.current,i=r.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=n&&!o.repeating&&m(n,o);o.previousKeyMatched&&(s||g(t,n,!1,x,p,o))?e.preventDefault():o.previousKeyMatched=!1}A&&A(e)},tabIndex:y?0:-1},C,{children:M}))})},X6EC(e,t,r){"use strict";r.d(t,{A:()=>E});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("0Ydi"),c=r("qSC9"),u=r("Cc46"),d=r("Vn7y"),f=r("W9AN"),p=r("Sk+A"),h=r("N0rN"),m=r("p4lV"),g=r("nXnS"),y=r("zhWT"),v=r("OrJ7"),b=r("fEft");const _=new b.P;var x=r("bEEB"),w=r("nKUr");const A=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],S=(0,d.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>(0,o.A)({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),C=(0,d.Ay)(p.A,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),E=i.forwardRef(function(e,t){var r,d,p,E,T,I;const k=(0,f.b)({name:"MuiModal",props:e}),{BackdropComponent:M=C,BackdropProps:R,className:P,closeAfterTransition:O=!1,children:D,container:L,component:N,components:F={},componentsProps:z={},disableAutoFocus:B=!1,disableEnforceFocus:j=!1,disableEscapeKeyDown:$=!1,disablePortal:U=!1,disableRestoreFocus:V=!1,disableScrollLock:H=!1,hideBackdrop:G=!1,keepMounted:W=!1,onBackdropClick:q,open:Z,slotProps:Y,slots:X}=k,K=(0,n.A)(k,A),J=(0,o.A)({},k,{closeAfterTransition:O,disableAutoFocus:B,disableEnforceFocus:j,disableEscapeKeyDown:$,disablePortal:U,disableRestoreFocus:V,disableScrollLock:H,hideBackdrop:G,keepMounted:W}),{getRootProps:Q,getBackdropProps:ee,getTransitionProps:te,portalRef:re,isTopModal:ne,exited:oe,hasTransition:ie}=function(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,manager:a=_,closeAfterTransition:s=!1,onTransitionEnter:l,onTransitionExited:c,children:u,onClose:d,open:f,rootRef:p}=e,x=i.useRef({}),w=i.useRef(null),A=i.useRef(null),S=(0,h.A)(A,p),[C,E]=i.useState(!f),T=function(e){return!!e&&e.props.hasOwnProperty("in")}(u);let I=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(I=!1);const k=()=>(x.current.modalRef=A.current,x.current.mount=w.current,x.current),M=()=>{a.mount(k(),{disableScrollLock:n}),A.current&&(A.current.scrollTop=0)},R=(0,g.A)(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,m.A)(w.current).body;a.add(k(),e),A.current&&M()}),P=i.useCallback(()=>a.isTopModal(k()),[a]),O=(0,g.A)(e=>{w.current=e,e&&(f&&P()?M():A.current&&(0,b.M)(A.current,I))}),D=i.useCallback(()=>{a.remove(k(),I)},[I,a]);i.useEffect(()=>()=>{D()},[D]),i.useEffect(()=>{f?R():T&&s||D()},[f,D,T,s,R]);const L=e=>t=>{var n;null==(n=e.onKeyDown)||n.call(e,t),"Escape"===t.key&&229!==t.which&&P()&&(r||(t.stopPropagation(),d&&d(t,"escapeKeyDown")))},N=e=>t=>{var r;null==(r=e.onClick)||r.call(e,t),t.target===t.currentTarget&&d&&d(t,"backdropClick")};return{getRootProps:(t={})=>{const r=(0,v.A)(e);delete r.onTransitionEnter,delete r.onTransitionExited;const n=(0,o.A)({},r,t);return(0,o.A)({role:"presentation"},n,{onKeyDown:L(n),ref:S})},getBackdropProps:(e={})=>{const t=e;return(0,o.A)({"aria-hidden":!0},t,{onClick:N(t),open:f})},getTransitionProps:()=>({onEnter:(0,y.A)(()=>{E(!1),l&&l()},null==u?void 0:u.props.onEnter),onExited:(0,y.A)(()=>{E(!0),c&&c(),s&&D()},null==u?void 0:u.props.onExited)}),rootRef:S,portalRef:O,isTopModal:P,exited:C,hasTransition:T}}((0,o.A)({},J,{rootRef:t})),ae=(0,o.A)({},J,{exited:oe}),se=(e=>{const{open:t,exited:r,classes:n}=e,o={root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]};return(0,s.A)(o,x.M,n)})(ae),le={};if(void 0===D.props.tabIndex&&(le.tabIndex="-1"),ie){const{onEnter:e,onExited:t}=te();le.onEnter=e,le.onExited=t}const ce=null!=(r=null!=(d=null==X?void 0:X.root)?d:F.Root)?r:S,ue=null!=(p=null!=(E=null==X?void 0:X.backdrop)?E:F.Backdrop)?p:M,de=null!=(T=null==Y?void 0:Y.root)?T:z.root,fe=null!=(I=null==Y?void 0:Y.backdrop)?I:z.backdrop,pe=(0,l.A)({elementType:ce,externalSlotProps:de,externalForwardedProps:K,getSlotProps:Q,additionalProps:{ref:t,as:N},ownerState:ae,className:(0,a.A)(P,null==de?void 0:de.className,null==se?void 0:se.root,!ae.open&&ae.exited&&(null==se?void 0:se.hidden))}),he=(0,l.A)({elementType:ue,externalSlotProps:fe,additionalProps:R,getSlotProps:e=>ee((0,o.A)({},e,{onClick:t=>{q&&q(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,a.A)(null==fe?void 0:fe.className,null==R?void 0:R.className,null==se?void 0:se.backdrop),ownerState:ae});return W||Z||ie&&!oe?(0,w.jsx)(u.A,{ref:re,container:L,disablePortal:U,children:(0,w.jsxs)(ce,(0,o.A)({},pe,{children:[!G&&M?(0,w.jsx)(ue,(0,o.A)({},he)):null,(0,w.jsx)(c.A,{disableEnforceFocus:j,disableAutoFocus:B,disableRestoreFocus:V,isEnabled:ne,open:Z,children:i.cloneElement(D,le)})]}))}):null})},fEft(e,t,r){"use strict";r.d(t,{M:()=>a,P:()=>u});var n=r("p4lV"),o=r("4bZc"),i=r("Omxi");function a(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function s(e){return parseInt((0,o.A)(e).getComputedStyle(e).paddingRight,10)||0}function l(e,t,r,n,o){const i=[t,r,...n];[].forEach.call(e.children,e=>{const t=-1===i.indexOf(e),r=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),r="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||r}(e);t&&r&&a(e,o)})}function c(e,t){let r=-1;return e.some((e,n)=>!!t(e)&&(r=n,!0)),r}class u{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&a(e.modalRef,!1);const n=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);l(t,e.mount,e.modalRef,n,!0);const o=c(this.containers,e=>e.container===t);return-1!==o?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),r)}mount(e,t){const r=c(this.containers,t=>-1!==t.modals.indexOf(e)),a=this.containers[r];a.restore||(a.restore=function(e,t){const r=[],a=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,n.A)(e);return t.body===e?(0,o.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(a)){const e=(0,i.A)((0,n.A)(a));r.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${s(a)+e}px`;const t=(0,n.A)(a).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{r.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${s(t)+e}px`})}let e;if(a.parentNode instanceof DocumentFragment)e=(0,n.A)(a).body;else{const t=a.parentElement,r=(0,o.A)(a);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===r.getComputedStyle(t).overflowY?t:a}r.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{r.forEach(({value:e,el:t,property:r})=>{e?t.style.setProperty(r,e):t.style.removeProperty(r)})}}(a,t))}remove(e,t=!0){const r=this.modals.indexOf(e);if(-1===r)return r;const n=c(this.containers,t=>-1!==t.modals.indexOf(e)),o=this.containers[n];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&a(e.modalRef,t),l(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(n,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&a(e.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}},bEEB(e,t,r){"use strict";r.d(t,{A:()=>a,M:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiModal",e)}const a=(0,n.A)("MuiModal",["root","hidden","backdrop"])},"82Iz"(e,t,r){"use strict";r.d(t,{Ay:()=>v,Ku:()=>h,XV:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("xeev"),c=r("F/mX"),u=r("Vn7y"),d=r("XM18"),f=r("nKUr");const p=["className","disabled","error","IconComponent","inputRef","variant"],h=({ownerState:e,theme:t})=>(0,o.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,o.A)({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${c.A.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),m=(0,u.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:d.A,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.select,t[r.variant],r.error&&t.error,{[`&.${c.A.multiple}`]:t.multiple}]}})(h),g=({ownerState:e,theme:t})=>(0,o.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${c.A.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),y=(0,u.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${(0,l.A)(r.variant)}`],r.open&&t.iconOpen]}})(g),v=i.forwardRef(function(e,t){const{className:r,disabled:u,error:d,IconComponent:h,inputRef:g,variant:v="standard"}=e,b=(0,n.A)(e,p),_=(0,o.A)({},e,{disabled:u,variant:v,error:d}),x=(e=>{const{classes:t,variant:r,disabled:n,multiple:o,open:i,error:a}=e,u={select:["select",r,n&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${(0,l.A)(r)}`,i&&"iconOpen",n&&"disabled"]};return(0,s.A)(u,c.w,t)})(_);return(0,f.jsxs)(i.Fragment,{children:[(0,f.jsx)(m,(0,o.A)({ownerState:_,className:(0,a.A)(x.select,r),disabled:u,ref:g||t},b)),e.multiple?null:(0,f.jsx)(y,{as:h,ownerState:_,className:x.icon})]})})},"F/mX"(e,t,r){"use strict";r.d(t,{A:()=>a,w:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiNativeSelect",e)}const a=(0,n.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"])},"6j3M"(e,t,r){"use strict";r.d(t,{A:()=>S});var n,o=r("Nlia"),i=r("+9dH"),a=r("q1tI"),s=r("aGM9"),l=r("Vn7y"),c=r("XM18"),u=r("nKUr");const d=["children","classes","className","label","notched"],f=(0,l.Ay)("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:c.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),p=(0,l.Ay)("legend",{name:"MuiNotchedOutlined",shouldForwardProp:c.A})(({ownerState:e,theme:t})=>(0,i.A)({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&(0,i.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));var h=r("7EOP"),m=r("1ODS"),g=r("y9Q0"),y=r("kmWS"),v=r("W9AN");const b=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],_=(0,l.Ay)(y.Sh,{shouldForwardProp:e=>(0,c.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:y.WC})(({theme:e,ownerState:t})=>{const r="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,i.A)({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${g.A.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${g.A.focused} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${g.A.error} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${g.A.disabled} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&(0,i.A)({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))}),x=(0,l.Ay)(function(e){const{className:t,label:r,notched:a}=e,s=(0,o.A)(e,d),l=null!=r&&""!==r,c=(0,i.A)({},e,{notched:a,withLabel:l});return(0,u.jsx)(f,(0,i.A)({"aria-hidden":!0,className:t,ownerState:c},s,{children:(0,u.jsx)(p,{ownerState:c,children:l?(0,u.jsx)("span",{children:r}):n||(n=(0,u.jsx)("span",{className:"notranslate",children:"​"}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),w=(0,l.Ay)(y.f3,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:y.Oj})(({theme:e,ownerState:t})=>(0,i.A)({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),A=a.forwardRef(function(e,t){var r,n,l,c,d;const f=(0,v.b)({props:e,name:"MuiOutlinedInput"}),{components:p={},fullWidth:A=!1,inputComponent:S="input",label:C,multiline:E=!1,notched:T,slots:I={},type:k="text"}=f,M=(0,o.A)(f,b),R=(e=>{const{classes:t}=e,r=(0,s.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},g.v,t);return(0,i.A)({},t,r)})(f),P=(0,h.A)(),O=(0,m.A)({props:f,muiFormControl:P,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),D=(0,i.A)({},f,{color:O.color||"primary",disabled:O.disabled,error:O.error,focused:O.focused,formControl:P,fullWidth:A,hiddenLabel:O.hiddenLabel,multiline:E,size:O.size,type:k}),L=null!=(r=null!=(n=I.root)?n:p.Root)?r:_,N=null!=(l=null!=(c=I.input)?c:p.Input)?l:w;return(0,u.jsx)(y.Ay,(0,i.A)({slots:{root:L,input:N},renderSuffix:e=>(0,u.jsx)(x,{ownerState:D,className:R.notchedOutline,label:null!=C&&""!==C&&O.required?d||(d=(0,u.jsxs)(a.Fragment,{children:[C," ","*"]})):C,notched:void 0!==T?T:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:A,inputComponent:S,multiline:E,ref:t,type:k},M,{classes:(0,i.A)({},R,{notchedOutline:null})}))});A.muiName="Input";const S=A},y9Q0(e,t,r){"use strict";r.d(t,{A:()=>l,v:()=>s});var n=r("+9dH"),o=r("PYeY"),i=r("TkYO"),a=r("G5wc");function s(e){return(0,i.Ay)("MuiOutlinedInput",e)}const l=(0,n.A)({},a.A,(0,o.A)("MuiOutlinedInput",["root","notchedOutline","input"]))},xbkH(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("mUtR"),u=r("SxDb"),d=r("FHEq"),f=r("Vn7y"),p=r("nKUr");const h=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],m=(0,f.Ay)("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant]]}})({}),g=(0,f.Ay)("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function y(e,t,r){return"page"===e?`${r?"":"Go to "}page ${t}`:`Go to ${e} page`}const v=i.forwardRef(function(e,t){const r=(0,l.b)({props:e,name:"MuiPagination"}),{boundaryCount:i=1,className:f,color:v="standard",count:b=1,defaultPage:_=1,disabled:x=!1,getItemAriaLabel:w=y,hideNextButton:A=!1,hidePrevButton:S=!1,renderItem:C=e=>(0,p.jsx)(d.A,(0,n.A)({},e)),shape:E="circular",showFirstButton:T=!1,showLastButton:I=!1,siblingCount:k=1,size:M="medium",variant:R="text"}=r,P=(0,o.A)(r,h),{items:O}=(0,u.A)((0,n.A)({},r,{componentName:"Pagination"})),D=(0,n.A)({},r,{boundaryCount:i,color:v,count:b,defaultPage:_,disabled:x,getItemAriaLabel:w,hideNextButton:A,hidePrevButton:S,renderItem:C,shape:E,showFirstButton:T,showLastButton:I,siblingCount:k,size:M,variant:R}),L=(e=>{const{classes:t,variant:r}=e,n={root:["root",r],ul:["ul"]};return(0,s.A)(n,c.B,t)})(D);return(0,p.jsx)(m,(0,n.A)({"aria-label":"pagination navigation",className:(0,a.A)(L.root,f),ownerState:D,ref:t},P,{children:(0,p.jsx)(g,{className:L.ul,ownerState:D,children:O.map((e,t)=>(0,p.jsx)("li",{children:C((0,n.A)({},e,{color:v,"aria-label":w(e.type,e.page,e.selected),shape:E,size:M,variant:R}))},t))})}))})},mUtR(e,t,r){"use strict";r.d(t,{A:()=>a,B:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiPagination",e)}const a=(0,n.A)("MuiPagination",["root","ul","outlined","text"])},FHEq(e,t,r){"use strict";r.d(t,{A:()=>E});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("St5x"),u=r("W9AN"),d=r("d8wY"),f=r("+8pU"),p=r("xeev"),h=r("Be/P"),m=r("/0Dp"),g=r("M7pN"),y=r("nKUr");const v=(0,g.A)((0,y.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),b=(0,g.A)((0,y.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");var _=r("Vn7y");const x=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],w=(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,p.A)(r.size)}`],"text"===r.variant&&t[`text${(0,p.A)(r.color)}`],"outlined"===r.variant&&t[`outlined${(0,p.A)(r.color)}`],"rounded"===r.shape&&t.rounded,"page"===r.type&&t.page,("start-ellipsis"===r.type||"end-ellipsis"===r.type)&&t.ellipsis,("previous"===r.type||"next"===r.type)&&t.previousNext,("first"===r.type||"last"===r.type)&&t.firstLast]},A=(0,_.Ay)("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:w})(({theme:e,ownerState:t})=>(0,o.A)({},e.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${d.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"small"===t.size&&{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===t.size&&{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:e.typography.pxToRem(15)})),S=(0,_.Ay)(f.A,{name:"MuiPaginationItem",slot:"Root",overridesResolver:w})(({theme:e,ownerState:t})=>(0,o.A)({},e.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${d.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${d.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${d.A.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${d.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${d.A.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}}},"small"===t.size&&{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===t.size&&{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:e.typography.pxToRem(15)},"rounded"===t.shape&&{borderRadius:(e.vars||e).shape.borderRadius}),({theme:e,ownerState:t})=>(0,o.A)({},"text"===t.variant&&{[`&.${d.A.selected}`]:(0,o.A)({},"standard"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}},[`&.${d.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}},{[`&.${d.A.disabled}`]:{color:(e.vars||e).palette.action.disabled}})},"outlined"===t.variant&&{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${d.A.selected}`]:(0,o.A)({},"standard"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:(0,l.X4)(e.palette[t.color].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:(0,l.X4)(e.palette[t.color].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette[t.color].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${d.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette[t.color].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}},{[`&.${d.A.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}})})),C=(0,_.Ay)("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(({theme:e,ownerState:t})=>(0,o.A)({fontSize:e.typography.pxToRem(20),margin:"0 -8px"},"small"===t.size&&{fontSize:e.typography.pxToRem(18)},"large"===t.size&&{fontSize:e.typography.pxToRem(22)})),E=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiPaginationItem"}),{className:i,color:l="standard",component:f,components:g={},disabled:_=!1,page:w,selected:E=!1,shape:T="circular",size:I="medium",slots:k={},type:M="page",variant:R="text"}=r,P=(0,n.A)(r,x),O=(0,o.A)({},r,{color:l,disabled:_,selected:E,shape:T,size:I,type:M,variant:R}),D=(0,c.I)(),L=(e=>{const{classes:t,color:r,disabled:n,selected:o,size:i,shape:a,type:l,variant:c}=e,u={root:["root",`size${(0,p.A)(i)}`,c,a,"standard"!==r&&`color${(0,p.A)(r)}`,"standard"!==r&&`${c}${(0,p.A)(r)}`,n&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[l]],icon:["icon"]};return(0,s.A)(u,d.q,t)})(O),N=(D?{previous:k.next||g.next||b,next:k.previous||g.previous||v,last:k.first||g.first||h.A,first:k.last||g.last||m.A}:{previous:k.previous||g.previous||v,next:k.next||g.next||b,first:k.first||g.first||h.A,last:k.last||g.last||m.A})[M];return"start-ellipsis"===M||"end-ellipsis"===M?(0,y.jsx)(A,{ref:t,ownerState:O,className:(0,a.A)(L.root,i),children:"…"}):(0,y.jsxs)(S,(0,o.A)({ref:t,ownerState:O,component:f,disabled:_,className:(0,a.A)(L.root,i)},P,{children:["page"===M&&w,N?(0,y.jsx)(C,{as:N,ownerState:O,className:L.icon}):null]}))})},d8wY(e,t,r){"use strict";r.d(t,{A:()=>a,q:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiPaginationItem",e)}const a=(0,n.A)("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"])},"G43+"(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("UwZ0"),d=r("W9AN"),f=r("ntv0"),p=r("nKUr");const h=["className","component","elevation","square","variant"],m=(0,c.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,"elevation"===r.variant&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return(0,o.A)({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&(0,o.A)({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${(0,l.X4)("#fff",(0,u.A)(t.elevation))}, ${(0,l.X4)("#fff",(0,u.A)(t.elevation))})`},e.vars&&{backgroundImage:null==(r=e.vars.overlays)?void 0:r[t.elevation]}))}),g=i.forwardRef(function(e,t){const r=(0,d.b)({props:e,name:"MuiPaper"}),{className:i,component:l="div",elevation:c=1,square:u=!1,variant:g="elevation"}=r,y=(0,n.A)(r,h),v=(0,o.A)({},r,{component:l,elevation:c,square:u,variant:g}),b=(e=>{const{square:t,elevation:r,variant:n,classes:o}=e,i={root:["root",n,!t&&"rounded","elevation"===n&&`elevation${r}`]};return(0,s.A)(i,f.j,o)})(v);return(0,p.jsx)(m,(0,o.A)({as:l,ownerState:v,className:(0,a.A)(b.root,i),ref:t},y))})},ntv0(e,t,r){"use strict";r.d(t,{A:()=>a,j:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiPaper",e)}const a=(0,n.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"])},FZC7(e,t,r){"use strict";r.d(t,{Ay:()=>M,Dy:()=>S,IJ:()=>k,fB:()=>C,yt:()=>I});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("0Ydi"),c=r("gU+W"),u=r("Vn7y"),d=r("W9AN"),f=r("7yHM"),p=r("rdfb"),h=r("WFZb"),m=r("ZfBw"),g=r("UVCh"),y=r("X6EC"),v=r("G43+"),b=r("NzyO"),_=r("nKUr");const x=["onEntering"],w=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],A=["slotProps"];function S(e,t){let r=0;return"number"==typeof t?r=t:"center"===t?r=e.height/2:"bottom"===t&&(r=e.height),r}function C(e,t){let r=0;return"number"==typeof t?r=t:"center"===t?r=e.width/2:"right"===t&&(r=e.width),r}function E(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function T(e){return"function"==typeof e?e():e}const I=(0,u.Ay)(y.A,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),k=(0,u.Ay)(v.A,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),M=i.forwardRef(function(e,t){var r,u,y;const v=(0,d.b)({props:e,name:"MuiPopover"}),{action:M,anchorEl:R,anchorOrigin:P={vertical:"top",horizontal:"left"},anchorPosition:O,anchorReference:D="anchorEl",children:L,className:N,container:F,elevation:z=8,marginThreshold:B=16,open:j,PaperProps:$={},slots:U,slotProps:V,transformOrigin:H={vertical:"top",horizontal:"left"},TransitionComponent:G=g.A,transitionDuration:W="auto",TransitionProps:{onEntering:q}={},disableScrollLock:Z=!1}=v,Y=(0,o.A)(v.TransitionProps,x),X=(0,o.A)(v,w),K=null!=(r=null==V?void 0:V.paper)?r:$,J=i.useRef(),Q=(0,m.A)(J,K.ref),ee=(0,n.A)({},v,{anchorOrigin:P,anchorReference:D,elevation:z,marginThreshold:B,externalPaperSlotProps:K,transformOrigin:H,TransitionComponent:G,transitionDuration:W,TransitionProps:Y}),te=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],paper:["paper"]},b.K,t)})(ee),re=i.useCallback(()=>{if("anchorPosition"===D)return O;const e=T(R),t=(e&&1===e.nodeType?e:(0,p.A)(J.current).body).getBoundingClientRect();return{top:t.top+S(t,P.vertical),left:t.left+C(t,P.horizontal)}},[R,P.horizontal,P.vertical,O,D]),ne=i.useCallback(e=>({vertical:S(e,H.vertical),horizontal:C(e,H.horizontal)}),[H.horizontal,H.vertical]),oe=i.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},r=ne(t);if("none"===D)return{top:null,left:null,transformOrigin:E(r)};const n=re();let o=n.top-r.vertical,i=n.left-r.horizontal;const a=o+t.height,s=i+t.width,l=(0,h.A)(T(R)),c=l.innerHeight-B,u=l.innerWidth-B;if(null!==B&&oc){const e=a-c;o-=e,r.vertical+=e}if(null!==B&&iu){const e=s-u;i-=e,r.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:E(r)}},[R,D,re,ne,B]),[ie,ae]=i.useState(j),se=i.useCallback(()=>{const e=J.current;if(!e)return;const t=oe(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,ae(!0)},[oe]);i.useEffect(()=>(Z&&window.addEventListener("scroll",se),()=>window.removeEventListener("scroll",se)),[R,Z,se]),i.useEffect(()=>{j&&se()}),i.useImperativeHandle(M,()=>j?{updatePosition:()=>{se()}}:null,[j,se]),i.useEffect(()=>{if(!j)return;const e=(0,f.A)(()=>{se()}),t=(0,h.A)(R);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[R,j,se]);let le=W;"auto"!==W||G.muiSupportAuto||(le=void 0);const ce=F||(R?(0,p.A)(T(R)).body:void 0),ue=null!=(u=null==U?void 0:U.root)?u:I,de=null!=(y=null==U?void 0:U.paper)?y:k,fe=(0,l.A)({elementType:de,externalSlotProps:(0,n.A)({},K,{style:ie?K.style:(0,n.A)({},K.style,{opacity:0})}),additionalProps:{elevation:z,ref:Q},ownerState:ee,className:(0,a.A)(te.paper,null==K?void 0:K.className)}),pe=(0,l.A)({elementType:ue,externalSlotProps:(null==V?void 0:V.root)||{},externalForwardedProps:X,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:ce,open:j},ownerState:ee,className:(0,a.A)(te.root,N)}),{slotProps:he}=pe,me=(0,o.A)(pe,A);return(0,_.jsx)(ue,(0,n.A)({},me,!(0,c.A)(ue)&&{slotProps:he,disableScrollLock:Z},{children:(0,_.jsx)(G,(0,n.A)({appear:!0,in:j,onEntering:(e,t)=>{q&&q(e,t),se()},onExited:()=>{ae(!1)},timeout:le},Y,{children:(0,_.jsx)(de,(0,n.A)({},fe,{children:L}))}))}))})},NzyO(e,t,r){"use strict";r.d(t,{A:()=>a,K:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiPopover",e)}const a=(0,n.A)("MuiPopover",["root","paper"])},usZy(e,t,r){"use strict";r.d(t,{A:()=>Oe});var n=r("+9dH"),o=r("Nlia"),i=r("847q"),a=r("q1tI"),s=r("N0rN"),l=r("XgeM"),c=r("p4lV");function u(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function d(e){return e instanceof u(e).Element||e instanceof Element}function f(e){return e instanceof u(e).HTMLElement||e instanceof HTMLElement}function p(e){return"undefined"!=typeof ShadowRoot&&(e instanceof u(e).ShadowRoot||e instanceof ShadowRoot)}var h=Math.max,m=Math.min,g=Math.round;function y(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function v(){return!/^((?!chrome|android).)*safari/i.test(y())}function b(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&f(e)&&(o=e.offsetWidth>0&&g(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&g(n.height)/e.offsetHeight||1);var a=(d(e)?u(e):window).visualViewport,s=!v()&&r,l=(n.left+(s&&a?a.offsetLeft:0))/o,c=(n.top+(s&&a?a.offsetTop:0))/i,p=n.width/o,h=n.height/i;return{width:p,height:h,top:c,right:l+p,bottom:c+h,left:l,x:l,y:c}}function _(e){var t=u(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function x(e){return e?(e.nodeName||"").toLowerCase():null}function w(e){return((d(e)?e.ownerDocument:e.document)||window.document).documentElement}function A(e){return b(w(e)).left+_(e).scrollLeft}function S(e){return u(e).getComputedStyle(e)}function C(e){var t=S(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function E(e,t,r){void 0===r&&(r=!1);var n,o,i=f(t),a=f(t)&&function(e){var t=e.getBoundingClientRect(),r=g(t.width)/e.offsetWidth||1,n=g(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),s=w(t),l=b(e,a,r),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(i||!i&&!r)&&(("body"!==x(t)||C(s))&&(c=(n=t)!==u(n)&&f(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:_(n)),f(t)?((d=b(t,!0)).x+=t.clientLeft,d.y+=t.clientTop):s&&(d.x=A(s))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function T(e){var t=b(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function I(e){return"html"===x(e)?e:e.assignedSlot||e.parentNode||(p(e)?e.host:null)||w(e)}function k(e){return["html","body","#document"].indexOf(x(e))>=0?e.ownerDocument.body:f(e)&&C(e)?e:k(I(e))}function M(e,t){var r;void 0===t&&(t=[]);var n=k(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=u(n),a=o?[i].concat(i.visualViewport||[],C(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(M(I(a)))}function R(e){return["table","td","th"].indexOf(x(e))>=0}function P(e){return f(e)&&"fixed"!==S(e).position?e.offsetParent:null}function O(e){for(var t=u(e),r=P(e);r&&R(r)&&"static"===S(r).position;)r=P(r);return r&&("html"===x(r)||"body"===x(r)&&"static"===S(r).position)?t:r||function(e){var t=/firefox/i.test(y());if(/Trident/i.test(y())&&f(e)&&"fixed"===S(e).position)return null;var r=I(e);for(p(r)&&(r=r.host);f(r)&&["html","body"].indexOf(x(r))<0;){var n=S(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var D="top",L="bottom",N="right",F="left",z="auto",B=[D,L,N,F],j="start",$="end",U="viewport",V="popper",H=B.reduce(function(e,t){return e.concat([t+"-"+j,t+"-"+$])},[]),G=[].concat(B,[z]).reduce(function(e,t){return e.concat([t,t+"-"+j,t+"-"+$])},[]),W=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){r.has(e.name)||o(e)}),n}var Z={placement:"bottom",modifiers:[],strategy:"absolute"};function Y(){for(var e=arguments.length,t=new Array(e),r=0;r=0?"x":"y"}function te(e){var t,r=e.reference,n=e.element,o=e.placement,i=o?J(o):null,a=o?Q(o):null,s=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(i){case D:t={x:s,y:r.y-n.height};break;case L:t={x:s,y:r.y+r.height};break;case N:t={x:r.x+r.width,y:l};break;case F:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=i?ee(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case j:t[c]=t[c]-(r[u]/2-n[u]/2);break;case $:t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}var re={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,h=void 0===p?0:p,m=a.y,y=void 0===m?0:m,v="function"==typeof d?d({x:h,y}):{x:h,y};h=v.x,y=v.y;var b=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),x=F,A=D,C=window;if(c){var E=O(r),T="clientHeight",I="clientWidth";E===u(r)&&"static"!==S(E=w(r)).position&&"absolute"===s&&(T="scrollHeight",I="scrollWidth"),(o===D||(o===F||o===N)&&i===$)&&(A=L,y-=(f&&E===C&&C.visualViewport?C.visualViewport.height:E[T])-n.height,y*=l?1:-1),o!==F&&(o!==D&&o!==L||i!==$)||(x=N,h-=(f&&E===C&&C.visualViewport?C.visualViewport.width:E[I])-n.width,h*=l?1:-1)}var k,M=Object.assign({position:s},c&&re),R=!0===d?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:g(r*o)/o||0,y:g(n*o)/o||0}}({x:h,y},u(r)):{x:h,y};return h=R.x,y=R.y,l?Object.assign({},M,((k={})[A]=_?"0":"",k[x]=b?"0":"",k.transform=(C.devicePixelRatio||1)<=1?"translate("+h+"px, "+y+"px)":"translate3d("+h+"px, "+y+"px, 0)",k)):Object.assign({},M,((t={})[A]=_?y+"px":"",t[x]=b?h+"px":"",t.transform="",t))}var oe={left:"right",right:"left",bottom:"top",top:"bottom"};function ie(e){return e.replace(/left|right|bottom|top/g,function(e){return oe[e]})}var ae={start:"end",end:"start"};function se(e){return e.replace(/start|end/g,function(e){return ae[e]})}function le(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&p(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ce(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ue(e,t,r){return t===U?ce(function(e,t){var r=u(e),n=w(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=v();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+A(e),y:l}}(e,r)):d(t)?function(e,t){var r=b(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):ce(function(e){var t,r=w(e),n=_(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=h(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=h(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+A(e),l=-n.scrollTop;return"rtl"===S(o||r).direction&&(s+=h(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(w(e)))}function de(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function fe(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}function pe(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,i=r.strategy,a=void 0===i?e.strategy:i,s=r.boundary,l=void 0===s?"clippingParents":s,c=r.rootBoundary,u=void 0===c?U:c,p=r.elementContext,g=void 0===p?V:p,y=r.altBoundary,v=void 0!==y&&y,_=r.padding,A=void 0===_?0:_,C=de("number"!=typeof A?A:fe(A,B)),E=g===V?"reference":V,T=e.rects.popper,k=e.elements[v?E:g],R=function(e,t,r,n){var o="clippingParents"===t?function(e){var t=M(I(e)),r=["absolute","fixed"].indexOf(S(e).position)>=0&&f(e)?O(e):e;return d(r)?t.filter(function(e){return d(e)&&le(e,r)&&"body"!==x(e)}):[]}(e):[].concat(t),i=[].concat(o,[r]),a=i[0],s=i.reduce(function(t,r){var o=ue(e,r,n);return t.top=h(o.top,t.top),t.right=m(o.right,t.right),t.bottom=m(o.bottom,t.bottom),t.left=h(o.left,t.left),t},ue(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(d(k)?k:k.contextElement||w(e.elements.popper),l,u,a),P=b(e.elements.reference),F=te({reference:P,element:T,strategy:"absolute",placement:o}),z=ce(Object.assign({},T,F)),j=g===V?z:P,$={top:R.top-j.top+C.top,bottom:j.bottom-R.bottom+C.bottom,left:R.left-j.left+C.left,right:j.right-R.right+C.right},H=e.modifiersData.offset;if(g===V&&H){var G=H[o];Object.keys($).forEach(function(e){var t=[N,L].indexOf(e)>=0?1:-1,r=[D,L].indexOf(e)>=0?"y":"x";$[e]+=G[r]*t})}return $}function he(e,t,r){return h(e,m(t,r))}function me(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ge(e){return[D,N,L,F].some(function(t){return e[t]>=0})}var ye=X({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=void 0===o||o,a=n.resize,s=void 0===a||a,l=u(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(e){e.addEventListener("scroll",r.update,K)}),s&&l.addEventListener("resize",r.update,K),function(){i&&c.forEach(function(e){e.removeEventListener("scroll",r.update,K)}),s&&l.removeEventListener("resize",r.update,K)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=te({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,a=void 0===i||i,s=r.roundOffsets,l=void 0===s||s,c={placement:J(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];f(o)&&x(o)&&(Object.assign(o.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});f(n)&&x(n)&&(Object.assign(n.style,i),Object.keys(o).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=void 0===o?[0,0]:o,a=G.reduce(function(e,r){return e[r]=function(e,t,r){var n=J(e),o=[F,D].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},t,{placement:e})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[F,N].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(r,t.rects,i),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0===a||a,l=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,f=r.altBoundary,p=r.flipVariations,h=void 0===p||p,m=r.allowedAutoPlacements,g=t.options.placement,y=J(g),v=l||(y!==g&&h?function(e){if(J(e)===z)return[];var t=ie(e);return[se(e),t,se(t)]}(g):[ie(g)]),b=[g].concat(v).reduce(function(e,r){return e.concat(J(r)===z?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?G:l,u=Q(n),d=u?s?H:H.filter(function(e){return Q(e)===u}):B,f=d.filter(function(e){return c.indexOf(e)>=0});0===f.length&&(f=d);var p=f.reduce(function(t,r){return t[r]=pe(e,{placement:r,boundary:o,rootBoundary:i,padding:a})[J(r)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}(t,{placement:r,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):r)},[]),_=t.rects.reference,x=t.rects.popper,w=new Map,A=!0,S=b[0],C=0;C=0,M=k?"width":"height",R=pe(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=k?I?N:F:I?L:D;_[M]>x[M]&&(P=ie(P));var O=ie(P),$=[];if(i&&$.push(R[T]<=0),s&&$.push(R[P]<=0,R[O]<=0),$.every(function(e){return e})){S=E,A=!1;break}w.set(E,$)}if(A)for(var U=function(e){var t=b.find(function(t){var r=w.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return S=t,"break"},V=h?3:1;V>0&&"break"!==U(V);V--);t.placement!==S&&(t.modifiersData[n]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0!==a&&a,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,f=r.tether,p=void 0===f||f,g=r.tetherOffset,y=void 0===g?0:g,v=pe(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=J(t.placement),_=Q(t.placement),x=!_,w=ee(b),A="x"===w?"y":"x",S=t.modifiersData.popperOffsets,C=t.rects.reference,E=t.rects.popper,I="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,k="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(S){if(i){var P,z="y"===w?D:F,B="y"===w?L:N,$="y"===w?"height":"width",U=S[w],V=U+v[z],H=U-v[B],G=p?-E[$]/2:0,W=_===j?C[$]:E[$],q=_===j?-E[$]:-C[$],Z=t.elements.arrow,Y=p&&Z?T(Z):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=X[z],te=X[B],re=he(0,C[$],Y[$]),ne=x?C[$]/2-G-re-K-k.mainAxis:W-re-K-k.mainAxis,oe=x?-C[$]/2+G+re+te+k.mainAxis:q+re+te+k.mainAxis,ie=t.elements.arrow&&O(t.elements.arrow),ae=ie?"y"===w?ie.clientTop||0:ie.clientLeft||0:0,se=null!=(P=null==M?void 0:M[w])?P:0,le=U+oe-se,ce=he(p?m(V,U+ne-se-ae):V,U,p?h(H,le):H);S[w]=ce,R[w]=ce-U}if(s){var ue,de="x"===w?D:F,fe="x"===w?L:N,me=S[A],ge="y"===A?"height":"width",ye=me+v[de],ve=me-v[fe],be=-1!==[D,F].indexOf(b),_e=null!=(ue=null==M?void 0:M[A])?ue:0,xe=be?ye:me-C[ge]-E[ge]-_e+k.altAxis,we=be?me+C[ge]+E[ge]-_e-k.altAxis:ve,Ae=p&&be?function(e,t,r){var n=he(e,t,r);return n>r?r:n}(xe,me,we):he(p?xe:ye,me,p?we:ve);S[A]=Ae,R[A]=Ae-me}t.modifiersData[n]=R}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=J(r.placement),l=ee(s),c=[F,N].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return de("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:fe(e,B))}(o.padding,r),d=T(i),f="y"===l?D:F,p="y"===l?L:N,h=r.rects.reference[c]+r.rects.reference[l]-a[l]-r.rects.popper[c],m=a[l]-r.rects.reference[l],g=O(i),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=h/2-m/2,b=u[f],_=y-d[c]-u[p],x=y/2-d[c]/2+v,w=he(b,x,_),A=l;r.modifiersData[n]=((t={})[A]=w,t.centerOffset=w-x,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&le(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=pe(t,{elementContext:"reference"}),s=pe(t,{altBoundary:!0}),l=me(a,n),c=me(s,o,i),u=ge(l),d=ge(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),ve=r("aGM9"),be=r("0Ydi"),_e=r("Cc46"),xe=r("zFdC"),we=r("nKUr");const Ae=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Se=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Ce(e){return"function"==typeof e?e():e}const Ee={},Te=a.forwardRef(function(e,t){var r;const{anchorEl:i,children:c,direction:u,disablePortal:d,modifiers:f,open:p,placement:h,popperOptions:m,popperRef:g,slotProps:y={},slots:v={},TransitionProps:b}=e,_=(0,o.A)(e,Ae),x=a.useRef(null),w=(0,s.A)(x,t),A=a.useRef(null),S=(0,s.A)(A,g),C=a.useRef(S);(0,l.A)(()=>{C.current=S},[S]),a.useImperativeHandle(g,()=>A.current,[]);const E=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(h,u),[T,I]=a.useState(E),[k,M]=a.useState(Ce(i));a.useEffect(()=>{A.current&&A.current.forceUpdate()}),a.useEffect(()=>{i&&M(Ce(i))},[i]),(0,l.A)(()=>{if(!k||!p)return;let e=[{name:"preventOverflow",options:{altBoundary:d}},{name:"flip",options:{altBoundary:d}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{I(e.placement)}}];null!=f&&(e=e.concat(f)),m&&null!=m.modifiers&&(e=e.concat(m.modifiers));const t=ye(k,x.current,(0,n.A)({placement:E},m,{modifiers:e}));return C.current(t),()=>{t.destroy(),C.current(null)}},[k,d,f,p,m,E]);const R={placement:T};null!==b&&(R.TransitionProps=b);const P=(e=>{const{classes:t}=e;return(0,ve.A)({root:["root"]},xe.b,t)})(e),O=null!=(r=v.root)?r:"div",D=(0,be.A)({elementType:O,externalSlotProps:y.root,externalForwardedProps:_,additionalProps:{role:"tooltip",ref:w},ownerState:e,className:P.root});return(0,we.jsx)(O,(0,n.A)({},D,{children:"function"==typeof c?c(R):c}))}),Ie=a.forwardRef(function(e,t){const{anchorEl:r,children:i,container:s,direction:l="ltr",disablePortal:u=!1,keepMounted:d=!1,modifiers:f,open:p,placement:h="bottom",popperOptions:m=Ee,popperRef:g,style:y,transition:v=!1,slotProps:b={},slots:_={}}=e,x=(0,o.A)(e,Se),[w,A]=a.useState(!0);if(!d&&!p&&(!v||w))return null;let S;if(s)S=s;else if(r){const e=Ce(r);S=e&&void 0!==e.nodeType?(0,c.A)(e).body:(0,c.A)(null).body}const C=p||!d||v&&!w?void 0:"none",E=v?{in:p,onEnter:()=>{A(!1)},onExited:()=>{A(!0)}}:void 0;return(0,we.jsx)(_e.A,{disablePortal:u,container:S,children:(0,we.jsx)(Te,(0,n.A)({anchorEl:r,direction:l,disablePortal:u,modifiers:f,ref:t,open:v?!w:p,placement:h,popperOptions:m,popperRef:g,slotProps:b,slots:_},x,{style:(0,n.A)({position:"fixed",top:0,left:0,display:C},y),TransitionProps:E,children:i}))})});var ke=r("Vn7y"),Me=r("W9AN");const Re=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Pe=(0,ke.Ay)(Ie,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Oe=a.forwardRef(function(e,t){var r;const a=(0,i.A)(),s=(0,Me.b)({props:e,name:"MuiPopper"}),{anchorEl:l,component:c,components:u,componentsProps:d,container:f,disablePortal:p,keepMounted:h,modifiers:m,open:g,placement:y,popperOptions:v,popperRef:b,transition:_,slots:x,slotProps:w}=s,A=(0,o.A)(s,Re),S=null!=(r=null==x?void 0:x.root)?r:null==u?void 0:u.Root,C=(0,n.A)({anchorEl:l,container:f,disablePortal:p,keepMounted:h,modifiers:m,open:g,placement:y,popperOptions:v,popperRef:b,transition:_},A);return(0,we.jsx)(Pe,(0,n.A)({as:c,direction:null==a?void 0:a.direction,slots:{root:S},slotProps:null!=w?w:d},C,{ref:t}))})},zFdC(e,t,r){"use strict";r.d(t,{b:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiPopper",e)}(0,n.A)("MuiPopper",["root"])},Cc46(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r("q1tI"),o=r("i8i4"),i=r("N0rN"),a=r("cP2J"),s=r("XgeM"),l=r("1YXj"),c=r("nKUr");const u=n.forwardRef(function(e,t){const{children:r,container:u,disablePortal:d=!1}=e,[f,p]=n.useState(null),h=(0,i.A)(n.isValidElement(r)?(0,a.A)(r):null,t);if((0,s.A)(()=>{d||p(function(e){return"function"==typeof e?e():e}(u)||document.body)},[u,d]),(0,s.A)(()=>{if(f&&!d)return(0,l.A)(t,f),()=>{(0,l.A)(t,null)}},[t,f,d]),d){if(n.isValidElement(r)){const e={ref:h};return n.cloneElement(r,e)}return(0,c.jsx)(n.Fragment,{children:r})}return(0,c.jsx)(n.Fragment,{children:f?o.createPortal(r,f):f})})},d4Oc(e,t,r){"use strict";r.d(t,{A:()=>k});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("J1Ai"),u=r("W9AN"),d=r("M7pN"),f=r("nKUr");const p=(0,d.A)((0,f.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),h=(0,d.A)((0,f.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");var m=r("Vn7y"),g=r("XM18");const y=(0,m.Ay)("span",{name:"MuiRadioButtonIcon",shouldForwardProp:g.A})({position:"relative",display:"flex"}),v=(0,m.Ay)(p,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),b=(0,m.Ay)(h,{name:"MuiRadioButtonIcon"})(({theme:e,ownerState:t})=>(0,o.A)({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},t.checked&&{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})})),_=function(e){const{checked:t=!1,classes:r={},fontSize:n}=e,i=(0,o.A)({},e,{checked:t});return(0,f.jsxs)(y,{className:r.root,ownerState:i,children:[(0,f.jsx)(v,{fontSize:n,className:r.background,ownerState:i}),(0,f.jsx)(b,{fontSize:n,className:r.dot,ownerState:i})]})};var x=r("xeev"),w=r("j3nj"),A=r("l+/q"),S=r("N7Sv");const C=["checked","checkedIcon","color","icon","name","onChange","size","className"],E=(0,m.Ay)(c.A,{shouldForwardProp:e=>(0,g.A)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"medium"!==r.size&&t[`size${(0,x.A)(r.size)}`],t[`color${(0,x.A)(r.color)}`]]}})(({theme:e,ownerState:t})=>(0,o.A)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${S.A.checked}`]:{color:(e.vars||e).palette[t.color].main}},{[`&.${S.A.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),T=(0,f.jsx)(_,{checked:!0}),I=(0,f.jsx)(_,{}),k=i.forwardRef(function(e,t){var r,l;const c=(0,u.b)({props:e,name:"MuiRadio"}),{checked:d,checkedIcon:p=T,color:h="primary",icon:m=I,name:g,onChange:y,size:v="medium",className:b}=c,_=(0,n.A)(c,C),k=(0,o.A)({},c,{color:h,size:v}),M=(e=>{const{classes:t,color:r,size:n}=e,i={root:["root",`color${(0,x.A)(r)}`,"medium"!==n&&`size${(0,x.A)(n)}`]};return(0,o.A)({},t,(0,s.A)(i,S.q,t))})(k),R=(0,A.A)();let P=d;const O=(0,w.A)(y,R&&R.onChange);let D=g;var L,N;return R&&(void 0===P&&(L=R.value,P="object"==typeof(N=c.value)&&null!==N?L===N:String(L)===String(N)),void 0===D&&(D=R.name)),(0,f.jsx)(E,(0,o.A)({type:"radio",icon:i.cloneElement(m,{fontSize:null!=(r=I.props.fontSize)?r:v}),checkedIcon:i.cloneElement(p,{fontSize:null!=(l=T.props.fontSize)?l:v}),ownerState:k,classes:M,name:D,checked:P,onChange:O,ref:t,className:(0,a.A)(M.root,b)},_))})},N7Sv(e,t,r){"use strict";r.d(t,{A:()=>a,q:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiRadio",e)}const a=(0,n.A)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"])},zjqC(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("4ycN"),c=r("brkH"),u=r("ZfBw"),d=r("1vOf"),f=r("F3ys"),p=r("DSU1"),h=r("nKUr");const m=["actions","children","className","defaultValue","name","onChange","value"],g=i.forwardRef(function(e,t){const{actions:r,children:g,className:y,defaultValue:v,name:b,onChange:_,value:x}=e,w=(0,o.A)(e,m),A=i.useRef(null),S=(e=>{const{classes:t,row:r,error:n}=e,o={root:["root",r&&"row",n&&"error"]};return(0,s.A)(o,c.B,t)})(e),[C,E]=(0,d.A)({controlled:x,default:v,name:"RadioGroup"});i.useImperativeHandle(r,()=>({focus:()=>{let e=A.current.querySelector("input:not(:disabled):checked");e||(e=A.current.querySelector("input:not(:disabled)")),e&&e.focus()}}),[]);const T=(0,u.A)(t,A),I=(0,p.A)(b),k=i.useMemo(()=>({name:I,onChange(e){E(e.target.value),_&&_(e,e.target.value)},value:C}),[I,_,E,C]);return(0,h.jsx)(f.A.Provider,{value:k,children:(0,h.jsx)(l.A,(0,n.A)({role:"radiogroup",ref:T,className:(0,a.A)(S.root,y)},w,{children:g}))})})},F3ys(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext(void 0)},brkH(e,t,r){"use strict";r.d(t,{A:()=>a,B:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiRadioGroup",e)}const a=(0,n.A)("MuiRadioGroup",["root","row","error"])},"l+/q"(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("F3ys");function i(){return n.useContext(o.A)}},"f/6o"(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("Vn7y"),u=r("L9aa"),d=r("c5OB"),f=r("nKUr");const p=["className","component","enableColorScheme"],h=(0,c.Ay)("div",{name:"MuiScopedCssBaseline",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{const r={};return t.enableColorScheme&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([t,n])=>{var o;r[`&${e.getColorSchemeSelector(t).replace(/\s*&/,"")}`]={colorScheme:null==(o=n.palette)?void 0:o.mode}}),(0,o.A)({},(0,u.qy)(e,t.enableColorScheme),(0,u.rf)(e),{"& *, & *::before, & *::after":{boxSizing:"inherit"},"& strong, & b":{fontWeight:e.typography.fontWeightBold}},r)}),m=i.forwardRef(function(e,t){const r=(0,l.b)({props:e,name:"MuiScopedCssBaseline"}),{className:i,component:c="div"}=r,u=(0,n.A)(r,p),m=(0,o.A)({},r,{component:c}),g=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.r,t)})(m);return(0,f.jsx)(h,(0,o.A)({as:c,className:(0,a.A)(g.root,i),ref:t,ownerState:m},u))})},c5OB(e,t,r){"use strict";r.d(t,{A:()=>a,r:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiScopedCssBaseline",e)}const a=(0,n.A)("MuiScopedCssBaseline",["root"])},AAK8(e,t,r){"use strict";r.d(t,{A:()=>W});var n,o=r("+9dH"),i=r("Nlia"),a=r("q1tI"),s=r("juqV"),l=r("w9Qe"),c=r("cP2J"),u=r("KRkT"),d=r("aGM9"),f=r("A3c4"),p=r("rdfb"),h=r("xeev"),m=r("4enW"),g=r("82Iz"),y=r("AOhz"),v=r("Vn7y"),b=r("FO2v"),_=r("ZfBw"),x=r("1vOf"),w=r("tNc0"),A=r("nKUr");const S=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],C=(0,v.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`&.${w.A.select}`]:t.select},{[`&.${w.A.select}`]:t[r.variant]},{[`&.${w.A.error}`]:t.error},{[`&.${w.A.multiple}`]:t.multiple}]}})(g.Ku,{[`&.${w.A.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),E=(0,v.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${(0,h.A)(r.variant)}`],r.open&&t.iconOpen]}})(g.XV),T=(0,v.Ay)("input",{shouldForwardProp:e=>(0,b.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function I(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function k(e){return null==e||"string"==typeof e&&!e.trim()}const M=a.forwardRef(function(e,t){var r;const{"aria-describedby":l,"aria-label":c,autoFocus:g,autoWidth:v,children:b,className:M,defaultOpen:R,defaultValue:P,disabled:O,displayEmpty:D,error:L=!1,IconComponent:N,inputRef:F,labelId:z,MenuProps:B={},multiple:j,name:$,onBlur:U,onChange:V,onClose:H,onFocus:G,onOpen:W,open:q,readOnly:Z,renderValue:Y,SelectDisplayProps:X={},tabIndex:K,value:J,variant:Q="standard"}=e,ee=(0,i.A)(e,S),[te,re]=(0,x.A)({controlled:J,default:P,name:"Select"}),[ne,oe]=(0,x.A)({controlled:q,default:R,name:"Select"}),ie=a.useRef(null),ae=a.useRef(null),[se,le]=a.useState(null),{current:ce}=a.useRef(null!=q),[ue,de]=a.useState(),fe=(0,_.A)(t,F),pe=a.useCallback(e=>{ae.current=e,e&&le(e)},[]),he=null==se?void 0:se.parentNode;a.useImperativeHandle(fe,()=>({focus:()=>{ae.current.focus()},node:ie.current,value:te}),[te]),a.useEffect(()=>{R&&ne&&se&&!ce&&(de(v?null:he.clientWidth),ae.current.focus())},[se,v]),a.useEffect(()=>{g&&ae.current.focus()},[g]),a.useEffect(()=>{if(!z)return;const e=(0,p.A)(ae.current).getElementById(z);if(e){const t=()=>{getSelection().isCollapsed&&ae.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[z]);const me=(e,t)=>{e?W&&W(t):H&&H(t),ce||(de(v?null:he.clientWidth),oe(e))},ge=a.Children.toArray(b),ye=e=>t=>{let r;if(t.currentTarget.hasAttribute("tabindex")){if(j){r=Array.isArray(te)?te.slice():[];const t=te.indexOf(e.props.value);-1===t?r.push(e.props.value):r.splice(t,1)}else r=e.props.value;if(e.props.onClick&&e.props.onClick(t),te!==r&&(re(r),V)){const n=t.nativeEvent||t,o=new n.constructor(n.type,n);Object.defineProperty(o,"target",{writable:!0,value:{value:r,name:$}}),V(o,e)}j||me(!1,t)}},ve=null!==se&≠let be,_e;delete ee["aria-invalid"];const xe=[];let we=!1,Ae=!1;((0,y.lq)({value:te})||D)&&(Y?be=Y(te):we=!0);const Se=ge.map(e=>{if(!a.isValidElement(e))return null;let t;if(j){if(!Array.isArray(te))throw new Error((0,u.A)(2));t=te.some(t=>I(t,e.props.value)),t&&we&&xe.push(e.props.children)}else t=I(te,e.props.value),t&&we&&(_e=e.props.children);return t&&(Ae=!0),a.cloneElement(e,{"aria-selected":t?"true":"false",onClick:ye(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});we&&(be=j?0===xe.length?null:xe.reduce((e,t,r)=>(e.push(t),r{const{classes:t,variant:r,disabled:n,multiple:o,open:i,error:a}=e,s={select:["select",r,n&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${(0,h.A)(r)}`,i&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return(0,d.A)(s,w.T,t)})(Ie),Me=(0,o.A)({},B.PaperProps,null==(r=B.slotProps)?void 0:r.paper),Re=(0,f.A)();return(0,A.jsxs)(a.Fragment,{children:[(0,A.jsx)(C,(0,o.A)({ref:pe,tabIndex:Ce,role:"combobox","aria-controls":Re,"aria-disabled":O?"true":void 0,"aria-expanded":ve?"true":"false","aria-haspopup":"listbox","aria-label":c,"aria-labelledby":[z,Te].filter(Boolean).join(" ")||void 0,"aria-describedby":l,onKeyDown:e=>{Z||-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),me(!0,e))},onMouseDown:O||Z?null:e=>{0===e.button&&(e.preventDefault(),ae.current.focus(),me(!0,e))},onBlur:e=>{!ve&&U&&(Object.defineProperty(e,"target",{writable:!0,value:{value:te,name:$}}),U(e))},onFocus:G},X,{ownerState:Ie,className:(0,s.A)(X.className,ke.select,M),id:Te,children:k(be)?n||(n=(0,A.jsx)("span",{className:"notranslate",children:"​"})):be})),(0,A.jsx)(T,(0,o.A)({"aria-invalid":L,value:Array.isArray(te)?te.join(","):te,name:$,ref:ie,"aria-hidden":!0,onChange:e=>{const t=ge.find(t=>t.props.value===e.target.value);void 0!==t&&(re(t.props.value),V&&V(e,t))},tabIndex:-1,disabled:O,className:ke.nativeInput,autoFocus:g,ownerState:Ie},ee)),(0,A.jsx)(E,{as:N,className:ke.icon,ownerState:Ie}),(0,A.jsx)(m.A,(0,o.A)({id:`menu-${$||""}`,anchorEl:he,open:ve,onClose:e=>{me(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},B,{MenuListProps:(0,o.A)({"aria-labelledby":z,role:"listbox","aria-multiselectable":j?"true":void 0,disableListWrap:!0,id:Re},B.MenuListProps),slotProps:(0,o.A)({},B.slotProps,{paper:(0,o.A)({},Me,{style:(0,o.A)({minWidth:Ee},null!=Me?Me.style:null)})}),children:Se}))]})});var R=r("1ODS"),P=r("7EOP"),O=r("smxg"),D=r("WdHY"),L=r("fJ4Q"),N=r("6j3M"),F=r("W9AN"),z=r("XM18");const B=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],j=["root"],$={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,z.A)(e)&&"variant"!==e,slot:"Root"},U=(0,v.Ay)(D.A,$)(""),V=(0,v.Ay)(N.A,$)(""),H=(0,v.Ay)(L.A,$)(""),G=a.forwardRef(function(e,t){const r=(0,F.b)({name:"MuiSelect",props:e}),{autoWidth:n=!1,children:u,classes:d={},className:f,defaultOpen:p=!1,displayEmpty:h=!1,IconComponent:m=O.A,id:y,input:v,inputProps:b,label:x,labelId:w,MenuProps:S,multiple:C=!1,native:E=!1,onClose:T,onOpen:I,open:k,renderValue:D,SelectDisplayProps:L,variant:N="outlined"}=r,z=(0,i.A)(r,B),$=E?g.Ay:M,G=(0,P.A)(),W=(0,R.A)({props:r,muiFormControl:G,states:["variant","error"]}),q=W.variant||N,Z=(0,o.A)({},r,{variant:q,classes:d}),Y=(e=>{const{classes:t}=e;return t})(Z),X=(0,i.A)(Y,j),K=v||{standard:(0,A.jsx)(U,{ownerState:Z}),outlined:(0,A.jsx)(V,{label:x,ownerState:Z}),filled:(0,A.jsx)(H,{ownerState:Z})}[q],J=(0,_.A)(t,(0,c.A)(K));return(0,A.jsx)(a.Fragment,{children:a.cloneElement(K,(0,o.A)({inputComponent:$,inputProps:(0,o.A)({children:u,error:W.error,IconComponent:m,variant:q,type:void 0,multiple:C},E?{id:y}:{autoWidth:n,defaultOpen:p,displayEmpty:h,labelId:w,MenuProps:S,onClose:T,onOpen:I,open:k,renderValue:D,SelectDisplayProps:(0,o.A)({id:y},L)},b,{classes:b?(0,l.A)(X,b.classes):X},v?v.props.inputProps:{})},(C&&E||h)&&"outlined"===q?{notched:!0}:{},{ref:J,className:(0,s.A)(K.props.className,f,Y.root)},!v&&{variant:q},z))})});G.muiName="Select";const W=G},tNc0(e,t,r){"use strict";r.d(t,{A:()=>a,T:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSelect",e)}const a=(0,n.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"])},tAhU(e,t,r){"use strict";r.d(t,{A:()=>S});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("AeFk"),l=r("aGM9"),c=r("qn7V"),u=r("2Qr1"),d=r("Vn7y"),f=r("W9AN"),p=r("ioAD"),h=r("nKUr");const m=["animation","className","component","height","style","variant","width"];let g,y,v,b,_=e=>e;const x=(0,s.i7)(g||(g=_` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `)),w=(0,s.i7)(y||(y=_` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `)),A=(0,d.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!1!==r.animation&&t[r.animation],r.hasChildren&&t.withChildren,r.hasChildren&&!r.width&&t.fitContent,r.hasChildren&&!r.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{const r=(0,c.l_)(e.shape.borderRadius)||"px",n=(0,c.db)(e.shape.borderRadius);return(0,o.A)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,u.X4)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===t.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${r}/${Math.round(n/.6*10)/10}${r}`,"&:empty:before":{content:'"\\00a0"'}},"circular"===t.variant&&{borderRadius:"50%"},"rounded"===t.variant&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>"pulse"===e.animation&&(0,s.AH)(v||(v=_` animation: ${0} 2s ease-in-out 0.5s infinite; `),x),({ownerState:e,theme:t})=>"wave"===e.animation&&(0,s.AH)(b||(b=_` position: relative; overflow: hidden; /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ -webkit-mask-image: -webkit-radial-gradient(white, black); &::after { animation: ${0} 2s linear 0.5s infinite; background: linear-gradient( 90deg, transparent, ${0}, transparent ); content: ''; position: absolute; transform: translateX(-100%); /* Avoid flash during server-side hydration */ bottom: 0; left: 0; right: 0; top: 0; } `),w,(t.vars||t).palette.action.hover)),S=i.forwardRef(function(e,t){const r=(0,f.b)({props:e,name:"MuiSkeleton"}),{animation:i="pulse",className:s,component:c="span",height:u,style:d,variant:g="text",width:y}=r,v=(0,n.A)(r,m),b=(0,o.A)({},r,{animation:i,component:c,variant:g,hasChildren:Boolean(v.children)}),_=(e=>{const{classes:t,variant:r,animation:n,hasChildren:o,width:i,height:a}=e,s={root:["root",r,n,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]};return(0,l.A)(s,p.E,t)})(b);return(0,h.jsx)(A,(0,o.A)({as:c,ref:t,className:(0,a.A)(_.root,s),ownerState:b},v,{style:(0,o.A)({width:y,height:u},d)}))})},ioAD(e,t,r){"use strict";r.d(t,{A:()=>a,E:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSkeleton",e)}const a=(0,n.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"])},ta8z(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("XOob"),s=r("cP2J"),l=r("7yHM"),c=r("ZfBw"),u=r("UnQg"),d=r("AiGX"),f=r("WFZb"),p=r("nKUr");const h=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function m(e,t,r){var n;const o=function(e,t,r){const n=t.getBoundingClientRect(),o=r&&r.getBoundingClientRect(),i=(0,f.A)(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const e=i.getComputedStyle(t);a=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"==typeof a){const e=a.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+s-n.left}px)`:`translateX(${i.innerWidth+s-n.left}px)`:"right"===e?o?`translateX(-${n.right-o.left-s}px)`:`translateX(-${n.left+n.width-s}px)`:"up"===e?o?`translateY(${o.bottom+l-n.top}px)`:`translateY(${i.innerHeight+l-n.top}px)`:o?`translateY(-${n.top-o.top+n.height-l}px)`:`translateY(-${n.top+n.height-l}px)`}(e,t,"function"==typeof(n=r)?n():n);o&&(t.style.webkitTransform=o,t.style.transform=o)}const g=i.forwardRef(function(e,t){const r=(0,u.A)(),g={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},y={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:v,appear:b=!0,children:_,container:x,direction:w="down",easing:A=g,in:S,onEnter:C,onEntered:E,onEntering:T,onExit:I,onExited:k,onExiting:M,style:R,timeout:P=y,TransitionComponent:O=a.Ay}=e,D=(0,o.A)(e,h),L=i.useRef(null),N=(0,c.A)((0,s.A)(_),L,t),F=e=>t=>{e&&(void 0===t?e(L.current):e(L.current,t))},z=F((e,t)=>{m(w,e,x),(0,d.q)(e),C&&C(e,t)}),B=F((e,t)=>{const o=(0,d.c)({timeout:P,style:R,easing:A},{mode:"enter"});e.style.webkitTransition=r.transitions.create("-webkit-transform",(0,n.A)({},o)),e.style.transition=r.transitions.create("transform",(0,n.A)({},o)),e.style.webkitTransform="none",e.style.transform="none",T&&T(e,t)}),j=F(E),$=F(M),U=F(e=>{const t=(0,d.c)({timeout:P,style:R,easing:A},{mode:"exit"});e.style.webkitTransition=r.transitions.create("-webkit-transform",t),e.style.transition=r.transitions.create("transform",t),m(w,e,x),I&&I(e)}),V=F(e=>{e.style.webkitTransition="",e.style.transition="",k&&k(e)}),H=i.useCallback(()=>{L.current&&m(w,L.current,x)},[w,x]);return i.useEffect(()=>{if(S||"down"===w||"right"===w)return;const e=(0,l.A)(()=>{L.current&&m(w,L.current,x)}),t=(0,f.A)(L.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[w,S,x]),i.useEffect(()=>{S||H()},[S,H]),(0,p.jsx)(O,(0,n.A)({nodeRef:L,onEnter:z,onEntered:j,onEntering:B,onExit:U,onExited:V,onExiting:$,addEndListener:e=>{v&&v(L.current,e)},appear:b,in:S,timeout:P},D,{children:(e,t)=>i.cloneElement(_,(0,n.A)({ref:N,style:(0,n.A)({visibility:"exited"!==e||S?void 0:"hidden"},R,_.props.style)},t))}))})},"3YeO"(e,t,r){"use strict";r.d(t,{d6:()=>W,xO:()=>q,Ww:()=>U,g1:()=>$,OQ:()=>H,hB:()=>V,nx:()=>G,Ay:()=>X});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("St5x"),u=r("0Ydi"),d=r("gU+W"),f=r("p4lV"),p=r("leBO"),h=r("5cFC"),m=r("B5YM"),g=r("N0rN"),y=r("XgeM"),v=r("nXnS"),b=r("r/ya"),_=r("OrJ7");function x(e,t){return e-t}function w(e,t){var r;const{index:n}=null!=(r=e.reduce((e,r,n)=>{const o=Math.abs(t-r);return null===e||oe===t){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}(e,t)}const I={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},k=e=>e;let M;function R(){return void 0===M&&(M="undefined"==typeof CSS||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),M}function P(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:s=!1,marks:l=!1,max:c=100,min:u=0,name:d,onChange:M,onChangeCommitted:P,orientation:O="horizontal",rootRef:D,scale:L=k,step:N=1,shiftStep:F=10,tabIndex:z,value:B}=e,j=i.useRef(void 0),[$,U]=i.useState(-1),[V,H]=i.useState(-1),[G,W]=i.useState(!1),q=i.useRef(0),[Z,Y]=(0,p.A)({controlled:B,default:null!=r?r:u,name:"Slider"}),X=M&&((e,t,r)=>{const n=e.nativeEvent||e,o=new n.constructor(n.type,n);Object.defineProperty(o,"target",{writable:!0,value:{value:t,name:d}}),M(o,t,r)}),K=Array.isArray(Z);let J=K?Z.slice().sort(x):[Z];J=J.map(e=>null==e?u:(0,h.A)(e,u,c));const Q=!0===l&&null!==N?[...Array(Math.floor((c-u)/N)+1)].map((e,t)=>({value:u+N*t})):l||[],ee=Q.map(e=>e.value),{isFocusVisibleRef:te,onBlur:re,onFocus:ne,ref:oe}=(0,m.A)(),[ie,ae]=i.useState(-1),se=i.useRef(null),le=(0,g.A)(oe,se),ce=(0,g.A)(D,le),ue=e=>t=>{var r;const n=Number(t.currentTarget.getAttribute("data-index"));ne(t),!0===te.current&&ae(n),H(n),null==e||null==(r=e.onFocus)||r.call(e,t)},de=e=>t=>{var r;re(t),!1===te.current&&ae(-1),H(-1),null==e||null==(r=e.onBlur)||r.call(e,t)},fe=(e,t)=>{const r=Number(e.currentTarget.getAttribute("data-index")),n=J[r],o=ee.indexOf(n);let i=t;if(Q&&null==N){const e=ee[ee.length-1];i=i>e?e:it=>{var r;if(null!==N){const e=Number(t.currentTarget.getAttribute("data-index")),r=J[e];let n=null;("ArrowLeft"===t.key||"ArrowDown"===t.key)&&t.shiftKey||"PageDown"===t.key?n=Math.max(r-F,u):(("ArrowRight"===t.key||"ArrowUp"===t.key)&&t.shiftKey||"PageUp"===t.key)&&(n=Math.min(r+F,c)),null!==n&&(fe(t,n),t.preventDefault())}null==e||null==(r=e.onKeyDown)||r.call(e,t)};(0,y.A)(()=>{var e;n&&se.current.contains(document.activeElement)&&(null==(e=document.activeElement)||e.blur())},[n]),n&&-1!==$&&U(-1),n&&-1!==ie&&ae(-1);const he=i.useRef(void 0);let me=O;s&&"horizontal"===O&&(me+="-reverse");const ge=({finger:e,move:t=!1})=>{const{current:r}=se,{width:n,height:o,bottom:i,left:s}=r.getBoundingClientRect();let l,d;if(l=0===me.indexOf("vertical")?(i-e.y)/o:(e.x-s)/n,-1!==me.indexOf("-reverse")&&(l=1-l),d=function(e,t,r){return(r-t)*e+t}(l,u,c),N)d=function(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(function(e){if(Math.abs(e)<1){const t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}(t)))}(d,N,u);else{const e=w(ee,d);d=ee[e]}d=(0,h.A)(d,u,c);let f=0;if(K){f=t?he.current:w(J,d),a&&(d=(0,h.A)(d,J[f-1]||-1/0,J[f+1]||1/0));const e=d;d=C({values:J,newValue:d,index:f}),a&&t||(f=d.indexOf(e),he.current=f)}return{newValue:d,activeIndex:f}},ye=(0,v.A)(e=>{const t=A(e,j);if(!t)return;if(q.current+=1,"mousemove"===e.type&&0===e.buttons)return void ve(e);const{newValue:r,activeIndex:n}=ge({finger:t,move:!0});E({sliderRef:se,activeIndex:n,setActive:U}),Y(r),!G&&q.current>2&&W(!0),X&&!T(r,Z)&&X(e,r,n)}),ve=(0,v.A)(e=>{const t=A(e,j);if(W(!1),!t)return;const{newValue:r}=ge({finger:t,move:!0});U(-1),"touchend"===e.type&&H(-1),P&&P(e,r),j.current=void 0,_e()}),be=(0,v.A)(e=>{if(n)return;R()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(j.current=t.identifier);const r=A(e,j);if(!1!==r){const{newValue:t,activeIndex:n}=ge({finger:r});E({sliderRef:se,activeIndex:n,setActive:U}),Y(t),X&&!T(t,Z)&&X(e,t,n)}q.current=0;const o=(0,f.A)(se.current);o.addEventListener("touchmove",ye,{passive:!0}),o.addEventListener("touchend",ve,{passive:!0})}),_e=i.useCallback(()=>{const e=(0,f.A)(se.current);e.removeEventListener("mousemove",ye),e.removeEventListener("mouseup",ve),e.removeEventListener("touchmove",ye),e.removeEventListener("touchend",ve)},[ve,ye]);i.useEffect(()=>{const{current:e}=se;return e.addEventListener("touchstart",be,{passive:R()}),()=>{e.removeEventListener("touchstart",be),_e()}},[_e,be]),i.useEffect(()=>{n&&_e()},[n,_e]);const xe=S(K?J[0]:u,u,c),we=S(J[J.length-1],u,c)-xe,Ae=e=>t=>{var r;null==(r=e.onMouseLeave)||r.call(e,t),H(-1)};return{active:$,axis:me,axisProps:I,dragging:G,focusedThumbIndex:ie,getHiddenInputProps:(r={})=>{var i;const a=(0,_.A)(r),l={onChange:(f=a||{},e=>{var t;null==(t=f.onChange)||t.call(f,e),fe(e,e.target.valueAsNumber)}),onFocus:ue(a||{}),onBlur:de(a||{}),onKeyDown:pe(a||{})};var f;const p=(0,o.A)({},a,l);return(0,o.A)({tabIndex:z,"aria-labelledby":t,"aria-orientation":O,"aria-valuemax":L(c),"aria-valuemin":L(u),name:d,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(i=e.step)?i:void 0,disabled:n},r,p,{style:(0,o.A)({},b.A,{direction:s?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:(e={})=>{const t=(0,_.A)(e),r={onMouseDown:(i=t||{},e=>{var t;if(null==(t=i.onMouseDown)||t.call(i,e),n)return;if(e.defaultPrevented)return;if(0!==e.button)return;e.preventDefault();const r=A(e,j);if(!1!==r){const{newValue:t,activeIndex:n}=ge({finger:r});E({sliderRef:se,activeIndex:n,setActive:U}),Y(t),X&&!T(t,Z)&&X(e,t,n)}q.current=0;const o=(0,f.A)(se.current);o.addEventListener("mousemove",ye,{passive:!0}),o.addEventListener("mouseup",ve)})};var i;const a=(0,o.A)({},t,r);return(0,o.A)({},e,{ref:ce},a)},getThumbProps:(e={})=>{const t=(0,_.A)(e),r={onMouseOver:(n=t||{},e=>{var t;null==(t=n.onMouseOver)||t.call(n,e);const r=Number(e.currentTarget.getAttribute("data-index"));H(r)}),onMouseLeave:Ae(t||{})};var n;return(0,o.A)({},e,t,r)},marks:Q,open:V,range:K,rootRef:ce,trackLeap:we,trackOffset:xe,values:J,getThumbStyle:e=>({pointerEvents:-1!==$&&$!==e?"none":void 0})}}var O=r("Vn7y"),D=r("W9AN"),L=r("FO2v");var N=r("xeev"),F=r("ZROH"),z=r("nKUr");const B=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function j(e){return e}const $=(0,O.Ay)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${(0,N.A)(r.color)}`],"medium"!==r.size&&t[`size${(0,N.A)(r.size)}`],r.marked&&t.marked,"vertical"===r.orientation&&t.vertical,"inverted"===r.track&&t.trackInverted,!1===r.track&&t.trackFalse]}})(({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${F.A.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${F.A.dragging}`]:{[`& .${F.A.thumb}, & .${F.A.track}`]:{transition:"none"}},variants:[...Object.keys((null!=(t=e.vars)?t:e).palette).filter(t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main}).map(t=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),U=(0,O.Ay)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),V=(0,O.Ay)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>{var t;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys((null!=(t=e.vars)?t:e).palette).filter(t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main}).map(t=>({props:{color:t,track:"inverted"},style:(0,o.A)({},e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:(0,o.A)({backgroundColor:(0,l.a)(e.palette[t].main,.62),borderColor:(0,l.a)(e.palette[t].main,.62)},e.applyStyles("dark",{backgroundColor:(0,l.e$)(e.palette[t].main,.5)}),e.applyStyles("dark",{borderColor:(0,l.e$)(e.palette[t].main,.5)})))}))]}}),H=(0,O.Ay)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${(0,N.A)(r.color)}`],"medium"!==r.size&&t[`thumbSize${(0,N.A)(r.size)}`]]}})(({theme:e})=>{var t;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${F.A.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys((null!=(t=e.vars)?t:e).palette).filter(t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main}).map(t=>({props:{color:t},style:{[`&:hover, &.${F.A.focusVisible}`]:(0,o.A)({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${(0,l.X4)(e.palette[t].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${F.A.active}`]:(0,o.A)({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${(0,l.X4)(e.palette[t].main,.16)}`})}}))]}}),G=(0,O.Ay)(function(e){const{children:t,className:r,value:n}=e,o=(e=>{const{open:t}=e;return{offset:(0,a.A)(t&&F.A.valueLabelOpen),circle:F.A.valueLabelCircle,label:F.A.valueLabelLabel}})(e);return t?i.cloneElement(t,{className:(0,a.A)(t.props.className)},(0,z.jsxs)(i.Fragment,{children:[t.props.children,(0,z.jsx)("span",{className:(0,a.A)(o.offset,r),"aria-hidden":!0,children:(0,z.jsx)("span",{className:o.circle,children:(0,z.jsx)("span",{className:o.label,children:n})})})]})):null},{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>(0,o.A)({zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${F.A.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${F.A.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),W=(0,O.Ay)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,L.A)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]})),q=(0,O.Ay)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,L.A)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>(0,o.A)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]})),Z=({children:e})=>e,Y=i.forwardRef(function(e,t){var r,l,f,p,h,m,g,y,v,b,_,x,w,A,C,E,T,I,k,M,R,O,L,Y;const X=(0,D.b)({props:e,name:"MuiSlider"}),K=(0,c.I)(),{"aria-label":J,"aria-valuetext":Q,"aria-labelledby":ee,component:te="span",components:re={},componentsProps:ne={},color:oe="primary",classes:ie,className:ae,disableSwap:se=!1,disabled:le=!1,getAriaLabel:ce,getAriaValueText:ue,marks:de=!1,max:fe=100,min:pe=0,orientation:he="horizontal",shiftStep:me=10,size:ge="medium",step:ye=1,scale:ve=j,slotProps:be,slots:_e,track:xe="normal",valueLabelDisplay:we="off",valueLabelFormat:Ae=j}=X,Se=(0,n.A)(X,B),Ce=(0,o.A)({},X,{isRtl:K,max:fe,min:pe,classes:ie,disabled:le,disableSwap:se,orientation:he,marks:de,color:oe,size:ge,step:ye,shiftStep:me,scale:ve,track:xe,valueLabelDisplay:we,valueLabelFormat:Ae}),{axisProps:Ee,getRootProps:Te,getHiddenInputProps:Ie,getThumbProps:ke,open:Me,active:Re,axis:Pe,focusedThumbIndex:Oe,range:De,dragging:Le,marks:Ne,values:Fe,trackOffset:ze,trackLeap:Be,getThumbStyle:je}=P((0,o.A)({},Ce,{rootRef:t}));Ce.marked=Ne.length>0&&Ne.some(e=>e.label),Ce.dragging=Le,Ce.focusedThumbIndex=Oe;const $e=(e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:i,classes:a,color:l,size:c}=e,u={root:["root",t&&"disabled",r&&"dragging",n&&"marked","vertical"===o&&"vertical","inverted"===i&&"trackInverted",!1===i&&"trackFalse",l&&`color${(0,N.A)(l)}`,c&&`size${(0,N.A)(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${(0,N.A)(c)}`,l&&`thumbColor${(0,N.A)(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,s.A)(u,F.W,a)})(Ce),Ue=null!=(r=null!=(l=null==_e?void 0:_e.root)?l:re.Root)?r:$,Ve=null!=(f=null!=(p=null==_e?void 0:_e.rail)?p:re.Rail)?f:U,He=null!=(h=null!=(m=null==_e?void 0:_e.track)?m:re.Track)?h:V,Ge=null!=(g=null!=(y=null==_e?void 0:_e.thumb)?y:re.Thumb)?g:H,We=null!=(v=null!=(b=null==_e?void 0:_e.valueLabel)?b:re.ValueLabel)?v:G,qe=null!=(_=null!=(x=null==_e?void 0:_e.mark)?x:re.Mark)?_:W,Ze=null!=(w=null!=(A=null==_e?void 0:_e.markLabel)?A:re.MarkLabel)?w:q,Ye=null!=(C=null!=(E=null==_e?void 0:_e.input)?E:re.Input)?C:"input",Xe=null!=(T=null==be?void 0:be.root)?T:ne.root,Ke=null!=(I=null==be?void 0:be.rail)?I:ne.rail,Je=null!=(k=null==be?void 0:be.track)?k:ne.track,Qe=null!=(M=null==be?void 0:be.thumb)?M:ne.thumb,et=null!=(R=null==be?void 0:be.valueLabel)?R:ne.valueLabel,tt=null!=(O=null==be?void 0:be.mark)?O:ne.mark,rt=null!=(L=null==be?void 0:be.markLabel)?L:ne.markLabel,nt=null!=(Y=null==be?void 0:be.input)?Y:ne.input,ot=(0,u.A)({elementType:Ue,getSlotProps:Te,externalSlotProps:Xe,externalForwardedProps:Se,additionalProps:(0,o.A)({},(ft=Ue,(!ft||!(0,d.A)(ft))&&{as:te})),ownerState:(0,o.A)({},Ce,null==Xe?void 0:Xe.ownerState),className:[$e.root,ae]}),it=(0,u.A)({elementType:Ve,externalSlotProps:Ke,ownerState:Ce,className:$e.rail}),at=(0,u.A)({elementType:He,externalSlotProps:Je,additionalProps:{style:(0,o.A)({},Ee[Pe].offset(ze),Ee[Pe].leap(Be))},ownerState:(0,o.A)({},Ce,null==Je?void 0:Je.ownerState),className:$e.track}),st=(0,u.A)({elementType:Ge,getSlotProps:ke,externalSlotProps:Qe,ownerState:(0,o.A)({},Ce,null==Qe?void 0:Qe.ownerState),className:$e.thumb}),lt=(0,u.A)({elementType:We,externalSlotProps:et,ownerState:(0,o.A)({},Ce,null==et?void 0:et.ownerState),className:$e.valueLabel}),ct=(0,u.A)({elementType:qe,externalSlotProps:tt,ownerState:Ce,className:$e.mark}),ut=(0,u.A)({elementType:Ze,externalSlotProps:rt,ownerState:Ce,className:$e.markLabel}),dt=(0,u.A)({elementType:Ye,getSlotProps:Ie,externalSlotProps:nt,ownerState:Ce});var ft;return(0,z.jsxs)(Ue,(0,o.A)({},ot,{children:[(0,z.jsx)(Ve,(0,o.A)({},it)),(0,z.jsx)(He,(0,o.A)({},at)),Ne.filter(e=>e.value>=pe&&e.value<=fe).map((e,t)=>{const r=S(e.value,pe,fe),n=Ee[Pe].offset(r);let s;return s=!1===xe?-1!==Fe.indexOf(e.value):"normal"===xe&&(De?e.value>=Fe[0]&&e.value<=Fe[Fe.length-1]:e.value<=Fe[0])||"inverted"===xe&&(De?e.value<=Fe[0]||e.value>=Fe[Fe.length-1]:e.value>=Fe[0]),(0,z.jsxs)(i.Fragment,{children:[(0,z.jsx)(qe,(0,o.A)({"data-index":t},ct,!(0,d.A)(qe)&&{markActive:s},{style:(0,o.A)({},n,ct.style),className:(0,a.A)(ct.className,s&&$e.markActive)})),null!=e.label?(0,z.jsx)(Ze,(0,o.A)({"aria-hidden":!0,"data-index":t},ut,!(0,d.A)(Ze)&&{markLabelActive:s},{style:(0,o.A)({},n,ut.style),className:(0,a.A)($e.markLabel,ut.className,s&&$e.markLabelActive),children:e.label})):null]},t)}),Fe.map((e,t)=>{const r=S(e,pe,fe),n=Ee[Pe].offset(r),i="off"===we?Z:We;return(0,z.jsx)(i,(0,o.A)({},!(0,d.A)(i)&&{valueLabelFormat:Ae,valueLabelDisplay:we,value:"function"==typeof Ae?Ae(ve(e),t):Ae,index:t,open:Me===t||Re===t||"on"===we,disabled:le},lt,{children:(0,z.jsx)(Ge,(0,o.A)({"data-index":t},st,{className:(0,a.A)($e.thumb,st.className,Re===t&&$e.active,Oe===t&&$e.focusVisible),style:(0,o.A)({},n,je(t),st.style),children:(0,z.jsx)(Ye,(0,o.A)({"data-index":t,"aria-label":ce?ce(t):J,"aria-valuenow":ve(e),"aria-labelledby":ee,"aria-valuetext":ue?ue(ve(e),t):Q,value:Fe[t]},dt))}))}),t)})]}))}),X=Y},ZROH(e,t,r){"use strict";r.d(t,{A:()=>a,W:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSlider",e)}const a=(0,n.A)("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"])},"6dIc"(e,t,r){"use strict";r.d(t,{A:()=>A});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("aGM9"),s=r("0Ydi"),l=r("J13E"),c=r("nXnS"),u=r("OrJ7");var d=r("zX2i"),f=r("Vn7y"),p=r("UnQg"),h=r("W9AN"),m=r("xeev"),g=r("UVCh"),y=r("ESRK"),v=r("YoCR"),b=r("nKUr");const _=["onEnter","onExited"],x=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],w=(0,f.Ay)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`anchorOrigin${(0,m.A)(r.anchorOrigin.vertical)}${(0,m.A)(r.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>(0,o.A)({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===t.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===t.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===t.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:(0,o.A)({},"top"===t.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===t.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===t.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===t.anchorOrigin.horizontal&&{right:24,left:"auto"})})),A=i.forwardRef(function(e,t){const r=(0,h.b)({props:e,name:"MuiSnackbar"}),f=(0,p.A)(),A={enter:f.transitions.duration.enteringScreen,exit:f.transitions.duration.leavingScreen},{action:S,anchorOrigin:{vertical:C,horizontal:E}={vertical:"bottom",horizontal:"left"},autoHideDuration:T=null,children:I,className:k,ClickAwayListenerProps:M,ContentProps:R,disableWindowBlurListener:P=!1,message:O,open:D,TransitionComponent:L=g.A,transitionDuration:N=A,TransitionProps:{onEnter:F,onExited:z}={}}=r,B=(0,n.A)(r.TransitionProps,_),j=(0,n.A)(r,x),$=(0,o.A)({},r,{anchorOrigin:{vertical:C,horizontal:E},autoHideDuration:T,disableWindowBlurListener:P,TransitionComponent:L,transitionDuration:N}),U=(e=>{const{classes:t,anchorOrigin:r}=e,n={root:["root",`anchorOrigin${(0,m.A)(r.vertical)}${(0,m.A)(r.horizontal)}`]};return(0,a.A)(n,v.W,t)})($),{getRootProps:V,onClickAway:H}=function(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:r=!1,onClose:n,open:a,resumeHideDuration:s}=e,d=(0,l.A)();i.useEffect(()=>{if(a)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==n||n(e,"escapeKeyDown")}},[a,n]);const f=(0,c.A)((e,t)=>{null==n||n(e,t)}),p=(0,c.A)(e=>{n&&null!=e&&d.start(e,()=>{f(null,"timeout")})});i.useEffect(()=>(a&&p(t),d.clear),[a,t,p,d]);const h=d.clear,m=i.useCallback(()=>{null!=t&&p(null!=s?s:.5*t)},[t,s,p]),g=e=>t=>{const r=e.onFocus;null==r||r(t),h()},y=e=>t=>{const r=e.onMouseEnter;null==r||r(t),h()},v=e=>t=>{const r=e.onMouseLeave;null==r||r(t),m()};return i.useEffect(()=>{if(!r&&a)return window.addEventListener("focus",m),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",h)}},[r,a,m,h]),{getRootProps:(t={})=>{const r=(0,o.A)({},(0,u.A)(e),(0,u.A)(t));return(0,o.A)({role:"presentation"},t,r,{onBlur:(n=r,e=>{const t=n.onBlur;null==t||t(e),m()}),onFocus:g(r),onMouseEnter:y(r),onMouseLeave:v(r)});var n},onClickAway:e=>{null==n||n(e,"clickaway")}}}((0,o.A)({},$)),[G,W]=i.useState(!0),q=(0,s.A)({elementType:w,getSlotProps:V,externalForwardedProps:j,ownerState:$,additionalProps:{ref:t},className:[U.root,k]});return!D&&G?null:(0,b.jsx)(d.x,(0,o.A)({onClickAway:H},M,{children:(0,b.jsx)(w,(0,o.A)({},q,{children:(0,b.jsx)(L,(0,o.A)({appear:!0,in:D,timeout:N,direction:"top"===C?"down":"up",onEnter:(e,t)=>{W(!1),F&&F(e,t)},onExited:e=>{W(!0),z&&z(e)}},B,{children:I||(0,b.jsx)(y.A,(0,o.A)({message:O,action:S},R))}))}))}))})},YoCR(e,t,r){"use strict";r.d(t,{A:()=>a,W:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSnackbar",e)}const a=(0,n.A)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"])},ESRK(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("W9AN"),d=r("G43+"),f=r("YE/p"),p=r("nKUr");const h=["action","className","message","role"],m=(0,c.Ay)(d.A,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t="light"===e.palette.mode?.8:.98,r=(0,l.tL)(e.palette.background.default,t);return(0,o.A)({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(r),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),g=(0,c.Ay)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),y=(0,c.Ay)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),v=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiSnackbarContent"}),{action:i,className:l,message:c,role:d="alert"}=r,v=(0,n.A)(r,h),b=r,_=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],action:["action"],message:["message"]},f.d,t)})(b);return(0,p.jsxs)(m,(0,o.A)({role:d,square:!0,elevation:6,className:(0,a.A)(_.root,l),ownerState:b,ref:t},v,{children:[(0,p.jsx)(g,{className:_.message,ownerState:b,children:c}),i?(0,p.jsx)(y,{className:_.action,ownerState:b,children:i}):null]}))})},"YE/p"(e,t,r){"use strict";r.d(t,{A:()=>a,d:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSnackbarContent",e)}const a=(0,n.A)("MuiSnackbarContent",["root","message","action"])},"1eI8"(e,t,r){"use strict";r.d(t,{A:()=>E});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("w9Qe"),l=r("TkYO"),c=r("aGM9"),u=r("M82X"),d=r("sdrl"),f=r("0kTp"),p=r("Tazo"),h=r("fGgT"),m=r("rZTa"),g=r("nKUr");const y=["component","direction","spacing","divider","children","className","useFlexGap"],v=(0,p.A)(),b=(0,u.A)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function _(e){return(0,d.A)({props:e,name:"MuiStack",defaultTheme:v})}function x(e,t){const r=i.Children.toArray(e).filter(Boolean);return r.reduce((e,n,o)=>(e.push(n),o{let r=(0,o.A)({display:"flex",flexDirection:"column"},(0,h.NI)({theme:t},(0,h.kW)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e})));if(e.spacing){const n=(0,m.LX)(t),o=Object.keys(t.breakpoints.values).reduce((t,r)=>(("object"==typeof e.spacing&&null!=e.spacing[r]||"object"==typeof e.direction&&null!=e.direction[r])&&(t[r]=!0),t),{}),i=(0,h.kW)({values:e.direction,base:o}),a=(0,h.kW)({values:e.spacing,base:o});"object"==typeof i&&Object.keys(i).forEach((e,t,r)=>{if(!i[e]){const n=t>0?i[r[t-1]]:"column";i[e]=n}});const l=(t,r)=>{return e.useFlexGap?{gap:(0,m._W)(n,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o=r?i[r]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:(0,m._W)(n,t)}};var o};r=(0,s.A)(r,(0,h.NI)({theme:t},a,l))}return r=(0,h.iZ)(t.breakpoints,r),r};var A=r("Vn7y"),S=r("W9AN");const C=function(e={}){const{createStyledComponent:t=b,useThemeProps:r=_,componentName:s="MuiStack"}=e,u=t(w),d=i.forwardRef(function(e,t){const i=r(e),d=(0,f.A)(i),{component:p="div",direction:h="column",spacing:m=0,divider:v,children:b,className:_,useFlexGap:w=!1}=d,A=(0,n.A)(d,y),S={direction:h,spacing:m,useFlexGap:w},C=(0,c.A)({root:["root"]},e=>(0,l.Ay)(s,e),{});return(0,g.jsx)(u,(0,o.A)({as:p,ownerState:S,ref:t,className:(0,a.A)(C.root,_)},A,{children:v?x(b,v):b}))});return d}({createStyledComponent:(0,A.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,S.b)({props:e,name:"MuiStack"})}),E=C},ovqk(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("pnHt"),c=r("2qWJ"),u=r("W9AN"),d=r("Vn7y"),f=r("LRQm"),p=r("nKUr");const h=["active","children","className","component","completed","disabled","expanded","index","last"],m=(0,d.Ay)("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel,r.completed&&t.completed]}})(({ownerState:e})=>(0,o.A)({},"horizontal"===e.orientation&&{paddingLeft:8,paddingRight:8},e.alternativeLabel&&{flex:1,position:"relative"})),g=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiStep"}),{active:d,children:g,className:y,component:v="div",completed:b,disabled:_,expanded:x=!1,index:w,last:A}=r,S=(0,n.A)(r,h),{activeStep:C,connector:E,alternativeLabel:T,orientation:I,nonLinear:k}=i.useContext(l.A);let[M=!1,R=!1,P=!1]=[d,b,_];C===w?M=void 0===d||d:!k&&C>w?R=void 0===b||b:!k&&C({index:w,last:A,expanded:x,icon:w+1,active:M,completed:R,disabled:P}),[w,A,x,M,R,P]),D=(0,o.A)({},r,{active:M,orientation:I,alternativeLabel:T,completed:R,disabled:P,expanded:x,component:v}),L=(e=>{const{classes:t,orientation:r,alternativeLabel:n,completed:o}=e,i={root:["root",r,n&&"alternativeLabel",o&&"completed"]};return(0,s.A)(i,f.L,t)})(D),N=(0,p.jsxs)(m,(0,o.A)({as:v,className:(0,a.A)(L.root,y),ref:t,ownerState:D},S,{children:[E&&T&&0!==w?E:null,g]}));return(0,p.jsx)(c.A.Provider,{value:O,children:E&&!T&&0!==w?(0,p.jsxs)(i.Fragment,{children:[E,N]}):N})})},"2qWJ"(e,t,r){"use strict";r.d(t,{A:()=>a,P:()=>i});var n=r("q1tI");const o=n.createContext({});function i(){return n.useContext(o)}const a=o},LRQm(e,t,r){"use strict";r.d(t,{A:()=>a,L:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiStep",e)}const a=(0,n.A)("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"])},"5lP7"(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("xeev"),c=r("Vn7y"),u=r("W9AN"),d=r("pnHt"),f=r("2qWJ"),p=r("LiX5"),h=r("nKUr");const m=["className"],g=(0,c.Ay)("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel,r.completed&&t.completed]}})(({ownerState:e})=>(0,o.A)({flex:"1 1 auto"},"vertical"===e.orientation&&{marginLeft:12},e.alternativeLabel&&{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})),y=(0,c.Ay)("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.line,t[`line${(0,l.A)(r.orientation)}`]]}})(({ownerState:e,theme:t})=>{const r="light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[600];return(0,o.A)({display:"block",borderColor:t.vars?t.vars.palette.StepConnector.border:r},"horizontal"===e.orientation&&{borderTopStyle:"solid",borderTopWidth:1},"vertical"===e.orientation&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})}),v=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiStepConnector"}),{className:c}=r,v=(0,n.A)(r,m),{alternativeLabel:b,orientation:_="horizontal"}=i.useContext(d.A),{active:x,disabled:w,completed:A}=i.useContext(f.A),S=(0,o.A)({},r,{alternativeLabel:b,orientation:_,active:x,completed:A,disabled:w}),C=(e=>{const{classes:t,orientation:r,alternativeLabel:n,active:o,completed:i,disabled:a}=e,c={root:["root",r,n&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${(0,l.A)(r)}`]};return(0,s.A)(c,p.G,t)})(S);return(0,h.jsx)(g,(0,o.A)({className:(0,a.A)(C.root,c),ref:t,ownerState:S},v,{children:(0,h.jsx)(y,{className:C.line,ownerState:S})}))})},LiX5(e,t,r){"use strict";r.d(t,{A:()=>a,G:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiStepConnector",e)}const a=(0,n.A)("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"])},"ZI/q"(e,t,r){"use strict";r.d(t,{A:()=>_});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("M7pN"),d=r("nKUr");const f=(0,u.A)((0,d.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),p=(0,u.A)((0,d.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");var h,m=r("Z6qJ"),g=r("vu6X");const y=["active","className","completed","error","icon"],v=(0,l.Ay)(m.A,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${g.A.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${g.A.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${g.A.error}`]:{color:(e.vars||e).palette.error.main}})),b=(0,l.Ay)("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily})),_=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiStepIcon"}),{active:i=!1,className:l,completed:u=!1,error:m=!1,icon:_}=r,x=(0,o.A)(r,y),w=(0,n.A)({},r,{active:i,completed:u,error:m}),A=(e=>{const{classes:t,active:r,completed:n,error:o}=e,i={root:["root",r&&"active",n&&"completed",o&&"error"],text:["text"]};return(0,s.A)(i,g.K,t)})(w);if("number"==typeof _||"string"==typeof _){const e=(0,a.A)(l,A.root);return m?(0,d.jsx)(v,(0,n.A)({as:p,className:e,ref:t,ownerState:w},x)):u?(0,d.jsx)(v,(0,n.A)({as:f,className:e,ref:t,ownerState:w},x)):(0,d.jsxs)(v,(0,n.A)({className:e,ref:t,ownerState:w},x,{children:[h||(h=(0,d.jsx)("circle",{cx:"12",cy:"12",r:"12"})),(0,d.jsx)(b,{className:A.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:w,children:_})]}))}return _})},vu6X(e,t,r){"use strict";r.d(t,{A:()=>a,K:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiStepIcon",e)}const a=(0,n.A)("MuiStepIcon",["root","active","completed","error","text"])},gk3T(e,t,r){"use strict";r.d(t,{A:()=>x});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("ZI/q"),d=r("pnHt"),f=r("2qWJ"),p=r("09Yx"),h=r("nKUr");const m=["children","className","componentsProps","error","icon","optional","slotProps","StepIconComponent","StepIconProps"],g=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation]]}})(({ownerState:e})=>(0,o.A)({display:"flex",alignItems:"center",[`&.${p.A.alternativeLabel}`]:{flexDirection:"column"},[`&.${p.A.disabled}`]:{cursor:"default"}},"vertical"===e.orientation&&{textAlign:"left",padding:"8px 0"})),y=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(({theme:e})=>(0,o.A)({},e.typography.body2,{display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${p.A.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${p.A.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${p.A.alternativeLabel}`]:{marginTop:16},[`&.${p.A.error}`]:{color:(e.vars||e).palette.error.main}})),v=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})(()=>({flexShrink:0,display:"flex",paddingRight:8,[`&.${p.A.alternativeLabel}`]:{paddingRight:0}})),b=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${p.A.alternativeLabel}`]:{textAlign:"center"}})),_=i.forwardRef(function(e,t){var r;const l=(0,c.b)({props:e,name:"MuiStepLabel"}),{children:_,className:x,componentsProps:w={},error:A=!1,icon:S,optional:C,slotProps:E={},StepIconComponent:T,StepIconProps:I}=l,k=(0,n.A)(l,m),{alternativeLabel:M,orientation:R}=i.useContext(d.A),{active:P,disabled:O,completed:D,icon:L}=i.useContext(f.A),N=S||L;let F=T;N&&!F&&(F=u.A);const z=(0,o.A)({},l,{active:P,alternativeLabel:M,completed:D,disabled:O,error:A,orientation:R}),B=(e=>{const{classes:t,orientation:r,active:n,completed:o,error:i,disabled:a,alternativeLabel:l}=e,c={root:["root",r,i&&"error",a&&"disabled",l&&"alternativeLabel"],label:["label",n&&"active",o&&"completed",i&&"error",a&&"disabled",l&&"alternativeLabel"],iconContainer:["iconContainer",n&&"active",o&&"completed",i&&"error",a&&"disabled",l&&"alternativeLabel"],labelContainer:["labelContainer",l&&"alternativeLabel"]};return(0,s.A)(c,p.p,t)})(z),j=null!=(r=E.label)?r:w.label;return(0,h.jsxs)(g,(0,o.A)({className:(0,a.A)(B.root,x),ref:t,ownerState:z},k,{children:[N||F?(0,h.jsx)(v,{className:B.iconContainer,ownerState:z,children:(0,h.jsx)(F,(0,o.A)({completed:D,active:P,error:A,icon:N},I))}):null,(0,h.jsxs)(b,{className:B.labelContainer,ownerState:z,children:[_?(0,h.jsx)(y,(0,o.A)({ownerState:z},j,{className:(0,a.A)(B.label,null==j?void 0:j.className),children:_})):null,C]})]}))});_.muiName="StepLabel";const x=_},"09Yx"(e,t,r){"use strict";r.d(t,{A:()=>a,p:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiStepLabel",e)}const a=(0,n.A)("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"])},Y6tj(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("Vn7y"),u=r("4UXW"),d=r("5lP7"),f=r("pnHt"),p=r("nKUr");const h=["activeStep","alternativeLabel","children","className","component","connector","nonLinear","orientation"],m=(0,c.Ay)("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel,r.nonLinear&&t.nonLinear]}})(({ownerState:e})=>(0,o.A)({display:"flex"},"horizontal"===e.orientation&&{flexDirection:"row",alignItems:"center"},"vertical"===e.orientation&&{flexDirection:"column"},e.alternativeLabel&&{alignItems:"flex-start"})),g=(0,p.jsx)(d.A,{}),y=i.forwardRef(function(e,t){const r=(0,l.b)({props:e,name:"MuiStepper"}),{activeStep:c=0,alternativeLabel:d=!1,children:y,className:v,component:b="div",connector:_=g,nonLinear:x=!1,orientation:w="horizontal"}=r,A=(0,n.A)(r,h),S=(0,o.A)({},r,{nonLinear:x,alternativeLabel:d,orientation:w,component:b}),C=(e=>{const{orientation:t,nonLinear:r,alternativeLabel:n,classes:o}=e,i={root:["root",t,r&&"nonLinear",n&&"alternativeLabel"]};return(0,s.A)(i,u.g,o)})(S),E=i.Children.toArray(y).filter(Boolean),T=E.map((e,t)=>i.cloneElement(e,(0,o.A)({index:t,last:t+1===E.length},e.props))),I=i.useMemo(()=>({activeStep:c,alternativeLabel:d,connector:_,nonLinear:x,orientation:w}),[c,d,_,x,w]);return(0,p.jsx)(f.A.Provider,{value:I,children:(0,p.jsx)(m,(0,o.A)({as:b,ownerState:S,className:(0,a.A)(C.root,v),ref:t},A,{children:T}))})})},pnHt(e,t,r){"use strict";r.d(t,{A:()=>a,s:()=>i});var n=r("q1tI");const o=n.createContext({});function i(){return n.useContext(o)}const a=o},"4UXW"(e,t,r){"use strict";r.d(t,{A:()=>a,g:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiStepper",e)}const a=(0,n.A)("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"])},Z6qJ(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("xeev"),c=r("W9AN"),u=r("Vn7y"),d=r("t32p"),f=r("nKUr");const p=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],h=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"inherit"!==r.color&&t[`color${(0,l.A)(r.color)}`],t[`fontSize${(0,l.A)(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,i,a,s,l,c,u,d,f,p,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=e.transitions)||null==(n=r.create)?void 0:n.call(r,"fill",{duration:null==(o=e.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(i=e.typography)||null==(a=i.pxToRem)?void 0:a.call(i,20))||"1.25rem",medium:(null==(s=e.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(c=e.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:null!=(d=null==(f=(e.vars||e).palette)||null==(f=f[t.color])?void 0:f.main)?d:{action:null==(p=(e.vars||e).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(h=(e.vars||e).palette)||null==(h=h.action)?void 0:h.disabled,inherit:void 0}[t.color]}}),m=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiSvgIcon"}),{children:u,className:m,color:g="inherit",component:y="svg",fontSize:v="medium",htmlColor:b,inheritViewBox:_=!1,titleAccess:x,viewBox:w="0 0 24 24"}=r,A=(0,o.A)(r,p),S=i.isValidElement(u)&&"svg"===u.type,C=(0,n.A)({},r,{color:g,component:y,fontSize:v,instanceFontSize:e.fontSize,inheritViewBox:_,viewBox:w,hasSvgAsChild:S}),E={};_||(E.viewBox=w);const T=(e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root","inherit"!==t&&`color${(0,l.A)(t)}`,`fontSize${(0,l.A)(r)}`]};return(0,s.A)(o,d.E,n)})(C);return(0,f.jsxs)(h,(0,n.A)({as:y,className:(0,a.A)(T.root,m),focusable:"false",color:b,"aria-hidden":!x||void 0,role:x?"img":void 0,ref:t},E,A,S&&u.props,{ownerState:C,children:[S?u.props.children:u,x?(0,f.jsx)("title",{children:x}):null]}))});m.muiName="SvgIcon";const g=m},t32p(e,t,r){"use strict";r.d(t,{A:()=>a,E:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSvgIcon",e)}const a=(0,n.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"])},"YM+J"(e,t,r){"use strict";r.d(t,{A:()=>_});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("xeev"),u=r("J1Ai"),d=r("Vn7y"),f=r("W9AN"),p=r("CIcg"),h=r("nKUr");const m=["className","color","edge","size","sx"],g=(0,d.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${(0,c.A)(r.edge)}`],t[`size${(0,c.A)(r.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${p.A.thumb}`]:{width:16,height:16},[`& .${p.A.switchBase}`]:{padding:4,[`&.${p.A.checked}`]:{transform:"translateX(16px)"}}}}]}),y=(0,d.Ay)(u.A,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${p.A.input}`]:t.input},"default"!==r.color&&t[`color${(0,c.A)(r.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${p.A.checked}`]:{transform:"translateX(20px)"},[`&.${p.A.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${p.A.checked} + .${p.A.track}`]:{opacity:.5},[`&.${p.A.disabled} + .${p.A.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${p.A.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,e])=>e.main&&e.light).map(([t])=>({props:{color:t},style:{[`&.${p.A.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${p.A.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,l.a)(e.palette[t].main,.62):(0,l.e$)(e.palette[t].main,.55)}`}},[`&.${p.A.checked} + .${p.A.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),v=(0,d.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)})),b=(0,d.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),_=i.forwardRef(function(e,t){const r=(0,f.b)({props:e,name:"MuiSwitch"}),{className:i,color:l="primary",edge:u=!1,size:d="medium",sx:_}=r,x=(0,n.A)(r,m),w=(0,o.A)({},r,{color:l,edge:u,size:d}),A=(e=>{const{classes:t,edge:r,size:n,color:i,checked:a,disabled:l}=e,u={root:["root",r&&`edge${(0,c.A)(r)}`,`size${(0,c.A)(n)}`],switchBase:["switchBase",`color${(0,c.A)(i)}`,a&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},d=(0,s.A)(u,p.n,t);return(0,o.A)({},t,d)})(w),S=(0,h.jsx)(b,{className:A.thumb,ownerState:w});return(0,h.jsxs)(g,{className:(0,a.A)(A.root,i),sx:_,ownerState:w,children:[(0,h.jsx)(y,(0,o.A)({type:"checkbox",icon:S,checkedIcon:S,ref:t,ownerState:w},x,{classes:(0,o.A)({},A,{root:A.switchBase})})),(0,h.jsx)(v,{className:A.track,ownerState:w})]})})},CIcg(e,t,r){"use strict";r.d(t,{A:()=>a,n:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSwitch",e)}const a=(0,n.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"])},lZ7h(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("+8pU"),c=r("xeev"),u=r("W9AN"),d=r("Vn7y"),f=r("/eUX"),p=r("nKUr");const h=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],m=(0,d.Ay)(l.A,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${(0,c.A)(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped,{[`& .${f.A.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>(0,o.A)({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${f.A.iconWrapper}`]:(0,o.A)({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${f.A.selected}`]:{opacity:1},[`&.${f.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${f.A.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${f.A.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${f.A.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${f.A.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),g=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiTab"}),{className:l,disabled:d=!1,disableFocusRipple:g=!1,fullWidth:y,icon:v,iconPosition:b="top",indicator:_,label:x,onChange:w,onClick:A,onFocus:S,selected:C,selectionFollowsFocus:E,textColor:T="inherit",value:I,wrapped:k=!1}=r,M=(0,n.A)(r,h),R=(0,o.A)({},r,{disabled:d,disableFocusRipple:g,selected:C,icon:!!v,iconPosition:b,label:!!x,fullWidth:y,textColor:T,wrapped:k}),P=(e=>{const{classes:t,textColor:r,fullWidth:n,wrapped:o,icon:i,label:a,selected:l,disabled:u}=e,d={root:["root",i&&a&&"labelIcon",`textColor${(0,c.A)(r)}`,n&&"fullWidth",o&&"wrapped",l&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return(0,s.A)(d,f.s,t)})(R),O=v&&x&&i.isValidElement(v)?i.cloneElement(v,{className:(0,a.A)(P.iconWrapper,v.props.className)}):v;return(0,p.jsxs)(m,(0,o.A)({focusRipple:!g,className:(0,a.A)(P.root,l),ref:t,role:"tab","aria-selected":C,disabled:d,onClick:e=>{!C&&w&&w(e,I),A&&A(e)},onFocus:e=>{E&&!C&&w&&w(e,I),S&&S(e)},ownerState:R,tabIndex:C?0:-1},M,{children:["top"===b||"start"===b?(0,p.jsxs)(i.Fragment,{children:[O,x]}):(0,p.jsxs)(i.Fragment,{children:[x,O]}),_]}))})},"/eUX"(e,t,r){"use strict";r.d(t,{A:()=>a,s:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTab",e)}const a=(0,n.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"])},"+asq"(e,t,r){"use strict";r.d(t,{A:()=>b});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("St5x"),c=r("0Ydi"),u=r("Z21g"),d=r("5+C/"),f=r("+8pU"),p=r("W9AN"),h=r("Vn7y"),m=r("EMKz"),g=r("nKUr");const y=["className","slots","slotProps","direction","orientation","disabled"],v=(0,h.Ay)(f.A,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})(({ownerState:e})=>(0,o.A)({width:40,flexShrink:0,opacity:.8,[`&.${m.A.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),b=i.forwardRef(function(e,t){var r,i;const f=(0,p.b)({props:e,name:"MuiTabScrollButton"}),{className:h,slots:b={},slotProps:_={},direction:x}=f,w=(0,n.A)(f,y),A=(0,l.I)(),S=(0,o.A)({isRtl:A},f),C=(e=>{const{classes:t,orientation:r,disabled:n}=e,o={root:["root",r,n&&"disabled"]};return(0,s.A)(o,m.T,t)})(S),E=null!=(r=b.StartScrollButtonIcon)?r:u.A,T=null!=(i=b.EndScrollButtonIcon)?i:d.A,I=(0,c.A)({elementType:E,externalSlotProps:_.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S}),k=(0,c.A)({elementType:T,externalSlotProps:_.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S});return(0,g.jsx)(v,(0,o.A)({component:"div",className:(0,a.A)(C.root,h),ref:t,role:null,ownerState:S,tabIndex:null},w,{children:"left"===x?(0,g.jsx)(E,(0,o.A)({},I)):(0,g.jsx)(T,(0,o.A)({},k))}))})},EMKz(e,t,r){"use strict";r.d(t,{A:()=>a,T:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTabScrollButton",e)}const a=(0,n.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"])},GOrD(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("amon"),c=r("W9AN"),u=r("Vn7y"),d=r("qy7K"),f=r("nKUr");const p=["className","component","padding","size","stickyHeader"],h=(0,u.Ay)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>(0,o.A)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,o.A)({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},t.stickyHeader&&{borderCollapse:"separate"})),m="table",g=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiTable"}),{className:u,component:g=m,padding:y="normal",size:v="medium",stickyHeader:b=!1}=r,_=(0,n.A)(r,p),x=(0,o.A)({},r,{component:g,padding:y,size:v,stickyHeader:b}),w=(e=>{const{classes:t,stickyHeader:r}=e,n={root:["root",r&&"stickyHeader"]};return(0,s.A)(n,d.l,t)})(x),A=i.useMemo(()=>({padding:y,size:v,stickyHeader:b}),[y,v,b]);return(0,f.jsx)(l.A.Provider,{value:A,children:(0,f.jsx)(h,(0,o.A)({as:g,role:g===m?null:"table",ref:t,className:(0,a.A)(w.root,u),ownerState:x},_))})})},amon(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext()},bpaH(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext()},qy7K(e,t,r){"use strict";r.d(t,{A:()=>a,l:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTable",e)}const a=(0,n.A)("MuiTable",["root","stickyHeader"])},J1WE(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("bpaH"),c=r("W9AN"),u=r("Vn7y"),d=r("bXaB"),f=r("nKUr");const p=["className","component"],h=(0,u.Ay)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),m={variant:"body"},g="tbody",y=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiTableBody"}),{className:i,component:u=g}=r,y=(0,o.A)(r,p),v=(0,n.A)({},r,{component:u}),b=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.b,t)})(v);return(0,f.jsx)(l.A.Provider,{value:m,children:(0,f.jsx)(h,(0,n.A)({className:(0,a.A)(b.root,i),as:u,ref:t,role:u===g?null:"rowgroup",ownerState:v},y))})})},bXaB(e,t,r){"use strict";r.d(t,{A:()=>a,b:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTableBody",e)}const a=(0,n.A)("MuiTableBody",["root"])},xqzF(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("xeev"),u=r("amon"),d=r("bpaH"),f=r("W9AN"),p=r("Vn7y"),h=r("WeeH"),m=r("nKUr");const g=["align","className","component","padding","scope","size","sortDirection","variant"],y=(0,p.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,c.A)(r.size)}`],"normal"!==r.padding&&t[`padding${(0,c.A)(r.padding)}`],"inherit"!==r.align&&t[`align${(0,c.A)(r.align)}`],r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>(0,o.A)({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?(0,l.a)((0,l.X4)(e.palette.divider,1),.88):(0,l.e$)((0,l.X4)(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===t.variant&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},"body"===t.variant&&{color:(e.vars||e).palette.text.primary},"footer"===t.variant&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},"small"===t.size&&{padding:"6px 16px",[`&.${h.A.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===t.padding&&{width:48,padding:"0 0 0 4px"},"none"===t.padding&&{padding:0},"left"===t.align&&{textAlign:"left"},"center"===t.align&&{textAlign:"center"},"right"===t.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===t.align&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),v=i.forwardRef(function(e,t){const r=(0,f.b)({props:e,name:"MuiTableCell"}),{align:l="inherit",className:p,component:v,padding:b,scope:_,size:x,sortDirection:w,variant:A}=r,S=(0,n.A)(r,g),C=i.useContext(u.A),E=i.useContext(d.A),T=E&&"head"===E.variant;let I;I=v||(T?"th":"td");let k=_;"td"===I?k=void 0:!k&&T&&(k="col");const M=A||E&&E.variant,R=(0,o.A)({},r,{align:l,component:I,padding:b||(C&&C.padding?C.padding:"normal"),size:x||(C&&C.size?C.size:"medium"),sortDirection:w,stickyHeader:"head"===M&&C&&C.stickyHeader,variant:M}),P=(e=>{const{classes:t,variant:r,align:n,padding:o,size:i,stickyHeader:a}=e,l={root:["root",r,a&&"stickyHeader","inherit"!==n&&`align${(0,c.A)(n)}`,"normal"!==o&&`padding${(0,c.A)(o)}`,`size${(0,c.A)(i)}`]};return(0,s.A)(l,h.r,t)})(R);let O=null;return w&&(O="asc"===w?"ascending":"descending"),(0,m.jsx)(y,(0,o.A)({as:I,ref:t,className:(0,a.A)(P.root,p),"aria-sort":O,scope:k,ownerState:R},S))})},WeeH(e,t,r){"use strict";r.d(t,{A:()=>a,r:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTableCell",e)}const a=(0,n.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"])},ZrSb(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("Vn7y"),u=r("7Ep0"),d=r("nKUr");const f=["className","component"],p=(0,c.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),h=i.forwardRef(function(e,t){const r=(0,l.b)({props:e,name:"MuiTableContainer"}),{className:i,component:c="div"}=r,h=(0,o.A)(r,f),m=(0,n.A)({},r,{component:c}),g=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},u.I,t)})(m);return(0,d.jsx)(p,(0,n.A)({ref:t,as:c,className:(0,a.A)(g.root,i),ownerState:m},h))})},"7Ep0"(e,t,r){"use strict";r.d(t,{A:()=>a,I:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTableContainer",e)}const a=(0,n.A)("MuiTableContainer",["root"])},PjUp(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("bpaH"),c=r("W9AN"),u=r("Vn7y"),d=r("mzdN"),f=r("nKUr");const p=["className","component"],h=(0,u.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),m={variant:"head"},g="thead",y=i.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiTableHead"}),{className:i,component:u=g}=r,y=(0,o.A)(r,p),v=(0,n.A)({},r,{component:u}),b=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.X,t)})(v);return(0,f.jsx)(l.A.Provider,{value:m,children:(0,f.jsx)(h,(0,n.A)({as:u,className:(0,a.A)(b.root,i),ref:t,role:u===g?null:"rowgroup",ownerState:v},y))})})},mzdN(e,t,r){"use strict";r.d(t,{A:()=>a,X:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTableHead",e)}const a=(0,n.A)("MuiTableHead",["root"])},iu7o(e,t,r){"use strict";r.d(t,{A:()=>z});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("gU+W"),c=r("Vn7y"),u=r("W9AN"),d=r("kmWS"),f=r("LutX"),p=r("AAK8"),h=r("xqzF"),m=r("QOiN"),g=r("St5x"),y=r("Z21g"),v=r("5+C/"),b=r("OGDC"),_=r("/0Dp"),x=r("Be/P"),w=r("nKUr");const A=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],S=i.forwardRef(function(e,t){var r,i,a,s,l,c,u,d;const{backIconButtonProps:f,count:p,disabled:h=!1,getItemAriaLabel:m,nextIconButtonProps:S,onPageChange:C,page:E,rowsPerPage:T,showFirstButton:I,showLastButton:k,slots:M={},slotProps:R={}}=e,P=(0,n.A)(e,A),O=(0,g.I)(),D=null!=(r=M.firstButton)?r:b.A,L=null!=(i=M.lastButton)?i:b.A,N=null!=(a=M.nextButton)?a:b.A,F=null!=(s=M.previousButton)?s:b.A,z=null!=(l=M.firstButtonIcon)?l:x.A,B=null!=(c=M.lastButtonIcon)?c:_.A,j=null!=(u=M.nextButtonIcon)?u:v.A,$=null!=(d=M.previousButtonIcon)?d:y.A,U=O?L:D,V=O?N:F,H=O?F:N,G=O?D:L,W=O?R.lastButton:R.firstButton,q=O?R.nextButton:R.previousButton,Z=O?R.previousButton:R.nextButton,Y=O?R.firstButton:R.lastButton;return(0,w.jsxs)("div",(0,o.A)({ref:t},P,{children:[I&&(0,w.jsx)(U,(0,o.A)({onClick:e=>{C(e,0)},disabled:h||0===E,"aria-label":m("first",E),title:m("first",E)},W,{children:O?(0,w.jsx)(B,(0,o.A)({},R.lastButtonIcon)):(0,w.jsx)(z,(0,o.A)({},R.firstButtonIcon))})),(0,w.jsx)(V,(0,o.A)({onClick:e=>{C(e,E-1)},disabled:h||0===E,color:"inherit","aria-label":m("previous",E),title:m("previous",E)},null!=q?q:f,{children:O?(0,w.jsx)(j,(0,o.A)({},R.nextButtonIcon)):(0,w.jsx)($,(0,o.A)({},R.previousButtonIcon))})),(0,w.jsx)(H,(0,o.A)({onClick:e=>{C(e,E+1)},disabled:h||-1!==p&&E>=Math.ceil(p/T)-1,color:"inherit","aria-label":m("next",E),title:m("next",E)},null!=Z?Z:S,{children:O?(0,w.jsx)($,(0,o.A)({},R.previousButtonIcon)):(0,w.jsx)(j,(0,o.A)({},R.nextButtonIcon))})),k&&(0,w.jsx)(G,(0,o.A)({onClick:e=>{C(e,Math.max(0,Math.ceil(p/T)-1))},disabled:h||E>=Math.ceil(p/T)-1,"aria-label":m("last",E),title:m("last",E)},Y,{children:O?(0,w.jsx)(z,(0,o.A)({},R.firstButtonIcon)):(0,w.jsx)(B,(0,o.A)({},R.lastButtonIcon))}))]}))});var C,E=r("DSU1"),T=r("hwAa");const I=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],k=(0,c.Ay)(h.A,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})),M=(0,c.Ay)(m.A,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>(0,o.A)({[`& .${T.A.actions}`]:t.actions},t.toolbar)})(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${T.A.actions}`]:{flexShrink:0,marginLeft:20}})),R=(0,c.Ay)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),P=(0,c.Ay)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(({theme:e})=>(0,o.A)({},e.typography.body2,{flexShrink:0})),O=(0,c.Ay)(p.A,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>(0,o.A)({[`& .${T.A.selectIcon}`]:t.selectIcon,[`& .${T.A.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${T.A.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),D=(0,c.Ay)(f.A,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),L=(0,c.Ay)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(({theme:e})=>(0,o.A)({},e.typography.body2,{flexShrink:0}));function N({from:e,to:t,count:r}){return`${e}–${t} of ${-1!==r?r:`more than ${t}`}`}function F(e){return`Go to ${e} page`}const z=i.forwardRef(function(e,t){var r;const c=(0,u.b)({props:e,name:"MuiTablePagination"}),{ActionsComponent:f=S,backIconButtonProps:p,className:m,colSpan:g,component:y=h.A,count:v,disabled:b=!1,getItemAriaLabel:_=F,labelDisplayedRows:x=N,labelRowsPerPage:A="Rows per page:",nextIconButtonProps:z,onPageChange:B,onRowsPerPageChange:j,page:$,rowsPerPage:U,rowsPerPageOptions:V=[10,25,50,100],SelectProps:H={},showFirstButton:G=!1,showLastButton:W=!1,slotProps:q={},slots:Z={}}=c,Y=(0,n.A)(c,I),X=c,K=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},T.B,t)})(X),J=null!=(r=null==q?void 0:q.select)?r:H,Q=J.native?"option":D;let ee;y!==h.A&&"td"!==y||(ee=g||1e3);const te=(0,E.A)(J.id),re=(0,E.A)(J.labelId);return(0,w.jsx)(k,(0,o.A)({colSpan:ee,ref:t,as:y,ownerState:X,className:(0,a.A)(K.root,m)},Y,{children:(0,w.jsxs)(M,{className:K.toolbar,children:[(0,w.jsx)(R,{className:K.spacer}),V.length>1&&(0,w.jsx)(P,{className:K.selectLabel,id:re,children:A}),V.length>1&&(0,w.jsx)(O,(0,o.A)({variant:"standard"},!J.variant&&{input:C||(C=(0,w.jsx)(d.Ay,{}))},{value:U,onChange:j,id:te,labelId:re},J,{classes:(0,o.A)({},J.classes,{root:(0,a.A)(K.input,K.selectRoot,(J.classes||{}).root),select:(0,a.A)(K.select,(J.classes||{}).select),icon:(0,a.A)(K.selectIcon,(J.classes||{}).icon)}),disabled:b,children:V.map(e=>(0,i.createElement)(Q,(0,o.A)({},!(0,l.A)(Q)&&{ownerState:X},{className:K.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e))})),(0,w.jsx)(L,{className:K.displayedRows,children:x({from:0===v?0:$*U+1,to:-1===v?($+1)*U:-1===U?v:Math.min(v,($+1)*U),count:-1===v?-1:v,page:$})}),(0,w.jsx)(f,{className:K.actions,backIconButtonProps:p,count:v,nextIconButtonProps:z,onPageChange:B,page:$,rowsPerPage:U,showFirstButton:G,showLastButton:W,slotProps:q.actions,slots:Z.actions,getItemAriaLabel:_,disabled:b})]})}))})},hwAa(e,t,r){"use strict";r.d(t,{A:()=>a,B:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTablePagination",e)}const a=(0,n.A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"])},VMHA(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("bpaH"),u=r("W9AN"),d=r("Vn7y"),f=r("criW"),p=r("nKUr");const h=["className","component","hover","selected"],m=(0,d.Ay)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.head&&t.head,r.footer&&t.footer]}})(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${f.A.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${f.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),g="tr",y=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiTableRow"}),{className:l,component:d=g,hover:y=!1,selected:v=!1}=r,b=(0,o.A)(r,h),_=i.useContext(c.A),x=(0,n.A)({},r,{component:d,hover:y,selected:v,head:_&&"head"===_.variant,footer:_&&"footer"===_.variant}),w=(e=>{const{classes:t,selected:r,hover:n,head:o,footer:i}=e,a={root:["root",r&&"selected",n&&"hover",o&&"head",i&&"footer"]};return(0,s.A)(a,f.r,t)})(x);return(0,p.jsx)(m,(0,n.A)({as:d,ref:t,className:(0,a.A)(w.root,l),role:d===g?null:"row",ownerState:x},b))})},criW(e,t,r){"use strict";r.d(t,{A:()=>a,r:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTableRow",e)}const a=(0,n.A)("MuiTableRow",["root","selected","hover","head","footer"])},HAvo(e,t,r){"use strict";r.d(t,{A:()=>F});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("St5x"),c=r("0Ydi"),u=r("Vn7y"),d=r("W9AN"),f=r("UnQg"),p=r("7yHM");let h;function m(){if(h)return h;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),h="reverse",e.scrollLeft>0?h="default":(e.scrollLeft=1,0===e.scrollLeft&&(h="negative")),document.body.removeChild(e),h}function g(e,t){const r=e.scrollLeft;if("rtl"!==t)return r;switch(m()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}function y(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var v=r("6q60"),b=r("WFZb"),_=r("nKUr");const x=["onChange"],w={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var A=r("+asq"),S=r("KXty"),C=r("D+4I"),E=r("rdfb");const T=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],I=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,k=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,M=(e,t,r)=>{let n=!1,o=r(e,t);for(;o;){if(o===e.firstChild){if(n)return;n=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=r(e,o)}},R=(0,u.Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${C.A.scrollButtons}`]:t.scrollButtons},{[`& .${C.A.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>(0,o.A)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${C.A.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),P=(0,u.Ay)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})(({ownerState:e})=>(0,o.A)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),O=(0,u.Ay)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.flexContainer,r.vertical&&t.flexContainerVertical,r.centered&&t.centered]}})(({ownerState:e})=>(0,o.A)({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),D=(0,u.Ay)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>(0,o.A)({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),L=(0,u.Ay)(function(e){const{onChange:t}=e,r=(0,n.A)(e,x),a=i.useRef(),s=i.useRef(null),l=()=>{a.current=s.current.offsetHeight-s.current.clientHeight};return(0,v.A)(()=>{const e=(0,p.A)(()=>{const e=a.current;l(),e!==a.current&&t(a.current)}),r=(0,b.A)(s.current);return r.addEventListener("resize",e),()=>{e.clear(),r.removeEventListener("resize",e)}},[t]),i.useEffect(()=>{l(),t(a.current)},[t]),(0,_.jsx)("div",(0,o.A)({style:w},r,{ref:s}))})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),N={},F=i.forwardRef(function(e,t){const r=(0,d.b)({props:e,name:"MuiTabs"}),u=(0,f.A)(),h=(0,l.I)(),{"aria-label":v,"aria-labelledby":x,action:w,centered:F=!1,children:z,className:B,component:j="div",allowScrollButtonsMobile:$=!1,indicatorColor:U="primary",onChange:V,orientation:H="horizontal",ScrollButtonComponent:G=A.A,scrollButtons:W="auto",selectionFollowsFocus:q,slots:Z={},slotProps:Y={},TabIndicatorProps:X={},TabScrollButtonProps:K={},textColor:J="primary",value:Q,variant:ee="standard",visibleScrollbar:te=!1}=r,re=(0,n.A)(r,T),ne="scrollable"===ee,oe="vertical"===H,ie=oe?"scrollTop":"scrollLeft",ae=oe?"top":"left",se=oe?"bottom":"right",le=oe?"clientHeight":"clientWidth",ce=oe?"height":"width",ue=(0,o.A)({},r,{component:j,allowScrollButtonsMobile:$,indicatorColor:U,orientation:H,vertical:oe,scrollButtons:W,textColor:J,variant:ee,visibleScrollbar:te,fixed:!ne,hideScrollbar:ne&&!te,scrollableX:ne&&!oe,scrollableY:ne&&oe,centered:F&&!ne,scrollButtonsHideMobile:!$}),de=(e=>{const{vertical:t,fixed:r,hideScrollbar:n,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:l,classes:c}=e,u={root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",n&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]};return(0,s.A)(u,C.H,c)})(ue),fe=(0,c.A)({elementType:Z.StartScrollButtonIcon,externalSlotProps:Y.startScrollButtonIcon,ownerState:ue}),pe=(0,c.A)({elementType:Z.EndScrollButtonIcon,externalSlotProps:Y.endScrollButtonIcon,ownerState:ue}),[he,me]=i.useState(!1),[ge,ye]=i.useState(N),[ve,be]=i.useState(!1),[_e,xe]=i.useState(!1),[we,Ae]=i.useState(!1),[Se,Ce]=i.useState({overflow:"hidden",scrollbarWidth:0}),Ee=new Map,Te=i.useRef(null),Ie=i.useRef(null),ke=()=>{const e=Te.current;let t,r;if(e){const r=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:g(e,h?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(e&&!1!==Q){const e=Ie.current.children;if(e.length>0){const t=e[Ee.get(Q)];r=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:r}},Me=(0,S.A)(()=>{const{tabsMeta:e,tabMeta:t}=ke();let r,n=0;if(oe)r="top",t&&e&&(n=t.top-e.top+e.scrollTop);else if(r=h?"right":"left",t&&e){const o=h?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;n=(h?-1:1)*(t[r]-e[r]+o)}const o={[r]:n,[ce]:t?t[ce]:0};if(isNaN(ge[r])||isNaN(ge[ce]))ye(o);else{const e=Math.abs(ge[r]-o[r]),t=Math.abs(ge[ce]-o[ce]);(e>=1||t>=1)&&ye(o)}}),Re=(e,{animation:t=!0}={})=>{t?function(e,t,r,n={},o=()=>{}){const{ease:i=y,duration:a=300}=n;let s=null;const l=t[e];let c=!1;const u=n=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=n);const d=Math.min(1,(n-s)/a);t[e]=i(d)*(r-l)+l,d>=1?requestAnimationFrame(()=>{o(null)}):requestAnimationFrame(u)};l===r?o(new Error("Element already at target position")):requestAnimationFrame(u)}(ie,Te.current,e,{duration:u.transitions.duration.standard}):Te.current[ie]=e},Pe=e=>{let t=Te.current[ie];oe?t+=e:(t+=e*(h?-1:1),t*=h&&"reverse"===m()?-1:1),Re(t)},Oe=()=>{const e=Te.current[le];let t=0;const r=Array.from(Ie.current.children);for(let n=0;ne){0===n&&(t=e);break}t+=o[le]}return t},De=()=>{Pe(-1*Oe())},Le=()=>{Pe(Oe())},Ne=i.useCallback(e=>{Ce({overflow:null,scrollbarWidth:e})},[]),Fe=(0,S.A)(e=>{const{tabsMeta:t,tabMeta:r}=ke();if(r&&t)if(r[ae]t[se]){const n=t[ie]+(r[se]-t[se]);Re(n,{animation:e})}}),ze=(0,S.A)(()=>{ne&&!1!==W&&Ae(!we)});i.useEffect(()=>{const e=(0,p.A)(()=>{Te.current&&Me()});let t;const r=(0,b.A)(Te.current);let n;return r.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(Ie.current.children).forEach(e=>{t.observe(e)})),"undefined"!=typeof MutationObserver&&(n=new MutationObserver(r=>{r.forEach(e=>{e.removedNodes.forEach(e=>{var r;null==(r=t)||r.unobserve(e)}),e.addedNodes.forEach(e=>{var r;null==(r=t)||r.observe(e)})}),e(),ze()}),n.observe(Ie.current,{childList:!0})),()=>{var o,i;e.clear(),r.removeEventListener("resize",e),null==(o=n)||o.disconnect(),null==(i=t)||i.disconnect()}},[Me,ze]),i.useEffect(()=>{const e=Array.from(Ie.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&ne&&!1!==W){const r=e[0],n=e[t-1],o={root:Te.current,threshold:.99},i=new IntersectionObserver(e=>{be(!e[0].isIntersecting)},o);i.observe(r);const a=new IntersectionObserver(e=>{xe(!e[0].isIntersecting)},o);return a.observe(n),()=>{i.disconnect(),a.disconnect()}}},[ne,W,we,null==z?void 0:z.length]),i.useEffect(()=>{me(!0)},[]),i.useEffect(()=>{Me()}),i.useEffect(()=>{Fe(N!==ge)},[Fe,ge]),i.useImperativeHandle(w,()=>({updateIndicator:Me,updateScrollButtons:ze}),[Me,ze]);const Be=(0,_.jsx)(D,(0,o.A)({},X,{className:(0,a.A)(de.indicator,X.className),ownerState:ue,style:(0,o.A)({},ge,X.style)}));let je=0;const $e=i.Children.map(z,e=>{if(!i.isValidElement(e))return null;const t=void 0===e.props.value?je:e.props.value;Ee.set(t,je);const r=t===Q;return je+=1,i.cloneElement(e,(0,o.A)({fullWidth:"fullWidth"===ee,indicator:r&&!he&&Be,selected:r,selectionFollowsFocus:q,onChange:V,textColor:J,value:t},1!==je||!1!==Q||e.props.tabIndex?{}:{tabIndex:0}))}),Ue=(()=>{const e={};e.scrollbarSizeListener=ne?(0,_.jsx)(L,{onChange:Ne,className:(0,a.A)(de.scrollableX,de.hideScrollbar)}):null;const t=ne&&("auto"===W&&(ve||_e)||!0===W);return e.scrollButtonStart=t?(0,_.jsx)(G,(0,o.A)({slots:{StartScrollButtonIcon:Z.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:fe},orientation:H,direction:h?"right":"left",onClick:De,disabled:!ve},K,{className:(0,a.A)(de.scrollButtons,K.className)})):null,e.scrollButtonEnd=t?(0,_.jsx)(G,(0,o.A)({slots:{EndScrollButtonIcon:Z.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:pe},orientation:H,direction:h?"left":"right",onClick:Le,disabled:!_e},K,{className:(0,a.A)(de.scrollButtons,K.className)})):null,e})();return(0,_.jsxs)(R,(0,o.A)({className:(0,a.A)(de.root,B),ownerState:ue,ref:t,as:j},re,{children:[Ue.scrollButtonStart,Ue.scrollbarSizeListener,(0,_.jsxs)(P,{className:de.scroller,ownerState:ue,style:{overflow:Se.overflow,[oe?"margin"+(h?"Left":"Right"):"marginBottom"]:te?void 0:-Se.scrollbarWidth},ref:Te,children:[(0,_.jsx)(O,{"aria-label":v,"aria-labelledby":x,"aria-orientation":"vertical"===H?"vertical":null,className:de.flexContainer,ownerState:ue,onKeyDown:e=>{const t=Ie.current,r=(0,E.A)(t).activeElement;if("tab"!==r.getAttribute("role"))return;let n="horizontal"===H?"ArrowLeft":"ArrowUp",o="horizontal"===H?"ArrowRight":"ArrowDown";switch("horizontal"===H&&h&&(n="ArrowRight",o="ArrowLeft"),e.key){case n:e.preventDefault(),M(t,r,k);break;case o:e.preventDefault(),M(t,r,I);break;case"Home":e.preventDefault(),M(t,null,I);break;case"End":e.preventDefault(),M(t,null,k)}},ref:Ie,role:"tablist",children:$e}),he&&Be]}),Ue.scrollButtonEnd]}))})},"D+4I"(e,t,r){"use strict";r.d(t,{A:()=>a,H:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTabs",e)}const a=(0,n.A)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"])},MGIy(e,t,r){"use strict";r.d(t,{A:()=>A});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("A3c4"),c=r("Vn7y"),u=r("W9AN"),d=r("WdHY"),f=r("fJ4Q"),p=r("6j3M"),h=r("kQF4"),m=r("Fg+5"),g=r("sbgx"),y=r("AAK8"),v=r("ndLI"),b=r("nKUr");const _=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],x={standard:d.A,filled:f.A,outlined:p.A},w=(0,c.Ay)(m.A,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),A=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:c=!1,children:d,className:f,color:p="primary",defaultValue:m,disabled:A=!1,error:S=!1,FormHelperTextProps:C,fullWidth:E=!1,helperText:T,id:I,InputLabelProps:k,inputProps:M,InputProps:R,inputRef:P,label:O,maxRows:D,minRows:L,multiline:N=!1,name:F,onBlur:z,onChange:B,onFocus:j,placeholder:$,required:U=!1,rows:V,select:H=!1,SelectProps:G,type:W,value:q,variant:Z="outlined"}=r,Y=(0,o.A)(r,_),X=(0,n.A)({},r,{autoFocus:c,color:p,disabled:A,error:S,fullWidth:E,multiline:N,required:U,select:H,variant:Z}),K=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},v._,t)})(X),J={};"outlined"===Z&&(k&&void 0!==k.shrink&&(J.notched=k.shrink),J.label=O),H&&(G&&G.native||(J.id=void 0),J["aria-describedby"]=void 0);const Q=(0,l.A)(I),ee=T&&Q?`${Q}-helper-text`:void 0,te=O&&Q?`${Q}-label`:void 0,re=x[Z],ne=(0,b.jsx)(re,(0,n.A)({"aria-describedby":ee,autoComplete:i,autoFocus:c,defaultValue:m,fullWidth:E,multiline:N,name:F,rows:V,maxRows:D,minRows:L,type:W,value:q,id:Q,inputRef:P,onBlur:z,onChange:B,onFocus:j,placeholder:$,inputProps:M},J,R));return(0,b.jsxs)(w,(0,n.A)({className:(0,a.A)(K.root,f),disabled:A,error:S,fullWidth:E,ref:t,required:U,color:p,variant:Z,ownerState:X},Y,{children:[null!=O&&""!==O&&(0,b.jsx)(h.A,(0,n.A)({htmlFor:Q,id:te},k,{children:O})),H?(0,b.jsx)(y.A,(0,n.A)({"aria-describedby":ee,id:Q,labelId:te,value:q,input:ne},G,{children:d})):ne,T&&(0,b.jsx)(g.A,(0,n.A)({id:ee},C,{children:T}))]}))})},ndLI(e,t,r){"use strict";r.d(t,{A:()=>a,_:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTextField",e)}const a=(0,n.A)("MuiTextField",["root"])},ICY4(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("N0rN"),s=r("4bZc"),l=r("nXnS"),c=r("XgeM"),u=r("QoIX"),d=r("nKUr");const f=["onChange","maxRows","minRows","style","value"];function p(e){return parseInt(e,10)||0}const h={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function m(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const g=i.forwardRef(function(e,t){const{onChange:r,maxRows:g,minRows:y=1,style:v,value:b}=e,_=(0,o.A)(e,f),{current:x}=i.useRef(null!=b),w=i.useRef(null),A=(0,a.A)(t,w),S=i.useRef(null),C=i.useRef(null),E=i.useCallback(()=>{const t=w.current,r=C.current;if(!t||!r)return;const n=(0,s.A)(t).getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0,overflowing:!1};r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");const o=n.boxSizing,i=p(n.paddingBottom)+p(n.paddingTop),a=p(n.borderBottomWidth)+p(n.borderTopWidth),l=r.scrollHeight;r.value="x";const c=r.scrollHeight;let u=l;return y&&(u=Math.max(Number(y)*c,u)),g&&(u=Math.min(Number(g)*c,u)),u=Math.max(u,c),{outerHeightStyle:u+("border-box"===o?i+a:0),overflowing:Math.abs(u-l)<=1}},[g,y,e.placeholder]),T=(0,l.A)(()=>{const e=w.current,t=E();if(!e||!t||m(t))return!1;const r=t.outerHeightStyle;return null!=S.current&&S.current!==r}),I=i.useCallback(()=>{const e=w.current,t=E();if(!e||!t||m(t))return;const r=t.outerHeightStyle;S.current!==r&&(S.current=r,e.style.height=`${r}px`),e.style.overflow=t.overflowing?"hidden":""},[E]),k=i.useRef(-1);return(0,c.A)(()=>{const e=(0,u.A)(I),t=null==w?void 0:w.current;if(!t)return;const r=(0,s.A)(t);let n;return r.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver(()=>{T()&&(n.unobserve(t),cancelAnimationFrame(k.current),I(),k.current=requestAnimationFrame(()=>{n.observe(t)}))}),n.observe(t)),()=>{e.clear(),cancelAnimationFrame(k.current),r.removeEventListener("resize",e),n&&n.disconnect()}},[E,I,T]),(0,c.A)(()=>{I()}),(0,d.jsxs)(i.Fragment,{children:[(0,d.jsx)("textarea",(0,n.A)({value:b,onChange:e=>{x||I(),r&&r(e)},ref:A,rows:y,style:v},_)),(0,d.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:C,tabIndex:-1,style:(0,n.A)({},h,v,{paddingTop:0,paddingBottom:0})})]})})},QOiN(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("Vn7y"),u=r("ZgSS"),d=r("nKUr");const f=["className","component","disableGutters","variant"],p=(0,c.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})(({theme:e,ownerState:t})=>(0,o.A)({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===t.variant&&{minHeight:48}),({theme:e,ownerState:t})=>"regular"===t.variant&&e.mixins.toolbar),h=i.forwardRef(function(e,t){const r=(0,l.b)({props:e,name:"MuiToolbar"}),{className:i,component:c="div",disableGutters:h=!1,variant:m="regular"}=r,g=(0,n.A)(r,f),y=(0,o.A)({},r,{component:c,disableGutters:h,variant:m}),v=(e=>{const{classes:t,disableGutters:r,variant:n}=e,o={root:["root",!r&&"gutters",n]};return(0,s.A)(o,u.U,t)})(y);return(0,d.jsx)(p,(0,o.A)({as:c,className:(0,a.A)(v.root,i),ref:t,ownerState:y},g))})},ZgSS(e,t,r){"use strict";r.d(t,{A:()=>a,U:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiToolbar",e)}const a=(0,n.A)("MuiToolbar",["root","gutters","regular","dense"])},"vH+6"(e,t,r){"use strict";r.d(t,{A:()=>D});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("J13E"),l=r("aGM9"),c=r("dcYk"),u=r("St5x"),d=r("/E4l"),f=r("cP2J"),p=r("UnQg"),h=r("Vn7y"),m=r("W9AN"),g=r("xeev"),y=r("UVCh"),v=r("usZy"),b=r("KXty"),_=r("ZfBw"),x=r("DSU1"),w=r("8rms"),A=r("1vOf"),S=r("mJ7p"),C=r("nKUr");const E=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"],T=(0,h.Ay)(v.A,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>(0,o.A)({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${S.A.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${S.A.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${S.A.arrow}`]:(0,o.A)({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${S.A.arrow}`]:(0,o.A)({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),I=(0,h.Ay)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,g.A)(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>{return(0,o.A)({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:(0,c.X4)(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(r=16/14,Math.round(1e5*r)/1e5+"em"),fontWeight:e.typography.fontWeightRegular},{[`.${S.A.popper}[data-popper-placement*="left"] &`]:(0,o.A)({transformOrigin:"right center"},t.isRtl?(0,o.A)({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):(0,o.A)({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${S.A.popper}[data-popper-placement*="right"] &`]:(0,o.A)({transformOrigin:"left center"},t.isRtl?(0,o.A)({marginRight:"14px"},t.touch&&{marginRight:"24px"}):(0,o.A)({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${S.A.popper}[data-popper-placement*="top"] &`]:(0,o.A)({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${S.A.popper}[data-popper-placement*="bottom"] &`]:(0,o.A)({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})});var r}),k=(0,h.Ay)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,c.X4)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let M=!1;const R=new s.E;let P={x:0,y:0};function O(e,t){return(r,...n)=>{t&&t(r,...n),e(r,...n)}}const D=i.forwardRef(function(e,t){var r,c,h,D,L,N,F,z,B,j,$,U,V,H,G,W,q,Z,Y;const X=(0,m.b)({props:e,name:"MuiTooltip"}),{arrow:K=!1,children:J,components:Q={},componentsProps:ee={},describeChild:te=!1,disableFocusListener:re=!1,disableHoverListener:ne=!1,disableInteractive:oe=!1,disableTouchListener:ie=!1,enterDelay:ae=100,enterNextDelay:se=0,enterTouchDelay:le=700,followCursor:ce=!1,id:ue,leaveDelay:de=0,leaveTouchDelay:fe=1500,onClose:pe,onOpen:he,open:me,placement:ge="bottom",PopperComponent:ye,PopperProps:ve={},slotProps:be={},slots:_e={},title:xe,TransitionComponent:we=y.A,TransitionProps:Ae}=X,Se=(0,n.A)(X,E),Ce=i.isValidElement(J)?J:(0,C.jsx)("span",{children:J}),Ee=(0,p.A)(),Te=(0,u.I)(),[Ie,ke]=i.useState(),[Me,Re]=i.useState(null),Pe=i.useRef(!1),Oe=oe||ce,De=(0,s.A)(),Le=(0,s.A)(),Ne=(0,s.A)(),Fe=(0,s.A)(),[ze,Be]=(0,A.A)({controlled:me,default:!1,name:"Tooltip",state:"open"});let je=ze;const $e=(0,x.A)(ue),Ue=i.useRef(),Ve=(0,b.A)(()=>{void 0!==Ue.current&&(document.body.style.WebkitUserSelect=Ue.current,Ue.current=void 0),Fe.clear()});i.useEffect(()=>Ve,[Ve]);const He=e=>{R.clear(),M=!0,Be(!0),he&&!je&&he(e)},Ge=(0,b.A)(e=>{R.start(800+de,()=>{M=!1}),Be(!1),pe&&je&&pe(e),De.start(Ee.transitions.duration.shortest,()=>{Pe.current=!1})}),We=e=>{Pe.current&&"touchstart"!==e.type||(Ie&&Ie.removeAttribute("title"),Le.clear(),Ne.clear(),ae||M&&se?Le.start(M?se:ae,()=>{He(e)}):He(e))},qe=e=>{Le.clear(),Ne.start(de,()=>{Ge(e)})},{isFocusVisibleRef:Ze,onBlur:Ye,onFocus:Xe,ref:Ke}=(0,w.A)(),[,Je]=i.useState(!1),Qe=e=>{Ye(e),!1===Ze.current&&(Je(!1),qe(e))},et=e=>{Ie||ke(e.currentTarget),Xe(e),!0===Ze.current&&(Je(!0),We(e))},tt=e=>{Pe.current=!0;const t=Ce.props;t.onTouchStart&&t.onTouchStart(e)};i.useEffect(()=>{if(je)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Ge(e)}},[Ge,je]);const rt=(0,_.A)((0,f.A)(Ce),Ke,ke,t);xe||0===xe||(je=!1);const nt=i.useRef(),ot={},it="string"==typeof xe;te?(ot.title=je||!it||ne?null:xe,ot["aria-describedby"]=je?$e:null):(ot["aria-label"]=it?xe:null,ot["aria-labelledby"]=je&&!it?$e:null);const at=(0,o.A)({},ot,Se,Ce.props,{className:(0,a.A)(Se.className,Ce.props.className),onTouchStart:tt,ref:rt},ce?{onMouseMove:e=>{const t=Ce.props;t.onMouseMove&&t.onMouseMove(e),P={x:e.clientX,y:e.clientY},nt.current&&nt.current.update()}}:{}),st={};ie||(at.onTouchStart=e=>{tt(e),Ne.clear(),De.clear(),Ve(),Ue.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Fe.start(le,()=>{document.body.style.WebkitUserSelect=Ue.current,We(e)})},at.onTouchEnd=e=>{Ce.props.onTouchEnd&&Ce.props.onTouchEnd(e),Ve(),Ne.start(fe,()=>{Ge(e)})}),ne||(at.onMouseOver=O(We,at.onMouseOver),at.onMouseLeave=O(qe,at.onMouseLeave),Oe||(st.onMouseOver=We,st.onMouseLeave=qe)),re||(at.onFocus=O(et,at.onFocus),at.onBlur=O(Qe,at.onBlur),Oe||(st.onFocus=et,st.onBlur=Qe));const lt=i.useMemo(()=>{var e;let t=[{name:"arrow",enabled:Boolean(Me),options:{element:Me,padding:4}}];return null!=(e=ve.popperOptions)&&e.modifiers&&(t=t.concat(ve.popperOptions.modifiers)),(0,o.A)({},ve.popperOptions,{modifiers:t})},[Me,ve]),ct=(0,o.A)({},X,{isRtl:Te,arrow:K,disableInteractive:Oe,placement:ge,PopperComponentProp:ye,touch:Pe.current}),ut=(e=>{const{classes:t,disableInteractive:r,arrow:n,touch:o,placement:i}=e,a={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",o&&"touch",`tooltipPlacement${(0,g.A)(i.split("-")[0])}`],arrow:["arrow"]};return(0,l.A)(a,S.E,t)})(ct),dt=null!=(r=null!=(c=_e.popper)?c:Q.Popper)?r:T,ft=null!=(h=null!=(D=null!=(L=_e.transition)?L:Q.Transition)?D:we)?h:y.A,pt=null!=(N=null!=(F=_e.tooltip)?F:Q.Tooltip)?N:I,ht=null!=(z=null!=(B=_e.arrow)?B:Q.Arrow)?z:k,mt=(0,d.A)(dt,(0,o.A)({},ve,null!=(j=be.popper)?j:ee.popper,{className:(0,a.A)(ut.popper,null==ve?void 0:ve.className,null==($=null!=(U=be.popper)?U:ee.popper)?void 0:$.className)}),ct),gt=(0,d.A)(ft,(0,o.A)({},Ae,null!=(V=be.transition)?V:ee.transition),ct),yt=(0,d.A)(pt,(0,o.A)({},null!=(H=be.tooltip)?H:ee.tooltip,{className:(0,a.A)(ut.tooltip,null==(G=null!=(W=be.tooltip)?W:ee.tooltip)?void 0:G.className)}),ct),vt=(0,d.A)(ht,(0,o.A)({},null!=(q=be.arrow)?q:ee.arrow,{className:(0,a.A)(ut.arrow,null==(Z=null!=(Y=be.arrow)?Y:ee.arrow)?void 0:Z.className)}),ct);return(0,C.jsxs)(i.Fragment,{children:[i.cloneElement(Ce,at),(0,C.jsx)(dt,(0,o.A)({as:null!=ye?ye:v.A,placement:ge,anchorEl:ce?{getBoundingClientRect:()=>({top:P.y,left:P.x,right:P.x,bottom:P.y,width:0,height:0})}:Ie,popperRef:nt,open:!!Ie&&je,id:$e,transition:!0},st,mt,{popperOptions:lt,children:({TransitionProps:e})=>(0,C.jsx)(ft,(0,o.A)({timeout:Ee.transitions.duration.shorter},e,gt,{children:(0,C.jsxs)(pt,(0,o.A)({},yt,{children:[xe,K?(0,C.jsx)(ht,(0,o.A)({},vt,{ref:Re})):null]}))}))}))]})})},mJ7p(e,t,r){"use strict";r.d(t,{A:()=>a,E:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTooltip",e)}const a=(0,n.A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"])},Gqia(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("0kTp"),l=r("aGM9"),c=r("Vn7y"),u=r("W9AN"),d=r("xeev"),f=r("zNd+"),p=r("nKUr");const h=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],m=(0,c.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],"inherit"!==r.align&&t[`align${(0,d.A)(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>(0,o.A)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),g={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},y={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},v=i.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiTypography"}),i=(e=>y[e]||e)(r.color),c=(0,s.A)((0,o.A)({},r,{color:i})),{align:v="inherit",className:b,component:_,gutterBottom:x=!1,noWrap:w=!1,paragraph:A=!1,variant:S="body1",variantMapping:C=g}=c,E=(0,n.A)(c,h),T=(0,o.A)({},c,{align:v,color:i,className:b,component:_,gutterBottom:x,noWrap:w,paragraph:A,variant:S,variantMapping:C}),I=_||(A?"p":C[S]||g[S])||"span",k=(e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,"inherit"!==e.align&&`align${(0,d.A)(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return(0,l.A)(s,f.y,a)})(T);return(0,p.jsx)(m,(0,o.A)({as:I,ref:t,ownerState:T,className:(0,a.A)(k.root,b)},E))})},"zNd+"(e,t,r){"use strict";r.d(t,{A:()=>a,y:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTypography",e)}const a=(0,n.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"])},qSC9(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r("q1tI"),o=r("N0rN"),i=r("cP2J"),a=r("p4lV"),s=r("nKUr");const l=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function c(e){const t=[],r=[];return Array.from(e.querySelectorAll(l)).forEach((e,n)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}(e))}(e)&&(0===o?t.push(e):r.push({documentOrder:n,tabIndex:o,node:e}))}),r.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function u(){return!0}const d=function(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:l=!1,disableRestoreFocus:d=!1,getTabbable:f=c,isEnabled:p=u,open:h}=e,m=n.useRef(!1),g=n.useRef(null),y=n.useRef(null),v=n.useRef(null),b=n.useRef(null),_=n.useRef(!1),x=n.useRef(null),w=(0,o.A)((0,i.A)(t),x),A=n.useRef(null);n.useEffect(()=>{h&&x.current&&(_.current=!r)},[r,h]),n.useEffect(()=>{if(!h||!x.current)return;const e=(0,a.A)(x.current);return x.current.contains(e.activeElement)||(x.current.hasAttribute("tabIndex")||x.current.setAttribute("tabIndex","-1"),_.current&&x.current.focus()),()=>{d||(v.current&&v.current.focus&&(m.current=!0,v.current.focus()),v.current=null)}},[h]),n.useEffect(()=>{if(!h||!x.current)return;const e=(0,a.A)(x.current),t=t=>{A.current=t,!l&&p()&&"Tab"===t.key&&e.activeElement===x.current&&t.shiftKey&&(m.current=!0,y.current&&y.current.focus())},r=()=>{const t=x.current;if(null===t)return;if(!e.hasFocus()||!p()||m.current)return void(m.current=!1);if(t.contains(e.activeElement))return;if(l&&e.activeElement!==g.current&&e.activeElement!==y.current)return;if(e.activeElement!==b.current)b.current=null;else if(null!==b.current)return;if(!_.current)return;let r=[];if(e.activeElement!==g.current&&e.activeElement!==y.current||(r=f(x.current)),r.length>0){var n,o;const e=Boolean((null==(n=A.current)?void 0:n.shiftKey)&&"Tab"===(null==(o=A.current)?void 0:o.key)),t=r[0],i=r[r.length-1];"string"!=typeof t&&"string"!=typeof i&&(e?i.focus():t.focus())}else t.focus()};e.addEventListener("focusin",r),e.addEventListener("keydown",t,!0);const n=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&r()},50);return()=>{clearInterval(n),e.removeEventListener("focusin",r),e.removeEventListener("keydown",t,!0)}},[r,l,d,p,h,f]);const S=e=>{null===v.current&&(v.current=e.relatedTarget),_.current=!0};return(0,s.jsxs)(n.Fragment,{children:[(0,s.jsx)("div",{tabIndex:h?0:-1,onFocus:S,ref:g,"data-testid":"sentinelStart"}),n.cloneElement(t,{ref:w,onFocus:e=>{null===v.current&&(v.current=e.relatedTarget),_.current=!0,b.current=e.target;const r=t.props.onFocus;r&&r(e)}}),(0,s.jsx)("div",{tabIndex:h?0:-1,onFocus:S,ref:y,"data-testid":"sentinelEnd"})]})}},UG0H(e,t,r){"use strict";r.d(t,{A:()=>n});const n={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},H00D(e,t,r){"use strict";r.d(t,{A:()=>n});const n={black:"#000",white:"#fff"}},at7f(e,t,r){"use strict";r.d(t,{A:()=>n});const n={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},Xxcx(e,t,r){"use strict";r.d(t,{A:()=>n});const n={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"}},"8jZn"(e,t,r){"use strict";r.d(t,{A:()=>n});const n={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"}},A1Zn(e,t,r){"use strict";r.d(t,{A:()=>n});const n={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},iIhR(e,t,r){"use strict";r.d(t,{A:()=>n});const n={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"}},"0XHX"(e,t,r){"use strict";r.d(t,{A:()=>n});const n={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},VRuf(e,t,r){"use strict";r.r(t),r.d(t,{Accordion:()=>Ve.A,AccordionActions:()=>et,AccordionDetails:()=>tt.A,AccordionSummary:()=>nt.A,Alert:()=>it.A,AlertTitle:()=>st.A,AppBar:()=>gt,Autocomplete:()=>yt.A,Avatar:()=>_t.A,AvatarGroup:()=>wt.A,Backdrop:()=>St.A,Badge:()=>Et.A,BottomNavigation:()=>Pt,BottomNavigationAction:()=>Bt,Box:()=>jt.A,Breadcrumbs:()=>nr,Button:()=>or.A,ButtonBase:()=>Ot.A,ButtonGroup:()=>lr.A,ButtonGroupButtonContext:()=>dr.A,ButtonGroupContext:()=>ur.A,Card:()=>gr,CardActionArea:()=>wr,CardActions:()=>Tr,CardContent:()=>Pr,CardHeader:()=>jr,CardMedia:()=>Zr,Checkbox:()=>Yr.A,Chip:()=>Kr.A,CircularProgress:()=>Qr.A,ClickAwayListener:()=>tn.x,Collapse:()=>rn.A,Container:()=>on.A,CssBaseline:()=>ln.Ay,Dialog:()=>dn.A,DialogActions:()=>pn.A,DialogContent:()=>mn.A,DialogContentText:()=>yn.A,DialogTitle:()=>bn.A,Divider:()=>xn.A,Drawer:()=>An.Ay,Experimental_CssVarsProvider:()=>Ne,Fab:()=>Mn,Fade:()=>Rn.A,FilledInput:()=>Pn.A,FormControl:()=>Dn.A,FormControlLabel:()=>Fn.A,FormGroup:()=>Bn.A,FormHelperText:()=>$n.A,FormLabel:()=>Vn.A,FormLabelRoot:()=>Vn.d,GlobalStyles:()=>vu.A,Grid:()=>ro,Grow:()=>Do.A,Hidden:()=>Zo,Icon:()=>ei,IconButton:()=>ti.A,ImageList:()=>ci,ImageListItem:()=>gi,ImageListItemBar:()=>Ci,Input:()=>Ei.A,InputAdornment:()=>Ii.A,InputBase:()=>Mi.Ay,InputLabel:()=>Pi.A,LinearProgress:()=>Di.A,Link:()=>Gi,List:()=>Wi.A,ListItem:()=>Zi.Ay,ListItemAvatar:()=>Xi.A,ListItemButton:()=>ra,ListItemIcon:()=>na.A,ListItemSecondaryAction:()=>ia.A,ListItemText:()=>sa.A,ListSubheader:()=>ca.A,Menu:()=>da.A,MenuItem:()=>pa.A,MenuList:()=>ma.A,MobileStepper:()=>Sa,Modal:()=>Ca.A,ModalManager:()=>Ea.P,NativeSelect:()=>Na,NoSsr:()=>za,OutlinedInput:()=>Ba.A,Pagination:()=>$a.A,PaginationItem:()=>Va.A,Paper:()=>ut.A,Popover:()=>Wa.Ay,PopoverPaper:()=>Wa.IJ,PopoverRoot:()=>Wa.yt,Popper:()=>Za.A,Portal:()=>Xa.A,Radio:()=>Ka.A,RadioGroup:()=>Qa.A,Rating:()=>As,ScopedCssBaseline:()=>Ss.A,Select:()=>Es.A,Skeleton:()=>Is.A,Slide:()=>Ms.A,Slider:()=>Rs.Ay,SliderMark:()=>Rs.d6,SliderMarkLabel:()=>Rs.xO,SliderRail:()=>Rs.Ww,SliderRoot:()=>Rs.g1,SliderThumb:()=>Rs.OQ,SliderTrack:()=>Rs.hB,SliderValueLabel:()=>Rs.nx,Snackbar:()=>Os.A,SnackbarContent:()=>Ls.A,SpeedDial:()=>el,SpeedDialAction:()=>ll,SpeedDialIcon:()=>ml,Stack:()=>gl.A,Step:()=>vl.A,StepButton:()=>Tl,StepConnector:()=>Il.A,StepContent:()=>Ll,StepContext:()=>_l.A,StepIcon:()=>Nl.A,StepLabel:()=>xl.A,Stepper:()=>Bl.A,StepperContext:()=>wl.A,StyledEngineProvider:()=>q.A,SvgIcon:()=>$l.A,SwipeableDrawer:()=>ac,Switch:()=>sc.A,THEME_ID:()=>C.A,Tab:()=>cc.A,TabScrollButton:()=>Uc.A,Table:()=>dc.A,TableBody:()=>pc.A,TableCell:()=>mc.A,TableContainer:()=>yc.A,TableFooter:()=>Ec,TableHead:()=>Tc.A,TablePagination:()=>kc.A,TableRow:()=>Rc.A,TableSortLabel:()=>Bc,Tabs:()=>jc.A,TextField:()=>Hc.A,TextareaAutosize:()=>Wc.A,ThemeProvider:()=>W.A,ToggleButton:()=>ru,ToggleButtonGroup:()=>lu,Toolbar:()=>cu.A,Tooltip:()=>tl.A,Typography:()=>Vt.A,Unstable_Grid2:()=>Mo,Unstable_TrapFocus:()=>bu.A,Zoom:()=>Hs,accordionActionsClasses:()=>Ke,accordionClasses:()=>He.A,accordionDetailsClasses:()=>rt.A,accordionSummaryClasses:()=>ot.A,adaptV4Theme:()=>P,alertClasses:()=>at.A,alertTitleClasses:()=>lt.A,alpha:()=>O.X4,appBarClasses:()=>ft,autocompleteClasses:()=>bt.A,avatarClasses:()=>xt.A,avatarGroupClasses:()=>At.A,backdropClasses:()=>Ct.A,badgeClasses:()=>Tt.A,bottomNavigationActionClasses:()=>Lt,bottomNavigationClasses:()=>kt,boxClasses:()=>$t.A,breadcrumbsClasses:()=>Kt,buttonBaseClasses:()=>ar.A,buttonClasses:()=>ir.A,buttonGroupClasses:()=>cr.A,capitalize:()=>Ue.capitalize,cardActionAreaClasses:()=>vr,cardActionsClasses:()=>Sr,cardClasses:()=>pr,cardContentClasses:()=>kr,cardHeaderClasses:()=>Dr,cardMediaClasses:()=>Ur,checkboxClasses:()=>Xr.A,chipClasses:()=>Jr.A,circularProgressClasses:()=>en.A,collapseClasses:()=>nn.A,colors:()=>n,containerClasses:()=>sn,createChainedFunction:()=>Ue.createChainedFunction,createFilterOptions:()=>vt.Z,createMuiTheme:()=>L.D,createStyles:()=>B,createSvgIcon:()=>Ue.createSvgIcon,createTheme:()=>L.A,css:()=>D.AH,darkScrollbar:()=>un,darken:()=>O.e$,debounce:()=>Ue.debounce,decomposeColor:()=>O.rP,deprecatedPropType:()=>Ue.deprecatedPropType,dialogActionsClasses:()=>hn.A,dialogClasses:()=>fn.A,dialogContentClasses:()=>gn.A,dialogContentTextClasses:()=>vn.A,dialogTitleClasses:()=>_n.A,dividerClasses:()=>wn.A,drawerClasses:()=>Sn.A,duration:()=>U.p0,easing:()=>U.cz,emphasize:()=>O.tL,experimentalStyled:()=>G.Ay,experimental_extendTheme:()=>Te,experimental_sx:()=>$e,fabClasses:()=>En,filledInputClasses:()=>On.A,formControlClasses:()=>Nn.A,formControlLabelClasses:()=>zn.A,formGroupClasses:()=>jn.A,formHelperTextClasses:()=>Un.A,formLabelClasses:()=>Hn.A,generateUtilityClass:()=>Ye.Ay,generateUtilityClasses:()=>Ze.A,getAccordionActionsUtilityClass:()=>Xe,getAccordionDetailsUtilityClass:()=>rt.n,getAccordionSummaryUtilityClass:()=>ot.T,getAccordionUtilityClass:()=>He.d,getAlertTitleUtilityClass:()=>lt.x,getAlertUtilityClass:()=>at.X,getAppBarUtilityClass:()=>dt,getAutocompleteUtilityClass:()=>bt.r,getAvatarGroupUtilityClass:()=>At.n,getAvatarUtilityClass:()=>xt.k,getBackdropUtilityClass:()=>Ct.R,getBadgeUtilityClass:()=>Tt.w,getBottomNavigationActionUtilityClass:()=>Dt,getBottomNavigationUtilityClass:()=>It,getBreadcrumbsUtilityClass:()=>Xt,getButtonBaseUtilityClass:()=>ar.W,getButtonGroupUtilityClass:()=>cr.C,getButtonUtilityClass:()=>ir.B,getCardActionAreaUtilityClass:()=>yr,getCardActionsUtilityClass:()=>Ar,getCardContentUtilityClass:()=>Ir,getCardHeaderUtilityClass:()=>Or,getCardMediaUtilityClass:()=>$r,getCardUtilityClass:()=>fr,getCheckboxUtilityClass:()=>Xr.w,getChipUtilityClass:()=>Jr.f,getCircularProgressUtilityClass:()=>en.b,getCollapseUtilityClass:()=>nn.E,getContainerUtilityClass:()=>an,getContrastRatio:()=>O.eM,getDialogActionsUtilityClass:()=>hn.C,getDialogContentTextUtilityClass:()=>vn.D,getDialogContentUtilityClass:()=>gn.E,getDialogTitleUtilityClass:()=>_n.t,getDialogUtilityClass:()=>fn.f,getDividerUtilityClass:()=>wn.K,getDrawerUtilityClass:()=>Sn.S,getFabUtilityClass:()=>Cn,getFilledInputUtilityClass:()=>On.N,getFormControlLabelUtilityClasses:()=>zn.u,getFormControlUtilityClasses:()=>Nn.c,getFormGroupUtilityClass:()=>jn.c,getFormHelperTextUtilityClasses:()=>Un.h,getFormLabelUtilityClasses:()=>Hn.Z,getGrid2UtilityClass:()=>Ro,getGridUtilityClass:()=>Zn,getIconButtonUtilityClass:()=>ri.G,getIconUtilityClass:()=>Yo,getImageListItemBarUtilityClass:()=>yi,getImageListItemUtilityClass:()=>di,getImageListUtilityClass:()=>ni,getInitColorSchemeScript:()=>Be,getInputAdornmentUtilityClass:()=>ki.P,getInputBaseUtilityClass:()=>Ri.g,getInputLabelUtilityClasses:()=>Oi.R,getInputUtilityClass:()=>Ti.B,getLinearProgressUtilityClass:()=>Li.l,getLinkUtilityClass:()=>zi,getListItemAvatarUtilityClass:()=>Ki.Z,getListItemButtonUtilityClass:()=>Qi.Y,getListItemIconUtilityClass:()=>oa.f,getListItemSecondaryActionClassesUtilityClass:()=>aa.g,getListItemTextUtilityClass:()=>la.b,getListItemUtilityClass:()=>Yi._,getListSubheaderUtilityClass:()=>ua.g,getListUtilityClass:()=>qi.H,getLuminance:()=>O.J1,getMenuItemUtilityClass:()=>ha.Z,getMenuUtilityClass:()=>fa.e,getMobileStepperUtilityClass:()=>ya,getModalUtilityClass:()=>Ta.M,getNativeSelectUtilityClasses:()=>Ra.w,getOffsetLeft:()=>Wa.fB,getOffsetTop:()=>Wa.Dy,getOutlinedInputUtilityClass:()=>ja.v,getOverlayAlpha:()=>be.A,getPaginationItemUtilityClass:()=>Ha.q,getPaginationUtilityClass:()=>Ua.B,getPaperUtilityClass:()=>Ga.j,getPopoverUtilityClass:()=>qa.K,getPopperUtilityClass:()=>Ya.b,getRadioGroupUtilityClass:()=>ts.B,getRadioUtilityClass:()=>Ja.q,getRatingUtilityClass:()=>cs,getScopedCssBaselineUtilityClass:()=>Cs.r,getSelectUtilityClasses:()=>Ts.T,getSkeletonUtilityClass:()=>ks.E,getSliderUtilityClass:()=>Ps.W,getSnackbarContentUtilityClass:()=>Ns.d,getSnackbarUtilityClass:()=>Ds.W,getSpeedDialActionUtilityClass:()=>rl,getSpeedDialIconUtilityClass:()=>ul,getSpeedDialUtilityClass:()=>Gs,getStepButtonUtilityClass:()=>Al,getStepConnectorUtilityClass:()=>kl.G,getStepContentUtilityClass:()=>Ml,getStepIconUtilityClass:()=>Fl.K,getStepLabelUtilityClass:()=>zl.p,getStepUtilityClass:()=>bl.L,getStepperUtilityClass:()=>jl.g,getSvgIconUtilityClass:()=>Ul.E,getSwitchUtilityClass:()=>lc.n,getTabScrollButtonUtilityClass:()=>Vc.T,getTabUtilityClass:()=>uc.s,getTableBodyUtilityClass:()=>hc.b,getTableCellUtilityClass:()=>gc.r,getTableContainerUtilityClass:()=>vc.I,getTableFooterUtilityClass:()=>_c,getTableHeadUtilityClass:()=>Ic.X,getTablePaginationUtilityClass:()=>Mc.B,getTableRowUtilityClass:()=>Pc.r,getTableSortLabelUtilityClass:()=>Dc,getTableUtilityClass:()=>fc.l,getTabsUtilityClass:()=>$c.H,getTextFieldUtilityClass:()=>Gc._,getToggleButtonGroupUtilityClass:()=>ou,getToggleButtonUtilityClass:()=>Zc,getToolbarUtilityClass:()=>uu.U,getTooltipUtilityClass:()=>du.E,getTouchRippleUtilityClass:()=>sr.O,getTypographyUtilityClass:()=>fu.y,grid2Classes:()=>Oo,gridClasses:()=>Xn,hexToRgb:()=>O.E2,hslToRgb:()=>O.YL,iconButtonClasses:()=>ri.A,iconClasses:()=>Xo,imageListClasses:()=>oi,imageListItemBarClasses:()=>vi,imageListItemClasses:()=>fi,inputAdornmentClasses:()=>ki.A,inputBaseClasses:()=>Ri.A,inputClasses:()=>Ti.A,inputLabelClasses:()=>Oi.A,isMuiElement:()=>Ue.isMuiElement,keyframes:()=>D.i7,lighten:()=>O.a,linearProgressClasses:()=>Li.A,linkClasses:()=>Bi,listClasses:()=>qi.A,listItemAvatarClasses:()=>Ki.A,listItemButtonClasses:()=>Qi.A,listItemClasses:()=>Yi.A,listItemIconClasses:()=>oa.A,listItemSecondaryActionClasses:()=>aa.A,listItemTextClasses:()=>la.A,listSubheaderClasses:()=>ua.A,major:()=>xu,makeStyles:()=>Z,menuClasses:()=>fa.A,menuItemClasses:()=>ha.A,minor:()=>wu,mobileStepperClasses:()=>va,modalClasses:()=>Ta.A,nativeSelectClasses:()=>Ra.A,outlinedInputClasses:()=>ja.A,ownerDocument:()=>Ue.ownerDocument,ownerWindow:()=>Ue.ownerWindow,paginationClasses:()=>Ua.A,paginationItemClasses:()=>Ha.A,paperClasses:()=>Ga.A,patch:()=>Au,popoverClasses:()=>qa.A,preReleaseLabel:()=>Su,preReleaseNumber:()=>Cu,private_createMixins:()=>je.A,private_createTypography:()=>Ie.A,private_excludeVariablesFromRoot:()=>ke,radioClasses:()=>Ja.A,radioGroupClasses:()=>ts.A,ratingClasses:()=>us,recomposeColor:()=>O.X0,requirePropFactory:()=>Ue.requirePropFactory,responsiveFontSizes:()=>$.A,rgbToHex:()=>O.Ob,scopedCssBaselineClasses:()=>Cs.A,selectClasses:()=>Ts.A,setRef:()=>Ue.setRef,shouldSkipGeneratingVar:()=>ve,skeletonClasses:()=>ks.A,sliderClasses:()=>Ps.A,snackbarClasses:()=>Ds.A,snackbarContentClasses:()=>Ns.A,speedDialActionClasses:()=>nl,speedDialClasses:()=>Ws,speedDialIconClasses:()=>dl,stackClasses:()=>yl,stepButtonClasses:()=>Sl,stepClasses:()=>bl.A,stepConnectorClasses:()=>kl.A,stepContentClasses:()=>Rl,stepIconClasses:()=>Fl.A,stepLabelClasses:()=>zl.A,stepperClasses:()=>jl.A,styled:()=>G.Ay,svgIconClasses:()=>Ul.A,switchClasses:()=>lc.A,tabClasses:()=>uc.A,tabScrollButtonClasses:()=>Vc.A,tableBodyClasses:()=>hc.A,tableCellClasses:()=>gc.A,tableClasses:()=>fc.A,tableContainerClasses:()=>vc.A,tableFooterClasses:()=>xc,tableHeadClasses:()=>Ic.A,tablePaginationClasses:()=>Mc.A,tableRowClasses:()=>Pc.A,tableSortLabelClasses:()=>Lc,tabsClasses:()=>$c.A,textFieldClasses:()=>Gc.A,toggleButtonClasses:()=>Yc,toggleButtonGroupClasses:()=>iu,toolbarClasses:()=>uu.A,tooltipClasses:()=>du.A,touchRippleClasses:()=>sr.A,typographyClasses:()=>fu.A,unstable_ClassNameGenerator:()=>Ue.unstable_ClassNameGenerator,unstable_composeClasses:()=>We.A,unstable_createMuiStrictModeTheme:()=>F,unstable_getUnit:()=>j.l_,unstable_toUnitless:()=>j.db,unstable_useEnhancedEffect:()=>Ue.unstable_useEnhancedEffect,unstable_useId:()=>Ue.unstable_useId,unsupportedProp:()=>Ue.unsupportedProp,useAutocomplete:()=>vt.A,useColorScheme:()=>Fe,useControlled:()=>Ue.useControlled,useEventCallback:()=>Ue.useEventCallback,useForkRef:()=>Ue.useForkRef,useFormControl:()=>Ln.A,useIsFocusVisible:()=>Ue.useIsFocusVisible,useMediaQuery:()=>Fo.A,usePagination:()=>pu.A,useRadioGroup:()=>es.A,useScrollTrigger:()=>yu,useStepContext:()=>_l.P,useStepperContext:()=>wl.s,useTheme:()=>V.A,useThemeProps:()=>H.A,version:()=>_u,withStyles:()=>Y,withTheme:()=>X});var n={};r.r(n),r.d(n,{amber:()=>v,blue:()=>u.A,blueGrey:()=>A,brown:()=>x,common:()=>o.A,cyan:()=>f,deepOrange:()=>_,deepPurple:()=>l,green:()=>h.A,grey:()=>w.A,indigo:()=>c,lightBlue:()=>d.A,lightGreen:()=>m,lime:()=>g,orange:()=>b.A,pink:()=>a,purple:()=>s.A,red:()=>i.A,teal:()=>p,yellow:()=>y});var o=r("H00D"),i=r("0XHX");const a={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"};var s=r("iIhR");const l={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"},c={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"};var u=r("UG0H"),d=r("8jZn");const f={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},p={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"};var h=r("at7f");const m={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},g={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},y={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"},v={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"};var b=r("A1Zn");const _={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},x={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"};var w=r("Xxcx");const A={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"};var S=r("KRkT"),C=r("WTO6"),E=r("+9dH"),T=r("Nlia"),I=r("EIBS"),k=r("s8X4");const M=["defaultProps","mixins","overrides","palette","props","styleOverrides"],R=["type","mode"];function P(e){const{defaultProps:t={},mixins:r={},overrides:n={},palette:o={},props:i={},styleOverrides:a={}}=e,s=(0,T.A)(e,M),l=(0,E.A)({},s,{components:{}});Object.keys(t).forEach(e=>{const r=l.components[e]||{};r.defaultProps=t[e],l.components[e]=r}),Object.keys(i).forEach(e=>{const t=l.components[e]||{};t.defaultProps=i[e],l.components[e]=t}),Object.keys(a).forEach(e=>{const t=l.components[e]||{};t.styleOverrides=a[e],l.components[e]=t}),Object.keys(n).forEach(e=>{const t=l.components[e]||{};t.styleOverrides=n[e],l.components[e]=t}),l.spacing=(0,I.A)(e.spacing);const c=(0,k.A)(e.breakpoints||{}),u=l.spacing;l.mixins=(0,E.A)({gutters:(e={})=>(0,E.A)({paddingLeft:u(2),paddingRight:u(2)},e,{[c.up("sm")]:(0,E.A)({paddingLeft:u(3),paddingRight:u(3)},e[c.up("sm")])})},r);const{type:d,mode:f}=o,p=(0,T.A)(o,R),h=f||d||"light";return l.palette=(0,E.A)({text:{hint:"dark"===h?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:h,type:h},p),l}var O=r("2Qr1"),D=r("AeFk"),L=r("BlEZ"),N=r("w9Qe");function F(e,...t){return(0,L.A)((0,N.A)({unstable_strictMode:!0},e),...t)}let z=!1;function B(e){return z||(console.warn(["MUI: createStyles from @mui/material/styles is deprecated.","Please use @mui/styles/createStyles"].join("\n")),z=!0),e}var j=r("qn7V"),$=r("ThEv"),U=r("hqVE"),V=r("UnQg"),H=r("tCRK"),G=r("Vn7y"),W=r("b4iY"),q=r("WfXV");function Z(){throw new Error((0,S.A)(14))}function Y(){throw new Error((0,S.A)(15))}function X(){throw new Error((0,S.A)(16))}var K=r("q1tI"),J=r("2TcN"),Q=r("CZYX"),ee=r("wVnu"),te=r("nKUr");const re="mode",ne="color-scheme",oe="data-color-scheme";function ie(e){if("undefined"!=typeof window&&"system"===e)return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ae(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function se(e,t){if("undefined"==typeof window)return;let r;try{r=localStorage.getItem(e)||void 0,r||localStorage.setItem(e,t)}catch(e){}return r||t}const le=["colorSchemes","components","generateCssVars","cssVarPrefix"];var ce=r("xTOY");function ue(e=""){function t(...r){if(!r.length)return"";const n=r[0];return"string"!=typeof n||n.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${n}`:`, var(--${e?`${e}-`:""}${n}${t(...r.slice(1))})`}return(r,...n)=>`var(--${e?`${e}-`:""}${r}${t(...n)})`}var de=r("vQ/N");const fe=(e,t,r,n=[])=>{let o=e;t.forEach((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=r:o&&"object"==typeof o&&(o[e]=r):o&&"object"==typeof o&&(o[e]||(o[e]=n.includes(e)?[]:{}),o=o[e])})},pe=(e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:`${t}px`:t;function he(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},i={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||n&&n(e,t))){const n=`--${r?`${r}-`:""}${e.join("-")}`;Object.assign(o,{[n]:pe(e,t)}),fe(i,e,`var(${n})`,s),fe(a,e,`var(${n}, ${t})`,s)}},l=e=>"vars"===e[0],function e(t,r=[],n=[]){Object.entries(t).forEach(([t,o])=>{(!l||l&&!l([...r,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...r,t],Array.isArray(o)?[...n,t]:n):s([...r,t],o,n))})}(e),{css:o,vars:i,varsWithDefaults:a}}const me=["colorSchemes","components","defaultColorScheme"];var ge=r("9k3N"),ye=r("dcYk");function ve(e){var t;return!!e[0].match(/(cssVarPrefix|modularCssLayers|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!(null==(t=e[1])||!t.match(/(mode|contrastThreshold|tonalOffset)/))}var be=r("UwZ0");const _e=["colorSchemes","cssVarPrefix","shouldSkipGeneratingVar"],xe=["palette"],we=[...Array(25)].map((e,t)=>{if(0===t)return;const r=(0,be.A)(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Ae(e,t,r){!e[t]&&r&&(e[t]=r)}function Se(e){return e&&e.startsWith("hsl")?(0,ye.YL)(e):e}function Ce(e,t){`${t}Channel`in e||(e[`${t}Channel`]=(0,ye.Me)(Se(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}const Ee=e=>{try{return e()}catch(e){}};function Te(e={},...t){var r,n,o,i,a,s;const{colorSchemes:l={},cssVarPrefix:c="mui",shouldSkipGeneratingVar:u=ve}=e,d=(0,T.A)(e,_e),f=((e="mui")=>ue(e))(c),p=(0,L.A)((0,E.A)({},d,l.light&&{palette:null==(r=l.light)?void 0:r.palette})),{palette:h}=p,m=(0,T.A)(p,xe),{palette:g}=(0,L.A)({palette:(0,E.A)({mode:"dark"},null==(n=l.dark)?void 0:n.palette)});let y=(0,E.A)({},m,{cssVarPrefix:c,getCssVar:f,colorSchemes:(0,E.A)({},l,{light:(0,E.A)({},l.light,{palette:h,opacity:(0,E.A)({inputPlaceholder:.42,inputUnderline:.42,switchTrackDisabled:.12,switchTrack:.38},null==(o=l.light)?void 0:o.opacity),overlays:(null==(i=l.light)?void 0:i.overlays)||[]}),dark:(0,E.A)({},l.dark,{palette:g,opacity:(0,E.A)({inputPlaceholder:.5,inputUnderline:.7,switchTrackDisabled:.2,switchTrack:.3},null==(a=l.dark)?void 0:a.opacity),overlays:(null==(s=l.dark)?void 0:s.overlays)||we})})});Object.keys(y.colorSchemes).forEach(e=>{const t=y.colorSchemes[e].palette,r=e=>{const r=e.split("-"),n=r[1],o=r[2];return f(e,t[n][o])};var n;if("light"===e?(Ae(t.common,"background","#fff"),Ae(t.common,"onBackground","#000")):(Ae(t.common,"background","#000"),Ae(t.common,"onBackground","#fff")),n=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach(e=>{n[e]||(n[e]={})}),"light"===e){Ae(t.Alert,"errorColor",(0,ye.Nd)(t.error.light,.6)),Ae(t.Alert,"infoColor",(0,ye.Nd)(t.info.light,.6)),Ae(t.Alert,"successColor",(0,ye.Nd)(t.success.light,.6)),Ae(t.Alert,"warningColor",(0,ye.Nd)(t.warning.light,.6)),Ae(t.Alert,"errorFilledBg",r("palette-error-main")),Ae(t.Alert,"infoFilledBg",r("palette-info-main")),Ae(t.Alert,"successFilledBg",r("palette-success-main")),Ae(t.Alert,"warningFilledBg",r("palette-warning-main")),Ae(t.Alert,"errorFilledColor",Ee(()=>h.getContrastText(t.error.main))),Ae(t.Alert,"infoFilledColor",Ee(()=>h.getContrastText(t.info.main))),Ae(t.Alert,"successFilledColor",Ee(()=>h.getContrastText(t.success.main))),Ae(t.Alert,"warningFilledColor",Ee(()=>h.getContrastText(t.warning.main))),Ae(t.Alert,"errorStandardBg",(0,ye.j4)(t.error.light,.9)),Ae(t.Alert,"infoStandardBg",(0,ye.j4)(t.info.light,.9)),Ae(t.Alert,"successStandardBg",(0,ye.j4)(t.success.light,.9)),Ae(t.Alert,"warningStandardBg",(0,ye.j4)(t.warning.light,.9)),Ae(t.Alert,"errorIconColor",r("palette-error-main")),Ae(t.Alert,"infoIconColor",r("palette-info-main")),Ae(t.Alert,"successIconColor",r("palette-success-main")),Ae(t.Alert,"warningIconColor",r("palette-warning-main")),Ae(t.AppBar,"defaultBg",r("palette-grey-100")),Ae(t.Avatar,"defaultBg",r("palette-grey-400")),Ae(t.Button,"inheritContainedBg",r("palette-grey-300")),Ae(t.Button,"inheritContainedHoverBg",r("palette-grey-A100")),Ae(t.Chip,"defaultBorder",r("palette-grey-400")),Ae(t.Chip,"defaultAvatarColor",r("palette-grey-700")),Ae(t.Chip,"defaultIconColor",r("palette-grey-700")),Ae(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Ae(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Ae(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Ae(t.LinearProgress,"primaryBg",(0,ye.j4)(t.primary.main,.62)),Ae(t.LinearProgress,"secondaryBg",(0,ye.j4)(t.secondary.main,.62)),Ae(t.LinearProgress,"errorBg",(0,ye.j4)(t.error.main,.62)),Ae(t.LinearProgress,"infoBg",(0,ye.j4)(t.info.main,.62)),Ae(t.LinearProgress,"successBg",(0,ye.j4)(t.success.main,.62)),Ae(t.LinearProgress,"warningBg",(0,ye.j4)(t.warning.main,.62)),Ae(t.Skeleton,"bg",`rgba(${r("palette-text-primaryChannel")} / 0.11)`),Ae(t.Slider,"primaryTrack",(0,ye.j4)(t.primary.main,.62)),Ae(t.Slider,"secondaryTrack",(0,ye.j4)(t.secondary.main,.62)),Ae(t.Slider,"errorTrack",(0,ye.j4)(t.error.main,.62)),Ae(t.Slider,"infoTrack",(0,ye.j4)(t.info.main,.62)),Ae(t.Slider,"successTrack",(0,ye.j4)(t.success.main,.62)),Ae(t.Slider,"warningTrack",(0,ye.j4)(t.warning.main,.62));const e=(0,ye.Y9)(t.background.default,.8);Ae(t.SnackbarContent,"bg",e),Ae(t.SnackbarContent,"color",Ee(()=>h.getContrastText(e))),Ae(t.SpeedDialAction,"fabHoverBg",(0,ye.Y9)(t.background.paper,.15)),Ae(t.StepConnector,"border",r("palette-grey-400")),Ae(t.StepContent,"border",r("palette-grey-400")),Ae(t.Switch,"defaultColor",r("palette-common-white")),Ae(t.Switch,"defaultDisabledColor",r("palette-grey-100")),Ae(t.Switch,"primaryDisabledColor",(0,ye.j4)(t.primary.main,.62)),Ae(t.Switch,"secondaryDisabledColor",(0,ye.j4)(t.secondary.main,.62)),Ae(t.Switch,"errorDisabledColor",(0,ye.j4)(t.error.main,.62)),Ae(t.Switch,"infoDisabledColor",(0,ye.j4)(t.info.main,.62)),Ae(t.Switch,"successDisabledColor",(0,ye.j4)(t.success.main,.62)),Ae(t.Switch,"warningDisabledColor",(0,ye.j4)(t.warning.main,.62)),Ae(t.TableCell,"border",(0,ye.j4)((0,ye.Cg)(t.divider,1),.88)),Ae(t.Tooltip,"bg",(0,ye.Cg)(t.grey[700],.92))}else{Ae(t.Alert,"errorColor",(0,ye.j4)(t.error.light,.6)),Ae(t.Alert,"infoColor",(0,ye.j4)(t.info.light,.6)),Ae(t.Alert,"successColor",(0,ye.j4)(t.success.light,.6)),Ae(t.Alert,"warningColor",(0,ye.j4)(t.warning.light,.6)),Ae(t.Alert,"errorFilledBg",r("palette-error-dark")),Ae(t.Alert,"infoFilledBg",r("palette-info-dark")),Ae(t.Alert,"successFilledBg",r("palette-success-dark")),Ae(t.Alert,"warningFilledBg",r("palette-warning-dark")),Ae(t.Alert,"errorFilledColor",Ee(()=>g.getContrastText(t.error.dark))),Ae(t.Alert,"infoFilledColor",Ee(()=>g.getContrastText(t.info.dark))),Ae(t.Alert,"successFilledColor",Ee(()=>g.getContrastText(t.success.dark))),Ae(t.Alert,"warningFilledColor",Ee(()=>g.getContrastText(t.warning.dark))),Ae(t.Alert,"errorStandardBg",(0,ye.Nd)(t.error.light,.9)),Ae(t.Alert,"infoStandardBg",(0,ye.Nd)(t.info.light,.9)),Ae(t.Alert,"successStandardBg",(0,ye.Nd)(t.success.light,.9)),Ae(t.Alert,"warningStandardBg",(0,ye.Nd)(t.warning.light,.9)),Ae(t.Alert,"errorIconColor",r("palette-error-main")),Ae(t.Alert,"infoIconColor",r("palette-info-main")),Ae(t.Alert,"successIconColor",r("palette-success-main")),Ae(t.Alert,"warningIconColor",r("palette-warning-main")),Ae(t.AppBar,"defaultBg",r("palette-grey-900")),Ae(t.AppBar,"darkBg",r("palette-background-paper")),Ae(t.AppBar,"darkColor",r("palette-text-primary")),Ae(t.Avatar,"defaultBg",r("palette-grey-600")),Ae(t.Button,"inheritContainedBg",r("palette-grey-800")),Ae(t.Button,"inheritContainedHoverBg",r("palette-grey-700")),Ae(t.Chip,"defaultBorder",r("palette-grey-700")),Ae(t.Chip,"defaultAvatarColor",r("palette-grey-300")),Ae(t.Chip,"defaultIconColor",r("palette-grey-300")),Ae(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Ae(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Ae(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Ae(t.LinearProgress,"primaryBg",(0,ye.Nd)(t.primary.main,.5)),Ae(t.LinearProgress,"secondaryBg",(0,ye.Nd)(t.secondary.main,.5)),Ae(t.LinearProgress,"errorBg",(0,ye.Nd)(t.error.main,.5)),Ae(t.LinearProgress,"infoBg",(0,ye.Nd)(t.info.main,.5)),Ae(t.LinearProgress,"successBg",(0,ye.Nd)(t.success.main,.5)),Ae(t.LinearProgress,"warningBg",(0,ye.Nd)(t.warning.main,.5)),Ae(t.Skeleton,"bg",`rgba(${r("palette-text-primaryChannel")} / 0.13)`),Ae(t.Slider,"primaryTrack",(0,ye.Nd)(t.primary.main,.5)),Ae(t.Slider,"secondaryTrack",(0,ye.Nd)(t.secondary.main,.5)),Ae(t.Slider,"errorTrack",(0,ye.Nd)(t.error.main,.5)),Ae(t.Slider,"infoTrack",(0,ye.Nd)(t.info.main,.5)),Ae(t.Slider,"successTrack",(0,ye.Nd)(t.success.main,.5)),Ae(t.Slider,"warningTrack",(0,ye.Nd)(t.warning.main,.5));const e=(0,ye.Y9)(t.background.default,.98);Ae(t.SnackbarContent,"bg",e),Ae(t.SnackbarContent,"color",Ee(()=>g.getContrastText(e))),Ae(t.SpeedDialAction,"fabHoverBg",(0,ye.Y9)(t.background.paper,.15)),Ae(t.StepConnector,"border",r("palette-grey-600")),Ae(t.StepContent,"border",r("palette-grey-600")),Ae(t.Switch,"defaultColor",r("palette-grey-300")),Ae(t.Switch,"defaultDisabledColor",r("palette-grey-600")),Ae(t.Switch,"primaryDisabledColor",(0,ye.Nd)(t.primary.main,.55)),Ae(t.Switch,"secondaryDisabledColor",(0,ye.Nd)(t.secondary.main,.55)),Ae(t.Switch,"errorDisabledColor",(0,ye.Nd)(t.error.main,.55)),Ae(t.Switch,"infoDisabledColor",(0,ye.Nd)(t.info.main,.55)),Ae(t.Switch,"successDisabledColor",(0,ye.Nd)(t.success.main,.55)),Ae(t.Switch,"warningDisabledColor",(0,ye.Nd)(t.warning.main,.55)),Ae(t.TableCell,"border",(0,ye.Nd)((0,ye.Cg)(t.divider,1),.68)),Ae(t.Tooltip,"bg",(0,ye.Cg)(t.grey[700],.92))}Ce(t.background,"default"),Ce(t.background,"paper"),Ce(t.common,"background"),Ce(t.common,"onBackground"),Ce(t,"divider"),Object.keys(t).forEach(e=>{const r=t[e];r&&"object"==typeof r&&(r.main&&Ae(t[e],"mainChannel",(0,ye.Me)(Se(r.main))),r.light&&Ae(t[e],"lightChannel",(0,ye.Me)(Se(r.light))),r.dark&&Ae(t[e],"darkChannel",(0,ye.Me)(Se(r.dark))),r.contrastText&&Ae(t[e],"contrastTextChannel",(0,ye.Me)(Se(r.contrastText))),"text"===e&&(Ce(t[e],"primary"),Ce(t[e],"secondary")),"action"===e&&(r.active&&Ce(t[e],"active"),r.selected&&Ce(t[e],"selected")))})}),y=t.reduce((e,t)=>(0,N.A)(e,t),y);const v={prefix:c,shouldSkipGeneratingVar:u},{vars:b,generateCssVars:_}=function(e,t){const{colorSchemes:r={},defaultColorScheme:n="light"}=e,o=(0,T.A)(e,me),{vars:i,css:a,varsWithDefaults:s}=he(o,t);let l=s;const c={},{[n]:u}=r,d=(0,T.A)(r,[n].map(de.A));if(Object.entries(d||{}).forEach(([e,r])=>{const{vars:n,css:o,varsWithDefaults:i}=he(r,t);l=(0,N.A)(l,i),c[e]={css:o,vars:n}}),u){const{css:e,vars:r,varsWithDefaults:o}=he(u,t);l=(0,N.A)(l,o),c[n]={css:e,vars:r}}return{vars:l,generateCssVars:e=>{var r;if(!e){var n;const r=(0,E.A)({},a);return{css:r,vars:i,selector:(null==t||null==(n=t.getSelector)?void 0:n.call(t,e,r))||":root"}}const o=(0,E.A)({},c[e].css);return{css:o,vars:c[e].vars,selector:(null==t||null==(r=t.getSelector)?void 0:r.call(t,e,o))||":root"}}}}(y,v);return y.vars=b,y.generateCssVars=_,y.shouldSkipGeneratingVar=u,y.unstable_sxConfig=(0,E.A)({},ge.A,null==d?void 0:d.unstable_sxConfig),y.unstable_sx=function(e){return(0,ce.A)({sx:e,theme:this})},y}var Ie=r("MHkX");const ke=e=>[...[...Array(24)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r+1}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Me="data-mui-color-scheme",Re="mui-color-scheme",Pe="light",Oe="dark",De="mui-mode",Le=Te(),{CssVarsProvider:Ne,useColorScheme:Fe,getInitColorSchemeScript:ze}=function(e){const{themeId:t,theme:r={},attribute:n=oe,modeStorageKey:o=re,colorSchemeStorageKey:i=ne,defaultMode:a="light",defaultColorScheme:s,disableTransitionOnChange:l=!1,resolveTheme:c,excludeVariablesFromRoot:u}=e;(!r.colorSchemes||"string"==typeof s&&!r.colorSchemes[s]||"object"==typeof s&&!r.colorSchemes[null==s?void 0:s.light]||"object"==typeof s&&!r.colorSchemes[null==s?void 0:s.dark])&&console.error(`MUI: \`${s}\` does not exist in \`theme.colorSchemes\`.`);const d=K.createContext(void 0),f="string"==typeof s?s:s.light,p="string"==typeof s?s:s.dark;return{CssVarsProvider:function(e){const{children:f,theme:p=r,modeStorageKey:h=o,colorSchemeStorageKey:m=i,attribute:g=n,defaultMode:y=a,defaultColorScheme:v=s,disableTransitionOnChange:b=l,storageWindow:_=("undefined"==typeof window?void 0:window),documentNode:x=("undefined"==typeof document?void 0:document),colorSchemeNode:w=("undefined"==typeof document?void 0:document.documentElement),colorSchemeSelector:A=":root",disableNestedContext:S=!1,disableStyleSheetGeneration:C=!1}=e,I=K.useRef(!1),k=(0,Q.A)(),M=K.useContext(d),R=!!M&&!S,P=p[t],O=P||p,{colorSchemes:D={},components:L={},generateCssVars:F=()=>({vars:{},css:{}}),cssVarPrefix:z}=O,B=(0,T.A)(O,le),j=Object.keys(D),$="string"==typeof v?v:v.light,U="string"==typeof v?v:v.dark,{mode:V,setMode:H,systemMode:G,lightColorScheme:W,darkColorScheme:q,colorScheme:Z,setColorScheme:Y}=function(e){const{defaultMode:t="light",defaultLightColorScheme:r,defaultDarkColorScheme:n,supportedColorSchemes:o=[],modeStorageKey:i=re,colorSchemeStorageKey:a=ne,storageWindow:s=("undefined"==typeof window?void 0:window)}=e,l=o.join(","),[c,u]=K.useState(()=>{const e=se(i,t),o=se(`${a}-light`,r),s=se(`${a}-dark`,n);return{mode:e,systemMode:ie(e),lightColorScheme:o,darkColorScheme:s}}),d=function(e){return ae(e,t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0)}(c),f=K.useCallback(e=>{u(r=>{if(e===r.mode)return r;const n=null!=e?e:t;try{localStorage.setItem(i,n)}catch(e){}return(0,E.A)({},r,{mode:n,systemMode:ie(n)})})},[i,t]),p=K.useCallback(e=>{e?"string"==typeof e?e&&!l.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):u(t=>{const r=(0,E.A)({},t);return ae(t,t=>{try{localStorage.setItem(`${a}-${t}`,e)}catch(e){}"light"===t&&(r.lightColorScheme=e),"dark"===t&&(r.darkColorScheme=e)}),r}):u(t=>{const o=(0,E.A)({},t),i=null===e.light?r:e.light,s=null===e.dark?n:e.dark;if(i)if(l.includes(i)){o.lightColorScheme=i;try{localStorage.setItem(`${a}-light`,i)}catch(e){}}else console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`);if(s)if(l.includes(s)){o.darkColorScheme=s;try{localStorage.setItem(`${a}-dark`,s)}catch(e){}}else console.error(`\`${s}\` does not exist in \`theme.colorSchemes\`.`);return o}):u(e=>{try{localStorage.setItem(`${a}-light`,r),localStorage.setItem(`${a}-dark`,n)}catch(e){}return(0,E.A)({},e,{lightColorScheme:r,darkColorScheme:n})})},[l,a,r,n]),h=K.useCallback(e=>{"system"===c.mode&&u(t=>{const r=null!=e&&e.matches?"dark":"light";return t.systemMode===r?t:(0,E.A)({},t,{systemMode:r})})},[c.mode]),m=K.useRef(h);return m.current=h,K.useEffect(()=>{const e=(...e)=>m.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}},[]),K.useEffect(()=>{if(s){const e=e=>{const r=e.newValue;"string"!=typeof e.key||!e.key.startsWith(a)||r&&!l.match(r)||(e.key.endsWith("light")&&p({light:r}),e.key.endsWith("dark")&&p({dark:r})),e.key!==i||r&&!["light","dark","system"].includes(r)||f(r||t)};return s.addEventListener("storage",e),()=>{s.removeEventListener("storage",e)}}},[p,f,i,a,l,t,s]),(0,E.A)({},c,{colorScheme:d,setMode:f,setColorScheme:p})}({supportedColorSchemes:j,defaultLightColorScheme:$,defaultDarkColorScheme:U,modeStorageKey:h,colorSchemeStorageKey:m,defaultMode:y,storageWindow:_});let X=V,oe=Z;R&&(X=M.mode,oe=M.colorScheme);const ce=oe||("dark"===(X||("system"===y?a:y))?U:$),{css:ue,vars:de}=F(),fe=(0,E.A)({},B,{components:L,colorSchemes:D,cssVarPrefix:z,vars:de,getColorSchemeSelector:e=>`[${g}="${e}"] &`}),pe={},he={};Object.entries(D).forEach(([e,t])=>{const{css:r,vars:n}=F(e);if(fe.vars=(0,N.A)(fe.vars,n),e===ce&&(Object.keys(t).forEach(e=>{t[e]&&"object"==typeof t[e]?fe[e]=(0,E.A)({},fe[e],t[e]):fe[e]=t[e]}),fe.palette&&(fe.palette.colorScheme=e)),e===("string"==typeof v?v:"dark"===y?v.dark:v.light)){if(u){const t={};u(z).forEach(e=>{t[e]=r[e],delete r[e]}),pe[`[${g}="${e}"]`]=t}pe[`${A}, [${g}="${e}"]`]=r}else he[`${":root"===A?"":A}[${g}="${e}"]`]=r}),fe.vars=(0,N.A)(fe.vars,de),K.useEffect(()=>{oe&&w&&w.setAttribute(g,oe)},[oe,g,w]),K.useEffect(()=>{let e;if(b&&I.current&&x){const t=x.createElement("style");t.appendChild(x.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),x.head.appendChild(t),window.getComputedStyle(x.body),e=setTimeout(()=>{x.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[oe,b,x]),K.useEffect(()=>(I.current=!0,()=>{I.current=!1}),[]);const me=K.useMemo(()=>({allColorSchemes:j,colorScheme:oe,darkColorScheme:q,lightColorScheme:W,mode:X,setColorScheme:Y,setMode:H,systemMode:G}),[j,oe,q,W,X,Y,H,G]);let ge=!0;(C||R&&(null==k?void 0:k.cssVarPrefix)===z)&&(ge=!1);const ye=(0,te.jsxs)(K.Fragment,{children:[ge&&(0,te.jsxs)(K.Fragment,{children:[(0,te.jsx)(J.A,{styles:{[A]:ue}}),(0,te.jsx)(J.A,{styles:pe}),(0,te.jsx)(J.A,{styles:he})]}),(0,te.jsx)(ee.A,{themeId:P?t:void 0,theme:c?c(fe):fe,children:f})]});return R?ye:(0,te.jsx)(d.Provider,{value:me,children:ye})},useColorScheme:()=>{const e=K.useContext(d);if(!e)throw new Error((0,S.A)(19));return e},getInitColorSchemeScript:e=>function(e){const{defaultMode:t="light",defaultLightColorScheme:r="light",defaultDarkColorScheme:n="dark",modeStorageKey:o=re,colorSchemeStorageKey:i=ne,attribute:a=oe,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};return(0,te.jsx)("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?l:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n var mode = localStorage.getItem('${o}') || '${t}';\n var colorScheme = '';\n if (mode === 'system') {\n // handle system mode\n var mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = localStorage.getItem('${i}-dark') || '${n}';\n } else {\n colorScheme = localStorage.getItem('${i}-light') || '${r}';\n }\n }\n if (mode === 'light') {\n colorScheme = localStorage.getItem('${i}-light') || '${r}';\n }\n if (mode === 'dark') {\n colorScheme = localStorage.getItem('${i}-dark') || '${n}';\n }\n if (colorScheme) {\n ${s}.setAttribute('${a}', colorScheme);\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}((0,E.A)({attribute:n,colorSchemeStorageKey:i,defaultMode:a,defaultLightColorScheme:f,defaultDarkColorScheme:p,modeStorageKey:o},e))}}({themeId:C.A,theme:Le,attribute:Me,colorSchemeStorageKey:Re,modeStorageKey:De,defaultColorScheme:{light:Pe,dark:Oe},resolveTheme:e=>{const t=(0,E.A)({},e,{typography:(0,Ie.A)(e.palette,e.typography)});return t.unstable_sx=function(e){return(0,ce.A)({sx:e,theme:this})},t},excludeVariablesFromRoot:ke}),Be=ze;var je=r("4lmL");function $e(){throw new Error((0,S.A)(20))}var Ue=r("dzX4"),Ve=r("aipG"),He=r("wDxH"),Ge=r("juqV"),We=r("aGM9"),qe=r("W9AN"),Ze=r("PYeY"),Ye=r("TkYO");function Xe(e){return(0,Ye.Ay)("MuiAccordionActions",e)}const Ke=(0,Ze.A)("MuiAccordionActions",["root","spacing"]),Je=["className","disableSpacing"],Qe=(0,G.Ay)("div",{name:"MuiAccordionActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",variants:[{props:e=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),et=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiAccordionActions"}),{className:n,disableSpacing:o=!1}=r,i=(0,T.A)(r,Je),a=(0,E.A)({},r,{disableSpacing:o}),s=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,We.A)(n,Xe,t)})(a);return(0,te.jsx)(Qe,(0,E.A)({className:(0,Ge.A)(s.root,n),ref:t,ownerState:a},i))});var tt=r("fQ5S"),rt=r("zD2o"),nt=r("1MYv"),ot=r("33M2"),it=r("gwor"),at=r("0g/e"),st=r("rzlW"),lt=r("SKrR"),ct=r("xeev"),ut=r("G43+");function dt(e){return(0,Ye.Ay)("MuiAppBar",e)}const ft=(0,Ze.A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]),pt=["className","color","enableColorOnDark","position"],ht=(e,t)=>e?`${null==e?void 0:e.replace(")","")}, ${t})`:t,mt=(0,G.Ay)(ut.A,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,ct.A)(r.position)}`],t[`color${(0,ct.A)(r.color)}`]]}})(({theme:e,ownerState:t})=>{const r="light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[900];return(0,E.A)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===t.position&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===t.position&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===t.position&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"static"===t.position&&{position:"static"},"relative"===t.position&&{position:"relative"},!e.vars&&(0,E.A)({},"default"===t.color&&{backgroundColor:r,color:e.palette.getContrastText(r)},t.color&&"default"!==t.color&&"inherit"!==t.color&&"transparent"!==t.color&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},"inherit"===t.color&&{color:"inherit"},"dark"===e.palette.mode&&!t.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===t.color&&(0,E.A)({backgroundColor:"transparent",color:"inherit"},"dark"===e.palette.mode&&{backgroundImage:"none"})),e.vars&&(0,E.A)({},"default"===t.color&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:ht(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:ht(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:ht(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:ht(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},!["inherit","transparent"].includes(t.color)&&{backgroundColor:"var(--AppBar-background)"},{color:"inherit"===t.color?"inherit":"var(--AppBar-color)"},"transparent"===t.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),gt=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiAppBar"}),{className:n,color:o="primary",enableColorOnDark:i=!1,position:a="fixed"}=r,s=(0,T.A)(r,pt),l=(0,E.A)({},r,{color:o,position:a,enableColorOnDark:i}),c=(e=>{const{color:t,position:r,classes:n}=e,o={root:["root",`color${(0,ct.A)(t)}`,`position${(0,ct.A)(r)}`]};return(0,We.A)(o,dt,n)})(l);return(0,te.jsx)(mt,(0,E.A)({square:!0,component:"header",ownerState:l,elevation:4,className:(0,Ge.A)(c.root,n,"fixed"===a&&"mui-fixed"),ref:t},s))});var yt=r("8cYg"),vt=r("RI6h"),bt=r("zkiJ"),_t=r("PgD1"),xt=r("/9V9"),wt=r("FLH5"),At=r("mFFh"),St=r("Sk+A"),Ct=r("/LIu"),Et=r("Ow/F"),Tt=r("k30w");function It(e){return(0,Ye.Ay)("MuiBottomNavigation",e)}const kt=(0,Ze.A)("MuiBottomNavigation",["root"]),Mt=["children","className","component","onChange","showLabels","value"],Rt=(0,G.Ay)("div",{name:"MuiBottomNavigation",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",height:56,backgroundColor:(e.vars||e).palette.background.paper})),Pt=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiBottomNavigation"}),{children:n,className:o,component:i="div",onChange:a,showLabels:s=!1,value:l}=r,c=(0,T.A)(r,Mt),u=(0,E.A)({},r,{component:i,showLabels:s}),d=(e=>{const{classes:t}=e;return(0,We.A)({root:["root"]},It,t)})(u);return(0,te.jsx)(Rt,(0,E.A)({as:i,className:(0,Ge.A)(d.root,o),ref:t,ownerState:u},c,{children:K.Children.map(n,(e,t)=>{if(!K.isValidElement(e))return null;const r=void 0===e.props.value?t:e.props.value;return K.cloneElement(e,{selected:r===l,showLabel:void 0!==e.props.showLabel?e.props.showLabel:s,value:r,onChange:a})})}))});var Ot=r("+8pU");function Dt(e){return(0,Ye.Ay)("MuiBottomNavigationAction",e)}const Lt=(0,Ze.A)("MuiBottomNavigationAction",["root","iconOnly","selected","label"]),Nt=["className","icon","label","onChange","onClick","selected","showLabel","value"],Ft=(0,G.Ay)(Ot.A,{name:"MuiBottomNavigationAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.showLabel&&!r.selected&&t.iconOnly]}})(({theme:e,ownerState:t})=>(0,E.A)({transition:e.transitions.create(["color","padding-top"],{duration:e.transitions.duration.short}),padding:"0px 12px",minWidth:80,maxWidth:168,color:(e.vars||e).palette.text.secondary,flexDirection:"column",flex:"1"},!t.showLabel&&!t.selected&&{paddingTop:14},!t.showLabel&&!t.selected&&!t.label&&{paddingTop:0},{[`&.${Lt.selected}`]:{color:(e.vars||e).palette.primary.main}})),zt=(0,G.Ay)("span",{name:"MuiBottomNavigationAction",slot:"Label",overridesResolver:(e,t)=>t.label})(({theme:e,ownerState:t})=>(0,E.A)({fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s"},!t.showLabel&&!t.selected&&{opacity:0,transitionDelay:"0s"},{[`&.${Lt.selected}`]:{fontSize:e.typography.pxToRem(14)}})),Bt=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiBottomNavigationAction"}),{className:n,icon:o,label:i,onChange:a,onClick:s,value:l}=r,c=(0,T.A)(r,Nt),u=r,d=(e=>{const{classes:t,showLabel:r,selected:n}=e,o={root:["root",!r&&!n&&"iconOnly",n&&"selected"],label:["label",!r&&!n&&"iconOnly",n&&"selected"]};return(0,We.A)(o,Dt,t)})(u);return(0,te.jsxs)(Ft,(0,E.A)({ref:t,className:(0,Ge.A)(d.root,n),focusRipple:!0,onClick:e=>{a&&a(e,l),s&&s(e)},ownerState:u},c,{children:[o,(0,te.jsx)(zt,{className:d.label,ownerState:u,children:i})]}))});var jt=r("U831"),$t=r("ht/8"),Ut=r("0Ydi"),Vt=r("Gqia"),Ht=r("M7pN");const Gt=(0,Ht.A)((0,te.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),Wt=["slots","slotProps"],qt=(0,G.Ay)(Ot.A,{name:"MuiBreadcrumbCollapsed"})(({theme:e})=>(0,E.A)({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},"light"===e.palette.mode?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":(0,E.A)({},"light"===e.palette.mode?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":(0,E.A)({boxShadow:e.shadows[0]},"light"===e.palette.mode?{backgroundColor:(0,ye.tL)(e.palette.grey[200],.12)}:{backgroundColor:(0,ye.tL)(e.palette.grey[600],.12)})})),Zt=(0,G.Ay)(Gt)({width:24,height:16}),Yt=function(e){const{slots:t={},slotProps:r={}}=e,n=(0,T.A)(e,Wt),o=e;return(0,te.jsx)("li",{children:(0,te.jsx)(qt,(0,E.A)({focusRipple:!0},n,{ownerState:o,children:(0,te.jsx)(Zt,(0,E.A)({as:t.CollapsedIcon,ownerState:o},r.collapsedIcon))}))})};function Xt(e){return(0,Ye.Ay)("MuiBreadcrumbs",e)}const Kt=(0,Ze.A)("MuiBreadcrumbs",["root","ol","li","separator"]),Jt=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],Qt=(0,G.Ay)(Vt.A,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${Kt.li}`]:t.li},t.root]})({}),er=(0,G.Ay)("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),tr=(0,G.Ay)("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function rr(e,t,r,n){return e.reduce((o,i,a)=>(a{const{classes:t}=e;return(0,We.A)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Xt,t)})(g),v=(0,Ut.A)({elementType:a.CollapsedIcon,externalSlotProps:s.collapsedIcon,ownerState:g}),b=K.useRef(null),_=K.Children.toArray(n).filter(e=>K.isValidElement(e)).map((e,t)=>(0,te.jsx)("li",{className:y.li,children:e},`child-${t}`));return(0,te.jsx)(Qt,(0,E.A)({ref:t,component:i,color:"text.secondary",className:(0,Ge.A)(y.root,o),ownerState:g},p,{children:(0,te.jsx)(er,{className:y.ol,ref:b,ownerState:g,children:rr(h||d&&_.length<=d?_:(e=>u+c>=e.length?e:[...e.slice(0,u),(0,te.jsx)(Yt,{"aria-label":l,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:v},onClick:()=>{m(!0);const e=b.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-c,e.length)])(_),y.separator,f,g)})}))});var or=r("5I82"),ir=r("0ANx"),ar=r("fy4x"),sr=r("Bz0O"),lr=r("9qDT"),cr=r("XjyF"),ur=r("bann"),dr=r("6z4e");function fr(e){return(0,Ye.Ay)("MuiCard",e)}const pr=(0,Ze.A)("MuiCard",["root"]),hr=["className","raised"],mr=(0,G.Ay)(ut.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),gr=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiCard"}),{className:n,raised:o=!1}=r,i=(0,T.A)(r,hr),a=(0,E.A)({},r,{raised:o}),s=(e=>{const{classes:t}=e;return(0,We.A)({root:["root"]},fr,t)})(a);return(0,te.jsx)(mr,(0,E.A)({className:(0,Ge.A)(s.root,n),elevation:o?8:void 0,ref:t,ownerState:a},i))});function yr(e){return(0,Ye.Ay)("MuiCardActionArea",e)}const vr=(0,Ze.A)("MuiCardActionArea",["root","focusVisible","focusHighlight"]),br=["children","className","focusVisibleClassName"],_r=(0,G.Ay)(Ot.A,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${vr.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${vr.focusVisible} .${vr.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}})),xr=(0,G.Ay)("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})})),wr=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiCardActionArea"}),{children:n,className:o,focusVisibleClassName:i}=r,a=(0,T.A)(r,br),s=r,l=(e=>{const{classes:t}=e;return(0,We.A)({root:["root"],focusHighlight:["focusHighlight"]},yr,t)})(s);return(0,te.jsxs)(_r,(0,E.A)({className:(0,Ge.A)(l.root,o),focusVisibleClassName:(0,Ge.A)(i,l.focusVisible),ref:t,ownerState:s},a,{children:[n,(0,te.jsx)(xr,{className:l.focusHighlight,ownerState:s})]}))});function Ar(e){return(0,Ye.Ay)("MuiCardActions",e)}const Sr=(0,Ze.A)("MuiCardActions",["root","spacing"]),Cr=["disableSpacing","className"],Er=(0,G.Ay)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})(({ownerState:e})=>(0,E.A)({display:"flex",alignItems:"center",padding:8},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),Tr=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiCardActions"}),{disableSpacing:n=!1,className:o}=r,i=(0,T.A)(r,Cr),a=(0,E.A)({},r,{disableSpacing:n}),s=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,We.A)(n,Ar,t)})(a);return(0,te.jsx)(Er,(0,E.A)({className:(0,Ge.A)(s.root,o),ownerState:a,ref:t},i))});function Ir(e){return(0,Ye.Ay)("MuiCardContent",e)}const kr=(0,Ze.A)("MuiCardContent",["root"]),Mr=["className","component"],Rr=(0,G.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),Pr=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiCardContent"}),{className:n,component:o="div"}=r,i=(0,T.A)(r,Mr),a=(0,E.A)({},r,{component:o}),s=(e=>{const{classes:t}=e;return(0,We.A)({root:["root"]},Ir,t)})(a);return(0,te.jsx)(Rr,(0,E.A)({as:o,className:(0,Ge.A)(s.root,n),ownerState:a,ref:t},i))});function Or(e){return(0,Ye.Ay)("MuiCardHeader",e)}const Dr=(0,Ze.A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]),Lr=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],Nr=(0,G.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,E.A)({[`& .${Dr.title}`]:t.title,[`& .${Dr.subheader}`]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),Fr=(0,G.Ay)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),zr=(0,G.Ay)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),Br=(0,G.Ay)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),jr=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiCardHeader"}),{action:n,avatar:o,className:i,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:c,title:u,titleTypographyProps:d}=r,f=(0,T.A)(r,Lr),p=(0,E.A)({},r,{component:a,disableTypography:s}),h=(e=>{const{classes:t}=e;return(0,We.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},Or,t)})(p);let m=u;null==m||m.type===Vt.A||s||(m=(0,te.jsx)(Vt.A,(0,E.A)({variant:o?"body2":"h5",className:h.title,component:"span",display:"block"},d,{children:m})));let g=l;return null==g||g.type===Vt.A||s||(g=(0,te.jsx)(Vt.A,(0,E.A)({variant:o?"body2":"body1",className:h.subheader,color:"text.secondary",component:"span",display:"block"},c,{children:g}))),(0,te.jsxs)(Nr,(0,E.A)({className:(0,Ge.A)(h.root,i),as:a,ref:t,ownerState:p},f,{children:[o&&(0,te.jsx)(Fr,{className:h.avatar,ownerState:p,children:o}),(0,te.jsxs)(Br,{className:h.content,ownerState:p,children:[m,g]}),n&&(0,te.jsx)(zr,{className:h.action,ownerState:p,children:n})]}))});function $r(e){return(0,Ye.Ay)("MuiCardMedia",e)}const Ur=(0,Ze.A)("MuiCardMedia",["root","media","img"]),Vr=["children","className","component","image","src","style"],Hr=(0,G.Ay)("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{isMediaComponent:n,isImageComponent:o}=r;return[t.root,n&&t.media,o&&t.img]}})(({ownerState:e})=>(0,E.A)({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},e.isMediaComponent&&{width:"100%"},e.isImageComponent&&{objectFit:"cover"})),Gr=["video","audio","picture","iframe","img"],Wr=["picture","img"],qr=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiCardMedia"}),{children:n,className:o,component:i="div",image:a,src:s,style:l}=r,c=(0,T.A)(r,Vr),u=-1!==Gr.indexOf(i),d=!u&&a?(0,E.A)({backgroundImage:`url("${a}")`},l):l,f=(0,E.A)({},r,{component:i,isMediaComponent:u,isImageComponent:-1!==Wr.indexOf(i)}),p=(e=>{const{classes:t,isMediaComponent:r,isImageComponent:n}=e,o={root:["root",r&&"media",n&&"img"]};return(0,We.A)(o,$r,t)})(f);return(0,te.jsx)(Hr,(0,E.A)({className:(0,Ge.A)(p.root,o),as:i,role:!u&&a?"img":void 0,ref:t,style:d,ownerState:f,src:u?a||s:void 0},c,{children:n}))}),Zr=qr;var Yr=r("wYCo"),Xr=r("Ifs3"),Kr=r("Ifci"),Jr=r("wmaj"),Qr=r("yXLF"),en=r("SYse"),tn=r("zX2i"),rn=r("awfS"),nn=r("LwNo"),on=r("8JWP");function an(e){return(0,Ye.Ay)("MuiContainer",e)}const sn=(0,Ze.A)("MuiContainer",["root","disableGutters","fixed","maxWidthXs","maxWidthSm","maxWidthMd","maxWidthLg","maxWidthXl"]);var ln=r("L9aa");const cn={track:"#2b2b2b",thumb:"#6b6b6b",active:"#959595"};function un(e=cn){return{scrollbarColor:`${e.thumb} ${e.track}`,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:e.track},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:e.thumb,minHeight:24,border:`3px solid ${e.track}`},"&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus":{backgroundColor:e.active},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:e.active},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:e.active},"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner":{backgroundColor:e.track}}}var dn=r("umvS"),fn=r("plnp"),pn=r("TFnf"),hn=r("CnVR"),mn=r("GVSF"),gn=r("KUP3"),yn=r("akmu"),vn=r("PTxh"),bn=r("b7jQ"),_n=r("HaXu"),xn=r("A+QN"),wn=r("WOV/"),An=r("6EZ2"),Sn=r("5oni");function Cn(e){return(0,Ye.Ay)("MuiFab",e)}const En=(0,Ze.A)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]);var Tn=r("XM18");const In=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],kn=(0,G.Ay)(Ot.A,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,Tn.A)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,ct.A)(r.size)}`],"inherit"===r.color&&t.colorInherit,t[(0,ct.A)(r.size)],t[r.color]]}})(({theme:e,ownerState:t})=>{var r,n;return(0,E.A)({},e.typography.button,{minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:null==(r=(n=e.palette).getContrastText)?void 0:r.call(n,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${En.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]}},"small"===t.size&&{width:40,height:40},"medium"===t.size&&{width:48,height:48},"extended"===t.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===t.variant&&"small"===t.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===t.variant&&"medium"===t.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===t.color&&{color:"inherit"})},({theme:e,ownerState:t})=>(0,E.A)({},"inherit"!==t.color&&"default"!==t.color&&null!=(e.vars||e).palette[t.color]&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}}),({theme:e})=>({[`&.${En.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}})),Mn=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiFab"}),{children:n,className:o,color:i="default",component:a="button",disabled:s=!1,disableFocusRipple:l=!1,focusVisibleClassName:c,size:u="large",variant:d="circular"}=r,f=(0,T.A)(r,In),p=(0,E.A)({},r,{color:i,component:a,disabled:s,disableFocusRipple:l,size:u,variant:d}),h=(e=>{const{color:t,variant:r,classes:n,size:o}=e,i={root:["root",r,`size${(0,ct.A)(o)}`,"inherit"===t?"colorInherit":t]},a=(0,We.A)(i,Cn,n);return(0,E.A)({},n,a)})(p);return(0,te.jsx)(kn,(0,E.A)({className:(0,Ge.A)(h.root,o),component:a,disabled:s,focusRipple:!l,focusVisibleClassName:(0,Ge.A)(h.focusVisible,c),ownerState:p,ref:t},f,{classes:h,children:n}))});var Rn=r("hGmu"),Pn=r("fJ4Q"),On=r("XYkD"),Dn=r("Fg+5"),Ln=r("7EOP"),Nn=r("XR1s"),Fn=r("O3LO"),zn=r("1L54"),Bn=r("4ycN"),jn=r("C559"),$n=r("sbgx"),Un=r("Vv3p"),Vn=r("VEoa"),Hn=r("4Qvy"),Gn=r("fGgT"),Wn=r("0kTp");const qn=K.createContext();function Zn(e){return(0,Ye.Ay)("MuiGrid",e)}const Yn=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Xn=(0,Ze.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>`spacing-xs-${e}`),...["column-reverse","column","row-reverse","row"].map(e=>`direction-xs-${e}`),...["nowrap","wrap-reverse","wrap"].map(e=>`wrap-xs-${e}`),...Yn.map(e=>`grid-xs-${e}`),...Yn.map(e=>`grid-sm-${e}`),...Yn.map(e=>`grid-md-${e}`),...Yn.map(e=>`grid-lg-${e}`),...Yn.map(e=>`grid-xl-${e}`)]),Kn=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Jn(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function Qn({breakpoints:e,values:t}){let r="";Object.keys(t).forEach(e=>{""===r&&0!==t[e]&&(r=e)});const n=Object.keys(e).sort((t,r)=>e[t]-e[r]);return n.slice(0,n.indexOf(r))}const eo=(0,G.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{container:n,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=r;let u=[];n&&(u=function(e,t,r={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[r[`spacing-xs-${String(e)}`]];const n=[];return t.forEach(t=>{const o=e[t];Number(o)>0&&n.push(r[`spacing-${t}-${String(o)}`])}),n}(a,c,t));const d=[];return c.forEach(e=>{const n=r[e];n&&d.push(t[`grid-${e}-${String(n)}`])}),[t.root,n&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})(({ownerState:e})=>(0,E.A)({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap}),function({theme:e,ownerState:t}){const r=(0,Gn.kW)({values:t.direction,breakpoints:e.breakpoints.values});return(0,Gn.NI)({theme:e},r,e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${Xn.item}`]={maxWidth:"none"}),t})},function({theme:e,ownerState:t}){const{container:r,rowSpacing:n}=t;let o={};if(r&&0!==n){const t=(0,Gn.kW)({values:n,breakpoints:e.breakpoints.values});let r;"object"==typeof t&&(r=Qn({breakpoints:e.breakpoints.values,values:t})),o=(0,Gn.NI)({theme:e},t,(t,n)=>{var o;const i=e.spacing(t);return"0px"!==i?{marginTop:`-${Jn(i)}`,[`& > .${Xn.item}`]:{paddingTop:Jn(i)}}:null!=(o=r)&&o.includes(n)?{}:{marginTop:0,[`& > .${Xn.item}`]:{paddingTop:0}}})}return o},function({theme:e,ownerState:t}){const{container:r,columnSpacing:n}=t;let o={};if(r&&0!==n){const t=(0,Gn.kW)({values:n,breakpoints:e.breakpoints.values});let r;"object"==typeof t&&(r=Qn({breakpoints:e.breakpoints.values,values:t})),o=(0,Gn.NI)({theme:e},t,(t,n)=>{var o;const i=e.spacing(t);return"0px"!==i?{width:`calc(100% + ${Jn(i)})`,marginLeft:`-${Jn(i)}`,[`& > .${Xn.item}`]:{paddingLeft:Jn(i)}}:null!=(o=r)&&o.includes(n)?{}:{width:"100%",marginLeft:0,[`& > .${Xn.item}`]:{paddingLeft:0}}})}return o},function({theme:e,ownerState:t}){let r;return e.breakpoints.keys.reduce((n,o)=>{let i={};if(t[o]&&(r=t[o]),!r)return n;if(!0===r)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===r)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=(0,Gn.kW)({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof a?a[o]:a;if(null==s)return n;const l=Math.round(r/s*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const r=e.spacing(t.columnSpacing);if("0px"!==r){const e=`calc(${l} + ${Jn(r)})`;c={flexBasis:e,maxWidth:e}}}i=(0,E.A)({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===e.breakpoints.values[o]?Object.assign(n,i):n[e.breakpoints.up(o)]=i,n},{})}),to=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiGrid"}),{breakpoints:n}=(0,V.A)(),o=(0,Wn.A)(r),{className:i,columns:a,columnSpacing:s,component:l="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:f,spacing:p=0,wrap:h="wrap",zeroMinWidth:m=!1}=o,g=(0,T.A)(o,Kn),y=f||p,v=s||p,b=K.useContext(qn),_=c?a||12:b,x={},w=(0,E.A)({},g);n.keys.forEach(e=>{null!=g[e]&&(x[e]=g[e],delete w[e])});const A=(0,E.A)({},o,{columns:_,container:c,direction:u,item:d,rowSpacing:y,columnSpacing:v,wrap:h,zeroMinWidth:m,spacing:p},x,{breakpoints:n.keys}),S=(e=>{const{classes:t,container:r,direction:n,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];r&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const r=[];return t.forEach(t=>{const n=e[t];if(Number(n)>0){const e=`spacing-${t}-${String(n)}`;r.push(e)}}),r}(i,l));const u=[];l.forEach(t=>{const r=e[t];r&&u.push(`grid-${t}-${String(r)}`)});const d={root:["root",r&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==n&&`direction-xs-${String(n)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...u]};return(0,We.A)(d,Zn,t)})(A);return(0,te.jsx)(qn.Provider,{value:_,children:(0,te.jsx)(eo,(0,E.A)({ownerState:A,className:(0,Ge.A)(S.root,i),as:l,ref:t},w))})}),ro=to;var no=r("lHbp"),oo=r("M82X"),io=r("sdrl"),ao=r("aoPf"),so=r("Tazo");const lo=(e,t,r)=>{const n=e.keys[0];var o,i;Array.isArray(t)?t.forEach((t,n)=>{r((t,r)=>{n<=e.keys.length-1&&(0===n?Object.assign(t,r):t[e.up(e.keys[n])]=r)},t)}):t&&"object"==typeof t?(Object.keys(t).length>e.keys.length?e.keys:(o=e.keys,i=Object.keys(t),o.filter(e=>i.includes(e)))).forEach(o=>{if(-1!==e.keys.indexOf(o)){const i=t[o];void 0!==i&&r((t,r)=>{n===o?Object.assign(t,r):t[e.up(o)]=r},i)}}):"number"!=typeof t&&"string"!=typeof t||r((e,t)=>{Object.assign(e,t)},t)};function co(e){return e?`Level${e}`:""}function uo(e){return e.unstable_level>0&&e.container}function fo(e){return function(t){return`var(--Grid-${t}Spacing${co(e.unstable_level)})`}}function po(e){return function(t){return 0===e.unstable_level?`var(--Grid-${t}Spacing)`:`var(--Grid-${t}Spacing${co(e.unstable_level-1)})`}}function ho(e){return 0===e.unstable_level?"var(--Grid-columns)":`var(--Grid-columns${co(e.unstable_level-1)})`}const mo=({theme:e,ownerState:t})=>{const r=fo(t),n={};return lo(e.breakpoints,t.gridSize,(e,o)=>{let i={};!0===o&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===o&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof o&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / ${ho(t)}${uo(t)?` + ${r("column")}`:""})`}),e(n,i)}),n},go=({theme:e,ownerState:t})=>{const r={};return lo(e.breakpoints,t.gridOffset,(e,n)=>{let o={};"auto"===n&&(o={marginLeft:"auto"}),"number"==typeof n&&(o={marginLeft:0===n?"0px":`calc(100% * ${n} / ${ho(t)})`}),e(r,o)}),r},yo=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=uo(t)?{[`--Grid-columns${co(t.unstable_level)}`]:ho(t)}:{"--Grid-columns":12};return lo(e.breakpoints,t.columns,(e,n)=>{e(r,{[`--Grid-columns${co(t.unstable_level)}`]:n})}),r},vo=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=po(t),n=uo(t)?{[`--Grid-rowSpacing${co(t.unstable_level)}`]:r("row")}:{};return lo(e.breakpoints,t.rowSpacing,(r,o)=>{var i;r(n,{[`--Grid-rowSpacing${co(t.unstable_level)}`]:"string"==typeof o?o:null==(i=e.spacing)?void 0:i.call(e,o)})}),n},bo=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=po(t),n=uo(t)?{[`--Grid-columnSpacing${co(t.unstable_level)}`]:r("column")}:{};return lo(e.breakpoints,t.columnSpacing,(r,o)=>{var i;r(n,{[`--Grid-columnSpacing${co(t.unstable_level)}`]:"string"==typeof o?o:null==(i=e.spacing)?void 0:i.call(e,o)})}),n},_o=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return lo(e.breakpoints,t.direction,(e,t)=>{e(r,{flexDirection:t})}),r},xo=({ownerState:e})=>{const t=fo(e),r=po(e);return(0,E.A)({minWidth:0,boxSizing:"border-box"},e.container&&(0,E.A)({display:"flex",flexWrap:"wrap"},e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||uo(e))&&(0,E.A)({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},wo=e=>{const t=[];return Object.entries(e).forEach(([e,r])=>{!1!==r&&void 0!==r&&t.push(`grid-${e}-${String(r)}`)}),t},Ao=(e,t="xs")=>{function r(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(r(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){const t=[];return Object.entries(e).forEach(([e,n])=>{r(n)&&t.push(`spacing-${e}-${String(n)}`)}),t}return[]},So=e=>void 0===e?[]:"object"==typeof e?Object.entries(e).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(e)}`],Co=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],Eo=(0,so.A)(),To=(0,oo.A)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Io(e){return(0,io.A)({props:e,name:"MuiGrid",defaultTheme:Eo})}const ko=function(e={}){const{createStyledComponent:t=To,useThemeProps:r=Io,componentName:n="MuiGrid"}=e,o=K.createContext(void 0),i=t(yo,bo,vo,mo,_o,xo,go),a=K.forwardRef(function(e,t){var a,s,l,c,u,d,f,p;const h=(0,ao.A)(),m=r(e),g=(0,Wn.A)(m),y=K.useContext(o),{className:v,children:b,columns:_=12,container:x=!1,component:w="div",direction:A="row",wrap:S="wrap",spacing:C=0,rowSpacing:I=C,columnSpacing:k=C,disableEqualOverflow:M,unstable_level:R=0}=g,P=(0,T.A)(g,Co);let O=M;R&&void 0!==M&&(O=e.disableEqualOverflow);const D={},L={},N={};Object.entries(P).forEach(([e,t])=>{void 0!==h.breakpoints.values[e]?D[e]=t:void 0!==h.breakpoints.values[e.replace("Offset","")]?L[e.replace("Offset","")]=t:N[e]=t});const F=null!=(a=e.columns)?a:R?void 0:_,z=null!=(s=e.spacing)?s:R?void 0:C,B=null!=(l=null!=(c=e.rowSpacing)?c:e.spacing)?l:R?void 0:I,j=null!=(u=null!=(d=e.columnSpacing)?d:e.spacing)?u:R?void 0:k,$=(0,E.A)({},g,{level:R,columns:F,container:x,direction:A,wrap:S,spacing:z,rowSpacing:B,columnSpacing:j,gridSize:D,gridOffset:L,disableEqualOverflow:null!=(f=null!=(p=O)?p:y)&&f,parentDisableEqualOverflow:y}),U=((e,t)=>{const{container:r,direction:o,spacing:i,wrap:a,gridSize:s}=e,l={root:["root",r&&"container","wrap"!==a&&`wrap-xs-${String(a)}`,...So(o),...wo(s),...r?Ao(i,t.breakpoints.keys[0]):[]]};return(0,We.A)(l,e=>(0,Ye.Ay)(n,e),{})})($,h);let V=(0,te.jsx)(i,(0,E.A)({ref:t,as:w,ownerState:$,className:(0,Ge.A)(U.root,v)},N,{children:K.Children.map(b,e=>{var t,r;return K.isValidElement(e)&&(0,no.A)(e,["Grid"])?K.cloneElement(e,{unstable_level:null!=(t=null==(r=e.props)?void 0:r.unstable_level)?t:R+1}):e})}));return void 0!==O&&O!==(null!=y&&y)&&(V=(0,te.jsx)(o.Provider,{value:O,children:V})),V});return a.muiName="Grid",a}({createStyledComponent:(0,G.Ay)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>(0,qe.b)({props:e,name:"MuiGrid2"})}),Mo=ko;function Ro(e){return(0,Ye.Ay)("MuiGrid2",e)}const Po=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Oo=(0,Ze.A)("MuiGrid2",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>`spacing-xs-${e}`),...["column-reverse","column","row-reverse","row"].map(e=>`direction-xs-${e}`),...["nowrap","wrap-reverse","wrap"].map(e=>`wrap-xs-${e}`),...Po.map(e=>`grid-xs-${e}`),...Po.map(e=>`grid-sm-${e}`),...Po.map(e=>`grid-md-${e}`),...Po.map(e=>`grid-lg-${e}`),...Po.map(e=>`grid-xl-${e}`)]);var Do=r("UVCh"),Lo=r("PfWk"),No=r("6q60"),Fo=r("bBSl");const zo=["initialWidth","width"],Bo=["xs","sm","md","lg","xl"],jo=(e,t,r=!0)=>r?Bo.indexOf(e)<=Bo.indexOf(t):Bo.indexOf(e)r?Bo.indexOf(t)<=Bo.indexOf(e):Bo.indexOf(t)t=>{const{withTheme:r=!1,noSSR:n=!1,initialWidth:o}=e;return function(e){const i=(0,V.A)(),a=e.theme||i,s=(0,Lo.A)({theme:a,name:"MuiWithWidth",props:e}),{initialWidth:l,width:c}=s,u=(0,T.A)(s,zo),[d,f]=K.useState(!1);(0,No.A)(()=>{f(!0)},[]);const p=a.breakpoints.keys.slice().reverse().reduce((e,t)=>{const r=(0,Fo.A)(a.breakpoints.up(t));return!e&&r?t:e},null),h=(0,E.A)({width:c||(d||n?p:void 0)||l||o},r?{theme:a}:{},u);return void 0===h.width?null:(0,te.jsx)(t,(0,E.A)({},h))}})()(function(e){const{children:t,only:r,width:n}=e,o=(0,V.A)();let i=!0;if(r)if(Array.isArray(r)){for(let e=0;e{const r={display:"none"};return(0,E.A)({},t.breakpoints.map(({breakpoint:t,dir:n})=>"only"===n?{[e.breakpoints.only(t)]:r}:"up"===n?{[e.breakpoints.up(t)]:r}:{[e.breakpoints.down(t)]:r}).reduce((e,t)=>(Object.keys(t).forEach(r=>{e[r]=t[r]}),e),{}))}),Wo=function(e){const{children:t,className:r,only:n}=e,o=(0,T.A)(e,Ho),i=(0,V.A)(),a=[];for(let e=0;e{a.push({breakpoint:e,dir:"only"})});const s=(0,E.A)({},e,{breakpoints:a}),l=(e=>{const{classes:t,breakpoints:r}=e,n={root:["root",...r.map(({breakpoint:e,dir:t})=>"only"===t?`${t}${(0,ct.A)(e)}`:`${e}${(0,ct.A)(t)}`)]};return(0,We.A)(n,Vo,t)})(s);return(0,te.jsx)(Go,{className:(0,Ge.A)(l.root,r),ownerState:s,children:t})},qo=["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"],Zo=function(e){const{implementation:t="js",lgDown:r=!1,lgUp:n=!1,mdDown:o=!1,mdUp:i=!1,smDown:a=!1,smUp:s=!1,xlDown:l=!1,xlUp:c=!1,xsDown:u=!1,xsUp:d=!1}=e,f=(0,T.A)(e,qo);return"js"===t?(0,te.jsx)(Uo,(0,E.A)({lgDown:r,lgUp:n,mdDown:o,mdUp:i,smDown:a,smUp:s,xlDown:l,xlUp:c,xsDown:u,xsUp:d},f)):(0,te.jsx)(Wo,(0,E.A)({lgDown:r,lgUp:n,mdDown:o,mdUp:i,smDown:a,smUp:s,xlDown:l,xlUp:c,xsDown:u,xsUp:d},f))};function Yo(e){return(0,Ye.Ay)("MuiIcon",e)}const Xo=(0,Ze.A)("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]),Ko=["baseClassName","className","color","component","fontSize"],Jo=(0,G.Ay)("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"inherit"!==r.color&&t[`color${(0,ct.A)(r.color)}`],t[`fontSize${(0,ct.A)(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(36)}[t.fontSize],color:{primary:(e.vars||e).palette.primary.main,secondary:(e.vars||e).palette.secondary.main,info:(e.vars||e).palette.info.main,success:(e.vars||e).palette.success.main,warning:(e.vars||e).palette.warning.main,action:(e.vars||e).palette.action.active,error:(e.vars||e).palette.error.main,disabled:(e.vars||e).palette.action.disabled,inherit:void 0}[t.color]})),Qo=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiIcon"}),{baseClassName:n="material-icons",className:o,color:i="inherit",component:a="span",fontSize:s="medium"}=r,l=(0,T.A)(r,Ko),c=(0,E.A)({},r,{baseClassName:n,color:i,component:a,fontSize:s}),u=(e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root","inherit"!==t&&`color${(0,ct.A)(t)}`,`fontSize${(0,ct.A)(r)}`]};return(0,We.A)(o,Yo,n)})(c);return(0,te.jsx)(Jo,(0,E.A)({as:a,className:(0,Ge.A)(n,"notranslate",u.root,o),ownerState:c,"aria-hidden":!0,ref:t},l))});Qo.muiName="Icon";const ei=Qo;var ti=r("OGDC"),ri=r("5iV1");function ni(e){return(0,Ye.Ay)("MuiImageList",e)}const oi=(0,Ze.A)("MuiImageList",["root","masonry","quilted","standard","woven"]),ii=K.createContext({}),ai=["children","className","cols","component","rowHeight","gap","style","variant"],si=(0,G.Ay)("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant]]}})(({ownerState:e})=>(0,E.A)({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"},"masonry"===e.variant&&{display:"block"})),li=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiImageList"}),{children:n,className:o,cols:i=2,component:a="ul",rowHeight:s="auto",gap:l=4,style:c,variant:u="standard"}=r,d=(0,T.A)(r,ai),f=K.useMemo(()=>({rowHeight:s,gap:l,variant:u}),[s,l,u]);K.useEffect(()=>{},[]);const p="masonry"===u?(0,E.A)({columnCount:i,columnGap:l},c):(0,E.A)({gridTemplateColumns:`repeat(${i}, 1fr)`,gap:l},c),h=(0,E.A)({},r,{component:a,gap:l,rowHeight:s,variant:u}),m=(e=>{const{classes:t,variant:r}=e,n={root:["root",r]};return(0,We.A)(n,ni,t)})(h);return(0,te.jsx)(si,(0,E.A)({as:a,className:(0,Ge.A)(m.root,m[u],o),ref:t,style:p,ownerState:h},d,{children:(0,te.jsx)(ii.Provider,{value:f,children:n})}))}),ci=li;var ui=r("M3M6");function di(e){return(0,Ye.Ay)("MuiImageListItem",e)}const fi=(0,Ze.A)("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),pi=["children","className","cols","component","rows","style"],hi=(0,G.Ay)("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${fi.img}`]:t.img},t.root,t[r.variant]]}})(({ownerState:e})=>(0,E.A)({display:"block",position:"relative"},"standard"===e.variant&&{display:"flex",flexDirection:"column"},"woven"===e.variant&&{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}},{[`& .${fi.img}`]:(0,E.A)({objectFit:"cover",width:"100%",height:"100%",display:"block"},"standard"===e.variant&&{height:"auto",flexGrow:1})})),mi=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiImageListItem"}),{children:n,className:o,cols:i=1,component:a="li",rows:s=1,style:l}=r,c=(0,T.A)(r,pi),{rowHeight:u="auto",gap:d,variant:f}=K.useContext(ii);let p="auto";"woven"===f?p=void 0:"auto"!==u&&(p=u*s+d*(s-1));const h=(0,E.A)({},r,{cols:i,component:a,gap:d,rowHeight:u,rows:s,variant:f}),m=(e=>{const{classes:t,variant:r}=e,n={root:["root",r],img:["img"]};return(0,We.A)(n,di,t)})(h);return(0,te.jsx)(hi,(0,E.A)({as:a,className:(0,Ge.A)(m.root,m[f],o),ref:t,style:(0,E.A)({height:p,gridColumnEnd:"masonry"!==f?`span ${i}`:void 0,gridRowEnd:"masonry"!==f?`span ${s}`:void 0,marginBottom:"masonry"===f?d:void 0,breakInside:"masonry"===f?"avoid":void 0},l),ownerState:h},c,{children:K.Children.map(n,e=>K.isValidElement(e)?"img"===e.type||(0,ui.A)(e,["Image"])?K.cloneElement(e,{className:(0,Ge.A)(m.img,e.props.className)}):e:null)}))}),gi=mi;function yi(e){return(0,Ye.Ay)("MuiImageListItemBar",e)}const vi=(0,Ze.A)("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]),bi=["actionIcon","actionPosition","className","subtitle","title","position"],_i=(0,G.Ay)("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,ct.A)(r.position)}`]]}})(({theme:e,ownerState:t})=>(0,E.A)({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},"bottom"===t.position&&{bottom:0},"top"===t.position&&{top:0},"below"===t.position&&{position:"relative",background:"transparent",alignItems:"normal"})),xi=(0,G.Ay)("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.titleWrap,t[`titleWrap${(0,ct.A)(r.position)}`],r.actionIcon&&t[`titleWrapActionPos${(0,ct.A)(r.actionPosition)}`]]}})(({theme:e,ownerState:t})=>(0,E.A)({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden"},"below"===t.position&&{padding:"6px 0 12px",color:"inherit"},t.actionIcon&&"left"===t.actionPosition&&{paddingLeft:0},t.actionIcon&&"right"===t.actionPosition&&{paddingRight:0})),wi=(0,G.Ay)("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})(({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),Ai=(0,G.Ay)("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})(({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),Si=(0,G.Ay)("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.actionIcon,t[`actionIconActionPos${(0,ct.A)(r.actionPosition)}`]]}})(({ownerState:e})=>(0,E.A)({},"left"===e.actionPosition&&{order:-1})),Ci=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiImageListItemBar"}),{actionIcon:n,actionPosition:o="right",className:i,subtitle:a,title:s,position:l="bottom"}=r,c=(0,T.A)(r,bi),u=(0,E.A)({},r,{position:l,actionPosition:o}),d=(e=>{const{classes:t,position:r,actionIcon:n,actionPosition:o}=e,i={root:["root",`position${(0,ct.A)(r)}`],titleWrap:["titleWrap",`titleWrap${(0,ct.A)(r)}`,n&&`titleWrapActionPos${(0,ct.A)(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${(0,ct.A)(o)}`]};return(0,We.A)(i,yi,t)})(u);return(0,te.jsxs)(_i,(0,E.A)({ownerState:u,className:(0,Ge.A)(d.root,i),ref:t},c,{children:[(0,te.jsxs)(xi,{ownerState:u,className:d.titleWrap,children:[(0,te.jsx)(wi,{className:d.title,children:s}),a?(0,te.jsx)(Ai,{className:d.subtitle,children:a}):null]}),n?(0,te.jsx)(Si,{ownerState:u,className:d.actionIcon,children:n}):null]}))});var Ei=r("WdHY"),Ti=r("Zqw4"),Ii=r("EfzM"),ki=r("S9h2"),Mi=r("kmWS"),Ri=r("G5wc"),Pi=r("kQF4"),Oi=r("eKIA"),Di=r("4WJT"),Li=r("HkBA"),Ni=r("8rms"),Fi=r("ZfBw");function zi(e){return(0,Ye.Ay)("MuiLink",e)}const Bi=(0,Ze.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var ji=r("+y7V");const $i={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Ui=({theme:e,ownerState:t})=>{const r=(e=>$i[e]||e)(t.color),n=(0,ji.Yn)(e,`palette.${r}`,!1)||t.color,o=(0,ji.Yn)(e,`palette.${r}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:(0,ye.X4)(n,.4)},Vi=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Hi=(0,G.Ay)(Vt.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`underline${(0,ct.A)(r.underline)}`],"button"===r.component&&t.button]}})(({theme:e,ownerState:t})=>(0,E.A)({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&(0,E.A)({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:Ui({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Bi.focusVisible}`]:{outline:"auto"}})),Gi=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiLink"}),{className:n,color:o="primary",component:i="a",onBlur:a,onFocus:s,TypographyClasses:l,underline:c="always",variant:u="inherit",sx:d}=r,f=(0,T.A)(r,Vi),{isFocusVisibleRef:p,onBlur:h,onFocus:m,ref:g}=(0,Ni.A)(),[y,v]=K.useState(!1),b=(0,Fi.A)(t,g),_=(0,E.A)({},r,{color:o,component:i,focusVisible:y,underline:c,variant:u}),x=(e=>{const{classes:t,component:r,focusVisible:n,underline:o}=e,i={root:["root",`underline${(0,ct.A)(o)}`,"button"===r&&"button",n&&"focusVisible"]};return(0,We.A)(i,zi,t)})(_);return(0,te.jsx)(Hi,(0,E.A)({color:o,className:(0,Ge.A)(x.root,n),classes:l,component:i,onBlur:e=>{h(e),!1===p.current&&v(!1),a&&a(e)},onFocus:e=>{m(e),!0===p.current&&v(!0),s&&s(e)},ref:b,ownerState:_,variant:u,sx:[...Object.keys($i).includes(o)?[]:[{color:o}],...Array.isArray(d)?d:[d]]},f))});var Wi=r("H9le"),qi=r("sK9B"),Zi=r("ZvkB"),Yi=r("wCeY"),Xi=r("a6xD"),Ki=r("FUPx"),Ji=r("cwku"),Qi=r("6l0j");const ea=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],ta=(0,G.Ay)(Ot.A,{shouldForwardProp:e=>(0,Tn.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>(0,E.A)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qi.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,ye.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Qi.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,ye.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Qi.A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,ye.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,ye.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Qi.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qi.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),ra=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiListItemButton"}),{alignItems:n="center",autoFocus:o=!1,component:i="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:u,selected:d=!1,className:f}=r,p=(0,T.A)(r,ea),h=K.useContext(Ji.A),m=K.useMemo(()=>({dense:s||h.dense||!1,alignItems:n,disableGutters:l}),[n,h.dense,s,l]),g=K.useRef(null);(0,No.A)(()=>{o&&g.current&&g.current.focus()},[o]);const y=(0,E.A)({},r,{alignItems:n,dense:m.dense,disableGutters:l,divider:c,selected:d}),v=(e=>{const{alignItems:t,classes:r,dense:n,disabled:o,disableGutters:i,divider:a,selected:s}=e,l={root:["root",n&&"dense",!i&&"gutters",a&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},c=(0,We.A)(l,Qi.Y,r);return(0,E.A)({},r,c)})(y),b=(0,Fi.A)(g,t);return(0,te.jsx)(Ji.A.Provider,{value:m,children:(0,te.jsx)(ta,(0,E.A)({ref:b,href:p.href||p.to,component:(p.href||p.to)&&"div"===i?"button":i,focusVisibleClassName:(0,Ge.A)(v.focusVisible,u),ownerState:y,className:(0,Ge.A)(v.root,f)},p,{classes:v,children:a}))})});var na=r("mkGA"),oa=r("xkXe"),ia=r("DFFc"),aa=r("RD6q"),sa=r("T4Ez"),la=r("R6o4"),ca=r("BkAX"),ua=r("cXnk"),da=r("4enW"),fa=r("k/XA"),pa=r("LutX"),ha=r("BCtw"),ma=r("IXjO"),ga=r("FO2v");function ya(e){return(0,Ye.Ay)("MuiMobileStepper",e)}const va=(0,Ze.A)("MuiMobileStepper",["root","positionBottom","positionTop","positionStatic","dots","dot","dotActive","progress"]),ba=["activeStep","backButton","className","LinearProgressProps","nextButton","position","steps","variant"],_a=(0,G.Ay)(ut.A,{name:"MuiMobileStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,ct.A)(r.position)}`]]}})(({theme:e,ownerState:t})=>(0,E.A)({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:(e.vars||e).palette.background.default,padding:8},"bottom"===t.position&&{position:"fixed",bottom:0,left:0,right:0,zIndex:(e.vars||e).zIndex.mobileStepper},"top"===t.position&&{position:"fixed",top:0,left:0,right:0,zIndex:(e.vars||e).zIndex.mobileStepper})),xa=(0,G.Ay)("div",{name:"MuiMobileStepper",slot:"Dots",overridesResolver:(e,t)=>t.dots})(({ownerState:e})=>(0,E.A)({},"dots"===e.variant&&{display:"flex",flexDirection:"row"})),wa=(0,G.Ay)("div",{name:"MuiMobileStepper",slot:"Dot",shouldForwardProp:e=>(0,ga.A)(e)&&"dotActive"!==e,overridesResolver:(e,t)=>{const{dotActive:r}=e;return[t.dot,r&&t.dotActive]}})(({theme:e,ownerState:t,dotActive:r})=>(0,E.A)({},"dots"===t.variant&&(0,E.A)({transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"},r&&{backgroundColor:(e.vars||e).palette.primary.main}))),Aa=(0,G.Ay)(Di.A,{name:"MuiMobileStepper",slot:"Progress",overridesResolver:(e,t)=>t.progress})(({ownerState:e})=>(0,E.A)({},"progress"===e.variant&&{width:"50%"})),Sa=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiMobileStepper"}),{activeStep:n=0,backButton:o,className:i,LinearProgressProps:a,nextButton:s,position:l="bottom",steps:c,variant:u="dots"}=r,d=(0,T.A)(r,ba),f=(0,E.A)({},r,{activeStep:n,position:l,variant:u});let p;"progress"===u&&(p=1===c?100:Math.ceil(n/(c-1)*100));const h=(e=>{const{classes:t,position:r}=e,n={root:["root",`position${(0,ct.A)(r)}`],dots:["dots"],dot:["dot"],dotActive:["dotActive"],progress:["progress"]};return(0,We.A)(n,ya,t)})(f);return(0,te.jsxs)(_a,(0,E.A)({square:!0,elevation:0,className:(0,Ge.A)(h.root,i),ref:t,ownerState:f},d,{children:[o,"text"===u&&(0,te.jsxs)(K.Fragment,{children:[n+1," / ",c]}),"dots"===u&&(0,te.jsx)(xa,{ownerState:f,className:h.dots,children:[...new Array(c)].map((e,t)=>(0,te.jsx)(wa,{className:(0,Ge.A)(h.dot,t===n&&h.dotActive),ownerState:f,dotActive:t===n},t))}),"progress"===u&&(0,te.jsx)(Aa,(0,E.A)({ownerState:f,className:h.progress,variant:"determinate",value:p},a)),s]}))});var Ca=r("X6EC"),Ea=r("fEft"),Ta=r("bEEB"),Ia=r("82Iz"),ka=r("1ODS"),Ma=r("smxg"),Ra=r("F/mX");const Pa=["className","children","classes","IconComponent","input","inputProps","variant"],Oa=["root"],Da=(0,te.jsx)(Ei.A,{}),La=K.forwardRef(function(e,t){const r=(0,qe.b)({name:"MuiNativeSelect",props:e}),{className:n,children:o,classes:i={},IconComponent:a=Ma.A,input:s=Da,inputProps:l}=r,c=(0,T.A)(r,Pa),u=(0,Ln.A)(),d=(0,ka.A)({props:r,muiFormControl:u,states:["variant"]}),f=(e=>{const{classes:t}=e;return(0,We.A)({root:["root"]},Ra.w,t)})((0,E.A)({},r,{classes:i})),p=(0,T.A)(i,Oa);return(0,te.jsx)(K.Fragment,{children:K.cloneElement(s,(0,E.A)({inputComponent:Ia.Ay,inputProps:(0,E.A)({children:o,classes:p,IconComponent:a,variant:d.variant,type:void 0},l,s?s.props.inputProps:{}),ref:t},c,{className:(0,Ge.A)(f.root,s.props.className,n)}))})});La.muiName="Select";const Na=La;var Fa=r("XgeM");const za=function(e){const{children:t,defer:r=!1,fallback:n=null}=e,[o,i]=K.useState(!1);return(0,Fa.A)(()=>{r||i(!0)},[r]),K.useEffect(()=>{r&&i(!0)},[r]),(0,te.jsx)(K.Fragment,{children:o?t:n})};var Ba=r("6j3M"),ja=r("y9Q0"),$a=r("xbkH"),Ua=r("mUtR"),Va=r("FHEq"),Ha=r("d8wY"),Ga=r("ntv0"),Wa=r("FZC7"),qa=r("NzyO"),Za=r("usZy"),Ya=r("zFdC"),Xa=r("Cc46"),Ka=r("d4Oc"),Ja=r("N7Sv"),Qa=r("zjqC"),es=r("l+/q"),ts=r("brkH"),rs=r("5cFC"),ns=r("r/ya"),os=r("St5x"),is=r("DSU1"),as=r("1vOf");const ss=(0,Ht.A)((0,te.jsx)("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),ls=(0,Ht.A)((0,te.jsx)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder");function cs(e){return(0,Ye.Ay)("MuiRating",e)}const us=(0,Ze.A)("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]),ds=["value"],fs=["className","defaultValue","disabled","emptyIcon","emptyLabelText","getLabelText","highlightSelectedOnly","icon","IconContainerComponent","max","name","onChange","onChangeActive","onMouseLeave","onMouseMove","precision","readOnly","size","value"];function ps(e,t){if(null==e)return e;const r=Math.round(e/t)*t;return Number(r.toFixed(function(e){const t=e.toString().split(".")[1];return t?t.length:0}(t)))}const hs=(0,G.Ay)("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${us.visuallyHidden}`]:t.visuallyHidden},t.root,t[`size${(0,ct.A)(r.size)}`],r.readOnly&&t.readOnly]}})(({theme:e,ownerState:t})=>(0,E.A)({display:"inline-flex",position:"relative",fontSize:e.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",width:"min-content",WebkitTapHighlightColor:"transparent",[`&.${us.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${us.focusVisible} .${us.iconActive}`]:{outline:"1px solid #999"},[`& .${us.visuallyHidden}`]:ns.A},"small"===t.size&&{fontSize:e.typography.pxToRem(18)},"large"===t.size&&{fontSize:e.typography.pxToRem(30)},t.readOnly&&{pointerEvents:"none"})),ms=(0,G.Ay)("label",{name:"MuiRating",slot:"Label",overridesResolver:({ownerState:e},t)=>[t.label,e.emptyValueFocused&&t.labelEmptyValueActive]})(({ownerState:e})=>(0,E.A)({cursor:"inherit"},e.emptyValueFocused&&{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"})),gs=(0,G.Ay)("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.iconEmpty&&t.iconEmpty,r.iconFilled&&t.iconFilled,r.iconHover&&t.iconHover,r.iconFocus&&t.iconFocus,r.iconActive&&t.iconActive]}})(({theme:e,ownerState:t})=>(0,E.A)({display:"flex",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),pointerEvents:"none"},t.iconActive&&{transform:"scale(1.2)"},t.iconEmpty&&{color:(e.vars||e).palette.action.disabled})),ys=(0,G.Ay)("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>(0,ga.A)(e)&&"iconActive"!==e,overridesResolver:(e,t)=>{const{iconActive:r}=e;return[t.decimal,r&&t.iconActive]}})(({iconActive:e})=>(0,E.A)({position:"relative"},e&&{transform:"scale(1.2)"}));function vs(e){const t=(0,T.A)(e,ds);return(0,te.jsx)("span",(0,E.A)({},t))}function bs(e){const{classes:t,disabled:r,emptyIcon:n,focus:o,getLabelText:i,highlightSelectedOnly:a,hover:s,icon:l,IconContainerComponent:c,isActive:u,itemValue:d,labelProps:f,name:p,onBlur:h,onChange:m,onClick:g,onFocus:y,readOnly:v,ownerState:b,ratingValue:_,ratingValueRounded:x}=e,w=a?d===_:d<=_,A=d<=s,S=d<=o,C=d===x,T=(0,is.A)(),I=(0,te.jsx)(gs,{as:c,value:d,className:(0,Ge.A)(t.icon,w?t.iconFilled:t.iconEmpty,A&&t.iconHover,S&&t.iconFocus,u&&t.iconActive),ownerState:(0,E.A)({},b,{iconEmpty:!w,iconFilled:w,iconHover:A,iconFocus:S,iconActive:u}),children:n&&!w?n:l});return v?(0,te.jsx)("span",(0,E.A)({},f,{children:I})):(0,te.jsxs)(K.Fragment,{children:[(0,te.jsxs)(ms,(0,E.A)({ownerState:(0,E.A)({},b,{emptyValueFocused:void 0}),htmlFor:T},f,{children:[I,(0,te.jsx)("span",{className:t.visuallyHidden,children:i(d)})]})),(0,te.jsx)("input",{className:t.visuallyHidden,onFocus:y,onBlur:h,onChange:m,onClick:g,disabled:r,value:d,id:T,type:"radio",name:p,checked:C})]})}const _s=(0,te.jsx)(ss,{fontSize:"inherit"}),xs=(0,te.jsx)(ls,{fontSize:"inherit"});function ws(e){return`${e} Star${1!==e?"s":""}`}const As=K.forwardRef(function(e,t){const r=(0,qe.b)({name:"MuiRating",props:e}),{className:n,defaultValue:o=null,disabled:i=!1,emptyIcon:a=xs,emptyLabelText:s="Empty",getLabelText:l=ws,highlightSelectedOnly:c=!1,icon:u=_s,IconContainerComponent:d=vs,max:f=5,name:p,onChange:h,onChangeActive:m,onMouseLeave:g,onMouseMove:y,precision:v=1,readOnly:b=!1,size:_="medium",value:x}=r,w=(0,T.A)(r,fs),A=(0,is.A)(p),[S,C]=(0,as.A)({controlled:x,default:o,name:"Rating"}),I=ps(S,v),k=(0,os.I)(),[{hover:M,focus:R},P]=K.useState({hover:-1,focus:-1});let O=I;-1!==M&&(O=M),-1!==R&&(O=R);const{isFocusVisibleRef:D,onBlur:L,onFocus:N,ref:F}=(0,Ni.A)(),[z,B]=K.useState(!1),j=K.useRef(),$=(0,Fi.A)(F,j,t),U=e=>{let t=""===e.target.value?null:parseFloat(e.target.value);-1!==M&&(t=M),C(t),h&&h(e,t)},V=e=>{0===e.clientX&&0===e.clientY||(P({hover:-1,focus:-1}),C(null),h&&parseFloat(e.target.value)===I&&h(e,null))},H=e=>{N(e),!0===D.current&&B(!0);const t=parseFloat(e.target.value);P(e=>({hover:e.hover,focus:t}))},G=e=>{-1===M&&(L(e),!1===D.current&&B(!1),P(e=>({hover:e.hover,focus:-1})))},[W,q]=K.useState(!1),Z=(0,E.A)({},r,{defaultValue:o,disabled:i,emptyIcon:a,emptyLabelText:s,emptyValueFocused:W,focusVisible:z,getLabelText:l,icon:u,IconContainerComponent:d,max:f,precision:v,readOnly:b,size:_}),Y=(e=>{const{classes:t,size:r,readOnly:n,disabled:o,emptyValueFocused:i,focusVisible:a}=e,s={root:["root",`size${(0,ct.A)(r)}`,o&&"disabled",a&&"focusVisible",n&&"readOnly"],label:["label","pristine"],labelEmptyValue:[i&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]};return(0,We.A)(s,cs,t)})(Z);return(0,te.jsxs)(hs,(0,E.A)({ref:$,onMouseMove:e=>{y&&y(e);const t=j.current,{right:r,left:n,width:o}=t.getBoundingClientRect();let i;i=k?(r-e.clientX)/o:(e.clientX-n)/o;let a=ps(f*i+v/2,v);a=(0,rs.A)(a,v,f),P(e=>e.hover===a&&e.focus===a?e:{hover:a,focus:a}),B(!1),m&&M!==a&&m(e,a)},onMouseLeave:e=>{g&&g(e),P({hover:-1,focus:-1}),m&&-1!==M&&m(e,-1)},className:(0,Ge.A)(Y.root,n,b&&"MuiRating-readOnly"),ownerState:Z,role:b?"img":null,"aria-label":b?l(O):null},w,{children:[Array.from(new Array(f)).map((e,t)=>{const r=t+1,n={classes:Y,disabled:i,emptyIcon:a,focus:R,getLabelText:l,highlightSelectedOnly:c,hover:M,icon:u,IconContainerComponent:d,name:A,onBlur:G,onChange:U,onClick:V,onFocus:H,ratingValue:O,ratingValueRounded:I,readOnly:b,ownerState:Z},o=r===Math.ceil(O)&&(-1!==M||-1!==R);if(v<1){const e=Array.from(new Array(1/v));return(0,te.jsx)(ys,{className:(0,Ge.A)(Y.decimal,o&&Y.iconActive),ownerState:Z,iconActive:o,children:e.map((t,o)=>{const i=ps(r-1+(o+1)*v,v);return(0,te.jsx)(bs,(0,E.A)({},n,{isActive:!1,itemValue:i,labelProps:{style:e.length-1===o?{}:{width:i===O?(o+1)*v*100+"%":"0%",overflow:"hidden",position:"absolute"}}}),i)})},r)}return(0,te.jsx)(bs,(0,E.A)({},n,{isActive:o,itemValue:r}),r)}),!b&&!i&&(0,te.jsxs)(ms,{className:(0,Ge.A)(Y.label,Y.labelEmptyValue),ownerState:Z,children:[(0,te.jsx)("input",{className:Y.visuallyHidden,value:"",id:`${A}-empty`,type:"radio",name:A,checked:null==I,onFocus:()=>q(!0),onBlur:()=>q(!1),onChange:U}),(0,te.jsx)("span",{className:Y.visuallyHidden,children:s})]})]}))});var Ss=r("f/6o"),Cs=r("c5OB"),Es=r("AAK8"),Ts=r("tNc0"),Is=r("tAhU"),ks=r("ioAD"),Ms=r("ta8z"),Rs=r("3YeO"),Ps=r("ZROH"),Os=r("6dIc"),Ds=r("YoCR"),Ls=r("ESRK"),Ns=r("YE/p"),Fs=r("J13E"),zs=r("XOob"),Bs=r("cP2J"),js=r("AiGX");const $s=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Us={entering:{transform:"none"},entered:{transform:"none"}},Vs=K.forwardRef(function(e,t){const r=(0,V.A)(),n={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:h,style:m,timeout:g=n,TransitionComponent:y=zs.Ay}=e,v=(0,T.A)(e,$s),b=K.useRef(null),_=(0,Fi.A)(b,(0,Bs.A)(a),t),x=e=>t=>{if(e){const r=b.current;void 0===t?e(r):e(r,t)}},w=x(d),A=x((e,t)=>{(0,js.q)(e);const n=(0,js.c)({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=r.transitions.create("transform",n),e.style.transition=r.transitions.create("transform",n),c&&c(e,t)}),S=x(u),C=x(h),I=x(e=>{const t=(0,js.c)({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=r.transitions.create("transform",t),e.style.transition=r.transitions.create("transform",t),f&&f(e)}),k=x(p);return(0,te.jsx)(y,(0,E.A)({appear:i,in:l,nodeRef:b,onEnter:A,onEntered:S,onEntering:w,onExit:I,onExited:k,onExiting:C,addEndListener:e=>{o&&o(b.current,e)},timeout:g},v,{children:(e,t)=>K.cloneElement(a,(0,E.A)({style:(0,E.A)({transform:"scale(0)",visibility:"exited"!==e||l?void 0:"hidden"},Us[e],m,a.props.style),ref:_},t))}))}),Hs=Vs;function Gs(e){return(0,Ye.Ay)("MuiSpeedDial",e)}const Ws=(0,Ze.A)("MuiSpeedDial",["root","fab","directionUp","directionDown","directionLeft","directionRight","actions","actionsClosed"]),qs=["ref"],Zs=["ariaLabel","FabProps","children","className","direction","hidden","icon","onBlur","onClose","onFocus","onKeyDown","onMouseEnter","onMouseLeave","onOpen","open","openIcon","TransitionComponent","transitionDuration","TransitionProps"],Ys=["ref"];function Xs(e){return"up"===e||"down"===e?"vertical":"right"===e||"left"===e?"horizontal":void 0}const Ks=(0,G.Ay)("div",{name:"MuiSpeedDial",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`direction${(0,ct.A)(r.direction)}`]]}})(({theme:e,ownerState:t})=>(0,E.A)({zIndex:(e.vars||e).zIndex.speedDial,display:"flex",alignItems:"center",pointerEvents:"none"},"up"===t.direction&&{flexDirection:"column-reverse",[`& .${Ws.actions}`]:{flexDirection:"column-reverse",marginBottom:-32,paddingBottom:48}},"down"===t.direction&&{flexDirection:"column",[`& .${Ws.actions}`]:{flexDirection:"column",marginTop:-32,paddingTop:48}},"left"===t.direction&&{flexDirection:"row-reverse",[`& .${Ws.actions}`]:{flexDirection:"row-reverse",marginRight:-32,paddingRight:48}},"right"===t.direction&&{flexDirection:"row",[`& .${Ws.actions}`]:{flexDirection:"row",marginLeft:-32,paddingLeft:48}})),Js=(0,G.Ay)(Mn,{name:"MuiSpeedDial",slot:"Fab",overridesResolver:(e,t)=>t.fab})(()=>({pointerEvents:"auto"})),Qs=(0,G.Ay)("div",{name:"MuiSpeedDial",slot:"Actions",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.actions,!r.open&&t.actionsClosed]}})(({ownerState:e})=>(0,E.A)({display:"flex",pointerEvents:"auto"},!e.open&&{transition:"top 0s linear 0.2s",pointerEvents:"none"})),el=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiSpeedDial"}),n=(0,V.A)(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{ariaLabel:i,FabProps:{ref:a}={},children:s,className:l,direction:c="up",hidden:u=!1,icon:d,onBlur:f,onClose:p,onFocus:h,onKeyDown:m,onMouseEnter:g,onMouseLeave:y,onOpen:v,open:b,TransitionComponent:_=Hs,transitionDuration:x=o,TransitionProps:w}=r,A=(0,T.A)(r.FabProps,qs),S=(0,T.A)(r,Zs),[C,I]=(0,as.A)({controlled:b,default:!1,name:"SpeedDial",state:"open"}),k=(0,E.A)({},r,{open:C,direction:c}),M=(e=>{const{classes:t,open:r,direction:n}=e,o={root:["root",`direction${(0,ct.A)(n)}`],fab:["fab"],actions:["actions",!r&&"actionsClosed"]};return(0,We.A)(o,Gs,t)})(k),R=(0,Fs.A)(),P=K.useRef(0),O=K.useRef(),D=K.useRef([]);D.current=[D.current[0]];const L=K.useCallback(e=>{D.current[0]=e},[]),N=(0,Fi.A)(a,L),F=(e,t)=>r=>{D.current[e+1]=r,t&&t(r)};K.useEffect(()=>{C||(P.current=0,O.current=void 0)},[C]);const z=e=>{"mouseleave"===e.type&&y&&y(e),"blur"===e.type&&f&&f(e),R.clear(),"blur"===e.type?R.start(0,()=>{I(!1),p&&p(e,"blur")}):(I(!1),p&&p(e,"mouseLeave"))},B=e=>{"mouseenter"===e.type&&g&&g(e),"focus"===e.type&&h&&h(e),R.clear(),C||R.start(0,()=>{I(!0),v&&v(e,{focus:"focus",mouseenter:"mouseEnter"}[e.type])})},j=i.replace(/^[^a-z]+|[^\w:.-]+/gi,""),$=K.Children.toArray(s).filter(e=>K.isValidElement(e)),U=$.map((e,t)=>{const r=e.props,{FabProps:{ref:n}={},tooltipPlacement:o}=r,i=(0,T.A)(r.FabProps,Ys),a=o||("vertical"===Xs(c)?"left":"top");return K.cloneElement(e,{FabProps:(0,E.A)({},i,{ref:F(t,n)}),delay:30*(C?t:$.length-t),open:C,tooltipPlacement:a,id:`${j}-action-${t}`})});return(0,te.jsxs)(Ks,(0,E.A)({className:(0,Ge.A)(M.root,l),ref:t,role:"presentation",onKeyDown:e=>{m&&m(e);const t=e.key.replace("Arrow","").toLowerCase(),{current:r=t}=O;if("Escape"===e.key)return I(!1),D.current[0].focus(),void(p&&p(e,"escapeKeyDown"));if(Xs(t)===Xs(r)&&void 0!==Xs(t)){e.preventDefault();const n=t===r?1:-1,o=(0,rs.A)(P.current+n,0,D.current.length-1);D.current[o].focus(),P.current=o,O.current=r}},onBlur:z,onFocus:B,onMouseEnter:B,onMouseLeave:z,ownerState:k},S,{children:[(0,te.jsx)(_,(0,E.A)({in:!u,timeout:x,unmountOnExit:!0},w,{children:(0,te.jsx)(Js,(0,E.A)({color:"primary","aria-label":i,"aria-haspopup":"true","aria-expanded":C,"aria-controls":`${j}-actions`},A,{onClick:e=>{A.onClick&&A.onClick(e),R.clear(),C?(I(!1),p&&p(e,"toggle")):(I(!0),v&&v(e,"toggle"))},className:(0,Ge.A)(M.fab,A.className),ref:N,ownerState:k,children:K.isValidElement(d)&&(0,ui.A)(d,["SpeedDialIcon"])?K.cloneElement(d,{open:C}):d}))})),(0,te.jsx)(Qs,{id:`${j}-actions`,role:"menu","aria-orientation":Xs(c),className:(0,Ge.A)(M.actions,!C&&M.actionsClosed),ownerState:k,children:U})]}))});var tl=r("vH+6");function rl(e){return(0,Ye.Ay)("MuiSpeedDialAction",e)}const nl=(0,Ze.A)("MuiSpeedDialAction",["fab","fabClosed","staticTooltip","staticTooltipClosed","staticTooltipLabel","tooltipPlacementLeft","tooltipPlacementRight"]),ol=["className","delay","FabProps","icon","id","open","TooltipClasses","tooltipOpen","tooltipPlacement","tooltipTitle"],il=(0,G.Ay)(Mn,{name:"MuiSpeedDialAction",slot:"Fab",skipVariantsResolver:!1,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.fab,!r.open&&t.fabClosed]}})(({theme:e,ownerState:t})=>(0,E.A)({margin:8,color:(e.vars||e).palette.text.secondary,backgroundColor:(e.vars||e).palette.background.paper,"&:hover":{backgroundColor:e.vars?e.vars.palette.SpeedDialAction.fabHoverBg:(0,ye.tL)(e.palette.background.paper,.15)},transition:`${e.transitions.create("transform",{duration:e.transitions.duration.shorter})}, opacity 0.8s`,opacity:1},!t.open&&{opacity:0,transform:"scale(0)"})),al=(0,G.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.staticTooltip,!r.open&&t.staticTooltipClosed,t[`tooltipPlacement${(0,ct.A)(r.tooltipPlacement)}`]]}})(({theme:e,ownerState:t})=>({position:"relative",display:"flex",alignItems:"center",[`& .${nl.staticTooltipLabel}`]:(0,E.A)({transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.shorter}),opacity:1},!t.open&&{opacity:0,transform:"scale(0.5)"},"left"===t.tooltipPlacement&&{transformOrigin:"100% 50%",right:"100%",marginRight:8},"right"===t.tooltipPlacement&&{transformOrigin:"0% 50%",left:"100%",marginLeft:8})})),sl=(0,G.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltipLabel",overridesResolver:(e,t)=>t.staticTooltipLabel})(({theme:e})=>(0,E.A)({position:"absolute"},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.paper,borderRadius:(e.vars||e).shape.borderRadius,boxShadow:(e.vars||e).shadows[1],color:(e.vars||e).palette.text.secondary,padding:"4px 16px",wordBreak:"keep-all"})),ll=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiSpeedDialAction"}),{className:n,delay:o=0,FabProps:i={},icon:a,id:s,open:l,TooltipClasses:c,tooltipOpen:u=!1,tooltipPlacement:d="left",tooltipTitle:f}=r,p=(0,T.A)(r,ol),h=(0,E.A)({},r,{tooltipPlacement:d}),m=(e=>{const{open:t,tooltipPlacement:r,classes:n}=e,o={fab:["fab",!t&&"fabClosed"],staticTooltip:["staticTooltip",`tooltipPlacement${(0,ct.A)(r)}`,!t&&"staticTooltipClosed"],staticTooltipLabel:["staticTooltipLabel"]};return(0,We.A)(o,rl,n)})(h),[g,y]=K.useState(u),v={transitionDelay:`${o}ms`},b=(0,te.jsx)(il,(0,E.A)({size:"small",className:(0,Ge.A)(m.fab,n),tabIndex:-1,role:"menuitem",ownerState:h},i,{style:(0,E.A)({},v,i.style),children:a}));return u?(0,te.jsxs)(al,(0,E.A)({id:s,ref:t,className:m.staticTooltip,ownerState:h},p,{children:[(0,te.jsx)(sl,{style:v,id:`${s}-label`,className:m.staticTooltipLabel,ownerState:h,children:f}),K.cloneElement(b,{"aria-labelledby":`${s}-label`})]})):(!l&&g&&y(!1),(0,te.jsx)(tl.A,(0,E.A)({id:s,ref:t,title:f,placement:d,onClose:()=>{y(!1)},onOpen:()=>{y(!0)},open:l&&g,classes:c},p,{children:b})))}),cl=(0,Ht.A)((0,te.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");function ul(e){return(0,Ye.Ay)("MuiSpeedDialIcon",e)}const dl=(0,Ze.A)("MuiSpeedDialIcon",["root","icon","iconOpen","iconWithOpenIconOpen","openIcon","openIconOpen"]),fl=["className","icon","open","openIcon"],pl=(0,G.Ay)("span",{name:"MuiSpeedDialIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${dl.icon}`]:t.icon},{[`& .${dl.icon}`]:r.open&&t.iconOpen},{[`& .${dl.icon}`]:r.open&&r.openIcon&&t.iconWithOpenIconOpen},{[`& .${dl.openIcon}`]:t.openIcon},{[`& .${dl.openIcon}`]:r.open&&t.openIconOpen},t.root]}})(({theme:e,ownerState:t})=>({height:24,[`& .${dl.icon}`]:(0,E.A)({transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.short})},t.open&&(0,E.A)({transform:"rotate(45deg)"},t.openIcon&&{opacity:0})),[`& .${dl.openIcon}`]:(0,E.A)({position:"absolute",transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.short}),opacity:0,transform:"rotate(-45deg)"},t.open&&{transform:"rotate(0deg)",opacity:1})})),hl=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiSpeedDialIcon"}),{className:n,icon:o,openIcon:i}=r,a=(0,T.A)(r,fl),s=r,l=(e=>{const{classes:t,open:r,openIcon:n}=e,o={root:["root"],icon:["icon",r&&"iconOpen",n&&r&&"iconWithOpenIconOpen"],openIcon:["openIcon",r&&"openIconOpen"]};return(0,We.A)(o,ul,t)})(s);function c(e,t){return K.isValidElement(e)?K.cloneElement(e,{className:t}):e}return(0,te.jsxs)(pl,(0,E.A)({className:(0,Ge.A)(l.root,n),ref:t,ownerState:s},a,{children:[i?c(i,l.openIcon):null,o?c(o,l.icon):(0,te.jsx)(cl,{className:l.icon})]}))});hl.muiName="SpeedDialIcon";const ml=hl;var gl=r("1eI8");const yl=(0,Ze.A)("MuiStack",["root"]);var vl=r("ovqk"),bl=r("LRQm"),_l=r("2qWJ"),xl=r("gk3T"),wl=r("pnHt");function Al(e){return(0,Ye.Ay)("MuiStepButton",e)}const Sl=(0,Ze.A)("MuiStepButton",["root","horizontal","vertical","touchRipple"]),Cl=["children","className","icon","optional"],El=(0,G.Ay)(Ot.A,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Sl.touchRipple}`]:t.touchRipple},t.root,t[r.orientation]]}})(({ownerState:e})=>(0,E.A)({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},"vertical"===e.orientation&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${Sl.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),Tl=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiStepButton"}),{children:n,className:o,icon:i,optional:a}=r,s=(0,T.A)(r,Cl),{disabled:l,active:c}=K.useContext(_l.A),{orientation:u}=K.useContext(wl.A),d=(0,E.A)({},r,{orientation:u}),f=(e=>{const{classes:t,orientation:r}=e,n={root:["root",r],touchRipple:["touchRipple"]};return(0,We.A)(n,Al,t)})(d),p={icon:i,optional:a},h=(0,ui.A)(n,["StepLabel"])?K.cloneElement(n,p):(0,te.jsx)(xl.A,(0,E.A)({},p,{children:n}));return(0,te.jsx)(El,(0,E.A)({focusRipple:!0,disabled:l,TouchRippleProps:{className:f.touchRipple},className:(0,Ge.A)(f.root,o),ref:t,ownerState:d,"aria-current":c?"step":void 0},s,{children:h}))});var Il=r("5lP7"),kl=r("LiX5");function Ml(e){return(0,Ye.Ay)("MuiStepContent",e)}const Rl=(0,Ze.A)("MuiStepContent",["root","last","transition"]),Pl=["children","className","TransitionComponent","transitionDuration","TransitionProps"],Ol=(0,G.Ay)("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.last&&t.last]}})(({ownerState:e,theme:t})=>(0,E.A)({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${"light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),Dl=(0,G.Ay)(rn.A,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Ll=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiStepContent"}),{children:n,className:o,TransitionComponent:i=rn.A,transitionDuration:a="auto",TransitionProps:s}=r,l=(0,T.A)(r,Pl),{orientation:c}=K.useContext(wl.A),{active:u,last:d,expanded:f}=K.useContext(_l.A),p=(0,E.A)({},r,{last:d}),h=(e=>{const{classes:t,last:r}=e,n={root:["root",r&&"last"],transition:["transition"]};return(0,We.A)(n,Ml,t)})(p);let m=a;return"auto"!==a||i.muiSupportAuto||(m=void 0),(0,te.jsx)(Ol,(0,E.A)({className:(0,Ge.A)(h.root,o),ref:t,ownerState:p},l,{children:(0,te.jsx)(Dl,(0,E.A)({as:i,in:u||f,className:h.transition,ownerState:p,timeout:m,unmountOnExit:!0},s,{children:n}))}))});var Nl=r("ZI/q"),Fl=r("vu6X"),zl=r("09Yx"),Bl=r("Y6tj"),jl=r("4UXW"),$l=r("Z6qJ"),Ul=r("t32p"),Vl=r("i8i4"),Hl=r("rdfb"),Gl=r("WFZb"),Wl=r("KXty");const ql=["anchor","classes","className","width","style"],Zl=(0,G.Ay)("div",{name:"MuiSwipeArea",shouldForwardProp:Tn.A})(({theme:e,ownerState:t})=>(0,E.A)({position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},"left"===t.anchor&&{right:"auto"},"right"===t.anchor&&{left:"auto",right:0},"top"===t.anchor&&{bottom:"auto",right:0},"bottom"===t.anchor&&{top:"auto",bottom:0,right:0})),Yl=K.forwardRef(function(e,t){const{anchor:r,classes:n={},className:o,width:i,style:a}=e,s=(0,T.A)(e,ql),l=e;return(0,te.jsx)(Zl,(0,E.A)({className:(0,Ge.A)("PrivateSwipeArea-root",n.root,n[`anchor${(0,ct.A)(r)}`],o),ref:t,style:(0,E.A)({[(0,An.$b)(r)?"width":"height"]:i},a),ownerState:l},s))}),Xl=Yl,Kl=["BackdropProps"],Jl=["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","allowSwipeInChildren","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"];let Ql=null;function ec(e,t,r){return"right"===e?r.body.offsetWidth-t[0].pageX:t[0].pageX}function tc(e,t,r){return"bottom"===e?r.innerHeight-t[0].clientY:t[0].clientY}function rc(e,t){return e?t.clientWidth:t.clientHeight}function nc(e,t,r,n){return Math.min(Math.max(r?t-e:n+t-e,0),n)}const oc="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),ic=K.forwardRef(function(e,t){const r=(0,qe.b)({name:"MuiSwipeableDrawer",props:e}),n=(0,V.A)(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{anchor:i="left",disableBackdropTransition:a=!1,disableDiscovery:s=!1,disableSwipeToOpen:l=oc,hideBackdrop:c,hysteresis:u=.52,allowSwipeInChildren:d=!1,minFlingVelocity:f=450,ModalProps:{BackdropProps:p}={},onClose:h,onOpen:m,open:g=!1,PaperProps:y={},SwipeAreaProps:v,swipeAreaWidth:b=20,transitionDuration:_=o,variant:x="temporary"}=r,w=(0,T.A)(r.ModalProps,Kl),A=(0,T.A)(r,Jl),[S,C]=K.useState(!1),I=K.useRef({isSwiping:null}),k=K.useRef(),M=K.useRef(),R=K.useRef(),P=(0,Fi.A)(y.ref,R),O=K.useRef(!1),D=K.useRef();(0,No.A)(()=>{D.current=null},[g]);const L=K.useCallback((e,t={})=>{const{mode:r=null,changeTransition:o=!0}=t,s=(0,An.iB)(n,i),l=-1!==["right","bottom"].indexOf(s)?1:-1,u=(0,An.$b)(i),d=u?`translate(${l*e}px, 0)`:`translate(0, ${l*e}px)`,f=R.current.style;f.webkitTransform=d,f.transform=d;let p="";if(r&&(p=n.transitions.create("all",(0,js.c)({easing:void 0,style:void 0,timeout:_},{mode:r}))),o&&(f.webkitTransition=p,f.transition=p),!a&&!c){const t=M.current.style;t.opacity=1-e/rc(u,R.current),o&&(t.webkitTransition=p,t.transition=p)}},[i,a,c,n,_]),N=(0,Wl.A)(e=>{if(!O.current)return;if(Ql=null,O.current=!1,Vl.flushSync(()=>{C(!1)}),!I.current.isSwiping)return void(I.current.isSwiping=null);I.current.isSwiping=null;const t=(0,An.iB)(n,i),r=(0,An.$b)(i);let o;o=r?ec(t,e.changedTouches,(0,Hl.A)(e.currentTarget)):tc(t,e.changedTouches,(0,Gl.A)(e.currentTarget));const a=r?I.current.startX:I.current.startY,s=rc(r,R.current),l=nc(o,a,g,s),c=l/s;Math.abs(I.current.velocity)>f&&(D.current=1e3*Math.abs((s-l)/I.current.velocity)),g?I.current.velocity>f||c>u?h():L(0,{mode:"exit"}):I.current.velocity<-f||1-c>u?m():L(rc(r,R.current),{mode:"enter"})}),F=(e=!1)=>{if(!S){!e&&s&&d||Vl.flushSync(()=>{C(!0)});const t=(0,An.$b)(i);!g&&R.current&&L(rc(t,R.current)+(s?15:-20),{changeTransition:!1}),I.current.velocity=0,I.current.lastTime=null,I.current.lastTranslate=null,I.current.paperHit=!1,O.current=!0}},z=(0,Wl.A)(e=>{if(!R.current||!O.current)return;if(null!==Ql&&Ql!==I.current)return;F(!0);const t=(0,An.iB)(n,i),r=(0,An.$b)(i),o=ec(t,e.touches,(0,Hl.A)(e.currentTarget)),a=tc(t,e.touches,(0,Gl.A)(e.currentTarget));if(g&&R.current.contains(e.target)&&null===Ql){const t=function(e,t){const r=[];for(;e&&e!==t.parentElement;){const n=(0,Gl.A)(t).getComputedStyle(e);"absolute"===n.getPropertyValue("position")||"hidden"===n.getPropertyValue("overflow-x")||(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&r.push(e),e=e.parentElement}return r}(e.target,R.current),n=function({domTreeShapes:e,start:t,current:r,anchor:n}){const o={x:"scrollLeft",y:"scrollTop"},i={x:"scrollWidth",y:"scrollHeight"},a={x:"clientWidth",y:"clientHeight"};return e.some(e=>{let s=r>=t;"top"!==n&&"left"!==n||(s=!s);const l="left"===n||"right"===n?"x":"y",c=Math.round(e[o[l]]),u=c>0,d=c+e[a[l]]n&&t>3:n>t&&n>3;if(i&&e.cancelable&&e.preventDefault(),!0===i||(r?n>3:t>3)){if(I.current.isSwiping=i,!i)return void N(e);I.current.startX=o,I.current.startY=a,s||g||(r?I.current.startX-=20:I.current.startY-=20)}}if(!I.current.isSwiping)return;const l=rc(r,R.current);let c=r?I.current.startX:I.current.startY;g&&!I.current.paperHit&&(c=Math.min(c,l));const u=nc(r?o:a,c,g,l);if(g)if(I.current.paperHit)0===u&&(I.current.startX=o,I.current.startY=a);else{if(!(r?o{if(e.defaultPrevented)return;if(e.defaultMuiPrevented)return;if(g&&(c||!M.current.contains(e.target))&&!R.current.contains(e.target))return;const t=(0,An.iB)(n,i),r=(0,An.$b)(i),o=ec(t,e.touches,(0,Hl.A)(e.currentTarget)),a=tc(t,e.touches,(0,Gl.A)(e.currentTarget));if(!g){var s;if(l||!(e.target===k.current||null!=(s=R.current)&&s.contains(e.target)&&("function"==typeof d?d(e,k.current,R.current):d)))return;if(r){if(o>b)return}else if(a>b)return}e.defaultMuiPrevented=!0,Ql=null,I.current.startX=o,I.current.startY=a,F()});return K.useEffect(()=>{if("temporary"===x){const e=(0,Hl.A)(R.current);return e.addEventListener("touchstart",B),e.addEventListener("touchmove",z,{passive:!g}),e.addEventListener("touchend",N),()=>{e.removeEventListener("touchstart",B),e.removeEventListener("touchmove",z,{passive:!g}),e.removeEventListener("touchend",N)}}},[x,g,B,z,N]),K.useEffect(()=>()=>{Ql===I.current&&(Ql=null)},[]),K.useEffect(()=>{g||C(!1)},[g]),(0,te.jsxs)(K.Fragment,{children:[(0,te.jsx)(An.Ay,(0,E.A)({open:!("temporary"!==x||!S)||g,variant:x,ModalProps:(0,E.A)({BackdropProps:(0,E.A)({},p,{ref:M})},"temporary"===x&&{keepMounted:!0},w),hideBackdrop:c,PaperProps:(0,E.A)({},y,{style:(0,E.A)({pointerEvents:"temporary"!==x||g||d?"":"none"},y.style),ref:P}),anchor:i,transitionDuration:D.current||_,onClose:h,ref:t},A)),!l&&"temporary"===x&&(0,te.jsx)(za,{children:(0,te.jsx)(Xl,(0,E.A)({anchor:i,ref:k,width:b},v))})]})}),ac=ic;var sc=r("YM+J"),lc=r("CIcg"),cc=r("lZ7h"),uc=r("/eUX"),dc=r("GOrD"),fc=r("qy7K"),pc=r("J1WE"),hc=r("bXaB"),mc=r("xqzF"),gc=r("WeeH"),yc=r("ZrSb"),vc=r("7Ep0"),bc=r("bpaH");function _c(e){return(0,Ye.Ay)("MuiTableFooter",e)}const xc=(0,Ze.A)("MuiTableFooter",["root"]),wc=["className","component"],Ac=(0,G.Ay)("tfoot",{name:"MuiTableFooter",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-footer-group"}),Sc={variant:"footer"},Cc="tfoot",Ec=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiTableFooter"}),{className:n,component:o=Cc}=r,i=(0,T.A)(r,wc),a=(0,E.A)({},r,{component:o}),s=(e=>{const{classes:t}=e;return(0,We.A)({root:["root"]},_c,t)})(a);return(0,te.jsx)(bc.A.Provider,{value:Sc,children:(0,te.jsx)(Ac,(0,E.A)({as:o,className:(0,Ge.A)(s.root,n),ref:t,role:o===Cc?null:"rowgroup",ownerState:a},i))})});var Tc=r("PjUp"),Ic=r("mzdN"),kc=r("iu7o"),Mc=r("hwAa"),Rc=r("VMHA"),Pc=r("criW");const Oc=(0,Ht.A)((0,te.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function Dc(e){return(0,Ye.Ay)("MuiTableSortLabel",e)}const Lc=(0,Ze.A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc"]),Nc=["active","children","className","direction","hideSortIcon","IconComponent"],Fc=(0,G.Ay)(Ot.A,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.active&&t.active]}})(({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${Lc.icon}`]:{opacity:.5}},[`&.${Lc.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${Lc.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}})),zc=(0,G.Ay)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,t[`iconDirection${(0,ct.A)(r.direction)}`]]}})(({theme:e,ownerState:t})=>(0,E.A)({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},"desc"===t.direction&&{transform:"rotate(0deg)"},"asc"===t.direction&&{transform:"rotate(180deg)"})),Bc=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiTableSortLabel"}),{active:n=!1,children:o,className:i,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=Oc}=r,c=(0,T.A)(r,Nc),u=(0,E.A)({},r,{active:n,direction:a,hideSortIcon:s,IconComponent:l}),d=(e=>{const{classes:t,direction:r,active:n}=e,o={root:["root",n&&"active"],icon:["icon",`iconDirection${(0,ct.A)(r)}`]};return(0,We.A)(o,Dc,t)})(u);return(0,te.jsxs)(Fc,(0,E.A)({className:(0,Ge.A)(d.root,i),component:"span",disableRipple:!0,ownerState:u,ref:t},c,{children:[o,s&&!n?null:(0,te.jsx)(zc,{as:l,className:(0,Ge.A)(d.icon),ownerState:u})]}))});var jc=r("HAvo"),$c=r("D+4I"),Uc=r("+asq"),Vc=r("EMKz"),Hc=r("MGIy"),Gc=r("ndLI"),Wc=r("ICY4"),qc=r("d70t");function Zc(e){return(0,Ye.Ay)("MuiToggleButton",e)}const Yc=(0,Ze.A)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Xc=K.createContext({}),Kc=K.createContext(void 0);function Jc(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}const Qc=["value"],eu=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],tu=(0,G.Ay)(Ot.A,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`size${(0,ct.A)(r.size)}`]]}})(({theme:e,ownerState:t})=>{let r,n="standard"===t.color?e.palette.text.primary:e.palette[t.color].main;return e.vars&&(n="standard"===t.color?e.vars.palette.text.primary:e.vars.palette[t.color].main,r="standard"===t.color?e.vars.palette.text.primaryChannel:e.vars.palette[t.color].mainChannel),(0,E.A)({},e.typography.button,{borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active},t.fullWidth&&{width:"100%"},{[`&.${Yc.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,O.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Yc.selected}`]:{color:n,backgroundColor:e.vars?`rgba(${r} / ${e.vars.palette.action.selectedOpacity})`:(0,O.X4)(n,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${r} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,O.X4)(n,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${r} / ${e.vars.palette.action.selectedOpacity})`:(0,O.X4)(n,e.palette.action.selectedOpacity)}}}},"small"===t.size&&{padding:7,fontSize:e.typography.pxToRem(13)},"large"===t.size&&{padding:15,fontSize:e.typography.pxToRem(15)})}),ru=K.forwardRef(function(e,t){const r=K.useContext(Xc),{value:n}=r,o=(0,T.A)(r,Qc),i=K.useContext(Kc),a=(0,qc.A)((0,E.A)({},o,{selected:Jc(e.value,n)}),e),s=(0,qe.b)({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:d=!1,disableFocusRipple:f=!1,fullWidth:p=!1,onChange:h,onClick:m,selected:g,size:y="medium",value:v}=s,b=(0,T.A)(s,eu),_=(0,E.A)({},s,{color:u,disabled:d,disableFocusRipple:f,fullWidth:p,size:y}),x=(e=>{const{classes:t,fullWidth:r,selected:n,disabled:o,size:i,color:a}=e,s={root:["root",n&&"selected",o&&"disabled",r&&"fullWidth",`size${(0,ct.A)(i)}`,a]};return(0,We.A)(s,Zc,t)})(_),w=i||"";return(0,te.jsx)(tu,(0,E.A)({className:(0,Ge.A)(o.className,x.root,c,w),disabled:d,focusRipple:!f,ref:t,onClick:e=>{m&&(m(e,v),e.defaultPrevented)||h&&h(e,v)},onChange:h,value:v,ownerState:_,"aria-pressed":g},b,{children:l}))});var nu=r("X+zv");function ou(e){return(0,Ye.Ay)("MuiToggleButtonGroup",e)}const iu=(0,Ze.A)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),au=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],su=(0,G.Ay)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${iu.grouped}`]:t.grouped},{[`& .${iu.grouped}`]:t[`grouped${(0,ct.A)(r.orientation)}`]},{[`& .${iu.firstButton}`]:t.firstButton},{[`& .${iu.lastButton}`]:t.lastButton},{[`& .${iu.middleButton}`]:t.middleButton},t.root,"vertical"===r.orientation&&t.vertical,r.fullWidth&&t.fullWidth]}})(({ownerState:e,theme:t})=>(0,E.A)({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},"vertical"===e.orientation&&{flexDirection:"column"},e.fullWidth&&{width:"100%"},{[`& .${iu.grouped}`]:(0,E.A)({},"horizontal"===e.orientation?{[`&.${iu.selected} + .${iu.grouped}.${iu.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${iu.selected} + .${iu.grouped}.${iu.selected}`]:{borderTop:0,marginTop:0}})},"horizontal"===e.orientation?{[`& .${iu.firstButton},& .${iu.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${iu.lastButton},& .${iu.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${iu.firstButton},& .${iu.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${iu.lastButton},& .${iu.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},"horizontal"===e.orientation?{[`& .${iu.lastButton}.${Yc.disabled},& .${iu.middleButton}.${Yc.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${iu.lastButton}.${Yc.disabled},& .${iu.middleButton}.${Yc.disabled}`]:{borderTop:"1px solid transparent"}})),lu=K.forwardRef(function(e,t){const r=(0,qe.b)({props:e,name:"MuiToggleButtonGroup"}),{children:n,className:o,color:i="standard",disabled:a=!1,exclusive:s=!1,fullWidth:l=!1,onChange:c,orientation:u="horizontal",size:d="medium",value:f}=r,p=(0,T.A)(r,au),h=(0,E.A)({},r,{disabled:a,fullWidth:l,orientation:u,size:d}),m=(e=>{const{classes:t,orientation:r,fullWidth:n,disabled:o}=e,i={root:["root","vertical"===r&&"vertical",n&&"fullWidth"],grouped:["grouped",`grouped${(0,ct.A)(r)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,We.A)(i,ou,t)})(h),g=K.useCallback((e,t)=>{if(!c)return;const r=f&&f.indexOf(t);let n;f&&r>=0?(n=f.slice(),n.splice(r,1)):n=f?f.concat(t):[t],c(e,n)},[c,f]),y=K.useCallback((e,t)=>{c&&c(e,f===t?null:t)},[c,f]),v=K.useMemo(()=>({className:m.grouped,onChange:s?y:g,value:f,size:d,fullWidth:l,color:i,disabled:a}),[m.grouped,s,y,g,f,d,l,i,a]),b=(0,nu.A)(n),_=b.length,x=e=>{const t=0===e,r=e===_-1;return t&&r?"":t?m.firstButton:r?m.lastButton:m.middleButton};return(0,te.jsx)(su,(0,E.A)({role:"group",className:(0,Ge.A)(m.root,o),ref:t,ownerState:h},p,{children:(0,te.jsx)(Xc.Provider,{value:v,children:b.map((e,t)=>(0,te.jsx)(Kc.Provider,{value:x(t),children:e},t))})}))});var cu=r("QOiN"),uu=r("ZgSS"),du=r("mJ7p"),fu=r("zNd+"),pu=r("SxDb");const hu=["getTrigger","target"];function mu(e,t){const{disableHysteresis:r=!1,threshold:n=100,target:o}=t,i=e.current;return o&&(e.current=void 0!==o.pageYOffset?o.pageYOffset:o.scrollTop),!(!r&&void 0!==i&&e.currentn}const gu="undefined"!=typeof window?window:null;function yu(e={}){const{getTrigger:t=mu,target:r=gu}=e,n=(0,T.A)(e,hu),o=K.useRef(),[i,a]=K.useState(()=>t(o,n));return K.useEffect(()=>{const e=()=>{a(t(o,(0,E.A)({target:r},n)))};return e(),r.addEventListener("scroll",e,{passive:!0}),()=>{r.removeEventListener("scroll",e,{passive:!0})}},[r,t,JSON.stringify(n)]),i}var vu=r("n6jG"),bu=r("qSC9");const _u="5.18.0",xu=Number("5"),wu=Number("18"),Au=Number("0"),Su=null,Cu=Number(void 0)||null},J1Ai(e,t,r){"use strict";r.d(t,{A:()=>x});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("xeev"),c=r("Vn7y"),u=r("XM18"),d=r("1vOf"),f=r("7EOP"),p=r("+8pU"),h=r("PYeY"),m=r("TkYO");function g(e){return(0,m.Ay)("PrivateSwitchBase",e)}(0,h.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var y=r("nKUr");const v=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],b=(0,c.Ay)(p.A,{name:"MuiSwitchBase"})(({ownerState:e})=>(0,o.A)({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12})),_=(0,c.Ay)("input",{name:"MuiSwitchBase",shouldForwardProp:u.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),x=i.forwardRef(function(e,t){const{autoFocus:r,checked:i,checkedIcon:c,className:u,defaultChecked:p,disabled:h,disableFocusRipple:m=!1,edge:x=!1,icon:w,id:A,inputProps:S,inputRef:C,name:E,onBlur:T,onChange:I,onFocus:k,readOnly:M,required:R=!1,tabIndex:P,type:O,value:D}=e,L=(0,n.A)(e,v),[N,F]=(0,d.A)({controlled:i,default:Boolean(p),name:"SwitchBase",state:"checked"}),z=(0,f.A)();let B=h;z&&void 0===B&&(B=z.disabled);const j="checkbox"===O||"radio"===O,$=(0,o.A)({},e,{checked:N,disabled:B,disableFocusRipple:m,edge:x}),U=(e=>{const{classes:t,checked:r,disabled:n,edge:o}=e,i={root:["root",r&&"checked",n&&"disabled",o&&`edge${(0,l.A)(o)}`],input:["input"]};return(0,s.A)(i,g,t)})($);return(0,y.jsxs)(b,(0,o.A)({component:"span",className:(0,a.A)(U.root,u),centerRipple:!0,focusRipple:!m,disabled:B,tabIndex:null,role:void 0,onFocus:e=>{k&&k(e),z&&z.onFocus&&z.onFocus(e)},onBlur:e=>{T&&T(e),z&&z.onBlur&&z.onBlur(e)},ownerState:$,ref:t},L,{children:[(0,y.jsx)(_,(0,o.A)({autoFocus:r,checked:i,defaultChecked:p,className:U.input,disabled:B,id:j?A:void 0,name:E,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;F(t),I&&I(e,t)},readOnly:M,ref:C,required:R,ownerState:$,tabIndex:P,type:O},"checkbox"===O&&void 0===D?{}:{value:D},S)),N?c:w]}))})},smxg(e,t,r){"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},"2i9d"(e,t,r){"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},"Be/P"(e,t,r){"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage")},Z21g(e,t,r){"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},"5+C/"(e,t,r){"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")},"/0Dp"(e,t,r){"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage")},b4iY(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r("+9dH"),o=r("Nlia"),i=(r("q1tI"),r("wVnu")),a=r("WTO6"),s=r("nKUr");const l=["theme"];function c(e){let{theme:t}=e,r=(0,o.A)(e,l);const c=t[a.A];let u=c||t;return"function"!=typeof t&&(c&&!c.vars?u=(0,n.A)({},c,{vars:null}):t&&!t.vars&&(u=(0,n.A)({},t,{vars:null}))),(0,s.jsx)(i.A,(0,n.A)({},r,{themeId:c?a.A:void 0,theme:u}))}},"4lmL"(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("+9dH");function o(e,t){return(0,n.A)({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}},BlEZ(e,t,r){"use strict";r.d(t,{D:()=>R,A:()=>P});var n=r("+9dH"),o=r("Nlia"),i=r("KRkT"),a=r("w9Qe"),s=r("9k3N"),l=r("xTOY"),c=r("Tazo"),u=r("4lmL"),d=r("dcYk"),f=r("H00D"),p=r("Xxcx"),h=r("iIhR"),m=r("0XHX"),g=r("A1Zn"),y=r("UG0H"),v=r("8jZn"),b=r("at7f");const _=["mode","contrastThreshold","tonalOffset"],x={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:f.A.white,default:f.A.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:f.A.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:f.A.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function A(e,t,r,n){const o=n.light||n,i=n.dark||1.5*n;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=(0,d.a)(e.main,o):"dark"===t&&(e.dark=(0,d.e$)(e.main,i)))}var S=r("MHkX");function C(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const E=["none",C(0,2,1,-1,0,1,1,0,0,1,3,0),C(0,3,1,-2,0,2,2,0,0,1,5,0),C(0,3,3,-2,0,3,4,0,0,1,8,0),C(0,2,4,-1,0,4,5,0,0,1,10,0),C(0,3,5,-1,0,5,8,0,0,1,14,0),C(0,3,5,-1,0,6,10,0,0,1,18,0),C(0,4,5,-2,0,7,10,1,0,2,16,1),C(0,5,5,-3,0,8,10,1,0,3,14,2),C(0,5,6,-3,0,9,12,1,0,3,16,2),C(0,6,6,-3,0,10,14,1,0,4,18,3),C(0,6,7,-4,0,11,15,1,0,4,20,3),C(0,7,8,-4,0,12,17,2,0,5,22,4),C(0,7,8,-4,0,13,19,2,0,5,24,4),C(0,7,9,-4,0,14,21,2,0,5,26,4),C(0,8,9,-5,0,15,22,2,0,6,28,5),C(0,8,10,-5,0,16,24,2,0,6,30,5),C(0,8,11,-5,0,17,26,2,0,6,32,5),C(0,9,11,-5,0,18,28,2,0,7,34,6),C(0,9,12,-6,0,19,29,2,0,7,36,6),C(0,10,13,-6,0,20,31,3,0,8,38,7),C(0,10,13,-6,0,21,33,3,0,8,40,7),C(0,10,14,-6,0,22,35,3,0,8,42,7),C(0,11,14,-7,0,23,36,3,0,9,44,8),C(0,11,15,-7,0,24,38,3,0,9,46,8)];var T=r("hqVE");const I={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},k=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function M(e={},...t){const{mixins:r={},palette:C={},transitions:M={},typography:R={}}=e,P=(0,o.A)(e,k);if(e.vars&&void 0===e.generateCssVars)throw new Error((0,i.A)(18));const O=function(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:s=.2}=e,l=(0,o.A)(e,_),c=e.primary||function(e="light"){return"dark"===e?{main:y.A[200],light:y.A[50],dark:y.A[400]}:{main:y.A[700],light:y.A[400],dark:y.A[800]}}(t),u=e.secondary||function(e="light"){return"dark"===e?{main:h.A[200],light:h.A[50],dark:h.A[400]}:{main:h.A[500],light:h.A[300],dark:h.A[700]}}(t),S=e.error||function(e="light"){return"dark"===e?{main:m.A[500],light:m.A[300],dark:m.A[700]}:{main:m.A[700],light:m.A[400],dark:m.A[800]}}(t),C=e.info||function(e="light"){return"dark"===e?{main:v.A[400],light:v.A[300],dark:v.A[700]}:{main:v.A[700],light:v.A[500],dark:v.A[900]}}(t),E=e.success||function(e="light"){return"dark"===e?{main:b.A[400],light:b.A[300],dark:b.A[700]}:{main:b.A[800],light:b.A[500],dark:b.A[900]}}(t),T=e.warning||function(e="light"){return"dark"===e?{main:g.A[400],light:g.A[300],dark:g.A[700]}:{main:"#ed6c02",light:g.A[500],dark:g.A[900]}}(t);function I(e){return(0,d.eM)(e,w.text.primary)>=r?w.text.primary:x.text.primary}const k=({color:e,name:t,mainShade:r=500,lightShade:o=300,darkShade:a=700})=>{if(!(e=(0,n.A)({},e)).main&&e[r]&&(e.main=e[r]),!e.hasOwnProperty("main"))throw new Error((0,i.A)(11,t?` (${t})`:"",r));if("string"!=typeof e.main)throw new Error((0,i.A)(12,t?` (${t})`:"",JSON.stringify(e.main)));return A(e,"light",o,s),A(e,"dark",a,s),e.contrastText||(e.contrastText=I(e.main)),e},M={dark:w,light:x};return(0,a.A)((0,n.A)({common:(0,n.A)({},f.A),mode:t,primary:k({color:c,name:"primary"}),secondary:k({color:u,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:k({color:S,name:"error"}),warning:k({color:T,name:"warning"}),info:k({color:C,name:"info"}),success:k({color:E,name:"success"}),grey:p.A,contrastThreshold:r,getContrastText:I,augmentColor:k,tonalOffset:s},M[t]),l)}(C),D=(0,c.A)(e);let L=(0,a.A)(D,{mixins:(0,u.A)(D.breakpoints,r),palette:O,shadows:E.slice(),typography:(0,S.A)(O,R),transitions:(0,T.Ay)(M),zIndex:(0,n.A)({},I)});return L=(0,a.A)(L,P),L=t.reduce((e,t)=>(0,a.A)(e,t),L),L.unstable_sxConfig=(0,n.A)({},s.A,null==P?void 0:P.unstable_sxConfig),L.unstable_sx=function(e){return(0,l.A)({sx:e,theme:this})},L}function R(...e){return M(...e)}const P=M},hqVE(e,t,r){"use strict";r.d(t,{Ay:()=>u,cz:()=>a,p0:()=>s});var n=r("Nlia"),o=r("+9dH");const i=["duration","easing","delay"],a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return`${Math.round(e)}ms`}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function u(e){const t=(0,o.A)({},a,e.easing),r=(0,o.A)({},s,e.duration);return(0,o.A)({getAutoHeightDuration:c,create:(e=["all"],o={})=>{const{duration:a=r.standard,easing:s=t.easeInOut,delay:c=0}=o;return(0,n.A)(o,i),(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof a?a:l(a)} ${s} ${"string"==typeof c?c:l(c)}`).join(",")}},e,{easing:t,duration:r})}},MHkX(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r("+9dH"),o=r("Nlia"),i=r("w9Qe");const a=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"],s={textTransform:"uppercase"},l='"Roboto", "Helvetica", "Arial", sans-serif';function c(e,t){const r="function"==typeof t?t(e):t,{fontFamily:c=l,fontSize:u=14,fontWeightLight:d=300,fontWeightRegular:f=400,fontWeightMedium:p=500,fontWeightBold:h=700,htmlFontSize:m=16,allVariants:g,pxToRem:y}=r,v=(0,o.A)(r,a),b=u/14,_=y||(e=>e/m*b+"rem"),x=(e,t,r,o,i)=>{return(0,n.A)({fontFamily:c,fontWeight:e,fontSize:_(t),lineHeight:r},c===l?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5+"em")}:{},i,g);var a},w={h1:x(d,96,1.167,-1.5),h2:x(d,60,1.2,-.5),h3:x(f,48,1.167,0),h4:x(f,34,1.235,.25),h5:x(f,24,1.334,0),h6:x(p,20,1.6,.15),subtitle1:x(f,16,1.75,.15),subtitle2:x(p,14,1.57,.1),body1:x(f,16,1.5,.15),body2:x(f,14,1.43,.15),button:x(p,14,1.75,.4,s),caption:x(f,12,1.66,.4),overline:x(f,12,2.66,1,s),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,i.A)((0,n.A)({htmlFontSize:m,pxToRem:_,fontFamily:c,fontSize:u,fontWeightLight:d,fontWeightRegular:f,fontWeightMedium:p,fontWeightBold:h},w),v,{clone:!1})}},qn7V(e,t,r){"use strict";function n(e){return String(parseFloat(e)).length===String(e).length}function o(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function i(e){return parseFloat(e)}function a(e){return(t,r)=>{const n=o(t);if(n===r)return t;let a=i(t);"px"!==n&&("em"===n||"rem"===n)&&(a=i(t)*i(e));let s=a;if("px"!==r)if("em"===r)s=a/i(e);else{if("rem"!==r)return t;s=a/i(e)}return parseFloat(s.toFixed(5))+r}}function s({size:e,grid:t}){const r=e-e%t,n=r+t;return e-r{let o=t+s*r;null!==i&&(o=i(o)),a[`@media (min-width:${r}px)`]={[e]:`${Math.round(1e4*o)/1e4}${n}`}}),a}r.d(t,{I3:()=>a,VR:()=>s,a9:()=>n,db:()=>i,l_:()=>o,qW:()=>l,yL:()=>c})},j5nT(e,t,r){"use strict";r.d(t,{A:()=>n});const n=(0,r("BlEZ").A)()},UwZ0(e,t,r){"use strict";r.d(t,{A:()=>n});const n=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)}},WTO6(e,t,r){"use strict";r.d(t,{A:()=>n});const n="$$material"},ThEv(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r("+9dH"),o=r("KRkT"),i=r("qn7V");function a(e,t={}){const{breakpoints:r=["sm","md","lg"],disableAlign:a=!1,factor:s=2,variants:l=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]}=t,c=(0,n.A)({},e);c.typography=(0,n.A)({},c.typography);const u=c.typography,d=(0,i.I3)(u.htmlFontSize),f=r.map(e=>c.breakpoints.values[e]);return l.forEach(e=>{const t=u[e];if(!t)return;const r=parseFloat(d(t.fontSize,"rem"));if(r<=1)return;const l=r,c=1+(l-1)/s;let{lineHeight:p}=t;if(!(0,i.a9)(p)&&!a)throw new Error((0,o.A)(6));(0,i.a9)(p)||(p=parseFloat(d(p,"rem"))/parseFloat(r));let h=null;a||(h=e=>(0,i.VR)({size:e,grid:(0,i.qW)({pixels:4,lineHeight:p,htmlFontSize:u.htmlFontSize})})),u[e]=(0,n.A)({},t,(0,i.yL)({cssProperty:"fontSize",min:c,max:l,unit:"rem",breakpoints:f,transform:h}))}),c}},XM18(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("FO2v");const o=e=>(0,n.A)(e)&&"classes"!==e},FO2v(e,t,r){"use strict";r.d(t,{A:()=>n});const n=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},Vn7y(e,t,r){"use strict";r.d(t,{Ay:()=>s});var n=r("c1mR"),o=r("j5nT"),i=r("WTO6"),a=r("XM18");const s=(0,n.Ay)({themeId:i.A,defaultTheme:o.A,rootShouldForwardProp:a.A})},UnQg(e,t,r){"use strict";r.d(t,{A:()=>a}),r("q1tI");var n=r("aoPf"),o=r("j5nT"),i=r("WTO6");function a(){const e=(0,n.A)(o.A);return e[i.A]||e}},tCRK(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r("sdrl"),o=r("j5nT"),i=r("WTO6");function a({props:e,name:t}){return(0,n.A)({props:e,name:t,defaultTheme:o.A,themeId:i.A})}},AiGX(e,t,r){"use strict";r.d(t,{c:()=>o,q:()=>n});const n=e=>e.scrollTop;function o(e,t){var r,n;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(r=a.transitionDuration)?r:"number"==typeof o?o:o[t.mode]||0,easing:null!=(n=a.transitionTimingFunction)?n:"object"==typeof i?i[t.mode]:i,delay:a.transitionDelay}}},RI6h(e,t,r){"use strict";r.d(t,{A:()=>g,Z:()=>d});var n=r("+9dH"),o=r("q1tI"),i=r("A3c4"),a=r("leBO"),s=r("VGa/"),l=r("nXnS"),c=r("1YXj");function u(e){return void 0!==e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function d(e={}){const{ignoreAccents:t=!0,ignoreCase:r=!0,limit:n,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let c=a?s.trim():s;r&&(c=c.toLowerCase()),t&&(c=u(c));const d=c?e.filter(e=>{let n=(i||l)(e);return r&&(n=n.toLowerCase()),t&&(n=u(n)),"start"===o?0===n.indexOf(c):n.indexOf(c)>-1}):e;return"number"==typeof n?d.slice(0,n):d}}function f(e,t){for(let r=0;r{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))},m=[],g=function(e){const{unstable_isActiveElementInListbox:t=h,unstable_classNamePrefix:r="Mui",autoComplete:u=!1,autoHighlight:d=!1,autoSelect:g=!1,blurOnSelect:y=!1,clearOnBlur:v=!e.freeSolo,clearOnEscape:b=!1,componentName:_="useAutocomplete",defaultValue:x=(e.multiple?m:null),disableClearable:w=!1,disableCloseOnSelect:A=!1,disabled:S,disabledItemsFocusable:C=!1,disableListWrap:E=!1,filterOptions:T=p,filterSelectedOptions:I=!1,freeSolo:k=!1,getOptionDisabled:M,getOptionKey:R,getOptionLabel:P=e=>{var t;return null!=(t=e.label)?t:e},groupBy:O,handleHomeEndKeys:D=!e.freeSolo,id:L,includeInputInList:N=!1,inputValue:F,isOptionEqualToValue:z=(e,t)=>e===t,multiple:B=!1,onChange:j,onClose:$,onHighlightChange:U,onInputChange:V,onOpen:H,open:G,openOnFocus:W=!1,options:q,readOnly:Z=!1,selectOnFocus:Y=!e.freeSolo,value:X}=e,K=(0,i.A)(L);let J=P;J=e=>{const t=P(e);return"string"!=typeof t?String(t):t};const Q=o.useRef(!1),ee=o.useRef(!0),te=o.useRef(null),re=o.useRef(null),[ne,oe]=o.useState(null),[ie,ae]=o.useState(-1),se=d?0:-1,le=o.useRef(se),[ce,ue]=(0,a.A)({controlled:X,default:x,name:_}),[de,fe]=(0,a.A)({controlled:F,default:"",name:_,state:"inputValue"}),[pe,he]=o.useState(!1),me=o.useCallback((e,t)=>{if(!(B?ce.length!I||!(B?ce:[ce]).some(t=>null!==t&&z(e,t))),{inputValue:_e&&ve?"":de,getOptionLabel:J}):[],Ae=(0,s.A)({filteredOptions:we,value:ce,inputValue:de});o.useEffect(()=>{const e=ce!==Ae.value;pe&&!e||k&&!e||me(null,ce)},[ce,me,pe,Ae.value,k]);const Se=ge&&we.length>0&&!Z,Ce=(0,l.A)(e=>{-1===e?te.current.focus():ne.querySelector(`[data-tag-index="${e}"]`).focus()});o.useEffect(()=>{B&&ie>ce.length-1&&(ae(-1),Ce(-1))},[ce,B,ie,Ce]);const Ee=(0,l.A)(({event:e,index:t,reason:n="auto"})=>{if(le.current=t,-1===t?te.current.removeAttribute("aria-activedescendant"):te.current.setAttribute("aria-activedescendant",`${K}-option-${t}`),U&&U(e,-1===t?null:we[t],n),!re.current)return;const o=re.current.querySelector(`[role="option"].${r}-focused`);o&&(o.classList.remove(`${r}-focused`),o.classList.remove(`${r}-focusVisible`));let i=re.current;if("listbox"!==re.current.getAttribute("role")&&(i=re.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===t)return void(i.scrollTop=0);const a=re.current.querySelector(`[data-option-index="${t}"]`);if(a&&(a.classList.add(`${r}-focused`),"keyboard"===n&&a.classList.add(`${r}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==n&&"touch"!==n)){const e=a,t=i.clientHeight+i.scrollTop,r=e.offsetTop+e.offsetHeight;r>t?i.scrollTop=r-i.clientHeight:e.offsetTop-e.offsetHeight*(O?1.3:0){if(!xe)return;const o=function(e,t){if(!re.current||e<0||e>=we.length)return-1;let r=e;for(;;){const n=re.current.querySelector(`[data-option-index="${r}"]`),o=!C&&(!n||n.disabled||"true"===n.getAttribute("aria-disabled"));if(n&&n.hasAttribute("tabindex")&&!o)return r;if(r="next"===t?(r+1)%we.length:(r-1+we.length)%we.length,r===e)return-1}}((()=>{const e=we.length-1;if("reset"===t)return se;if("start"===t)return 0;if("end"===t)return e;const r=le.current+t;return r<0?-1===r&&N?-1:E&&-1!==le.current||Math.abs(t)>1?0:e:r>e?r===e+1&&N?-1:E||Math.abs(t)>1?e:0:r})(),r);if(Ee({index:o,reason:n,event:e}),u&&"reset"!==t)if(-1===o)te.current.value=de;else{const e=J(we[o]);te.current.value=e,0===e.toLowerCase().indexOf(de.toLowerCase())&&de.length>0&&te.current.setSelectionRange(de.length,e.length)}}),Ie=o.useCallback(()=>{if(!xe)return;const e=(()=>{if(-1!==le.current&&Ae.filteredOptions&&Ae.filteredOptions.length!==we.length&&Ae.inputValue===de&&(B?ce.length===Ae.value.length&&Ae.value.every((e,t)=>J(ce[t])===J(e)):(e=Ae.value,t=ce,(e?J(e):"")===(t?J(t):"")))){const e=Ae.filteredOptions[le.current];if(e)return f(we,t=>J(t)===J(e))}var e,t;return-1})();if(-1!==e)return void(le.current=e);const t=B?ce[0]:ce;if(0!==we.length&&null!=t){if(re.current){if(null!=t){const e=we[le.current];if(B&&e&&-1!==f(ce,t=>z(e,t)))return;const r=f(we,e=>z(e,t));return void(-1===r?Te({diff:"reset"}):Ee({index:r}))}le.current>=we.length-1?Ee({index:we.length-1}):Ee({index:le.current})}}else Te({diff:"reset"})},[we.length,!B&&ce,I,Te,Ee,xe,de,B]),ke=(0,l.A)(e=>{(0,c.A)(re,e),e&&Ie()});o.useEffect(()=>{Ie()},[Ie]);const Me=e=>{ge||(ye(!0),be(!0),H&&H(e))},Re=(e,t)=>{ge&&(ye(!1),$&&$(e,t))},Pe=(e,t,r,n)=>{if(B){if(ce.length===t.length&&ce.every((e,r)=>e===t[r]))return}else if(ce===t)return;j&&j(e,t,r,n),ue(t)},Oe=o.useRef(!1),De=(e,t,r="selectOption",n="options")=>{let o=r,i=t;if(B){i=Array.isArray(ce)?ce.slice():[];const e=f(i,e=>z(t,e));-1===e?i.push(t):"freeSolo"!==n&&(i.splice(e,1),o="removeOption")}me(e,i),Pe(e,i,o,{option:t}),A||e&&(e.ctrlKey||e.metaKey)||Re(e,o),(!0===y||"touch"===y&&Oe.current||"mouse"===y&&!Oe.current)&&te.current.blur()},Le=(e,t)=>{if(!B)return;""===de&&Re(e,"toggleInput");let r=ie;-1===ie?""===de&&"previous"===t&&(r=ce.length-1):(r+="next"===t?1:-1,r<0&&(r=0),r===ce.length&&(r=-1)),r=function(e,t){if(-1===e)return-1;let r=e;for(;;){if("next"===t&&r===ce.length||"previous"===t&&-1===r)return-1;const e=ne.querySelector(`[data-tag-index="${r}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return r;r+="next"===t?1:-1}}(r,t),ae(r),Ce(r)},Ne=e=>{Q.current=!0,fe(""),V&&V(e,"","clear"),Pe(e,B?[]:null,"clear")},Fe=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==ie&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(ae(-1),Ce(-1)),229!==t.which))switch(t.key){case"Home":xe&&D&&(t.preventDefault(),Te({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":xe&&D&&(t.preventDefault(),Te({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Te({diff:-5,direction:"previous",reason:"keyboard",event:t}),Me(t);break;case"PageDown":t.preventDefault(),Te({diff:5,direction:"next",reason:"keyboard",event:t}),Me(t);break;case"ArrowDown":t.preventDefault(),Te({diff:1,direction:"next",reason:"keyboard",event:t}),Me(t);break;case"ArrowUp":t.preventDefault(),Te({diff:-1,direction:"previous",reason:"keyboard",event:t}),Me(t);break;case"ArrowLeft":Le(t,"previous");break;case"ArrowRight":Le(t,"next");break;case"Enter":if(-1!==le.current&&xe){const e=we[le.current],r=!!M&&M(e);if(t.preventDefault(),r)return;De(t,e,"selectOption"),u&&te.current.setSelectionRange(te.current.value.length,te.current.value.length)}else k&&""!==de&&!1===_e&&(B&&t.preventDefault(),De(t,de,"createOption","freeSolo"));break;case"Escape":xe?(t.preventDefault(),t.stopPropagation(),Re(t,"escape")):b&&(""!==de||B&&ce.length>0)&&(t.preventDefault(),t.stopPropagation(),Ne(t));break;case"Backspace":if(B&&!Z&&""===de&&ce.length>0){const e=-1===ie?ce.length-1:ie,r=ce.slice();r.splice(e,1),Pe(t,r,"removeOption",{option:ce[e]})}break;case"Delete":if(B&&!Z&&""===de&&ce.length>0&&-1!==ie){const e=ie,r=ce.slice();r.splice(e,1),Pe(t,r,"removeOption",{option:ce[e]})}}},ze=e=>{he(!0),W&&!Q.current&&Me(e)},Be=e=>{t(re)?te.current.focus():(he(!1),ee.current=!0,Q.current=!1,g&&-1!==le.current&&xe?De(e,we[le.current],"blur"):g&&k&&""!==de?De(e,de,"blur","freeSolo"):v&&me(e,ce),Re(e,"blur"))},je=e=>{const t=e.target.value;de!==t&&(fe(t),be(!1),V&&V(e,t,"input")),""===t?w||B||Pe(e,null,"clear"):Me(e)},$e=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));le.current!==t&&Ee({event:e,index:t,reason:"mouse"})},Ue=e=>{Ee({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Oe.current=!0},Ve=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));De(e,we[t],"selectOption"),Oe.current=!1},He=e=>t=>{const r=ce.slice();r.splice(e,1),Pe(t,r,"removeOption",{option:ce[e]})},Ge=e=>{ge?Re(e,"toggleInput"):Me(e)},We=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==K&&e.preventDefault()},qe=e=>{e.currentTarget.contains(e.target)&&(te.current.focus(),Y&&ee.current&&te.current.selectionEnd-te.current.selectionStart===0&&te.current.select(),ee.current=!1)},Ze=e=>{S||""!==de&&ge||Ge(e)};let Ye=k&&de.length>0;Ye=Ye||(B?ce.length>0:null!==ce);let Xe=we;return O&&(new Map,Xe=we.reduce((e,t,r)=>{const n=O(t);return e.length>0&&e[e.length-1].group===n?e[e.length-1].options.push(t):e.push({key:r,index:r,group:n,options:[t]}),e},[])),S&&pe&&Be(),{getRootProps:(e={})=>(0,n.A)({"aria-owns":Se?`${K}-listbox`:null},e,{onKeyDown:Fe(e),onMouseDown:We,onClick:qe}),getInputLabelProps:()=>({id:`${K}-label`,htmlFor:K}),getInputProps:()=>({id:K,value:de,onBlur:Be,onFocus:ze,onChange:je,onMouseDown:Ze,"aria-activedescendant":xe?"":null,"aria-autocomplete":u?"both":"list","aria-controls":Se?`${K}-listbox`:void 0,"aria-expanded":Se,autoComplete:"off",ref:te,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:S}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Ne}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Ge}),getTagProps:({index:e})=>(0,n.A)({key:e,"data-tag-index":e,tabIndex:-1},!Z&&{onDelete:He(e)}),getListboxProps:()=>({role:"listbox",id:`${K}-listbox`,"aria-labelledby":`${K}-label`,ref:ke,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{var r;const n=(B?ce:[ce]).some(e=>null!=e&&z(t,e)),o=!!M&&M(t);return{key:null!=(r=null==R?void 0:R(t))?r:J(t),tabIndex:-1,role:"option",id:`${K}-option-${e}`,onMouseMove:$e,onClick:Ve,onTouchStart:Ue,"data-option-index":e,"aria-disabled":o,"aria-selected":n}},id:K,inputValue:de,value:ce,dirty:Ye,expanded:xe&&ne,popupOpen:xe,focused:pe||-1!==ie,anchorEl:ne,setAnchorEl:oe,focusedTag:ie,groupedOptions:Xe}}},SxDb(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r("+9dH"),o=r("Nlia"),i=r("leBO");const a=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];function s(e={}){const{boundaryCount:t=1,componentName:r="usePagination",count:s=1,defaultPage:l=1,disabled:c=!1,hideNextButton:u=!1,hidePrevButton:d=!1,onChange:f,page:p,showFirstButton:h=!1,showLastButton:m=!1,siblingCount:g=1}=e,y=(0,o.A)(e,a),[v,b]=(0,i.A)({controlled:p,default:l,name:r,state:"page"}),_=(e,t)=>{p||b(t),f&&f(e,t)},x=(e,t)=>{const r=t-e+1;return Array.from({length:r},(t,r)=>e+r)},w=x(1,Math.min(t,s)),A=x(Math.max(s-t+1,t+1),s),S=Math.max(Math.min(v-g,s-t-2*g-1),t+2),C=Math.min(Math.max(v+g,t+2*g+2),A.length>0?A[0]-2:s-1),E=[...h?["first"]:[],...d?[]:["previous"],...w,...S>t+2?["start-ellipsis"]:t+1t?[s-t]:[],...A,...u?[]:["next"],...m?["last"]:[]],T=e=>{switch(e){case"first":return 1;case"previous":return v-1;case"next":return v+1;case"last":return s;default:return null}},I=E.map(e=>"number"==typeof e?{onClick:t=>{_(t,e)},type:"page",page:e,selected:e===v,disabled:c,"aria-current":e===v?"true":void 0}:{onClick:t=>{_(t,T(e))},type:e,page:T(e),selected:!1,disabled:c||-1===e.indexOf("ellipsis")&&("next"===e||"last"===e?v>=s:v<=1)});return(0,n.A)({items:I},y)}},xeev(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("unMj").A},j3nj(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("zhWT").A},M7pN(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r("+9dH"),o=r("q1tI"),i=r("Z6qJ"),a=r("nKUr");function s(e,t){function r(r,o){return(0,a.jsx)(i.A,(0,n.A)({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return r.muiName=i.A.muiName,o.memo(o.forwardRef(r))}},"7yHM"(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("QoIX").A},dzX4(e,t,r){"use strict";r.r(t),r.d(t,{capitalize:()=>o.A,createChainedFunction:()=>i.A,createSvgIcon:()=>a.A,debounce:()=>s.A,deprecatedPropType:()=>l,isMuiElement:()=>c.A,ownerDocument:()=>u.A,ownerWindow:()=>d.A,requirePropFactory:()=>f,setRef:()=>p,unstable_ClassNameGenerator:()=>x,unstable_useEnhancedEffect:()=>h.A,unstable_useId:()=>m.A,unsupportedProp:()=>g,useControlled:()=>y.A,useEventCallback:()=>v.A,useForkRef:()=>b.A,useIsFocusVisible:()=>_.A});var n=r("Oory"),o=r("xeev"),i=r("j3nj"),a=r("M7pN"),s=r("7yHM");const l=function(e,t){return()=>null};var c=r("M3M6"),u=r("rdfb"),d=r("WFZb");const f=function(e,t){return()=>null},p=r("1YXj").A;var h=r("6q60"),m=r("DSU1");const g=function(e,t,r,n,o){return null};var y=r("1vOf"),v=r("KXty"),b=r("ZfBw"),_=r("8rms");const x={configure:e=>{n.A.configure(e)}}},M3M6(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("lHbp").A},rdfb(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("p4lV").A},WFZb(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("4bZc").A},"1vOf"(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("leBO").A},"6q60"(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("XgeM").A},KXty(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("nXnS").A},ZfBw(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("N0rN").A},DSU1(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("A3c4").A},"8rms"(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("B5YM").A},AcvT(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r("+9dH"),o=r("Nlia"),i=r("N0rN"),a=r("/E4l"),s=r("dd9Q"),l=r("9sNS");const c=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],u=["component","slots","slotProps"],d=["component"];function f(e,t){const{className:r,elementType:f,ownerState:p,externalForwardedProps:h,getSlotOwnerState:m,internalForwardedProps:g}=t,y=(0,o.A)(t,c),{component:v,slots:b={[e]:void 0},slotProps:_={[e]:void 0}}=h,x=(0,o.A)(h,u),w=b[e]||f,A=(0,s.A)(_[e],p),S=(0,l.A)((0,n.A)({className:r},y,{externalForwardedProps:"root"===e?x:void 0,externalSlotProps:A})),{props:{component:C},internalRef:E}=S,T=(0,o.A)(S.props,d),I=(0,i.A)(E,null==A?void 0:A.ref,t.ref),k=m?m(T):{},M=(0,n.A)({},p,k),R="root"===e?C||v:C,P=(0,a.A)(w,(0,n.A)({},"root"===e&&!v&&!b[e]&&g,"root"!==e&&!b[e]&&g,T,R&&{as:R},{ref:I}),M);return Object.keys(k).forEach(e=>{delete P[e]}),[w,P]}},YSst(e,t,r){"use strict";r.d(t,{A:()=>n});const n="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__"},dxcw(e,t,r){"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext(null)},CZYX(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("dxcw");function i(){return n.useContext(o.A)}},"2TcN"(e,t,r){"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("AeFk"),o=r("nKUr");function i(e){const{styles:t,defaultTheme:r={}}=e,i="function"==typeof t?e=>{return t(null==(n=e)||0===Object.keys(n).length?r:e);var n}:t;return(0,o.jsx)(n.mL,{styles:i})}},WfXV(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r("q1tI"),o=r("m4uV"),i=r("EwZD"),a=r("nKUr");const s=new Map;function l(e){const{injectFirst:t,enableCssLayer:r,children:l}=e,c=n.useMemo(()=>{const e=`${t}-${r}`;if("object"==typeof document&&s.has(e))return s.get(e);const n=function(e,t){const r=(0,i.A)({key:"css",prepend:e});if(t){const e=r.insert;r.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return r}(t,r);return s.set(e,n),n},[t,r]);return t||r?(0,a.jsx)(o.C,{value:c,children:l}):l}},"n+sr"(e,t,r){"use strict";r.r(t),r.d(t,{GlobalStyles:()=>y.A,StyledEngineProvider:()=>g.A,ThemeContext:()=>o.T,css:()=>m.AH,default:()=>v,internal_processStyles:()=>b,internal_serializeStyles:()=>x,keyframes:()=>m.i7});var n=r("+9dH"),o=r("m4uV"),i=r("zd00"),a=r("xLBD"),s=r("eVQB"),l=r("q1tI"),c=r("kpM3").A,u=function(e){return"theme"!==e},d=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?c:u},f=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},p=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,s.SF)(t,r,n),(0,a.s)(function(){return(0,s.sk)(t,r,n)}),null},h=function e(t,r){var a,c,u=t.__emotion_real===t,h=u&&t.__emotion_base||t;void 0!==r&&(a=r.label,c=r.target);var m=f(t,r,u),g=m||d(h),y=!g("as");return function(){var v=arguments,b=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&b.push("label:"+a+";"),null==v[0]||void 0===v[0].raw)b.push.apply(b,v);else{var _=v[0];b.push(_[0]);for(var x=v.length,w=1;w{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},_=[];function x(e){return _[0]=e,(0,i.J)(_)}},"+5/u"(e,t,r){"use strict";r.d(t,{si:()=>Be,Ay:()=>$e});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("46Hv"),s=r("YSst");const l=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var c=Date.now(),u="fnValues"+c,d="fnStyle"+ ++c;var f="@global",p=function(){function e(e,t,r){for(var o in this.type="global",this.at=f,this.isProcessed=!1,this.key=e,this.options=r,this.rules=new a.VZ((0,n.A)({},r,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.replaceRule=function(e,t,r){var n=this.rules.replace(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),h=function(){function e(e,t,r){this.type="global",this.at=f,this.isProcessed=!1,this.key=e,this.options=r;var o=e.substr(8);this.rule=r.jss.createRule(o,t,(0,n.A)({},r,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),m=/\s*,\s*/g;function g(e,t){for(var r=e.split(m),n="",o=0;oe.length)&&(t=e.length);for(var r=0,n=Array(t);r-1){var o=ge[e];if(!Array.isArray(o))return H+ee(o)in t&&G+o;if(!n)return!1;for(var i=0;it?1:-1:e.length-t.length},{onProcessStyle:function(t,r){if("style"!==r.type)return t;for(var n={},o=Object.keys(t).sort(e),i=0;i(i+=1,i);return(e,i)=>{const c=i.options.name;if(c&&0===c.indexOf("Mui")&&!i.options.link&&!t){if(-1!==l.indexOf(e.key))return`Mui-${e.key}`;const t=`${o}${c}-${e.key}`;return i.options.theme[s.A]&&""===n?`${t}-${a()}`:t}return`${o}${r}${a()}`}}(),jss:Fe,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Be=i.createContext(ze);let je;function $e(e){const{children:t,injectFirst:r=!1,disableGeneration:s=!1}=e,l=(0,o.A)(e,Ne),c=i.useContext(Be),{generateClassName:u,jss:d,serverGenerateClassName:f,sheetsCache:p,sheetsManager:h,sheetsRegistry:m}=(0,n.A)({},c,l),g=i.useMemo(()=>{const e={disableGeneration:s,generateClassName:u,jss:d,serverGenerateClassName:f,sheetsCache:p,sheetsManager:h,sheetsRegistry:m};if(!e.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!je){const e=document.head;je=document.createComment("mui-inject-first"),e.insertBefore(je,e.firstChild)}e.jss=(0,a.vt)({plugins:De().plugins,insertionPoint:je})}return e},[r,s,u,d,f,p,h,m]);return(0,Le.jsx)(Be.Provider,{value:g,children:t})}},dcYk(e,t,r){"use strict";var n=r("JMD1");t.X4=d,t.e$=f,t.tL=h,t.eM=function(e,t){const r=u(e),n=u(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)},t.YL=c,t.a=p,t.Cg=function(e,t,r){try{return d(e,t)}catch(t){return e}},t.Me=void 0,t.Nd=function(e,t,r){try{return f(e,t)}catch(t){return e}},t.Y9=function(e,t,r){try{return h(e,t)}catch(t){return e}},t.j4=function(e,t,r){try{return p(e,t)}catch(t){return e}};var o=n(r("WF/F")),i=n(r("9rAX"));function a(e,t=0,r=1){return(0,i.default)(e,t,r)}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map(e=>e+e)),r?`rgb${4===r.length?"a":""}(${r.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,o.default)(9,e));let n,i=e.substring(t+1,e.length-1);if("color"===r){if(i=i.split(" "),n=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw new Error((0,o.default)(10,n))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:r,values:i,colorSpace:n}}function l(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}function c(e){e=s(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),a=(e,t=(e+r/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let c="rgb";const u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),l({type:c,values:u})}function u(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(c(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function d(e,t){return e=s(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)}function f(e,t){if(e=s(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return l(e)}function p(e,t){if(e=s(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return l(e)}function h(e,t=.15){return u(e)>.5?f(e,t):p(e,t)}t.Me=(e,t)=>{try{return(e=>{const t=s(e);return t.values.slice(0,3).map((e,r)=>-1!==t.type.indexOf("hsl")&&0!==r?`${e}%`:e).join(" ")})(e)}catch(t){return e}}},c1mR(e,t,r){"use strict";var n=r("JMD1");t.Ay=function(e={}){const{themeId:t,defaultTheme:r=g,rootShouldForwardProp:n=h,slotShouldForwardProp:l=h}=e,u=e=>(0,c.default)((0,o.default)({},e,{theme:v((0,o.default)({},e,{defaultTheme:r,themeId:t}))}));return u.__mui_systemSx=!0,(e,c={})=>{(0,a.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:d,slot:p,skipVariantsResolver:m,skipSx:g,overridesResolver:x=b(y(p))}=c,w=(0,i.default)(c,f),A=d&&d.startsWith("Mui")||p?"components":"custom",S=void 0!==m?m:p&&"Root"!==p&&"root"!==p||!1,C=g||!1;let E=h;"Root"===p||"root"===p?E=n:p?E=l:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(E=void 0);const T=(0,a.default)(e,(0,o.default)({shouldForwardProp:E,label:void 0},w)),I=e=>"function"==typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?n=>{const i=v({theme:n.theme,defaultTheme:r,themeId:t});return _(e,(0,o.default)({},n,{theme:i}),i.modularCssLayers?A:void 0)}:e,k=(n,...i)=>{let a=I(n);const s=i?i.map(I):[];d&&x&&s.push(e=>{const n=v((0,o.default)({},e,{defaultTheme:r,themeId:t}));if(!n.components||!n.components[d]||!n.components[d].styleOverrides)return null;const i=n.components[d].styleOverrides,a={};return Object.entries(i).forEach(([t,r])=>{a[t]=_(r,(0,o.default)({},e,{theme:n}),n.modularCssLayers?"theme":void 0)}),x(e,a)}),d&&!S&&s.push(e=>{var n;const i=v((0,o.default)({},e,{defaultTheme:r,themeId:t}));return _({variants:null==i||null==(n=i.components)||null==(n=n[d])?void 0:n.variants},(0,o.default)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),C||s.push(u);const l=s.length-i.length;if(Array.isArray(n)&&l>0){const e=new Array(l).fill("");a=[...n,...e],a.raw=[...n.raw,...e]}const c=T(a,...s);return e.muiName&&(c.muiName=e.muiName),c};return T.withConfig&&(k.withConfig=T.withConfig),k}};var o=n(r("pP/M")),i=n(r("eD+B")),a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r("n+sr")),s=r("K+2h"),l=(n(r("IisN")),n(r("MZ7D")),n(r("p64m"))),c=n(r("DsUO"));const u=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function h(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function m(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const g=(0,l.default)(),y=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function v({defaultTheme:e,theme:t,themeId:r}){return n=t,0===Object.keys(n).length?e:t[r]||t;var n}function b(e){return e?(t,r)=>r[e]:null}function _(e,t,r){let{ownerState:n}=t,s=(0,i.default)(t,u);const l="function"==typeof e?e((0,o.default)({ownerState:n},s)):e;if(Array.isArray(l))return l.flatMap(e=>_(e,(0,o.default)({ownerState:n},s),r));if(l&&"object"==typeof l&&Array.isArray(l.variants)){const{variants:e=[]}=l;let t=(0,i.default)(l,d);return e.forEach(e=>{let i=!0;if("function"==typeof e.props?i=e.props((0,o.default)({ownerState:n},s,n)):Object.keys(e.props).forEach(t=>{(null==n?void 0:n[t])!==e.props[t]&&s[t]!==e.props[t]&&(i=!1)}),i){Array.isArray(t)||(t=[t]);const i="function"==typeof e.style?e.style((0,o.default)({ownerState:n},s,n)):e.style;t.push(r?m((0,a.internal_serializeStyles)(i),r):i)}}),t}return r?m((0,a.internal_serializeStyles)(l),r):l}},jAoP(e,t,r){"use strict";r.d(t,{A:()=>l,b:()=>s});var n=r("q1tI"),o=r("d70t"),i=r("nKUr");const a=n.createContext(void 0);function s({props:e,name:t}){return function(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?(0,o.A)(i.defaultProps,n):i.styleOverrides||i.variants?n:(0,o.A)(i,n)}({props:e,name:t,theme:{components:n.useContext(a)}})}const l=function({value:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}},OH6s(e,t,r){"use strict";r.d(t,{A:()=>l}),r("q1tI");var n=r("n+sr"),o=r("2TcN"),i=r("aoPf"),a=r("nKUr");function s(e){const t=(0,n.internal_serializeStyles)(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}const l=function({styles:e,themeId:t,defaultTheme:r={}}){const n=(0,i.A)(r),l=t&&n[t]||n;let c="function"==typeof e?e(l):e;return l.modularCssLayers&&(c=Array.isArray(c)?c.map(e=>s("function"==typeof e?e(l):e)):s(c)),(0,a.jsx)(o.A,{styles:c})}},St5x(e,t,r){"use strict";r.d(t,{A:()=>u,I:()=>c});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("nKUr");const s=["value"],l=i.createContext(),c=()=>{const e=i.useContext(l);return null!=e&&e},u=function(e){let{value:t}=e,r=(0,o.A)(e,s);return(0,a.jsx)(l.Provider,(0,n.A)({value:null==t||t},r))}},wVnu(e,t,r){"use strict";r.d(t,{A:()=>b});var n=r("+9dH"),o=r("q1tI"),i=r("CZYX"),a=r("dxcw"),s=r("YSst"),l=r("nKUr");const c=function(e){const{children:t,theme:r}=e,c=(0,i.A)(),u=o.useMemo(()=>{const e=null===c?r:function(e,t){return"function"==typeof t?t(e):(0,n.A)({},e,t)}(c,r);return null!=e&&(e[s.A]=null!==c),e},[r,c]);return(0,l.jsx)(a.A.Provider,{value:u,children:t})};var u=r("m4uV"),d=r("jyRQ"),f=r("St5x"),p=r("jAoP"),h=r("XgeM"),m=r("A3c4"),g=r("OH6s");const y={};function v(e,t,r,i=!1){return o.useMemo(()=>{const o=e&&t[e]||t;if("function"==typeof r){const a=r(o),s=e?(0,n.A)({},t,{[e]:a}):a;return i?()=>s:s}return e?(0,n.A)({},t,{[e]:r}):(0,n.A)({},t,r)},[e,t,r,i])}const b=function(e){const{children:t,theme:r,themeId:n}=e,o=(0,d.A)(y),a=(0,i.A)()||y,s=v(n,o,r),b=v(n,a,r,!0),_="rtl"===s.direction,x=function(e){const t=(0,d.A)(),r=(0,m.A)()||"",{modularCssLayers:n}=e;let o="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return o=n&&null===t?"string"==typeof n?n.replace(/mui(?!\.)/g,o):`@layer ${o};`:"",(0,h.A)(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(o){var n;if(t&&null!=(n=t.hasAttribute)&&n.call(t,"data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===r)return;const i=document.createElement("style");i.setAttribute("data-mui-layer-order",r),i.textContent=o,e.prepend(i)}else{var i;null==(i=e.querySelector(`style[data-mui-layer-order="${r}"]`))||i.remove()}},[o,r]),o?(0,l.jsx)(g.A,{styles:o}):null}(s);return(0,l.jsx)(c,{theme:b,children:(0,l.jsx)(u.T.Provider,{value:s,children:(0,l.jsx)(f.A,{value:_,children:(0,l.jsxs)(p.A,{value:null==s?void 0:s.components,children:[x,t]})})})})}},fGgT(e,t,r){"use strict";r.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>o});var n=r("w9Qe");const o={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${o[e]}px)`};function a(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const e=n.breakpoints||i;return t.reduce((n,o,i)=>(n[e.up(e.keys[i])]=r(t[i]),n),{})}if("object"==typeof t){const e=n.breakpoints||i;return Object.keys(t).reduce((n,i)=>{if(-1!==Object.keys(e.values||o).indexOf(i))n[e.up(i)]=r(t[i],i);else{const e=i;n[e]=t[e]}return n},{})}return r(t)}function s(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce((t,r)=>(t[e.up(r)]={},t),{}))||{}}function l(e,t){return e.reduce((e,t)=>{const r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e},t)}function c(e,...t){const r=s(e),o=[r,...t].reduce((e,t)=>(0,n.A)(e,t),{});return l(Object.keys(r),o)}function u({values:e,breakpoints:t,base:r}){const n=r||function(e,t){if("object"!=typeof e)return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((t,n)=>{n{null!=e[t]&&(r[t]=!0)}),r}(e,t),o=Object.keys(n);if(0===o.length)return e;let i;return o.reduce((t,r,n)=>(Array.isArray(e)?(t[r]=null!=e[n]?e[n]:e[i],i=n):"object"==typeof e?(t[r]=null!=e[r]?e[r]:e[i],i=r):t[r]=e,t),{})}},"2Qr1"(e,t,r){"use strict";r.d(t,{E2:()=>a,J1:()=>d,Ob:()=>c,X0:()=>l,X4:()=>p,YL:()=>u,a:()=>m,e$:()=>h,eM:()=>f,rP:()=>s,tL:()=>g});var n=r("KRkT"),o=r("5cFC");function i(e,t=0,r=1){return(0,o.A)(e,t,r)}function a(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map(e=>e+e)),r?`rgb${4===r.length?"a":""}(${r.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(a(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,n.A)(9,e));let o,i=e.substring(t+1,e.length-1);if("color"===r){if(i=i.split(" "),o=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error((0,n.A)(10,o))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:r,values:i,colorSpace:o}}function l(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}function c(e){if(0===e.indexOf("#"))return e;const{values:t}=s(e);return`#${t.map((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e)).join("")}`}function u(e){e=s(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),a=(e,t=(e+r/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let c="rgb";const u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),l({type:c,values:u})}function d(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(u(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function f(e,t){const r=d(e),n=d(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function p(e,t){return e=s(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)}function h(e,t){if(e=s(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return l(e)}function m(e,t){if(e=s(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return l(e)}function g(e,t=.15){return d(e)>.5?h(e,t):m(e,t)}},"3XHt"(e,t,r){"use strict";function n(e,t){const r=this;if(r.vars&&"function"==typeof r.getColorSchemeSelector){const n=r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[n]:t}}return r.palette.mode===e?t:{}}r.d(t,{A:()=>n})},s8X4(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r("Nlia"),o=r("+9dH");const i=["values","unit","step"];function a(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:a=5}=e,s=(0,n.A)(e,i),l=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,o.A)({},e,{[t.key]:t.val}),{})})(t),c=Object.keys(l);function u(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function d(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-a/100}${r})`}function f(e,n){const o=c.indexOf(n);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==o&&"number"==typeof t[c[o]]?t[c[o]]:n)-a/100}${r})`}return(0,o.A)({keys:c,values:l,up:u,down:d,between:f,only:function(e){return c.indexOf(e)+1o});var n=r("rZTa");function o(e=8){if(e.mui)return e;const t=(0,n.LX)({spacing:e}),r=(...e)=>(0===e.length?[1]:e).map(e=>{const r=t(e);return"number"==typeof r?`${r}px`:r}).join(" ");return r.mui=!0,r}},Tazo(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r("+9dH"),o=r("Nlia"),i=r("w9Qe"),a=r("s8X4");const s={borderRadius:4};var l=r("EIBS"),c=r("xTOY"),u=r("9k3N"),d=r("3XHt");const f=["breakpoints","palette","spacing","shape"],p=function(e={},...t){const{breakpoints:r={},palette:p={},spacing:h,shape:m={}}=e,g=(0,o.A)(e,f),y=(0,a.A)(r),v=(0,l.A)(h);let b=(0,i.A)({breakpoints:y,direction:"ltr",components:{},palette:(0,n.A)({mode:"light"},p),spacing:v,shape:(0,n.A)({},s,m)},g);return b.applyStyles=d.A,b=t.reduce((e,t)=>(0,i.A)(e,t),b),b.unstable_sxConfig=(0,n.A)({},u.A,null==g?void 0:g.unstable_sxConfig),b.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},b}},p64m(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>n.A,private_createBreakpoints:()=>o.A,unstable_applyStyles:()=>i.A});var n=r("Tazo"),o=r("s8X4"),i=r("3XHt")},cENE(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("w9Qe");const o=function(e,t){return t?(0,n.A)(e,t,{clone:!1}):e}},rZTa(e,t,r){"use strict";r.d(t,{LX:()=>h,MA:()=>p,_W:()=>m,Lc:()=>y,Ms:()=>v});var n=r("fGgT"),o=r("+y7V"),i=r("cENE");const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,r]=e.split(""),n=a[t],o=s[r]||"";return Array.isArray(o)?o.map(e=>n+e):[n+o]})(t)),e[t])}(),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],f=[...u,...d];function p(e,t,r,n){var i;const a=null!=(i=(0,o.Yn)(e,t,!1))?i:r;return"number"==typeof a?e=>"string"==typeof e?e:a*e:Array.isArray(a)?e=>"string"==typeof e?e:a[e]:"function"==typeof a?a:()=>{}}function h(e){return p(e,"spacing",8)}function m(e,t){if("string"==typeof t||null==t)return t;const r=e(Math.abs(t));return t>=0?r:"number"==typeof r?-r:`-${r}`}function g(e,t){const r=h(e.theme);return Object.keys(e).map(o=>function(e,t,r,o){if(-1===t.indexOf(r))return null;const i=function(e,t){return r=>e.reduce((e,n)=>(e[n]=m(t,r),e),{})}(c(r),o),a=e[r];return(0,n.NI)(e,a,i)}(e,t,o,r)).reduce(i.A,{})}function y(e){return g(e,u)}function v(e){return g(e,d)}function b(e){return g(e,f)}y.propTypes={},y.filterProps=u,v.propTypes={},v.filterProps=d,b.propTypes={},b.filterProps=f},"+y7V"(e,t,r){"use strict";r.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>i});var n=r("unMj"),o=r("fGgT");function i(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){const r=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=r)return r}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function a(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:i(e,r)||n,t&&(o=t(o,n,e)),o}const s=function(e){const{prop:t,cssProperty:r=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=i(e.theme,s)||{};return(0,o.NI)(e,c,e=>{let o=a(u,l,e);return e===o&&"string"==typeof e&&(o=a(u,l,`${t}${"default"===e?"":(0,n.A)(e)}`,e)),!1===r?o:{[r]:o}})};return c.propTypes={},c.filterProps=[t],c}},"9k3N"(e,t,r){"use strict";r.d(t,{A:()=>D});var n=r("rZTa"),o=r("+y7V"),i=r("cENE");const a=function(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(r=>{e[r]=t}),e),{}),r=e=>Object.keys(e).reduce((r,n)=>t[n]?(0,i.A)(r,t[n](e)):r,{});return r.propTypes={},r.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),r};var s=r("fGgT");function l(e){return"number"!=typeof e?e:`${e}px solid`}function c(e,t){return(0,o.Ay)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),f=c("borderRight",l),p=c("borderBottom",l),h=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),y=c("borderRightColor"),v=c("borderBottomColor"),b=c("borderLeftColor"),_=c("outline",l),x=c("outlineColor"),w=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,n.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:(0,n._W)(t,e)});return(0,s.NI)(e,e.borderRadius,r)}return null};w.propTypes={},w.filterProps=["borderRadius"],a(u,d,f,p,h,m,g,y,v,b,w,_,x);const A=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,n.MA)(e.theme,"spacing",8,"gap"),r=e=>({gap:(0,n._W)(t,e)});return(0,s.NI)(e,e.gap,r)}return null};A.propTypes={},A.filterProps=["gap"];const S=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,n.MA)(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:(0,n._W)(t,e)});return(0,s.NI)(e,e.columnGap,r)}return null};S.propTypes={},S.filterProps=["columnGap"];const C=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,n.MA)(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:(0,n._W)(t,e)});return(0,s.NI)(e,e.rowGap,r)}return null};function E(e,t){return"grey"===t?t:e}function T(e){return e<=1&&0!==e?100*e+"%":e}C.propTypes={},C.filterProps=["rowGap"],a(A,S,C,(0,o.Ay)({prop:"gridColumn"}),(0,o.Ay)({prop:"gridRow"}),(0,o.Ay)({prop:"gridAutoFlow"}),(0,o.Ay)({prop:"gridAutoColumns"}),(0,o.Ay)({prop:"gridAutoRows"}),(0,o.Ay)({prop:"gridTemplateColumns"}),(0,o.Ay)({prop:"gridTemplateRows"}),(0,o.Ay)({prop:"gridTemplateAreas"}),(0,o.Ay)({prop:"gridArea"})),a((0,o.Ay)({prop:"color",themeKey:"palette",transform:E}),(0,o.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:E}),(0,o.Ay)({prop:"backgroundColor",themeKey:"palette",transform:E}));const I=(0,o.Ay)({prop:"width",transform:T}),k=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var r,n;const o=(null==(r=e.theme)||null==(r=r.breakpoints)||null==(r=r.values)?void 0:r[t])||s.zu[t];return o?"px"!==(null==(n=e.theme)||null==(n=n.breakpoints)?void 0:n.unit)?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:T(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};k.filterProps=["maxWidth"];const M=(0,o.Ay)({prop:"minWidth",transform:T}),R=(0,o.Ay)({prop:"height",transform:T}),P=(0,o.Ay)({prop:"maxHeight",transform:T}),O=(0,o.Ay)({prop:"minHeight",transform:T}),D=((0,o.Ay)({prop:"size",cssProperty:"width",transform:T}),(0,o.Ay)({prop:"size",cssProperty:"height",transform:T}),a(I,k,M,R,P,O,(0,o.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:w},color:{themeKey:"palette",transform:E},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:E},backgroundColor:{themeKey:"palette",transform:E},p:{style:n.Ms},pt:{style:n.Ms},pr:{style:n.Ms},pb:{style:n.Ms},pl:{style:n.Ms},px:{style:n.Ms},py:{style:n.Ms},padding:{style:n.Ms},paddingTop:{style:n.Ms},paddingRight:{style:n.Ms},paddingBottom:{style:n.Ms},paddingLeft:{style:n.Ms},paddingX:{style:n.Ms},paddingY:{style:n.Ms},paddingInline:{style:n.Ms},paddingInlineStart:{style:n.Ms},paddingInlineEnd:{style:n.Ms},paddingBlock:{style:n.Ms},paddingBlockStart:{style:n.Ms},paddingBlockEnd:{style:n.Ms},m:{style:n.Lc},mt:{style:n.Lc},mr:{style:n.Lc},mb:{style:n.Lc},ml:{style:n.Lc},mx:{style:n.Lc},my:{style:n.Lc},margin:{style:n.Lc},marginTop:{style:n.Lc},marginRight:{style:n.Lc},marginBottom:{style:n.Lc},marginLeft:{style:n.Lc},marginX:{style:n.Lc},marginY:{style:n.Lc},marginInline:{style:n.Lc},marginInlineStart:{style:n.Lc},marginInlineEnd:{style:n.Lc},marginBlock:{style:n.Lc},marginBlockStart:{style:n.Lc},marginBlockEnd:{style:n.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:A},rowGap:{style:C},columnGap:{style:S},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:T},maxWidth:{style:k},minWidth:{transform:T},height:{transform:T},maxHeight:{transform:T},minHeight:{transform:T},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},"0kTp"(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r("+9dH"),o=r("Nlia"),i=r("w9Qe"),a=r("9k3N");const s=["sx"];function l(e){const{sx:t}=e,r=(0,o.A)(e,s),{systemProps:l,otherProps:c}=(e=>{var t,r;const n={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(r=e.theme)?void 0:r.unstable_sxConfig)?t:a.A;return Object.keys(e).forEach(t=>{o[t]?n.systemProps[t]=e[t]:n.otherProps[t]=e[t]}),n})(r);let u;return u=Array.isArray(t)?[l,...t]:"function"==typeof t?(...e)=>{const r=t(...e);return(0,i.Q)(r)?(0,n.A)({},l,r):l}:(0,n.A)({},l,t),(0,n.A)({},c,{sx:u})}},DsUO(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>n.A,extendSxProp:()=>o.A,unstable_createStyleFunctionSx:()=>n.k,unstable_defaultSxConfig:()=>i.A});var n=r("xTOY"),o=r("0kTp"),i=r("9k3N")},xTOY(e,t,r){"use strict";r.d(t,{A:()=>u,k:()=>l});var n=r("unMj"),o=r("cENE"),i=r("+y7V"),a=r("fGgT"),s=r("9k3N");function l(){function e(e,t,r,o){const s={[e]:t,theme:r},l=o[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:f}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const p=(0,i.Yn)(r,u)||{};return f?f(s):(0,a.NI)(s,t,t=>{let r=(0,i.BO)(p,d,t);return t===r&&"string"==typeof t&&(r=(0,i.BO)(p,d,`${e}${"default"===t?"":(0,n.A)(t)}`,t)),!1===c?r:{[c]:r}})}return function t(r){var n;const{sx:i,theme:l={},nested:c}=r||{};if(!i)return null;const u=null!=(n=l.unstable_sxConfig)?n:s.A;function d(r){let n=r;if("function"==typeof r)n=r(l);else if("object"!=typeof r)return r;if(!n)return null;const i=(0,a.EU)(l.breakpoints),s=Object.keys(i);let d=i;return Object.keys(n).forEach(r=>{const i="function"==typeof(s=n[r])?s(l):s;var s;if(null!=i)if("object"==typeof i)if(u[r])d=(0,o.A)(d,e(r,i,l,u));else{const e=(0,a.NI)({theme:l},i,e=>({[r]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),r=new Set(t);return e.every(e=>r.size===Object.keys(e).length)}(e,i)?d=(0,o.A)(d,e):d[r]=t({sx:i,theme:l,nested:!0})}else d=(0,o.A)(d,e(r,i,l,u))}),!c&&l.modularCssLayers?{"@layer sx":(0,a.vf)(s,d)}:(0,a.vf)(s,d)}return Array.isArray(i)?i.map(d):d(i)}}const c=l();c.filterProps=["sx"];const u=c},M82X(e,t,r){"use strict";r.d(t,{A:()=>b});var n=r("+9dH"),o=r("Nlia"),i=r("n+sr"),a=r("w9Qe"),s=r("Tazo"),l=r("xTOY");const c=["ownerState"],u=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function p(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const h=(0,s.A)(),m=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function g({defaultTheme:e,theme:t,themeId:r}){return n=t,0===Object.keys(n).length?e:t[r]||t;var n}function y(e){return e?(t,r)=>r[e]:null}function v(e,t,r){let{ownerState:a}=t,s=(0,o.A)(t,c);const l="function"==typeof e?e((0,n.A)({ownerState:a},s)):e;if(Array.isArray(l))return l.flatMap(e=>v(e,(0,n.A)({ownerState:a},s),r));if(l&&"object"==typeof l&&Array.isArray(l.variants)){const{variants:e=[]}=l;let t=(0,o.A)(l,u);return e.forEach(e=>{let o=!0;if("function"==typeof e.props?o=e.props((0,n.A)({ownerState:a},s,a)):Object.keys(e.props).forEach(t=>{(null==a?void 0:a[t])!==e.props[t]&&s[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);const o="function"==typeof e.style?e.style((0,n.A)({ownerState:a},s,a)):e.style;t.push(r?p((0,i.internal_serializeStyles)(o),r):o)}}),t}return r?p((0,i.internal_serializeStyles)(l),r):l}const b=function(e={}){const{themeId:t,defaultTheme:r=h,rootShouldForwardProp:s=f,slotShouldForwardProp:c=f}=e,u=e=>(0,l.A)((0,n.A)({},e,{theme:g((0,n.A)({},e,{defaultTheme:r,themeId:t}))}));return u.__mui_systemSx=!0,(e,l={})=>{(0,i.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:p,slot:h,skipVariantsResolver:b,skipSx:_,overridesResolver:x=y(m(h))}=l,w=(0,o.A)(l,d),A=p&&p.startsWith("Mui")||h?"components":"custom",S=void 0!==b?b:h&&"Root"!==h&&"root"!==h||!1,C=_||!1;let E=f;"Root"===h||"root"===h?E=s:h?E=c:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(E=void 0);const T=(0,i.default)(e,(0,n.A)({shouldForwardProp:E,label:void 0},w)),I=e=>"function"==typeof e&&e.__emotion_real!==e||(0,a.Q)(e)?o=>{const i=g({theme:o.theme,defaultTheme:r,themeId:t});return v(e,(0,n.A)({},o,{theme:i}),i.modularCssLayers?A:void 0)}:e,k=(o,...i)=>{let a=I(o);const s=i?i.map(I):[];p&&x&&s.push(e=>{const o=g((0,n.A)({},e,{defaultTheme:r,themeId:t}));if(!o.components||!o.components[p]||!o.components[p].styleOverrides)return null;const i=o.components[p].styleOverrides,a={};return Object.entries(i).forEach(([t,r])=>{a[t]=v(r,(0,n.A)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),x(e,a)}),p&&!S&&s.push(e=>{var o;const i=g((0,n.A)({},e,{defaultTheme:r,themeId:t}));return v({variants:null==i||null==(o=i.components)||null==(o=o[p])?void 0:o.variants},(0,n.A)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),C||s.push(u);const l=s.length-i.length;if(Array.isArray(o)&&l>0){const e=new Array(l).fill("");a=[...o,...e],a.raw=[...o.raw,...e]}const c=T(a,...s);return e.muiName&&(c.muiName=e.muiName),c};return T.withConfig&&(k.withConfig=T.withConfig),k}}()},bBSl(e,t,r){"use strict";var n;r.d(t,{A:()=>d});var o=r("q1tI"),i=r("XgeM"),a=r("PfWk"),s=r("jyRQ");function l(e,t,r,n,a){const[s,l]=o.useState(()=>a&&r?r(e).matches:n?n(e).matches:t);return(0,i.A)(()=>{let t=!0;if(!r)return;const n=r(e),o=()=>{t&&l(n.matches)};return o(),n.addListener(o),()=>{t=!1,n.removeListener(o)}},[e,r]),s}const c=(n||(n=r.t(o,2))).useSyncExternalStore;function u(e,t,r,n,i){const a=o.useCallback(()=>t,[t]),s=o.useMemo(()=>{if(i&&r)return()=>r(e).matches;if(null!==n){const{matches:t}=n(e);return()=>t}return a},[a,e,n,i,r]),[l,u]=o.useMemo(()=>{if(null===r)return[a,()=>()=>{}];const t=r(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]},[a,r,e]);return c(u,l,s)}function d(e,t={}){const r=(0,s.A)(),n="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:o=!1,matchMedia:i=(n?window.matchMedia:null),ssrMatchMedia:d=null,noSsr:f=!1}=(0,a.A)({name:"MuiUseMediaQuery",props:t,theme:r});let p="function"==typeof e?e(r):e;return p=p.replace(/^@media( ?)/m,""),(void 0!==c?u:l)(p,o,i,d,f)}},aoPf(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r("Tazo"),o=r("jyRQ");const i=(0,n.A)(),a=function(e=i){return(0,o.A)(e)}},PfWk(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("d70t");function o(e){const{theme:t,name:r,props:o}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?(0,n.A)(t.components[r].defaultProps,o):o}},sdrl(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("PfWk"),o=r("aoPf");function i({props:e,name:t,defaultTheme:r,themeId:i}){let a=(0,o.A)(r);return i&&(a=a[i]||a),(0,n.A)({theme:a,name:t,props:e})}},jyRQ(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("m4uV");const i=function(e=null){const t=n.useContext(o.T);return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}},"847q"(e,t,r){"use strict";t.A=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}(r("q1tI")),o=r("n+sr");function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}t.A=function(e=null){const t=n.useContext(o.ThemeContext);return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}},Oory(e,t,r){"use strict";r.d(t,{A:()=>o});const n=e=>e,o=(()=>{let e=n;return{configure(t){e=t},generate:t=>e(t),reset(){e=n}}})()},"/E4l"(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("+9dH"),o=r("gU+W");const i=function(e,t,r){return void 0===e||(0,o.A)(e)?t:(0,n.A)({},t,{ownerState:(0,n.A)({},t.ownerState,r)})}},unMj(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("KRkT");function o(e){if("string"!=typeof e)throw new Error((0,n.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},IisN(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r("unMj")},"5cFC"(e,t,r){"use strict";r.d(t,{A:()=>n});const n=function(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}},"9rAX"(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r("5cFC")},aGM9(e,t,r){"use strict";function n(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((e,n)=>{if(n){const o=t(n);""!==o&&e.push(o),r&&r[n]&&e.push(r[n])}return e},[]).join(" ")}),n}r.d(t,{A:()=>n})},zhWT(e,t,r){"use strict";function n(...e){return e.reduce((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)},()=>{})}r.d(t,{A:()=>n})},QoIX(e,t,r){"use strict";function n(e,t=166){let r;function n(...n){clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}return n.clear=()=>{clearTimeout(r)},n}r.d(t,{A:()=>n})},w9Qe(e,t,r){"use strict";r.d(t,{A:()=>s,Q:()=>i});var n=r("+9dH"),o=r("q1tI");function i(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function a(e){if(o.isValidElement(e)||!i(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=a(e[r])}),t}function s(e,t,r={clone:!0}){const l=r.clone?(0,n.A)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach(n=>{o.isValidElement(t[n])?l[n]=t[n]:i(t[n])&&Object.prototype.hasOwnProperty.call(e,n)&&i(e[n])?l[n]=s(e[n],t[n],r):r.clone?l[n]=i(t[n])?a(t[n]):t[n]:l[n]=t[n]}),l}},"K+2h"(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>n.A,isPlainObject:()=>n.Q});var n=r("w9Qe")},OrJ7(e,t,r){"use strict";r.d(t,{A:()=>n});const n=function(e,t=[]){if(void 0===e)return{};const r={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r)).forEach(t=>{r[t]=e[t]}),r}},KRkT(e,t,r){"use strict";function n(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;en})},"WF/F"(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r("KRkT")},TkYO(e,t,r){"use strict";r.d(t,{Ay:()=>i});var n=r("Oory");const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t,r="Mui"){const i=o[t];return i?`${r}-${i}`:`${n.A.generate(e)}-${t}`}},PYeY(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("TkYO");function o(e,t,r="Mui"){const o={};return t.forEach(t=>{o[t]=(0,n.Ay)(e,t,r)}),o}},MZ7D(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>l,getFunctionName:()=>i});var n=r("lkrN");const o=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function i(e){const t=`${e}`.match(o);return t&&t[1]||""}function a(e,t=""){return e.displayName||e.name||i(e)||t}function s(e,t,r){const n=a(t);return e.displayName||(""!==n?`${r}(${n})`:r)}function l(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return a(e,"Component");if("object"==typeof e)switch(e.$$typeof){case n.ForwardRef:return s(e,e.render,"ForwardRef");case n.Memo:return s(e,e.type,"memo");default:return}}}},cP2J(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("q1tI");function o(e){var t;return parseInt(n.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}},Omxi(e,t,r){"use strict";function n(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}r.d(t,{A:()=>n})},"X+zv"(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("q1tI");function o(e){return n.Children.toArray(e).filter(e=>n.isValidElement(e))}},"gU+W"(e,t,r){"use strict";r.d(t,{A:()=>n});const n=function(e){return"string"==typeof e}},lHbp(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("q1tI");function o(e,t){var r,o;return n.isValidElement(e)&&-1!==t.indexOf(null!=(r=e.type.muiName)?r:null==(o=e.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)}},"9sNS"(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r("+9dH"),o=r("juqV"),i=r("OrJ7");const a=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(r=>{t[r]=e[r]}),t},s=function(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:s,externalForwardedProps:l,className:c}=e;if(!t){const e=(0,o.A)(null==r?void 0:r.className,c,null==l?void 0:l.className,null==s?void 0:s.className),t=(0,n.A)({},null==r?void 0:r.style,null==l?void 0:l.style,null==s?void 0:s.style),i=(0,n.A)({},r,l,s);return e.length>0&&(i.className=e),Object.keys(t).length>0&&(i.style=t),{props:i,internalRef:void 0}}const u=(0,i.A)((0,n.A)({},l,s)),d=a(s),f=a(l),p=t(u),h=(0,o.A)(null==p?void 0:p.className,null==r?void 0:r.className,c,null==l?void 0:l.className,null==s?void 0:s.className),m=(0,n.A)({},null==p?void 0:p.style,null==r?void 0:r.style,null==l?void 0:l.style,null==s?void 0:s.style),g=(0,n.A)({},p,r,f,d);return h.length>0&&(g.className=h),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:p.ref}}},p4lV(e,t,r){"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,{A:()=>n})},"4bZc"(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("p4lV");function o(e){return(0,n.A)(e).defaultView||window}},dd9Q(e,t,r){"use strict";r.d(t,{A:()=>n});const n=function(e,t,r){return"function"==typeof e?e(t,r):e}},d70t(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("+9dH");function o(e,t){const r=(0,n.A)({},t);return Object.keys(e).forEach(i=>{if(i.toString().match(/^(components|slots)$/))r[i]=(0,n.A)({},e[i],r[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const a=e[i]||{},s=t[i];r[i]={},s&&Object.keys(s)?a&&Object.keys(a)?(r[i]=(0,n.A)({},s),Object.keys(a).forEach(e=>{r[i][e]=o(a[e],s[e])})):r[i]=s:r[i]=a}else void 0===r[i]&&(r[i]=e[i])}),r}},"1YXj"(e,t,r){"use strict";function n(e,t){"function"==typeof e?e(t):e&&(e.current=t)}r.d(t,{A:()=>n})},leBO(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("q1tI");function o({controlled:e,default:t,name:r,state:o="value"}){const{current:i}=n.useRef(void 0!==e),[a,s]=n.useState(t);return[i?e:a,n.useCallback(e=>{i||s(e)},[])]}},XgeM(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("q1tI");const o="undefined"!=typeof window?n.useLayoutEffect:n.useEffect},nXnS(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("XgeM");const i=function(e){const t=n.useRef(e);return(0,o.A)(()=>{t.current=e}),n.useRef((...e)=>(0,t.current)(...e)).current}},N0rN(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("1YXj");function i(...e){return n.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{(0,o.A)(e,t)})},e)}},A3c4(e,t,r){"use strict";var n;r.d(t,{A:()=>s});var o=r("q1tI");let i=0;const a=(n||(n=r.t(o,2)))["useId".toString()];function s(e){if(void 0!==a){const t=a();return null!=e?e:t}return function(e){const[t,r]=o.useState(e),n=e||t;return o.useEffect(()=>{null==t&&(i+=1,r(`mui-${i}`))},[t]),n}(e)}},B5YM(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r("q1tI"),o=r("J13E");let i=!0,a=!1;const s=new o.E,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function u(){i=!1}function d(){"hidden"===this.visibilityState&&a&&(i=!0)}function f(){const e=n.useCallback(e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))},[]),t=n.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return i||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!l[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,s.start(100,()=>{a=!1}),t.current=!1,!0)},ref:e}}},"VGa/"(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r("q1tI");const o=e=>{const t=n.useRef({});return n.useEffect(()=>{t.current=e}),t.current}},"0Ydi"(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r("+9dH"),o=r("Nlia"),i=r("N0rN"),a=r("/E4l"),s=r("9sNS"),l=r("dd9Q");const c=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"],u=function(e){var t;const{elementType:r,externalSlotProps:u,ownerState:d,skipResolvingSlotProps:f=!1}=e,p=(0,o.A)(e,c),h=f?{}:(0,l.A)(u,d),{props:m,internalRef:g}=(0,s.A)((0,n.A)({},p,{externalSlotProps:h})),y=(0,i.A)(g,null==h?void 0:h.ref,null==(t=e.additionalProps)?void 0:t.ref);return(0,a.A)(r,(0,n.A)({},m,{ref:y}),d)}},J13E(e,t,r){"use strict";r.d(t,{E:()=>a,A:()=>s});var n=r("q1tI");const o={},i=[];class a{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new a}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function s(){const e=function(e){const t=n.useRef(o);return t.current===o&&(t.current=e(void 0)),t}(a.create).current;var t;return t=e.disposeEffect,n.useEffect(t,i),e}},"r/ya"(e,t,r){"use strict";r.d(t,{A:()=>n});const n={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"}},cosx(e,t,r){"use strict";r.d(t,{C:()=>zl});var n=r("+9dH"),o=r("q1tI"),i=r("17x9"),a=r.n(i);const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=e=>{let t,r,n,o,i,a,l,c="",u=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");u>4,r=(15&i)<<4|a>>2,n=(3&a)<<6|l,c+=String.fromCharCode(t),64!=a&&(c+=String.fromCharCode(r)),64!=l&&(c+=String.fromCharCode(n));return c},c=[];let u=0;for(;u<64;)c[u]=0|4294967296*Math.sin(++u%Math.PI);let d=function(e){return e.NotFound="NotFound",e.Invalid="Invalid",e.ExpiredAnnual="ExpiredAnnual",e.ExpiredAnnualGrace="ExpiredAnnualGrace",e.ExpiredVersion="ExpiredVersion",e.Valid="Valid",e.OutOfScope="OutOfScope",e}({});const f=["pro","premium"],p=["perpetual","annual","subscription"],h=/^.*EXPIRY=([0-9]+),.*$/;function m({releaseInfo:e,licenseKey:t,acceptedScopes:r}){if(!e)throw new Error("MUI: The release information is missing. Not able to validate license.");if(!t)return{status:d.NotFound};const n=t.substr(0,32),o=t.substr(32);if(n!==function(e){const t=[];let r,n,o,i=unescape(encodeURI(e))+"€",a=i.length;const s=[r=1732584193,n=4023233417,~r,~n];for(e=--a/4+2|15,t[--e]=8*a;~a;)t[a>>2]|=i.charCodeAt(a)<<8*a--;for(u=i=0;u>4]+c[i]+~~t[u|15&[i,5*i+1,3*i+5,7*i][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+i++%4])|o>>>-a),r,n])r=0|a[1],n=a[2];for(i=4;i;)s[--i]+=a[i]}for(e="";i<32;)e+=(s[i>>3]>>4*(1^i++)&15).toString(16);return e}(o))return{status:d.Invalid};const i=(e=>{const t=l(e);return t.includes("KEYVERSION=1")?(e=>{let t;try{t=parseInt(e.match(h)[1],10),t&&!Number.isNaN(t)||(t=null)}catch(e){t=null}return{scope:"pro",licensingModel:"perpetual",expiryTimestamp:t}})(t):t.includes("KV=2")?(e=>{const t={scope:null,licensingModel:null,expiryTimestamp:null};return e.split(",").map(e=>e.split("=")).filter(e=>2===e.length).forEach(([e,r])=>{if("S"===e&&(t.scope=r),"LM"===e&&(t.licensingModel=r),"E"===e){const e=parseInt(r,10);e&&!Number.isNaN(e)&&(t.expiryTimestamp=e)}}),t})(t):null})(o);if(null==i)return console.error("Error checking license. Key version not found!"),{status:d.Invalid};if(null==i.licensingModel||!p.includes(i.licensingModel))return console.error("Error checking license. Licensing model not found or invalid!"),{status:d.Invalid};if(null==i.expiryTimestamp)return console.error("Error checking license. Expiry timestamp not found or invalid!"),{status:d.Invalid};i.licensingModel;{const t=parseInt(l(e),10);if(Number.isNaN(t))throw new Error("MUI: The release information is invalid. Not able to validate license.");if(i.expiryTimestamp{const o=null!=r?r:g.K.getLicenseKey();if(b[e]&&b[e].key===o)return b[e].licenseVerifier;const i=e.includes("premium")?["premium"]:["pro","premium"],a=e.includes("premium")?"Premium":"Pro",s=m({releaseInfo:t,licenseKey:o,acceptedScopes:i});b[e]={key:o,licenseVerifier:s};const l=`@mui/${e}`;return s.status===d.Valid||(s.status===d.Invalid?y(["MUI: Invalid license key.","","Your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo.","","To solve the issue, you need to double check that `setLicenseKey()` is called with the right argument","Please check the license key installation https://mui.com/r/x-license-key-installation."]):s.status===d.OutOfScope?y(["MUI: License key plan mismatch.","","Your use of MUI X is not compatible with the plan of your license key. The feature you are trying to use is not included in the plan of your license key. This happens if you try to use `DataGridPremium` with a license key for the Pro plan.","","To solve the issue, you can upgrade your plan from Pro to Premium at https://mui.com/r/x-get-license?scope=premium.","Of if you didn't intend to use Premium features, you can replace the import of `@mui/x-data-grid-premium` with `@mui/x-data-grid-pro`."]):s.status===d.NotFound?function({plan:e,packageName:t}){y(["MUI: Missing license key.","",`The license key is missing. You might not be allowed to use \`${t}\` which is part of MUI X ${e}.`,"","To solve the issue, you can check the free trial conditions: https://mui.com/r/x-license-trial.","If you are eligible no actions are required. If you are not eligible to the free trial, you need to purchase a license https://mui.com/r/x-get-license or stop using the software immediately."])}({plan:a,packageName:l}):s.status===d.ExpiredAnnualGrace?function({plan:e,licenseKey:t,expiryTimestamp:r}){y(["MUI: Expired license key.","",`Your annual license key to use MUI X ${e}'s on non-production environments is expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(r)}`,`- Installed license key: ${t}`,""])}((0,n.A)({plan:a},s.meta)):s.status===d.ExpiredAnnual?function({plan:e,licenseKey:t,expiryTimestamp:r}){throw new Error(["MUI: Expired license key.","",`Your annual license key to use MUI X ${e}'s on non-production environments is expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(r)}`,`- Installed license key: ${t}`,""].join("\n"))}((0,n.A)({plan:a},s.meta)):s.status===d.ExpiredVersion&&function({packageName:e}){y(["MUI: Expired package version.","",`You have installed a version of \`${e}\` that is outside of the maintenance plan of your license key. By default, commercial licenses provide access to new versions released during the first year after the purchase.`,"","To solve the issue, you can renew your license https://mui.com/r/x-get-license or install an older version of the npm package that is compatible with your license key."])}({packageName:l})),s},[e,t,r])}var x=r("nKUr");function w(e){switch(e){case d.ExpiredAnnualGrace:case d.ExpiredAnnual:return"MUI X Expired license key";case d.ExpiredVersion:return"MUI X Expired package version";case d.Invalid:return"MUI X Invalid license key";case d.OutOfScope:return"MUI X License key plan mismatch";case d.NotFound:return"MUI X Missing license key";default:throw new Error("MUI: Unhandled MUI X license status.")}}function A(e){const{packageName:t,releaseInfo:r}=e,n=_(t,r);return n.status===d.Valid?null:(0,x.jsx)("div",{style:{position:"absolute",pointerEvents:"none",color:"#8282829e",zIndex:1e5,width:"100%",textAlign:"center",bottom:"50%",right:0,letterSpacing:5,fontSize:24},children:w(n.status)})}var S=r("hmGc"),C=r("yAU5");const E=o.createContext(void 0);function T(){const e=o.useContext(E);if(void 0===e)throw new Error(["MUI: Could not find the data grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join("\n"));return e}var I=r("3qeK");function k({privateApiRef:e,props:t,children:r}){const n=o.useRef(e.current.getPublicApi());return(0,x.jsx)(I.y.Provider,{value:t,children:(0,x.jsx)(E.Provider,{value:e,children:(0,x.jsx)(C.k.Provider,{value:n,children:r})})})}var M=r("Nlia"),R=r("juqV"),P=r("unMj"),O=r("aGM9"),D=r("N0rN"),L=r("XgeM"),N=r("2Qr1"),F=r("Vn7y"),z=r("7Cdf");const B={[`.${z.x.columnSeparator}, .${z.x["columnSeparator--resizing"]}`]:{visibility:"visible",width:"auto"}},j={[`& .${z.x.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${z.x.menuIcon}`]:{width:"auto",visibility:"visible"}},$=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${z.x.autoHeight}`]:t.autoHeight},{[`&.${z.x.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${z.x["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${z.x["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${z.x["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${z.x.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${z.x["root--disableUserSelection"]} .${z.x.cell}`]:t["root--disableUserSelection"]},{[`&.${z.x.autosizing}`]:t.autosizing},{[`& .${z.x.editBooleanCell}`]:t.editBooleanCell},{[`& .${z.x["cell--editing"]}`]:t["cell--editing"]},{[`& .${z.x["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${z.x["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${z.x["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${z.x["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${z.x.cell}`]:t.cell},{[`& .${z.x["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${z.x["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${z.x["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${z.x["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${z.x["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${z.x.cellContent}`]:t.cellContent},{[`& .${z.x.cellCheckbox}`]:t.cellCheckbox},{[`& .${z.x.cellSkeleton}`]:t.cellSkeleton},{[`& .${z.x.checkboxInput}`]:t.checkboxInput},{[`& .${z.x["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${z.x["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${z.x["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${z.x["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${z.x["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${z.x["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${z.x["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${z.x["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${z.x["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${z.x.columnHeader}`]:t.columnHeader},{[`& .${z.x.headerFilterRow}`]:t.headerFilterRow},{[`& .${z.x.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${z.x.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${z.x.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${z.x["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${z.x["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${z.x.columnSeparator}`]:t.columnSeparator},{[`& .${z.x.filterIcon}`]:t.filterIcon},{[`& .${z.x.iconSeparator}`]:t.iconSeparator},{[`& .${z.x.menuIcon}`]:t.menuIcon},{[`& .${z.x.menuIconButton}`]:t.menuIconButton},{[`& .${z.x.menuOpen}`]:t.menuOpen},{[`& .${z.x.menuList}`]:t.menuList},{[`& .${z.x["row--editable"]}`]:t["row--editable"]},{[`& .${z.x["row--editing"]}`]:t["row--editing"]},{[`& .${z.x["row--dragging"]}`]:t["row--dragging"]},{[`& .${z.x.row}`]:t.row},{[`& .${z.x.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${z.x.rowReorderCell}`]:t.rowReorderCell},{[`& .${z.x["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${z.x.sortIcon}`]:t.sortIcon},{[`& .${z.x.withBorderColor}`]:t.withBorderColor},{[`& .${z.x.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${z.x.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${z.x.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${z.x["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{const t=function(e){return e.vars?e.vars.palette.TableCell.border:"light"===e.palette.mode?(0,N.a)((0,N.X4)(e.palette.divider,1),.88):(0,N.e$)((0,N.X4)(e.palette.divider,1),.68)}(e),r=e.shape.borderRadius;return(0,n.A)({"--unstable_DataGrid-radius":"number"==typeof r?`${r}px`:r,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:(0,N.X4)(e.palette.background.default,e.palette.action.disabledOpacity),"--DataGrid-cellOffsetMultiplier":2,flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:t,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflowAnchor:"none",[`&.${z.x.autoHeight}`]:{height:"auto",[`& .${z.x["row--lastVisible"]} .${z.x.cell}`]:{borderBottomColor:"transparent"}},[`&.${z.x.autosizing}`]:{[`& .${z.x.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},[`& .${z.x.cell} > *`]:{overflow:"visible !important",whiteSpace:"nowrap"},[`& .${z.x.groupingCriteriaCell}`]:{width:"unset"},[`& .${z.x.treeDataGroupingCell}`]:{width:"unset"}},[`& .${z.x["virtualScrollerContent--overflowed"]} .${z.x["row--lastVisible"]} .${z.x.cell}`]:{borderBottomColor:"transparent"},[`& .${z.x.columnHeader}, & .${z.x.cell}`]:{WebkitTapHighlightColor:"transparent",lineHeight:null,padding:"0 10px",boxSizing:"border-box"},[`& .${z.x.columnHeader}:focus-within, & .${z.x.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:(0,N.X4)(e.palette.primary.main,.5)} 1px`,outlineWidth:1,outlineOffset:-1},[`& .${z.x.columnHeader}:focus, & .${z.x.cell}:focus`]:{outline:`solid ${e.palette.primary.main} 1px`},[`& .${z.x.columnHeaderCheckbox}, & .${z.x.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${z.x.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${z.x["columnHeader--sorted"]} .${z.x.iconButtonContainer}, & .${z.x["columnHeader--filtered"]} .${z.x.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${z.x.columnHeader}:not(.${z.x["columnHeader--sorted"]}) .${z.x.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${z.x.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden",position:"relative"},[`& .${z.x.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${z.x["columnHeader--filledGroup"]} .${z.x.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${z.x["columnHeader--filledGroup"]}.${z.x["columnHeader--showColumnBorder"]} .${z.x.columnHeaderTitleContainer}`]:{borderBottom:"none"},[`& .${z.x["columnHeader--filledGroup"]}.${z.x["columnHeader--showColumnBorder"]}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${z.x.headerFilterRow}`]:{borderTop:`1px solid ${t}`},[`& .${z.x.sortIcon}, & .${z.x.filterIcon}`]:{fontSize:"inherit"},[`& .${z.x["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${z.x["columnHeader--alignCenter"]} .${z.x.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${z.x["columnHeader--alignRight"]} .${z.x.columnHeaderDraggableContainer}, & .${z.x["columnHeader--alignRight"]} .${z.x.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${z.x["columnHeader--alignCenter"]} .${z.x.menuIcon}, & .${z.x["columnHeader--alignRight"]} .${z.x.menuIcon}`]:{marginRight:"auto",marginLeft:-6},[`& .${z.x["columnHeader--alignRight"]} .${z.x.menuIcon}, & .${z.x["columnHeader--alignRight"]} .${z.x.menuIcon}`]:{marginRight:"auto",marginLeft:-10},[`& .${z.x["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${z.x.columnSeparator}`]:{visibility:"hidden",position:"absolute",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"center",color:t},"@media (hover: hover)":{[`& .${z.x.columnHeaders}:hover`]:B,[`& .${z.x.columnHeader}:hover`]:j,[`& .${z.x.columnHeader}:not(.${z.x["columnHeader--sorted"]}):hover .${z.x.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${z.x.columnHeaders}`]:B,[`& .${z.x.columnHeader}`]:j},[`& .${z.x["columnSeparator--sideLeft"]}`]:{left:-12},[`& .${z.x["columnSeparator--sideRight"]}`]:{right:-12},[`& .${z.x["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none","&:hover":{color:(e.vars||e).palette.text.primary,"@media (hover: none)":{color:t}},[`&.${z.x["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.text.primary},"& svg":{pointerEvents:"none"}},[`& .${z.x.iconSeparator}`]:{color:"inherit"},[`& .${z.x.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-10,display:"flex",alignItems:"center"},[`.${z.x.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${z.x.row}`]:{display:"flex",width:"fit-content",breakInside:"avoid","&:hover, &.Mui-hovered":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(\n ${e.vars.palette.action.selectedOpacity} + \n ${e.vars.palette.action.hoverOpacity}\n ))`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`& .${z.x.cell}`]:{display:"flex",alignItems:"center",borderBottom:"1px solid","&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity+e.palette.action.hoverOpacity})`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`&.${z.x["root--disableUserSelection"]} .${z.x.cell}`]:{userSelect:"none"},[`& .${z.x.row}:not(.${z.x["row--dynamicHeight"]}) > .${z.x.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${z.x.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${z.x.cell}.${z.x["cell--selectionMode"]}`]:{cursor:"default"},[`& .${z.x.cell}.${z.x["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`solid ${(e.vars||e).palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${z.x["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${z.x["row--editing"]} .${z.x.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${z.x.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${z.x.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${z.x.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${z.x.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${z.x.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${z.x["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${z.x.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`.${z.x.withBorderColor}`]:{borderColor:t},[`& .${z.x["cell--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${z.x["columnHeader--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${z.x["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${z.x["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${z.x["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${z.x.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${z.x.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${z.x["columnHeader--dragging"]}, & .${z.x["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${z.x["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${z.x.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${z.x.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${z.x.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${z.x.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${z.x.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)}})});var U=r("FltU"),V=r("gYIS"),H=r("ebfa"),G=r("GPgX");const W=e=>e.columnGrouping,q=(0,G.S)(W,e=>{var t;return null!=(t=null==e?void 0:e.unwrappedGroupingModel)?t:{}}),Z=(0,G.S)(W,e=>{var t;return null!=(t=null==e?void 0:e.lookup)?t:{}}),Y=(0,G.S)(W,e=>{var t;return null!=(t=null==e?void 0:e.headerStructure)?t:[]}),X=(0,G.Mz)(W,e=>{var t;return null!=(t=null==e?void 0:e.maxDepth)?t:0});var K=r("VV28");const J=()=>{var e;const t=T(),r=(0,U.A)(),n=(0,S.N)(t,H.iv),o=(0,S.N)(t,K.H0),i=(0,S.N)(t,X),a=(0,S.N)(t,K.OQ);let s="grid";return null!=(e=r.experimentalFeatures)&&e.ariaV7&&r.treeData&&(s="treegrid"),{role:s,"aria-colcount":n.length,"aria-rowcount":i+1+a+o,"aria-multiselectable":!r.disableMultipleRowSelection}},Q=["children","className"],ee=o.forwardRef(function(e,t){var r;const i=(0,U.A)(),{children:a,className:s}=e,l=(0,M.A)(e,Q),c=T(),u=(0,S.N)(c,V.BC),d=o.useRef(null),f=(0,D.A)(d,t),p=null!=(r=i.experimentalFeatures)&&r.ariaV7?null:J,h="function"==typeof p?p():null,m=(0,n.A)({},i,{density:u}),g=(e=>{const{autoHeight:t,density:r,classes:n}=e,o={root:["root",t&&"autoHeight",`root--density${(0,P.A)(r)}`,"withBorderColor"]};return(0,O.A)(o,z.B,n)})(m);c.current.register("public",{rootElementRef:d});const[y,v]=o.useState(!1);return(0,L.A)(()=>{v(!0)},[]),y?(0,x.jsx)($,(0,n.A)({ref:f,className:(0,R.A)(s,g.root),ownerState:m},h,l,{children:a})):null});function te(){var e,t;const r=(0,U.A)();return(0,x.jsxs)(o.Fragment,{children:[(0,x.jsx)(r.slots.preferencesPanel,(0,n.A)({},null==(e=r.slotProps)?void 0:e.preferencesPanel)),r.slots.toolbar&&(0,x.jsx)(r.slots.toolbar,(0,n.A)({},null==(t=r.slotProps)?void 0:t.toolbar))]})}var re=r("M82X");const ne=(0,re.A)("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})(()=>({position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"})),oe=o.forwardRef((e,t)=>{var r;const o=(0,U.A)(),i=(e=>{const{classes:t}=e;return(0,O.A)({root:["main"]},z.B,t)})(o),a=null!=(r=o.experimentalFeatures)&&r.ariaV7?J:null,s="function"==typeof a?a():null;return(0,x.jsx)(ne,(0,n.A)({ref:t,className:i.root,ownerState:o},s,{children:e.children}))});var ie=r("m0sr"),ae=r("ZmDP"),se=r("pwQ8");const le=e=>e.columnMenu;function ce(e){const{VirtualScrollerComponent:t,ColumnHeadersProps:r,children:i}=e,a=T(),s=(0,U.A)(),l=o.useRef(null),c=(0,S.N)(a,H.iv),u=(0,S.N)(a,ie.od),d=(0,S.N)(a,ae.oF),f=(0,S.N)(a,H.Sw),p=(0,S.N)(a,se.Kr),h=(0,S.N)(a,se.H5),m=(0,S.N)(a,se.gn),g=(0,S.N)(a,se.rj),y=(0,S.N)(a,se.xv),v=(0,S.N)(a,V.rf),b=(0,S.N)(a,X),_=(0,S.N)(a,le),w=(0,S.N)(a,H.FY),A=(0,S.N)(a,Y),C=!(null===m&&null===p&&null===h);(0,L.A)(()=>{a.current.computeSizeAndPublishResizeEvent();const e=l.current;if("undefined"==typeof ResizeObserver)return()=>{};let t;const r=new ResizeObserver(()=>{t=requestAnimationFrame(()=>{a.current.computeSizeAndPublishResizeEvent()})});return e&&r.observe(e),()=>{t&&window.cancelAnimationFrame(t),e&&r.unobserve(e)}},[a]);const E=o.useRef(null),I=o.useRef(null),k=o.useRef(null);a.current.register("private",{columnHeadersContainerElementRef:I,columnHeadersElementRef:E,virtualScrollerRef:k,mainElementRef:l});const M=!!a.current.getRootDimensions();return(0,x.jsxs)(oe,{ref:l,children:[(0,x.jsx)(s.slots.columnHeaders,(0,n.A)({ref:I,innerRef:E,visibleColumns:c,filterColumnLookup:u,sortColumnLookup:d,columnPositions:f,columnHeaderTabIndexState:p,columnGroupHeaderTabIndexState:m,columnHeaderFocus:g,columnGroupHeaderFocus:y,densityFactor:v,headerGroupingMaxDepth:b,columnMenuState:_,columnVisibility:w,columnGroupsHeaderStructure:A,hasOtherElementInTabSequence:C},r)),M&&(0,x.jsx)(t,{ref:k}),i]})}function ue(){var e;const t=(0,U.A)();return t.hideFooter?null:(0,x.jsx)(t.slots.footer,(0,n.A)({},null==(e=t.slotProps)?void 0:e.footer))}var de=r("XVIy");function fe(e,t,r){const n=o.useRef(!0);o.useEffect(()=>{n.current=!1,e.current.register(r,t)},[e,r,t]),n.current&&e.current.register(r,t)}const pe=(0,de.s3)()&&null!=window.localStorage.getItem("DEBUG"),he=()=>{},me={debug:he,info:he,warn:he,error:he},ge=["debug","info","warn","error"];function ye(e,t,r=console){const n=ge.indexOf(t);if(-1===n)throw new Error(`MUI: Log level ${t} not recognized.`);return ge.reduce((t,o,i)=>(t[o]=i>=n?(...t)=>{const[n,...i]=t;r[o](`MUI: ${e} - ${n}`,...i)}:he,t),{})}class ve{static create(e){return new ve(e)}constructor(e){this.value=void 0,this.listeners=void 0,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.value,this.update=e=>{this.value=e,this.listeners.forEach(t=>t(e))},this.value=e,this.listeners=new Set}}var be=r("DQ/6");class _e{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t,r={}){let n=this.events[e];n||(n={highPriority:new Map,regular:new Map},this.events[e]=n),r.isFirst?n.highPriority.set(t,!0):n.regular.set(t,!0)}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const r=this.events[e];if(!r)return;const n=Array.from(r.highPriority.keys()),o=Array.from(r.regular.keys());for(let e=n.length-1;e>=0;e-=1){const o=n[e];r.highPriority.has(o)&&o.apply(this,t)}for(let e=0;e{const r=function(e,t){const r=o.useRef(),n=o.useRef();n.current||(n.current=function(e){var t;const r=null==(t=e.current)?void 0:t[xe];if(r)return r;const n={},o={state:n,store:ve.create(n),instanceId:{id:we}};return we+=1,o.getPublicApi=()=>e.current,o.register=(t,r)=>{Object.keys(r).forEach(n=>{const i=r[n],a=o[n];if(!0===(null==a?void 0:a.spying)?a.target=i:o[n]=i,"public"===t){const t=e.current,r=t[n];!0===(null==r?void 0:r.spying)?r.target=i:t[n]=i}})},o.register("private",{caches:{},eventManager:new _e}),o}(r)),r.current||(r.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[xe]:e.current}}(n));const i=o.useCallback((...e)=>{const[r,o,i={}]=e;if(i.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(i)&&i.isPropagationStopped())return;const a=t.signature===be.HV.DataGridPro?{api:n.current.getPublicApi()}:{};n.current.eventManager.emit(r,o,i,a)},[n,t.signature]),a=o.useCallback((e,t,r)=>{n.current.eventManager.on(e,t,r);const o=n.current;return()=>{o.eventManager.removeListener(e,t)}},[n]);return fe(n,{subscribeEvent:a,publishEvent:i},"public"),o.useImperativeHandle(e,()=>r.current,[r]),o.useEffect(()=>{const e=n.current;return()=>{e.publishEvent("unmount")}},[n]),n}(e,t);return((e,t)=>{fe(e,{getLogger:o.useCallback(e=>pe?ye(e,"debug",t.logger):t.logLevel?ye(e,t.logLevel.toString(),t.logger):me,[t.logLevel,t.logger])},"private")})(r,t),((e,t)=>{const r=o.useRef({}),[,i]=o.useState(),a=o.useCallback(e=>{r.current[e.stateId]=e},[]),s=o.useCallback((n,o)=>{let i;if(i=(0,de.Tn)(n)?n(e.current.state):n,e.current.state===i)return!1;let a=!1;const s=[];if(Object.keys(r.current).forEach(t=>{const n=r.current[t],o=n.stateSelector(e.current.state,e.current.instanceId),l=n.stateSelector(i,e.current.instanceId);l!==o&&(s.push({stateId:n.stateId,hasPropChanged:l!==n.propModel}),void 0!==n.propModel&&l!==n.propModel&&(a=!0))}),s.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${s[0].stateId}, therefore, you're not allowed to update ${s.map(e=>e.stateId).join(", ")} in the same transaction.`);if(a||(e.current.state=i,e.current.publishEvent&&e.current.publishEvent("stateChange",i),e.current.store.update(i)),1===s.length){const{stateId:n,hasPropChanged:l}=s[0],c=r.current[n],u=c.stateSelector(i,e.current.instanceId);if(c.propOnChange&&l){const r=t.signature===be.HV.DataGridPro?{api:e.current,reason:o}:{reason:o};c.propOnChange(u,r)}a||e.current.publishEvent(c.changeEvent,u,{reason:o})}return!a},[e,t.signature]),l=o.useCallback((t,r,o)=>e.current.setState(e=>(0,n.A)({},e,{[t]:r(e[t])}),o),[e]),c=o.useCallback(()=>i(()=>e.current.state),[e]),u={updateControlState:l,registerControlState:a};fe(e,{setState:s,forceUpdate:c},"public"),fe(e,u,"private")})(r,t),(e=>{const t=o.useRef({}),r=o.useRef(!1),n=o.useCallback(e=>{!r.current&&e&&(r.current=!0,Object.values(e.appliers).forEach(e=>{e()}),r.current=!1)},[]),i=o.useCallback((e,r,o)=>{t.current[e]||(t.current[e]={processors:new Map,appliers:{}});const i=t.current[e];return i.processors.get(r)!==o&&(i.processors.set(r,o),n(i)),()=>{t.current[e].processors.set(r,null)}},[n]),a=o.useCallback((e,r,n)=>(t.current[e]||(t.current[e]={processors:new Map,appliers:{}}),t.current[e].appliers[r]=n,()=>{const n=t.current[e].appliers,o=(0,M.A)(n,[r].map(Ae.A));t.current[e].appliers=o}),[]),s=o.useCallback(e=>{const r=t.current[e];n(r)},[n]),l={unstable_applyPipeProcessors:o.useCallback((...e)=>{const[r,n,o]=e;return t.current[r]?Array.from(t.current[r].processors.values()).reduce((e,t)=>t?t(e,o):e,n):n},[])};fe(e,{registerPipeProcessor:i,registerPipeApplier:a,requestPipeProcessorsApplication:s},"private"),fe(e,l,"public")})(r),(e=>{const t=o.useRef(new Map),r=o.useRef({}),n=o.useCallback((t,n,o)=>{const i=()=>{const e=r.current[n],o=(0,M.A)(e,[t].map(Ae.A));r.current[n]=o};r.current[n]||(r.current[n]={});const a=r.current[n],s=a[t];return a[t]=o,s&&s!==o?(t===e.current.getActiveStrategy(Ce[n])&&e.current.publishEvent("activeStrategyProcessorChange",n),i):i},[e]),i=o.useCallback((t,n)=>{const o=e.current.getActiveStrategy(Ce[t]);if(null==o)throw new Error("Can't apply a strategy processor before defining an active strategy");const i=r.current[t];if(!i||!i[o])throw new Error(`No processor found for processor "${t}" on strategy "${o}"`);return(0,i[o])(n)},[e]),a=o.useCallback(e=>{var r;const n=Array.from(t.current.entries()).find(([,t])=>t.group===e&&t.isAvailable());return null!=(r=null==n?void 0:n[0])?r:Se},[]),s=o.useCallback((r,n,o)=>{t.current.set(n,{group:r,isAvailable:o}),e.current.publishEvent("strategyAvailabilityChange")},[e]);fe(e,{registerStrategyProcessor:n,applyStrategyProcessor:i,getActiveStrategy:a,setStrategyAvailability:s},"private")})(r),((e,t)=>{const r=o.useCallback(e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]},[t.localeText]);e.current.register("public",{getLocaleText:r})})(r,t),r.current.register("private",{rootProps:t}),r},Te=e=>{const t=o.useRef(!0);t.current&&(t.current=!1,e())},Ie=(e,t,r)=>{const n=o.useRef(),i=o.useRef(`mui-${Math.round(1e9*Math.random())}`),a=o.useCallback(()=>{n.current=e.current.registerPipeProcessor(t,i.current,r)},[e,r,t]);Te(()=>{a()});const s=o.useRef(!0);o.useEffect(()=>(s.current?s.current=!1:a(),()=>{n.current&&(n.current(),n.current=null)}),[a])};var ke=r("0O0b");const Me=(e,t,r,n)=>{const i=o.useCallback(()=>{e.current.registerStrategyProcessor(t,r,n)},[e,n,r,t]);Te(()=>{i()});const a=o.useRef(!0);o.useEffect(()=>{a.current?a.current=!1:i()},[i])};var Re=r("S6m6");const Pe=e=>"full"===e.updates.type?(e=>{const t={[Re.OL]:(0,n.A)({},(0,Re.Mk)(),{children:e})};for(let r=0;r{const r=(0,n.A)({},e),o={};for(let e=0;e!o[e])),r[Re.OL]=(0,n.A)({},i,{children:a}),{groupingName:Se,tree:r,treeDepths:{0:a.length},dataRowIds:a}})({previousTree:e.previousTree,actions:e.updates.actions}),Oe=(e,t,r)=>{const n=o.useRef(!1);n.current||(t.current.state=e(t.current.state,r,t),n.current=!0)};function De(e,t){const r=o.useRef(null);if(r.current)return r.current;const n=e.current.getLogger(t);return r.current=n,n}const Le=e=>(0,n.A)({},e,{headerFiltering:{editing:null,menuOpen:null}});var Ne=r("P+14"),Fe=r("72m/"),ze=r("iWgU"),Be=r("IXjO"),je=r("UnQg"),$e=r("A3c4"),Ue=r("zX2i"),Ve=r("UVCh"),He=r("G43+"),Ge=r("usZy"),We=r("EQ6w");const qe=["open","target","onClose","children","position","className","onExited"],Ze=(0,F.Ay)(Ge.A,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${z.x.menuList}`]:{outline:0}})),Ye={"bottom-start":"top left","bottom-end":"top right"};function Xe(e){var t;const{open:r,target:i,onClose:a,children:s,position:l,className:c,onExited:u}=e,d=(0,M.A)(e,qe),f=(0,We.h)(),p=(0,U.A)(),h=(e=>{const{classes:t}=e;return(0,O.A)({root:["menu"]},z.B,t)})(p),m=o.useRef(null);(0,L.A)(()=>{var e,t;r?m.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(null==(e=m.current)||null==(t=e.focus)||t.call(e),m.current=null)},[r]),o.useEffect(()=>{const e=r?"menuOpen":"menuClose";f.current.publishEvent(e,{target:i})},[f,r,i]);const g=e=>{e.target&&(i===e.target||null!=i&&i.contains(e.target))||a(e)};return(0,x.jsx)(Ze,(0,n.A)({as:p.slots.basePopper,className:(0,R.A)(c,h.root),ownerState:p,open:r,anchorEl:i,transition:!0,placement:l},d,null==(t=p.slotProps)?void 0:t.basePopper,{children:({TransitionProps:e,placement:t})=>{return(0,x.jsx)(Ue.x,{onClickAway:g,mouseEvent:"onMouseDown",children:(0,x.jsx)(Ve.A,(0,n.A)({},e,{style:{transformOrigin:Ye[t]},onExited:(r=null==e?void 0:e.onExited,e=>{r&&r(),u&&u(e)}),children:(0,x.jsx)(He.A,{children:s})}))});var r}}))}const Ke=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"];function Je(e){var t;const{colDef:r,id:i,hasFocus:a,tabIndex:s,position:l="bottom-end",focusElementRef:c}=e,u=(0,M.A)(e,Ke),[d,f]=o.useState(-1),[p,h]=o.useState(!1),m=(0,We.h)(),g=o.useRef(null),y=o.useRef(null),v=o.useRef(!1),b=o.useRef({}),_=(0,je.A)(),w=(0,$e.A)(),A=(0,$e.A)(),S=(0,U.A)();if(!(e=>"function"==typeof e.getActions)(r))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");const C=r.getActions(m.current.getRowParams(i)),E=C.filter(e=>!e.props.showInMenu),T=C.filter(e=>e.props.showInMenu),I=E.length+(T.length?1:0);o.useLayoutEffect(()=>{a||Object.entries(b.current).forEach(([e,t])=>{null==t||t.stop({},()=>{delete b.current[e]})})},[a]),o.useEffect(()=>{d<0||!g.current||d>=g.current.children.length||g.current.children[d].focus({preventScroll:!0})},[d]),o.useEffect(()=>{a||(f(-1),v.current=!1)},[a]),o.useImperativeHandle(c,()=>({focus(){if(!v.current){const e=C.findIndex(e=>!e.props.disabled);f(e)}}}),[C]),o.useEffect(()=>{d>=I&&f(I-1)},[d,I]);const k=()=>{h(!1)},R=e=>t=>{b.current[e]=t},P=(e,t)=>r=>{f(e),v.current=!0,t&&t(r)};return(0,x.jsxs)("div",(0,n.A)({role:"menu",ref:g,tabIndex:-1,className:z.x.actionsCell,onKeyDown:e=>{if(I<=1)return;const t=(e,r)=>{var n;if(e<0||e>C.length)return e;const o=("left"===r?-1:1)*("rtl"===_.direction?-1:1);return null!=(n=C[e+o])&&n.props.disabled?t(e+o,r):e+o};let r=d;"ArrowRight"===e.key?r=t(d,"right"):"ArrowLeft"===e.key&&(r=t(d,"left")),r<0||r>=I||r!==d&&(e.preventDefault(),e.stopPropagation(),f(r))}},u,{children:[E.map((e,t)=>o.cloneElement(e,{key:t,touchRippleRef:R(t),onClick:P(t,e.props.onClick),tabIndex:d===t?s:-1})),T.length>0&&A&&(0,x.jsx)(S.slots.baseIconButton,(0,n.A)({ref:y,id:A,"aria-label":m.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?w:void 0,role:"menuitem",size:"small",onClick:()=>{h(!0),f(I-1),v.current=!0},touchRippleRef:R(A),tabIndex:d===E.length?s:-1},null==(t=S.slotProps)?void 0:t.baseIconButton,{children:(0,x.jsx)(S.slots.moreActionsIcon,{fontSize:"small"})})),T.length>0&&(0,x.jsx)(Xe,{open:p,target:y.current,position:l,onClose:k,children:(0,x.jsx)(Be.A,{id:w,className:z.x.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Escape"].includes(e.key)&&k()},"aria-labelledby":A,variant:"menu",autoFocusItem:!0,children:T.map((e,t)=>o.cloneElement(e,{key:t,closeMenu:k}))})})]}))}const Qe="actions",et=(0,n.A)({},ze.C,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>(0,x.jsx)(Je,(0,n.A)({},e)),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0});var tt=function(e){return e.Cell="cell",e.Row="row",e}(tt||{}),rt=function(e){return e.Edit="edit",e.View="view",e}(rt||{}),nt=function(e){return e.Edit="edit",e.View="view",e}(nt||{}),ot=r("gBcZ");const it=(e,t)=>{let r,n;return t.pagination&&"client"===t.paginationMode?(n=(0,Fe.vd)(e),r=(0,Fe.Q8)(e)):(r=(0,ie.em)(e),n=0===r.length?null:{firstRowIndex:0,lastRowIndex:r.length-1}),{rows:r,range:n}},at=(e,t)=>{const r=it(e,t);return o.useMemo(()=>({rows:r.rows,range:r.range}),[r.rows,r.range])},st="__detail_panel_toggle__";function lt(e,t){return e.closest(`.${t}`)}function ct(e){return e.replace(/["\\]/g,"\\$&")}function ut(e){return`.${z.x.row}[data-id="${ct(String(e))}"]`}function dt(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}const ft=(e,t)=>null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],pt=(e,t)=>{var r;return(0,n.A)({},e,{rowSelection:t.rowSelection&&null!=(r=ft(t.rowSelectionModel))?r:[]})},ht=(e,t,r)=>{const n=o.useRef(),i=o.useRef(`mui-${Math.round(1e9*Math.random())}`),a=o.useCallback(()=>{n.current=e.current.registerPipeApplier(t,i.current,r)},[e,r,t]);Te(()=>{a()});const s=o.useRef(!0);o.useEffect(()=>(s.current?s.current=!1:a(),()=>{n.current&&(n.current(),n.current=null)}),[a])};var mt=r("ULoK"),gt=r("B8tz"),yt=r("C8ES"),vt=r("xLAl");const bt=e=>null==e?null:Number(e),_t=(0,vt.YB)(e=>null==e||Number.isNaN(e)||""===e?null:t=>bt(t)===bt(e)),xt=(0,n.A)({},ze.C,{type:"number",align:"right",headerAlign:"right",sortComparator:mt.Ou,valueParser:e=>""===e?null:Number(e),valueFormatter:({value:e})=>(0,de.Et)(e)?e.toLocaleString():e||"",filterOperators:(0,vt.eW)([{value:"=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>bt(t)===e.value,InputComponent:gt.y,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>bt(t)!==e.value,InputComponent:gt.y,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&bt(t)>e.value,InputComponent:gt.y,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&bt(t)>=e.value,InputComponent:gt.y,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&bt(t)null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&bt(t)<=e.value,InputComponent:gt.y,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:yt.M,InputComponentProps:{type:"number"}}]),getApplyQuickFilterFn:(0,vt.UD)(_t),getApplyQuickFilterFnV7:_t});var wt=r("Ilr6"),At=r("kmWS");const St=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],Ct=(0,F.Ay)(At.Ay)({fontSize:"inherit"});function Et(e){const{id:t,value:r,field:i,colDef:a,hasFocus:s,inputProps:l,onValueChange:c}=e,u=(0,M.A)(e,St),d="dateTime"===a.type,f=(0,We.h)(),p=o.useRef(),h=o.useMemo(()=>{let e,t;return e=null==r?null:r instanceof Date?r:new Date((null!=r?r:"").toString()),t=null==e||Number.isNaN(e.getTime())?"":new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,d?16:10),{parsed:e,formatted:t}},[r,d]),[m,g]=o.useState(h),y=(e=>{const{classes:t}=e;return(0,O.A)({root:["editInputCell"]},z.B,t)})({classes:(0,U.A)().classes}),v=o.useCallback(e=>{if(""===e)return null;const[t,r]=e.split("T"),[n,o,i]=t.split("-"),a=new Date;if(a.setFullYear(Number(n),Number(o)-1,Number(i)),a.setHours(0,0,0,0),r){const[e,t]=r.split(":");a.setHours(Number(e),Number(t),0,0)}return a},[]),b=o.useCallback(async e=>{const r=e.target.value,n=v(r);c&&await c(e,n),g({parsed:n,formatted:r}),f.current.setEditCellValue({id:t,field:i,value:n},e)},[f,i,t,c,v]);return o.useEffect(()=>{g(e=>{var t,r;return h.parsed!==e.parsed&&(null==(t=h.parsed)?void 0:t.getTime())!==(null==(r=e.parsed)?void 0:r.getTime())?h:e})},[h]),(0,L.A)(()=>{s&&p.current.focus()},[s]),(0,x.jsx)(Ct,(0,n.A)({inputRef:p,fullWidth:!0,className:y.root,type:d?"datetime-local":"date",inputProps:(0,n.A)({max:d?"9999-12-31T23:59":"9999-12-31"},l),value:m.formatted,onChange:b},u))}const Tt=e=>(0,x.jsx)(Et,(0,n.A)({},e));function It({value:e,columnType:t,rowId:r,field:n}){if(!(e instanceof Date))throw new Error([`MUI: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${r}, field: "${n}".`].join("\n"))}const kt=(0,n.A)({},ze.C,{type:"date",sortComparator:mt.VE,valueFormatter:function({value:e,field:t,id:r}){return e?(It({value:e,columnType:"date",rowId:r,field:t}),e.toLocaleDateString()):""},filterOperators:(0,wt.Q)(),renderEditCell:Tt,pastedValueParser:e=>new Date(e)}),Mt=(0,n.A)({},ze.C,{type:"dateTime",sortComparator:mt.VE,valueFormatter:function({value:e,field:t,id:r}){return e?(It({value:e,columnType:"dateTime",rowId:r,field:t}),e.toLocaleString()):""},filterOperators:(0,wt.Q)(!0),renderEditCell:Tt,pastedValueParser:e=>new Date(e)});var Rt=r("XkTT"),Pt=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(Pt||{}),Ot=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Ot||{}),Dt=r("QnE+");const Lt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","getOptionLabel","getOptionValue"],Nt=["MenuProps"];function Ft(e){var t,r,i;const a=(0,U.A)(),{id:s,value:l,field:c,row:u,colDef:d,hasFocus:f,error:p,onValueChange:h,initialOpen:m=a.editMode===tt.Cell,getOptionLabel:g,getOptionValue:y}=e,v=(0,M.A)(e,Lt),b=(0,We.h)(),_=o.useRef(),w=o.useRef(),[A,S]=o.useState(m),C=null!=(r=((null==(t=a.slotProps)?void 0:t.baseSelect)||{}).native)&&r,E=(null==(i=a.slotProps)?void 0:i.baseSelect)||{},{MenuProps:T}=E,I=(0,M.A)(E,Nt);if((0,L.A)(()=>{var e;f&&(null==(e=w.current)||e.focus())},[f]),!(0,Dt._W)(d))return null;let k;if(k="function"==typeof(null==d?void 0:d.valueOptions)?null==d?void 0:d.valueOptions({id:s,row:u,field:c}):null==d?void 0:d.valueOptions,!k)return null;const R=y||d.getOptionValue,P=g||d.getOptionLabel;return k&&d?(0,x.jsx)(a.slots.baseSelect,(0,n.A)({ref:_,inputRef:w,value:l,onChange:async e=>{if(!(0,Dt._W)(d)||!k)return;S(!1);const t=e.target,r=(0,Dt.Rc)(t.value,k,R);h&&await h(e,r),await b.current.setEditCellValue({id:s,field:c,value:r},e)},open:A,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||S(!0)},MenuProps:(0,n.A)({onClose:(e,t)=>{if(a.editMode!==tt.Row){if("backdropClick"===t||(0,ot.nx)(e.key)){const t=b.current.getCellParams(s,c);b.current.publishEvent("cellEditStop",(0,n.A)({},t,{reason:(0,ot.nx)(e.key)?Ot.escapeKeyDown:Ot.cellFocusOut}))}}else S(!1)}},T),error:p,native:C,fullWidth:!0},v,I,{children:k.map(e=>{var t;const r=R(e);return(0,o.createElement)(a.slots.baseSelectOption,(0,n.A)({},(null==(t=a.slotProps)?void 0:t.baseSelectOption)||{},{native:C,key:r,value:r}),P(e))})})):null}var zt=r("5NNo");const Bt=(0,n.A)({},ze.C,{type:"singleSelect",getOptionLabel:e=>(0,de.Gv)(e)?e.label:String(e),getOptionValue:e=>(0,de.Gv)(e)?e.value:e,valueFormatter(e){const{id:t,field:r,value:n,api:o}=e,i=e.api.getColumn(r);if(!(0,Dt._W)(i))return"";let a;if(a="function"==typeof i.valueOptions?i.valueOptions({id:t,row:t?o.getRow(t):null,field:r}):i.valueOptions,null==n)return"";if(!a)return n;if("object"!=typeof a[0])return i.getOptionLabel(n);const s=a.find(e=>i.getOptionValue(e)===n);return s?i.getOptionLabel(s):""},renderEditCell:e=>(0,x.jsx)(Ft,(0,n.A)({},e)),filterOperators:(0,zt.m)(),pastedValueParser:(e,t)=>{const r=t.colDef,n=r.valueOptions,o="function"==typeof n?n({field:r.field}):n||[],i=r.getOptionValue;if(o.find(t=>i(t)===e))return e}}),jt="__default__",$t=["maxWidth","minWidth","width","flex"],Ut=(e,t)=>{const r={};let o=0,i=0;const a=[];e.orderedFields.forEach(t=>{const s=(0,n.A)({},e.lookup[t]);if(!1===e.columnVisibilityModel[t])s.computedWidth=0;else{let e;s.flex&&s.flex>0?(o+=s.flex,e=0,a.push(s)):e=(0,de.qE)(s.width||ze.C.width,s.minWidth||ze.C.minWidth,s.maxWidth||ze.C.maxWidth),i+=e,s.computedWidth=e}r[t]=s});const s=Math.max(t-i,0);if(o>0&&t>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:r}){const n=new Set(r.map(e=>e.field)),o={all:{},frozenFields:[],freeze:e=>{const t=o.all[e];t&&!0!==t.frozen&&(o.all[e].frozen=!0,o.frozenFields.push(e))}};return function i(){if(o.frozenFields.length===n.size)return;const a={min:{},max:{}};let s=e,l=t,c=0;o.frozenFields.forEach(e=>{s-=o.all[e].computedWidth,l-=o.all[e].flex});for(let e=0;et.maxWidth&&(c+=t.maxWidth-n,n=t.maxWidth,a.max[t.field]=!0),o.all[t.field]={frozen:!1,computedWidth:n,flex:t.flex}}c<0?Object.keys(a.max).forEach(e=>{o.freeze(e)}):c>0?Object.keys(a.min).forEach(e=>{o.freeze(e)}):r.forEach(({field:e})=>{o.freeze(e)}),i()}(),o.all}({initialFreeSpace:s,totalFlexUnits:o,flexColumns:a});Object.keys(e).forEach(t=>{r[t].computedWidth=e[t].computedWidth})}return(0,n.A)({},e,{lookup:r})};function Vt(e,t){let r=e[jt];return t&&e[t]&&(r=e[t]),r}const Ht=({apiRef:e,columnsToUpsert:t,initialState:r,columnTypes:o,columnVisibilityModel:i=(0,H.FY)(e),keepOnlyColumnsToUpsert:a=!1})=>{var s,l,c;const u=!e.current.state.columns;let d;if(u)d={orderedFields:[],lookup:{},columnVisibilityModel:i};else{const t=(0,H.em)(e.current.state);d={orderedFields:a?[]:[...t.orderedFields],lookup:(0,n.A)({},t.lookup),columnVisibilityModel:i}}let f={};a&&!u&&(f=Object.keys(d.lookup).reduce((e,t)=>(0,n.A)({},e,{[t]:!1}),{}));const p={};t.forEach(e=>{const{field:t}=e;p[t]=!0,f[t]=!0;let r=d.lookup[t];null==r?(r=(0,n.A)({},Vt(o,e.type),{field:t,hasBeenResized:!1}),d.orderedFields.push(t)):a&&d.orderedFields.push(t),r&&r.type!==e.type&&(r=(0,n.A)({},Vt(o,e.type),{field:t}));let i=r.hasBeenResized;$t.forEach(t=>{void 0!==e[t]&&(i=!0,-1===e[t]&&(e[t]=1/0))}),d.lookup[t]=(0,n.A)({},r,e,{hasBeenResized:i})}),a&&!u&&Object.keys(d.lookup).forEach(e=>{f[e]||delete d.lookup[e]});const h=((e,t)=>{if(!t)return e;const{orderedFields:r=[],dimensions:o={}}=t,i=Object.keys(o);if(0===i.length&&0===r.length)return e;const a={},s=[];for(let t=0;t!a[e])],c=(0,n.A)({},e.lookup);for(let e=0;e{r[e]=-1===t?1/0:t}),c[t]=r}return(0,n.A)({},e,{orderedFields:l,lookup:c})})(e.current.unstable_applyPipeProcessors("hydrateColumns",d),r);return Ut(h,null!=(s=null==(l=(c=e.current).getRootDimensions)||null==(l=l.call(c))?void 0:l.viewportInnerSize.width)?s:0)},Gt=e=>t=>(0,n.A)({},t,{columns:e});function Wt({firstColumnToRender:e,apiRef:t,firstRowToRender:r,lastRowToRender:n,visibleRows:o}){let i=e;for(let a=r;a{var o,i,a,s;const l=Ht({apiRef:r,columnTypes:Xt,columnsToUpsert:t.columns,initialState:null==(o=t.initialState)?void 0:o.columns,columnVisibilityModel:null!=(i=null!=(a=t.columnVisibilityModel)?a:null==(s=t.initialState)||null==(s=s.columns)?void 0:s.columnVisibilityModel)?i:{},keepOnlyColumnsToUpsert:!0});return(0,n.A)({},e,{columns:l})};var Jt=r("Br4D");const Qt=(e,t,r)=>(r.current.caches.rows=(0,Re.Z)({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),(0,n.A)({},e,{rows:(0,Re.TW)({apiRef:r,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:null,previousTreeDepths:null})}));var er=r("nXnS");const tr=e=>e.editRows;var rr=r("gkz3");const nr=["id","field"],or=["id","field"],ir=(0,rr.f)(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error");var ar=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(ar||{}),sr=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(sr||{});const lr=["id"],cr=["id"],ur=(0,rr.f)(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),dr=e=>(0,n.A)({},e,{editRows:{}});var fr=r("p4lV");const pr=e=>(0,n.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),hr=(e,t)=>{var r,o,i;const a=null!=(r=null!=(o=t.sortModel)?o:null==(i=t.initialState)||null==(i=i.sorting)?void 0:i.sortModel)?r:[];return(0,n.A)({},e,{sorting:{sortModel:(0,mt.Zx)(a,t.disableMultipleColumnsSorting),sortedRows:[]}})},mr=e=>e.preferencePanel,gr=(e,t)=>{var r,o;return(0,n.A)({},e,{preferencePanel:null!=(r=null==(o=t.initialState)?void 0:o.preferencePanel)?r:{open:!1}})};var yr=r("EsgF"),vr=r("v+Lp"),br=r("/8PD"),_r=r("io7V");const xr=(e,t,r)=>{var o,i,a;const s=null!=(o=null!=(i=t.filterModel)?i:null==(a=t.initialState)||null==(a=a.filter)?void 0:a.filterModel)?o:(0,br.T)();return(0,n.A)({},e,{filter:{filterModel:(0,_r.L5)(s,t.disableMultipleColumnsFiltering,r),filteredRowsLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},wr=e=>e.filteredRowsLookup;function Ar(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function Sr(){return(0,yr.UI)(Object.values)}const Cr={compact:.7,comfortable:1.3,standard:1},Er=(e,t)=>(0,n.A)({},e,{density:{value:t.density,factor:Cr[t.density]}});var Tr=r("sGrR");const Ir=(e,t,r)=>{var o;let i=e.paginationModel;const a=e.rowCount,s=null!=(o=null==r?void 0:r.pageSize)?o:i.pageSize,l=(0,Tr.$_)(a,s);!r||(null==r?void 0:r.page)===i.page&&(null==r?void 0:r.pageSize)===i.pageSize||(i=r);const c=(0,Tr.m6)(i.page,l);return c!==i.page&&(i=(0,n.A)({},i,{page:c})),(0,Tr.RW)(i.pageSize,t),i},kr=(e,t)=>{var r,o,i,a,s;const l=(0,n.A)({},(0,Tr.N0)(t.autoPageSize),null!=(r=t.paginationModel)?r:null==(o=t.initialState)||null==(o=o.pagination)?void 0:o.paginationModel);(0,Tr.RW)(l.pageSize,t.signature);const c=null!=(i=null!=(a=t.rowCount)?a:null==(s=t.initialState)||null==(s=s.pagination)?void 0:s.rowCount)?i:0;return(0,n.A)({},e,{pagination:{paginationModel:l,rowCount:c}})};var Mr=r("QoIX"),Rr=r("tAhU");const Pr=["field","align","width","contentWidth"];var Or=r("Ow/F");const Dr=["className"],Lr=(0,re.A)("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),Nr=o.forwardRef(function(e,t){const{className:r}=e,o=(0,M.A)(e,Dr),i=(0,U.A)(),a=(e=>{const{classes:t}=e;return(0,O.A)({root:["iconButtonContainer"]},z.B,t)})(i);return(0,x.jsx)(Lr,(0,n.A)({ref:t,className:(0,R.A)(a.root,r),ownerState:i},o))}),Fr=["className","selectedRowCount"],zr=(0,re.A)("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),Br=o.forwardRef(function(e,t){const{className:r,selectedRowCount:o}=e,i=(0,M.A)(e,Fr),a=(0,We.h)(),s=(0,U.A)(),l=(e=>{const{classes:t}=e;return(0,O.A)({root:["selectedRowCount"]},z.B,t)})(s),c=a.current.getLocaleText("footerRowSelected")(o);return(0,x.jsx)(zr,(0,n.A)({ref:t,className:(0,R.A)(l.root,r),ownerState:s},i,{children:c}))}),jr=["className"],$r=(0,re.A)("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),Ur=o.forwardRef(function(e,t){const{className:r}=e,o=(0,M.A)(e,jr),i=(0,U.A)(),a=(e=>{const{classes:t}=e;return(0,O.A)({root:["footerContainer","withBorderColor"]},z.B,t)})(i);return(0,x.jsx)($r,(0,n.A)({ref:t,className:(0,R.A)(a.root,r),ownerState:i},o))}),Vr=o.forwardRef(function(e,t){var r,o;const i=(0,We.h)(),a=(0,U.A)(),s=(0,S.N)(i,K.O8),l=(0,S.N)(i,Ne.vF),c=(0,S.N)(i,ie.RN),u=!a.hideFooterSelectedRowCount&&l>0?(0,x.jsx)(Br,{selectedRowCount:l}):(0,x.jsx)("div",{}),d=a.hideFooterRowCount||a.pagination?null:(0,x.jsx)(a.slots.footerRowCount,(0,n.A)({},null==(r=a.slotProps)?void 0:r.footerRowCount,{rowCount:s,visibleRowCount:c})),f=a.pagination&&!a.hideFooterPagination&&a.slots.pagination&&(0,x.jsx)(a.slots.pagination,(0,n.A)({},null==(o=a.slotProps)?void 0:o.pagination));return(0,x.jsxs)(Ur,(0,n.A)({ref:t},e,{children:[u,d,f]}))}),Hr=["className","rowCount","visibleRowCount"],Gr=(0,re.A)("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),Wr=o.forwardRef(function(e,t){const{className:r,rowCount:o,visibleRowCount:i}=e,a=(0,M.A)(e,Hr),s=(0,We.h)(),l=(0,U.A)(),c=(e=>{const{classes:t}=e;return(0,O.A)({root:["rowCount"]},z.B,t)})(l);if(0===o)return null;const u=i0&&c.open,id:c.panelId,"aria-labelledby":c.labelId},null==(o=l.slotProps)?void 0:o.panel,e,null==(i=l.slotProps)?void 0:i.basePopper,{children:u}))});var Zr=r("yXLF"),Yr=r("pIrZ");const Xr=o.forwardRef(function(e,t){return(0,x.jsx)(Yr.$,(0,n.A)({ref:t},e,{children:(0,x.jsx)(Zr.A,{})}))}),Kr=o.forwardRef(function(e,t){const r=(0,We.h)().current.getLocaleText("noRowsLabel");return(0,x.jsx)(Yr.$,(0,n.A)({ref:t},e,{children:r}))});var Jr=r("iu7o"),Qr=r("hwAa");const en=(0,F.Ay)(Jr.A)(({theme:e})=>({[`& .${Qr.A.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${Qr.A.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),tn=o.forwardRef(function(e,t){const r=(0,We.h)(),i=(0,U.A)(),a=(0,S.N)(r,Fe.lN),s=(0,S.N)(r,Fe.H2),l=o.useMemo(()=>Math.floor(s/(a.pageSize||1)),[s,a.pageSize]),c=o.useCallback(e=>{const t=Number(e.target.value);r.current.setPageSize(t)},[r]),u=o.useCallback((e,t)=>{r.current.setPage(t)},[r]),d=(e=>{for(let t=0;tt.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function an(e){const{className:t}=e,r=(0,M.A)(e,nn),o=(0,U.A)(),i=(e=>{const{classes:t}=e;return(0,O.A)({root:["panelContent"]},z.B,t)})(o);return(0,x.jsx)(on,(0,n.A)({className:(0,R.A)(t,i.root),ownerState:o},r))}const sn=["className"],ln=(0,re.A)("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function cn(e){const{className:t}=e,r=(0,M.A)(e,sn),o=(0,U.A)(),i=(e=>{const{classes:t}=e;return(0,O.A)({root:["panelFooter"]},z.B,t)})(o);return(0,x.jsx)(ln,(0,n.A)({className:(0,R.A)(t,i.root),ownerState:o},r))}var un=r("qSC9");const dn=["className","slotProps"],fn=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),pn=()=>!0,hn=o.forwardRef(function(e,t){const{className:r,slotProps:o={}}=e,i=(0,M.A)(e,dn),a=(0,U.A)(),s=(e=>{const{classes:t}=e;return(0,O.A)({root:["panelWrapper"]},z.B,t)})(a);return(0,x.jsx)(un.A,(0,n.A)({open:!0,disableEnforceFocus:!0,isEnabled:pn},o.TrapFocus,{children:(0,x.jsx)(fn,(0,n.A)({ref:t,tabIndex:-1,className:(0,R.A)(r,s.root),ownerState:a},i))}))}),mn=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],gn=["InputComponentProps"],yn=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),vn=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),bn=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),_n=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),xn=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:120}),wn=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),An=e=>e.headerName||e.field,Sn=new Intl.Collator,Cn=o.forwardRef(function(e,t){var r,i,a,s,l,c,u,d,f,p;const{item:h,hasMultipleFilters:m,deleteFilter:g,applyFilterChanges:y,multiFilterOperator:v,showMultiFilterOperators:b,disableMultiFilterOperator:_,applyMultiFilterOperatorChanges:w,focusElementRef:A,logicOperators:C=[rn.V.And,rn.V.Or],columnsSort:E,filterColumns:T,deleteIconProps:I={},logicOperatorInputProps:k={},operatorInputProps:D={},columnInputProps:L={},valueInputProps:N={}}=e,F=(0,M.A)(e,mn),B=(0,We.h)(),j=(0,S.N)(B,H.Oe),$=(0,S.N)(B,ie.ZI),V=(0,$e.A)(),G=(0,$e.A)(),W=(0,$e.A)(),q=(0,$e.A)(),Z=(0,U.A)(),Y=(e=>{const{classes:t}=e;return(0,O.A)({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},z.B,t)})(Z),X=o.useRef(null),K=o.useRef(null),J=m&&C.length>0,Q=(null==(r=Z.slotProps)?void 0:r.baseFormControl)||{},ee=null==(a=((null==(i=Z.slotProps)?void 0:i.baseSelect)||{}).native)||a,te=(null==(s=Z.slotProps)?void 0:s.baseInputLabel)||{},re=(null==(l=Z.slotProps)?void 0:l.baseSelectOption)||{},{InputComponentProps:ne}=N,oe=(0,M.A)(N,gn),ae=o.useMemo(()=>{if(void 0===T||"function"!=typeof T)return j;const e=T({field:h.field,columns:j,currentFilters:(null==$?void 0:$.items)||[]});return j.filter(t=>e.includes(t.field))},[T,null==$?void 0:$.items,j,h.field]),se=o.useMemo(()=>{switch(E){case"asc":return ae.sort((e,t)=>Sn.compare(An(e),An(t)));case"desc":return ae.sort((e,t)=>-Sn.compare(An(e),An(t)));default:return ae}},[ae,E]),le=h.field?B.current.getColumn(h.field):null,ce=o.useMemo(()=>{var e;return h.operator&&le?null==(e=le.filterOperators)?void 0:e.find(e=>e.value===h.operator):null},[h,le]),ue=o.useCallback(e=>{const t=e.target.value,r=B.current.getColumn(t);if(r.field===le.field)return;const o=r.filterOperators.find(e=>e.value===h.operator)||r.filterOperators[0],i=!o.InputComponent||o.InputComponent!==(null==ce?void 0:ce.InputComponent)||r.type!==le.type;y((0,n.A)({},h,{field:t,operator:o.value,value:i?void 0:h.value}))},[B,y,h,le,ce]),de=o.useCallback(e=>{const t=e.target.value,r=null==le?void 0:le.filterOperators.find(e=>e.value===t),o=!(null!=r&&r.InputComponent)||(null==r?void 0:r.InputComponent)!==(null==ce?void 0:ce.InputComponent);y((0,n.A)({},h,{operator:t,value:o?void 0:h.value}))},[y,h,le,ce]),fe=o.useCallback(e=>{const t=e.target.value===rn.V.And.toString()?rn.V.And:rn.V.Or;w(t)},[w]);return o.useImperativeHandle(A,()=>({focus:()=>{var e;null!=ce&&ce.InputComponent?null==X||null==(e=X.current)||e.focus():K.current.focus()}}),[ce]),(0,x.jsxs)(yn,(0,n.A)({ref:t,className:Y.root,"data-id":h.id,ownerState:Z},F,{children:[(0,x.jsx)(vn,(0,n.A)({variant:"standard",as:Z.slots.baseFormControl},Q,I,{className:(0,R.A)(Y.deleteIcon,Q.className,I.className),ownerState:Z,children:(0,x.jsx)(Z.slots.baseIconButton,(0,n.A)({"aria-label":B.current.getLocaleText("filterPanelDeleteIconLabel"),title:B.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{Z.disableMultipleColumnsFiltering?void 0===h.value?g(h):y((0,n.A)({},h,{value:void 0})):g(h)},size:"small"},null==(c=Z.slotProps)?void 0:c.baseIconButton,{children:(0,x.jsx)(Z.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),(0,x.jsx)(bn,(0,n.A)({variant:"standard",as:Z.slots.baseFormControl},Q,k,{sx:(0,n.A)({display:J?"flex":"none",visibility:b?"visible":"hidden"},Q.sx||{},k.sx||{}),className:(0,R.A)(Y.logicOperatorInput,Q.className,k.className),ownerState:Z,children:(0,x.jsx)(Z.slots.baseSelect,(0,n.A)({inputProps:{"aria-label":B.current.getLocaleText("filterPanelLogicOperator")},value:v,onChange:fe,disabled:!!_||1===C.length,native:ee},null==(u=Z.slotProps)?void 0:u.baseSelect,{children:C.map(e=>(0,o.createElement)(Z.slots.baseSelectOption,(0,n.A)({},re,{native:ee,key:e.toString(),value:e.toString()}),B.current.getLocaleText((e=>{switch(e){case rn.V.And:return"filterPanelOperatorAnd";case rn.V.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(e))))}))})),(0,x.jsxs)(_n,(0,n.A)({variant:"standard",as:Z.slots.baseFormControl},Q,L,{className:(0,R.A)(Y.columnInput,Q.className,L.className),ownerState:Z,children:[(0,x.jsx)(Z.slots.baseInputLabel,(0,n.A)({},te,{htmlFor:V,id:G,children:B.current.getLocaleText("filterPanelColumns")})),(0,x.jsx)(Z.slots.baseSelect,(0,n.A)({labelId:G,id:V,label:B.current.getLocaleText("filterPanelColumns"),value:h.field||"",onChange:ue,native:ee},null==(d=Z.slotProps)?void 0:d.baseSelect,{children:se.map(e=>(0,o.createElement)(Z.slots.baseSelectOption,(0,n.A)({},re,{native:ee,key:e.field,value:e.field}),An(e)))}))]})),(0,x.jsxs)(xn,(0,n.A)({variant:"standard",as:Z.slots.baseFormControl},Q,D,{className:(0,R.A)(Y.operatorInput,Q.className,D.className),ownerState:Z,children:[(0,x.jsx)(Z.slots.baseInputLabel,(0,n.A)({},te,{htmlFor:W,id:q,children:B.current.getLocaleText("filterPanelOperator")})),(0,x.jsx)(Z.slots.baseSelect,(0,n.A)({labelId:q,label:B.current.getLocaleText("filterPanelOperator"),id:W,value:h.operator,onChange:de,native:ee,inputRef:K},null==(f=Z.slotProps)?void 0:f.baseSelect,{children:null==le||null==(p=le.filterOperators)?void 0:p.map(e=>(0,o.createElement)(Z.slots.baseSelectOption,(0,n.A)({},re,{native:ee,key:e.value,value:e.value}),e.label||B.current.getLocaleText(`filterOperator${(0,P.A)(e.value)}`)))}))]})),(0,x.jsx)(wn,(0,n.A)({variant:"standard",as:Z.slots.baseFormControl},Q,oe,{className:(0,R.A)(Y.valueInput,Q.className,oe.className),ownerState:Z,children:null!=ce&&ce.InputComponent?(0,x.jsx)(ce.InputComponent,(0,n.A)({apiRef:B,item:h,applyValue:y,focusElementRef:X},ce.InputComponentProps,ne)):null}))]}))}),En=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],Tn=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),In=o.forwardRef(function(e,t){var r,i;const a=(0,We.h)(),s=(0,U.A)(),l=(0,S.N)(a,ie.ZI),c=(0,S.N)(a,H.Oe),u=o.useRef(null),d=o.useRef(null),{logicOperators:f=[rn.V.And,rn.V.Or],columnsSort:p,filterFormProps:h,getColumnForNewFilter:m,disableAddFilterButton:g=!1,disableRemoveAllButton:y=!1}=e,v=(0,M.A)(e,En),b=a.current.upsertFilterItem,_=o.useCallback(e=>{a.current.setFilterLogicOperator(e)},[a]),w=o.useCallback(()=>{let e;if(m&&"function"==typeof m){const t=m({currentFilters:(null==l?void 0:l.items)||[],columns:c});if(null===t)return null;e=c.find(({field:e})=>e===t)}else e=c.find(e=>{var t;return null==(t=e.filterOperators)?void 0:t.length});return e?Tn(e):null},[null==l?void 0:l.items,c,m]),A=o.useCallback(()=>{if(void 0===m||"function"!=typeof m)return w();const e=l.items.length?l.items:[w()].filter(Boolean),t=m({currentFilters:e,columns:c});if(null===t)return null;const r=c.find(({field:e})=>e===t);return r?Tn(r):null},[l.items,c,m,w]),C=o.useMemo(()=>l.items.length?l.items:(d.current||(d.current=w()),d.current?[d.current]:[]),[l.items,w]),E=C.length>1,T=o.useCallback(e=>{const t=1===C.length;a.current.deleteFilterItem(e),t&&a.current.hideFilterPanel()},[a,C.length]);return o.useEffect(()=>{f.length>0&&l.logicOperator&&!f.includes(l.logicOperator)&&_(f[0])},[f,_,l.logicOperator]),o.useEffect(()=>{C.length>0&&u.current.focus()},[C.length]),(0,x.jsxs)(hn,(0,n.A)({ref:t},v,{children:[(0,x.jsx)(an,{children:C.map((e,t)=>(0,x.jsx)(Cn,(0,n.A)({item:e,applyFilterChanges:b,deleteFilter:T,hasMultipleFilters:E,showMultiFilterOperators:t>0,multiFilterOperator:l.logicOperator,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:_,focusElementRef:t===C.length-1?u:null,logicOperators:f,columnsSort:p},h),null==e.id?t:e.id))}),s.disableMultipleColumnsFiltering||g&&y?null:(0,x.jsxs)(cn,{children:[g?(0,x.jsx)("span",{}):(0,x.jsx)(s.slots.baseButton,(0,n.A)({onClick:()=>{const e=A();e&&a.current.upsertFilterItems([...C,e])},startIcon:(0,x.jsx)(s.slots.filterPanelAddIcon,{})},null==(r=s.slotProps)?void 0:r.baseButton,{children:a.current.getLocaleText("filterPanelAddFilter")})),y?null:(0,x.jsx)(s.slots.baseButton,(0,n.A)({onClick:()=>{1===C.length&&void 0===C[0].value&&(a.current.deleteFilterItem(C[0]),a.current.hideFilterPanel()),a.current.setFilterModel((0,n.A)({},l,{items:[]}))},startIcon:(0,x.jsx)(s.slots.filterPanelRemoveAllIcon,{})},null==(i=s.slotProps)?void 0:i.baseButton,{children:a.current.getLocaleText("filterPanelRemoveAll")}))]})]}))});var kn=r("OGDC"),Mn=r("CIcg"),Rn=r("O3LO");const Pn=["className"],On=(0,re.A)("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:(e,t)=>t.panelHeader})(({theme:e})=>({padding:e.spacing(1)}));function Dn(e){const{className:t}=e,r=(0,M.A)(e,Pn),o=(0,U.A)(),i=(e=>{const{classes:t}=e;return(0,O.A)({root:["panelHeader"]},z.B,t)})(o);return(0,x.jsx)(On,(0,n.A)({className:(0,R.A)(t,i.root),ownerState:o},r))}const Ln=["sort","searchPredicate","autoFocusSearchField","disableHideAllButton","disableShowAllButton","getTogglableColumns"],Nn=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:(e,t)=>t.columnsPanel})({padding:"8px 0px 8px 8px"}),Fn=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:(e,t)=>t.columnsPanelRow})(({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px",[`& .${Mn.A.root}`]:{marginRight:e.spacing(.5)}})),zn=((0,F.Ay)(kn.A)({justifyContent:"flex-end"}),new Intl.Collator),Bn=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;var jn=r("PYeY");const $n=["children","className","classes"],Un=(0,jn.A)("MuiDataGrid",["panel","paper"]),Vn=(0,F.Ay)(Ge.A,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),Hn=(0,F.Ay)(He.A,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex"})),Gn=o.forwardRef((e,t)=>{const{children:r,className:i}=e,a=(0,M.A)(e,$n),s=(0,We.h)(),l=(0,U.A)(),c=Un,[u,d]=o.useState(!1),f=o.useCallback(()=>{s.current.hidePreferences()},[s]),p=o.useCallback(e=>{(0,ot.nx)(e.key)&&s.current.hidePreferences()},[s]),h=o.useMemo(()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{d(!0)},effect:()=>()=>{d(!1)}}],[]),[m,g]=o.useState(null);return o.useEffect(()=>{var e;const t=null==(e=s.current.rootElementRef)||null==(e=e.current)?void 0:e.querySelector(`.${z.x.columnHeaders}`);t&&g(t)},[s]),m?(0,x.jsx)(Vn,(0,n.A)({ref:t,placement:"bottom-start",className:(0,R.A)(i,c.panel),ownerState:l,anchorEl:m,modifiers:h},a,{children:(0,x.jsx)(Ue.x,{mouseEvent:"onMouseUp",onClickAway:f,children:(0,x.jsx)(Hn,{className:c.paper,ownerState:l,elevation:8,onKeyDown:p,children:u&&r})})})):null});var Wn=r("TL/R");function qn(e){return o.memo(e,Wn.v)}let Zn;class Yn extends Error{}const Xn=["changeReason","unstable_updateValueOnRender"],Kn=["column","rowId","editCellState","align","children","colIndex","height","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","isNotVisible","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver","style"],Jn=["changeReason","unstable_updateValueOnRender"],Qn={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:rt.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},eo=qn(o.forwardRef((e,t)=>{const{column:r,rowId:i,editCellState:a}=e,s=(0,We.h)(),l=(0,U.A)(),c=r.field,u=(0,S.N)(s,()=>{try{const e=s.current.getCellParams(i,c);return e.api=s.current,e}catch(e){if(e instanceof Yn)return Qn;throw e}},S.T),d=(0,S.N)(s,()=>s.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:i,field:c}));if(u===Qn)return null;const{cellMode:f,hasFocus:p,isEditable:h,value:m,formattedValue:g}=u,y="actions"===r.type,v="view"!==f&&h||y?-1:u.tabIndex,{classes:b,getCellClassName:_}=l,x=s.current.unstable_applyPipeProcessors("cellClassName",[],{id:i,field:c});let w;if(r.cellClassName&&x.push("function"==typeof r.cellClassName?r.cellClassName(u):r.cellClassName),_&&x.push(_(u)),null==a&&r.renderCell&&(w=r.renderCell(u),x.push(z.x["cell--withRenderer"]),x.push(null==b?void 0:b["cell--withRenderer"])),null!=a&&r.renderEditCell){const e=s.current.getRowWithUpdatedValues(i,r.field),t=(0,M.A)(a,Xn),o=(0,n.A)({},u,{row:e},t);w=r.renderEditCell(o),x.push(z.x["cell--editing"]),x.push(null==b?void 0:b["cell--editing"])}const{slots:A}=l,C=A.cell,E=(0,n.A)({},e,{ref:t,field:c,formattedValue:g,hasFocus:p,isEditable:h,isSelected:d,value:m,cellMode:f,children:w,tabIndex:v,className:(0,R.A)(x)});return o.createElement(C,E)})),to=qn(o.forwardRef((e,t)=>{var r,i,a,s;const{column:l,rowId:c,editCellState:u,align:d,colIndex:f,height:p,width:h,className:m,showRightBorder:g,colSpan:y,disableDragEvents:v,isNotVisible:b,onClick:_,onDoubleClick:w,onMouseDown:A,onMouseUp:C,onMouseOver:E,onKeyDown:T,onKeyUp:I,onDragEnter:k,onDragOver:L,style:N}=e,F=(0,M.A)(e,Kn),B=(0,We.h)(),j=(0,U.A)(),$=l.field,V=(0,S.N)(B,()=>{try{const e=B.current.getCellParams(c,$);return e.api=B.current,e}catch(e){if(e instanceof Yn)return Qn;throw e}},S.T),H=(0,S.N)(B,()=>B.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:c,field:$})),{cellMode:G,hasFocus:W,isEditable:q,value:Z,formattedValue:Y}=V,X="actions"===l.type&&(null==(r=(i=l).getActions)?void 0:r.call(i,B.current.getRowParams(c)).some(e=>!e.props.disabled)),K="view"!==G&&q||X?-1:V.tabIndex,{classes:J,getCellClassName:Q}=j,ee=B.current.unstable_applyPipeProcessors("cellClassName",[],{id:c,field:$});l.cellClassName&&ee.push("function"==typeof l.cellClassName?l.cellClassName(V):l.cellClassName),Q&&ee.push(Q(V));const te=null==Y?Z:Y,re=o.useRef(null),ne=(0,D.A)(t,re),oe=o.useRef(null),ie=null!=(a=j.unstable_cellSelection)&&a,ae=(e=>{const{align:t,showRightBorder:r,isEditable:n,isSelected:o,isSelectionMode:i,classes:a}=e,s={root:["cell",`cell--text${(0,P.A)(t)}`,n&&"cell--editable",o&&"selected",r&&"cell--withRightBorder",i&&!n&&"cell--selectionMode","withBorderColor"],content:["cellContent"]};return(0,O.A)(s,z.B,a)})({align:d,showRightBorder:g,isEditable:q,classes:j.classes,isSelected:H,isSelectionMode:ie}),se=o.useCallback(e=>t=>{const r=B.current.getCellParams(c,$||"");B.current.publishEvent(e,r,t),C&&C(t)},[B,$,C,c]),le=o.useCallback(e=>t=>{const r=B.current.getCellParams(c,$||"");B.current.publishEvent(e,r,t),A&&A(t)},[B,$,A,c]),ce=o.useCallback((e,t)=>r=>{if(!B.current.getRow(c))return;const n=B.current.getCellParams(c,$||"");B.current.publishEvent(e,n,r),t&&t(r)},[B,$,c]),ue=o.useMemo(()=>b?(0,n.A)({padding:0,opacity:0,width:0,border:0},N):(0,n.A)({minWidth:h,maxWidth:h,minHeight:p,maxHeight:"auto"===p?"none":p},N),[h,p,b,N]);if(o.useEffect(()=>{if(!W||G===rt.Edit)return;const e=(0,fr.A)(B.current.rootElementRef.current);if(re.current&&!re.current.contains(e.activeElement)){const e=re.current.querySelector('[tabindex="0"]'),t=oe.current||e||re.current;if(void 0===Zn&&document.createElement("div").focus({get preventScroll(){return Zn=!0,!1}}),Zn)t.focus({preventScroll:!0});else{const e=B.current.getScrollPosition();t.focus(),B.current.scroll(e)}}},[W,G,B]),V===Qn)return null;let de,fe=F.onFocus;if(null==u&&l.renderCell&&(de=l.renderCell(V),ee.push(z.x["cell--withRenderer"]),ee.push(null==J?void 0:J["cell--withRenderer"])),null!=u&&l.renderEditCell){const e=B.current.getRowWithUpdatedValues(c,l.field),t=(0,M.A)(u,Jn),r=(0,n.A)({},V,{row:e},t);de=l.renderEditCell(r),ee.push(z.x["cell--editing"]),ee.push(null==J?void 0:J["cell--editing"])}if(void 0===de){const e=null==te?void 0:te.toString();de=(0,x.jsx)("div",{className:ae.content,title:e,role:"presentation",children:e})}o.isValidElement(de)&&X&&(de=o.cloneElement(de,{focusElementRef:oe}));const pe=v?null:{onDragEnter:ce("cellDragEnter",k),onDragOver:ce("cellDragOver",L)},he=null==(s=j.experimentalFeatures)?void 0:s.ariaV7;return(0,x.jsx)("div",(0,n.A)({ref:ne,className:(0,R.A)(m,ee,ae.root),role:he?"gridcell":"cell","data-field":$,"data-colindex":f,"aria-colindex":f+1,"aria-colspan":y,style:ue,tabIndex:K,onClick:ce("cellClick",_),onDoubleClick:ce("cellDoubleClick",w),onMouseOver:ce("cellMouseOver",E),onMouseDown:le("cellMouseDown"),onMouseUp:se("cellMouseUp"),onKeyDown:ce("cellKeyDown",T),onKeyUp:ce("cellKeyUp",I)},pe,F,{onFocus:fe,children:de}))})),ro=["selected","hovered","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","isLastVisible","focusedCellColumnIndexNotInRange","isNotVisible","focusedCell","tabbableCell","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"];function no({width:e}){if(!e)return null;const t={width:e};return(0,x.jsx)("div",{className:`${z.x.cell} ${z.x.withBorderColor}`,style:t})}const oo=o.forwardRef(function(e,t){const{selected:r,hovered:i,rowId:a,row:s,index:l,style:c,position:u,rowHeight:d,className:f,visibleColumns:p,renderedColumns:h,containerWidth:m,firstColumnToRender:g,isLastVisible:y=!1,focusedCellColumnIndexNotInRange:v,isNotVisible:b,focusedCell:_,onClick:w,onDoubleClick:A,onMouseEnter:C,onMouseLeave:E,onMouseOut:T,onMouseOver:I}=e,k=(0,M.A)(e,ro),P=(0,We.h)(),L=o.useRef(null),N=(0,U.A)(),F=at(P,N),B=(0,S.N)(P,H.fc),j=(0,S.N)(P,ae.XU),$=(0,S.N)(P,K.V2),V=(0,S.N)(P,X),G=(0,S.N)(P,tr),W=(0,D.A)(L,t),q=l+V+2,Z=(e=>{const{editable:t,editing:r,selected:n,isLastVisible:o,rowHeight:i,classes:a}=e,s={root:["row",n&&"selected",t&&"row--editable",r&&"row--editing",o&&"row--lastVisible","auto"===i&&"row--dynamicHeight"]};return(0,O.A)(s,z.B,a)})({selected:r,hovered:i,isLastVisible:y,classes:N.classes,editing:P.current.getRowMode(a)===nt.Edit,editable:N.editMode===tt.Row,rowHeight:d});o.useLayoutEffect(()=>{"auto"===d&&L.current&&"undefined"==typeof ResizeObserver&&P.current.unstable_storeRowHeightMeasurement(a,L.current.clientHeight,u)},[P,d,a,u]),o.useLayoutEffect(()=>{if(F.range){const e=P.current.getRowIndexRelativeToVisibleRows(a);null!=e&&P.current.unstable_setLastMeasuredRowIndex(e)}const e=L.current;if(!e||"auto"!==d||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(e=>{const[t]=e,r=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;P.current.unstable_storeRowHeightMeasurement(a,r,u)});return t.observe(e),()=>t.disconnect()},[P,F.range,l,d,a,u]);const Y=o.useCallback((e,t)=>r=>{dt(r)||P.current.getRow(a)&&(P.current.publishEvent(e,P.current.getRowParams(a),r),t&&t(r))},[P,a]),J=o.useCallback(e=>{const t=lt(e.target,z.x.cell),r=null==t?void 0:t.getAttribute("data-field");if(r){if(r===ke.f.field)return;if(r===st)return;if("__reorder__"===r)return;if(P.current.getCellMode(a,r)===rt.Edit)return;const e=P.current.getColumn(r);if((null==e?void 0:e.type)===Qe)return}Y("rowClick",w)(e)},[P,w,Y,a]),{slots:Q,slotProps:ee,disableColumnReorder:te}=N,re=Q.cell===to?to:eo,ne=N.rowReordering,oe=(e,t)=>{var r,o;const i=te&&e.disableReorder||!ne&&!!j.length&&$>1&&Object.keys(G).length>0,s=null!=(r=null==(o=G[a])?void 0:o[e.field])?r:null;let l=!1;return void 0!==v&&p[v].field===e.field&&(l=!0),(0,x.jsx)(re,(0,n.A)({column:e,width:t.width,rowId:a,height:d,showRightBorder:t.showRightBorder,align:e.align||"left",colIndex:t.indexRelativeToAllColumns,colSpan:t.colSpan,disableDragEvents:i,editCellState:s,isNotVisible:l},null==ee?void 0:ee.cell),e.field)},ie=(0,S.N)(P,()=>(0,n.A)({},P.current.unstable_getRowInternalSizes(a)),S.T);let se=d;if("auto"===se&&ie){let e=0;const t=Object.entries(ie).reduce((t,[r,n])=>/^base[A-Z]/.test(r)?(e+=1,n>t?n:t):t,0);t>0&&e>1&&(se=t)}const le=o.useMemo(()=>{if(b)return{opacity:0,width:0,height:0};const e=(0,n.A)({},c,{maxHeight:"auto"===d?"none":d,minHeight:se});if(null!=ie&&ie.spacingTop&&(e["border"===N.rowSpacingType?"borderTopWidth":"marginTop"]=ie.spacingTop),null!=ie&&ie.spacingBottom){const t="border"===N.rowSpacingType?"borderBottomWidth":"marginBottom";let r=e[t];"number"!=typeof r&&(r=parseInt(r||"0",10)),r+=ie.spacingBottom,e[t]=r}return e},[b,d,c,se,ie,N.rowSpacingType]),ce=P.current.unstable_applyPipeProcessors("rowClassName",[],a);if("function"==typeof N.getRowClassName){var ue;const e=l-((null==(ue=F.range)?void 0:ue.firstRowIndex)||0),t=(0,n.A)({},P.current.getRowParams(a),{isFirstVisible:0===e,isLastVisible:e===F.rows.length-1,indexRelativeToCurrentPage:e});ce.push(N.getRowClassName(t))}const fe=(0,de.nX)(1e4,20,80),pe=P.current.getRowNode(a);if(!pe)return null;const he=pe.type,me=[];for(let e=0;e0&&(0,x.jsx)(no,{width:ge})]}))}),io=qn(oo);var ao=r("i8i4");function so(e){var t;const{direction:r,index:o,sortingOrder:i}=e,a=(0,We.h)(),s=(0,U.A)(),l=(e=>{const{classes:t}=e;return(0,O.A)({icon:["sortIcon"]},z.B,t)})((0,n.A)({},e,{classes:s.classes})),c=function(e,t,r,o){let i;const a={};return"asc"===t?i=e.columnSortedAscendingIcon:"desc"===t?i=e.columnSortedDescendingIcon:(i=e.columnUnsortedIcon,a.sortingOrder=o),i?(0,x.jsx)(i,(0,n.A)({fontSize:"small",className:r},a)):null}(s.slots,r,l.icon,i);if(!c)return null;const u=(0,x.jsx)(s.slots.baseIconButton,(0,n.A)({tabIndex:-1,"aria-label":a.current.getLocaleText("columnHeaderSortIconLabel"),title:a.current.getLocaleText("columnHeaderSortIconLabel"),size:"small"},null==(t=s.slotProps)?void 0:t.baseIconButton,{children:c}));return(0,x.jsxs)(Nr,{children:[null!=o&&(0,x.jsx)(Or.A,{badgeContent:o,color:"default",children:u}),null==o&&u]})}const lo=o.memo(so),co=o.memo(e=>{var t,r;const{colDef:i,open:a,columnMenuId:s,columnMenuButtonId:l,iconButtonRef:c}=e,u=(0,We.h)(),d=(0,U.A)(),f=(e=>{const{classes:t,open:r}=e,n={root:["menuIcon",r&&"menuOpen"],button:["menuIconButton"]};return(0,O.A)(n,z.B,t)})((0,n.A)({},e,{classes:d.classes})),p=o.useCallback(e=>{e.preventDefault(),e.stopPropagation(),u.current.toggleColumnMenu(i.field)},[u,i.field]);return(0,x.jsx)("div",{className:f.root,children:(0,x.jsx)(d.slots.baseTooltip,(0,n.A)({title:u.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},null==(t=d.slotProps)?void 0:t.baseTooltip,{children:(0,x.jsx)(d.slots.baseIconButton,(0,n.A)({ref:c,tabIndex:-1,className:f.button,"aria-label":u.current.getLocaleText("columnMenuLabel"),size:"small",onClick:p,"aria-haspopup":"menu","aria-expanded":a,"aria-controls":a?s:void 0,id:l},null==(r=d.slotProps)?void 0:r.baseIconButton,{children:(0,x.jsx)(d.slots.columnMenuIcon,{fontSize:"small"})}))}))})});function uo({columnMenuId:e,columnMenuButtonId:t,ContentComponent:r,contentComponentProps:o,field:i,open:a,target:s,onExited:l}){const c=(0,We.h)(),u=c.current.getColumn(i),d=(0,er.A)(e=>{e&&(e.stopPropagation(),null!=s&&s.contains(e.target))||c.current.hideColumnMenu()});return s&&u?(0,x.jsx)(Xe,{placement:"bottom-"+("right"===u.align?"start":"end"),open:a,target:s,onClose:d,onExited:l,children:(0,x.jsx)(r,(0,n.A)({colDef:u,hideMenu:d,open:a,id:e,labelledby:t},o))}):null}const fo=["className"],po=(0,re.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)"}),ho=o.forwardRef(function(e,t){const{className:r}=e,o=(0,M.A)(e,fo),i=(0,U.A)(),a=(e=>{const{classes:t}=e;return(0,O.A)({root:["columnHeaderTitle"]},z.B,t)})(i);return(0,x.jsx)(po,(0,n.A)({ref:t,className:(0,R.A)(a.root,r),ownerState:i},o))});function mo(e){var t;const{label:r,description:i}=e,a=(0,U.A)(),s=o.useRef(null),[l,c]=o.useState(""),u=o.useCallback(()=>{if(!i&&null!=s&&s.current){const t=(e=s.current).scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;c(t?r:"")}var e},[i,r]);return(0,x.jsx)(a.slots.baseTooltip,(0,n.A)({title:i||l},null==(t=a.slotProps)?void 0:t.baseTooltip,{children:(0,x.jsx)(ho,{onMouseOver:u,ref:s,children:r})}))}const go=["resizable","resizing","height","side"];var yo=function(e){return e.Left="left",e.Right="right",e}(yo||{});function vo(e){const{height:t,side:r=yo.Right}=e,i=(0,M.A)(e,go),a=(0,U.A)(),s=(e=>{const{resizable:t,resizing:r,classes:n,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",r&&"columnSeparator--resizing",o&&`columnSeparator--side${(0,P.A)(o)}`],icon:["iconSeparator"]};return(0,O.A)(i,z.B,n)})((0,n.A)({},e,{side:r,classes:a.classes})),l=o.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]);return(0,x.jsx)("div",(0,n.A)({className:s.root,style:{minHeight:t,opacity:a.showColumnVerticalBorder?0:1}},i,{onClick:l,children:(0,x.jsx)(a.slots.columnResizeIcon,{className:s.icon})}))}const bo=o.memo(vo),_o=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps"],xo=o.forwardRef(function(e,t){const{classes:r,columnMenuOpen:i,colIndex:a,height:s,isResizing:l,sortDirection:c,hasFocus:u,tabIndex:d,separatorSide:f,isDraggable:p,headerComponent:h,description:m,width:g,columnMenuIconButton:y=null,columnMenu:v=null,columnTitleIconButtons:b=null,headerClassName:_,label:w,resizable:A,draggableContainerProps:S,columnHeaderSeparatorProps:C}=e,E=(0,M.A)(e,_o),I=T(),k=(0,U.A)(),P=o.useRef(null),[O,L]=o.useState(i),N=(0,D.A)(P,t);let F="none";return null!=c&&(F="asc"===c?"ascending":"descending"),o.useEffect(()=>{O||L(i)},[O,i]),o.useLayoutEffect(()=>{const e=I.current.state.columnMenu;if(u&&!e.open){const e=P.current.querySelector('[tabindex="0"]')||P.current;null==e||e.focus(),I.current.columnHeadersContainerElementRef.current.scrollLeft=0}},[I,u]),(0,x.jsxs)("div",(0,n.A)({ref:N,className:(0,R.A)(r.root,_),style:{height:s,width:g,minWidth:g,maxWidth:g},role:"columnheader",tabIndex:d,"aria-colindex":a+1,"aria-sort":F,"aria-label":null==h?w:void 0},E,{children:[(0,x.jsxs)("div",(0,n.A)({className:r.draggableContainer,draggable:p,role:"presentation"},S,{children:[(0,x.jsxs)("div",{className:r.titleContainer,role:"presentation",children:[(0,x.jsx)("div",{className:r.titleContainerContent,children:void 0!==h?h:(0,x.jsx)(mo,{label:w,description:m,columnWidth:g})}),b]}),y]})),(0,x.jsx)(bo,(0,n.A)({resizable:!k.disableColumnResize&&!!A,resizing:l,height:s,side:f},C)),v]}))});function wo(e){var t,r,i,a;const{colDef:s,columnMenuOpen:l,colIndex:c,headerHeight:u,isResizing:d,sortDirection:f,sortIndex:p,filterItemsCounter:h,hasFocus:m,tabIndex:g,disableReorder:y,separatorSide:v}=e,b=T(),_=(0,U.A)(),w=o.useRef(null),A=(0,$e.A)(),S=(0,$e.A)(),C=o.useRef(null),[E,I]=o.useState(l),k=o.useMemo(()=>!_.disableColumnReorder&&!y&&!s.disableReorder,[_.disableColumnReorder,y,s.disableReorder]);let M;s.renderHeader&&(M=s.renderHeader(b.current.getColumnHeaderParams(s.field)));const R=(e=>{const{colDef:t,classes:r,isDragging:n,sortDirection:o,showRightBorder:i,filterItemsCounter:a}=e,s=null!=o,l=null!=a&&a>0,c="number"===t.type,u={root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",n&&"columnHeader--moving",s&&"columnHeader--sorted",l&&"columnHeader--filtered",c&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,O.A)(u,z.B,r)})((0,n.A)({},e,{classes:_.classes,showRightBorder:_.showColumnVerticalBorder})),P=o.useCallback(e=>t=>{dt(t)||b.current.publishEvent(e,b.current.getColumnHeaderParams(s.field),t)},[b,s.field]),D=o.useMemo(()=>({onClick:P("columnHeaderClick"),onDoubleClick:P("columnHeaderDoubleClick"),onMouseOver:P("columnHeaderOver"),onMouseOut:P("columnHeaderOut"),onMouseEnter:P("columnHeaderEnter"),onMouseLeave:P("columnHeaderLeave"),onKeyDown:P("columnHeaderKeyDown"),onFocus:P("columnHeaderFocus"),onBlur:P("columnHeaderBlur")}),[P]),L=o.useMemo(()=>k?{onDragStart:P("columnHeaderDragStart"),onDragEnter:P("columnHeaderDragEnter"),onDragOver:P("columnHeaderDragOver"),onDragEnd:P("columnHeaderDragEnd")}:{},[k,P]),N=o.useMemo(()=>({onMouseDown:P("columnSeparatorMouseDown"),onDoubleClick:P("columnSeparatorDoubleClick")}),[P]);o.useEffect(()=>{E||I(l)},[E,l]);const F=o.useCallback(()=>{I(!1)},[]),B=!_.disableColumnMenu&&!s.disableColumnMenu&&(0,x.jsx)(co,{colDef:s,columnMenuId:A,columnMenuButtonId:S,open:E,iconButtonRef:C}),j=(0,x.jsx)(uo,{columnMenuId:A,columnMenuButtonId:S,field:s.field,open:l,target:C.current,ContentComponent:_.slots.columnMenu,contentComponentProps:null==(t=_.slotProps)?void 0:t.columnMenu,onExited:F}),$=null!=(r=s.sortingOrder)?r:_.sortingOrder,V=(0,x.jsxs)(o.Fragment,{children:[!_.disableColumnFilter&&(0,x.jsx)(_.slots.columnHeaderFilterIconButton,(0,n.A)({field:s.field,counter:h},null==(i=_.slotProps)?void 0:i.columnHeaderFilterIconButton)),s.sortable&&!s.hideSortIcons&&(0,x.jsx)(lo,{direction:f,index:p,sortingOrder:$})]});o.useLayoutEffect(()=>{const e=b.current.state.columnMenu;if(m&&!e.open){var t;const e=w.current.querySelector('[tabindex="0"]')||w.current;null==e||e.focus(),null!=(t=b.current.columnHeadersContainerElementRef)&&t.current&&(b.current.columnHeadersContainerElementRef.current.scrollLeft=0)}},[b,m]);const H="function"==typeof s.headerClassName?s.headerClassName({field:s.field,colDef:s}):s.headerClassName,G=null!=(a=s.headerName)?a:s.field;return(0,x.jsx)(xo,(0,n.A)({ref:w,classes:R,columnMenuOpen:l,colIndex:c,height:u,isResizing:d,sortDirection:f,hasFocus:m,tabIndex:g,separatorSide:v,isDraggable:k,headerComponent:M,description:s.description,elementId:s.field,width:s.computedWidth,columnMenuIconButton:B,columnTitleIconButtons:V,headerClassName:H,label:G,resizable:!_.disableColumnResize&&!!s.resizable,"data-field":s.field,columnMenu:j,draggableContainerProps:L,columnHeaderSeparatorProps:N},D))}const Ao=e=>e.rowsMeta,So=e=>e.virtualization,Co=(0,G.Mz)(So,e=>e.enabled),Eo=(0,G.Mz)(So,e=>e.enabledForColumns),To=["style"],Io=["style"];function ko(e,t,r=0,n=t.length){if(t.length<=0)return-1;if(r>=n)return r;const o=r+Math.floor((n-r)/2);return e<=t[o]?ko(e,t,r,o):ko(e,t,o+1,n)}const Mo=({firstIndex:e,lastIndex:t,buffer:r,minFirstIndex:n,maxLastIndex:o})=>[(0,de.qE)(e-r,n,o),(0,de.qE)(t+r,n,o)],Ro=(e,t)=>e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex,Po={maxSize:3};function Oo(e,t,r,n){var o,i;const a=e.current.getLastMeasuredRowIndex();let s=a===1/0;null!=(o=t.range)&&o.lastRowIndex&&!s&&(s=a>=t.range.lastRowIndex);const l=(0,de.qE)(a-((null==(i=t.range)?void 0:i.firstRowIndex)||0),0,r.positions.length);return s||r.positions[l]>=n?ko(n,r.positions):function(e,t,r){let n=1;for(;r({groupId:r,headerName:b,description:_,depth:a,maxDepth:s,fields:l,colIndex:u,isLastColumn:p}),[r,b,_,a,s,l,u,p]);r&&C&&(A=C(E));const T=h.showColumnVerticalBorder,I=(0,n.A)({},e,{classes:h.classes,showColumnBorder:T,headerAlign:w,depth:a,isDragging:!1}),k=null!=b?b:r,M=(0,$e.A)(),R=null===r?`empty-group-cell-${M}`:r,P=(e=>{const{classes:t,headerAlign:r,isDragging:n,showColumnBorder:o,groupId:i}=e,a={root:["columnHeader","left"===r&&"columnHeader--alignLeft","center"===r&&"columnHeader--alignCenter","right"===r&&"columnHeader--alignRight",n&&"columnHeader--moving",o&&"columnHeader--showColumnBorder",o&&"columnHeader--withRightBorder","withBorderColor",null===i?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,O.A)(a,z.B,t)})(I);o.useLayoutEffect(()=>{if(d){const e=m.current.querySelector('[tabindex="0"]')||m.current;null==e||e.focus()}},[g,d]);const D=o.useCallback(e=>t=>{dt(t)||g.current.publishEvent(e,E,t)},[g,E]),L=o.useMemo(()=>({onKeyDown:D("columnGroupHeaderKeyDown"),onFocus:D("columnGroupHeaderFocus"),onBlur:D("columnGroupHeaderBlur")}),[D]),N="function"==typeof v.headerClassName?v.headerClassName(E):v.headerClassName;return(0,x.jsx)(xo,(0,n.A)({ref:m,classes:P,columnMenuOpen:!1,colIndex:u,height:c,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:f,isDraggable:!1,headerComponent:A,headerClassName:N,description:_,elementId:R,width:i,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:k,"aria-colspan":l.length,"data-fields":`|-${l.join("-|-")}-|`},L))}const Lo=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})(()=>({display:"flex"})),No=e=>{const{innerRef:t,minColumnIndex:r=0,visibleColumns:i,sortColumnLookup:a,filterColumnLookup:s,columnPositions:l,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:u,columnHeaderFocus:d,columnGroupHeaderFocus:f,densityFactor:p,headerGroupingMaxDepth:h,columnMenuState:m,columnVisibility:g,columnGroupsHeaderStructure:y,hasOtherElementInTabSequence:v}=e,b=(0,je.A)(),[_,w]=o.useState(""),[A,C]=o.useState(""),E=T(),I=(0,S.N)(E,Eo),k=(0,U.A)(),M=o.useRef(null),R=(0,D.A)(t,M),[P,O]=o.useState(null),L=o.useRef(P),N=o.useRef(0),F=at(E,k),z=Zt(E,k.columnHeaderHeight),B=Math.floor(k.columnHeaderHeight*p),j=o.useCallback(e=>{P&&e&&Ro(P,e)||O(e)},[P]);o.useEffect(()=>{var e;null!=(e=E.current.columnHeadersContainerElementRef)&&e.current&&(E.current.columnHeadersContainerElementRef.current.scrollLeft=0)},[E]);const $=o.useRef((0,yr.UI)(qt,{equalityCheck:(e,t)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every(r=>e[r]===t[r])})),V=o.useCallback(e=>{const[t,n]=Mo({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:F.rows.length,buffer:k.rowBuffer}),o=$.current({firstColumnIndex:e.firstColumnIndex,minColumnIndex:r,columnBuffer:k.columnBuffer,firstRowToRender:t,lastRowToRender:n,apiRef:E,visibleRows:F.rows}),i="ltr"===b.direction?1:-1,a=o>0?N.current-i*l[o]:N.current;M.current.style.transform=`translate3d(${-a}px, 0px, 0px)`},[l,r,k.columnBuffer,E,F.rows,k.rowBuffer,b.direction]);o.useLayoutEffect(()=>{P&&V(P)},[P,V]);const H=o.useCallback(({left:e,renderContext:t=null},r)=>{var n,o;if(!M.current)return;if(N.current===e&&(null==(n=L.current)?void 0:n.firstColumnIndex)===(null==t?void 0:t.firstColumnIndex)&&(null==(o=L.current)?void 0:o.lastColumnIndex)===(null==t?void 0:t.lastColumnIndex))return;N.current=e;let i=!1;t===L.current&&L.current?i=!0:(function(e){return!!e.target}(r)?(ao.flushSync(()=>{j(t)}),i=!0):j(t),L.current=t),t&&i&&V(t)},[V,j]),G=o.useCallback(e=>C(e.field),[]),W=o.useCallback(()=>C(""),[]),q=o.useCallback(e=>w(e.field),[]),Z=o.useCallback(()=>w(""),[]);(0,be.cz)(E,"columnResizeStart",G),(0,be.cz)(E,"columnResizeStop",W),(0,be.cz)(E,"columnHeaderDragStart",q),(0,be.cz)(E,"columnHeaderDragEnd",Z),(0,be.cz)(E,"scrollPositionChange",H);const Y=e=>{const{renderContext:t=P,minFirstColumn:n=r,maxLastColumn:o=i.length}=e||{};if(!t)return null;const[a,s]=Mo({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:F.rows.length,buffer:k.rowBuffer}),l=I?$.current({firstColumnIndex:t.firstColumnIndex,minColumnIndex:n,columnBuffer:k.columnBuffer,apiRef:E,firstRowToRender:a,lastRowToRender:s,visibleRows:F.rows}):0,c=I?Math.min(t.lastColumnIndex+k.columnBuffer,o):o;return{renderedColumns:i.slice(l,c),firstColumnToRender:l,lastColumnToRender:c,minFirstColumn:n,maxLastColumn:o}},X={minHeight:z,maxHeight:z,lineHeight:`${B}px`};return{renderContext:P,getColumnHeaders:(e,t={})=>{const r=Y(e);if(null==r)return null;const{renderedColumns:o,firstColumnToRender:i}=r,l=[];for(let e=0;e{if(0===h)return null;const t=Y(e);if(null==t||0===t.renderedColumns.length)return null;const{firstColumnToRender:r,lastColumnToRender:o}=t,a=[],s=[];for(let e=0;ee===d&&t.includes(a)),h=i[o-1].field,m=null!=(c=E.current.unstable_getColumnGroupPath(h)[e])?c:null,v=t.findIndex(({groupId:e,columnFields:t})=>e===m&&t.includes(h)),b=t.slice(p,v+1).map(e=>(0,n.A)({},e,{columnFields:e.columnFields.filter(e=>!1!==g[e])})).filter(e=>e.columnFields.length>0),_=b[0].columnFields.indexOf(a),x=b[0].columnFields.slice(0,_).reduce((e,t)=>{var r;return e+(null!=(r=E.current.getColumn(t).computedWidth)?r:0)},0);let w=r;const A=b.map(({groupId:t,columnFields:r})=>{const n=null!==f&&f.depth===e&&r.includes(f.field),o=null!==u&&u.depth===e&&r.includes(u.field)?0:-1,i={groupId:t,width:r.reduce((e,t)=>e+E.current.getColumn(t).computedWidth,0),fields:r,colIndex:w,hasFocus:n,tabIndex:o};return w+=r.length,i});s.push({leftOverflow:x,elements:A})}return s.forEach((e,t)=>{a.push((0,x.jsx)(Lo,{style:{height:`${B}px`,transform:`translateX(-${e.leftOverflow}px)`},role:"row","aria-rowindex":t+1,ownerState:k,children:e.elements.map(({groupId:e,width:r,fields:n,colIndex:o,hasFocus:a,tabIndex:l},c)=>(0,x.jsx)(Do,{groupId:e,width:r,fields:n,colIndex:o,depth:t,isLastColumn:o===i.length-n.length,maxDepth:s.length,height:B,hasFocus:a,tabIndex:l},c))},t))}),a},isDragging:!!_,getRootProps:(e={})=>(0,n.A)({style:X},e),getInnerProps:()=>({ref:R,role:"rowgroup"}),headerHeight:B}},Fo=["className"],zo=(0,re.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({position:"relative",overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:"1px solid",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),Bo=o.forwardRef(function(e,t){const{className:r}=e,o=(0,M.A)(e,Fo),i=(0,U.A)(),a=(e=>{const{classes:t}=e;return(0,O.A)({root:["columnHeaders","withBorderColor"]},z.B,t)})(i);return(0,x.jsx)(zo,(0,n.A)({ref:t,className:(0,R.A)(r,a.root),ownerState:i},o,{role:"presentation"}))}),jo=["isDragging","className"],$o=(0,re.A)("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${z.x.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})(()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${z.x.columnHeaderDropZone} .${z.x.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${z.x["columnHeadersInner--scrollable"]} .${z.x.columnHeader}:last-child`]:{borderRight:"none"}})),Uo=o.forwardRef(function(e,t){var r,o;const{isDragging:i,className:a}=e,s=(0,M.A)(e,jo),l=(0,We.h)(),c=(0,U.A)(),u=(0,n.A)({},c,{isDragging:i,hasScrollX:null!=(r=null==(o=l.current.getRootDimensions())?void 0:o.hasScrollX)&&r}),d=(e=>{const{isDragging:t,hasScrollX:r,classes:n}=e,o={root:["columnHeadersInner",t&&"columnHeaderDropZone",r&&"columnHeadersInner--scrollable"]};return(0,O.A)(o,z.B,n)})(u);return(0,x.jsx)($o,(0,n.A)({ref:t,className:(0,R.A)(a,d.root),ownerState:u},s))}),Vo=["innerRef","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],Ho=qn(o.forwardRef(function(e,t){const{innerRef:r,visibleColumns:o,sortColumnLookup:i,filterColumnLookup:a,columnPositions:s,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:c,columnHeaderFocus:u,columnGroupHeaderFocus:d,densityFactor:f,headerGroupingMaxDepth:p,columnMenuState:h,columnVisibility:m,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:y}=e,v=(0,M.A)(e,Vo),{isDragging:b,getRootProps:_,getInnerProps:w,getColumnHeaders:A,getColumnGroupHeaders:S}=No({innerRef:r,visibleColumns:o,sortColumnLookup:i,filterColumnLookup:a,columnPositions:s,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:c,columnHeaderFocus:u,columnGroupHeaderFocus:d,densityFactor:f,headerGroupingMaxDepth:p,columnMenuState:h,columnVisibility:m,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:y});return(0,x.jsx)(Bo,(0,n.A)({ref:t},_(v),{children:(0,x.jsxs)(Uo,(0,n.A)({isDragging:b},w(),{children:[S(),A()]}))}))}));var Go=r("A+QN");const Wo=["displayOrder"],qo=["hideMenu","colDef","id","labelledby","className","children","open"],Zo=(0,F.Ay)(Be.A)(()=>({minWidth:248})),Yo=o.forwardRef(function(e,t){const{hideMenu:r,id:i,labelledby:a,className:s,children:l,open:c}=e,u=(0,M.A)(e,qo),d=o.useCallback(e=>{(0,ot.vY)(e.key)&&e.preventDefault(),(0,ot.HF)(e.key)&&r(e)},[r]);return(0,x.jsx)(Zo,(0,n.A)({id:i,ref:t,className:(0,R.A)(z.x.menuList,s),"aria-labelledby":a,onKeyDown:d,autoFocus:c},u,{children:l}))});var Xo=r("LutX"),Ko=r("mkGA"),Jo=r("T4Ez");function Qo(e){const{colDef:t,onClick:r}=e,n=(0,We.h)(),i=(0,U.A)(),a=1===(0,H.iv)(n).filter(e=>!0!==e.disableColumnMenu).length,s=o.useCallback(e=>{a||(n.current.setColumnVisibility(t.field,!1),r(e))},[n,t.field,r,a]);return i.disableColumnSelector||!1===t.hideable?null:(0,x.jsxs)(Xo.A,{onClick:s,disabled:a,children:[(0,x.jsx)(Ko.A,{children:(0,x.jsx)(i.slots.columnMenuHideIcon,{fontSize:"small"})}),(0,x.jsx)(Jo.A,{children:n.current.getLocaleText("columnMenuHideColumn")})]})}function ei(e){const{onClick:t}=e,r=(0,We.h)(),n=(0,U.A)(),i=o.useCallback(e=>{t(e),r.current.showPreferences(Yt.columns)},[r,t]);return n.disableColumnSelector?null:(0,x.jsxs)(Xo.A,{onClick:i,children:[(0,x.jsx)(Ko.A,{children:(0,x.jsx)(n.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),(0,x.jsx)(Jo.A,{children:r.current.getLocaleText("columnMenuManageColumns")})]})}const ti=["defaultSlots","defaultSlotProps","slots","slotProps"],ri={columnMenuSortItem:function(e){var t;const{colDef:r,onClick:n}=e,i=(0,We.h)(),a=(0,S.N)(i,ae.XU),s=(0,U.A)(),l=o.useMemo(()=>{if(!r)return null;const e=a.find(e=>e.field===r.field);return null==e?void 0:e.sort},[r,a]),c=null!=(t=r.sortingOrder)?t:s.sortingOrder,u=o.useCallback(e=>{n(e);const t=e.currentTarget.getAttribute("data-value")||null;i.current.sortColumn(r,t===l?null:t)},[i,r,n,l]);if(!r||!r.sortable||!c.some(e=>!!e))return null;const d=e=>{const t=i.current.getLocaleText(e);return"function"==typeof t?t(r):t};return(0,x.jsxs)(o.Fragment,{children:[c.includes("asc")&&"asc"!==l?(0,x.jsxs)(Xo.A,{onClick:u,"data-value":"asc",children:[(0,x.jsx)(Ko.A,{children:(0,x.jsx)(s.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),(0,x.jsx)(Jo.A,{children:d("columnMenuSortAsc")})]}):null,c.includes("desc")&&"desc"!==l?(0,x.jsxs)(Xo.A,{onClick:u,"data-value":"desc",children:[(0,x.jsx)(Ko.A,{children:(0,x.jsx)(s.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),(0,x.jsx)(Jo.A,{children:d("columnMenuSortDesc")})]}):null,c.includes(null)&&null!=l?(0,x.jsxs)(Xo.A,{onClick:u,children:[(0,x.jsx)(Ko.A,{}),(0,x.jsx)(Jo.A,{children:i.current.getLocaleText("columnMenuUnsort")})]}):null]})},columnMenuFilterItem:function(e){const{colDef:t,onClick:r}=e,n=(0,We.h)(),i=(0,U.A)(),a=o.useCallback(e=>{r(e),n.current.showFilterPanel(t.field)},[n,t.field,r]);return i.disableColumnFilter||!t.filterable?null:(0,x.jsxs)(Xo.A,{onClick:a,children:[(0,x.jsx)(Ko.A,{children:(0,x.jsx)(i.slots.columnMenuFilterIcon,{fontSize:"small"})}),(0,x.jsx)(Jo.A,{children:n.current.getLocaleText("columnMenuFilter")})]})},columnMenuColumnsItem:function(e){return(0,x.jsxs)(o.Fragment,{children:[(0,x.jsx)(Qo,(0,n.A)({},e)),(0,x.jsx)(ei,(0,n.A)({},e))]})}},ni={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},oi=o.forwardRef(function(e,t){const{defaultSlots:r,defaultSlotProps:i,slots:a,slotProps:s}=e,l=(0,M.A)(e,ti),c=(e=>{const t=T(),{defaultSlots:r,defaultSlotProps:i,slots:a={},slotProps:s={},hideMenu:l,colDef:c,addDividers:u=!0}=e,d=o.useMemo(()=>(0,n.A)({},r,a),[r,a]),f=o.useMemo(()=>{if(!s||0===Object.keys(s).length)return i;const e=(0,n.A)({},s);return Object.entries(i).forEach(([t,r])=>{e[t]=(0,n.A)({},r,s[t]||{})}),e},[i,s]),p=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),h=o.useMemo(()=>{const e=Object.keys(r);return Object.keys(a).filter(t=>!e.includes(t))},[a,r]);return o.useMemo(()=>{const e=Array.from(new Set([...p,...h])).filter(e=>null!=d[e]).sort((e,t)=>{const r=f[e],n=f[t];return(Number.isFinite(null==r?void 0:r.displayOrder)?r.displayOrder:100)-(Number.isFinite(null==n?void 0:n.displayOrder)?n.displayOrder:100)});return e.reduce((t,r,o)=>{let i={colDef:c,onClick:l};const a=f[r];if(a){const e=(0,M.A)(a,Wo);i=(0,n.A)({},i,e)}return u&&o!==e.length-1?[...t,[d[r],i],[Go.A,{}]]:[...t,[d[r],i]]},[])},[u,c,p,l,d,f,h])})((0,n.A)({},l,{defaultSlots:r,defaultSlotProps:i,slots:a,slotProps:s}));return(0,x.jsx)(Yo,(0,n.A)({ref:t},l,{children:c.map(([e,t],r)=>(0,x.jsx)(e,(0,n.A)({},t),r))}))}),ii=o.forwardRef(function(e,t){return(0,x.jsx)(oi,(0,n.A)({},e,{ref:t,defaultSlots:ri,defaultSlotProps:ni}))}),ai=o.forwardRef(function(e,t){const r=(0,We.h)().current.getLocaleText("noResultsOverlayLabel");return(0,x.jsx)(Yr.$,(0,n.A)({ref:t},e,{children:r}))});var si=r("wYCo"),li=r("MGIy"),ci=r("Fg+5"),ui=r("AAK8"),di=r("YM+J"),fi=r("5I82"),pi=r("EfzM"),hi=r("vH+6"),mi=r("kQF4"),gi=r("Ifci");const yi=["sortingOrder"],vi=o.memo(function(e){const{sortingOrder:t}=e,r=(0,M.A)(e,yi),o=(0,U.A)(),[i]=t,a="asc"===i?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?(0,x.jsx)(a,(0,n.A)({},r)):null});var bi=r("M7pN");const _i=(0,bi.A)((0,x.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),xi=(0,bi.A)((0,x.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),wi=(0,bi.A)((0,x.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),Ai=(0,bi.A)((0,x.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Si=(0,bi.A)((0,x.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),Ci=(0,bi.A)((0,x.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),Ei=(0,bi.A)((0,x.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),Ti=((0,bi.A)((0,x.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),(0,bi.A)((0,x.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle"),(0,bi.A)((0,x.jsx)("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon")),Ii=(0,bi.A)((0,x.jsx)("path",{d:"M11 19V5h2v14z"}),"Separator"),ki=(0,bi.A)((0,x.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),Mi=(0,bi.A)((0,x.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),Ri=(0,bi.A)((0,x.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),Pi=(0,bi.A)((0,x.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),Oi=(0,bi.A)((0,x.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Di=(0,bi.A)((0,x.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),Li=(0,bi.A)((0,x.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),Ni=(0,bi.A)((0,x.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),Fi=(0,bi.A)((0,x.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),zi=(0,bi.A)((0,x.jsx)("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),Bi=(0,bi.A)((0,x.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),ji=(0,bi.A)((0,x.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),$i=(0,bi.A)((0,x.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),Ui=(0,bi.A)((0,x.jsx)("g",{children:(0,x.jsx)("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),Vi=(0,bi.A)((0,x.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),Hi=((0,bi.A)((0,x.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),(0,bi.A)((0,x.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete")),Gi=["native"],Wi={BooleanCellTrueIcon:Bi,BooleanCellFalseIcon:Oi,ColumnMenuIcon:Pi,OpenFilterButtonIcon:Si,FilterPanelDeleteIcon:Oi,ColumnFilteredIcon:Ci,ColumnSelectorIcon:Ti,ColumnUnsortedIcon:vi,ColumnSortedAscendingIcon:_i,ColumnSortedDescendingIcon:xi,ColumnResizeIcon:Ii,DensityCompactIcon:ki,DensityStandardIcon:Mi,DensityComfortableIcon:Ri,ExportIcon:zi,MoreActionsIcon:ji,TreeDataCollapseIcon:Ai,TreeDataExpandIcon:wi,GroupingCriteriaCollapseIcon:Ai,GroupingCriteriaExpandIcon:wi,DetailPanelExpandIcon:Di,DetailPanelCollapseIcon:Li,RowReorderIcon:Fi,QuickFilterIcon:Ei,QuickFilterClearIcon:Oi,ColumnMenuHideIcon:$i,ColumnMenuSortAscendingIcon:_i,ColumnMenuSortDescendingIcon:xi,ColumnMenuFilterIcon:Ci,ColumnMenuManageColumnsIcon:Ui,ColumnMenuClearIcon:Vi,LoadIcon:Ni,FilterPanelAddIcon:Di,FilterPanelRemoveAllIcon:Hi,ColumnReorderIcon:Fi},qi=(0,n.A)({},Wi,{BaseCheckbox:si.A,BaseTextField:li.A,BaseFormControl:ci.A,BaseSelect:ui.A,BaseSwitch:di.A,BaseButton:fi.A,BaseIconButton:kn.A,BaseInputAdornment:pi.A,BaseTooltip:hi.A,BasePopper:Ge.A,BaseInputLabel:mi.A,BaseSelectOption:function(e){let{native:t}=e,r=(0,M.A)(e,Gi);return t?(0,x.jsx)("option",(0,n.A)({},r)):(0,x.jsx)(Xo.A,(0,n.A)({},r))},BaseChip:gi.A}),Zi=(0,n.A)({},qi,{Cell:to,SkeletonCell:function(e){const{align:t,width:r,contentWidth:o}=e,i=(0,M.A)(e,Pr),a=(e=>{const{align:t,classes:r}=e,n={root:["cell","cellSkeleton",`cell--text${(0,P.A)(t)}`,"withBorderColor"]};return(0,O.A)(n,z.B,r)})({classes:(0,U.A)().classes,align:t});return(0,x.jsx)("div",(0,n.A)({className:a.root,style:{width:r}},i,{children:(0,x.jsx)(Rr.A,{width:`${o}%`})}))},ColumnHeaderFilterIconButton:function(e){var t,r;const{counter:i,field:a,onClick:s}=e,l=(0,We.h)(),c=(0,U.A)(),u=(e=>{const{classes:t}=e;return(0,O.A)({icon:["filterIcon"]},z.B,t)})((0,n.A)({},e,{classes:c.classes})),d=(0,S.N)(l,mr),f=(0,$e.A)(),p=(0,$e.A)(),h=o.useCallback(e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:r}=mr(l.current.state);t&&r===Yt.filters?l.current.hideFilterPanel():l.current.showFilterPanel(void 0,p,f),s&&s(l.current.getColumnHeaderParams(a),e)},[l,a,s,p,f]);if(!i)return null;const m=d.open&&d.labelId===f,g=(0,x.jsx)(c.slots.baseIconButton,(0,n.A)({id:f,onClick:h,color:"default","aria-label":l.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?p:void 0},null==(t=c.slotProps)?void 0:t.baseIconButton,{children:(0,x.jsx)(c.slots.columnFilteredIcon,{className:u.icon,fontSize:"small"})}));return(0,x.jsx)(c.slots.baseTooltip,(0,n.A)({title:l.current.getLocaleText("columnHeaderFiltersTooltipActive")(i),enterDelay:1e3},null==(r=c.slotProps)?void 0:r.baseTooltip,{children:(0,x.jsxs)(Nr,{children:[i>1&&(0,x.jsx)(Or.A,{badgeContent:i,color:"default",children:g}),1===i&&g]})}))},ColumnMenu:ii,ColumnHeaders:Ho,Footer:Vr,FooterRowCount:Wr,Toolbar:null,PreferencesPanel:qr,LoadingOverlay:Xr,NoResultsOverlay:ai,NoRowsOverlay:Kr,Pagination:tn,FilterPanel:In,ColumnsPanel:function(e){var t,r,i;const a=(0,We.h)(),s=o.useRef(null),l=(0,S.N)(a,H.OV),c=(0,S.N)(a,H.FY),u=(0,U.A)(),[d,f]=o.useState(""),p=(e=>{const{classes:t}=e;return(0,O.A)({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},z.B,t)})(u),{sort:h,searchPredicate:m=Bn,autoFocusSearchField:g=!0,disableHideAllButton:y=!1,disableShowAllButton:v=!1,getTogglableColumns:b}=e,_=(0,M.A)(e,Ln),w=o.useMemo(()=>{switch(h){case"asc":return[...l].sort((e,t)=>zn.compare(e.headerName||e.field,t.headerName||t.field));case"desc":return[...l].sort((e,t)=>-zn.compare(e.headerName||e.field,t.headerName||t.field));default:return l}},[l,h]),A=e=>{const{name:t}=e.target;a.current.setColumnVisibility(t,!1===c[t])},C=o.useCallback(e=>{const t=(0,H.FY)(a),r=(0,n.A)({},t),o=b?b(l):null;return l.forEach(t=>{t.hideable&&(null==o||o.includes(t.field))&&(e?delete r[t.field]:r[t.field]=!1)}),a.current.setColumnVisibilityModel(r)},[a,l,b]),E=o.useCallback(e=>{f(e.target.value)},[]),T=o.useMemo(()=>{const e=b?b(w):null,t=e?w.filter(({field:t})=>e.includes(t)):w;return d?t.filter(e=>m(e,d.toLowerCase())):t},[w,d,m,b]),I=o.useRef(null);o.useEffect(()=>{g?s.current.focus():I.current&&"function"==typeof I.current.focus&&I.current.focus()},[g]);let k=!1;const R=e=>!1===k&&!1!==e.hideable&&(k=!0,!0);return(0,x.jsxs)(hn,(0,n.A)({},_,{children:[(0,x.jsx)(Dn,{children:(0,x.jsx)(u.slots.baseTextField,(0,n.A)({label:a.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:a.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:s,value:d,onChange:E,variant:"standard",fullWidth:!0},null==(t=u.slotProps)?void 0:t.baseTextField))}),(0,x.jsx)(an,{children:(0,x.jsx)(Nn,{className:p.root,ownerState:u,children:T.map(e=>{var t;return(0,x.jsxs)(Fn,{className:p.columnsPanelRow,ownerState:u,children:[(0,x.jsx)(Rn.A,{control:(0,x.jsx)(u.slots.baseSwitch,(0,n.A)({disabled:!1===e.hideable,checked:!1!==c[e.field],onClick:A,name:e.field,size:"small",inputRef:R(e)?I:void 0},null==(t=u.slotProps)?void 0:t.baseSwitch)),label:e.headerName||e.field}),!u.disableColumnReorder&&!1]},e.field)})})}),v&&y?null:(0,x.jsxs)(cn,{children:[y?(0,x.jsx)("span",{}):(0,x.jsx)(u.slots.baseButton,(0,n.A)({onClick:()=>C(!1)},null==(r=u.slotProps)?void 0:r.baseButton,{disabled:y,children:a.current.getLocaleText("columnsPanelHideAllButton")})),v?null:(0,x.jsx)(u.slots.baseButton,(0,n.A)({onClick:()=>C(!0)},null==(i=u.slotProps)?void 0:i.baseButton,{disabled:v,children:a.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))},Panel:Gn,Row:io}),Yi=e=>{if(void 0!==e)return Object.keys(e).reduce((t,r)=>(0,n.A)({},t,{[`${r.charAt(0).toLowerCase()}${r.slice(1)}`]:e[r]}),{})},Xi={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,rowSelection:!0,density:"standard",disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleRowSelection:!1,disableMultipleColumnsSorting:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:tt.Cell,filterMode:"client",filterDebounceMs:150,columnHeaderHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:"client",rowHeight:52,pageSizeOptions:[25,50,100],rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingOrder:["asc","desc",null],sortingMode:"client",throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1,unstable_ignoreValueFormatterDuringExport:!1,clipboardCopyCellDelimiter:"\t",rowPositionsDebounceMs:166},Ki=(Yi(Zi),e=>(0,n.A)({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}})),Ji=(e,t,r)=>"number"==typeof e&&e>0?e:t,Qi=(["MUI: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),["MUI: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n"),e=>(0,n.A)({},e,{columnMenu:{open:!1}}));function ea(e){return void 0!==e.field}const ta=(e,t,r)=>{if(ea(e)){if(void 0!==r[e.field])throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${r[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(r[e.field]=t)}const{groupId:n,children:o}=e;o.forEach(e=>{ta(e,[...t,n],r)})},ra=e=>{if(!e)return{};const t={};return e.forEach(e=>{ta(e,[],t)}),t},na=(e,t,r)=>{const n=e=>{var r;return null!=(r=t[e])?r:[]},o=[],i=Math.max(...e.map(e=>n(e).length)),a=(e,t,r)=>(0,de.Hv)(n(e).slice(0,r+1),n(t).slice(0,r+1));for(let t=0;t{var i;const s=null!=(i=n(o)[t])?i:null;if(0===e.length)return[{columnFields:[o],groupId:s}];const l=e[e.length-1],c=l.columnFields[l.columnFields.length-1];return l.groupId!==s||!a(c,o,t)||(u=c,d=o,null!=r&&r.left&&r.left.includes(u)&&!r.left.includes(d)||null!=r&&r.right&&!r.right.includes(u)&&r.right.includes(d))?[...e,{columnFields:[o],groupId:s}]:[...e.slice(0,e.length-1),{columnFields:[...l.columnFields,o],groupId:s}];var u,d},[]);o.push(i)}return o},oa=["groupId","children"],ia=e=>{let t={};return e.forEach(e=>{if(ea(e))return;const{groupId:r,children:o}=e,i=(0,M.A)(e,oa);if(!r)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn(`MUI: group groupId=${r} has no children.`);const a=(0,n.A)({},i,{groupId:r}),s=ia(o);if(void 0!==s[r]||void 0!==t[r])throw new Error(`MUI: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=(0,n.A)({},t,s,{[r]:a})}),(0,n.A)({},t)},aa=(e,t,r)=>{var o,i,a,s;if(null==(o=t.experimentalFeatures)||!o.columnGrouping)return e;const l=(0,H.JR)(r),c=(0,H.TI)(r),u=ia(null!=(i=t.columnGroupingModel)?i:[]),d=ra(null!=(a=t.columnGroupingModel)?a:[]),f=na(l,d,null!=(s=r.current.state.pinnedColumns)?s:{}),p=0===c.length?0:Math.max(...c.map(e=>{var t,r;return null!=(t=null==(r=d[e])?void 0:r.length)?t:0}));return(0,n.A)({},e,{columnGrouping:{lookup:u,unwrappedGroupingModel:d,headerStructure:f,maxDepth:p}})},sa=(e,t)=>{const r={enabled:!t.disableVirtualization,enabledForColumns:!0};return(0,n.A)({},e,{virtualization:r})},la=e=>e.headerFiltering,ca=(0,G.Mz)(la,e=>e.editing),ua=(0,G.Mz)(la,e=>e.menuOpen),da=({currentColIndex:e,firstColIndex:t,lastColIndex:r,direction:n})=>{if("rtl"===n){if(et)return e-1;return null},fa=({currentColIndex:e,firstColIndex:t,lastColIndex:r,direction:n})=>{if("rtl"===n){if(e>t)return e-1}else if("ltr"===n&&et?o:i-t>r?i-t:oe.includes(t))?`"${r}"`:t.escapeFormulas&&["=","+","-","@","\t","\r"].includes(r[0])?`'${r}`:r}return e}return e}const ma=(e,t)=>{const{csvOptions:r,ignoreValueFormatter:n}=t;let o;if(n){var i;const t=e.colDef.type;if("number"===t)o=String(e.value);else if("date"===t||"dateTime"===t){var a;o=null==(a=e.value)?void 0:a.toISOString()}else o="function"==typeof(null==(i=e.value)?void 0:i.toString)?e.value.toString():e.value}else o=e.formattedValue;return ha(o,r)};(0,rr.f)(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);class ga{constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),null==e?this.rowString+="":"function"==typeof this.options.sanitizeCellValue?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}const ya=({apiRef:e,options:t})=>{const r=(0,H.OV)(e);return t.fields?t.fields.reduce((e,t)=>{const n=r.find(e=>e.field===t);return n&&e.push(n),e},[]):(t.allColumns?r:(0,H.iv)(e)).filter(e=>!e.disableExport)},va=({apiRef:e})=>{var t,r;const n=(0,ie.qA)(e),o=(0,K.qj)(e),i=e.current.getSelectedRows(),a=n.filter(e=>"footer"!==o[e].type),s=(0,K.$2)(e),l=(null==s||null==(t=s.top)?void 0:t.map(e=>e.id))||[],c=(null==s||null==(r=s.bottom)?void 0:r.map(e=>e.id))||[];return a.unshift(...l),a.push(...c),i.size>0?a.filter(e=>i.has(e)):a},ba=["hideMenu","options"],_a=["hideMenu","options"];function xa(e){const t=(0,We.h)(),{hideMenu:r,options:o}=e,i=(0,M.A)(e,ba);return(0,x.jsx)(Xo.A,(0,n.A)({onClick:()=>{t.current.exportDataAsCsv(o),null==r||r()}},i,{children:t.current.getLocaleText("toolbarExportCSV")}))}function wa(e){const t=(0,We.h)(),{hideMenu:r,options:o}=e,i=(0,M.A)(e,_a);return(0,x.jsx)(Xo.A,(0,n.A)({onClick:()=>{t.current.exportDataAsPrint(o),null==r||r()}},i,{children:t.current.getLocaleText("toolbarExportPrint")}))}const Aa=(e,t)=>{const r=De(e,"useGridCsvExport"),n=t.unstable_ignoreValueFormatterDuringExport,i=("object"==typeof n?null==n?void 0:n.csvExport:n)||!1,a=o.useCallback((t={})=>{var n,o,a,s,l;return r.debug("Get data as CSV"),function(e){const{columns:t,rowIds:r,csvOptions:n,ignoreValueFormatter:o,apiRef:i}=e,a=r.reduce((e,r)=>`${e}${(({id:e,columns:t,getCellParams:r,csvOptions:n,ignoreValueFormatter:o})=>{const i=new ga({csvOptions:n});return t.forEach(t=>{const a=r(e,t.field);i.addValue(ma(a,{ignoreValueFormatter:o,csvOptions:n}))}),i.getRowString()})({id:r,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:n})}\r\n`,"").trim();if(!n.includeHeaders)return a;const s=t.filter(e=>e.field!==ke.f.field),l=[];if(n.includeColumnGroupsHeaders){const e=i.current.unstable_getAllGroupDetails();let t=0;const r=s.reduce((e,r)=>{const n=i.current.unstable_getColumnGroupPath(r.field);return e[r.field]=n,t=Math.max(t,n.length),e},{});for(let o=0;o{const i=(r[n.field]||[])[o],a=e[i];t.addValue(a?a.headerName||a.groupId:"")})}}const c=new ga({csvOptions:n,sanitizeCellValue:ha});return s.forEach(e=>{c.addValue(e.headerName||e.field)}),l.push(c),`${l.map(e=>e.getRowString()).join("\r\n")}\r\n${a}`.trim()}({columns:ya({apiRef:e,options:t}),rowIds:(null!=(n=t.getRowsToExport)?n:va)({apiRef:e}),csvOptions:{delimiter:t.delimiter||",",shouldAppendQuotes:null==(o=t.shouldAppendQuotes)||o,includeHeaders:null==(a=t.includeHeaders)||a,includeColumnGroupsHeaders:null==(s=t.includeColumnGroupsHeaders)||s,escapeFormulas:null==(l=t.escapeFormulas)||l},ignoreValueFormatter:i,apiRef:e})},[r,e,i]),s=o.useCallback(e=>{r.debug("Export data as CSV");const t=a(e);!function(e,t="csv",r=document.title||"untitled"){const n=`${r}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),r=document.createElement("a");return r.href=t,r.download=n,r.click(),void setTimeout(()=>{URL.revokeObjectURL(t)})}throw new Error("MUI: exportAs not supported")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)},[r,a]);fe(e,{getDataAsCsv:a,exportDataAsCsv:s},"public");const l=o.useCallback((e,t)=>{var r;return null!=(r=t.csvOptions)&&r.disableToolbarButton?e:[...e,{component:(0,x.jsx)(xa,{options:t.csvOptions}),componentName:"csvExport"}]},[]);Ie(e,"exportMenu",l)},Sa=(e,t,r,n,i)=>{const a=De(e,"useNativeEventListener"),[s,l]=o.useState(!1),c=o.useRef(n),u=o.useCallback(e=>c.current&&c.current(e),[]);o.useEffect(()=>{c.current=n},[n]),o.useEffect(()=>{let n;if(n=(0,de.Tn)(t)?t():t&&t.current?t.current:null,n&&r&&!s){a.debug(`Binding native ${r} event`),n.addEventListener(r,u,i);const t=n;l(!0);const o=()=>{a.debug(`Clearing native ${r} event`),t.removeEventListener(r,u,i)};e.current.subscribeEvent("unmount",o)}},[t,u,r,s,a,i,e])};function Ca(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const r=document.createRange();r.selectNode(t);const n=window.getSelection();n.removeAllRanges(),n.addRange(r);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}var Ea=r("4bZc");const Ta=(0,G.Mz)(e=>e.columnReorder,e=>e.dragCol),Ia="left",ka="right",Ma=e=>(0,n.A)({},e,{columnReorder:{dragCol:""}});var Ra=r("sy2/");function Pa(e,t){var r;return Array.from(null!=(r=e.querySelectorAll(`[data-fields*="|-${t}-|"]`))?r:[])}function Oa(e,t){var r,n;if(!lt(e,z.x.root))throw new Error("MUI: The root element is not found.");const o=e.getAttribute("aria-colindex");if(!o)return[];const i=Number(o)-1,a=[];return null!=(r=t.virtualScrollerRef)&&r.current?((null==(n=t.virtualScrollerRef)?void 0:n.current.querySelectorAll(`:scope > div > div > .${z.x.row}`)).forEach(e=>{const r=e.getAttribute("data-id");if(!r)return;let n=i;const o=t.unstable_getCellColSpanInfo(r,i);o&&o.spannedByColSpan&&(n=o.leftVisibleCellIndex);const s=e.querySelector(`[data-colindex="${n}"]`);s&&a.push(s)}),a):[]}const Da={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1};let La=!1;function Na(){return void 0===La&&(La="undefined"==typeof CSS||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),La}function Fa(e,t){if(void 0!==t&&e.changedTouches){for(let r=0;r(0,n.A)({},e,{columnResize:{resizingColumnField:""}}),Va=(0,n.A)({},ze.C,{type:"treeDataGroup",sortable:!1,filterable:!1,disableColumnMenu:!0,disableReorder:!0,align:"left",width:200,valueGetter:e=>"group"===e.rowNode.type||"leaf"===e.rowNode.type?e.rowNode.groupingKey:void 0}),Ha={field:"__tree_data_group__",editable:!1,groupable:!1},Ga="tree-data";var Wa=r("U831");const qa=U.A,Za=We.h;function Ya(e){var t,r;const{id:o,field:i,formattedValue:a,rowNode:s,hideDescendantCount:l,offsetMultiplier:c=2}=e,u=qa(),d=Za(),f=(e=>{const{classes:t}=e;return(0,O.A)({root:["treeDataGroupingCell"],toggle:["treeDataGroupingCellToggle"]},z.B,t)})({classes:u.classes}),p=null!=(t=(0,S.N)(d,ie.ZP)[s.id])?t:0,h=s.childrenExpanded?u.slots.treeDataCollapseIcon:u.slots.treeDataExpandIcon;return(0,x.jsxs)(Wa.A,{className:f.root,sx:{ml:s.depth*c},children:[(0,x.jsx)("div",{className:f.toggle,children:p>0&&(0,x.jsx)(u.slots.baseIconButton,(0,n.A)({size:"small",onClick:e=>{d.current.setRowChildrenExpansion(o,!s.childrenExpanded),d.current.setCellFocus(o,i),e.stopPropagation()},tabIndex:-1,"aria-label":s.childrenExpanded?d.current.getLocaleText("treeDataCollapse"):d.current.getLocaleText("treeDataExpand")},null==u||null==(r=u.slotProps)?void 0:r.baseIconButton,{children:(0,x.jsx)(h,{fontSize:"inherit"})}))}),(0,x.jsxs)("span",{children:[void 0===a?s.groupingKey:a,!l&&p>0?` (${p})`:""]})]})}const Xa=e=>`auto-generated-row-${e.map(e=>`${e.field}/${e.key}`).join("-")}`,Ka=({id:e,tree:t})=>{const r=[];let n=t[e];for(;n.id!==Re.OL;)r.push({field:"leaf"===n.type?null:n.groupingField,key:n.groupingKey}),n=t[n.parent];return r.reverse(),r},Ja=(e,t,r)=>{let n;return n=e.id===Re.OL||(r?r(e):-1===t||t>e.depth),e.childrenExpanded=n,e},Qa=(e,t,r,n)=>{var o;t[e.id]=e,r[e.depth]=(null!=(o=r[e.depth])?o:0)+1;const i=t[e.parent];if("group"===e.type||"leaf"===e.type){var a,s,l;const r=null!=(a=e.groupingField)?a:"__no_field__",o=null!=(s=e.groupingKey)?s:"__no_key__",c=null==(l=i.childrenFromPath)?void 0:l[r];null!==n&&n[i.id]===t[i.id]?i.children=[...i.children,e.id]:i.children.push(e.id),null==c?i.childrenFromPath[r]={[o.toString()]:e.id}:c[o.toString()]=e.id}else"footer"===e.type&&(i.footerId=e.id)},es=({node:e,tree:t,treeDepths:r})=>{delete t[e.id];const o=e.depth,i=r[o];1===i?delete r[o]:r[o]=i-1;const a=t[e.parent];if("footer"===e.type)t[a.id]=(0,n.A)({},a,{footerId:null});else{var s,l;const r=null!=(s=e.groupingField)?s:"__no_field__",o=null!=(l=e.groupingKey)?l:"__no_key__",i=a.children.filter(t=>t!==e.id),c=a.childrenFromPath;delete c[r][o.toString()],t[a.id]=(0,n.A)({},a,{children:i,childrenFromPath:c})}},ts=({node:e,updatedNode:t,previousTree:r,tree:o,treeDepths:i})=>{e.children.forEach(e=>{o[e]=(0,n.A)({},o[e],{parent:t.id})}),es({node:e,tree:o,treeDepths:i});const a=(0,n.A)({},e,t);Qa(a,o,i,r)},rs=()=>({value:{},addAction(e,t){this.value[e]||(this.value[e]={}),this.value[e][t]=!0}}),ns=({tree:e,filteredRowsLookup:t})=>{if(!t)return{};const r={},n=(o,i)=>{const a=t[o.id];"group"===o.type&&o.children.forEach(t=>{const r=e[t];n(r,i&&!!o.childrenExpanded)}),r[o.id]=a&&i,"group"===o.type&&null!=o.footerId&&(r[o.footerId]=a&&i&&!!o.childrenExpanded)},o=Object.values(e);for(let e=0;e{let c=Re.OL;for(let d=0;d{e.push(t.data)}),e}forEach(e){let t=this.first;for(;null!==t;)e(t),t=t.next}static from(e){if(0===e.length)return new as(null,null);let t=0;const r=new is(e[t],null);let n=r;for(;t+1{es({node:e,tree:t,treeDepths:r}),"group"===e.type&&null!=e.footerId&&es({node:t[e.footerId],tree:t,treeDepths:r});const o=t[e.parent];null==n||n.addAction(o.id,"removeChildren"),o.id!==Re.OL&&0===o.children.length&&(o.isAutoGenerated?ss({node:o,tree:t,treeDepths:r}):t[o.id]={type:"leaf",id:o.id,depth:o.depth,parent:o.parent,groupingKey:o.groupingKey})},ls=({id:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{const o=t[e];"group"===o.type&&o.children.length>0?(({node:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{null==n||n.addAction(e.parent,"removeChildren"),null==n||n.addAction(e.parent,"insertChildren"),ts({previousTree:null,tree:t,treeDepths:r,node:e,updatedNode:{id:Xa(Ka({id:e.id,tree:t})),isAutoGenerated:!0}})})({node:o,tree:t,treeDepths:r,updatedGroupsManager:n}):ss({node:o,tree:t,treeDepths:r,updatedGroupsManager:n})},cs=["hideDescendantCount"];var us=function(e){return e.left="left",e.right="right",e}(us||{});const ds=e=>e.pinnedColumns,fs=(0,re.A)("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e,overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e})=>({position:"sticky",top:0,left:0,width:0,height:0,zIndex:"loadingOverlay"===e?5:4})),ps=(0,re.A)("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e,overridesResolver:(e,t)=>t.overlayWrapperInner})({});function hs(e){var t,r;const i=(0,We.h)(),a=(0,U.A)(),[s,l]=o.useState(()=>{var e,t;return null!=(e=null==(t=i.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null}),c=o.useCallback(()=>{var e,t;l(null!=(e=null==(t=i.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null)},[i]);(0,L.A)(()=>i.current.subscribeEvent("viewportInnerSizeChange",c),[i,c]);let u=null!=(t=null==s?void 0:s.height)?t:0;a.autoHeight&&0===u&&(u=(0,Re.OM)(i,a.rowHeight));const d=(e=>{const{classes:t}=e;return(0,O.A)({root:["overlayWrapper"],inner:["overlayWrapperInner"]},z.B,t)})((0,n.A)({},e,{classes:a.classes}));return s?(0,x.jsx)(fs,{className:(0,R.A)(d.root),overlayType:e.overlayType,children:(0,x.jsx)(ps,(0,n.A)({className:(0,R.A)(d.inner),style:{height:u,width:null!=(r=null==s?void 0:s.width)?r:0}},e))}):null}function ms(){const e=(0,We.h)(),t=(0,U.A)(),r=(0,S.N)(e,K.H0),o=(0,S.N)(e,ie.O7),i=(0,S.N)(e,K.Dl),a=!i&&r>0&&0===o;let s=null,l="";var c,u,d;return i||0!==r||(s=(0,x.jsx)(t.slots.noRowsOverlay,(0,n.A)({},null==(c=t.slotProps)?void 0:c.noRowsOverlay)),l="noRowsOverlay"),a&&(s=(0,x.jsx)(t.slots.noResultsOverlay,(0,n.A)({},null==(u=t.slotProps)?void 0:u.noResultsOverlay)),l="noResultsOverlay"),i&&(s=(0,x.jsx)(t.slots.loadingOverlay,(0,n.A)({},null==(d=t.slotProps)?void 0:d.loadingOverlay)),l="loadingOverlay"),null===s?null:(0,x.jsx)(hs,{overlayType:l,children:s})}const gs=(0,re.A)("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",height:"100%",position:"relative","@media print":{overflow:"hidden"},zIndex:0}),ys=o.forwardRef(function(e,t){const r=(0,U.A)(),o=(e=>{const{classes:t}=e;return(0,O.A)({root:["virtualScroller"]},z.B,t)})(r);return(0,x.jsx)(gs,(0,n.A)({ref:t},e,{className:(0,R.A)(o.root,e.className),ownerState:r}))}),vs=(0,re.A)("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),bs=o.forwardRef(function(e,t){var r;const o=(0,U.A)(),i=((e,t)=>{const{classes:r}=e,n={root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]};return(0,O.A)(n,z.B,r)})(o,!o.autoHeight&&"auto"===(null==(r=e.style)?void 0:r.minHeight));return(0,x.jsx)(vs,(0,n.A)({ref:t},e,{ownerState:o,className:(0,R.A)(i.root,e.className)}))}),_s=["className"],xs=(0,re.A)("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),ws=o.forwardRef(function(e,t){const{className:r}=e,o=(0,M.A)(e,_s),i=(0,U.A)(),a=(e=>{const{classes:t}=e;return(0,O.A)({root:["virtualScrollerRenderZone"]},z.B,t)})(i);return(0,x.jsx)(xs,(0,n.A)({ref:t,className:(0,R.A)(a.root,r),ownerState:i},o))}),As=T,Ss=e=>e.detailPanel.expandedRowIds,Cs=e=>e.detailPanel.contentCache,Es=e=>e.detailPanel.heightCache,Ts=(0,G.S)(Es,e=>Object.entries(e).reduce((e,[t,{height:r}])=>(e[t]=r||0,e),{})),Is=["rowId","height","style"],ks=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"DetailPanel",overridesResolver:(e,t)=>t.detailPanel})(({theme:e})=>({zIndex:2,width:"100%",position:"absolute",backgroundColor:(e.vars||e).palette.background.default,overflow:"auto"}));function Ms(e){const{rowId:t,height:r,style:i={}}=e,a=(0,M.A)(e,Is),s=As(),l=o.useRef(null),c=qa();o.useLayoutEffect(()=>{"auto"===r&&"undefined"==typeof ResizeObserver&&s.current.storeDetailPanelHeight(t,l.current.clientHeight)},[s,r,t]),o.useLayoutEffect(()=>{if("auto"!==r||"undefined"==typeof ResizeObserver)return;const e=new ResizeObserver(e=>{const[r]=e,n=r.borderBoxSize&&r.borderBoxSize.length>0?r.borderBoxSize[0].blockSize:r.contentRect.height;s.current.storeDetailPanelHeight(t,n)});return e.observe(l.current),()=>e.disconnect()},[s,r,t]);const u=(0,n.A)({},i,{height:r});return(0,x.jsx)(ks,(0,n.A)({ref:l,ownerState:c,style:u},a))}const Rs=["className","disableVirtualization"],Ps=(e,t,r)=>{var n,o;if(!Array.isArray(e.left)&&!Array.isArray(e.right))return[[],[]];if(0===(null==(n=e.left)?void 0:n.length)&&0===(null==(o=e.right)?void 0:o.length))return[[],[]];const i=(e,t)=>Array.isArray(e)?e.filter(e=>t.includes(e)):[],a=i(e.left,t),s=t.filter(e=>!a.includes(e)),l=i(e.right,s);return r?[l,a]:[a,l]},Os=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,t/100},Ds=e=>e.vars?"rgba(0 0 0 / 0.21)":(0,N.X4)(e.palette.common.black,.21),Ls=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"DetailPanels",overridesResolver:(e,t)=>t.detailPanels})({position:"relative"}),Ns=`linear-gradient(${(0,N.X4)("#fff",Os(2))}, ${(0,N.X4)("#fff",Os(2))})`,Fs=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"PinnedColumns",overridesResolver:(e,t)=>[{[`&.${z.x["pinnedColumns--left"]}`]:t["pinnedColumns--left"]},{[`&.${z.x["pinnedColumns--right"]}`]:t["pinnedColumns--right"]},t.pinnedColumns]})(({theme:e,ownerState:t})=>{var r;const o=Ds(e);return(0,n.A)({position:"sticky",overflow:"hidden",zIndex:1,backgroundColor:(e.vars||e).palette.background.default},e.vars?{backgroundImage:null==(r=e.vars.overlays)?void 0:r[2]}:(0,n.A)({},"dark"===e.palette.mode&&{backgroundImage:Ns}),t.side===us.left&&{left:0,float:"left",boxShadow:`2px 0px 4px -2px ${o}`},t.side===us.right&&{right:0,float:"right",boxShadow:`-2px 0px 4px -2px ${o}`},t.side===us.right&&t.showCellVerticalBorder&&{borderLeftWidth:"1px",borderLeftStyle:"solid"})});var zs=function(e){return e.top="top",e.bottom="bottom",e}(zs||{});const Bs=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"PinnedRows",overridesResolver:(e,t)=>[{[`&.${z.x["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`&.${z.x["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},t.pinnedRows]})(({theme:e,ownerState:t})=>{var r;const o=Ds(e);return(0,n.A)({position:"sticky",zIndex:4,backgroundColor:(e.vars||e).palette.background.default},e.vars?{backgroundImage:null==(r=e.vars.overlays)?void 0:r[2]}:(0,n.A)({},"dark"===e.palette.mode&&{backgroundImage:Ns}),"top"===t.position&&{top:0,boxShadow:`0px 3px 4px -2px ${o}`},t.position===zs.bottom&&{boxShadow:`0px -3px 4px -2px ${o}`,bottom:0})}),js=(0,F.Ay)("div")({position:"absolute"}),$s=o.forwardRef(function(e,t){const r=(0,M.A)(e,Rs),i=As(),a=qa(),s=(0,S.N)(i,H.TI),l=(0,S.N)(i,Ss),c=(0,S.N)(i,Cs),u=(0,S.N)(i,Ts),d=o.useRef(null),f=o.useRef(null),p=o.useRef(null),h=o.useRef(null),m=(0,je.A)(),g=o.useCallback(({top:e,left:t})=>{d.current&&(d.current.style.transform=`translate3d(0px, ${e}px, 0px)`),f.current&&(f.current.style.transform=`translate3d(0px, ${e}px, 0px)`),p.current&&(p.current.style.transform=`translate3d(${t}px, 0px, 0px)`),h.current&&(h.current.style.transform=`translate3d(${t}px, 0px, 0px)`)},[]),y=o.useMemo(()=>{const e=new Set;return l.forEach(t=>{e.add(t)}),e},[l]),v=o.useCallback(e=>y.has(e)?{style:{marginBottom:u[e]}}:null,[u,y]),b=(0,S.N)(i,ds),[_,w]=Ps(b,s,"rtl"===m.direction),A=(0,S.N)(i,K.$2),C=o.useMemo(()=>(null==A?void 0:A.top)||[],[null==A?void 0:A.top]),E=o.useMemo(()=>(null==A?void 0:A.bottom)||[],[null==A?void 0:A.bottom]),I=(0,n.A)({},a,{classes:a.classes}),k=(e=>{const{classes:t}=e;return(0,O.A)({leftPinnedColumns:["pinnedColumns","pinnedColumns--left"],rightPinnedColumns:["pinnedColumns","pinnedColumns--right","withBorderColor"],topPinnedRows:["pinnedRows","pinnedRows--top"],bottomPinnedRows:["pinnedRows","pinnedRows--bottom"],pinnedRowsRenderZone:["pinnedRowsRenderZone"],detailPanels:["detailPanels"],detailPanel:["detailPanel"]},z.B,t)})(I),{renderContext:R,getRows:P,getRootProps:N,getContentProps:F,getRenderZoneProps:B,updateRenderZonePosition:j}=(e=>{const t=T(),r=(0,U.A)(),i=(0,S.N)(t,H.iv),a=(0,S.N)(t,Co),s=(0,S.N)(t,Eo),{ref:l,onRenderZonePositioning:c,renderZoneMinColumnIndex:u=0,renderZoneMaxColumnIndex:d=i.length,getRowProps:f}=e,p=(0,je.A)(),h=(0,S.N)(t,H.Sw),m=(0,S.N)(t,H.fc),g=(0,S.N)(t,se.MO),y=(0,S.N)(t,se.H5),v=(0,S.N)(t,Ao),b=(0,S.N)(t,Ne.Zk),_=at(t,r),w=o.useRef(null),A=o.useRef(null),C=(0,D.A)(l,A),[E,I]=o.useState(null),k=o.useRef(E),R=o.useRef({top:0,left:0}),[P,O]=o.useState({width:null,height:null}),N=o.useRef(m),[F,z]=o.useState(null),B=o.useRef(Object.create(null)),j=o.useRef(),$=o.useRef(),V=o.useRef((0,yr.UI)((e,t,r,n,o,i)=>{let a;return i>-1&&(t>i&&i>=n||rnull!==g?i.findIndex(e=>e.field===g.field):-1,[g,i]),W=o.useCallback(()=>{if(!a)return{firstRowIndex:0,lastRowIndex:_.rows.length,firstColumnIndex:0,lastColumnIndex:i.length};const{top:e,left:n}=R.current,o=Math.min(Oo(t,_,v,e),v.positions.length-1),l=r.autoHeight?o+_.rows.length:Oo(t,_,v,e+P.height);let c=0,u=h.length;if(s){let e=!1;const[i,a]=Mo({firstIndex:o,lastIndex:l,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:r.rowBuffer});for(let r=i;r{a?(A.current.scrollLeft=0,A.current.scrollTop=0):w.current.style.transform="translate3d(0px, 0px, 0px)"},[a]),(0,L.A)(()=>{O({width:A.current.clientWidth,height:A.current.clientHeight})},[v.currentPageTotalHeight]);const q=o.useCallback(()=>{A.current&&O({width:A.current.clientWidth,height:A.current.clientHeight})},[]);(0,be.cz)(t,"debouncedResize",q);const Z=o.useCallback(e=>{const[n,o]=Mo({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:r.rowBuffer}),[i]=Mo({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:u,maxLastIndex:d,buffer:r.columnBuffer}),a=Wt({firstColumnToRender:i,apiRef:t,firstRowToRender:n,lastRowToRender:o,visibleRows:_.rows}),s="ltr"===p.direction?1:-1,l=Ao(t.current.state).positions[n],f=s*(0,H.Sw)(t)[a];w.current.style.transform=`translate3d(${f}px, ${l}px, 0px)`,"function"==typeof c&&c({top:l,left:f})},[t,_.rows,c,u,d,r.columnBuffer,r.rowBuffer,p.direction]),Y=o.useCallback(()=>k.current,[]),X=o.useCallback(e=>{if(k.current&&Ro(e,k.current))return void Z(e);I(e),Z(e);const[n,o]=Mo({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:r.rowBuffer});t.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:n,lastRowToRender:o}),k.current=e},[t,I,k,_.rows.length,r.rowBuffer,Z]);(0,L.A)(()=>{if(null==P.width)return;const e=W();X(e);const{top:r,left:n}=R.current,o={top:r,left:n,renderContext:e};t.current.publishEvent("scrollPositionChange",o)},[t,W,P.width,X]);const K=(0,er.A)(e=>{const{scrollTop:n,scrollLeft:o}=e.currentTarget;if(R.current.top=n,R.current.left=o,!k.current||n<0)return;if("ltr"===p.direction&&o<0)return;if("rtl"===p.direction&&o>0)return;const i=a?W():k.current,s=Math.abs(i.firstRowIndex-k.current.firstRowIndex),l=Math.abs(i.lastRowIndex-k.current.lastRowIndex),c=Math.abs(i.firstColumnIndex-k.current.firstColumnIndex),u=Math.abs(i.lastColumnIndex-k.current.lastColumnIndex),d=s>=r.rowThreshold||l>=r.rowThreshold||c>=r.columnThreshold||u>=r.columnThreshold||N.current!==m;t.current.publishEvent("scrollPositionChange",{top:n,left:o,renderContext:d?i:k.current},e),d&&(ao.flushSync(()=>{X(i)}),N.current=m)}),J=(0,er.A)(e=>{t.current.publishEvent("virtualScrollerWheel",{},e)}),Q=(0,er.A)(e=>{t.current.publishEvent("virtualScrollerTouchMove",{},e)}),ee=o.useMemo(()=>null!==g?_.rows.findIndex(e=>e.id===g.id):-1,[g,_.rows]);(0,be.cz)(t,"rowMouseOver",(e,t)=>{var r;t.currentTarget.contains(t.relatedTarget)||z(null!=(r=e.id)?r:null)}),(0,be.cz)(t,"rowMouseOut",(e,t)=>{t.currentTarget.contains(t.relatedTarget)||z(null)});const te=P.width&&m>=P.width,re=o.useMemo(()=>{const e=Math.max(v.currentPageTotalHeight,1);let n=!1;null!=A&&A.current&&e<=(null==A?void 0:A.current.clientHeight)&&(n=!0);const o={width:te?m:"auto",height:e,minHeight:n?"100%":"auto"};return r.autoHeight&&0===_.rows.length&&(o.height=(0,Re.OM)(t,r.rowHeight)),o},[t,A,m,v.currentPageTotalHeight,te,r.autoHeight,r.rowHeight,_.rows.length]);o.useEffect(()=>{t.current.publishEvent("virtualScrollerContentSizeChange")},[t,re]);const ne=o.useMemo(()=>{const e={};return te||(e.overflowX="hidden"),r.autoHeight&&(e.overflowY="hidden"),e},[te,r.autoHeight]);return t.current.register("private",{getRenderContext:Y}),{renderContext:E,updateRenderZonePosition:Z,getRows:(e={renderContext:E})=>{var o;const{onRowRender:s,renderContext:l,minFirstColumn:c=u,maxLastColumn:p=d,availableSpace:h=P.width,rowIndexOffset:m=0,position:v="center"}=e;if(!l||null==h)return null;const w=a?r.rowBuffer:0,A=a?r.columnBuffer:0,[S,C]=Mo({firstIndex:l.firstRowIndex,lastIndex:l.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:w}),T=[];if(e.rows)e.rows.forEach(e=>{T.push(e),t.current.calculateColSpan({rowId:e.id,minFirstColumn:c,maxLastColumn:p,columns:i})});else{if(!_.range)return null;for(let e=S;e-1){const e=_.rows[ee];(S>ee||CS?T.push(e):T.unshift(e),t.current.calculateColSpan({rowId:e.id,minFirstColumn:c,maxLastColumn:p,columns:i}))}const[k,R]=Mo({firstIndex:l.firstColumnIndex,lastIndex:l.lastColumnIndex,minFirstIndex:c,maxLastIndex:p,buffer:A}),O=Wt({firstColumnToRender:k,apiRef:t,firstRowToRender:S,lastRowToRender:C,visibleRows:_.rows});let D=!1;(O>G||R(0,n.A)({ref:C,onScroll:K,onWheel:J,onTouchMove:Q},e,{style:e.style?(0,n.A)({},e.style,ne):ne,role:"presentation"}),getContentProps:({style:e}={})=>({style:e?(0,n.A)({},e,re):re,role:"presentation"}),getRenderZoneProps:()=>({ref:w,role:"rowgroup"})}})((0,n.A)({ref:t,renderZoneMinColumnIndex:_.length,renderZoneMaxColumnIndex:s.length-w.length,onRenderZonePositioning:g,getRowProps:v},e)),$=o.useCallback(()=>{R&&j(R)},[R,j]);(0,be.cz)(i,"columnWidthChange",$),(0,be.cz)(i,"columnOrderChange",$),(0,be.cz)(i,"rowOrderChange",$);const V=R&&_.length>0?(0,n.A)({},R,{firstColumnIndex:0,lastColumnIndex:_.length}):null,G=R&&w.length>0?(0,n.A)({},R,{firstColumnIndex:s.length-w.length,lastColumnIndex:s.length}):null,W=[],q=P({renderContext:R,rows:C,position:"center"}),Z=(0,Re.zo)(i),Y=P({renderContext:R,rowIndexOffset:C.length,position:"center",onRowRender:e=>{if(null==a.getDetailPanelContent)return;if(!y.has(e))return;const t=(e=>{const t=Ao(i.current.state),r=c[e],n=i.current.getRowIndexRelativeToVisibleRows(e),a=void 0!==n;if(o.isValidElement(r)&&a){const o=i.current.detailPanelHasAutoHeight(e)?"auto":u[e],a=i.current.unstable_getRowInternalSizes(e),s=(null==a?void 0:a.spacingTop)||0,l=t.positions[n]+i.current.unstable_getRowHeight(e)+s;return(0,x.jsx)(Ms,{rowId:e,style:{top:l},height:o,className:k.detailPanel,children:r},e)}return null})(e);t&&W.push(t)}}),X=P({renderContext:R,rows:E,rowIndexOffset:C.length+(Y?Y.length:0),position:"center"}),J=F(),Q={minHeight:J.style.minHeight};return J.style.minHeight&&"100%"===J.style.minHeight&&(J.style.minHeight=`calc(100% - ${Z.top}px - ${Z.bottom}px)`),(0,x.jsxs)(ys,(0,n.A)({},N(r),{children:[(0,x.jsx)(ms,{}),C.length>0?(0,x.jsxs)(Bs,{className:k.topPinnedRows,ownerState:(0,n.A)({},I,{position:zs.top}),style:{width:J.style.width,height:Z.top},role:"rowgroup",children:[V&&(0,x.jsx)(Fs,{className:k.leftPinnedColumns,ownerState:(0,n.A)({},I,{side:us.left,showCellVerticalBorder:a.showCellVerticalBorder}),children:P({renderContext:V,minFirstColumn:V.firstColumnIndex,maxLastColumn:V.lastColumnIndex,availableSpace:0,rows:C,position:"left"})}),(0,x.jsx)(js,{className:k.pinnedRowsRenderZone,ref:p,role:"presentation",children:q}),G&&(0,x.jsx)(Fs,{className:k.rightPinnedColumns,ownerState:(0,n.A)({},I,{side:us.right,showCellVerticalBorder:a.showCellVerticalBorder}),children:P({renderContext:G,minFirstColumn:G.firstColumnIndex,maxLastColumn:G.lastColumnIndex,availableSpace:0,rows:C,position:"right"})})]}):null,(0,x.jsxs)(bs,(0,n.A)({},J,{children:[V&&(0,x.jsx)(Fs,{ref:d,className:k.leftPinnedColumns,ownerState:(0,n.A)({},I,{side:us.left,showCellVerticalBorder:a.showCellVerticalBorder}),style:Q,children:P({renderContext:V,minFirstColumn:V.firstColumnIndex,maxLastColumn:V.lastColumnIndex,availableSpace:0,rowIndexOffset:C.length,position:"left"})}),(0,x.jsx)(ws,(0,n.A)({},B(),{children:Y})),G&&(0,x.jsx)(Fs,{ref:f,ownerState:(0,n.A)({},I,{side:us.right,showCellVerticalBorder:a.showCellVerticalBorder}),className:k.rightPinnedColumns,style:Q,children:P({renderContext:G,minFirstColumn:G.firstColumnIndex,maxLastColumn:G.lastColumnIndex,availableSpace:0,rowIndexOffset:C.length,position:"right"})}),W.length>0&&(0,x.jsx)(Ls,{className:k.detailPanels,ownerState:I,children:W})]})),E.length>0?(0,x.jsxs)(Bs,{className:k.bottomPinnedRows,ownerState:(0,n.A)({},I,{position:zs.bottom}),style:{width:J.style.width,height:Z.bottom},role:"rowgroup",children:[V&&(0,x.jsx)(Fs,{className:k.leftPinnedColumns,ownerState:(0,n.A)({},I,{side:us.left,showCellVerticalBorder:a.showCellVerticalBorder}),children:P({renderContext:V,minFirstColumn:V.firstColumnIndex,maxLastColumn:V.lastColumnIndex,availableSpace:0,rows:E,rowIndexOffset:C.length+(Y?Y.length:0),position:"left"})}),(0,x.jsx)(js,{className:k.pinnedRowsRenderZone,ref:h,role:"presentation",children:X}),G&&(0,x.jsx)(Fs,{className:k.rightPinnedColumns,ownerState:(0,n.A)({},I,{side:us.right,showCellVerticalBorder:a.showCellVerticalBorder}),children:P({renderContext:G,minFirstColumn:G.firstColumnIndex,maxLastColumn:G.lastColumnIndex,availableSpace:0,rows:E,rowIndexOffset:C.length+(Y?Y.length:0),position:"right"})})]}):null]}))}),Us=(e,t,r)=>{var o;let i;if(r.current.caches.columnPinning={orderedFieldsBeforePinningColumns:null},t.disableColumnPinning)i={};else if(t.pinnedColumns)i=t.pinnedColumns;else if(null!=(o=t.initialState)&&o.pinnedColumns){var a;i=null==(a=t.initialState)?void 0:a.pinnedColumns}else i={};return(0,n.A)({},e,{pinnedColumns:i})},Vs=e=>t=>(0,n.A)({},t,{pinnedColumns:e});function Hs(e){var t;const{id:r,value:i}=e,a=qa(),s=Za(),l=(e=>{const{classes:t,isExpanded:r}=e,n={root:["detailPanelToggleCell",r&&"detailPanelToggleCell--expanded"]};return(0,O.A)(n,z.B,t)})({classes:a.classes,isExpanded:i}),c=(0,S.N)(s,Cs),u=o.isValidElement(c[r]),d=i?a.slots.detailPanelCollapseIcon:a.slots.detailPanelExpandIcon;return(0,x.jsx)(a.slots.baseIconButton,(0,n.A)({size:"small",tabIndex:-1,disabled:!u,className:l.root,"aria-label":i?s.current.getLocaleText("collapseDetailPanel"):s.current.getLocaleText("expandDetailPanel")},null==(t=a.slotProps)?void 0:t.baseIconButton,{children:(0,x.jsx)(d,{fontSize:"inherit"})}))}const Gs="__detail_panel_toggle__",Ws=(0,n.A)({},ze.C,{field:Gs,type:"detailPanelToggle",editable:!1,sortable:!1,filterable:!1,resizable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,align:"left",width:40,valueGetter:e=>Ss(e.api.state).includes(e.id),renderCell:e=>(0,x.jsx)(Hs,(0,n.A)({},e)),renderHeader:()=>null}),qs=(e,t)=>{var r,o,i;return(0,n.A)({},e,{detailPanel:{heightCache:{},expandedRowIds:null!=(r=null!=(o=t.detailPanelExpandedRowIds)?o:null==(i=t.initialState)||null==(i=i.detailPanel)?void 0:i.expandedRowIds)?r:[]}})};function Zs(e,t,r,n){if("function"!=typeof t)return{};const o=(0,K.A6)(e),i=o.reduce((r,n)=>{const o=e.current.getRowParams(n);return r[n]=t(o),r},{}),a=o.reduce((t,o)=>{var a;if(null==i[o])return t;const s=e.current.getRowParams(o),l=r(s),c="auto"===l;return t[o]={autoHeight:c,height:c?null==(a=n[o])?void 0:a.height:l},t},{});return{contentCache:i,heightCache:a}}function Ys(e){const t=(0,We.h)(),r=qa(),i=(0,S.N)(t,ae.XU),a=(0,S.N)(t,K.V2),s=(0,S.N)(t,tr),l=e.row.__reorder__||e.id,c=o.useMemo(()=>!!r.rowReordering&&!i.length&&1===a&&0===Object.keys(s).length,[r.rowReordering,i,a,s]),u=(e=>{const{isDraggable:t,classes:r}=e,n={root:["rowReorderCell",t&&"rowReorderCell--draggable"],placeholder:["rowReorderCellPlaceholder"]};return(0,O.A)(n,z.B,r)})({isDraggable:c,classes:r.classes}),d=o.useCallback((r,n)=>o=>{dt(o)||t.current.getRow(e.id)&&(t.current.publishEvent(r,t.current.getRowParams(e.id),o),n&&n(o))},[t,e.id]),f=c?{onDragStart:d("rowDragStart"),onDragOver:d("rowDragOver"),onDragEnd:d("rowDragEnd")}:null;return"footer"===e.rowNode.type?null:(0,x.jsxs)("div",(0,n.A)({className:u.root,draggable:c},f,{children:[(0,x.jsx)(r.slots.rowReorderIcon,{}),(0,x.jsx)("div",{className:u.placeholder,children:l})]}))}const Xs=(0,n.A)({},ze.C,{field:"__reorder__",type:"reorder",sortable:!1,filterable:!1,width:50,align:"center",headerAlign:"center",disableColumnMenu:!0,disableExport:!0,disableReorder:!0,resizable:!1,aggregable:!1,renderHeader:()=>" ",renderCell:e=>"footer"===e.rowNode.type||"pinnedRow"===e.rowNode.type?null:(0,x.jsx)(Ys,(0,n.A)({},e))});var Ks=function(e){return e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e}(Ks||{});let Js=null,Qs={previousTargetId:null,dragDirection:null};function el({lazyLoadingFeatureFlag:e,rowsLoadingMode:t,gridDimensions:r}){return!e||!r||"server"!==t}const tl=e=>`auto-generated-skeleton-row-root-${e}`;function rl(e,t){var r,n;const o={topIds:[],bottomIds:[],idLookup:{}};return null==e||null==(r=e.top)||r.forEach(e=>{const r=(0,Re.HZ)(e,t);o.topIds.push(r),o.idLookup[r]=e}),null==e||null==(n=e.bottom)||n.forEach(e=>{const r=(0,Re.HZ)(e,t);o.bottomIds.push(r),o.idLookup[r]=e}),o}const nl=(e,t,r)=>{var o;return r.current.caches.pinnedRows=rl(t.pinnedRows,t.getRowId),(0,n.A)({},e,{rows:(0,n.A)({},e.rows,{additionalRowGroups:(0,n.A)({},null==(o=e.rows)?void 0:o.additionalRowGroups,{pinnedRows:{top:[],bottom:[]}})})})};function ol({groupingParams:e,rowModel:t,rowId:r,position:o,apiRef:i,isAutoGenerated:a}){var s,l;const c=(0,n.A)({},e.dataRowIdToModelLookup),u=(0,n.A)({},e.dataRowIdToIdLookup),d=(0,n.A)({},e.tree),f=(0,n.A)({},e.treeDepths),p={type:"pinnedRow",id:r,depth:0,parent:Re.OL,isAutoGenerated:a};Qa(p,d,f,null),a||(c[r]=t,u[r]=r),i.current.caches.rows.dataRowIdToModelLookup[r]=(0,n.A)({},t),i.current.caches.rows.dataRowIdToIdLookup[r]=r;const h=(null==(s=e.additionalRowGroups)?void 0:s.pinnedRows)||{},m={id:r,model:t};return null!=(l=e.additionalRowGroups)&&null!=(l=l.pinnedRows)&&null!=(l=l[o])&&l.includes(m)?(0,n.A)({},e,{dataRowIdToModelLookup:c,dataRowIdToIdLookup:u,tree:d,treeDepths:f}):(0,n.A)({},e,{dataRowIdToModelLookup:c,dataRowIdToIdLookup:u,tree:d,treeDepths:f,additionalRowGroups:(0,n.A)({},e.additionalRowGroups,{pinnedRows:(0,n.A)({},h,{[o]:[...h[o]||[],m]})})})}const il=(e,t)=>{const r=Ee(e,t);return((e,t)=>{const r=(e=>{const{classes:t}=e;return o.useMemo(()=>(0,O.A)({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},z.B,t),[t])})({classes:t.classes}),i=o.useCallback(o=>{const i=(0,n.A)({},ke.f,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),a=t.checkboxSelection,s=null!=o.lookup[ke.t];return a&&!s?(o.lookup[ke.t]=i,o.orderedFields=[ke.t,...o.orderedFields]):!a&&s?(delete o.lookup[ke.t],o.orderedFields=o.orderedFields.filter(e=>e!==ke.t)):a&&s&&(o.lookup[ke.t]=(0,n.A)({},i,o.lookup[ke.t])),o},[e,r,t.checkboxSelection]);Ie(e,"hydrateColumns",i)})(r,t),((e,t)=>{const r=(e=>{const{classes:t}=e;return o.useMemo(()=>(0,O.A)({rowReorderCellContainer:["rowReorderCellContainer"],columnHeaderReorder:["columnHeaderReorder"]},z.B,t),[t])})({classes:t.classes}),i=o.useCallback(o=>{const i=(0,n.A)({},Xs,{cellClassName:r.rowReorderCellContainer,headerClassName:r.columnHeaderReorder,headerName:e.current.getLocaleText("rowReorderingHeaderName")}),a=t.rowReordering,s=null!=o.lookup[i.field];return a&&s||(a&&!s?(o.lookup[i.field]=i,o.orderedFields=[i.field,...o.orderedFields]):!a&&s&&(delete o.lookup[i.field],o.orderedFields=o.orderedFields.filter(e=>e!==i.field))),o},[e,r,t.rowReordering]);Ie(e,"hydrateColumns",i)})(r,t),((e,t)=>{const r=o.useCallback(()=>{e.current.setStrategyAvailability("rowTree",Ga,t.treeData?()=>!0:()=>!1)},[e,t.treeData]),i=o.useCallback(()=>{var r;const o=t.groupingColDef;let i;i="function"==typeof o?o({groupingName:Ga,fields:[]}):o;const a=null!=(r=i)?r:{},{hideDescendantCount:s}=a,l=(0,M.A)(a,cs),c=(0,n.A)({},Va,{renderCell:e=>(0,x.jsx)(Ya,(0,n.A)({},e,{hideDescendantCount:s})),headerName:e.current.getLocaleText("treeDataGroupingHeaderName")});return(0,n.A)({},c,l,Ha)},[e,t.groupingColDef]),a=o.useCallback(e=>{const r=Ha.field,n=t.treeData,o=e.lookup[r];if(n){const t=i();if(o&&(t.width=o.width,t.flex=o.flex),e.lookup[r]=t,null==o){const t=e.orderedFields[0]===ke.t?1:0;e.orderedFields=[...e.orderedFields.slice(0,t),r,...e.orderedFields.slice(t)]}}else!n&&o&&(delete e.lookup[r],e.orderedFields=e.orderedFields.filter(e=>e!==r));return e},[t.treeData,i]),s=o.useCallback(e=>{if(!t.getTreeDataPath)throw new Error("MUI: No getTreeDataPath given.");const r=r=>({id:r,path:t.getTreeDataPath(e.dataRowIdToModelLookup[r]).map(e=>({key:e,field:null}))});return"full"===e.updates.type?(e=>{const t=[],r={[Re.OL]:(0,Re.Mk)()},n={};for(let o=0;o{throw new Error(["MUI: The path returned by `getTreeDataPath` should be unique.",`The rows with id #${e} and #${t} have the same.`,`Path: ${JSON.stringify(r.map(e=>e.key))}.`].join("\n"))}}):(e=>{const t=(0,n.A)({},e.previousTree),r=(0,n.A)({},e.previousTreeDepth),o=rs();for(let n=0;n(e=>{const{apiRef:t,rowTree:r,disableChildrenFiltering:n,isRowMatchingFilters:o}=e,i={},a={},s={},l={passingFilterItems:null,passingQuickFilterValues:null},c=(u,d,f)=>{let p;if(n&&u.depth>0)p=null;else if(o&&"footer"!==u.type){const r=t.current.getRow(u.id);o(r,void 0,l),p=(0,_r.Ko)([l.passingFilterItems],[l.passingQuickFilterValues],e.filterModel,e.apiRef,s)}else p=!0;let h,m=0;switch("group"===u.type&&u.children.forEach(e=>{var t;const n=r[e],o=c(n,null!=(t=p)?t:d,f&&!!u.childrenExpanded);m+=o}),p){case!0:h=!0;break;case!1:h=m>0;break;default:h=d}return i[u.id]=h,h?(a[u.id]=m,"footer"===u.type?m:m+1):0},u=Object.values(r);for(let e=0;e(e=>{const{rowTree:t,disableChildrenSorting:r,sortRowList:n,shouldRenderGroupBelowLeaves:o}=e,i=new Map,a=e=>{let s;if(!n||r&&-1!==e.depth)if(o){const r=[],n=[];for(let o=0;ot[e]))}null!=e.footerId&&s.push(e.footerId),i.set(e.id,s)};a(t[Re.OL]);const s=as.from(i.get(Re.OL));return s.forEach(e=>{const t=i.get(e.data);null!=t&&t.length&&e.insertAfter(as.from(t))}),s.data()})({rowTree:(0,K.qj)(e),sortRowList:r.sortRowList,disableChildrenSorting:t.disableChildrenSorting,shouldRenderGroupBelowLeaves:!1}),[e,t.disableChildrenSorting]);Ie(e,"hydrateColumns",a),Me(e,Ga,"rowTreeCreation",s),Me(e,Ga,"filtering",l),Me(e,Ga,"sorting",c),Me(e,Ga,"visibleRowsLookupCreation",ns),Te(()=>{r()});const u=o.useRef(!0);o.useEffect(()=>{u.current?u.current=!1:r()},[r])})(r,t),((e,t)=>{var r;const{lazyLoading:i}=null!=(r=t.experimentalFeatures)?r:{},a=o.useCallback(e=>{const r=e.tree[Re.OL];if(!i||"server"!==t.rowsLoadingMode||!t.rowCount||r.children.length>=t.rowCount)return e;const o=(0,n.A)({},e.tree),a=[...r.children];for(let e=0;e{const t=o.useCallback(t=>{var r,o,i,a;const s=e.current.caches.pinnedRows||{};let l=(0,n.A)({},t,{additionalRowGroups:(0,n.A)({},t.additionalRowGroups,{pinnedRows:{}})});if(null==(r=s.topIds)||r.forEach(t=>{l=ol({groupingParams:l,rowModel:s.idLookup[t],rowId:t,position:"top",apiRef:e,isAutoGenerated:!1})}),null==(o=s.bottomIds)||o.forEach(t=>{l=ol({groupingParams:l,rowModel:s.idLookup[t],rowId:t,position:"bottom",apiRef:e,isAutoGenerated:!1})}),null!=(i=s.bottomIds)&&i.length||null!=(a=s.topIds)&&a.length){const e=e=>!l.tree[e]||"pinnedRow"!==l.tree[e].type,t=l.tree[Re.OL];l.tree[Re.OL]=(0,n.A)({},t,{children:t.children.filter(e)}),l.dataRowIds=l.dataRowIds.filter(e)}return l},[e]);Ie(e,"hydrateRows",t)})(r),((e,t)=>{const r=o.useCallback(r=>null==t.getDetailPanelContent?(r.lookup[Gs]&&(delete r.lookup[Gs],r.orderedFields=r.orderedFields.filter(e=>e!==Gs)),r):(r.lookup[Gs]||(r.orderedFields=[Gs,...r.orderedFields],r.lookup[Gs]=(0,n.A)({},Ws,{headerName:e.current.getLocaleText("detailPanelToggle")})),r),[e,t.getDetailPanelContent]),i=o.useCallback((r,n)=>null==t.getDetailPanelContent?r:Ss(e.current.state).includes(n)?[...r,z.x["row--detailPanelExpanded"]]:r,[e,t.getDetailPanelContent]);Ie(e,"hydrateColumns",r),Ie(e,"rowClassName",i)})(r,t),((e,t)=>{const{disableColumnPinning:r,pinnedColumns:i,initialState:a}=t,s=(0,je.A)();let l=ds(e.current.state);if(null==l){const t=Us(e.current.state,{disableColumnPinning:r,pinnedColumns:i,initialState:a},e);l=ds(t)}const c=o.useRef([]),u=o.useCallback(t=>{if(0===t.orderedFields.length||r)return t;const[o,i]=Ps(l,t.orderedFields,"rtl"===s.direction);let a;const u=[...o,...i],{orderedFieldsBeforePinningColumns:d}=e.current.caches.columnPinning;if(d){a=new Array(t.orderedFields.length).fill(null);const r=[...a],n=[...t.orderedFields];c.current.forEach(e=>{if(!u.includes(e)&&t.lookup[e]){const t=d.indexOf(e);a[t]=e,r[t]=e,n.splice(n.indexOf(e),1)}}),u.forEach(e=>{let o=d.indexOf(e);if((-1===o||o>=r.length)&&(o=t.orderedFields.indexOf(e)),null!==r[o])for(o=0;null!==r[o];)o+=1;a[o]=e,r[o]=e,n.splice(n.indexOf(e),1)});let o=0;n.forEach(e=>{for(;null!==r[o];)o+=1;r[o]=e,a[o]=e}),e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=r}else a=[...t.orderedFields],e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=[...t.orderedFields];c.current=u;const f=a.filter(e=>!o.includes(e)&&!i.includes(e));return(0,n.A)({},t,{orderedFields:[...o,...f,...i]})},[e,r,l,s.direction]);Ie(e,"hydrateColumns",u)})(r,t),(e=>{Me(e,Se,"rowTreeCreation",Pe)})(r),Oe(Le,r,t),Oe(pt,r,t),Oe(qs,r,t),Oe(Us,r,t),Oe(Kt,r,t),Oe(nl,r,t),Oe(Qt,r,t),Oe(dr,r,t),Oe(pr,r,t),Oe(hr,r,t),Oe(gr,r,t),Oe(xr,r,t),Oe(Er,r,t),Oe(Ma,r,t),Oe(Ua,r,t),Oe(kr,r,t),Oe(Ki,r,t),Oe(Qi,r,t),Oe(aa,r,t),Oe(sa,r,t),((e,t)=>{const r=De(e,"useGridHeaderFiltering"),i=o.useCallback(r=>{e.current.setState(e=>{var o,i;return"DataGrid"===t.signature?e:(0,n.A)({},e,{headerFiltering:{editing:null!=(o=r.editing)?o:null,menuOpen:null!=(i=r.menuOpen)?i:null}})}),e.current.forceUpdate()},[e,t.signature]),a=o.useCallback(t=>{r.debug(`Starting edit mode on header filter for field: ${t}`),e.current.setHeaderFilterState({editing:t})},[e,r]),s=o.useCallback(()=>{r.debug("Stopping edit mode on header filter"),e.current.setHeaderFilterState({editing:null})},[e,r]),l=o.useCallback(t=>{r.debug(`Opening header filter menu for field: ${t}`),e.current.setHeaderFilterState({menuOpen:t})},[e,r]),c=o.useCallback(()=>{r.debug("Hiding header filter menu for active field");let t=e.current.state.headerFiltering.menuOpen;if(t){const r=(0,H.gv)(e),n=(0,H.FY)(e),o=(0,H.JR)(e);if(r[t]||(t=o[0]),!1===n[t]){const e=o.filter(e=>e===t||!1!==n[e]),r=e.indexOf(t);t=e[r+1]||e[r-1]}e.current.setHeaderFilterState({menuOpen:null}),e.current.setColumnHeaderFilterFocus(t)}},[e,r]),u={setHeaderFilterState:i};fe(e,{startHeaderFilterEditMode:a,stopHeaderFilterEditMode:s,showHeaderFilterMenu:l,hideHeaderFilterMenu:c},"public"),fe(e,u,"private")})(r,t),(e=>{const t=o.useCallback((t,r)=>{if("treeDataGroup"===e.current.getCellParams(t.id,t.field).colDef.type&&" "===r.key&&!r.shiftKey){if("group"!==t.rowNode.type)return;e.current.setRowChildrenExpansion(t.id,!t.rowNode.childrenExpanded)}},[e]);(0,be.cz)(e,"cellKeyDown",t)})(r),((e,t)=>{const r=De(e,"useGridKeyboardNavigation"),n=at(e,t).rows,i=(0,je.A)(),a=o.useMemo(()=>function(e,t){const r=(0,K.$2)(e)||{};return[...r.top||[],...t,...r.bottom||[]]}(e,n),[e,n]),s="DataGrid"!==t.signature&&t.unstable_headerFilters,l=o.useCallback((t,n,o="left")=>{const i=(0,ie.em)(e),a=e.current.unstable_getCellColSpanInfo(n,t);a&&a.spannedByColSpan&&("left"===o?t=a.leftVisibleCellIndex:"right"===o&&(t=a.rightVisibleCellIndex));const s=i.findIndex(e=>e.id===n);r.debug(`Navigating to cell row ${s}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:s});const l=e.current.getVisibleColumns()[t].field;e.current.setCellFocus(n,l)},[e,r]),c=o.useCallback((t,n)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(o,n)},[e,r]),u=o.useCallback((t,n)=>{r.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(o,n)},[e,r]),d=o.useCallback((t,n,o)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const{field:i}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(i,n,o)},[e,r]),f=o.useCallback(e=>{var t;return null==(t=a[e])?void 0:t.id},[a]),p=o.useCallback((t,r)=>{const n=r.currentTarget.querySelector(`.${z.x.columnHeaderTitleContainerContent}`);if(n&&n.contains(r.target)&&t.field!==ke.f.field)return;if(!e.current.getRootDimensions())return;const o=e.current.getViewportPageSize(),p=t.field?e.current.getColumnIndex(t.field):0,h=a.length>0?0:null,m=a.length-1,g=(0,H.iv)(e).length-1,y=X(e);let v=!0;switch(r.key){case"ArrowDown":null!==h&&(s?u(p,r):l(p,f(h)));break;case"ArrowRight":{const e=fa({currentColIndex:p,firstColIndex:0,lastColIndex:g,direction:i.direction});null!==e&&c(e,r);break}case"ArrowLeft":{const e=da({currentColIndex:p,firstColIndex:0,lastColIndex:g,direction:i.direction});null!==e&&c(e,r);break}case"ArrowUp":y>0&&d(p,y-1,r);break;case"PageDown":null!==h&&null!==m&&l(p,f(Math.min(h+o,m)));break;case"Home":c(0,r);break;case"End":c(g,r);break;case"Enter":(r.ctrlKey||r.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:v=!1}v&&r.preventDefault()},[e,a.length,s,u,l,f,i.direction,c,d]),h=o.useCallback((t,r)=>{if(!e.current.getRootDimensions())return;const n=ca(e)===t.field,o=ua(e)===t.field;if(n||o||!(0,ot.q9)(r.key))return;const s=e.current.getViewportPageSize(),d=t.field?e.current.getColumnIndex(t.field):0,p=a.length-1,h=(0,H.iv)(e).length-1;let m=!0;switch(r.key){case"ArrowDown":{const e=f(0);null!=e&&l(d,e);break}case"ArrowRight":{const e=fa({currentColIndex:d,firstColIndex:0,lastColIndex:h,direction:i.direction});null!==e&&u(e,r);break}case"ArrowLeft":{const n=da({currentColIndex:d,firstColIndex:0,lastColIndex:h,direction:i.direction});null!==n?u(n,r):e.current.setColumnHeaderFilterFocus(t.field,r);break}case"ArrowUp":c(d,r);break;case"PageDown":null!==p&&l(d,f(Math.min(0+s,p)));break;case"Home":u(0,r);break;case"End":u(h,r);break;case" ":break;default:m=!1}m&&r.preventDefault()},[e,a.length,u,i.direction,c,l,f]),m=o.useCallback((t,r)=>{if(!e.current.getRootDimensions())return;const n=(0,se.xv)(e);if(null===n)return;const{field:o,depth:i}=n,{fields:s,depth:u,maxDepth:p}=t,h=e.current.getViewportPageSize(),m=e.current.getColumnIndex(o),g=o?e.current.getColumnIndex(o):0,y=a.length-1,v=(0,H.iv)(e).length-1;let b=!0;switch(r.key){case"ArrowDown":u===p-1?c(m,r):d(m,i+1,r);break;case"ArrowUp":u>0&&d(m,i-1,r);break;case"ArrowRight":{const e=s.length-s.indexOf(o)-1;m+e+1<=v&&d(m+e+1,i,r);break}case"ArrowLeft":{const e=s.indexOf(o);m-e-1>=0&&d(m-e-1,i,r);break}case"PageDown":null!==y&&l(g,f(Math.min(0+h,y)));break;case"Home":d(0,i,r);break;case"End":d(v,i,r);break;case" ":break;default:b=!1}b&&r.preventDefault()},[e,a.length,c,d,l,f]),g=o.useCallback((t,r)=>{if(dt(r))return;const n=e.current.getCellParams(t.id,t.field);if(n.cellMode===rt.Edit||!(0,ot.q9)(r.key))return;if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:r,cell:n}))return;const o=e.current.getRootDimensions();if(0===a.length||!o)return;const d=i.direction,p=e.current.getViewportPageSize(),h=t.field?e.current.getColumnIndex(t.field):0,m=a.findIndex(e=>e.id===t.id),g=a.length-1,y=(0,H.iv)(e).length-1;let v=!0;switch(r.key){case"ArrowDown":m0?l(h,f(m-1)):s?u(h,r):c(h,r);break;case"ArrowRight":{const e=fa({currentColIndex:h,firstColIndex:0,lastColIndex:y,direction:d});null!==e&&l(e,f(m),"rtl"===d?"left":"right");break}case"ArrowLeft":{const e=da({currentColIndex:h,firstColIndex:0,lastColIndex:y,direction:d});null!==e&&l(e,f(m),"rtl"===d?"right":"left");break}case"Tab":r.shiftKey&&h>0?l(h-1,f(m),"left"):!r.shiftKey&&h=0?l(h,f(e)):c(h,r);break}case"Home":r.ctrlKey||r.metaKey||r.shiftKey?l(0,f(0)):l(0,f(m));break;case"End":r.ctrlKey||r.metaKey||r.shiftKey?l(y,f(g)):l(y,f(m));break;default:v=!1}v&&r.preventDefault()},[e,a,i.direction,l,f,s,u,c]),y=o.useCallback((e,{event:t})=>" "!==t.key&&e,[]);Ie(e,"canStartEditing",y),(0,be.cz)(e,"columnHeaderKeyDown",p),(0,be.cz)(e,"headerFilterKeyDown",h),(0,be.cz)(e,"columnGroupHeaderKeyDown",m),(0,be.cz)(e,"cellKeyDown",g)})(r,t),((e,t)=>{const r=De(e,"useGridSelection"),i=e=>(...r)=>{t.rowSelection&&e(...r)},a=o.useMemo(()=>ft(t.rowSelectionModel,(0,Ne.Bi)(e.current.state)),[e,t.rowSelectionModel]),s=o.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:a,propOnChange:t.onRowSelectionModelChange,stateSelector:Ne.Bi,changeEvent:"rowSelectionChange"});const{checkboxSelection:l,disableMultipleRowSelection:c,disableRowSelectionOnClick:u,isRowSelectable:d}=t,f=!c||l,p=at(e,t),h=o.useCallback(t=>{var r;let n=t;const o=null!=(r=s.current)?r:t,i=e.current.isRowSelected(t);if(i){const t=(0,ie.ux)(e),r=t.findIndex(e=>e===o),i=t.findIndex(e=>e===n);if(r===i)return;n=r>i?t[i+1]:t[i-1]}s.current=t,e.current.selectRowRange({startId:o,endId:n},!i)},[e]),m=o.useCallback(o=>{if(t.signature===be.HV.DataGrid&&!t.checkboxSelection&&Array.isArray(o)&&o.length>1)throw new Error(["MUI: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));(0,Ne.Bi)(e.current.state)!==o&&(r.debug("Setting selection model"),e.current.setState(e=>(0,n.A)({},e,{rowSelection:t.rowSelection?o:[]})),e.current.forceUpdate())},[e,r,t.rowSelection,t.signature,t.checkboxSelection]),g=o.useCallback(t=>(0,Ne.Bi)(e.current.state).includes(t),[e]),y=o.useCallback(t=>{if(d&&!d(e.current.getRowParams(t)))return!1;const r=e.current.getRowNode(t);return"footer"!==(null==r?void 0:r.type)&&"pinnedRow"!==(null==r?void 0:r.type)},[e,d]),v=o.useCallback(()=>(0,Ne.gt)(e),[e]),b=o.useCallback((t,n=!0,o=!1)=>{if(e.current.isRowSelectable(t))if(s.current=t,o)r.debug(`Setting selection for row ${t}`),e.current.setRowSelectionModel(n?[t]:[]);else{r.debug(`Toggling selection for row ${t}`);const o=(0,Ne.Bi)(e.current.state).filter(e=>e!==t);n&&o.push(t),(o.length<2||f)&&e.current.setRowSelectionModel(o)}},[e,r,f]),_=o.useCallback((t,o=!0,i=!1)=>{r.debug("Setting selection for several rows");const a=t.filter(t=>e.current.isRowSelectable(t));let s;if(i)s=o?a:[];else{const t=(0,n.A)({},(0,Ne.Zk)(e));a.forEach(e=>{o?t[e]=e:delete t[e]}),s=Object.values(t)}(s.length<2||f)&&e.current.setRowSelectionModel(s)},[e,r,f]),x=o.useCallback(({startId:t,endId:n},o=!0,i=!1)=>{if(!e.current.getRow(t)||!e.current.getRow(n))return;r.debug(`Expanding selection from row ${t} to row ${n}`);const a=(0,ie.ux)(e),s=a.indexOf(t),l=a.indexOf(n),[c,u]=s>l?[l,s]:[s,l],d=a.slice(c,u+1);e.current.selectRows(d,o,i)},[e,r]),w={selectRows:_,selectRowRange:x};fe(e,{selectRow:b,setRowSelectionModel:m,getSelectedRows:v,isRowSelected:g,isRowSelectable:y},"public"),fe(e,w,t.signature===be.HV.DataGrid?"private":"public");const A=o.useCallback(()=>{if(t.keepNonExistentRowsSelected)return;const r=(0,Ne.Bi)(e.current.state),o=(0,K.rI)(e),i=(0,n.A)({},(0,Ne.Zk)(e));let a=!1;r.forEach(e=>{o[e]||(delete i[e],a=!0)}),a&&e.current.setRowSelectionModel(Object.values(i))},[e,t.keepNonExistentRowsSelected]),S=o.useCallback((t,r)=>{const n=r.metaKey||r.ctrlKey,o=!l&&!n&&!(0,ot.kx)(r),i=!f||o,a=e.current.isRowSelected(t);i?e.current.selectRow(t,!!o||!a,!0):e.current.selectRow(t,!a,!1)},[e,f,l]),C=o.useCallback((t,r)=>{var n;if(u)return;const o=null==(n=r.target.closest(`.${z.x.cell}`))?void 0:n.getAttribute("data-field");if(o!==ke.f.field&&o!==st){if(o){const t=e.current.getColumn(o);if((null==t?void 0:t.type)===Qe)return}"pinnedRow"!==e.current.getRowNode(t.id).type&&(r.shiftKey&&(f||l)?h(t.id):S(t.id,r))}},[u,f,l,e,h,S]),E=o.useCallback((e,t)=>{var r;f&&t.shiftKey&&(null==(r=window.getSelection())||r.removeAllRanges())},[f]),T=o.useCallback((t,r)=>{r.nativeEvent.shiftKey?h(t.id):e.current.selectRow(t.id,t.value)},[e,h]),I=o.useCallback(r=>{const n=t.checkboxSelectionVisibleOnly&&t.pagination?(0,Fe.ee)(e):(0,ie.ux)(e),o=(0,ie.ZI)(e);e.current.selectRows(n,r.value,(null==o?void 0:o.items.length)>0)},[e,t.checkboxSelectionVisibleOnly,t.pagination]),k=o.useCallback((t,r)=>{if(e.current.getCellMode(t.id,t.field)!==rt.Edit&&!dt(r)){if((0,ot.q9)(r.key)&&r.shiftKey){const n=(0,se.MO)(e);if(n&&n.id!==t.id){r.preventDefault();const o=e.current.isRowSelected(n.id);if(!f)return void e.current.selectRow(n.id,!o,!0);const i=e.current.getRowIndexRelativeToVisibleRows(n.id),a=e.current.getRowIndexRelativeToVisibleRows(t.id);let s,l;i>a?o?(s=a,l=i-1):(s=a,l=i):o?(s=i+1,l=a):(s=i,l=a);const c=p.rows.slice(s,l+1).map(e=>e.id);return void e.current.selectRows(c,!o)}}if(" "===r.key&&r.shiftKey)return r.preventDefault(),void S(t.id,r);"a"===r.key&&(r.ctrlKey||r.metaKey)&&(r.preventDefault(),_(e.current.getAllRowIds(),!0))}},[e,S,_,p.rows,f]);(0,be.cz)(e,"sortedRowsSet",i(A)),(0,be.cz)(e,"rowClick",i(C)),(0,be.cz)(e,"rowSelectionCheckboxChange",i(T)),(0,be.cz)(e,"headerSelectionCheckboxChange",I),(0,be.cz)(e,"cellMouseDown",i(E)),(0,be.cz)(e,"cellKeyDown",i(k)),o.useEffect(()=>{void 0!==a&&e.current.setRowSelectionModel(a)},[e,a,t.rowSelection]),o.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const M=null!=a;o.useEffect(()=>{if(M||!t.rowSelection)return;const r=(0,Ne.Bi)(e.current.state);if(y){const t=r.filter(e=>y(e));t.length{if(!t.rowSelection||M)return;const r=(0,Ne.Bi)(e.current.state);!f&&r.length>1&&e.current.setRowSelectionModel([])},[e,f,l,M,t.rowSelection])})(r,t),((e,t)=>{var r;const i=(0,S.N)(e,ds),a=(0,je.A)(),s=o.useCallback((r,o)=>{if(t.disableColumnPinning)return r;const s=(0,H.TI)(e),[l,c]=Ps(i,s,"rtl"===a.direction);if(!o.colIndex||0===l.length&&0===c.length)return r;const u=(0,H.iv)(e),d=(0,H.fc)(e),f=(0,H.Sw)(e),p=e.current.virtualScrollerRef.current.clientWidth,h=Math.abs(e.current.virtualScrollerRef.current.scrollLeft),m=u[o.colIndex].computedWidth,g=f[o.colIndex],y=f[l.length],v=d-f[f.length-c.length],b=g+m;if(b-(p-v)>h){const e=b-(p-v);return(0,n.A)({},r,{left:e})}if(gt.disableColumnPinning||!1===r.pinnable?e:[...e,"columnMenuPinningItem"],[t.disableColumnPinning]),c=o.useCallback((t,{targetIndex:r})=>{const n=(0,H.TI)(e),[o,s]=Ps(i,n,"rtl"===a.direction);return 0===o.length&&0===s.length?t:!(o.length>0&&r0?!(r>=(0,H.iv)(e).length-s.length)&&t:t)},[e,i,a.direction]),u=o.useCallback((r,o)=>{var i,a,s;const l=ds(e.current.state);return!o.exportOnlyDirtyModels||null!=t.pinnedColumns||null!=(null==(i=t.initialState)?void 0:i.pinnedColumns)||(null!=(a=l.left)?a:[]).length>0||(null!=(s=l.right)?s:[]).length>0?(0,n.A)({},r,{pinnedColumns:l}):r},[e,t.pinnedColumns,null==(r=t.initialState)?void 0:r.pinnedColumns]),d=o.useCallback((t,r)=>{const n=r.stateToRestore.pinnedColumns;return null!=n&&e.current.setState(Vs(n)),t},[e]);Ie(e,"scrollToIndexes",s),Ie(e,"columnMenu",l),Ie(e,"canBeReordered",c),Ie(e,"exportState",u),Ie(e,"restoreState",d),e.current.registerControlState({stateId:"pinnedColumns",propModel:t.pinnedColumns,propOnChange:t.onPinnedColumnsChange,stateSelector:ds,changeEvent:"pinnedColumnsChange"});const f=o.useCallback(e=>{if(t.disableColumnPinning)throw new Error(`MUI: You cannot call \`apiRef.current.${e}\` when \`disableColumnPinning\` is true.`)},[t.disableColumnPinning]),p=o.useCallback((t,r)=>{if(f("pinColumn"),e.current.isColumnPinned(t)===r)return;const n=r===us.right?us.left:us.right,o={[r]:[...i[r]||[],t],[n]:(i[n]||[]).filter(e=>e!==t)};e.current.setPinnedColumns(o)},[e,f,i]),h=o.useCallback(t=>{f("unpinColumn"),e.current.setPinnedColumns({left:(i.left||[]).filter(e=>e!==t),right:(i.right||[]).filter(e=>e!==t)})},[e,f,i.left,i.right]),m=o.useCallback(()=>(f("getPinnedColumns"),ds(e.current.state)),[e,f]),g=o.useCallback(t=>{f("setPinnedColumns"),e.current.setState(Vs(t)),e.current.forceUpdate()},[e,f]),y=o.useCallback(e=>(f("isColumnPinned"),(i.left||[]).includes(e)?us.left:!!(i.right||[]).includes(e)&&us.right),[i.left,i.right,f]);fe(e,{pinColumn:p,unpinColumn:h,getPinnedColumns:m,setPinnedColumns:g,isColumnPinned:y},"public");const v=o.useCallback(t=>{if(!e.current.caches.columnPinning.orderedFieldsBeforePinningColumns)return;const{column:r,targetIndex:n,oldIndex:o}=t,i=n>o?1:-1,a=(0,H.JR)(e)[n-i],s=[...e.current.caches.columnPinning.orderedFieldsBeforePinningColumns];let l=s.findIndex(e=>e===r.field),c=l+i;const u=s.findIndex(e=>e===a);for(;i>0?lu;){for(;e.current.isColumnPinned(s[c]);)c+=i;const t=s[l];s[l]=s[c],s[c]=t,l=c,c=l+i}e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=s},[e]);(0,be.cz)(e,"columnOrderChange",v),o.useEffect(()=>{t.pinnedColumns&&e.current.setPinnedColumns(t.pinnedColumns)},[e,t.pinnedColumns])})(r,t),((e,t)=>{const r=o.useCallback(r=>{e.current.caches.pinnedRows=rl(r,t.getRowId),e.current.requestPipeProcessorsApplication("hydrateRows")},[e,t.getRowId]);fe(e,{unstable_setPinnedRows:r},"public");const n=o.useRef(!0);o.useEffect(()=>{n.current?n.current=!1:e.current.unstable_setPinnedRows(t.pinnedRows)},[e,t.pinnedRows])})(r,t),function(e,t){var r,i;const a=De(e,"useGridColumns"),s=Xt,l=o.useRef(t.columns),c=o.useRef(s);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:H.FY,changeEvent:"columnVisibilityModelChange"});const u=o.useCallback(t=>{a.debug("Updating columns state."),e.current.setState(Gt(t)),e.current.forceUpdate(),e.current.publishEvent("columnsChange",t.orderedFields)},[a,e]),d=o.useCallback(t=>(0,H.gv)(e)[t],[e]),f=o.useCallback(()=>(0,H.OV)(e),[e]),p=o.useCallback(()=>(0,H.iv)(e),[e]),h=o.useCallback((t,r=!0)=>(r?(0,H.iv)(e):(0,H.OV)(e)).findIndex(e=>e.field===t),[e]),m=o.useCallback(t=>{const r=h(t);return(0,H.Sw)(e)[r]},[e,h]),g=o.useCallback(t=>{(0,H.FY)(e)!==t&&(e.current.setState(r=>(0,n.A)({},r,{columns:Ht({apiRef:e,columnTypes:s,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})})),e.current.forceUpdate())},[e,s]),y=o.useCallback(t=>{const r=Ht({apiRef:e,columnTypes:s,columnsToUpsert:t,initialState:void 0,keepOnlyColumnsToUpsert:!1});u(r)},[e,u,s]),v=o.useCallback((t,r)=>{var o;const i=(0,H.FY)(e);if(r!==(null==(o=i[t])||o)){const o=(0,n.A)({},i,{[t]:r});e.current.setColumnVisibilityModel(o)}},[e]),b=o.useCallback(t=>(0,H.JR)(e).findIndex(e=>e===t),[e]),_=o.useCallback((t,r)=>{const o=(0,H.JR)(e),i=b(t);if(i===r)return;a.debug(`Moving column ${t} to index ${r}`);const s=[...o],l=s.splice(i,1)[0];s.splice(r,0,l),u((0,n.A)({},(0,H.em)(e.current.state),{orderedFields:s}));const c={column:e.current.getColumn(t),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:i};e.current.publishEvent("columnIndexChange",c)},[e,a,u,b]),w=o.useCallback((t,r)=>{var o,i;a.debug(`Updating column ${t} width to ${r}`);const s=(0,H.em)(e.current.state),l=s.lookup[t],c=(0,n.A)({},l,{width:r,hasBeenResized:!0});u(Ut((0,n.A)({},s,{lookup:(0,n.A)({},s.lookup,{[t]:c})}),null!=(o=null==(i=e.current.getRootDimensions())?void 0:i.viewportInnerSize.width)?o:0)),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:c,width:r})},[e,a,u]),A={setColumnIndex:_};fe(e,{getColumn:d,getAllColumns:f,getColumnIndex:h,getColumnPosition:m,getVisibleColumns:p,getColumnIndexRelativeToVisibleColumns:b,updateColumns:y,setColumnVisibilityModel:g,setColumnVisibility:v,setColumnWidth:w},"public"),fe(e,A,t.signature===be.HV.DataGrid?"private":"public");const S=o.useCallback((r,o)=>{var i,a;const s={},l=(0,H.FY)(e);(!o.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys(null!=(i=null==(a=t.initialState)||null==(a=a.columns)?void 0:a.columnVisibilityModel)?i:{}).length>0||Object.keys(l).length>0)&&(s.columnVisibilityModel=l),s.orderedFields=(0,H.JR)(e);const c=(0,H.OV)(e),u={};return c.forEach(e=>{if(e.hasBeenResized){const t={};$t.forEach(r=>{let n=e[r];n===1/0&&(n=-1),t[r]=n}),u[e.field]=t}}),Object.keys(u).length>0&&(s.dimensions=u),(0,n.A)({},r,{columns:s})},[e,t.columnVisibilityModel,null==(r=t.initialState)?void 0:r.columns]),C=o.useCallback((t,r)=>{var n;const o=null==(n=r.stateToRestore.columns)?void 0:n.columnVisibilityModel,i=r.stateToRestore.columns;if(null==o&&null==i)return t;const a=Ht({apiRef:e,columnTypes:s,columnsToUpsert:[],initialState:i,columnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return e.current.setState(Gt(a)),null!=i&&e.current.publishEvent("columnsChange",a.orderedFields),t},[e,s]),E=o.useCallback((e,r)=>{if(r===Yt.columns){var o;const e=t.slots.columnsPanel;return(0,x.jsx)(e,(0,n.A)({},null==(o=t.slotProps)?void 0:o.columnsPanel))}return e},[t.slots.columnsPanel,null==(i=t.slotProps)?void 0:i.columnsPanel]),T=o.useCallback(e=>t.disableColumnSelector?e:[...e,"columnMenuColumnsItem"],[t.disableColumnSelector]);Ie(e,"columnMenu",T),Ie(e,"exportState",S),Ie(e,"restoreState",C),Ie(e,"preferencePanel",E);const I=o.useRef(null);(0,be.cz)(e,"viewportInnerSizeChange",t=>{I.current!==t.width&&(I.current=t.width,u(Ut((0,H.em)(e.current.state),t.width)))});const k=o.useCallback(()=>{a.info("Columns pipe processing have changed, regenerating the columns");const t=Ht({apiRef:e,columnTypes:s,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});u(t)},[e,a,u,s]);ht(e,"hydrateColumns",k);const M=o.useRef(!0);o.useEffect(()=>{if(M.current)return void(M.current=!1);if(a.info(`GridColumns have changed, new length ${t.columns.length}`),l.current===t.columns&&c.current===s)return;const r=Ht({apiRef:e,columnTypes:s,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});l.current=t.columns,c.current=s,u(r)},[a,e,u,t.columns,s]),o.useEffect(()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,a,t.columnVisibilityModel])}(r,t),((e,t)=>{const r=De(e,"useGridRows"),i=at(e,t),a=o.useRef(Date.now()),s=(0,Jt.Z)(),l=o.useCallback(t=>{const r=(0,K.rI)(e)[t];if(r)return r;const n=e.current.getRowNode(t);return n&&(0,Re.DJ)(n)?{[Re.gb]:t}:null},[e]),c=t.getRowId,u=o.useCallback(e=>Re.gb in e?e[Re.gb]:c?c(e):e.id,[c]),d=o.useMemo(()=>i.rows.reduce((e,{id:t},r)=>(e[t]=r,e),{}),[i.rows]),f=o.useCallback(({cache:r,throttle:o})=>{const i=()=>{a.current=Date.now(),e.current.setState(r=>(0,n.A)({},r,{rows:(0,Re.TW)({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:(0,K.qj)(e),previousTreeDepths:(0,K.Mz)(e)})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(s.clear(),e.current.caches.rows=r,!o)return void i();const l=t.throttleRowsMs-(Date.now()-a.current);l>0?s.start(l,i):i()},[t.throttleRowsMs,t.rowCount,t.loading,e,s]),p=o.useCallback(n=>{r.debug(`Updating all rows, new length ${n.length}`);const o=(0,Re.Z)({rows:n,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),i=e.current.caches.rows;o.rowsBeforePartialUpdates=i.rowsBeforePartialUpdates,f({cache:o,throttle:!0})},[r,t.getRowId,t.loading,t.rowCount,f,e]),h=o.useCallback(r=>{if(t.signature===be.HV.DataGrid&&r.length>1)throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));const o=[];r.forEach(r=>{const i=(0,Re.HZ)(r,t.getRowId,"A row was provided without id when calling updateRows():"),a=e.current.getRowNode(i);if("pinnedRow"===(null==a?void 0:a.type)){const t=e.current.caches.pinnedRows,o=t.idLookup[i];o&&(t.idLookup[i]=(0,n.A)({},o,r))}else o.push(r)});const i=(0,Re.Ze)({updates:o,getRowId:t.getRowId,previousCache:e.current.caches.rows});f({cache:i,throttle:!0})},[t.signature,t.getRowId,f,e]),m=o.useCallback(()=>{const t=(0,K.A6)(e),r=(0,K.rI)(e);return new Map(t.map(e=>{var t;return[e,null!=(t=r[e])?t:{}]}))},[e]),g=o.useCallback(()=>(0,K.H0)(e),[e]),y=o.useCallback(()=>(0,K.A6)(e),[e]),v=o.useCallback(e=>d[e],[d]),b=o.useCallback((t,r)=>{const o=e.current.getRowNode(t);if(!o)throw new Error(`MUI: No row with id #${t} found`);if("group"!==o.type)throw new Error("MUI: Only group nodes can be expanded or collapsed");const i=(0,n.A)({},o,{childrenExpanded:r});e.current.setState(e=>(0,n.A)({},e,{rows:(0,n.A)({},e.rows,{tree:(0,n.A)({},e.rows.tree,{[t]:i})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",i)},[e]),_=o.useCallback(t=>{var r;return null!=(r=(0,K.qj)(e)[t])?r:null},[e]),x=o.useCallback(({skipAutoGeneratedRows:t=!0,groupId:r,applySorting:n,applyFiltering:o})=>{const i=(0,K.qj)(e);let a;if(n){const n=i[r];if(!n)return[];const o=(0,ae.RJ)(e);a=[];for(let e=o.findIndex(e=>e===r)+1;en.depth;e+=1){const r=o[e];t&&(0,Re.DJ)(i[r])||a.push(r)}}else a=(0,Re.l_)(i,r,t);if(o){const t=(0,ie.wx)(e);a=a.filter(e=>!1!==t[e])}return a},[e]),w=o.useCallback((t,o)=>{const i=e.current.getRowNode(t);if(!i)throw new Error(`MUI: No row with id #${t} found`);if(i.parent!==Re.OL)throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");if("leaf"!==i.type)throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");e.current.setState(i=>{const a=(0,K.qj)(i,e.current.instanceId)[Re.OL],s=a.children,l=s.findIndex(e=>e===t);if(-1===l||l===o)return i;r.debug(`Moving row ${t} to index ${o}`);const c=[...s];return c.splice(o,0,c.splice(l,1)[0]),(0,n.A)({},i,{rows:(0,n.A)({},i.rows,{tree:(0,n.A)({},i.rows.tree,{[Re.OL]:(0,n.A)({},a,{children:c})})})})}),e.current.publishEvent("rowsSet")},[e,r]),A=o.useCallback((r,o)=>{if(t.signature===be.HV.DataGrid&&o.length>1)throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===o.length)return;if((0,K.V2)(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const i=(0,n.A)({},(0,K.qj)(e)),a=(0,n.A)({},(0,K.rI)(e)),s=(0,n.A)({},(0,K.gk)(e)),l=i[Re.OL],c=[...l.children],u=new Set;for(let e=0;e"leaf"===i[e].type);e.current.caches.rows.dataRowIdToModelLookup=a,e.current.caches.rows.dataRowIdToIdLookup=s,e.current.setState(e=>(0,n.A)({},e,{rows:(0,n.A)({},e.rows,{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,dataRowIds:d,tree:i})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),S={getRow:l,getRowId:u,getRowModels:m,getRowsCount:g,getAllRowIds:y,setRows:p,updateRows:h,getRowNode:_,getRowIndexRelativeToVisibleRows:v,unstable_replaceRows:A},C={setRowIndex:w,setRowChildrenExpansion:b,getRowGroupChildren:x},E=o.useCallback(()=>{let o;r.info("Row grouping pre-processing have changed, regenerating the row tree"),o=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?(0,n.A)({},e.current.caches.rows,{updates:{type:"full",rows:(0,K.A6)(e)}}):(0,Re.Z)({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),f({cache:o,throttle:!1})},[r,e,t.rows,t.getRowId,t.loading,t.rowCount,f]),T=o.useCallback(e=>{"rowTreeCreation"===e&&E()},[E]),I=o.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==(0,K.Y1)(e)&&E()},[e,E]);(0,be.cz)(e,"activeStrategyProcessorChange",T),(0,be.cz)(e,"strategyAvailabilityChange",I);const k=o.useCallback(()=>{e.current.setState(r=>{const o=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:(0,K.qj)(r,e.current.instanceId),treeDepths:(0,K.Mz)(r,e.current.instanceId),dataRowIds:(0,K.A6)(r,e.current.instanceId),dataRowIdToModelLookup:(0,K.rI)(r,e.current.instanceId),dataRowIdToIdLookup:(0,K.gk)(r,e.current.instanceId)});return(0,n.A)({},r,{rows:(0,n.A)({},r.rows,o,{totalTopLevelRowCount:(0,Re.fS)({tree:o.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);ht(e,"hydrateRows",k),fe(e,S,"public"),fe(e,C,t.signature===be.HV.DataGrid?"private":"public");const M=o.useRef(!0);o.useEffect(()=>{if(M.current)return void(M.current=!1);const o=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,i=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,a=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;if(o)return i||(e.current.setState(e=>(0,n.A)({},e,{rows:(0,n.A)({},e.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),void(a||(e.current.setState(e=>(0,n.A)({},e,{rows:(0,n.A)({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()));r.debug(`Updating all rows, new length ${t.rows.length}`),f({cache:(0,Re.Z)({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1})},[t.rows,t.rowCount,t.getRowId,t.loading,r,f,e])})(r,t),function(e,t){const{getRowId:r}=t,n=o.useCallback(t=>({field:t,colDef:e.current.getColumn(t)}),[e]),i=o.useCallback(t=>{const r=e.current.getRow(t);if(!r)throw new Yn(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:r}},[e]),a=o.useCallback((t,r)=>{const n=e.current.getRow(t),o=e.current.getRowNode(t);if(!n||!o)throw new Yn(`No row with id #${t} found`);const i=(0,se.MO)(e),a=(0,se.H5)(e);return{id:t,field:r,row:n,rowNode:o,value:n[r],colDef:e.current.getColumn(r),cellMode:e.current.getCellMode(t,r),api:e.current,hasFocus:null!==i&&i.field===r&&i.id===t,tabIndex:a&&a.field===r&&a.id===t?0:-1}},[e]),s=o.useCallback((t,r)=>{const n=e.current.getColumn(r),o=e.current.getCellValue(t,r),i=e.current.getRow(t),a=e.current.getRowNode(t);if(!i||!a)throw new Yn(`No row with id #${t} found`);const s=(0,se.MO)(e),l=(0,se.H5)(e),c={id:t,field:r,row:i,rowNode:a,colDef:n,cellMode:e.current.getCellMode(t,r),hasFocus:null!==s&&s.field===r&&s.id===t,tabIndex:l&&l.field===r&&l.id===t?0:-1,value:o,formattedValue:o,isEditable:!1};return n&&n.valueFormatter&&(c.formattedValue=n.valueFormatter({id:t,field:c.field,value:c.value,api:e.current})),c.isEditable=n&&e.current.isCellEditable(c),c},[e]),l=o.useCallback((t,r)=>{const n=e.current.getColumn(r);if(!n||!n.valueGetter){const n=e.current.getRow(t);if(!n)throw new Yn(`No row with id #${t} found`);return n[r]}return n.valueGetter(a(t,r))},[e,a]),c=o.useCallback((e,t)=>{var n;const o=Re.gb in e?e[Re.gb]:null!=(n=null==r?void 0:r(e))?n:e.id,i=t.field;return t&&t.valueGetter?t.valueGetter(a(o,i)):e[i]},[a,r]),u=o.useCallback((t,n)=>{var o;const i=c(t,n);if(!n||!n.valueFormatter)return i;const a=null!=(o=r?r(t):t.id)?o:t[Re.gb],s=n.field;return n.valueFormatter({id:a,field:s,value:i,api:e.current})},[e,r,c]),d=o.useCallback(t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${ct(t)}"]`)}(e.current.rootElementRef.current,t):null,[e]),f=o.useCallback(t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(ut(t))}(e.current.rootElementRef.current,t):null,[e]),p=o.useCallback((t,r)=>e.current.rootElementRef.current?function(e,{id:t,field:r}){const n=`${ut(t)} .${z.x.cell}[data-field="${ct(r)}"]`;return e.querySelector(n)}(e.current.rootElementRef.current,{id:t,field:r}):null,[e]);fe(e,{getCellValue:l,getCellParams:s,getCellElement:p,getRowValue:c,getRowFormattedValue:u,getRowParams:i,getRowElement:f,getColumnHeaderParams:n,getColumnHeaderElement:d},"public")}(r,t),((e,t)=>{const r=(0,S.N)(e,Ss),i=(0,S.N)(e,Cs),a=o.useCallback((r,n)=>{if(r.field!==Gs||null==t.getDetailPanelContent)return;const a=i[r.id];o.isValidElement(a)&&n.target!==n.currentTarget&&e.current.toggleDetailPanel(r.id)},[e,i,t.getDetailPanelContent]),s=o.useCallback((r,n)=>{null!=t.getDetailPanelContent&&r.field===Gs&&" "===n.key&&e.current.toggleDetailPanel(r.id)},[e,t.getDetailPanelContent]);(0,be.cz)(e,"cellClick",a),(0,be.cz)(e,"cellKeyDown",s),e.current.registerControlState({stateId:"detailPanels",propModel:t.detailPanelExpandedRowIds,propOnChange:t.onDetailPanelExpandedRowIdsChange,stateSelector:Ss,changeEvent:"detailPanelsExpandedRowIdsChange"});const l=o.useCallback(r=>{if(null==t.getDetailPanelContent)return;const n=i[r];if(!o.isValidElement(n))return;const a=e.current.getExpandedDetailPanels();e.current.setExpandedDetailPanels(a.includes(r)?a.filter(e=>e!==r):[...a,r])},[e,i,t.getDetailPanelContent]),c=o.useCallback(()=>Ss(e.current.state),[e]),u=o.useCallback(t=>{e.current.setState(e=>(0,n.A)({},e,{detailPanel:(0,n.A)({},e.detailPanel,{expandedRowIds:t})})),e.current.forceUpdate()},[e]),d={storeDetailPanelHeight:o.useCallback((t,r)=>{const o=Es(e.current.state);o[t]&&o[t].height!==r&&(e.current.setState(e=>(0,n.A)({},e,{detailPanel:(0,n.A)({},e.detailPanel,{heightCache:(0,n.A)({},o,{[t]:(0,n.A)({},o[t],{height:r})})})})),e.current.requestPipeProcessorsApplication("rowHeight"))},[e]),detailPanelHasAutoHeight:o.useCallback(t=>{const r=Es(e.current.state);return!!r[t]&&r[t].autoHeight},[e])};fe(e,{toggleDetailPanel:l,getExpandedDetailPanels:c,setExpandedDetailPanels:u},"public"),fe(e,d,"private"),o.useEffect(()=>{t.detailPanelExpandedRowIds&&Ss(e.current.state)!==t.detailPanelExpandedRowIds&&e.current.setExpandedDetailPanels(t.detailPanelExpandedRowIds)},[e,t.detailPanelExpandedRowIds]);const f=o.useCallback(()=>{e.current.setState(r=>(0,n.A)({},r,{detailPanel:(0,n.A)({},r.detailPanel,Zs(e,t.getDetailPanelContent,t.getDetailPanelHeight,r.detailPanel.heightCache))})),e.current.forceUpdate()},[e,t.getDetailPanelContent,t.getDetailPanelHeight]);(0,be.cz)(e,"sortedRowsSet",f);const p=o.useRef(),h=o.useRef(),m=o.useCallback(()=>{t.getDetailPanelContent===p.current&&t.getDetailPanelHeight===h.current||(e.current.setState(r=>(0,n.A)({},r,{detailPanel:(0,n.A)({},r.detailPanel,Zs(e,t.getDetailPanelContent,t.getDetailPanelHeight,r.detailPanel.heightCache))})),p.current=t.getDetailPanelContent,h.current=t.getDetailPanelHeight)},[e,t.getDetailPanelContent,t.getDetailPanelHeight]),g=o.useCallback((t,n)=>{var o;if(!r||0===r.length||!r.includes(n.id))return t.detail=0,t;m();const i=Ts(e);return t.detail=null!=(o=i[n.id])?o:0,t},[e,r,m]);Ie(e,"rowHeight",g);const y=o.useRef(!0);y.current&&(y.current=!1,m())})(r,t),(e=>{const t=o.useRef({}),r=o.useCallback((e,r,n)=>{const o=t.current;o[e]||(o[e]={}),o[e][r]=n},[]),n=o.useCallback((e,r)=>{var n;return null==(n=t.current[e])?void 0:n[r]},[]),i=o.useCallback(t=>{const{columnIndex:n,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=t,l=s.length,c=s[n],u="function"==typeof c.colSpan?c.colSpan(e.current.getCellParams(o,c.field)):c.colSpan;if(!u||1===u)return r(o,n,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let d=c.computedWidth;for(let e=1;e=i&&t{for(let o=t;o1&&(o+=a.colSpan-1)}},[i]),s={calculateColSpan:a};fe(e,{unstable_getCellColSpanInfo:n},"public"),fe(e,s,"private");const l=o.useCallback(()=>{t.current={}},[]);(0,be.cz)(e,"columnOrderChange",l)})(r),((e,t)=>{var r;const i=o.useCallback(t=>{var r;return null!=(r=q(e)[t])?r:[]},[e]),a=o.useCallback(()=>Z(e),[e]);fe(e,{unstable_getColumnGroupPath:i,unstable_getAllGroupDetails:a},"public");const s=o.useCallback(()=>{var r;const o=ra(null!=(r=t.columnGroupingModel)?r:[]);e.current.setState(e=>{var t,r,i;const a=null!=(t=null==(r=e.columns)?void 0:r.orderedFields)?t:[],s=null!=(i=e.pinnedColumns)?i:{},l=na(a,o,s);return(0,n.A)({},e,{columnGrouping:(0,n.A)({},e.columnGrouping,{headerStructure:l})})})},[e,t.columnGroupingModel]),l=o.useCallback(r=>{var o,i,a,s;if(null==(o=t.experimentalFeatures)||!o.columnGrouping)return;const l=null!=(i=null==(a=(s=e.current).getPinnedColumns)?void 0:a.call(s))?i:{},c=(0,H.JR)(e),u=(0,H.TI)(e),d=ia(null!=r?r:[]),f=ra(null!=r?r:[]),p=na(c,f,l),h=0===u.length?0:Math.max(...u.map(e=>{var t,r;return null!=(t=null==(r=f[e])?void 0:r.length)?t:0}));e.current.setState(e=>(0,n.A)({},e,{columnGrouping:{lookup:d,unwrappedGroupingModel:f,headerStructure:p,maxDepth:h}}))},[e,null==(r=t.experimentalFeatures)?void 0:r.columnGrouping]);(0,be.cz)(e,"columnIndexChange",s),(0,be.cz)(e,"columnsChange",()=>{l(t.columnGroupingModel)}),(0,be.cz)(e,"columnVisibilityModelChange",()=>{l(t.columnGroupingModel)}),o.useEffect(()=>{l(t.columnGroupingModel)},[l,t.columnGroupingModel])})(r,t),((e,t)=>{((e,t)=>{const[r,i]=o.useState({}),a=o.useRef(r),s=o.useRef({}),{processRowUpdate:l,onProcessRowUpdateError:c,cellModesModel:u,onCellModesModelChange:d}=t,f=e=>(...r)=>{t.editMode===tt.Cell&&e(...r)},p=o.useCallback((t,r)=>{const n=e.current.getCellParams(t,r);if(!e.current.isCellEditable(n))throw new Error(`MUI: The cell with id=${t} and field=${r} is not editable.`)},[e]),h=o.useCallback((t,r,n)=>{if(e.current.getCellMode(t,r)!==n)throw new Error(`MUI: The cell with id=${t} and field=${r} is not in ${n} mode.`)},[e]),m=o.useCallback((t,r)=>{if(!t.isEditable)return;if(t.cellMode===rt.Edit)return;const o=(0,n.A)({},t,{reason:Pt.cellDoubleClick});e.current.publishEvent("cellEditStart",o,r)},[e]),g=o.useCallback((t,r)=>{if(t.cellMode===rt.View)return;if(e.current.getCellMode(t.id,t.field)===rt.View)return;const o=(0,n.A)({},t,{reason:Ot.cellFocusOut});e.current.publishEvent("cellEditStop",o,r)},[e]),y=o.useCallback((t,r)=>{if(t.cellMode===rt.Edit){if(229===r.which)return;let o;if("Escape"===r.key?o=Ot.escapeKeyDown:"Enter"===r.key?o=Ot.enterKeyDown:"Tab"===r.key&&(o=r.shiftKey?Ot.shiftTabKeyDown:Ot.tabKeyDown,r.preventDefault()),o){const i=(0,n.A)({},t,{reason:o});e.current.publishEvent("cellEditStop",i,r)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:r,cellParams:t,editMode:"cell"}))return;if((0,ot.TW)(r)?o=Pt.printableKeyDown:(r.ctrlKey||r.metaKey)&&"v"===r.key?o=Pt.pasteKeyDown:"Enter"===r.key?o=Pt.enterKeyDown:"Delete"!==r.key&&"Backspace"!==r.key||(o=Pt.deleteKeyDown),o){const i=(0,n.A)({},t,{reason:o,key:r.key});e.current.publishEvent("cellEditStart",i,r)}}},[e]),v=o.useCallback(t=>{const{id:r,field:n,reason:o}=t,i={id:r,field:n};o!==Pt.printableKeyDown&&o!==Pt.deleteKeyDown&&o!==Pt.pasteKeyDown||(i.deleteValue=!0),e.current.startCellEditMode(i)},[e]),b=o.useCallback(t=>{const{id:r,field:n,reason:o}=t;let i;e.current.runPendingEditCellValueMutation(r,n),o===Ot.enterKeyDown?i="below":o===Ot.tabKeyDown?i="right":o===Ot.shiftTabKeyDown&&(i="left");const a="escapeKeyDown"===o;e.current.stopCellEditMode({id:r,field:n,ignoreModifications:a,cellToFocusAfter:i})},[e]);(0,be.cz)(e,"cellDoubleClick",f(m)),(0,be.cz)(e,"cellFocusOut",f(g)),(0,be.cz)(e,"cellKeyDown",f(y)),(0,be.cz)(e,"cellEditStart",f(v)),(0,be.cz)(e,"cellEditStop",f(b)),(0,be.re)(e,"cellEditStart",t.onCellEditStart),(0,be.re)(e,"cellEditStop",t.onCellEditStop);const _=o.useCallback((t,r)=>{const n=tr(e.current.state);return n[t]&&n[t][r]?rt.Edit:rt.View},[e]),x=(0,er.A)(r=>{const n=r!==t.cellModesModel;d&&n&&d(r,{}),t.cellModesModel&&n||(i(r),a.current=r,e.current.publishEvent("cellModesModelChange",r))}),w=o.useCallback((e,t,r)=>{const o=(0,n.A)({},a.current);if(null!==r)o[e]=(0,n.A)({},o[e],{[t]:(0,n.A)({},r)});else{const r=o[e],n=(0,M.A)(r,[t].map(Ae.A));o[e]=n,0===Object.keys(o[e]).length&&delete o[e]}x(o)},[x]),A=o.useCallback((t,r,o)=>{e.current.setState(e=>{const i=(0,n.A)({},e.editRows);return null!==o?i[t]=(0,n.A)({},i[t],{[r]:(0,n.A)({},o)}):(delete i[t][r],0===Object.keys(i[t]).length&&delete i[t]),(0,n.A)({},e,{editRows:i})}),e.current.forceUpdate()},[e]),S=o.useCallback(e=>{const{id:t,field:r}=e,o=(0,M.A)(e,nr);p(t,r),h(t,r,rt.View),w(t,r,(0,n.A)({mode:rt.Edit},o))},[p,h,w]),C=(0,er.A)(t=>{const{id:r,field:n,deleteValue:o,initialValue:i}=t;let a=e.current.getCellValue(r,n);(o||i)&&(a=o?"":i),A(r,n,{value:a,error:!1,isProcessingProps:!1}),e.current.setCellFocus(r,n)}),E=o.useCallback(e=>{const{id:t,field:r}=e,o=(0,M.A)(e,or);h(t,r,rt.Edit),w(t,r,(0,n.A)({mode:rt.View},o))},[h,w]),T=(0,er.A)(async t=>{const{id:r,field:n,ignoreModifications:o,cellToFocusAfter:i="none"}=t;h(r,n,rt.Edit),e.current.runPendingEditCellValueMutation(r,n);const a=()=>{A(r,n,null),w(r,n,null),"none"!==i&&e.current.moveFocusToRelativeCell(r,n,i)};if(o)return void a();const u=tr(e.current.state),{error:d,isProcessingProps:f}=u[r][n];if(d||f)return s.current[r][n].mode=rt.Edit,void w(r,n,{mode:rt.Edit});const p=e.current.getRowWithUpdatedValuesFromCellEditing(r,n);if(l){const t=e=>{s.current[r][n].mode=rt.Edit,w(r,n,{mode:rt.Edit}),c?c(e):ir()};try{const n=e.current.getRow(r);Promise.resolve(l(p,n)).then(t=>{e.current.updateRows([t]),a()}).catch(t)}catch(e){t(e)}}else e.current.updateRows([p]),a()}),I={setCellEditingEditCellValue:o.useCallback(async t=>{var r;const{id:o,field:i,value:a,debounceMs:s,unstable_skipValueParser:l}=t;p(o,i),h(o,i,rt.Edit);const c=e.current.getColumn(i),u=e.current.getRow(o);let d=a;c.valueParser&&!l&&(d=c.valueParser(a,e.current.getCellParams(o,i)));let f=tr(e.current.state),m=(0,n.A)({},f[o][i],{value:d,changeReason:s?"debouncedSetEditCellValue":"setEditCellValue"});if(c.preProcessEditCellProps){const e=a!==f[o][i].value;m=(0,n.A)({},m,{isProcessingProps:!0}),A(o,i,m),m=await Promise.resolve(c.preProcessEditCellProps({id:o,row:u,props:m,hasChanged:e}))}return e.current.getCellMode(o,i)!==rt.View&&(f=tr(e.current.state),m=(0,n.A)({},m,{isProcessingProps:!1}),m.value=c.preProcessEditCellProps?f[o][i].value:d,A(o,i,m),f=tr(e.current.state),!(null!=(r=f[o])&&null!=(r=r[i])&&r.error))},[e,p,h,A]),getRowWithUpdatedValuesFromCellEditing:o.useCallback((t,r)=>{const o=e.current.getColumn(r),i=tr(e.current.state),a=e.current.getRow(t);if(!i[t]||!i[t][r])return e.current.getRow(t);const{value:s}=i[t][r];return o.valueSetter?o.valueSetter({value:s,row:a}):(0,n.A)({},a,{[r]:s})},[e])};fe(e,{getCellMode:_,startCellEditMode:S,stopCellEditMode:E},"public"),fe(e,I,"private"),o.useEffect(()=>{u&&x(u)},[u,x]),(0,L.A)(()=>{const t=(0,K.gk)(e),o=s.current;s.current=(0,de.Go)(r),Object.entries(r).forEach(([e,r])=>{Object.entries(r).forEach(([r,i])=>{var a,s;const l=(null==(a=o[e])||null==(a=a[r])?void 0:a.mode)||rt.View,c=null!=(s=t[e])?s:e;i.mode===rt.Edit&&l===rt.View?C((0,n.A)({id:c,field:r},i)):i.mode===rt.View&&l===rt.Edit&&T((0,n.A)({id:c,field:r},i))})})},[e,r,C,T])})(e,t),((e,t)=>{const[r,i]=o.useState({}),a=o.useRef(r),s=o.useRef({}),l=o.useRef(null),c=o.useRef(null),{processRowUpdate:u,onProcessRowUpdateError:d,rowModesModel:f,onRowModesModelChange:p}=t,h=e=>(...r)=>{t.editMode===tt.Row&&e(...r)},m=o.useCallback((t,r)=>{const n=e.current.getCellParams(t,r);if(!e.current.isCellEditable(n))throw new Error(`MUI: The cell with id=${t} and field=${r} is not editable.`)},[e]),g=o.useCallback((t,r)=>{if(e.current.getRowMode(t)!==r)throw new Error(`MUI: The row with id=${t} is not in ${r} mode.`)},[e]),y=o.useCallback((t,r)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===nt.Edit)return;const o=e.current.getRowParams(t.id),i=(0,n.A)({},o,{field:t.field,reason:ar.cellDoubleClick});e.current.publishEvent("rowEditStart",i,r)},[e]),v=o.useCallback(e=>{c.current=e},[]),b=o.useCallback((t,r)=>{t.isEditable&&e.current.getRowMode(t.id)!==nt.View&&(c.current=null,l.current=setTimeout(()=>{var o;if(l.current=null,(null==(o=c.current)?void 0:o.id)!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===nt.View)return;const o=e.current.getRowParams(t.id),i=(0,n.A)({},o,{field:t.field,reason:sr.rowFocusOut});e.current.publishEvent("rowEditStop",i,r)}}))},[e]);o.useEffect(()=>()=>{clearTimeout(l.current)},[]);const _=o.useCallback((t,r)=>{if(t.cellMode===nt.Edit){if(229===r.which)return;let o;if("Escape"===r.key)o=sr.escapeKeyDown;else if("Enter"===r.key)o=sr.enterKeyDown;else if("Tab"===r.key){const n=(0,H.TI)(e).filter(r=>e.current.getColumn(r).type===Qe||e.current.isCellEditable(e.current.getCellParams(t.id,r)));if(r.shiftKey?t.field===n[0]&&(o=sr.shiftTabKeyDown):t.field===n[n.length-1]&&(o=sr.tabKeyDown),r.preventDefault(),!o){const o=n.findIndex(e=>e===t.field),i=n[r.shiftKey?o-1:o+1];e.current.setCellFocus(t.id,i)}}if(o){const i=(0,n.A)({},e.current.getRowParams(t.id),{reason:o,field:t.field});e.current.publishEvent("rowEditStop",i,r)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:r,cellParams:t,editMode:"row"}))return;if((0,ot.TW)(r)||(r.ctrlKey||r.metaKey)&&"v"===r.key?o=ar.printableKeyDown:"Enter"===r.key?o=ar.enterKeyDown:"Delete"!==r.key&&"Backspace"!==r.key||(o=ar.deleteKeyDown),o){const i=e.current.getRowParams(t.id),a=(0,n.A)({},i,{field:t.field,reason:o});e.current.publishEvent("rowEditStart",a,r)}}},[e]),x=o.useCallback(t=>{const{id:r,field:n,reason:o}=t,i={id:r,fieldToFocus:n};o!==ar.printableKeyDown&&o!==ar.deleteKeyDown||(i.deleteValue=!!n),e.current.startRowEditMode(i)},[e]),w=o.useCallback(t=>{const{id:r,reason:n,field:o}=t;let i;e.current.runPendingEditCellValueMutation(r),n===sr.enterKeyDown?i="below":n===sr.tabKeyDown?i="right":n===sr.shiftTabKeyDown&&(i="left");const a="escapeKeyDown"===n;e.current.stopRowEditMode({id:r,ignoreModifications:a,field:o,cellToFocusAfter:i})},[e]);(0,be.cz)(e,"cellDoubleClick",h(y)),(0,be.cz)(e,"cellFocusIn",h(v)),(0,be.cz)(e,"cellFocusOut",h(b)),(0,be.cz)(e,"cellKeyDown",h(_)),(0,be.cz)(e,"rowEditStart",h(x)),(0,be.cz)(e,"rowEditStop",h(w)),(0,be.re)(e,"rowEditStart",t.onRowEditStart),(0,be.re)(e,"rowEditStop",t.onRowEditStop);const A=o.useCallback(r=>{if(t.editMode===tt.Cell)return nt.View;const n=tr(e.current.state);return n[r]&&Object.keys(n[r]).length>0?nt.Edit:nt.View},[e,t.editMode]),S=(0,er.A)(r=>{const n=r!==t.rowModesModel;p&&n&&p(r,{}),t.rowModesModel&&n||(i(r),a.current=r,e.current.publishEvent("rowModesModelChange",r))}),C=o.useCallback((e,t)=>{const r=(0,n.A)({},a.current);null!==t?r[e]=(0,n.A)({},t):delete r[e],S(r)},[S]),E=o.useCallback((t,r)=>{e.current.setState(e=>{const o=(0,n.A)({},e.editRows);return null!==r?o[t]=r:delete o[t],(0,n.A)({},e,{editRows:o})}),e.current.forceUpdate()},[e]),T=o.useCallback((t,r,o)=>{e.current.setState(e=>{const i=(0,n.A)({},e.editRows);return null!==o?i[t]=(0,n.A)({},i[t],{[r]:(0,n.A)({},o)}):(delete i[t][r],0===Object.keys(i[t]).length&&delete i[t]),(0,n.A)({},e,{editRows:i})}),e.current.forceUpdate()},[e]),I=o.useCallback(e=>{const{id:t}=e,r=(0,M.A)(e,lr);g(t,nt.View),C(t,(0,n.A)({mode:nt.Edit},r))},[g,C]),k=(0,er.A)(t=>{const{id:r,fieldToFocus:n,deleteValue:o,initialValue:i}=t,a=(0,H.JR)(e).reduce((t,a)=>{if(!e.current.getCellParams(r,a).isEditable)return t;let s=e.current.getCellValue(r,a);return n===a&&(o||i)&&(s=o?"":i),t[a]={value:s,error:!1,isProcessingProps:!1},t},{});E(r,a),n&&e.current.setCellFocus(r,n)}),R=o.useCallback(e=>{const{id:t}=e,r=(0,M.A)(e,cr);g(t,nt.Edit),C(t,(0,n.A)({mode:nt.View},r))},[g,C]),P=(0,er.A)(t=>{const{id:r,ignoreModifications:n,field:o,cellToFocusAfter:i="none"}=t;e.current.runPendingEditCellValueMutation(r);const a=()=>{"none"!==i&&o&&e.current.moveFocusToRelativeCell(r,o,i),E(r,null),C(r,null)};if(n)return void a();const l=tr(e.current.state),c=e.current.getRow(r);if(Object.values(l[r]).some(e=>e.isProcessingProps))return void(s.current[r].mode=nt.Edit);if(Object.values(l[r]).some(e=>e.error))return s.current[r].mode=nt.Edit,void C(r,{mode:nt.Edit});const f=e.current.getRowWithUpdatedValuesFromRowEditing(r);if(u){const t=e=>{s.current[r].mode=nt.Edit,C(r,{mode:nt.Edit}),d?d(e):ur()};try{Promise.resolve(u(f,c)).then(t=>{e.current.updateRows([t]),a()}).catch(t)}catch(e){t(e)}}else e.current.updateRows([f]),a()}),O={setRowEditingEditCellValue:o.useCallback(t=>{const{id:r,field:o,value:i,debounceMs:a,unstable_skipValueParser:s}=t;m(r,o);const l=e.current.getColumn(o),c=e.current.getRow(r);let u=i;l.valueParser&&!s&&(u=l.valueParser(i,e.current.getCellParams(r,o)));let d=tr(e.current.state),f=(0,n.A)({},d[r][o],{value:u,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});return l.preProcessEditCellProps||T(r,o,f),new Promise(t=>{const i=[];if(l.preProcessEditCellProps){const a=f.value!==d[r][o].value;f=(0,n.A)({},f,{isProcessingProps:!0}),T(r,o,f);const s=d[r],p=(0,M.A)(s,[o].map(Ae.A)),h=Promise.resolve(l.preProcessEditCellProps({id:r,row:c,props:f,hasChanged:a,otherFieldsProps:p})).then(i=>{e.current.getRowMode(r)!==nt.View?(d=tr(e.current.state),(i=(0,n.A)({},i,{isProcessingProps:!1})).value=l.preProcessEditCellProps?d[r][o].value:u,T(r,o,i)):t(!1)});i.push(h)}Object.entries(d[r]).forEach(([a,s])=>{if(a===o)return;const l=e.current.getColumn(a);if(!l.preProcessEditCellProps)return;s=(0,n.A)({},s,{isProcessingProps:!0}),T(r,a,s),d=tr(e.current.state);const u=d[r],f=(0,M.A)(u,[a].map(Ae.A)),p=Promise.resolve(l.preProcessEditCellProps({id:r,row:c,props:s,hasChanged:!1,otherFieldsProps:f})).then(o=>{e.current.getRowMode(r)!==nt.View?(o=(0,n.A)({},o,{isProcessingProps:!1}),T(r,a,o)):t(!1)});i.push(p)}),Promise.all(i).then(()=>{e.current.getRowMode(r)===nt.Edit?(d=tr(e.current.state),t(!d[r][o].error)):t(!1)})})},[e,m,T]),getRowWithUpdatedValuesFromRowEditing:o.useCallback(t=>{const r=tr(e.current.state),o=e.current.getRow(t);if(!r[t])return e.current.getRow(t);let i=(0,n.A)({},o);return Object.entries(r[t]).forEach(([t,r])=>{const n=e.current.getColumn(t);n.valueSetter?i=n.valueSetter({value:r.value,row:i}):i[t]=r.value}),i},[e])};fe(e,{getRowMode:A,startRowEditMode:I,stopRowEditMode:R},"public"),fe(e,O,"private"),o.useEffect(()=>{f&&S(f)},[f,S]),(0,L.A)(()=>{const t=(0,K.gk)(e),o=s.current;s.current=(0,de.Go)(r),Object.entries(r).forEach(([e,r])=>{var i,a;const s=(null==(i=o[e])?void 0:i.mode)||nt.View,l=null!=(a=t[e])?a:e;r.mode===nt.Edit&&s===nt.View?k((0,n.A)({id:l},r)):r.mode===nt.View&&s===nt.Edit&&P((0,n.A)({id:l},r))})},[e,r,k,P])})(e,t);const r=o.useRef({}),{isCellEditable:i}=t,a=o.useCallback(e=>!(0,Re.DJ)(e.rowNode)&&!!e.colDef.editable&&!!e.colDef.renderEditCell&&(!i||i(e)),[i]);o.useEffect(()=>{const e=r.current;return()=>{Object.entries(e).forEach(([t,r])=>{Object.keys(r).forEach(r=>{const[n]=e[t][r];clearTimeout(n),delete e[t][r]})})}},[]);const s=o.useCallback((e,t)=>{if(r.current[e])if(t){if(r.current[e][t]){const[,n]=r.current[e][t];n()}}else Object.keys(r.current[e]).forEach(t=>{const[,n]=r.current[e][t];n()})},[]),l=o.useCallback(n=>{const{id:o,field:i,debounceMs:a}=n;return new Promise(s=>{((e,t,n,o)=>{if(!n)return void o();if(r.current[e]||(r.current[e]={}),r.current[e][t]){const[n]=r.current[e][t];clearTimeout(n)}const i=setTimeout(()=>{o(),delete r.current[e][t]},n);r.current[e][t]=[i,()=>{const[n]=r.current[e][t];clearTimeout(n),o(),delete r.current[e][t]}]})(o,i,a,async()=>{const r=t.editMode===tt.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(o,i)===rt.Edit){const e=await r(n);s(e)}})})},[e,t.editMode]),c=o.useCallback((r,n)=>t.editMode===tt.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(r,n):e.current.getRowWithUpdatedValuesFromRowEditing(r),[e,t.editMode]),u=o.useCallback((t,r)=>{var n,o;return null!=(n=null==(o=tr(e.current.state)[t])?void 0:o[r])?n:null},[e]),d={runPendingEditCellValueMutation:s};fe(e,{isCellEditable:a,setEditCellValue:l,getRowWithUpdatedValues:c,unstable_getEditCellMeta:u},"public"),fe(e,d,"private")})(r,t),((e,t)=>{const r=De(e,"useGridFocus"),i=o.useRef(null),a=o.useCallback((t,r)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),r)},[e]),s=o.useCallback((t,o)=>{const i=(0,se.MO)(e);(null==i?void 0:i.id)===t&&(null==i?void 0:i.field)===o||(e.current.setState(e=>(r.debug(`Focusing on cell with id=${t} and field=${o}`),(0,n.A)({},e,{tabIndex:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),e.current.getRow(t)&&(i&&a(i,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,o))))},[e,r,a]),l=o.useCallback((t,o={})=>{const i=(0,se.MO)(e);a(i,o),e.current.setState(e=>(r.debug(`Focusing on column header with colIndex=${t}`),(0,n.A)({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,r,a]),c=o.useCallback((t,o={})=>{const i=(0,se.MO)(e);a(i,o),e.current.setState(e=>(r.debug(`Focusing on column header filter with colIndex=${t}`),(0,n.A)({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,r,a]),u=o.useCallback((t,r,o={})=>{const i=(0,se.MO)(e);i&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(i.id,i.field),o),e.current.setState(e=>(0,n.A)({},e,{tabIndex:{columnGroupHeader:{field:t,depth:r},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:r},columnHeader:null,columnHeaderFilter:null,cell:null}})),e.current.forceUpdate()},[e]),d=o.useCallback(()=>(0,se.xv)(e),[e]),f=o.useCallback((r,n,o)=>{let i=e.current.getColumnIndex(n);const a=(0,H.iv)(e),s=it(e,{pagination:t.pagination,paginationMode:t.paginationMode}),l=(0,K.$2)(e),c=[].concat(l.top||[],s.rows,l.bottom||[]);let u=c.findIndex(e=>e.id===r);"right"===o?i+=1:"left"===o?i-=1:u+=1,i>=a.length?(u+=1,u=0&&(i=a.length-1)),u=(0,de.qE)(u,0,c.length-1);const d=c[u];if(!d)return;const f=e.current.unstable_getCellColSpanInfo(d.id,i);f&&f.spannedByColSpan&&("left"===o||"below"===o?i=f.leftVisibleCellIndex:"right"===o&&(i=f.rightVisibleCellIndex)),i=(0,de.qE)(i,0,a.length-1);const p=a[i];e.current.setCellFocus(d.id,p.field)},[e,t.pagination,t.paginationMode]),p=o.useCallback(({id:t,field:r})=>{e.current.setCellFocus(t,r)},[e]),h=o.useCallback((t,r)=>{"Enter"===r.key||"Tab"===r.key||"Shift"===r.key||(0,ot.q9)(r.key)||e.current.setCellFocus(t.id,t.field)},[e]),m=o.useCallback(({field:t},r)=>{r.target===r.currentTarget&&e.current.setColumnHeaderFocus(t,r)},[e]),g=o.useCallback(({fields:t,depth:r},n)=>{if(n.target!==n.currentTarget)return;const o=(0,se.xv)(e);null!==o&&o.depth===r&&t.includes(o.field)||e.current.setColumnGroupHeaderFocus(t[0],r,n)},[e]),y=o.useCallback((t,o)=>{var i;null!=(i=o.relatedTarget)&&i.className.includes(z.x.columnHeader)||(r.debug("Clearing focus"),e.current.setState(e=>(0,n.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[r,e]),v=o.useCallback(e=>{i.current=e},[]),b=o.useCallback(t=>{const r=i.current;i.current=null;const o=(0,se.MO)(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:t,cell:r}))return;if(!o)return void(r&&e.current.setCellFocus(r.id,r.field));if((null==r?void 0:r.id)===o.id&&(null==r?void 0:r.field)===o.field)return;const s=e.current.getCellElement(o.id,o.field);null!=s&&s.contains(t.target)||(r?e.current.setCellFocus(r.id,r.field):(e.current.setState(e=>(0,n.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),e.current.forceUpdate(),a(o,t)))},[e,a]),_=o.useCallback(t=>{if("view"===t.cellMode)return;const r=(0,se.MO)(e);(null==r?void 0:r.id)===t.id&&(null==r?void 0:r.field)===t.field||e.current.setCellFocus(t.id,t.field)},[e]),x=o.useCallback(()=>{const t=(0,se.MO)(e);t&&!e.current.getRow(t.id)&&e.current.setState(e=>(0,n.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))},[e]),w=(0,er.A)(()=>{const r=(0,se.MO)(e);if(!r)return;const o=it(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(o.rows.find(e=>e.id===r.id))return;const i=(0,H.iv)(e);e.current.setState(e=>(0,n.A)({},e,{tabIndex:{cell:{id:o.rows[0].id,field:i[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),A={moveFocusToRelativeCell:f,setColumnGroupHeaderFocus:u,getColumnGroupHeaderFocus:d};fe(e,{setCellFocus:s,setColumnHeaderFocus:l,setColumnHeaderFilterFocus:c},"public"),fe(e,A,"private"),o.useEffect(()=>{const t=(0,fr.A)(e.current.rootElementRef.current);return t.addEventListener("mouseup",b),()=>{t.removeEventListener("mouseup",b)}},[e,b]),(0,be.cz)(e,"columnHeaderBlur",y),(0,be.cz)(e,"cellDoubleClick",p),(0,be.cz)(e,"cellMouseDown",v),(0,be.cz)(e,"cellKeyDown",h),(0,be.cz)(e,"cellModeChange",_),(0,be.cz)(e,"columnHeaderFocus",m),(0,be.cz)(e,"columnGroupHeaderFocus",g),(0,be.cz)(e,"rowsSet",x),(0,be.cz)(e,"paginationModelChange",w)})(r,t),((e,t)=>{var r;const i=De(e,"useGridPreferencesPanel"),a=o.useRef(),s=o.useRef(),l=o.useCallback(()=>{i.debug("Hiding Preferences Panel");const t=mr(e.current.state);t.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:t.openedPanelValue}),e.current.setState(e=>(0,n.A)({},e,{preferencePanel:{open:!1}})),e.current.forceUpdate()},[e,i]),c=o.useCallback(()=>{s.current=setTimeout(()=>clearTimeout(a.current),0)},[]),u=o.useCallback(()=>{a.current=setTimeout(l,100)},[l]),d=o.useCallback((t,r,o)=>{i.debug("Opening Preferences Panel"),c(),e.current.setState(e=>(0,n.A)({},e,{preferencePanel:(0,n.A)({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:r,labelId:o})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t}),e.current.forceUpdate()},[i,c,e]);fe(e,{showPreferences:d,hidePreferences:u},"public");const f=o.useCallback((r,o)=>{var i;const a=mr(e.current.state);return!o.exportOnlyDirtyModels||null!=(null==(i=t.initialState)?void 0:i.preferencePanel)||a.open?(0,n.A)({},r,{preferencePanel:a}):r},[e,null==(r=t.initialState)?void 0:r.preferencePanel]),p=o.useCallback((t,r)=>{const o=r.stateToRestore.preferencePanel;return null!=o&&e.current.setState(e=>(0,n.A)({},e,{preferencePanel:o})),t},[e]);Ie(e,"exportState",f),Ie(e,"restoreState",p),o.useEffect(()=>()=>{clearTimeout(a.current),clearTimeout(s.current)},[])})(r,t),((e,t)=>{var r,i;const a=De(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:ie.ZI,changeEvent:"filterModelChange"});const s=o.useCallback(()=>{e.current.setState(r=>{const o=(0,ie.ZI)(r,e.current.instanceId),i="client"===t.filterMode?(0,_r.Fv)(o,e,t.disableEval):null,a=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:i,filterModel:null!=o?o:(0,br.T)()}),s=(0,n.A)({},r,{filter:(0,n.A)({},r.filter,a)}),l=Ar(e,s);return(0,n.A)({},s,{visibleRowsLookup:l})}),e.current.publishEvent("filteredRowsSet")},[e,t.filterMode,t.disableEval]),l=o.useCallback((e,r)=>null==r||!1===r.filterable||t.disableColumnFilter?e:[...e,"columnMenuFilterItem"],[t.disableColumnFilter]),c=o.useCallback(()=>{s(),e.current.forceUpdate()},[e,s]),u=o.useCallback(t=>{const r=(0,ie.ZI)(e),o=[...r.items],i=o.findIndex(e=>e.id===t.id);-1===i?o.push(t):o[i]=t,e.current.setFilterModel((0,n.A)({},r,{items:o}),"upsertFilterItem")},[e]),d=o.useCallback(t=>{const r=(0,ie.ZI)(e),o=[...r.items];t.forEach(e=>{const r=t.findIndex(t=>t.id===e.id);-1===r?o.push(e):o[r]=e}),e.current.setFilterModel((0,n.A)({},r,{items:t}),"upsertFilterItems")},[e]),f=o.useCallback(t=>{const r=(0,ie.ZI)(e),o=r.items.filter(e=>e.id!==t.id);o.length!==r.items.length&&e.current.setFilterModel((0,n.A)({},r,{items:o}),"deleteFilterItem")},[e]),p=o.useCallback((r,o,i)=>{if(a.debug("Displaying filter panel"),r){const o=(0,ie.ZI)(e),i=o.items.filter(t=>{var r;if(void 0!==t.value)return!Array.isArray(t.value)||0!==t.value.length;const n=null==(r=e.current.getColumn(t.field).filterOperators)?void 0:r.find(e=>e.value===t.operator);return!(void 0===(null==n?void 0:n.requiresFilterValue)||(null==n?void 0:n.requiresFilterValue))});let a;const s=i.find(e=>e.field===r),l=e.current.getColumn(r);a=s?i:t.disableMultipleColumnsFiltering?[(0,_r.zk)({field:r,operator:l.filterOperators[0].value},e)]:[...i,(0,_r.zk)({field:r,operator:l.filterOperators[0].value},e)],e.current.setFilterModel((0,n.A)({},o,{items:a}))}e.current.showPreferences(Yt.filters,o,i)},[e,a,t.disableMultipleColumnsFiltering]),h=o.useCallback(()=>{a.debug("Hiding filter panel"),e.current.hidePreferences()},[e,a]),m=o.useCallback(t=>{const r=(0,ie.ZI)(e);r.logicOperator!==t&&e.current.setFilterModel((0,n.A)({},r,{logicOperator:t}),"changeLogicOperator")},[e]),g=o.useCallback(t=>{const r=(0,ie.ZI)(e);(0,de.Hv)(r.quickFilterValues,t)||e.current.setFilterModel((0,n.A)({},r,{quickFilterValues:[...t]}))},[e]),y={setFilterLogicOperator:m,unstable_applyFilters:c,deleteFilterItem:f,upsertFilterItem:u,upsertFilterItems:d,setFilterModel:o.useCallback((r,n)=>{(0,ie.ZI)(e)!==r&&(a.debug("Setting filter model"),e.current.updateControlState("filter",(0,_r.zU)(r,t.disableMultipleColumnsFiltering,e),n),e.current.unstable_applyFilters())},[e,a,t.disableMultipleColumnsFiltering]),showFilterPanel:p,hideFilterPanel:h,setQuickFilterValues:g,ignoreDiacritics:t.ignoreDiacritics};fe(e,y,"public");const v=o.useCallback((r,o)=>{var i;const a=(0,ie.ZI)(e);return o.exportOnlyDirtyModels&&null==t.filterModel&&null==(null==(i=t.initialState)||null==(i=i.filter)?void 0:i.filterModel)&&(0,de.Hv)(a,(0,br.T)())?r:(0,n.A)({},r,{filter:{filterModel:a}})},[e,t.filterModel,null==(r=t.initialState)||null==(r=r.filter)?void 0:r.filterModel]),b=o.useCallback((r,o)=>{var i;const a=null==(i=o.stateToRestore.filter)?void 0:i.filterModel;return null==a?r:(e.current.updateControlState("filter",(0,_r.zU)(a,t.disableMultipleColumnsFiltering,e),"restoreState"),(0,n.A)({},r,{callbacks:[...r.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),_=o.useCallback((e,r)=>{if(r===Yt.filters){var o;const e=t.slots.filterPanel;return(0,x.jsx)(e,(0,n.A)({},null==(o=t.slotProps)?void 0:o.filterPanel))}return e},[t.slots.filterPanel,null==(i=t.slotProps)?void 0:i.filterPanel]),{getRowId:w}=t,A=(0,vr.n)(Sr),S=o.useCallback(r=>{if("client"!==t.filterMode||!r.isRowMatchingFilters)return{filteredRowsLookup:{},filteredDescendantCountLookup:{}};const n=(0,K.rI)(e),o={},{isRowMatchingFilters:i}=r,a={},s={passingFilterItems:null,passingQuickFilterValues:null},l=A.current(e.current.state.rows.dataRowIdToModelLookup);for(let t=0;t{a.debug("onColUpdated - GridColumns changed, applying filters");const t=(0,ie.ZI)(e),r=(0,H.U8)(e),o=t.items.filter(e=>e.field&&r[e.field]);o.length{"filtering"===t&&e.current.unstable_applyFilters()},[e]),T=o.useCallback(()=>{e.current.setState(t=>(0,n.A)({},t,{visibleRowsLookup:Ar(e,t)})),e.current.forceUpdate()},[e]);(0,be.cz)(e,"rowsSet",s),(0,be.cz)(e,"columnsChange",C),(0,be.cz)(e,"activeStrategyProcessorChange",E),(0,be.cz)(e,"rowExpansionChange",T),(0,be.cz)(e,"columnVisibilityModelChange",()=>{const t=(0,ie.ZI)(e);t.quickFilterValues&&t.quickFilterExcludeHiddenColumns&&e.current.unstable_applyFilters()}),Te(()=>{e.current.unstable_applyFilters()}),(0,L.A)(()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)},[e,a,t.filterModel])})(r,t),((e,t)=>{var r;const i=De(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:ae.XU,changeEvent:"sortModelChange"});const a=o.useCallback((t,r)=>{const n=(0,ae.XU)(e),o=n.findIndex(e=>e.field===t);let i=[...n];return o>-1?r?i.splice(o,1,r):i.splice(o,1):i=[...n,r],i},[e]),s=o.useCallback((r,o)=>{var i;const a=(0,ae.XU)(e).find(e=>e.field===r.field);if(a){var s;const e=void 0===o?(0,mt.Hm)(null!=(s=r.sortingOrder)?s:t.sortingOrder,a.sort):o;return null==e?void 0:(0,n.A)({},a,{sort:e})}return{field:r.field,sort:void 0===o?(0,mt.Hm)(null!=(i=r.sortingOrder)?i:t.sortingOrder):o}},[e,t.sortingOrder]),l=o.useCallback((e,r)=>null==r||!1===r.sortable?e:(r.sortingOrder||t.sortingOrder).some(e=>!!e)?[...e,"columnMenuSortItem"]:e,[t.sortingOrder]),c=o.useCallback(()=>{e.current.setState(r=>{if("server"===t.sortingMode)return i.debug("Skipping sorting rows as sortingMode = server"),(0,n.A)({},r,{sorting:(0,n.A)({},r.sorting,{sortedRows:(0,Re.l_)((0,K.qj)(e),Re.OL,!1)})});const o=(0,ae.XU)(r,e.current.instanceId),a=(0,mt.Lj)(o,e),s=e.current.applyStrategyProcessor("sorting",{sortRowList:a});return(0,n.A)({},r,{sorting:(0,n.A)({},r.sorting,{sortedRows:s})})}),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()},[e,i,t.sortingMode]),u=o.useCallback(r=>{(0,ae.XU)(e)!==r&&(i.debug("Setting sort model"),e.current.setState((0,mt.ps)(r,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())},[e,i,t.disableMultipleColumnsSorting]),d=o.useCallback((r,n,o)=>{if(!r.sortable)return;const i=s(r,n);let l;l=!o||t.disableMultipleColumnsSorting?i?[i]:[]:a(r.field,i),e.current.setSortModel(l)},[e,a,s,t.disableMultipleColumnsSorting]),f=o.useCallback(()=>(0,ae.XU)(e),[e]),p=o.useCallback(()=>(0,ae.J6)(e).map(e=>e.model),[e]),h=o.useCallback(()=>(0,ae.RJ)(e),[e]),m=o.useCallback(t=>e.current.getSortedRowIds()[t],[e]);fe(e,{getSortModel:f,getSortedRows:p,getSortedRowIds:h,getRowIdFromRowIndex:m,setSortModel:u,sortColumn:d,applySorting:c},"public");const g=o.useCallback((r,o)=>{var i;const a=(0,ae.XU)(e);return!o.exportOnlyDirtyModels||null!=t.sortModel||null!=(null==(i=t.initialState)||null==(i=i.sorting)?void 0:i.sortModel)||a.length>0?(0,n.A)({},r,{sorting:{sortModel:a}}):r},[e,t.sortModel,null==(r=t.initialState)||null==(r=r.sorting)?void 0:r.sortModel]),y=o.useCallback((r,o)=>{var i;const a=null==(i=o.stateToRestore.sorting)?void 0:i.sortModel;return null==a?r:(e.current.setState((0,mt.ps)(a,t.disableMultipleColumnsSorting)),(0,n.A)({},r,{callbacks:[...r.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),v=o.useCallback(t=>{const r=(0,K.qj)(e),n=r[Re.OL],o=t.sortRowList?t.sortRowList(n.children.map(e=>r[e])):[...n.children];return null!=n.footerId&&o.push(n.footerId),o},[e]);Ie(e,"exportState",g),Ie(e,"restoreState",y),Me(e,Se,"sorting",v);const b=o.useCallback(({colDef:e},t)=>{const r=t.shiftKey||t.metaKey||t.ctrlKey;d(e,void 0,r)},[d]),_=o.useCallback(({colDef:e},t)=>{!(0,ot.Ci)(t.key)||t.ctrlKey||t.metaKey||d(e,void 0,t.shiftKey)},[d]),x=o.useCallback(()=>{const t=(0,ae.XU)(e),r=(0,H.gv)(e);if(t.length>0){const n=t.filter(e=>r[e.field]);n.length{"sorting"===t&&e.current.applySorting()},[e]);Ie(e,"columnMenu",l),(0,be.cz)(e,"columnHeaderClick",b),(0,be.cz)(e,"columnHeaderKeyDown",_),(0,be.cz)(e,"rowsSet",e.current.applySorting),(0,be.cz)(e,"columnsChange",x),(0,be.cz)(e,"activeStrategyProcessorChange",w),Te(()=>{e.current.applySorting()}),(0,L.A)(()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])})(r,t),((e,t)=>{const r=De(e,"useDensity"),i=o.useCallback(t=>{r.debug(`Set grid density to ${t}`),e.current.setState(e=>{const r=(0,V._v)(e),o={value:t,factor:Cr[t]};return(0,de.Hv)(r,o)?e:(0,n.A)({},e,{density:o})}),e.current.forceUpdate()},[r,e]);o.useEffect(()=>{e.current.setDensity(t.density)},[e,t.density]),fe(e,{setDensity:i},"public")})(r,t),((e,t)=>{const r=De(e,"useGridColumnReorder"),i=o.useRef(null),a=o.useRef({x:0,y:0}),s=o.useRef(null),l=o.useRef({}),c=o.useRef(),u=(e=>{const{classes:t}=e;return(0,O.A)({columnHeaderDragging:["columnHeader--dragging"]},z.B,t)})({classes:t.classes}),d=(0,je.A)();o.useEffect(()=>()=>{clearTimeout(c.current)},[]);const f=o.useCallback((o,a)=>{if(t.disableColumnReorder||o.colDef.disableReorder)return;r.debug(`Start dragging col ${o.field}`),a.stopPropagation(),i.current=a.currentTarget,i.current.classList.add(u.columnHeaderDragging),a.dataTransfer&&(a.dataTransfer.effectAllowed="move"),e.current.setState(e=>(0,n.A)({},e,{columnReorder:(0,n.A)({},e.columnReorder,{dragCol:o.field})})),e.current.forceUpdate(),c.current=setTimeout(()=>{i.current.classList.remove(u.columnHeaderDragging)}),s.current=e.current.getColumnIndex(o.field,!1);const d=e.current.unstable_getColumnGroupPath(o.field),f=s.current,p=e.current.getAllColumns(),h=e.current.unstable_getAllGroupDetails(),m=t=>{const r=p[t].field;return e.current.unstable_getColumnGroupPath(r)};let g=null;d.forEach(e=>{var t;null!=(t=h[e])&&t.freeReordering||(f>0&&m(f-1).includes(e)||f+1=0&&m(t).includes(g)||r=0&&r{var n;m(t).includes(r)&&(d.includes(r)||null!=(n=h[r])&&n.freeReordering||(l.current[e]=!0))})}},[t.disableColumnReorder,u.columnHeaderDragging,r,e]),p=o.useCallback((e,t)=>{t.preventDefault(),t.stopPropagation()},[]),h=o.useCallback((t,n)=>{const o=Ta(e);if(!o)return;r.debug(`Dragging over col ${t.field}`),n.preventDefault(),n.stopPropagation();const i={x:n.clientX,y:n.clientY};if(t.field!==o&&(c=i,(s=a.current).x!==c.x||s.y!==c.y)){const r=e.current.getColumnIndex(t.field,!1),n=e.current.getColumnIndex(t.field,!0),s=e.current.getColumn(t.field),c=e.current.getColumnIndex(o,!1),u=e.current.getVisibleColumns(),f=e.current.getAllColumns(),p=((e,t)=>e.x<=t.x?ka:Ia)(a.current,i),h=p===Ia&&("rtl"===d.direction?c0&&!u[n-1].disableReorder:n0?u[n-1].field:null;o>0&&f[o].field!==e&&l.current[o];)i-=1,o=r+i;else for(e=n+1{const l=Ta(e);if(!t.disableColumnReorder&&l){if(r.debug("End dragging col"),a.preventDefault(),a.stopPropagation(),clearTimeout(c.current),i.current=null,"none"!==a.dataTransfer.dropEffect||t.keepColumnPositionIfDraggedOutside){const t={column:e.current.getColumn(l),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(l),oldIndex:s.current};e.current.publishEvent("columnOrderChange",t)}else e.current.setColumnIndex(l,s.current),s.current=null;e.current.setState(e=>(0,n.A)({},e,{columnReorder:(0,n.A)({},e.columnReorder,{dragCol:""})})),e.current.forceUpdate()}},[t.disableColumnReorder,t.keepColumnPositionIfDraggedOutside,r,e]);(0,be.cz)(e,"columnHeaderDragStart",f),(0,be.cz)(e,"columnHeaderDragEnter",p),(0,be.cz)(e,"columnHeaderDragOver",h),(0,be.cz)(e,"columnHeaderDragEnd",m),(0,be.cz)(e,"cellDragEnter",p),(0,be.cz)(e,"cellDragOver",h),(0,be.re)(e,"columnOrderChange",t.onColumnOrderChange)})(r,t),((e,t)=>{const r=De(e,"useGridColumnResize"),i=o.useRef(),a=o.useRef(),s=o.useRef(),l=o.useRef(),c=o.useRef(),u=(0,je.A)(),d=o.useRef(),f=o.useRef(),p=(0,Jt.Z)(),h=o.useRef(),m=e=>{r.debug(`Updating width to ${e} for col ${i.current.field}`);const t=a.current.offsetWidth,n=e-t;i.current.computedWidth=e,i.current.width=e,i.current.flex=0,a.current.style.width=`${e}px`,a.current.style.minWidth=`${e}px`,a.current.style.maxWidth=`${e}px`;const o=s.current;o&&(o.style.width=`${e}px`,o.style.minWidth=`${e}px`,o.style.maxWidth=`${e}px`),[...c.current,...l.current].forEach(t=>{const r=t;let o;o="1"===r.getAttribute("aria-colspan")?`${e}px`:`${r.offsetWidth+n}px`,r.style.width=o,r.style.minWidth=o,r.style.maxWidth=o})},g=t=>{w(),i.current&&(e.current.setColumnWidth(i.current.field,i.current.width),r.debug(`Updating col ${i.current.field} with new width: ${i.current.width}`)),p.start(0,()=>{e.current.publishEvent("columnResizeStop",null,t)})},y=(0,er.A)(g),v=(0,er.A)(t=>{if(0===t.buttons)return void y(t);let r=za(d.current,t.clientX,a.current.getBoundingClientRect(),f.current);r=(0,de.qE)(r,i.current.minWidth,i.current.maxWidth),m(r);const n={element:a.current,colDef:i.current,width:r};e.current.publishEvent("columnResize",n,t)}),b=(0,er.A)(e=>{Fa(e,h.current)&&g(e)}),_=(0,er.A)(t=>{const r=Fa(t,h.current);if(!r)return;if("mousemove"===t.type&&0===t.buttons)return void b(t);let n=za(d.current,r.x,a.current.getBoundingClientRect(),f.current);n=(0,de.qE)(n,i.current.minWidth,i.current.maxWidth),m(n);const o={element:a.current,colDef:i.current,width:n};e.current.publishEvent("columnResize",o,t)}),x=(0,er.A)(t=>{var n,o;if(!lt(t.target,z.x["columnSeparator--resizable"]))return;Na()||t.preventDefault();const s=t.changedTouches[0];null!=s&&(h.current=s.identifier),a.current=lt(t.target,z.x.columnHeader);const p=a.current.getAttribute("data-field"),m=e.current.getColumn(p);l.current=Pa(null==(n=e.current.columnHeadersContainerElementRef)?void 0:n.current,p),r.debug(`Start Resize on col ${m.field}`),e.current.publishEvent("columnResizeStart",{field:p},t),i.current=m,a.current=function(e,t){return e.querySelector(`[data-field="${t}"]`)}(null==(o=e.current.columnHeadersElementRef)?void 0:o.current,m.field),c.current=Oa(a.current,e.current),f.current=ja(t.target,u.direction),d.current=Ba(s.clientX,a.current.getBoundingClientRect(),f.current);const g=(0,fr.A)(t.currentTarget);g.addEventListener("touchmove",_),g.addEventListener("touchend",b)}),w=o.useCallback(()=>{const t=(0,fr.A)(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",v),t.removeEventListener("mouseup",y),t.removeEventListener("touchmove",_),t.removeEventListener("touchend",b),setTimeout(()=>{t.removeEventListener("click",$a,!0)},100),a.current&&(a.current.style.pointerEvents="unset")},[e,a,v,y,_,b]),A=o.useCallback(({field:t})=>{e.current.setState(e=>(0,n.A)({},e,{columnResize:(0,n.A)({},e.columnResize,{resizingColumnField:t})})),e.current.forceUpdate()},[e]),C=o.useCallback(()=>{e.current.setState(e=>(0,n.A)({},e,{columnResize:(0,n.A)({},e.columnResize,{resizingColumnField:""})})),e.current.forceUpdate()},[e]),E=(0,er.A)(({colDef:t},n)=>{var o,p,h;if(0!==n.button)return;if(!n.currentTarget.classList.contains(z.x["columnSeparator--resizable"]))return;n.preventDefault(),r.debug(`Start Resize on col ${t.field}`),e.current.publishEvent("columnResizeStart",{field:t.field},n),i.current=t,a.current=null==(o=e.current.columnHeadersContainerElementRef)?void 0:o.current.querySelector(`[data-field="${t.field}"]`);const m=null==(p=e.current.headerFiltersElementRef)?void 0:p.current;m&&(s.current=m.querySelector(`[data-field="${t.field}"]`)),l.current=Pa(null==(h=e.current.columnHeadersContainerElementRef)?void 0:h.current,t.field),c.current=Oa(a.current,e.current);const g=(0,fr.A)(e.current.rootElementRef.current);g.body.style.cursor="col-resize",f.current=ja(n.currentTarget,u.direction),d.current=Ba(n.clientX,a.current.getBoundingClientRect(),f.current),g.addEventListener("mousemove",v),g.addEventListener("mouseup",y),g.addEventListener("click",$a,!0)}),T=(0,er.A)((r,o)=>{if(t.disableAutosize)return;if(0!==o.button)return;const i=e.current.state.columns.lookup[r.field];!1!==i.resizable&&e.current.autosizeColumns((0,n.A)({},t.autosizeOptions,{columns:[i.field]}))}),I=function(e){const t=o.useRef(),r=()=>Eo(e),n=(0,S.N)(e,r);return o.useEffect(()=>{t.current&&!1===n&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(!1===r())return Promise.resolve();t.current=function(){let e,t;const r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r}()}return t.current}}(e),k=o.useRef(!1),M=o.useCallback(async t=>{var r,o;if(!(null==(r=e.current.rootElementRef)?void 0:r.current))return;if(k.current)return;k.current=!0;const i=(0,H.em)(e.current.state),a=(0,n.A)({},Da,t,{columns:null!=(o=null==t?void 0:t.columns)?o:i.orderedFields});a.columns=a.columns.filter(e=>!1!==i.columnVisibilityModel[e]);const s=a.columns.map(t=>e.current.state.columns.lookup[t]);try{e.current.unstable_setColumnVirtualization(!1),await I();const t=function(e,t,r){const n={},o=e.current.rootElementRef.current;return o.classList.add(z.x.autosizing),r.forEach(r=>{const o=function(e,t){const r=e.virtualScrollerRef.current,n=e=>`:scope > div > div > div > [data-field="${t}"][role="${e}"]`;return Array.from(r.querySelectorAll(`${n("cell")}, ${n("gridcell")}`))}(e.current,r.field).map(e=>{var t,r;const n=window.getComputedStyle(e,null);return parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+(null!=(t=null==(r=e.firstElementChild)?void 0:r.getBoundingClientRect().width)?t:0)}),i=t.includeOutliers?o:function(e,t){if(e.length<4)return e;const r=e.slice();r.sort((e,t)=>e-t);const n=r[Math.floor(.25*r.length)],o=r[Math.floor(.75*r.length)-1],i=o-n,a=i<5?5:i*t;return r.filter(e=>e>n-a&&e div > div > [data-field="${t}"][role="columnheader"]`):null}(e.current,r.field);if(t){const e=t.querySelector(`.${z.x.columnHeaderTitle}`),r=t.querySelector(`.${z.x.columnHeaderTitleContainerContent}`),n=null!=e?e:r,o=window.getComputedStyle(t,null),a=parseInt(o.paddingLeft,10)+parseInt(o.paddingRight,10)+(n.scrollWidth+1);i.push(a)}}const a=r.minWidth!==-1/0&&void 0!==r.minWidth,s=r.maxWidth!==1/0&&void 0!==r.maxWidth,l=a?r.minWidth:0,c=s?r.maxWidth:1/0,u=0===i.length?0:Math.max(...i);n[r.field]=(0,de.qE)(u,l,c)}),o.classList.remove(z.x.autosizing),n}(e,a,s),r=s.map(e=>(0,n.A)({},e,{width:t[e.field],computedWidth:t[e.field]}));if(a.expand){var l,c;const n=i.orderedFields.map(e=>i.lookup[e]).filter(e=>!1!==i.columnVisibilityModel[e.field]).reduce((e,r)=>{var n,o;return e+(null!=(n=null!=(o=t[r.field])?o:r.computedWidth)?n:r.width)},0),o=(null!=(l=null==(c=e.current.getRootDimensions())?void 0:c.viewportInnerSize.width)?l:0)-n;if(o>0){const e=o/(r.length||1);r.forEach(t=>{t.width+=e,t.computedWidth+=e})}}e.current.updateColumns(r)}finally{e.current.unstable_setColumnVirtualization(!0),k.current=!1}},[e,I]);o.useEffect(()=>w,[w]),(0,Ra.y)(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),Sa(e,()=>{var t;return null==(t=e.current.columnHeadersElementRef)?void 0:t.current},"touchstart",x,{passive:Na()}),fe(e,{autosizeColumns:M},"public"),(0,be.cz)(e,"columnResizeStop",C),(0,be.cz)(e,"columnResizeStart",A),(0,be.cz)(e,"columnSeparatorMouseDown",E),(0,be.cz)(e,"columnSeparatorDoubleClick",T),(0,be.re)(e,"columnResize",t.onColumnResize),(0,be.re)(e,"columnWidthChange",t.onColumnWidthChange)})(r,t),((e,t)=>{((e,t)=>{var r;const i=De(e,"useGridPaginationModel"),a=(0,S.N)(e,V.rf),s=Math.floor(t.rowHeight*a);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Fe.lN,changeEvent:"paginationModelChange"});const l=o.useCallback(t=>{const r=(0,Fe.lN)(e);t!==r.page&&(i.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:r.pageSize}))},[e,i]),c=o.useCallback(t=>{const r=(0,Fe.lN)(e);t!==r.pageSize&&(i.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:r.page}))},[e,i]),u=o.useCallback(r=>{const o=(0,Fe.lN)(e);r!==o&&(i.debug("Setting 'paginationModel' to",r),e.current.setState(e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{paginationModel:Ir(e.pagination,t.signature,r)})})))},[e,i,t.signature]);fe(e,{setPage:l,setPageSize:c,setPaginationModel:u},"public");const d=o.useCallback((r,o)=>{var i;const a=(0,Fe.lN)(e);return!o.exportOnlyDirtyModels||null!=t.paginationModel||null!=(null==(i=t.initialState)||null==(i=i.pagination)?void 0:i.paginationModel)||0!==a.page&&a.pageSize!==(0,Tr.eW)(t.autoPageSize)?(0,n.A)({},r,{pagination:(0,n.A)({},r.pagination,{paginationModel:a})}):r},[e,t.paginationModel,null==(r=t.initialState)||null==(r=r.pagination)?void 0:r.paginationModel,t.autoPageSize]),f=o.useCallback((r,o)=>{var i,a;const s=null!=(i=o.stateToRestore.pagination)&&i.paginationModel?(0,n.A)({},(0,Tr.N0)(t.autoPageSize),null==(a=o.stateToRestore.pagination)?void 0:a.paginationModel):(0,Fe.lN)(e);return e.current.setState(e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{paginationModel:Ir(e.pagination,t.signature,s)})})),r},[e,t.autoPageSize,t.signature]);Ie(e,"exportState",d),Ie(e,"restoreState",f);const p=o.useCallback(()=>{if(!t.autoPageSize)return;const r=e.current.getRootDimensions()||{viewportInnerSize:{height:0}},n=(0,Re.zo)(e),o=Math.floor((r.viewportInnerSize.height-n.top-n.bottom)/s);e.current.setPageSize(o)},[e,t.autoPageSize,s]),h=o.useCallback(t=>{if(null==t)return;const r=(0,Fe.lN)(e),n=(0,Fe.O)(e);r.page>n-1&&e.current.setPage(Math.max(0,n-1))},[e]);(0,be.cz)(e,"viewportInnerSizeChange",p),(0,be.cz)(e,"paginationModelChange",()=>{var t;const r=(0,Fe.lN)(e);null!=(t=e.current.virtualScrollerRef)&&t.current&&e.current.scrollToIndexes({rowIndex:r.page*r.pageSize})}),(0,be.cz)(e,"rowCountChange",h),o.useEffect(()=>{e.current.setState(e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{paginationModel:Ir(e.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.paginationMode,t.signature]),o.useEffect(p,[p])})(e,t),((e,t)=>{var r;const i=De(e,"useGridRowCount"),a=(0,S.N)(e,ie.RN),s=(0,S.N)(e,Fe.H2);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:Fe.H2,changeEvent:"rowCountChange"});const l=o.useCallback(t=>{s!==t&&(i.debug("Setting 'rowCount' to",t),e.current.setState(e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{rowCount:t})})))},[e,i,s]);fe(e,{setRowCount:l},"public");const c=o.useCallback((r,o)=>{var i;const a=(0,Fe.H2)(e);return o.exportOnlyDirtyModels&&null==t.rowCount&&null==(null==(i=t.initialState)||null==(i=i.pagination)?void 0:i.rowCount)?r:(0,n.A)({},r,{pagination:(0,n.A)({},r.pagination,{rowCount:a})})},[e,t.rowCount,null==(r=t.initialState)||null==(r=r.pagination)?void 0:r.rowCount]),u=o.useCallback((t,r)=>{var o;const i=null!=(o=r.stateToRestore.pagination)&&o.rowCount?r.stateToRestore.pagination.rowCount:(0,Fe.H2)(e);return e.current.setState(e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{rowCount:i})})),t},[e]);Ie(e,"exportState",c),Ie(e,"restoreState",u),o.useEffect(()=>{},[t.rowCount,t.paginationMode]),o.useEffect(()=>{"client"===t.paginationMode?e.current.setRowCount(a):null!=t.rowCount&&e.current.setRowCount(t.rowCount)},[e,a,t.paginationMode,t.rowCount])})(e,t)})(r,t),((e,t)=>{const{getRowHeight:r,getRowSpacing:i,getEstimatedRowHeight:a}=t,s=o.useRef(Object.create(null)),l=o.useRef(-1),c=o.useRef(!1),u=(0,S.N)(e,V.rf),d=(0,S.N)(e,ie.ZI),f=(0,S.N)(e,Fe.M5),p=(0,S.N)(e,ae.XU),h=at(e,t),m=(0,S.N)(e,K.$2),g=Ji(t.rowHeight,Xi.rowHeight),y=Math.floor(g*u),v=o.useCallback(()=>{var t,o;c.current=!1;const d=t=>{s.current[t.id]||(s.current[t.id]={sizes:{baseCenter:y},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:o,needsFirstMeasurement:l,sizes:d}=s.current[t.id];let f="number"==typeof y&&y>0?y:52;const p=d.baseCenter;if(o)f=p;else if(r){const e=r((0,n.A)({},t,{densityFactor:u}));if("auto"===e){if(l){const e=a?a((0,n.A)({},t,{densityFactor:u})):y;f=null!=e?e:y}else f=p;c.current=!0,s.current[t.id].autoHeight=!0}else f=Ji(e,y),s.current[t.id].needsFirstMeasurement=!1,s.current[t.id].autoHeight=!1}else s.current[t.id].needsFirstMeasurement=!1;const m={};for(const e in d)/^base[A-Z]/.test(e)&&(m[e]=d[e]);if(m.baseCenter=f,i){var g,v;const r=e.current.getRowIndexRelativeToVisibleRows(t.id),o=i((0,n.A)({},t,{isFirstVisible:0===r,isLastVisible:r===h.rows.length-1,indexRelativeToCurrentPage:r}));m.spacingTop=null!=(g=o.top)?g:0,m.spacingBottom=null!=(v=o.bottom)?v:0}const b=e.current.unstable_applyPipeProcessors("rowHeight",m,t);return s.current[t.id].sizes=b,b},f=[],p=h.rows.reduce((e,t)=>{f.push(e);let r=0,n=0;const o=d(t);for(const e in o){const t=o[e];/^base[A-Z]/.test(e)?r=t>r?t:r:n+=t}return e+r+n},0);null==m||null==(t=m.top)||t.forEach(e=>{d(e)}),null==m||null==(o=m.bottom)||o.forEach(e=>{d(e)}),e.current.setState(e=>(0,n.A)({},e,{rowsMeta:{currentPageTotalHeight:p,positions:f}})),c.current||(l.current=1/0),e.current.forceUpdate()},[e,h.rows,y,r,i,a,m,u]),b=o.useCallback(e=>{const t=s.current[e];return t?t.sizes.baseCenter:y},[y]),_=o.useCallback((e,t)=>{s.current[e].sizes.baseCenter=t,s.current[e].isResized=!0,s.current[e].needsFirstMeasurement=!1,v()},[v]),x=o.useMemo(()=>(0,Mr.A)(v,t.rowPositionsDebounceMs),[v,t.rowPositionsDebounceMs]),w=o.useCallback((e,t,r)=>{if(!s.current[e]||!s.current[e].autoHeight)return;const n=s.current[e].sizes[`base${(0,P.A)(r)}`]!==t;s.current[e].needsFirstMeasurement=!1,s.current[e].sizes[`base${(0,P.A)(r)}`]=t,n&&x()},[x]),A=o.useCallback(e=>{var t;return(null==(t=s.current[e])?void 0:t.autoHeight)||!1},[]),C=o.useCallback(()=>l.current,[]),E=o.useCallback(e=>{c.current&&e>l.current&&(l.current=e)},[]),T=o.useCallback(()=>{s.current={},v()},[v]);o.useEffect(()=>{v()},[y,d,f,p,v]),ht(e,"rowHeight",v);const I={getLastMeasuredRowIndex:C,rowHasAutoHeight:A};fe(e,{unstable_setLastMeasuredRowIndex:E,unstable_getRowHeight:b,unstable_getRowInternalSizes:e=>{var t;return null==(t=s.current[e])?void 0:t.sizes},unstable_setRowHeight:_,unstable_storeRowHeightMeasurement:w,resetRowHeights:T},"public"),fe(e,I,"private")})(r,t),((e,t)=>{const r=De(e,"useGridRowReorder"),n=(0,S.N)(e,ae.XU),i=(0,S.N)(e,K.V2),a=o.useRef(null),s=o.useRef(null),l=o.useRef(),c=(e=>{const{classes:t}=e;return(0,O.A)({rowDragging:["row--dragging"]},z.B,t)})({classes:t.classes}),[u,d]=o.useState("");o.useEffect(()=>()=>{clearTimeout(l.current)},[]);const f=o.useMemo(()=>!t.rowReordering||!!n.length||1!==i,[t.rowReordering,n,i]),p=o.useCallback((t,n)=>{const o=tr(e.current.state);f||0!==Object.keys(o).length||(r.debug(`Start dragging row ${t.id}`),n.stopPropagation(),a.current=n.currentTarget,a.current.classList.add(c.rowDragging),d(t.id),l.current=setTimeout(()=>{a.current.classList.remove(c.rowDragging)}),s.current=e.current.getRowIndexRelativeToVisibleRows(t.id),e.current.setCellFocus(t.id,Xs.field))},[f,c.rowDragging,r,e]),h=o.useCallback((t,n)=>{if(""===u)return;const o=e.current.getRowNode(t.id);if(!o||"footer"===o.type||"pinnedRow"===o.type)return;r.debug(`Dragging over row ${t.id}`),n.preventDefault(),n.stopPropagation();const i=Js?Js.y-n.clientY:n.clientY;if(t.id!==u){const r=e.current.getRowIndexRelativeToVisibleRows(t.id),n={dragDirection:i>0?Ks.DOWN:Ks.UP,previousTargetId:t.id},o=n.dragDirection!==Qs.dragDirection||n.previousTargetId!==Qs.previousTargetId;(null===Qs.dragDirection||Math.abs(i)>=1&&o)&&(e.current.setRowIndex(u,r),Qs=n)}Js={x:n.clientX,y:n.clientY}},[e,r,u]),m=o.useCallback((t,n)=>{const o=tr(e.current.state);if(""!==u&&!f&&0===Object.keys(o).length){if(r.debug("End dragging row"),n.preventDefault(),n.stopPropagation(),clearTimeout(l.current),a.current=null,Qs.dragDirection=null,"none"===n.dataTransfer.dropEffect)e.current.setRowIndex(u,s.current),s.current=null;else{const r={row:e.current.getRow(u),targetIndex:e.current.getRowIndexRelativeToVisibleRows(t.id),oldIndex:s.current};e.current.publishEvent("rowOrderChange",r)}d("")}},[f,r,e,u]);(0,be.cz)(e,"rowDragStart",p),(0,be.cz)(e,"rowDragOver",h),(0,be.cz)(e,"rowDragEnd",m),(0,be.cz)(e,"cellDragOver",h),(0,be.re)(e,"rowOrderChange",t.onRowOrderChange)})(r,t),((e,t)=>{const r=(0,je.A)(),n=De(e,"useGridScroll"),i=e.current.columnHeadersElementRef,a=e.current.virtualScrollerRef,s=(0,S.N)(e,ie.em),l=o.useCallback(r=>{const o=(0,K.H0)(e),i=(0,H.iv)(e);if(null!=r.rowIndex&&0===o||0===i.length)return!1;n.debug(`Scrolling to cell at row ${r.rowIndex}, col: ${r.colIndex} `);let l={};if(null!=r.colIndex){const t=(0,H.Sw)(e);let n;if(void 0!==r.rowIndex){var c;const t=null==(c=s[r.rowIndex])?void 0:c.id,o=e.current.unstable_getCellColSpanInfo(t,r.colIndex);o&&!o.spannedByColSpan&&(n=o.cellProps.width)}void 0===n&&(n=i[r.colIndex].computedWidth),l.left=pa({clientHeight:a.current.clientWidth,scrollTop:Math.abs(a.current.scrollLeft),offsetHeight:n,offsetTop:t[r.colIndex]})}if(null!=r.rowIndex){var u,d;const n=Ao(e.current.state),o=(0,Fe.$i)(e),i=(0,Fe.ij)(e),s=t.pagination?r.rowIndex-o*i:r.rowIndex,c=n.positions[s+1]?n.positions[s+1]-n.positions[s]:n.currentPageTotalHeight-n.positions[s],f=(null==(u=a.current.querySelector(`.${z.x["pinnedRows--top"]}`))?void 0:u.clientHeight)||0,p=(null==(d=a.current.querySelector(`.${z.x["pinnedRows--bottom"]}`))?void 0:d.clientHeight)||0;l.top=pa({clientHeight:a.current.clientHeight-f-p,scrollTop:a.current.scrollTop,offsetHeight:c,offsetTop:n.positions[s]})}return l=e.current.unstable_applyPipeProcessors("scrollToIndexes",l,r),(void 0!==typeof l.left||void 0!==typeof l.top)&&(e.current.scroll(l),!0)},[n,e,a,t.pagination,s]),c=o.useCallback(e=>{if(a.current&&null!=e.left&&i.current){const t="rtl"===r.direction?-1:1;i.current.scrollLeft=e.left,a.current.scrollLeft=t*e.left,n.debug(`Scrolling left: ${e.left}`)}a.current&&null!=e.top&&(a.current.scrollTop=e.top,n.debug(`Scrolling top: ${e.top}`)),n.debug("Scrolling, updating container, and viewport")},[a,r.direction,i,n]),u=o.useCallback(()=>null!=a&&a.current?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0},[a]);fe(e,{scroll:c,scrollToIndexes:l,getScrollPosition:u},"public")})(r,t),((e,t)=>{const r=(0,S.N)(e,H.iv),n=at(e,t),i=(0,S.N)(e,Ao),a=Math.max(i.currentPageTotalHeight,1),s=o.useRef(!1),l=o.useCallback(o=>{const i=e.current.getRootDimensions();if(!i||"client"!==t.rowsLoadingMode)return;const l=o.top+i.viewportOuterSize.height,c=e.current.getViewportPageSize();if(l=a-t.scrollEndThreshold&&!s.current){const t={visibleColumns:r,viewportPageSize:c,visibleRowsCount:n.rows.length};e.current.publishEvent("rowsScrollEnd",t),s.current=!0}},[a,t.scrollEndThreshold,t.rowsLoadingMode,r,e,n.rows.length]),c=o.useCallback(({left:e,top:t})=>{l({left:e,top:t})},[l]);(0,be.cz)(e,"scrollPositionChange",c),(0,be.re)(e,"rowsScrollEnd",t.onRowsScrollEnd)})(r,t),((e,t)=>{var r;const n=at(e,t),i=(0,S.N)(e,ae.XU),a=(0,S.N)(e,ie.ZI),s=o.useRef({firstRowToRender:0,lastRowToRender:0}),{lazyLoading:l}=null!=(r=t.experimentalFeatures)?r:{},c=o.useCallback(()=>{const r=e.current.getRenderContext(),[o,i]=Mo({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:n.rows.length,buffer:t.rowBuffer});return{firstRowToRender:o,lastRowToRender:i}},[e,t.rowBuffer,n.rows.length]),u=o.useCallback(r=>{const o=e.current.getRootDimensions();if(el({lazyLoadingFeatureFlag:l,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:o}))return;const c={firstRowToRender:r.firstRowToRender,lastRowToRender:r.lastRowToRender,sortModel:i,filterModel:a};if(s.current.firstRowToRender!==r.firstRowToRender||s.current.lastRowToRender!==r.lastRowToRender){if(0===i.length&&0===a.items.length){const t=function({apiRef:e,visibleRows:t,range:r}){let{firstRowIndex:n,lastRowIndex:o}=r;const i=t.slice(r.firstRowIndex,r.lastRowIndex);let a=0,s=i.length-1,l=!1;for(;!l&&n{const n=e.current.getRootDimensions();if(el({lazyLoadingFeatureFlag:l,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:n}))return;e.current.requestPipeProcessorsApplication("hydrateRows");const{firstRowToRender:o,lastRowToRender:i}=c(),s={firstRowToRender:o,lastRowToRender:i,sortModel:r,filterModel:a};e.current.publishEvent("fetchRows",s)},[e,t.rowsLoadingMode,a,l,c]),f=o.useCallback(r=>{const n=e.current.getRootDimensions();if(el({lazyLoadingFeatureFlag:l,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:n}))return;e.current.requestPipeProcessorsApplication("hydrateRows");const{firstRowToRender:o,lastRowToRender:a}=c(),s={firstRowToRender:o,lastRowToRender:a,sortModel:i,filterModel:r};e.current.publishEvent("fetchRows",s)},[e,t.rowsLoadingMode,i,l,c]);(0,be.cz)(e,"renderedRowsIntervalChange",u),(0,be.cz)(e,"sortModelChange",d),(0,be.cz)(e,"filterModelChange",f),(0,be.re)(e,"fetchRows",t.onFetchRows)})(r,t),(e=>{const t=De(e,"useGridColumnMenu"),r=o.useCallback(r=>{e.current.setState(e=>e.columnMenu.open&&e.columnMenu.field===r?e:(t.debug("Opening Column Menu"),(0,n.A)({},e,{columnMenu:{open:!0,field:r}})))&&(e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),i=o.useCallback(()=>{const r=le(e.current.state);if(r.field){const t=(0,H.gv)(e),n=(0,H.FY)(e),o=(0,H.JR)(e);let i=r.field;if(t[i]||(i=o[0]),!1===n[i]){const e=o.filter(e=>e===i||!1!==n[e]),t=e.indexOf(i);i=e[t+1]||e[t-1]}e.current.setColumnHeaderFocus(i)}e.current.setState(e=>e.columnMenu.open||void 0!==e.columnMenu.field?(t.debug("Hiding Column Menu"),(0,n.A)({},e,{columnMenu:(0,n.A)({},e.columnMenu,{open:!1,field:void 0})})):e)&&e.current.forceUpdate()},[e,t]),a=o.useCallback(n=>{t.debug("Toggle Column Menu");const o=le(e.current.state);o.open&&o.field===n?i():r(n)},[e,t,r,i]);fe(e,{showColumnMenu:r,hideColumnMenu:i,toggleColumnMenu:a},"public"),(0,be.cz)(e,"columnResizeStart",i),(0,be.cz)(e,"virtualScrollerWheel",e.current.hideColumnMenu),(0,be.cz)(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(r),Aa(r,t),((e,t)=>{const r=De(e,"useGridPrintExport"),i=o.useRef(null),a=o.useRef(null),s=o.useRef({}),l=o.useRef([]);o.useEffect(()=>{i.current=(0,fr.A)(e.current.rootElementRef.current)},[e]);const c=o.useCallback((t,r,n)=>new Promise(o=>{const i=ya({apiRef:e,options:{fields:t,allColumns:r}}).map(e=>e.field),a=(0,H.OV)(e),s={};a.forEach(e=>{s[e.field]=i.includes(e.field)}),n&&(s[ke.f.field]=!0),e.current.setColumnVisibilityModel(s),o()}),[e]),u=o.useCallback(t=>{const r=t({apiRef:e}).map(t=>e.current.getRow(t));e.current.setRows(r)},[e]),d=o.useCallback((r,o)=>{var a,s;const l=(0,n.A)({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},o),c=r.contentDocument;if(!c)return;const u=Ao(e.current.state),d=e.current.rootElementRef.current,f=d.cloneNode(!0);f.querySelector(`.${z.x.main}`).style.overflow="visible",f.style.contain="size",f.querySelector(`.${z.x.columnHeaders}`).querySelector(`.${z.x.columnHeadersInner}`).style.width="100%";let p=(null==(a=d.querySelector(`.${z.x.toolbarContainer}`))?void 0:a.offsetHeight)||0,h=(null==(s=d.querySelector(`.${z.x.footerContainer}`))?void 0:s.offsetHeight)||0;var m,g;l.hideToolbar&&(null==(m=f.querySelector(`.${z.x.toolbarContainer}`))||m.remove(),p=0),l.hideFooter&&(null==(g=f.querySelector(`.${z.x.footerContainer}`))||g.remove(),h=0);const y=u.currentPageTotalHeight+Zt(e,t.columnHeaderHeight)+p+h;if(f.style.height=`${y}px`,f.style.boxSizing="content-box",null!=o&&o.getRowsToExport){const e=f.querySelector(`.${z.x.footerContainer}`);e.style.position="absolute",e.style.width="100%",e.style.top=y-h+"px"}const v=document.createElement("div");v.appendChild(f),c.body.innerHTML=v.innerHTML;const b="function"==typeof l.pageStyle?l.pageStyle():l.pageStyle;if("string"==typeof b){const e=c.createElement("style");e.appendChild(c.createTextNode(b)),c.head.appendChild(e)}l.bodyClassName&&c.body.classList.add(...l.bodyClassName.split(" "));const _=[];if(l.copyStyles){const e=d.getRootNode(),t=("ShadowRoot"===e.constructor.name?e:i.current).querySelectorAll("style, link[rel='stylesheet']");for(let e=0;e{e.addEventListener("load",()=>t())})),c.head.appendChild(e)}}}Promise.all(_).then(()=>{r.contentWindow.print()})},[e,i,t.columnHeaderHeight]),f=o.useCallback(t=>{var r;i.current.body.removeChild(t),e.current.restoreState(a.current||{}),null!=(r=a.current)&&null!=(r=r.columns)&&r.columnVisibilityModel||e.current.setColumnVisibilityModel(s.current),e.current.unstable_setVirtualization(!0),e.current.setRows(l.current),a.current=null,s.current={},l.current=[]},[e]),p=o.useCallback(async o=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");a.current=e.current.exportState(),s.current=(0,H.FY)(e);const p=(0,K.rI)(e);if(l.current=(0,K.A6)(e).map(e=>p[e]),t.pagination){const t={page:0,pageSize:(0,ie.O7)(e)};e.current.setState(e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{paginationModel:Ir(e.pagination,"DataGridPro",t)})})),e.current.forceUpdate()}await c(null==o?void 0:o.fields,null==o?void 0:o.allColumns,null==o?void 0:o.includeCheckboxes),null!=o&&o.getRowsToExport&&u(o.getRowsToExport),e.current.unstable_setVirtualization(!1),await new Promise(e=>{requestAnimationFrame(()=>{e()})});const h=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(null==o?void 0:o.fileName);h.onload=()=>{d(h,o),h.contentWindow.matchMedia("print").addEventListener("change",e=>{!1===e.matches&&f(h)})},i.current.body.appendChild(h)},[t,r,e,d,f,c,u]);fe(e,{exportDataAsPrint:p},"public");const h=o.useCallback((e,t)=>{var r;return null!=(r=t.printOptions)&&r.disableToolbarButton?e:[...e,{component:(0,x.jsx)(wa,{options:t.printOptions}),componentName:"printExport"}]},[]);Ie(e,"exportMenu",h)})(r,t),((e,t)=>{const r=t.unstable_ignoreValueFormatterDuringExport,n=("object"==typeof r?null==r?void 0:r.clipboardExport:r)||!1,i=t.clipboardCopyCellDelimiter,a=o.useCallback(t=>{if(!t.ctrlKey&&!t.metaKey||"c"!==t.key)return;if(r=t.target,null!=(o=window.getSelection())&&o.toString()||r&&(r.selectionEnd||0)-(r.selectionStart||0)>0)return;var r,o;let a="";if(e.current.getSelectedRows().size>0)a=e.current.getDataAsCsv({includeHeaders:!1,delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1});else{const t=(0,se.MO)(e);if(t){const r=e.current.getCellParams(t.id,t.field);a=ma(r,{csvOptions:{delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:n})}}var s;a=e.current.unstable_applyPipeProcessors("clipboardCopy",a),a&&(s=a,navigator.clipboard?navigator.clipboard.writeText(s).catch(()=>{Ca(s)}):Ca(s),e.current.publishEvent("clipboardCopy",a))},[e,n,i]);Sa(e,e.current.rootElementRef,"keydown",a),(0,be.re)(e,"clipboardCopy",t.onClipboardCopy)})(r,t),function(e,t){const r=De(e,"useResizeContainer"),n=o.useRef(!1),i=o.useRef(null),a=o.useRef(null),s=(0,S.N)(e,Ao),l=(0,S.N)(e,V.rf),c=Math.floor(t.rowHeight*l),u=Zt(e,t.columnHeaderHeight),d=o.useCallback(()=>{var r;const n=null==(r=e.current.rootElementRef)?void 0:r.current,o=(0,H.fc)(e),l=(0,Re.zo)(e);if(!i.current)return;let c,d,f,p;if(null!=t.scrollbarSize)c=t.scrollbarSize;else if(o&&n){const e=(0,fr.A)(n).createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.overflow="scroll",e.className="scrollDiv",n.appendChild(e),c=e.offsetWidth-e.clientWidth,n.removeChild(e)}else c=0;if(t.autoHeight)p=!1,f=Math.round(o)>Math.round(i.current.width),d={width:i.current.width,height:s.currentPageTotalHeight+(f?c:0)};else{d={width:i.current.width,height:Math.max(i.current.height-u,0)};const e=(({content:e,container:t,scrollBarSize:r})=>{const n=e.width>t.width,o=e.height>t.height;let i=!1,a=!1;return(n||o)&&(i=n,a=e.height+(i?r:0)>t.height,a&&(i=e.width+r>t.width)),{hasScrollX:i,hasScrollY:a}})({content:{width:Math.round(o),height:s.currentPageTotalHeight},container:{width:Math.round(d.width),height:d.height-l.top-l.bottom},scrollBarSize:c});p=e.hasScrollY,f=e.hasScrollX}const h={viewportOuterSize:d,viewportInnerSize:{width:d.width-(p?c:0),height:d.height-(f?c:0)},hasScrollX:f,hasScrollY:p,scrollBarSize:c},m=a.current;a.current=h,h.viewportInnerSize.width===(null==m?void 0:m.viewportInnerSize.width)&&h.viewportInnerSize.height===(null==m?void 0:m.viewportInnerSize.height)||e.current.publishEvent("viewportInnerSizeChange",h.viewportInnerSize)},[e,t.scrollbarSize,t.autoHeight,s.currentPageTotalHeight,u]),[f,p]=o.useState(),h=o.useMemo(()=>(0,Mr.A)(p,60),[]),m=o.useRef();(0,L.A)(()=>{f&&(d(),e.current.publishEvent("debouncedResize",i.current))},[e,f,d]);const g=o.useCallback(()=>{e.current.computeSizeAndPublishResizeEvent()},[e]),y=o.useCallback(()=>a.current,[]),v=o.useCallback(()=>{const r=e.current.getRootDimensions();if(!r)return 0;const n=it(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const t=e.current.getRenderContext(),r=t.lastRowIndex-t.firstRowIndex;return Math.min(r-1,n.rows.length)}const o=Math.floor(r.viewportInnerSize.height/c);return Math.min(o,n.rows.length)},[e,t.pagination,t.paginationMode,t.getRowHeight,c]),b=o.useCallback(()=>{var t,r,n;const o=null==(t=e.current.mainElementRef)?void 0:t.current;if(!o)return;const i=(0,Ea.A)(o).getComputedStyle(o),a=parseFloat(i.height)||0,s=parseFloat(i.width)||0,l=a!==(null==(r=m.current)?void 0:r.height),c=s!==(null==(n=m.current)?void 0:n.width);if(!m.current||l||c){const t={width:s,height:a};e.current.publishEvent("resize",t),m.current=t}},[e]),_={getViewportPageSize:v,updateGridDimensionsRef:d,computeSizeAndPublishResizeEvent:b};fe(e,{resize:g,getRootDimensions:y},"public"),fe(e,_,"private");const x=o.useRef(!0),w=o.useCallback(e=>{i.current=e;const o=/jsdom/.test(window.navigator.userAgent);if(0!==e.height||n.current||t.autoHeight||o||(r.error(["The parent DOM element of the data grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),n.current=!0),0!==e.width||n.current||o||(r.error(["The parent DOM element of the data grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),n.current=!0),x.current)return p(e),void(x.current=!1);h(e)},[t.autoHeight,h,r]);(0,L.A)(()=>d(),[d]),(0,be.re)(e,"sortedRowsSet",d),(0,be.re)(e,"paginationModelChange",d),(0,be.re)(e,"columnsChange",d),(0,be.cz)(e,"resize",w),(0,be.re)(e,"debouncedResize",t.onResize)}(r,t),function(e,t){(0,be.re)(e,"columnHeaderClick",t.onColumnHeaderClick),(0,be.re)(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),(0,be.re)(e,"columnHeaderOver",t.onColumnHeaderOver),(0,be.re)(e,"columnHeaderOut",t.onColumnHeaderOut),(0,be.re)(e,"columnHeaderEnter",t.onColumnHeaderEnter),(0,be.re)(e,"columnHeaderLeave",t.onColumnHeaderLeave),(0,be.re)(e,"cellClick",t.onCellClick),(0,be.re)(e,"cellDoubleClick",t.onCellDoubleClick),(0,be.re)(e,"cellKeyDown",t.onCellKeyDown),(0,be.re)(e,"preferencePanelClose",t.onPreferencePanelClose),(0,be.re)(e,"preferencePanelOpen",t.onPreferencePanelOpen),(0,be.re)(e,"menuOpen",t.onMenuOpen),(0,be.re)(e,"menuClose",t.onMenuClose),(0,be.re)(e,"rowDoubleClick",t.onRowDoubleClick),(0,be.re)(e,"rowClick",t.onRowClick),(0,be.re)(e,"stateChange",t.onStateChange)}(r,t),(e=>{const t=o.useCallback((t={})=>e.current.unstable_applyPipeProcessors("exportState",{},t),[e]),r=o.useCallback(t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach(e=>{e()}),e.current.forceUpdate()},[e]);fe(e,{exportState:t,restoreState:r},"public")})(r),function(e,t){const r=t=>{e.current.setState(e=>(0,n.A)({},e,{virtualization:(0,n.A)({},e.virtualization,{enabled:t})}))},i={unstable_setVirtualization:r,unstable_setColumnVirtualization:t=>{e.current.setState(e=>(0,n.A)({},e,{virtualization:(0,n.A)({},e.virtualization,{enabledForColumns:t})}))}};fe(e,i,"public"),o.useEffect(()=>{r(!t.disableVirtualization)},[t.disableVirtualization])}(r,t),r};var al=r("tCRK");const sl={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorEquals:"Equals",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"},ll=["components","componentsProps"];function cl(e){var t;const r=Object.keys(e);if(!r.some(e=>e.startsWith("aria-")||e.startsWith("data-")))return e;const n={},o=null!=(t=e.forwardedProps)?t:{};for(let t=0;to=>{n.current.pinColumn(t.field,e),r(o)},[n,t.field,r]),l=e=>{n.current.unpinColumn(t.field),r(e)},c=(0,x.jsxs)(Xo.A,{onClick:s(us.left),children:[(0,x.jsx)(Ko.A,{children:(0,x.jsx)(i.slots.columnMenuPinLeftIcon,{fontSize:"small"})}),(0,x.jsx)(Jo.A,{children:n.current.getLocaleText("pinToLeft")})]}),u=(0,x.jsxs)(Xo.A,{onClick:s(us.right),children:[(0,x.jsx)(Ko.A,{children:(0,x.jsx)(i.slots.columnMenuPinRightIcon,{fontSize:"small"})}),(0,x.jsx)(Jo.A,{children:n.current.getLocaleText("pinToRight")})]});if(!t)return null;const d=n.current.isColumnPinned(t.field);if(d){const e=d===us.right?us.left:us.right,t=e===us.right?"pinToRight":"pinToLeft",r=d===us.right?i.slots.columnMenuPinLeftIcon:i.slots.columnMenuPinRightIcon;return(0,x.jsxs)(o.Fragment,{children:[(0,x.jsxs)(Xo.A,{onClick:s(e),children:[(0,x.jsx)(Ko.A,{children:(0,x.jsx)(r,{fontSize:"small"})}),(0,x.jsx)(Jo.A,{children:n.current.getLocaleText(t)})]}),(0,x.jsxs)(Xo.A,{onClick:l,children:[(0,x.jsx)(Ko.A,{}),(0,x.jsx)(Jo.A,{children:n.current.getLocaleText("unpin")})]})]})}return"rtl"===a.direction?(0,x.jsxs)(o.Fragment,{children:[u,c]}):(0,x.jsxs)(o.Fragment,{children:[c,u]})}}),dl=(0,n.A)({},ni,{columnMenuPinningItem:{displayOrder:15}}),fl=o.forwardRef(function(e,t){return(0,x.jsx)(oi,(0,n.A)({ref:t},e,{defaultSlots:ul,defaultSlotProps:dl}))}),pl=["getColumnsToRender","getRootProps"],hl=(0,re.A)("div",{name:"MuiDataGrid",slot:"HeaderFilterRow",overridesResolver:(e,t)=>t.headerFilterRow})(()=>({display:"flex"})),ml=Object.create(null),gl=(0,re.A)("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${z.x["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${z.x["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${z.x["scrollArea--left"]}`]:{left:0},[`&.${z.x["scrollArea--right"]}`]:{right:0}}));function yl(e){const{scrollDirection:t}=e,r=o.useRef(null),i=(0,We.h)(),a=(0,Jt.Z)(),[s,l]=o.useState(!1),[c,u]=o.useState(!0),d=(0,S.N)(i,V.rf),f=(0,S.N)(i,H.fc),p=o.useRef({left:0,top:0}),h=qa(),m=(0,n.A)({},h,{scrollDirection:t}),g=(e=>{const{scrollDirection:t,classes:r}=e,n={root:["scrollArea",`scrollArea--${t}`]};return(0,O.A)(n,z.B,r)})(m),y=Zt(i,h.columnHeaderHeight),v=Math.floor(h.columnHeaderHeight*d),b=o.useCallback(e=>{p.current=e;const r=i.current.getRootDimensions();u(()=>{if("left"===t)return p.current.left>0;if("right"===t){const e=f-r.viewportInnerSize.width;return p.current.left{let n;if(e.preventDefault(),"left"===t)n=e.clientX-r.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI: Wrong drag direction");n=Math.max(1,e.clientX-r.current.getBoundingClientRect().left)}n=1.5*(n-1)+1,a.start(0,()=>{i.current.scroll({left:p.current.left+n,top:p.current.top})})},[t,i,a]),w=(0,er.A)(()=>{l(!0)}),A=(0,er.A)(()=>{l(!1)});return(0,be.cz)(i,"scrollPositionChange",b),(0,be.cz)(i,"columnHeaderDragStart",w),(0,be.cz)(i,"columnHeaderDragEnd",A),s&&c?(0,x.jsx)(gl,{ref:r,className:(0,R.A)(g.root),ownerState:m,onDragOver:_,style:{height:v,top:y-v}}):null}const vl=o.memo(yl),bl=["style","className","innerRef","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence","pinnedColumns"],_l=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,t/100},xl=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"PinnedColumnHeaders",overridesResolver:(e,t)=>[{[`&.${z.x["pinnedColumnHeaders--left"]}`]:t["pinnedColumnHeaders--left"]},{[`&.${z.x["pinnedColumnHeaders--right"]}`]:t["pinnedColumnHeaders--right"]},t.pinnedColumnHeaders]})(({theme:e,ownerState:t})=>{var r;return(0,n.A)({position:"absolute",top:0,overflow:"hidden",zIndex:1,display:"flex",flexDirection:"column",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.default},e.vars?{backgroundImage:null==(r=e.vars.overlays)?void 0:r[2]}:(0,n.A)({},"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${(0,N.X4)("#fff",_l(2))}, ${(0,N.X4)("#fff",_l(2))})`}),t.side===us.left&&{left:0},t.side===us.right&&{right:0},t.side===us.right&&t.showCellVerticalBorder&&{borderLeftWidth:"1px",borderLeftStyle:"solid"})});xl.propTypes={ownerState:a().object.isRequired};const wl=o.forwardRef(function(e,t){const{className:r,innerRef:i,visibleColumns:a,sortColumnLookup:s,filterColumnLookup:l,columnPositions:c,columnHeaderTabIndexState:u,columnGroupHeaderTabIndexState:d,columnHeaderFocus:f,columnGroupHeaderFocus:p,densityFactor:h,headerGroupingMaxDepth:m,columnMenuState:g,columnVisibility:y,columnGroupsHeaderStructure:v,hasOtherElementInTabSequence:b,pinnedColumns:_}=e,w=(0,M.A)(e,bl),A=qa(),C=Za(),[E,I]=o.useState(0),k=(0,je.A)(),R=(0,er.A)(()=>{const e=C.current.getRootDimensions();if(!e)return;const t=e.hasScrollY?e.scrollBarSize:0;E!==t&&I(t)});(0,be.cz)(C,"virtualScrollerContentSizeChange",R);const P=o.useMemo(()=>a.map(({field:e})=>e),[a]),[D,L]=Ps(_,P,"rtl"===k.direction),{isDragging:N,renderContext:F,getRootProps:B,getInnerProps:j,getColumnHeaders:$,getColumnFilters:U,getColumnGroupHeaders:V}=(e=>{const t=T(),{headerGroupingMaxDepth:r,hasOtherElementInTabSequence:i}=e,a=(0,S.N)(t,se.h3),s=No((0,n.A)({},e,{hasOtherElementInTabSequence:i||null!==a})),{getColumnsToRender:l,getRootProps:c}=s,u=(0,M.A)(s,pl),d=o.useRef(null);t.current.register("private",{headerFiltersElementRef:d});const f=o.useRef(null),p=qa(),h=(e=>{const{classes:t}=e;return o.useMemo(()=>(0,O.A)({headerFilterRow:["headerFilterRow"]},z.B,t),[t])})(p),m=!p.unstable_headerFilters,g=Math.floor(p.columnHeaderHeight*e.densityFactor),y=(0,S.N)(t,ie.ZI),v=Zt(t,p.columnHeaderHeight)+(m?0:g),b=(0,S.N)(t,se.it),_=o.useCallback(e=>{const t=null==y?void 0:y.items.find(t=>t.field===e.field&&"isAnyOf"!==t.operator);if(null!=t)return t;const r=ml[e.field];if(null!=r)return r;const n=Tn(e);return ml[e.field]=n,n},[y]),w={minHeight:v,maxHeight:v,lineHeight:`${g}px`};return(0,n.A)({},u,{getColumnFilters:(t,o={})=>{if(m)return null;const i=l(t);if(null==i)return null;const{renderedColumns:s,firstColumnToRender:c}=i,u=[];for(let t=0;t"isAnyOf"!==e.value))?y:[],S=_(r);u.push((0,x.jsx)(p.slots.headerFilterCell,(0,n.A)({colIndex:i,height:g,width:r.computedWidth,colDef:r,hasFocus:l,tabIndex:h,headerFilterMenuRef:f,headerClassName:m,filterOperators:A,"data-field":r.field,item:S},null==(w=p.slotProps)?void 0:w.headerFilterCell,o),`${r.field}-filter`))}return(0,x.jsx)(hl,{ref:d,ownerState:p,className:h.headerFilterRow,role:"row","aria-rowindex":r+2,children:u})},getRootProps:m?c:(e={})=>(0,n.A)({style:w},e)})})({innerRef:i,visibleColumns:a,sortColumnLookup:s,filterColumnLookup:l,columnPositions:c,columnHeaderTabIndexState:u,hasOtherElementInTabSequence:b,columnGroupHeaderTabIndexState:d,columnHeaderFocus:f,columnGroupHeaderFocus:p,densityFactor:h,headerGroupingMaxDepth:m,columnMenuState:g,columnVisibility:y,columnGroupsHeaderStructure:v,minColumnIndex:D.length}),H=(0,n.A)({},A,{leftPinnedColumns:D,rightPinnedColumns:L,classes:A.classes}),G=(e=>{const{leftPinnedColumns:t,rightPinnedColumns:r,classes:n}=e,o={leftPinnedColumns:["pinnedColumnHeaders",t&&t.length>0&&"pinnedColumnHeaders--left"],rightPinnedColumns:["pinnedColumnHeaders",r&&r.length>0&&"pinnedColumnHeaders--right","withBorderColor"]};return(0,O.A)(o,z.B,n)})(H),W=F&&D.length?(0,n.A)({},F,{firstColumnIndex:0,lastColumnIndex:D.length}):null,q=F&&L.length?(0,n.A)({},F,{firstColumnIndex:P.length-L.length,lastColumnIndex:P.length}):null,Z=j(),Y={role:Z.role};return(0,x.jsxs)(Bo,(0,n.A)({ref:t,className:r},B(w),{children:[W&&(0,x.jsxs)(xl,(0,n.A)({className:G.leftPinnedColumns,ownerState:(0,n.A)({},H,{side:us.left,showCellVerticalBorder:A.showCellVerticalBorder})},Y,{children:[V({renderContext:W,minFirstColumn:W.firstColumnIndex,maxLastColumn:W.lastColumnIndex}),$({renderContext:W,minFirstColumn:W.firstColumnIndex,maxLastColumn:W.lastColumnIndex},{disableReorder:!0}),U({renderContext:W,minFirstColumn:W.firstColumnIndex,maxLastColumn:W.lastColumnIndex})]})),(0,x.jsx)(vl,{scrollDirection:"left"}),(0,x.jsxs)(Uo,(0,n.A)({isDragging:N},Z,{children:[V({renderContext:F,minFirstColumn:D.length,maxLastColumn:P.length-L.length}),$({renderContext:F,minFirstColumn:D.length,maxLastColumn:P.length-L.length}),U({renderContext:F,minFirstColumn:D.length,maxLastColumn:P.length-L.length})]})),(0,x.jsx)(vl,{scrollDirection:"right"}),q&&(0,x.jsxs)(xl,(0,n.A)({ownerState:(0,n.A)({},H,{side:us.right,showCellVerticalBorder:A.showCellVerticalBorder}),className:G.rightPinnedColumns,style:{paddingRight:E}},Y,{children:[V({renderContext:q,minFirstColumn:q.firstColumnIndex,maxLastColumn:q.lastColumnIndex}),$({renderContext:q,minFirstColumn:q.firstColumnIndex,maxLastColumn:q.lastColumnIndex},{disableReorder:!0,separatorSide:yo.Left}),U({renderContext:q,minFirstColumn:q.firstColumnIndex,maxLastColumn:q.lastColumnIndex})]}))]}))}),Al=["operators","item","field","buttonRef","headerFilterMenuRef"],Sl={width:22,height:22,margin:"auto 0 10px 5px"};function Cl(e){var t;const{operators:r,item:i,field:a,buttonRef:s,headerFilterMenuRef:l}=e,c=(0,M.A)(e,Al),u=(0,$e.A)(),d=(0,$e.A)(),f=qa(),p=(0,We.h)(),h=Boolean(ua(p)===a&&l.current);return f.slots.headerFilterMenu?(0,x.jsxs)(o.Fragment,{children:[(0,x.jsx)(f.slots.baseIconButton,(0,n.A)({id:u,ref:s,"aria-label":p.current.getLocaleText("filterPanelOperator"),title:p.current.getLocaleText("filterPanelOperator"),"aria-controls":d,"aria-expanded":h?"true":void 0,"aria-haspopup":"true",tabIndex:-1,size:"small",onClick:e=>{l.current=e.currentTarget,p.current.showHeaderFilterMenu(a)},sx:Sl},null==(t=f.slotProps)?void 0:t.baseIconButton,{children:(0,x.jsx)(f.slots.openFilterButtonIcon,{fontSize:"small"})})),(0,x.jsx)(f.slots.headerFilterMenu,(0,n.A)({field:a,open:h,item:i,target:l.current,operators:r,labelledBy:u,id:d},c))]}):null}const El={padding:"2px"};function Tl({onClick:e}){var t;const r=qa();return(0,x.jsx)(r.slots.baseIconButton,(0,n.A)({tabIndex:-1,"aria-label":"Clear filter",size:"small",onClick:e,sx:El},null==(t=r.slotProps)?void 0:t.baseIconButton,{children:(0,x.jsx)(r.slots.columnMenuClearIcon,{fontSize:"inherit"})}))}const Il=["colIndex","height","hasFocus","filterOperators","width","headerClassName","colDef","item","headerFilterMenuRef","InputComponentProps","showClearIcon"],kl={'& input[value=""]:not(:focus)':{color:"transparent"}},Ml=o.forwardRef((e,t)=>{var r,i,a;const{colIndex:s,height:l,hasFocus:c,filterOperators:u,width:d,headerClassName:f,colDef:p,item:h,headerFilterMenuRef:m,InputComponentProps:g,showClearIcon:y=!0}=e,v=(0,M.A)(e,Il),b=T(),_=(0,H.TI)(b),w=qa(),A=o.useRef(null),S=(0,D.A)(t,A),C=o.useRef(null),E=o.useRef(null),I=ca(b)===p.field,k=ua(b)===p.field,L=u[0],N=p.filterable?L.InputComponent:null,F=o.useCallback(e=>{!h.value||e.value?b.current.upsertFilterItem(e):b.current.deleteFilterItem(e)},[b,h]),B=o.useCallback(()=>{b.current.deleteFilterItem(h)},[b,h]);let j;p.renderHeaderFilter&&(j=p.renderHeaderFilter(e)),o.useLayoutEffect(()=>{if(c&&!k){var e;let t=A.current.querySelector('[tabindex="0"]');I&&N&&(t=C.current);const r=t||A.current;null==r||r.focus(),null!=(e=b.current.columnHeadersContainerElementRef)&&e.current&&(b.current.columnHeadersContainerElementRef.current.scrollLeft=0)}},[N,b,c,I,k]);const $=o.useCallback(e=>{if(!k&&!(0,ot.q9)(e.key))switch(e.key){case"Escape":I&&b.current.stopHeaderFilterEditMode();break;case"Enter":if(I){b.current.stopHeaderFilterEditMode();break}if(e.metaKey||e.ctrlKey){m.current=E.current,b.current.showHeaderFilterMenu(p.field);break}b.current.startHeaderFilterEditMode(p.field);break;case"Tab":if(I){var t;const r=null!=(t=_[s+(e.shiftKey?-1:1)])?t:null;r&&(b.current.startHeaderFilterEditMode(r),b.current.setColumnHeaderFilterFocus(r,e))}break;default:if(I||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;b.current.startHeaderFilterEditMode(p.field)}},[b,p.field,s,_,m,I,k]),U=o.useCallback((e,t)=>r=>{b.current.publishEvent(e,b.current.getColumnHeaderParams(p.field),r),t&&t(r)},[b,p.field]),V=o.useCallback(e=>{c||(C.current&&C.current.contains(e.target)&&C.current.focus(),b.current.setColumnHeaderFilterFocus(p.field,e))},[b,p.field,c]),G=o.useMemo(()=>({onKeyDown:U("headerFilterKeyDown",$),onClick:U("headerFilterClick"),onMouseDown:U("headerFilterMouseDown",V),onBlur:U("headerFilterBlur")}),[V,$,U]),W=(e=>{const{colDef:t,classes:r,showColumnVerticalBorder:n}=e,o={root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight","withBorderColor",n&&"columnHeader--withRightBorder"]};return(0,O.A)(o,z.B,r)})((0,n.A)({},w,{colDef:p})),q=!1===(null==u||null==(r=u.find(({value:e})=>h.operator===e))?void 0:r.requiresFilterValue),Z=Boolean(null==h?void 0:h.value)||q,Y=null!=(i=L.headerLabel)?i:b.current.getLocaleText(`headerFilterOperator${(0,P.A)(h.operator)}`),X=Z||c;return(0,x.jsxs)("div",(0,n.A)({className:(0,R.A)(W.root,f),ref:S,style:{height:l,width:d,minWidth:d,maxWidth:d},role:"columnheader","aria-colindex":s+1,"aria-label":null==j?null!=(a=p.headerName)?a:p.field:void 0},v,G,{children:[j,N&&void 0===j?(0,x.jsxs)(o.Fragment,{children:[(0,x.jsx)(N,(0,n.A)({apiRef:b,item:h,inputRef:C,applyValue:F,onFocus:()=>b.current.startHeaderFilterEditMode(p.field),onBlur:e=>{var t;b.current.stopHeaderFilterEditMode(),null!=(t=e.relatedTarget)&&t.className.includes("columnHeader")||b.current.setState(e=>(0,n.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))},label:(0,P.A)(Y),placeholder:"",isFilterActive:X,clearButton:y&&Z?(0,x.jsx)(Tl,{onClick:B}):null,disabled:q,tabIndex:-1,InputLabelProps:null,sx:"date"===p.type||"dateTime"===p.type?kl:void 0},q?{value:""}:{},null==L?void 0:L.InputComponentProps,g)),(0,x.jsx)(Cl,{operators:u,item:h,field:p.field,applyFilterChanges:F,headerFilterMenuRef:m,buttonRef:E})]}):null]}))}),Rl={ColumnMenuPinRightIcon:(0,bi.A)((0,x.jsx)("g",{transform:"rotate(-30 15 10)",children:(0,x.jsx)("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinRight"),ColumnMenuPinLeftIcon:(0,bi.A)((0,x.jsx)("g",{transform:"rotate(30 8 12)",children:(0,x.jsx)("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinLeft")},Pl=(0,n.A)({},Rl),Ol=(0,n.A)({},Zi,Pl,{ColumnMenu:fl,ColumnHeaders:wl,HeaderFilterCell:Ml,HeaderFilterMenu:function({open:e,field:t,target:r,applyFilterChanges:i,operators:a,item:s,id:l,labelledBy:c}){const u=(0,We.h)(),d=o.useCallback(()=>{u.current.hideHeaderFilterMenu()},[u]),f=o.useCallback(e=>{"Tab"===e.key&&e.preventDefault(),"Escape"!==e.key&&"Tab"!==e.key||d()},[d]);return r?(0,x.jsx)(Xe,{placement:"bottom-end",open:e,target:r,onClose:d,children:(0,x.jsx)(Be.A,{"aria-labelledby":c,id:l,onKeyDown:f,children:a.map((r,o)=>{var a;const l=null!=(a=null==r?void 0:r.headerLabel)?a:u.current.getLocaleText(`headerFilterOperator${(0,P.A)(r.value)}`);return(0,x.jsx)(Xo.A,{onClick:()=>{i((0,n.A)({},s,{operator:r.value})),d()},autoFocus:0===o&&e,selected:r.value===s.operator,children:l},`${t}-${r.value}`)})})}):null}}),Dl=(0,n.A)({},Xi,{scrollEndThreshold:80,treeData:!1,defaultGroupingExpansionDepth:0,autosizeOnMount:!1,disableAutosize:!1,disableColumnPinning:!1,keepColumnPositionIfDraggedOutside:!1,disableChildrenFiltering:!1,disableChildrenSorting:!1,rowReordering:!1,rowsLoadingMode:"client",getDetailPanelHeight:()=>500,unstable_headerFilters:!1}),Ll=Yi(Ol),Nl="MTcyMTI1MzYwMDAwMA==",Fl=o.forwardRef(function(e,t){const r=(e=>{const[t,r,i]=(a=(0,al.A)({props:e,name:"MuiDataGrid"}),o.useMemo(()=>{const{components:e,componentsProps:t}=a;return[e,t,cl((0,M.A)(a,ll))]},[a]));var a;const s=o.useMemo(()=>(0,n.A)({},sl,i.localeText),[i.localeText]),l=o.useMemo(()=>function({defaultSlots:e,slots:t,components:r}){const o=null!=t?t:r?Yi(r):null;if(!o||0===Object.keys(o).length)return e;const i=(0,n.A)({},e);return Object.keys(o).forEach(e=>{const t=e;void 0!==o[t]&&(i[t]=o[t])}),i}({defaultSlots:Ll,slots:i.slots,components:t}),[t,i.slots]);return o.useMemo(()=>{var e;return(0,n.A)({},Dl,i,{localeText:s,slots:l,slotProps:null!=(e=i.slotProps)?e:r,signature:"DataGridPro"})},[i,s,l,r])})(e),i=il(r.apiRef,r);_("x-data-grid-pro",Nl);const a=(0,S.N)(i,ds);return(0,x.jsx)(k,{privateApiRef:i,props:r,children:(0,x.jsxs)(ee,(0,n.A)({className:r.className,style:r.style,sx:r.sx,ref:t},r.forwardedProps,{children:[(0,x.jsx)(te,{}),(0,x.jsx)(ce,{VirtualScrollerComponent:$s,ColumnHeadersProps:{pinnedColumns:a},children:(0,x.jsx)(A,{packageName:"x-data-grid-pro",releaseInfo:Nl})}),(0,x.jsx)(ue,{})]}))})}),zl=o.memo(Fl);Fl.propTypes={apiRef:a().shape({current:a().object.isRequired}),"aria-label":a().string,"aria-labelledby":a().string,autoHeight:a().bool,autoPageSize:a().bool,autosizeOnMount:a().bool,autosizeOptions:a().shape({columns:a().arrayOf(a().string),expand:a().bool,includeHeaders:a().bool,includeOutliers:a().bool,outliersFactor:a().number}),cellModesModel:a().object,checkboxSelection:a().bool,checkboxSelectionVisibleOnly:a().bool,classes:a().object,clipboardCopyCellDelimiter:a().string,columnBuffer:a().number,columnGroupingModel:a().arrayOf(a().object),columnHeaderHeight:a().number,columns:a().arrayOf(a().object).isRequired,columnThreshold:a().number,columnVisibilityModel:a().object,components:a().object,componentsProps:a().object,defaultGroupingExpansionDepth:a().number,density:a().oneOf(["comfortable","compact","standard"]),detailPanelExpandedRowIds:a().arrayOf(a().oneOfType([a().number,a().string]).isRequired),disableAutosize:a().bool,disableChildrenFiltering:a().bool,disableChildrenSorting:a().bool,disableColumnFilter:a().bool,disableColumnMenu:a().bool,disableColumnPinning:a().bool,disableColumnReorder:a().bool,disableColumnResize:a().bool,disableColumnSelector:a().bool,disableDensitySelector:a().bool,disableEval:a().bool,disableMultipleColumnsFiltering:a().bool,disableMultipleColumnsSorting:a().bool,disableMultipleRowSelection:a().bool,disableRowSelectionOnClick:a().bool,disableVirtualization:a().bool,editMode:a().oneOf(["cell","row"]),experimentalFeatures:a().shape({ariaV7:a().bool,columnGrouping:a().bool,lazyLoading:a().bool,warnIfFocusStateIsNotSynced:a().bool}),filterDebounceMs:a().number,filterMode:a().oneOf(["client","server"]),filterModel:a().shape({items:a().arrayOf(a().shape({field:a().string.isRequired,id:a().oneOfType([a().number,a().string]),operator:a().string.isRequired,value:a().any})).isRequired,logicOperator:a().oneOf(["and","or"]),quickFilterExcludeHiddenColumns:a().bool,quickFilterLogicOperator:a().oneOf(["and","or"]),quickFilterValues:a().array}),forwardedProps:a().object,getCellClassName:a().func,getDetailPanelContent:a().func,getDetailPanelHeight:a().func,getEstimatedRowHeight:a().func,getRowClassName:a().func,getRowHeight:a().func,getRowId:a().func,getRowSpacing:a().func,getTreeDataPath:a().func,groupingColDef:a().oneOfType([a().func,a().object]),hideFooter:a().bool,hideFooterPagination:a().bool,hideFooterRowCount:a().bool,hideFooterSelectedRowCount:a().bool,ignoreDiacritics:a().bool,initialState:a().object,isCellEditable:a().func,isGroupExpandedByDefault:a().func,isRowSelectable:a().func,keepColumnPositionIfDraggedOutside:a().bool,keepNonExistentRowsSelected:a().bool,loading:a().bool,localeText:a().object,logger:a().shape({debug:a().func.isRequired,error:a().func.isRequired,info:a().func.isRequired,warn:a().func.isRequired}),logLevel:a().oneOf(["debug","error","info","warn",!1]),nonce:a().string,onCellClick:a().func,onCellDoubleClick:a().func,onCellEditStart:a().func,onCellEditStop:a().func,onCellKeyDown:a().func,onCellModesModelChange:a().func,onClipboardCopy:a().func,onColumnHeaderClick:a().func,onColumnHeaderDoubleClick:a().func,onColumnHeaderEnter:a().func,onColumnHeaderLeave:a().func,onColumnHeaderOut:a().func,onColumnHeaderOver:a().func,onColumnOrderChange:a().func,onColumnResize:a().func,onColumnVisibilityModelChange:a().func,onColumnWidthChange:a().func,onDetailPanelExpandedRowIdsChange:a().func,onFetchRows:a().func,onFilterModelChange:a().func,onMenuClose:a().func,onMenuOpen:a().func,onPaginationModelChange:a().func,onPinnedColumnsChange:a().func,onPreferencePanelClose:a().func,onPreferencePanelOpen:a().func,onProcessRowUpdateError:a().func,onResize:a().func,onRowClick:a().func,onRowCountChange:a().func,onRowDoubleClick:a().func,onRowEditStart:a().func,onRowEditStop:a().func,onRowModesModelChange:a().func,onRowOrderChange:a().func,onRowSelectionModelChange:a().func,onRowsScrollEnd:a().func,onSortModelChange:a().func,onStateChange:a().func,pageSizeOptions:a().arrayOf(a().oneOfType([a().number,a().shape({label:a().string.isRequired,value:a().number.isRequired})]).isRequired),pagination:a().bool,paginationMode:a().oneOf(["client","server"]),paginationModel:a().shape({page:a().number.isRequired,pageSize:a().number.isRequired}),pinnedColumns:a().shape({left:a().arrayOf(a().string),right:a().arrayOf(a().string)}),pinnedRows:a().shape({bottom:a().arrayOf(a().object),top:a().arrayOf(a().object)}),processRowUpdate:a().func,rowBuffer:a().number,rowCount:a().number,rowHeight:a().number,rowModesModel:a().object,rowPositionsDebounceMs:a().number,rowReordering:a().bool,rows:a().arrayOf(a().object).isRequired,rowSelection:a().bool,rowSelectionModel:a().oneOfType([a().arrayOf(a().oneOfType([a().number,a().string]).isRequired),a().number,a().string]),rowsLoadingMode:a().oneOf(["client","server"]),rowSpacingType:a().oneOf(["border","margin"]),rowThreshold:a().number,scrollbarSize:a().number,scrollEndThreshold:a().number,showCellVerticalBorder:a().bool,showColumnVerticalBorder:a().bool,slotProps:a().object,slots:a().object,sortingMode:a().oneOf(["client","server"]),sortingOrder:a().arrayOf(a().oneOf(["asc","desc"])),sortModel:a().arrayOf(a().shape({field:a().string.isRequired,sort:a().oneOf(["asc","desc"])})),sx:a().oneOfType([a().arrayOf(a().oneOfType([a().func,a().object,a().bool])),a().func,a().object]),throttleRowsMs:a().number,treeData:a().bool,unstable_headerFilters:a().bool,unstable_ignoreValueFormatterDuringExport:a().oneOfType([a().shape({clipboardExport:a().bool,csvExport:a().bool}),a().bool])}},o1VP(e,t,r){"use strict";r.d(t,{b:()=>o});var n=r("q1tI");const o=()=>n.useRef({})},XkTT(e,t,r){"use strict";r.d(t,{H:()=>E});var n=r("+9dH"),o=r("iWgU"),i=r("Nlia"),a=r("q1tI"),s=r("aGM9"),l=r("7Cdf"),c=r("FltU"),u=r("EQ6w"),d=r("S6m6"),f=r("nKUr");const p=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex"];function h(e){const{value:t}=e,r=(0,i.A)(e,p),o=(0,u.h)(),d=(0,c.A)(),h=(e=>{const{classes:t}=e;return(0,s.A)({root:["booleanCell"]},l.B,t)})({classes:d.classes}),m=a.useMemo(()=>t?d.slots.booleanCellTrueIcon:d.slots.booleanCellFalseIcon,[d.slots.booleanCellFalseIcon,d.slots.booleanCellTrueIcon,t]);return(0,f.jsx)(m,(0,n.A)({fontSize:"small",className:h.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(t)},r))}const m=a.memo(h);var g=r("juqV"),y=r("A3c4"),v=r("XgeM");const b=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function _(e){var t;const{id:r,value:o,field:d,className:p,hasFocus:h,onValueChange:m}=e,_=(0,i.A)(e,b),x=(0,u.h)(),w=a.useRef(null),A=(0,y.A)(),[S,C]=a.useState(o),E=(0,c.A)(),T=(e=>{const{classes:t}=e;return(0,s.A)({root:["editBooleanCell"]},l.B,t)})({classes:E.classes}),I=a.useCallback(async e=>{const t=e.target.checked;m&&await m(e,t),C(t),await x.current.setEditCellValue({id:r,field:d,value:t},e)},[x,d,r,m]);return a.useEffect(()=>{C(o)},[o]),(0,v.A)(()=>{h&&w.current.focus()},[h]),(0,f.jsx)("label",(0,n.A)({htmlFor:A,className:(0,g.A)(T.root,p)},_,{children:(0,f.jsx)(E.slots.baseCheckbox,(0,n.A)({id:A,inputRef:w,checked:Boolean(S),onChange:I,size:"small"},null==(t=E.slotProps)?void 0:t.baseCheckbox))}))}var x=r("ULoK"),w=r("Vn7y");const A=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],S=(0,w.Ay)("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});var C=r("xLAl");const E=(0,n.A)({},o.C,{type:"boolean",align:"center",headerAlign:"center",renderCell:e=>(0,d.DJ)(e.rowNode)?"":(0,f.jsx)(m,(0,n.A)({},e)),renderEditCell:e=>(0,f.jsx)(_,(0,n.A)({},e)),sortComparator:x.Ou,valueFormatter:function({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")},filterOperators:(0,C.eW)([{value:"is",getApplyFilterFnV7:e=>{if(!e.value)return null;const t="true"===e.value;return e=>Boolean(e)===t},InputComponent:function(e){var t,r,o,s;const{item:l,applyValue:u,apiRef:d,focusElementRef:p,clearButton:h,tabIndex:m,label:g,variant:v="standard"}=e,b=(0,i.A)(e,A),[_,x]=a.useState(l.value||""),w=(0,c.A)(),C=(0,y.A)(),E=(0,y.A)(),T=(null==(t=w.slotProps)?void 0:t.baseSelect)||{},I=null==(r=T.native)||r,k=(null==(o=w.slotProps)?void 0:o.baseSelectOption)||{},M=a.useCallback(e=>{const t=e.target.value;x(t),u((0,n.A)({},l,{value:t}))},[u,l]);a.useEffect(()=>{x(l.value||"")},[l.value]);const R=null!=g?g:d.current.getLocaleText("filterPanelInputLabel");return(0,f.jsxs)(S,{children:[(0,f.jsxs)(w.slots.baseFormControl,{fullWidth:!0,children:[(0,f.jsx)(w.slots.baseInputLabel,(0,n.A)({},null==(s=w.slotProps)?void 0:s.baseInputLabel,{id:C,shrink:!0,variant:v,children:R})),(0,f.jsxs)(w.slots.baseSelect,(0,n.A)({labelId:C,id:E,label:R,value:_,onChange:M,variant:v,notched:"outlined"===v||void 0,native:I,displayEmpty:!0,inputProps:{ref:p,tabIndex:m}},b,T,{children:[(0,f.jsx)(w.slots.baseSelectOption,(0,n.A)({},k,{native:I,value:"",children:d.current.getLocaleText("filterValueAny")})),(0,f.jsx)(w.slots.baseSelectOption,(0,n.A)({},k,{native:I,value:"true",children:d.current.getLocaleText("filterValueTrue")})),(0,f.jsx)(w.slots.baseSelectOption,(0,n.A)({},k,{native:I,value:"false",children:d.current.getLocaleText("filterValueFalse")}))]}))]}),h]})}}]),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)})},"0O0b"(e,t,r){"use strict";r.d(t,{f:()=>x,t:()=>_});var n=r("+9dH"),o=r("q1tI"),i=r("xLvK"),a=r("Nlia"),s=r("aGM9"),l=r("hmGc"),c=r("pwQ8"),u=r("P+14"),d=r("EQ6w"),f=r("7Cdf"),p=r("FltU"),h=r("m0sr"),m=r("72m/"),g=r("nKUr");const y=["field","colDef"],v=o.forwardRef(function(e,t){var r;const i=(0,a.A)(e,y),[,v]=o.useState(!1),b=(0,d.h)(),_=(0,p.A)(),x=(e=>{const{classes:t}=e;return(0,s.A)({root:["checkboxInput"]},f.B,t)})({classes:_.classes}),w=(0,l.N)(b,c.Kr),A=(0,l.N)(b,u.Bi),S=(0,l.N)(b,h.ux),C=(0,l.N)(b,m.ee),E=o.useMemo(()=>"function"!=typeof _.isRowSelectable?A:A.filter(e=>!!b.current.getRow(e)&&_.isRowSelectable(b.current.getRowParams(e))),[b,_.isRowSelectable,A]),T=o.useMemo(()=>(_.pagination&&_.checkboxSelectionVisibleOnly?C:S).reduce((e,t)=>(e[t]=!0,e),{}),[_.pagination,_.checkboxSelectionVisibleOnly,C,S]),I=o.useMemo(()=>E.filter(e=>T[e]).length,[E,T]),k=I>0&&I0,R=null!==w&&w.field===e.field?0:-1;o.useLayoutEffect(()=>{const t=b.current.getColumnHeaderElement(e.field);0===R&&t&&(t.tabIndex=-1)},[R,b,e.field]);const P=o.useCallback(e=>{" "===e.key&&b.current.publishEvent("headerSelectionCheckboxChange",{value:!M})},[b,M]),O=o.useCallback(()=>{v(e=>!e)},[]);o.useEffect(()=>b.current.subscribeEvent("rowSelectionChange",O),[b,O]);const D=b.current.getLocaleText(M?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,g.jsx)(_.slots.baseCheckbox,(0,n.A)({ref:t,indeterminate:k,checked:M,onChange:e=>{const t={value:e.target.checked};b.current.publishEvent("headerSelectionCheckboxChange",t)},className:x.root,inputProps:{"aria-label":D},tabIndex:R,onKeyDown:P},null==(r=_.slotProps)?void 0:r.baseCheckbox,i))});var b=r("XkTT");const _="__check__",x=(0,n.A)({},b.H,{field:_,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,valueGetter:e=>void 0!==(0,u.Zk)(e.api.state,e.api.instanceId)[e.id],renderHeader:e=>(0,g.jsx)(v,(0,n.A)({},e)),renderCell:e=>(0,g.jsx)(i.r,(0,n.A)({},e))})},Ilr6(e,t,r){"use strict";r.d(t,{Q:()=>g});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("A3c4"),s=r("Br4D"),l=r("FltU"),c=r("nKUr");const u=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function d(e){var t,r;const{item:d,applyValue:f,type:p,apiRef:h,focusElementRef:m,InputProps:g,clearButton:y,tabIndex:v,disabled:b}=e,_=(0,o.A)(e,u),x=(0,s.Z)(),[w,A]=i.useState(null!=(t=d.value)?t:""),[S,C]=i.useState(!1),E=(0,a.A)(),T=(0,l.A)(),I=i.useCallback(e=>{const t=e.target.value;A(String(t)),C(!0),x.start(T.filterDebounceMs,()=>{f((0,n.A)({},d,{value:t})),C(!1)})},[f,d,T.filterDebounceMs,x]);return i.useEffect(()=>{var e;const t=null!=(e=d.value)?e:"";A(String(t))},[d.value]),(0,c.jsx)(T.slots.baseTextField,(0,n.A)({fullWidth:!0,id:E,label:h.current.getLocaleText("filterPanelInputLabel"),placeholder:h.current.getLocaleText("filterPanelInputPlaceholder"),value:w,onChange:I,variant:"standard",type:p||"text",InputLabelProps:{shrink:!0},inputRef:m,InputProps:(0,n.A)({},S||y?{endAdornment:S?(0,c.jsx)(T.slots.loadIcon,{fontSize:"small",color:"action"}):y}:{},{disabled:b},g,{inputProps:(0,n.A)({max:"datetime-local"===p?"9999-12-31T23:59":"9999-12-31",tabIndex:v},null==g?void 0:g.inputProps)})},_,null==(r=T.slotProps)?void 0:r.baseTextField))}var f=r("xLAl");const p=/(\d+)-(\d+)-(\d+)/,h=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function m(e,t,r,n){if(!e.value)return null;const[o,i,a,s,l]=e.value.match(r?h:p).slice(1).map(Number),c=new Date(o,i-1,a,s||0,l||0).getTime();return e=>{if(!e)return!1;if(n)return t(e.getTime(),c);const o=new Date(e).setHours(r?e.getHours():0,r?e.getMinutes():0,0,0);return t(o,c)}}const g=e=>(0,f.eW)([{value:"is",getApplyFilterFnV7:t=>m(t,(e,t)=>e===t,e),InputComponent:d,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFnV7:t=>m(t,(e,t)=>e!==t,e),InputComponent:d,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFnV7:t=>m(t,(e,t)=>e>t,e),InputComponent:d,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFnV7:t=>m(t,(e,t)=>e>=t,e),InputComponent:d,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFnV7:t=>m(t,(e,t)=>em(t,(e,t)=>e<=t,e),InputComponent:d,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1}])},"5NNo"(e,t,r){"use strict";r.d(t,{m:()=>A});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("A3c4"),s=r("Vn7y"),l=r("FltU"),c=r("QnE+"),u=r("nKUr");const d=["item","applyValue","type","apiRef","focusElementRef","getOptionLabel","getOptionValue","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],f=({column:{valueOptions:e,field:t},OptionComponent:r,getOptionLabel:n,getOptionValue:a,isSelectNative:s,baseSelectOptionProps:l})=>("function"==typeof e?["",...e({field:t})]:["",...e||[]]).map(e=>{const t=a(e),c=n(e);return(0,i.createElement)(r,(0,o.A)({},l,{native:s,key:t,value:t}),c)}),p=(0,s.Ay)("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function h(e){var t,r,s,h,m,g,y,v;const{item:b,applyValue:_,type:x,apiRef:w,focusElementRef:A,getOptionLabel:S,getOptionValue:C,placeholder:E,tabIndex:T,label:I,variant:k="standard",clearButton:M}=e,R=(0,n.A)(e,d),[P,O]=i.useState(null!=(t=b.value)?t:""),D=(0,a.A)(),L=(0,a.A)(),N=(0,l.A)(),F=null==(r=null==(s=N.slotProps)||null==(s=s.baseSelect)?void 0:s.native)||r;let z=null;if(b.field){const e=w.current.getColumn(b.field);(0,c._W)(e)&&(z=e)}const B=C||(null==(h=z)?void 0:h.getOptionValue),j=S||(null==(m=z)?void 0:m.getOptionLabel),$=i.useMemo(()=>{if(z)return"function"==typeof z.valueOptions?z.valueOptions({field:z.field}):z.valueOptions},[z]),U=i.useCallback(e=>{let t=e.target.value;t=(0,c.Rc)(t,$,B),O(String(t)),_((0,o.A)({},b,{value:t}))},[$,B,_,b]);if(i.useEffect(()=>{var e;let t;if(void 0!==$){if(t=(0,c.Rc)(b.value,$,B),t!==b.value)return void _((0,o.A)({},b,{value:t}))}else t=b.value;t=null!=(e=t)?e:"",O(String(t))},[b,$,_,B]),!(0,c._W)(z))return null;if(!(0,c._W)(z))return null;const V=null!=I?I:w.current.getLocaleText("filterPanelInputLabel");return(0,u.jsxs)(p,{children:[(0,u.jsxs)(N.slots.baseFormControl,{children:[(0,u.jsx)(N.slots.baseInputLabel,(0,o.A)({},null==(g=N.slotProps)?void 0:g.baseInputLabel,{id:L,htmlFor:D,shrink:!0,variant:k,children:V})),(0,u.jsx)(N.slots.baseSelect,(0,o.A)({id:D,label:V,labelId:L,value:P,onChange:U,variant:k,type:x||"text",inputProps:{tabIndex:T,ref:A,placeholder:null!=E?E:w.current.getLocaleText("filterPanelInputPlaceholder")},native:F,notched:"outlined"===k||void 0},R,null==(y=N.slotProps)?void 0:y.baseSelect,{children:f({column:z,OptionComponent:N.slots.baseSelectOption,getOptionLabel:j,getOptionValue:B,isSelectNative:F,baseSelectOptionProps:null==(v=N.slotProps)?void 0:v.baseSelectOption})}))]}),M]})}var m=r("RI6h"),g=r("8cYg");const y=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant","getOptionLabel","getOptionValue"],v=(0,m.Z)();function b(e){var t,r;const{item:s,applyValue:d,apiRef:f,focusElementRef:p,color:h,error:m,helperText:b,size:_,variant:x="standard",getOptionLabel:w,getOptionValue:A}=e,S=(0,n.A)(e,y),C={color:h,error:m,helperText:b,size:_,variant:x},E=(0,a.A)(),T=(0,l.A)();let I=null;if(s.field){const e=f.current.getColumn(s.field);(0,c._W)(e)&&(I=e)}const k=A||(null==(t=I)?void 0:t.getOptionValue),M=w||(null==(r=I)?void 0:r.getOptionLabel),R=i.useCallback((e,t)=>k(e)===k(t),[k]),P=i.useMemo(()=>{var e;return null!=(e=I)&&e.valueOptions?"function"==typeof I.valueOptions?I.valueOptions({field:I.field}):I.valueOptions:[]},[I]),O=i.useMemo(()=>null==P?void 0:P.map(k),[P,k]),D=i.useMemo(()=>Array.isArray(s.value)?void 0!==P?s.value.map(e=>null==O?void 0:O.findIndex(t=>t===e)).filter(e=>e>=0).map(e=>P[e]):s.value:[],[s.value,P,O]);i.useEffect(()=>{Array.isArray(s.value)&&D.length===s.value.length||d((0,o.A)({},s,{value:D.map(k)}))},[s,D,d,k]);const L=i.useCallback((e,t)=>{d((0,o.A)({},s,{value:t.map(k)}))},[d,s,k]);return(0,u.jsx)(g.A,(0,o.A)({multiple:!0,options:P,isOptionEqualToValue:R,filterOptions:v,id:E,value:D,onChange:L,getOptionLabel:M,renderTags:(e,t)=>e.map((e,r)=>(0,u.jsx)(T.slots.baseChip,(0,o.A)({variant:"outlined",size:"small",label:M(e)},t({index:r})))),renderInput:e=>{var t;return(0,u.jsx)(T.slots.baseTextField,(0,o.A)({},e,{label:f.current.getLocaleText("filterPanelInputLabel"),placeholder:f.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,o.A)({},e.InputLabelProps,{shrink:!0}),inputRef:p,type:"singleSelect"},C,null==(t=T.slotProps)?void 0:t.baseTextField))}},S))}var _=r("XVIy"),x=r("xLAl");const w=e=>null!=e&&(0,_.Gv)(e)?e.value:e,A=()=>(0,x.eW)([{value:"is",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>w(t)===w(e.value),InputComponent:h},{value:"not",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>w(t)!==w(e.value),InputComponent:h},{value:"isAnyOf",getApplyFilterFnV7:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(w);return e=>t.includes(w(e))},InputComponent:b}])},iWgU(e,t,r){"use strict";r.d(t,{C:()=>_});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("aGM9"),s=r("XgeM"),l=r("Vn7y"),c=r("kmWS"),u=r("7Cdf"),d=r("FltU"),f=r("EQ6w"),p=r("nKUr");const h=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],m=(0,l.Ay)(c.Ay,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>(0,o.A)({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),g=i.forwardRef((e,t)=>{const r=(0,d.A)(),{id:l,value:c,field:g,colDef:y,hasFocus:v,debounceMs:b=200,isProcessingProps:_,onValueChange:x}=e,w=(0,n.A)(e,h),A=(0,f.h)(),S=i.useRef(),[C,E]=i.useState(c),T=(e=>{const{classes:t}=e;return(0,a.A)({root:["editInputCell"]},u.B,t)})(r),I=i.useCallback(async e=>{const t=e.target.value;x&&await x(e,t);const r=A.current.getColumn(g);let n=t;r.valueParser&&(n=r.valueParser(t,A.current.getCellParams(l,g))),E(n),A.current.setEditCellValue({id:l,field:g,value:n,debounceMs:b,unstable_skipValueParser:!0},e)},[A,b,g,l,x]),k=A.current.unstable_getEditCellMeta(l,g);return i.useEffect(()=>{"debouncedSetEditCellValue"!==(null==k?void 0:k.changeReason)&&E(c)},[k,c]),(0,s.A)(()=>{v&&S.current.focus()},[v]),(0,p.jsx)(m,(0,o.A)({ref:t,inputRef:S,className:T.root,ownerState:r,fullWidth:!0,type:"number"===y.type?y.type:"text",value:null!=C?C:"",onChange:I,endAdornment:_?(0,p.jsx)(r.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},w))});var y=r("ULoK"),v=r("1llu"),b=r("xLAl");const _={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:y.Az,type:"string",align:"left",filterOperators:(0,v.n)(),renderEditCell:e=>(0,p.jsx)(g,(0,o.A)({},e)),getApplyQuickFilterFn:(0,b.UD)(v.X),getApplyQuickFilterFnV7:v.X}},"1llu"(e,t,r){"use strict";r.d(t,{X:()=>l,n:()=>c});var n=r("B8tz"),o=r("XVIy"),i=r("C8ES"),a=r("xLAl"),s=r("io7V");const l=(0,a.YB)(e=>{if(!e)return null;const t=new RegExp((0,o.Nt)(e),"i");return(e,r,n,o)=>{let i=o.current.getRowFormattedValue(r,n);return o.current.ignoreDiacritics&&(i=(0,s.WL)(i)),null!=i&&t.test(i.toString())}}),c=(e=!1)=>(0,a.eW)([{value:"contains",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp((0,o.Nt)(r),"i");return e=>null!=e&&n.test(String(e))},InputComponent:n.y},{value:"equals",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&0===n.compare(r,e.toString())},InputComponent:n.y},{value:"startsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp(`^${(0,o.Nt)(r)}.*$`,"i");return e=>null!=e&&n.test(e.toString())},InputComponent:n.y},{value:"endsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp(`.*${(0,o.Nt)(r)}$`,"i");return e=>null!=e&&n.test(e.toString())},InputComponent:n.y},{value:"isEmpty",getApplyFilterFnV7:()=>e=>""===e||null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>""!==e&&null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const r=e?t.value:t.value.map(e=>e.trim()),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&r.some(t=>0===n.compare(t,e.toString()||""))},InputComponent:i.M}])},xLAl(e,t,r){"use strict";r.d(t,{Dc:()=>o,E0:()=>a,UD:()=>l,YB:()=>i,eW:()=>s});var n=r("+9dH");const o={current:null};function i(e){return e.isInternal=!0,e}function a(e){return void 0!==e&&!0===e.isInternal}function s(e){return e.map(e=>{return(0,n.A)({},e,{getApplyFilterFn:(t=e.getApplyFilterFnV7,i((e,r)=>{const n=t(e,r);return n?e=>n(e.value,e.row,r,o.current):n})),getApplyFilterFnV7:i(e.getApplyFilterFnV7)});var t})}function l(e){return i((t,r,n)=>{const o=e(t,r,n);return o?e=>o(e.value,e.row,r,n):o})}},yAU5(e,t,r){"use strict";r.d(t,{k:()=>n});const n=r("q1tI").createContext(void 0)},xLvK(e,t,r){"use strict";r.d(t,{r:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("aGM9"),s=r("N0rN"),l=r("gBcZ"),c=r("EQ6w"),u=r("FltU"),d=r("7Cdf"),f=r("nKUr");const p=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],h=i.forwardRef(function(e,t){var r;const{field:h,id:m,value:g,rowNode:y,hasFocus:v,tabIndex:b}=e,_=(0,o.A)(e,p),x=(0,c.h)(),w=(0,u.A)(),A=(e=>{const{classes:t}=e;return(0,a.A)({root:["checkboxInput"]},d.B,t)})({classes:w.classes}),S=i.useRef(null),C=i.useRef(null),E=(0,s.A)(S,t),T=x.current.getCellElement(m,h);i.useLayoutEffect(()=>{0===b&&T&&(T.tabIndex=-1)},[T,b]),i.useEffect(()=>{if(v){var e;const t=null==(e=S.current)?void 0:e.querySelector("input");null==t||t.focus({preventScroll:!0})}else C.current&&C.current.stop({})},[v]);const I=i.useCallback(e=>{(0,l.C8)(e.key)&&e.stopPropagation()},[]);if("footer"===y.type||"pinnedRow"===y.type)return null;const k=x.current.isRowSelectable(m),M=x.current.getLocaleText(g?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return(0,f.jsx)(w.slots.baseCheckbox,(0,n.A)({ref:E,tabIndex:b,checked:g,onChange:e=>{const t={value:e.target.checked,id:m};x.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:A.root,inputProps:{"aria-label":M},onKeyDown:I,disabled:!k,touchRippleRef:C},null==(r=w.slotProps)?void 0:r.baseCheckbox,_))})},pIrZ(e,t,r){"use strict";r.d(t,{$:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("M82X"),c=r("7Cdf"),u=r("FltU"),d=r("nKUr");const f=["className"],p=(0,l.A)("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),h=i.forwardRef(function(e,t){const{className:r}=e,i=(0,o.A)(e,f),l=(0,u.A)(),h=(e=>{const{classes:t}=e;return(0,s.A)({root:["overlay"]},c.B,t)})(l);return(0,d.jsx)(p,(0,n.A)({ref:t,className:(0,a.A)(h.root,r),ownerState:l},i))})},C8ES(e,t,r){"use strict";r.d(t,{M:()=>d});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("8cYg"),s=r("A3c4"),l=r("FltU"),c=r("nKUr");const u=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"];function d(e){const{item:t,applyValue:r,type:d,apiRef:f,focusElementRef:p,color:h,error:m,helperText:g,size:y,variant:v}=e,b=(0,o.A)(e,u),_={color:h,error:m,helperText:g,size:y,variant:v},[x,w]=i.useState(t.value||[]),A=(0,s.A)(),S=(0,l.A)();i.useEffect(()=>{var e;const r=null!=(e=t.value)?e:[];w(r.map(String))},[t.value]);const C=i.useCallback((e,o)=>{w(o.map(String)),r((0,n.A)({},t,{value:[...o]}))},[r,t]);return(0,c.jsx)(a.A,(0,n.A)({multiple:!0,freeSolo:!0,options:[],filterOptions:(e,t)=>{const{inputValue:r}=t;return null==r||""===r?[]:[r]},id:A,value:x,onChange:C,renderTags:(e,t)=>e.map((e,r)=>(0,c.jsx)(S.slots.baseChip,(0,n.A)({variant:"outlined",size:"small",label:e},t({index:r})))),renderInput:e=>{var t;return(0,c.jsx)(S.slots.baseTextField,(0,n.A)({},e,{label:f.current.getLocaleText("filterPanelInputLabel"),placeholder:f.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,n.A)({},e.InputLabelProps,{shrink:!0}),inputRef:p,type:d||"text"},_,null==(t=S.slotProps)?void 0:t.baseTextField))}},b))}},B8tz(e,t,r){"use strict";r.d(t,{y:()=>d});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("A3c4"),s=r("Br4D"),l=r("FltU"),c=r("nKUr");const u=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","clearButton","InputProps","variant"];function d(e){var t,r;const{item:d,applyValue:f,type:p,apiRef:h,focusElementRef:m,tabIndex:g,disabled:y,clearButton:v,InputProps:b,variant:_="standard"}=e,x=(0,o.A)(e,u),w=(0,s.Z)(),[A,S]=i.useState(null!=(t=d.value)?t:""),[C,E]=i.useState(!1),T=(0,a.A)(),I=(0,l.A)(),k=i.useCallback(e=>{const{value:t}=e.target;S(String(t)),E(!0),w.start(I.filterDebounceMs,()=>{const e=(0,n.A)({},d,{value:t,fromInput:T});f(e),E(!1)})},[T,f,d,I.filterDebounceMs,w]);return i.useEffect(()=>{var e;d.fromInput===T&&void 0!==d.value||S(String(null!=(e=d.value)?e:""))},[T,d]),(0,c.jsx)(I.slots.baseTextField,(0,n.A)({id:T,label:h.current.getLocaleText("filterPanelInputLabel"),placeholder:h.current.getLocaleText("filterPanelInputPlaceholder"),value:A,onChange:k,variant:_,type:p||"text",InputProps:(0,n.A)({},C||v?{endAdornment:C?(0,c.jsx)(I.slots.loadIcon,{fontSize:"small",color:"action"}):v}:{},{disabled:y},b,{inputProps:(0,n.A)({tabIndex:g},null==b?void 0:b.inputProps)}),InputLabelProps:{shrink:!0},inputRef:m},x,null==(r=I.slotProps)?void 0:r.baseTextField))}},"QnE+"(e,t,r){"use strict";function n(e){return"singleSelect"===(null==e?void 0:e.type)}function o(e,t,r){if(void 0===t)return;const n=t.find(t=>{const n=r(t);return String(n)===String(e)});return r(n)}r.d(t,{Rc:()=>o,_W:()=>n})},"7Cdf"(e,t,r){"use strict";r.d(t,{B:()=>o,x:()=>i});var n=r("TkYO");function o(e){return(0,n.Ay)("MuiDataGrid",e)}const i=(0,r("PYeY").A)("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--selectionMode","cell","cellContent","cellCheckbox","cellSkeleton","checkboxInput","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderDropZone","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnGroupHeader","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeader--showColumnBorder","columnHeaders","columnHeadersInner","columnHeadersInner--scrollable","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsPanel","columnsPanelRow","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","row","row--editable","row--editing","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","scrollArea--left","scrollArea--right","scrollArea","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","pinnedColumns--left","pinnedColumns--right","pinnedColumnHeaders","pinnedColumnHeaders--left","pinnedColumnHeaders--right","withBorderColor","cell--withRightBorder","columnHeader--withRightBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"])},"3qeK"(e,t,r){"use strict";r.d(t,{y:()=>n});const n=r("q1tI").createContext(void 0)},ebfa(e,t,r){"use strict";r.d(t,{FY:()=>l,JR:()=>i,OV:()=>s,Oe:()=>p,Sw:()=>d,TI:()=>u,U8:()=>h,em:()=>o,fc:()=>f,gv:()=>a,iv:()=>c});var n=r("GPgX");const o=e=>e.columns,i=(0,n.Mz)(o,e=>e.orderedFields),a=(0,n.Mz)(o,e=>e.lookup),s=(0,n.S)(i,a,(e,t)=>e.map(e=>t[e])),l=(0,n.Mz)(o,e=>e.columnVisibilityModel),c=(0,n.S)(s,l,(e,t)=>e.filter(e=>!1!==t[e.field])),u=(0,n.S)(c,e=>e.map(e=>e.field)),d=(0,n.S)(c,e=>{const t=[];let r=0;for(let n=0;n{const r=e.length;return 0===r?0:t[r-1]+e[r-1].computedWidth}),p=(0,n.S)(s,e=>e.filter(e=>e.filterable)),h=(0,n.S)(s,e=>e.reduce((e,t)=>(t.filterable&&(e[t.field]=t),e),{}))},gYIS(e,t,r){"use strict";r.d(t,{BC:()=>i,_v:()=>o,rf:()=>a});var n=r("GPgX");const o=e=>e.density,i=(0,n.Mz)(o,e=>e.value),a=(0,n.Mz)(o,e=>e.factor)},m0sr(e,t,r){"use strict";r.d(t,{O7:()=>g,RN:()=>y,ZI:()=>l,ZP:()=>u,em:()=>d,od:()=>b,qA:()=>h,tW:()=>m,ux:()=>f,wx:()=>c});var n=r("GPgX"),o=r("ZmDP"),i=r("ebfa"),a=r("VV28");const s=e=>e.filter,l=(0,n.Mz)(s,e=>e.filterModel),c=((0,n.Mz)(l,e=>e.quickFilterValues),(0,n.Mz)(s,e=>e.filteredRowsLookup)),u=(0,n.Mz)(s,e=>e.filteredDescendantCountLookup),d=(0,n.S)(e=>e.visibleRowsLookup,o.J6,(e,t)=>t.filter(t=>!1!==e[t.id])),f=(0,n.S)(d,e=>e.map(e=>e.id)),p=(0,n.S)(c,o.J6,(e,t)=>t.filter(t=>!1!==e[t.id])),h=(0,n.S)(p,e=>e.map(e=>e.id)),m=(0,n.S)(d,a.qj,a.V2,(e,t,r)=>r<2?e:e.filter(e=>{var r;return 0===(null==(r=t[e.id])?void 0:r.depth)})),g=(0,n.Mz)(d,e=>e.length),y=(0,n.Mz)(m,e=>e.length),v=(0,n.S)(l,i.gv,(e,t)=>{var r;return null==(r=e.items)?void 0:r.filter(e=>{var r,n;if(!e.field)return!1;const o=t[e.field];if(null==o||!o.filterOperators||0===(null==o||null==(r=o.filterOperators)?void 0:r.length))return!1;const i=o.filterOperators.find(t=>t.value===e.operator);return!!i&&(!i.InputComponent||null!=e.value&&""!==(null==(n=e.value)?void 0:n.toString()))})}),b=(0,n.S)(v,e=>e.reduce((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e),{}))},"/8PD"(e,t,r){"use strict";r.d(t,{T:()=>o});var n=r("ptGW");const o=()=>({items:[],logicOperator:n.V.And,quickFilterValues:[],quickFilterLogicOperator:n.V.And})},io7V(e,t,r){"use strict";r.d(t,{Fv:()=>_,zk:()=>d,zU:()=>g,Ko:()=>w,WL:()=>y,L5:()=>m});var n=r("+9dH"),o=r("ptGW"),i=r("xLAl"),a=r("/8PD"),s=r("gkz3");function l(e){return{current:e.current.getPublicApi()}}var c=r("ebfa");let u;const d=(e,t)=>{const r=(0,n.A)({},e);if(null==r.id&&(r.id=Math.round(1e5*Math.random())),null==r.operator){const e=(0,c.gv)(t)[r.field];r.operator=e&&e.filterOperators[0].value}return r},f=(0,s.f)(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),p=(0,s.f)("MUI: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),h=(0,s.f)("MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),m=(e,t,r)=>{const o=e.items.length>1;let i;o&&t?(f(),i=[e.items[0]]):i=e.items;const a=o&&i.some(e=>null==e.id),s=i.some(e=>null==e.operator);return a&&p(),s&&h(),s||a?(0,n.A)({},e,{items:i.map(e=>d(e,r))}):e.items!==i?(0,n.A)({},e,{items:i}):e},g=(e,t,r)=>o=>(0,n.A)({},o,{filterModel:m(e,t,r)}),y=e=>"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,v=(e,t)=>{if(!e.field||!e.operator)return null;const r=t.current.getColumn(e.field);if(!r)return null;let o;if(r.valueParser){var a;const t=r.valueParser;o=Array.isArray(e.value)?null==(a=e.value)?void 0:a.map(e=>t(e)):t(e.value)}else o=e.value;const{ignoreDiacritics:s}=t.current.rootProps;s&&(o=y(o));const c=(0,n.A)({},e,{value:o}),u=r.filterOperators;if(null==u||!u.length)throw new Error(`MUI: No filter operators found for column '${r.field}'.`);const d=u.find(e=>e.value===c.operator);if(!d)throw new Error(`MUI: No filter operator found for column '${r.field}' and operator value '${c.operator}'.`);const f=!(0,i.E0)(d.getApplyFilterFn),p=!(0,i.E0)(d.getApplyFilterFnV7),h=l(t);if(d.getApplyFilterFnV7&&(!f||p)){const e=d.getApplyFilterFnV7(c,r);return"function"!=typeof e?null:{v7:!0,item:c,fn:n=>{let o=t.current.getRowValue(n,r);return s&&(o=y(o)),e(o,n,r,h)}}}const m=d.getApplyFilterFn(c,r);return"function"!=typeof m?null:{v7:!1,item:c,fn:e=>{const r=t.current.getCellParams(e,c.field);i.Dc.current=h,s&&(r.value=y(r.value));const n=m(r);return i.Dc.current=null,n}}};let b=1;const _=(e,t,r)=>{const n=((e,t,r)=>{const{items:n}=e,o=n.map(e=>v(e,t)).filter(e=>!!e);if(0===o.length)return null;if(r||!function(){if(void 0!==u)return u;try{u=new Function("return true")()}catch(e){u=!1}return u}())return(e,r)=>{const n={};for(let i=0;i`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`).join("\n")}\n\nconst result$$ = {\n${o.map((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t}\n ? false\n : ${e.v7?`appliers[${t}].fn(row)`:`appliers[${t}].fn(getRowId(row))`},`).join("\n")}\n};\n\nreturn result$$;`.replaceAll("$$",String(b)));return b+=1,(e,r)=>i(t.current.getRowId,o,e,r)})(e,t,r),o=((e,t)=>{var r,n,o;const a=null!=(r=null==(n=e.quickFilterValues)?void 0:n.filter(Boolean))?r:[];if(0===a.length)return null;const s=null!=(o=e.quickFilterExcludeHiddenColumns)&&o?(0,c.TI)(t):(0,c.JR)(t),u=[],{ignoreDiacritics:d}=t.current.rootProps,f=l(t);return s.forEach(e=>{const r=t.current.getColumn(e),n=null==r?void 0:r.getApplyQuickFilterFn,o=null==r?void 0:r.getApplyQuickFilterFnV7,s=!(0,i.E0)(n),l=!(0,i.E0)(o);!o||s&&!l?n&&u.push({column:r,appliers:a.map(e=>{const t=d?y(e):e;return{v7:!1,fn:n(t,r,f)}})}):u.push({column:r,appliers:a.map(e=>{const t=d?y(e):e;return{v7:!0,fn:o(t,r,f)}})})}),function(e,r){const n={},o={};e:for(let s=0;snull!=e,w=(e,t,r,n,i)=>{const s=((e,t,r)=>(e.cleanedFilterItems||(e.cleanedFilterItems=r.filter(e=>null!==v(e,t))),e.cleanedFilterItems))(i,n,r.items),l=e.filter(x),c=t.filter(x);if(l.length>0){var u;const e=e=>l.some(t=>t[e.id]);if((null!=(u=r.logicOperator)?u:(0,a.T)().logicOperator)===o.V.And){if(!s.every(e))return!1}else if(!s.some(e))return!1}if(c.length>0&&null!=r.quickFilterValues){var d;const e=e=>c.some(t=>t[e]);if((null!=(d=r.quickFilterLogicOperator)?d:(0,a.T)().quickFilterLogicOperator)===o.V.And){if(!r.quickFilterValues.every(e))return!1}else if(!r.quickFilterValues.some(e))return!1}return!0}},pwQ8(e,t,r){"use strict";r.d(t,{H5:()=>u,Kr:()=>d,MO:()=>i,gn:()=>p,h3:()=>f,it:()=>s,rj:()=>a,xv:()=>l});var n=r("GPgX");const o=e=>e.focus,i=(0,n.Mz)(o,e=>e.cell),a=(0,n.Mz)(o,e=>e.columnHeader),s=(0,n.Mz)(o,e=>e.columnHeaderFilter),l=(0,n.Mz)(o,e=>e.columnGroupHeader),c=e=>e.tabIndex,u=(0,n.Mz)(c,e=>e.cell),d=(0,n.Mz)(c,e=>e.columnHeader),f=(0,n.Mz)(c,e=>e.columnHeaderFilter),p=(0,n.Mz)(c,e=>e.columnGroupHeader)},"72m/"(e,t,r){"use strict";r.d(t,{$i:()=>u,H2:()=>c,M5:()=>s,O:()=>f,Q8:()=>h,ee:()=>m,ij:()=>d,lN:()=>l,vd:()=>p});var n=r("GPgX"),o=r("m0sr"),i=r("VV28"),a=r("sGrR");const s=e=>e.pagination,l=(0,n.Mz)(s,e=>e.paginationModel),c=(0,n.Mz)(s,e=>e.rowCount),u=(0,n.Mz)(l,e=>e.page),d=(0,n.Mz)(l,e=>e.pageSize),f=(0,n.Mz)(d,c,(e,t)=>(0,a.$_)(t,e)),p=(0,n.S)(l,i.qj,i.V2,o.em,o.tW,(e,t,r,n,o)=>{const i=o.length,a=Math.min(e.pageSize*e.page,i-1),s=Math.min(a+e.pageSize-1,i-1);if(-1===a||-1===s)return null;if(r<2)return{firstRowIndex:a,lastRowIndex:s};const l=o[a],c=s-a+1,u=n.findIndex(e=>e.id===l.id);let d=u,f=0;for(;d0)&&(d+=1),0===e&&(f+=1))}return{firstRowIndex:u,lastRowIndex:d-1}}),h=(0,n.S)(o.em,p,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),m=(0,n.S)(o.ux,p,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])},sGrR(e,t,r){"use strict";r.d(t,{$_:()=>a,N0:()=>s,RW:()=>c,eW:()=>i,m6:()=>l});var n=r("gkz3"),o=r("DQ/6");const i=e=>e?0:100,a=(e,t)=>t>0&&e>0?Math.ceil(e/t):0,s=((0,n.f)(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error"),e=>({page:0,pageSize:e?0:100})),l=(e,t=0)=>0===t?e:Math.max(Math.min(e,t-1),0),c=(e,t)=>{if(t===o.HV.DataGrid&&e>100)throw new Error(["MUI: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"))}},"P+14"(e,t,r){"use strict";r.d(t,{Bi:()=>i,Zk:()=>l,gt:()=>s,vF:()=>a});var n=r("GPgX"),o=r("VV28");const i=e=>e.rowSelection,a=(0,n.Mz)(i,e=>e.length),s=(0,n.S)(i,o.rI,(e,t)=>new Map(e.map(e=>[e,t[e]]))),l=(0,n.S)(i,e=>e.reduce((e,t)=>(e[t]=t,e),{}))},VV28(e,t,r){"use strict";r.d(t,{$2:()=>g,A6:()=>h,Dl:()=>a,H0:()=>i,Mz:()=>f,O8:()=>s,OQ:()=>y,V2:()=>p,Y1:()=>d,gk:()=>c,qj:()=>u,rI:()=>l});var n=r("GPgX");const o=e=>e.rows,i=(0,n.Mz)(o,e=>e.totalRowCount),a=(0,n.Mz)(o,e=>e.loading),s=(0,n.Mz)(o,e=>e.totalTopLevelRowCount),l=(0,n.Mz)(o,e=>e.dataRowIdToModelLookup),c=(0,n.Mz)(o,e=>e.dataRowIdToIdLookup),u=(0,n.Mz)(o,e=>e.tree),d=(0,n.Mz)(o,e=>e.groupingName),f=(0,n.Mz)(o,e=>e.treeDepths),p=(0,n.S)(o,e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:t.filter(([,e])=>e>0).map(([e])=>Number(e)).sort((e,t)=>t-e)[0]+1}),h=(0,n.Mz)(o,e=>e.dataRowIds),m=(0,n.Mz)(o,e=>null==e?void 0:e.additionalRowGroups),g=(0,n.S)(m,e=>{var t,r;const n=null==e?void 0:e.pinnedRows;return{bottom:null==n||null==(t=n.bottom)?void 0:t.map(e=>{var t;return{id:e.id,model:null!=(t=e.model)?t:{}}}),top:null==n||null==(r=n.top)?void 0:r.map(e=>{var t;return{id:e.id,model:null!=(t=e.model)?t:{}}})}}),y=(0,n.Mz)(g,e=>{var t,r;return((null==e||null==(t=e.top)?void 0:t.length)||0)+((null==e||null==(r=e.bottom)?void 0:r.length)||0)})},S6m6(e,t,r){"use strict";r.d(t,{DJ:()=>p,HZ:()=>c,Mk:()=>l,OL:()=>a,OM:()=>y,TW:()=>f,Z:()=>u,Ze:()=>m,fS:()=>d,gb:()=>s,l_:()=>h,zo:()=>g});var n=r("+9dH"),o=r("VV28"),i=r("gYIS");const a="auto-generated-group-node-root",s=Symbol("mui.id_autogenerated"),l=()=>({type:"group",id:a,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null}),c=(e,t,r)=>{const n=t?t(e):e.id;return function(e,t,r="A row was provided without id in the rows prop:"){if(null==e)throw new Error(["MUI: The data grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",r,JSON.stringify(t)].join("\n"))}(n,e,r),n},u=({rows:e,getRowId:t,loading:r,rowCount:n})=>{const o={type:"full",rows:[]},i={},a={};for(let r=0;r{const r=e[a];return Math.max(t,r.children.length+(null==r.footerId?0:1))},f=({apiRef:e,rowCountProp:t=0,loadingProp:r,previousTree:o,previousTreeDepths:i})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:o,previousTreeDepths:i,updates:a.updates,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIdToModelLookup:a.dataRowIdToModelLookup}),f=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIds:c,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,n.A)({},f,{totalRowCount:Math.max(t,f.dataRowIds.length),totalTopLevelRowCount:d({tree:f.tree,rowCountProp:t}),groupingName:u,loading:r})},p=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,h=(e,t,r)=>{const n=e[t];if("group"!==n.type)return[];const o=[];for(let t=0;t{var o,i,a;if("full"===e.updates.type)throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");const s=new Map;r.forEach(e=>{const r=c(e,t,"A row was provided without id when calling updateRows():");s.has(r)?s.set(r,(0,n.A)({},s.get(r),e)):s.set(r,e)});const l={type:"partial",actions:{insert:[...null!=(o=e.updates.actions.insert)?o:[]],modify:[...null!=(i=e.updates.actions.modify)?i:[]],remove:[...null!=(a=e.updates.actions.remove)?a:[]]},idToActionLookup:(0,n.A)({},e.updates.idToActionLookup)},u=(0,n.A)({},e.dataRowIdToModelLookup),d=(0,n.A)({},e.dataRowIdToIdLookup),f={insert:{},modify:{},remove:{}};s.forEach((e,t)=>{const r=l.idToActionLookup[t];if("delete"===e._action){if("remove"===r||!u[t])return;return null!=r&&(f[r][t]=!0),l.actions.remove.push(t),delete u[t],void delete d[t]}const o=u[t];if(o)return"remove"===r?(f.remove[t]=!0,l.actions.modify.push(t)):null==r&&l.actions.modify.push(t),void(u[t]=(0,n.A)({},o,e));"remove"===r?(f.remove[t]=!0,l.actions.insert.push(t)):null==r&&l.actions.insert.push(t),u[t]=e,d[t]=t});const p=Object.keys(f);for(let e=0;e0&&(l.actions[t]=l.actions[t].filter(e=>!r[e]))}return{dataRowIdToModelLookup:u,dataRowIdToIdLookup:d,updates:l,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function g(e){var t,r;const n=(0,o.$2)(e);return{top:(null==n||null==(t=n.top)?void 0:t.reduce((t,r)=>t+e.current.unstable_getRowHeight(r.id),0))||0,bottom:(null==n||null==(r=n.bottom)?void 0:r.reduce((t,r)=>t+e.current.unstable_getRowHeight(r.id),0))||0}}function y(e,t){const r=(0,i.rf)(e);return`var(--DataGrid-overlayHeight, ${2*Math.floor(t*r)}px)`}},ZmDP(e,t,r){"use strict";r.d(t,{J6:()=>s,RJ:()=>a,XU:()=>l,oF:()=>c});var n=r("GPgX"),o=r("VV28");const i=e=>e.sorting,a=(0,n.Mz)(i,e=>e.sortedRows),s=(0,n.S)(a,o.rI,(e,t)=>e.map(e=>{var r;return{id:e,model:null!=(r=t[e])?r:{}}})),l=(0,n.Mz)(i,e=>e.sortModel),c=(0,n.S)(l,e=>e.reduce((t,r,n)=>(t[r.field]={sortDirection:r.sort,sortIndex:e.length>1?n+1:void 0},t),{}))},ULoK(e,t,r){"use strict";r.d(t,{Az:()=>d,Hm:()=>l,Lj:()=>s,Ou:()=>f,VE:()=>p,Zx:()=>i,ps:()=>a});var n=r("+9dH");const o=(0,r("gkz3").f)(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),i=(e,t)=>t&&e.length>1?(o(),[e[0]]):e,a=(e,t)=>r=>(0,n.A)({},r,{sorting:(0,n.A)({},r.sorting,{sortModel:i(e,t)})}),s=(e,t)=>{const r=e.map(e=>((e,t)=>{const r=t.current.getColumn(e.field);return r?{getSortCellParams:e=>({id:e,field:r.field,rowNode:t.current.getRowNode(e),value:t.current.getCellValue(e,r.field),api:t.current}),comparator:"desc"===e.sort?(...e)=>-1*r.sortComparator(...e):r.sortComparator}:null})(e,t)).filter(e=>!!e);return 0===r.length?null:e=>e.map(e=>({node:e,params:r.map(t=>t.getSortCellParams(e.id))})).sort((e,t)=>{return n=e,o=t,r.reduce((e,t,r)=>{if(0!==e)return e;const i=n.params[r],a=o.params[r];return t.comparator(i.value,a.value,i,a)},0);var n,o}).map(e=>e.node.id)},l=(e,t)=>{const r=e.indexOf(t);return t&&-1!==r&&r+1!==e.length?e[r+1]:e[0]},c=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,u=new Intl.Collator,d=(e,t)=>{const r=c(e,t);return null!==r?r:"string"==typeof e?u.compare(e.toString(),t.toString()):e-t},f=(e,t)=>{const r=c(e,t);return null!==r?r:Number(e)-Number(t)},p=(e,t)=>{const r=c(e,t);return null!==r?r:e>t?1:ei});var n=r("q1tI"),o=r("yAU5");function i(){const e=n.useContext(o.k);if(void 0===e)throw new Error(["MUI: Could not find the data grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join("\n"));return e}},"DQ/6"(e,t,r){"use strict";r.d(t,{HV:()=>a,cz:()=>l,re:()=>u});var n=r("q1tI");class o{constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,r){this.timeouts||(this.timeouts=new Map);const n=setTimeout(()=>{"function"==typeof t&&t(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,n)}unregister(e){const t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}reset(){this.timeouts&&(this.timeouts.forEach((e,t)=>{this.unregister({cleanupToken:t})}),this.timeouts=void 0)}}class i{constructor(){this.registry=new FinalizationRegistry(e=>{"function"==typeof e&&e()})}register(e,t,r){this.registry.register(e,t,r)}unregister(e){this.registry.unregister(e)}reset(){}}var a=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e}(a||{});class s{}const l=function(e){let t=0;return function(r,a,l,c){null===e.registry&&(e.registry="undefined"!=typeof FinalizationRegistry?new i:new o);const[u]=n.useState(new s),d=n.useRef(null),f=n.useRef();f.current=l;const p=n.useRef(null);if(!d.current&&f.current){const n=(e,t,r)=>{var n;t.defaultMuiPrevented||null==(n=f.current)||n.call(f,e,t,r)};d.current=r.current.subscribeEvent(a,n,c),t+=1,p.current={cleanupToken:t},e.registry.register(u,()=>{var e;null==(e=d.current)||e.call(d),d.current=null,p.current=null},p.current)}else!f.current&&d.current&&(d.current(),d.current=null,p.current&&(e.registry.unregister(p.current),p.current=null));n.useEffect(()=>{if(!d.current&&f.current){const e=(e,t,r)=>{var n;t.defaultMuiPrevented||null==(n=f.current)||n.call(f,e,t,r)};d.current=r.current.subscribeEvent(a,e,c)}return p.current&&e.registry&&(e.registry.unregister(p.current),p.current=null),()=>{var e;null==(e=d.current)||e.call(d),d.current=null}},[r,a,c])}}({registry:null}),c={isFirst:!0};function u(e,t,r){l(e,t,r,c)}},FltU(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("3qeK");const i=()=>{const e=n.useContext(o.y);if(!e)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e}},hmGc(e,t,r){"use strict";r.d(t,{N:()=>f,T:()=>u});var n=r("q1tI"),o=r("v+Lp"),i=r("sy2/"),a=r("gkz3"),s=r("TL/R");function l(e,t){return function(e){return e.acceptsApiRef}(t)?t(e):t(e.current.state)}(0,a.f)(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);const c=Object.is,u=s.v,d=()=>({state:null,equals:null,selector:null}),f=(e,t,r=c)=>{const a=(0,o.n)(d),s=null!==a.current.selector,[u,f]=n.useState(s?null:l(e,t));return a.current.state=u,a.current.equals=r,a.current.selector=t,(0,i.y)(()=>e.current.store.subscribe(()=>{const t=l(e,a.current.selector);a.current.equals(a.current.state,t)||(a.current.state=t,f(t))})),u}},"v+Lp"(e,t,r){"use strict";r.d(t,{n:()=>i});var n=r("q1tI");const o={};function i(e,t){const r=n.useRef(o);return r.current===o&&(r.current=e(t)),r}},"sy2/"(e,t,r){"use strict";r.d(t,{y:()=>i});var n=r("q1tI");const o=[];function i(e){n.useEffect(e,o)}},Br4D(e,t,r){"use strict";r.d(t,{Z:()=>a});var n=r("v+Lp"),o=r("sy2/");class i{constructor(){this.currentId=0,this.clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new i}start(e,t){this.clear(),this.currentId=setTimeout(t,e)}}function a(){const e=(0,n.n)(i.create).current;return(0,o.y)(e.disposeEffect),e}},ptGW(e,t,r){"use strict";r.d(t,{V:()=>n});var n=function(e){return e.And="and",e.Or="or",e}(n||{})},GPgX(e,t,r){"use strict";function n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;nc,S:()=>u});var o=n(r("EsgF").UI),i=r("gkz3");const a={cache:new WeakMap};function s(e){return"current"in e&&"instanceId"in e.current}(0,i.f)(["MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.","To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`."]);const l={id:"default"},c=(e,t,r,n,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&r&&n&&o&&i)c=(a,c)=>{const u=s(a),d=null!=c?c:u?a.current.instanceId:l,f=u?a.current.state:a,p=e(f,d),h=t(f,d),m=r(f,d),g=n(f,d),y=o(f,d);return i(p,h,m,g,y)};else if(e&&t&&r&&n&&o)c=(i,a)=>{const c=s(i),u=null!=a?a:c?i.current.instanceId:l,d=c?i.current.state:i,f=e(d,u),p=t(d,u),h=r(d,u),m=n(d,u);return o(f,p,h,m)};else if(e&&t&&r&&n)c=(o,i)=>{const a=s(o),c=null!=i?i:a?o.current.instanceId:l,u=a?o.current.state:o,d=e(u,c),f=t(u,c),p=r(u,c);return n(d,f,p)};else if(e&&t&&r)c=(n,o)=>{const i=s(n),a=null!=o?o:i?n.current.instanceId:l,c=i?n.current.state:n,u=e(c,a),d=t(c,a);return r(u,d)};else{if(!e||!t)throw new Error("Missing arguments");c=(r,n)=>{const o=s(r),i=null!=n?n:o?r.current.instanceId:l,a=o?r.current.state:r,c=e(a,i);return t(c)}}return c.acceptsApiRef=!0,c},u=(...e)=>{const t=(...t)=>{var r,n;const[i,c]=t,u=s(i),d=u?i.current.instanceId:null!=c?c:l,f=u?i.current.state:i,{cache:p}=a;var h;if(p.get(d)&&null!=(r=p.get(d))&&r.get(e))return null==(h=p.get(d))?void 0:h.get(e)(f,d);const m=o(...e);return p.get(d)||p.set(d,new Map),null==(n=p.get(d))||n.set(e,m),m(f,d)};return t.acceptsApiRef=!0,t}},"TL/R"(e,t,r){"use strict";r.d(t,{v:()=>o});const n=Object.is;function o(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let r=0,o=0;for(const o in e){if(r+=1,!n(e[o],t[o]))return!1;if(!(o in t))return!1}for(const e in t)o+=1;return r===o}},gBcZ(e,t,r){"use strict";r.d(t,{C8:()=>a,Ci:()=>o,HF:()=>u,TW:()=>s,kx:()=>c,nx:()=>n,q9:()=>l,vY:()=>i});const n=e=>"Escape"===e,o=e=>"Enter"===e,i=e=>"Tab"===e,a=e=>" "===e;function s(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}const l=e=>(e=>"Home"===e||"End"===e)(e)||(e=>0===e.indexOf("Arrow"))(e)||(e=>0===e.indexOf("Page"))(e)||a(e),c=e=>!!e.key,u=e=>i(e)||n(e)},XVIy(e,t,r){"use strict";function n(e){return"number"==typeof e&&!Number.isNaN(e)}function o(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}function s(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r.d(t,{Et:()=>n,Go:()=>d,Gv:()=>i,Hv:()=>c,Nt:()=>s,Tn:()=>o,nX:()=>u,qE:()=>l,s3:()=>a});const l=(e,t,r)=>Math.max(t,Math.min(r,e));function c(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const r=e.length;if(r!==t.length)return!1;for(let n=0;n{let e=o+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296});var o;return()=>t+(r-t)*n()}function d(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}},gkz3(e,t,r){"use strict";r.d(t,{f:()=>n});const n=(e,t="warning")=>{let r=!1;const n=Array.isArray(e)?e.join("\n"):e;return()=>{r||(r=!0,"error"===t?console.error(n):console.warn(n))}}},"Q/dV"(e,t,r){"use strict";r.d(t,{R:()=>_});var n=r("+9dH"),o=r("Wgwc"),i=r.n(o),a=r("KgQy"),s=r.n(a),l=r("+QaA"),c=r.n(l),u=r("I631"),d=r.n(u),f=r("5Bip"),p=r.n(f),h=r("cXGl");i().extend(c()),i().extend(d()),i().extend(p());const m=(0,h.f)(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),g={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},y={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},v=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n"),b=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");class _{constructor({locale:e,formats:t,instance:r}={}){var o,a,l;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=g,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasUTCPlugin=()=>void 0!==i().utc,this.hasTimezonePlugin=()=>void 0!==i().tz,this.isSame=(e,t,r)=>{const n=this.setTimezone(t,this.getTimezone(e));return e.format(r)===n.format(r)},this.cleanTimezone=e=>{switch(e){case"default":return;case"system":return i().tz.guess();default:return e}},this.createSystemDate=e=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(e);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const t=i().tz.guess();return"UTC"!==t?i().tz(e,t):i()(e)}return i()(e)},this.createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(v);return i().utc(e)},this.createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(v);if(!this.hasTimezonePlugin())throw new Error(b);const r=void 0!==e&&!e.endsWith("Z");return i()(e).tz(this.cleanTimezone(t),r)},this.getLocaleFormats=()=>{const e=i().Ls;let t=e[this.locale||"en"];return void 0===t&&(m(),t=e.en),t.formats},this.adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if("UTC"!==t){var r,n;const o=e.tz(this.cleanTimezone(t),!0);if((null!=(r=o.$offset)?r:0)===(null!=(n=e.$offset)?n:0))return e;e.$offset=o.$offset}return e},this.date=e=>null===e?null:this.dayjs(e),this.dateWithTimezone=(e,t)=>{if(null===e)return null;let r;return r="UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),void 0===this.locale?r:r.locale(this.locale)},this.getTimezone=e=>{if(this.hasTimezonePlugin()){var t;const r=null==(t=e.$x)?void 0:t.$timezone;if(r)return r}return this.hasUTCPlugin()&&e.isUTC()?"UTC":"system"},this.setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if("UTC"===t){if(!this.hasUTCPlugin())throw new Error(v);return e.utc()}if("system"===t)return e.local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(b)}return i().tz(e,this.cleanTimezone(t))},this.toJsDate=e=>e.toDate(),this.parseISO=e=>this.dayjs(e),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.dayjs(e,t,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=e=>{const t=this.getLocaleFormats();return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(e,r,n)=>{const o=n&&n.toUpperCase();return r||t[n]||t[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(e,t,r)=>t||r.slice(1))})},this.getFormatHelperText=e=>this.expandFormat(e).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=e=>null===e,this.isValid=e=>this.dayjs(e).isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>this.dayjs(e).format(t),this.formatNumber=e=>e,this.getDiff=(e,t,r)=>e.diff(t,r),this.isEqual=(e,t)=>null===e&&null===t||this.dayjs(e).toDate().getTime()===this.dayjs(t).toDate().getTime(),this.isSameYear=(e,t)=>this.isSame(e,t,"YYYY"),this.isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM"),this.isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e>t,this.isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year"),this.isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day"),this.isBefore=(e,t)=>ethis.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()e>=t&&e<=r,this.startOfYear=e=>this.adjustOffset(e.startOf("year")),this.startOfMonth=e=>this.adjustOffset(e.startOf("month")),this.startOfWeek=e=>this.adjustOffset(e.startOf("week")),this.startOfDay=e=>this.adjustOffset(e.startOf("day")),this.endOfYear=e=>this.adjustOffset(e.endOf("year")),this.endOfMonth=e=>this.adjustOffset(e.endOf("month")),this.endOfWeek=e=>this.adjustOffset(e.endOf("week")),this.endOfDay=e=>this.adjustOffset(e.endOf("day")),this.addYears=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"year"):e.add(t,"year")),this.addMonths=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")),this.addWeeks=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")),this.addDays=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")),this.addHours=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")),this.addMinutes=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")),this.addSeconds=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")),this.getYear=e=>e.year(),this.getMonth=e=>e.month(),this.getDate=e=>e.date(),this.getHours=e=>e.hour(),this.getMinutes=e=>e.minute(),this.getSeconds=e=>e.second(),this.getMilliseconds=e=>e.millisecond(),this.setYear=(e,t)=>this.adjustOffset(e.set("year",t)),this.setMonth=(e,t)=>this.adjustOffset(e.set("month",t)),this.setDate=(e,t)=>this.adjustOffset(e.set("date",t)),this.setHours=(e,t)=>this.adjustOffset(e.set("hour",t)),this.setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t)),this.setSeconds=(e,t)=>this.adjustOffset(e.set("second",t)),this.setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t)),this.getDaysInMonth=e=>e.daysInMonth(),this.getNextMonth=e=>this.addMonths(e,1),this.getPreviousMonth=e=>this.addMonths(e,-1),this.getMonthArray=e=>{const t=[e.startOf("year")];for(;t.length<12;){const e=t[t.length-1];t.push(this.addMonths(e,1))}return t},this.mergeDateAndTime=(e,t)=>e.hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>{const e=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map(t=>this.formatByString(this.addDays(e,t),"dd"))},this.getWeekArray=e=>{const t=this.setLocaleToValue(e),r=t.startOf("month").startOf("week"),n=t.endOf("month").endOf("week");let o=0,i=r;const a=[];for(;ie.week(),this.getYearRange=(e,t)=>{const r=e.startOf("year"),n=t.endOf("year"),o=[];let i=r;for(;i"am"===e?"AM":"PM",this.rawDayJsInstance=r,this.dayjs=(a=null!=(o=this.rawDayJsInstance)?o:i(),(l=e)?(...e)=>a(...e).locale(l):a),this.locale=e,this.formats=(0,n.A)({},y,t),i().extend(s())}}},f8Ww(e,t,r){"use strict";r.d(t,{T:()=>gn});var n=r("+9dH"),o=r("q1tI"),i=r("17x9"),a=r.n(i),s=r("dd9Q");const l=a().oneOfType([a().func,a().object]);var c=r("Nlia");const u=(e,t)=>e.length===t.length&&t.every(t=>e.includes(t)),d=(e,t,r)=>{let n=t;return n=e.setHours(n,e.getHours(r)),n=e.setMinutes(n,e.getMinutes(r)),n=e.setSeconds(n,e.getSeconds(r)),n},f=({date:e,disableFuture:t,disablePast:r,maxDate:n,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=d(a,a.dateWithTimezone(void 0,s),e);r&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(n,l)&&(n=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,n)&&(u&&(u=n),c=null);c||u;){if(c&&a.isAfter(c,n)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},p=(e,t,r)=>null!=t&&e.isValid(t)?t:r,h=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const t=r[r.length-1];r.push(e.addMonths(t,1))}return r},m=(e,t,r)=>"date"===r?e.startOfDay(e.dateWithTimezone(void 0,t)):e.dateWithTimezone(void 0,t),g=["year","month","day"],y=e=>g.includes(e),v=(e,{format:t,views:r},n)=>{if(null!=t)return t;const o=e.formats;return u(r,["year"])?o.year:u(r,["month"])?o.month:u(r,["day"])?o.dayOfMonth:u(r,["month","year"])?`${o.month} ${o.year}`:u(r,["day","month"])?`${o.month} ${o.dayOfMonth}`:n?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},b=(e,t)=>{const r=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(r,t))},_=["hours","minutes","seconds"],x=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),w={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},A=(e,t,r)=>{if(t===w.year)return e.startOfYear(r);if(t===w.month)return e.startOfMonth(r);if(t===w.day)return e.startOfDay(r);let n=r;return t{const r=e.formatTokenMap[t];if(null==r)throw new Error([`MUI: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"==typeof r?{type:r,contentType:"meridiem"===r?"letter":"digit",maxLength:void 0}:{type:r.sectionType,contentType:r.contentType,maxLength:r.maxLength}},C=(e,t,r)=>{const n=[],o=e.dateWithTimezone(void 0,t),i=e.startOfWeek(o),a=e.endOfWeek(o);let s=i;for(;e.isBefore(s,a);)n.push(s),s=e.addDays(s,1);return n.map(t=>e.formatByString(t,r))},E=(e,t,r,n)=>{switch(r){case"month":return h(e,e.dateWithTimezone(void 0,t)).map(t=>e.formatByString(t,n));case"weekDay":return C(e,t,n);case"meridiem":{const r=e.dateWithTimezone(void 0,t);return[e.startOfDay(r),e.endOfDay(r)].map(t=>e.formatByString(t,n))}default:return[]}},T=(e,t,r)=>{let n=t;for(n=Number(n).toString();n.length{if("day"===o.type&&"digit-with-letter"===o.contentType){const t=e.setDate(n.longestMonth,r);return e.formatByString(t,o.format)}const i=r.toString();return o.hasLeadingZerosInInput?T(0,i,o.maxLength):i},k=(e,t)=>{let r=e.value||e.placeholder;const n="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(r).toString()),["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!n&&1===r.length&&(r=`${r}‎`),"input-rtl"===t&&(r=`⁨${r}⁩`),r},M=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),R=(e,t)=>{let r=0,o=t?1:0;const i=[];for(let a=0;a{switch(n.type){case"year":return r.fieldYearPlaceholder({digitAmount:e.formatByString(e.dateWithTimezone(void 0,t),o).length,format:o});case"month":return r.fieldMonthPlaceholder({contentType:n.contentType,format:o});case"day":return r.fieldDayPlaceholder({format:o});case"weekDay":return r.fieldWeekDayPlaceholder({contentType:n.contentType,format:o});case"hours":return r.fieldHoursPlaceholder({format:o});case"minutes":return r.fieldMinutesPlaceholder({format:o});case"seconds":return r.fieldSecondsPlaceholder({format:o});case"meridiem":return r.fieldMeridiemPlaceholder({format:o});default:return o}},O=(e,t,r,n)=>e.formatByString(e.parse(t,r),n),D=(e,t,r)=>4===e.formatByString(e.dateWithTimezone(void 0,t),r).length,L=(e,t,r,n,o)=>{if("digit"!==r)return!1;const i=e.dateWithTimezone(void 0,t);switch(n){case"year":return D(e,t,o)?"0001"===e.formatByString(e.setYear(i,1),o):"01"===e.formatByString(e.setYear(i,2001),o);case"month":return e.formatByString(e.startOfYear(i),o).length>1;case"day":return e.formatByString(e.startOfMonth(i),o).length>1;case"weekDay":return e.formatByString(e.startOfWeek(i),o).length>1;case"hours":return e.formatByString(e.setHours(i,1),o).length>1;case"minutes":return e.formatByString(e.setMinutes(i,1),o).length>1;case"seconds":return e.formatByString(e.setSeconds(i,1),o).length>1;default:throw new Error("Invalid section type")}},N=(e,t,r,o,i,a,s,l)=>{let c="";const u=[],d=e.date(),f=o=>{if(""===o)return null;const a=S(e,o),l=L(e,t,a.contentType,a.type,o),f=s?l:"digit"===a.contentType,p=null!=i&&e.isValid(i);let h=p?e.formatByString(i,o):"",m=null;if(f)if(l)m=""===h?e.formatByString(d,o).length:h.length;else{if(null==a.maxLength)throw new Error(`MUI: The token ${o} should have a 'maxDigitNumber' property on it's adapter`);m=a.maxLength,p&&(h=T(0,h,m))}return u.push((0,n.A)({},a,{format:o,maxLength:m,value:h,placeholder:P(e,t,r,a,o),hasLeadingZeros:l,hasLeadingZerosInFormat:l,hasLeadingZerosInInput:f,startSeparator:0===u.length?c:"",endSeparator:"",modified:!1})),null};let p=10,h=o,m=e.expandFormat(o);for(;m!==h;)if(h=m,m=e.expandFormat(h),p-=1,p<0)throw new Error("MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component");const g=m,y=((e,t)=>{const r=[],{start:n,end:o}=e.escapedCharacters,i=new RegExp(`(\\${n}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)r.push({start:a.index,end:i.lastIndex-1});return r})(e,g),v=new RegExp(`^(${Object.keys(e.formatTokenMap).sort((e,t)=>t.length-e.length).join("|")})`,"g");let b="";for(let e=0;et.start<=e&&t.end>=e),r=g[e],n=null!=t,o=`${b}${g.slice(e)}`,i=v.test(o);!n&&r.match(/([A-Za-z]+)/)&&i?(b=o.slice(0,v.lastIndex),e+=v.lastIndex-1):n&&(null==t?void 0:t.start)===e||(null==t?void 0:t.end)===e||(f(b),b="",0===u.length?c+=r:u[u.length-1].endSeparator+=r)}return f(b),u.map(e=>{const t=e=>{let t=e;return l&&null!==t&&t.includes(" ")&&(t=`⁩${t}⁦`),"spacious"===a&&["/",".","-"].includes(t)&&(t=` ${t} `),t};return e.startSeparator=t(e.startSeparator),e.endSeparator=t(e.endSeparator),e})},F={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},z=(e,t,r,n,o,i)=>[...n].sort((e,t)=>F[e.type]-F[t.type]).reduce((n,o)=>!i||o.modified?((e,t,r,n,o)=>{switch(r.type){case"year":return e.setYear(o,e.getYear(n));case"month":return e.setMonth(o,e.getMonth(n));case"weekDay":{const o=C(e,t,r.format),i=e.formatByString(n,r.format),a=o.indexOf(i),s=o.indexOf(r.value)-a;return e.addDays(n,s)}case"day":return e.setDate(o,e.getDate(n));case"meridiem":{const t=e.getHours(n)<12,r=e.getHours(o);return t&&r>=12?e.addHours(o,-12):!t&&r<12?e.addHours(o,12):o}case"hours":return e.setHours(o,e.getHours(n));case"minutes":return e.setMinutes(o,e.getMinutes(n));case"seconds":return e.setSeconds(o,e.getSeconds(n));default:return o}})(e,t,o,r,n):n,o),B=["value","referenceDate"],j={emptyValue:null,getTodayValue:m,getInitialReferenceValue:e=>{let{value:t,referenceDate:r}=e,n=(0,c.A)(e,B);return null!=t&&n.utils.isValid(t)?t:null!=r?r:(({props:e,utils:t,granularity:r,timezone:n,getTodayDate:o})=>{var i;let a=o?o():A(t,r,m(t,n));null!=e.minDate&&t.isAfterDay(e.minDate,a)&&(a=A(t,r,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,a)&&(a=A(t,r,e.maxDate));const s=((e,t)=>(r,n)=>e?t.isAfter(r,n):x(r,t)>x(n,t))(null!=(i=e.disableIgnoringDatePartForTimeValidation)&&i,t);return null!=e.minTime&&s(e.minTime,a)&&(a=A(t,r,e.disableIgnoringDatePartForTimeValidation?e.minTime:d(t,a,e.minTime))),null!=e.maxTime&&s(a,e.maxTime)&&(a=A(t,r,e.disableIgnoringDatePartForTimeValidation?e.maxTime:d(t,a,e.maxTime))),a})(n)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,r)=>!e.isValid(t)&&null!=t&&!e.isValid(r)&&null!=r||e.isEqual(t,r),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,r)=>null==r?null:e.setTimezone(r,t)},$={updateReferenceValue:(e,t,r)=>null!=t&&e.isValid(t)?t:r,getSectionsFromValue:(e,t,r,n,o)=>!e.isValid(t)&&r?r:R(o(t),n),getValueStrFromSections:(e,t)=>{const r=e.map(e=>{const r=k(e,t?"input-rtl":"input-ltr");return`${e.startSeparator}${r}${e.endSeparator}`}).join("");return t?`⁦${r}⁩`:r},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:r=>({value:r,referenceValue:null!=r&&e.isValid(r)?r:t.referenceValue})}),parseValueStr:(e,t,r)=>r(e.trim(),t)};var U=r("tCRK"),V=r("zgNN");const H={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,r)=>`Select ${e}. ${null===t?"No time selected":`Selected time is ${r.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?`Choose date, selected date is ${t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?`Choose time, selected time is ${t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear value",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},G=H;var W;W=H,(0,n.A)({},W);const q=()=>{const e=o.useContext(V.F);if(null===e)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=o.useMemo(()=>(0,n.A)({},G,e.localeText),[e.localeText]);return o.useMemo(()=>(0,n.A)({},e,{localeText:t}),[e,t])},Z=()=>q().utils,Y=()=>q().defaultDates,X=()=>q().localeText,K=e=>{const t=Z(),r=o.useRef();return void 0===r.current&&(r.current=t.dateWithTimezone(void 0,e)),r.current};var J=r("juqV"),Q=r("Gqia"),ee=r("Vn7y"),te=r("aGM9"),re=r("TkYO"),ne=r("PYeY");function oe(e){return(0,re.Ay)("MuiPickersToolbar",e)}(0,ne.A)("MuiPickersToolbar",["root","content"]);var ie=r("nKUr");const ae=(0,ee.Ay)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>(0,n.A)({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3)},t.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})),se=(0,ee.Ay)("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})(({ownerState:e})=>{var t;return{display:"flex",flexWrap:"wrap",width:"100%",justifyContent:e.isLandscape?"flex-start":"space-between",flexDirection:e.isLandscape?null!=(t=e.landscapeDirection)?t:"column":"row",flex:1,alignItems:e.isLandscape?"flex-start":"center"}}),le=o.forwardRef(function(e,t){const r=(0,U.A)({props:e,name:"MuiPickersToolbar"}),{children:n,className:o,toolbarTitle:i,hidden:a,titleId:s}=r,l=r,c=(e=>{const{classes:t,isLandscape:r}=e,n={root:["root"],content:["content"],penIconButton:["penIconButton",r&&"penIconButtonLandscape"]};return(0,te.A)(n,oe,t)})(l);return a?null:(0,ie.jsxs)(ae,{ref:t,className:(0,J.A)(c.root,o),ownerState:l,children:[(0,ie.jsx)(Q.A,{color:"text.secondary",variant:"overline",id:s,children:i}),(0,ie.jsx)(se,{className:c.content,ownerState:l,children:n})]})});function ce(e){return(0,re.Ay)("MuiDatePickerToolbar",e)}(0,ne.A)("MuiDatePickerToolbar",["root","title"]);const ue=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className"],de=(0,ee.Ay)(le,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),fe=(0,ee.Ay)(Q.A,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})(({ownerState:e})=>(0,n.A)({},e.isLandscape&&{margin:"auto 16px auto auto"})),pe=o.forwardRef(function(e,t){const r=(0,U.A)({props:e,name:"MuiDatePickerToolbar"}),{value:i,isLandscape:a,toolbarFormat:s,toolbarPlaceholder:l="––",views:u,className:d}=r,f=(0,c.A)(r,ue),p=Z(),h=X(),m=(e=>{const{classes:t}=e;return(0,te.A)({root:["root"],title:["title"]},ce,t)})(r),g=o.useMemo(()=>{if(!i)return l;const e=v(p,{format:s,views:u},!0);return p.formatByString(i,e)},[i,s,l,p,u]),y=r;return(0,ie.jsx)(de,(0,n.A)({ref:t,toolbarTitle:h.datePickerToolbarTitle,isLandscape:a,className:(0,J.A)(m.root,d)},f,{children:(0,ie.jsx)(fe,{variant:"h4",align:a?"left":"center",ownerState:y,className:m.title,children:g})}))}),he=e=>{if(void 0!==e)return Object.keys(e).reduce((t,r)=>(0,n.A)({},t,{[`${r.slice(0,1).toLowerCase()}${r.slice(1)}`]:e[r]}),{})};const me=({props:e,value:t,adapter:r})=>{if(null===t)return null;const{shouldDisableDate:n,shouldDisableMonth:o,shouldDisableYear:i,disablePast:a,disableFuture:s,timezone:l}=e,c=r.utils.dateWithTimezone(void 0,l),u=p(r.utils,e.minDate,r.defaultDates.minDate),d=p(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case Boolean(n&&n(t)):return"shouldDisableDate";case Boolean(o&&o(t)):return"shouldDisableMonth";case Boolean(i&&i(t)):return"shouldDisableYear";case Boolean(s&&r.utils.isAfterDay(t,c)):return"disableFuture";case Boolean(a&&r.utils.isBeforeDay(t,c)):return"disablePast";case Boolean(u&&r.utils.isBeforeDay(t,u)):return"minDate";case Boolean(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};var ge=r("0Ydi"),ye=r("EfzM"),ve=r("OGDC"),be=r("N0rN"),_e=r("A3c4"),xe=r("UVCh"),we=r("hGmu"),Ae=r("G43+"),Se=r("usZy"),Ce=r("qSC9"),Ee=r("nXnS"),Te=r("p4lV");function Ie(e){return(0,re.Ay)("MuiPickersPopper",e)}(0,ne.A)("MuiPickersPopper",["root","paper"]);const ke=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?ke(t.shadowRoot):t:null};var Me=r("bBSl");const Re="undefined"!=typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Pe=Re&&Re[1]?parseInt(Re[1],10):null,Oe=Re&&Re[2]?parseInt(Re[2],10):null,De=Pe&&Pe<10||Oe&&Oe<13||!1,Le=()=>(0,Me.A)("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||De,Ne=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],Fe=(0,ee.Ay)(Se.A,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),ze=(0,ee.Ay)(Ae.A,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({ownerState:e})=>(0,n.A)({outline:0,transformOrigin:"top center"},e.placement.includes("top")&&{transformOrigin:"bottom center"})),Be=o.forwardRef((e,t)=>{const{PaperComponent:r,popperPlacement:o,ownerState:i,children:a,paperSlotProps:s,paperClasses:l,onPaperClick:u,onPaperTouchStart:d}=e,f=(0,c.A)(e,Ne),p=(0,n.A)({},i,{placement:o}),h=(0,ge.A)({elementType:r,externalSlotProps:s,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:l,ownerState:p});return(0,ie.jsx)(r,(0,n.A)({},f,h,{onClick:e=>{var t;u(e),null==(t=h.onClick)||t.call(h,e)},onTouchStart:e=>{var t;d(e),null==(t=h.onTouchStart)||t.call(h,e)},ownerState:p,children:a}))});function je(e){var t,r,i,a;const s=(0,U.A)({props:e,name:"MuiPickersPopper"}),{anchorEl:l,children:c,containerRef:u=null,shouldRestoreFocus:d,onBlur:f,onDismiss:p,open:h,role:m,placement:g,slots:y,slotProps:v,reduceAnimations:b}=s;o.useEffect(()=>{function e(e){!h||"Escape"!==e.key&&"Esc"!==e.key||p()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[p,h]);const _=o.useRef(null);o.useEffect(()=>{"tooltip"===m||d&&!d()||(h?_.current=ke(document):_.current&&_.current instanceof HTMLElement&&setTimeout(()=>{_.current instanceof HTMLElement&&_.current.focus()}))},[h,m,d]);const[x,w,A]=function(e,t){const r=o.useRef(!1),n=o.useRef(!1),i=o.useRef(null),a=o.useRef(!1);o.useEffect(()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),a.current=!1};function t(){a.current=!0}},[e]);const s=(0,Ee.A)(e=>{if(!a.current)return;const o=n.current;n.current=!1;const s=(0,Te.A)(i.current);if(!i.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth-1:!s.documentElement.contains(e.target)||i.current.contains(e.target),l||o||t(e)}),l=()=>{n.current=!0};return o.useEffect(()=>{if(e){const e=(0,Te.A)(i.current),t=()=>{r.current=!0};return e.addEventListener("touchstart",s),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",s),e.removeEventListener("touchmove",t)}}},[e,s]),o.useEffect(()=>{if(e){const e=(0,Te.A)(i.current);return e.addEventListener("click",s),()=>{e.removeEventListener("click",s),n.current=!1}}},[e,s]),[i,l,l]}(h,null!=f?f:p),S=o.useRef(null),C=(0,be.A)(S,u),E=(0,be.A)(C,x),T=s,I=(e=>{const{classes:t}=e;return(0,te.A)({root:["root"],paper:["paper"]},Ie,t)})(T),k=Le(),M=null!=b?b:k,R=(null!=(t=null==y?void 0:y.desktopTransition)?t:M)?we.A:xe.A,P=null!=(r=null==y?void 0:y.desktopTrapFocus)?r:Ce.A,O=null!=(i=null==y?void 0:y.desktopPaper)?i:ze,D=null!=(a=null==y?void 0:y.popper)?a:Fe,L=(0,ge.A)({elementType:D,externalSlotProps:null==v?void 0:v.popper,additionalProps:{transition:!0,role:m,open:h,anchorEl:l,placement:g,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),p())}},className:I.root,ownerState:s});return(0,ie.jsx)(D,(0,n.A)({},L,{children:({TransitionProps:e,placement:t})=>(0,ie.jsx)(P,(0,n.A)({open:h,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===m,isEnabled:()=>!0},null==v?void 0:v.desktopTrapFocus,{children:(0,ie.jsx)(R,(0,n.A)({},e,null==v?void 0:v.desktopTransition,{children:(0,ie.jsx)(Be,{PaperComponent:O,ownerState:T,popperPlacement:t,ref:E,onPaperClick:w,onPaperTouchStart:A,paperClasses:I.paper,paperSlotProps:null==v?void 0:v.desktopPaper,children:c})}))}))}))}var $e=r("leBO");function Ue(e,t,r,n){const{value:i,onError:a}=e,s=q(),l=o.useRef(n),c=t({adapter:s,value:i,props:e});return o.useEffect(()=>{a&&!r(c,l.current)&&a(c,i),l.current=c},[r,a,l,c,i]),c}const Ve=({timezone:e,value:t,defaultValue:r,onChange:n,valueManager:i})=>{var a,s;const l=Z(),c=o.useRef(r),u=null!=(a=null!=t?t:c.current)?a:i.emptyValue,d=o.useMemo(()=>i.getTimezone(l,u),[l,i,u]),f=(0,Ee.A)(e=>null==d?e:i.setTimezone(l,d,e)),p=null!=(s=null!=e?e:d)?s:"default";return{value:o.useMemo(()=>i.setTimezone(l,p,u),[i,l,p,u]),handleValueChange:(0,Ee.A)((e,...t)=>{const r=f(e);null==n||n(r,...t)}),timezone:p}},He=({name:e,timezone:t,value:r,defaultValue:n,onChange:o,valueManager:i})=>{const[a,s]=(0,$e.A)({name:e,state:"value",controlled:r,default:null!=n?n:i.emptyValue}),l=(0,Ee.A)((e,...t)=>{s(e),null==o||o(e,...t)});return Ve({timezone:t,value:a,defaultValue:void 0,onChange:l,valueManager:i})};var Ge=r("XgeM");function We({onChange:e,onViewChange:t,openTo:r,view:n,views:i,autoFocus:a,focusedView:s,onFocusedViewChange:l}){var c,u;const d=o.useRef(r),f=o.useRef(i),p=o.useRef(i.includes(r)?r:i[0]),[h,m]=(0,$e.A)({name:"useViews",state:"view",controlled:n,default:p.current}),g=o.useRef(a?h:null),[y,v]=(0,$e.A)({name:"useViews",state:"focusedView",controlled:s,default:g.current});o.useEffect(()=>{(d.current&&d.current!==r||f.current&&f.current.some(e=>!i.includes(e)))&&(m(i.includes(r)?r:i[0]),f.current=i,d.current=r)},[r,m,h,i]);const b=i.indexOf(h),_=null!=(c=i[b-1])?c:null,x=null!=(u=i[b+1])?u:null,w=(0,Ee.A)((e,t)=>{v(t?e:t=>e===t?null:t),null==l||l(e,t)}),A=(0,Ee.A)(e=>{w(e,!0),e!==h&&(m(e),t&&t(e))}),S=(0,Ee.A)(()=>{x&&A(x)}),C=(0,Ee.A)((t,r,n)=>{const o="finish"===r,a=n?i.indexOf(n){const d=(({props:e,valueManager:t,valueType:r,wrapperVariant:i,validator:a})=>{const{onAccept:s,onChange:l,value:c,defaultValue:u,closeOnSelect:d="desktop"===i,selectedSections:f,onSelectedSectionsChange:p,timezone:h}=e,{current:m}=o.useRef(u),{current:g}=o.useRef(void 0!==c),y=Z(),v=q(),[b,_]=(0,$e.A)({controlled:f,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:x,setIsOpen:w}=(({open:e,onOpen:t,onClose:r})=>{const n=o.useRef("boolean"==typeof e).current,[i,a]=o.useState(!1);return o.useEffect(()=>{if(n){if("boolean"!=typeof e)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(e)}},[n,e]),{isOpen:i,setIsOpen:o.useCallback(e=>{n||a(e),e&&t&&t(),!e&&r&&r()},[n,t,r])}})(e),[A,S]=o.useState(()=>{let e;return e=void 0!==c?c:void 0!==m?m:t.emptyValue,{draft:e,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:c,hasBeenModifiedSinceMount:!1}}),{timezone:C,handleValueChange:E}=Ve({timezone:h,value:c,defaultValue:m,onChange:l,valueManager:t});Ue((0,n.A)({},e,{value:A.draft,timezone:C}),a,t.isSameError,t.defaultErrorState);const T=(0,Ee.A)(r=>{const o={action:r,dateState:A,hasChanged:e=>!t.areValuesEqual(y,r.value,e),isControlled:g,closeOnSelect:d},i=(e=>{const{action:t,hasChanged:r,dateState:n,isControlled:o}=e,i=!o&&!n.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!(!i||!["accept","today","clear"].includes(t.pickerAction))||r(n.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!i||r(n.lastPublishedValue)))})(o),l=(e=>{const{action:t,hasChanged:r,dateState:n,isControlled:o,closeOnSelect:i}=e,a=!o&&!n.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!(!a||!["accept","today","clear"].includes(t.pickerAction))||r(n.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&i?!!a||r(n.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&r(n.lastCommittedValue)})(o),c=(e=>{const{action:t,closeOnSelect:r}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&r:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(o);if(S(e=>(0,n.A)({},e,{draft:r.value,lastPublishedValue:i?r.value:e.lastPublishedValue,lastCommittedValue:l?r.value:e.lastCommittedValue,hasBeenModifiedSinceMount:!0})),i){const t={validationError:"setValueFromField"===r.name?r.context.validationError:a({adapter:v,value:r.value,props:(0,n.A)({},e,{value:r.value,timezone:C})})};"setValueFromShortcut"===r.name&&null!=r.shortcut&&(t.shortcut=r.shortcut),E(r.value,t)}l&&s&&s(r.value),c&&w(!1)});if(void 0!==c&&(void 0===A.lastControlledValue||!t.areValuesEqual(y,A.lastControlledValue,c))){const e=t.areValuesEqual(y,A.draft,c);S(t=>(0,n.A)({},t,{lastControlledValue:c},e?{}:{lastCommittedValue:c,lastPublishedValue:c,draft:c,hasBeenModifiedSinceMount:!0}))}const I=(0,Ee.A)(()=>{T({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),k=(0,Ee.A)(()=>{T({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),M=(0,Ee.A)(()=>{T({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),R=(0,Ee.A)(()=>{T({value:A.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),P=(0,Ee.A)(()=>{T({value:t.getTodayValue(y,C,r),name:"setValueFromAction",pickerAction:"today"})}),O=(0,Ee.A)(()=>w(!0)),D=(0,Ee.A)(()=>w(!1)),L=(0,Ee.A)((e,t="partial")=>T({name:"setValueFromView",value:e,selectionState:t})),N=(0,Ee.A)((e,t,r)=>T({name:"setValueFromShortcut",value:e,changeImportance:null!=t?t:"accept",shortcut:r})),F=(0,Ee.A)((e,t)=>T({name:"setValueFromField",value:e,context:t})),z=(0,Ee.A)(e=>{_(e),null==p||p(e)}),B={onClear:I,onAccept:k,onDismiss:M,onCancel:R,onSetToday:P,onOpen:O,onClose:D},j={value:A.draft,onChange:F,selectedSections:b,onSelectedSectionsChange:z},$=o.useMemo(()=>t.cleanValue(y,A.draft),[y,t,A.draft]);return{open:x,fieldProps:j,viewProps:{value:$,onChange:L,onClose:D,open:x,onSelectedSectionsChange:z},layoutProps:(0,n.A)({},B,{value:$,onChange:L,onSelectShortcut:N,isValid:r=>{const o=a({adapter:v,value:r,props:(0,n.A)({},e,{value:r,timezone:C})});return!t.hasError(o)}}),actions:B}})({props:e,valueManager:t,valueType:r,wrapperVariant:i,validator:l}),f=(({props:e,propsFromPickerValue:t,additionalViewProps:r,inputRef:i,autoFocusView:a})=>{const{onChange:s,open:l,onSelectedSectionsChange:u,onClose:d}=t,{view:f,views:p,openTo:h,onViewChange:m,viewRenderers:g,timezone:y}=e,v=(0,c.A)(e,qe),{view:b,setView:x,defaultView:w,focusedView:A,setFocusedView:S,setValueAndGoToNextView:C}=We({view:f,views:p,openTo:h,onChange:s,onViewChange:m,autoFocus:a}),{hasUIView:E,viewModeLookup:T}=o.useMemo(()=>p.reduce((e,t)=>{let r;return r=null!=g[t]?"UI":"field",e.viewModeLookup[t]=r,"UI"===r&&(e.hasUIView=!0),e},{hasUIView:!1,viewModeLookup:{}}),[g,p]),I=o.useMemo(()=>p.reduce((e,t)=>null!=g[t]&&(e=>_.includes(e))(t)?e+1:e,0),[g,p]),k=T[b],M=(0,Ee.A)(()=>"UI"===k),[R,P]=o.useState("UI"===k?b:null);return R!==b&&"UI"===T[b]&&P(b),(0,Ge.A)(()=>{"field"===k&&l&&(d(),setTimeout(()=>{null==i||i.current.focus(),u(b)}))},[b]),(0,Ge.A)(()=>{if(!l)return;let e=b;"field"===k&&null!=R&&(e=R),e!==w&&"UI"===T[e]&&"UI"===T[w]&&(e=w),e!==b&&x(e),S(e,!0)},[l]),{hasUIView:E,shouldRestoreFocus:M,layoutProps:{views:p,view:R,onViewChange:x},renderCurrentView:()=>{if(null==R)return null;const e=g[R];return null==e?null:e((0,n.A)({},v,r,t,{views:p,timezone:y,onChange:C,view:R,onViewChange:x,focusedView:A,onFocusedViewChange:S,showViewSwitcher:I>1,timeViewsCount:I}))}}})({props:e,inputRef:a,additionalViewProps:s,autoFocusView:u,propsFromPickerValue:d.viewProps}),p=(({props:e,propsFromPickerValue:t,propsFromPickerViews:r,wrapperVariant:i})=>{const{orientation:a}=e,s=((e,t)=>{const[r,n]=o.useState(Ze);return(0,Ge.A)(()=>{const e=()=>{n(Ze())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}},[]),i=e,a=["hours","minutes","seconds"],!(Array.isArray(a)?a.every(e=>-1!==i.indexOf(e)):-1!==i.indexOf(a))&&"landscape"===(t||r);var i,a})(r.views,a);return{layoutProps:(0,n.A)({},r,t,{isLandscape:s,wrapperVariant:i,disabled:e.disabled,readOnly:e.readOnly})}})({props:e,wrapperVariant:i,propsFromPickerValue:d.layoutProps,propsFromPickerViews:f.layoutProps});return{open:d.open,actions:d.actions,fieldProps:d.fieldProps,renderCurrentView:f.renderCurrentView,hasUIView:f.hasUIView,shouldRestoreFocus:f.shouldRestoreFocus,layoutProps:p.layoutProps}};function Xe(e){return(0,re.Ay)("MuiPickersLayout",e)}const Ke=(0,ne.A)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]);var Je=r("5I82"),Qe=r("TFnf");const et=["onAccept","onClear","onCancel","onSetToday","actions"];function tt(e){const{onAccept:t,onClear:r,onCancel:o,onSetToday:i,actions:a}=e,s=(0,c.A)(e,et),l=X();if(null==a||0===a.length)return null;const u=null==a?void 0:a.map(e=>{switch(e){case"clear":return(0,ie.jsx)(Je.A,{onClick:r,children:l.clearButtonLabel},e);case"cancel":return(0,ie.jsx)(Je.A,{onClick:o,children:l.cancelButtonLabel},e);case"accept":return(0,ie.jsx)(Je.A,{onClick:t,children:l.okButtonLabel},e);case"today":return(0,ie.jsx)(Je.A,{onClick:i,children:l.todayButtonLabel},e);default:return null}});return(0,ie.jsx)(Qe.A,(0,n.A)({},s,{children:u}))}var rt=r("H9le"),nt=r("ZvkB"),ot=r("Ifci");const it=["items","changeImportance","isLandscape","onChange","isValid"],at=["getValue"];function st(e){const{items:t,changeImportance:r,onChange:o,isValid:i}=e,a=(0,c.A)(e,it);if(null==t||0===t.length)return null;const s=t.map(e=>{let{getValue:t}=e,n=(0,c.A)(e,at);const a=t({isValid:i});return{label:n.label,onClick:()=>{o(a,r,n)},disabled:!i(a)}});return(0,ie.jsx)(rt.A,(0,n.A)({dense:!0,sx:[{maxHeight:334,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:s.map(e=>(0,ie.jsx)(nt.Ay,{children:(0,ie.jsx)(ot.A,(0,n.A)({},e))},e.label))}))}const lt=(0,ee.Ay)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Ke.toolbar}`]:t.isLandscape?{gridColumn:"rtl"===e.direction?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${Ke.shortcuts}`]:t.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:"rtl"===e.direction?3:1,gridRow:"2 / 3"},[`& .${Ke.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}}));lt.propTypes={as:a().elementType,ownerState:a().shape({isLandscape:a().bool.isRequired}).isRequired,sx:a().oneOfType([a().arrayOf(a().oneOfType([a().func,a().object,a().bool])),a().func,a().object])};const ct=(0,ee.Ay)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),ut=function(e){const t=(0,U.A)({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:i,tabs:a,actionBar:s,shortcuts:l}=(e=>{var t,r;const{wrapperVariant:o,onAccept:i,onClear:a,onCancel:s,onSetToday:l,view:c,views:u,onViewChange:d,value:f,onChange:p,onSelectShortcut:h,isValid:m,isLandscape:g,disabled:y,readOnly:v,children:b,components:_,componentsProps:x,slots:w,slotProps:A}=e,S=null!=w?w:he(_),C=null!=A?A:x,E=(e=>{const{classes:t,isLandscape:r}=e,n={root:["root",r&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]};return(0,te.A)(n,Xe,t)})(e),T=null!=(t=null==S?void 0:S.actionBar)?t:tt,I=(0,ge.A)({elementType:T,externalSlotProps:null==C?void 0:C.actionBar,additionalProps:{onAccept:i,onClear:a,onCancel:s,onSetToday:l,actions:"desktop"===o?[]:["cancel","accept"],className:E.actionBar},ownerState:(0,n.A)({},e,{wrapperVariant:o})}),k=(0,ie.jsx)(T,(0,n.A)({},I)),M=null==S?void 0:S.toolbar,R=(0,ge.A)({elementType:M,externalSlotProps:null==C?void 0:C.toolbar,additionalProps:{isLandscape:g,onChange:p,value:f,view:c,onViewChange:d,views:u,disabled:y,readOnly:v,className:E.toolbar},ownerState:(0,n.A)({},e,{wrapperVariant:o})}),P=function(e){return null!==e.view}(R)&&M?(0,ie.jsx)(M,(0,n.A)({},R)):null,O=b,D=null==S?void 0:S.tabs,L=c&&D?(0,ie.jsx)(D,(0,n.A)({view:c,onViewChange:d,className:E.tabs},null==C?void 0:C.tabs)):null,N=null!=(r=null==S?void 0:S.shortcuts)?r:st,F=(0,ge.A)({elementType:N,externalSlotProps:null==C?void 0:C.shortcuts,additionalProps:{isValid:m,isLandscape:g,onChange:h,className:E.shortcuts},ownerState:{isValid:m,isLandscape:g,onChange:h,className:E.shortcuts,wrapperVariant:o}});return{toolbar:P,content:O,tabs:L,actionBar:k,shortcuts:c&&N?(0,ie.jsx)(N,(0,n.A)({},F)):null}})(t),{sx:c,className:u,isLandscape:d,ref:f,wrapperVariant:p}=t,h=t,m=(e=>{const{isLandscape:t,classes:r}=e,n={root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]};return(0,te.A)(n,Xe,r)})(h);return(0,ie.jsxs)(lt,{ref:f,sx:c,className:(0,J.A)(u,m.root),ownerState:h,children:[d?l:r,d?r:l,(0,ie.jsx)(ct,{className:m.contentWrapper,children:"desktop"===p?(0,ie.jsxs)(o.Fragment,{children:[i,a]}):(0,ie.jsxs)(o.Fragment,{children:[a,i]})}),s]})},dt=["props","getOpenDialogAriaText"],ft=["ownerState"],pt=["ownerState"];var ht=r("M7pN");const mt=(0,ht.A)((0,ie.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),gt=(0,ht.A)((0,ie.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),yt=(0,ht.A)((0,ie.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),vt=(0,ht.A)((0,ie.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),bt=((0,ht.A)((0,ie.jsxs)(o.Fragment,{children:[(0,ie.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,ie.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),(0,ht.A)((0,ie.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),(0,ht.A)((0,ie.jsxs)(o.Fragment,{children:[(0,ie.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,ie.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),(0,ht.A)((0,ie.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"));var _t=r("MGIy"),xt=r("UnQg");const wt=e=>null!=e.saveQuery,At=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error","clearable","onClear","disabled"],St=e=>{const t=Z(),{state:r,selectedSectionIndexes:i,setSelectedSections:a,clearValue:s,clearActiveSection:l,updateSectionValue:u,updateValueFromValueStr:d,setTempAndroidValueStr:f,sectionsValueBoundaries:p,placeholder:m,timezone:g}=(e=>{const t=Z(),r=X(),i=q(),a="rtl"===(0,xt.A)().direction,{valueManager:s,fieldValueManager:l,valueType:c,validator:u,internalProps:d,internalProps:{value:f,defaultValue:p,referenceDate:m,onChange:g,format:y,formatDensity:v="dense",selectedSections:b,onSelectedSectionsChange:_,shouldRespectLeadingZeros:x=!1,timezone:A}}=e,{timezone:S,value:E,handleValueChange:T}=Ve({timezone:A,value:f,defaultValue:p,onChange:g,valueManager:s}),I=o.useMemo(()=>((e,t)=>{const r=e.dateWithTimezone(void 0,t),n=e.endOfYear(r),o=e.endOfDay(r),{maxDaysInMonth:i,longestMonth:a}=h(e,r).reduce((t,r)=>{const n=e.getDaysInMonth(r);return n>t.maxDaysInMonth?{maxDaysInMonth:n,longestMonth:r}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:r})=>({minimum:0,maximum:D(e,t,r)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(n)+1}),day:({currentDate:t})=>({minimum:1,maximum:null!=t&&e.isValid(t)?e.getDaysInMonth(t):i,longestMonth:a}),weekDay:({format:r,contentType:n})=>{if("digit"===n){const n=C(e,t,r).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:t})=>{const n=e.getHours(o);return e.formatByString(e.endOfDay(r),t)!==n.toString()?{minimum:1,maximum:Number(e.formatByString(e.startOfDay(r),t))}:{minimum:0,maximum:n}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:0})}})(t,S),[t,S]),M=o.useCallback((e,n=null)=>l.getSectionsFromValue(t,e,n,a,e=>N(t,S,r,y,e,v,x,a)),[l,y,r,a,x,t,v,S]),P=o.useMemo(()=>l.getValueStrFromSections(M(s.emptyValue),a),[l,M,s.emptyValue,a]),[O,L]=o.useState(()=>{const e=M(E),r={sections:e,value:E,referenceValue:s.emptyValue,tempValueStrAndroid:null},o=(e=>Math.max(...e.map(e=>{var t;return null!=(t=w[e.type])?t:1})))(e),i=s.getInitialReferenceValue({referenceDate:m,value:E,utils:t,props:d,granularity:o,timezone:S});return(0,n.A)({},r,{referenceValue:i})}),[F,B]=(0,$e.A)({controlled:b,default:null,name:"useField",state:"selectedSectionIndexes"}),j=e=>{B(e),null==_||_(e),L(e=>(0,n.A)({},e,{selectedSectionQuery:null}))},$=o.useMemo(()=>{if(null==F)return null;if("all"===F)return{startIndex:0,endIndex:O.sections.length-1,shouldSelectBoundarySelectors:!0};if("number"==typeof F)return{startIndex:F,endIndex:F};if("string"==typeof F){const e=O.sections.findIndex(e=>e.type===F);return{startIndex:e,endIndex:e}}return F},[F,O.sections]),U=({value:e,referenceValue:r,sections:o})=>{if(L(t=>(0,n.A)({},t,{sections:o,value:e,referenceValue:r,tempValueStrAndroid:null})),s.areValuesEqual(t,O.value,e))return;const a={validationError:u({adapter:i,value:e,props:(0,n.A)({},d,{value:e,timezone:S})})};T(e,a)},V=(e,t)=>{const r=[...O.sections];return r[e]=(0,n.A)({},r[e],{value:t,modified:!0}),R(r,a)};return o.useEffect(()=>{const e=M(O.value);L(t=>(0,n.A)({},t,{sections:e}))},[y,t.locale]),o.useEffect(()=>{let e=!1;e=!s.areValuesEqual(t,O.value,E)||s.getTimezone(t,O.value)!==s.getTimezone(t,E),e&&L(e=>(0,n.A)({},e,{value:E,referenceValue:l.updateReferenceValue(t,E,e.referenceValue),sections:M(E)}))},[E]),{state:O,selectedSectionIndexes:$,setSelectedSections:j,clearValue:()=>{U({value:s.emptyValue,referenceValue:O.referenceValue,sections:M(s.emptyValue)})},clearActiveSection:()=>{if(null==$)return;const e=O.sections[$.startIndex],r=l.getActiveDateManager(t,O,e),o=r.getSections(O.sections).filter(e=>""!==e.value).length===(""===e.value?0:1),i=V($.startIndex,""),a=o?null:t.date(new Date("")),s=r.getNewValuesFromNewActiveDate(a);(null!=a&&!t.isValid(a))!=(null!=r.date&&!t.isValid(r.date))?U((0,n.A)({},s,{sections:i})):L(e=>(0,n.A)({},e,s,{sections:i,tempValueStrAndroid:null}))},updateSectionValue:({activeSection:e,newSectionValue:r,shouldGoToNextSection:o})=>{o&&$&&$.startIndex{const r=t.some(e=>"day"===e.type),n=[],o=[];for(let e=0;e(0,n.A)({},e,u,{sections:a,tempValueStrAndroid:null}))},updateValueFromValueStr:e=>{const n=l.parseValueStr(e,O.referenceValue,(e,n)=>{const o=t.parse(e,y);if(null==o||!t.isValid(o))return null;const i=N(t,S,r,y,o,v,x,a);return z(t,S,o,i,n,!1)}),o=l.updateReferenceValue(t,n,O.referenceValue);U({value:n,referenceValue:o,sections:M(n,O.sections)})},setTempAndroidValueStr:e=>L(t=>(0,n.A)({},t,{tempValueStrAndroid:e})),sectionsValueBoundaries:I,placeholder:P,timezone:S}})(e),{inputRef:y,internalProps:v,internalProps:{readOnly:b=!1,unstableFieldRef:_,minutesStep:x},forwardedProps:{onClick:A,onKeyDown:T,onFocus:P,onBlur:F,onMouseUp:B,onPaste:j,error:$,clearable:U,onClear:V,disabled:H},fieldValueManager:G,valueManager:W,validator:Y}=e,K=(0,c.A)(e.forwardedProps,At),{applyCharacterEditing:J,resetCharacterQuery:Q}=(({sections:e,updateSectionValue:t,sectionsValueBoundaries:r,setTempAndroidValueStr:i,timezone:a})=>{const s=Z(),[l,c]=o.useState(null),u=(0,Ee.A)(()=>c(null));o.useEffect(()=>{var t;null!=l&&(null==(t=e[l.sectionIndex])?void 0:t.type)!==l.sectionType&&u()},[e,l,u]),o.useEffect(()=>{if(null!=l){const e=setTimeout(()=>u(),5e3);return()=>{window.clearTimeout(e)}}return()=>{}},[l,u]);const d=({keyPressed:t,sectionIndex:r},n,o)=>{const i=t.toLowerCase(),a=e[r];if(null!=l&&(!o||o(l.value))&&l.sectionIndex===r){const e=`${l.value}${i}`,t=n(e,a);if(!wt(t))return c({sectionIndex:r,value:e,sectionType:a.type}),t}const s=n(i,a);return wt(s)&&!s.saveQuery?(u(),null):(c({sectionIndex:r,value:i,sectionType:a.type}),wt(s)?null:s)};return{applyCharacterEditing:(0,Ee.A)(o=>{const l=e[o.sectionIndex],c=" "===o.keyPressed||Number.isNaN(Number(o.keyPressed))?(e=>{const t=(e,t,r)=>{const n=t.filter(e=>e.toLowerCase().startsWith(r));return 0===n.length?{saveQuery:!1}:{sectionValue:n[0],shouldGoToNextSection:1===n.length}},r=(e,r,o,i)=>{const l=e=>E(s,a,r.type,e);if("letter"===r.contentType)return t(r.format,l(r.format),e);if(o&&null!=i&&"letter"===S(s,o).contentType){const r=l(o),a=t(0,r,e);return wt(a)?{saveQuery:!1}:(0,n.A)({},a,{sectionValue:i(a.sectionValue,r)})}return{saveQuery:!1}};return d(e,(e,t)=>{switch(t.type){case"month":{const n=e=>O(s,e,s.formats.month,t.format);return r(e,t,s.formats.month,n)}case"weekDay":{const n=(e,t)=>t.indexOf(e).toString();return r(e,t,s.formats.weekday,n)}case"meridiem":return r(e,t);default:return{saveQuery:!1}}})})(o):(e=>{const t=(e,t)=>{const n=Number(`${e}`),o=r[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(n>o.maximum)return{saveQuery:!1};if(no.maximum||e.length===o.maximum.toString().length;return{sectionValue:I(s,0,n,o,t),shouldGoToNextSection:i}};return d(e,(e,r)=>{if("digit"===r.contentType||"digit-with-letter"===r.contentType)return t(e,r);if("month"===r.type){const o=L(s,a,"digit","month","MM"),i=t(e,{type:r.type,format:"MM",hasLeadingZerosInFormat:o,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(wt(i))return i;const l=O(s,i.sectionValue,"MM",r.format);return(0,n.A)({},i,{sectionValue:l})}if("weekDay"===r.type){const o=t(e,r);if(wt(o))return o;const i=C(s,a,r.format)[Number(o.sectionValue)-1];return(0,n.A)({},o,{sectionValue:i})}return{saveQuery:!1}},e=>!Number.isNaN(Number(e)))})(o);null==c?i(null):t({activeSection:l,newSectionValue:c.sectionValue,shouldGoToNextSection:c.shouldGoToNextSection})}),resetCharacterQuery:u}})({sections:r.sections,updateSectionValue:u,sectionsValueBoundaries:p,setTempAndroidValueStr:f,timezone:g}),ee=o.useRef(null),te=(0,be.A)(y,ee),re=o.useRef(void 0),ne="rtl"===(0,xt.A)().direction,oe=o.useMemo(()=>((e,t)=>{const r={};if(!t)return e.forEach((t,n)=>{const o=0===n?null:n-1,i=n===e.length-1?null:n+1;r[n]={leftIndex:o,rightIndex:i}}),{neighbors:r,startIndex:0,endIndex:e.length-1};const n={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((e,t)=>{var r;return t>=i&&(null==(r=e.endSeparator)?void 0:r.includes(" "))&&" / "!==e.endSeparator}),-1===a&&(a=e.length-1);for(let e=a;e>=i;e-=1)o[e]=s,n[s]=e,s-=1;i=a+1}return e.forEach((t,i)=>{const a=o[i],s=0===a?null:n[a-1],l=a===e.length-1?null:n[a+1];r[i]={leftIndex:s,rightIndex:l}}),{neighbors:r,startIndex:n[0],endIndex:n[e.length-1]}})(r.sections,ne),[r.sections,ne]),ie=()=>{var e;if(b)return void a(null);const t=null!=(e=ee.current.selectionStart)?e:0;let n;n=t<=r.sections[0].startInInput||t>=r.sections[r.sections.length-1].endInInput?1:r.sections.findIndex(e=>e.startInInput-e.startSeparator.length>t);const o=-1===n?r.sections.length-1:n-1;a(o)},ae=(0,Ee.A)((e,...t)=>{e.isDefaultPrevented()||(null==A||A(e,...t),ie())}),se=(0,Ee.A)(e=>{null==B||B(e),e.preventDefault()}),le=(0,Ee.A)((...e)=>{null==P||P(...e);const t=ee.current;window.clearTimeout(re.current),re.current=setTimeout(()=>{t&&t===ee.current&&(null!=i||b||(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?a("all"):ie()))})}),ce=(0,Ee.A)((...e)=>{null==F||F(...e),a(null)}),ue=(0,Ee.A)(e=>{if(null==j||j(e),b)return void e.preventDefault();const t=e.clipboardData.getData("text");if(i&&i.startIndex===i.endIndex){const n=r.sections[i.startIndex],o=/^[a-zA-Z]+$/.test(t),a=/^[0-9]+$/.test(t),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===n.contentType&&o||"digit"===n.contentType&&a||"digit-with-letter"===n.contentType&&s)return Q(),u({activeSection:n,newSectionValue:t,shouldGoToNextSection:!0}),void e.preventDefault();if(o||a)return void e.preventDefault()}e.preventDefault(),Q(),d(t)}),de=(0,Ee.A)(e=>{if(b)return;const t=e.target.value;if(""===t)return Q(),void s();const n=e.nativeEvent.data,o=n&&n.length>1,a=o?n:t,c=M(a);if(null==i||o)return void d(o?n:c);let u;if(0===i.startIndex&&i.endIndex===r.sections.length-1&&1===c.length)u=c;else{const e=M(G.getValueStrFromSections(r.sections,ne));let t=-1,n=-1;for(let r=0;ro.end)return;const a=c.length-e.length+o.end-M(o.endSeparator||"").length;u=c.slice(o.start+M(o.startSeparator||"").length,a)}0!==u.length?J({keyPressed:u,sectionIndex:i.startIndex}):navigator.userAgent.toLowerCase().indexOf("android")>-1?f(a):(Q(),l())}),fe=(0,Ee.A)(e=>{switch(null==T||T(e),!0){case"a"===e.key&&(e.ctrlKey||e.metaKey):e.preventDefault(),a("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==i)a(oe.startIndex);else if(i.startIndex!==i.endIndex)a(i.endIndex);else{const e=oe.neighbors[i.startIndex].rightIndex;null!==e&&a(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==i)a(oe.endIndex);else if(i.startIndex!==i.endIndex)a(i.startIndex);else{const e=oe.neighbors[i.startIndex].leftIndex;null!==e&&a(e)}break;case"Delete"===e.key:if(e.preventDefault(),b)break;null==i||0===i.startIndex&&i.endIndex===r.sections.length-1?s():l(),Q();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),b||null==i)break;const n=r.sections[i.startIndex],o=G.getActiveDateManager(t,r,n),a=((e,t,r,n,o,i,a)=>{const s=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}})(n),l="Home"===n,c="End"===n,u=""===r.value||l||c;return"digit"===r.contentType||"digit-with-letter"===r.contentType?(()=>{const n=o[r.type]({currentDate:i,format:r.format,contentType:r.contentType}),d=t=>I(e,0,t,n,r),f="minutes"===r.type&&null!=a&&a.minutesStep?a.minutesStep:1;let p=parseInt(r.value,10)+s*f;if(u){if("year"===r.type&&!c&&!l)return e.formatByString(e.dateWithTimezone(void 0,t),r.format);p=s>0||l?n.minimum:n.maximum}return p%f!==0&&((s<0||l)&&(p+=f-(f+p)%f),(s>0||c)&&(p-=p%f)),p>n.maximum?d(n.minimum+(p-n.maximum-1)%(n.maximum-n.minimum+1)):p{const n=E(e,t,r.type,r.format);if(0===n.length)return r.value;if(u)return s>0||l?n[0]:n[n.length-1];const o=n.indexOf(r.value);return n[(o+n.length+s)%n.length]})()})(t,g,n,e.key,p,o.date,{minutesStep:x});u({activeSection:n,newSectionValue:a,shouldGoToNextSection:!1});break}}});(0,Ge.A)(()=>{if(!ee.current)return;if(null==i)return void(ee.current.scrollLeft&&(ee.current.scrollLeft=0));const e=r.sections[i.startIndex],t=r.sections[i.endIndex];let n=e.startInInput,o=t.endInInput;if(i.shouldSelectBoundarySelectors&&(n-=e.startSeparator.length,o+=t.endSeparator.length),n!==ee.current.selectionStart||o!==ee.current.selectionEnd){const e=ee.current.scrollTop;ee.current===ke(document)&&ee.current.setSelectionRange(n,o),ee.current.scrollTop=e}});const pe=Ue((0,n.A)({},v,{value:r.value,timezone:g}),Y,W.isSameError,W.defaultErrorState),he=o.useMemo(()=>void 0!==$?$:W.hasError(pe),[W,pe,$]);o.useEffect(()=>{he||i||Q()},[r.referenceValue,i,he]),o.useEffect(()=>(ee.current&&ee.current===document.activeElement&&a("all"),()=>window.clearTimeout(re.current)),[]),o.useEffect(()=>{null!=r.tempValueStrAndroid&&null!=i&&(Q(),l())},[r.tempValueStrAndroid]);const me=o.useMemo(()=>{var e;return null!=(e=r.tempValueStrAndroid)?e:G.getValueStrFromSections(r.sections,ne)},[r.sections,G,r.tempValueStrAndroid,ne]),ge=o.useMemo(()=>null==i||"letter"===r.sections[i.startIndex].contentType?"text":"numeric",[i,r.sections]),ye=ee.current&&ee.current===ke(document),ve=W.areValuesEqual(t,r.value,W.emptyValue),_e=!ye&&ve;o.useImperativeHandle(_,()=>({getSections:()=>r.sections,getActiveSectionIndex:()=>{var e,t,n;const o=null!=(e=ee.current.selectionStart)?e:0,i=null!=(t=ee.current.selectionEnd)?t:0,a=!(null==(n=ee.current)||!n.readOnly);if(0===o&&0===i||a)return null;const s=o<=r.sections[0].startInInput?1:r.sections.findIndex(e=>e.startInInput-e.startSeparator.length>o);return-1===s?r.sections.length-1:s-1},setSelectedSections:e=>a(e)}));const xe=(0,Ee.A)((e,...t)=>{var r;e.preventDefault(),null==V||V(e,...t),s(),null==ee||null==(r=ee.current)||r.focus(),a(0)});return(0,n.A)({placeholder:m,autoComplete:"off",disabled:Boolean(H)},K,{value:_e?"":me,inputMode:ge,readOnly:b,onClick:ae,onFocus:le,onBlur:ce,onPaste:ue,onChange:de,onKeyDown:fe,onMouseUp:se,onClear:xe,error:he,ref:te,clearable:Boolean(U&&!ve&&!b&&!H)})},Ct=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],Et=["disablePast","disableFuture","minTime","maxTime","shouldDisableClock","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],Tt=["minDateTime","maxDateTime"],It=[...Ct,...Et,...Tt],kt=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],Mt=["ownerState"],Rt=["components","componentsProps","slots","slotProps","InputProps","inputProps"],Pt=["inputRef"],Ot=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],Dt=o.forwardRef(function(e,t){var r,i,a;const s=(0,U.A)({props:e,name:"MuiDateField"}),{components:l,componentsProps:u,slots:d,slotProps:f,InputProps:h,inputProps:m}=s,g=(0,c.A)(s,Rt),y=s,v=null!=(r=null!=(i=null==d?void 0:d.textField)?i:null==l?void 0:l.TextField)?r:_t.A,b=(0,ge.A)({elementType:v,externalSlotProps:null!=(a=null==f?void 0:f.textField)?a:null==u?void 0:u.textField,externalForwardedProps:g,ownerState:y}),{inputRef:_}=b,x=(0,c.A)(b,Pt);x.inputProps=(0,n.A)({},m,x.inputProps),x.InputProps=(0,n.A)({},h,x.InputProps);const w=(({props:e,inputRef:t})=>{const r=(e=>{var t,r,o;const i=Z(),a=Y();return(0,n.A)({},e,{disablePast:null!=(t=e.disablePast)&&t,disableFuture:null!=(r=e.disableFuture)&&r,format:null!=(o=e.format)?o:i.formats.keyboardDate,minDate:p(i,e.minDate,a.minDate),maxDate:p(i,e.maxDate,a.maxDate)})})(e),{forwardedProps:o,internalProps:i}=(e=>{const t=(0,n.A)({},e),r={},o=e=>{t.hasOwnProperty(e)&&(r[e]=t[e],delete t[e])};return kt.forEach(o),Ct.forEach(o),{forwardedProps:t,internalProps:r}})(r);return St({inputRef:t,forwardedProps:o,internalProps:i,valueManager:j,fieldValueManager:$,validator:me,valueType:"date"})})({props:x,inputRef:_}),{ref:A,onPaste:S,onKeyDown:C,inputMode:E,readOnly:T,clearable:I,onClear:k}=w,M=(0,c.A)(w,Ot),{InputProps:R,fieldProps:P}=(({clearable:e,fieldProps:t,InputProps:r,onClear:i,slots:a,slotProps:s,components:l,componentsProps:u})=>{var d,f,p,h,m,g;const y=X(),v=null!=(d=null!=(f=null==a?void 0:a.clearButton)?f:null==l?void 0:l.ClearButton)?d:ve.A,b=(0,ge.A)({elementType:v,externalSlotProps:null!=(p=null==s?void 0:s.clearButton)?p:null==u?void 0:u.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:y.fieldClearLabel}}),_=(0,c.A)(b,Mt),x=null!=(h=null!=(m=null==a?void 0:a.clearIcon)?m:null==l?void 0:l.ClearIcon)?h:bt,w=(0,ge.A)({elementType:x,externalSlotProps:null!=(g=null==s?void 0:s.clearIcon)?g:null==u?void 0:u.clearIcon,ownerState:{}});return{InputProps:(0,n.A)({},r,{endAdornment:(0,ie.jsxs)(o.Fragment,{children:[e&&(0,ie.jsx)(ye.A,{position:"end",sx:{marginRight:null!=r&&r.endAdornment?-1:-1.5},children:(0,ie.jsx)(v,(0,n.A)({},_,{onClick:i,children:(0,ie.jsx)(x,(0,n.A)({fontSize:"small"},w))}))}),null==r?void 0:r.endAdornment]})}),fieldProps:(0,n.A)({},t,{sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(t.sx)?t.sx:[t.sx]]})}})({onClear:k,clearable:I,fieldProps:M,InputProps:M.InputProps,slots:d,slotProps:f,components:l,componentsProps:u});return(0,ie.jsx)(v,(0,n.A)({ref:t},P,{InputProps:(0,n.A)({},R,{readOnly:T}),inputProps:(0,n.A)({},M.inputProps,{inputMode:E,onPaste:S,onKeyDown:C,ref:A})}))}),Lt=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:r,minDate:n,maxDate:i,disableFuture:a,disablePast:s,timezone:l})=>{const c=q();return o.useCallback(o=>null!==me({adapter:c,value:o,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:r,minDate:n,maxDate:i,disableFuture:a,disablePast:s,timezone:l}}),[c,e,t,r,n,i,a,s,l])};var Nt=r("DLU/");const Ft=e=>(0,re.Ay)("MuiPickersFadeTransitionGroup",e),zt=((0,ne.A)("MuiPickersFadeTransitionGroup",["root"]),(0,ee.Ay)(Nt.A,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"}));function Bt(e){const t=(0,U.A)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:r,className:n,reduceAnimations:o,transKey:i}=t,a=(e=>{const{classes:t}=e;return(0,te.A)({root:["root"]},Ft,t)})(t),s=(0,xt.A)();return o?r:(0,ie.jsx)(zt,{className:(0,J.A)(a.root,n),children:(0,ie.jsx)(we.A,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:r},i)})}var jt=r("+8pU"),$t=r("2Qr1");function Ut(e){return(0,re.Ay)("MuiPickersDay",e)}const Vt=(0,ne.A)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Ht=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],Gt=({theme:e,ownerState:t})=>(0,n.A)({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,$t.X4)(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,$t.X4)(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Vt.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Vt.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Vt.disabled}:not(.${Vt.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Vt.disabled}&.${Vt.selected}`]:{opacity:.6}},!t.disableMargin&&{margin:"0 2px"},t.outsideCurrentMonth&&t.showDaysOutsideCurrentMonth&&{color:(e.vars||e).palette.text.secondary},!t.disableHighlightToday&&t.today&&{[`&:not(.${Vt.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}),Wt=(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableMargin&&t.dayWithMargin,!r.disableHighlightToday&&r.today&&t.today,!r.outsideCurrentMonth&&r.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,r.outsideCurrentMonth&&!r.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},qt=(0,ee.Ay)(jt.A,{name:"MuiPickersDay",slot:"Root",overridesResolver:Wt})(Gt),Zt=(0,ee.Ay)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Wt})(({theme:e,ownerState:t})=>(0,n.A)({},Gt({theme:e,ownerState:t}),{opacity:0,pointerEvents:"none"})),Yt=()=>{},Xt=o.forwardRef(function(e,t){const r=(0,U.A)({props:e,name:"MuiPickersDay"}),{autoFocus:i=!1,className:a,day:s,disabled:l=!1,disableHighlightToday:u=!1,disableMargin:d=!1,isAnimating:f,onClick:p,onDaySelect:h,onFocus:m=Yt,onBlur:g=Yt,onKeyDown:y=Yt,onMouseDown:v=Yt,onMouseEnter:b=Yt,outsideCurrentMonth:_,selected:x=!1,showDaysOutsideCurrentMonth:w=!1,children:A,today:S=!1}=r,C=(0,c.A)(r,Ht),E=(0,n.A)({},r,{autoFocus:i,disabled:l,disableHighlightToday:u,disableMargin:d,selected:x,showDaysOutsideCurrentMonth:w,today:S}),T=(e=>{const{selected:t,disableMargin:r,disableHighlightToday:n,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,c=a&&!s,u={root:["root",t&&!c&&"selected",i&&"disabled",!r&&"dayWithMargin",!n&&o&&"today",a&&s&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]};return(0,te.A)(u,Ut,l)})(E),I=Z(),k=o.useRef(null),M=(0,be.A)(k,t);return(0,Ge.A)(()=>{!i||l||f||_||k.current.focus()},[i,l,f,_]),_&&!w?(0,ie.jsx)(Zt,{className:(0,J.A)(T.root,T.hiddenDaySpacingFiller,a),ownerState:E,role:C.role}):(0,ie.jsx)(qt,(0,n.A)({className:(0,J.A)(T.root,a),ref:M,centerRipple:!0,disabled:l,tabIndex:x?0:-1,onKeyDown:e=>y(e,s),onFocus:e=>m(e,s),onBlur:e=>g(e,s),onMouseEnter:e=>b(e,s),onClick:e=>{l||h(s),_&&e.currentTarget.focus(),p&&p(e)},onMouseDown:e=>{v(e),_&&e.preventDefault()}},C,{ownerState:E,children:A||I.format(s,"dayOfMonth")}))}),Kt=o.memo(Xt);var Jt=r("zvTq");function Qt(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var er=r("XOob"),tr=r("tX/+"),rr=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return n=t,void((r=e).classList?r.classList.remove(n):"string"==typeof r.className?r.className=Qt(r.className,n):r.setAttribute("class",Qt(r.className&&r.className.baseVal||"",n)));var r,n})},nr=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o(0,re.Ay)("MuiPickersSlideTransition",e),ar=(0,ne.A)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),sr=["children","className","reduceAnimations","slideDirection","transKey","classes"],lr=(0,ee.Ay)(Nt.A,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${ar["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${ar["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${ar.slideEnterActive}`]:t.slideEnterActive},{[`.${ar.slideExit}`]:t.slideExit},{[`.${ar["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${ar["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${ar["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${ar["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${ar.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${ar.slideExit}`]:{transform:"translate(0%)"},[`& .${ar["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${ar["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}),cr=e=>(0,re.Ay)("MuiDayCalendar",e),ur=((0,ne.A)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]),["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"]),dr=["ownerState"],fr=(0,ee.Ay)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),pr=(0,ee.Ay)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),hr=(0,ee.Ay)(Q.A,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),mr=(0,ee.Ay)(Q.A,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),gr=(0,ee.Ay)(Q.A,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>(0,n.A)({},e.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),yr=(0,ee.Ay)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),vr=(0,ee.Ay)(function(e){const t=(0,U.A)({props:e,name:"MuiPickersSlideTransition"}),{children:r,className:i,reduceAnimations:a,transKey:s}=t,l=(0,c.A)(t,sr),u=(e=>{const{classes:t,slideDirection:r}=e,n={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${r}`],exitActive:[`slideExitActiveLeft-${r}`]};return(0,te.A)(n,ir,t)})(t),d=(0,xt.A)();if(a)return(0,ie.jsx)("div",{className:(0,J.A)(u.root,i),children:r});const f={exit:u.exit,enterActive:u.enterActive,enter:u.enter,exitActive:u.exitActive};return(0,ie.jsx)(lr,{className:(0,J.A)(u.root,i),childFactory:e=>o.cloneElement(e,{classNames:f}),role:"presentation",children:(0,ie.jsx)(or,(0,n.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:d.transitions.duration.complex,classNames:f},l,{children:r}),s)})},{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),br=(0,ee.Ay)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),_r=(0,ee.Ay)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function xr(e){var t,r,i;let{parentProps:a,day:s,focusableDay:l,selectedDays:u,isDateDisabled:d,currentMonthNumber:f,isViewFocused:p}=e,h=(0,c.A)(e,ur);const{disabled:m,disableHighlightToday:g,isMonthSwitchingAnimating:y,showDaysOutsideCurrentMonth:v,components:b,componentsProps:_,slots:x,slotProps:w,timezone:A}=a,S=Z(),C=K(A),E=null!==l&&S.isSameDay(s,l),T=u.some(e=>S.isSameDay(e,s)),I=S.isSameDay(s,C),k=null!=(t=null!=(r=null==x?void 0:x.day)?r:null==b?void 0:b.Day)?t:Kt,M=(0,ge.A)({elementType:k,externalSlotProps:null!=(i=null==w?void 0:w.day)?i:null==_?void 0:_.day,additionalProps:(0,n.A)({disableHighlightToday:g,showDaysOutsideCurrentMonth:v,role:"gridcell",isAnimating:y,"data-timestamp":S.toJsDate(s).valueOf()},h),ownerState:(0,n.A)({},a,{day:s,selected:T})}),R=(0,c.A)(M,dr),P=o.useMemo(()=>m||d(s),[m,d,s]),O=o.useMemo(()=>S.getMonth(s)!==f,[S,s,f]),D=o.useMemo(()=>{const e=S.startOfMonth(S.setMonth(s,f));return v?S.isSameDay(s,S.startOfWeek(e)):S.isSameDay(s,e)},[f,s,v,S]),L=o.useMemo(()=>{const e=S.endOfMonth(S.setMonth(s,f));return v?S.isSameDay(s,S.endOfWeek(e)):S.isSameDay(s,e)},[f,s,v,S]);return(0,ie.jsx)(k,(0,n.A)({},R,{day:s,disabled:P,autoFocus:p&&E,today:I,outsideCurrentMonth:O,isFirstVisibleCell:D,isLastVisibleCell:L,selected:T,tabIndex:E?0:-1,"aria-selected":T,"aria-current":I?"date":void 0}))}function wr(e){const t=(0,U.A)({props:e,name:"MuiDayCalendar"}),{onFocusedDayChange:r,className:i,currentMonth:a,selectedDays:s,focusedDay:l,loading:c,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:p,reduceAnimations:h,renderLoading:m=()=>(0,ie.jsx)("span",{children:"..."}),slideDirection:g,TransitionProps:y,disablePast:v,disableFuture:_,minDate:x,maxDate:w,shouldDisableDate:A,shouldDisableMonth:S,shouldDisableYear:C,dayOfWeekFormatter:E,hasFocus:T,onFocusedViewChange:I,gridLabelId:k,displayWeekNumber:M,fixedWeekNumber:R,autoFocus:P,timezone:O}=t,D=K(O),L=Z(),N=(e=>{const{classes:t}=e;return(0,te.A)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},cr,t)})(t),F="rtl"===(0,xt.A)().direction,z=E||((e,t)=>L.format(t,"weekdayShort").charAt(0).toUpperCase()),B=Lt({shouldDisableDate:A,shouldDisableMonth:S,shouldDisableYear:C,minDate:x,maxDate:w,disablePast:v,disableFuture:_,timezone:O}),j=X(),[$,V]=(0,$e.A)({name:"DayCalendar",state:"hasFocus",controlled:T,default:null!=P&&P}),[H,G]=o.useState(()=>l||D),W=(0,Ee.A)(e=>{p||u(e)}),q=e=>{B(e)||(r(e),G(e),null==I||I(!0),V(!0))},Y=(0,Ee.A)((e,t)=>{switch(e.key){case"ArrowUp":q(L.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":q(L.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=L.addDays(t,F?1:-1),n=L.addMonths(t,F?1:-1),o=f({utils:L,date:r,minDate:F?r:L.startOfMonth(n),maxDate:F?L.endOfMonth(n):r,isDateDisabled:B,timezone:O});q(o||r),e.preventDefault();break}case"ArrowRight":{const r=L.addDays(t,F?-1:1),n=L.addMonths(t,F?-1:1),o=f({utils:L,date:r,minDate:F?L.startOfMonth(n):r,maxDate:F?r:L.endOfMonth(n),isDateDisabled:B,timezone:O});q(o||r),e.preventDefault();break}case"Home":q(L.startOfWeek(t)),e.preventDefault();break;case"End":q(L.endOfWeek(t)),e.preventDefault();break;case"PageUp":q(L.addMonths(t,1)),e.preventDefault();break;case"PageDown":q(L.addMonths(t,-1)),e.preventDefault()}}),Q=(0,Ee.A)((e,t)=>q(t)),ee=(0,Ee.A)((e,t)=>{$&&L.isSameDay(H,t)&&(null==I||I(!1))}),re=L.getMonth(a),ne=o.useMemo(()=>s.filter(e=>!!e).map(e=>L.startOfDay(e)),[L,s]),oe=re,ae=o.useMemo(()=>o.createRef(),[oe]),se=L.startOfWeek(D),le=o.useMemo(()=>{const e=L.startOfMonth(a),t=L.endOfMonth(a);return B(H)||L.isAfterDay(H,t)||L.isBeforeDay(H,e)?f({utils:L,date:H,minDate:e,maxDate:t,disablePast:v,disableFuture:_,isDateDisabled:B,timezone:O}):H},[a,_,v,H,B,L,O]),ce=o.useMemo(()=>{const e=L.setTimezone(a,O),t=L.getWeekArray(e);let r=L.addMonths(e,1);for(;R&&t.length{t.length{var r;const n=L.format(e,"weekdayShort");return(0,ie.jsx)(hr,{variant:"caption",role:"columnheader","aria-label":L.format(L.addDays(se,t),"weekday"),className:N.weekDayLabel,children:null!=(r=null==z?void 0:z(n,e))?r:n},n+t.toString())})]}),c?(0,ie.jsx)(yr,{className:N.loadingContainer,children:m()}):(0,ie.jsx)(vr,(0,n.A)({transKey:oe,onExited:d,reduceAnimations:h,slideDirection:g,className:(0,J.A)(i,N.slideTransition)},y,{nodeRef:ae,children:(0,ie.jsx)(br,{ref:ae,role:"rowgroup",className:N.monthContainer,children:ce.map((e,r)=>(0,ie.jsxs)(_r,{role:"row",className:N.weekContainer,"aria-rowindex":r+1,children:[M&&(0,ie.jsx)(gr,{className:N.weekNumber,role:"rowheader","aria-label":j.calendarWeekNumberAriaLabelText(L.getWeekNumber(e[0])),children:j.calendarWeekNumberText(L.getWeekNumber(e[0]))}),e.map((e,r)=>(0,ie.jsx)(xr,{parentProps:t,day:e,selectedDays:ne,focusableDay:le,onKeyDown:Y,onFocus:Q,onBlur:ee,onDaySelect:W,isDateDisabled:B,currentMonthNumber:re,isViewFocused:$,"aria-colindex":r+1},e.toString()))]},`week-${e[0]}`))})}))]})}var Ar=r("aoPf");function Sr(e){return(0,re.Ay)("MuiPickersMonth",e)}const Cr=(0,ne.A)("MuiPickersMonth",["root","monthButton","disabled","selected"]),Er=["autoFocus","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow"],Tr=(0,ee.Ay)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})(({ownerState:e})=>({flexBasis:3===e.monthsPerRow?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),Ir=(0,ee.Ay)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${Cr.disabled}`]:t.disabled},{[`&.${Cr.selected}`]:t.selected}]})(({theme:e})=>(0,n.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,$t.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,$t.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Cr.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Cr.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),kr=o.memo(function(e){const t=(0,U.A)({props:e,name:"MuiPickersMonth"}),{autoFocus:r,children:i,disabled:a,selected:s,value:l,tabIndex:u,onClick:d,onKeyDown:f,onFocus:p,onBlur:h,"aria-current":m,"aria-label":g}=t,y=(0,c.A)(t,Er),v=o.useRef(null),b=(e=>{const{disabled:t,selected:r,classes:n}=e,o={root:["root"],monthButton:["monthButton",t&&"disabled",r&&"selected"]};return(0,te.A)(o,Sr,n)})(t);return(0,Ge.A)(()=>{var e;r&&(null==(e=v.current)||e.focus())},[r]),(0,ie.jsx)(Tr,(0,n.A)({className:b.root,ownerState:t},y,{children:(0,ie.jsx)(Ir,{ref:v,disabled:a,type:"button",role:"radio",tabIndex:a?-1:u,"aria-current":m,"aria-checked":s,"aria-label":g,onClick:e=>d(e,l),onKeyDown:e=>f(e,l),onFocus:e=>p(e,l),onBlur:e=>h(e,l),className:b.monthButton,ownerState:t,children:i})}))});function Mr(e){return(0,re.Ay)("MuiMonthCalendar",e)}(0,ne.A)("MuiMonthCalendar",["root"]);const Rr=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId"],Pr=(0,ee.Ay)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:320,boxSizing:"border-box"}),Or=o.forwardRef(function(e,t){const r=function(e){const t=Z(),r=Y(),o=(0,U.A)({props:e,name:"MuiMonthCalendar"});return(0,n.A)({disableFuture:!1,disablePast:!1},o,{minDate:p(t,o.minDate,r.minDate),maxDate:p(t,o.maxDate,r.maxDate)})}(e),{className:i,value:a,defaultValue:s,referenceDate:l,disabled:u,disableFuture:d,disablePast:f,maxDate:m,minDate:g,onChange:y,shouldDisableMonth:v,readOnly:b,disableHighlightToday:_,autoFocus:x=!1,onMonthFocus:A,hasFocus:S,onFocusedViewChange:C,monthsPerRow:E=3,timezone:T,gridLabelId:I}=r,k=(0,c.A)(r,Rr),{value:M,handleValueChange:R,timezone:P}=He({name:"MonthCalendar",timezone:T,value:a,defaultValue:s,onChange:y,valueManager:j}),O=K(P),D=(0,Ar.A)(),L=Z(),N=o.useMemo(()=>j.getInitialReferenceValue({value:M,utils:L,props:r,timezone:P,referenceDate:l,granularity:w.month}),[]),F=r,z=(e=>{const{classes:t}=e;return(0,te.A)({root:["root"]},Mr,t)})(F),B=o.useMemo(()=>L.getMonth(O),[L,O]),$=o.useMemo(()=>null!=M?L.getMonth(M):_?null:L.getMonth(N),[M,L,_,N]),[V,H]=o.useState(()=>$||B),[G,W]=(0,$e.A)({name:"MonthCalendar",state:"hasFocus",controlled:S,default:null!=x&&x}),q=(0,Ee.A)(e=>{W(e),C&&C(e)}),X=o.useCallback(e=>{const t=L.startOfMonth(f&&L.isAfter(O,g)?O:g),r=L.startOfMonth(d&&L.isBefore(O,m)?O:m),n=L.startOfMonth(e);return!!L.isBefore(n,t)||!!L.isAfter(n,r)||!!v&&v(n)},[d,f,m,g,O,v,L]),Q=(0,Ee.A)((e,t)=>{if(b)return;const r=L.setMonth(null!=M?M:N,t);R(r)}),ee=(0,Ee.A)(e=>{X(L.setMonth(null!=M?M:N,e))||(H(e),q(!0),A&&A(e))});o.useEffect(()=>{H(e=>null!==$&&e!==$?$:e)},[$]);const re=(0,Ee.A)((e,t)=>{const r=12;switch(e.key){case"ArrowUp":ee((r+t-3)%r),e.preventDefault();break;case"ArrowDown":ee((r+t+3)%r),e.preventDefault();break;case"ArrowLeft":ee((r+t+("ltr"===D.direction?-1:1))%r),e.preventDefault();break;case"ArrowRight":ee((r+t+("ltr"===D.direction?1:-1))%r),e.preventDefault()}}),ne=(0,Ee.A)((e,t)=>{ee(t)}),oe=(0,Ee.A)((e,t)=>{V===t&&q(!1)});return(0,ie.jsx)(Pr,(0,n.A)({ref:t,className:(0,J.A)(z.root,i),ownerState:F,role:"radiogroup","aria-labelledby":I},k,{children:h(L,null!=M?M:N).map(e=>{const t=L.getMonth(e),r=L.format(e,"monthShort"),n=L.format(e,"month"),o=t===$,i=u||X(e);return(0,ie.jsx)(kr,{selected:o,value:t,onClick:Q,onKeyDown:re,autoFocus:G&&t===V,disabled:i,tabIndex:t===V?0:-1,onFocus:ne,onBlur:oe,"aria-current":B===t?"date":void 0,"aria-label":n,monthsPerRow:E,children:r},r)})}))});function Dr(e){return(0,re.Ay)("MuiPickersYear",e)}const Lr=(0,ne.A)("MuiPickersYear",["root","yearButton","selected","disabled"]),Nr=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow"],Fr=(0,ee.Ay)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})(({ownerState:e})=>({flexBasis:3===e.yearsPerRow?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),zr=(0,ee.Ay)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${Lr.disabled}`]:t.disabled},{[`&.${Lr.selected}`]:t.selected}]})(({theme:e})=>(0,n.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:(0,$t.X4)(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,$t.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Lr.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Lr.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Br=o.memo(function(e){const t=(0,U.A)({props:e,name:"MuiPickersYear"}),{autoFocus:r,className:i,children:a,disabled:s,selected:l,value:u,tabIndex:d,onClick:f,onKeyDown:p,onFocus:h,onBlur:m,"aria-current":g}=t,y=(0,c.A)(t,Nr),v=o.useRef(null),b=(e=>{const{disabled:t,selected:r,classes:n}=e,o={root:["root"],yearButton:["yearButton",t&&"disabled",r&&"selected"]};return(0,te.A)(o,Dr,n)})(t);return o.useEffect(()=>{r&&v.current.focus()},[r]),(0,ie.jsx)(Fr,(0,n.A)({className:(0,J.A)(b.root,i),ownerState:t},y,{children:(0,ie.jsx)(zr,{ref:v,disabled:s,type:"button",role:"radio",tabIndex:s?-1:d,"aria-current":g,"aria-checked":l,onClick:e=>f(e,u),onKeyDown:e=>p(e,u),onFocus:e=>h(e,u),onBlur:e=>m(e,u),className:b.yearButton,ownerState:t,children:a})}))});function jr(e){return(0,re.Ay)("MuiYearCalendar",e)}(0,ne.A)("MuiYearCalendar",["root"]);const $r=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsPerRow","timezone","gridLabelId"],Ur=(0,ee.Ay)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:320,maxHeight:280,boxSizing:"border-box",position:"relative"}),Vr=o.forwardRef(function(e,t){const r=function(e){var t;const r=Z(),o=Y(),i=(0,U.A)({props:e,name:"MuiYearCalendar"});return(0,n.A)({disablePast:!1,disableFuture:!1},i,{yearsPerRow:null!=(t=i.yearsPerRow)?t:3,minDate:p(r,i.minDate,o.minDate),maxDate:p(r,i.maxDate,o.maxDate)})}(e),{autoFocus:i,className:a,value:s,defaultValue:l,referenceDate:u,disabled:d,disableFuture:f,disablePast:h,maxDate:m,minDate:g,onChange:y,readOnly:v,shouldDisableYear:b,disableHighlightToday:_,onYearFocus:x,hasFocus:A,onFocusedViewChange:S,yearsPerRow:C,timezone:E,gridLabelId:T}=r,I=(0,c.A)(r,$r),{value:k,handleValueChange:M,timezone:R}=He({name:"YearCalendar",timezone:E,value:s,defaultValue:l,onChange:y,valueManager:j}),P=K(R),O=(0,Ar.A)(),D=Z(),L=o.useMemo(()=>j.getInitialReferenceValue({value:k,utils:D,props:r,timezone:R,referenceDate:u,granularity:w.year}),[]),N=r,F=(e=>{const{classes:t}=e;return(0,te.A)({root:["root"]},jr,t)})(N),z=o.useMemo(()=>D.getYear(P),[D,P]),B=o.useMemo(()=>null!=k?D.getYear(k):_?null:D.getYear(L),[k,D,_,L]),[$,V]=o.useState(()=>B||z),[H,G]=(0,$e.A)({name:"YearCalendar",state:"hasFocus",controlled:A,default:null!=i&&i}),W=(0,Ee.A)(e=>{G(e),S&&S(e)}),q=o.useCallback(e=>{if(h&&D.isBeforeYear(e,P))return!0;if(f&&D.isAfterYear(e,P))return!0;if(g&&D.isBeforeYear(e,g))return!0;if(m&&D.isAfterYear(e,m))return!0;if(!b)return!1;const t=D.startOfYear(e);return b(t)},[f,h,m,g,P,b,D]),X=(0,Ee.A)((e,t)=>{if(v)return;const r=D.setYear(null!=k?k:L,t);M(r)}),Q=(0,Ee.A)(e=>{q(D.setYear(null!=k?k:L,e))||(V(e),W(!0),null==x||x(e))});o.useEffect(()=>{V(e=>null!==B&&e!==B?B:e)},[B]);const ee=(0,Ee.A)((e,t)=>{switch(e.key){case"ArrowUp":Q(t-C),e.preventDefault();break;case"ArrowDown":Q(t+C),e.preventDefault();break;case"ArrowLeft":Q(t+("ltr"===O.direction?-1:1)),e.preventDefault();break;case"ArrowRight":Q(t+("ltr"===O.direction?1:-1)),e.preventDefault()}}),re=(0,Ee.A)((e,t)=>{Q(t)}),ne=(0,Ee.A)((e,t)=>{$===t&&W(!1)}),oe=o.useRef(null),ae=(0,be.A)(t,oe);return o.useEffect(()=>{if(i||null===oe.current)return;const e=oe.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,r=e.offsetTop,n=oe.current.clientHeight,o=oe.current.scrollTop,a=r+t;t>n||r{const t=D.getYear(e),r=t===B,n=d||q(e);return(0,ie.jsx)(Br,{selected:r,value:t,onClick:X,onKeyDown:ee,autoFocus:H&&t===$,disabled:n,tabIndex:t===$?0:-1,onFocus:re,onBlur:ne,"aria-current":z===t?"date":void 0,yearsPerRow:C,children:D.format(e,"year")},D.format(e,"year"))})}))});function Hr(e){return(0,re.Ay)("MuiPickersArrowSwitcher",e)}(0,ne.A)("MuiPickersArrowSwitcher",["root","spacer","button"]);const Gr=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],Wr=["ownerState"],qr=["ownerState"],Zr=(0,ee.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Yr=(0,ee.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Xr=(0,ee.Ay)(ve.A,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})(({ownerState:e})=>(0,n.A)({},e.hidden&&{visibility:"hidden"})),Kr=o.forwardRef(function(e,t){var r,o,i,a;const s="rtl"===(0,xt.A)().direction,l=(0,U.A)({props:e,name:"MuiPickersArrowSwitcher"}),{children:u,className:d,slots:f,slotProps:p,isNextDisabled:h,isNextHidden:m,onGoToNext:g,nextLabel:y,isPreviousDisabled:v,isPreviousHidden:b,onGoToPrevious:_,previousLabel:x}=l,w=(0,c.A)(l,Gr),A=l,S=(e=>{const{classes:t}=e;return(0,te.A)({root:["root"],spacer:["spacer"],button:["button"]},Hr,t)})(A),C={isDisabled:h,isHidden:m,goTo:g,label:y},E={isDisabled:v,isHidden:b,goTo:_,label:x},T=null!=(r=null==f?void 0:f.previousIconButton)?r:Xr,I=(0,ge.A)({elementType:T,externalSlotProps:null==p?void 0:p.previousIconButton,additionalProps:{size:"medium",title:E.label,"aria-label":E.label,disabled:E.isDisabled,edge:"end",onClick:E.goTo},ownerState:(0,n.A)({},A,{hidden:E.isHidden}),className:S.button}),k=null!=(o=null==f?void 0:f.nextIconButton)?o:Xr,M=(0,ge.A)({elementType:k,externalSlotProps:null==p?void 0:p.nextIconButton,additionalProps:{size:"medium",title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:"start",onClick:C.goTo},ownerState:(0,n.A)({},A,{hidden:C.isHidden}),className:S.button}),R=null!=(i=null==f?void 0:f.leftArrowIcon)?i:gt,P=(0,ge.A)({elementType:R,externalSlotProps:null==p?void 0:p.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),O=(0,c.A)(P,Wr),D=null!=(a=null==f?void 0:f.rightArrowIcon)?a:yt,L=(0,ge.A)({elementType:D,externalSlotProps:null==p?void 0:p.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),N=(0,c.A)(L,qr);return(0,ie.jsxs)(Zr,(0,n.A)({ref:t,className:(0,J.A)(S.root,d),ownerState:A},w,{children:[(0,ie.jsx)(T,(0,n.A)({},I,{children:s?(0,ie.jsx)(D,(0,n.A)({},N)):(0,ie.jsx)(R,(0,n.A)({},O))})),u?(0,ie.jsx)(Q.A,{variant:"subtitle1",component:"span",children:u}):(0,ie.jsx)(Yr,{className:S.spacer,ownerState:A}),(0,ie.jsx)(k,(0,n.A)({},M,{children:s?(0,ie.jsx)(R,(0,n.A)({},O)):(0,ie.jsx)(D,(0,n.A)({},N))}))]}))}),Jr=e=>(0,re.Ay)("MuiPickersCalendarHeader",e),Qr=(0,ne.A)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),en=["slots","slotProps","components","componentsProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone"],tn=["ownerState"],rn=(0,ee.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),nn=(0,ee.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>(0,n.A)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),on=(0,ee.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),an=(0,ee.Ay)(ve.A,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})(({ownerState:e})=>(0,n.A)({marginRight:"auto"},"year"===e.view&&{[`.${Qr.switchViewIcon}`]:{transform:"rotate(180deg)"}})),sn=(0,ee.Ay)(mt,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),ln=o.forwardRef(function(e,t){var r,i,a,s;const l=X(),u=Z(),d=(0,U.A)({props:e,name:"MuiPickersCalendarHeader"}),{slots:f,slotProps:p,components:h,currentMonth:m,disabled:g,disableFuture:y,disablePast:v,maxDate:b,minDate:_,onMonthChange:x,onViewChange:w,view:A,reduceAnimations:S,views:C,labelId:E,className:T,timezone:I}=d,k=(0,c.A)(d,en),M=d,R=(e=>{const{classes:t}=e;return(0,te.A)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Jr,t)})(d),P=null!=(r=null!=(i=null==f?void 0:f.switchViewButton)?i:null==h?void 0:h.SwitchViewButton)?r:an,O=(0,ge.A)({elementType:P,externalSlotProps:null==p?void 0:p.switchViewButton,additionalProps:{size:"small","aria-label":l.calendarViewSwitchingButtonAriaLabel(A)},ownerState:M,className:R.switchViewButton}),D=null!=(a=null!=(s=null==f?void 0:f.switchViewIcon)?s:null==h?void 0:h.SwitchViewIcon)?a:sn,L=(0,ge.A)({elementType:D,externalSlotProps:null==p?void 0:p.switchViewIcon,ownerState:void 0,className:R.switchViewIcon}),N=(0,c.A)(L,tn),F=function(e,{disableFuture:t,maxDate:r,timezone:n}){const i=Z();return o.useMemo(()=>{const o=i.dateWithTimezone(void 0,n),a=i.startOfMonth(t&&i.isBefore(o,r)?o:r);return!i.isAfter(a,e)},[t,r,e,i,n])}(m,{disableFuture:y,maxDate:b,timezone:I}),z=function(e,{disablePast:t,minDate:r,timezone:n}){const i=Z();return o.useMemo(()=>{const o=i.dateWithTimezone(void 0,n),a=i.startOfMonth(t&&i.isAfter(o,r)?o:r);return!i.isBefore(a,e)},[t,r,e,i,n])}(m,{disablePast:v,minDate:_,timezone:I});return 1===C.length&&"year"===C[0]?null:(0,ie.jsxs)(rn,(0,n.A)({},k,{ownerState:M,className:(0,J.A)(T,R.root),ref:t,children:[(0,ie.jsxs)(nn,{role:"presentation",onClick:()=>{if(1!==C.length&&w&&!g)if(2===C.length)w(C.find(e=>e!==A)||C[0]);else{const e=0!==C.indexOf(A)?0:1;w(C[e])}},ownerState:M,"aria-live":"polite",className:R.labelContainer,children:[(0,ie.jsx)(Bt,{reduceAnimations:S,transKey:u.format(m,"monthAndYear"),children:(0,ie.jsx)(on,{id:E,ownerState:M,className:R.label,children:u.format(m,"monthAndYear")})}),C.length>1&&!g&&(0,ie.jsx)(P,(0,n.A)({},O,{children:(0,ie.jsx)(D,(0,n.A)({},N))}))]}),(0,ie.jsx)(we.A,{in:"day"===A,children:(0,ie.jsx)(Kr,{slots:f,slotProps:p,onGoToPrevious:()=>x(u.addMonths(m,-1),"right"),isPreviousDisabled:z,previousLabel:l.previousMonth,onGoToNext:()=>x(u.addMonths(m,1),"left"),isNextDisabled:F,nextLabel:l.nextMonth})})]}))}),cn=(0,ee.Ay)("div")({overflow:"hidden",width:320,maxHeight:334,display:"flex",flexDirection:"column",margin:"0 auto"}),un=e=>(0,re.Ay)("MuiDateCalendar",e),dn=((0,ne.A)("MuiDateCalendar",["root","viewTransitionContainer"]),["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","components","componentsProps","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsPerRow","monthsPerRow","timezone"]),fn=(0,ee.Ay)(cn,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:334}),pn=(0,ee.Ay)(Bt,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),hn=o.forwardRef(function(e,t){var r,i,a;const s=Z(),l=(0,_e.A)(),u=function(e){var t,r,o,i,a,s,l;const c=Z(),u=Y(),d=Le(),f=(0,U.A)({props:e,name:"MuiDateCalendar"});return(0,n.A)({},f,{loading:null!=(t=f.loading)&&t,disablePast:null!=(r=f.disablePast)&&r,disableFuture:null!=(o=f.disableFuture)&&o,openTo:null!=(i=f.openTo)?i:"day",views:null!=(a=f.views)?a:["year","day"],reduceAnimations:null!=(s=f.reduceAnimations)?s:d,renderLoading:null!=(l=f.renderLoading)?l:()=>(0,ie.jsx)("span",{children:"..."}),minDate:p(c,f.minDate,u.minDate),maxDate:p(c,f.maxDate,u.maxDate)})}(e),{autoFocus:h,onViewChange:m,value:g,defaultValue:y,referenceDate:v,disableFuture:b,disablePast:_,defaultCalendarMonth:x,onChange:A,onYearChange:S,onMonthChange:C,reduceAnimations:E,shouldDisableDate:T,shouldDisableMonth:I,shouldDisableYear:k,view:M,views:R,openTo:P,className:O,disabled:D,readOnly:L,minDate:N,maxDate:F,disableHighlightToday:z,focusedView:B,onFocusedViewChange:$,showDaysOutsideCurrentMonth:V,fixedWeekNumber:H,dayOfWeekFormatter:G,components:W,componentsProps:q,slots:X,slotProps:K,loading:Q,renderLoading:ee,displayWeekNumber:re,yearsPerRow:ne,monthsPerRow:oe,timezone:ae}=u,se=(0,c.A)(u,dn),{value:le,handleValueChange:ce,timezone:ue}=He({name:"DateCalendar",timezone:ae,value:g,defaultValue:y,onChange:A,valueManager:j}),{view:de,setView:fe,focusedView:pe,setFocusedView:he,goToNextView:me,setValueAndGoToNextView:ye}=We({view:M,views:R,openTo:P,onChange:ce,onViewChange:m,autoFocus:h,focusedView:B,onFocusedViewChange:$}),{referenceDate:ve,calendarState:be,changeFocusedDay:xe,changeMonth:we,handleChangeMonth:Ae,isDateDisabled:Se,onMonthSwitchingAnimationEnd:Ce}=(e=>{const{value:t,referenceDate:r,defaultCalendarMonth:i,disableFuture:a,disablePast:s,disableSwitchToMonthOnDayFocus:l=!1,maxDate:c,minDate:u,onMonthChange:d,reduceAnimations:f,shouldDisableDate:p,timezone:h}=e,m=Z(),g=o.useRef(((e,t,r)=>(o,i)=>{switch(i.type){case"changeMonth":return(0,n.A)({},o,{slideDirection:i.direction,currentMonth:i.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return(0,n.A)({},o,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=o.focusedDay&&null!=i.focusedDay&&r.isSameDay(i.focusedDay,o.focusedDay))return o;const a=null!=i.focusedDay&&!t&&!r.isSameMonth(o.currentMonth,i.focusedDay);return(0,n.A)({},o,{focusedDay:i.focusedDay,isMonthSwitchingAnimating:a&&!e&&!i.withoutMonthSwitchingAnimation,currentMonth:a?r.startOfMonth(i.focusedDay):o.currentMonth,slideDirection:null!=i.focusedDay&&r.isAfterDay(i.focusedDay,o.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(f),l,m)).current,y=o.useMemo(()=>{let n=null;return r?n=r:i&&(n=m.startOfMonth(i)),j.getInitialReferenceValue({value:t,utils:m,timezone:h,props:e,referenceDate:n,granularity:w.day})},[]),[v,b]=o.useReducer(g,{isMonthSwitchingAnimating:!1,focusedDay:y,currentMonth:m.startOfMonth(y),slideDirection:"left"}),_=o.useCallback(e=>{b((0,n.A)({type:"changeMonth"},e)),d&&d(e.newMonth)},[d]),x=o.useCallback(e=>{const t=e;m.isSameMonth(t,v.currentMonth)||_({newMonth:m.startOfMonth(t),direction:m.isAfterDay(t,v.currentMonth)?"left":"right"})},[v.currentMonth,_,m]),A=Lt({shouldDisableDate:p,minDate:u,maxDate:c,disableFuture:a,disablePast:s,timezone:h}),S=o.useCallback(()=>{b({type:"finishMonthSwitchingAnimation"})},[]),C=(0,Ee.A)((e,t)=>{A(e)||b({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})});return{referenceDate:y,calendarState:v,changeMonth:x,changeFocusedDay:C,isDateDisabled:A,onMonthSwitchingAnimationEnd:S,handleChangeMonth:_}})({value:le,defaultCalendarMonth:x,referenceDate:v,reduceAnimations:E,onMonthChange:C,minDate:N,maxDate:F,shouldDisableDate:T,disablePast:_,disableFuture:b,timezone:ue}),Te=D&&le||N,Ie=D&&le||F,ke=`${l}-grid-label`,Me=null!==pe,Re=null!=(r=null!=(i=null==X?void 0:X.calendarHeader)?i:null==W?void 0:W.CalendarHeader)?r:ln,Pe=(0,ge.A)({elementType:Re,externalSlotProps:null!=(a=null==K?void 0:K.calendarHeader)?a:null==q?void 0:q.calendarHeader,additionalProps:{views:R,view:de,currentMonth:be.currentMonth,onViewChange:fe,onMonthChange:(e,t)=>Ae({newMonth:e,direction:t}),minDate:Te,maxDate:Ie,disabled:D,disablePast:_,disableFuture:b,reduceAnimations:E,timezone:ue,labelId:ke,slots:X,slotProps:K},ownerState:u}),Oe=(0,Ee.A)(e=>{const t=s.startOfMonth(e),r=s.endOfMonth(e),n=Se(e)?f({utils:s,date:e,minDate:s.isBefore(N,t)?t:N,maxDate:s.isAfter(F,r)?r:F,disablePast:_,disableFuture:b,isDateDisabled:Se,timezone:ue}):e;n?(ye(n,"finish"),null==C||C(t)):(me(),we(t)),xe(n,!0)}),De=(0,Ee.A)(e=>{const t=s.startOfYear(e),r=s.endOfYear(e),n=Se(e)?f({utils:s,date:e,minDate:s.isBefore(N,t)?t:N,maxDate:s.isAfter(F,r)?r:F,disablePast:_,disableFuture:b,isDateDisabled:Se,timezone:ue}):e;n?(ye(n,"finish"),null==S||S(n)):(me(),we(t)),xe(n,!0)}),Ne=(0,Ee.A)(e=>ce(e?d(s,e,null!=le?le:ve):e,"finish",de));o.useEffect(()=>{null!=le&&s.isValid(le)&&we(le)},[le]);const Fe=u,ze=(e=>{const{classes:t}=e;return(0,te.A)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},un,t)})(Fe),Be={disablePast:_,disableFuture:b,maxDate:F,minDate:N},je={disableHighlightToday:z,readOnly:L,disabled:D,timezone:ue,gridLabelId:ke},$e=o.useRef(de);o.useEffect(()=>{$e.current!==de&&(pe===$e.current&&he(de,!0),$e.current=de)},[pe,he,de]);const Ue=o.useMemo(()=>[le],[le]);return(0,ie.jsxs)(fn,(0,n.A)({ref:t,className:(0,J.A)(ze.root,O),ownerState:Fe},se,{children:[(0,ie.jsx)(Re,(0,n.A)({},Pe)),(0,ie.jsx)(pn,{reduceAnimations:E,className:ze.viewTransitionContainer,transKey:de,ownerState:Fe,children:(0,ie.jsxs)("div",{children:["year"===de&&(0,ie.jsx)(Vr,(0,n.A)({},Be,je,{value:le,onChange:De,shouldDisableYear:k,hasFocus:Me,onFocusedViewChange:e=>he("year",e),yearsPerRow:ne,referenceDate:ve})),"month"===de&&(0,ie.jsx)(Or,(0,n.A)({},Be,je,{hasFocus:Me,className:O,value:le,onChange:Oe,shouldDisableMonth:I,onFocusedViewChange:e=>he("month",e),monthsPerRow:oe,referenceDate:ve})),"day"===de&&(0,ie.jsx)(wr,(0,n.A)({},be,Be,je,{onMonthSwitchingAnimationEnd:Ce,onFocusedDayChange:xe,reduceAnimations:E,selectedDays:Ue,onSelectedDaysChange:Ne,shouldDisableDate:T,shouldDisableMonth:I,shouldDisableYear:k,hasFocus:Me,onFocusedViewChange:e=>he("day",e),showDaysOutsideCurrentMonth:V,fixedWeekNumber:H,dayOfWeekFormatter:G,displayWeekNumber:re,components:W,componentsProps:q,slots:X,slotProps:K,loading:Q,renderLoading:ee}))]})})]}))}),mn=({view:e,onViewChange:t,views:r,focusedView:n,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:h,shouldDisableDate:m,shouldDisableMonth:g,shouldDisableYear:v,reduceAnimations:b,onMonthChange:_,monthsPerRow:x,onYearChange:w,yearsPerRow:A,defaultCalendarMonth:S,components:C,componentsProps:E,slots:T,slotProps:I,loading:k,renderLoading:M,disableHighlightToday:R,readOnly:P,disabled:O,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:L,sx:N,autoFocus:F,fixedWeekNumber:z,displayWeekNumber:B,timezone:j})=>(0,ie.jsx)(hn,{view:e,onViewChange:t,views:r.filter(y),focusedView:n&&y(n)?n:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:h,shouldDisableDate:m,shouldDisableMonth:g,shouldDisableYear:v,reduceAnimations:b,onMonthChange:_,monthsPerRow:x,onYearChange:w,yearsPerRow:A,defaultCalendarMonth:S,components:C,componentsProps:E,slots:T,slotProps:I,loading:k,renderLoading:M,disableHighlightToday:R,readOnly:P,disabled:O,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:L,sx:N,autoFocus:F,fixedWeekNumber:z,displayWeekNumber:B,timezone:j}),gn=o.forwardRef(function(e,t){var r,i,a,l;const u=X(),d=Z(),f=function(e,t){var r,i,a,s;const l=Z(),c=Y(),u=(0,U.A)({props:e,name:t}),d=o.useMemo(()=>{var e;return null==(null==(e=u.localeText)?void 0:e.toolbarTitle)?u.localeText:(0,n.A)({},u.localeText,{datePickerToolbarTitle:u.localeText.toolbarTitle})},[u.localeText]),f=null!=(r=u.slots)?r:he(u.components);return(0,n.A)({},u,{localeText:d},(({openTo:e,defaultOpenTo:t,views:r,defaultViews:n})=>{const o=null!=r?r:n;let i;if(null!=e)i=e;else if(o.includes(t))i=t;else{if(!(o.length>0))throw new Error("MUI: The `views` prop must contain at least one view");i=o[0]}return{views:o,openTo:i}})({views:u.views,openTo:u.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:null!=(i=u.disableFuture)&&i,disablePast:null!=(a=u.disablePast)&&a,minDate:p(l,u.minDate,c.minDate),maxDate:p(l,u.maxDate,c.maxDate),slots:(0,n.A)({toolbar:pe},f),slotProps:null!=(s=u.slotProps)?s:u.componentsProps})}(e,"MuiDesktopDatePicker"),h=(0,n.A)({day:mn,month:mn,year:mn},f.viewRenderers),m=(0,n.A)({},f,{viewRenderers:h,format:v(d,f,!1),yearsPerRow:null!=(r=f.yearsPerRow)?r:4,slots:(0,n.A)({openPickerIcon:vt,field:Dt},f.slots),slotProps:(0,n.A)({},f.slotProps,{field:e=>{var r;return(0,n.A)({},(0,s.A)(null==(r=f.slotProps)?void 0:r.field,e),(e=>It.reduce((t,r)=>(e.hasOwnProperty(r)&&(t[r]=e[r]),t),{}))(f),{ref:t})},toolbar:(0,n.A)({hidden:!0},null==(i=f.slotProps)?void 0:i.toolbar)})}),{renderPicker:g}=(e=>{var t,r,i,a,s;let{props:l,getOpenDialogAriaText:u}=e,d=(0,c.A)(e,dt);const{slots:f,slotProps:p,className:h,sx:m,format:g,formatDensity:y,timezone:v,name:b,label:_,inputRef:x,readOnly:w,disabled:A,autoFocus:S,localeText:C,reduceAnimations:E}=l,T=Z(),I=o.useRef(null),k=o.useRef(null),M=(0,_e.A)(),R=null!=(t=null==p||null==(r=p.toolbar)?void 0:r.hidden)&&t,{open:P,actions:O,hasUIView:D,layoutProps:L,renderCurrentView:N,shouldRestoreFocus:F,fieldProps:z}=Ye((0,n.A)({},d,{props:l,inputRef:I,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),B=null!=(i=f.inputAdornment)?i:ye.A,j=(0,ge.A)({elementType:B,externalSlotProps:null==p?void 0:p.inputAdornment,additionalProps:{position:"end"},ownerState:l}),$=(0,c.A)(j,ft),U=null!=(a=f.openPickerButton)?a:ve.A,H=(0,ge.A)({elementType:U,externalSlotProps:null==p?void 0:p.openPickerButton,additionalProps:{disabled:A||w,onClick:P?O.onClose:O.onOpen,"aria-label":u(z.value,T),edge:$.position},ownerState:l}),G=(0,c.A)(H,pt),W=f.openPickerIcon,q=f.field,Y=(0,ge.A)({elementType:q,externalSlotProps:null==p?void 0:p.field,additionalProps:(0,n.A)({},z,R&&{id:M},{readOnly:w,disabled:A,className:h,sx:m,format:g,formatDensity:y,timezone:v,label:_,name:b,autoFocus:S&&!l.open,focused:!!P||void 0}),ownerState:l});D&&(Y.InputProps=(0,n.A)({},Y.InputProps,{ref:k},!l.disableOpenPicker&&{[`${$.position}Adornment`]:(0,ie.jsx)(B,(0,n.A)({},$,{children:(0,ie.jsx)(U,(0,n.A)({},G,{children:(0,ie.jsx)(W,(0,n.A)({},null==p?void 0:p.openPickerIcon))}))}))}));const X=(0,n.A)({textField:f.textField,clearIcon:f.clearIcon,clearButton:f.clearButton},Y.slots),K=null!=(s=f.layout)?s:ut,J=(0,be.A)(I,Y.inputRef,x);let Q=M;R&&(Q=_?`${M}-label`:void 0);const ee=(0,n.A)({},p,{toolbar:(0,n.A)({},null==p?void 0:p.toolbar,{titleId:M}),popper:(0,n.A)({"aria-labelledby":Q},null==p?void 0:p.popper)});return{renderPicker:()=>(0,ie.jsxs)(V.$,{localeText:C,children:[(0,ie.jsx)(q,(0,n.A)({},Y,{slots:X,slotProps:ee,inputRef:J})),(0,ie.jsx)(je,(0,n.A)({role:"dialog",placement:"bottom-start",anchorEl:k.current},O,{open:P,slots:f,slotProps:ee,shouldRestoreFocus:F,reduceAnimations:E,children:(0,ie.jsx)(K,(0,n.A)({},L,null==ee?void 0:ee.layout,{slots:f,slotProps:ee,children:N()}))}))]})}})({props:m,valueManager:j,valueType:"date",getOpenDialogAriaText:null!=(a=null==(l=m.localeText)?void 0:l.openDatePickerDialogue)?a:u.openDatePickerDialogue,validator:me});return g()});gn.propTypes={autoFocus:a().bool,className:a().string,closeOnSelect:a().bool,components:a().object,componentsProps:a().object,dayOfWeekFormatter:a().func,defaultCalendarMonth:a().any,defaultValue:a().any,disabled:a().bool,disableFuture:a().bool,disableHighlightToday:a().bool,disableOpenPicker:a().bool,disablePast:a().bool,displayWeekNumber:a().bool,fixedWeekNumber:a().number,format:a().string,formatDensity:a().oneOf(["dense","spacious"]),inputRef:l,label:a().node,loading:a().bool,localeText:a().object,maxDate:a().any,minDate:a().any,monthsPerRow:a().oneOf([3,4]),name:a().string,onAccept:a().func,onChange:a().func,onClose:a().func,onError:a().func,onMonthChange:a().func,onOpen:a().func,onSelectedSectionsChange:a().func,onViewChange:a().func,onYearChange:a().func,open:a().bool,openTo:a().oneOf(["day","month","year"]),orientation:a().oneOf(["landscape","portrait"]),readOnly:a().bool,reduceAnimations:a().bool,referenceDate:a().any,renderLoading:a().func,selectedSections:a().oneOfType([a().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),a().number,a().shape({endIndex:a().number.isRequired,startIndex:a().number.isRequired})]),shouldDisableDate:a().func,shouldDisableMonth:a().func,shouldDisableYear:a().func,showDaysOutsideCurrentMonth:a().bool,slotProps:a().object,slots:a().object,sx:a().oneOfType([a().arrayOf(a().oneOfType([a().func,a().object,a().bool])),a().func,a().object]),timezone:a().string,value:a().any,view:a().oneOf(["day","month","year"]),viewRenderers:a().shape({day:a().func,month:a().func,year:a().func}),views:a().arrayOf(a().oneOf(["day","month","year"]).isRequired),yearsPerRow:a().oneOf([3,4])}},zgNN(e,t,r){"use strict";r.d(t,{$:()=>u,F:()=>c});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("tCRK"),s=r("nKUr");const l=["localeText"],c=i.createContext(null),u=function(e){var t;const{localeText:r}=e,u=(0,o.A)(e,l),{utils:d,localeText:f}=null!=(t=i.useContext(c))?t:{utils:void 0,localeText:void 0},p=(0,a.A)({props:u,name:"MuiLocalizationProvider"}),{children:h,dateAdapter:m,dateFormats:g,dateLibInstance:y,adapterLocale:v,localeText:b}=p,_=i.useMemo(()=>(0,n.A)({},b,f,r),[b,f,r]),x=i.useMemo(()=>{if(!m)return d||null;const e=new m({locale:v,formats:g,instance:y});if(!e.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e},[m,v,g,y,d]),w=i.useMemo(()=>x?{minDate:x.date("1900-01-01T00:00:00.000"),maxDate:x.date("2099-12-31T00:00:00.000")}:null,[x]),A=i.useMemo(()=>({utils:x,defaultDates:w,localeText:_}),[w,x,_]);return(0,s.jsx)(c.Provider,{value:A,children:h})}},cXGl(e,t,r){"use strict";r.d(t,{f:()=>n});const n=(e,t="warning")=>{let r=!1;const n=Array.isArray(e)?e.join("\n"):e;return()=>{r||(r=!0,"error"===t?console.error(n):console.warn(n))}}},HQI6(e,t,r){"use strict";r.d(t,{K:()=>o});const n="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();n.__MUI_LICENSE_INFO__=n.__MUI_LICENSE_INFO__||{key:void 0};class o{static getLicenseInfo(){return n.__MUI_LICENSE_INFO__}static getLicenseKey(){return o.getLicenseInfo().key}static setLicenseKey(e){o.getLicenseInfo().key=e}}},aKzv(e,t,r){"use strict";function n(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;on})},eWwy(e,t,r){!function(e,t){"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r provider."));return e}(t.useContext(_),e)},S=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an provider."));return e}(t.useContext(x),e)},C=function(e){return(0,e.children)(A("mounts "))};C.propTypes={children:f.func.isRequired};var E=function(e,r,n){var o=!!n,i=t.useRef(n);t.useEffect(function(){i.current=n},[n]),t.useEffect(function(){if(!o||!e)return function(){};var t=function(){i.current&&i.current.apply(i,arguments)};return e.on(r,t),function(){e.off(r,t)}},[o,r,e,i])},T=function(e,r){var n,o="".concat((n=e).charAt(0).toUpperCase()+n.slice(1),"Element"),i=r?function(e){A("mounts <".concat(o,">")),S("mounts <".concat(o,">"));var r=e.id,n=e.className;return t.createElement("div",{id:r,className:n})}:function(r){var n,i=r.id,s=r.className,l=r.options,c=void 0===l?{}:l,u=r.onBlur,d=r.onFocus,f=r.onReady,h=r.onChange,m=r.onEscape,g=r.onClick,v=r.onLoadError,b=r.onLoaderStart,_=r.onNetworksChange,x=r.onCheckout,w=r.onLineItemClick,C=r.onConfirm,T=r.onCancel,I=r.onShippingAddressChange,k=r.onShippingRateChange,M=A("mounts <".concat(o,">")).elements,R=a(t.useState(null),2),P=R[0],O=R[1],D=t.useRef(null),L=t.useRef(null),N=S("mounts <".concat(o,">")),F=N.setCart,z=N.setCartState;E(P,"blur",u),E(P,"focus",d),E(P,"escape",m),E(P,"click",g),E(P,"loaderror",v),E(P,"loaderstart",b),E(P,"networkschange",_),E(P,"lineitemclick",w),E(P,"confirm",C),E(P,"cancel",T),E(P,"shippingaddresschange",I),E(P,"shippingratechange",k),"cart"===e?n=function(e){z(e),f&&f(e)}:f&&(n="payButton"===e?f:function(){f(P)}),E(P,"ready",n),E(P,"change","cart"===e?function(e){z(e),h&&h(e)}:h),E(P,"checkout","cart"===e?function(e){z(e),x&&x(e)}:x),t.useLayoutEffect(function(){if(null===D.current&&M&&null!==L.current){var t=M.create(e,c);"cart"===e&&F&&F(t),D.current=t,O(t),t.mount(L.current)}},[M,c,F]);var B=p(c);return t.useEffect(function(){if(D.current){var e=y(c,B,["paymentRequest"]);e&&D.current.update(e)}},[c,B]),t.useLayoutEffect(function(){return function(){D.current&&(D.current.destroy(),D.current=null)}},[]),t.createElement("div",{id:i,className:s,ref:L})};return i.propTypes={id:f.string,className:f.string,onChange:f.func,onBlur:f.func,onFocus:f.func,onReady:f.func,onEscape:f.func,onClick:f.func,onLoadError:f.func,onLoaderStart:f.func,onNetworksChange:f.func,onCheckout:f.func,onLineItemClick:f.func,onConfirm:f.func,onCancel:f.func,onShippingAddressChange:f.func,onShippingRateChange:f.func,options:f.object},i.displayName=o,i.__elementType=e,i},I="undefined"==typeof window,k=T("auBankAccount",I),M=T("card",I),R=T("cardNumber",I),P=T("cardExpiry",I),O=T("cardCvc",I),D=T("fpxBank",I),L=T("iban",I),N=T("idealBank",I),F=T("p24Bank",I),z=T("epsBank",I),B=T("payment",I),j=T("payButton",I),$=T("paymentRequestButton",I),U=T("linkAuthentication",I),V=T("address",I),H=T("shippingAddress",I),G=T("cart",I),W=T("paymentMethodMessaging",I),q=T("affirmMessage",I),Z=T("afterpayClearpayMessage",I);e.AddressElement=V,e.AffirmMessageElement=q,e.AfterpayClearpayMessageElement=Z,e.AuBankAccountElement=k,e.CardCvcElement=O,e.CardElement=M,e.CardExpiryElement=P,e.CardNumberElement=R,e.CartElement=G,e.Elements=w,e.ElementsConsumer=C,e.EpsBankElement=z,e.FpxBankElement=D,e.IbanElement=L,e.IdealBankElement=N,e.LinkAuthenticationElement=U,e.P24BankElement=F,e.PayButtonElement=j,e.PaymentElement=B,e.PaymentMethodMessagingElement=W,e.PaymentRequestButtonElement=$,e.ShippingAddressElement=H,e.useCartElement=function(){return S("calls useCartElement()").cart},e.useCartElementState=function(){return S("calls useCartElementState()").cartState},e.useElements=function(){return A("calls useElements()").elements},e.useStripe=function(){return A("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,r("q1tI"))},"v4r+"(e,t,r){"use strict";r.d(t,{c:()=>c});var n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,i="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",a=null,s=Promise.resolve().then(function(){return e=null,null!==a||(a=new Promise(function(t,r){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(i),window.Stripe)t(window.Stripe);else try{var a=function(){for(var e=document.querySelectorAll('script[src^="'.concat(n,'"]')),t=0;t element.");return o.appendChild(r),r}(e)),a.addEventListener("load",function(){window.Stripe?t(window.Stripe):r(new Error("Stripe.js not available"))}),a.addEventListener("error",function(){r(new Error("Failed to load Stripe.js"))})}catch(e){return void r(e)}else t(null)})),a;var e}),l=!1;s.catch(function(e){l||console.warn(e)});var c=function(){for(var e=arguments.length,t=new Array(e),r=0;re[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},t.radiansToLength=u,t.lengthToRadians=d,t.lengthToDegrees=function(e,t){return f(d(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=f,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(d(e,t),r)},t.convertArea=function(e,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var o=t.areaFactors[r];if(!o)throw new Error("invalid original units");var i=t.areaFactors[n];if(!i)throw new Error("invalid final units");return e/o*i},t.isNumber=p,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(e){if(!p(e))throw new Error("bbox must only contain numbers")})},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},"2TsN"(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("Vp63");function o(e,t,r){if(null!==e)for(var n,i,a,s,l,c,u,d,f=0,p=0,h=e.type,m="FeatureCollection"===h,g="Feature"===h,y=m?e.features.length:1,v=0;vc||p>u||h>d)return l=o,c=r,u=p,d=h,void(a=0);var m=n.lineString([l,o],e.properties);if(!1===t(m,r,i,h,a))return!1;a++,l=o})&&void 0}}})}function u(e,t){if(!e)throw new Error("geojson is required");l(e,function(e,r,o){if(null!==e.geometry){var i=e.geometry.type,a=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,r,o,0,0))return!1;break;case"Polygon":for(var s=0;s0?r:0),!0)},o?o(e.exports,"apply",{value:a}):e.exports.apply=a},"O7/Y"(e,t,r){"use strict";var n=r("AM7I"),o=r("+a6j"),i=o([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o([r]):r}},h9Cn(e,t,r){"use strict";r.d(t,{A:()=>ge});var n=r("J8ja"),o=r.n(n),i=r("JPst"),a=r.n(i),s=r("HeW1"),l=r.n(s),c=new URL(r("v0lU"),r.b),u=new URL(r("vrwW"),r.b),d=new URL(r("xkAX"),r.b),f=new URL(r("D4A9"),r.b),p=new URL(r("Rg+V"),r.b),h=new URL(r("/qDb"),r.b),m=new URL(r("9nmC"),r.b),g=new URL(r("ijaa"),r.b),y=new URL(r("cPET"),r.b),v=new URL(r("mcLR"),r.b),b=new URL(r("ldEj"),r.b),_=new URL(r("SRPE"),r.b),x=new URL(r("wJqt"),r.b),w=new URL(r("qV5W"),r.b),A=new URL(r("fXVG"),r.b),S=new URL(r("O25N"),r.b),C=new URL(r("g8m3"),r.b),E=new URL(r("EtES"),r.b),T=new URL(r("yYRx"),r.b),I=new URL(r("9mUm"),r.b),k=new URL(r("vrl9"),r.b),M=new URL(r("s4P4"),r.b),R=new URL(r("7v2w"),r.b),P=new URL(r("zBuc"),r.b),O=new URL(r("xO8h"),r.b),D=new URL(r("trXz"),r.b),L=new URL(r("vLF0"),r.b),N=new URL(r("oWHy"),r.b),F=new URL(r("7qhf"),r.b),z=new URL(r("b/dZ"),r.b),B=a()(o()),j=l()(c),$=l()(u),U=l()(d),V=l()(f),H=l()(p),G=l()(h),W=l()(m),q=l()(g),Z=l()(y),Y=l()(v),X=l()(b),K=l()(_),J=l()(x),Q=l()(w),ee=l()(A),te=l()(S),re=l()(C),ne=l()(E),oe=l()(T),ie=l()(I),ae=l()(k),se=l()(M),le=l()(R),ce=l()(P),ue=l()(O),de=l()(D),fe=l()(L),pe=l()(N),he=l()(F),me=l()(z);B.push([e.id,`.mapboxgl-map{-webkit-tap-highlight-color:rgba(0, 0, 0,0);font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative}.mapboxgl-canvas{left:0;position:absolute;top:0}.mapboxgl-map:-webkit-full-screen{height:100%;width:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:grab;-webkit-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.mapboxgl-ctrl-top-left{left:0;top:0}.mapboxgl-ctrl-top-right{right:0;top:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{bottom:0;right:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{float:left;margin:10px 0 0 10px}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{float:right;margin:10px 10px 0 0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{float:left;margin:0 0 10px 10px}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{float:right;margin:0 10px 10px 0}.mapboxgl-ctrl-group{background:#fff;border-radius:4px}.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;overflow:hidden;padding:0;width:29px}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl-group button:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:only-child{border-radius:inherit}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgba(0, 0, 0,0.05)}.mapboxgl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(${j})}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(${$})}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(${U})}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(${V})}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(${H})}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(${G})}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(${W})}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(${q})}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(${Z})}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(${Y})}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(${X})}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(${K})}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(${J})}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(${Q})}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(${ee})}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(${te})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(${re})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url(${ne})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url(${oe})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url(${ie})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url(${ae})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(${se})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(${le})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url(${ne})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url(${oe})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url(${ie})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url(${ae})}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(${ce})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(${ue})}}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{background-image:url(${de});background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url(${fe})}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url(${pe})}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{background-color:#fff;border-radius:12px;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(${he});border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgba(0, 0, 0,0.05)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{right:0;top:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{left:0;top:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url(${me})}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url(${he})}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);-webkit-text-decoration:none;text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.mapboxgl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.mapboxgl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.mapboxgl-popup-close-button:hover{background-color:rgba(0, 0, 0,0.05)}.mapboxgl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto;position:relative}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{left:0;opacity:1;position:absolute;top:0;transition:opacity .2s;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.mapboxgl-user-location-dot:before{animation:mapboxgl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.mapboxgl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading{height:0;width:0}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after,.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-bottom:7.5px solid #4aa1eb;content:"";position:absolute}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-left:7.5px solid transparent;transform:translateY(-28px) skewY(-20deg)}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after{border-right:7.5px solid transparent;transform:translate(7.5px,-28px) skewY(20deg)}@keyframes mapboxgl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:rgba(29,161,242,0.2);border-radius:100%;height:1px;width:1px}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}@media print{.mapbox-improve-map{display:none}}.mapboxgl-scroll-zoom-blocker,.mapboxgl-touch-pan-blocker{align-items:center;background:rgba(0,0,0,.7);color:#fff;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;height:100%;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;text-align:center;top:0;transition:opacity .75s ease-in-out;transition-delay:1s;width:100%}.mapboxgl-scroll-zoom-blocker-show,.mapboxgl-touch-pan-blocker-show{opacity:1;transition:opacity .1s ease-in-out}.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page,.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page .mapboxgl-canvas{touch-action:pan-x pan-y}`,""]);const ge=B},JPst(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},HeW1(e){"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},J8ja(e){"use strict";e.exports=function(e){return e[1]}},Wgwc(e){e.exports=function(){"use strict";var e=6e4,t=36e5,r="millisecond",n="second",o="minute",i="hour",a="day",s="week",l="month",c="quarter",u="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(o,2,"0")},m:function e(t,r){if(t.date()1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!n&&o&&(v=o),o||!n&&v},A=function(e,t){if(x(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new C(r)},S=y;S.l=w,S.i=x,S.w=function(e,t){return A(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[_]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===f)},g.isSame=function(e,t){var r=A(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return A(e)68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),r=60*t[1]+(+t[2]||0);return 0===r?0:"+"===t[0]?-r:r}(e)}],u=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var r,n=a.meridiem;if(n){for(var o=1;o<=24;o+=1)if(e.indexOf(n(o,0,t))>-1){r=o>12;break}}else r=e===(t?"pm":"PM");return r},f={A:[i,function(e){this.afternoon=d(e,!1)}],a:[i,function(e){this.afternoon=d(e,!0)}],Q:[r,function(e){this.month=3*(e-1)+1}],S:[r,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,l("seconds")],ss:[o,l("seconds")],m:[o,l("minutes")],mm:[o,l("minutes")],H:[o,l("hours")],h:[o,l("hours")],HH:[o,l("hours")],hh:[o,l("hours")],D:[o,l("day")],DD:[n,l("day")],Do:[i,function(e){var t=a.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],w:[o,l("week")],ww:[n,l("week")],M:[o,l("month")],MM:[n,l("month")],MMM:[i,function(e){var t=u("months"),r=(u("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(r<1)throw new Error;this.month=r%12||r}],MMMM:[i,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\d{4}/,l("year")],Z:c,ZZ:c};function p(r){var n,o;n=r,o=a&&a.formats;for(var i=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,r,n){var i=n&&n.toUpperCase();return r||o[n]||e[n]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})).match(t),s=i.length,l=0;l-1)return new Date(("X"===t?1e3:1)*e);var o=p(t)(e),i=o.year,a=o.month,s=o.day,l=o.hours,c=o.minutes,u=o.seconds,d=o.milliseconds,f=o.zone,h=o.week,m=new Date,g=s||(i||a?1:m.getDate()),y=i||m.getFullYear(),v=0;i&&!a||(v=a>0?a-1:m.getMonth());var b,_=l||0,x=c||0,w=u||0,A=d||0;return f?new Date(Date.UTC(y,v,g,_,x,w,A+60*f.offset*1e3)):r?new Date(Date.UTC(y,v,g,_,x,w,A)):(b=new Date(y,v,g,_,x,w,A),h&&(b=n(b).week(h).toDate()),b)}catch(e){return new Date("")}}(t,s,n,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date("")),a={}}else if(s instanceof Array)for(var f=s.length,h=1;h<=f;h+=1){i[1]=s[h-1];var m=r.apply(this,i);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}h===f&&(this.$d=new Date(""))}else o.call(this,e)}}}()},"5Bip"(e){e.exports=function(){"use strict";return function(e,t,r){t.prototype.isBetween=function(e,t,n,o){var i=r(e),a=r(t),s="("===(o=o||"()")[0],l=")"===o[1];return(s?this.isAfter(i,n):!this.isBefore(i,n))&&(l?this.isBefore(a,n):!this.isAfter(a,n))||(s?this.isBefore(i,n):!this.isAfter(i,n))&&(l?this.isAfter(a,n):!this.isBefore(a,n))}}}()},I631(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,r,n){var o=r.prototype,i=o.format;n.en.formats=e,o.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var r=this.$locale().formats,n=function(t,r){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,n,o){var i=o&&o.toUpperCase();return n||r[o]||e[o]||r[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})}(t,void 0===r?{}:r);return i.call(this,n)}}}()},KgQy(e){e.exports=function(){"use strict";var e="week",t="year";return function(r,n,o){var i=n.prototype;i.week=function(r){if(void 0===r&&(r=null),null!==r)return this.add(7*(r-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var i=o(this).startOf(t).add(1,t).date(n),a=o(this).endOf(e);if(i.isBefore(a))return 1}var s=o(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),l=this.diff(s,e,!0);return l<0?o(this).startOf("week").week():Math.ceil(l)},i.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},f66B(e,t,r){var n=r("1seS"),o=r("45zb"),i=r("bbcx"),a=r("2Nju"),s=r("5xAX"),l=r("DmXP"),c=Date.prototype.getTime;function u(e){return null==e}function d(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}e.exports=function e(t,r,f){var p=f||{};return!!(p.strict?i(t,r):t===r)||(!t||!r||"object"!=typeof t&&"object"!=typeof r?p.strict?i(t,r):t==r:function(t,r,i){var f,p;if(typeof t!=typeof r)return!1;if(u(t)||u(r))return!1;if(t.prototype!==r.prototype)return!1;if(o(t)!==o(r))return!1;var h=a(t),m=a(r);if(h!==m)return!1;if(h||m)return t.source===r.source&&s(t)===s(r);if(l(t)&&l(r))return c.call(t)===c.call(r);var g=d(t),y=d(r);if(g!==y)return!1;if(g||y){if(t.length!==r.length)return!1;for(f=0;f=0;f--)if(v[f]!=b[f])return!1;for(f=v.length-1;f>=0;f--)if(!e(t[p=v[f]],r[p],i))return!1;return!0}(t,r,p))}},eZIG(e,t,r){"use strict";var n=r("cckQ"),o=r("Z+6F"),i=r("DSU0"),a=r("Kqna");e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(n)n(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===s&&d?d.enumerable:!s,value:r,writable:null===l&&d?d.writable:!l});else{if(!u&&(s||l||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},"82c2"(e,t,r){"use strict";var n=r("1seS"),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r("eZIG"),l=r("ZLCw")(),c=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;l?s(e,t,r,!0):s(e,t,r)},u=function(e,t){var r=arguments.length>2?arguments[2]:{},i=n(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s=this.minPts&&(t=this._mergeArrays(t,o))}1!==this._assigned[n]&&this._addToCluster(n,e)}},t.prototype._addToCluster=function(e,t){this.clusters[t].push(e),this._assigned[e]=1},t.prototype._regionQuery=function(e){for(var t=[],r=0;r0){for(l=0;l=0);return e},t.prototype.assign=function(){for(var e,t=!1,r=this.dataset.length,n=0;n=this.minPts)return r},o.prototype._regionQuery=function(e,t){t=t||this.epsilon;for(var r=[],n=0,o=this.dataset.length;no&&(r=n):t80*n){i=s=e[0],a=l=e[1];for(var b=n;bs&&(s=d),f>l&&(l=f);h=0!==(h=Math.max(s-i,l-a))?32767/h:0}return o(y,v,n,i,a,h,0),v}function r(e,t,r,n,o){var i,a;if(o===E(e,t,r,n)>0)for(i=t;i=t;i-=n)a=A(i,e[i],e[i+1],a);return a&&y(a,a.next)&&(S(a),a=a.next),a}function n(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(S(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function o(e,t,r,c,u,d,p){if(e){!p&&d&&function(e,t,r,n){var o=e;do{0===o.z&&(o.z=f(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,a,s,l,c=1;do{for(r=e,e=null,i=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(o=r,r=r.nextZ,s--):(o=n,n=n.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}(e,c,u,d);for(var h,m,g=e;e.prev!==e.next;)if(h=e.prev,m=e.next,d?a(e,c,u,d):i(e))t.push(h.i/r|0),t.push(e.i/r|0),t.push(m.i/r|0),S(e),e=m.next,g=m.next;else if((e=m)===g){p?1===p?o(e=s(n(e),t,r),t,r,c,u,d,2):2===p&&l(e,t,r,c,u,d):o(n(e),t,r,c,u,d,1);break}}}function i(e){var t=e.prev,r=e,n=e.next;if(g(t,r,n)>=0)return!1;for(var o=t.x,i=r.x,a=n.x,s=t.y,l=r.y,c=n.y,u=oi?o>a?o:a:i>a?i:a,p=s>l?s>c?s:c:l>c?l:c,m=n.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&h(o,s,i,l,a,c,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(e,t,r,n){var o=e.prev,i=e,a=e.next;if(g(o,i,a)>=0)return!1;for(var s=o.x,l=i.x,c=a.x,u=o.y,d=i.y,p=a.y,m=sl?s>c?s:c:l>c?l:c,b=u>d?u>p?u:p:d>p?d:p,_=f(m,y,t,r,n),x=f(v,b,t,r,n),w=e.prevZ,A=e.nextZ;w&&w.z>=_&&A&&A.z<=x;){if(w.x>=m&&w.x<=v&&w.y>=y&&w.y<=b&&w!==o&&w!==a&&h(s,u,l,d,c,p,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,A.x>=m&&A.x<=v&&A.y>=y&&A.y<=b&&A!==o&&A!==a&&h(s,u,l,d,c,p,A.x,A.y)&&g(A.prev,A,A.next)>=0)return!1;A=A.nextZ}for(;w&&w.z>=_;){if(w.x>=m&&w.x<=v&&w.y>=y&&w.y<=b&&w!==o&&w!==a&&h(s,u,l,d,c,p,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;A&&A.z<=x;){if(A.x>=m&&A.x<=v&&A.y>=y&&A.y<=b&&A!==o&&A!==a&&h(s,u,l,d,c,p,A.x,A.y)&&g(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function s(e,t,r){var o=e;do{var i=o.prev,a=o.next.next;!y(i,a)&&v(i,o,o.next,a)&&x(i,a)&&x(a,i)&&(t.push(i.i/r|0),t.push(o.i/r|0),t.push(a.i/r|0),S(o),S(o.next),o=e=a),o=o.next}while(o!==e);return n(o)}function l(e,t,r,i,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=w(l,c);return l=n(l,l.next),u=n(u,u.next),o(l,t,r,i,a,s,0),void o(u,t,r,i,a,s,0)}c=c.next}l=l.next}while(l!==e)}function c(e,t){return e.x-t.x}function u(e,t){var r=function(e,t){var r,n=t,o=e.x,i=e.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=o&&s>a&&(a=s,r=n.x=n.x&&n.x>=u&&o!==n.x&&h(ir.x||n.x===r.x&&d(r,n)))&&(r=n,p=l)),n=n.next}while(n!==c);return r}(e,t);if(!r)return t;var o=w(r,e);return n(o,o.next),n(r,r.next)}function d(e,t){return g(e.prev,e,t.prev)<0&&g(t.next,e,e.next)<0}function f(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function p(e){var t=e,r=e;do{(t.x=(e-a)*(i-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(i-s)>=(o-a)*(n-s)}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&v(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(x(e,t)&&x(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(g(e.prev,e,t.prev)||g(e,t.prev,t))||y(e,t)&&g(e.prev,e,e.next)>0&&g(t.prev,t,t.next)>0)}function g(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function y(e,t){return e.x===t.x&&e.y===t.y}function v(e,t,r,n){var o=_(g(e,t,r)),i=_(g(e,t,n)),a=_(g(r,n,e)),s=_(g(r,n,t));return o!==i&&a!==s||!(0!==o||!b(e,r,t))||!(0!==i||!b(e,n,t))||!(0!==a||!b(r,e,n))||!(0!==s||!b(r,t,n))}function b(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function _(e){return e>0?1:e<0?-1:0}function x(e,t){return g(e.prev,e,e.next)<0?g(e,t,e.next)>=0&&g(e,e.prev,t)>=0:g(e,t,e.prev)<0||g(e,e.next,t)<0}function w(e,t){var r=new C(e.i,e.x,e.y),n=new C(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function A(e,t,r,n){var o=new C(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function S(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function C(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E(e,t,r,n){for(var o=0,i=t,a=r-n;i0&&(n+=e[o-1].length,r.holes.push(n))}return r}},cckQ(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},QX98(e){"use strict";e.exports=EvalError},pkW7(e){"use strict";e.exports=Error},"3JnH"(e){"use strict";e.exports=RangeError},FAml(e){"use strict";e.exports=ReferenceError},"Z+6F"(e){"use strict";e.exports=SyntaxError},DSU0(e){"use strict";e.exports=TypeError},Z9lY(e){"use strict";e.exports=URIError},ooQL(e){"use strict";e.exports=Object},Iab2(e,t,r){var n,o;void 0===(o="function"==typeof(n=function(){"use strict";function t(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){s(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof r.g&&r.g.global===r.g?r.g:void 0,a=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,r,a){var s=i.URL||i.webkitURL,l=document.createElement("a");r=r||e.name||"download",l.download=r,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):n(l.href)?t(e,r,a):o(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout(function(){s.revokeObjectURL(l.href)},4e4),setTimeout(function(){o(l)},0))}:"msSaveOrOpenBlob"in navigator?function(e,r,i){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,i),r);else if(n(e))t(e,r,i);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout(function(){o(a)})}}:function(e,r,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,r,n);var s="application/octet-stream"===e.type,l=/constructor/i.test(i.HTMLElement)||i.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&l||a)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},u.readAsDataURL(e)}else{var d=i.URL||i.webkitURL,f=d.createObjectURL(e);o?o.location=f:location.href=f,o=null,setTimeout(function(){d.revokeObjectURL(f)},4e4)}});i.saveAs=s.saveAs=s,e.exports=s})?n.apply(t,[]):n)||(e.exports=o)},"1vpa"(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("Istr"),o=r("q1tI"),i=r("82gj"),a=r("/ekA"),s=r("4zEH"),l=r("s1vs");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var d=u(o),f=c(o),p=c(l),h=function(e){return{isEnabled:function(t){return e.some(function(e){return!!t[e]})}}},m={measureLayout:h(["layout","layoutId","drag","_layoutResetTransform"]),animation:h(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:h(["exit"]),drag:h(["drag","dragControls"]),focus:h(["whileFocus"]),hover:h(["whileHover","onHoverStart","onHoverEnd"]),tap:h(["whileTap","onTap","onTapStart","onTapCancel"]),pan:h(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:h(["layout","layoutId"])};function g(e){for(var t in e){var r=e[t];null!==r&&(m[t].Component=r)}}var y=o.createContext({strict:!1}),v=Object.keys(m),b=v.length,_=o.createContext({transformPagePoint:function(e){return e},isStatic:!1}),x=o.createContext({});function w(){return o.useContext(x).visualElement}var A=o.createContext(null);function S(e){var t=o.useRef(null);return null===t.current&&(t.current=e()),t.current}function C(){var e=o.useContext(A);if(null===e)return[!0,null];var t=e.isPresent,r=e.onExitComplete,n=e.register,i=k();return o.useEffect(function(){return n(i)},[]),!t&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function E(e){return null===e||e.isPresent}var T=0,I=function(){return T++},k=function(){return S(I)},M=o.createContext(null),R="undefined"!=typeof window,P=R?o.useLayoutEffect:o.useEffect;function O(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function D(e){return Array.isArray(e)}function L(e){return"string"==typeof e||D(e)}function N(e,t,r,n,o){var i;return void 0===n&&(n={}),void 0===o&&(o={}),"string"==typeof t&&(t=null===(i=e.variants)||void 0===i?void 0:i[t]),"function"==typeof t?t(null!=r?r:e.custom,n,o):t}function F(e,t,r){var n=e.getProps();return N(n,t,null!=r?r:n.custom,function(e){var t={};return e.forEachValue(function(e,r){return t[r]=e.get()}),t}(e),function(e){var t={};return e.forEachValue(function(e,r){return t[r]=e.getVelocity()}),t}(e))}function z(e){var t;return"function"==typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||L(e.initial)||L(e.animate)||L(e.whileHover)||L(e.whileDrag)||L(e.whileTap)||L(e.whileFocus)||L(e.exit)}function B(e){return Boolean(z(e)||e.variants)}function j(e){return Array.isArray(e)?e.join(" "):e}function $(e){var t=e.preloadedFeatures,r=e.createVisualElement,i=e.useRender,a=e.useVisualState,s=e.Component;return t&&g(t),o.forwardRef(function(e,t){var l=o.useContext(_).isStatic,c=null,u=function(e,t){var r=function(e,t){if(z(e)){var r=e.initial,n=e.animate;return{initial:!1===r||L(r)?r:void 0,animate:L(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,o.useContext(x)),n=r.initial,i=r.animate;return o.useMemo(function(){return{initial:n,animate:i}},t?[j(n),j(i)]:[])}(e,l),f=a(e,l);return!l&&R&&(u.visualElement=function(e,t,r,i){var a=o.useContext(_),s=o.useContext(y),l=w(),c=o.useContext(A),u=function(e){var t=e.layoutId,r=o.useContext(M);return r&&void 0!==t?r+"-"+t:t}(r),d=o.useRef(void 0);i||(i=s.renderer),!d.current&&i&&(d.current=i(e,{visualState:t,parent:l,props:n.__assign(n.__assign({},r),{layoutId:u}),presenceId:null==c?void 0:c.id,blockInitialAnimation:!1===(null==c?void 0:c.initial)}));var f=d.current;return P(function(){f&&(f.setProps(n.__assign(n.__assign(n.__assign({},a),r),{layoutId:u})),f.isPresent=E(c),f.isPresenceRoot=!l||l.presenceId!==(null==c?void 0:c.id),f.syncRender())}),o.useEffect(function(){var e;f&&(null===(e=f.animationState)||void 0===e||e.animateChanges())}),P(function(){return function(){return null==f?void 0:f.notifyUnmount()}},[]),f}(s,f,e,r),c=function(e,t){var r=[];if(o.useContext(y),!t)return null;for(var i=0;i-1||/[A-Z]/.test(e))}var G={};function W(e){for(var t in e)G[t]=e[t]}var q=["","X","Y","Z"],Z=["transformPerspective","x","y","z"];function Y(e,t){return Z.indexOf(e)-Z.indexOf(t)}["translate","scale","rotate","skew"].forEach(function(e){return q.forEach(function(t){return Z.push(e+t)})});var X=new Set(Z);function K(e){return X.has(e)}var J=new Set(["originX","originY","originZ"]);function Q(e){return J.has(e)}function ee(e,t){var r=t.layout,n=t.layoutId;return K(e)||Q(e)||(r||void 0!==n)&&(!!G[e]||"opacity"===e)}var te=function(e){return null!==e&&"object"==typeof e&&e.getVelocity},re={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function ne(e){return e.startsWith("--")}var oe=function(e,t){return t&&"number"==typeof e?t.transform(e):e},ie=n.__assign(n.__assign({},a.number),{transform:Math.round}),ae={borderWidth:a.px,borderTopWidth:a.px,borderRightWidth:a.px,borderBottomWidth:a.px,borderLeftWidth:a.px,borderRadius:a.px,radius:a.px,borderTopLeftRadius:a.px,borderTopRightRadius:a.px,borderBottomRightRadius:a.px,borderBottomLeftRadius:a.px,width:a.px,maxWidth:a.px,height:a.px,maxHeight:a.px,size:a.px,top:a.px,right:a.px,bottom:a.px,left:a.px,padding:a.px,paddingTop:a.px,paddingRight:a.px,paddingBottom:a.px,paddingLeft:a.px,margin:a.px,marginTop:a.px,marginRight:a.px,marginBottom:a.px,marginLeft:a.px,rotate:a.degrees,rotateX:a.degrees,rotateY:a.degrees,rotateZ:a.degrees,scale:a.scale,scaleX:a.scale,scaleY:a.scale,scaleZ:a.scale,skew:a.degrees,skewX:a.degrees,skewY:a.degrees,distance:a.px,translateX:a.px,translateY:a.px,translateZ:a.px,x:a.px,y:a.px,z:a.px,perspective:a.px,transformPerspective:a.px,opacity:a.alpha,originX:a.progressPercentage,originY:a.progressPercentage,originZ:a.px,zIndex:ie,fillOpacity:a.alpha,strokeOpacity:a.alpha,numOctaves:ie};function se(e,t,r,n,o,i,a,s){var l,c=e.style,u=e.vars,d=e.transform,f=e.transformKeys,p=e.transformOrigin;f.length=0;var h=!1,m=!1,g=!0;for(var y in t){var v=t[y];if(ne(y))u[y]=v;else{var b=ae[y],_=oe(v,b);if(K(y)){if(h=!0,d[y]=_,f.push(y),!g)continue;v!==(null!==(l=b.default)&&void 0!==l?l:0)&&(g=!1)}else if(Q(y))p[y]=_,m=!0;else if((null==r?void 0:r.isHydrated)&&(null==n?void 0:n.isHydrated)&&G[y]){var x=G[y].process(v,n,r),w=G[y].applyTo;if(w)for(var A=w.length,S=0;S-1&&e.splice(r,1)}var Pt=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return Mt(this.subscriptions,e),function(){return Rt(t.subscriptions,e)}},e.prototype.notify=function(e,t,r){var n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(var o=0;om&&v,w=Array.isArray(y)?y:[y],A=w.reduce(s,{});!1===b&&(A={});var S=g.prevResolvedValues,C=void 0===S?{}:S,E=n.__assign(n.__assign({},C),A),T=function(e){x=!0,p.delete(e),g.needsAnimating[e]=!0};for(var I in E){var k=A[I],M=C[I];h.hasOwnProperty(I)||(k!==M?Me(k)&&Me(M)?ut(k,M)?g.protectedKeys[I]=!0:T(I):void 0!==k?T(I):p.add(I):void 0!==k&&p.has(I)?T(I):g.protectedKeys[I]=!0)}g.prevProp=y,g.prevResolvedValues=A,g.isActive&&(h=n.__assign(n.__assign({},h),A)),a&&e.blockInitialAnimation&&(x=!1),x&&!_&&f.push.apply(f,n.__spreadArray([],n.__read(w.map(function(e){return{animation:e,options:n.__assign({type:i},t)}}))))},y=0;y=3;if(t||r){var i=e.point,a=l.getFrameData().timestamp;o.history.push(n.__assign(n.__assign({},i),{timestamp:a}));var c=o.handlers,u=c.onStart,d=c.onMove;t||(u&&u(o.lastMoveEvent,e),o.startEvent=o.lastMoveEvent),d&&d(o.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){o.lastMoveEvent=e,o.lastMoveEventInfo=nr(t,o.transformPagePoint),Ue(e)&&0===e.buttons?o.handlePointerUp(e,t):p.default.update(o.updatePoint,!0)},this.handlePointerUp=function(e,t){o.end();var r=o.handlers,n=r.onEnd,i=r.onSessionEnd,a=ir(nr(t,o.transformPagePoint),o.history);o.startEvent&&n&&n(e,a),i&&i(e,a)},!(Ve(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=i;var a=nr(qe(e),this.transformPagePoint),c=a.point,u=l.getFrameData().timestamp;this.history=[n.__assign(n.__assign({},c),{timestamp:u})];var d=t.onSessionStart;d&&d(e,ir(a,this.history)),this.removeListeners=s.pipe(Je(window,"pointermove",this.handlePointerMove),Je(window,"pointerup",this.handlePointerUp),Je(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),l.cancelSync.update(this.updatePoint)},e}();function nr(e,t){return t?{point:t(e.point)}:e}function or(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ir(e,t){var r=e.point;return{point:r,delta:or(r,sr(t)),offset:or(r,ar(t)),velocity:lr(t,.1)}}function ar(e){return e[0]}function sr(e){return e[e.length-1]}function lr(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,o=sr(e);r>=0&&(n=e[r],!(o.timestamp-n.timestamp>dt(t)));)r--;if(!n)return{x:0,y:0};var i=(o.timestamp-n.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function cr(e){return e}function ur(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var dr={translate:0,scale:1,origin:0,originPoint:0};function fr(){return{x:n.__assign({},dr),y:n.__assign({},dr)}}function pr(e){return[e("x"),e("y")]}function hr(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=.01),s.distance(e,t)o&&(e=r?s.mix(o,e,r.max):Math.min(e,o)),e}function xr(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function wr(e,t){var r,o=t.min-e.min,i=t.max-e.max;return t.max-t.mint?r="y":Math.abs(e.x)>t&&(r="x"),r}(u),void(null!==r.currentDirection&&(null===(o=(n=r.props).onDirectionLock)||void 0===o||o.call(n,r.currentDirection)));r.updateAxis("x",t.point,u),r.updateAxis("y",t.point,u),null===(a=(i=r.props).onDrag)||void 0===a||a.call(i,e,t),Xr=e}},onSessionEnd:function(e,t){return r.stop(e,t)}},{transformPagePoint:u})},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,r=t.dragConstraints,n=t.dragElastic,o=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!r&&(O(r)?this.resolveRefConstraints(o,r):function(e,t){var r=t.top,n=t.left,o=t.bottom,i=t.right;return{x:xr(e.x,n,i),y:xr(e.y,r,o)}}(o,r)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:Ar(e,"left","right"),y:Ar(e,"top","bottom")}}(n),this.constraints&&!this.hasMutatedConstraints&&pr(function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var r={};return void 0!==t.min&&(r.min=t.min-e.min),void 0!==t.max&&(r.max=t.max-e.min),r}(o[t],e.constraints[t]))})},e.prototype.resolveRefConstraints=function(e,t){var r=this.props,n=r.onMeasureDragConstraints,o=r.transformPagePoint,a=t.current;i.invariant(null!==a,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."),this.constraintsBox=Cr(a,o);var s=function(e,t){return{x:wr(e.x,t.x),y:wr(e.y,t.y)}}(e,this.constraintsBox);if(n){var l=n(function(e){var t=e.x,r=e.y;return{top:r.min,bottom:r.max,left:t.min,right:t.max}}(s));this.hasMutatedConstraints=!!l,l&&(s=ur(l))}return s},e.prototype.cancelDrag=function(){var e,t;this.visualElement.unlockProjectionTarget(),null===(e=this.cancelLayout)||void 0===e||e.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Ne.Drag,!1)},e.prototype.stop=function(e,t){var r,n,o;null===(r=this.panSession)||void 0===r||r.end(),this.panSession=null;var i=this.isDragging;if(this.cancelDrag(),i){var a=t.velocity;this.animateDragEnd(a),null===(o=(n=this.props).onDragEnd)||void 0===o||o.call(n,e,t)}},e.prototype.snapToCursor=function(e){var t=this;return pr(function(r){if(en(r,t.props.drag,t.currentDirection)){var n=t.getAxisMotionValue(r);if(!n)return t.cursorProgress[r]=.5,!0;var o=t.visualElement.getLayoutState().layout,i=o[r].max-o[r].min,a=o[r].min+i/2,s=e[r]-a;t.originPoint[r]=e[r],n.set(s)}}).includes(!0)},e.prototype.updateAxis=function(e,t,r){if(en(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,r):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var r=this.getAxisMotionValue(e);if(t&&r){var n=this.originPoint[e]+t[e],o=this.constraints?_r(n,this.constraints[e],this.elastic[e]):n;r.set(o)}},e.prototype.updateVisualElementAxis=function(e,t){var r,n=this.visualElement.getLayoutState().layout[e],o=n.max-n.min,i=this.cursorProgress[e],a=function(e,t,r,n,o){var i=e-t*r;return n?_r(i,n,o):i}(t[e],o,i,null===(r=this.constraints)||void 0===r?void 0:r[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,a,a+o)},e.prototype.setProps=function(e){var t=e.drag,r=void 0!==t&&t,o=e.dragDirectionLock,i=void 0!==o&&o,a=e.dragPropagation,s=void 0!==a&&a,l=e.dragConstraints,c=void 0!==l&&l,u=e.dragElastic,d=void 0===u?.35:u,f=e.dragMomentum,p=void 0===f||f,h=n.__rest(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=n.__assign({drag:r,dragDirectionLock:i,dragPropagation:s,dragConstraints:c,dragElastic:d,dragMomentum:p},h)},e.prototype.getAxisMotionValue=function(e){var t=this.props,r=t.layout,n=t.layoutId,o="_drag"+e.toUpperCase();return this.props[o]?this.props[o]:r||void 0!==n?void 0:this.visualElement.getValue(e,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var e=this.props,t=e._dragX,r=e._dragY;return t||r},e.prototype.animateDragEnd=function(e){var t=this,r=this.props,o=r.drag,i=r.dragMomentum,a=r.dragElastic,s=r.dragTransition,l=function(e,t){void 0===t&&(t=!0);var r,n=e.getProjectionParent();return!!n&&(t?Gr(r=Pr(n.projection.target,e.projection.target),n.getLatestValues()):r=Pr(n.getLayoutState().layout,e.getLayoutState().layout),pr(function(t){return e.setProjectionTargetAxis(t,r[t].min,r[t].max,!0)}),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),c=this.constraints||{};if(l&&Object.keys(c).length&&this.isLayoutDrag()){var u=this.visualElement.getProjectionParent();if(u){var d=Pr(u.projection.targetFinal,c);pr(function(e){var t=d[e],r=t.min,n=t.max;c[e]={min:isNaN(r)?void 0:r,max:isNaN(n)?void 0:n}})}}var f=pr(function(r){var u;if(en(r,o,t.currentDirection)){var d=null!==(u=null==c?void 0:c[r])&&void 0!==u?u:{},f=a?200:1e6,p=a?40:1e7,h=n.__assign(n.__assign({type:"inertia",velocity:i?e[r]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10},s),d);return t.getAxisMotionValue(r)?t.startAxisValueAnimation(r,h):t.visualElement.startLayoutAnimation(r,h,l)}});return Promise.all(f).then(function(){var e,r;null===(r=(e=t.props).onDragTransitionEnd)||void 0===r||r.call(e)})},e.prototype.stopMotion=function(){var e=this;pr(function(t){var r=e.getAxisMotionValue(t);r?r.stop():e.visualElement.stopLayoutAnimation()})},e.prototype.startAxisValueAnimation=function(e,t){var r=this.getAxisMotionValue(e);if(r){var n=r.get();return r.set(n),r.set(n),It(e,r,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,r=t.drag;if(O(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var n={x:0,y:0};pr(function(t){var r,o,i,a,l,c;n[t]=(r=e.visualElement.projection.target[t],o=e.constraintsBox[t],a=.5,l=mr(r),(c=mr(o))>l?a=s.progress(o.min,o.max-l,r.min):l>c&&(a=s.progress(r.min,r.max-c,o.min)),i=a,s.clamp(0,1,i))}),this.updateConstraints(function(){pr(function(t){if(en(t,r,null)){var o=function(e,t,r){var n=e.max-e.min,o=s.mix(t.min,t.max-n,r);return{min:o,max:o+n}}(e.visualElement.projection.target[t],e.constraintsBox[t],n[t]),i=o.min,a=o.max;e.visualElement.setProjectionTargetAxis(t,i,a)}})}),setTimeout(Yr,1)}},e.prototype.updateConstraints=function(e){var t=this;this.cancelLayout=Zr(function(r,n){var o=Ir(t.visualElement);n(function(){return o.forEach(function(e){return e.resetTransform()})}),r(function(){return kr(t.visualElement)}),n(function(){return o.forEach(function(e){return e.restoreTransform()})}),r(function(){t.resolveDragConstraints()}),e&&n(e)})},e.prototype.mount=function(e){var t=this,r=Je(e.getInstance(),"pointerdown",function(e){var r=t.props,n=r.drag,o=r.dragListener;n&&(void 0===o||o)&&t.start(e)}),n=je(window,"resize",function(){t.scalePoint()}),o=e.onLayoutUpdate(function(){t.isDragging&&t.resolveDragConstraints()}),i=e.prevDragCursor;return i&&this.start(Xr,{cursorProgress:i}),function(){null==r||r(),null==n||n(),null==o||o(),t.cancelDrag()}},e}();function en(e,t,r){return!(!0!==t&&t!==e||null!==r&&r!==e)}var tn,rn,nn={pan:lt(function(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,i=e.onPanSessionStart,a=e.visualElement,s=t||r||n||i,l=o.useRef(null),c=o.useContext(_).transformPagePoint,u={onSessionStart:i,onStart:r,onMove:t,onEnd:function(e,t){l.current=null,n&&n(e,t)}};o.useEffect(function(){null!==l.current&&l.current.updateHandlers(u)}),Qe(a,"pointerdown",s&&function(e){l.current=new rr(e,u,{transformPagePoint:c})}),st(function(){return l.current&&l.current.end()})}),drag:lt(function(e){var t=e.dragControls,r=e.visualElement,i=o.useContext(_).transformPagePoint,a=S(function(){return new Qr({visualElement:r})});a.setProps(n.__assign(n.__assign({},e),{transformPagePoint:i})),o.useEffect(function(){return t&&t.subscribe(a)},[a]),o.useEffect(function(){return a.mount(r)},[])})};function on(e){return"string"==typeof e&&e.startsWith("var(--")}!function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"}(tn||(tn={})),t.VisibilityAction=void 0,(rn=t.VisibilityAction||(t.VisibilityAction={}))[rn.Hide=0]="Hide",rn[rn.Show=1]="Show";var an=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function sn(e,t,r){void 0===r&&(r=1),i.invariant(r<=4,'Max CSS variable fallback depth detected in property "'+e+'". This may indicate a circular fallback dependency.');var o=n.__read(function(e){var t=an.exec(e);if(!t)return[,];var r=n.__read(t,3);return[r[1],r[2]]}(e),2),a=o[0],s=o[1];if(a){var l=window.getComputedStyle(t).getPropertyValue(a);return l?l.trim():on(s)?sn(s,t,r+1):s}}function ln(e,t){return e/(t.max-t.min)*100}var cn="_$css",un={process:function(e,t,r){var n=r.target;if("string"==typeof e){if(!a.px.test(e))return e;e=parseFloat(e)}return ln(e,n.x)+"% "+ln(e,n.y)+"%"}},dn={borderRadius:n.__assign(n.__assign({},un),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:un,borderTopRightRadius:un,borderBottomLeftRadius:un,borderBottomRightRadius:un,boxShadow:{process:function(e,t){var r=t.delta,n=t.treeScale,o=e,i=e.includes("var("),l=[];i&&(e=e.replace(an,function(e){return l.push(e),cn}));var c=a.complex.parse(e);if(c.length>5)return o;var u=a.complex.createTransformer(e),d="number"!=typeof c[0]?1:0,f=r.x.scale*n.x,p=r.y.scale*n.y;c[0+d]/=f,c[1+d]/=p;var h=s.mix(f,p,.5);"number"==typeof c[2+d]&&(c[2+d]/=h),"number"==typeof c[3+d]&&(c[3+d]/=h);var m=u(c);if(i){var g=0;m=m.replace(cn,function(){var e=l[g];return g++,e})}return m}}},fn=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},r.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},r.isAnimating={x:!1,y:!1},r.stopAxisAnimation={x:void 0,y:void 0},r.isAnimatingTree=!1,r.animate=function(e,o,i){void 0===i&&(i={});var a=i.originBox,s=i.targetBox,l=i.visibilityAction,c=i.shouldStackAnimate,u=i.onComplete,d=i.prevParent,f=n.__rest(i,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),p=r.props,h=p.visualElement,m=p.layout;if(!1===c)return r.isAnimatingTree=!1,r.safeToRemove();if(!r.isAnimatingTree||!0===c){c&&(r.isAnimatingTree=!0),o=a||o,e=s||e;var g,y,v,b=!1,_=h.getProjectionParent();if(_){var x=_.prevViewportBox,w=_.getLayoutState().layout;d&&(s&&(w=d.getLayoutState().layout),a&&(y=_,(g=d).getLayoutId()===(v=y.getLayoutId())&&(void 0!==v||g===y))&&d.prevViewportBox&&(x=d.prevViewportBox)),x&&function(e,t,r){return e||!e&&!(t||r)}(d,a,s)&&(b=!0,o=Pr(x,o),e=Pr(w,e))}var A,S,C=(S=e,!(hn(A=o)||hn(S)||mn(A.x,S.x)&&mn(A.y,S.y))),E=pr(function(i){var a,s;if("position"===m){var c=e[i].max-e[i].min;o[i].max=o[i].min+c}if(!h.projection.isTargetLocked)return void 0===l?C?r.animateAxis(i,e[i],o[i],n.__assign(n.__assign({},f),{isRelative:b})):(null===(s=(a=r.stopAxisAnimation)[i])||void 0===s||s.call(a),h.setProjectionTargetAxis(i,e[i].min,e[i].max,b)):void h.setVisibility(l===t.VisibilityAction.Show)});return h.syncRender(),Promise.all(E).then(function(){r.isAnimatingTree=!1,u&&u(),h.notifyLayoutAnimationComplete()})}},r}return n.__extends(r,e),r.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=It,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},W(dn)},r.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),pr(function(t){var r,n;return null===(n=(r=e.stopAxisAnimation)[t])||void 0===n?void 0:n.call(r)})},r.prototype.animateAxis=function(e,t,r,n){var o,i,a=this,l=void 0===n?{}:n,c=l.transition,u=l.isRelative;if(!this.isAnimating[e]||!mn(t,this.currentAnimationTarget[e])){null===(i=(o=this.stopAxisAnimation)[e])||void 0===i||i.call(o),this.isAnimating[e]=!0;var d=this.props.visualElement,f=this.frameTarget[e],p=d.getProjectionAnimationProgress()[e];p.clearListeners(),p.set(0),p.set(0);var h=function(){var n=p.get()/1e3;!function(e,t,r,n){e.min=s.mix(t.min,r.min,n),e.max=s.mix(t.max,r.max,n)}(f,r,t,n),d.setProjectionTargetAxis(e,f.min,f.max,u)};h();var m=p.onChange(h);this.stopAxisAnimation[e]=function(){a.isAnimating[e]=!1,p.stop(),m()},this.currentAnimationTarget[e]=t;var g=c||d.getDefaultTransition()||gn;return It("x"===e?"layoutX":"layoutY",p,1e3,g&&Tt(g,"layout")).then(this.stopAxisAnimation[e])}},r.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},r.prototype.render=function(){return null},r}(d.Component),pn={min:0,max:0};function hn(e){return mn(e.x,pn)&&mn(e.y,pn)}function mn(e,t){return e.min===t.min&&e.max===t.max}var gn={duration:.45,ease:[.4,0,.1,1]},yn={layoutReady:function(e){return e.notifyLayoutReady()}};function vn(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var r=void 0===t?yn:t,o=r.layoutReady,i=r.parent;Zr(function(t,r){var a=Array.from(e).sort(Er),s=i?Ir(i):[];r(function(){n.__spreadArray(n.__spreadArray([],n.__read(s)),n.__read(a)).forEach(function(e){return e.resetTransform()})}),t(function(){a.forEach(kr)}),r(function(){s.forEach(function(e){return e.restoreTransform()}),a.forEach(o)}),t(function(){a.forEach(function(e){e.isPresent&&(e.presence=tn.Present)})}),r(function(){l.flushSync.preRender(),l.flushSync.render()}),t(function(){p.default.postRender(function(){return a.forEach(bn)}),e.clear()})}),Yr()}}}function bn(e){e.prevViewportBox=e.projection.target}var _n=o.createContext(vn()),xn=o.createContext(vn());function wn(e){return!!e.forceUpdate}var An=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,r=e.framerSyncLayout,n=e.visualElement;wn(t)&&t.register(n),wn(r)&&r.register(n),n.onUnmount(function(){wn(t)&&t.remove(n),wn(r)&&r.remove(n)})},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,r=e.visualElement;return wn(t)?t.syncUpdate():(Mr(r),t.add(r)),null},t.prototype.componentDidUpdate=function(){var e=this.props.syncLayout;wn(e)||e.flush()},t.prototype.render=function(){return null},t}(f.default.Component),Sn={measureLayout:function(e){var t=o.useContext(_n),r=o.useContext(xn);return f.default.createElement(An,n.__assign({},e,{syncLayout:t,framerSyncLayout:r}))},layoutAnimation:function(e){var t=n.__read(C(),2)[1];return d.createElement(fn,n.__assign({},e,{safeToRemove:t}))}};function Cn(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:fr(),deltaFinal:fr(),deltaTransform:""}}var En=Cn();function Tn(e,t,r){var n=e.x,o=e.y,i="translate3d("+n.translate/t.x+"px, "+o.translate/t.y+"px, 0) ";if(r){var a=r.rotate,s=r.rotateX,l=r.rotateY;a&&(i+="rotate("+a+") "),s&&(i+="rotateX("+s+") "),l&&(i+="rotateY("+l+") ")}return i+="scale("+n.scale+", "+o.scale+")",r||i!==kn?i:""}function In(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var kn=Tn(En.delta,En.treeScale,{x:1,y:1}),Mn=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];var Rn=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){Mt(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){Rt(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(Er),this.isDirty=!1,this.children.forEach(e)},e}(),Pn=function(e){var t=e.treeType,r=void 0===t?"":t,o=e.build,i=e.getBaseTarget,a=e.makeTargetAnimatable,c=e.measureViewportBox,u=e.render,d=e.readValueFromInstance,f=e.resetTransform,h=e.restoreTransform,m=e.removeValueFromRenderState,g=e.sortNodePosition,y=e.scrapeMotionValuesFromProps;return function(e,t){var v=e.parent,b=e.props,_=e.presenceId,x=e.blockInitialAnimation,w=e.visualState;void 0===t&&(t={});var A,S,C,E,T,I,k=w.latestValues,M=w.renderState,R=function(){var e=Mn.map(function(){return new Pt}),t={},r={clearAllListeners:function(){return e.forEach(function(e){return e.clear()})},updatePropListeners:function(e){return Mn.forEach(function(n){var o;null===(o=t[n])||void 0===o||o.call(t);var i="on"+n,a=e[i];a&&(t[n]=r[i](a))})}};return e.forEach(function(e,t){r["on"+Mn[t]]=function(t){return e.add(t)},r["notify"+Mn[t]]=function(){for(var t=[],r=0;r=0;t--){var r=Q.path[t];if(r.projection.isEnabled){e=r;break}}S=e}return S},resolveRelativeTargetBox:function(){var e=Q.getProjectionParent();if(P.relativeTarget&&e&&(function(e,t){br(e.target.x,e.relativeTarget.x,t.target.x),br(e.target.y,e.relativeTarget.y,t.target.y)}(P,e.projection),Or(e))){var t=P.target;Ur(t,t,e.getLatestValues())}},shouldResetTransform:function(){return Boolean(b._layoutResetTransform)},pointTo:function(e){O=e.projection,D=e.getLatestValues(),null==C||C(),C=s.pipe(e.onSetAxisTarget(Q.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete(function(){var e;Q.isPresent?Q.presence=tn.Present:null===(e=Q.layoutSafeToRemove)||void 0===e||e.call(Q)}))},isPresent:!0,presence:tn.Entering});return Q}};function On(e){e.resolveRelativeTargetBox()}function Dn(e){e.updateLayoutProjection()}var Ln,Nn=n.__spreadArray(["initial"],n.__read(Kt)),Fn=Nn.length,zn=new Set(["width","height","top","left","right","bottom","x","y"]),Bn=function(e){return zn.has(e)},jn=function(e,t){e.set(t,!1),e.set(t)},$n=function(e){return e===a.number||e===a.px};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Ln||(Ln={}));var Un=function(e,t){return parseFloat(e.split(", ")[t])},Vn=function(e,t){return function(r,n){var o=n.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return Un(i[1],t);var a=o.match(/^matrix\((.+)\)$/);return a?Un(a[1],e):0}},Hn=new Set(["x","y","z"]),Gn=Z.filter(function(e){return!Hn.has(e)}),Wn={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var r=t.top;return parseFloat(r)},left:function(e,t){var r=t.left;return parseFloat(r)},bottom:function(e,t){var r=e.y,n=t.top;return parseFloat(n)+(r.max-r.min)},right:function(e,t){var r=e.x,n=t.left;return parseFloat(n)+(r.max-r.min)},x:Vn(4,13),y:Vn(5,14)};function qn(e,t,r,o){return function(e){return Object.keys(e).some(Bn)}(t)?function(e,t,r,o){void 0===r&&(r={}),void 0===o&&(o={}),t=n.__assign({},t),o=n.__assign({},o);var s=Object.keys(t).filter(Bn),l=[],c=!1,u=[];if(s.forEach(function(n){var s=e.getValue(n);if(e.hasValue(n)){var d,f=r[n],p=t[n],h=Ft(f);if(Me(p))for(var m=p.length,g=null===p[0]?1:0;gt?1:r(s.progress(e,t,n))}}var fo=["TopLeft","TopRight","BottomLeft","BottomRight"],po=fo.length;function ho(e,t){var r;return null!==(r=e[t])&&void 0!==r?r:e.borderRadius}var mo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.children=new Set,t.stacks=new Map,t.hasMounted=!1,t.updateScheduled=!1,t.renderScheduled=!1,t.syncContext=n.__assign(n.__assign({},vn()),{syncUpdate:function(e){return t.scheduleUpdate(e)},forceUpdate:function(){t.syncContext=n.__assign({},t.syncContext),t.scheduleUpdate(!0)},register:function(e){return t.addChild(e)},remove:function(e){return t.removeChild(e)}}),t}return n.__extends(t,e),t.prototype.componentDidMount=function(){this.hasMounted=!0},t.prototype.componentDidUpdate=function(){this.startLayoutAnimation()},t.prototype.shouldComponentUpdate=function(){return this.renderScheduled=!0,!0},t.prototype.startLayoutAnimation=function(){var e=this;this.renderScheduled=this.updateScheduled=!1;var t=this.props.type;this.children.forEach(function(e){e.isPresent?e.presence!==tn.Entering&&(e.presence=e.presence===tn.Exiting?tn.Entering:tn.Present):e.presence=tn.Exiting}),this.updateStacks();var r={layoutReady:function(r){void 0!==r.getLayoutId()?e.getStack(r).animate(r,"crossfade"===t):r.notifyLayoutReady()},parent:this.context.visualElement};this.children.forEach(function(t){return e.syncContext.add(t)}),this.syncContext.flush(r),this.stacks.forEach(function(e){return e.clearSnapshot()})},t.prototype.updateStacks=function(){this.stacks.forEach(function(e){return e.updateLeadAndFollow()})},t.prototype.scheduleUpdate=function(e){void 0===e&&(e=!1),!e&&this.updateScheduled||(this.updateScheduled=!0,this.children.forEach(function(e){!function(e){for(var t=!1,r={},n=0;n=0){var f=u[d];if(r&&(null!=o||(o=f)),null!=r||(r=f),r&&o)break}a.lead=r,a.follow=o,a.leadIsExiting=(null===(e=a.lead)||void 0===e?void 0:e.presence)===tn.Exiting,l.setOptions({lead:r,follow:o,prevValues:t,crossfadeOpacity:(null==o?void 0:o.isPresenceRoot)||(null==r?void 0:r.isPresenceRoot)}),a.lead===s.follow||s.lead===a.lead&&s.leadIsExiting===a.leadIsExiting||(c=!0)},animate:function(e,t){var n;if(void 0===t&&(t=!1),e===a.lead){t?e.pointTo(a.lead):e.setVisibility(!0);var o={},i=null===(n=a.follow)||void 0===n?void 0:n.getProjectionParent();if(i&&(o.prevParent=i),e.presence===tn.Entering?o.originBox=a.follow?a.follow.prevViewportBox:r:e.presence===tn.Exiting&&(o.targetBox=function(){var e;return null===(e=a.follow)||void 0===e?void 0:e.getLayoutState().layout}()),c){c=!1;var s=e.getDefaultTransition();e.presence===tn.Entering?l.toLead(s):l.fromLead(s)}e.notifyLayoutReady(o)}else t?a.lead&&e.pointTo(a.lead):e.setVisibility(!1)}})),this.stacks.get(u)},t.prototype.render=function(){return d.createElement(_n.Provider,{value:this.syncContext},this.props.children)},t.contextType=x,t}(d.Component);function go(e){return"function"==typeof e}var yo,vo=n.__assign(n.__assign({renderer:Kn},tr),ct),bo=n.__assign(n.__assign(n.__assign({},vo),nn),Sn);function _o(e){var t=S(function(){return Dt(e)});if(o.useContext(_).isStatic){var r=n.__read(o.useState(e),2)[1];o.useEffect(function(){return t.onChange(r)},[])}return t}function xo(e,t){o.useEffect(function(){if(te(e))return e.onChange(t)},[t])}function wo(e,t){var r=_o(t()),n=function(){return r.set(t())};return n(),function(e,t){o.useEffect(function(){var r=e.map(function(e){return e.onChange(t)});return function(){return r.forEach(function(e){return e()})}})}(e,function(){return p.default.update(n,!1,!0)}),r}function Ao(){for(var e=[],t=0;t.001?1/e:1e5},Bo=!1;t.AnimatePresence=function(e){var t=e.children,r=e.custom,i=e.initial,a=void 0===i||i,s=e.onExitComplete,l=e.exitBeforeEnter,c=e.presenceAffectsLayout,u=void 0===c||c,f=function(){var e=o.useRef(!1),t=n.__read(o.useState(0),2),r=t[0],i=t[1];return st(function(){return e.current=!0}),o.useCallback(function(){!e.current&&i(r+1)},[r])}(),p=o.useContext(_n);wn(p)&&(f=p.forceUpdate);var h=o.useRef(!0),m=function(e){var t=[];return o.Children.forEach(e,function(e){o.isValidElement(e)&&t.push(e)}),t}(t),g=o.useRef(m),y=o.useRef(new Map).current,v=o.useRef(new Set).current;if(function(e,t){e.forEach(function(e){var r=io(e);t.set(r,e)})}(m,y),h.current)return h.current=!1,d.createElement(d.Fragment,null,m.map(function(e){return d.createElement(no,{key:io(e),isPresent:!0,initial:!!a&&void 0,presenceAffectsLayout:u},e)}));for(var b=n.__spreadArray([],n.__read(m)),_=g.current.map(io),x=m.map(io),w=_.length,A=0;A=0&&(r=[].concat(e.slice(n,e.length),e.slice(1,n+1))),r},o.prototype.comparePath=function(e,t){var r=this;return e.every(function(e,t){return r.compareCoord(e,this[t])},t)},o.prototype.comparePolygon=function(e,t){if(this.compareLine(e.coordinates[0],t.coordinates[0],1,!0)){var r=e.coordinates.slice(1,e.coordinates.length),n=t.coordinates.slice(1,t.coordinates.length),o=this;return r.every(function(e){return this.some(function(t){return o.compareLine(e,t,1,!0)})},n)}return!1},o.prototype.compareFeature=function(e,t){return!(e.id!==t.id||!this.objectComparator(e.properties,t.properties)||!this.compareBBox(e,t))&&this.compare(e.geometry,t.geometry)},o.prototype.compareBBox=function(e,t){return!!(!e.bbox&&!t.bbox||e.bbox&&t.bbox&&this.compareCoord(e.bbox,t.bbox))},o.prototype.removePseudo=function(e){return e},e.exports=o},aZEm(e,t,r){var n=r("A1R+"),o=r("Vp63"),i=r("2TsN"),a=r("bnKY").A,s=i.featureEach,l=(i.coordEach,o.polygon,o.featureCollection);function c(e){var t=new n(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),n.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:a(e),t.push(e)}):s(e,function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:a(e),t.push(e)}),n.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),n.prototype.remove.call(this,e,t)},t.clear=function(){return n.prototype.clear.call(this)},t.search=function(e){var t=n.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return n.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=n.prototype.all.call(this);return l(e)},t.toJSON=function(){return n.prototype.toJSON.call(this)},t.fromJSON=function(e){return n.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=a(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=a(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}e.exports=c,e.exports.default=c},AM7I(e,t,r){"use strict";var n,o=r("ooQL"),i=r("pkW7"),a=r("QX98"),s=r("3JnH"),l=r("FAml"),c=r("Z+6F"),u=r("DSU0"),d=r("Z9lY"),f=r("F6qJ"),p=r("ZZFE"),h=r("4FDZ"),m=r("qyuN"),g=r("WetM"),y=r("w65a"),v=r("jKBE"),b=Function,_=function(e){try{return b('"use strict"; return ('+e+").constructor;")()}catch(e){}},x=r("Kqna"),w=r("cckQ"),A=function(){throw new u},S=x?function(){try{return A}catch(e){try{return x(arguments,"callee").get}catch(e){return A}}}():A,C=r("UVaH")(),E=r("gzrF"),T=r("F7zN"),I=r("8uGy"),k=r("4W8N"),M=r("km3+"),R={},P="undefined"!=typeof Uint8Array&&E?E(Uint8Array):n,O={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":C&&E?E([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":R,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&E?E(E([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&C&&E?E((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&C&&E?E((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&E?E(""[Symbol.iterator]()):n,"%Symbol%":C?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":S,"%TypedArray%":P,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":d,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":k,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":T,"%Math.abs%":f,"%Math.floor%":p,"%Math.max%":h,"%Math.min%":m,"%Math.pow%":g,"%Math.round%":y,"%Math.sign%":v,"%Reflect.getPrototypeOf%":I};if(E)try{null.error}catch(e){var D=E(E(e));O["%Error.prototype%"]=D}var L=function e(t){var r;if("%AsyncFunction%"===t)r=_("async function () {}");else if("%GeneratorFunction%"===t)r=_("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=_("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&E&&(r=E(o.prototype))}return O[t]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=r("D3zA"),z=r("lnE3"),B=F.call(M,Array.prototype.concat),j=F.call(k,Array.prototype.splice),$=F.call(M,String.prototype.replace),U=F.call(M,String.prototype.slice),V=F.call(M,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,W=function(e,t){var r,n=e;if(z(N,n)&&(n="%"+(r=N[n])[0]+"%"),z(O,n)){var o=O[n];if(o===R&&(o=L(n)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===V(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return $(e,H,function(e,t,r,o){n[n.length]=r?$(o,G,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=W("%"+n+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(n=l[0],j(r,B([0,1],l)));for(var d=1,f=!0;d=r.length){var g=x(a,p);a=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[p]}else f=z(a,p),a=a[p];f&&!s&&(O[i]=a)}}return a}},F7zN(e,t,r){"use strict";var n=r("ooQL");e.exports=n.getPrototypeOf||null},"8uGy"(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},gzrF(e,t,r){"use strict";var n=r("8uGy"),o=r("F7zN"),i=r("w+BW");e.exports=n?function(e){return n(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},bD3j(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},Kqna(e,t,r){"use strict";var n=r("bD3j");if(n)try{n([],"length")}catch(e){n=null}e.exports=n},ZLCw(e,t,r){"use strict";var n=r("cckQ"),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},UVaH(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r("FpZJ");e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},FpZJ(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},"B6Q+"(e,t,r){"use strict";var n=r("FpZJ");e.exports=function(){return n()&&!!Symbol.toStringTag}},lnE3(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r("D3zA");e.exports=i.call(n,o)},"82gj"(e,t,r){"use strict";r.r(t),r.d(t,{invariant:()=>o,warning:()=>n});var n=function(){},o=function(){}},"6+Dn"(e,t,r){"use strict";r.d(t,{zR:()=>w,TM:()=>I,yJ:()=>h,sC:()=>M,AO:()=>p,Fu:()=>m});var n=r("+9dH");function o(e){return"/"===e.charAt(0)}function i(e,t){for(var r=t,n=r+1,o=e.length;n=0;f--){var p=a[f];"."===p?i(a,f):".."===p?(i(a,f),d++):d&&(i(a,f),d--)}if(!c)for(;d--;d)a.unshift("..");!c||""===a[0]||a[0]&&o(a[0])||a.unshift("");var h=a.join("/");return r&&"/"!==h.substr(-1)&&(h+="/"),h}(s.pathname,a.pathname)):s.pathname=a.pathname:s.pathname||(s.pathname="/"),s}function m(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function g(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,r,n,o){if(null!=e){var i="function"==typeof e?e(t,r):e;"string"==typeof i?"function"==typeof n?n(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var r=!0;function n(){r&&e.apply(void 0,arguments)}return t.push(n),function(){r=!1,t=t.filter(function(e){return e!==n})}},notifyListeners:function(){for(var e=arguments.length,r=new Array(e),n=0;nt?r.splice(t,r.length-t,o):r.push(o),d({action:n,location:o,index:t,entries:r})}})},replace:function(e,t){var n="REPLACE",o=h(e,t,f(),_.location);u.confirmTransitionTo(o,n,r,function(e){e&&(_.entries[_.index]=o,d({action:n,location:o}))})},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return _}},"2mql"(e,t,r){"use strict";var n=r("TOwV"),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return n.isMemo(e)?a:s[e.$$typeof]||o}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(h){var o=p(r);o&&o!==h&&e(t,o,n)}var a=u(r);d&&(a=a.concat(d(r)));for(var s=l(t),m=l(r),g=0;g=0&&"[object Array]"!==o(e)&&"callee"in e&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=s?i:a},DmXP(e,t,r){"use strict";var n=r("O7/Y"),o=n("Date.prototype.getDay"),i=n("Object.prototype.toString"),a=r("B6Q+")();e.exports=function(e){return"object"==typeof e&&null!==e&&(a?function(e){try{return o(e),!0}catch(e){return!1}}(e):"[object Date]"===i(e))}},zteo(e,t,r){"use strict";r.d(t,{A:()=>o});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};const o="object"===("undefined"==typeof window?"undefined":n(window))&&"object"===("undefined"==typeof document?"undefined":n(document))&&9===document.nodeType},"2Nju"(e,t,r){"use strict";var n,o=r("O7/Y"),i=r("B6Q+")(),a=r("lnE3"),s=r("Kqna");if(i){var l=o("RegExp.prototype.exec"),c={},u=function(){throw c},d={toString:u,valueOf:u};"symbol"==typeof Symbol.toPrimitive&&(d[Symbol.toPrimitive]=u),n=function(e){if(!e||"object"!=typeof e)return!1;var t=s(e,"lastIndex");if(!t||!a(t,"value"))return!1;try{l(e,d)}catch(e){return e===c}}}else{var f=o("Object.prototype.toString");n=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===f(e)}}e.exports=n},bCcq(e,t,r){var n,o=r("8oxB");!function(){"use strict";var t="input is invalid type",i="object"==typeof window,a=i?window:{};a.JS_SHA256_NO_WINDOW&&(i=!1);var s=!i&&"object"==typeof self,l=!a.JS_SHA256_NO_NODE_JS&&"object"==typeof o&&o.versions&&o.versions.node&&"renderer"!=o.type;l?a=r.g:s&&(a=self);var c=!a.JS_SHA256_NO_COMMON_JS&&e.exports,u=r.amdO,d=!a.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),p=[-2147483648,8388608,32768,128],h=[24,16,8,0],m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],g=["hex","array","digest","arrayBuffer"],y=[];!a.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!d||!a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var v=function(e,t){return function(r){return new A(t,!0).update(r)[e]()}},b=function(e){var t=v("hex",e);l&&(t=_(t,e)),t.create=function(){return new A(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r>>6,s[c++]=128|63&a):a<55296||a>=57344?(s[c++]=224|a>>>12,s[c++]=128|a>>>6&63,s[c++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),s[c++]=240|a>>>18,s[c++]=128|a>>>12&63,s[c++]=128|a>>>6&63,s[c++]=128|63&a);e=s}else{if("object"!==i)throw new Error(t);if(null===e)throw new Error(t);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(t)}e.length>64&&(e=new A(r,!0).update(e).array());var u=[],f=[];for(o=0;o<64;++o){var p=e[o]||0;u[o]=92^p,f[o]=54^p}A.call(this,r,n),this.update(f),this.oKeyPad=u,this.inner=!0,this.sharedMemory=n}A.prototype.update=function(e){if(!this.finalized){var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var o,i,a=0,s=e.length,l=this.blocks;a>>2]|=e[a]<>>2]|=o<>>2]|=(192|o>>>6)<>>2]|=(128|63&o)<=57344?(l[i>>>2]|=(224|o>>>12)<>>2]|=(128|o>>>6&63)<>>2]|=(128|63&o)<>>2]|=(240|o>>>18)<>>2]|=(128|o>>>12&63)<>>2]|=(128|o>>>6&63)<>>2]|=(128|63&o)<=64?(this.block=l[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},A.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=p[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},A.prototype.hash=function(){var e,t,r,n,o,i,a,s,l,c=this.h0,u=this.h1,d=this.h2,f=this.h3,p=this.h4,h=this.h5,g=this.h6,y=this.h7,v=this.blocks;for(e=16;e<64;++e)t=((o=v[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,r=((o=v[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,v[e]=v[e-16]+t+v[e-7]+r|0;for(l=u&d,e=0;e<64;e+=4)this.first?(this.is224?(i=300032,y=(o=v[0]-1413257819)-150054599|0,f=o+24177077|0):(i=704751109,y=(o=v[0]-210244248)-1521486534|0,f=o+143694565|0),this.first=!1):(t=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),n=(i=c&u)^c&d^l,y=f+(o=y+(r=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&h^~p&g)+m[e]+v[e])|0,f=o+(t+n)|0),t=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),n=(a=f&c)^f&u^i,g=d+(o=g+(r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&p^~y&h)+m[e+1]+v[e+1])|0,t=((d=o+(t+n)|0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),n=(s=d&f)^d&c^a,h=u+(o=h+(r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&y^~g&p)+m[e+2]+v[e+2])|0,t=((u=o+(t+n)|0)>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),n=(l=u&d)^u&f^s,p=c+(o=p+(r=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&g^~h&y)+m[e+3]+v[e+3])|0,c=o+(t+n)|0,this.chromeBugWorkAround=!0;this.h0=this.h0+c|0,this.h1=this.h1+u|0,this.h2=this.h2+d|0,this.h3=this.h3+f|0,this.h4=this.h4+p|0,this.h5=this.h5+h|0,this.h6=this.h6+g|0,this.h7=this.h7+y|0},A.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,l=f[e>>>28&15]+f[e>>>24&15]+f[e>>>20&15]+f[e>>>16&15]+f[e>>>12&15]+f[e>>>8&15]+f[e>>>4&15]+f[15&e]+f[t>>>28&15]+f[t>>>24&15]+f[t>>>20&15]+f[t>>>16&15]+f[t>>>12&15]+f[t>>>8&15]+f[t>>>4&15]+f[15&t]+f[r>>>28&15]+f[r>>>24&15]+f[r>>>20&15]+f[r>>>16&15]+f[r>>>12&15]+f[r>>>8&15]+f[r>>>4&15]+f[15&r]+f[n>>>28&15]+f[n>>>24&15]+f[n>>>20&15]+f[n>>>16&15]+f[n>>>12&15]+f[n>>>8&15]+f[n>>>4&15]+f[15&n]+f[o>>>28&15]+f[o>>>24&15]+f[o>>>20&15]+f[o>>>16&15]+f[o>>>12&15]+f[o>>>8&15]+f[o>>>4&15]+f[15&o]+f[i>>>28&15]+f[i>>>24&15]+f[i>>>20&15]+f[i>>>16&15]+f[i>>>12&15]+f[i>>>8&15]+f[i>>>4&15]+f[15&i]+f[a>>>28&15]+f[a>>>24&15]+f[a>>>20&15]+f[a>>>16&15]+f[a>>>12&15]+f[a>>>8&15]+f[a>>>4&15]+f[15&a];return this.is224||(l+=f[s>>>28&15]+f[s>>>24&15]+f[s>>>20&15]+f[s>>>16&15]+f[s>>>12&15]+f[s>>>8&15]+f[s>>>4&15]+f[15&s]),l},A.prototype.toString=A.prototype.hex,A.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,l=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,i>>>24&255,i>>>16&255,i>>>8&255,255&i,a>>>24&255,a>>>16&255,a>>>8&255,255&a];return this.is224||l.push(s>>>24&255,s>>>16&255,s>>>8&255,255&s),l},A.prototype.array=A.prototype.digest,A.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},S.prototype=new A,S.prototype.finalize=function(){if(A.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();A.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),A.prototype.finalize.call(this)}};var C=b();C.sha256=C,C.sha224=b(!0),C.sha256.hmac=w(),C.sha224.hmac=w(!0),c?e.exports=C:(a.sha256=C.sha256,a.sha224=C.sha224,u&&(void 0===(n=function(){return C}.call(C,r,C,e))||(e.exports=n)))}()},"46Hv"(e,t,r){"use strict";r.d(t,{VZ:()=>X,vt:()=>ge,D_:()=>p,ih:()=>ve,rN:()=>ye,Sg:()=>m});var n=r("+9dH"),o=r("zteo"),i=r("vQ/N");function a(e,t){for(var r=0;r<+~=|^:(),"'`\s])/g,_="undefined"!=typeof CSS&&CSS.escape,x=function(e){return _?_(e):e.replace(b,"\\$1")},w=function(){function e(e,t,r){this.type="style",this.isProcessed=!1;var n=r.sheet,o=r.Renderer;this.key=e,this.options=r,this.style=t,n?this.renderer=n.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,r){if(void 0===t)return this.style[e];var n=!!r&&r.force;if(!n&&this.style[e]===t)return this;var o=t;r&&!1===r.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!n)return this;var s=i&&a;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var l=this.options.sheet;return l&&l.attached,this},e}(),A=function(e){function t(t,r,n){var o;o=e.call(this,t,r,n)||this;var i=n.selector,a=n.scoped,s=n.sheet,l=n.generateId;return i?o.selectorText=i:!1!==a&&(o.id=l((0,c.A)((0,c.A)(o)),s),o.selectorText="."+x(o.id)),o}(0,l.A)(t,e);var r=t.prototype;return r.applyTo=function(e){var t=this.renderer;if(t){var r=this.toJSON();for(var n in r)t.setProperty(e,n,r[n])}return this},r.toJSON=function(){var e={};for(var t in this.style){var r=this.style[t];"object"!=typeof r?e[t]=r:Array.isArray(r)&&(e[t]=m(r))}return e},r.toString=function(e){var t=this.options.sheet,r=t&&t.options.link?(0,n.A)({},e,{allowEmpty:!0}):e;return v(this.selectorText,this.style,r)},s(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,r=this.renderable;r&&t&&(t.setSelector(r,e)||t.replaceRule(r,this))}},get:function(){return this.selectorText}}]),t}(w),S={onCreateRule:function(e,t,r){return"@"===e[0]||r.parent&&"keyframes"===r.parent.type?null:new A(e,t,r)}},C={indent:1,children:!0},E=/@([\w-]+)/,T=function(){function e(e,t,r){this.type="conditional",this.isProcessed=!1,this.key=e;var o=e.match(E);for(var i in this.at=o?o[1]:"unknown",this.query=r.name||"@"+this.at,this.options=r,this.rules=new X((0,n.A)({},r,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n?(this.options.jss.plugins.onProcessRule(n),n):null},t.replaceRule=function(e,t,r){var n=this.rules.replace(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.toString=function(e){void 0===e&&(e=C);var t=g(e).linebreak;if(null==e.indent&&(e.indent=C.indent),null==e.children&&(e.children=C.children),!1===e.children)return this.query+" {}";var r=this.rules.toString(e);return r?this.query+" {"+t+r+t+"}":""},e}(),I=/@container|@media|@supports\s+/,k={onCreateRule:function(e,t,r){return I.test(e)?new T(e,t,r):null}},M={indent:1,children:!0},R=/@keyframes\s+([\w-]+)/,P=function(){function e(e,t,r){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=e.match(R);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=r;var i=r.scoped,a=r.sheet,s=r.generateId;for(var l in this.id=!1===i?this.name:x(s(this,a)),this.rules=new X((0,n.A)({},r,{parent:this})),t)this.rules.add(l,t[l],(0,n.A)({},r,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=M);var t=g(e).linebreak;if(null==e.indent&&(e.indent=M.indent),null==e.children&&(e.children=M.children),!1===e.children)return this.at+" "+this.id+" {}";var r=this.rules.toString(e);return r&&(r=""+t+r+t),this.at+" "+this.id+" {"+r+"}"},e}(),O=/@keyframes\s+/,D=/\$([\w-]+)/g,L=function(e,t){return"string"==typeof e?e.replace(D,function(e,r){return r in t?t[r]:e}):e},N=function(e,t,r){var n=e[t],o=L(n,r);o!==n&&(e[t]=o)},F={onCreateRule:function(e,t,r){return"string"==typeof e&&O.test(e)?new P(e,t,r):null},onProcessStyle:function(e,t,r){return"style"===t.type&&r?("animation-name"in e&&N(e,"animation-name",r.keyframes),"animation"in e&&N(e,"animation",r.keyframes),e):e},onChangeValue:function(e,t,r){var n=r.options.sheet;if(!n)return e;switch(t){case"animation":case"animation-name":return L(e,n.keyframes);default:return e}}},z=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.A)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,r=t&&t.options.link?(0,n.A)({},e,{allowEmpty:!0}):e;return v(this.key,this.style,r)},t}(w),B={onCreateRule:function(e,t,r){return r.parent&&"keyframes"===r.parent.type?new z(e,t,r):null}},j=function(){function e(e,t,r){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=r}return e.prototype.toString=function(e){var t=g(e).linebreak;if(Array.isArray(this.style)){for(var r="",n=0;n=this.index)t.push(e);else for(var n=0;nr)return void t.splice(n,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,r=t.attached,n=(0,u.A)(t,["attached"]),o=g(n).linebreak,i="",a=0;a-1?n.substr(0,o-1):n;e.style.setProperty(t,i,o>-1?"important":"")}}catch(e){return!1}return!0},se=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},le=function(e,t){return e.selectorText=t,e.selectorText===t},ce=oe(function(){return document.querySelector("head")});var ue=oe(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),de=function(e,t,r){try{"insertRule"in e?e.insertRule(t,r):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[r]},fe=function(e,t){var r=e.cssRules.length;return void 0===t||t>r?r:t},pe=function(){function e(e){this.getPropertyValue=ie,this.setProperty=ae,this.removeProperty=se,this.setSelector=le,this.hasInsertedRules=!1,this.cssRules=[],e&&Q.add(e),this.sheet=e;var t,r=this.sheet?this.sheet.options:{},n=r.media,o=r.meta,i=r.element;this.element=i||((t=document.createElement("style")).textContent="\n",t),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),o&&this.element.setAttribute("data-meta",o);var a=ue();a&&this.element.setAttribute("nonce",a)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var r=t.insertionPoint,n=function(e){var t=Q.registry;if(t.length>0){var r=function(e,t){for(var r=0;rt.index&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.attached&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=e.insertionPoint;if(n&&"string"==typeof n){var o=function(e){for(var t=ce(),r=0;r>2,s=(3&t)<<4|r>>4,l=1>6:64,c=2>4,r=(15&a)<<4|(s=i.indexOf(e.charAt(c++)))>>2,n=(3&s)<<6|(l=i.indexOf(e.charAt(c++))),f[u++]=t,64!==s&&(f[u++]=r),64!==l&&(f[u++]=n);return f}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),o=e("./stream/DataWorker"),i=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(e,t,r,n,o){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=o}s.prototype={getContentWorker:function(){var e=new o(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new o(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,r){return e.pipe(new i).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils"),o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r){var n=o,i=0+r;e^=-1;for(var a=0;a>>8^n[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,r){var n=o,i=0+r;e^=-1;for(var a=0;a>>8^n[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,o=e("pako"),i=e("./utils"),a=e("./stream/GenericWorker"),s=n?"uint8array":"array";function l(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",i.inherits(l,a),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(s,e.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new l("Deflate",e)},r.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function n(e,t){var r,n="";for(r=0;r>>=8;return n}function o(e,t,r,o,a,u){var d,f,p=e.file,h=e.compression,m=u!==s.utf8encode,g=i.transformTo("string",u(p.name)),y=i.transformTo("string",s.utf8encode(p.name)),v=p.comment,b=i.transformTo("string",u(v)),_=i.transformTo("string",s.utf8encode(v)),x=y.length!==p.name.length,w=_.length!==v.length,A="",S="",C="",E=p.dir,T=p.date,I={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(I.crc32=e.crc32,I.compressedSize=e.compressedSize,I.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),m||!x&&!w||(k|=2048);var M=0,R=0;E&&(M|=16),"UNIX"===a?(R=798,M|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(p.unixPermissions,E)):(R=20,M|=function(e){return 63&(e||0)}(p.dosPermissions)),d=T.getUTCHours(),d<<=6,d|=T.getUTCMinutes(),d<<=5,d|=T.getUTCSeconds()/2,f=T.getUTCFullYear()-1980,f<<=4,f|=T.getUTCMonth()+1,f<<=5,f|=T.getUTCDate(),x&&(S=n(1,1)+n(l(g),4)+y,A+="up"+n(S.length,2)+S),w&&(C=n(1,1)+n(l(b),4)+_,A+="uc"+n(C.length,2)+C);var P="";return P+="\n\0",P+=n(k,2),P+=h.magic,P+=n(d,2),P+=n(f,2),P+=n(I.crc32,4),P+=n(I.compressedSize,4),P+=n(I.uncompressedSize,4),P+=n(g.length,2),P+=n(A.length,2),{fileRecord:c.LOCAL_FILE_HEADER+P+g+A,dirRecord:c.CENTRAL_FILE_HEADER+n(R,2)+P+n(b.length,2)+"\0\0\0\0"+n(M,4)+n(o,4)+g+A+b}}var i=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),l=e("../crc32"),c=e("../signature");function u(e,t,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(u,a),u.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=o(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=o(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=o},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},o.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},o.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),o=e("../support"),i=e("./ArrayReader"),a=e("./StringReader"),s=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||o.uint8array?"nodebuffer"===t?new s(e):o.uint8array?new l(n.transformTo("uint8array",e)):new i(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),o=e("../utils");function i(e){n.call(this,"ConvertWorker to "+e),this.destType=e}o.inherits(i,n),i.prototype.processChunk=function(e){this.push({data:o.transformTo(this.destType,e.data),meta:e.meta})},t.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),o=e("../crc32");function i(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(i,n),i.prototype.processChunk=function(e){this.streamInfo.crc32=o(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),o=e("./GenericWorker");function i(e){o.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(i,o),i.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}o.prototype.processChunk.call(this,e)},t.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),o=e("./GenericWorker");function i(e){o.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(i,o),i.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r "+e:e}},t.exports=n},{}],29:[function(e,t,r){"use strict";var n=e("../utils"),o=e("./ConvertWorker"),i=e("./GenericWorker"),a=e("../base64"),s=e("../support"),l=e("../external"),c=null;if(s.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function u(e,t,r){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=r,n.checkSupport(a),this._worker=e.pipe(new o(a)),e.lock()}catch(e){this._worker=new i("error"),this._worker.error(e)}}u.prototype={accumulate:function(e){return function(e,t){return new l.Promise(function(r,o){var i=[],s=e._internalType,l=e._outputType,c=e._mimeType;e.on("data",function(e,r){i.push(e),t&&t(r)}).on("error",function(e){i=[],o(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return a.encode(t);default:return n.transformTo(e,t)}}(l,function(e,t){var r,n=0,o=null,i=0;for(r=0;r>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t}(e)},r.utf8decode=function(e){return o.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,o,i,a=e.length,l=new Array(2*a);for(t=r=0;t>10&1023,l[r++]=56320|1023&o)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),n.applyFromCharCode(l)}(e=n.transformTo(o.uint8array?"uint8array":"array",e))},n.inherits(c,a),c.prototype.processChunk=function(e){var t=n.transformTo(o.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var i=t;(t=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),t.set(i,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}(t),l=t;a!==t.length&&(o.uint8array?(l=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(l=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:r.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(u,a),u.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var n=e("./support"),o=e("./base64"),i=e("./nodejsUtils"),a=e("./external");function s(e){return e}function l(e,t){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,o=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,o=t.length;r>10&1023,c[n++]=56320|1023&o)}return l(c,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var o=65535&e,i=e>>>16&65535,a=0;0!==r;){for(r-=a=2e3>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,o){var i=n,a=o+r;e^=-1;for(var s=o;s>>8^i[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,r){"use strict";var n,o=e("../utils/common"),i=e("./trees"),a=e("./adler32"),s=e("./crc32"),l=e("./messages"),c=-2,u=258,d=262,f=113;function p(e,t){return e.msg=l[t],t}function h(e){return(e<<1)-(4e.avail_out&&(r=e.avail_out),0!==r&&(o.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function y(e,t){i._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,g(e.strm)}function v(e,t){e.pending_buf[e.pending++]=t}function b(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function _(e,t){var r,n,o=e.max_chain_length,i=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,c=e.window,f=e.w_mask,p=e.prev,h=e.strstart+u,m=c[i+a-1],g=c[i+a];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+a]===g&&c[r+a-1]===m&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&il&&0!=--o);return a<=e.lookahead?a:e.lookahead}function x(e){var t,r,n,i,l,c,u,f,p,h,m=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){for(o.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=r=e.hash_size;n=e.head[--t],e.head[t]=m<=n?n-m:0,--r;);for(t=r=m;n=e.prev[--t],e.prev[t]=m<=n?n-m:0,--r;);i+=m}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,f=e.strstart+e.lookahead,h=void 0,(p=i)<(h=c.avail_in)&&(h=p),r=0===h?0:(c.avail_in-=h,o.arraySet(u,c.input,c.next_in,h,f),1===c.state.wrap?c.adler=a(c.adler,u,h,f):2===c.state.wrap&&(c.adler=s(c.adler,u,h,f)),c.next_in+=h,c.total_in+=h,h),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(n=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3&&e.match_length<=e.prev_length){for(o=e.strstart+e.lookahead-3,n=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=o&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)}),new S(4,4,8,4,w),new S(4,5,16,8,w),new S(4,6,32,32,w),new S(4,4,16,16,A),new S(8,16,32,32,A),new S(8,16,128,128,A),new S(8,32,128,256,A),new S(32,128,258,1024,A),new S(32,258,258,4096,A)],r.deflateInit=function(e,t){return I(e,t,8,15,8,0)},r.deflateInit2=I,r.deflateReset=T,r.deflateResetKeep=E,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},r.deflate=function(e,t){var r,o,a,l;if(!e||!e.state||5>8&255),v(o,o.gzhead.time>>16&255),v(o,o.gzhead.time>>24&255),v(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),v(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(v(o,255&o.gzhead.extra.length),v(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=s(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(v(o,0),v(o,0),v(o,0),v(o,0),v(o,0),v(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),v(o,3),o.status=f);else{var d=8+(o.w_bits-8<<4)<<8;d|=(2<=o.strategy||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(d|=32),d+=31-d%31,o.status=f,b(o,d),0!==o.strstart&&(b(o,e.adler>>>16),b(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),g(e),a=o.pending,o.pending!==o.pending_buf_size));)v(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),g(e),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindexa&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),g(e),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindexa&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&g(e),o.pending+2<=o.pending_buf_size&&(v(o,255&e.adler),v(o,e.adler>>8&255),e.adler=0,o.status=f)):o.status=f),0!==o.pending){if(g(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&h(t)<=h(r)&&4!==t)return p(e,-5);if(666===o.status&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&666!==o.status){var _=2===o.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var r,n,o,a,s=e.window;;){if(e.lookahead<=u){if(x(e),e.lookahead<=u&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):n[o.level].func(o,t);if(3!==_&&4!==_||(o.status=666),1===_||3===_)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===_&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(m(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),g(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(v(o,255&e.adler),v(o,e.adler>>8&255),v(o,e.adler>>16&255),v(o,e.adler>>24&255),v(o,255&e.total_in),v(o,e.total_in>>8&255),v(o,e.total_in>>16&255),v(o,e.total_in>>24&255)):(b(o,e.adler>>>16),b(o,65535&e.adler)),g(e),0=r.w_size&&(0===s&&(m(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new o.Buf8(r.w_size),o.arraySet(f,t,p-r.w_size,r.w_size,0),t=f,p=r.w_size),l=e.avail_in,u=e.next_in,d=e.input,e.avail_in=p,e.next_in=0,e.input=t,x(r);r.lookahead>=3;){for(n=r.strstart,i=r.lookahead-2;r.ins_h=(r.ins_h<>>=_=b>>>24,h-=_,0==(_=b>>>16&255))E[i++]=65535&b;else{if(!(16&_)){if(!(64&_)){b=m[(65535&b)+(p&(1<<_)-1)];continue t}if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}x=65535&b,(_&=15)&&(h<_&&(p+=C[n++]<>>=_,h-=_),h<15&&(p+=C[n++]<>>=_=b>>>24,h-=_,!(16&(_=b>>>16&255))){if(!(64&_)){b=g[(65535&b)+(p&(1<<_)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(w=65535&b,h<(_&=15)&&(p+=C[n++]<>>=_,h-=_,(_=i-a)>3,p&=(1<<(h-=x<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):l}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):l}function p(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(o<(i=a.wsize-a.wnext)&&(i=o),n.arraySet(a.window,t,r-o,i,a.wnext),(o-=i)?(n.arraySet(a.window,t,r-o,o,0),a.wnext=o,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=i(r.check,N,2,0),y=g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&g)<<8)+(g>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&g)){e.msg="unknown compression method",r.mode=30;break}if(y-=4,R=8+(15&(g>>>=4)),0===r.wbits)r.wbits=R;else if(R>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(N[0]=255&g,N[1]=g>>>8&255,r.check=i(r.check,N,2,0)),y=g=0,r.mode=3;case 3:for(;y<32;){if(0===h)break e;h--,g+=u[f++]<>>8&255,N[2]=g>>>16&255,N[3]=g>>>24&255,r.check=i(r.check,N,4,0)),y=g=0,r.mode=4;case 4:for(;y<16;){if(0===h)break e;h--,g+=u[f++]<>8),512&r.flags&&(N[0]=255&g,N[1]=g>>>8&255,r.check=i(r.check,N,2,0)),y=g=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===h)break e;h--,g+=u[f++]<>>8&255,r.check=i(r.check,N,2,0)),y=g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(h<(w=r.length)&&(w=h),w&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,u,f,w,R)),512&r.flags&&(r.check=i(r.check,u,w,f)),h-=w,f+=w,r.length-=w),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===h)break e;for(w=0;R=u[f+w++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R)),R&&w>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===h)break e;h--,g+=u[f++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===h)break e;h--,g+=u[f++]<>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6!==t)break;g>>>=2,y-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}g>>>=2,y-=2;break;case 14:for(g>>>=7&y,y-=7&y;y<32;){if(0===h)break e;h--,g+=u[f++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&g,y=g=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(w=r.length){if(h>>=5,y-=5,r.ndist=1+(31&g),g>>>=5,y-=5,r.ncode=4+(15&g),g>>>=4,y-=4,286>>=3,y-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,O={bits:r.lenbits},P=s(0,r.lens,0,19,r.lencode,0,r.work,O),r.lenbits=O.bits,P){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,T=65535&L,!((C=L>>>24)<=y);){if(0===h)break e;h--,g+=u[f++]<>>=C,y-=C,r.lens[r.have++]=T;else{if(16===T){for(D=C+2;y>>=C,y-=C,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}R=r.lens[r.have-1],w=3+(3&g),g>>>=2,y-=2}else if(17===T){for(D=C+3;y>>=C)),g>>>=3,y-=3}else{for(D=C+7;y>>=C)),g>>>=7,y-=7}if(r.have+w>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;w--;)r.lens[r.have++]=R}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,O={bits:r.lenbits},P=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,O),r.lenbits=O.bits,P){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,O={bits:r.distbits},P=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,O),r.distbits=O.bits,P){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=h&&258<=m){e.next_out=p,e.avail_out=m,e.next_in=f,e.avail_in=h,r.hold=g,r.bits=y,a(e,x),p=e.next_out,d=e.output,m=e.avail_out,f=e.next_in,u=e.input,h=e.avail_in,g=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;E=(L=r.lencode[g&(1<>>16&255,T=65535&L,!((C=L>>>24)<=y);){if(0===h)break e;h--,g+=u[f++]<>I)])>>>16&255,T=65535&L,!(I+(C=L>>>24)<=y);){if(0===h)break e;h--,g+=u[f++]<>>=I,y-=I,r.back+=I}if(g>>>=C,y-=C,r.back+=C,r.length=T,0===E){r.mode=26;break}if(32&E){r.back=-1,r.mode=12;break}if(64&E){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&E,r.mode=22;case 22:if(r.extra){for(D=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=(L=r.distcode[g&(1<>>16&255,T=65535&L,!((C=L>>>24)<=y);){if(0===h)break e;h--,g+=u[f++]<>I)])>>>16&255,T=65535&L,!(I+(C=L>>>24)<=y);){if(0===h)break e;h--,g+=u[f++]<>>=I,y-=I,r.back+=I}if(g>>>=C,y-=C,r.back+=C,64&E){e.msg="invalid distance code",r.mode=30;break}r.offset=T,r.extra=15&E,r.mode=24;case 24:if(r.extra){for(D=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===m)break e;if(w=x-m,r.offset>w){if((w=r.offset-w)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}A=w>r.wnext?(w-=r.wnext,r.wsize-w):r.wnext-w,w>r.length&&(w=r.length),S=r.window}else S=d,A=p-r.offset,w=r.length;for(mv?(_=F[z+d[S]],O[D+d[S]]):(_=96,0),p=1<>k)+(h-=p)]=b<<24|_<<16|x,0!==h;);for(p=1<>=1;if(0!==p?(P&=p-1,P+=p):P=0,S++,0==--L[A]){if(A===E)break;A=t[r+d[S]]}if(T>>7)]}function C(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function k(e,t,r){var n,o,i=new Array(16),a=0;for(n=1;n<=l;n++)i[n]=a=a+r[n-1]<<1;for(o=0;o<=t;o++){var s=e[2*o+1];0!==s&&(e[2*o]=I(i[s]++,s))}}function M(e){var t;for(t=0;t>1;1<=r;r--)O(e,i,r);for(o=c;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],O(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*o]=i[2*r]+i[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=o,e.heap[1]=o++,O(e,i,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,o,i,a,s,c=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(i=0;i<=l;i++)e.bl_count[i]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)m<(i=c[2*c[2*(n=e.heap[r])+1]+1]+1)&&(i=m,g++),c[2*n+1]=i,u>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=r+5,r+4<=o&&-1!==t?B(e,t,r,n):4===e.strategy||a===o?(E(e,2+(n?1:0),3),D(e,p,h)):(E(e,4+(n?1:0),3),function(e,t,r,n){var o;for(E(e,t-257,5),E(e,r-1,5),E(e,n-4,4),o=0;o>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(g[r]+i+1)]++,e.dyn_dtree[2*S(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){E(e,2,3),T(e,256,p),function(e){16===e.bi_valid?(C(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,o){(function(e){!function(e){"use strict";if(!e.setImmediate){var t,r,o,i,a=1,s={},l=!1,c=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,t="[object process]"==={}.toString.call(e.process)?function(e){n.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(i="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",p,!1):e.attachEvent("onmessage",p),function(t){e.postMessage(i+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){o.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(r=c.documentElement,function(e){var t=c.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),n=0;n0&&i(u)?r>1?e(u,r-1,i,a,s):n(s,u):a||(s[s.length]=u)}return s}},"cq/+"(e,t,r){var n=r("mc0g")();e.exports=n},JC6p(e,t,r){var n=r("cq/+"),o=r("7GkX");e.exports=function(e,t){return e&&n(e,t,o)}},ZWtO(e,t,r){var n=r("4uTw"),o=r("9Nap");e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&rt||a&&s&&c&&!l&&!u||o&&s&&c||!r&&c||!i)return 1;if(!o&&!a&&!u&&e=l?c:c*("desc"==r[o]?-1:1)}return e.index-t.index}},"2gN3"(e,t,r){var n=r("Kz5y")["__core-js_shared__"];e.exports=n},lQqw(e,t,r){var n=r("MMmD");e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++au))return!1;var f=l.get(e),p=l.get(t);if(f&&p)return f==t&&p==e;var h=-1,m=!0,g=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++h-1&&e%1==0&&e-1}},Z8oC(e,t,r){var n=r("y1pI");e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},fGT3(e,t,r){var n=r("4kuk"),o=r("Xi7e"),i=r("ebwN");e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},"k+1r"(e,t,r){var n=r("QkVE");e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},JHgL(e,t,r){var n=r("QkVE");e.exports=function(e){return n(this,e).get(e)}},pSRY(e,t,r){var n=r("QkVE");e.exports=function(e){return n(this,e).has(e)}},H8j4(e,t,r){var n=r("QkVE");e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},"7fqy"(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},IOzZ(e){e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},I01J(e,t,r){var n=r("44Ds");e.exports=function(e){var t=n(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},YESw(e,t,r){var n=r("Cwc5")(Object,"create");e.exports=n},V6Ve(e,t,r){var n=r("kekF")(Object.keys,Object);e.exports=n},mdPL(e,t,r){e=r.nmd(e);var n=r("WFqU"),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},KfNM(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},kekF(e){e.exports=function(e,t){return function(r){return e(t(r))}}},Ioao(e,t,r){var n=r("heNW"),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),l=Array(s);++a0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},"77Zs"(e,t,r){var n=r("Xi7e");e.exports=function(){this.__data__=new n,this.size=0}},L8xA(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},gCq4(e){e.exports=function(e){return this.__data__.get(e)}},VaNO(e){e.exports=function(e){return this.__data__.has(e)}},"0Cz8"(e,t,r){var n=r("Xi7e"),o=r("ebwN"),i=r("e4Nc");e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},GNiM(e,t,r){var n=r("I01J"),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)}),t});e.exports=a},"9Nap"(e,t,r){var n=r("/9aa");e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},"3Fdi"(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},cvCv(e){e.exports=function(e){return function(){return e}}},ljhN(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},O7iK(e){e.exports=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t-1&&e%1==0&&e<=9007199254740991}},GoyQ(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},ExA7(e){e.exports=function(e){return null!=e&&"object"==typeof e}},"/9aa"(e,t,r){var n=r("NykK"),o=r("ExA7");e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},c6wG(e,t,r){var n=r("dD9F"),o=r("sEf8"),i=r("mdPL"),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},"7GkX"(e,t,r){var n=r("b80T"),o=r("A90E"),i=r("MMmD");e.exports=function(e){return i(e)?n(e):o(e)}},LvDl(e,t,r){var n;e=r.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=32,c=128,u=1/0,d=9007199254740991,f=NaN,p=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",_="[object Function]",x="[object GeneratorFunction]",w="[object Map]",A="[object Number]",S="[object Object]",C="[object Promise]",E="[object RegExp]",T="[object Set]",I="[object String]",k="[object Symbol]",M="[object WeakMap]",R="[object ArrayBuffer]",P="[object DataView]",O="[object Float32Array]",D="[object Float64Array]",L="[object Int8Array]",N="[object Int16Array]",F="[object Int32Array]",z="[object Uint8Array]",B="[object Uint8ClampedArray]",j="[object Uint16Array]",$="[object Uint32Array]",U=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,q=RegExp(G.source),Z=RegExp(W.source),Y=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",we="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+xe+"]",ke="["+Te+"]",Me="["+we+"]",Re="\\d+",Pe="["+Ae+"]",Oe="["+Se+"]",De="[^"+xe+Te+Re+Ae+Se+Ce+"]",Le="\\ud83c[\\udffb-\\udfff]",Ne="[^"+xe+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Ce+"]",je="\\u200d",$e="(?:"+Oe+"|"+De+")",Ue="(?:"+Be+"|"+De+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Me+"|"+Le+")?",We="["+Ee+"]?",qe=We+Ge+"(?:"+je+"(?:"+[Ne,Fe,ze].join("|")+")"+We+Ge+")*",Ze="(?:"+[Pe,Fe,ze].join("|")+")"+qe,Ye="(?:"+[Ne+Me+"?",Me,Fe,ze,Ie].join("|")+")",Xe=RegExp("['’]","g"),Ke=RegExp(Me,"g"),Je=RegExp(Le+"(?="+Le+")|"+Ye+qe,"g"),Qe=RegExp([Be+"?"+Oe+"+"+Ve+"(?="+[ke,Be,"$"].join("|")+")",Ue+"+"+He+"(?="+[ke,Be+$e,"$"].join("|")+")",Be+"?"+$e+"+"+Ve,Be+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Ze].join("|"),"g"),et=RegExp("["+je+xe+we+Ee+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,ot={};ot[O]=ot[D]=ot[L]=ot[N]=ot[F]=ot[z]=ot[B]=ot[j]=ot[$]=!0,ot[m]=ot[g]=ot[R]=ot[y]=ot[P]=ot[v]=ot[b]=ot[_]=ot[w]=ot[A]=ot[S]=ot[E]=ot[T]=ot[I]=ot[M]=!1;var it={};it[m]=it[g]=it[R]=it[P]=it[y]=it[v]=it[O]=it[D]=it[L]=it[N]=it[F]=it[w]=it[A]=it[S]=it[E]=it[T]=it[I]=it[k]=it[z]=it[B]=it[j]=it[$]=!0,it[b]=it[_]=it[M]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ut="object"==typeof self&&self&&self.Object===Object&&self,dt=ct||ut||Function("return this")(),ft=t&&!t.nodeType&&t,pt=ft&&e&&!e.nodeType&&e,ht=pt&&pt.exports===ft,mt=ht&&ct.process,gt=function(){try{return pt&&pt.require&&pt.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,vt=gt&>.isDate,bt=gt&>.isMap,_t=gt&>.isRegExp,xt=gt&>.isSet,wt=gt&>.isTypedArray;function At(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function St(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o-1}function Mt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n-1;);return r}function Qt(e,t){for(var r=e.length;r--&&Bt(t,e[r],0)>-1;);return r}var er=Ht({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tr=Ht({"&":"&","<":"<",">":">",'"':""","'":"'"});function rr(e){return"\\"+at[e]}function nr(e){return et.test(e)}function or(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function ir(e,t){return function(r){return e(t(r))}}function ar(e,t){for(var r=-1,n=e.length,o=0,i=[];++r",""":'"',"'":"'"}),pr=function e(t){var r,n=(t=null==t?dt:pr.defaults(dt.Object(),t,pr.pick(dt,rt))).Array,oe=t.Date,xe=t.Error,we=t.Function,Ae=t.Math,Se=t.Object,Ce=t.RegExp,Ee=t.String,Te=t.TypeError,Ie=n.prototype,ke=we.prototype,Me=Se.prototype,Re=t["__core-js_shared__"],Pe=ke.toString,Oe=Me.hasOwnProperty,De=0,Le=(r=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ne=Me.toString,Fe=Pe.call(Se),ze=dt._,Be=Ce("^"+Pe.call(Oe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),je=ht?t.Buffer:o,$e=t.Symbol,Ue=t.Uint8Array,Ve=je?je.allocUnsafe:o,He=ir(Se.getPrototypeOf,Se),Ge=Se.create,We=Me.propertyIsEnumerable,qe=Ie.splice,Ze=$e?$e.isConcatSpreadable:o,Ye=$e?$e.iterator:o,Je=$e?$e.toStringTag:o,et=function(){try{var e=ci(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==dt.Date.now&&oe.now,ut=t.setTimeout!==dt.setTimeout&&t.setTimeout,ft=Ae.ceil,pt=Ae.floor,mt=Se.getOwnPropertySymbols,gt=je?je.isBuffer:o,Nt=t.isFinite,Ht=Ie.join,hr=ir(Se.keys,Se),mr=Ae.max,gr=Ae.min,yr=oe.now,vr=t.parseInt,br=Ae.random,_r=Ie.reverse,xr=ci(t,"DataView"),wr=ci(t,"Map"),Ar=ci(t,"Promise"),Sr=ci(t,"Set"),Cr=ci(t,"WeakMap"),Er=ci(Se,"create"),Tr=Cr&&new Cr,Ir={},kr=Fi(xr),Mr=Fi(wr),Rr=Fi(Ar),Pr=Fi(Sr),Or=Fi(Cr),Dr=$e?$e.prototype:o,Lr=Dr?Dr.valueOf:o,Nr=Dr?Dr.toString:o;function Fr(e){if(es(e)&&!Va(e)&&!(e instanceof $r)){if(e instanceof jr)return e;if(Oe.call(e,"__wrapped__"))return zi(e)}return new jr(e)}var zr=function(){function e(){}return function(t){if(!Qa(t))return{};if(Ge)return Ge(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function Br(){}function jr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function $r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Ur(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function an(e,t,r,n,i,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=i?r(e,n,i,a):r(e)),s!==o)return s;if(!Qa(e))return e;var d=Va(e);if(d){if(s=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!l)return To(e,s)}else{var f=fi(e),p=f==_||f==x;if(qa(e))return xo(e,l);if(f==S||f==m||p&&!i){if(s=c||p?{}:hi(e),!l)return c?function(e,t){return Io(e,di(e),t)}(e,function(e,t){return e&&Io(t,Rs(t),e)}(s,e)):function(e,t){return Io(e,ui(e),t)}(e,tn(s,e))}else{if(!it[f])return i?e:{};s=function(e,t,r){var n,o=e.constructor;switch(t){case R:return wo(e);case y:case v:return new o(+e);case P:return function(e,t){var r=t?wo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case O:case D:case L:case N:case F:case z:case B:case j:case $:return Ao(e,r);case w:return new o;case A:case I:return new o(e);case E:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new o;case k:return n=e,Lr?Se(Lr.call(n)):{}}}(e,f,l)}}a||(a=new Wr);var h=a.get(e);if(h)return h;a.set(e,s),is(e)?e.forEach(function(n){s.add(an(n,t,r,n,e,a))}):ts(e)&&e.forEach(function(n,o){s.set(o,an(n,t,r,o,e,a))});var g=d?o:(u?c?ri:ti:c?Rs:Ms)(e);return Ct(g||e,function(n,o){g&&(n=e[o=n]),Jr(s,o,an(n,t,r,o,e,a))}),s}function sn(e,t,r){var n=r.length;if(null==e)return!n;for(e=Se(e);n--;){var i=r[n],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function ln(e,t,r){if("function"!=typeof e)throw new Te(i);return Ii(function(){e.apply(o,r)},t)}function cn(e,t,r,n){var o=-1,i=kt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;r&&(t=Rt(t,Yt(r))),n?(i=Mt,a=!1):t.length>=200&&(i=Kt,a=!1,t=new Gr(t));e:for(;++o-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=Qr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Hr.prototype.clear=function(){this.size=0,this.__data__={hash:new Ur,map:new(wr||Vr),string:new Ur}},Hr.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},Hr.prototype.get=function(e){return si(this,e).get(e)},Hr.prototype.has=function(e){return si(this,e).has(e)},Hr.prototype.set=function(e,t){var r=si(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Gr.prototype.add=Gr.prototype.push=function(e){return this.__data__.set(e,a),this},Gr.prototype.has=function(e){return this.__data__.has(e)},Wr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Wr.prototype.get=function(e){return this.__data__.get(e)},Wr.prototype.has=function(e){return this.__data__.has(e)},Wr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!wr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Hr(n)}return r.set(e,t),this.size=r.size,this};var un=Ro(vn),dn=Ro(bn,!0);function fn(e,t){var r=!0;return un(e,function(e,n,o){return r=!!t(e,n,o)}),r}function pn(e,t,r){for(var n=-1,i=e.length;++n0&&r(s)?t>1?mn(s,t-1,r,n,o):Pt(o,s):n||(o[o.length]=s)}return o}var gn=Po(),yn=Po(!0);function vn(e,t){return e&&gn(e,t,Ms)}function bn(e,t){return e&&yn(e,t,Ms)}function _n(e,t){return It(t,function(t){return Xa(e[t])})}function xn(e,t){for(var r=0,n=(t=yo(t,e)).length;null!=e&&rt}function Cn(e,t){return null!=e&&Oe.call(e,t)}function En(e,t){return null!=e&&t in Se(e)}function Tn(e,t,r){for(var i=r?Mt:kt,a=e[0].length,s=e.length,l=s,c=n(s),u=1/0,d=[];l--;){var f=e[l];l&&t&&(f=Rt(f,Yt(t))),u=gr(f.length,u),c[l]=!r&&(t||a>=120&&f.length>=120)?new Gr(l&&f):o}f=e[0];var p=-1,h=c[0];e:for(;++p=s?l:l*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)});t--;)e[t]=e[t].value;return e}(o)}function Un(e,t,r){for(var n=-1,o=t.length,i={};++n-1;)s!==e&&qe.call(s,l,1),qe.call(e,l,1);return e}function Hn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;gi(o)?qe.call(e,o,1):lo(e,o)}}return e}function Gn(e,t){return e+pt(br()*(t-e+1))}function Wn(e,t){var r="";if(!e||t<1||t>d)return r;do{t%2&&(r+=e),(t=pt(t/2))&&(e+=e)}while(t);return r}function qn(e,t){return ki(Si(e,t,rl),e+"")}function Zn(e){return Zr(Bs(e))}function Yn(e,t){var r=Bs(e);return Pi(r,on(t,0,r.length))}function Xn(e,t,r,n){if(!Qa(e))return e;for(var i=-1,a=(t=yo(t,e)).length,s=a-1,l=e;null!=l&&++ii?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=n(i);++o>>1,a=e[i];null!==a&&!ss(a)&&(r?a<=t:a=200){var c=t?null:qo(e);if(c)return sr(c);a=!1,o=Kt,l=new Gr}else l=t?[]:s;e:for(;++n=n?e:eo(e,t,r)}var _o=at||function(e){return dt.clearTimeout(e)};function xo(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function wo(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Ao(e,t){var r=t?wo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function So(e,t){if(e!==t){var r=e!==o,n=null===e,i=e==e,a=ss(e),s=t!==o,l=null===t,c=t==t,u=ss(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||n&&s&&c||!r&&c||!i)return 1;if(!n&&!a&&!u&&e1?r[i-1]:o,s=i>2?r[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&yi(r[0],r[1],s)&&(a=i<3?o:a,i=1),t=Se(t);++n-1?i[a?t[s]:s]:o}}function Fo(e){return ei(function(t){var r=t.length,n=r,a=jr.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new Te(i);if(a&&!l&&"wrapper"==oi(s))var l=new jr([],!0)}for(n=l?n:r;++n1&&_.reverse(),p&&dl))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,h=2&r?new Gr:o;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Ct(h,function(r){var n="_."+r[0];t&r[1]&&!kt(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(n),r)))}function Ri(e){var t=0,r=0;return function(){var n=yr(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Pi(e,t){var r=-1,n=e.length,i=n-1;for(t=t===o?n:t;++r1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,oa(e,r)});function da(e){var t=Fr(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var pa=ei(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof $r&&gi(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:fa,args:[i],thisArg:o}),new jr(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)}),ha=ko(function(e,t,r){Oe.call(e,r)?++e[r]:rn(e,r,1)}),ma=No(Ui),ga=No(Vi);function ya(e,t){return(Va(e)?Ct:un)(e,ai(t,3))}function va(e,t){return(Va(e)?Et:dn)(e,ai(t,3))}var ba=ko(function(e,t,r){Oe.call(e,r)?e[r].push(t):rn(e,r,[t])}),_a=qn(function(e,t,r){var o=-1,i="function"==typeof t,a=Ga(e)?n(e.length):[];return un(e,function(e){a[++o]=i?At(t,e,r):In(e,t,r)}),a}),xa=ko(function(e,t,r){rn(e,r,t)});function wa(e,t){return(Va(e)?Rt:Nn)(e,ai(t,3))}var Aa=ko(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]}),Sa=qn(function(e,t){if(null==e)return[];var r=t.length;return r>1&&yi(e,t[0],t[1])?t=[]:r>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),$n(e,mn(t,1),[])}),Ca=ct||function(){return dt.Date.now()};function Ea(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Yo(e,c,o,o,o,o,t)}function Ta(e,t){var r;if("function"!=typeof t)throw new Te(i);return e=ps(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var Ia=qn(function(e,t,r){var n=1;if(r.length){var o=ar(r,ii(Ia));n|=l}return Yo(e,n,t,r,o)}),ka=qn(function(e,t,r){var n=3;if(r.length){var o=ar(r,ii(ka));n|=l}return Yo(t,n,e,r,o)});function Ma(e,t,r){var n,a,s,l,c,u,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Te(i);function m(t){var r=n,i=a;return n=a=o,d=t,l=e.apply(i,r)}function g(e){var r=e-u;return u===o||r>=t||r<0||p&&e-d>=s}function y(){var e=Ca();if(g(e))return v(e);c=Ii(y,function(e){var r=t-(e-u);return p?gr(r,s-(e-d)):r}(e))}function v(e){return c=o,h&&n?m(e):(n=a=o,l)}function b(){var e=Ca(),r=g(e);if(n=arguments,a=this,u=e,r){if(c===o)return function(e){return d=e,c=Ii(y,t),f?m(e):l}(u);if(p)return _o(c),c=Ii(y,t),m(u)}return c===o&&(c=Ii(y,t)),l}return t=ms(t)||0,Qa(r)&&(f=!!r.leading,s=(p="maxWait"in r)?mr(ms(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h),b.cancel=function(){c!==o&&_o(c),d=0,n=u=a=c=o},b.flush=function(){return c===o?l:v(Ca())},b}var Ra=qn(function(e,t){return ln(e,1,t)}),Pa=qn(function(e,t,r){return ln(e,ms(t)||0,r)});function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(i);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Oa.Cache||Hr),r}function Da(e){if("function"!=typeof e)throw new Te(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=Hr;var La=vo(function(e,t){var r=(t=1==t.length&&Va(t[0])?Rt(t[0],Yt(ai())):Rt(mn(t,1),Yt(ai()))).length;return qn(function(n){for(var o=-1,i=gr(n.length,r);++o=t}),Ua=kn(function(){return arguments}())?kn:function(e){return es(e)&&Oe.call(e,"callee")&&!We.call(e,"callee")},Va=n.isArray,Ha=yt?Yt(yt):function(e){return es(e)&&An(e)==R};function Ga(e){return null!=e&&Ja(e.length)&&!Xa(e)}function Wa(e){return es(e)&&Ga(e)}var qa=gt||ml,Za=vt?Yt(vt):function(e){return es(e)&&An(e)==v};function Ya(e){if(!es(e))return!1;var t=An(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ns(e)}function Xa(e){if(!Qa(e))return!1;var t=An(e);return t==_||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ka(e){return"number"==typeof e&&e==ps(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function Qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=bt?Yt(bt):function(e){return es(e)&&fi(e)==w};function rs(e){return"number"==typeof e||es(e)&&An(e)==A}function ns(e){if(!es(e)||An(e)!=S)return!1;var t=He(e);if(null===t)return!0;var r=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Pe.call(r)==Fe}var os=_t?Yt(_t):function(e){return es(e)&&An(e)==E},is=xt?Yt(xt):function(e){return es(e)&&fi(e)==T};function as(e){return"string"==typeof e||!Va(e)&&es(e)&&An(e)==I}function ss(e){return"symbol"==typeof e||es(e)&&An(e)==k}var ls=wt?Yt(wt):function(e){return es(e)&&Ja(e.length)&&!!ot[An(e)]},cs=Ho(Ln),us=Ho(function(e,t){return e<=t});function ds(e){if(!e)return[];if(Ga(e))return as(e)?ur(e):To(e);if(Ye&&e[Ye])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ye]());var t=fi(e);return(t==w?or:t==T?sr:Bs)(e)}function fs(e){return e?(e=ms(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ps(e){var t=fs(e),r=t%1;return t==t?r?t-r:t:0}function hs(e){return e?on(ps(e),0,p):0}function ms(e){if("number"==typeof e)return e;if(ss(e))return f;if(Qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var r=he.test(e);return r||ge.test(e)?lt(e.slice(2),r?2:8):pe.test(e)?f:+e}function gs(e){return Io(e,Rs(e))}function ys(e){return null==e?"":ao(e)}var vs=Mo(function(e,t){if(xi(t)||Ga(t))Io(t,Ms(t),e);else for(var r in t)Oe.call(t,r)&&Jr(e,r,t[r])}),bs=Mo(function(e,t){Io(t,Rs(t),e)}),_s=Mo(function(e,t,r,n){Io(t,Rs(t),e,n)}),xs=Mo(function(e,t,r,n){Io(t,Ms(t),e,n)}),ws=ei(nn),As=qn(function(e,t){e=Se(e);var r=-1,n=t.length,i=n>2?t[2]:o;for(i&&yi(t[0],t[1],i)&&(n=1);++r1),t}),Io(e,ri(e),r),n&&(r=an(r,7,Jo));for(var o=t.length;o--;)lo(r,t[o]);return r}),Ls=ei(function(e,t){return null==e?{}:function(e,t){return Un(e,t,function(t,r){return Es(e,r)})}(e,t)});function Ns(e,t){if(null==e)return{};var r=Rt(ri(e),function(e){return[e]});return t=ai(t),Un(e,r,function(e,r){return t(e,r[0])})}var Fs=Zo(Ms),zs=Zo(Rs);function Bs(e){return null==e?[]:Xt(e,Ms(e))}var js=Do(function(e,t,r){return t=t.toLowerCase(),e+(r?$s(t):t)});function $s(e){return Ys(ys(e).toLowerCase())}function Us(e){return(e=ys(e))&&e.replace(ve,er).replace(Ke,"")}var Vs=Do(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),Hs=Do(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),Gs=Oo("toLowerCase"),Ws=Do(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),qs=Do(function(e,t,r){return e+(r?" ":"")+Ys(t)}),Zs=Do(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Ys=Oo("toUpperCase");function Xs(e,t,r){return e=ys(e),(t=r?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Ks=qn(function(e,t){try{return At(e,o,t)}catch(e){return Ya(e)?e:new xe(e)}}),Js=ei(function(e,t){return Ct(t,function(t){t=Ni(t),rn(e,t,Ia(e[t],e))}),e});function Qs(e){return function(){return e}}var el=Fo(),tl=Fo(!0);function rl(e){return e}function nl(e){return On("function"==typeof e?e:an(e,1))}var ol=qn(function(e,t){return function(r){return In(r,e,t)}}),il=qn(function(e,t){return function(r){return In(e,r,t)}});function al(e,t,r){var n=Ms(t),o=_n(t,n);null!=r||Qa(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=_n(t,Ms(t)));var i=!(Qa(r)&&"chain"in r&&!r.chain),a=Xa(e);return Ct(o,function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=To(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Pt([this.value()],arguments))})}),e}function sl(){}var ll=$o(Rt),cl=$o(Tt),ul=$o(Lt);function dl(e){return vi(e)?Vt(Ni(e)):function(e){return function(t){return xn(t,e)}}(e)}var fl=Vo(),pl=Vo(!0);function hl(){return[]}function ml(){return!1}var gl,yl=jo(function(e,t){return e+t},0),vl=Wo("ceil"),bl=jo(function(e,t){return e/t},1),_l=Wo("floor"),xl=jo(function(e,t){return e*t},1),wl=Wo("round"),Al=jo(function(e,t){return e-t},0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Te(i);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Ea,Fr.assign=vs,Fr.assignIn=bs,Fr.assignInWith=_s,Fr.assignWith=xs,Fr.at=ws,Fr.before=Ta,Fr.bind=Ia,Fr.bindAll=Js,Fr.bindKey=ka,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Va(e)?e:[e]},Fr.chain=da,Fr.chunk=function(e,t,r){t=(r?yi(e,t,r):t===o)?1:mr(ps(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,l=n(ft(i/t));ai?0:i+r),(n=n===o||n>i?i:ps(n))<0&&(n+=i),n=r>n?0:hs(n);r>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ao(t))&&nr(e)?bo(ur(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new Te(i);return t=null==t?0:mr(ps(t),0),qn(function(r){var n=r[t],o=bo(r,0,t);return n&&Pt(o,n),At(e,this,o)})},Fr.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?eo(e,0,(t=r||t===o?1:ps(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?eo(e,(t=n-(t=r||t===o?1:ps(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?uo(e,ai(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?uo(e,ai(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new Te(i);return Qa(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ma(e,t,{leading:n,maxWait:t,trailing:o})},Fr.thru=fa,Fr.toArray=ds,Fr.toPairs=Fs,Fr.toPairsIn=zs,Fr.toPath=function(e){return Va(e)?Rt(e,Ni):ss(e)?[e]:To(Li(ys(e)))},Fr.toPlainObject=gs,Fr.transform=function(e,t,r){var n=Va(e),o=n||qa(e)||ls(e);if(t=ai(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:Qa(e)&&Xa(i)?zr(He(e)):{}}return(o?Ct:vn)(e,function(e,n,o){return t(r,e,n,o)}),r},Fr.unary=function(e){return Ea(e,1)},Fr.union=ea,Fr.unionBy=ta,Fr.unionWith=ra,Fr.uniq=function(e){return e&&e.length?so(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?so(e,ai(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},Fr.unset=function(e,t){return null==e||lo(e,t)},Fr.unzip=na,Fr.unzipWith=oa,Fr.update=function(e,t,r){return null==e?e:co(e,t,go(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:co(e,t,go(r),n)},Fr.values=Bs,Fr.valuesIn=function(e){return null==e?[]:Xt(e,Rs(e))},Fr.without=ia,Fr.words=Xs,Fr.wrap=function(e,t){return Na(go(t),e)},Fr.xor=aa,Fr.xorBy=sa,Fr.xorWith=la,Fr.zip=ca,Fr.zipObject=function(e,t){return ho(e||[],t||[],Jr)},Fr.zipObjectDeep=function(e,t){return ho(e||[],t||[],Xn)},Fr.zipWith=ua,Fr.entries=Fs,Fr.entriesIn=zs,Fr.extend=bs,Fr.extendWith=_s,al(Fr,Fr),Fr.add=yl,Fr.attempt=Ks,Fr.camelCase=js,Fr.capitalize=$s,Fr.ceil=vl,Fr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=ms(r))==r?r:0),t!==o&&(t=(t=ms(t))==t?t:0),on(ms(e),t,r)},Fr.clone=function(e){return an(e,4)},Fr.cloneDeep=function(e){return an(e,5)},Fr.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:o)},Fr.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:o)},Fr.conformsTo=function(e,t){return null==t||sn(e,t,Ms(t))},Fr.deburr=Us,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=bl,Fr.endsWith=function(e,t,r){e=ys(e),t=ao(t);var n=e.length,i=r=r===o?n:on(ps(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Fr.eq=Ba,Fr.escape=function(e){return(e=ys(e))&&Z.test(e)?e.replace(W,tr):e},Fr.escapeRegExp=function(e){return(e=ys(e))&&re.test(e)?e.replace(te,"\\$&"):e},Fr.every=function(e,t,r){var n=Va(e)?Tt:fn;return r&&yi(e,t,r)&&(t=o),n(e,ai(t,3))},Fr.find=ma,Fr.findIndex=Ui,Fr.findKey=function(e,t){return Ft(e,ai(t,3),vn)},Fr.findLast=ga,Fr.findLastIndex=Vi,Fr.findLastKey=function(e,t){return Ft(e,ai(t,3),bn)},Fr.floor=_l,Fr.forEach=ya,Fr.forEachRight=va,Fr.forIn=function(e,t){return null==e?e:gn(e,ai(t,3),Rs)},Fr.forInRight=function(e,t){return null==e?e:yn(e,ai(t,3),Rs)},Fr.forOwn=function(e,t){return e&&vn(e,ai(t,3))},Fr.forOwnRight=function(e,t){return e&&bn(e,ai(t,3))},Fr.get=Cs,Fr.gt=ja,Fr.gte=$a,Fr.has=function(e,t){return null!=e&&pi(e,t,Cn)},Fr.hasIn=Es,Fr.head=Gi,Fr.identity=rl,Fr.includes=function(e,t,r,n){e=Ga(e)?e:Bs(e),r=r&&!n?ps(r):0;var o=e.length;return r<0&&(r=mr(o+r,0)),as(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Bt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ps(r);return o<0&&(o=mr(n+o,0)),Bt(e,t,o)},Fr.inRange=function(e,t,r){return t=fs(t),r===o?(r=t,t=0):r=fs(r),function(e,t,r){return e>=gr(t,r)&&e=-9007199254740991&&e<=d},Fr.isSet=is,Fr.isString=as,Fr.isSymbol=ss,Fr.isTypedArray=ls,Fr.isUndefined=function(e){return e===o},Fr.isWeakMap=function(e){return es(e)&&fi(e)==M},Fr.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==An(e)},Fr.join=function(e,t){return null==e?"":Ht.call(e,t)},Fr.kebabCase=Vs,Fr.last=Yi,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=ps(r))<0?mr(n+i,0):gr(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):zt(e,$t,i,!0)},Fr.lowerCase=Hs,Fr.lowerFirst=Gs,Fr.lt=cs,Fr.lte=us,Fr.max=function(e){return e&&e.length?pn(e,rl,Sn):o},Fr.maxBy=function(e,t){return e&&e.length?pn(e,ai(t,2),Sn):o},Fr.mean=function(e){return Ut(e,rl)},Fr.meanBy=function(e,t){return Ut(e,ai(t,2))},Fr.min=function(e){return e&&e.length?pn(e,rl,Ln):o},Fr.minBy=function(e,t){return e&&e.length?pn(e,ai(t,2),Ln):o},Fr.stubArray=hl,Fr.stubFalse=ml,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=xl,Fr.nth=function(e,t){return e&&e.length?jn(e,ps(t)):o},Fr.noConflict=function(){return dt._===this&&(dt._=ze),this},Fr.noop=sl,Fr.now=Ca,Fr.pad=function(e,t,r){e=ys(e);var n=(t=ps(t))?cr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Uo(pt(o),r)+e+Uo(ft(o),r)},Fr.padEnd=function(e,t,r){e=ys(e);var n=(t=ps(t))?cr(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=br();return gr(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Gn(e,t)},Fr.reduce=function(e,t,r){var n=Va(e)?Ot:Gt,o=arguments.length<3;return n(e,ai(t,4),r,o,un)},Fr.reduceRight=function(e,t,r){var n=Va(e)?Dt:Gt,o=arguments.length<3;return n(e,ai(t,4),r,o,dn)},Fr.repeat=function(e,t,r){return t=(r?yi(e,t,r):t===o)?1:ps(t),Wn(ys(e),t)},Fr.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,i=(t=yo(t,e)).length;for(i||(i=1,e=o);++nd)return[];var r=p,n=gr(e,p);t=ai(t),e-=p;for(var o=qt(n,t);++r=a)return e;var l=r-cr(n);if(l<1)return n;var c=s?bo(s,0,l).join(""):e.slice(0,l);if(i===o)return c+n;if(s&&(l+=c.length-l),os(i)){if(e.slice(l).search(i)){var u,d=c;for(i.global||(i=Ce(i.source,ys(fe.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;c=c.slice(0,f===o?l:f)}}else if(e.indexOf(ao(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+n},Fr.unescape=function(e){return(e=ys(e))&&q.test(e)?e.replace(G,fr):e},Fr.uniqueId=function(e){var t=++De;return ys(e)+t},Fr.upperCase=Zs,Fr.upperFirst=Ys,Fr.each=ya,Fr.eachRight=va,Fr.first=Gi,al(Fr,(gl={},vn(Fr,function(e,t){Oe.call(Fr.prototype,t)||(gl[t]=e)}),gl),{chain:!1}),Fr.VERSION="4.17.23",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Fr[e].placeholder=Fr}),Ct(["drop","take"],function(e,t){$r.prototype[e]=function(r){r=r===o?1:mr(ps(r),0);var n=this.__filtered__&&!t?new $r(this):this.clone();return n.__filtered__?n.__takeCount__=gr(r,n.__takeCount__):n.__views__.push({size:gr(r,p),type:e+(n.__dir__<0?"Right":"")}),n},$r.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Ct(["filter","map","takeWhile"],function(e,t){var r=t+1,n=1==r||3==r;$r.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),Ct(["head","last"],function(e,t){var r="take"+(t?"Right":"");$r.prototype[e]=function(){return this[r](1).value()[0]}}),Ct(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");$r.prototype[e]=function(){return this.__filtered__?new $r(this):this[r](1)}}),$r.prototype.compact=function(){return this.filter(rl)},$r.prototype.find=function(e){return this.filter(e).head()},$r.prototype.findLast=function(e){return this.reverse().find(e)},$r.prototype.invokeMap=qn(function(e,t){return"function"==typeof e?new $r(this):this.map(function(r){return In(r,e,t)})}),$r.prototype.reject=function(e){return this.filter(Da(ai(e)))},$r.prototype.slice=function(e,t){e=ps(e);var r=this;return r.__filtered__&&(e>0||t<0)?new $r(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=ps(t))<0?r.dropRight(-t):r.take(t-e)),r)},$r.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$r.prototype.toArray=function(){return this.take(p)},vn($r.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Fr[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);i&&(Fr.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,l=t instanceof $r,c=s[0],u=l||Va(t),d=function(e){var t=i.apply(Fr,Pt([e],s));return n&&f?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,m=l&&!p;if(!a&&u){t=m?t:new $r(this);var g=e.apply(t,s);return g.__actions__.push({func:fa,args:[d],thisArg:o}),new jr(g,f)}return h&&m?e.apply(this,s):(g=this.thru(d),h?n?g.value()[0]:g.value():g)})}),Ct(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ie[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Va(o)?o:[],e)}return this[r](function(r){return t.apply(Va(r)?r:[],e)})}}),vn($r.prototype,function(e,t){var r=Fr[t];if(r){var n=r.name+"";Oe.call(Ir,n)||(Ir[n]=[]),Ir[n].push({name:t,func:r})}}),Ir[zo(o,2).name]=[{name:"wrapper",func:o}],$r.prototype.clone=function(){var e=new $r(this.__wrapped__);return e.__actions__=To(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=To(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=To(this.__views__),e},$r.prototype.reverse=function(){if(this.__filtered__){var e=new $r(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$r.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Va(e),n=t<0,o=r?e.length:0,i=function(e,t,r){for(var n=-1,o=r.length;++n=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof Br;){var n=zi(r);n.__index__=0,n.__values__=o,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $r){var t=e;return this.__actions__.length&&(t=new $r(this)),(t=t.reverse()).__actions__.push({func:fa,args:[Qi],thisArg:o}),new jr(t,this.__chain__)}return this.thru(Qi)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Ye&&(Fr.prototype[Ye]=function(){return this}),Fr}();dt._=pr,(n=function(){return pr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},"44Ds"(e,t,r){var n=r("e4Nc");function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},"k8Y/"(e,t,r){var n=r("alwl"),o=r("Z0cm");e.exports=function(e,t,r,i){return null==e?[]:(o(t)||(t=null==t?[]:[t]),o(r=i?void 0:r)||(r=null==r?[]:[r]),n(e,t,r))}},"+c4W"(e,t,r){var n=r("711d"),o=r("4/ic"),i=r("9ggG"),a=r("9Nap");e.exports=function(e){return i(e)?n(a(e)):o(e)}},xweI(e,t,r){var n=r("XGnz"),o=r("alwl"),i=r("EA7m"),a=r("mv/X"),s=i(function(e,t){if(null==e)return[];var r=t.length;return r>1&&a(e,t[0],t[1])?t=[]:r>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,n(t,1),[])});e.exports=s},"0ycA"(e){e.exports=function(){return[]}},B8du(e){e.exports=function(){return!1}},"9UKM"(e,t,r){var n=r("7Efh")(r("7GkX"));e.exports=n},dt0z(e,t,r){var n=r("zoYe");e.exports=function(e){return null==e?"":n(e)}},"4ZJM"(e){e.exports=function(){"use strict";var e,t,r;function n(n,o){if(e)if(t){var i="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk); self.onerror = null;",a={};e(a),r=o(a),"undefined"!=typeof window&&window&&window.URL&&window.URL.createObjectURL&&(r.workerUrl=window.URL.createObjectURL(new Blob([i],{type:"text/javascript"})))}else t=o;else e=o}return n(0,function(e){var t="undefined"!=typeof self?self:{},r="2.15.0";let n;const o={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(null==n){const e=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{n=null!="MISSING_ENV_VAR".API_URL_REGEX?new RegExp("MISSING_ENV_VAR".API_URL_REGEX):e}catch(t){n=e}}return n},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!o.API_URL)return null;try{const e=new URL(o.API_URL);return"api.mapbox.cn"===e.hostname?"https://events.mapbox.cn/events/v2":"api.mapbox.com"===e.hostname?"https://events.mapbox.com/events/v2":null}catch(e){return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},i={supported:!1,testSupport:function(e){!l&&s&&(c?u(e):a=e)}};let a,s,l=!1,c=!1;function u(e){const t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,s),e.isContextLost())return;i.supported=!0}catch(e){}e.deleteTexture(t),l=!0}t.document&&(s=t.document.createElement("img"),s.onload=function(){a&&u(a),a=null,c=!0},s.onerror=function(){l=!0,a=null},s.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const d="01";function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p=h;function h(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=n}h.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,n=0;n<8;n++){var o=this.sampleCurveX(r)-e;if(Math.abs(o)o?a=r:s=r,r=.5*(s-a)+a;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}};var m=f(p),g=y;function y(e,t){this.x=e,this.y=t}y.prototype={clone:function(){return new y(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=n,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),o=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-n*(this.y-t.y),this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},y.convert=function(e){return e instanceof y?e:Array.isArray(e)?new y(e[0],e[1]):e};var v=f(g);const b=Math.PI/180,_=180/Math.PI;function x(e){return e*b}function w(e){return e*_}const A=[[0,0],[1,0],[1,1],[0,1]];function S(e){if(e<=0)return 0;if(e>=1)return 1;const t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function C(e,t,r,n){const o=new m(e,t,r,n);return function(e){return o.solve(e)}}const E=C(.25,.1,.25,1);function T(e,t,r){return Math.min(r,Math.max(t,e))}function I(e,t,r){return(r=T((r-e)/(t-e),0,1))*r*(3-2*r)}function k(e,t,r){const n=r-t,o=((e-t)%n+n)%n+t;return o===t?r:o}function M(e,t,r){if(!e.length)return r(null,[]);let n=e.length;const o=new Array(e.length);let i=null;e.forEach((e,a)=>{t(e,(e,t)=>{e&&(i=e),o[a]=t,0==--n&&r(i,o)})})}function R(e){const t=[];for(const r in e)t.push(e[r]);return t}function P(e,...t){for(const r of t)for(const t in r)e[t]=r[t];return e}let O=1;function D(){return O++}function L(){return function e(t){return t?(t^Math.random()*(16>>t/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function N(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function F(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function z(e,t){e.forEach(e=>{t[e]&&(t[e]=t[e].bind(t))})}function B(e,t){return-1!==e.indexOf(t,e.length-t.length)}function j(e,t,r){const n={};for(const o in e)n[o]=t.call(r||this,e[o],o,e);return n}function $(e,t,r){const n={};for(const o in e)t.call(r||this,e[o],o,e)&&(n[o]=e[o]);return n}function U(e){return Array.isArray(e)?e.map(U):"object"==typeof e&&e?j(e,U):e}const V={};function H(e){V[e]||("undefined"!=typeof console&&console.warn(e),V[e]=!0)}function G(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function W(e){let t=0;for(let r,n,o=0,i=e.length,a=i-1;o@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,r,n,o)=>{const i=n||o;return t[r]=!i||i.toLowerCase(),""}),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}let Y=null;function X(e){if(null==Y){const t=e.navigator?e.navigator.userAgent:null;Y=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return Y}function K(e){try{const r=t[e];return r.setItem("_mapbox_test_",1),r.removeItem("_mapbox_test_"),!0}catch(e){return!1}}function J(e,t){return[e[4*t],e[4*t+1],e[4*t+2],e[4*t+3]]}const Q="mapbox-tiles";let ee,te,re=500,ne=50;function oe(){try{return t.caches}catch(e){}}function ie(){oe()&&!ee&&(ee=t.caches.open(Q))}function ae(e){const t=e.indexOf("?");if(t<0)return e;const r=function(e){const t=e.indexOf("?");return t>0?e.slice(t+1).split("&"):[]}(e),n=r.filter(e=>{const t=e.split("=");return"language"===t[0]||"worldview"===t[0]});return n.length?`${e.slice(0,t)}?${n.join("&")}`:e.slice(0,t)}let se=1/0;const le={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(le);class ce extends Error{constructor(e,t,r){401===t&&_e(r)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=t,this.url=r}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const ue=q()?()=>self.worker&&self.worker.referrer:()=>("blob:"===t.location.protocol?t.parent:t).location.href,de=function(e,r){if(!(/^file:/.test(n=e.url)||/^file:/.test(ue())&&!/^\w+:/.test(n))){if(t.fetch&&t.Request&&t.AbortController&&t.Request.prototype.hasOwnProperty("signal"))return function(e,r){const n=new t.AbortController,o=new t.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:ue(),referrerPolicy:e.referrerPolicy,signal:n.signal});let i=!1,a=!1;const s=(l=o.url).indexOf("sku=")>0&&_e(l);var l;"json"===e.type&&o.headers.set("Accept","application/json");const c=(n,i,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&H(n.toString()),i&&l)return u(i);const c=Date.now();t.fetch(o).then(t=>{if(t.ok){const e=s?t.clone():null;return u(t,e,c)}return r(new ce(t.statusText,t.status,e.url))}).catch(t=>{"AbortError"!==t.name&&r(new Error(`${t.message} ${e.url}`))})},u=(n,s,l)=>{("arrayBuffer"===e.type?n.arrayBuffer():"json"===e.type?n.json():n.text()).then(e=>{a||(s&&l&&function(e,r,n){if(ie(),!ee)return;const o={status:r.status,statusText:r.statusText,headers:new t.Headers};r.headers.forEach((e,t)=>o.headers.set(t,e));const i=Z(r.headers.get("Cache-Control")||"");if(i["no-store"])return;i["max-age"]&&o.headers.set("Expires",new Date(n+1e3*i["max-age"]).toUTCString());const a=o.headers.get("Expires");a&&(new Date(a).getTime()-n<42e4||function(e,t){if(void 0===te)try{new Response(new ReadableStream),te=!0}catch(e){te=!1}te?t(e.body):e.blob().then(t)}(r,r=>{const n=new t.Response(r,o);ie(),ee&&ee.then(t=>t.put(ae(e.url),n)).catch(e=>H(e.message))}))}(o,s,l),i=!0,r(null,e,n.headers.get("Cache-Control"),n.headers.get("Expires")))}).catch(e=>{a||r(new Error(e.message))})};return s?function(e,t){if(ie(),!ee)return t(null);const r=ae(e.url);ee.then(e=>{e.match(r).then(n=>{const o=function(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")||0),r=Z(e.headers.get("Cache-Control")||"");return t>Date.now()&&!r["no-cache"]}(n);e.delete(r),o&&e.put(r,n.clone()),t(null,n,o)}).catch(t)}).catch(t)}(o,c):c(null,null),{cancel:()=>{a=!0,i||n.abort()}}}(e,r);if(q()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,r,void 0,!0)}var n;return function(e,r){const n=new t.XMLHttpRequest;n.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(n.responseType="arraybuffer");for(const t in e.headers)n.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===e.credentials,n.onerror=()=>{r(new Error(n.statusText))},n.onload=()=>{if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let t=n.response;if("json"===e.type)try{t=JSON.parse(n.response)}catch(e){return r(e)}r(null,t,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else r(new ce(n.statusText,n.status,e.url))},n.send(e.body),{cancel:()=>n.abort()}}(e,r)},fe=function(e,t){return de(P(e,{type:"arrayBuffer"}),t)};function pe(e){const r=t.document.createElement("a");return r.href=e,r.protocol===t.document.location.protocol&&r.host===t.document.location.host}const he="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let me,ge;me=[],ge=0;const ye=function(e,r){if(i.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),ge>=o.MAX_PARALLEL_IMAGE_REQUESTS){const t={requestParameters:e,callback:r,cancelled:!1,cancel(){this.cancelled=!0}};return me.push(t),t}ge++;let n=!1;const a=()=>{if(!n)for(n=!0,ge--;me.length&&ge{a(),e?r(e):n&&(t.createImageBitmap?function(e,r){const n=new t.Blob([new Uint8Array(e)],{type:"image/png"});t.createImageBitmap(n).then(e=>{r(null,e)}).catch(e=>{r(new Error(`Could not load image because of ${e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(n,(e,t)=>r(e,t,o,i)):function(e,r){const n=new t.Image,o=t.URL;n.onload=()=>{r(null,n),o.revokeObjectURL(n.src),n.onload=null,t.requestAnimationFrame(()=>{n.src=he})},n.onerror=()=>r(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const i=new t.Blob([new Uint8Array(e)],{type:"image/png"});n.src=e.byteLength?o.createObjectURL(i):he}(n,(e,t)=>r(e,t,o,i)))});return{cancel:()=>{s.cancel(),a()}}},ve="NO_ACCESS_TOKEN";function be(e){return 0===e.indexOf("mapbox:")}function _e(e){return o.API_URL_REGEX.test(e)}function xe(e){return o.API_CDN_URL_REGEX.test(e)}function we(e){return o.API_STYLE_REGEX.test(e)&&!Ae(e)}function Ae(e){return o.API_SPRITE_REGEX.test(e)}const Se=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Ce(e){const t=e.match(Se);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function Ee(e){const t=e.params.length?`?${e.params.join("&")}`:"";return`${e.protocol}://${e.authority}${e.path}${t}`}const Te="mapbox.eventData";function Ie(e){if(!e)return null;const r=e.split(".");if(!r||3!==r.length)return null;try{return JSON.parse(decodeURIComponent(t.atob(r[1]).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch(e){return null}}class ke{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const r=Ie(o.ACCESS_TOKEN);let n="";return n=r&&r.u?t.btoa(encodeURIComponent(r.u).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(Number("0x"+t)))):o.ACCESS_TOKEN||"",e?`${Te}.${e}:${n}`:`${Te}:${n}`}fetchEventData(){const e=K("localStorage"),r=this.getStorageKey(),n=this.getStorageKey("uuid");if(e)try{const e=t.localStorage.getItem(r);e&&(this.eventData=JSON.parse(e));const o=t.localStorage.getItem(n);o&&(this.anonId=o)}catch(e){H("Unable to read from LocalStorage")}}saveEventData(){const e=K("localStorage"),r=this.getStorageKey(),n=this.getStorageKey("uuid");if(e)try{t.localStorage.setItem(n,this.anonId),Object.keys(this.eventData).length>=1&&t.localStorage.setItem(r,JSON.stringify(this.eventData))}catch(e){H("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,t,r,n){if(!o.EVENTS_URL)return;const i=Ce(o.EVENTS_URL);i.params.push(`access_token=${n||o.ACCESS_TOKEN||""}`);const a={event:this.type,created:new Date(e).toISOString()},s=t?P(a,t):a,l={url:Ee(i),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=function(e,t){return de(P(e,{method:"POST"}),t)}(l,e=>{this.pendingRequest=null,r(e),this.saveEventData(),this.processRequests(n)})}queueRequest(e,t){this.queue.push(e),this.processRequests(t)}}const Me=new class extends ke{constructor(e){super("appUserTurnstile"),this._customAccessToken=e}postTurnstileEvent(e,t){o.EVENTS_URL&&o.ACCESS_TOKEN&&Array.isArray(e)&&e.some(e=>be(e)||_e(e))&&this.queueRequest(Date.now(),t)}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const t=Ie(o.ACCESS_TOKEN),n=t?t.u:o.ACCESS_TOKEN;let i=n!==this.eventData.tokenU;F(this.anonId)||(this.anonId=L(),i=!0);const a=this.queue.shift();if(this.eventData.lastSuccess){const e=new Date(this.eventData.lastSuccess),t=new Date(a),r=(a-this.eventData.lastSuccess)/864e5;i=i||r>=1||r<-1||e.getDate()!==t.getDate()}else i=!0;i?this.postEvent(a,{sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:d,"enabled.telemetry":!1,userId:this.anonId},e=>{e||(this.eventData.lastSuccess=a,this.eventData.tokenU=n)},e):this.processRequests()}},Re=Me.postTurnstileEvent.bind(Me),Pe=new class extends ke{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(e,t,r,n){this.skuToken=t,this.errorCb=n,o.EVENTS_URL&&(r||o.ACCESS_TOKEN?this.queueRequest({id:e,timestamp:Date.now()},r):this.errorCb(new Error(ve)))}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;const{id:t,timestamp:n}=this.queue.shift();t&&this.success[t]||(this.anonId||this.fetchEventData(),F(this.anonId)||(this.anonId=L()),this.postEvent(n,{sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:d,skuToken:this.skuToken,userId:this.anonId},e=>{e?this.errorCb(e):t&&(this.success[t]=!0)},e))}},Oe=Pe.postMapLoadEvent.bind(Pe),De=new class extends ke{constructor(){super("gljs.performance")}postPerformanceEvent(e,t){o.EVENTS_URL&&(e||o.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:t},e)}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;const{timestamp:n,performanceData:o}=this.queue.shift(),i=function(e){const n=t.performance.getEntriesByType("resource"),o=t.performance.getEntriesByType("mark"),i=function(e){const t={};if(e)for(const r in e)if("other"!==r)for(const n of e[r]){const e=`${r}ResolveRangeMin`,o=`${r}ResolveRangeMax`,i=`${r}RequestCount`,a=`${r}RequestCachedCount`;t[e]=Math.min(t[e]||1/0,n.startTime),t[o]=Math.max(t[o]||-1/0,n.responseEnd);const s=e=>{void 0===t[e]&&(t[e]=0),++t[e]};void 0!==n.transferSize&&0===n.transferSize&&s(a),s(i)}return t}(function(e,t){const r={};if(e)for(const n of e){const e=t(n);void 0===r[e]&&(r[e]=[]),r[e].push(n)}return r}(n,$e)),a=t.devicePixelRatio,s=t.navigator.connection||t.navigator.mozConnection||t.navigator.webkitConnection,l={counters:[],metadata:[],attributes:[]},c=(e,t,r)=>{null!=r&&e.push({name:t,value:r.toString()})};for(const e in i)c(l.counters,e,i[e]);if(e.interactionRange[0]!==1/0&&e.interactionRange[1]!==-1/0&&(c(l.counters,"interactionRangeMin",e.interactionRange[0]),c(l.counters,"interactionRangeMax",e.interactionRange[1])),o)for(const e of Object.keys(Be)){const t=Be[e],r=o.find(e=>e.name===t);r&&c(l.counters,t,r.startTime)}return c(l.counters,"visibilityHidden",e.visibilityHidden),c(l.attributes,"style",function(e){if(e)for(const t of e){const e=t.name.split("?")[0];if(we(e)){const t=e.split("/").slice(-2);if(2===t.length)return`mapbox://styles/${t[0]}/${t[1]}`}}}(n)),c(l.attributes,"terrainEnabled",e.terrainEnabled?"true":"false"),c(l.attributes,"fogEnabled",e.fogEnabled?"true":"false"),c(l.attributes,"projection",e.projection),c(l.attributes,"zoom",e.zoom),c(l.metadata,"devicePixelRatio",a),c(l.metadata,"connectionEffectiveType",s?s.effectiveType:void 0),c(l.metadata,"navigatorUserAgent",t.navigator.userAgent),c(l.metadata,"screenWidth",t.screen.width),c(l.metadata,"screenHeight",t.screen.height),c(l.metadata,"windowWidth",t.innerWidth),c(l.metadata,"windowHeight",t.innerHeight),c(l.metadata,"mapWidth",e.width/a),c(l.metadata,"mapHeight",e.height/a),c(l.metadata,"webglRenderer",e.renderer),c(l.metadata,"webglVendor",e.vendor),c(l.metadata,"sdkVersion",r),c(l.metadata,"sdkIdentifier","mapbox-gl-js"),l}(o);for(const e of i.metadata);for(const e of i.counters);for(const e of i.attributes);this.postEvent(n,i,()=>{},e)}},Le=De.postPerformanceEvent.bind(De),Ne=new class extends ke{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(e,t,r,n){if(!o.API_URL||!o.SESSION_PATH)return;const i=Ce(o.API_URL+o.SESSION_PATH);i.params.push(`sku=${t||""}`),i.params.push(`access_token=${n||o.ACCESS_TOKEN||""}`);const a={url:Ee(i),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(e,t){return de(P(e,{method:"GET"}),t)}(a,e=>{this.pendingRequest=null,r(e),this.saveEventData(),this.processRequests(n)})}getSessionAPI(e,t,r,n){this.skuToken=t,this.errorCb=n,o.SESSION_PATH&&o.API_URL&&(r||o.ACCESS_TOKEN?this.queueRequest({id:e,timestamp:Date.now()},r):this.errorCb(new Error(ve)))}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;const{id:t,timestamp:r}=this.queue.shift();t&&this.success[t]||this.getSession(r,this.skuToken,e=>{e?this.errorCb(e):t&&(this.success[t]=!0)},e)}},Fe=Ne.getSessionAPI.bind(Ne),ze=new Set,Be={create:"create",load:"load",fullLoad:"fullLoad"},je={mark(e){t.performance.mark(e)},measure(e,r,n){t.performance.measure(e,r,n)}};function $e(e){const t=e.name.split("?")[0];return xe(t)&&t.includes("mapbox-gl.js")?"javascript":xe(t)&&t.includes("mapbox-gl.css")?"css":function(e){return o.API_FONTS_REGEX.test(e)}(t)?"fontRange":Ae(t)?"sprite":we(t)?"style":function(e){return o.API_TILEJSON_REGEX.test(e)}(t)?"tilejson":"other"}const Ue=t.performance;function Ve(e){const t=e?e.url.toString():void 0;return Ue.getEntriesByName(t)}let He,Ge,We,qe;const Ze={now:()=>void 0!==We?We:t.performance.now(),setNow(e){We=e},restoreNow(){We=void 0},frame(e){const r=t.requestAnimationFrame(e);return{cancel:()=>t.cancelAnimationFrame(r)}},getImageData(e,r=0){const{width:n,height:o}=e;qe||(qe=t.document.createElement("canvas"));const i=qe.getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("failed to create canvas 2d context");return(n>qe.width||o>qe.height)&&(qe.width=n,qe.height=o),i.clearRect(-r,-r,n+2*r,o+2*r),i.drawImage(e,0,0,n,o),i.getImageData(-r,-r,n+2*r,o+2*r)},resolveURL:e=>(He||(He=t.document.createElement("a")),He.href=e,He.href),get devicePixelRatio(){return t.devicePixelRatio},get prefersReducedMotion(){return!!t.matchMedia&&(null==Ge&&(Ge=t.matchMedia("(prefers-reduced-motion: reduce)")),Ge.matches)}};function Ye(e,t,r){r[e]&&-1!==r[e].indexOf(t)||(r[e]=r[e]||[],r[e].push(t))}function Xe(e,t,r){if(r&&r[e]){const n=r[e].indexOf(t);-1!==n&&r[e].splice(n,1)}}class Ke{constructor(e,t={}){P(this,t),this.type=e}}class Je extends Ke{constructor(e,t={}){super("error",P({error:e},t))}}class Qe{on(e,t){return this._listeners=this._listeners||{},Ye(e,t,this._listeners),this}off(e,t){return Xe(e,t,this._listeners),Xe(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners=this._oneTimeListeners||{},Ye(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){"string"==typeof e&&(e=new Ke(e,t||{}));const r=e.type;if(this.listens(r)){e.target=this;const t=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(const r of t)r.call(this,e);const n=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(const t of n)Xe(r,t,this._oneTimeListeners),t.call(this,e);const o=this._eventedParent;o&&(P(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),o.fire(e))}else e instanceof Je&&console.error(e.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var et=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"light":{"type":"light"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":{},"mapbox":{}},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{},"line":{},"line-center":{}},"default":"point","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{},"width":{},"height":{},"both":{}},"default":"none","requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","requires":["text-field",{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":{},"exponential":{},"interval":{},"categorical":{}},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{},"lab":{},"hcl":{}},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["fill-extrusion-edge-radius"]},"fill-extrusion-rounded-roof":{"type":"boolean","default":true,"requires":["fill-extrusion-edge-radius"],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":false,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');function tt(e,...t){for(const r of t)for(const t in r)e[t]=r[t];return e}function rt(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function nt(e){if(Array.isArray(e))return e.map(nt);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){const t={};for(const r in e)t[r]=nt(e[r]);return t}return rt(e)}class ot extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}var it=ot;class at{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[e,r]of t)this.bindings[e]=r}concat(e){return new at(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}var st=at;const lt={kind:"null"},ct={kind:"number"},ut={kind:"string"},dt={kind:"boolean"},ft={kind:"color"},pt={kind:"object"},ht={kind:"value"},mt={kind:"collator"},gt={kind:"formatted"},yt={kind:"resolvedImage"};function vt(e,t){return{kind:"array",itemType:e,N:t}}function bt(e){if("array"===e.kind){const t=bt(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}const _t=[lt,ct,ut,dt,ft,gt,pt,vt(ht),yt];function xt(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!xt(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(const e of _t)if(!xt(e,t))return null}return`Expected ${bt(e)} but found ${bt(t)} instead.`}function wt(e,t){return t.some(t=>t.kind===e.kind)}function At(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}var St,Ct={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Et(e){return(e=Math.round(e))<0?0:e>255?255:e}function Tt(e){return Et("%"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function It(e){return(t="%"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))<0?0:t>1?1:t;var t}function kt(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}try{St={}.parseCSSColor=function(e){var t,r=e.replace(/ /g,"").toLowerCase();if(r in Ct)return Ct[r].slice();if("#"===r[0])return 4===r.length?(t=parseInt(r.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===r.length&&(t=parseInt(r.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=r.indexOf("("),o=r.indexOf(")");if(-1!==n&&o+1===r.length){var i=r.substr(0,n),a=r.substr(n+1,o-(n+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return null;s=It(a.pop());case"rgb":return 3!==a.length?null:[Tt(a[0]),Tt(a[1]),Tt(a[2]),s];case"hsla":if(4!==a.length)return null;s=It(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,c=It(a[1]),u=It(a[2]),d=u<=.5?u*(c+1):u+c-u*c,f=2*u-d;return[Et(255*kt(f,d,l+1/3)),Et(255*kt(f,d,l)),Et(255*kt(f,d,l-1/3)),s];default:return null}}return null}}catch(e){}class Mt{constructor(e,t,r,n=1){this.r=e,this.g=t,this.b=r,this.a=n}static parse(e){if(!e)return;if(e instanceof Mt)return e;if("string"!=typeof e)return;const t=St(e);return t?new Mt(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,r,n]=this.toArray();return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(r)},${n})`}toArray(){const{r:e,g:t,b:r,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*r/n,n]}toArray01(){const{r:e,g:t,b:r,a:n}=this;return 0===n?[0,0,0,0]:[e/n,t/n,r/n,n]}toArray01PremultipliedAlpha(){const{r:e,g:t,b:r,a:n}=this;return[e,t,r,n]}}Mt.black=new Mt(0,0,0,1),Mt.white=new Mt(1,1,1,1),Mt.transparent=new Mt(0,0,0,0),Mt.red=new Mt(1,0,0,1),Mt.blue=new Mt(0,0,1,1);var Rt=Mt;class Pt{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ot{constructor(e,t,r,n,o){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=o}}class Dt{constructor(e){this.sections=e}static fromString(e){return new Dt([new Ot(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof Dt?e:Dt.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const t of this.sections){if(t.image){e.push(["image",t.image.name]);continue}e.push(t.text);const r={};t.fontStack&&(r["text-font"]=["literal",t.fontStack.split(",")]),t.scale&&(r["font-scale"]=t.scale),t.textColor&&(r["text-color"]=["rgba"].concat(t.textColor.toArray())),e.push(r)}return e}}class Lt{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Lt({name:e,available:!1}):null}serialize(){return["image",this.name]}}function Nt(e,t,r,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[e,t,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ft(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof Rt)return!0;if(e instanceof Pt)return!0;if(e instanceof Dt)return!0;if(e instanceof Lt)return!0;if(Array.isArray(e)){for(const t of e)if(!Ft(t))return!1;return!0}if("object"==typeof e){for(const t in e)if(!Ft(e[t]))return!1;return!0}return!1}function zt(e){if(null===e)return lt;if("string"==typeof e)return ut;if("boolean"==typeof e)return dt;if("number"==typeof e)return ct;if(e instanceof Rt)return ft;if(e instanceof Pt)return mt;if(e instanceof Dt)return gt;if(e instanceof Lt)return yt;if(Array.isArray(e)){const t=e.length;let r;for(const t of e){const e=zt(t);if(r){if(r===e)continue;r=ht;break}r=e}return vt(r||ht,t)}return pt}function Bt(e){const t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof Rt||e instanceof Dt||e instanceof Lt?e.toString():JSON.stringify(e)}class jt{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!Ft(e[1]))return t.error("invalid value");const r=e[1];let n=zt(r);const o=t.expectedType;return"array"!==n.kind||0!==n.N||!o||"array"!==o.kind||"number"==typeof o.N&&0!==o.N||(n=o),new jt(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Rt?["rgba"].concat(this.value.toArray()):this.value instanceof Dt?this.value.serialize():this.value}}var $t=jt,Ut=class{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}};const Vt={string:ut,number:ct,boolean:dt,object:pt};class Ht{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,n=1;const o=e[0];if("array"===o){let o,i;if(e.length>2){const r=e[1];if("string"!=typeof r||!(r in Vt)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Vt[r],n++}else o=ht;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);i=e[2],n++}r=vt(o,i)}else r=Vt[o];const i=[];for(;ne.outputDefined())}serialize(){const e=this.type,t=[e.kind];if("array"===e.kind){const r=e.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){t.push(r.kind);const n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map(e=>e.serialize()))}}var Gt=Ht;class Wt{constructor(e){this.type=gt,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");const n=[];let o=!1;for(let r=1;r<=e.length-1;++r){const i=e[r];if(o&&"object"==typeof i&&!Array.isArray(i)){o=!1;let e=null;if(i["font-scale"]&&(e=t.parse(i["font-scale"],1,ct),!e))return null;let r=null;if(i["text-font"]&&(r=t.parse(i["text-font"],1,vt(ut)),!r))return null;let a=null;if(i["text-color"]&&(a=t.parse(i["text-color"],1,ft),!a))return null;const s=n[n.length-1];s.scale=e,s.font=r,s.textColor=a}else{const i=t.parse(e[r],1,ht);if(!i)return null;const a=i.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,n.push({content:i,scale:null,font:null,textColor:null})}}return new Wt(n)}evaluate(e){return new Dt(this.sections.map(t=>{const r=t.content.evaluate(e);return zt(r)===yt?new Ot("",r,null,null,null):new Ot(Bt(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)}))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const t of this.sections){e.push(t.content.serialize());const r={};t.scale&&(r["font-scale"]=t.scale.serialize()),t.font&&(r["text-font"]=t.font.serialize()),t.textColor&&(r["text-color"]=t.textColor.serialize()),e.push(r)}return e}}class qt{constructor(e){this.type=yt,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");const r=t.parse(e[1],1,ut);return r?new qt(r):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),r=Lt.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const Zt={"to-boolean":dt,"to-color":ft,"to-number":ct,"to-string":ut};class Yt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");const n=Zt[r],o=[];for(let r=1;r4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:Nt(t[0],t[1],t[2],t[3]),!r))return new Rt(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Ut(r||`Could not parse color from value '${"string"==typeof t?t:String(JSON.stringify(t))}'`)}if("number"===this.type.kind){let t=null;for(const r of this.args){if(t=r.evaluate(e),null===t)return 0;const n=Number(t);if(!isNaN(n))return n}throw new Ut(`Could not convert ${JSON.stringify(t)} to number.`)}return"formatted"===this.type.kind?Dt.fromString(Bt(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?Lt.fromString(Bt(this.args[0].evaluate(e))):Bt(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if("formatted"===this.type.kind)return new Wt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new qt(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild(t=>{e.push(t.serialize())}),e}}var Xt=Yt;const Kt=["Unknown","Point","LineString","Polygon"];var Jt=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Kt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,t=this.featureDistanceData.scale,{x:r,y:n}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(r*t-e[0])+this.featureDistanceData.bearing[1]*(n*t-e[1])}return 0}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Rt.parse(e)),t}};class Qt{constructor(e,t,r,n){this.name=e,this.type=t,this._evaluate=r,this.args=n}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,t){const r=e[0],n=Qt.definitions[r];if(!n)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(n)?n[0]:n.type,i=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,a=i.filter(([t])=>!Array.isArray(t)||t.length===e.length-1);let s=null;for(const[n,i]of a){s=new Er(t.registry,t.path,null,t.scope);const a=[];let l=!1;for(let t=1;t{return t=e,Array.isArray(t)?`(${t.map(bt).join(", ")})`:`(${bt(t.type)}...)`;var t}).join(" | "),n=[];for(let r=1;r=t[2]||e[1]<=t[1]||e[3]>=t[3])}function ir(e,t){const r=(180+e[0])/360,n=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,o=Math.pow(2,t.z);return[Math.round(r*o*rr),Math.round(n*o*rr)]}function ar(e,t,r){const n=e[0]-t[0],o=e[1]-t[1],i=e[0]-r[0],a=e[1]-r[1];return n*a-i*o==0&&n*i<=0&&o*a<=0}function sr(e,t){let r=!1;for(let a=0,s=t.length;a(n=e)[1]!=(i=s[t+1])[1]>n[1]&&n[0]<(i[0]-o[0])*(n[1]-o[1])/(i[1]-o[1])+o[0]&&(r=!r)}}var n,o,i;return r}function lr(e,t){for(let r=0;r0&&s<0||a<0&&s>0}function ur(e,t,r){for(const c of r)for(let r=0;rr[2]){const t=.5*n;let o=e[0]-r[0]>t?-n:r[0]-e[0]>t?n:0;0===o&&(o=e[0]-r[2]>t?-n:r[2]-e[0]>t?n:0),e[0]+=o}nr(t,e)}function gr(e,t,r,n){const o=Math.pow(2,n.z)*rr,i=[n.x*rr,n.y*rr],a=[];if(!e)return a;for(const n of e)for(const e of n){const n=[e.x+i[0],e.y+i[1]];mr(n,t,r,o),a.push(n)}return a}function yr(e,t,r,n){const o=Math.pow(2,n.z)*rr,i=[n.x*rr,n.y*rr],a=[];if(!e)return a;for(const r of e){const e=[];for(const n of r){const r=[n.x+i[0],n.y+i[1]];nr(t,r),e.push(r)}a.push(e)}if(t[2]-t[0]<=o/2){(s=t)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const e of a)for(const n of e)mr(n,t,r,o)}var s;return a}class vr{constructor(e,t){this.type=dt,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(Ft(e[1])){const t=e[1];if("FeatureCollection"===t.type)for(let e=0;e{t&&!_r(e)&&(t=!1)}),t}function xr(e){if(e instanceof er&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!xr(e)&&(t=!1)}),t}function wr(e,t){if(e instanceof er&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(e=>{r&&!wr(e,t)&&(r=!1)}),r}class Ar{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");const r=e[1];return t.scope.has(r)?new Ar(r,t.scope.get(r)):t.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var Sr=Ar;class Cr{constructor(e,t=[],r,n=new st,o=[]){this.registry=e,this.path=t,this.key=t.map(e=>`[${e}]`).join(""),this.scope=n,this.errors=o,this.expectedType=r}parse(e,t,r,n,o={}){return t?this.concat(t,r,n)._parse(e,o):this._parse(e,o)}_parse(e,t){function r(e,t,r){return"assert"===r?new Gt(t,[e]):"coerce"===r?new Xt(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const n=e[0];if("string"!=typeof n)return this.error(`Expression name must be a string, but found ${typeof n} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[n];if(o){let n=o.parse(e,this);if(!n)return null;if(this.expectedType){const e=this.expectedType,o=n.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==o.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==o.kind&&"string"!==o.kind){if(this.checkSubtype(e,o))return null}else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"assert")}if(!(n instanceof $t)&&"resolvedImage"!==n.type.kind&&Tr(n)){const t=new Jt;try{n=new $t(n.type,n.evaluate(t))}catch(e){return this.error(e.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){const n="number"==typeof e?this.path.concat(e):this.path,o=r?this.scope.concat(r):this.scope;return new Cr(this.registry,n,t||null,o,this.errors)}error(e,...t){const r=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new it(r,e))}checkSubtype(e,t){const r=xt(e,t);return r&&this.error(r),r}}var Er=Cr;function Tr(e){if(e instanceof Sr)return Tr(e.boundExpression);if(e instanceof er&&"error"===e.name)return!1;if(e instanceof tr)return!1;if(e instanceof br)return!1;const t=e instanceof Xt||e instanceof Gt;let r=!0;return e.eachChild(e=>{r=t?r&&Tr(e):r&&e instanceof $t}),!!r&&_r(e)&&wr(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Ir(e,t){const r=e.length-1;let n,o,i=0,a=r,s=0;for(;i<=a;)if(s=Math.floor((i+a)/2),n=e[s],o=e[s+1],n<=t){if(s===r||tt))throw new Ut("Input is not a number.");a=s-1}return 0}class kr{constructor(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[e,t]of r)this.labels.push(e),this.outputs.push(t)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");const r=t.parse(e[1],1,ct);if(!r)return null;const n=[];let o=null;t.expectedType&&"value"!==t.expectedType.kind&&(o=t.expectedType);for(let r=1;r=i)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const c=t.parse(a,l,o);if(!c)return null;o=o||c.type,n.push([i,c])}return new kr(o,r,n)}evaluate(e){const t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);const n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);const o=t.length;return n>=t[o-1]?r[o-1].evaluate(e):r[Ir(t,n)].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let t=0;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}var Mr=kr;function Rr(e,t,r){return e*(1-r)+t*r}var Pr=Object.freeze({__proto__:null,array:function(e,t,r){return e.map((e,n)=>Rr(e,t[n],r))},color:function(e,t,r){return new Rt(Rr(e.r,t.r,r),Rr(e.g,t.g,r),Rr(e.b,t.b,r),Rr(e.a,t.a,r))},number:Rr});const Or=.95047,Dr=1.08883,Lr=4/29,Nr=6/29,Fr=3*Nr*Nr,zr=Nr*Nr*Nr,Br=Math.PI/180,jr=180/Math.PI;function $r(e){return e>zr?Math.pow(e,1/3):e/Fr+Lr}function Ur(e){return e>Nr?e*e*e:Fr*(e-Lr)}function Vr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Hr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Gr(e){const t=Hr(e.r),r=Hr(e.g),n=Hr(e.b),o=$r((.4124564*t+.3575761*r+.1804375*n)/Or),i=$r((.2126729*t+.7151522*r+.072175*n)/1);return{l:116*i-16,a:500*(o-i),b:200*(i-$r((.0193339*t+.119192*r+.9503041*n)/Dr)),alpha:e.a}}function Wr(e){let t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=1*Ur(t),r=Or*Ur(r),n=Dr*Ur(n),new Rt(Vr(3.2404542*r-1.5371385*t-.4985314*n),Vr(-.969266*r+1.8760108*t+.041556*n),Vr(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function qr(e,t,r){const n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}const Zr={forward:Gr,reverse:Wr,interpolate:function(e,t,r){return{l:Rr(e.l,t.l,r),a:Rr(e.a,t.a,r),b:Rr(e.b,t.b,r),alpha:Rr(e.alpha,t.alpha,r)}}},Yr={forward:function(e){const{l:t,a:r,b:n}=Gr(e),o=Math.atan2(n,r)*jr;return{h:o<0?o+360:o,c:Math.sqrt(r*r+n*n),l:t,alpha:e.a}},reverse:function(e){const t=e.h*Br,r=e.c;return Wr({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:qr(e.h,t.h,r),c:Rr(e.c,t.c,r),l:Rr(e.l,t.l,r),alpha:Rr(e.alpha,t.alpha,r)}}};var Xr=Object.freeze({__proto__:null,hcl:Yr,lab:Zr});class Kr{constructor(e,t,r,n,o){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(const[e,t]of o)this.labels.push(e),this.outputs.push(t)}static interpolationFactor(e,t,r,n){let o=0;if("exponential"===e.name)o=Jr(t,e.base,r,n);else if("linear"===e.name)o=Jr(t,1,r,n);else if("cubic-bezier"===e.name){const i=e.controlPoints;o=new m(i[0],i[1],i[2],i[3]).solve(Jr(t,1,r,n))}return o}static parse(e,t){let[r,n,o,...i]=e;if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const e=n[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:e}}else{if("cubic-bezier"!==n[0])return t.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const e=n.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,ct),!o)return null;const a=[];let s=null;"interpolate-hcl"===r||"interpolate-lab"===r?s=ft:t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType);for(let e=0;e=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',o);const c=t.parse(n,l,s);if(!c)return null;s=s||c.type,a.push([r,c])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new Kr(s,r,n,o,a):t.error(`Type ${bt(s)} is not interpolatable.`)}evaluate(e){const t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);const n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);const o=t.length;if(n>=t[o-1])return r[o-1].evaluate(e);const i=Ir(t,n),a=Kr.interpolationFactor(this.interpolation,n,t[i],t[i+1]),s=r[i].evaluate(e),l=r[i+1].evaluate(e);return"interpolate"===this.operator?Pr[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?Yr.reverse(Yr.interpolate(Yr.forward(s),Yr.forward(l),a)):Zr.reverse(Zr.interpolate(Zr.forward(s),Zr.forward(l),a))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const t=[this.operator,e,this.input.serialize()];for(let e=0;ext(n,e.type));return new en(i?ht:r,o)}evaluate(e){let t,r=null,n=0;for(const o of this.args){if(n++,r=o.evaluate(e),r&&r instanceof Lt&&!r.available&&(t||(t=r),r=null,n===this.args.length))return t;if(null!==r)break}return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var tn=en;class rn{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let n=1;n=r.length)throw new Ut(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new Ut(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var an=on;class sn{constructor(e,t){this.type=dt,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,ht),n=t.parse(e[2],2,ht);return r&&n?wt(r.type,[dt,ut,ct,lt,ht])?new sn(r,n):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${bt(r.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(null==r)return!1;if(!At(t,["boolean","string","number","null"]))throw new Ut(`Expected first argument to be of type boolean, string, number or null, but found ${bt(zt(t))} instead.`);if(!At(r,["string","array"]))throw new Ut(`Expected second argument to be of type array or string, but found ${bt(zt(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var ln=sn;class cn{constructor(e,t,r){this.type=ct,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,ht),n=t.parse(e[2],2,ht);if(!r||!n)return null;if(!wt(r.type,[dt,ut,ct,lt,ht]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${bt(r.type)} instead`);if(4===e.length){const o=t.parse(e[3],3,ct);return o?new cn(r,n,o):null}return new cn(r,n)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!At(t,["boolean","string","number","null"]))throw new Ut(`Expected first argument to be of type boolean, string, number or null, but found ${bt(zt(t))} instead.`);if(!At(r,["string","array"]))throw new Ut(`Expected second argument to be of type array or string, but found ${bt(zt(r))} instead.`);if(this.fromIndex){const n=this.fromIndex.evaluate(e);return r.indexOf(t,n)}return r.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var un=cn;class dn{constructor(e,t,r,n,o,i){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=o,this.otherwise=i}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");let r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);const o={},i=[];for(let a=2;aNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,zt(e)))return null}else r=zt(e);if(void 0!==o[String(e)])return c.error("Branch labels must be unique.");o[String(e)]=i.length}const u=t.parse(l,a,n);if(!u)return null;n=n||u.type,i.push(u)}const a=t.parse(e[1],1,ht);if(!a)return null;const s=t.parse(e[e.length-1],e.length-1,n);return s?"value"!==a.type.kind&&t.concat(1).checkSubtype(r,a.type)?null:new dn(r,n,a,o,i,s):null}evaluate(e){const t=this.input.evaluate(e);return(zt(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],t=Object.keys(this.cases).sort(),r=[],n={};for(const e of t){const t=n[this.cases[e]];void 0===t?(n[this.cases[e]]=r.length,r.push([this.cases[e],[e]])):r[t][1].push(e)}const o=e=>"number"===this.inputType.kind?Number(e):e;for(const[t,n]of r)e.push(1===n.length?o(n[0]):n.map(o)),e.push(this.outputs[t].serialize());return e.push(this.otherwise.serialize()),e}}var fn=dn;class pn{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");let r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);const n=[];for(let o=1;ot.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var hn=pn;class mn{constructor(e,t,r,n){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=n}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,ht),n=t.parse(e[2],2,ct);if(!r||!n)return null;if(!wt(r.type,[vt(ht),ut,ht]))return t.error(`Expected first argument to be of type array or string, but found ${bt(r.type)} instead`);if(4===e.length){const o=t.parse(e[3],3,ct);return o?new mn(r.type,r,n,o):null}return new mn(r.type,r,n)}evaluate(e){const t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!At(t,["string","array"]))throw new Ut(`Expected first argument to be of type array or string, but found ${bt(zt(t))} instead.`);if(this.endIndex){const n=this.endIndex.evaluate(e);return t.slice(r,n)}return t.slice(r)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var gn=mn;function yn(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function vn(e,t,r,n){return 0===n.compare(t,r)}function bn(e,t,r){const n="=="!==e&&"!="!==e;return class o{constructor(e,t,r){this.type=dt,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");const r=e[0];let i=t.parse(e[1],1,ht);if(!i)return null;if(!yn(r,i.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${bt(i.type)}'.`);let a=t.parse(e[2],2,ht);if(!a)return null;if(!yn(r,a.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${bt(a.type)}'.`);if(i.type.kind!==a.type.kind&&"value"!==i.type.kind&&"value"!==a.type.kind)return t.error(`Cannot compare types '${bt(i.type)}' and '${bt(a.type)}'.`);n&&("value"===i.type.kind&&"value"!==a.type.kind?i=new Gt(a.type,[i]):"value"!==i.type.kind&&"value"===a.type.kind&&(a=new Gt(i.type,[a])));let s=null;if(4===e.length){if("string"!==i.type.kind&&"string"!==a.type.kind&&"value"!==i.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(s=t.parse(e[3],3,mt),!s)return null}return new o(i,a,s)}evaluate(o){const i=this.lhs.evaluate(o),a=this.rhs.evaluate(o);if(n&&this.hasUntypedArgument){const t=zt(i),r=zt(a);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new Ut(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const e=zt(i),r=zt(a);if("string"!==e.kind||"string"!==r.kind)return t(o,i,a)}return this.collator?r(o,i,a,this.collator.evaluate(o)):t(o,i,a)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}serialize(){const t=[e];return this.eachChild(e=>{t.push(e.serialize())}),t}}}const _n=bn("==",function(e,t,r){return t===r},vn),xn=bn("!=",function(e,t,r){return t!==r},function(e,t,r,n){return!vn(0,t,r,n)}),wn=bn("<",function(e,t,r){return t",function(e,t,r){return t>r},function(e,t,r,n){return n.compare(t,r)>0}),Sn=bn("<=",function(e,t,r){return t<=r},function(e,t,r,n){return n.compare(t,r)<=0}),Cn=bn(">=",function(e,t,r){return t>=r},function(e,t,r,n){return n.compare(t,r)>=0});class En{constructor(e,t,r,n,o,i){this.type=ut,this.number=e,this.locale=t,this.currency=r,this.unit=n,this.minFractionDigits=o,this.maxFractionDigits=i}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");const r=t.parse(e[1],1,ct);if(!r)return null;const n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");let o=null;if(n.locale&&(o=t.parse(n.locale,1,ut),!o))return null;let i=null;if(n.currency&&(i=t.parse(n.currency,1,ut),!i))return null;let a=null;if(n.unit&&(a=t.parse(n.unit,1,ut),!a))return null;let s=null;if(n["min-fraction-digits"]&&(s=t.parse(n["min-fraction-digits"],1,ct),!s))return null;let l=null;return n["max-fraction-digits"]&&(l=t.parse(n["max-fraction-digits"],1,ct),!l)?null:new En(r,o,i,a,s,l)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class Tn{constructor(e){this.type=ct,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error(`Expected argument of type string or array, but found ${bt(r.type)} instead.`):new Tn(r):null}evaluate(e){const t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new Ut(`Expected value to be of type string or array, but found ${bt(zt(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(t=>{e.push(t.serialize())}),e}}const In={"==":_n,"!=":xn,">":An,"<":wn,">=":Cn,"<=":Sn,array:Gt,at:an,boolean:Gt,case:hn,coalesce:tn,collator:tr,format:Wt,image:qt,in:ln,"index-of":un,interpolate:Qr,"interpolate-hcl":Qr,"interpolate-lab":Qr,length:Tn,let:nn,literal:$t,match:fn,number:Gt,"number-format":En,object:Gt,slice:gn,step:Mr,string:Gt,"to-boolean":Xt,"to-color":Xt,"to-number":Xt,"to-string":Xt,var:Sr,within:br};function kn(e,[t,r,n,o]){t=t.evaluate(e),r=r.evaluate(e),n=n.evaluate(e);const i=o?o.evaluate(e):1,a=Nt(t,r,n,i);if(a)throw new Ut(a);return new Rt(t/255*i,r/255*i,n/255*i,i)}function Mn(e,t){return e in t}function Rn(e,t){const r=t[e];return void 0===r?null:r}function Pn(e){return{type:e}}er.register(In,{error:[{kind:"error"},[ut],(e,[t])=>{throw new Ut(t.evaluate(e))}],typeof:[ut,[ht],(e,[t])=>bt(zt(t.evaluate(e)))],"to-rgba":[vt(ct,4),[ft],(e,[t])=>t.evaluate(e).toArray()],rgb:[ft,[ct,ct,ct],kn],rgba:[ft,[ct,ct,ct,ct],kn],has:{type:dt,overloads:[[[ut],(e,[t])=>Mn(t.evaluate(e),e.properties())],[[ut,pt],(e,[t,r])=>Mn(t.evaluate(e),r.evaluate(e))]]},get:{type:ht,overloads:[[[ut],(e,[t])=>Rn(t.evaluate(e),e.properties())],[[ut,pt],(e,[t,r])=>Rn(t.evaluate(e),r.evaluate(e))]]},"feature-state":[ht,[ut],(e,[t])=>Rn(t.evaluate(e),e.featureState||{})],properties:[pt,[],e=>e.properties()],"geometry-type":[ut,[],e=>e.geometryType()],id:[ht,[],e=>e.id()],zoom:[ct,[],e=>e.globals.zoom],pitch:[ct,[],e=>e.globals.pitch||0],"distance-from-center":[ct,[],e=>e.distanceFromCenter()],"heatmap-density":[ct,[],e=>e.globals.heatmapDensity||0],"line-progress":[ct,[],e=>e.globals.lineProgress||0],"sky-radial-progress":[ct,[],e=>e.globals.skyRadialProgress||0],accumulated:[ht,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[ct,Pn(ct),(e,t)=>{let r=0;for(const n of t)r+=n.evaluate(e);return r}],"*":[ct,Pn(ct),(e,t)=>{let r=1;for(const n of t)r*=n.evaluate(e);return r}],"-":{type:ct,overloads:[[[ct,ct],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[ct],(e,[t])=>-t.evaluate(e)]]},"/":[ct,[ct,ct],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[ct,[ct,ct],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[ct,[],()=>Math.LN2],pi:[ct,[],()=>Math.PI],e:[ct,[],()=>Math.E],"^":[ct,[ct,ct],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[ct,[ct],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[ct,[ct],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[ct,[ct],(e,[t])=>Math.log(t.evaluate(e))],log2:[ct,[ct],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[ct,[ct],(e,[t])=>Math.sin(t.evaluate(e))],cos:[ct,[ct],(e,[t])=>Math.cos(t.evaluate(e))],tan:[ct,[ct],(e,[t])=>Math.tan(t.evaluate(e))],asin:[ct,[ct],(e,[t])=>Math.asin(t.evaluate(e))],acos:[ct,[ct],(e,[t])=>Math.acos(t.evaluate(e))],atan:[ct,[ct],(e,[t])=>Math.atan(t.evaluate(e))],min:[ct,Pn(ct),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[ct,Pn(ct),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[ct,[ct],(e,[t])=>Math.abs(t.evaluate(e))],round:[ct,[ct],(e,[t])=>{const r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[ct,[ct],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[ct,[ct],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[dt,[ut,ht],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[dt,[ht],(e,[t])=>e.id()===t.value],"filter-type-==":[dt,[ut],(e,[t])=>e.geometryType()===t.value],"filter-<":[dt,[ut,ht],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n{const r=e.id(),n=t.value;return typeof r==typeof n&&r":[dt,[ut,ht],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n>o}],"filter-id->":[dt,[ht],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r>n}],"filter-<=":[dt,[ut,ht],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[dt,[ht],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r<=n}],"filter->=":[dt,[ut,ht],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[dt,[ht],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r>=n}],"filter-has":[dt,[ht],(e,[t])=>t.value in e.properties()],"filter-has-id":[dt,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[dt,[vt(ut)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[dt,[vt(ht)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[dt,[ut,vt(ht)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[dt,[ut,vt(ht)],(e,[t,r])=>function(e,t,r,n){for(;r<=n;){const o=r+n>>1;if(t[o]===e)return!0;t[o]>e?n=o-1:r=o+1}return!1}(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:dt,overloads:[[[dt,dt],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[Pn(dt),(e,t)=>{for(const r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:dt,overloads:[[[dt,dt],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[Pn(dt),(e,t)=>{for(const r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[dt,[dt],(e,[t])=>!t.evaluate(e)],"is-supported-script":[dt,[ut],(e,[t])=>{const r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[ut,[ut],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[ut,[ut],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[ut,Pn(ht),(e,t)=>t.map(t=>Bt(t.evaluate(e))).join("")],"resolved-locale":[ut,[mt],(e,[t])=>t.evaluate(e).resolvedLocale()]});var On=In;function Dn(e){return{result:"success",value:e}}function Ln(e){return{result:"error",value:e}}function Nn(e){return"data-driven"===e["property-type"]}function Fn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function zn(e){return!!e.expression&&e.expression.interpolated}function Bn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function jn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function $n(e){return e}function Un(e,t){const r="color"===t.type,n=e.stops&&"object"==typeof e.stops[0][0],o=n||!(n||void 0!==e.property),i=e.type||(zn(t)?"exponential":"interval");if(r&&((e=tt({},e)).stops&&(e.stops=e.stops.map(e=>[e[0],Rt.parse(e[1])])),e.default=Rt.parse(e.default?e.default:t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!Xr[e.colorSpace])throw new Error(`Unknown color space: ${e.colorSpace}`);let a,s,l;if("exponential"===i)a=Wn;else if("interval"===i)a=Gn;else if("categorical"===i){a=Hn,s=Object.create(null);for(const t of e.stops)s[t[0]]=t[1];l=typeof e.stops[0][0]}else{if("identity"!==i)throw new Error(`Unknown function type "${i}"`);a=qn}if(n){const r={},n=[];for(let t=0;te[0]),evaluate:({zoom:r},n)=>Wn({stops:o,base:e.base},t,r).evaluate(r,n)}}if(o){const r="exponential"===i?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:r,interpolationFactor:Qr.interpolationFactor.bind(void 0,r),zoomStops:e.stops.map(e=>e[0]),evaluate:({zoom:r})=>a(e,t,r,s,l)}}return{kind:"source",evaluate(r,n){const o=n&&n.properties?n.properties[e.property]:void 0;return void 0===o?Vn(e.default,t.default):a(e,t,o,s,l)}}}function Vn(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function Hn(e,t,r,n,o){return Vn(typeof r===o?n[r]:void 0,e.default,t.default)}function Gn(e,t,r){if("number"!==Bn(r))return Vn(e.default,t.default);const n=e.stops.length;if(1===n)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];const o=Ir(e.stops.map(e=>e[0]),r);return e.stops[o][1]}function Wn(e,t,r){const n=void 0!==e.base?e.base:1;if("number"!==Bn(r))return Vn(e.default,t.default);const o=e.stops.length;if(1===o)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[o-1][0])return e.stops[o-1][1];const i=Ir(e.stops.map(e=>e[0]),r),a=function(e,t,r,n){const o=n-r,i=e-r;return 0===o?0:1===t?i/o:(Math.pow(t,i)-1)/(Math.pow(t,o)-1)}(r,n,e.stops[i][0],e.stops[i+1][0]),s=e.stops[i][1],l=e.stops[i+1][1];let c=Pr[t.type]||$n;if(e.colorSpace&&"rgb"!==e.colorSpace){const t=Xr[e.colorSpace];c=(e,r)=>t.reverse(t.interpolate(t.forward(e),t.forward(r),a))}return"function"==typeof s.evaluate?{evaluate(...e){const t=s.evaluate.apply(void 0,e),r=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==r)return c(t,r,a)}}:c(s,l,a)}function qn(e,t,r){return"color"===t.type?r=Rt.parse(r):"formatted"===t.type?r=Dt.fromString(r.toString()):"resolvedImage"===t.type?r=Lt.fromString(r.toString()):Bn(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0),Vn(r,e.default,t.default)}class Zn{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new Jt,this._defaultValue=t?function(e){return"color"===e.type&&(jn(e.default)||Array.isArray(e.default))?new Rt(0,0,0,0):"color"===e.type?Rt.parse(e.default)||null:void 0===e.default?null:e.default}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,r,n,o,i,a,s){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=i,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,n,o,i,a,s){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=i||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null;try{const e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new Ut(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}}}function Yn(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in On}function Xn(e,t){const r=new Er(On,[],t?function(e){const t={color:ft,string:ut,number:ct,enum:ut,boolean:dt,formatted:gt,resolvedImage:yt};return"array"===e.type?vt(t[e.value]||ht,e.length):t[e.type]}(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Dn(new Zn(n,t)):Ln(r.errors)}class Kn{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!xr(t.expression)}evaluateWithoutErrorHandling(e,t,r,n,o,i){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,o,i)}evaluate(e,t,r,n,o,i){return this._styleExpression.evaluate(e,t,r,n,o,i)}}class Jn{constructor(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!xr(t.expression),this.interpolationType=n}evaluateWithoutErrorHandling(e,t,r,n,o,i){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,o,i)}evaluate(e,t,r,n,o,i){return this._styleExpression.evaluate(e,t,r,n,o,i)}interpolationFactor(e,t,r){return this.interpolationType?Qr.interpolationFactor(this.interpolationType,e,t,r):0}}function Qn(e,t){if("error"===(e=Xn(e,t)).result)return e;const r=e.value.expression,n=_r(r);if(!n&&!Nn(t))return Ln([new it("","data expressions not supported")]);const o=wr(r,["zoom","pitch","distance-from-center"]);if(!o&&!Fn(t))return Ln([new it("","zoom expressions not supported")]);const i=to(r);return i||o?i instanceof it?Ln([i]):i instanceof Qr&&!zn(t)?Ln([new it("",'"interpolate" expressions cannot be used with this property')]):Dn(i?new Jn(n?"camera":"composite",e.value,i.labels,i instanceof Qr?i.interpolation:void 0):new Kn(n?"constant":"source",e.value)):Ln([new it("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class eo{constructor(e,t){this._parameters=e,this._specification=t,tt(this,Un(this._parameters,this._specification))}static deserialize(e){return new eo(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function to(e){let t=null;if(e instanceof nn)t=to(e.result);else if(e instanceof tn){for(const r of e.args)if(t=to(r),t)break}else(e instanceof Mr||e instanceof Qr)&&e.input instanceof er&&"zoom"===e.input.name&&(t=e);return t instanceof it||e.eachChild(e=>{const r=to(e);r instanceof it?t=r:!t&&r?t=new it("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&r&&t!==r&&(t=new it("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}class ro{constructor(e,t,r,n){this.message=(e?`${e}: `:"")+r,n&&(this.identifier=n),null!=t&&t.__line__&&(this.line=t.__line__)}}function no(e){const t=e.key,r=e.value,n=e.valueSpec||{},o=e.objectElementValidators||{},i=e.style,a=e.styleSpec;let s=[];const l=Bn(r);if("object"!==l)return[new ro(t,r,`object expected, ${l} found`)];for(const e in r){const l=e.split(".")[0];let c;o[l]?c=o[l]:n[l]?c=zo:o["*"]?c=o["*"]:n["*"]&&(c=zo),c?s=s.concat(c({key:(t?`${t}.`:t)+e,value:r[e],valueSpec:n[l]||n["*"],style:i,styleSpec:a,object:r,objectKey:e},r)):s.push(new ro(t,r[e],`unknown property "${e}"`))}for(const e in n)o[e]||n[e].required&&void 0===n[e].default&&void 0===r[e]&&s.push(new ro(t,r,`missing required property "${e}"`));return s}function oo(e){const t=e.value,r=e.valueSpec,n=e.style,o=e.styleSpec,i=e.key,a=e.arrayElementValidator||zo;if("array"!==Bn(t))return[new ro(i,t,`array expected, ${Bn(t)} found`)];if(r.length&&t.length!==r.length)return[new ro(i,t,`array length ${r.length} expected, length ${t.length} found`)];if(r["min-length"]&&t.lengtho)return[new ro(t,r,`${r} is greater than the maximum value ${o}`)]}return[]}function ao(e){const t=e.valueSpec,r=rt(e.value.type);let n,o,i,a={};const s="categorical"!==r&&void 0===e.value.property,l=!s,c="array"===Bn(e.value.stops)&&"array"===Bn(e.value.stops[0])&&"object"===Bn(e.value.stops[0][0]),u=no({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new ro(e.key,e.value,'identity function may not have a "stops" property')];let t=[];const n=e.value;return t=t.concat(oo({key:e.key,value:n,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:d})),"array"===Bn(n)&&0===n.length&&t.push(new ro(e.key,n,"array must have at least one stop")),t},default:function(e){return zo({key:e.key,value:e.value,valueSpec:t,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&s&&u.push(new ro(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||u.push(new ro(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!zn(e.valueSpec)&&u.push(new ro(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Nn(e.valueSpec)?u.push(new ro(e.key,e.value,"property functions not supported")):s&&!Fn(e.valueSpec)&&u.push(new ro(e.key,e.value,"zoom functions not supported"))),"categorical"!==r&&!c||void 0!==e.value.property||u.push(new ro(e.key,e.value,'"property" property is required')),u;function d(e){let r=[];const n=e.value,s=e.key;if("array"!==Bn(n))return[new ro(s,n,`array expected, ${Bn(n)} found`)];if(2!==n.length)return[new ro(s,n,`array length 2 expected, length ${n.length} found`)];if(c){if("object"!==Bn(n[0]))return[new ro(s,n,`object expected, ${Bn(n[0])} found`)];if(void 0===n[0].zoom)return[new ro(s,n,"object stop key must have zoom")];if(void 0===n[0].value)return[new ro(s,n,"object stop key must have value")];const t=rt(n[0].zoom);if("number"!=typeof t)return[new ro(s,n[0].zoom,"stop zoom values must be numbers")];if(i&&i>t)return[new ro(s,n[0].zoom,"stop zoom values must appear in ascending order")];t!==i&&(i=t,o=void 0,a={}),r=r.concat(no({key:`${s}[0]`,value:n[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:io,value:f}}))}else r=r.concat(f({key:`${s}[0]`,value:n[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},n));return Yn(nt(n[1]))?r.concat([new ro(`${s}[1]`,n[1],"expressions are not allowed in function stops.")]):r.concat(zo({key:`${s}[1]`,value:n[1],valueSpec:t,style:e.style,styleSpec:e.styleSpec}))}function f(e,i){const s=Bn(e.value),l=rt(e.value),c=null!==e.value?e.value:i;if(n){if(s!==n)return[new ro(e.key,c,`${s} stop domain type must match previous stop domain type ${n}`)]}else n=s;if("number"!==s&&"string"!==s&&"boolean"!==s&&"number"!=typeof l&&"string"!=typeof l&&"boolean"!=typeof l)return[new ro(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==r){let n=`number expected, ${s} found`;return Nn(t)&&void 0===r&&(n+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ro(e.key,c,n)]}return"categorical"!==r||"number"!==s||"number"==typeof l&&isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===s&&"number"==typeof l&&"number"==typeof o&&void 0!==o&&lnew ro(`${e.key}${t.key}`,e.value,t.message));const r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new ro(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!xr(r))return[new ro(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext)return lo(r,e);if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!wr(r,["zoom","feature-state"]))return[new ro(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!_r(r))return[new ro(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function lo(e,t){const r=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(t.valueSpec&&t.valueSpec.expression)for(const e of t.valueSpec.expression.parameters)r.delete(e);if(0===r.size)return[];const n=[];return e instanceof er&&r.has(e.name)?[new ro(t.key,t.value,`["${e.name}"] expression is not supported in a filter for a ${t.object.type} layer with id: ${t.object.id}`)]:(e.eachChild(e=>{n.push(...lo(e,t))}),n)}function co(e){const t=e.key,r=e.value,n=e.valueSpec,o=[];return Array.isArray(n.values)?-1===n.values.indexOf(rt(r))&&o.push(new ro(t,r,`expected one of [${n.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(n.values).indexOf(rt(r))&&o.push(new ro(t,r,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(r)} found`)),o}function uo(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(const t of e.slice(1))if(!uo(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}function fo(e,t="fill"){if(null==e)return{filter:()=>!0,needGeometry:!1,needFeature:!1};uo(e)||(e=bo(e));const r=e;let n=!0;try{n=function(e){if(!mo(e))return e;let t=nt(e);return ho(t),t=po(t),t}(r)}catch(e){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(r,null,2)}\n `)}const o=et[`filter_${t}`],i=Xn(n,o);let a=null;if("error"===i.result)throw new Error(i.value.map(e=>`${e.key}: ${e.message}`).join(", "));a=(e,t,r)=>i.value.evaluate(e,t,{},r);let s=null,l=null;if(n!==r){const e=Xn(r,o);if("error"===e.result)throw new Error(e.value.map(e=>`${e.key}: ${e.message}`).join(", "));s=(t,r,n,o,i)=>e.value.evaluate(t,r,{},n,void 0,void 0,o,i),l=!_r(e.value.expression)}return{filter:a,dynamicFilter:s||void 0,needGeometry:vo(n),needFeature:!!l}}function po(e){if(!Array.isArray(e))return e;const t=function(e){if(go.has(e[0]))for(let t=1;tpo(e))}function ho(e){let t=!1;const r=[];if("case"===e[0]){for(let n=1;n",">=","<","<=","to-boolean"]);function yo(e,t){return et?1:0}function vo(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(let t=1;t"===t||"<="===t||">="===t?_o(e[1],e[2],t):"any"===t?(r=e.slice(1),["any"].concat(r.map(bo))):"all"===t?["all"].concat(e.slice(1).map(bo)):"none"===t?["all"].concat(e.slice(1).map(bo).map(Ao)):"in"===t?xo(e[1],e.slice(2)):"!in"===t?Ao(xo(e[1],e.slice(2))):"has"===t?wo(e[1]):"!has"===t?Ao(wo(e[1])):"within"!==t||e;var r}function _o(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function xo(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(yo)]]:["filter-in-small",e,["literal",t]]}}function wo(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Ao(e){return["!",e]}function So(e){return uo(nt(e.value))?so(tt({},e,{expressionContext:"filter",valueSpec:e.styleSpec[`filter_${e.layerType||"fill"}`]})):Co(e)}function Co(e){const t=e.value,r=e.key;if("array"!==Bn(t))return[new ro(r,t,`array expected, ${Bn(t)} found`)];const n=e.styleSpec;let o,i=[];if(t.length<1)return[new ro(r,t,"filter array must have at least 1 element")];switch(i=i.concat(co({key:`${r}[0]`,value:t[0],valueSpec:n.filter_operator,style:e.style,styleSpec:e.styleSpec})),rt(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===rt(t[1])&&i.push(new ro(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":3!==t.length&&i.push(new ro(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(o=Bn(t[1]),"string"!==o&&i.push(new ro(`${r}[1]`,t[1],`string expected, ${o} found`)));for(let a=2;a{e in r&&t.push(new ro(n,r[e],`"${e}" is prohibited for ref layers`))}),o.layers.forEach(t=>{rt(t.id)===s&&(e=t)}),e?e.ref?t.push(new ro(n,r.ref,"ref cannot reference another ref layer")):a=rt(e.type):"string"==typeof s&&t.push(new ro(n,r.ref,`ref layer "${s}" not found`))}else if("background"!==a&&"sky"!==a)if(r.source){const e=o.sources&&o.sources[r.source],i=e&&rt(e.type);e?"vector"===i&&"raster"===a?t.push(new ro(n,r.source,`layer "${r.id}" requires a raster source`)):"raster"===i&&"raster"!==a?t.push(new ro(n,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==i||r["source-layer"]?"raster-dem"===i&&"hillshade"!==a?t.push(new ro(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!r.paint||!r.paint["line-gradient"]&&!r.paint["line-trim-offset"]||"geojson"===i&&e.lineMetrics||t.push(new ro(n,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new ro(n,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new ro(n,r.source,`source "${r.source}" not found`))}else t.push(new ro(n,r,'missing required property "source"'));return t=t.concat(no({key:n,value:r,valueSpec:i.layer,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":()=>[],type:()=>zo({key:`${n}.type`,value:r.type,valueSpec:i.layer.type,style:e.style,styleSpec:e.styleSpec,object:r,objectKey:"type"}),filter:e=>So(tt({layerType:a},e)),layout:e=>no({layer:r,key:e.key,value:e.value,valueSpec:{},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":e=>Io(tt({layerType:a},e))}}),paint:e=>no({layer:r,key:e.key,value:e.value,valueSpec:{},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":e=>To(tt({layerType:a},e))}})}})),t}function Mo(e){const t=e.value,r=e.key,n=Bn(t);return"string"!==n?[new ro(r,t,`string expected, ${n} found`)]:[]}const Ro={promoteId:function({key:e,value:t}){if("string"===Bn(t))return Mo({key:e,value:t});{const r=[];for(const n in t)r.push(...Mo({key:`${e}.${n}`,value:t[n]}));return r}}};function Po(e){const t=e.value,r=e.key,n=e.styleSpec,o=e.style;if(!t.type)return[new ro(r,t,'"type" is required')];const i=rt(t.type);let a;switch(i){case"vector":case"raster":case"raster-dem":return a=no({key:r,value:t,valueSpec:n[`source_${i.replace("-","_")}`],style:e.style,styleSpec:n,objectElementValidators:Ro}),a;case"geojson":if(a=no({key:r,value:t,valueSpec:n.source_geojson,style:o,styleSpec:n,objectElementValidators:Ro}),t.cluster)for(const e in t.clusterProperties){const[n,o]=t.clusterProperties[e],i="string"==typeof n?[n,["accumulated"],["get",e]]:n;a.push(...so({key:`${r}.${e}.map`,value:o,expressionContext:"cluster-map"})),a.push(...so({key:`${r}.${e}.reduce`,value:i,expressionContext:"cluster-reduce"}))}return a;case"video":return no({key:r,value:t,valueSpec:n.source_video,style:o,styleSpec:n});case"image":return no({key:r,value:t,valueSpec:n.source_image,style:o,styleSpec:n});case"canvas":return[new ro(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return co({key:`${r}.type`,value:t.type,valueSpec:{values:Oo(n)},style:o,styleSpec:n})}}function Oo(e){return e.source.reduce((t,r)=>{const n=e[r];return"enum"===n.type.type&&(t=t.concat(Object.keys(n.type.values))),t},[])}function Do(e){const t=e.value,r=e.styleSpec,n=r.light,o=e.style;let i=[];const a=Bn(t);if(void 0===t)return i;if("object"!==a)return i=i.concat([new ro("light",t,`object expected, ${a} found`)]),i;for(const e in t){const a=e.match(/^(.*)-transition$/);i=i.concat(a&&n[a[1]]&&n[a[1]].transition?zo({key:e,value:t[e],valueSpec:r.transition,style:o,styleSpec:r}):n[e]?zo({key:e,value:t[e],valueSpec:n[e],style:o,styleSpec:r}):[new ro(e,t[e],`unknown property "${e}"`)])}return i}function Lo(e){const t=e.value,r=e.key,n=e.style,o=e.styleSpec,i=o.terrain;let a=[];const s=Bn(t);if(void 0===t)return a;if("object"!==s)return a=a.concat([new ro("terrain",t,`object expected, ${s} found`)]),a;for(const e in t){const r=e.match(/^(.*)-transition$/);a=a.concat(r&&i[r[1]]&&i[r[1]].transition?zo({key:e,value:t[e],valueSpec:o.transition,style:n,styleSpec:o}):i[e]?zo({key:e,value:t[e],valueSpec:i[e],style:n,styleSpec:o}):[new ro(e,t[e],`unknown property "${e}"`)])}if(t.source){const e=n.sources&&n.sources[t.source],o=e&&rt(e.type);e?"raster-dem"!==o&&a.push(new ro(r,t.source,`terrain cannot be used with a source of type ${String(o)}, it only be used with a "raster-dem" source type`)):a.push(new ro(r,t.source,`source "${t.source}" not found`))}else a.push(new ro(r,t,'terrain is missing required property "source"'));return a}function No(e){const t=e.value,r=e.style,n=e.styleSpec,o=n.fog;let i=[];const a=Bn(t);if(void 0===t)return i;if("object"!==a)return i=i.concat([new ro("fog",t,`object expected, ${a} found`)]),i;for(const e in t){const a=e.match(/^(.*)-transition$/);i=i.concat(a&&o[a[1]]&&o[a[1]].transition?zo({key:e,value:t[e],valueSpec:n.transition,style:r,styleSpec:n}):o[e]?zo({key:e,value:t[e],valueSpec:o[e],style:r,styleSpec:n}):[new ro(e,t[e],`unknown property "${e}"`)])}return i}const Fo={"*":()=>[],array:oo,boolean:function(e){const t=e.value,r=e.key,n=Bn(t);return"boolean"!==n?[new ro(r,t,`boolean expected, ${n} found`)]:[]},number:io,color:function(e){const t=e.key,r=e.value,n=Bn(r);return"string"!==n?[new ro(t,r,`color expected, ${n} found`)]:null===St(r)?[new ro(t,r,`color expected, "${r}" found`)]:[]},enum:co,filter:So,function:ao,layer:ko,object:no,source:Po,light:Do,terrain:Lo,fog:No,string:Mo,formatted:function(e){return 0===Mo(e).length?[]:so(e)},resolvedImage:function(e){return 0===Mo(e).length?[]:so(e)},projection:function(e){const t=e.value,r=e.styleSpec,n=r.projection,o=e.style;let i=[];const a=Bn(t);if("object"===a)for(const e in t)i=i.concat(zo({key:e,value:t[e],valueSpec:n[e],style:o,styleSpec:r}));else"string"!==a&&(i=i.concat([new ro("projection",t,`object or string expected, ${a} found`)]));return i}};function zo(e){const t=e.value,r=e.valueSpec,n=e.styleSpec;return r.expression&&jn(rt(t))?ao(e):r.expression&&Yn(nt(t))?so(e):r.type&&Fo[r.type]?Fo[r.type](e):no(tt({},e,{valueSpec:r.type?n[r.type]:r}))}function Bo(e){const t=e.value,r=e.key,n=Mo(e);return n.length||(-1===t.indexOf("{fontstack}")&&n.push(new ro(r,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&n.push(new ro(r,t,'"glyphs" url must include a "{range}" token'))),n}function jo(e,t=et){return Vo(zo({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:Bo,"*":()=>[]}}))}const $o=e=>Vo(To(e)),Uo=e=>Vo(Io(e));function Vo(e){return e.slice().sort((e,t)=>e.line&&t.line?e.line-t.line:0)}function Ho(e,t){let r=!1;if(t&&t.length)for(const n of t)e.fire(new Je(new Error(n.message))),r=!0;return r}var Go=qo,Wo=3;function qo(e,t,r){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var o=new Int32Array(this.arrayBuffer);e=o[0],this.d=(t=o[1])+2*(r=o[2]);for(var i=0;i=u[p+0]&&n>=u[p+1])?(a[f]=!0,i.push(c[f])):a[f]=!1}}},qo.prototype._forEachCell=function(e,t,r,n,o,i,a,s){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),d=this._convertToCellCoord(n),f=l;f<=u;f++)for(var p=c;p<=d;p++){var h=this.d*p+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(p),this._convertFromCellCoord(f+1),this._convertFromCellCoord(p+1)))&&o.call(this,e,t,r,n,h,i,a,s))return}},qo.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},qo.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},qo.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=Wo+this.cells.length+1+1,r=0,n=0;n=0||(o[t]=Qo(e[t],r)));e instanceof Error&&(o.message=e.message)}if(o.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==n&&(o.$name=n),o}throw new Error("can't serialize object of type "+typeof e)}function ei(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||Ko(e)||Jo(e)||ArrayBuffer.isView(e)||e instanceof t.ImageData)return e;if(Array.isArray(e))return e.map(ei);if("object"==typeof e){const t=e.$name||"Object",{klass:r}=Yo[t];if(!r)throw new Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);const n=Object.create(r.prototype);for(const t of Object.keys(e))"$name"!==t&&(n[t]=ei(e[t]));return n}throw new Error("can't deserialize object of type "+typeof e)}const ti=e=>e>=128&&e<=255,ri=e=>e>=1536&&e<=1791,ni=e=>e>=1872&&e<=1919,oi=e=>e>=2208&&e<=2303,ii=e=>e>=4352&&e<=4607,ai=e=>e>=5120&&e<=5759,si=e=>e>=6016&&e<=6143,li=e=>e>=6320&&e<=6399,ci=e=>e>=8192&&e<=8303,ui=e=>e>=8448&&e<=8527,di=e=>e>=8528&&e<=8591,fi=e=>e>=8960&&e<=9215,pi=e=>e>=9216&&e<=9279,hi=e=>e>=9280&&e<=9311,mi=e=>e>=9312&&e<=9471,gi=e=>e>=9632&&e<=9727,yi=e=>e>=9728&&e<=9983,vi=e=>e>=11008&&e<=11263,bi=e=>e>=11904&&e<=12031,_i=e=>e>=12032&&e<=12255,xi=e=>e>=12272&&e<=12287,wi=e=>e>=12288&&e<=12351,Ai=e=>e>=12352&&e<=12447,Si=e=>e>=12448&&e<=12543,Ci=e=>e>=12544&&e<=12591,Ei=e=>e>=12592&&e<=12687,Ti=e=>e>=12688&&e<=12703,Ii=e=>e>=12704&&e<=12735,ki=e=>e>=12736&&e<=12783,Mi=e=>e>=12784&&e<=12799,Ri=e=>e>=12800&&e<=13055,Pi=e=>e>=13056&&e<=13311,Oi=e=>e>=13312&&e<=19903,Di=e=>e>=19904&&e<=19967,Li=e=>e>=19968&&e<=40959,Ni=e=>e>=40960&&e<=42127,Fi=e=>e>=42128&&e<=42191,zi=e=>e>=43360&&e<=43391,Bi=e=>e>=44032&&e<=55215,ji=e=>e>=55216&&e<=55295,$i=e=>e>=57344&&e<=63743,Ui=e=>e>=63744&&e<=64255,Vi=e=>e>=64336&&e<=65023,Hi=e=>e>=65040&&e<=65055,Gi=e=>e>=65072&&e<=65103,Wi=e=>e>=65104&&e<=65135,qi=e=>e>=65136&&e<=65279,Zi=e=>e>=65280&&e<=65519;function Yi(e){for(const t of e)if(Ji(t.charCodeAt(0)))return!0;return!1}function Xi(e){for(const t of e)if(!Ki(t.charCodeAt(0)))return!1;return!0}function Ki(e){return!(ri(e)||ni(e)||oi(e)||Vi(e)||qi(e))}function Ji(e){return!(746!==e&&747!==e&&(e<4352||!(Ii(e)||Ci(e)||Gi(e)&&!(e>=65097&&e<=65103)||Ui(e)||Pi(e)||bi(e)||ki(e)||!(!wi(e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||Oi(e)||Li(e)||Ri(e)||Ei(e)||zi(e)||ji(e)||ii(e)||Bi(e)||Ai(e)||xi(e)||Ti(e)||_i(e)||Mi(e)||Si(e)&&12540!==e||!(!Zi(e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!Wi(e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||ai(e)||li(e)||Hi(e)||Di(e)||Ni(e)||Fi(e))))}function Qi(e){return!(Ji(e)||function(e){return!!(ti(e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||ci(e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||ui(e)||di(e)||fi(e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||pi(e)&&9251!==e||hi(e)||mi(e)||gi(e)||yi(e)&&!(e>=9754&&e<=9759)||vi(e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||wi(e)||Si(e)||$i(e)||Gi(e)||Wi(e)||Zi(e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function ea(e){return e>=1424&&e<=2303||Vi(e)||qi(e)}function ta(e,t){return!(!t&&ea(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||si(e))}function ra(e){for(const t of e)if(ea(t.charCodeAt(0)))return!0;return!1}const na="deferred",oa="loading",ia="loaded";let aa=null,sa="unavailable",la=null;const ca=function(e){e&&"string"==typeof e&&e.indexOf("NetworkError")>-1&&(sa="error"),aa&&aa(e)};function ua(){da.fire(new Ke("pluginStateChange",{pluginStatus:sa,pluginURL:la}))}const da=new Qe,fa=function(){return sa},pa=function(){if(sa!==na||!la)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");sa=oa,ua(),la&&fe({url:la},e=>{e?ca(e):(sa=ia,ua())})},ha={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>sa===ia||null!=ha.applyArabicShaping,isLoading:()=>sa===oa,setState(e){sa=e.pluginStatus,la=e.pluginURL},isParsed:()=>null!=ha.applyArabicShaping&&null!=ha.processBidirectionalText&&null!=ha.processStyledBidirectionalText,getPluginURL:()=>la};class ma{constructor(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.transition=t.transition,this.pitch=t.pitch):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0)}isSupportedScript(e){return function(e,t){for(const r of e)if(!ta(r.charCodeAt(0),t))return!1;return!0}(e,ha.isLoaded())}}class ga{constructor(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(jn(e))return new eo(e,t);if(Yn(e)){const r=Qn(e,t);if("error"===r.result)throw new Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return r.value}{let r=e;return"string"==typeof e&&"color"===t.type&&(r=Rt.parse(e)),{kind:"constant",evaluate:()=>r}}}(void 0===t?e.specification.default:t,e.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}}class ya{constructor(e){this.property=e,this.value=new ga(e,void 0)}transitioned(e,t){return new ba(this.property,this.value,t,P({},e.transition,this.transition),e.now)}untransitioned(){return new ba(this.property,this.value,null,{},0)}}class va{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return U(this._values[e].value.value)}setValue(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new ya(this._values[e].property)),this._values[e].value=new ga(this._values[e].property,null===t?void 0:U(t))}getTransition(e){return U(this._values[e].transition)}setTransition(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new ya(this._values[e].property)),this._values[e].transition=U(t)||void 0}serialize(){const e={};for(const t of Object.keys(this._values)){const r=this.getValue(t);void 0!==r&&(e[t]=r);const n=this.getTransition(t);void 0!==n&&(e[`${t}-transition`]=n)}return e}transitioned(e,t){const r=new _a(this._properties);for(const n of Object.keys(this._values))r._values[n]=this._values[n].transitioned(e,t._values[n]);return r}untransitioned(){const e=new _a(this._properties);for(const t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class ba{constructor(e,t,r,n,o){const i=n.delay||0,a=n.duration||0;o=o||0,this.property=e,this.value=t,this.begin=o+i,this.end=this.begin+a,e.specification.transition&&(n.delay||n.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){const n=e.now||0,o=this.value.possiblyEvaluate(e,t,r),i=this.prior;if(i){if(n>this.end)return this.prior=null,o;if(this.value.isDataDriven())return this.prior=null,o;if(nthis.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}destroy(){this.int8=this.uint8=this.int16=this.uint16=this.int32=this.uint32=this.float32=null,this.arrayBuffer=null}}function Pa(e,t=1){let r=0,n=0;return{members:e.map(e=>{const o=ka[e.type].BYTES_PER_ELEMENT,i=r=Oa(r,Math.max(t,o)),a=e.components||1;return n=Math.max(n,o),r+=o*a,{name:e.name,type:e.type,components:a,offset:i}}),size:Oa(r,Math.max(n,t)),alignment:t}}function Oa(e,t){return Math.ceil(e/t)*t}class Da extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){const r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){const n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e}}Da.prototype.bytesPerElement=4,Xo(Da,"StructArrayLayout2i4");class La extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){const n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){const o=3*e;return this.int16[o+0]=t,this.int16[o+1]=r,this.int16[o+2]=n,e}}La.prototype.bytesPerElement=6,Xo(La,"StructArrayLayout3i6");class Na extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n)}emplace(e,t,r,n,o){const i=4*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,this.int16[i+3]=o,e}}Na.prototype.bytesPerElement=8,Xo(Na,"StructArrayLayout4i8");class Fa extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a){const s=this.length;return this.resize(s+1),this.emplace(s,e,t,r,n,o,i,a)}emplace(e,t,r,n,o,i,a,s){const l=6*e,c=12*e,u=3*e;return this.int16[l+0]=t,this.int16[l+1]=r,this.uint8[c+4]=n,this.uint8[c+5]=o,this.uint8[c+6]=i,this.uint8[c+7]=a,this.float32[u+2]=s,e}}Fa.prototype.bytesPerElement=12,Xo(Fa,"StructArrayLayout2i4ub1f12");class za extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n)}emplace(e,t,r,n,o){const i=4*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,this.float32[i+3]=o,e}}za.prototype.bytesPerElement=16,Xo(za,"StructArrayLayout4f16");class Ba extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n,o)}emplace(e,t,r,n,o,i){const a=6*e,s=3*e;return this.uint16[a+0]=t,this.uint16[a+1]=r,this.uint16[a+2]=n,this.uint16[a+3]=o,this.float32[s+2]=i,e}}Ba.prototype.bytesPerElement=12,Xo(Ba,"StructArrayLayout4ui1f12");class ja extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n)}emplace(e,t,r,n,o){const i=4*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,this.uint16[i+3]=o,e}}ja.prototype.bytesPerElement=8,Xo(ja,"StructArrayLayout4ui8");class $a extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,o,i)}emplace(e,t,r,n,o,i,a){const s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=o,this.int16[s+4]=i,this.int16[s+5]=a,e}}$a.prototype.bytesPerElement=12,Xo($a,"StructArrayLayout6i12");class Ua extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a,s,l,c,u,d){const f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,o,i,a,s,l,c,u,d)}emplace(e,t,r,n,o,i,a,s,l,c,u,d,f){const p=12*e;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=o,this.uint16[p+4]=i,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=d,this.int16[p+11]=f,e}}Ua.prototype.bytesPerElement=24,Xo(Ua,"StructArrayLayout4i4ui4i24");class Va extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,o,i)}emplace(e,t,r,n,o,i,a){const s=10*e,l=5*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.float32[l+2]=o,this.float32[l+3]=i,this.float32[l+4]=a,e}}Va.prototype.bytesPerElement=20,Xo(Va,"StructArrayLayout3i3f20");class Ha extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[1*e+0]=t,e}}Ha.prototype.bytesPerElement=4,Xo(Ha,"StructArrayLayout1ul4");class Ga extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a,s,l,c,u,d,f){const p=this.length;return this.resize(p+1),this.emplace(p,e,t,r,n,o,i,a,s,l,c,u,d,f)}emplace(e,t,r,n,o,i,a,s,l,c,u,d,f,p){const h=20*e,m=10*e;return this.int16[h+0]=t,this.int16[h+1]=r,this.int16[h+2]=n,this.int16[h+3]=o,this.int16[h+4]=i,this.float32[m+3]=a,this.float32[m+4]=s,this.float32[m+5]=l,this.float32[m+6]=c,this.int16[h+14]=u,this.uint32[m+8]=d,this.uint16[h+18]=f,this.uint16[h+19]=p,e}}Ga.prototype.bytesPerElement=40,Xo(Ga,"StructArrayLayout5i4f1i1ul2ui40");class Wa extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a){const s=this.length;return this.resize(s+1),this.emplace(s,e,t,r,n,o,i,a)}emplace(e,t,r,n,o,i,a,s){const l=8*e;return this.int16[l+0]=t,this.int16[l+1]=r,this.int16[l+2]=n,this.int16[l+4]=o,this.int16[l+5]=i,this.int16[l+6]=a,this.int16[l+7]=s,e}}Wa.prototype.bytesPerElement=16,Xo(Wa,"StructArrayLayout3i2i2i16");class qa extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n,o)}emplace(e,t,r,n,o,i){const a=4*e,s=8*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.int16[s+6]=o,this.int16[s+7]=i,e}}qa.prototype.bytesPerElement=16,Xo(qa,"StructArrayLayout2f1f2i16");class Za extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n)}emplace(e,t,r,n,o){const i=12*e,a=3*e;return this.uint8[i+0]=t,this.uint8[i+1]=r,this.float32[a+1]=n,this.float32[a+2]=o,e}}Za.prototype.bytesPerElement=12,Xo(Za,"StructArrayLayout2ub2f12");class Ya extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){const n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){const o=3*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,e}}Ya.prototype.bytesPerElement=12,Xo(Ya,"StructArrayLayout3f12");class Xa extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){const n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){const o=3*e;return this.uint16[o+0]=t,this.uint16[o+1]=r,this.uint16[o+2]=n,e}}Xa.prototype.bytesPerElement=6,Xo(Xa,"StructArrayLayout3ui6");class Ka extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_){const x=this.length;return this.resize(x+1),this.emplace(x,e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_)}emplace(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_,x){const w=30*e,A=15*e,S=60*e;return this.int16[w+0]=t,this.int16[w+1]=r,this.int16[w+2]=n,this.float32[A+2]=o,this.float32[A+3]=i,this.uint16[w+8]=a,this.uint16[w+9]=s,this.uint32[A+5]=l,this.uint32[A+6]=c,this.uint32[A+7]=u,this.uint16[w+16]=d,this.uint16[w+17]=f,this.uint16[w+18]=p,this.float32[A+10]=h,this.float32[A+11]=m,this.uint8[S+48]=g,this.uint8[S+49]=y,this.uint8[S+50]=v,this.uint32[A+13]=b,this.int16[w+28]=_,this.uint8[S+58]=x,e}}Ka.prototype.bytesPerElement=60,Xo(Ka,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class Ja extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_,x,w,A,S,C,E,T,I,k){const M=this.length;return this.resize(M+1),this.emplace(M,e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_,x,w,A,S,C,E,T,I,k)}emplace(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_,x,w,A,S,C,E,T,I,k,M){const R=38*e,P=19*e;return this.int16[R+0]=t,this.int16[R+1]=r,this.int16[R+2]=n,this.float32[P+2]=o,this.float32[P+3]=i,this.int16[R+8]=a,this.int16[R+9]=s,this.int16[R+10]=l,this.int16[R+11]=c,this.int16[R+12]=u,this.int16[R+13]=d,this.uint16[R+14]=f,this.uint16[R+15]=p,this.uint16[R+16]=h,this.uint16[R+17]=m,this.uint16[R+18]=g,this.uint16[R+19]=y,this.uint16[R+20]=v,this.uint16[R+21]=b,this.uint16[R+22]=_,this.uint16[R+23]=x,this.uint16[R+24]=w,this.uint16[R+25]=A,this.uint16[R+26]=S,this.uint16[R+27]=C,this.uint16[R+28]=E,this.uint32[P+15]=T,this.float32[P+16]=I,this.float32[P+17]=k,this.float32[P+18]=M,e}}Ja.prototype.bytesPerElement=76,Xo(Ja,"StructArrayLayout3i2f6i15ui1ul3f76");class Qa extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[1*e+0]=t,e}}Qa.prototype.bytesPerElement=4,Xo(Qa,"StructArrayLayout1f4");class es extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n,o)}emplace(e,t,r,n,o,i){const a=5*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=o,this.float32[a+4]=i,e}}es.prototype.bytesPerElement=20,Xo(es,"StructArrayLayout5f20");class ts extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n)}emplace(e,t,r,n,o){const i=6*e;return this.uint32[3*e+0]=t,this.uint16[i+2]=r,this.uint16[i+3]=n,this.uint16[i+4]=o,e}}ts.prototype.bytesPerElement=12,Xo(ts,"StructArrayLayout1ul3ui12");class rs extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){const r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){const n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e}}rs.prototype.bytesPerElement=4,Xo(rs,"StructArrayLayout2ui4");class ns extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[1*e+0]=t,e}}ns.prototype.bytesPerElement=2,Xo(ns,"StructArrayLayout1ui2");class os extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){const r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){const n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e}}os.prototype.bytesPerElement=8,Xo(os,"StructArrayLayout2f8");class is extends Ma{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.int16[this._pos2+3]}get tileAnchorY(){return this._structArray.int16[this._pos2+4]}get x1(){return this._structArray.float32[this._pos4+3]}get y1(){return this._structArray.float32[this._pos4+4]}get x2(){return this._structArray.float32[this._pos4+5]}get y2(){return this._structArray.float32[this._pos4+6]}get padding(){return this._structArray.int16[this._pos2+14]}get featureIndex(){return this._structArray.uint32[this._pos4+8]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+18]}get bucketIndex(){return this._structArray.uint16[this._pos2+19]}}is.prototype.size=40;class as extends Ga{get(e){return new is(this,e)}}Xo(as,"CollisionBoxArray");class ss extends Ma{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+8]}get numGlyphs(){return this._structArray.uint16[this._pos2+9]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+5]}get lineStartIndex(){return this._structArray.uint32[this._pos4+6]}get lineLength(){return this._structArray.uint32[this._pos4+7]}get segment(){return this._structArray.uint16[this._pos2+16]}get lowerSize(){return this._structArray.uint16[this._pos2+17]}get upperSize(){return this._structArray.uint16[this._pos2+18]}get lineOffsetX(){return this._structArray.float32[this._pos4+10]}get lineOffsetY(){return this._structArray.float32[this._pos4+11]}get writingMode(){return this._structArray.uint8[this._pos1+48]}get placedOrientation(){return this._structArray.uint8[this._pos1+49]}set placedOrientation(e){this._structArray.uint8[this._pos1+49]=e}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(e){this._structArray.uint8[this._pos1+50]=e}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(e){this._structArray.uint32[this._pos4+13]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(e){this._structArray.uint8[this._pos1+58]=e}}ss.prototype.size=60;class ls extends Ka{get(e){return new ss(this,e)}}Xo(ls,"PlacedSymbolArray");class cs extends Ma{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+8]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+9]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+10]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+11]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+12]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+13]}get key(){return this._structArray.uint16[this._pos2+14]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+17]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+18]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+19]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+20]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+21]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+22]}get featureIndex(){return this._structArray.uint16[this._pos2+23]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+24]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+25]}get numIconVertices(){return this._structArray.uint16[this._pos2+26]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+27]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+28]}get crossTileID(){return this._structArray.uint32[this._pos4+15]}set crossTileID(e){this._structArray.uint32[this._pos4+15]=e}get textOffset0(){return this._structArray.float32[this._pos4+16]}get textOffset1(){return this._structArray.float32[this._pos4+17]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+18]}}cs.prototype.size=76;class us extends Ja{get(e){return new cs(this,e)}}Xo(us,"SymbolInstanceArray");class ds extends Qa{getoffsetX(e){return this.float32[1*e+0]}}Xo(ds,"GlyphOffsetArray");class fs extends Da{getx(e){return this.int16[2*e+0]}gety(e){return this.int16[2*e+1]}}Xo(fs,"SymbolLineVertexArray");class ps extends Ma{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}get layoutVertexArrayOffset(){return this._structArray.uint16[this._pos2+4]}}ps.prototype.size=12;class hs extends ts{get(e){return new ps(this,e)}}Xo(hs,"FeatureIndexArray");class ms extends rs{geta_centroid_pos0(e){return this.uint16[2*e+0]}geta_centroid_pos1(e){return this.uint16[2*e+1]}}Xo(ms,"FillExtrusionCentroidArray");const gs=Pa([{name:"a_pattern",components:4,type:"Uint16"},{name:"a_pixel_ratio",components:1,type:"Float32"}]),ys=Pa([{name:"a_dash",components:4,type:"Uint16"}]);var vs={exports:{}},bs=function(e,t){var r,n,o,i,a,s,l,c;for(n=e.length-(r=3&e.length),o=t,a=3432918353,s=461845907,c=0;c>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+((58964+(i>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:o^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return o^=e.length,o=2246822507*(65535&(o^=o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295,(o^=o>>>16)>>>0},_s=function(e,t){for(var r,n=e.length,o=t^n,i=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(r>>>16)&65535)<<16),o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:o^=(255&e.charCodeAt(i+2))<<16;case 2:o^=(255&e.charCodeAt(i+1))<<8;case 1:o=1540483477*(65535&(o^=255&e.charCodeAt(i)))+((1540483477*(o>>>16)&65535)<<16)}return o=1540483477*(65535&(o^=o>>>13))+((1540483477*(o>>>16)&65535)<<16),(o^=o>>>15)>>>0};vs.exports=bs,vs.exports.murmur3=bs,vs.exports.murmur2=_s;var xs=f(vs.exports);class ws{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,n){this.ids.push(As(e)),this.positions.push(t,r,n)}getPositions(e){const t=As(e);let r=0,n=this.ids.length-1;for(;r>1;this.ids[e]>=t?n=e:r=e+1}const o=[];for(;this.ids[r]===t;)o.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return o}static serialize(e,t){const r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Ss(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}}static deserialize(e){const t=new ws;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t}}function As(e){const t=+e;return!isNaN(t)&&Number.MIN_SAFE_INTEGER<=t&&t<=Number.MAX_SAFE_INTEGER?t:xs(String(e))}function Ss(e,t,r,n){for(;r>1];let i=r-1,a=n+1;for(;;){do{i++}while(e[i]o);if(i>=a)break;Cs(e,i,a),Cs(t,3*i,3*a),Cs(t,3*i+1,3*a+1),Cs(t,3*i+2,3*a+2)}a-r`u_${e}`),this.type=r}setUniform(e,t,r,n,o){t.set(e,o,n.constantOr(this.value))}getBinding(e,t){return"color"===this.type?new ks(e):new Ts(e)}}class Ls{constructor(e,t){this.uniformNames=t.map(e=>`u_${e}`),this.pattern=null,this.pixelRatio=1}setConstantPatternPositions(e){this.pixelRatio=e.pixelRatio||1,this.pattern=e.tl.concat(e.br)}setUniform(e,t,r,n,o){const i="u_pattern"===o||"u_dash"===o?this.pattern:"u_pixel_ratio"===o?this.pixelRatio:null;i&&t.set(e,o,i)}getBinding(e,t){return"u_pattern"===t||"u_dash"===t?new Is(e):new Ts(e)}}class Ns{constructor(e,t,r,n){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0})),this.paintVertexArray=new n}populatePaintArray(e,t,r,n,o,i){const a=this.paintVertexArray.length,s=this.expression.evaluate(new ma(0),t,{},o,n,i);this.paintVertexArray.resize(e),this._setPaintValue(a,e,s)}updatePaintArray(e,t,r,n,o){const i=this.expression.evaluate({zoom:0},r,n,void 0,o);this._setPaintValue(e,t,i)}_setPaintValue(e,t,r){if("color"===this.type){const n=Os(r);for(let r=e;r`u_${e}_t`),this.type=r,this.useIntegerZoom=n,this.zoom=o,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0})),this.paintVertexArray=new i}populatePaintArray(e,t,r,n,o,i){const a=this.expression.evaluate(new ma(this.zoom),t,{},o,n,i),s=this.expression.evaluate(new ma(this.zoom+1),t,{},o,n,i),l=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(l,e,a,s)}updatePaintArray(e,t,r,n,o){const i=this.expression.evaluate({zoom:this.zoom},r,n,void 0,o),a=this.expression.evaluate({zoom:this.zoom+1},r,n,void 0,o);this._setPaintValue(e,t,i,a)}_setPaintValue(e,t,r,n){if("color"===this.type){const o=Os(r),i=Os(n);for(let r=e;r!0){this.binders={},this._buffers=[];const n=[];for(const o in e.paint._values){if(!r(o))continue;const i=e.paint.get(o);if(!(i instanceof wa&&Nn(i.property.specification)))continue;const a=Us(o,e.type),s=i.value,l=i.property.specification.type,c=!!i.property.useIntegerZoom,u="line-dasharray"===o||o.endsWith("pattern"),d="line-dasharray"===o&&"constant"!==e.layout.get("line-cap").value.kind;if("constant"!==s.kind||d)if("source"===s.kind||d||u){const t=Gs(o,l,"source");this.binders[o]=u?new zs(s,a,l,t,e.id):new Ns(s,a,l,t),n.push(`/a_${o}`)}else{const e=Gs(o,l,"composite");this.binders[o]=new Fs(s,a,l,c,t,e),n.push(`/z_${o}`)}else this.binders[o]=u?new Ls(s.value,a):new Ds(s.value,a,l),n.push(`/u_${o}`)}this.cacheKey=n.sort().join("")}getMaxValue(e){const t=this.binders[e];return t instanceof Ns||t instanceof Fs?t.maxValue:0}populatePaintArrays(e,t,r,n,o,i){for(const a in this.binders){const s=this.binders[a];(s instanceof Ns||s instanceof Fs||s instanceof zs)&&s.populatePaintArray(e,t,r,n,o,i)}}setConstantPatternPositions(e){for(const t in this.binders){const r=this.binders[t];r instanceof Ls&&r.setConstantPatternPositions(e)}}updatePaintArrays(e,t,r,n,o,i){let a=!1;for(const s in e){const l=t.getPositions(s);for(const t of l){const l=r.feature(t.index);for(const r in this.binders){const c=this.binders[r];if((c instanceof Ns||c instanceof Fs||c instanceof zs)&&!0===c.expression.isStateDependent){const u=n.paint.get(r);c.expression=u.value,c.updatePaintArray(t.start,t.end,l,e[s],o,i),a=!0}}}}return a}defines(){const e=[];for(const t in this.binders){const r=this.binders[t];(r instanceof Ds||r instanceof Ls)&&e.push(...r.uniformNames.map(e=>`#define HAS_UNIFORM_${e}`))}return e}getBinderAttributes(){const e=[];for(const t in this.binders){const r=this.binders[t];if(r instanceof Ns||r instanceof Fs||r instanceof zs)for(let t=0;t!0){this.programConfigurations={};for(const n of e)this.programConfigurations[n.id]=new Bs(n,t,r);this.needsUpload=!1,this._featureMap=new ws,this._bufferOffset=0}populatePaintArrays(e,t,r,n,o,i,a){for(const r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,n,o,i,a);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,n,o){for(const i of r)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,t,i,n,o)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}const $s={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern","pixel_ratio"],"fill-pattern":["pattern","pixel_ratio"],"fill-extrusion-pattern":["pattern","pixel_ratio"],"line-dasharray":["dash"]};function Us(e,t){return $s[e]||[e.replace(`${t}-`,"").replace(/-/g,"_")]}const Vs={"line-pattern":{source:Ba,composite:Ba},"fill-pattern":{source:Ba,composite:Ba},"fill-extrusion-pattern":{source:Ba,composite:Ba},"line-dasharray":{source:ja,composite:ja}},Hs={color:{source:os,composite:za},number:{source:Qa,composite:os}};function Gs(e,t,r){const n=Vs[e];return n&&n[r]||Hs[t][r]}Xo(Ds,"ConstantBinder"),Xo(Ls,"PatternConstantBinder"),Xo(Ns,"SourceExpressionBinder"),Xo(zs,"PatternCompositeBinder"),Xo(Fs,"CompositeExpressionBinder"),Xo(Bs,"ProgramConfiguration",{omit:["_buffers"]}),Xo(js,"ProgramConfigurationSet");const Ws="-transition";class qs extends Qe{constructor(e,t){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&"sky"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new xa(t.layout)),t.paint)){this._transitionablePaint=new va(t.paint);for(const t in e.paint)this.setPaintProperty(t,e.paint[t],{validate:!1});for(const t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Aa(t.paint)}}getLayoutProperty(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,t,r={}){null!=t&&this._validate(Uo,`layers.${this.id}.layout.${e}`,e,t,r)||("visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t)}getPaintProperty(e){return B(e,Ws)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){if(null!=t&&this._validate($o,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(B(e,Ws))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{const r=this._transitionablePaint._values[e],n=r.value.isDataDriven(),o=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);const i=this._transitionablePaint._values[e].value,a=i.isDataDriven(),s=B(e,"pattern")||"line-dasharray"===e;return a||n||s||this._handleOverridablePaintPropertyUpdate(e,o,i)}}_handleSpecialPaintPropertyUpdate(e){}getProgramIds(){return null}getProgramConfiguration(e){return null}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){const e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),$(e,(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}_validate(e,t,r,n,o={}){return(!o||!1!==o.validate)&&Ho(this,e.call(jo,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:et,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const e in this.paint._values){const t=this.paint.get(e);if(t instanceof wa&&Nn(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}compileFilter(){this._filterCompiled||(this._featureFilter=fo(this.filter),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}}const Zs=Pa([{name:"a_pos",components:2,type:"Int16"}],4),Ys=Pa([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class Xs{constructor(e=[]){this.segments=e}prepareSegment(e,t,r,n){let o=this.segments[this.segments.length-1];return e>Xs.MAX_VERTEX_ARRAY_LENGTH&&H(`Max vertices per segment is ${Xs.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!o||o.vertexLength+e>Xs.MAX_VERTEX_ARRAY_LENGTH||o.sortKey!==n)&&(o={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(o.sortKey=n),this.segments.push(o)),o}get(){return this.segments}destroy(){for(const e of this.segments)for(const t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,r,n){return new Xs([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])}}Xs.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Xo(Xs,"SegmentVector");var Ks=8192;class Js{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))}setNorthEast(e){return this._ne=e instanceof Ic?new Ic(e.lng,e.lat):Ic.convert(e),this}setSouthWest(e){return this._sw=e instanceof Ic?new Ic(e.lng,e.lat):Ic.convert(e),this}extend(e){const t=this._sw,r=this._ne;let n,o;if(e instanceof Ic)n=e,o=e;else{if(!(e instanceof Js))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(Js.convert(e)):this.extend(Ic.convert(e)):"object"==typeof e&&null!==e&&e.hasOwnProperty("lat")&&(e.hasOwnProperty("lon")||e.hasOwnProperty("lng"))?this.extend(Ic.convert(e)):this;if(n=e._sw,o=e._ne,!n||!o)return this}return t||r?(t.lng=Math.min(n.lng,t.lng),t.lat=Math.min(n.lat,t.lat),r.lng=Math.max(o.lng,r.lng),r.lat=Math.max(o.lat,r.lat)):(this._sw=new Ic(n.lng,n.lat),this._ne=new Ic(o.lng,o.lat)),this}getCenter(){return new Ic((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new Ic(this.getWest(),this.getNorth())}getSouthEast(){return new Ic(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){const{lng:t,lat:r}=Ic.convert(e);let n=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=t&&t>=this._ne.lng),this._sw.lat<=r&&r<=this._ne.lat&&n}static convert(e){return!e||e instanceof Js?e:new Js(e)}}var Qs=1e-6,el="undefined"!=typeof Float32Array?Float32Array:Array;function tl(){var e=new el(9);return el!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function rl(e,t,r){var n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=r[0],p=r[1],h=r[2],m=r[3],g=r[4],y=r[5],v=r[6],b=r[7],_=r[8];return e[0]=f*n+p*a+h*c,e[1]=f*o+p*s+h*u,e[2]=f*i+p*l+h*d,e[3]=m*n+g*a+y*c,e[4]=m*o+g*s+y*u,e[5]=m*i+g*l+y*d,e[6]=v*n+b*a+_*c,e[7]=v*o+b*s+_*u,e[8]=v*i+b*l+_*d,e}function nl(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ol(e,t){var r=t[0],n=t[1],o=t[2],i=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],p=t[11],h=t[12],m=t[13],g=t[14],y=t[15],v=r*s-n*a,b=r*l-o*a,_=r*c-i*a,x=n*l-o*s,w=n*c-i*s,A=o*c-i*l,S=u*m-d*h,C=u*g-f*h,E=u*y-p*h,T=d*g-f*m,I=d*y-p*m,k=f*y-p*g,M=v*k-b*I+_*T+x*E-w*C+A*S;return M?(e[0]=(s*k-l*I+c*T)*(M=1/M),e[1]=(o*I-n*k-i*T)*M,e[2]=(m*A-g*w+y*x)*M,e[3]=(f*w-d*A-p*x)*M,e[4]=(l*E-a*k-c*C)*M,e[5]=(r*k-o*E+i*C)*M,e[6]=(g*_-h*A-y*b)*M,e[7]=(u*A-f*_+p*b)*M,e[8]=(a*I-s*E+c*S)*M,e[9]=(n*E-r*I-i*S)*M,e[10]=(h*w-m*_+y*v)*M,e[11]=(d*_-u*w-p*v)*M,e[12]=(s*C-a*T-l*S)*M,e[13]=(r*T-n*C+o*S)*M,e[14]=(m*b-h*x-g*v)*M,e[15]=(u*x-d*b+f*v)*M,e):null}function il(e,t,r){var n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],p=t[10],h=t[11],m=t[12],g=t[13],y=t[14],v=t[15],b=r[0],_=r[1],x=r[2],w=r[3];return e[0]=b*n+_*s+x*d+w*m,e[1]=b*o+_*l+x*f+w*g,e[2]=b*i+_*c+x*p+w*y,e[3]=b*a+_*u+x*h+w*v,e[4]=(b=r[4])*n+(_=r[5])*s+(x=r[6])*d+(w=r[7])*m,e[5]=b*o+_*l+x*f+w*g,e[6]=b*i+_*c+x*p+w*y,e[7]=b*a+_*u+x*h+w*v,e[8]=(b=r[8])*n+(_=r[9])*s+(x=r[10])*d+(w=r[11])*m,e[9]=b*o+_*l+x*f+w*g,e[10]=b*i+_*c+x*p+w*y,e[11]=b*a+_*u+x*h+w*v,e[12]=(b=r[12])*n+(_=r[13])*s+(x=r[14])*d+(w=r[15])*m,e[13]=b*o+_*l+x*f+w*g,e[14]=b*i+_*c+x*p+w*y,e[15]=b*a+_*u+x*h+w*v,e}function al(e,t,r){var n,o,i,a,s,l,c,u,d,f,p,h,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(o=t[1],i=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],p=t[10],h=t[11],e[0]=n=t[0],e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=p,e[11]=h,e[12]=n*m+s*g+d*y+t[12],e[13]=o*m+l*g+f*y+t[13],e[14]=i*m+c*g+p*y+t[14],e[15]=a*m+u*g+h*y+t[15]),e}function sl(e,t,r){var n=r[0],o=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*o,e[5]=t[5]*o,e[6]=t[6]*o,e[7]=t[7]*o,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function ll(e,t,r){var n=Math.sin(r),o=Math.cos(r),i=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*o+c*n,e[5]=a*o+u*n,e[6]=s*o+d*n,e[7]=l*o+f*n,e[8]=c*o-i*n,e[9]=u*o-a*n,e[10]=d*o-s*n,e[11]=f*o-l*n,e}function cl(e,t,r){var n=Math.sin(r),o=Math.cos(r),i=t[0],a=t[1],s=t[2],l=t[3],c=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*o-c*n,e[1]=a*o-u*n,e[2]=s*o-d*n,e[3]=l*o-f*n,e[8]=i*n+c*o,e[9]=a*n+u*o,e[10]=s*n+d*o,e[11]=l*n+f*o,e}function ul(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function dl(e,t,r){var n,o,i,a=r[0],s=r[1],l=r[2],c=Math.hypot(a,s,l);return c0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function Cl(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function El(e,t,r){var n=t[0],o=t[1],i=t[2],a=r[0],s=r[1],l=r[2];return e[0]=o*l-i*s,e[1]=i*a-n*l,e[2]=n*s-o*a,e}function Tl(e,t,r){var n=t[0],o=t[1],i=t[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return e[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),e[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,e[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,e}function Il(e,t,r){var n=r[0],o=r[1],i=r[2],a=t[0],s=t[1],l=t[2],c=o*l-i*s,u=i*a-n*l,d=n*s-o*a,f=o*d-i*u,p=i*c-n*d,h=n*u-o*c,m=2*r[3];return u*=m,d*=m,p*=2,h*=2,e[0]=a+(c*=m)+(f*=2),e[1]=s+u+p,e[2]=l+d+h,e}var kl,Ml=vl,Rl=bl,Pl=ml;function Ol(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function Dl(e,t){var r=t[0],n=t[1],o=t[2],i=t[3],a=r*r+n*n+o*o+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=r*a,e[1]=n*a,e[2]=o*a,e[3]=i*a,e}function Ll(e,t,r){var n=t[0],o=t[1],i=t[2],a=t[3];return e[0]=r[0]*n+r[4]*o+r[8]*i+r[12]*a,e[1]=r[1]*n+r[5]*o+r[9]*i+r[13]*a,e[2]=r[2]*n+r[6]*o+r[10]*i+r[14]*a,e[3]=r[3]*n+r[7]*o+r[11]*i+r[15]*a,e}function Nl(){var e=new el(4);return el!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Fl(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function zl(e,t,r){r*=.5;var n=t[0],o=t[1],i=t[2],a=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l+a*s,e[1]=o*l+i*s,e[2]=i*l-o*s,e[3]=a*l-n*s,e}function Bl(e,t,r){r*=.5;var n=t[0],o=t[1],i=t[2],a=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l-i*s,e[1]=o*l+a*s,e[2]=i*l+n*s,e[3]=a*l-o*s,e}pl(),kl=new el(4),el!=Float32Array&&(kl[0]=0,kl[1]=0,kl[2]=0,kl[3]=0);var jl=Dl;pl(),gl(1,0,0),gl(0,1,0),Nl(),Nl(),tl();const $l=Pa([{type:"Float32",name:"a_globe_pos",components:3},{type:"Float32",name:"a_uv",components:2}]),{members:Ul}=$l,Vl=Pa([{name:"a_pos_3",components:3,type:"Int16"}]);var Hl=Pa([{name:"a_pos",type:"Int16",components:2}]);class Gl{constructor(e,t){this.pos=e,this.dir=t}intersectsPlane(e,t,r){const n=Cl(t,this.dir);if(Math.abs(n)<1e-6)return!1;const o=((e[0]-this.pos[0])*t[0]+(e[1]-this.pos[1])*t[1]+(e[2]-this.pos[2])*t[2])/n;return r[0]=this.pos[0]+this.dir[0]*o,r[1]=this.pos[1]+this.dir[1]*o,r[2]=this.pos[2]+this.dir[2]*o,!0}closestPointOnSphere(e,t,r){if(function(e,t){var r=e[0],n=e[1],o=e[2],i=t[0],a=t[1],s=t[2];return Math.abs(r-i)<=Qs*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(n-a)<=Qs*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(o-s)<=Qs*Math.max(1,Math.abs(o),Math.abs(s))}(this.pos,e)||0===t)return r[0]=r[1]=r[2]=0,!1;const[n,o,i]=this.dir,a=this.pos[0]-e[0],s=this.pos[1]-e[1],l=this.pos[2]-e[2],c=n*n+o*o+i*i,u=2*(a*n+s*o+l*i),d=u*u-4*c*(a*a+s*s+l*l-t*t);if(d<0){const e=Math.max(-u/2,0),c=a+n*e,d=s+o*e,f=l+i*e,p=Math.hypot(c,d,f);return r[0]=c*t/p,r[1]=d*t/p,r[2]=f*t/p,!1}{const e=(-u-Math.sqrt(d))/(2*c);if(e<0){const e=Math.hypot(a,s,l);return r[0]=a*t/e,r[1]=s*t/e,r[2]=l*t/e,!1}return r[0]=a+n*e,r[1]=s+o*e,r[2]=l+i*e,!0}}}class Wl{constructor(e,t,r,n,o){this.TL=e,this.TR=t,this.BR=r,this.BL=n,this.horizon=o}static fromInvProjectionMatrix(e,t,r){const n=[-1,1,1],o=[1,1,1],i=[1,-1,1],a=[-1,-1,1],s=Tl(n,n,e),l=Tl(o,o,e),c=Tl(i,i,e),u=Tl(a,a,e);return new Wl(s,l,c,u,t/r)}}class ql{constructor(e,t){this.points=e,this.planes=t}static fromInvProjectionMatrix(e,t,r,n){const o=Math.pow(2,r),i=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(r=>{const i=Ll([],r,e),a=1/i[3]/t*o;return function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}(i,i,[a,a,n?1/i[3]:a,a])}),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(e=>{const t=Sl([],El([],Ml([],i[e[0]],i[e[1]]),Ml([],i[e[2]],i[e[1]]))),r=-Cl(t,i[e[1]]);return t.concat(r)});return new ql(i,a)}}class Zl{static fromPoints(e){const t=[1/0,1/0,1/0],r=[-1/0,-1/0,-1/0];for(const n of e)_l(t,t,n),xl(r,r,n);return new Zl(t,r)}static applyTransform(e,t){const r=e.getCorners();for(let e=0;e=0;if(0===i)return 0;i!==t.length&&(r=!1)}if(r)return 2;for(let t=0;t<3;t++){let r=Number.MAX_VALUE,n=-Number.MAX_VALUE;for(let o=0;othis.max[t]-this.min[t])return 0}return 1}}const Yl=Ks/Math.PI/2,Xl=64,Kl=[Xl,32,16],Jl=-Yl,Ql=Yl,ec=[new Zl([Jl,Jl,Jl],[Ql,Ql,Ql]),new Zl([Jl,Jl,Jl],[0,0,Ql]),new Zl([0,Jl,Jl],[Ql,0,Ql]),new Zl([Jl,0,Jl],[0,Ql,Ql]),new Zl([0,0,Jl],[Ql,Ql,Ql])];function tc(e){return e*Yl/Cc}function rc(e,t,r,n=!0){const o=wl([],e._camera.position,e.worldSize),i=[t,r,1,1];Ll(i,i,e.pixelMatrixInverse),Ol(i,i,1/i[3]);const a=Sl([],Ml([],i,o)),s=e.globeMatrix,l=[s[12],s[13],s[14]],c=Ml([],l,o),u=ml(c),d=Sl([],c),f=e.worldSize/(2*Math.PI),p=Cl(d,a),h=Math.asin(f/u);if(h1?null:function(e,t,r,n){const o=Math.sin(r);return e*(Math.sin((1-n)*r)/o)+t*(Math.sin(n*r)/o)}(e.a[t],e.b[t],e.angle,T(r,0,1))+e.center[t]}function ic(e){if(e.z<=1)return ec[e.z+2*e.y+e.x];const t=uc(cc(e));return Zl.fromPoints(t)}function ac(e,t,r){return wl(e,e,1-r),Al(e,e,t,r)}function sc(e,t){const r=bc(t.zoom);if(0===r)return ic(e);const n=cc(e),o=uc(n),i=Mc(n.getWest())*t.worldSize,a=Mc(n.getEast())*t.worldSize,s=Rc(n.getNorth())*t.worldSize,l=Rc(n.getSouth())*t.worldSize,c=[i,s,0],u=[a,s,0],d=[i,l,0],f=[a,l,0],p=ol([],t.globeMatrix);return Tl(c,c,p),Tl(u,u,p),Tl(d,d,p),Tl(f,f,p),o[0]=ac(o[0],d,r),o[1]=ac(o[1],f,r),o[2]=ac(o[2],u,r),o[3]=ac(o[3],c,r),Zl.fromPoints(o)}function lc(e,t,r){for(const n of e)Tl(n,n,t),wl(n,n,r)}function cc({x:e,y:t,z:r}){const n=1/(1<Math.PI/2*1.01}const wc=x(85),Ac=Math.cos(wc),Sc=Math.sin(wc),Cc=6371008.8,Ec=2*Math.PI*Cc;class Tc{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Tc(k(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){const t=Math.PI/180,r=this.lat*t,n=e.lat*t,o=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return Cc*Math.acos(Math.min(o,1))}toBounds(e=0){const t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new Js(new Tc(this.lng-r,this.lat-t),new Tc(this.lng+r,this.lat+t))}toEcef(e){const t=tc(e);return fc(this.lat,this.lng,Yl+t)}static convert(e){if(e instanceof Tc)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Tc(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Tc(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}var Ic=Tc;function kc(e){return Ec*Math.cos(e*Math.PI/180)}function Mc(e){return(180+e)/360}function Rc(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Pc(e,t){return e/kc(t)}function Oc(e){return 360*e-180}function Dc(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function Lc(e,t){return e*kc(Dc(t))}const Nc=85.051129;function Fc(e){return 1/Math.cos(e*Math.PI/180)}class zc{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(e,t=0){const r=Ic.convert(e);return new zc(Mc(r.lng),Rc(r.lat),Pc(t,r.lat))}toLngLat(){return new Ic(Oc(this.x),Dc(this.y))}toAltitude(){return Lc(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Ec*Fc(Dc(this.y))}}function Bc(e,t,r,n,o,i,a,s,l){const c=(t+n)/2,u=(r+o)/2,d=new v(c,u);s(d),function(e,t,r,n,o,i){const a=r-o,s=n-i;return Math.abs((n-t)*a-(r-e)*s)/Math.hypot(a,s)}(d.x,d.y,i.x,i.y,a.x,a.y)>=l?(Bc(e,t,r,c,u,i,d,s,l),Bc(e,c,u,n,o,d,a,s,l)):e.push(a)}function jc(e,t,r){let n=e[0],o=n.x,i=n.y;t(n);const a=[n];for(let s=1;se.x+1||ne.y+1)&&H("Geometry exceeds allowed extent, reduce your vector tile buffer size"),e}function Wc(e,t,r){const n=e.loadGeometry(),o=e.extent,i=Ks/o;if(t&&r&&r.projection.isReprojectedInTileSpace){const i=1<{const r=Oc((t.x+e.x/o)/i),n=Dc((t.y+e.y/o)/i),u=c.project(r,n);e.x=(u.x*a-s)*o,e.y=(u.y*a-l)*o};for(let t=0;t=o||r.y<0||r.y>=o||(u(r),e.push(r));n[t]=e}}for(const e of n)for(const t of e)Gc(t,i);return n}function qc(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Wc(e):[]}}function Zc(e,t,r,n,o){e.emplaceBack(2*t+(n+1)/2,2*r+(o+1)/2)}function Yc(e,t,r){const n=16384;e.emplaceBack(t.x,t.y,t.z,r[0]*n,r[1]*n,r[2]*n)}class Xc{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.projection=e.projection,this.layoutVertexArray=new Da,this.indexArray=new Xa,this.segments=new Xs,this.programConfigurations=new js(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r,n){const o=this.layers[0],i=[];let a=null;"circle"===o.type&&(a=o.layout.get("circle-sort-key"));for(const{feature:t,id:o,index:s,sourceLayerIndex:l}of e){const e=this.layers[0]._featureFilter.needGeometry,c=qc(t,e);if(!this.layers[0]._featureFilter.filter(new ma(this.zoom),c,r))continue;const u=a?a.evaluate(c,{},r):void 0,d={id:o,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:Wc(t,r,n),patterns:{},sortKey:u};i.push(d)}a&&i.sort((e,t)=>e.sortKey-t.sortKey);let s=null;"globe"===n.projection.name&&(this.globeExtVertexArray=new $a,s=n.projection);for(const n of i){const{geometry:o,index:i,sourceLayerIndex:a}=n,l=e[i].feature;this.addFeature(n,o,i,t.availableImages,r,s),t.featureIndex.insert(l,o,i,a,this.index)}}update(e,t,r,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Zs.members),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=e.createVertexBuffer(this.globeExtVertexArray,Ys.members))),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}addFeature(e,t,r,n,o,i){for(const r of t)for(const t of r){const r=t.x,n=t.y;if(r<0||r>=Ks||n<0||n>=Ks)continue;if(i){const e=i.projectTilePoint(r,n,o),t=i.upVector(o,r,n),a=this.globeExtVertexArray;Yc(a,e,t),Yc(a,e,t),Yc(a,e,t),Yc(a,e,t)}const a=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),s=a.vertexLength;Zc(this.layoutVertexArray,r,n,-1,-1),Zc(this.layoutVertexArray,r,n,1,-1),Zc(this.layoutVertexArray,r,n,1,1),Zc(this.layoutVertexArray,r,n,-1,1),this.indexArray.emplaceBack(s,s+1,s+2),this.indexArray.emplaceBack(s,s+2,s+3),a.vertexLength+=4,a.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},n,o)}}function Kc(e,t){for(let r=0;r1){if(tu(e,t))return!0;for(let n=0;n1?r:r.sub(t)._mult(o)._add(t))}function iu(e,t){let r,n,o,i=!1;for(let a=0;at.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(i=!i)}return i}function au(e,t){let r=!1;for(let n=0,o=e.length-1;nt.y!=a.y>t.y&&t.x<(a.x-i.x)*(t.y-i.y)/(a.y-i.y)+i.x&&(r=!r)}return r}function su(e,t,r,n,o){for(const i of e)if(t<=i.x&&r<=i.y&&n>=i.x&&o>=i.y)return!0;const i=[new v(t,r),new v(t,o),new v(n,o),new v(n,r)];if(e.length>2)for(const t of i)if(au(e,t))return!0;for(let t=0;to.x&&t.x>o.x||e.yo.y&&t.y>o.y)return!1;const i=G(e,t,r[0]);return i!==G(e,t,r[1])||i!==G(e,t,r[2])||i!==G(e,t,r[3])}function cu(e,t,r){const n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function uu(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function du(e,t,r,n,o){if(!t[0]&&!t[1])return e;const i=v.convert(t)._mult(o);"viewport"===r&&i._rotate(-n);const a=[];for(let t=0;t0){const e=r.projection.upVector(c,d.x,d.y);p.x+=e[0]*u*f,p.y+=e[1]*u*f,p.z+=e[2]*u*f}const h=i?d:gu(p.x,p.y,p.z,n),m=i?e.tilespaceRays.map(e=>bu(e,f)):e.queryGeometry.screenGeometry,g=Ll([],[p.x,p.y,p.z,1],n);if(!a&&i?l*=g[3]/r.cameraToCenterDistance:a&&!i&&(l*=r.cameraToCenterDistance/g[3]),i){const e=Dc((t.y/Ks+c.y)/(1<e.width||o.height>e.height||r.x>e.width-o.width||r.y>e.height-o.height)throw new RangeError("out of range source coordinates for image copy");if(o.width>t.width||o.height>t.height||n.x>t.width-o.width||n.y>t.height-o.height)throw new RangeError("out of range destination coordinates for image copy");const a=e.data,s=t.data;for(let l=0;l{t[e.evaluationKey]=i;const a=e.expression.evaluate(t);o.data[r+n+0]=Math.floor(255*a.r/a.a),o.data[r+n+1]=Math.floor(255*a.g/a.a),o.data[r+n+2]=Math.floor(255*a.b/a.a),o.data[r+n+3]=Math.floor(255*a.a)};if(e.clips)for(let t=0,o=0;t80*r){n=i=e[0],o=a=e[1];for(var h=r;hi&&(i=s),l>a&&(a=l);c=0!==(c=Math.max(i-n,a-o))?32767/c:0}return Lu(f,p,r,n,o,c,0),p}function Ou(e,t,r,n,o){var i,a;if(o===nd(e,t,r,n)>0)for(i=t;i=t;i-=n)a=ed(i,e[i],e[i+1],a);return a&&Zu(a,a.next)&&(td(a),a=a.next),a}function Du(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!Zu(n,n.next)&&0!==qu(n.prev,n,n.next))n=n.next;else{if(td(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function Lu(e,t,r,n,o,i,a){if(e){!a&&i&&function(e,t,r,n){var o=e;do{0===o.z&&(o.z=Vu(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,a,s,l,c=1;do{for(r=e,e=null,i=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(o=r,r=r.nextZ,s--):(o=n,n=n.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}(e,n,o,i);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,i?Fu(e,n,o,i):Nu(e))t.push(s.i/r|0),t.push(e.i/r|0),t.push(l.i/r|0),td(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?Lu(e=zu(Du(e),t,r),t,r,n,o,i,2):2===a&&Bu(e,t,r,n,o,i):Lu(Du(e),t,r,n,o,i,1);break}}}function Nu(e){var t=e.prev,r=e,n=e.next;if(qu(t,r,n)>=0)return!1;for(var o=t.x,i=r.x,a=n.x,s=t.y,l=r.y,c=n.y,u=oi?o>a?o:a:i>a?i:a,p=s>l?s>c?s:c:l>c?l:c,h=n.next;h!==t;){if(h.x>=u&&h.x<=f&&h.y>=d&&h.y<=p&&Gu(o,s,i,l,a,c,h.x,h.y)&&qu(h.prev,h,h.next)>=0)return!1;h=h.next}return!0}function Fu(e,t,r,n){var o=e.prev,i=e,a=e.next;if(qu(o,i,a)>=0)return!1;for(var s=o.x,l=i.x,c=a.x,u=o.y,d=i.y,f=a.y,p=sl?s>c?s:c:l>c?l:c,g=u>d?u>f?u:f:d>f?d:f,y=Vu(p,h,t,r,n),v=Vu(m,g,t,r,n),b=e.prevZ,_=e.nextZ;b&&b.z>=y&&_&&_.z<=v;){if(b.x>=p&&b.x<=m&&b.y>=h&&b.y<=g&&b!==o&&b!==a&&Gu(s,u,l,d,c,f,b.x,b.y)&&qu(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,_.x>=p&&_.x<=m&&_.y>=h&&_.y<=g&&_!==o&&_!==a&&Gu(s,u,l,d,c,f,_.x,_.y)&&qu(_.prev,_,_.next)>=0)return!1;_=_.nextZ}for(;b&&b.z>=y;){if(b.x>=p&&b.x<=m&&b.y>=h&&b.y<=g&&b!==o&&b!==a&&Gu(s,u,l,d,c,f,b.x,b.y)&&qu(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;_&&_.z<=v;){if(_.x>=p&&_.x<=m&&_.y>=h&&_.y<=g&&_!==o&&_!==a&&Gu(s,u,l,d,c,f,_.x,_.y)&&qu(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function zu(e,t,r){var n=e;do{var o=n.prev,i=n.next.next;!Zu(o,i)&&Yu(o,n,n.next,i)&&Ju(o,i)&&Ju(i,o)&&(t.push(o.i/r|0),t.push(n.i/r|0),t.push(i.i/r|0),td(n),td(n.next),n=e=i),n=n.next}while(n!==e);return Du(n)}function Bu(e,t,r,n,o,i){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Wu(a,s)){var l=Qu(a,s);return a=Du(a,a.next),l=Du(l,l.next),Lu(a,t,r,n,o,i,0),void Lu(l,t,r,n,o,i,0)}s=s.next}a=a.next}while(a!==e)}function ju(e,t){return e.x-t.x}function $u(e,t){var r=function(e,t){var r,n=t,o=e.x,i=e.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=o&&s>a&&(a=s,r=n.x=n.x&&n.x>=u&&o!==n.x&&Gu(ir.x||n.x===r.x&&Uu(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(e,t);if(!r)return t;var n=Qu(r,e);return Du(n,n.next),Du(r,r.next)}function Uu(e,t){return qu(e.prev,e,t.prev)<0&&qu(t.next,e,e.next)<0}function Vu(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Hu(e){var t=e,r=e;do{(t.x=(e-a)*(i-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(i-s)>=(o-a)*(n-s)}function Wu(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Yu(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(Ju(e,t)&&Ju(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(qu(e.prev,e,t.prev)||qu(e,t.prev,t))||Zu(e,t)&&qu(e.prev,e,e.next)>0&&qu(t.prev,t,t.next)>0)}function qu(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Zu(e,t){return e.x===t.x&&e.y===t.y}function Yu(e,t,r,n){var o=Ku(qu(e,t,r)),i=Ku(qu(e,t,n)),a=Ku(qu(r,n,e)),s=Ku(qu(r,n,t));return o!==i&&a!==s||!(0!==o||!Xu(e,r,t))||!(0!==i||!Xu(e,n,t))||!(0!==a||!Xu(r,e,n))||!(0!==s||!Xu(r,t,n))}function Xu(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Ku(e){return e>0?1:e<0?-1:0}function Ju(e,t){return qu(e.prev,e,e.next)<0?qu(e,t,e.next)>=0&&qu(e,e.prev,t)>=0:qu(e,t,e.prev)<0||qu(e,e.next,t)<0}function Qu(e,t){var r=new rd(e.i,e.x,e.y),n=new rd(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function ed(e,t,r,n){var o=new rd(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function td(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function rd(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function nd(e,t,r,n){for(var o=0,i=t,a=r-n;i0&&r.holes.push(n+=e[o-1].length)}return r};var od=f(Ru.exports);function id(e,t,r,n,o){ad(e,t,r||0,n||e.length-1,o||ld)}function ad(e,t,r,n,o){for(;n>r;){if(n-r>600){var i=n-r+1,a=t-r+1,s=Math.log(i),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(i-l)/i)*(a-i/2<0?-1:1);ad(e,t,Math.max(r,Math.floor(t-a*l/i+c)),Math.min(n,Math.floor(t+(i-a)*l/i+c)),o)}var u=e[t],d=r,f=n;for(sd(e,r,t),o(e[n],u)>0&&sd(e,r,n);d0;)f--}0===o(e[r],u)?sd(e,r,f):sd(e,++f,n),f<=t&&(r=f+1),t<=f&&(n=f-1)}}function sd(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function ld(e,t){return et?1:0}function cd(e,t){const r=e.length;if(r<=1)return[e];const n=[];let o,i;for(let t=0;t1)for(let e=0;ee.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Da,this.indexArray=new Xa,this.indexArray2=new rs,this.programConfigurations=new js(e.layers,e.zoom),this.segments=new Xs,this.segments2=new Xs,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.projection=e.projection}populate(e,t,r,n){this.hasPattern=dd("fill",this.layers,t);const o=this.layers[0].layout.get("fill-sort-key"),i=[];for(const{feature:a,id:s,index:l,sourceLayerIndex:c}of e){const e=this.layers[0]._featureFilter.needGeometry,u=qc(a,e);if(!this.layers[0]._featureFilter.filter(new ma(this.zoom),u,r))continue;const d=o?o.evaluate(u,{},r,t.availableImages):void 0,f={id:s,properties:a.properties,type:a.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:Wc(a,r,n),patterns:{},sortKey:d};i.push(f)}o&&i.sort((e,t)=>e.sortKey-t.sortKey);for(const n of i){const{geometry:o,index:i,sourceLayerIndex:a}=n;if(this.hasPattern){const e=fd("fill",this.layers,n,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(n,o,i,r,{},t.availableImages);t.featureIndex.insert(e[i].feature,o,i,a,this.index)}}update(e,t,r,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r,n)}addFeatures(e,t,r,n,o){for(const e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,r,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Mu),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,t,r,n,o,i=[]){for(const e of cd(t,500)){let t=0;for(const r of e)t+=r.length;const r=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray),n=r.vertexLength,o=[],i=[];for(const t of e){if(0===t.length)continue;t!==e[0]&&i.push(o.length/2);const r=this.segments2.prepareSegment(t.length,this.layoutVertexArray,this.indexArray2),n=r.vertexLength;this.layoutVertexArray.emplaceBack(t[0].x,t[0].y),this.indexArray2.emplaceBack(n+t.length-1,n),o.push(t[0].x),o.push(t[0].y);for(let e=1;e>3}if(o--,1===n||2===n)i+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new xd(i,a));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&s.push(t),s},Ad.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,o=0,i=0,a=1/0,s=-1/0,l=1/0,c=-1/0;e.pos>3}if(n--,1===r||2===r)(o+=e.readSVarint())s&&(s=o),(i+=e.readSVarint())c&&(c=i);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,c]},Ad.prototype.toGeoJSON=function(e,t,r){var n,o,i=this.extent*Math.pow(2,r),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=Ad.types[this.type];function u(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(r))}Id.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Ed(this._pbf,t,this.extent,this._keys,this._values)};var Md=Td;function Rd(e,t,r){if(3===e){var n=new Md(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}var Pd=_d.VectorTile=function(e,t){this.layers=e.readFields(Rd,{},t)},Od=_d.VectorTileFeature=wd;function Dd(e,t,r,n){const o=[],i=0===n?(e,t,r,n,o,i)=>{e.push(new v(i,r+(i-t)/(n-t)*(o-r)))}:(e,t,r,n,o,i)=>{e.push(new v(t+(i-r)/(o-r)*(n-t),i))};for(const a of e){const e=[];for(const o of a){if(o.length<=2)continue;const a=[];for(let e=0;et&&i(a,s,l,c,u,t):d>r?f=t&&i(a,s,l,c,u,t),f>r&&d<=r&&i(a,s,l,c,u,r)}let s=o[o.length-1];const l=0===n?s.x:s.y;l>=t&&l<=r&&a.push(s),a.length&&(s=a[a.length-1],a[0].x===s.x&&a[0].y===s.y||a.push(a[0]),e.push(a))}e.length&&o.push(e)}return o}_d.VectorTileLayer=Td;const Ld=Od.types,Nd=Math.pow(2,13);function Fd(e,t,r,n,o,i,a,s){e.emplaceBack((t<<1)+a,(r<<1)+i,(Math.floor(n*Nd)<<1)+o,Math.round(s))}function zd(e,t,r){const n=16384;e.emplaceBack(t.x,t.y,t.z,r[0]*n,r[1]*n,r[2]*n)}class Bd{constructor(){this.acc=new v(0,0),this.polyCount=[]}startRing(e){this.currentPolyCount={edges:0,top:0},this.polyCount.push(this.currentPolyCount),this.min||(this.min=new v(e.x,e.y),this.max=new v(e.x,e.y))}append(e,t){this.currentPolyCount.edges++,this.acc._add(e);const r=this.min,n=this.max;e.xn.x&&(n.x=e.x),e.yn.y&&(n.y=e.y),((0===e.x||e.x===Ks)&&e.x===t.x)!=((0===e.y||e.y===Ks)&&e.y===t.y)&&this.processBorderOverlap(e,t),t.x<0!=e.x<0&&this.addBorderIntersection(0,Rr(t.y,e.y,(0-t.x)/(e.x-t.x))),t.x>Ks!=e.x>Ks&&this.addBorderIntersection(1,Rr(t.y,e.y,(Ks-t.x)/(e.x-t.x))),t.y<0!=e.y<0&&this.addBorderIntersection(2,Rr(t.x,e.x,(0-t.y)/(e.y-t.y))),t.y>Ks!=e.y>Ks&&this.addBorderIntersection(3,Rr(t.x,e.x,(Ks-t.y)/(e.y-t.y)))}addBorderIntersection(e,t){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);const r=this.borders[e];tr[1]&&(r[1]=t)}processBorderOverlap(e,t){if(e.x===t.x){if(e.y===t.y)return;const r=0===e.x?0:1;this.addBorderIntersection(r,t.y),this.addBorderIntersection(r,e.y)}else{const r=0===e.y?2:3;this.addBorderIntersection(r,t.x),this.addBorderIntersection(r,e.x)}}centroid(){const e=this.polyCount.reduce((e,t)=>e+t.edges,0);return 0!==e?this.acc.div(e)._round():new v(0,0)}span(){return new v(this.max.x-this.min.x,this.max.y-this.min.y)}intersectsCount(){return this.borders.reduce((e,t)=>e+ +(t[0]!==Number.MAX_VALUE),0)}}class jd{constructor(e){this.zoom=e.zoom,this.canonical=e.canonical,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.edgeRadius=0,this.projection=e.projection,this.layoutVertexArray=new Na,this.centroidVertexArray=new ms,this.indexArray=new Xa,this.programConfigurations=new js(e.layers,e.zoom),this.segments=new Xs,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.enableTerrain=e.enableTerrain}populate(e,t,r,n){this.features=[],this.hasPattern=dd("fill-extrusion",this.layers,t),this.featuresOnBorder=[],this.borders=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.tileToMeter=function(e){const t=Math.exp(Math.PI*(1-e.y/(1<=0;e--){const t=f[e];(0===t.length||(p=t[0]).every(e=>e.x<=0)||p.every(e=>e.x>=Ks)||p.every(e=>e.y<=0)||p.every(e=>e.y>=Ks))&&f.splice(e,1)}var p;let h;if(c)h=Zd(f,s,n);else{h=[];for(const e of f)h.push({polygon:e,bounds:s})}const m=d?this.edgeRadius:0;for(const{polygon:e,bounds:t}of h){let r=0,o=0;for(const t of e)d&&!t[0].equals(t[t.length-1])&&t.push(t[0]),o+=d?t.length-1:t.length;const i=this.segments.prepareSegment((d?5:4)*o,this.layoutVertexArray,this.indexArray);if(d){const t=[],o=[];r=i.vertexLength;for(const r of e){let a,s;r.length&&r!==e[0]&&o.push(t.length/2),a=r[1].sub(r[0])._perp()._unit();for(let e=1;e4&&Gd(o[o.length-2],o[0],o[1]),p=m?Ud(o[o.length-2],o[0],o[1],m):0;a=o[1].sub(o[0])._perp()._unit();let h=!0;for(let g=1,y=0;g0?1:0,S=v.dist(b);if(y+S>32768&&(y=0),m){s=_.sub(b)._perp()._unit();let e=Vd(v,b,_,$d(a,s),m);isNaN(e)&&(e=0);const t=b.sub(v)._unit();v=v.add(t.mult(p))._round(),b=b.add(t.mult(-e))._round(),p=e,a=s}const C=i.vertexLength,E=o.length>4&&Gd(v,b,_);let T=Wd(y,f,h);if(Fd(this.layoutVertexArray,v.x,v.y,w,A,0,0,T),Fd(this.layoutVertexArray,v.x,v.y,w,A,0,1,T),y+=S,T=Wd(y,E,!h),f=E,Fd(this.layoutVertexArray,b.x,b.y,w,A,0,0,T),Fd(this.layoutVertexArray,b.x,b.y,w,A,0,1,T),i.vertexLength+=4,this.indexArray.emplaceBack(C+0,C+1,C+2),this.indexArray.emplaceBack(C+1,C+3,C+2),i.primitiveLength+=2,m){const n=r+(1===g?o.length-2:g-2),a=1===g?r:n+1;if(this.indexArray.emplaceBack(C+1,n,C+3),this.indexArray.emplaceBack(n,a,C+3),i.primitiveLength+=2,void 0===e&&(e=C),!Hd(_,o[g],t)){const t=g===o.length-1?e:i.vertexLength;this.indexArray.emplaceBack(C+2,C+3,t),this.indexArray.emplaceBack(C+3,t+1,t),this.indexArray.emplaceBack(C+3,a,t+1),i.primitiveLength+=3}h=!h}if(c){const e=this.layoutVertexExtArray,t=l.projectTilePoint(v.x,v.y,n),r=l.projectTilePoint(b.x,b.y,n),o=l.upVector(n,v.x,v.y),i=l.upVector(n,b.x,b.y);zd(e,t,o),zd(e,t,o),zd(e,r,i),zd(e,r,i)}}d&&(r+=o.length-1)}}if(u&&u.polyCount.length>0){if(u.borders){u.vertexArrayOffset=this.centroidVertexArray.length;const e=u.borders,t=this.featuresOnBorder.push(u)-1;for(let r=0;r<4;r++)e[r][0]!==Number.MAX_VALUE&&this.borders[r].push(t)}this.encodeCentroid(u.borders?void 0:u.centroid(),u)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,o,i,n)}sortBorders(){for(let e=0;e<4;e++)this.borders[e].sort((t,r)=>this.featuresOnBorder[t].borders[e][0]-this.featuresOnBorder[r].borders[e][0])}encodeCentroid(e,t,r=!0){let n,o;if(e)if(0!==e.y){const r=t.span()._mult(this.tileToMeter);n=(Math.max(e.x,1)<<3)+Math.min(7,Math.round(r.x/10)),o=(Math.max(e.y,1)<<3)+Math.min(7,Math.round(r.y/10))}else n=Math.ceil(7*(e.x+450)),o=0;else n=0,o=+r;let i=r?this.centroidVertexArray.length:t.vertexArrayOffset;for(const e of t.polyCount){r&&this.centroidVertexArray.resize(this.centroidVertexArray.length+4*e.edges+e.top);for(let t=0;tr[1].x&&t.x>r[1].x||e.yr[1].y&&t.y>r[1].y}function Gd(e,t,r){if(e.x<0||e.x>=Ks||t.x<0||t.x>=Ks||r.x<0||r.x>=Ks)return!1;const n=r.sub(t),o=n.perp(),i=e.sub(t);return(n.x*i.x+n.y*i.y)/Math.sqrt((n.x*n.x+n.y*n.y)*(i.x*i.x+i.y*i.y))>-.866&&o.x*i.x+o.y*i.y<0}function Wd(e,t,r){const n=t?2|e:-3&e;return r?1|n:-2&n}function qd(){const e=Math.PI/32,t=Math.tan(e),r=Cc;return r*Math.sqrt(1+2*t*t)-r}function Zd(e,t,r){const n=1<{for(const r of e)a.push({polygon:r,bounds:t})},l=Math.ceil(Math.log2(r)),c=Math.ceil(Math.log2(n)),u=l-c,d=[];for(let e=0;e0?0:1);for(let e=0;et+1?p.push({polygons:f,bounds:e,depth:t+1}):s(f,e)}if(h.length){const e=[new v(0===r?u:n.x,1===r?u:n.y),a];d.length>t+1?p.push({polygons:h,bounds:e,depth:t+1}):s(h,e)}}return a}(e,t,Math.ceil((i-o)/11.25),Math.ceil((a-s)/11.25),1,(e,t,o)=>{if(0===e)return.5*(t+o);{const e=Dc((r.y+t/Ks)/n);return(Rc(.5*(Dc((r.y+o/Ks)/n)+e))*n-r.y)*Ks}})}Xo(jd,"FillExtrusionBucket",{omit:["layers","features"]}),Xo(Bd,"PartMetadata");const Yd=new Ta({"fill-extrusion-edge-radius":new Sa(et["layout_fill-extrusion"]["fill-extrusion-edge-radius"])});var Xd={paint:new Ta({"fill-extrusion-opacity":new Sa(et["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ca(et["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Sa(et["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Sa(et["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ca(et["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ca(et["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ca(et["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Sa(et["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]),"fill-extrusion-ambient-occlusion-intensity":new Sa(et["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-intensity"]),"fill-extrusion-ambient-occlusion-radius":new Sa(et["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-radius"]),"fill-extrusion-rounded-roof":new Sa(et["paint_fill-extrusion"]["fill-extrusion-rounded-roof"])}),layout:Yd};function Kd(e,t,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[e*n-2*Math.PI*6378137/2,t*n-2*Math.PI*6378137/2]}class Jd{constructor(e,t,r){this.z=e,this.x=t,this.y=r,this.key=tf(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t){const r=function(e,t,r){var n=Kd(256*e,256*(t=Math.pow(2,r)-t-1),r),o=Kd(256*(e+1),256*(t+1),r);return n[0]+","+n[1]+","+o[0]+","+o[1]}(this.x,this.y,this.z),n=function(e,t,r){let n,o="";for(let i=e;i>0;i--)n=1<this.canonical.z?new ef(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ef(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}calculateScaledKey(e,t=!0){if(this.overscaledZ===e&&t)return this.key;if(e>this.canonical.z)return tf(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y);{const r=this.canonical.z-e;return tf(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)}}isChildOf(e){if(e.wrap!==this.wrap)return!1;const t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new ef(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new ef(t,this.wrap,t,r,n),new ef(t,this.wrap,t,r+1,n),new ef(t,this.wrap,t,r,n+1),new ef(t,this.wrap,t,r+1,n+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.ye.id),this.index=e.index,this.projection=e.projection,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(e=>{this.gradients[e.id]={}}),this.layoutVertexArray=new Fa,this.layoutVertexArray2=new za,this.indexArray=new Xa,this.programConfigurations=new js(e.layers,e.zoom),this.segments=new Xs,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r,n){this.hasPattern=dd("line",this.layers,t);const o=this.layers[0].layout.get("line-sort-key"),i=[];for(const{feature:t,id:a,index:s,sourceLayerIndex:l}of e){const e=this.layers[0]._featureFilter.needGeometry,c=qc(t,e);if(!this.layers[0]._featureFilter.filter(new ma(this.zoom),c,r))continue;const u=o?o.evaluate(c,{},r):void 0,d={id:a,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:Wc(t,r,n),patterns:{},sortKey:u};i.push(d)}o&&i.sort((e,t)=>e.sortKey-t.sortKey);const{lineAtlas:a,featureIndex:s}=t,l=this.addConstantDashes(a);for(const n of i){const{geometry:o,index:i,sourceLayerIndex:c}=n;if(l&&this.addFeatureDashes(n,a),this.hasPattern){const e=fd("line",this.layers,n,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(n,o,i,r,a.positions,t.availableImages);s.insert(e[i].feature,o,i,c,this.index)}}addConstantDashes(e){let t=!1;for(const r of this.layers){const n=r.paint.get("line-dasharray").value,o=r.layout.get("line-cap").value;if("constant"!==n.kind||"constant"!==o.kind)t=!0;else{const t=o.value,r=n.value;if(!r)continue;e.addDash(r,t)}}return t}addFeatureDashes(e,t){const r=this.zoom;for(const n of this.layers){const o=n.paint.get("line-dasharray").value,i=n.layout.get("line-cap").value;if("constant"===o.kind&&"constant"===i.kind)continue;let a,s;if("constant"===o.kind){if(a=o.value,!a)continue}else a=o.evaluate({zoom:r},e);s="constant"===i.kind?i.value:i.evaluate({zoom:r},e),t.addDash(a,s),e.patterns[n.id]=t.getKey(a,s)}}update(e,t,r,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r,n)}addFeatures(e,t,r,n,o){for(const e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,r,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,uf)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,lf),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,t,r,n,o,i){const a=this.layers[0].layout,s=a.get("line-join").evaluate(e,{}),l=a.get("line-cap").evaluate(e,{}),c=a.get("line-miter-limit"),u=a.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(const r of t)this.addLine(r,e,s,l,c,u);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,o,i,n)}addLine(e,t,r,n,o,i){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineSoFar=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t=2&&e[s-1].equals(e[s-2]);)s--;let l=0;for(;l0;if(x&&t>l){const e=d.dist(f);if(e>2*c){const t=d.sub(d.sub(f)._mult(c/e)._round());this.updateDistance(f,t),this.addCurrentVertex(t,h,0,0,u),f=t}}const A=f&&p;let S=A?r:a?"butt":n;if(A&&"round"===S&&(bo&&(S="bevel"),"bevel"===S&&(b>2&&(S="flipbevel"),b100)g=m.mult(-1);else{const e=b*h.add(m).mag()/h.sub(m).mag();g._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(d,g,0,0,u),this.addCurrentVertex(d,g.mult(-1),0,0,u)}else if("bevel"===S||"fakeround"===S){const e=-Math.sqrt(b*b-1),t=w?e:0,r=w?0:e;if(f&&this.addCurrentVertex(d,h,t,r,u),"fakeround"===S){const e=Math.round(180*_/Math.PI/20);for(let t=1;t2*c){const t=d.add(p.sub(d)._mult(c/e)._round());this.updateDistance(d,t),this.addCurrentVertex(t,m,0,0,u),d=t}}}}addCurrentVertex(e,t,r,n,o,i=!1){const a=t.y*n-t.x,s=-t.y-t.x*n;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,i,!1,r,o),this.addHalfVertex(e,a,s,i,!0,-n,o)}addHalfVertex({x:e,y:t},r,n,o,i,a,s){this.layoutVertexArray.emplaceBack((e<<1)+(o?1:0),(t<<1)+(i?1:0),Math.round(63*r)+128,Math.round(63*n)+128,1+(0===a?0:a<0?-1:1),0,this.lineSoFar),this.lineClips&&this.layoutVertexArray2.emplaceBack(this.scaledDistance,this.lineClipsArray.length,this.lineClips.start,this.lineClips.end);const l=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),s.primitiveLength++),i?this.e2=l:this.e1=l}updateScaledDistance(){if(this.lineClips){const e=this.totalDistance/(this.lineClips.end-this.lineClips.start);this.scaledDistance=this.distance/this.totalDistance,this.lineSoFar=e*this.lineClips.start+this.distance}else this.lineSoFar=this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}}Xo(pf,"LineBucket",{omit:["layers","patternFeatures"]});const hf=new Ta({"line-cap":new Ca(et.layout_line["line-cap"]),"line-join":new Ca(et.layout_line["line-join"]),"line-miter-limit":new Sa(et.layout_line["line-miter-limit"]),"line-round-limit":new Sa(et.layout_line["line-round-limit"]),"line-sort-key":new Ca(et.layout_line["line-sort-key"])});var mf={paint:new Ta({"line-opacity":new Ca(et.paint_line["line-opacity"]),"line-color":new Ca(et.paint_line["line-color"]),"line-translate":new Sa(et.paint_line["line-translate"]),"line-translate-anchor":new Sa(et.paint_line["line-translate-anchor"]),"line-width":new Ca(et.paint_line["line-width"]),"line-gap-width":new Ca(et.paint_line["line-gap-width"]),"line-offset":new Ca(et.paint_line["line-offset"]),"line-blur":new Ca(et.paint_line["line-blur"]),"line-dasharray":new Ca(et.paint_line["line-dasharray"]),"line-pattern":new Ca(et.paint_line["line-pattern"]),"line-gradient":new Ea(et.paint_line["line-gradient"]),"line-trim-offset":new Sa(et.paint_line["line-trim-offset"])}),layout:hf};const gf=new class extends Ca{possiblyEvaluate(e,t){return t=new ma(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,n){return t=P({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,n)}}(mf.paint.properties["line-width"].specification);function yf(e,t){return t>0?t+2*e:e}gf.useIntegerZoom=!0;const vf=Pa([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_tex_size",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),bf=Pa([{name:"a_globe_anchor",components:3,type:"Int16"},{name:"a_globe_normal",components:3,type:"Float32"}],4),_f=Pa([{name:"a_projected_pos",components:4,type:"Float32"}],4);Pa([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const xf=Pa([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),wf=Pa([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"}]);Pa([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Int16",name:"tileAnchorX"},{type:"Int16",name:"tileAnchorY"},{type:"Float32",name:"x1"},{type:"Float32",name:"y1"},{type:"Float32",name:"x2"},{type:"Float32",name:"y2"},{type:"Int16",name:"padding"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Af=Pa([{name:"a_pos",components:3,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Sf=Pa([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Pa([{name:"triangle",components:3,type:"Uint16"}]),Pa([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"},{type:"Uint8",name:"flipState"}]),Pa([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Pa([{type:"Float32",name:"offsetX"}]),Pa([{type:"Int16",name:"x"},{type:"Int16",name:"y"}]);var Cf=24;const Ef=128;function Tf(e,t){const{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new ma(e+1))};if("source"===r.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=r;let o=0;for(;o{e.text=function(e,t,r){const n=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),ha.applyArabicShaping&&(e=ha.applyArabicShaping(e)),e}(e.text,t,r)}),e}const Pf={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂","←":"↑","→":"↓"};function Of(e){return"︶"===e||"﹈"===e||"︸"===e||"﹄"===e||"﹂"===e||"︾"===e||"︼"===e||"︺"===e||"︘"===e||"﹀"===e||"︐"===e||"︓"===e||"︔"===e||"`"===e||" ̄"===e||"︑"===e||"︒"===e}function Df(e){return"︵"===e||"﹇"===e||"︷"===e||"﹃"===e||"﹁"===e||"︽"===e||"︻"===e||"︹"===e||"︗"===e||"︿"===e}var Lf=zf,Nf=function(e,t,r,n,o){var i,a,s=8*o-n-1,l=(1<>1,u=-7,d=r?o-1:0,f=r?-1:1,p=e[t+d];for(d+=f,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=c}return(p?-1:1)*a*Math.pow(2,i-n)},Ff=function(e,t,r,n,o,i){var a,s,l,c=8*i-o-1,u=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=255&s,p+=h,s/=256,o-=8);for(a=a<0;e[r+p]=255&a,p+=h,a/=256,c-=8);e[r+p-h]|=128*m};function zf(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}zf.Varint=0,zf.Fixed64=1,zf.Bytes=2,zf.Fixed32=5;var Bf=4294967296,jf=1/Bf,$f="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Uf(e){return e.type===zf.Bytes?e.readVarint()+e.pos:e.pos+1}function Vf(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function Hf(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var o=r.pos-1;o>=e;o--)r.buf[o+n]=r.buf[o]}function Gf(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function rp(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}zf.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,i=this.pos;this.type=7&n,e(o,t,this),this.pos===i&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=ep(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=rp(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=ep(this.buf,this.pos)+ep(this.buf,this.pos+4)*Bf;return this.pos+=8,e},readSFixed64:function(){var e=ep(this.buf,this.pos)+rp(this.buf,this.pos+4)*Bf;return this.pos+=8,e},readFloat:function(){var e=Nf(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Nf(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:function(e,t,r){var n,o,i=r.buf;if(n=(112&(o=i[r.pos++]))>>4,o<128)return Vf(e,n,t);if(n|=(127&(o=i[r.pos++]))<<3,o<128)return Vf(e,n,t);if(n|=(127&(o=i[r.pos++]))<<10,o<128)return Vf(e,n,t);if(n|=(127&(o=i[r.pos++]))<<17,o<128)return Vf(e,n,t);if(n|=(127&(o=i[r.pos++]))<<24,o<128)return Vf(e,n,t);if(n|=(1&(o=i[r.pos++]))<<31,o<128)return Vf(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&$f?function(e,t,r){return $f.decode(e.subarray(t,r))}(this.buf,t,e):function(e,t,r){for(var n="",o=t;o239?4:l>223?3:l>191?2:1;if(o+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(i=e[o+1]))&&(c=(31&l)<<6|63&i)<=127&&(c=null):3===u?(a=e[o+2],128==(192&(i=e[o+1]))&&128==(192&a)&&((c=(15&l)<<12|(63&i)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=e[o+2],s=e[o+3],128==(192&(i=e[o+1]))&&128==(192&a)&&128==(192&s)&&((c=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),o+=u}return n}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==zf.Bytes)return e.push(this.readVarint(t));var r=Uf(this);for(e=e||[];this.pos127;);else if(t===zf.Bytes)this.pos=this.readVarint()+this.pos;else if(t===zf.Fixed32)this.pos+=4;else{if(t!==zf.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,r.buf[r.pos]=127&(e>>>=7)}(r,0,t),function(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,o,i=0;i55295&&n<57344){if(!o){n>56319||i+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):o=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,o=n;continue}n=o-55296<<10|n-56320|65536,o=null}else o&&(e[r++]=239,e[r++]=191,e[r++]=189,o=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Hf(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Ff(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Ff(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&Hf(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,zf.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,Gf,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Wf,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Yf,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,qf,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,Zf,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Xf,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,Kf,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,Jf,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Qf,t)},writeBytesField:function(e,t){this.writeTag(e,zf.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,zf.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,zf.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,zf.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,zf.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,zf.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,zf.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,zf.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,zf.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,zf.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var np=f(Lf);function op(e,t,r){t.glyphs=[],1===e&&r.readMessage(ip,t)}function ip(e,t,r){if(3===e){const{id:e,bitmap:n,width:o,height:i,left:a,top:s,advance:l}=r.readMessage(ap,{});t.glyphs.push({id:e,bitmap:new Su({width:o+6,height:i+6},n),metrics:{width:o,height:i,left:a,top:s,advance:l}})}else 4===e?t.ascender=r.readSVarint():5===e&&(t.descender=r.readSVarint())}function ap(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function sp(e){let t=0,r=0;for(const n of e)t+=n.w*n.h,r=Math.max(r,n.w);e.sort((e,t)=>t.h-e.h);const n=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}];let o=0,i=0;for(const t of e)for(let e=n.length-1;e>=0;e--){const r=n[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,i=Math.max(i,t.y+t.h),o=Math.max(o,t.x+t.w),t.w===r.w&&t.h===r.h){const t=n.pop();ee.hasImage(t)),e.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const r in e.updatedImages)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t),this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)}patchUpdatedImage(e,t,r){if(!e||!t)return;if(e.version===t.version)return;e.version=t.version;const[n,o]=e.tl;r.update(t.data,void 0,{x:n,y:o})}}Xo(lp,"ImagePosition"),Xo(cp,"ImageAtlas");const up={horizontal:1,vertical:2,horizontalOnly:3};class dp{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(e,t){const r=new dp;return r.scale=e||1,r.fontStack=t,r}static forImage(e){const t=new dp;return t.imageName=e,t}}class fp{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,t){const r=new fp;for(let n=0;n=0&&r>=e&&hp[this.text.charCodeAt(r)];r--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){const r=new fp;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,t)=>Math.max(e,this.sections[t].scale),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(dp.forText(e.scale,e.fontStack||t));const r=this.sections.length-1;for(let t=0;t=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function pp(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h){const m=fp.fromFeature(e,o);d===up.vertical&&m.verticalizePunctuation(f);let g=[];const y=function(e,t,r,n,o,i){if(!e)return[];const a=[],s=function(e,t,r,n,o,i){let a=0;for(let r=0;r=0;let c=0;for(let r=0;r0&&i>x&&(x=i)}else{const e=r[s.fontStack];if(!e)continue;e[m]&&(S=e[m]);const n=t[s.fontStack];if(!n)continue;const i=n.glyphs[m];if(!i)continue;if(b=i.metrics,E=8203!==m?Cf:0,g){const e=void 0!==n.ascender?Math.abs(n.ascender):0,t=void 0!==n.descender?Math.abs(n.descender):0,r=(e+t)*y;w-r/2;){if(a--,a<0)return!1;s-=e[a].dist(i),i=e[a]}s+=e[a].dist(e[a+1]),a++;const l=[];let c=0;for(;sn;)c-=l.shift().angleDelta;if(c>o)return!1;a++,s+=t.dist(r)}return!0}function Tp(e){let t=0;for(let r=0;rc){const u=(c-l)/i,d=Rr(n.x,o.x,u),f=Rr(n.y,o.y,u),p=new Cp(d,f,0,o.angleTo(n),r);return!a||Ep(e,p,s,a,t)?p:void 0}l+=i}}function Rp(e,t,r,n,o,i,a,s,l){const c=Ip(n,i,a),u=kp(n,o),d=u*a,f=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-d=0&&y=0&&v=0&&f+c<=u){const r=new Cp(y,v,0,m,t);r._round(),n&&!Ep(e,r,i,n,o)||p.push(r)}}d+=h}return s||p.length||a||(p=Pp(e,d/2,r,n,o,i,a,!0,l)),p}function Op(e,t,r,n,o){const i=[];for(let a=0;a=n&&c.x>=n||(a.x>=n?a=new v(n,a.y+(n-a.x)/(c.x-a.x)*(c.y-a.y))._round():c.x>=n&&(c=new v(n,a.y+(n-a.x)/(c.x-a.x)*(c.y-a.y))._round()),a.y>=o&&c.y>=o||(a.y>=o?a=new v(a.x+(o-a.y)/(c.y-a.y)*(c.x-a.x),o)._round():c.y>=o&&(c=new v(a.x+(o-a.y)/(c.y-a.y)*(c.x-a.x),o)._round()),l&&a.equals(l[l.length-1])||(l=[a],i.push(l)),l.push(c)))))}}return i}Xo(Cp,"Anchor");const Dp=1e20;function Lp(e,t,r,n,o,i,a,s,l){for(let c=t;c-1);l++,i[l]=s,a[l]=c,a[l+1]=Dp}for(let s=0,l=0;s{let n=this.entries[e];n||(n=this.entries[e]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let o=n.glyphs[t];if(void 0!==o)return void r(null,{stack:e,id:t,glyph:o});if(o=this._tinySDF(n,e,t),o)return n.glyphs[t]=o,void r(null,{stack:e,id:t,glyph:o});const i=Math.floor(t/256);if(256*i>65535)return void r(new Error("glyphs > 65535 not supported"));if(n.ranges[i])return void r(null,{stack:e,id:t,glyph:o});let a=n.requests[i];a||(a=n.requests[i]=[],zp.loadGlyphRange(e,i,this.url,this.requestManager,(e,t)=>{if(t){n.ascender=t.ascender,n.descender=t.descender;for(const e in t.glyphs)this._doesCharSupportLocalGlyph(+e)||(n.glyphs[+e]=t.glyphs[+e]);n.ranges[i]=!0}for(const r of a)r(e,t);delete n.requests[i]})),a.push((n,o)=>{n?r(n):o&&r(null,{stack:e,id:t,glyph:o.glyphs[t]||null})})},(e,r)=>{if(e)t(e);else if(r){const e={};for(const{stack:t,id:n,glyph:o}of r)void 0===e[t]&&(e[t]={}),void 0===e[t].glyphs&&(e[t].glyphs={}),e[t].glyphs[n]=o&&{id:o.id,bitmap:o.bitmap.clone(),metrics:o.metrics},e[t].ascender=this.entries[t].ascender,e[t].descender=this.entries[t].descender;t(null,e)}})}_doesCharSupportLocalGlyph(e){return this.localGlyphMode!==Fp.none&&(this.localGlyphMode===Fp.all?!!this.localFontFamily:!!this.localFontFamily&&(Li(e)||Bi(e)||Ai(e)||Si(e)||wi(e)))}_tinySDF(e,t,r){const n=this.localFontFamily;if(!n||!this._doesCharSupportLocalGlyph(r))return;let o=e.tinySDF;if(!o){let r="400";/bold/i.test(t)?r="900":/medium/i.test(t)?r="500":/light/i.test(t)&&(r="200"),o=e.tinySDF=new zp.TinySDF({fontFamily:n,fontWeight:r,fontSize:48,buffer:6,radius:16}),o.fontWeight=r}if(this.localGlyphs[o.fontWeight][r])return this.localGlyphs[o.fontWeight][r];const i=String.fromCharCode(r),{data:a,width:s,height:l,glyphWidth:c,glyphHeight:u,glyphLeft:d,glyphTop:f,glyphAdvance:p}=o.draw(i);return this.localGlyphs[o.fontWeight][r]={id:r,bitmap:new Su({width:s,height:l},a),metrics:{width:c/2,height:u/2,left:d/2,top:f/2-27,advance:p/2,localGlyph:!0}}}}zp.loadGlyphRange=function(e,t,r,n,o){const i=256*t,a=i+255,s=n.transformRequest(n.normalizeGlyphsURL(r).replace("{fontstack}",e).replace("{range}",`${i}-${a}`),le.Glyphs);fe(s,(e,t)=>{if(e)o(e);else if(t){const e={},r=function(e){return new np(e).readFields(op,{})}(t);for(const t of r.glyphs)e[t.id]=t;o(null,{glyphs:e,ascender:r.ascender,descender:r.descender})}})},zp.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:n=.25,fontFamily:o="sans-serif",fontWeight:i="normal",fontStyle:a="normal"}={}){this.buffer=t,this.cutoff=n,this.radius=r;const s=this.size=e+4*t,l=this._createCanvas(s),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font=`${a} ${i} ${e}px ${o}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(e){const t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){const{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:n,actualBoundingBoxLeft:o,actualBoundingBoxRight:i}=this.ctx.measureText(e),a=Math.ceil(r),s=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(i-o))),l=Math.min(this.size-this.buffer,a+Math.ceil(n)),c=s+2*this.buffer,u=l+2*this.buffer,d=Math.max(c*u,0),f=new Uint8ClampedArray(d),p={data:f,width:c,height:u,glyphWidth:s,glyphHeight:l,glyphTop:a,glyphLeft:0,glyphAdvance:t};if(0===s||0===l)return p;const{ctx:h,buffer:m,gridInner:g,gridOuter:y}=this;h.clearRect(m,m,s,l),h.fillText(e,m,m+a);const v=h.getImageData(m,m,s,l);y.fill(Dp,0,d),g.fill(0,0,d);for(let e=0;e0?e*e:0,g[n]=e<0?e*e:0}}Lp(y,0,0,c,u,c,this.f,this.v,this.z),Lp(g,m,m,s,l,c,this.f,this.v,this.z);for(let e=0;ee+t[1]-t[0],h=d.reduce(p,0),m=f.reduce(p,0),g=s-h,y=l-m;let b=0,_=h,x=0,w=m,A=0,S=g,C=0,E=y;if(i.content&&n){const e=i.content;b=jp(d,0,e[0]),x=jp(f,0,e[1]),_=jp(d,e[0],e[2]),w=jp(f,e[1],e[3]),A=e[0]-b,C=e[1]-x,S=e[2]-e[0]-_,E=e[3]-e[1]-w}const T=(n,o,s,l)=>{const d=Up(n.stretch-b,_,c,e.left),f=Vp(n.fixed-A,S,n.stretch,h),p=Up(o.stretch-x,w,u,e.top),g=Vp(o.fixed-C,E,o.stretch,m),y=Up(s.stretch-b,_,c,e.left),T=Vp(s.fixed-A,S,s.stretch,h),I=Up(l.stretch-x,w,u,e.top),k=Vp(l.fixed-C,E,l.stretch,m),M=new v(d,p),R=new v(y,p),P=new v(y,I),O=new v(d,I),D=new v(f/a,g/a),L=new v(T/a,k/a),N=t*Math.PI/180;if(N){const e=Math.sin(N),t=Math.cos(N),r=[t,-e,e,t];M._matMult(r),R._matMult(r),O._matMult(r),P._matMult(r)}const F=n.stretch+n.fixed,z=o.stretch+o.fixed;return{tl:M,tr:R,bl:O,br:P,tex:{x:i.paddedRect.x+1+F,y:i.paddedRect.y+1+z,w:s.stretch+s.fixed-F,h:l.stretch+l.fixed-z},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:L,minFontScaleX:S/a/c,minFontScaleY:E/a/u,isSDF:r}};if(n&&(i.stretchX||i.stretchY)){const e=$p(d,g,h),t=$p(f,y,m);for(let r=0;r0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:r}=this,n=t[e];for(;e>0;){const o=e-1>>1,i=t[o];if(r(n,i)>=0)break;t[e]=i,e=o}t[e]=n}_down(e){const{data:t,compare:r}=this,n=this.length>>1,o=t[e];for(;e=0)break;t[e]=i,e=n}t[e]=o}}function Wp(e,t){return et?1:0}function qp(e,t=1,r=!1){let n=1/0,o=1/0,i=-1/0,a=-1/0;const s=e[0];for(let e=0;ei)&&(i=t.x),(!e||t.y>a)&&(a=t.y)}const l=Math.min(i-n,a-o);let c=l/2;const u=new Gp([],Zp);if(0===l)return new v(n,o);for(let t=n;td.d||!d.d)&&(d=n,r&&console.log("found best %d after %d probes",Math.round(1e4*n.d)/1e4,f)),n.max-d.d<=t||(c=n.h/2,u.push(new Yp(n.p.x-c,n.p.y-c,c,e)),u.push(new Yp(n.p.x+c,n.p.y-c,c,e)),u.push(new Yp(n.p.x-c,n.p.y+c,c,e)),u.push(new Yp(n.p.x+c,n.p.y+c,c,e)),f+=4)}return r&&(console.log(`num probes: ${f}`),console.log(`best distance: ${d.d}`)),d.p}function Zp(e,t){return t.max-e.max}class Yp{constructor(e,t,r,n){this.p=new v(e,t),this.h=r,this.d=function(e,t){let r=!1,n=1/0;for(let o=0;oe.y!=s.y>e.y&&e.x<(s.x-o.x)*(e.y-o.y)/(s.y-o.y)+o.x&&(r=!r),n=Math.min(n,ou(e,o,s))}}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}}const Xp=Number.POSITIVE_INFINITY,Kp=Math.sqrt(2);function Jp(e,[t,r]){let n=0,o=0;if(r===Xp){t<0&&(t=0);const r=t/Kp;switch(e){case"top-right":case"top-left":o=r-7;break;case"bottom-right":case"bottom-left":o=7-r;break;case"bottom":o=7-t;break;case"top":o=t-7}switch(e){case"top-right":case"bottom-right":n=-r;break;case"top-left":case"bottom-left":n=r;break;case"left":n=t;break;case"right":n=-t}}else{switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":o=r-7;break;case"bottom-right":case"bottom-left":case"bottom":o=7-r}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}}return[n,o]}function Qp(e,t,r,n,o,i,a,s,l,c){e.createArrays(),e.tilePixelRatio=Ks/(512*e.overscaling),e.compareText={},e.iconsNeedLinear=!1;const u=e.layers[0].layout,d=e.layers[0]._unevaluatedLayout._values,f={};if("composite"===e.textSizeData.kind){const{minZoom:t,maxZoom:r}=e.textSizeData;f.compositeTextSizes=[d["text-size"].possiblyEvaluate(new ma(t),s),d["text-size"].possiblyEvaluate(new ma(r),s)]}if("composite"===e.iconSizeData.kind){const{minZoom:t,maxZoom:r}=e.iconSizeData;f.compositeIconSizes=[d["icon-size"].possiblyEvaluate(new ma(t),s),d["icon-size"].possiblyEvaluate(new ma(r),s)]}f.layoutTextSize=d["text-size"].possiblyEvaluate(new ma(l+1),s),f.layoutIconSize=d["icon-size"].possiblyEvaluate(new ma(l+1),s),f.textMaxSize=d["text-size"].possiblyEvaluate(new ma(18),s);const p="map"===u.get("text-rotation-alignment")&&"point"!==u.get("symbol-placement"),h=u.get("text-size");for(const i of e.features){const l=u.get("text-font").evaluate(i,{},s).join(","),d=h.evaluate(i,{},s),m=f.layoutTextSize.evaluate(i,{},s),g=(f.layoutIconSize.evaluate(i,{},s),{horizontal:{},vertical:void 0}),y=i.text;let v,b=[0,0];if(y){const n=y.toString(),a=u.get("text-letter-spacing").evaluate(i,{},s)*Cf,c=u.get("text-line-height").evaluate(i,{},s)*Cf,f=Xi(n)?a:0,h=u.get("text-anchor").evaluate(i,{},s),v=u.get("text-variable-anchor");if(!v){const e=u.get("text-radial-offset").evaluate(i,{},s);b=e?Jp(h,[e*Cf,Xp]):u.get("text-offset").evaluate(i,{},s).map(e=>e*Cf)}let _=p?"center":u.get("text-justify").evaluate(i,{},s);const x="point"===u.get("symbol-placement"),w=x?u.get("text-max-width").evaluate(i,{},s)*Cf:1/0,A=i=>{e.allowVerticalPlacement&&Yi(n)&&(g.vertical=pp(y,t,r,o,l,w,c,h,i,f,b,up.vertical,!0,m,d))};if(!p&&v){const e="auto"===_?v.map(e=>eh(e)):[_];let n=!1;for(let i=0;i=0||!Yi(n)){const e=pp(y,t,r,o,l,w,c,h,_,f,b,up.horizontal,!1,m,d);e&&(g.horizontal[_]=e)}A(x?"left":_)}}let _=!1;if(i.icon&&i.icon.name){const t=n[i.icon.name];t&&(v=Ap(o[i.icon.name],u.get("icon-offset").evaluate(i,{},s),u.get("icon-anchor").evaluate(i,{},s)),_=t.sdf,void 0===e.sdfIcons?e.sdfIcons=t.sdf:e.sdfIcons!==t.sdf&&H("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(t.pixelRatio!==e.pixelRatio||0!==u.get("icon-rotate").constantOr(1))&&(e.iconsNeedLinear=!0))}const x=ih(g.horizontal)||g.vertical;e.iconsInText||(e.iconsInText=!!x&&x.iconsInText),(x||v)&&th(e,i,g,v,n,f,m,0,b,_,a,s,c)}i&&e.generateCollisionDebugBuffers(l,e.collisionBoxArray)}function eh(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function th(e,t,r,n,o,i,a,s,l,c,u,d,f){let p=i.textMaxSize.evaluate(t,{},d);void 0===p&&(p=a);const h=e.layers[0].layout,m=h.get("icon-offset").evaluate(t,{},d),g=ih(r.horizontal)||r.vertical,y="globe"===f.name,v=a/24,b=e.tilePixelRatio*p/24,_=(k=e.overscaling,e.zoom>18&&k>2&&(k>>=1),Math.max(Ks/(512*k),1)*h.get("symbol-spacing")),w=h.get("text-padding")*e.tilePixelRatio,A=h.get("icon-padding")*e.tilePixelRatio,S=x(h.get("text-max-angle")),C="map"===h.get("text-rotation-alignment")&&"point"!==h.get("symbol-placement"),E="map"===h.get("icon-rotation-alignment")&&"point"!==h.get("symbol-placement"),T=h.get("symbol-placement"),I=_/2;var k;const M=h.get("icon-text-fit");let R;n&&"none"!==M&&(e.allowVerticalPlacement&&r.vertical&&(R=Sp(n,r.vertical,M,h.get("icon-text-fit-padding"),m,v)),g&&(n=Sp(n,g,M,h.get("icon-text-fit-padding"),m,v)));const P=(a,s,p)=>{if(s.x<0||s.x>=Ks||s.y<0||s.y>=Ks)return;let h=null;if(y){const{x:e,y:t,z:r}=f.projectTilePoint(s.x,s.y,p);h={anchor:new Cp(e,t,r,0,void 0),up:f.upVector(p,s.x,s.y)}}!function(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_,x,w,A,S){const C=e.addToLineVertexArray(t,n);let E,T,I,k,M,R,P,O=0,D=0,L=0,N=0,F=-1,z=-1;const B={};let j=xs("");const $=r?r.anchor:t;let U=0,V=0;if(void 0===l._unevaluatedLayout.getValue("text-radial-offset")?[U,V]=l.layout.get("text-offset").evaluate(_,{},S).map(e=>e*Cf):(U=l.layout.get("text-radial-offset").evaluate(_,{},S)*Cf,V=Xp),e.allowVerticalPlacement&&o.vertical){const e=o.vertical;if(h)R=sh(e),s&&(P=sh(s));else{const r=l.layout.get("text-rotate").evaluate(_,{},S)+90;I=ah(c,$,t,u,d,f,e,p,r,m),s&&(k=ah(c,$,t,u,d,f,s,y,r))}}if(i){const n=l.layout.get("icon-rotate").evaluate(_,{},S),o="none"!==l.layout.get("icon-text-fit"),a=Bp(i,n,w,o),p=s?Bp(s,n,w,o):void 0;T=ah(c,$,t,u,d,f,i,y,n),O=4*a.length;const h=e.iconSizeData;let m=null;"source"===h.kind?(m=[Ef*l.layout.get("icon-size").evaluate(_,{},S)],m[0]>nh&&H(`${e.layerIds[0]}: Value for "icon-size" is >= ${rh}. Reduce your "icon-size".`)):"composite"===h.kind&&(m=[Ef*x.compositeIconSizes[0].evaluate(_,{},S),Ef*x.compositeIconSizes[1].evaluate(_,{},S)],(m[0]>nh||m[1]>nh)&&H(`${e.layerIds[0]}: Value for "icon-size" is >= ${rh}. Reduce your "icon-size".`)),e.addSymbols(e.icon,a,m,b,v,_,!1,r,t,C.lineStartIndex,C.lineLength,-1,A,S),F=e.icon.placedSymbolArray.length-1,p&&(D=4*p.length,e.addSymbols(e.icon,p,m,b,v,_,up.vertical,r,t,C.lineStartIndex,C.lineLength,-1,A,S),z=e.icon.placedSymbolArray.length-1)}for(const n in o.horizontal){const i=o.horizontal[n];E||(j=xs(i.text),h?M=sh(i):E=ah(c,$,t,u,d,f,i,p,l.layout.get("text-rotate").evaluate(_,{},S),m));const s=1===i.positionedLines.length;if(L+=oh(e,r,t,i,a,l,h,_,m,C,o.vertical?up.horizontal:up.horizontalOnly,s?Object.keys(o.horizontal):[n],B,F,x,A,S),s)break}o.vertical&&(N+=oh(e,r,t,o.vertical,a,l,h,_,m,C,up.vertical,["vertical"],B,z,x,A,S));let G=-1;const W=(e,t)=>e?Math.max(e,t):t;G=W(M,G),G=W(R,G),G=W(P,G);const q=G>-1?1:0;e.glyphOffsetArray.length>=jh.MAX_GLYPHS&&H("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,_.sortKey),e.symbolInstances.emplaceBack($.x,$.y,$.z,t.x,t.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical>=0?B.vertical:-1,F,z,j,void 0!==E?E:e.collisionBoxArray.length,void 0!==E?E+1:e.collisionBoxArray.length,void 0!==I?I:e.collisionBoxArray.length,void 0!==I?I+1:e.collisionBoxArray.length,void 0!==T?T:e.collisionBoxArray.length,void 0!==T?T+1:e.collisionBoxArray.length,k||e.collisionBoxArray.length,k?k+1:e.collisionBoxArray.length,u,L,N,O,D,q,0,U,V,G)}(e,s,h,a,r,n,o,R,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,w,C,l,0,A,E,m,t,i,c,u,d)};if("line"===T)for(const o of Op(t.geometry,0,0,Ks,Ks)){const t=Rp(o,_,S,r.vertical||g,n,24,b,e.overscaling,Ks);for(const r of t)g&&lh(e,g.text,I,r)||P(o,r,d)}else if("line-center"===T){for(const e of t.geometry)if(e.length>1){const t=Mp(e,S,r.vertical||g,n,24,b);t&&P(e,t,d)}}else if("Polygon"===t.type)for(const e of cd(t.geometry,0)){const t=qp(e,16);P(e[0],new Cp(t.x,t.y,0,0,void 0),d)}else if("LineString"===t.type)for(const e of t.geometry)P(e,new Cp(e[0].x,e[0].y,0,0,void 0),d);else if("Point"===t.type)for(const e of t.geometry)for(const t of e)P([t],new Cp(t.x,t.y,0,0,void 0),d)}const rh=255,nh=rh*Ef;function oh(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g){const y=function(e,t,r,n,o,i,a,s){const l=[];if(0===t.positionedLines.length)return l;const c=n.layout.get("text-rotate").evaluate(i,{})*Math.PI/180,u=function(e){const t=e[0],r=e[1],n=t*r;return n>0?[t,-r]:n<0?[-t,r]:0===t?[r,t]:[r,-t]}(r);let d=Math.abs(t.top-t.bottom);for(const e of t.positionedLines)d-=e.lineOffset;const f=t.positionedLines.length,p=d/f;let h=t.top-r[1];for(let e=0;enh&&H(`${e.layerIds[0]}: Value for "text-size" is >= ${rh}. Reduce your "text-size".`)):"composite"===b.kind&&(_=[Ef*h.compositeTextSizes[0].evaluate(s,{},g),Ef*h.compositeTextSizes[1].evaluate(s,{},g)],(_[0]>nh||_[1]>nh)&&H(`${e.layerIds[0]}: Value for "text-size" is >= ${rh}. Reduce your "text-size".`)),e.addSymbols(e.text,y,_,l,a,s,u,t,r,c.lineStartIndex,c.lineLength,p,m,g);for(const t of d)f[t]=e.text.placedSymbolArray.length-1;return 4*y.length}function ih(e){for(const t in e)return e[t];return null}function ah(e,t,r,n,o,i,a,s,l,c){let u=a.top,d=a.bottom,f=a.left,p=a.right;const h=a.collisionPadding;if(h&&(f-=h[0],u-=h[1],p+=h[2],d+=h[3]),l){const e=new v(f,u),t=new v(p,u),r=new v(f,d),n=new v(p,d),o=x(l);let i=new v(0,0);c&&(i=new v(c[0],c[1])),e._rotateAround(o,i),t._rotateAround(o,i),r._rotateAround(o,i),n._rotateAround(o,i),f=Math.min(e.x,t.x,r.x,n.x),p=Math.max(e.x,t.x,r.x,n.x),u=Math.min(e.y,t.y,r.y,n.y),d=Math.max(e.y,t.y,r.y,n.y)}return e.emplaceBack(t.x,t.y,t.z,r.x,r.y,f,u,p,d,s,n,o,i),e.length-1}function sh(e){e.collisionPadding&&(e.top-=e.collisionPadding[1],e.bottom+=e.collisionPadding[3]);const t=e.bottom-e.top;return t>0?Math.max(10,t):null}function lh(e,t,r,n){const o=e.compareText;if(t in o){const e=o[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])b&&(_(e,c,n,o,s,l),_(c,r,s,l,i,a))}_(d,f,n,i,o,i),_(f,p,o,i,o,a),_(p,h,o,a,n,a),_(h,d,n,a,n,i),m-=b,g-=b,y+=b,v+=b;const x=1/Math.max(y-m,v-g);return{scale:x,x:m*x,y:g*x,x2:y*x,y2:v*x,projection:t}}const dh=nl(new Float32Array(16));class fh{constructor(e){this.spec=e,this.name=e.name,this.wrap=!1,this.requiresDraping=!1,this.supportsWorldCopies=!1,this.supportsTerrain=!1,this.supportsFog=!1,this.supportsFreeCamera=!1,this.zAxisUnit="meters",this.isReprojectedInTileSpace=!0,this.unsupportedLayers=["custom"],this.center=[0,0],this.range=[3.5,7]}project(e,t){return{x:0,y:0,z:0}}unproject(e,t){return new Ic(0,0)}projectTilePoint(e,t,r){return{x:e,y:t,z:0}}locationPoint(e,t,r=!0){return e._coordinatePoint(e.locationCoordinate(t),r)}pixelsPerMeter(e,t){return Pc(1,e)*t}pixelSpaceConversion(e,t,r){return 1}farthestPixelDistance(e){return ch(e,e.pixelsPerMeter)}pointCoordinate(e,t,r,n){const o=e.horizonLineFromTop(!1),i=new v(t,Math.max(o,r));return e.rayIntersectionCoordinate(e.pointRayIntersection(i,n))}pointCoordinate3D(e,t,r){const n=new v(t,r);if(e.elevation)return e.elevation.pointCoordinate(n);{const t=this.pointCoordinate(e,n.x,n.y,0);return[t.x,t.y,t.z]}}isPointAboveHorizon(e,t){if(e.elevation)return!this.pointCoordinate3D(e,t.x,t.y);const r=e.horizonLineFromTop();return t.y0?t<-xh+r&&(t=-xh+r):t>xh-r&&(t=xh-r);const i=o/Math.pow(wh(t),n);let a=i*Math.sin(n*e),s=o-i*Math.cos(n*e);return a=.5*(a/Math.PI+.5),s=.5*(s/Math.PI+.5),{x:a,y:this.southernCenter?s:1-s,z:0}}unproject(e,t){e=(2*e-.5)*Math.PI,this.southernCenter&&(t=1-t),t=(2*(1-t)-.5)*Math.PI;const{n:r,f:n}=this,o=n-t,i=Math.sign(o),a=Math.sign(r)*Math.sqrt(e*e+o*o);let s=Math.atan2(e,Math.abs(o))*i;o*r<0&&(s-=Math.PI*Math.sign(e)*i);const l=T(w(s/r)+this.center[0],-180,180),c=T(w(2*Math.atan(Math.pow(n/a,1/r))-xh),-Nc,Nc);return new Ic(l,this.southernCenter?-c:c)}}class Sh extends fh{constructor(e){super(e),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(e,t){return{x:Mc(e),y:Rc(t),z:0}}unproject(e,t){const r=Oc(e),n=Dc(t);return new Ic(r,n)}}const Ch=x(Nc);class Eh extends fh{project(e,t){const r=(t=x(t))*t,n=r*r;return{x:.5*((e=x(e))*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791))/Math.PI+.5),y:1-.5*(t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))/Math.PI+1),z:0}}unproject(e,t){e=(2*e-.5)*Math.PI;let r=t=(2*(1-t)-1)*Math.PI,n=25,o=0,i=r*r;do{i=r*r;const e=i*i;o=(r*(1.007226+i*(.015085+e*(.028874*i-.044475-.005916*e)))-t)/(1.007226+i*(.045255+e*(.259866*i-.311325-.005916*11*e))),r=T(r-o,-Ch,Ch)}while(Math.abs(o)>1e-6&&--n>0);i=r*r;const a=T(w(e/(.8707+i*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979))),-180,180),s=w(r);return new Ic(a,s)}}const Th=x(Nc);class Ih extends fh{project(e,t){t=x(t),e=x(e);const r=Math.cos(t),n=2/Math.PI,o=Math.acos(r*Math.cos(e/2)),i=Math.sin(o)/o,a=.5*(e*n+2*r*Math.sin(e/2)/i)||0,s=.5*(t+Math.sin(t)/i)||0;return{x:.5*(a/Math.PI+.5),y:1-.5*(s/Math.PI+1),z:0}}unproject(e,t){let r=e=(2*e-.5)*Math.PI,n=t=(2*(1-t)-1)*Math.PI,o=25;const i=1e-6;let a=0,s=0;do{const o=Math.cos(n),i=Math.sin(n),l=2*i*o,c=i*i,u=o*o,d=Math.cos(r/2),f=Math.sin(r/2),p=2*d*f,h=f*f,m=1-u*d*d,g=m?1/m:0,y=m?Math.acos(o*d)*Math.sqrt(1/m):0,v=.5*(2*y*o*f+2*r/Math.PI)-e,b=.5*(y*i+n)-t,_=.5*g*(u*h+y*o*d*c)+1/Math.PI,x=g*(p*l/4-y*i*f),w=.125*g*(l*f-y*i*u*p),A=.5*g*(c*d+y*h*o)+.5,S=x*w-A*_;a=(b*x-v*A)/S,s=(v*w-b*_)/S,r=T(r-a,-Math.PI,Math.PI),n=T(n-s,-Th,Th)}while((Math.abs(a)>i||Math.abs(s)>i)&&--o>0);return new Ic(w(r),w(n))}}class kh extends fh{constructor(e){super(e),this.center=e.center||[0,0],this.parallels=e.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(x(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(e,t){const{scale:r,cosPhi:n}=this;return{x:x(e)*n*r+.5,y:-Math.sin(x(t))/n*r+.5,z:0}}unproject(e,t){const{scale:r,cosPhi:n}=this,o=-(t-.5)/r,i=T(w((e-.5)/r)/n,-180,180),a=Math.asin(T(o*n,-1,1)),s=T(w(a),-Nc,Nc);return new Ic(i,s)}}class Mh extends Sh{constructor(e){super(e),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug"],this.range=[3,5]}projectTilePoint(e,t,r){const n=pc(e,t,r);return Tl(n,n,gc(ic(r))),{x:n[0],y:n[1],z:n[2]}}locationPoint(e,t){const r=fc(t.lat,t.lng),n=Sl([],r),o=e.elevation?e.elevation.getAtPointOrZero(e.locationCoordinate(t),e._centerAltitude):e._centerAltitude;Al(r,r,n,Pc(1,0)*Ks*o);const i=nl(new Float64Array(16));return il(i,e.pixelMatrix,e.globeMatrix),Tl(r,r,i),new v(r[0],r[1])}pixelsPerMeter(e,t){return Pc(1,0)*t}pixelSpaceConversion(e,t,r){const n=Pc(1,e)*t,o=Rr(Pc(1,45)*t,n,r);return this.pixelsPerMeter(e,t)/o}createTileMatrix(e,t,r){const n=yc(ic(r.canonical));return il(new Float64Array(16),e.globeMatrix,n)}createInversionMatrix(e,t){const{center:r}=e,n=gc(ic(t));return cl(n,n,x(r.lng)),ll(n,n,x(r.lat)),sl(n,n,[e._pixelsPerMercatorPixel,e._pixelsPerMercatorPixel,1]),Float32Array.from(n)}pointCoordinate(e,t,r,n){return rc(e,t,r,!0)||new zc(0,0)}pointCoordinate3D(e,t,r){const n=this.pointCoordinate(e,t,r,0);return[n.x,n.y,n.z]}isPointAboveHorizon(e,t){return!rc(e,t.x,t.y,!1)}farthestPixelDistance(e){const t=function(e,t){const r=e.cameraToCenterDistance,n=e._centerAltitude*t,o=e._camera,i=e._camera.forward(),a=yl([],wl([],i,-r),[0,0,n]),s=e.worldSize/(2*Math.PI),l=[0,0,-s],c=e.width/e.height,u=Math.tan(e.fovAboveCenter),d=wl([],o.up(),u),f=wl([],o.right(),u*c),p=Sl([],yl([],yl([],i,d),f)),h=[];let m;if(new Gl(a,p).closestPointOnSphere(l,s,h)){const t=yl([],h,l),r=Ml([],t,a);m=Math.cos(e.fovAboveCenter)*ml(r)}else{const e=Ml([],a,l),t=Ml([],l,a);Sl(t,t);const r=ml(e)-s;m=Math.sqrt(r*(r+2*s));const n=Math.acos(m/(s+r))-Math.acos(Cl(i,t));m*=Math.cos(n)}return 1.01*m}(e,this.pixelsPerMeter(e.center.lat,e.worldSize)),r=bc(e.zoom);if(r>0){const n=ch(e,Pc(1,e.center.lat)*e.worldSize),o=e.worldSize/(2*Math.PI),i=Math.max(e.width,e.height)/e.worldSize*Math.PI;return Rr(t,n+o*(1-Math.cos(i)),Math.pow(r,10))}return t}upVector(e,t,r){return pc(t,r,e,1)}upVectorScale(e){return{metersToTile:tc(hc(ic(e)))}}}function Rh(e){const t=e.parallels,r=!!t&&Math.abs(t[0]+t[1])<.01;switch(e.name){case"mercator":return new Sh(e);case"equirectangular":return new _h(e);case"naturalEarth":return new Eh(e);case"equalEarth":return new bh(e);case"winkelTripel":return new Ih(e);case"albers":return r?new kh(e):new ph(e);case"lambertConformalConic":return r?new kh(e):new Ah(e);case"globe":return new Mh(e)}throw new Error(`Invalid projection name: ${e.name}`)}const Ph=Od.types,Oh=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Dh(e,t,r,n,o,i,a,s,l,c,u,d,f){const p=s?Math.min(nh,Math.round(s[0])):0,h=s?Math.min(nh,Math.round(s[1])):0;e.emplaceBack(t,r,Math.round(32*n),Math.round(32*o),i,a,(p<<1)+(l?1:0),h,16*c,16*u,256*d,256*f)}function Lh(e,t,r,n,o,i,a){e.emplaceBack(t,r,n,o,i,a)}function Nh(e,t,r,n,o){e.emplaceBack(t,r,n,o),e.emplaceBack(t,r,n,o),e.emplaceBack(t,r,n,o),e.emplaceBack(t,r,n,o)}function Fh(e){for(const t of e.sections)if(ra(t.text))return!0;return!1}class zh{constructor(e){this.layoutVertexArray=new Ua,this.indexArray=new Xa,this.programConfigurations=e,this.segments=new Xs,this.dynamicLayoutVertexArray=new za,this.opacityVertexArray=new Ha,this.placedSymbolArray=new ls,this.globeExtVertexArray=new Va}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(e,t,r,n){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,vf.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,_f.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,Oh,!0),this.globeExtVertexArray.length>0&&(this.globeExtVertexBuffer=e.createVertexBuffer(this.globeExtVertexArray,bf.members,!0)),this.opacityVertexBuffer.itemSize=1),(r||n)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}}Xo(zh,"SymbolBuffers");class Bh{constructor(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new Xs,this.collisionVertexArray=new Za,this.collisionVertexArrayExt=new Ya}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,xf.members,!0),this.collisionVertexBufferExt=e.createVertexBuffer(this.collisionVertexArrayExt,wf.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}Xo(Bh,"CollisionBuffers");class jh{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=nl([]),this.placementViewportMatrix=nl([]);const t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Tf(this.zoom,t["text-size"]),this.iconSizeData=Tf(this.zoom,t["icon-size"]);const r=this.layers[0].layout,n=r.get("symbol-sort-key"),o=r.get("symbol-z-order");this.canOverlap=r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==o&&void 0!==n.constantOr(1),this.sortFeaturesByY=("viewport-y"===o||"auto"===o&&!this.sortFeaturesByKey)&&this.canOverlap,this.writingModes=r.get("text-writing-mode").map(e=>up[e]),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=e.sourceID,this.projection=e.projection}createArrays(){this.text=new zh(new js(this.layers,this.zoom,e=>/^text/.test(e))),this.icon=new zh(new js(this.layers,this.zoom,e=>/^icon/.test(e))),this.glyphOffsetArray=new ds,this.lineVertexArray=new fs,this.symbolInstances=new us}calculateGlyphDependencies(e,t,r,n,o){for(let r=0;r0)&&("constant"!==s.value.kind||s.value.value.length>0),d="constant"!==c.value.kind||!!c.value.value||Object.keys(c.parameters).length>0,f=i.get("symbol-sort-key");if(this.features=[],!u&&!d)return;const p=t.iconDependencies,h=t.glyphDependencies,m=t.availableImages,g=new ma(this.zoom);for(const{feature:t,id:l,index:c,sourceLayerIndex:y}of e){const e=o._featureFilter.needGeometry,v=qc(t,e);if(!o._featureFilter.filter(g,v,r))continue;if(e||(v.geometry=Wc(t,r,n)),a&&1!==t.type&&r.z<=5){const e=v.geometry,t=.98078528056,n=(e,n)=>Cl(pc(e.x,e.y,r,1),pc(n.x,n.y,r,1))=0;for(const r of b.sections)if(r.image)p[r.image.name]=!0;else{const n=Yi(b.toString()),o=r.fontStack||e,i=h[o]=h[o]||{};this.calculateGlyphDependencies(r.text,i,t,this.allowVerticalPlacement,n)}}}"line"===i.get("symbol-placement")&&(this.features=function(e){const t={},r={},n=[];let o=0;function i(t){n.push(e[t]),o++}function a(e,t,o){const i=r[e];return delete r[e],r[t]=i,n[i].geometry[0].pop(),n[i].geometry[0]=n[i].geometry[0].concat(o[0]),i}function s(e,r,o){const i=t[r];return delete t[r],t[e]=i,n[i].geometry[0].shift(),n[i].geometry[0]=o[0].concat(n[i].geometry[0]),i}function l(e,t,r){const n=r?t[0][t[0].length-1]:t[0][0];return`${e}:${n.x}:${n.y}`}for(let c=0;ce.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>e.sortKey-t.sortKey)}update(e,t,r,n){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,r,n),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,r,n))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}getProjection(){return this.projectionInstance||(this.projectionInstance=Rh(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){const r=this.lineVertexArray.length;if(void 0!==e.segment)for(const{x:e,y:r}of t)this.lineVertexArray.emplaceBack(e,r);return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}}addSymbols(e,t,r,n,o,i,a,s,l,c,u,d,f,p){const h=e.indexArray,m=e.layoutVertexArray,g=e.globeExtVertexArray,y=e.segments.prepareSegment(4*t.length,m,h,this.canOverlap?i.sortKey:void 0),v=this.glyphOffsetArray.length,b=y.vertexLength,_=this.allowVerticalPlacement&&a===up.vertical?Math.PI/2:0,x=i.text&&i.text.sections;for(let n=0;n=0?t.rightJustifiedTextSymbolIndex:t.centerJustifiedTextSymbolIndex>=0?t.centerJustifiedTextSymbolIndex:t.leftJustifiedTextSymbolIndex>=0?t.leftJustifiedTextSymbolIndex:t.verticalPlacedTextSymbolIndex>=0?t.verticalPlacedTextSymbolIndex:n),i=If(this.textSizeData,e,o)/Cf;return this.tilePixelRatio*i}getSymbolInstanceIconSize(e,t,r){const n=this.icon.placedSymbolArray.get(r),o=If(this.iconSizeData,e,n);return this.tilePixelRatio*o}_commitDebugCollisionVertexUpdate(e,t,r){e.emplaceBack(t,-r,-r),e.emplaceBack(t,r,-r),e.emplaceBack(t,r,r),e.emplaceBack(t,-r,r)}_updateTextDebugCollisionBoxes(e,t,r,n,o,i){for(let a=n;a0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,t){const r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;tn[e]-n[t]||o[t]-o[e]),i}addToSortKeyRanges(e,t){const r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const e of this.symbolInstanceIndexes){const t=this.symbolInstances.get(e);this.featureSortOrder.push(t.featureIndex);const{rightJustifiedTextSymbolIndex:r,centerJustifiedTextSymbolIndex:n,leftJustifiedTextSymbolIndex:o,verticalPlacedTextSymbolIndex:i,placedIconSymbolIndex:a,verticalPlacedIconSymbolIndex:s}=t;r>=0&&this.addIndicesForPlacedSymbol(this.text,r),n>=0&&n!==r&&this.addIndicesForPlacedSymbol(this.text,n),o>=0&&o!==n&&o!==r&&this.addIndicesForPlacedSymbol(this.text,o),i>=0&&this.addIndicesForPlacedSymbol(this.text,i),a>=0&&this.addIndicesForPlacedSymbol(this.icon,a),s>=0&&this.addIndicesForPlacedSymbol(this.icon,s)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Xo(jh,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),jh.MAX_GLYPHS=65535,jh.addDynamicAttributes=Nh;const $h=new Ta({"symbol-placement":new Sa(et.layout_symbol["symbol-placement"]),"symbol-spacing":new Sa(et.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Sa(et.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ca(et.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Sa(et.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Sa(et.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Sa(et.layout_symbol["icon-ignore-placement"]),"icon-optional":new Sa(et.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Sa(et.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ca(et.layout_symbol["icon-size"]),"icon-text-fit":new Sa(et.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Sa(et.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ca(et.layout_symbol["icon-image"]),"icon-rotate":new Ca(et.layout_symbol["icon-rotate"]),"icon-padding":new Sa(et.layout_symbol["icon-padding"]),"icon-keep-upright":new Sa(et.layout_symbol["icon-keep-upright"]),"icon-offset":new Ca(et.layout_symbol["icon-offset"]),"icon-anchor":new Ca(et.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Sa(et.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Sa(et.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Sa(et.layout_symbol["text-rotation-alignment"]),"text-field":new Ca(et.layout_symbol["text-field"]),"text-font":new Ca(et.layout_symbol["text-font"]),"text-size":new Ca(et.layout_symbol["text-size"]),"text-max-width":new Ca(et.layout_symbol["text-max-width"]),"text-line-height":new Ca(et.layout_symbol["text-line-height"]),"text-letter-spacing":new Ca(et.layout_symbol["text-letter-spacing"]),"text-justify":new Ca(et.layout_symbol["text-justify"]),"text-radial-offset":new Ca(et.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Sa(et.layout_symbol["text-variable-anchor"]),"text-anchor":new Ca(et.layout_symbol["text-anchor"]),"text-max-angle":new Sa(et.layout_symbol["text-max-angle"]),"text-writing-mode":new Sa(et.layout_symbol["text-writing-mode"]),"text-rotate":new Ca(et.layout_symbol["text-rotate"]),"text-padding":new Sa(et.layout_symbol["text-padding"]),"text-keep-upright":new Sa(et.layout_symbol["text-keep-upright"]),"text-transform":new Ca(et.layout_symbol["text-transform"]),"text-offset":new Ca(et.layout_symbol["text-offset"]),"text-allow-overlap":new Sa(et.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Sa(et.layout_symbol["text-ignore-placement"]),"text-optional":new Sa(et.layout_symbol["text-optional"])});var Uh={paint:new Ta({"icon-opacity":new Ca(et.paint_symbol["icon-opacity"]),"icon-color":new Ca(et.paint_symbol["icon-color"]),"icon-halo-color":new Ca(et.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ca(et.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ca(et.paint_symbol["icon-halo-blur"]),"icon-translate":new Sa(et.paint_symbol["icon-translate"]),"icon-translate-anchor":new Sa(et.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ca(et.paint_symbol["text-opacity"]),"text-color":new Ca(et.paint_symbol["text-color"],{runtimeType:ft,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new Ca(et.paint_symbol["text-halo-color"]),"text-halo-width":new Ca(et.paint_symbol["text-halo-width"]),"text-halo-blur":new Ca(et.paint_symbol["text-halo-blur"]),"text-translate":new Sa(et.paint_symbol["text-translate"]),"text-translate-anchor":new Sa(et.paint_symbol["text-translate-anchor"])}),layout:$h};class Vh{constructor(e){this.type=e.property.overrides?e.property.overrides.runtimeType:lt,this.defaultValue=e}evaluate(e){if(e.formattedSection){const t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Xo(Vh,"FormatSectionOverride",{omit:["defaultValue"]});class Hh extends qs{constructor(e){super(e,Uh)}recalculate(e,t){super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"));const r=this.layout.get("text-writing-mode");if(r){const e=[];for(const t of r)e.indexOf(t)<0&&e.push(t);this.layout._values["text-writing-mode"]=e}else this.layout._values["text-writing-mode"]="point"===this.layout.get("symbol-placement")?["horizontal"]:["horizontal","vertical"];this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,n){const o=this.layout.get(e).evaluate(t,{},r,n),i=this._unevaluatedLayout._values[e];return i.isDataDriven()||Yn(i.value)||!o?o:function(e,t){return t.replace(/{([^{}]+)}/g,(t,r)=>r in e?String(e[r]):"")}(t.properties,o)}createBucket(e){return new jh(e)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const e of Uh.paint.overridableProperties){if(!Hh.hasPaintOverride(this.layout,e))continue;const t=this.paint.get(e),r=new Vh(t),n=new Zn(r,t.property.specification);let o=null;o="constant"===t.value.kind||"source"===t.value.kind?new Kn("source",n):new Jn("composite",n,t.value.zoomStops,t.value._interpolationType),this.paint._values[e]=new wa(t.property,o,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,r){return!(!this.layout||t.isDataDriven()||r.isDataDriven())&&Hh.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){const r=e.get("text-field"),n=Uh.paint.properties[t];let o=!1;const i=e=>{for(const t of e)if(n.overrides&&n.overrides.hasOverride(t))return void(o=!0)};if("constant"===r.value.kind&&r.value.value instanceof Dt)i(r.value.value.sections);else if("source"===r.value.kind){const e=t=>{o||(t instanceof $t&&zt(t.value)===gt?i(t.value.sections):t instanceof Wt?i(t.sections):t.eachChild(e))},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return o}getProgramConfiguration(e){return new Bs(this,e)}}var Gh={paint:new Ta({"background-color":new Sa(et.paint_background["background-color"]),"background-pattern":new Sa(et.paint_background["background-pattern"]),"background-opacity":new Sa(et.paint_background["background-opacity"])})},Wh={paint:new Ta({"raster-opacity":new Sa(et.paint_raster["raster-opacity"]),"raster-hue-rotate":new Sa(et.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Sa(et.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Sa(et.paint_raster["raster-brightness-max"]),"raster-saturation":new Sa(et.paint_raster["raster-saturation"]),"raster-contrast":new Sa(et.paint_raster["raster-contrast"]),"raster-resampling":new Sa(et.paint_raster["raster-resampling"]),"raster-fade-duration":new Sa(et.paint_raster["raster-fade-duration"])})};class qh extends qs{constructor(e){super(e,{}),this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}isLayerDraped(){return void 0!==this.implementation.renderToTile}shouldRedrape(){return!!this.implementation.shouldRerenderTiles&&this.implementation.shouldRerenderTiles()}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){}onAdd(e){this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)}onRemove(e){this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)}}var Zh={paint:new Ta({"sky-type":new Sa(et.paint_sky["sky-type"]),"sky-atmosphere-sun":new Sa(et.paint_sky["sky-atmosphere-sun"]),"sky-atmosphere-sun-intensity":new Sa(et.paint_sky["sky-atmosphere-sun-intensity"]),"sky-gradient-center":new Sa(et.paint_sky["sky-gradient-center"]),"sky-gradient-radius":new Sa(et.paint_sky["sky-gradient-radius"]),"sky-gradient":new Ea(et.paint_sky["sky-gradient"]),"sky-atmosphere-halo-color":new Sa(et.paint_sky["sky-atmosphere-halo-color"]),"sky-atmosphere-color":new Sa(et.paint_sky["sky-atmosphere-color"]),"sky-opacity":new Sa(et.paint_sky["sky-opacity"])})};function Yh(e,t,r){const n=[0,0,1],o=Fl([]);return Bl(o,o,r?-x(e)+Math.PI:x(e)),zl(o,o,-x(t)),Il(n,n,o),Sl(n,n)}const Xh={circle:class extends qs{constructor(e){super(e,hu)}createBucket(e){return new Xc(e)}queryRadius(e){const t=e;return cu("circle-radius",this,t)+cu("circle-stroke-width",this,t)+uu(this.paint.get("circle-translate"))}queryIntersectsFeature(e,t,r,n,o,i,a,s){const l=fu(this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i.angle,e.pixelToTileUnitsFactor),c=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r);return mu(e,n,i,a,s,"map"===this.paint.get("circle-pitch-alignment"),"map"===this.paint.get("circle-pitch-scale"),l,c)}getProgramIds(){return["circle"]}getProgramConfiguration(e){return new Bs(this,e)}},heatmap:class extends qs{createBucket(e){return new _u(e)}constructor(e){super(e,Eu),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){"heatmap-color"===e&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Tu({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(e){return cu("heatmap-radius",this,e)}queryIntersectsFeature(e,t,r,n,o,i,a,s){const l=this.paint.get("heatmap-radius").evaluate(t,r);return mu(e,n,i,a,s,!0,!0,new v(0,0),l)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}getProgramIds(){return["heatmap","heatmapTexture"]}getProgramConfiguration(e){return new Bs(this,e)}},hillshade:class extends qs{constructor(e){super(e,Iu)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}getProgramIds(){return["hillshade","hillshadePrepare"]}},fill:class extends qs{constructor(e){super(e,md)}getProgramIds(){const e=this.paint.get("fill-pattern"),t=e&&e.constantOr(1),r=[t?"fillPattern":"fill"];return this.paint.get("fill-antialias")&&r.push(t&&!this.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline"),r}getProgramConfiguration(e){return new Bs(this,e)}recalculate(e,t){super.recalculate(e,t);const r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new pd(e)}queryRadius(){return uu(this.paint.get("fill-translate"))}queryIntersectsFeature(e,t,r,n,o,i){return!e.queryGeometry.isAboveHorizon&&Qc(du(e.tilespaceGeometry,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),i.angle,e.pixelToTileUnitsFactor),n)}isTileClipped(){return!0}},"fill-extrusion":class extends qs{constructor(e){super(e,Xd)}createBucket(e){return new jd(e)}queryRadius(){return uu(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}getProgramIds(){return[this.paint.get("fill-extrusion-pattern").constantOr(1)?"fillExtrusionPattern":"fillExtrusion"]}getProgramConfiguration(e){return new Bs(this,e)}queryIntersectsFeature(e,t,r,n,o,i,a,s,l){const c=fu(this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),i.angle,e.pixelToTileUnitsFactor),u=this.paint.get("fill-extrusion-height").evaluate(t,r),d=this.paint.get("fill-extrusion-base").evaluate(t,r),f=[0,0],p=s&&i.elevation,h=i.elevation?i.elevation.exaggeration():1,m=e.tile.getBucket(this);if(p&&m instanceof jd){const e=m.centroidVertexArray,t=l+1;te.polygon).flat());const g=p?s:null,[y,b]=function(e,t,r,n,o,i,a,s,l,c,u){return"globe"===e.projection.name?function(e,t,r,n,o,i,a,s,l,c,u){const d=[],f=[],p=e.projection.upVectorScale(u,e.center.lat,e.worldSize).metersToTile,h=[0,0,0,1],m=[0,0,0,1],g=(e,t,r,n)=>{e[0]=t,e[1]=r,e[2]=n,e[3]=1},y=qd();r>0&&(r+=y),n+=y;for(const y of t){const t=[],v=[];for(const d of y){const f=d.x+o.x,y=d.y+o.y,b=e.projection.projectTilePoint(f,y,u),_=e.projection.upVector(u,d.x,d.y);let x=r,w=n;if(a){const e=af(f,y,r,n,a,s,l,c);x+=e.base,w+=e.top}0!==r?g(h,b.x+_[0]*p*x,b.y+_[1]*p*x,b.z+_[2]*p*x):g(h,b.x,b.y,b.z),g(m,b.x+_[0]*p*w,b.y+_[1]*p*w,b.z+_[2]*p*w),Tl(h,h,i),Tl(m,m,i),t.push(new rf(h[0],h[1],h[2])),v.push(new rf(m[0],m[1],m[2]))}d.push(t),f.push(v)}return[d,f]}(e,t,r,n,o,i,a,s,l,c,u):a?function(e,t,r,n,o,i,a,s,l){const c=[],u=[],d=[0,0,0,1];for(const f of e){const e=[],p=[];for(const c of f){const u=c.x+n.x,f=c.y+n.y,h=af(u,f,t,r,i,a,s,l);d[0]=u,d[1]=f,d[2]=h.base,d[3]=1,Ll(d,d,o),d[3]=Math.max(d[3],1e-5);const m=new rf(d[0]/d[3],d[1]/d[3],d[2]/d[3]);d[0]=u,d[1]=f,d[2]=h.top,d[3]=1,Ll(d,d,o),d[3]=Math.max(d[3],1e-5);const g=new rf(d[0]/d[3],d[1]/d[3],d[2]/d[3]);e.push(m),p.push(g)}c.push(e),u.push(p)}return[c,u]}(t,r,n,o,i,a,s,l,c):function(e,t,r,n,o){const i=[],a=[],s=o[8]*t,l=o[9]*t,c=o[10]*t,u=o[11]*t,d=o[8]*r,f=o[9]*r,p=o[10]*r,h=o[11]*r;for(const t of e){const e=[],r=[];for(const i of t){const t=i.x+n.x,a=i.y+n.y,m=o[0]*t+o[4]*a+o[12],g=o[1]*t+o[5]*a+o[13],y=o[2]*t+o[6]*a+o[14],v=o[3]*t+o[7]*a+o[15],b=m+s,_=g+l,x=y+c,w=Math.max(v+u,1e-5),A=m+d,S=g+f,C=y+p,E=Math.max(v+h,1e-5);e.push(new rf(b/w,_/w,x/w)),r.push(new rf(A/E,S/E,C/E))}i.push(e),a.push(r)}return[i,a]}(t,r,n,o,i)}(i,n,d,u,c,a,g,f,h,i.center.lat,e.tileID.canonical),_=e.queryGeometry;return function(e,t,r){let n=1/0;Qc(r,t)&&(n=of(r,t[0]));for(let o=0;o=3)for(let t=0;t{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){this._channel=void 0,this._callback=()=>{}}}class Qh{constructor(){this.tasks={},this.taskQueue=[],z(["process"],this),this.invoker=new Jh(this.process),this.nextId=0}add(e,t){const r=this.nextId++,n=function({type:e,isSymbolTile:t,zoom:r}){return r=r||0,"message"===e?0:"maybePrepare"!==e||t?"parseTile"!==e||t?"parseTile"===e&&t?300-r:"maybePrepare"===e&&t?400-r:500:200-r:100-r}(t);if(0===n){q();try{e()}finally{}return{cancel:()=>{}}}return this.tasks[r]={fn:e,metadata:t,priority:n,id:r},this.taskQueue.push(r),this.invoker.trigger(),{cancel:()=>{delete this.tasks[r]}}}process(){q();try{if(this.taskQueue=this.taskQueue.filter(e=>!!this.tasks[e]),!this.taskQueue.length)return;const e=this.pick();if(null===e)return;const t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),!t)return;t.fn()}finally{}}pick(){let e=null,t=1/0;for(let r=0;r>=1)>1;){const e=r+o>>1,l=n+i>>1;1&t?(o=r,i=n,r=a,n=s):(r=o,n=i,o=a,i=s),a=e,s=l}const l=4*e;im[l+0]=r,im[l+1]=n,im[l+2]=o,im[l+3]=i}const am=new Uint16Array(2178),sm=new Uint8Array(1089),lm=new Uint16Array(1089);function cm(e){return 0===e?-.03125:32===e?.03125:0}var um=Pa([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);const dm={type:2,extent:Ks,loadGeometry:()=>[[new v(0,0),new v(8193,0),new v(8193,8193),new v(0,8193),new v(0,0)]]};class fm{constructor(e,t,r,n,o){this.tileID=e,this.uid=D(),this.uses=0,this.tileSize=t,this.tileZoom=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=o,this.expiredRequestCount=0,this.state="loading",n&&n.transform&&(this.projection=n.transform.projection)}registerFadeDuration(e){const t=e+this.timeAdded;tt.getLayer(e)).filter(Boolean);if(0!==e.length){n.layers=e,n.stateDependentLayerIds&&(n.stateDependentLayers=n.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0]));for(const t of e)r[t.id]=n}}return r}(e.buckets,t.style),this.hasSymbolBuckets=!1;for(const e in this.buckets){const t=this.buckets[e];if(t instanceof jh){if(this.hasSymbolBuckets=!0,!r)break;t.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const e in this.buckets){const t=this.buckets[e];if(t instanceof jh&&t.hasRTLText){this.hasRTLText=!0,ha.isLoading()||ha.isLoaded()||"deferred"!==fa()||pa();break}}this.queryPadding=0;for(const e in this.buckets){const r=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(e).queryRadius(r))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),e.lineAtlas&&(this.lineAtlas=e.lineAtlas)}else this.collisionBoxArray=new as}unloadVectorData(){if(this.hasData()){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlas&&(this.imageAtlas=null),this.lineAtlas&&(this.lineAtlas=null),this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.lineAtlasTexture&&this.lineAtlasTexture.destroy(),this._tileBoundsBuffer&&(this._tileBoundsBuffer.destroy(),this._tileBoundsIndexBuffer.destroy(),this._tileBoundsSegments.destroy(),this._tileBoundsBuffer=null),this._tileDebugBuffer&&(this._tileDebugBuffer.destroy(),this._tileDebugSegments.destroy(),this._tileDebugBuffer=null),this._tileDebugIndexBuffer&&(this._tileDebugIndexBuffer.destroy(),this._tileDebugIndexBuffer=null),this._globeTileDebugBorderBuffer&&(this._globeTileDebugBorderBuffer.destroy(),this._globeTileDebugBorderBuffer=null),this._tileDebugTextBuffer&&(this._tileDebugTextBuffer.destroy(),this._tileDebugTextSegments.destroy(),this._tileDebugTextIndexBuffer.destroy(),this._tileDebugTextBuffer=null),this._globeTileDebugTextBuffer&&(this._globeTileDebugTextBuffer.destroy(),this._globeTileDebugTextBuffer=null),this.latestFeatureIndex=null,this.state="unloaded"}}getBucket(e){return this.buckets[e.id]}upload(e){for(const t in this.buckets){const r=this.buckets[t];r.uploadPending()&&r.upload(e)}const t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Kh(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Kh(e,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null),this.lineAtlas&&!this.lineAtlas.uploaded&&(this.lineAtlasTexture=new Kh(e,this.lineAtlas.image,t.ALPHA),this.lineAtlas.uploaded=!0)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,n,o,i,a,s){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({tileResult:n,pixelPosMatrix:a,transform:i,params:o,tileTransform:this.tileTransform},e,t,r):{}}querySourceFeatures(e,t){const r=this.latestFeatureIndex;if(!r||!r.rawTileData)return;const n=r.loadVTLayers(),o=t?t.sourceLayer:"",i=n._geojsonTileLayer||n[o];if(!i)return;const a=fo(t&&t.filter),{z:s,x:l,y:c}=this.tileID.canonical,u={z:s,x:l,y:c};for(let t=0;te)r=!1;else if(t)if(this.expirationTime=0;e--){const t=4*e,r=im[t+0],n=im[t+1],o=im[t+2],i=im[t+3],a=r+o>>1,s=n+i>>1,l=a+s-n,c=s+r-a,u=n*om+r,d=i*om+o,f=s*om+a,p=Math.hypot((am[2*u+0]+am[2*d+0])/2-am[2*f+0],(am[2*u+1]+am[2*d+1])/2-am[2*f+1])>=16;sm[f]=sm[f]||(p?1:0),e<1022&&(sm[f]=sm[f]||sm[(n+c>>1)*om+(r+l>>1)]||sm[(i+c>>1)*om+(o+l>>1)])}const o=new Na,i=new Xa;let a=0;function s(e,t){const r=t*om+e;return 0===lm[r]&&(o.emplaceBack(am[2*r+0],am[2*r+1],e*Ks/nm,t*Ks/nm),lm[r]=++a),lm[r]-1}function l(e,t,r,n,o,a){const c=e+r>>1,u=t+n>>1;if(Math.abs(e-o)+Math.abs(t-a)>1&&sm[u*om+c])l(o,a,e,t,c,u),l(r,n,o,a,c,u);else{const l=s(e,t),c=s(r,n),u=s(o,a);i.emplaceBack(l,c,u)}}return l(0,0,nm,nm,nm,0),l(nm,nm,0,0,0,nm),{vertices:o,indices:i}}(this.tileID.canonical,t);n=e.vertices,o=e.indices}else{n=new Na,o=new Xa;for(const{x:e,y:t}of r)n.emplaceBack(e,t,0,0);const e=od(n.int16,void 0,4);for(let t=0;t0&&(a=ol(new Float64Array(16),t.globeMatrix)),this._makeGlobeTileDebugBorderBuffer(e,n,t,o,a,i),this._makeGlobeTileDebugTextBuffer(e,n,t,o,a,i)}_globePoint(e,t,r,n,o,i,a){let s=pc(e,t,r);if(i){const o=1<.5?d=-1:u<-.5&&(d=1);let f=(e/Ks+r.x)/o+d,p=(t/Ks+r.y)/o;f=(f-l)*n._pixelsPerMercatorPixel+l,p=(p-c)*n._pixelsPerMercatorPixel+c;const h=[f*n.worldSize,p*n.worldSize,0];Tl(h,h,i),s=ac(s,h,a)}return Tl(s,s,o)}_makeGlobeTileDebugBorderBuffer(e,t,r,n,o,i){const a=new Da,s=new ns,l=new La,c=(e,c,u,d,f)=>{const p=(u-e)/(f-1),h=(d-c)/(f-1),m=a.length;for(let u=0;uc*e+t;for(let e=0;et[a])return null}else{const s=1/n[a];let l=(e[a]-r[a])*s,c=(t[a]-r[a])*s;if(l>c){const e=l;l=c,c=e}if(l>o&&(o=l),ci)return null}return o}function gm(e,t,r,n,o,i,a,s,l,c,u){const d=n-e,f=o-t,p=i-r,h=a-e,m=s-t,g=l-r,y=u[1]*g-u[2]*m,v=u[2]*h-u[0]*g,b=u[0]*m-u[1]*h,_=d*y+f*v+p*b;if(Math.abs(_)<1e-15)return null;const x=1/_,w=c[0]-e,A=c[1]-t,S=c[2]-r,C=(w*y+A*v+S*b)*x;if(C<0||C>1)return null;const E=A*p-S*f,T=S*d-w*p,I=w*f-A*d,k=(u[0]*E+u[1]*T+u[2]*I)*x;return k<0||C+k>1?null:(h*E+m*T+g*I)*x}function ym(e,t,r){return(e-t)/(r-t)}function vm(e,t,r,n,o,i,a,s,l){const c=1<{const i=n?1:0,a=(e+1)*r-i,s=t*r,l=(t+1)*r-i;o[0]=e*r,o[1]=s,o[2]=a,o[3]=l};let a=new hm(n);const s=[];for(let t=0;t=1;n/=2){const e=r[r.length-1];a=new hm(n);for(let t=0;t0;){const{idx:s,t:p,nodex:h,nodey:m,depth:g}=f.pop();if(this.leaves[s]){vm(h,m,g,e,t,r,n,u,d);const s=1<=e[2])return p}continue}let y=0;for(let f=0;f=l[c[r]]&&(c.splice(r,0,f),t=!0);t||(c[y]=f),y++}}for(let e=0;e=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)}static pack(e,t){const r=[0,0,0,0],n=Cm.getUnpackVector(t);let o=Math.floor((e+n[3])/n[2]);return r[2]=o%256,o=Math.floor(o/256),r[1]=o%256,o=Math.floor(o/256),r[0]=o,r}getPixels(){return new Cu({width:this.stride,height:this.stride},this.pixels)}backfillBorder(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let n=t*this.dim,o=t*this.dim+this.dim,i=r*this.dim,a=r*this.dim+this.dim;switch(t){case-1:n=o-1;break;case 1:o=n+1}switch(r){case-1:i=a-1;break;case 1:a=i+1}const s=-t*this.dim,l=-r*this.dim;for(let t=i;t{this.remove(e,o)},r)),this.data[n].push(o),this.order.push(n),this.order.length>this.max){const e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){const t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){const t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;const r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),o=this.data[r][n];return this.data[r].splice(n,1),o.timeout&&clearTimeout(o.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(o.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){const t=[];for(const r in this.data)for(const n of this.data[r])e(n.value)||t.push(n);for(const e of t)this.remove(e.value.tileID,e)}}class Tm{constructor(e,t,r){this.func=e,this.mask=t,this.range=r}}Tm.ReadOnly=!1,Tm.ReadWrite=!0,Tm.disabled=new Tm(519,Tm.ReadOnly,[0,1]);const Im=7680;class km{constructor(e,t,r,n,o,i){this.test=e,this.ref=t,this.mask=r,this.fail=n,this.depthFail=o,this.pass=i}}km.disabled=new km({func:519,mask:0},0,0,Im,Im,Im);class Mm{constructor(e,t,r){this.blendFunction=e,this.blendColor=t,this.mask=r}}Mm.Replace=[1,0],Mm.disabled=new Mm(Mm.Replace,Rt.transparent,[!1,!1,!1,!1]),Mm.unblended=new Mm(Mm.Replace,Rt.transparent,[!0,!0,!0,!0]),Mm.alphaBlended=new Mm([1,771],Rt.transparent,[!0,!0,!0,!0]);const Rm=1029,Pm=2305;class Om{constructor(e,t,r){this.enable=e,this.mode=t,this.frontFace=r}}Om.disabled=new Om(!1,Rm,Pm),Om.backCCW=new Om(!0,Rm,Pm),Om.backCW=new Om(!0,Rm,2304),Om.frontCW=new Om(!0,1028,2304),Om.frontCCW=new Om(!0,1028,Pm);class Dm extends Qe{constructor(e,t,r){super(),this.id=e,this._onlySymbols=r,t.on("data",e=>{"source"===e.dataType&&"metadata"===e.sourceDataType&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===e.dataType&&"content"===e.sourceDataType&&(this.reload(),this.transform&&this.update(this.transform))}),t.on("error",()=>{this._sourceErrored=!0}),this._source=t,this._tiles={},this._cache=new Em(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._minTileCacheSize=t.minTileCacheSize,this._maxTileCacheSize=t.maxTileCacheSize,this._loadedParentTiles={},this._coveredTiles={},this._state=new pm,this._isRaster="raster"===this._source.type||"raster-dem"===this._source.type||"custom"===this._source.type&&"raster"===this._source._dataType}onAdd(e){this.map=e,this._minTileCacheSize=void 0===this._minTileCacheSize&&e?e._minTileCacheSize:this._minTileCacheSize,this._maxTileCacheSize=void 0===this._maxTileCacheSize&&e?e._maxTileCacheSize:this._maxTileCacheSize}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(const e in this._tiles){const t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform)}_loadTile(e,t){return e.isSymbolTile=this._onlySymbols,this._source.loadTile(e,t)}_unloadTile(e){if(this._source.unloadTile)return this._source.unloadTile(e,()=>{})}_abortTile(e){if(this._source.abortTile)return this._source.abortTile(e,()=>{})}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const t in this._tiles){const r=this._tiles[t];r.upload(e),r.prepare(this.map.style.imageManager)}}getIds(){return R(this._tiles).map(e=>e.tileID).sort(Lm).map(e=>e.key)}getRenderableIds(e){const t=[];for(const r in this._tiles)this._isIdRenderable(+r,e)&&t.push(this._tiles[r]);return e?t.sort((e,t)=>{const r=e.tileID,n=t.tileID,o=new v(r.canonical.x,r.canonical.y)._rotate(this.transform.angle),i=new v(n.canonical.x,n.canonical.y)._rotate(this.transform.angle);return r.overscaledZ-n.overscaledZ||i.y-o.y||i.x-o.x}).map(e=>e.tileID.key):t.map(e=>e.tileID).sort(Lm).map(e=>e.key)}hasRenderableParent(e){const t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)}_isIdRenderable(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const e in this._tiles)"errored"!==this._tiles[e].state&&this._reloadTile(+e,"reloading")}}_reloadTile(e,t){const r=this._tiles[e];r&&("loading"!==r.state&&(r.state=t),this._loadTile(r,this._tileLoaded.bind(this,r,e,t)))}_tileLoaded(e,t,r,n){if(n)if(e.state="errored",404!==n.status)this._source.fire(new Je(n,{tile:e}));else if("raster-dem"===this._source.type&&this.usedForTerrain&&this.map.painter.terrain){const e=this.map.painter.terrain;this.update(this.transform,e.getScaledDemTileSize(),!0),e.resetTileLookupCache(this.id)}else this.update(this.transform);else e.timeAdded=Ze.now(),"expired"===r&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(t,e),"raster-dem"===this._source.type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new Ke("data",{dataType:"source",tile:e,coord:e.tileID,sourceCacheId:this.id}))}_backfillDEM(e){const t=this.getRenderableIds();for(let n=0;n1||(Math.abs(r)>1&&(1===Math.abs(r+o)?r+=o:1===Math.abs(r-o)&&(r-=o)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[i]&&(e.neighboringTiles[i].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,t,r,n){for(const o in this._tiles){let i=this._tiles[o];if(n[o]||!i.hasData()||i.tileID.overscaledZ<=t||i.tileID.overscaledZ>r)continue;let a=i.tileID;for(;i&&i.tileID.overscaledZ>t+1;){const e=i.tileID.scaledTo(i.tileID.overscaledZ-1);i=this._tiles[e.key],i&&i.hasData()&&(a=e)}let s=a;for(;s.overscaledZ>t;)if(s=s.scaledTo(s.overscaledZ-1),e[s.key]){n[a.key]=a;break}}}findLoadedParent(e,t){if(e.key in this._loadedParentTiles){const r=this._loadedParentTiles[e.key];return r&&r.tileID.overscaledZ>=t?r:null}for(let r=e.overscaledZ-1;r>=t;r--){const t=e.scaledTo(r),n=this._getLoadedTile(t);if(n)return n}}_getLoadedTile(e){const t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(this._source.reparseOverscaled?e.wrapped().key:e.canonical.key)}updateCacheSize(e,t){t=t||this._source.tileSize;const r=Math.ceil(e.width/t)+1,n=Math.ceil(e.height/t)+1,o=Math.floor(r*n*5),i="number"==typeof this._minTileCacheSize?Math.max(this._minTileCacheSize,o):o,a="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(a)}handleWrapJump(e){const t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);if(this._prevLng=e,t){const e={};for(const r in this._tiles){const n=this._tiles[r];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+t),e[n.tileID.key]=n}this._tiles=e;for(const e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(const e in this._tiles)this._setTileReloadTimer(+e,this._tiles[e])}}update(e,t,r){if(this.transform=e,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage)return;if(this.usedForTerrain&&!r)return;let n;this.updateCacheSize(e,t),"globe"!==this.transform.projection.name&&this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?n=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(e=>new ef(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)):(n=e.coveringTiles({tileSize:t||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!r,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain}),this._source.hasTile&&(n=n.filter(e=>this._source.hasTile(e)))):n=[];const o=this._updateRetainedTiles(n);if(Nm(this._source.type)&&0!==n.length){const e={},t={},r=Object.keys(o);for(const n of r){const r=o[n],i=this._tiles[n];if(!i||i.fadeEndTime&&i.fadeEndTime<=Ze.now())continue;const a=this.findLoadedParent(r,Math.max(r.overscaledZ-Dm.maxOverzooming,this._source.minzoom));a&&(this._addTile(a.tileID),e[a.tileID.key]=a.tileID),t[n]=r}const i=n[n.length-1].overscaledZ;for(const e in this._tiles){const r=this._tiles[e];if(o[e]||!r.hasData())continue;let n=r.tileID;for(;n.overscaledZ>i;){n=n.scaledTo(n.overscaledZ-1);const i=this._tiles[n.key];if(i&&i.hasData()&&t[n.key]){o[e]=r.tileID;break}}}for(const t in e)o[t]||(this._coveredTiles[t]=!0,o[t]=e[t])}for(const e in o)this._tiles[e].clearFadeHold();const i=function(e,t){const r=[];for(const n in e)n in t||r.push(n);return r}(this._tiles,o);for(const e of i){const t=this._tiles[e];t.hasSymbolBuckets&&!t.holdingForFade()?t.setHoldDuration(this.map._fadeDuration):t.hasSymbolBuckets&&!t.symbolFadeFinished()||this._removeTile(+e)}this._updateLoadedParentTileCache(),this._onlySymbols&&this._source.afterUpdate&&this._source.afterUpdate()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(+e)}_updateRetainedTiles(e){const t={};if(0===e.length)return t;const r={},n=e.reduce((e,t)=>Math.min(e,t.overscaledZ),1/0),o=e[0].overscaledZ,i=Math.max(o-Dm.maxOverzooming,this._source.minzoom),a=Math.max(o+Dm.maxUnderzooming,this._source.minzoom),s={};for(const r of e){const e=this._addTile(r);t[r.key]=r,e.hasData()||n=this._source.maxzoom){const e=n.children(this._source.maxzoom)[0],r=this.getTile(e);if(r&&r.hasData()){t[e.key]=e;continue}}else{const e=n.children(this._source.maxzoom);if(t[e[0].key]&&t[e[1].key]&&t[e[2].key]&&t[e[3].key])continue}let o=e.wasRequested();for(let a=n.overscaledZ-1;a>=i;--a){const i=n.scaledTo(a);if(r[i.key])break;if(r[i.key]=!0,e=this.getTile(i),!e&&o&&(e=this._addTile(i)),e&&(t[i.key]=i,o=e.wasRequested(),e.hasData()))break}}return t}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const t=[];let r,n=this._tiles[e].tileID;for(;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}t.push(n.key);const e=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(e),r)break;n=e}for(const e of t)this._loadedParentTiles[e]=r}}_addTile(e){let t=this._tiles[e.key];if(t)return t;t=this._cache.getAndRemove(e),t&&(this._setTileReloadTimer(e.key,t),t.tileID=e,this._state.initializeTileState(t,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,t)));const r=Boolean(t);if(!r){const r=this.map?this.map.painter:null;t=new fm(e,this._source.tileSize*e.overscaleFactor(),this.transform.tileZoom,r,this._isRaster),this._loadTile(t,this._tileLoaded.bind(this,t,e.key,t.state))}return t?(t.uses++,this._tiles[e.key]=t,r||this._source.fire(new Ke("dataloading",{tile:t,coord:t.tileID,dataType:"source"})),t):null}_setTileReloadTimer(e,t){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},r))}_removeTile(e){const t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(+e);this._source._clear&&this._source._clear(),this._cache.reset(),this.map&&this.usedForTerrain&&this.map.painter.terrain&&this.map.painter.terrain.resetTileLookupCache(this.id)}tilesIn(e,t,r){const n=[],o=this.transform;if(!o)return n;const i="globe"===o.projection.name,a=Mc(o.center.lng);for(const s in this._tiles){const l=this._tiles[s];if(r&&l.clearQueryDebugViz(),l.holdingForFade())continue;let c;if(i){const e=l.tileID.canonical;if(0===e.z){const t=[Math.abs(T(a,...Fm(e,-1))-a),Math.abs(T(a,...Fm(e,1))-a)];c=[0,2*t.indexOf(Math.min(...t))-1]}else{const t=[Math.abs(T(a,...Fm(e,-1))-a),Math.abs(T(a,...Fm(e,0))-a),Math.abs(T(a,...Fm(e,1))-a)];c=[t.indexOf(Math.min(...t))-1]}}else c=[0];for(const r of c){const i=e.containsTile(l,o,t,r);i&&n.push(i)}}return n}getVisibleCoordinates(e){const t=this.getRenderableIds(e).map(e=>this._tiles[e].tileID);for(const e of t)e.projMatrix=this.transform.calculateProjMatrix(e.toUnwrapped());return t}hasTransition(){if(this._source.hasTransition())return!0;if(Nm(this._source.type))for(const e in this._tiles){const t=this._tiles[e];if(void 0!==t.fadeEndTime&&t.fadeEndTime>=Ze.now())return!0}return!1}setFeatureState(e,t,r){this._state.updateState(e=e||"_geojsonTileLayer",t,r)}removeFeatureState(e,t,r){this._state.removeFeatureState(e=e||"_geojsonTileLayer",t,r)}getFeatureState(e,t){return this._state.getState(e=e||"_geojsonTileLayer",t)}setDependencies(e,t,r){const n=this._tiles[e];n&&n.setDependencies(t,r)}reloadTilesForDependencies(e,t){for(const r in this._tiles)this._tiles[r].hasDependency(e,t)&&this._reloadTile(+r,"reloading");this._cache.filter(r=>!r.hasDependency(e,t))}_preloadTiles(e,t){if(!this._sourceLoaded){const r=()=>{this._sourceLoaded&&(this._source.off("data",r),this._preloadTiles(e,t))};return void this._source.on("data",r)}const r=new Map,n=Array.isArray(e)?e:[e],o=this.map.painter.terrain,i=this.usedForTerrain&&o?o.getScaledDemTileSize():this._source.tileSize;for(const e of n){const t=e.coveringTiles({tileSize:i,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!this.usedForTerrain,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain});for(const e of t)r.set(e.key,e);this.usedForTerrain&&e.updateElevation(!1)}M(Array.from(r.values()),(e,t)=>{const r=new fm(e,this._source.tileSize*e.overscaleFactor(),this.transform.tileZoom,this.map.painter,this._isRaster);this._loadTile(r,e=>{"raster-dem"===this._source.type&&r.dem&&this._backfillDEM(r),t(e,r)})},t)}}function Lm(e,t){const r=Math.abs(2*e.wrap)-+(e.wrap<0),n=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function Nm(e){return"raster"===e||"image"===e||"video"===e||"custom"===e}function Fm(e,t){const r=1<=0&&n[3]>=0&&s.insert(a,n[0],n[1],n[2],n[3])}}loadVTLayers(){if(!this.vtLayers){this.vtLayers=new Pd(new np(this.rawTileData)).layers,this.sourceLayerCoder=new em(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]),this.vtFeatures={};for(const e in this.vtLayers)this.vtFeatures[e]=[]}return this.vtLayers}query(e,t,r,n){this.loadVTLayers();const o=e.params||{},i=fo(o.filter),a=e.tileResult,s=e.transform,l=a.bufferedTilespaceBounds,c=this.grid.query(l.min.x,l.min.y,l.max.x,l.max.y,(e,t,r,n)=>su(a.bufferedTilespaceGeometry,e,t,r,n));c.sort($m);let u=null;s.elevation&&c.length>0&&(u=zm.create(s.elevation,this.tileID));const d={};let f;for(let s=0;s(h||(h=Wc(t,this.tileID.canonical,e.tileTransform)),r.queryIntersectsFeature(a,t,n,h,this.z,e.transform,e.pixelPosMatrix,u,o)))}return d}loadMatchingFeature(e,t,r,n,o,i,a,s,l){const{featureIndex:c,bucketIndex:u,sourceLayerIndex:d,layoutVertexArrayOffset:f}=t,p=this.bucketLayerIDs[u];if(n&&!function(e,t){for(let r=0;r=0)return!0;return!1}(n,p))return;const h=this.sourceLayerCoder.decode(d),m=this.vtLayers[h].feature(c);if(r.needGeometry){const e=qc(m,!0);if(!r.filter(new ma(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!r.filter(new ma(this.tileID.overscaledZ),m))return;const g=this.getId(m,h);for(let t=0;t{const a=t instanceof Aa?t.get(i):null;return a&&a.evaluate?a.evaluate(r,n,o):a})}function $m(e,t){return t-e}Xo(Bm,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});class Um{constructor(e,t){this.width=e,this.height=t,this.nextRow=0,this.image=new Su({width:e,height:t}),this.positions={},this.uploaded=!1}getDash(e,t){const r=this.getKey(e,t);return this.positions[r]}trim(){const e=this.width,t=this.height=N(this.nextRow);this.image.resize({width:e,height:t})}getKey(e,t){return e.join(",")+t}getDashRanges(e,t,r){const n=[];let o=e.length%2==1?-e[e.length-1]*r:0,i=e[0]*r,a=!0;n.push({left:o,right:i,isDash:a,zeroLength:0===e[0]});let s=e[0];for(let t=1;t1&&(a=e[++i]);const l=Math.abs(s-a.left),c=Math.abs(s-a.right),u=Math.min(l,c);let d;const f=t/r*(n+1);if(a.isDash){const e=n-Math.abs(f);d=Math.sqrt(u*u+e*e)}else d=n-Math.sqrt(u*u+f*f);this.image.data[o+s]=Math.max(0,Math.min(255,d+128))}}}addRegularDash(e,t){for(let t=e.length-1;t>=0;--t){const r=e[t],n=e[t+1];r.zeroLength?e.splice(t,1):n&&n.isDash===r.isDash&&(n.left=r.left,e.splice(t,1))}const r=e[0],n=e[e.length-1];r.isDash===n.isDash&&(r.left=n.left-this.width,n.right=r.right+this.width);const o=this.width*this.nextRow;let i=0,a=e[i];for(let r=0;r1&&(a=e[++i]);const n=Math.abs(r-a.left),s=Math.abs(r-a.right),l=Math.min(n,s);this.image.data[o+r]=Math.max(0,Math.min(255,(a.isDash?l:-l)+t+128))}}addDash(e,t){const r=this.getKey(e,t);if(this.positions[r])return this.positions[r];const n="round"===t,o=n?7:0,i=2*o+1;if(this.nextRow+i>this.height)return H("LineAtlas out of space"),null;0===e.length&&e.push(1);let a=0;for(let t=0;t=t.maxzoom||"none"!==t.visibility&&(Gm(e,this.zoom,r),(s[t.id]=t.createBucket({index:a.bucketLayerIDs.length,layers:e,zoom:this.zoom,canonical:this.canonical,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:d,sourceID:this.source,enableTerrain:this.enableTerrain,projection:this.projection.spec,availableImages:r})).populate(f,c,this.tileID.canonical,this.tileTransform),a.bucketLayerIDs.push(e.map(e=>e.id)))}}let d,f,p,h;l.trim();const m={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},g=()=>{if(d)return o(d);if(f&&p&&h){const e=new Vm(f),t=new cp(p,h);for(const n in s){const o=s[n];o instanceof jh?(Gm(o.layers,this.zoom,r),Qp(o,f,e.positions,p,t.iconPositions,this.showCollisionBoxes,r,this.tileID.canonical,this.tileZoom,this.projection)):o.hasPattern&&(o instanceof pf||o instanceof pd||o instanceof jd)&&(Gm(o.layers,this.zoom,r),o.addFeatures(c,this.tileID.canonical,t.patternPositions,r,this.tileTransform))}this.status="done",o(null,{buckets:R(s).filter(e=>!e.isEmpty()),featureIndex:a,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,lineAtlas:l,imageAtlas:t,glyphMap:this.returnDependencies?f:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}},y=j(c.glyphDependencies,e=>Object.keys(e).map(Number));Object.keys(y).length?n.send("getGlyphs",{uid:this.uid,stacks:y},(e,t)=>{d||(d=e,f=t,g())},void 0,!1,m):f={};const v=Object.keys(c.iconDependencies);v.length?n.send("getImages",{icons:v,source:this.source,tileID:this.tileID,type:"icons"},(e,t)=>{d||(d=e,p=t,g())},void 0,!1,m):p={};const b=Object.keys(c.patternDependencies);b.length?n.send("getImages",{icons:b,source:this.source,tileID:this.tileID,type:"patterns"},(e,t)=>{d||(d=e,h=t,g())},void 0,!1,m):h={},g()}}function Gm(e,t,r){const n=new ma(t);for(const t of e)t.recalculate(n,r)}class Wm{constructor(e){this.entries={},this.scheduler=e}request(e,t,r,n){const o=this.entries[e]=this.entries[e]||{callbacks:[]};if(o.result){const[e,r]=o.result;return this.scheduler?this.scheduler.add(()=>{n(e,r)},t):n(e,r),()=>{}}return o.callbacks.push(n),o.cancel||(o.cancel=r((r,n)=>{o.result=[r,n];for(const e of o.callbacks)this.scheduler?this.scheduler.add(()=>{e(r,n)},t):e(r,n);setTimeout(()=>delete this.entries[e],3e3)})),()=>{o.result||(o.callbacks=o.callbacks.filter(e=>e!==n),o.callbacks.length||(o.cancel(),delete this.entries[e]))}}}function qm(e,t,r){const n=JSON.stringify(e.request);return e.data&&(this.deduped.entries[n]={result:[null,e.data]}),this.deduped.request(n,{type:"parseTile",isSymbolTile:e.isSymbolTile,zoom:e.tileZoom},t=>{const n=fe(e.request,(e,n,o,i)=>{e?t(e):n&&t(null,{vectorTile:r?void 0:new Pd(new np(n)),rawData:n,cacheControl:o,expires:i})});return()=>{n.cancel(),t()}},t)}const Zm=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Ym{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,r]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);const o=Zm[15&r];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Ym(a,i,o,e)}constructor(e,t=64,r=Float64Array,n){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=Zm.indexOf(this.ArrayType),i=2*e*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+a+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+i+a+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+a+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Xm(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:a}=this,s=[0,o.length-1,0],l=[];for(;s.length;){const c=s.pop()||0,u=s.pop()||0,d=s.pop()||0;if(u-d<=a){for(let a=d;a<=u;a++){const s=i[2*a],c=i[2*a+1];s>=e&&s<=r&&c>=t&&c<=n&&l.push(o[a])}continue}const f=d+u>>1,p=i[2*f],h=i[2*f+1];p>=e&&p<=r&&h>=t&&h<=n&&l.push(o[f]),(0===c?e<=p:t<=h)&&(s.push(d),s.push(f-1),s.push(1-c)),(0===c?r>=p:n>=h)&&(s.push(f+1),s.push(u),s.push(1-c))}return l}within(e,t,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:o,nodeSize:i}=this,a=[0,n.length-1,0],s=[],l=r*r;for(;a.length;){const c=a.pop()||0,u=a.pop()||0,d=a.pop()||0;if(u-d<=i){for(let r=d;r<=u;r++)eg(o[2*r],o[2*r+1],e,t)<=l&&s.push(n[r]);continue}const f=d+u>>1,p=o[2*f],h=o[2*f+1];eg(p,h,e,t)<=l&&s.push(n[f]),(0===c?e-r<=p:t-r<=h)&&(a.push(d),a.push(f-1),a.push(1-c)),(0===c?e+r>=p:t+r>=h)&&(a.push(f+1),a.push(u),a.push(1-c))}return s}}function Xm(e,t,r,n,o,i){if(o-n<=r)return;const a=n+o>>1;Km(e,t,a,n,o,i),Xm(e,t,r,n,a-1,1-i),Xm(e,t,r,a+1,o,1-i)}function Km(e,t,r,n,o,i){for(;o>n;){if(o-n>600){const a=o-n+1,s=r-n+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);Km(e,t,r,Math.max(n,Math.floor(r-s*c/a+u)),Math.min(o,Math.floor(r+(a-s)*c/a+u)),i)}const a=t[2*r+i];let s=n,l=o;for(Jm(e,t,n,r),t[2*o+i]>a&&Jm(e,t,n,o);sa;)l--}t[2*n+i]===a?Jm(e,t,n,l):(l++,Jm(e,t,l,o)),l<=r&&(n=l+1),r<=l&&(o=l-1)}}function Jm(e,t,r,n){Qm(e,r,n),Qm(t,2*r,2*n),Qm(t,2*r+1,2*n+1)}function Qm(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function eg(e,t,r,n){const o=e-r,i=t-n;return o*o+i*i}e.ARRAY_TYPE=el,e.AUTH_ERR_MSG=ve,e.Aabb=Zl,e.Actor=class{constructor(e,r,n){this.target=e,this.parent=r,this.mapId=n,this.callbacks={},this.cancelCallbacks={},z(["receive"],this),this.target.addEventListener("message",this.receive,!1),this.globalScope=q()?e:t,this.scheduler=new Qh}send(e,t,r,n,o=!1,i){const a=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(r.metadata=i,this.callbacks[a]=r);const s=X(this.globalScope)?void 0:[];return this.target.postMessage({id:a,type:e,hasCallback:!!r,targetMapId:n,mustQueue:o,sourceMapId:this.mapId,data:Qo(t,s)},s),{cancel:()=>{r&&delete this.callbacks[a],this.target.postMessage({id:a,type:"",targetMapId:n,sourceMapId:this.mapId})}}}receive(e){const t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){const e=this.cancelCallbacks[r];delete this.cancelCallbacks[r],e&&e.cancel()}else if(t.mustQueue||q()){const e=this.callbacks[r];this.cancelCallbacks[r]=this.scheduler.add(()=>this.processTask(r,t),e&&e.metadata||{type:"message"})}else this.processTask(r,t)}processTask(e,t){if(""===t.type){const r=this.callbacks[e];delete this.callbacks[e],r&&(t.error?r(ei(t.error)):r(null,ei(t.data)))}else{const r=X(this.globalScope)?void 0:[],n=t.hasCallback?(t,n)=>{delete this.cancelCallbacks[e],this.target.postMessage({id:e,type:"",sourceMapId:this.mapId,error:t?Qo(t):null,data:Qo(n,r)},r)}:e=>{},o=ei(t.data);if(this.parent[t.type])this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error(`Could not find function ${t.type}`))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}},e.CanonicalTileID=Jd,e.Color=Rt,e.ColorMode=Mm,e.CullFaceMode=Om,e.DEMData=Cm,e.DataConstantProperty=Sa,e.DedupedRequest=Wm,e.DepthMode=Tm,e.EXTENT=Ks,e.Elevation=class{isDataAvailableAtPoint(e){const t=this._source();if(this.isUsingMockSource()||!t||e.y<0||e.y>1)return!1;const r=t.getSource().maxzoom,n=1<1)return t;const o=n.getSource().maxzoom,i=1<{const i=this.getAtTileOffset(e,o.x,o.y),a=n.upVector(e.canonical,o.x,o.y);return wl(a,a,i*n.upVectorScale(e.canonical,t,r).metersToTile),a}}getForTilePoints(e,t,r,n){if(this.isUsingMockSource())return!1;const o=zm.create(this,e,n);return!!o&&(t.forEach(e=>{e[2]=this.exaggeration()*o.getElevationAt(e[0],e[1],r)}),!0)}getMinMaxForTile(e){if(this.isUsingMockSource())return null;const t=this.findDEMTileFor(e);if(!t||!t.dem)return null;const r=t.dem.tree,n=t.tileID,o=1<{let n=e===i-1?e-2:0===e?e:e-1;return n+=r?24575:0,[n,t]};for(let e=0;ethis._skuTokenExpiresAt}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}normalizeStyleURL(e,t){if(!be(e))return e;const r=Ce(e);return r.path=`/styles/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||t)}normalizeGlyphsURL(e,t){if(!be(e))return e;const r=Ce(e);return r.path=`/fonts/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||t)}normalizeSourceURL(e,t,r,n){if(!be(e))return e;const o=Ce(e);return o.path=`/v4/${o.authority}.json`,o.params.push("secure"),r&&o.params.push(`language=${r}`),n&&o.params.push(`worldview=${n}`),this._makeAPIURL(o,this._customAccessToken||t)}normalizeSpriteURL(e,t,r,n){const o=Ce(e);return be(e)?(o.path=`/styles/v1${o.path}/sprite${t}${r}`,this._makeAPIURL(o,this._customAccessToken||n)):(o.path+=`${t}${r}`,Ee(o))}normalizeTileURL(e,t,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!be(e))return e;const n=Ce(e);n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${t||r&&"raster"!==n.authority&&512===r?"@2x":""}${i.supported?".webp":"$1"}`),"raster"===n.authority?n.path=`/${o.RASTER_URL_PREFIX}${n.path}`:(n.path=n.path.replace(/^.+\/v4\//,"/"),n.path=`/${o.TILE_URL_VERSION}${n.path}`);const a=this._customAccessToken||function(e){for(const t of e){const e=t.match(/^access_token=(.*)$/);if(e)return e[1]}return null}(n.params)||o.ACCESS_TOKEN;return o.REQUIRE_ACCESS_TOKEN&&a&&this._skuToken&&n.params.push(`sku=${this._skuToken}`),this._makeAPIURL(n,a)}canonicalizeTileURL(e,t){const r=Ce(e);if(!r.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!r.path.match(/\.[\w]+$/))return e;let n="mapbox://";r.path.match(/^\/raster\/v1\//)?n+=`raster/${r.path.replace(`/${o.RASTER_URL_PREFIX}/`,"")}`:n+=`tiles/${r.path.replace(`/${o.TILE_URL_VERSION}/`,"")}`;let i=r.params;return t&&(i=i.filter(e=>!e.match(/^access_token=/))),i.length&&(n+=`?${i.join("&")}`),n}canonicalizeTileset(e,t){const r=!!t&&be(t),n=[];for(const t of e.tiles||[])_e(t)?n.push(this.canonicalizeTileURL(t,r)):n.push(t);return n}_makeAPIURL(e,t){const r="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",n=Ce(o.API_URL);if(e.protocol=n.protocol,e.authority=n.authority,"http"===e.protocol){const t=e.params.indexOf("secure");t>=0&&e.params.splice(t,1)}if("/"!==n.path&&(e.path=`${n.path}${e.path}`),!o.REQUIRE_ACCESS_TOKEN)return Ee(e);if(t=t||o.ACCESS_TOKEN,!this._silenceAuthErrors){if(!t)throw new Error(`An API access token is required to use Mapbox GL. ${r}`);if("s"===t[0])throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${r}`)}return e.params=e.params.filter(e=>-1===e.indexOf("access_token")),e.params.push(`access_token=${t||""}`),Ee(e)}},e.ResourceType=le,e.SegmentVector=Xs,e.SourceCache=Dm,e.StencilMode=km,e.StructArrayLayout1ui2=ns,e.StructArrayLayout2f1f2i16=qa,e.StructArrayLayout2i4=Da,e.StructArrayLayout2ui4=rs,e.StructArrayLayout3f12=Ya,e.StructArrayLayout3ui6=Xa,e.StructArrayLayout4i8=Na,e.StructArrayLayout5f20=es,e.Texture=Kh,e.Tile=fm,e.Transitionable=va,e.Uniform1f=Ts,e.Uniform1i=class extends Es{constructor(e){super(e),this.current=0}set(e,t,r){this.fetchUniformLocation(e,t)&&this.current!==r&&(this.current=r,this.gl.uniform1i(this.location,r))}},e.Uniform2f=class extends Es{constructor(e){super(e),this.current=[0,0]}set(e,t,r){this.fetchUniformLocation(e,t)&&(r[0]===this.current[0]&&r[1]===this.current[1]||(this.current=r,this.gl.uniform2f(this.location,r[0],r[1])))}},e.Uniform3f=class extends Es{constructor(e){super(e),this.current=[0,0,0]}set(e,t,r){this.fetchUniformLocation(e,t)&&(r[0]===this.current[0]&&r[1]===this.current[1]&&r[2]===this.current[2]||(this.current=r,this.gl.uniform3f(this.location,r[0],r[1],r[2])))}},e.Uniform4f=Is,e.UniformColor=ks,e.UniformMatrix2f=class extends Es{constructor(e){super(e),this.current=Ps}set(e,t,r){if(this.fetchUniformLocation(e,t))for(let e=0;e<4;e++)if(r[e]!==this.current[e]){this.current=r,this.gl.uniformMatrix2fv(this.location,!1,r);break}}},e.UniformMatrix3f=class extends Es{constructor(e){super(e),this.current=Rs}set(e,t,r){if(this.fetchUniformLocation(e,t))for(let e=0;e<9;e++)if(r[e]!==this.current[e]){this.current=r,this.gl.uniformMatrix3fv(this.location,!1,r);break}}},e.UniformMatrix4f=class extends Es{constructor(e){super(e),this.current=Ms}set(e,t,r){if(this.fetchUniformLocation(e,t)){if(r[12]!==this.current[12]||r[0]!==this.current[0])return this.current=r,void this.gl.uniformMatrix4fv(this.location,!1,r);for(let e=1;e<16;e++)if(r[e]!==this.current[e]){this.current=r,this.gl.uniformMatrix4fv(this.location,!1,r);break}}}},e.UnwrappedTileID=Qd,e.ValidationError=ro,e.VectorTileFeature=Od,e.VectorTileWorkerSource=class extends Qe{constructor(e,t,r,n,o){super(),this.actor=e,this.layerIndex=t,this.availableImages=r,this.loadVectorData=o||qm,this.loading={},this.loaded={},this.deduped=new Wm(e.scheduler),this.isSpriteLoaded=n,this.scheduler=e.scheduler}loadTile(e,t){const r=e.uid,n=e&&e.request,o=n&&n.collectResourceTiming,i=this.loading[r]=new Hm(e);i.abort=this.loadVectorData(e,(a,s)=>{const l=!this.loading[r];if(delete this.loading[r],l||a||!s)return i.status="done",l||(this.loaded[r]=i),t(a);const c=s.rawData,u={};s.expires&&(u.expires=s.expires),s.cacheControl&&(u.cacheControl=s.cacheControl),i.vectorTile=s.vectorTile||new Pd(new np(c));const d=()=>{i.parse(i.vectorTile,this.layerIndex,this.availableImages,this.actor,(e,r)=>{if(e||!r)return t(e);const i={};if(o){const e=Ve(n);e.length>0&&(i.resourceTiming=JSON.parse(JSON.stringify(e)))}t(null,P({rawTileData:c.slice(0)},r,u,i))})};this.isSpriteLoaded?d():this.once("isSpriteLoaded",()=>{this.scheduler?this.scheduler.add(d,{type:"parseTile",isSymbolTile:e.isSymbolTile,zoom:e.tileZoom}):d()}),this.loaded=this.loaded||{},this.loaded[r]=i})}reloadTile(e,t){const r=this.loaded,n=e.uid,o=this;if(r&&r[n]){const i=r[n];i.showCollisionBoxes=e.showCollisionBoxes,i.enableTerrain=!!e.enableTerrain,i.projection=e.projection,i.tileTransform=uh(e.tileID.canonical,e.projection);const a=(e,r)=>{const n=i.reloadCallback;n&&(delete i.reloadCallback,i.parse(i.vectorTile,o.layerIndex,this.availableImages,o.actor,n)),t(e,r)};"parsing"===i.status?i.reloadCallback=a:"done"===i.status&&(i.vectorTile?i.parse(i.vectorTile,this.layerIndex,this.availableImages,this.actor,a):a())}}abortTile(e,t){const r=e.uid,n=this.loading[r];n&&(n.abort&&n.abort(),delete this.loading[r]),t()}removeTile(e,t){const r=this.loaded,n=e.uid;r&&r[n]&&delete r[n],t()}},e.WritingMode=up,e.ZoomDependentExpression=Jn,e.add=yl,e.addDynamicAttributes=Nh,e.adjoint=function(e,t){var r=t[0],n=t[1],o=t[2],i=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8];return e[0]=a*u-s*c,e[1]=o*c-n*u,e[2]=n*s-o*a,e[3]=s*l-i*u,e[4]=r*u-o*l,e[5]=o*i-r*s,e[6]=i*c-a*l,e[7]=n*l-r*c,e[8]=r*a-n*i,e},e.asyncAll=M,e.bezier=C,e.bindAll=z,e.boundsAttributes=um,e.bufferConvexPolygon=function(e,t){const r=[];for(let n=0;nne&&(e.getActor().send("enforceCacheSizeLimit",re),se=0)},e.calculateGlobeLabelMatrix=function(e,t){const{x:r,y:n}=e.point,o=vc(r,n,e.worldSize/e._pixelsPerMercatorPixel,0,0);return il(o,o,yc(ic(t)))},e.calculateGlobeMatrix=function(e){const{x:t,y:r}=e.point,{lng:n,lat:o}=e._center;return vc(t,r,e.worldSize,n,o)},e.calculateGlobeMercatorMatrix=function(e){const t=e.pixelsPerMeter,r=t/Pc(1,e.center.lat),n=nl(new Float64Array(16));return al(n,n,[e.point.x,e.point.y,0]),sl(n,n,[r,r,t]),Float32Array.from(n)},e.circumferenceAtLatitude=kc,e.clamp=T,e.clearTileCache=function(e){if(!oe())return;const r=t.caches.delete(Q);e&&r.catch(e).then(()=>e())},e.clipLine=Op,e.clone=function(e){var t=new el(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.clone$1=U,e.collisionCircleLayout=Sf,e.config=o,e.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},e.create=function(){var e=new el(16);return el!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$1=tl,e.createExpression=Xn,e.createLayout=Pa,e.createStyleLayer=function(e){return"custom"===e.type?new qh(e):new Xh[e.type](e)},e.cross=El,e.degToRad=x,e.distance=function(e,t){return Math.hypot(t[0]-e[0],t[1]-e[1],t[2]-e[2])},e.div=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e},e.dot=Cl,e.earthRadius=Cc,e.ease=E,e.easeCubicInOut=S,e.ecefToLatLng=function([e,t,r]){const n=Math.hypot(e,t,r),o=Math.atan2(e,r),i=.5*Math.PI-Math.acos(-t/n);return new Ic(w(o),w(i))},e.emitValidationErrors=Ho,e.endsWith=B,e.enforceCacheSizeLimit=function(e){ie(),ee&&ee.then(t=>{t.keys().then(r=>{for(let n=0;ni&&(n+=(e[o]-i)*(e[o]-i)),t[o]0){const e=180/n;rl(p,p,[e/c+1,0,0,0,e/u+1,0,-.5*e/d,.5*e/f,1])}return p[2]=l,p[5]=e.x,p[8]=e.y,p},e.getImage=ye,e.getJSON=function(e,t){return de(P(e,{type:"json"}),t)},e.getLatitudinalLod=function(e){const t=Nc-5;e=T(e,-t,t)/t*90;const r=Math.pow(Math.abs(Math.sin(x(e))),3);return Math.round(r*(Kl.length-1))},e.getMapSessionAPI=Fe,e.getPerformanceMeasurement=Ve,e.getProjection=Rh,e.getRTLTextPluginStatus=fa,e.getReferrer=ue,e.getTilePoint=function(e,{x:t,y:r},n=0){return new v(((t-n)*e.scale-e.x)*Ks,(r*e.scale-e.y)*Ks)},e.getTileVec3=function(e,t,r=0){return gl(((t.x-r)*e.scale-e.x)*Ks,(t.y*e.scale-e.y)*Ks,Lc(t.z,t.y))},e.getVideo=function(e,r){const n=t.document.createElement("video");n.muted=!0,n.onloadstart=function(){r(null,n)};for(let r=0;r{}}},e.globeCenterToScreenPoint=function(e){const t=[0,0,0],r=nl(new Float64Array(16));return il(r,e.pixelMatrix,e.globeMatrix),Tl(t,t,r),new v(t[0],t[1])},e.globeDenormalizeECEF=yc,e.globeECEFOrigin=function(e,t){const r=[0,0,0];return Tl(r,r,gc(ic(t.canonical))),Tl(r,r,e),r},e.globeMetersToEcef=tc,e.globeNormalizeECEF=gc,e.globePixelsToTileUnits=function(e,t){return Ks/(512*Math.pow(2,e))*hc(ic(t))},e.globePoleMatrixForTile=function(e,t,r){const n=nl(new Float64Array(16)),o=(t/(1<0;return 0===n&&!o&&!a&&i},e.identity=nl,e.identity$1=Fl,e.invert=ol,e.isFullscreen=function(){return!!t.document.fullscreenElement||!!t.document.webkitFullscreenElement},e.isLngLatBehindGlobe=xc,e.isMapAuthenticated=function(e){return ze.has(e)},e.isMapboxURL=be,e.isSafariWithAntialiasingBug=function(e){const t=e.navigator?e.navigator.userAgent:null;return!!X(e)&&t&&(t.match("Version/15.4")||t.match("Version/15.5")||t.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/))},e.latFromMercatorY=Dc,e.latLngToECEF=fc,e.len=Pl,e.length=ml,e.length$1=function(e){return Math.hypot(e[0],e[1],e[2],e[3])},e.lngFromMercatorX=Oc,e.loadVectorTile=qm,e.makeRequest=de,e.mapValue=function(e,t,r,n,o){return T((e-t)/(r-t)*(o-n)+n,n,o)},e.mercatorScale=Fc,e.mercatorXfromLng=Mc,e.mercatorYfromLat=Rc,e.mercatorZfromAltitude=Pc,e.mul=fl,e.mul$1=Rl,e.multiply=il,e.multiply$1=rl,e.multiply$2=bl,e.nextPowerOfTwo=N,e.normalize=Sl,e.normalize$1=jl,e.normalize$2=Dl,e.number=Rr,e.ortho=function(e,t,r,n,o,i,a){var s=1/(t-r),l=1/(n-o),c=1/(i-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(o+n)*l,e[14]=(a+i)*c,e[15]=1,e},e.pbf=Lf,e.perspective=function(e,t,r,n,o){var i,a=1/Math.tan(t/2);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=o&&o!==1/0?(e[10]=(o+n)*(i=1/(n-o)),e[14]=2*o*n*i):(e[10]=-1,e[14]=-2*n),e},e.pick=function(e,t){const r={};for(let n=0;n0&&r[0]<=e.width&&r[1]>0&&r[1]<=e.height&&!xc(e,new Ic(e.center.lat,90)),n[0]>0&&n[0]<=e.width&&n[1]>0&&n[1]<=e.height&&!xc(e,new Ic(e.center.lat,-90))]},e.polygonContainsPoint=au,e.polygonIntersectsBox=su,e.polygonIntersectsPolygon=Kc,e.polygonizeBounds=function(e,t,r=0,n=!0){const o=new v(r,r),i=e.sub(o),a=t.add(o),s=[i,new v(a.x,i.y),a,new v(i.x,a.y)];return n&&s.push(i.clone()),s},e.posAttributes=Hl,e.postMapLoadEvent=Oe,e.postPerformanceEvent=Le,e.postTurnstileEvent=Re,e.potpack=sp,e.prevPowerOfTwo=function(e){return e<=1?1:Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},e.radToDeg=w,e.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],e.registerForPluginStateChange=function(e){return e({pluginStatus:sa,pluginURL:la}),da.on("pluginStateChange",e),e},e.removeAuthState=function(e){ze.delete(e)},e.renderColorRamp=Tu,e.resample=jc,e.rotateX=ll,e.rotateX$1=zl,e.rotateY=cl,e.rotateY$1=Bl,e.rotateZ=function(e,t,r){var n=Math.sin(r),o=Math.cos(r),i=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],f=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*o+c*n,e[1]=a*o+u*n,e[2]=s*o+d*n,e[3]=l*o+f*n,e[4]=c*o-i*n,e[5]=u*o-a*n,e[6]=d*o-s*n,e[7]=f*o-l*n,e},e.rotateZ$1=function(e,t,r){r*=.5;var n=t[0],o=t[1],i=t[2],a=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l+o*s,e[1]=o*l-n*s,e[2]=i*l+a*s,e[3]=a*l-i*s,e},e.scale=sl,e.scale$1=Ol,e.scale$2=wl,e.scaleAndAdd=Al,e.set=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e},e.setCacheLimits=function(e,t){re=e,ne=t},e.setColumn=function(e,t,r){e[4*t+0]=r[0],e[4*t+1]=r[1],e[4*t+2]=r[2],e[4*t+3]=r[3]},e.setRTLTextPlugin=function(e,t,r=!1){if(sa===na||sa===oa||sa===ia)throw new Error("setRTLTextPlugin cannot be called multiple times.");la=Ze.resolveURL(e),sa=na,aa=t,ua(),r||pa()},e.smoothstep=I,e.spec=et,e.squaredLength=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n},e.storeAuthState=function(e,t){t?ze.add(e):ze.delete(e)},e.sub=Ml,e.subtract=vl,e.symbolSize=Mf,e.tileAABB=function(e,t,r,n,o,i,a,s,l){if("globe"===l.name)return function(e,t,r){const n=t/e.worldSize,o=e.globeMatrix;if(r.z<=1){const e=ic(r).getCorners();return lc(e,o,n),Zl.fromPoints(e)}const i=cc(r),a=uc(i);lc(a,o,n);const s=Number.MAX_VALUE,l=[-s,-s,-s],c=[s,s,s];if(i.contains(e.center)){for(const e of a)_l(c,c,e),xl(l,l,e);l[2]=0;const t=e.point,r=[t.x*n,t.y*n,0];return _l(c,c,r),xl(l,l,r),new Zl(c,l)}const u=[o[12]*n,o[13]*n,o[14]*n],d=i.getCenter(),f=T(e.center.lat,-Nc,Nc),p=T(d.lat,-Nc,Nc),h=Mc(e.center.lng),m=Rc(f);let g=h-Mc(d.lng);const y=m-Rc(p);g>.5?g-=1:g<-.5&&(g+=1);let v=0;Math.abs(g)>Math.abs(y)?v=g>=0?1:3:(v=y>=0?0:2,Al(u,u,[o[4]*n,o[5]*n,o[6]*n],-Math.sin(x(y>=0?i.getSouth():i.getNorth()))*Yl));const b=a[v],_=a[(v+1)%4],w=new nc(b,_,u),A=[oc(w,0)||b[0],oc(w,1)||b[1],oc(w,2)||b[2]],S=bc(e.zoom);if(S>0){const n=function({x:e,y:t,z:r},n,o,i,a){const s=1/(1<.5?f=-1:p<-.5&&(f=1),l=((l+f)*n-(i*=n))*o+i,c=((c+f)*n-i)*o+i,u=(u*n-(a*=n))*o+a,d=(d*n-a)*o+a,[[l,d,0],[c,d,0],[c,u,0],[l,u,0]]}(r,t,e._pixelsPerMercatorPixel,h,m);for(let e=0;eVo(So(e)),e.validateFog=e=>Vo(No(e)),e.validateLayer=e=>Vo(ko(e)),e.validateLight=e=>Vo(Do(e)),e.validateSource=e=>Vo(Po(e)),e.validateStyle=jo,e.validateTerrain=e=>Vo(Lo(e)),e.values=R,e.vectorTile=_d,e.version=r,e.warnOnce=H,e.window=t,e.wrap=k}),n(0,function(e){function t(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e||null==e)return JSON.stringify(e);if(Array.isArray(e)){let r="[";for(const n of e)r+=`${t(n)},`;return`${r}]`}let r="{";for(const n of Object.keys(e).sort())r+=`${n}:${t(e[n])},`;return`${r}}`}function r(r){let n="";for(const o of e.refProperties)n+=`/${t(r[o])}`;return n}class n{constructor(e){this.keyCache={},e&&this.replace(e)}replace(e){this._layerConfigs={},this._layers={},this.update(e,[])}update(t,n){for(const r of t)this._layerConfigs[r.id]=r,(this._layers[r.id]=e.createStyleLayer(r)).compileFilter(),this.keyCache[r.id]&&delete this.keyCache[r.id];for(const e of n)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};const o=function(e,t){const n={};for(let o=0;othis._layers[e.id]),r=t[0];if("none"===r.visibility)continue;const n=r.source||"";let o=this.familiesBySource[n];o||(o=this.familiesBySource[n]={});const i=r.sourceLayer||"_geojsonTileLayer";let a=o[i];a||(a=o[i]=[]),a.push(t)}}}class o{loadTile(t,r){const{uid:n,encoding:o,rawImageData:i,padding:a,buildQuadTree:s}=t,l=e.window.ImageBitmap&&i instanceof e.window.ImageBitmap?this.getImageData(i,a):i;r(null,new e.DEMData(n,l,o,a<1,s))}getImageData(e,t){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);const r=this.offscreenCanvasContext.getImageData(-t,-t,e.width+2*t,e.height+2*t);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),r}}function i(e,t){if(0!==e.length){a(e[0],t);for(var r=1;r=Math.abs(s)?r-l+s:s-l+r,r=l}r+n>=0!=!!t&&e.reverse()}var s=e.getDefaultExportFromCjs(function e(t,r){var n,o=t&&t.type;if("FeatureCollection"===o)for(n=0;n>31}function A(e,t){for(var r=e.loadGeometry(),n=e.type,o=0,i=0,a=r.length,s=0;se},T=Math.fround||(I=new Float32Array(1),e=>(I[0]=+e,I[0]));var I;class k{constructor(e){this.options=Object.assign(Object.create(E),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:r,maxZoom:n}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;const i=[];for(let t=0;t=r;e--){const r=+Date.now();a=this.trees[e]=this._createTree(this._cluster(a,e)),t&&console.log("z%d: %d clusters in %dms",e,a.numItems,+Date.now()-r)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[1]));let o=180===e[2]?180:((e[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const e=this.getClusters([r,n,180,i],t),a=this.getClusters([-180,n,o,i],t);return e.concat(a)}const a=this.trees[this._limitZoom(t)],s=a.range(P(r),O(i),P(o),O(n)),l=a.data,c=[];for(const e of s){const t=this.stride*e;c.push(l[t+5]>1?M(l,t,this.clusterProps):this.points[l[t+3]])}return c}getChildren(e){const t=this._getOriginId(e),r=this._getOriginZoom(e),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const i=o.data;if(t*this.stride>=i.length)throw new Error(n);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=o.within(i[t*this.stride],i[t*this.stride+1],a),l=[];for(const t of s){const r=t*this.stride;i[r+4]===e&&l.push(i[r+5]>1?M(i,r,this.clusterProps):this.points[i[r+3]])}if(0===l.length)throw new Error(n);return l}getLeaves(e,t,r){const n=[];return this._appendLeaves(n,e,t=t||10,r=r||0,0),n}getTile(e,t,r){const n=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:i,radius:a}=this.options,s=a/i,l=(r-s)/o,c=(r+1+s)/o,u={features:[]};return this._addTileFeatures(n.range((t-s)/o,l,(t+1+s)/o,c),n.data,t,r,o,u),0===t&&this._addTileFeatures(n.range(1-s/o,l,1,c),n.data,o,r,o,u),t===o-1&&this._addTileFeatures(n.range(0,l,s/o,c),n.data,-1,r,o,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const r=this.getChildren(e);if(t++,1!==r.length)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,n,o){const i=this.getChildren(t);for(const t of i){const i=t.properties;if(i&&i.cluster?o+i.point_count<=n?o+=i.point_count:o=this._appendLeaves(e,i.cluster_id,r,n,o):o1;let l,c,u;if(s)l=R(t,e,this.clusterProps),c=t[e],u=t[e+1];else{const r=this.points[t[e+3]];l=r.properties;const[n,o]=r.geometry.coordinates;c=P(n),u=O(o)}const d={type:1,geometry:[[Math.round(this.options.extent*(c*o-r)),Math.round(this.options.extent*(u*o-n))]],tags:l};let f;f=s||this.options.generateId?t[e+3]:this.points[t[e+3]].id,void 0!==f&&(d.id=f),i.features.push(d)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:r,extent:n,reduce:o,minPoints:i}=this.options,a=r/(n*Math.pow(2,t)),s=e.data,l=[],c=this.stride;for(let r=0;rt&&(p+=s[r+5])}if(p>f&&p>=i){let e,i=n*f,a=u*f,h=-1;const m=(r/c<<5)+(t+1)+this.points.length;for(const n of d){const l=n*c;if(s[l+2]<=t)continue;s[l+2]=t;const u=s[l+5];i+=s[l]*u,a+=s[l+1]*u,s[l+4]=m,o&&(e||(e=this._map(s,r,!0),h=this.clusterProps.length,this.clusterProps.push(e)),o(e,this._map(s,l)))}s[r+4]=m,l.push(i/p,a/p,1/0,m,-1,p),o&&l.push(h)}else{for(let e=0;e1)for(const e of d){const r=e*c;if(!(s[r+2]<=t)){s[r+2]=t;for(let e=0;e>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+5]>1){const n=this.clusterProps[e[t+6]];return r?Object.assign({},n):n}const n=this.points[e[t+3]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function M(e,t,r){return{type:"Feature",id:e[t+3],properties:R(e,t,r),geometry:{type:"Point",coordinates:[(n=e[t],360*(n-.5)),D(e[t+1])]}};var n}function R(e,t,r){const n=e[t+5],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,i=e[t+6],a=-1===i?{}:Object.assign({},r[i]);return Object.assign(a,{cluster:!0,cluster_id:e[t+3],point_count:n,point_count_abbreviated:o})}function P(e){return e/360+.5}function O(e){const t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function D(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function L(e,t,r,n){for(var o,i=n,a=r-t>>1,s=r-t,l=e[t],c=e[t+1],u=e[r],d=e[r+1],f=t+3;fi)o=f,i=p;else if(p===i){var h=Math.abs(f-a);hn&&(o-t>3&&L(e,t,o,n),e[o+2]=i,r-o>3&&L(e,o,r,n))}function N(e,t,r,n,o,i){var a=o-r,s=i-n;if(0!==a||0!==s){var l=((e-r)*a+(t-n)*s)/(a*a+s*s);l>1?(r=o,n=i):l>0&&(r+=a*l,n+=s*l)}return(a=e-r)*a+(s=t-n)*s}function F(e,t,r,n){var o={id:void 0===e?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,r=e.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)z(e,t);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(a+=n?(o*c-l*i)/2:Math.sqrt(Math.pow(l-o,2)+Math.pow(c-i,2))),o=l,i=c}var u=t.length-3;t[2]=1,L(t,0,u,r),t[u+2]=1,t.size=Math.abs(a),t.start=0,t.end=t.size}function U(e,t,r,n){for(var o=0;o1?1:r}function G(e,t,r,n,o,i,a,s){if(n/=t,i>=(r/=t)&&a=n)return null;for(var l=[],c=0;c=r&&h=n)){var m=[];if("Point"===f||"MultiPoint"===f)W(d,m,r,n,o);else if("LineString"===f)q(d,m,r,n,o,!1,s.lineMetrics);else if("MultiLineString"===f)Y(d,m,r,n,o,!1);else if("Polygon"===f)Y(d,m,r,n,o,!0);else if("MultiPolygon"===f)for(var g=0;g=r&&a<=n&&(t.push(e[i]),t.push(e[i+1]),t.push(e[i+2]))}}function q(e,t,r,n,o,i,a){for(var s,l,c=Z(e),u=0===o?K:J,d=e.start,f=0;fr&&(l=u(c,p,h,g,y,r),a&&(c.start=d+s*l)):v>n?b=r&&(l=u(c,p,h,g,y,r),_=!0),b>n&&v<=n&&(l=u(c,p,h,g,y,n),_=!0),!i&&_&&(a&&(c.end=d+s*l),t.push(c),c=Z(e)),a&&(d+=s)}var x=e.length-3;p=e[x],h=e[x+1],m=e[x+2],(v=0===o?p:h)>=r&&v<=n&&X(c,p,h,m),x=c.length-3,i&&x>=3&&(c[x]!==c[0]||c[x+1]!==c[1])&&X(c,c[0],c[1],c[2]),c.length&&t.push(c)}function Z(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function Y(e,t,r,n,o,i){for(var a=0;aa.maxX&&(a.maxX=u),d>a.maxY&&(a.maxY=d)}return a}function oe(e,t,r,n){var o=t.geometry,i=t.type,a=[];if("Point"===i||"MultiPoint"===i)for(var s=0;s0&&t.size<(o?a:n))r.numPoints+=t.length/3;else{for(var s=[],l=0;la)&&(r.numSimplified++,s.push(t[l]),s.push(t[l+1])),r.numPoints++;o&&function(e,t){for(var r=0,n=0,o=e.length,i=o-2;n0===t)for(n=0,o=e.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(e,t){var r=[];if("FeatureCollection"===e.type)for(var n=0;n1&&console.time("creation"),f=this.tiles[d]=ne(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var p="z"+t;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(f.source=e,o){if(t===l.maxZoom||t===o)continue;var h=1<1&&console.time("clipping");var m,g,y,v,b,_,x=.5*l.buffer/l.extent,w=.5-x,A=.5+x,S=1+x;m=g=y=v=null,b=G(e,u,r-x,r+A,0,f.minX,f.maxX,l),_=G(e,u,r+w,r+S,0,f.minX,f.maxX,l),e=null,b&&(m=G(b,u,n-x,n+A,1,f.minY,f.maxY,l),g=G(b,u,n+w,n+S,1,f.minY,f.maxY,l),b=null),_&&(y=G(_,u,n-x,n+A,1,f.minY,f.maxY,l),v=G(_,u,n+w,n+S,1,f.minY,f.maxY,l),_=null),c>1&&console.timeEnd("clipping"),s.push(m||[],t+1,2*r,2*n),s.push(g||[],t+1,2*r,2*n+1),s.push(y||[],t+1,2*r+1,2*n),s.push(v||[],t+1,2*r+1,2*n+1)}}},ae.prototype.getTile=function(e,t,r){var n=this.options,o=n.extent,i=n.debug;if(e<0||e>24)return null;var a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var l,c=e,u=t,d=r;!l&&c>0;)c--,u=Math.floor(u/2),d=Math.floor(d/2),l=this.tiles[se(c,u,d)];return l&&l.source?(i>1&&console.log("found parent tile z%d-%d-%d",c,u,d),i>1&&console.time("drilling down"),this.splitTile(l.source,c,u,d,e,t,r),i>1&&console.timeEnd("drilling down"),this.tiles[s]?te(this.tiles[s],o):null):null};class ce extends e.VectorTileWorkerSource{constructor(e,t,r,n,o){super(e,t,r,n,le),o&&(this.loadGeoJSON=o)}loadData(t,r){const n=t&&t.request,o=n&&n.collectResourceTiming;this.loadGeoJSON(t,(i,a)=>{if(i||!a)return r(i);if("object"!=typeof a)return r(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`));{s(a,!0);try{if(t.filter){const r=e.createExpression(t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw new Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));const n=a.features.filter(e=>r.value.evaluate({zoom:0},e));a={type:"FeatureCollection",features:n}}this._geoJSONIndex=t.cluster?new k(function({superclusterOptions:t,clusterProperties:r}){if(!r||!t)return t;const n={},o={},i={accumulated:null,zoom:0},a={properties:null},s=Object.keys(r);for(const t of s){const[i,a]=r[t],s=e.createExpression(a),l=e.createExpression("string"==typeof i?[i,["accumulated"],["get",t]]:i);n[t]=s.value,o[t]=l.value}return t.map=e=>{a.properties=e;const t={};for(const e of s)t[e]=n[e].evaluate(i,a);return t},t.reduce=(e,t)=>{a.properties=t;for(const t of s)i.accumulated=e[t],e[t]=o[t].evaluate(i,a)},t}(t)).load(a.features):function(e,t){return new ae(e,t)}(a,t.geojsonVtOptions)}catch(i){return r(i)}this.loaded={};const l={};if(o){const r=e.getPerformanceMeasurement(n);r&&(l.resourceTiming={},l.resourceTiming[t.source]=JSON.parse(JSON.stringify(r)))}r(null,l)}})}reloadTile(e,t){const r=this.loaded;return r&&r[e.uid]?super.reloadTile(e,t):this.loadTile(e,t)}loadGeoJSON(t,r){if(t.request)e.getJSON(t.request,r);else{if("string"!=typeof t.data)return r(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`));try{return r(null,JSON.parse(t.data))}catch(e){return r(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`))}}}getClusterExpansionZoom(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))}catch(e){t(e)}}getClusterChildren(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId))}catch(e){t(e)}}getClusterLeaves(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))}catch(e){t(e)}}}class ue{constructor(t){this.self=t,this.actor=new e.Actor(t,this),this.layerIndexes={},this.availableImages={},this.isSpriteLoaded={},this.projections={},this.defaultProjection=e.getProjection({name:"mercator"}),this.workerSourceTypes={vector:e.VectorTileWorkerSource,geojson:ce},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(e,t)=>{if(this.workerSourceTypes[e])throw new Error(`Worker source with name "${e}" already registered.`);this.workerSourceTypes[e]=t},this.self.registerRTLTextPlugin=t=>{if(e.plugin.isParsed())throw new Error("RTL text plugin already registered.");e.plugin.applyArabicShaping=t.applyArabicShaping,e.plugin.processBidirectionalText=t.processBidirectionalText,e.plugin.processStyledBidirectionalText=t.processStyledBidirectionalText}}clearCaches(e,t,r){delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],r()}checkIfReady(e,t,r){r()}setReferrer(e,t){this.referrer=t}spriteLoaded(t,r){this.isSpriteLoaded[t]=r;for(const n in this.workerSources[t]){const o=this.workerSources[t][n];for(const t in o)o[t]instanceof e.VectorTileWorkerSource&&(o[t].isSpriteLoaded=r,o[t].fire(new e.Event("isSpriteLoaded")))}}setImages(e,t,r){this.availableImages[e]=t;for(const r in this.workerSources[e]){const n=this.workerSources[e][r];for(const e in n)n[e].availableImages=t}r()}enableTerrain(e,t,r){this.terrain=t,r()}setProjection(t,r){this.projections[t]=e.getProjection(r)}setLayers(e,t,r){this.getLayerIndex(e).replace(t),r()}updateLayers(e,t,r){this.getLayerIndex(e).update(t.layers,t.removedIds),r()}loadTile(t,r,n){const o=this.enableTerrain?e.extend({enableTerrain:this.terrain},r):r;o.projection=this.projections[t]||this.defaultProjection,this.getWorkerSource(t,r.type,r.source).loadTile(o,n)}loadDEMTile(t,r,n){const o=this.enableTerrain?e.extend({buildQuadTree:this.terrain},r):r;this.getDEMWorkerSource(t,r.source).loadTile(o,n)}reloadTile(t,r,n){const o=this.enableTerrain?e.extend({enableTerrain:this.terrain},r):r;o.projection=this.projections[t]||this.defaultProjection,this.getWorkerSource(t,r.type,r.source).reloadTile(o,n)}abortTile(e,t,r){this.getWorkerSource(e,t.type,t.source).abortTile(t,r)}removeTile(e,t,r){this.getWorkerSource(e,t.type,t.source).removeTile(t,r)}removeSource(e,t,r){if(!this.workerSources[e]||!this.workerSources[e][t.type]||!this.workerSources[e][t.type][t.source])return;const n=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==n.removeSource?n.removeSource(t,r):r()}loadWorkerSource(e,t,r){try{this.self.importScripts(t.url),r()}catch(e){r(e.toString())}}syncRTLPluginState(t,r,n){try{e.plugin.setState(r);const t=e.plugin.getPluginURL();if(e.plugin.isLoaded()&&!e.plugin.isParsed()&&null!=t){this.self.importScripts(t);const r=e.plugin.isParsed();n(r?void 0:new Error(`RTL Text Plugin failed to import scripts from ${t}`),r)}}catch(e){n(e.toString())}}getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}getLayerIndex(e){let t=this.layerIndexes[e];return t||(t=this.layerIndexes[e]=new n),t}getWorkerSource(e,t,r){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][r]){const n={send:(t,r,n,o,i,a)=>{this.actor.send(t,r,n,e,i,a)},scheduler:this.actor.scheduler};this.workerSources[e][t][r]=new this.workerSourceTypes[t](n,this.getLayerIndex(e),this.getAvailableImages(e),this.isSpriteLoaded[e])}return this.workerSources[e][t][r]}getDEMWorkerSource(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new o),this.demWorkerSources[e][t]}enforceCacheSizeLimit(t,r){e.enforceCacheSizeLimit(r)}getWorkerPerformanceMetrics(e,t,r){r(void 0,void 0)}}return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new ue(self)),ue}),n(0,function(e){function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(let n=0;n{e.window.removeEventListener("click",f,!0)},0)}function h(e,t){const r=e.getBoundingClientRect();return y(e,r,t)}function m(e,t){const r=e.getBoundingClientRect(),n=[];for(let o=0;o=0?0:t.button}function y(t,r,n){const o=t.offsetWidth===r.width?1:t.offsetWidth/r.width;return new e.Point((n.clientX-r.left)*o,(n.clientY-r.top)*o)}function v(e,t){var r=t[0],n=t[1],o=t[2],i=t[3],a=r*i-o*n;return a?(e[0]=i*(a=1/a),e[1]=-n*a,e[2]=-o*a,e[3]=r*a,e):null}function b(e){const{userImage:t}=e;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}class _ extends e.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:e,callback:t}of this.requestors)this._notify(e,t);this.requestors=[]}}hasImage(e){return!!this.getImage(e)}getImage(e){return this.images[e]}addImage(e,t){this._validate(e,t)&&(this.images[e]=t)}_validate(t,r){let n=!0;return this._validateStretch(r.stretchX,r.data&&r.data.width)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "stretchX" value`))),n=!1),this._validateStretch(r.stretchY,r.data&&r.data.height)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "stretchY" value`))),n=!1),this._validateContent(r.content,r)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "content" value`))),n=!1),n}_validateStretch(e,t){if(!e)return!0;let r=0;for(const n of e){if(n[0]{this.ready=!0})}broadcast(t,r,n){e.asyncAll(this.actors,(e,n)=>{e.send(t,r,n)},n=n||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(e=>{e.remove()}),this.actors=[],this.workerPool.release(this.id)}}function M(t,r,n){return r*(e.EXTENT/(t.tileSize*Math.pow(2,n-t.tileID.overscaledZ)))}k.Actor=e.Actor;class R{constructor(e,t,r,n){this.screenBounds=e,this.cameraPoint=t,this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=r,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this._bufferedScreenMercator(0,n)}static createFromScreenPoints(t,r){let n,o;if(t instanceof e.Point||"number"==typeof t[0]){const i=e.Point.convert(t);n=[i],o=r.isPointAboveHorizon(i)}else{const i=e.Point.convert(t[0]),a=e.Point.convert(t[1]);n=[i,a],o=e.polygonizeBounds(i,a).every(e=>r.isPointAboveHorizon(e))}return new R(n,r.getCameraPoint(),o,r)}isPointQuery(){return 1===this.screenBounds.length}bufferedScreenGeometry(t){return e.polygonizeBounds(this.screenBounds[0],1===this.screenBounds.length?this.screenBounds[0]:this.screenBounds[1],t)}bufferedCameraGeometry(t){const r=this.screenBounds[0],n=1===this.screenBounds.length?this.screenBounds[0].add(new e.Point(1,1)):this.screenBounds[1],o=e.polygonizeBounds(r,n,0,!1);return this.cameraPoint.y>n.y&&(this.cameraPoint.x>r.x&&this.cameraPoint.x=n.x?o[2]=this.cameraPoint:this.cameraPoint.x<=r.x&&(o[3]=this.cameraPoint)),e.bufferConvexPolygon(o,t)}bufferedCameraGeometryGlobe(t){const r=this.screenBounds[0],n=1===this.screenBounds.length?this.screenBounds[0].add(new e.Point(1,1)):this.screenBounds[1],o=e.polygonizeBounds(r,n,t),i=this.cameraPoint.clone();switch(3*((i.y>r.y)+(i.y>n.y))+((i.x>r.x)+(i.x>n.x))){case 0:o[0]=i,o[4]=i.clone();break;case 1:o.splice(1,0,i);break;case 2:o[1]=i;break;case 3:o.splice(4,0,i);break;case 5:o.splice(2,0,i);break;case 6:o[3]=i;break;case 7:o.splice(3,0,i);break;case 8:o[2]=i}return o}containsTile(t,r,n,o=0){const i=t.queryPadding/r._pixelsPerMercatorPixel+1,a=n?this._bufferedCameraMercator(i,r):this._bufferedScreenMercator(i,r);let s=t.tileID.wrap+(a.unwrapped?o:0);const l=a.polygon.map(r=>e.getTilePoint(t.tileTransform,r,s));if(!e.polygonIntersectsBox(l,0,0,e.EXTENT,e.EXTENT))return;s=t.tileID.wrap+(this.screenGeometryMercator.unwrapped?o:0);const c=this.screenGeometryMercator.polygon.map(r=>e.getTileVec3(t.tileTransform,r,s)),u=c.map(t=>new e.Point(t[0],t[1])),d=r.getFreeCameraOptions().position||new e.MercatorCoordinate(0,0,0),f=e.getTileVec3(t.tileTransform,d,s),p=c.map(t=>{const r=e.sub(t,t,f);return e.normalize(r,r),new e.Ray(f,r)}),h=M(t,1,r.zoom)*r._pixelsPerMercatorPixel;return{queryGeometry:this,tilespaceGeometry:u,tilespaceRays:p,bufferedTilespaceGeometry:l,bufferedTilespaceBounds:(m=e.getBounds(l),m.min.x=e.clamp(m.min.x,0,e.EXTENT),m.min.y=e.clamp(m.min.y,0,e.EXTENT),m.max.x=e.clamp(m.max.x,0,e.EXTENT),m.max.y=e.clamp(m.max.y,0,e.EXTENT),m),tile:t,tileID:t.tileID,pixelToTileUnitsFactor:h};var m}_bufferedScreenMercator(e,t){const r=D(e);if(this._screenRaycastCache[r])return this._screenRaycastCache[r];{let n;return n="globe"===t.projection.name?this._projectAndResample(this.bufferedScreenGeometry(e),t):{polygon:this.bufferedScreenGeometry(e).map(e=>t.pointCoordinate3D(e)),unwrapped:!0},this._screenRaycastCache[r]=n,n}}_bufferedCameraMercator(e,t){const r=D(e);if(this._cameraRaycastCache[r])return this._cameraRaycastCache[r];{let n;return n="globe"===t.projection.name?this._projectAndResample(this.bufferedCameraGeometryGlobe(e),t):{polygon:this.bufferedCameraGeometry(e).map(e=>t.pointCoordinate3D(e)),unwrapped:!0},this._cameraRaycastCache[r]=n,n}}_projectAndResample(t,r){const n=function(t,r){const n=e.multiply([],r.pixelMatrix,r.globeMatrix),o=[0,-e.GLOBE_RADIUS,0,1],i=[0,e.GLOBE_RADIUS,0,1],a=[0,0,0,1];e.transformMat4$1(o,o,n),e.transformMat4$1(i,i,n),e.transformMat4$1(a,a,n);const s=new e.Point(o[0]/o[3],o[1]/o[3]),l=new e.Point(i[0]/i[3],i[1]/i[3]),c=e.polygonContainsPoint(t,s)&&o[3]1?P(t.slice(0,f),r):[],m=fnew e.Point(O(t.x),t.y)),m=m.map(t=>new e.Point(O(t.x),t.y));const g=[...h];0===g.length&&g.push(m[m.length-1]);const y=e.number(g[g.length-1].y,(0===m.length?h[0]:m[0]).y,p);let v;return v=c?[new e.Point(0,y),new e.Point(0,0),new e.Point(1,0),new e.Point(1,y)]:[new e.Point(1,y),new e.Point(1,1),new e.Point(0,1),new e.Point(0,y)],g.push(...v),0===m.length?g.push(h[0]):g.push(...m),{polygon:g.map(t=>new e.MercatorCoordinate(t.x,t.y)),unwrapped:!1}}(t,r);if(n)return n;const o=function(t,r){let n=!1,o=-1/0,i=0;for(let e=0;eo&&(o=t[e].x,i=e);for(let e=0;e.5&&(o.x{e.x-=1}),{polygon:t,unwrapped:n}}(P(t,r).map(t=>new e.Point(O(t.x),t.y)),r);return{polygon:o.polygon.map(t=>new e.MercatorCoordinate(t.x,t.y)),unwrapped:o.unwrapped}}}function P(t,r){return e.resample(t,e=>{const t=r.pointCoordinate3D(e);e.x=t.x,e.y=t.y},1/256)}function O(e){return e<0?1+e%1:e%1}function D(e){return 100*e|0}function L(t,r,n,o,i){const a=function(n,o){if(n)return i(n);if(o){t.url&&o.tiles&&t.tiles&&delete t.tiles;const n=e.pick(e.extend(o,t),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);o.vector_layers&&(n.vectorLayers=o.vector_layers,n.vectorLayerIds=n.vectorLayers.map(e=>e.id)),n.tiles=r.canonicalizeTileset(n,t.url),i(null,n)}};return t.url?e.getJSON(r.transformRequest(r.normalizeSourceURL(t.url,null,n,o),e.ResourceType.Source),a):e.exported.frame(()=>a(null,t))}class N{constructor(t,r,n){this.bounds=e.LngLatBounds.convert(this.validateBounds(t)),this.minzoom=r||0,this.maxzoom=n||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(t){const r=Math.pow(2,t.z),n=Math.floor(e.mercatorXfromLng(this.bounds.getWest())*r),o=Math.floor(e.mercatorYfromLat(this.bounds.getNorth())*r),i=Math.ceil(e.mercatorXfromLng(this.bounds.getEast())*r),a=Math.ceil(e.mercatorYfromLat(this.bounds.getSouth())*r);return t.x>=n&&t.x=o&&t.y{this._tileJSONRequest=null,this._loaded=!0,o?(r&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${r}`),n&&2!==n.length&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${n}`),this.fire(new e.ErrorEvent(o))):i&&(e.extend(this,i),i.bounds&&(this.tileBounds=new N(i.bounds,this.minzoom,this.maxzoom)),e.postTurnstileEvent(i.tiles,this.map._requestManager._customAccessToken),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"}))),t&&t(o)})}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}reload(){this.cancelTileJSONRequest(),this.load(()=>this.map.style._clearSource(this.id))}setTiles(e){return this._options.tiles=e,this.reload(),this}setUrl(e){return this.url=e,this._options.url=e,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return e.extend({},this._options)}loadTile(t,r){const n=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme)),o={request:this.map._requestManager.transformRequest(n,e.ResourceType.Tile),data:void 0,uid:t.uid,tileID:t.tileID,tileZoom:t.tileZoom,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:e.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,isSymbolTile:t.isSymbolTile};if(o.request.collectResourceTiming=this._collectResourceTiming,t.actor&&"expired"!==t.state)"loading"===t.state?t.reloadCallback=r:t.request=t.actor.send("reloadTile",o,i.bind(this));else if(t.actor=this._tileWorkers[n]=this._tileWorkers[n]||this.dispatcher.getActor(),this.dispatcher.ready)t.request=t.actor.send("loadTile",o,i.bind(this),void 0,!0);else{const r=e.loadVectorTile.call({deduped:this._deduped},o,(e,r)=>{e||!r?i.call(this,e):(o.data={cacheControl:r.cacheControl,expires:r.expires,rawData:r.rawData.slice(0)},t.actor&&t.actor.send("loadTile",o,i.bind(this),void 0,!0))},!0);t.request={cancel:r}}function i(n,o){return delete t.request,t.aborted?r(null):n&&404!==n.status?r(n):(o&&o.resourceTiming&&(t.resourceTiming=o.resourceTiming),this.map._refreshExpiredTiles&&o&&t.setExpiryData(o),t.loadVectorData(o,this.map.painter),e.cacheEntryPossiblyAdded(this.dispatcher),r(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}}abortTile(e){e.request&&(e.request.cancel(),delete e.request),e.actor&&e.actor.send("abortTile",{uid:e.uid,type:this.type,source:this.id})}unloadTile(e){e.unloadVectorData(),e.actor&&e.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})}hasTransition(){return!1}afterUpdate(){this._tileWorkers={}}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}class Ee extends e.Evented{constructor(t,r,n,o){super(),this.id=t,this.dispatcher=n,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.extend({type:"raster"},r),e.extend(this,e.pick(r,["url","scheme","tileSize"]))}load(t){this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=L(this._options,this.map._requestManager,null,null,(r,n)=>{this._tileJSONRequest=null,this._loaded=!0,r?this.fire(new e.ErrorEvent(r)):n&&(e.extend(this,n),n.bounds&&(this.tileBounds=new N(n.bounds,this.minzoom,this.maxzoom)),e.postTurnstileEvent(n.tiles),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"}))),t&&t(r)})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}reload(){this.cancelTileJSONRequest(),this.load(()=>this.map.style._clearSource(this.id))}setTiles(e){return this._options.tiles=e,this.reload(),this}setUrl(e){return this.url=e,this._options.url=e,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return e.extend({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(t,r){const n=e.exported.devicePixelRatio>=2,o=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),n,this.tileSize);t.request=e.getImage(this.map._requestManager.transformRequest(o,e.ResourceType.Tile),(n,o,i,a)=>(delete t.request,t.aborted?(t.state="unloaded",r(null)):n?(t.state="errored",r(n)):o?(this.map._refreshExpiredTiles&&t.setExpiryData({cacheControl:i,expires:a}),t.setTexture(o,this.map.painter),t.state="loaded",e.cacheEntryPossiblyAdded(this.dispatcher),void r(null)):r(null)))}static loadTileData(e,t,r){e.setTexture(t,r)}static unloadTileData(e,t){e.texture&&t.saveTileTexture(e.texture)}abortTile(e,t){e.request&&(e.request.cancel(),delete e.request),t()}unloadTile(e,t){e.texture&&this.map.painter.saveTileTexture(e.texture),t()}hasTransition(){return!1}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}function Te(t,r,n,o,i,a,s,l){const c=[t,n,i,r,o,a,1,1,1],u=[s,l,1],d=e.adjoint([],c),[f,p,h]=e.transformMat3(u,u,e.transpose(d,d));return e.multiply$1(c,[f,0,0,0,p,0,0,0,h],c)}class Ie extends e.Evented{constructor(e,t,r,n){super(),this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(n),this.options=t,this._dirty=!1}load(t,r){this._loaded=r||!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,this._imageRequest=e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(r,n)=>{if(this._imageRequest=null,this._loaded=!0,r)this.fire(new e.ErrorEvent(r));else if(n){const{HTMLImageElement:r}=e.window;this.image=n instanceof r?e.exported.getImageData(n):n,this._dirty=!0,this.width=this.image.width,this.height=this.image.height,t&&(this.coordinates=t),this._finishLoading()}})}loaded(){return this._loaded}updateImage(e){return this.image&&e.url?(this._imageRequest&&e.url!==this.options.url&&(this._imageRequest.cancel(),this._imageRequest=null),this.options.url=e.url,this.load(e.coordinates,this._loaded),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._imageRequest&&(this._imageRequest.cancel(),this._imageRequest=null),this.texture&&this.texture.destroy()}setCoordinates(t){this.coordinates=t,this._boundsArray=void 0;const r=t.map(e.MercatorCoordinate.fromLngLat);return this.tileID=function(t){let r=1/0,n=1/0,o=-1/0,i=-1/0;for(const e of t)r=Math.min(r,e.x),n=Math.min(n,e.y),o=Math.max(o,e.x),i=Math.max(i,e.y);const a=Math.max(o-r,i-n),s=Math.max(0,Math.floor(-Math.log(a)/Math.LN2)),l=Math.pow(2,s);return new e.CanonicalTileID(s,Math.floor((r+o)/2*l),Math.floor((n+i)/2*l))}(r),this.minzoom=this.maxzoom=this.tileID.z,this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this}_clear(){this._boundsArray=void 0}_prepareData(t){for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture)}if(this._boundsArray)return;const r=e.tileTransform(this.tileID,this.map.transform.projection),[n,o,i,a]=this.coordinates.map(t=>{const n=r.projection.project(t[0],t[1]);return e.getTilePoint(r,n)._round()});this.perspectiveTransform=function(t,r,n,o,i,a,s,l,c,u){const d=Te(0,0,t,0,0,r,t,r),f=Te(n,o,i,a,s,l,c,u);return e.multiply$1(f,e.adjoint(d,d),f),[f[6]/f[8]*t/e.EXTENT,f[7]/f[8]*r/e.EXTENT]}(this.width,this.height,n.x,n.y,o.x,o.y,a.x,a.y,i.x,i.y);const s=this._boundsArray=new e.StructArrayLayout4i8;s.emplaceBack(n.x,n.y,0,0),s.emplaceBack(o.x,o.y,e.EXTENT,0),s.emplaceBack(a.x,a.y,0,e.EXTENT),s.emplaceBack(i.x,i.y,e.EXTENT,e.EXTENT),this.boundsBuffer&&this.boundsBuffer.destroy(),this.boundsBuffer=t.createVertexBuffer(s,e.boundsAttributes.members),this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const t=this.map.painter.context,r=t.gl;this._dirty&&(this.texture?this.texture.update(this.image):(this.texture=new e.Texture(t,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this._dirty=!1),this._prepareData(t)}loadTile(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}const ke={vector:Ce,raster:Ee,"raster-dem":class extends Ee{constructor(t,r,n,o){super(t,r,n,o),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox"}loadTile(t,r){const n=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize);function o(e,n){e&&(t.state="errored",r(e)),n&&(t.dem=n,t.dem.onDeserialize(),t.needsHillshadePrepare=!0,t.needsDEMTextureUpload=!0,t.state="loaded",r(null))}t.request=e.getImage(this.map._requestManager.transformRequest(n,e.ResourceType.Tile),function(n,i,a,s){if(delete t.request,t.aborted)t.state="unloaded",r(null);else if(n)t.state="errored",r(n);else if(i){this.map._refreshExpiredTiles&&t.setExpiryData({cacheControl:a,expires:s});const r=e.window.ImageBitmap&&i instanceof e.window.ImageBitmap&&(null==ae&&(ae=e.window.OffscreenCanvas&&new e.window.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof e.window.createImageBitmap),ae),n=1-(i.width-e.prevPowerOfTwo(i.width))/2;n<1||t.neighboringTiles||(t.neighboringTiles=this._getNeighboringTiles(t.tileID));const l=r?i:e.exported.getImageData(i,n),c={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:l,encoding:this.encoding,padding:n};t.actor&&"expired"!==t.state||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",c,o.bind(this),void 0,!0))}}.bind(this))}_getNeighboringTiles(t){const r=t.canonical,n=Math.pow(2,r.z),o=(r.x-1+n)%n,i=0===r.x?t.wrap-1:t.wrap,a=(r.x+1+n)%n,s=r.x+1===n?t.wrap+1:t.wrap,l={};return l[new e.OverscaledTileID(t.overscaledZ,i,r.z,o,r.y).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,a,r.y).key]={backfilled:!1},r.y>0&&(l[new e.OverscaledTileID(t.overscaledZ,i,r.z,o,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+1{if(this._loaded=!0,this._pendingLoad=null,t)this.fire(new e.ErrorEvent(t));else{const t={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&r&&r.resourceTiming&&r.resourceTiming[this.id]&&(t.resourceTiming=r.resourceTiming[this.id]),this.fire(new e.Event("data",t)),this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(),this._coalesce=!1)})}loaded(){return this._loaded}loadTile(t,r){const n=t.actor?"reloadTile":"loadTile";t.actor=this.actor,t.request=this.actor.send(n,{type:this.type,uid:t.uid,tileID:t.tileID,tileZoom:t.tileZoom,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(e,o)=>(delete t.request,t.unloadVectorData(),t.aborted?r(null):e?r(e):(t.loadVectorData(o,this.map.painter,"reloadTile"===n),r(null))),void 0,"loadTile"===n)}abortTile(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0}unloadTile(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})}onRemove(){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return e.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}},video:class extends Ie{constructor(e,t,r,n){super(e,t,r,n),this.roundZoom=!0,this.type="video",this.options=t}load(){this._loaded=!1;const t=this.options;this.urls=[];for(const r of t.urls)this.urls.push(this.map._requestManager.transformRequest(r,e.ResourceType.Source).url);e.getVideo(this.urls,(t,r)=>{this._loaded=!0,t?this.fire(new e.ErrorEvent(t)):r&&(this.video=r,this.video.loop=!0,this.video.setAttribute("playsinline",""),this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const r=this.video.seekable;tr.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const t=this.map.painter.context,r=t.gl;this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),this.width=this.video.videoWidth,this.height=this.video.videoHeight),this._prepareData(t)}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},image:Ie,canvas:class extends Ie{constructor(t,r,n,o){super(t,r,n,o),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some(e=>!Array.isArray(e)||2!==e.length||e.some(e=>"number"!=typeof e))||this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const r=this.map.painter.context;this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(r,this.canvas,r.gl.RGBA,{premultiply:!0}),this._prepareData(r)}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}},custom:class extends e.Evented{constructor(t,r,n,o){super(),this.id=t,this.type="custom",this._dataType="raster",this._dispatcher=n,this._implementation=r,this.setEventedParent(o),this.scheme="xyz",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this._loaded=!1,this.roundZoom=!0,this._implementation||this.fire(new e.ErrorEvent(new Error(`Missing implementation for ${this.id} custom source`))),this._implementation.loadTile||this.fire(new e.ErrorEvent(new Error(`Missing loadTile implementation for ${this.id} custom source`))),this._implementation.bounds&&(this.tileBounds=new N(this._implementation.bounds,this.minzoom,this.maxzoom)),r.update=this._update.bind(this),r.clearTiles=this._clearTiles.bind(this),r.coveringTiles=this._coveringTiles.bind(this),e.extend(this,e.pick(r,["dataType","scheme","minzoom","maxzoom","tileSize","attribution","minTileCacheSize","maxTileCacheSize"]))}serialize(){return e.pick(this,["type","scheme","minzoom","maxzoom","tileSize","attribution"])}load(){this._loaded=!0,this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"}))}loaded(){return this._loaded}onAdd(t){this._map=t,this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._implementation.onAdd&&this._implementation.onAdd(t),this.load()}onRemove(e){this._implementation.onRemove&&this._implementation.onRemove(e)}hasTile(e){if(this._implementation.hasTile){const{x:t,y:r,z:n}=e.canonical;return this._implementation.hasTile({x:t,y:r,z:n})}return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(t,r){const{x:n,y:o,z:i}=t.tileID.canonical,a=new e.window.AbortController;t.request=Promise.resolve(this._implementation.loadTile({x:n,y:o,z:i},{signal:a.signal})).then(function(n){return delete t.request,t.aborted?(t.state="unloaded",r(null)):void 0===n?(t.state="errored",r(null)):null===n?(this.loadTileData(t,{width:this.tileSize,height:this.tileSize,data:null}),t.state="loaded",r(null)):function(t){return t instanceof e.window.ImageData||t instanceof e.window.HTMLCanvasElement||t instanceof e.window.ImageBitmap||t instanceof e.window.HTMLImageElement}(n)?(this.loadTileData(t,n),t.state="loaded",void r(null)):(t.state="errored",r(new Error(`Can't infer data type for ${this.id}, only raster data supported at the moment`)))}.bind(this)).catch(e=>{20!==e.code&&(t.state="errored",r(e))}),t.request.cancel=()=>a.abort()}loadTileData(e,t){Ee.loadTileData(e,t,this._map.painter)}unloadTileData(e){Ee.unloadTileData(e,this._map.painter)}unloadTile(e,t){if(this.unloadTileData(e),this._implementation.unloadTile){const{x:t,y:r,z:n}=e.tileID.canonical;this._implementation.unloadTile({x:t,y:r,z:n})}t()}abortTile(e,t){e.request&&e.request.cancel&&(e.request.cancel(),delete e.request),t()}hasTransition(){return!1}_coveringTiles(){return this._map.transform.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,roundZoom:this.roundZoom}).map(e=>({x:e.canonical.x,y:e.canonical.y,z:e.canonical.z}))}_clearTiles(){this._map.style._clearSource(this.id)}_update(){this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"}))}}},Me=function(t,r,n,o){const i=new ke[r.type](t,r,n,o);if(i.id!==t)throw new Error(`Expected Source id to be ${t} instead of ${i.id}`);return e.bindAll(["load","abort","unload","serialize","prepare"],i),i};function Re(t,r){const n=e.identity([]);return e.scale(n,n,[.5*t.width,.5*-t.height,1]),e.translate(n,n,[1,-1,0]),e.multiply(n,n,t.calculateProjMatrix(r.toUnwrapped())),Float32Array.from(n)}function Pe(e,t,r,n,o,i,a,s=!1){const l=e.tilesIn(n,a,s);l.sort(De);const c=[];for(const n of l)c.push({wrappedTileID:n.tile.tileID.wrapped().key,queryResults:n.tile.queryRenderedFeatures(t,r,e._state,n,o,i,Re(e.transform,n.tile.tileID),s)});const u=function(e){const t={},r={};for(const n of e){const e=n.queryResults,o=n.wrappedTileID,i=r[o]=r[o]||{};for(const r in e){const n=e[r],o=i[r]=i[r]||{},a=t[r]=t[r]||[];for(const e of n)o[e.featureIndex]||(o[e.featureIndex]=!0,a.push(e))}}return t}(c);for(const t in u)u[t].forEach(t=>{const r=t.feature,n=r.layer;n&&"background"!==n.type&&"sky"!==n.type&&(r.source=n.source,n["source-layer"]&&(r.sourceLayer=n["source-layer"]),r.state=void 0!==r.id?e.getFeatureState(n["source-layer"],r.id):{})});return u}function Oe(e,t){const r=e.getRenderableIds().map(t=>e.getTileByID(t)),n=[],o={};for(let e=0;e{e.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Ne]}numActive(){return Object.keys(this.active).length}}let ze;function Be(){return ze||(ze=new Fe),ze}function je(t,r){const n={};for(const e in t)"ref"!==e&&(n[e]=t[e]);return e.refProperties.forEach(e=>{e in r&&(n[e]=r[e])}),n}function $e(e){e=e.slice();const t=Object.create(null);for(let r=0;r0?(o-a)/s:0;return this.points[i].mult(1-l).add(this.points[r].mult(l))}}class Ke{constructor(e,t,r){const n=this.boxCells=[],o=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let e=0;ethis.width||n<0||t>this.height)return!o&&[];const a=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(o)return!0;for(let e=0;e0:a}_queryCircle(e,t,r,n,o){const i=e-r,a=e+r,s=t-r,l=t+r;if(a<0||i>this.width||l<0||s>this.height)return!n&&[];const c=[];return this._forEachCell(i,s,a,l,this._queryCellCircle,c,{hitTest:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}},o),n?c.length>0:c}query(e,t,r,n,o){return this._query(e,t,r,n,!1,o)}hitTest(e,t,r,n,o){return this._query(e,t,r,n,!0,o)}hitTestCircle(e,t,r,n){return this._queryCircle(e,t,r,!0,n)}_queryCell(e,t,r,n,o,i,a,s){const l=a.seenUids,c=this.boxCells[o];if(null!==c){const o=this.bboxes;for(const u of c)if(!l.box[u]){l.box[u]=!0;const c=4*u;if(e<=o[c+2]&&t<=o[c+3]&&r>=o[c+0]&&n>=o[c+1]&&(!s||s(this.boxKeys[u]))){if(a.hitTest)return i.push(!0),!0;i.push({key:this.boxKeys[u],x1:o[c],y1:o[c+1],x2:o[c+2],y2:o[c+3]})}}}const u=this.circleCells[o];if(null!==u){const o=this.circles;for(const c of u)if(!l.circle[c]){l.circle[c]=!0;const u=3*c;if(this._circleAndRectCollide(o[u],o[u+1],o[u+2],e,t,r,n)&&(!s||s(this.circleKeys[c]))){if(a.hitTest)return i.push(!0),!0;{const e=o[u],t=o[u+1],r=o[u+2];i.push({key:this.circleKeys[c],x1:e-r,y1:t-r,x2:e+r,y2:t+r})}}}}}_queryCellCircle(e,t,r,n,o,i,a,s){const l=a.circle,c=a.seenUids,u=this.boxCells[o];if(null!==u){const e=this.bboxes;for(const t of u)if(!c.box[t]){c.box[t]=!0;const r=4*t;if(this._circleAndRectCollide(l.x,l.y,l.radius,e[r+0],e[r+1],e[r+2],e[r+3])&&(!s||s(this.boxKeys[t])))return i.push(!0),!0}}const d=this.circleCells[o];if(null!==d){const e=this.circles;for(const t of d)if(!c.circle[t]){c.circle[t]=!0;const r=3*t;if(this._circlesCollide(e[r],e[r+1],e[r+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[t])))return i.push(!0),!0}}}_forEachCell(e,t,r,n,o,i,a,s){const l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(r),d=this._convertToYCellCoord(n);for(let f=l;f<=u;f++)for(let l=c;l<=d;l++)if(o.call(this,e,t,r,n,this.xCellCount*l+f,i,a,s))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,r,n,o,i){const a=n-e,s=o-t,l=r+i;return l*l>a*a+s*s}_circleAndRectCollide(e,t,r,n,o,i,a){const s=(i-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;const c=(a-o)/2,u=Math.abs(t-(o+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;const d=l-s,f=u-c;return d*d+f*f<=r*r}}const Je=0,Qe=1,et=2,tt=Math.tan(85*Math.PI/180);function rt(t,r,n,o,i,a,s){const l=e.create();if(n)if("globe"===a.name){const t=e.calculateGlobeLabelMatrix(i,r);e.multiply(l,l,t)}else{const t=v([],s);l[0]=t[0],l[1]=t[1],l[4]=t[2],l[5]=t[3],o||e.rotateZ(l,l,i.angle)}else e.multiply(l,i.labelPlaneMatrix,t);return l}function nt(e,t,r,n,o,i,a){const s=rt(e,t,r,n,o,i,a);return"globe"===i.name&&r||(s[2]=s[6]=s[10]=s[14]=0),s}function ot(t,r,n,o,i,a,s){if(n){if("globe"===a.name){const l=rt(t,r,n,o,i,a,s);return e.invert(l,l),e.multiply(l,t,l),l}{const r=e.clone(t),n=e.identity([]);return n[0]=s[0],n[1]=s[1],n[4]=s[2],n[5]=s[3],e.multiply(r,r,n),o||e.rotateZ(r,r,-i.angle),r}}return i.glCoordMatrix}function it(t,r,n,o){const i=[t,r,n,1];n?e.transformMat4$1(i,i,o):gt(i,i,o);const a=i[3];return i[0]/=a,i[1]/=a,i[2]/=a,i}function at(e,t){return Math.min(.5+e/t*.5,1.5)}function st(e,t){const r=e[0]/e[3],n=e[1]/e[3];return r>=-t[0]&&r<=t[0]&&n>=-t[1]&&n<=t[1]}function lt(t,r,n,o,i,a,s,l,c,u){const d=n.transform,f=o?t.textSizeData:t.iconSizeData,p=e.evaluateSizeForZoom(f,n.transform.zoom),h="globe"===d.projection.name,m=[256/n.width*2+1,256/n.height*2+1],g=o?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;g.clear();let y=null;h&&(y=o?t.text.globeExtVertexArray:t.icon.globeExtVertexArray);const v=t.lineVertexArray,b=o?t.text.placedSymbolArray:t.icon.placedSymbolArray,_=n.transform.width/n.transform.height;let x,w=!1;for(let o=0;oMath.abs(n)?{useVertical:!0}:t===e.WritingMode.vertical?o>0?{needsFlipping:!0}:null:r!==Je&&function(e,t){return 0===e||Math.abs(t/e)>tt}(n,o)?r===Qe?{needsFlipping:!0}:null:n<0?{needsFlipping:!0}:null}function dt(t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b){const _=r/24,x=t.lineOffsetX*_,w=t.lineOffsetY*_,{lineStartIndex:A,glyphStartIndex:S,numGlyphs:C,segment:E,writingMode:T,flipState:I}=t,k=A+t.lineLength,M=t=>{if(d){const[r,n,o]=t.up,i=u.length;e.updateGlobeVertexNormal(d,i+0,r,n,o),e.updateGlobeVertexNormal(d,i+1,r,n,o),e.updateGlobeVertexNormal(d,i+2,r,n,o),e.updateGlobeVertexNormal(d,i+3,r,n,o)}const[r,n,o]=t.point;e.addDynamicAttributes(u,r,n,o,t.angle)};if(C>1){const e=ct(_,l,x,w,n,f,p,t,c,a,h,g,!1,y,v,b);if(!e)return{notEnoughRoom:!0};if(o&&!n){let[r,n,o]=e.first.point,[i,a,l]=e.last.point;[r,n]=it(r,n,o,s),[i,a]=it(i,a,l,s);const c=ut(T,I,(i-r)*m,a-n);if(t.flipState=c&&c.needsFlipping?Qe:et,c)return c}M(e.first);for(let e=S+1;e0?a:pt(p,o,r,1,i,void 0,y,v.canonical),l=ut(T,I,(s[0]-r[0])*m,s[1]-r[1]);if(t.flipState=l&&l.needsFlipping?Qe:et,l)return l}const r=ht(_*l.getoffsetX(S),x,w,n,f,p,E,A,k,c,a,h,g,!1,!1,y,v,b);if(!r)return{notEnoughRoom:!0};M(r)}return{}}function ft(e,t,r,n,o){const{x:i,y:a,z:s}=n.projectTilePoint(e.x,e.y,t);if(!o)return it(i,a,s,r);const[l,c,u]=o(e);return it(i+l,a+c,s+u,r)}function pt(t,r,n,o,i,a,s,l){const c=ft(t.sub(r)._unit()._add(t),l,i,s,a);return e.sub(c,n,c),e.normalize(c,c),e.scaleAndAdd(c,n,c,o)}function ht(t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v){const b=o?t-r:t+r;let _=b>0?1:-1,x=0;o&&(_*=-1,x=Math.PI),_<0&&(x+=Math.PI);let w=l+s+(_>0?0:1)|0,A=i,S=i,C=0,E=0;const T=Math.abs(b),I=[],k=[];let M=a,R=M;const P=()=>pt(R,M,S,T-C+1,d,p,g,y.canonical);for(;C+E<=T;){if(w+=_,w=c)return null;if(S=A,R=M,I.push(S),h&&k.push(R),M=new e.Point(u.getx(w),u.gety(w)),A=f[w],!A){const e=ft(M,y.canonical,d,g,p);A=e[3]>0?f[w]=e:P()}C+=E,E=e.distance(S,A)}m&&p&&(f[w]&&(A=P(),E=e.distance(S,A)),f[w]=A);const O=(T-C)/E,D=M.sub(R)._mult(O)._add(R),L=e.sub([],A,S),N=e.scaleAndAdd([],S,L,O);let F=[0,0,1],z=L[0],B=L[1];if(v&&(F=g.upVector(y.canonical,D.x,D.y),0!==F[0]||0!==F[1]||1!==F[2])){const t=[F[2],0,-F[0]],r=e.cross([],F,t);e.normalize(t,t),e.normalize(r,r),z=e.dot(L,t),B=e.dot(L,r)}if(n){const t=e.cross([],F,L);e.normalize(t,t),e.scaleAndAdd(N,N,t,n*_)}const j=x+Math.atan2(B,z);return I.push(N),h&&k.push(D),{point:N,angle:j,path:I,tilePath:k,up:F}}function mt(e,t){const r=t.length,n=r+4*e;t.resize(n),t.float32.fill(-1/0,4*r,4*n)}function gt(e,t,r){const n=t[0],o=t[1];return e[0]=r[0]*n+r[4]*o+r[12],e[1]=r[1]*n+r[5]*o+r[13],e[3]=r[3]*n+r[7]*o+r[15],e}const yt=100;class vt{constructor(e,t,r=new Ke(e.width+200,e.height+200,25),n=new Ke(e.width+200,e.height+200,25)){this.transform=e,this.grid=r,this.ignoredGrid=n,this.pitchfactor=Math.cos(e._pitch)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+yt,this.screenBottomBoundary=e.height+yt,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.fogState=t}placeCollisionBox(e,t,r,n,o,i,a,s){let l=r.projectedAnchorX,c=r.projectedAnchorY,u=r.projectedAnchorZ;const d=r.elevation,f=r.tileID,p=e.getProjection();if(d&&f){const[e,t,n]=p.upVector(f.canonical,r.tileAnchorX,r.tileAnchorY),o=p.upVectorScale(f.canonical,this.transform.center.lat,this.transform.worldSize).metersToTile;l+=e*d*o,c+=t*d*o,u+=n*d*o}const h=this.projectAndGetPerspectiveRatio(a,l,c,u,r.tileID,"globe"===p.name||!!d||this.transform.pitch>0,p),m=i*h.perspectiveRatio,g=(r.x1*t+n.x-r.padding)*m+h.point.x,y=(r.y1*t+n.y-r.padding)*m+h.point.y,v=(r.x2*t+n.x+r.padding)*m+h.point.x,b=(r.y2*t+n.y+r.padding)*m+h.point.y,_=h.perspectiveRatio<=.55||h.occluded;return!this.isInsideGrid(g,y,v,b)||!o&&this.grid.hitTest(g,y,v,b,s)||_?{box:[],offscreen:!1,occluded:h.occluded}:{box:[g,y,v,b],offscreen:this.isOffscreen(g,y,v,b),occluded:!1}}placeCollisionCircles(t,r,n,o,i,a,s,l,c,u,d,f,p,h,m){const g=[],y=this.transform.elevation,v=t.getProjection(),b=y?y.getAtTileOffsetFunc(m,this.transform.center.lat,this.transform.worldSize,v):null,_=new e.Point(n.tileAnchorX,n.tileAnchorY);let{x,y:w,z:A}=v.projectTilePoint(_.x,_.y,m.canonical);if(b){const[e,t,r]=b(_);x+=e,w+=t,A+=r}const S="globe"===v.name,C=this.projectAndGetPerspectiveRatio(s,x,w,A,m,S||!!y||this.transform.pitch>0,v),{perspectiveRatio:E}=C,T=(d?a/E:a*E)/e.ONE_EM,I=it(x,w,A,l),k=C.signedDistanceFromCamera>0?ct(T,i,n.lineOffsetX*T,n.lineOffsetY*T,!1,I,_,n,o,l,{},y&&!d?b:null,d&&!!y,v,m,d):null;let M=!1,R=!1,P=!0;if(k&&!C.occluded){const t=.5*p*E+h,n=new e.Point(-100,-100),o=new e.Point(this.screenRightBoundary,this.screenBottomBoundary),i=new Xe,{first:a,last:s}=k,l=a.path.length;let d=[];for(let e=l-1;e>=1;e--)d.push(a.path[e]);for(let e=1;e(b&&!S&&(r=b(ne[3]<=0)&&(d=[]));let y=[];if(d.length>0){let t=1/0,r=-1/0,i=1/0,a=-1/0;for(const e of d)t=Math.min(t,e[0]),i=Math.min(i,e[1]),r=Math.max(r,e[0]),a=Math.max(a,e[1]);r>=n.x&&t<=o.x&&a>=n.y&&i<=o.y&&(y=[d.map(t=>new e.Point(t[0],t[1]))],(to.x||io.y)&&(y=e.clipLine(y,n.x,n.y,o.x,o.y)))}for(const e of y){i.reset(e,.25*t);let n=0;n=i.length<=.5*t?1:Math.ceil(i.paddedLength/m)+1;for(let e=0;e0){if(e.transformMat4$1(l,l,t),this.fogState&&i&&"globe"!==s.name){const t=function(t,r,n,o,i,a){const s=a.calculateFogTileMatrix(i),l=[r,n,o];return e.transformMat4(l,l,s),C(t,l,a.pitch,a._fov)}(this.fogState,r,n,o,i.toUnwrapped(),this.transform);c=t>.9}}else gt(l,l,t);const u=l[3];return{point:new e.Point((l[0]/u+1)/2*this.transform.width+yt,(-l[1]/u+1)/2*this.transform.height+yt),perspectiveRatio:Math.min(.5+this.transform.getCameraToCenterDistance(s)/u*.5,1.5),signedDistanceFromCamera:u,occluded:a&&l[2]>u||c}}isOffscreen(e,t,r,n){return r=this.screenRightBoundary||nthis.screenBottomBoundary}isInsideGrid(e,t,r,n){return r>=0&&e=0&&te.collisionGroupID===t}}return this.collisionGroups[e]}}function It(t,r,n,o,i){const{horizontalAlign:a,verticalAlign:s}=e.getAnchorAlignment(t),l=-(a-.5)*r,c=-(s-.5)*n,u=e.evaluateVariableOffset(t,o);return new e.Point(l+u[0]*i,c+u[1]*i)}function kt(t,r,n,o,i){const a=new e.Point(t,r);return n&&a._rotate(o?i:-i),a}class Mt{constructor(e,t,r,n,o){this.transform=e.clone(),this.projection=e.projection.name,this.collisionIndex=new vt(this.transform,o),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=t,this.retainedQueryData={},this.collisionGroups=new Tt(r),this.collisionCircleArrays={},this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(t,r,n,o){const i=n.getBucket(r),a=n.latestFeatureIndex;if(!i||!a||r.id!==i.layerIds[0])return;const s=i.layers[0].layout,l=n.collisionBoxArray,c=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),u=n.tileSize/e.EXTENT,d=n.tileID.toUnwrapped();this.transform.setProjection(i.projection);const f=(p=n.tileID,h=i.getProjection(),m=this.transform,h.name===this.projection?m.calculateProjMatrix(p.toUnwrapped()):bt(m,h,p));var p,h,m;const g="map"===s.get("text-pitch-alignment"),y="map"===s.get("text-rotation-alignment");r.compileFilter();const v=r.dynamicFilter(),b=r.dynamicFilterNeedsFeature(),_=this.transform.calculatePixelsToTileUnitsMatrix(n),x=nt(f,n.tileID.canonical,g,y,this.transform,i.getProjection(),_);let w=null;if(g){const t=ot(f,n.tileID.canonical,g,y,this.transform,i.getProjection(),_);w=e.multiply([],this.transform.labelPlaneMatrix,t)}let A=null;v&&n.latestFeatureIndex&&(A={unwrappedTileID:d,dynamicFilter:v,dynamicFilterNeedsFeature:b,featureIndex:n.latestFeatureIndex}),this.retainedQueryData[i.bucketInstanceId]=new Et(i.bucketInstanceId,a,i.sourceLayerIndex,i.index,n.tileID);const S={bucket:i,layout:s,posMatrix:f,textLabelPlaneMatrix:x,labelToScreenMatrix:w,clippingData:A,scale:c,textPixelRatio:u,holdingForFade:n.holdingForFade(),collisionBoxArray:l,partiallyEvaluatedTextSize:e.evaluateSizeForZoom(i.textSizeData,this.transform.zoom),partiallyEvaluatedIconSize:e.evaluateSizeForZoom(i.iconSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(i.sourceID)};if(o)for(const e of i.sortKeyRanges){const{sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:o}=e;t.push({sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:o,parameters:S})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:i.symbolInstances.length,parameters:S})}attemptAnchorPlacement(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y){const{textOffset0:v,textOffset1:b,crossTileID:_}=d,x=[v,b],w=It(e,r,n,x,o),A=this.collisionIndex.placeCollisionBox(p,o,t,kt(w.x,w.y,i,a,this.transform.angle),u,s,l,c.predicate);if(m){const e=p.getSymbolInstanceIconSize(y,this.transform.zoom,d.placedIconSymbolIndex);if(0===this.collisionIndex.placeCollisionBox(p,e,m,kt(w.x,w.y,i,a,this.transform.angle),u,s,l,c.predicate).box.length)return}if(A.box.length>0){let t;return this.prevPlacement&&this.prevPlacement.variableOffsets[_]&&this.prevPlacement.placements[_]&&this.prevPlacement.placements[_].text&&(t=this.prevPlacement.variableOffsets[_].anchor),this.variableOffsets[_]={textOffset:x,width:r,height:n,anchor:e,textScale:o,prevAnchor:t},this.markUsedJustification(p,e,d,h),p.allowVerticalPlacement&&(this.markUsedOrientation(p,h,d),this.placedOrientations[_]=h),{shift:w,placedGlyphBoxes:A}}}placeLayerBucketPart(t,r,n,o){const{bucket:i,layout:a,posMatrix:s,textLabelPlaneMatrix:l,labelToScreenMatrix:c,clippingData:u,textPixelRatio:d,holdingForFade:f,collisionBoxArray:p,partiallyEvaluatedTextSize:h,partiallyEvaluatedIconSize:m,collisionGroup:g}=t.parameters,y=a.get("text-optional"),v=a.get("icon-optional"),b=a.get("text-allow-overlap"),_=a.get("icon-allow-overlap"),x="map"===a.get("text-rotation-alignment"),w="map"===a.get("text-pitch-alignment"),A="none"!==a.get("icon-text-fit"),S="viewport-y"===a.get("symbol-z-order");this.transform.setProjection(i.projection);let C=b&&(_||!i.hasIconData()||v),E=_&&(b||!i.hasTextData()||y);!i.collisionArrays&&p&&i.deserializeCollisionBoxes(p),n&&o&&i.updateCollisionDebugBuffers(this.transform.zoom,p);const T=(t,o,p)=>{const{crossTileID:S,numVerticalGlyphVertices:T}=t;if(u){const n={zoom:this.transform.zoom,pitch:this.transform.pitch};let o=null;if(u.dynamicFilterNeedsFeature){const e=this.retainedQueryData[i.bucketInstanceId];o=u.featureIndex.loadFeature({featureIndex:t.featureIndex,bucketIndex:e.bucketIndex,sourceLayerIndex:e.sourceLayerIndex,layoutVertexArrayOffset:0})}if(!(0,u.dynamicFilter)(n,o,this.retainedQueryData[i.bucketInstanceId].tileID.canonical,new e.Point(t.tileAnchorX,t.tileAnchorY),this.transform.calculateDistanceTileData(u.unwrappedTileID)))return this.placements[S]=new St(!1,!1,!1,!0),void r.add(S)}if(r.has(S))return;if(f)return void(this.placements[S]=new St(!1,!1,!1));let I=!1,k=!1,M=!0,R=!1,P=!1,O=null,D={box:null,offscreen:null,occluded:null},L={box:null,offscreen:null,occluded:null},N=null,F=null,z=null,B=0,j=0,$=0;p.textFeatureIndex?B=p.textFeatureIndex:t.useRuntimeCollisionCircles&&(B=t.featureIndex),p.verticalTextFeatureIndex&&(j=p.verticalTextFeatureIndex);const U=e=>{e.tileID=this.retainedQueryData[i.bucketInstanceId].tileID;const t=this.transform.elevation;(t||e.elevation)&&(e.elevation=t?t.getAtTileOffset(e.tileID,e.tileAnchorX,e.tileAnchorY):0)},V=p.textBox;if(V){U(V);const r=r=>{let n=e.WritingMode.horizontal;if(i.allowVerticalPlacement&&!r&&this.prevPlacement){const e=this.prevPlacement.placedOrientations[S];e&&(this.placedOrientations[S]=e,n=e,this.markUsedOrientation(i,n,t))}return n},n=(t,r)=>{if(i.allowVerticalPlacement&&T>0&&p.verticalTextBox){for(const n of i.writingModes)if(n===e.WritingMode.vertical?(D=r(),L=D):D=t(),D&&D.box&&D.box.length)break}else D=t()};if(a.get("text-variable-anchor")){let l=a.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[S]){const e=this.prevPlacement.variableOffsets[S];l.indexOf(e.anchor)>0&&(l=l.filter(t=>t!==e.anchor),l.unshift(e.anchor))}const c=(e,r,n)=>{const a=i.getSymbolInstanceTextSize(h,t,this.transform.zoom,o),c=(e.x2-e.x1)*a+2*e.padding,u=(e.y2-e.y1)*a+2*e.padding,f=A&&!_?r:null;f&&U(f);let p={box:[],offscreen:!1,occluded:!1};const y=b?2*l.length:l.length;for(let r=0;r=l.length,t,o,i,n,f,h,m);if(y&&(p=y.placedGlyphBoxes,p&&p.box&&p.box.length)){I=!0,O=y.shift;break}}return p};n(()=>c(V,p.iconBox,e.WritingMode.horizontal),()=>{const t=p.verticalTextBox;return t&&U(t),i.allowVerticalPlacement&&!(D&&D.box&&D.box.length)&&T>0&&t?c(t,p.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null,occluded:null}}),D&&(I=D.box,M=D.offscreen,R=D.occluded);const u=r(!(!D||!D.box));if(!I&&this.prevPlacement){const e=this.prevPlacement.variableOffsets[S];e&&(this.variableOffsets[S]=e,this.markUsedJustification(i,e.anchor,t,u))}}else{const a=(r,n)=>{const a=i.getSymbolInstanceTextSize(h,t,this.transform.zoom,o),l=this.collisionIndex.placeCollisionBox(i,a,r,new e.Point(0,0),b,d,s,g.predicate);return l&&l.box&&l.box.length&&(this.markUsedOrientation(i,n,t),this.placedOrientations[S]=n),l};n(()=>a(V,e.WritingMode.horizontal),()=>{const t=p.verticalTextBox;return i.allowVerticalPlacement&&T>0&&t?(U(t),a(t,e.WritingMode.vertical)):{box:null,offscreen:null,occluded:null}}),r(!!(D&&D.box&&D.box.length))}}if(N=D,I=N&&N.box&&N.box.length>0,M=N&&N.offscreen,R=N&&N.occluded,t.useRuntimeCollisionCircles){const r=i.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex>=0?t.centerJustifiedTextSymbolIndex:t.verticalPlacedTextSymbolIndex),o=e.evaluateSizeForFeature(i.textSizeData,h,r),u=a.get("text-padding");F=this.collisionIndex.placeCollisionCircles(i,b,r,i.lineVertexArray,i.glyphOffsetArray,o,s,l,c,n,w,g.predicate,t.collisionCircleDiameter*o/e.ONE_EM,u,this.retainedQueryData[i.bucketInstanceId].tileID),I=b||F.circles.length>0&&!F.collisionDetected,M=M&&F.offscreen,R=F.occluded}if(p.iconFeatureIndex&&($=p.iconFeatureIndex),p.iconBox){const r=r=>{U(r);const n=A&&O?kt(O.x,O.y,x,w,this.transform.angle):new e.Point(0,0),o=i.getSymbolInstanceIconSize(m,this.transform.zoom,t.placedIconSymbolIndex);return this.collisionIndex.placeCollisionBox(i,o,r,n,_,d,s,g.predicate)};L&&L.box&&L.box.length&&p.verticalIconBox?(z=r(p.verticalIconBox),k=z.box.length>0):(z=r(p.iconBox),k=z.box.length>0),M=M&&z.offscreen,P=z.occluded}const H=y||0===t.numHorizontalGlyphVertices&&0===T,G=v||0===t.numIconVertices;if(H||G?G?H||(k=k&&I):I=k&&I:k=I=k&&I,I&&N&&N.box&&this.collisionIndex.insertCollisionBox(N.box,a.get("text-ignore-placement"),i.bucketInstanceId,L&&L.box&&j?j:B,g.ID),k&&z&&this.collisionIndex.insertCollisionBox(z.box,a.get("icon-ignore-placement"),i.bucketInstanceId,$,g.ID),F&&(I&&this.collisionIndex.insertCollisionCircles(F.circles,a.get("text-ignore-placement"),i.bucketInstanceId,B,g.ID),n)){const e=i.bucketInstanceId;let t=this.collisionCircleArrays[e];void 0===t&&(t=this.collisionCircleArrays[e]=new Ct);for(let e=0;e=0;--t){const r=e[t];T(i.symbolInstances.get(r),r,i.collisionArrays[r])}}else for(let e=t.symbolInstanceStart;e=0&&(t.text.placedSymbolArray.get(i).crossTileID=d>=0&&i!==d?0:c),a>=0&&(t.text.placedSymbolArray.get(a).crossTileID=d>=0&&a!==d?0:c),s>=0&&(t.text.placedSymbolArray.get(s).crossTileID=d>=0&&s!==d?0:c),l>=0&&(t.text.placedSymbolArray.get(l).crossTileID=d>=0&&l!==d?0:c)}markUsedOrientation(t,r,n){const o=r===e.WritingMode.horizontal||r===e.WritingMode.horizontalOnly?r:0,i=r===e.WritingMode.vertical?r:0,{leftJustifiedTextSymbolIndex:a,centerJustifiedTextSymbolIndex:s,rightJustifiedTextSymbolIndex:l,verticalPlacedTextSymbolIndex:c}=n,u=t.text.placedSymbolArray;a>=0&&(u.get(a).placedOrientation=o),s>=0&&(u.get(s).placedOrientation=o),l>=0&&(u.get(l).placedOrientation=o),c>=0&&(u.get(c).placedOrientation=i)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const n=t?t.symbolFadeChange(e):1,o=t?t.opacities:{},i=t?t.variableOffsets:{},a=t?t.placedOrientations:{};for(const e in this.placements){const t=this.placements[e],i=o[e];i?(this.opacities[e]=new At(i,n,t.text,t.icon,null,t.clipped),r=r||t.text!==i.text.placed||t.icon!==i.icon.placed):(this.opacities[e]=new At(null,n,t.text,t.icon,t.skipFade,t.clipped),r=r||t.text||t.icon)}for(const e in o){const t=o[e];if(!this.opacities[e]){const o=new At(t,n,!1,!1);o.isHidden()||(this.opacities[e]=o,r=r||t.text.placed||t.icon.placed)}}for(const e in i)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=i[e]);for(const e in a)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=a[e]);r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){const r=new Set;for(const n of t){const t=n.getBucket(e);t&&n.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,r,n.collisionBoxArray)}}updateBucketOpacities(t,r,n){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const o=t.layers[0].layout,i=!!t.layers[0].dynamicFilter(),a=new At(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),l=o.get("icon-allow-overlap"),c=o.get("text-variable-anchor"),u="map"===o.get("text-rotation-alignment"),d="map"===o.get("text-pitch-alignment"),f="none"!==o.get("icon-text-fit"),p=new At(null,0,s&&(l||!t.hasIconData()||o.get("icon-optional")),l&&(s||!t.hasTextData()||o.get("text-optional")),!0);!t.collisionArrays&&n&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(n);const h=(e,t,r)=>{for(let n=0;n0||l>0,x=y>0,w=this.placedOrientations[g],A=w===e.WritingMode.vertical,S=w===e.WritingMode.horizontal||w===e.WritingMode.horizontalOnly;if(!_&&!x||b.isHidden()||m++,_){const e=Bt(b.text);h(t.text,s,A?jt:e),h(t.text,l,S?jt:e);const r=b.text.isHidden(),{leftJustifiedTextSymbolIndex:n,centerJustifiedTextSymbolIndex:i,rightJustifiedTextSymbolIndex:a,verticalPlacedTextSymbolIndex:c}=o,u=t.text.placedSymbolArray,d=r||A?1:0;n>=0&&(u.get(n).hidden=d),i>=0&&(u.get(i).hidden=d),a>=0&&(u.get(a).hidden=d),c>=0&&(u.get(c).hidden=r||S?1:0);const f=this.variableOffsets[g];f&&this.markUsedJustification(t,f.anchor,o,w);const p=this.placedOrientations[g];p&&(this.markUsedJustification(t,"left",o,p),this.markUsedOrientation(t,p,o))}if(x){const e=Bt(b.icon),{placedIconSymbolIndex:r,verticalPlacedIconSymbolIndex:n}=o,i=t.icon.placedSymbolArray,a=b.icon.isHidden()?1:0;r>=0&&(h(t.icon,y,A?jt:e),i.get(r).hidden=a),n>=0&&(h(t.icon,o.numVerticalIconVertices,S?jt:e),i.get(n).hidden=a)}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const r=t.collisionArrays[n];if(r){let n=new e.Point(0,0),o=!0;if(r.textBox||r.verticalTextBox){if(c){const e=this.variableOffsets[g];e?(n=It(e.anchor,e.width,e.height,e.textOffset,e.textScale),u&&n._rotate(d?this.transform.angle:-this.transform.angle)):o=!1}i&&(o=!b.clipped),r.textBox&&Rt(t.textCollisionBox.collisionVertexArray,b.text.placed,!o||A,n.x,n.y),r.verticalTextBox&&Rt(t.textCollisionBox.collisionVertexArray,b.text.placed,!o||S,n.x,n.y)}const a=o&&Boolean(!S&&r.verticalIconBox);r.iconBox&&Rt(t.iconCollisionBox.collisionVertexArray,b.icon.placed,a,f?n.x:0,f?n.y:0),r.verticalIconBox&&Rt(t.iconCollisionBox.collisionVertexArray,b.icon.placed,!a,f?n.x:0,f?n.y:0)}}}if(t.fullyClipped=0===m,t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.bucketInstanceId in this.collisionCircleArrays){const e=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=e.invProjMatrix,t.placementViewportMatrix=e.viewportMatrix,t.collisionCircleArray=e.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function Rt(e,t,r,n,o){e.emplaceBack(t?1:0,r?1:0,n||0,o||0),e.emplaceBack(t?1:0,r?1:0,n||0,o||0),e.emplaceBack(t?1:0,r?1:0,n||0,o||0),e.emplaceBack(t?1:0,r?1:0,n||0,o||0)}const Pt=Math.pow(2,25),Ot=Math.pow(2,24),Dt=Math.pow(2,17),Lt=Math.pow(2,16),Nt=Math.pow(2,9),Ft=Math.pow(2,8),zt=Math.pow(2,1);function Bt(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;const t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*Pt+t*Ot+r*Dt+t*Lt+r*Nt+t*Ft+r*zt+t}const jt=0;class $t{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs=new Set,this._bucketParts=[]}continuePlacement(e,t,r,n,o){const i=this._bucketParts;for(;this._currentTileIndexe.sortKey-t.sortKey));this._currentPartIndex{const t=e.exported.now()-o;return!this._forceFullPlacement&&t>2};for(;this._currentPlacementIndex>=0;){const e=r[t[this._currentPlacementIndex]],o=this.placement.collisionIndex.transform.zoom;if("symbol"===e.type&&(!e.minzoom||e.minzoom<=o)&&(!e.maxzoom||e.maxzoom>o)){if(this._inProgressLayer||(this._inProgressLayer=new $t(e)),this._inProgressLayer.continuePlacement(n[e.source],this.placement,this._showCollisionBoxes,e,i))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const Vt=512/e.EXTENT/2;class Ht{constructor(t,r,n){this.tileID=t,this.bucketInstanceId=n,this.index=new e.KDBush(r.length,16,Int32Array),this.keys=[],this.crossTileIDs=[];const o=t.canonical.x*e.EXTENT,i=t.canonical.y*e.EXTENT;for(let e=0;ee.overscaledZ)for(const r in o){const i=o[r];i.tileID.isChildOf(e)&&i.findMatches(t.symbolInstances,e,n)}else{const i=o[e.scaledTo(Number(r)).key];i&&i.findMatches(t.symbolInstances,e,n)}}for(let e=0;e{t[e]=!0});for(const e in this.layerIndexes)t[e]||delete this.layerIndexes[e]}}const Zt=(t,r)=>e.emitValidationErrors(t,r&&r.filter(e=>"source.canvas"!==e.identifier)),Yt=e.pick(Ue,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog","setProjection"]),Xt=e.pick(Ue,["setCenter","setZoom","setBearing","setPitch"]),Kt={version:8,layers:[],sources:{}},Jt={fill:!0,line:!0,background:!0,hillshade:!0,raster:!0};class Qt extends e.Evented{constructor(t,r={}){super(),this.map=t,this.dispatcher=new k(Be(),this),this.imageManager=new _,this.imageManager.setEventedParent(this),this.glyphManager=new e.GlyphManager(t._requestManager,r.localFontFamily?e.LocalGlyphMode.all:r.localIdeographFontFamily?e.LocalGlyphMode.ideographs:e.LocalGlyphMode.none,r.localFontFamily||r.localIdeographFontFamily),this.crossTileSymbolIndex=new qt,this._layers={},this._num3DLayers=0,this._numSymbolLayers=0,this._numCircleLayers=0,this._serializedLayers={},this._sourceCaches={},this._otherSourceCaches={},this._symbolSourceCaches={},this._loaded=!1,this._availableImages=[],this._order=[],this._drapedFirstOrder=[],this._markersNeedUpdate=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",e.getReferrer());const n=this;this._rtlTextPluginCallback=Qt.registerForPluginStateChange(t=>{n.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:t.pluginStatus,pluginURL:t.pluginURL},(t,r)=>{if(e.triggerPluginCompletionEvent(t),r&&r.every(e=>e))for(const e in n._sourceCaches){const t=n._sourceCaches[e],r=t.getSource().type;"vector"!==r&&"geojson"!==r||t.reload()}})}),this.on("data",e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;const t=this.getSource(e.sourceId);if(t&&t.vectorLayerIds)for(const e in this._layers){const r=this._layers[e];r.source===t.id&&this._validateLayer(r)}})}loadURL(t,r={}){this.fire(new e.Event("dataloading",{dataType:"style"}));const n="boolean"==typeof r.validate?r.validate:!e.isMapboxURL(t);t=this.map._requestManager.normalizeStyleURL(t,r.accessToken);const o=this.map._requestManager.transformRequest(t,e.ResourceType.Style);this._request=e.getJSON(o,(t,r)=>{this._request=null,t?this.fire(new e.ErrorEvent(t)):r&&this._load(r,n)})}loadJSON(t,r={}){this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.exported.frame(()=>{this._request=null,this._load(t,!1!==r.validate)})}loadEmpty(){this.fire(new e.Event("dataloading",{dataType:"style"})),this._load(Kt,!1)}_updateLayerCount(e,t){const r=t?1:-1;e.is3D()&&(this._num3DLayers+=r),"circle"===e.type&&(this._numCircleLayers+=r),"symbol"===e.type&&(this._numSymbolLayers+=r)}_load(t,r){if(r&&Zt(this,e.validateStyle(t)))return;this._loaded=!0,this.stylesheet=e.clone$1(t),this._updateMapProjection();for(const e in t.sources)this.addSource(e,t.sources[e],{validate:!1});this._changed=!1,t.sprite?this._loadSprite(t.sprite):(this.imageManager.setLoaded(!0),this.dispatcher.broadcast("spriteLoaded",!0)),this.glyphManager.setURL(t.glyphs);const n=$e(this.stylesheet.layers);this._order=n.map(e=>e.id),this._layers={},this._serializedLayers={};for(const t of n){const r=e.createStyleLayer(t);r.setEventedParent(this,{layer:{id:r.id}}),this._layers[r.id]=r,this._serializedLayers[r.id]=r.serialize(),this._updateLayerCount(r,!0)}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new w(this.stylesheet.light),this.stylesheet.terrain&&!this.terrainSetForDrapingOnly()&&this._createTerrain(this.stylesheet.terrain,1),this.stylesheet.fog&&this._createFog(this.stylesheet.fog),this._updateDrapeFirstLayers(),this.fire(new e.Event("data",{dataType:"style"})),this.fire(new e.Event("style.load"))}terrainSetForDrapingOnly(){return!!this.terrain&&0===this.terrain.drapeRenderMode}setProjection(e){e?this.stylesheet.projection=e:delete this.stylesheet.projection,this._updateMapProjection()}applyProjectionUpdate(){this._loaded&&(this.dispatcher.broadcast("setProjection",this.map.transform.projectionOptions),this.map.transform.projection.requiresDraping?this.getTerrain()||this.stylesheet.terrain||this.setTerrainForDraping():this.terrainSetForDrapingOnly()&&this.setTerrain(null))}_updateMapProjection(){this.map._useExplicitProjection?this.applyProjectionUpdate():this.map._prioritizeAndUpdateProjection(null,this.stylesheet.projection)}_loadSprite(t){this._spriteRequest=function(t,r,n){let o,i,a;const s=e.exported.devicePixelRatio>1?"@2x":"";let l=e.getJSON(r.transformRequest(r.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(e,t)=>{l=null,a||(a=e,o=t,u())}),c=e.getImage(r.transformRequest(r.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(e,t)=>{c=null,a||(a=e,i=t,u())});function u(){if(a)n(a);else if(o&&i){const t=e.exported.getImageData(i),r={};for(const n in o){const{width:i,height:a,x:s,y:l,sdf:c,pixelRatio:u,stretchX:d,stretchY:f,content:p}=o[n],h=new e.RGBAImage({width:i,height:a});e.RGBAImage.copy(t,h,{x:s,y:l},{x:0,y:0},{width:i,height:a}),r[n]={data:h,pixelRatio:u,sdf:c,stretchX:d,stretchY:f,content:p}}n(null,r)}}return{cancel(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(t,this.map._requestManager,(t,r)=>{if(this._spriteRequest=null,t)this.fire(new e.ErrorEvent(t));else if(r)for(const e in r)this.imageManager.addImage(e,r[e]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.dispatcher.broadcast("spriteLoaded",!0),this.fire(new e.Event("data",{dataType:"style"}))})}_validateLayer(t){const r=this.getSource(t.source);if(!r)return;const n=t.sourceLayer;n&&("geojson"===r.type||r.vectorLayerIds&&-1===r.vectorLayerIds.indexOf(n))&&this.fire(new e.ErrorEvent(new Error(`Source layer "${n}" does not exist on source "${r.id}" as specified by style layer "${t.id}"`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const e in this._sourceCaches)if(!this._sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(e){const t=[];for(const r of e){const e=this._layers[r];"custom"!==e.type&&t.push(e.serialize())}return t}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;if(this.fog&&this.fog.hasTransition())return!0;for(const e in this._sourceCaches)if(this._sourceCaches[e].hasTransition())return!0;for(const e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}get order(){return this.map._optimizeForTerrain&&this.terrain?this._drapedFirstOrder:this._order}isLayerDraped(e){return!!this.terrain&&("function"==typeof e.isLayerDraped?e.isLayerDraped():Jt[e.type])}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading")}update(t){if(!this._loaded)return;const r=this._changed;if(this._changed){const e=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);(e.length||r.length)&&this._updateWorkerLayers(e,r);for(const e in this._updatedSources){const t=this._updatedSources[e];"reload"===t?this._reloadSource(e):"clear"===t&&this._clearSource(e)}this._updateTilesForChangedImages();for(const e in this._updatedPaintProps)this._layers[e].updateTransitions(t);this.light.updateTransitions(t),this.fog&&this.fog.updateTransitions(t),this._resetUpdates()}const n={};for(const e in this._sourceCaches){const t=this._sourceCaches[e];n[e]=t.used,t.used=!1}for(const e of this._order){const r=this._layers[e];if(r.recalculate(t,this._availableImages),!r.isHidden(t.zoom)){const e=this._getLayerSourceCache(r);e&&(e.used=!0)}const n=this.map.painter;if(n){const e=r.getProgramIds();if(!e)continue;const o=r.getProgramConfiguration(t.zoom);for(const t of e)n.useProgram(t,o)}}for(const t in n){const r=this._sourceCaches[t];n[t]!==r.used&&r.getSource().fire(new e.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:r.getSource().id}))}this.light.recalculate(t),this.terrain&&this.terrain.recalculate(t),this.fog&&this.fog.recalculate(t),this.z=t.zoom,this._markersNeedUpdate&&(this._updateMarkersOpacity(),this._markersNeedUpdate=!1),r&&this.fire(new e.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const t in this._sourceCaches)this._sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(e),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setState(r){if(this._checkLoaded(),Zt(this,e.validateStyle(r)))return!1;(r=e.clone$1(r)).layers=$e(r.layers);const n=function(e,r){if(!e)return[{command:Ue.setStyle,args:[r]}];let n=[];try{if(!t(e.version,r.version))return[{command:Ue.setStyle,args:[r]}];t(e.center,r.center)||n.push({command:Ue.setCenter,args:[r.center]}),t(e.zoom,r.zoom)||n.push({command:Ue.setZoom,args:[r.zoom]}),t(e.bearing,r.bearing)||n.push({command:Ue.setBearing,args:[r.bearing]}),t(e.pitch,r.pitch)||n.push({command:Ue.setPitch,args:[r.pitch]}),t(e.sprite,r.sprite)||n.push({command:Ue.setSprite,args:[r.sprite]}),t(e.glyphs,r.glyphs)||n.push({command:Ue.setGlyphs,args:[r.glyphs]}),t(e.transition,r.transition)||n.push({command:Ue.setTransition,args:[r.transition]}),t(e.light,r.light)||n.push({command:Ue.setLight,args:[r.light]}),t(e.fog,r.fog)||n.push({command:Ue.setFog,args:[r.fog]}),t(e.projection,r.projection)||n.push({command:Ue.setProjection,args:[r.projection]});const o={},i=[];!function(e,r,n,o){let i;for(i in r=r||{},e=e||{})e.hasOwnProperty(i)&&(r.hasOwnProperty(i)||He(i,n,o));for(i in r){if(!r.hasOwnProperty(i))continue;const a=r[i];e.hasOwnProperty(i)?t(e[i],a)||("geojson"===e[i].type&&"geojson"===a.type&&We(e,r,i)?n.push({command:Ue.setGeoJSONSourceData,args:[i,a.data]}):Ge(i,r,n,o)):Ve(i,r,n)}}(e.sources,r.sources,i,o);const a=[];e.layers&&e.layers.forEach(e=>{e.source&&o[e.source]?n.push({command:Ue.removeLayer,args:[e.id]}):a.push(e)});let s=e.terrain;s&&o[s.source]&&(n.push({command:Ue.setTerrain,args:[void 0]}),s=void 0),n=n.concat(i),t(s,r.terrain)||n.push({command:Ue.setTerrain,args:[r.terrain]}),function(e,r,n){r=r||[];const o=(e=e||[]).map(Ze),i=r.map(Ze),a=e.reduce(Ye,{}),s=r.reduce(Ye,{}),l=o.slice(),c=Object.create(null);let u,d,f,p,h,m,g;for(u=0,d=0;u!(e.command in Xt));if(0===n.length)return!1;const o=n.filter(e=>!(e.command in Yt));if(o.length>0)throw new Error(`Unimplemented: ${o.map(e=>e.command).join(", ")}.`);return n.forEach(e=>{"setTransition"!==e.command&&"setProjection"!==e.command&&this[e.command].apply(this,e.args)}),this.stylesheet=r,this._updateMapProjection(),!0}addImage(t,r){return this.getImage(t)?this.fire(new e.ErrorEvent(new Error("An image with this name already exists."))):(this.imageManager.addImage(t,r),this._afterImageUpdated(t),this)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(t){return this.getImage(t)?(this.imageManager.removeImage(t),this._afterImageUpdated(t),this):this.fire(new e.ErrorEvent(new Error("No image with this name exists.")))}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this._availableImages.slice()}addSource(t,r,n={}){if(this._checkLoaded(),void 0!==this.getSource(t))throw new Error("There is already a source with this ID");if(!r.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(e.validateSource,`sources.${t}`,r,null,n))return;this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);const o=Me(t,r,this.dispatcher,this);o.setEventedParent(this,()=>({isSourceLoaded:this._isSourceCacheLoaded(t),source:o.serialize(),sourceId:t}));const i=r=>{const n=(r?"symbol:":"other:")+t,i=this._sourceCaches[n]=new e.SourceCache(n,o,r);(r?this._symbolSourceCaches:this._otherSourceCaches)[t]=i,i.style=this,i.onAdd(this.map)};i(!1),"vector"!==r.type&&"geojson"!==r.type||i(!0),o.onAdd&&o.onAdd(this.map),this._changed=!0}removeSource(t){this._checkLoaded();const r=this.getSource(t);if(!r)throw new Error("There is no source with this ID");for(const r in this._layers)if(this._layers[r].source===t)return this.fire(new e.ErrorEvent(new Error(`Source "${t}" cannot be removed while layer "${r}" is using it.`)));if(this.terrain&&this.terrain.get().source===t)return this.fire(new e.ErrorEvent(new Error(`Source "${t}" cannot be removed while terrain is using it.`)));const n=this._getSourceCaches(t);for(const t of n)delete this._sourceCaches[t.id],delete this._updatedSources[t.id],t.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t.getSource().id})),t.setEventedParent(null),t.clearTiles();return delete this._otherSourceCaches[t],delete this._symbolSourceCaches[t],r.setEventedParent(null),r.onRemove&&r.onRemove(this.map),this._changed=!0,this}setGeoJSONSourceData(e,t){this._checkLoaded(),this.getSource(e).setData(t),this._changed=!0}getSource(e){const t=this._getSourceCache(e);return t&&t.getSource()}_getSources(){const e=[];for(const t in this._otherSourceCaches){const r=this._getSourceCache(t);r&&e.push(r.getSource())}return e}addLayer(t,r,n={}){this._checkLoaded();const o=t.id;if(this.getLayer(o))return void this.fire(new e.ErrorEvent(new Error(`Layer with id "${o}" already exists on this map`)));let i;if("custom"===t.type){if(Zt(this,e.validateCustomStyleLayer(t)))return;i=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(o,t.source),t=e.clone$1(t),t=e.extend(t,{source:o})),this._validate(e.validateLayer,`layers.${o}`,t,{arrayIndex:-1},n))return;i=e.createStyleLayer(t),this._validateLayer(i),i.setEventedParent(this,{layer:{id:o}}),this._serializedLayers[i.id]=i.serialize(),this._updateLayerCount(i,!0)}const a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)return void this.fire(new e.ErrorEvent(new Error(`Layer with id "${r}" does not exist on this map.`)));this._order.splice(a,0,o),this._layerOrderChanged=!0,this._layers[o]=i;const s=this._getLayerSourceCache(i);if(this._removedLayers[o]&&i.source&&s&&"custom"!==i.type){const e=this._removedLayers[o];delete this._removedLayers[o],e.type!==i.type?this._updatedSources[i.source]="clear":(this._updatedSources[i.source]="reload",s.pause())}this._updateLayer(i),i.onAdd&&i.onAdd(this.map),this._updateDrapeFirstLayers()}moveLayer(t,r){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===r)return;const n=this._order.indexOf(t);this._order.splice(n,1);const o=r?this._order.indexOf(r):this._order.length;r&&-1===o?this.fire(new e.ErrorEvent(new Error(`Layer with id "${r}" does not exist on this map.`))):(this._order.splice(o,0,t),this._layerOrderChanged=!0,this._updateDrapeFirstLayers())}removeLayer(t){this._checkLoaded();const r=this._layers[t];if(!r)return void this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be removed.`)));r.setEventedParent(null),this._updateLayerCount(r,!1);const n=this._order.indexOf(t);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=r,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],r.onRemove&&r.onRemove(this.map),this._updateDrapeFirstLayers()}getLayer(e){return this._layers[e]}hasLayer(e){return e in this._layers}hasLayerType(e){for(const t in this._layers)if(this._layers[t].type===e)return!0;return!1}setLayerZoomRange(t,r,n){this._checkLoaded();const o=this.getLayer(t);o?o.minzoom===r&&o.maxzoom===n||(null!=r&&(o.minzoom=r),null!=n&&(o.maxzoom=n),this._updateLayer(o)):this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot have zoom extent.`)))}setFilter(r,n,o={}){this._checkLoaded();const i=this.getLayer(r);if(i){if(!t(i.filter,n))return null==n?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(e.validateFilter,`layers.${i.id}.filter`,n,{layerType:i.type},o)||(i.filter=e.clone$1(n),this._updateLayer(i)))}else this.fire(new e.ErrorEvent(new Error(`The layer '${r}' does not exist in the map's style and cannot be filtered.`)))}getFilter(t){const r=this.getLayer(t);return r&&e.clone$1(r.filter)}setLayoutProperty(r,n,o,i={}){this._checkLoaded();const a=this.getLayer(r);a?t(a.getLayoutProperty(n),o)||(a.setLayoutProperty(n,o,i),this._updateLayer(a)):this.fire(new e.ErrorEvent(new Error(`The layer '${r}' does not exist in the map's style and cannot be styled.`)))}getLayoutProperty(t,r){const n=this.getLayer(t);if(n)return n.getLayoutProperty(r);this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style.`)))}setPaintProperty(r,n,o,i={}){this._checkLoaded();const a=this.getLayer(r);a?t(a.getPaintProperty(n),o)||(a.setPaintProperty(n,o,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[r]=!0):this.fire(new e.ErrorEvent(new Error(`The layer '${r}' does not exist in the map's style and cannot be styled.`)))}getPaintProperty(e,t){const r=this.getLayer(e);return r&&r.getPaintProperty(t)}setFeatureState(t,r){this._checkLoaded();const n=t.source,o=t.sourceLayer,i=this.getSource(n);if(!i)return void this.fire(new e.ErrorEvent(new Error(`The source '${n}' does not exist in the map's style.`)));const a=i.type;if("geojson"===a&&o)return void this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if("vector"===a&&!o)return void this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided.")));const s=this._getSourceCaches(n);for(const e of s)e.setFeatureState(o,t.id,r)}removeFeatureState(t,r){this._checkLoaded();const n=t.source,o=this.getSource(n);if(!o)return void this.fire(new e.ErrorEvent(new Error(`The source '${n}' does not exist in the map's style.`)));const i=o.type,a="vector"===i?t.sourceLayer:void 0;if("vector"===i&&!a)return void this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));if(r&&"string"!=typeof t.id&&"number"!=typeof t.id)return void this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));const s=this._getSourceCaches(n);for(const e of s)e.removeFeatureState(a,t.id,r)}getFeatureState(t){this._checkLoaded();const r=t.source,n=t.sourceLayer,o=this.getSource(r);if(o){if("vector"!==o.type||n)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),this._getSourceCaches(r)[0].getFeatureState(n,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){const t={};for(const e in this._sourceCaches){const r=this._sourceCaches[e].getSource();t[r.id]||(t[r.id]=r.serialize())}return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,terrain:this.getTerrain()||void 0,fog:this.stylesheet.fog,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,projection:this.stylesheet.projection,sources:t,layers:this._serializeLayers(this._order)},e=>void 0!==e)}_updateLayer(e){this._updatedLayers[e.id]=!0;const t=this._getLayerSourceCache(e);e.source&&!this._updatedSources[e.source]&&t&&"raster"!==t.getSource().type&&(this._updatedSources[e.source]="reload",t.pause()),this._changed=!0,e.invalidateCompiledFilter()}_flattenAndSortRenderedFeatures(e){const t=e=>"fill-extrusion"===this._layers[e].type,r={},n=[];for(let o=this._order.length-1;o>=0;o--){const i=this._order[o];if(t(i)){r[i]=o;for(const t of e){const e=t[i];if(e)for(const t of e)n.push(t)}}}n.sort((e,t)=>t.intersectionZ-e.intersectionZ);const o=[];for(let i=this._order.length-1;i>=0;i--){const a=this._order[i];if(t(a))for(let e=n.length-1;e>=0;e--){const t=n[e].feature;if(r[t.layer.id]{const t=this.getLayer(e);return t&&t.is3D()}):this.has3DLayers(),s=R.createFromScreenPoints(t,n);for(const e in this._sourceCaches){const t=this._sourceCaches[e].getSource().id;r.layers&&!o[t]||i.push(Pe(this._sourceCaches[e],this._layers,this._serializedLayers,s,r,n,a,!!this.map._showQueryGeometry))}return this.placement&&i.push(function(e,t,r,n,o,i,a){const s={},l=i.queryRenderedSymbols(n),c=[];for(const e of Object.keys(l).map(Number))c.push(a[e]);c.sort(De);for(const r of c){const n=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],t,r.bucketIndex,r.sourceLayerIndex,o.filter,o.layers,o.availableImages,e);for(const e in n){const t=s[e]=s[e]||[],o=n[e];o.sort((e,t)=>{const n=r.featureSortOrder;if(n){const r=n.indexOf(e.featureIndex);return n.indexOf(t.featureIndex)-r}return t.featureIndex-e.featureIndex});for(const e of o)t.push(e)}}for(const t in s)s[t].forEach(n=>{const o=n.feature,i=r(e[t]);if(!i)return;const a=i.getFeatureState(o.layer["source-layer"],o.id);o.source=o.layer.source,o.layer["source-layer"]&&(o.sourceLayer=o.layer["source-layer"]),o.state=a});return s}(this._layers,this._serializedLayers,this._getLayerSourceCache.bind(this),s.screenGeometry,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(i)}querySourceFeatures(t,r){r&&r.filter&&this._validate(e.validateFilter,"querySourceFeatures.filter",r.filter,null,r);const n=this._getSourceCaches(t);let o=[];for(const e of n)o=o.concat(Oe(e,r));return o}addSourceType(e,t,r){return Qt.getSourceType(e)?r(new Error(`A source type called "${e}" already exists.`)):(Qt.setSourceType(e,t),t.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:e,url:t.workerSourceURL},r):r(null,null))}getLight(){return this.light.getLight()}setLight(e,r={}){this._checkLoaded();const n=this.light.getLight();let o=!1;for(const r in e)if(!t(e[r],n[r])){o=!0;break}if(!o)return;const i=this._setTransitionParameters({duration:300,delay:0});this.light.setLight(e,r),this.light.updateTransitions(i)}getTerrain(){return this.terrain&&1===this.terrain.drapeRenderMode?this.terrain.get():null}setTerrainForDraping(){this.setTerrain({source:"",exaggeration:0},0)}setTerrain(r,n=1){if(this._checkLoaded(),!r)return delete this.terrain,delete this.stylesheet.terrain,this.dispatcher.broadcast("enableTerrain",!1),this._force3DLayerUpdate(),void(this._markersNeedUpdate=!0);let o=r;if(1===n){if("object"==typeof o.source){const t="terrain-dem-src";this.addSource(t,o.source),o=e.clone$1(o),o=e.extend(o,{source:t})}if(this._validate(e.validateTerrain,"terrain",o))return}if(!this.terrain||this.terrain&&n!==this.terrain.drapeRenderMode){if(!o)return;this._createTerrain(o,n)}else{const r=this.terrain,n=r.get();for(const t of Object.keys(e.spec.terrain))!o.hasOwnProperty(t)&&e.spec.terrain[t].default&&(o[t]=e.spec.terrain[t].default);for(const e in o)if(!t(o[e],n[e])){r.set(o),this.stylesheet.terrain=o;const e=this._setTransitionParameters({duration:0});r.updateTransitions(e);break}}this._updateDrapeFirstLayers(),this._markersNeedUpdate=!0}_createFog(e){const t=this.fog=new I(e,this.map.transform);this.stylesheet.fog=e;const r=this._setTransitionParameters({duration:0});t.updateTransitions(r)}_updateMarkersOpacity(){0!==this.map._markers.length&&this.map._requestDomTask(()=>{for(const e of this.map._markers)e._evaluateOpacity()})}getFog(){return this.fog?this.fog.get():null}setFog(e){if(this._checkLoaded(),!e)return delete this.fog,delete this.stylesheet.fog,void(this._markersNeedUpdate=!0);if(this.fog){const r=this.fog,n=r.get();0===Object.keys(e).length&&r.set(e);for(const o in e)if(!t(e[o],n[o])){r.set(e),this.stylesheet.fog=e;const t=this._setTransitionParameters({duration:0});r.updateTransitions(t);break}}else this._createFog(e);this._markersNeedUpdate=!0}_setTransitionParameters(t){return{now:e.exported.now(),transition:e.extend(t,this.stylesheet.transition)}}_updateDrapeFirstLayers(){if(!this.map._optimizeForTerrain||!this.terrain)return;const e=this._order.filter(e=>this.isLayerDraped(this._layers[e])),t=this._order.filter(e=>!this.isLayerDraped(this._layers[e]));this._drapedFirstOrder=[],this._drapedFirstOrder.push(...e),this._drapedFirstOrder.push(...t)}_createTerrain(e,t){const r=this.terrain=new S(e,t);this.stylesheet.terrain=e,this.dispatcher.broadcast("enableTerrain",!this.terrainSetForDrapingOnly()),this._force3DLayerUpdate();const n=this._setTransitionParameters({duration:0});r.updateTransitions(n)}_force3DLayerUpdate(){for(const e in this._layers){const t=this._layers[e];"fill-extrusion"===t.type&&this._updateLayer(t)}}_forceSymbolLayerUpdate(){for(const e in this._layers){const t=this._layers[e];"symbol"===t.type&&this._updateLayer(t)}}_validate(t,r,n,o,i={}){return(!i||!1!==i.validate)&&Zt(this,t.call(e.validateStyle,e.extend({key:r,style:this.serialize(),value:n,styleSpec:e.spec},o)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),e.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const e in this._layers)this._layers[e].setEventedParent(null);for(const e in this._sourceCaches)this._sourceCaches[e].clearTiles(),this._sourceCaches[e].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(e){const t=this._getSourceCaches(e);for(const e of t)e.clearTiles()}_reloadSource(e){const t=this._getSourceCaches(e);for(const e of t)e.resume(),e.reload()}_reloadSources(){for(const e of this._getSources())e.reload&&e.reload()}_updateSources(e){for(const t in this._sourceCaches)this._sourceCaches[t].update(e)}_generateCollisionBoxes(){for(const e in this._sourceCaches){const t=this._sourceCaches[e];t.resume(),t.reload()}}_updatePlacement(t,r,n,o,i=!1){let a=!1,s=!1;const l={};for(const e of this._order){const r=this._layers[e];if("symbol"!==r.type)continue;if(!l[r.source]){const e=this._getLayerSourceCache(r);if(!e)continue;l[r.source]=e.getRenderableIds(!0).map(t=>e.getTileByID(t)).sort((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1))}const n=this.crossTileSymbolIndex.addLayer(r,l[r.source],t.center.lng,t.projection);a=a||n}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),i=i||this._layerOrderChanged||0===n,this._layerOrderChanged&&this.fire(new e.Event("neworder")),(i||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.exported.now(),t.zoom))&&(this.pauseablePlacement=new Ut(t,this._order,i,r,n,o,this.placement,this.fog&&t.projection.supportsFog?this.fog.state:null),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.exported.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(const e of this._order){const t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,l[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.exported.now())}_releaseSymbolFadeTiles(){for(const e in this._sourceCaches)this._sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,t,r){this.imageManager.getImages(t.icons,r),this._updateTilesForChangedImages();const n=e=>{e&&e.setDependencies(t.tileID.key,t.type,t.icons)};n(this._otherSourceCaches[t.source]),n(this._symbolSourceCaches[t.source])}getGlyphs(e,t,r){this.glyphManager.getGlyphs(t.stacks,r)}getResource(t,r,n){return e.makeRequest(r,n)}_getSourceCache(e){return this._otherSourceCaches[e]}_getLayerSourceCache(e){return"symbol"===e.type?this._symbolSourceCaches[e.source]:this._otherSourceCaches[e.source]}_getSourceCaches(e){const t=[];return this._otherSourceCaches[e]&&t.push(this._otherSourceCaches[e]),this._symbolSourceCaches[e]&&t.push(this._symbolSourceCaches[e]),t}_isSourceCacheLoaded(t){const r=this._getSourceCaches(t);return 0===r.length?(this.fire(new e.ErrorEvent(new Error(`There is no source with ID '${t}'`))),!1):r.every(e=>e.loaded())}has3DLayers(){return this._num3DLayers>0}hasSymbolLayers(){return this._numSymbolLayers>0}hasCircleLayers(){return this._numCircleLayers>0}_clearWorkerCaches(){this.dispatcher.broadcast("clearCaches")}destroy(){this._clearWorkerCaches(),this.terrainSetForDrapingOnly()&&(delete this.terrain,delete this.stylesheet.terrain)}}Qt.getSourceType=function(e){return ke[e]},Qt.setSourceType=function(e,t){ke[e]=t},Qt.registerForPluginStateChange=e.registerForPluginStateChange;var er="\n#define EPSILON 0.0000001\n#define PI 3.141592653589793\n#define EXTENT 8192.0\n#define HALF_PI PI/2.0\n#define QUARTER_PI PI/4.0\n#define RAD_TO_DEG 180.0/PI\n#define DEG_TO_RAD PI/180.0\n#define GLOBE_RADIUS EXTENT/PI/2.0",tr="attribute highp vec3 a_pos_3f;uniform lowp mat4 u_matrix;varying highp vec3 v_uv;void main() {const mat3 half_neg_pi_around_x=mat3(1.0,0.0, 0.0,0.0,0.0,-1.0,0.0,1.0, 0.0);v_uv=half_neg_pi_around_x*a_pos_3f;vec4 pos=u_matrix*vec4(a_pos_3f,1.0);gl_Position=pos.xyww;}",rr="\n#define ELEVATION_SCALE 7.0\n#define ELEVATION_OFFSET 450.0\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_tl_up;uniform vec3 u_tile_tr_up;uniform vec3 u_tile_br_up;uniform vec3 u_tile_bl_up;uniform float u_tile_up_scale;vec3 elevationVector(vec2 pos) {vec2 uv=pos/EXTENT;vec3 up=normalize(mix(\nmix(u_tile_tl_up,u_tile_tr_up,uv.xxx),mix(u_tile_bl_up,u_tile_br_up,uv.xxx),uv.yyy));return up*u_tile_up_scale;}\n#else\nvec3 elevationVector(vec2 pos) { return vec3(0,0,1); }\n#endif\nconst float skirtOffset=24575.0;vec3 decomposeToPosAndSkirt(vec2 posWithComposedSkirt)\n{float skirt=float(posWithComposedSkirt.x >=skirtOffset);vec2 pos=posWithComposedSkirt-vec2(skirt*skirtOffset,0.0);return vec3(pos,skirt);}\n#ifdef TERRAIN\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nuniform highp sampler2D u_dem;uniform highp sampler2D u_dem_prev;\n#else\nuniform sampler2D u_dem;uniform sampler2D u_dem_prev;\n#endif\nuniform vec4 u_dem_unpack;uniform vec2 u_dem_tl;uniform vec2 u_dem_tl_prev;uniform float u_dem_scale;uniform float u_dem_scale_prev;uniform float u_dem_size;uniform float u_dem_lerp;uniform float u_exaggeration;uniform float u_meter_to_dem;uniform mat4 u_label_plane_matrix_inv;uniform sampler2D u_depth;uniform vec2 u_depth_size_inv;vec4 tileUvToDemSample(vec2 uv,float dem_size,float dem_scale,vec2 dem_tl) {vec2 pos=dem_size*(uv*dem_scale+dem_tl)+1.0;vec2 f=fract(pos);return vec4((pos-f+0.5)/(dem_size+2.0),f);}float decodeElevation(vec4 v) {return dot(vec4(v.xyz*255.0,-1.0),u_dem_unpack);}float currentElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale+u_dem_tl)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem,pos).a;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale,u_dem_tl);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem,pos));\n#ifdef TERRAIN_DEM_NEAREST_FILTER\nreturn u_exaggeration*tl;\n#endif\nfloat tr=decodeElevation(texture2D(u_dem,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}float prevElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale_prev+u_dem_tl_prev)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem_prev,pos).a;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale_prev,u_dem_tl_prev);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem_prev,pos));float tr=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem_prev,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}\n#ifdef TERRAIN_VERTEX_MORPHING\nfloat elevation(vec2 apos) {\n#ifdef ZERO_EXAGGERATION\nreturn 0.0;\n#endif\nfloat nextElevation=currentElevation(apos);float prevElevation=prevElevation(apos);return mix(prevElevation,nextElevation,u_dem_lerp);}\n#else\nfloat elevation(vec2 apos) {\n#ifdef ZERO_EXAGGERATION\nreturn 0.0;\n#endif\nreturn currentElevation(apos);}\n#endif\nhighp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}bool isOccluded(vec4 frag) {vec3 coord=frag.xyz/frag.w;float depth=unpack_depth(texture2D(u_depth,(coord.xy+1.0)*0.5));return coord.z > depth+0.0005;}float occlusionFade(vec4 frag) {vec3 coord=frag.xyz/frag.w;vec3 df=vec3(5.0*u_depth_size_inv,0.0);vec2 uv=0.5*coord.xy+0.5;vec4 depth=vec4(\nunpack_depth(texture2D(u_depth,uv-df.xz)),unpack_depth(texture2D(u_depth,uv+df.xz)),unpack_depth(texture2D(u_depth,uv-df.zy)),unpack_depth(texture2D(u_depth,uv+df.zy))\n);return dot(vec4(0.25),vec4(1.0)-clamp(300.0*(vec4(coord.z-0.001)-depth),0.0,1.0));}vec4 fourSample(vec2 pos,vec2 off) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nfloat tl=texture2D(u_dem,pos).a;float tr=texture2D(u_dem,pos+vec2(off.x,0.0)).a;float bl=texture2D(u_dem,pos+vec2(0.0,off.y)).a;float br=texture2D(u_dem,pos+off).a;\n#else\nvec4 demtl=vec4(texture2D(u_dem,pos).xyz*255.0,-1.0);float tl=dot(demtl,u_dem_unpack);vec4 demtr=vec4(texture2D(u_dem,pos+vec2(off.x,0.0)).xyz*255.0,-1.0);float tr=dot(demtr,u_dem_unpack);vec4 dembl=vec4(texture2D(u_dem,pos+vec2(0.0,off.y)).xyz*255.0,-1.0);float bl=dot(dembl,u_dem_unpack);vec4 dembr=vec4(texture2D(u_dem,pos+off).xyz*255.0,-1.0);float br=dot(dembr,u_dem_unpack);\n#endif\nreturn vec4(tl,tr,bl,br);}float flatElevation(vec2 pack) {vec2 apos=floor(pack/8.0);vec2 span=10.0*(pack-apos*8.0);vec2 uvTex=(apos-vec2(1.0,1.0))/8190.0;float size=u_dem_size+2.0;float dd=1.0/size;vec2 pos=u_dem_size*(uvTex*u_dem_scale+u_dem_tl)+1.0;vec2 f=fract(pos);pos=(pos-f+0.5)*dd;vec4 h=fourSample(pos,vec2(dd));float z=mix(mix(h.x,h.y,f.x),mix(h.z,h.w,f.x),f.y);vec2 w=floor(0.5*(span*u_meter_to_dem-1.0));vec2 d=dd*w;h=fourSample(pos-d,2.0*d+vec2(dd));vec4 diff=abs(h.xzxy-h.ywzw);vec2 slope=min(vec2(0.25),u_meter_to_dem*0.5*(diff.xz+diff.yw)/(2.0*w+vec2(1.0)));vec2 fix=slope*span;float base=z+max(fix.x,fix.y);return u_exaggeration*base;}float elevationFromUint16(float word) {return u_exaggeration*(word/ELEVATION_SCALE-ELEVATION_OFFSET);}\n#else\nfloat elevation(vec2 pos) { return 0.0; }bool isOccluded(vec4 frag) { return false; }float occlusionFade(vec4 frag) { return 1.0; }\n#endif",nr="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump mat4 u_fog_matrix;varying vec3 v_fog_pos;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}vec3 fog_position(vec3 pos) {return (u_fog_matrix*vec4(pos,1.0)).xyz;}vec3 fog_position(vec2 pos) {return fog_position(vec3(pos,0.0));}float fog(vec3 pos) {float depth=length(pos);float opacity=fog_opacity(fog_range(depth));return opacity*fog_horizon_blending(pos/depth);}\n#endif",or="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump float u_fog_temporal_offset;varying vec3 v_fog_pos;uniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform highp vec2 u_viewport;uniform float u_globe_transition;uniform int u_is_globe;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}float globe_glow_progress() {highp vec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);highp vec3 dir=normalize(ray_dir);highp vec3 closest_point=dot(u_globe_pos,dir)*dir;highp float sdf=length(closest_point-u_globe_pos)/u_globe_radius;return sdf+PI*0.5;}float fog_opacity(vec3 pos) {float depth=length(pos);return fog_opacity(fog_range(depth));}vec3 fog_apply(vec3 color,vec3 pos) {float depth=length(pos);float opacity;if (u_is_globe==1) {float glow_progress=globe_glow_progress();float t=mix(glow_progress,depth,u_globe_transition);opacity=fog_opacity(fog_range(t));} else {opacity=fog_opacity(fog_range(depth));opacity*=fog_horizon_blending(pos/depth);}return mix(color,u_fog_color.rgb,opacity);}vec4 fog_apply_from_vert(vec4 color,float fog_opac) {float alpha=EPSILON+color.a;color.rgb=mix(color.rgb/alpha,u_fog_color.rgb,fog_opac)*alpha;return color;}vec3 fog_apply_sky_gradient(vec3 camera_ray,vec3 sky_color) {float horizon_blend=fog_horizon_blending(normalize(camera_ray));return mix(sky_color,u_fog_color.rgb,horizon_blend);}vec4 fog_apply_premultiplied(vec4 color,vec3 pos) {float alpha=EPSILON+color.a;color.rgb=fog_apply(color.rgb/alpha,pos)*alpha;return color;}vec3 fog_dither(vec3 color) {vec2 dither_seed=gl_FragCoord.xy+u_fog_temporal_offset;return dither(color,dither_seed);}vec4 fog_dither(vec4 color) {return vec4(fog_dither(color.rgb),color.a);}\n#endif";let ir={},ar={};const sr=[];fr(er,sr),fr(rr,sr),fr(nr,sr),fr(or,sr),ir=pr("",rr),ar=pr(or,nr);const lr=pr("\n#if __VERSION__ >=300\n#define varying in\n#define gl_FragColor glFragColor\n#define texture2D texture\n#define textureCube texture\nout vec4 glFragColor;\n#endif\nhighp vec3 hash(highp vec2 p) {highp vec3 p3=fract(p.xyx*vec3(443.8975,397.2973,491.1871));p3+=dot(p3,p3.yxz+19.19);return fract((p3.xxy+p3.yzz)*p3.zyx);}vec3 dither(vec3 color,highp vec2 seed) {vec3 rnd=hash(seed)+hash(seed+0.59374)-0.5;return color+rnd/255.0;}highp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}highp vec4 pack_depth(highp float ndc_z) {highp float depth=ndc_z*0.5+0.5;const highp vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const highp vec4 bit_mask =vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);highp vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}","\n#if __VERSION__ >=300\n#define attribute in\n#define varying out\n#define texture2D texture\n#endif\nfloat wrap(float n,float min,float max) {float d=max-min;float w=mod(mod(n-min,d)+d,d)+min;return (w==min) ? max : w;}\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 mercator_tile_position(mat4 matrix,vec2 tile_anchor,vec3 tile_id,vec2 mercator_center) {\n#ifndef PROJECTED_POS_ON_VIEWPORT\nfloat tiles=tile_id.z;vec2 mercator=(tile_anchor/EXTENT+tile_id.xy)/tiles;mercator-=mercator_center;mercator.x=wrap(mercator.x,-0.5,0.5);vec4 mercator_tile=vec4(mercator.xy*EXTENT,EXTENT/(2.0*PI),1.0);mercator_tile=matrix*mercator_tile;return mercator_tile.xyz;\n#else\nreturn vec3(0.0);\n#endif\n}vec3 mix_globe_mercator(vec3 globe,vec3 mercator,float t) {return mix(globe,mercator,t);}mat3 globe_mercator_surface_vectors(vec3 pos_normal,vec3 up_dir,float zoom_transition) {vec3 normal=zoom_transition==0.0 ? pos_normal : normalize(mix(pos_normal,up_dir,zoom_transition));vec3 xAxis=normalize(vec3(normal.z,0.0,-normal.x));vec3 yAxis=normalize(cross(normal,xAxis));return mat3(xAxis,yAxis,normal);}\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(\nunpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}const vec4 AWAY=vec4(-1000.0,-1000.0,-1000.0,1);//Normalized device coordinate that is not rendered."),cr=er,ur="\n#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif";var dr={background:pr("uniform vec4 u_color;uniform float u_opacity;\n#ifdef LIGHTING_3D_MODE\nvarying vec4 v_color;\n#endif\nvoid main() {vec4 out_color;\n#ifdef LIGHTING_3D_MODE\nout_color=v_color;\n#else\nout_color=u_color;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#ifdef LIGHTING_3D_MODE\nuniform vec4 u_color;varying vec4 v_color;\n#endif\nvoid main() {gl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef LIGHTING_3D_MODE\nv_color=apply_lighting(u_color);\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),backgroundPattern:pr("uniform vec2 u_pattern_tl;uniform vec2 u_pattern_br;uniform vec2 u_texsize;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos;void main() {vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(u_pattern_tl/u_texsize,u_pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_pattern_size,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),circle:pr("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(\nantialiased_blur,0.0,extrude_length-radius/(radius+stroke_width)\n);vec4 out_color=mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_apply_premultiplied(out_color,v_fog_pos);\n#endif\ngl_FragColor=out_color*(v_visibility*opacity_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","#define NUM_VISIBILITY_RINGS 2\n#define INV_SQRT2 0.70710678\n#define ELEVATION_BIAS 0.0001\n#define NUM_SAMPLES_PER_RING 16\nuniform mat4 u_matrix;uniform mat2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nvarying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvec2 calc_offset(vec2 extrusion,float radius,float stroke_width, float view_scale) {return extrusion*(radius+stroke_width)*u_extrude_scale*view_scale;}float cantilevered_elevation(vec2 pos,float radius,float stroke_width,float view_scale) {vec2 c1=pos+calc_offset(vec2(-1,-1),radius,stroke_width,view_scale);vec2 c2=pos+calc_offset(vec2(1,-1),radius,stroke_width,view_scale);vec2 c3=pos+calc_offset(vec2(1,1),radius,stroke_width,view_scale);vec2 c4=pos+calc_offset(vec2(-1,1),radius,stroke_width,view_scale);float h1=elevation(c1)+ELEVATION_BIAS;float h2=elevation(c2)+ELEVATION_BIAS;float h3=elevation(c3)+ELEVATION_BIAS;float h4=elevation(c4)+ELEVATION_BIAS;return max(h4,max(h3,max(h1,h2)));}float circle_elevation(vec2 pos) {\n#if defined(TERRAIN)\nreturn elevation(pos)+ELEVATION_BIAS;\n#else\nreturn 0.0;\n#endif\n}vec4 project_vertex(vec2 extrusion,vec4 world_center,vec4 projected_center,float radius,float stroke_width, float view_scale,mat3 surface_vectors) {vec2 sample_offset=calc_offset(extrusion,radius,stroke_width,view_scale);\n#ifdef PITCH_WITH_MAP\n#ifdef PROJECTION_GLOBE_VIEW\nreturn u_matrix*( world_center+vec4(sample_offset.x*surface_vectors[0]+sample_offset.y*surface_vectors[1],0) );\n#else\nreturn u_matrix*( world_center+vec4(sample_offset,0,0) );\n#endif\n#else\nreturn projected_center+vec4(sample_offset,0,0);\n#endif\n}float get_sample_step() {\n#ifdef PITCH_WITH_MAP\nreturn 2.0*PI/float(NUM_SAMPLES_PER_RING);\n#else\nreturn PI/float(NUM_SAMPLES_PER_RING);\n#endif\n}void main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);vec4 world_center;mat3 surface_vectors;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(circle_center)*circle_elevation(circle_center);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*circle_elevation(circle_center);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,circle_center,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;vec3 pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);world_center=vec4(pos,1);\n#else \nsurface_vectors=mat3(1.0);float height=circle_elevation(circle_center);world_center=vec4(circle_center,height,1);\n#endif\nvec4 projected_center=u_matrix*world_center;float view_scale=0.0;\n#ifdef PITCH_WITH_MAP\n#ifdef SCALE_WITH_MAP\nview_scale=1.0;\n#else\nview_scale=projected_center.w/u_camera_to_center_distance;\n#endif\n#else\n#ifdef SCALE_WITH_MAP\nview_scale=u_camera_to_center_distance;\n#else\nview_scale=projected_center.w;\n#endif\n#endif\ngl_Position=project_vertex(extrude,world_center,projected_center,radius,stroke_width,view_scale,surface_vectors);float visibility=0.0;\n#ifdef TERRAIN\nfloat step=get_sample_step();vec4 occlusion_world_center;vec4 occlusion_projected_center;\n#ifdef PITCH_WITH_MAP\nfloat cantilevered_height=cantilevered_elevation(circle_center,radius,stroke_width,view_scale);occlusion_world_center=vec4(circle_center,cantilevered_height,1);occlusion_projected_center=u_matrix*occlusion_world_center;\n#else\nocclusion_world_center=world_center;occlusion_projected_center=projected_center;\n#endif\nfor(int ring=0; ring < NUM_VISIBILITY_RINGS; ring++) {float scale=(float(ring)+1.0)/float(NUM_VISIBILITY_RINGS);for(int i=0; i < NUM_SAMPLES_PER_RING; i++) {vec2 extrusion=vec2(cos(step*float(i)),-sin(step*float(i)))*scale;vec4 frag_pos=project_vertex(extrusion,occlusion_world_center,occlusion_projected_center,radius,stroke_width,view_scale,surface_vectors);visibility+=float(!isOccluded(frag_pos));}}visibility/=float(NUM_VISIBILITY_RINGS)*float(NUM_SAMPLES_PER_RING);\n#else\nvisibility=1.0;\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nvisibility=1.0;\n#endif\nv_visibility=visibility;lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);\n#ifdef FOG\nv_fog_pos=fog_position(world_center.xyz);\n#endif\n}"),clippingMask:pr("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:pr("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef FOG\nif (u_is_globe==0) {gl_FragColor.r*=pow(1.0-fog_opacity(v_fog_pos),2.0);}\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nvarying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 tilePos=floor(a_pos*0.5);vec3 pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;mat3 surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(tilePos)*elevation(tilePos);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*elevation(tilePos);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,tilePos,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#else\npos=vec3(tilePos+extrude,elevation(tilePos));\n#endif\ngl_Position=u_matrix*vec4(pos,1);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),heatmapTexture:pr("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=vec4(a_pos,0,1);v_pos=a_pos*0.5+0.5;}"),collisionBox:pr("varying float v_placed;varying float v_notUsed;void main() {vec4 red =vec4(1.0,0.0,0.0,1.0);vec4 blue=vec4(0.0,0.0,1.0,0.5);gl_FragColor =mix(red,blue,step(0.5,v_placed))*0.5;gl_FragColor*=mix(1.0,0.1,step(0.5,v_notUsed));}","attribute vec3 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;attribute float a_size_scale;attribute vec2 a_padding;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_pos+elevationVector(a_anchor_pos)*elevation(a_anchor_pos),1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,1.5);gl_Position=projectedPoint;gl_Position.xy+=(a_extrude*a_size_scale+a_shift+a_padding)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:pr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos_2f;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos_2f;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(\nmix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:pr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;\n#endif\nvarying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {float h=elevation(a_pos);v_uv=a_pos/8192.0;\n#ifdef PROJECTION_GLOBE_VIEW\ngl_Position=u_matrix*vec4(a_pos_3+elevationVector(a_pos)*h,1);\n#else\ngl_Position=u_matrix*vec4(a_pos*u_overlay_scale,h,1);\n#endif\n}"),fill:pr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\nvec4 out_color=color;\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutline:pr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=outline_color;\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutlinePattern:pr("uniform vec2 u_texsize;uniform sampler2D u_image;varying vec2 v_pos;varying vec2 v_pos_world;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);float dist=length(v_pos_world-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;varying vec2 v_pos_world;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);v_pos_world=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillPattern:pr("uniform vec2 u_texsize;uniform sampler2D u_image;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillExtrusion:pr("varying vec4 v_color;\n#ifdef RENDER_SHADOWS\nvarying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef ZERO_ROOF_RADIUS\nvarying vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvarying highp vec3 v_normal;\n#endif\nvoid main() {\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvec3 normal=v_normal;\n#endif\nfloat z;vec4 color;\n#ifdef ZERO_ROOF_RADIUS\nz=float(normal.z > 0.00001);color=mix(v_color,v_roof_color,z);\n#else\ncolor=v_color;\n#endif\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;\n#ifdef ZERO_ROOF_RADIUS\nconcave*=(1.0-z);\n#endif\nfloat x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);color.rgb=color.rgb*shade;\n#endif\n#ifdef RENDER_SHADOWS\n#ifdef ZERO_ROOF_RADIUS\nnormal=mix(normal,vec3(0.0,0.0,1.0),z);\n#endif\ncolor.xyz=shadowed_color_normal(color.xyz,normalize(normal),v_pos_light_view_0,v_pos_light_view_1,v_depth);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform float u_edge_radius;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nvarying vec4 v_color;\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth;\n#endif\n#ifdef ZERO_ROOF_RADIUS\nvarying vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvarying highp vec3 v_normal;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec4 pos_nx=floor(a_pos_normal_ed*0.5);vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nv_normal=normal;\n#endif\nbase=max(0.0,base);height=max(0.0,top_up_ny.y==0.0 && top_up_ny.x==1.0 ? height-u_edge_radius : height);float t=top_up_ny.x;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=0.0;float c_ele;vec3 pos;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);pos=vec3(pos_nx.xy,h);\n#else\nh=t > 0.0 ? height : base;pos=vec3(pos_nx.xy,h);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*h);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,pos.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*pos.z;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(pos,1),AWAY,hidden);\n#ifdef RENDER_SHADOWS\nv_pos_light_view_0=u_light_matrix_0*vec4(pos,1);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1);v_depth=gl_Position.w;\n#endif\nfloat NdotL=0.0;float colorvalue=0.0;\n#ifdef LIGHTING_3D_MODE\nNdotL=calculate_NdotL(normal);\n#else\ncolorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;NdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),NdotL);\n#endif\nif (normal.y !=0.0) {float r=0.84;\n#ifndef LIGHTING_3D_MODE\nr=mix(0.7,0.98,1.0-u_lightintensity);\n#endif\nNdotL*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}v_color=vec4(0.0,0.0,0.0,1.0);\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\n#ifdef LIGHTING_3D_MODE\nv_color=apply_lighting(color,NdotL);\n#else\nv_color.rgb+=clamp(color.rgb*NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));\n#endif\nv_color*=u_opacity;\n#ifdef ZERO_ROOF_RADIUS\nv_roof_color=vec4(0.0,0.0,0.0,1.0);\n#ifdef LIGHTING_3D_MODE\nv_roof_color=apply_lighting(color,calculate_NdotL(vec3(0.0,0.0,1.0)));\n#else\nfloat roofNdotL=clamp(u_lightpos.z,0.0,1.0);roofNdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),roofNdotL);v_roof_color.rgb+=clamp(color.rgb*roofNdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));\n#endif\nv_roof_color*=u_opacity;\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),fillExtrusionPattern:pr("uniform vec2 u_texsize;uniform sampler2D u_image;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef LIGHTING_3D_MODE\nvarying float v_NdotL;\n#endif\nvarying vec2 v_pos;varying vec4 v_lighting;uniform lowp float u_opacity;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color,v_NdotL)*u_opacity;\n#else\nout_color=out_color*v_lighting;\n#endif\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;float x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);out_color.rgb=out_color.rgb*shade;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform float u_tile_units_to_pixels;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nvarying vec2 v_pos;varying vec4 v_lighting;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef LIGHTING_3D_MODE\nvarying float v_NdotL;\n#endif\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec4 pos_nx=floor(a_pos_normal_ed*0.5);mediump vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;mediump vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));float edgedistance=a_pos_normal_ed.w;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;base=max(0.0,base);height=max(0.0,height);float t=top_up_ny.x;float z=t > 0.0 ? height : base;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=z;vec3 p;float c_ele;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);p=vec3(pos_nx.xy,h);\n#else\np=vec3(pos_nx.xy,z);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*(p.z+lift));vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,p.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*p.z;p=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(p,1),AWAY,hidden);vec2 pos=normal.z==1.0\n? pos_nx.xy\n: vec2(edgedistance,z*u_height_factor);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float NdotL=0.0;\n#ifdef LIGHTING_3D_MODE\nNdotL=calculate_NdotL(normal);\n#else\nNdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),NdotL);\n#endif\nif (normal.y !=0.0) {float r=0.84;\n#ifndef LIGHTING_3D_MODE\nr=mix(0.7,0.98,1.0-u_lightintensity);\n#endif\nNdotL*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\n#ifdef LIGHTING_3D_MODE\nv_NdotL=NdotL;\n#else\nv_lighting.rgb+=clamp(NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;\n#endif \n#ifdef FOG\nv_fog_pos=fog_position(p);\n#endif\n}"),hillshadePrepare:pr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nreturn texture2D(u_image,coord).a/4.0;\n#else\nvec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;\n#endif\n}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y));float b=getElevation(v_pos+vec2(0,-epsilon.y));float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y));float d=getElevation(v_pos+vec2(-epsilon.x,0));float e=getElevation(v_pos+vec2(epsilon.x,0));float f=getElevation(v_pos+vec2(-epsilon.x,epsilon.y));float g=getElevation(v_pos+vec2(0,epsilon.y));float h=getElevation(v_pos+vec2(epsilon.x,epsilon.y));float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2(\n(c+e+e+h)-(a+d+d+f),(f+g+g+h)-(a+b+b+c)\n)/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(\nderiv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:pr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef LIGHTING_3D_MODE\ngl_FragColor=apply_lighting(gl_FragColor);\n#endif\n#ifdef FOG\ngl_FragColor=fog_dither(fog_apply_premultiplied(gl_FragColor,v_fog_pos));\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),line:pr("uniform lowp float u_device_pixel_ratio;uniform float u_alpha_discard_threshold;uniform highp vec2 u_trim_offset;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform sampler2D u_dash_image;varying vec2 v_tex;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform sampler2D u_gradient_image;\n#endif\nuniform float u_border_width;uniform vec4 u_border_color;float luminance(vec3 c) {return (c.r+c.r+c.b+c.g+c.g+c.g)*0.1667;}\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nfloat linearstep(float edge0,float edge1,float x) {return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);\n#ifdef RENDER_LINE_DASH\nfloat sdfdist=texture2D(u_dash_image,v_tex).a;float sdfgamma=1.0/(2.0*u_device_pixel_ratio)/dash.z;alpha*=linearstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);\n#endif\nhighp vec4 out_color;\n#ifdef RENDER_LINE_GRADIENT\nout_color=texture2D(u_gradient_image,v_uv.xy);\n#else\nout_color=color;\n#endif\nfloat trimmed=1.0;\n#ifdef RENDER_LINE_TRIM_OFFSET\nhighp float start=v_uv[2];highp float end=v_uv[3];highp float trim_start=u_trim_offset[0];highp float trim_end=u_trim_offset[1];highp float line_progress=(start+(v_uv.x)*(end-start));if (trim_end > trim_start) {if (line_progress <=trim_end && line_progress >=trim_start) {out_color=vec4(0,0,0,0);trimmed=0.0;}}\n#endif\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\n#ifdef RENDER_LINE_ALPHA_DISCARD\nif (alpha < u_alpha_discard_threshold) {discard;}\n#endif\n#ifdef RENDER_LINE_BORDER\nfloat edgeBlur=(u_border_width+1.0/u_device_pixel_ratio);float alpha2=clamp(min(dist-(v_width2.t-edgeBlur),v_width2.s-dist)/edgeBlur,0.0,1.0);if (alpha2 < 1.) {float smoothAlpha=smoothstep(0.6,1.0,alpha2);\n#ifdef RENDER_LINE_BORDER_AUTO\nfloat Y=(out_color.a > 0.01) ? luminance(out_color.rgb/out_color.a) : 1.;float adjustment=(Y > 0.) ? 0.5/Y : 0.45;if (out_color.a > 0.25 && Y < 0.25) {vec3 borderColor=(Y > 0.) ? out_color.rgb : vec3(1,1,1)*out_color.a;out_color.rgb=out_color.rgb+borderColor*(adjustment*(1.0-smoothAlpha));} else {out_color.rgb*=(0.6 +0.4*smoothAlpha);}\n#else\nout_color.rgb=mix(u_border_color.rgb*u_border_color.a*trimmed,out_color.rgb,smoothAlpha);\n#endif\n}\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define EXTRUDE_SCALE 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nattribute highp vec4 a_packed;\n#endif\n#ifdef RENDER_LINE_DASH\nattribute float a_linesofar;\n#endif\nuniform mat4 u_matrix;uniform mat2 u_pixels_to_tile_units;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform vec2 u_texsize;uniform float u_tile_units_to_pixels;varying vec2 v_tex;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform float u_image_height;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*EXTRUDE_SCALE;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*EXTRUDE_SCALE*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#else\nv_gamma_scale=1.0;\n#endif\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nfloat a_uv_x=a_packed[0];float a_split_index=a_packed[1];highp float a_clip_start=a_packed[2];highp float a_clip_end=a_packed[3];\n#ifdef RENDER_LINE_GRADIENT\nhighp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec4(a_uv_x,a_split_index*texel_height-half_texel_height,a_clip_start,a_clip_end);\n#else\nv_uv=vec4(a_uv_x,0.0,a_clip_start,a_clip_end);\n#endif\n#endif\n#ifdef RENDER_LINE_DASH\nfloat scale=dash.z==0.0 ? 0.0 : u_tile_units_to_pixels/dash.z;float height=dash.y;v_tex=vec2(a_linesofar*scale/floorwidth,(-normal.y*height+dash.x+0.5)/u_texsize.y);\n#endif\nv_width2=vec2(outset,inset);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),linePattern:pr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_tile_units_to_pixels;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;vec2 pattern_size=vec2(display_size.x/u_tile_units_to_pixels,display_size.y);float aspect=display_size.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x=mod(v_linesofar/pattern_size.x*aspect,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos=mix(pattern_tl*texel_size-texel_size,pattern_br*texel_size+texel_size,vec2(x,y));vec4 color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\ncolor=apply_lighting(color);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_linesofar;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mat2 u_pixels_to_tile_units;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#else\nv_gamma_scale=1.0;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),raster:pr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(\ndot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);vec3 out_color=mix(u_high_vec,u_low_vec,rgb);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply(out_color,v_fog_pos));\n#endif\ngl_FragColor=vec4(out_color*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform vec2 u_perspective_transform;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {float w=1.0+dot(a_texture_pos,u_perspective_transform);gl_Position=u_matrix*vec4(a_pos*w,0,w);v_pos0=a_texture_pos/8192.0;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),symbolIcon:pr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_min_font_scale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetProjected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetProjected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetProjected_point.xy/offsetProjected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*max(a_min_font_scale,font_scale)+a_pxoffset/16.0);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nv_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change))*projection_transition_fade;}"),symbolSDF:pr("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetprojected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetprojected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetprojected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetprojected_point.xy/offsetprojected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat gamma_scale=gl_Position.w;float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nvec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade);}"),symbolTextAndIcon:pr("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;uniform vec2 u_texsize_icon;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offset_projected_point=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projected_point.xy/projected_point.w;vec2 b=offset_projected_point.xy/offset_projected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*font_scale);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nv_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade,is_sdf);}"),terrainRaster:pr("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nvarying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth;\n#endif\nvoid main() {vec4 color=texture2D(u_image0,v_pos0);\n#ifdef RENDER_SHADOWS\ncolor.xyz=shadowed_color(color.xyz,v_pos_light_view_0,v_pos_light_view_1,v_depth);\n#endif\n#ifdef FOG\n#ifdef ZERO_EXAGGERATION\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#else\ncolor=fog_dither(fog_apply_from_vert(color,v_fog_opacity));\n#endif\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_skirt_height;attribute vec2 a_pos;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth;\n#endif\nconst float wireframeOffset=0.00015;void main() {vec3 decomposedPosAndSkirt=decomposeToPosAndSkirt(a_pos);float skirt=decomposedPosAndSkirt.z;vec2 decodedPos=decomposedPosAndSkirt.xy;float elevation=elevation(decodedPos)-skirt*u_skirt_height;\n#ifdef TERRAIN_WIREFRAME\nelevation+=wireframeOffset;\n#endif\nv_pos0=decodedPos/8192.0;gl_Position=u_matrix*vec4(decodedPos,elevation,1.0);\n#ifdef FOG\n#ifdef ZERO_EXAGGERATION\nv_fog_pos=fog_position(decodedPos);\n#else\nv_fog_opacity=fog(fog_position(vec3(decodedPos,elevation)));\n#endif\n#endif\n#ifdef RENDER_SHADOWS\nvec3 pos=vec3(decodedPos,elevation);v_pos_light_view_0=u_light_matrix_0*vec4(pos,1.);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1.);v_depth=gl_Position.w;\n#endif\n}"),terrainDepth:pr("#ifdef GL_ES\nprecision highp float;\n#endif\nvarying float v_depth;void main() {gl_FragColor=pack_depth(v_depth);}","uniform mat4 u_matrix;attribute vec2 a_pos;varying float v_depth;void main() {float elevation=elevation(a_pos);gl_Position=u_matrix*vec4(a_pos,elevation,1.0);v_depth=gl_Position.z/gl_Position.w;}"),skybox:pr("\nvarying lowp vec3 v_uv;uniform lowp samplerCube u_cubemap;uniform lowp float u_opacity;uniform highp float u_temporal_offset;uniform highp vec3 u_sun_direction;float sun_disk(highp vec3 ray_direction,highp vec3 sun_direction) {highp float cos_angle=dot(normalize(ray_direction),sun_direction);const highp float cos_sun_angular_diameter=0.99996192306;const highp float smoothstep_delta=1e-5;return smoothstep(\ncos_sun_angular_diameter-smoothstep_delta,cos_sun_angular_diameter+smoothstep_delta,cos_angle);}float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec3 uv=v_uv;const float y_bias=0.015;uv.y+=y_bias;uv.y=pow(abs(uv.y),1.0/5.0);uv.y=map(uv.y,0.0,1.0,-1.0,1.0);vec3 sky_color=textureCube(u_cubemap,uv).rgb;\n#ifdef FOG\nsky_color=fog_apply_sky_gradient(v_uv.xzy,sky_color);\n#endif\nsky_color.rgb=dither(sky_color.rgb,gl_FragCoord.xy+u_temporal_offset);sky_color+=0.1*sun_disk(v_uv,u_sun_direction);gl_FragColor=vec4(sky_color*u_opacity,u_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",tr),skyboxGradient:pr("varying highp vec3 v_uv;uniform lowp sampler2D u_color_ramp;uniform highp vec3 u_center_direction;uniform lowp float u_radius;uniform lowp float u_opacity;uniform highp float u_temporal_offset;void main() {float progress=acos(dot(normalize(v_uv),u_center_direction))/u_radius;vec4 color=texture2D(u_color_ramp,vec2(progress,0.5));\n#ifdef FOG\ncolor.rgb=fog_apply_sky_gradient(v_uv.xzy,color.rgb/color.a)*color.a;\n#endif\ncolor*=u_opacity;color.rgb=dither(color.rgb,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",tr),skyboxCapture:pr("\nvarying highp vec3 v_position;uniform highp float u_sun_intensity;uniform highp float u_luminance;uniform lowp vec3 u_sun_direction;uniform highp vec4 u_color_tint_r;uniform highp vec4 u_color_tint_m;\n#ifdef GL_ES\nprecision highp float;\n#endif\n#define BETA_R vec3(5.5e-6,13.0e-6,22.4e-6)\n#define BETA_M vec3(21e-6,21e-6,21e-6)\n#define MIE_G 0.76\n#define DENSITY_HEIGHT_SCALE_R 8000.0\n#define DENSITY_HEIGHT_SCALE_M 1200.0\n#define PLANET_RADIUS 6360e3\n#define ATMOSPHERE_RADIUS 6420e3\n#define SAMPLE_STEPS 10\n#define DENSITY_STEPS 4\nfloat ray_sphere_exit(vec3 orig,vec3 dir,float radius) {float a=dot(dir,dir);float b=2.0*dot(dir,orig);float c=dot(orig,orig)-radius*radius;float d=sqrt(b*b-4.0*a*c);return (-b+d)/(2.0*a);}vec3 extinction(vec2 density) {return exp(-vec3(BETA_R*u_color_tint_r.a*density.x+BETA_M*u_color_tint_m.a*density.y));}vec2 local_density(vec3 point) {float height=max(length(point)-PLANET_RADIUS,0.0);float exp_r=exp(-height/DENSITY_HEIGHT_SCALE_R);float exp_m=exp(-height/DENSITY_HEIGHT_SCALE_M);return vec2(exp_r,exp_m);}float phase_ray(float cos_angle) {return (3.0/(16.0*PI))*(1.0+cos_angle*cos_angle);}float phase_mie(float cos_angle) {return (3.0/(8.0*PI))*((1.0-MIE_G*MIE_G)*(1.0+cos_angle*cos_angle))/((2.0+MIE_G*MIE_G)*pow(1.0+MIE_G*MIE_G-2.0*MIE_G*cos_angle,1.5));}vec2 density_to_atmosphere(vec3 point,vec3 light_dir) {float ray_len=ray_sphere_exit(point,light_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(DENSITY_STEPS);vec2 density_point_to_atmosphere=vec2(0.0);for (int i=0; i < DENSITY_STEPS;++i) {vec3 point_on_ray=point+light_dir*((float(i)+0.5)*step_len);density_point_to_atmosphere+=local_density(point_on_ray)*step_len;;}return density_point_to_atmosphere;}vec3 atmosphere(vec3 ray_dir,vec3 sun_direction,float sun_intensity) {vec2 density_orig_to_point=vec2(0.0);vec3 scatter_r=vec3(0.0);vec3 scatter_m=vec3(0.0);vec3 origin=vec3(0.0,PLANET_RADIUS,0.0);float ray_len=ray_sphere_exit(origin,ray_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(SAMPLE_STEPS);for (int i=0; i < SAMPLE_STEPS;++i) {vec3 point_on_ray=origin+ray_dir*((float(i)+0.5)*step_len);vec2 density=local_density(point_on_ray)*step_len;density_orig_to_point+=density;vec2 density_point_to_atmosphere=density_to_atmosphere(point_on_ray,sun_direction);vec2 density_orig_to_atmosphere=density_orig_to_point+density_point_to_atmosphere;vec3 extinction=extinction(density_orig_to_atmosphere);scatter_r+=density.x*extinction;scatter_m+=density.y*extinction;}float cos_angle=dot(ray_dir,sun_direction);float phase_r=phase_ray(cos_angle);float phase_m=phase_mie(cos_angle);vec3 beta_r=BETA_R*u_color_tint_r.rgb*u_color_tint_r.a;vec3 beta_m=BETA_M*u_color_tint_m.rgb*u_color_tint_m.a;return (scatter_r*phase_r*beta_r+scatter_m*phase_m*beta_m)*sun_intensity;}const float A=0.15;const float B=0.50;const float C=0.10;const float D=0.20;const float E=0.02;const float F=0.30;vec3 uncharted2_tonemap(vec3 x) {return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}void main() {vec3 ray_direction=v_position;ray_direction.y=pow(ray_direction.y,5.0);const float y_bias=0.015;ray_direction.y+=y_bias;vec3 color=atmosphere(normalize(ray_direction),u_sun_direction,u_sun_intensity);float white_scale=1.0748724675633854;color=uncharted2_tonemap((log2(2.0/pow(u_luminance,4.0)))*color)*white_scale;gl_FragColor=vec4(color,1.0);}","attribute highp vec3 a_pos_3f;uniform mat3 u_matrix_3f;varying highp vec3 v_position;float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec4 pos=vec4(u_matrix_3f*a_pos_3f,1.0);v_position=pos.xyz;v_position.y*=-1.0;v_position.y=map(v_position.y,-1.0,1.0,0.0,1.0);gl_Position=vec4(a_pos_3f.xy,0.0,1.0);}"),globeRaster:pr("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifndef FOG\nuniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform vec2 u_viewport;\n#endif\nvoid main() {vec4 color;\n#ifdef CUSTOM_ANTIALIASING\nvec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);vec3 dir=normalize(ray_dir);vec3 closest_point=dot(u_globe_pos,dir)*dir;float norm_dist_from_center=1.0-length(closest_point-u_globe_pos)/u_globe_radius;const float antialias_pixel=2.0;float antialias_factor=antialias_pixel*fwidth(norm_dist_from_center);float antialias=smoothstep(0.0,antialias_factor,norm_dist_from_center);vec4 raster=texture2D(u_image0,v_pos0);color=vec4(raster.rgb*antialias,raster.a*antialias);\n#else\ncolor=texture2D(u_image0,v_pos0);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_proj_matrix;uniform mat4 u_normalize_matrix;uniform mat4 u_globe_matrix;uniform mat4 u_merc_matrix;uniform float u_zoom_transition;uniform vec2 u_merc_center;uniform mat3 u_grid_matrix;uniform float u_skirt_height;\n#ifdef GLOBE_POLES\nattribute vec3 a_globe_pos;attribute vec2 a_uv;\n#else\nattribute vec2 a_pos;\n#endif\nvarying vec2 v_pos0;const float wireframeOffset=1e3;float mercatorXfromLng(float lng) {return (180.0+lng)/360.0;}float mercatorYfromLat(float lat) {return (180.0-(RAD_TO_DEG*log(tan(QUARTER_PI+lat/2.0*DEG_TO_RAD))))/360.0;}vec3 latLngToECEF(vec2 latLng) {latLng=DEG_TO_RAD*latLng;float cosLat=cos(latLng[0]);float sinLat=sin(latLng[0]);float cosLng=cos(latLng[1]);float sinLng=sin(latLng[1]);float sx=cosLat*sinLng*GLOBE_RADIUS;float sy=-sinLat*GLOBE_RADIUS;float sz=cosLat*cosLng*GLOBE_RADIUS;return vec3(sx,sy,sz);}void main() {\n#ifdef GLOBE_POLES\nvec3 globe_pos=a_globe_pos;vec2 uv=a_uv;\n#else\nfloat tiles=u_grid_matrix[0][2];float idx=u_grid_matrix[1][2];float idy=u_grid_matrix[2][2];vec3 decomposed_pos_and_skirt=decomposeToPosAndSkirt(a_pos);vec3 latLng=u_grid_matrix*vec3(decomposed_pos_and_skirt.xy,1.0);float mercatorY=mercatorYfromLat(latLng[0]);float uvY=mercatorY*tiles-idy;float mercatorX=mercatorXfromLng(latLng[1]);float uvX=mercatorX*tiles-idx;vec3 globe_pos=latLngToECEF(latLng.xy);vec2 merc_pos=vec2(mercatorX,mercatorY);vec2 uv=vec2(uvX,uvY);\n#endif\nv_pos0=uv;vec2 tile_pos=uv*EXTENT;vec3 globe_derived_up_vector=normalize(globe_pos)*u_tile_up_scale;\n#ifdef GLOBE_POLES\nvec3 up_vector=globe_derived_up_vector;\n#else\nvec3 up_vector=elevationVector(tile_pos);\n#endif\nfloat height=elevation(tile_pos);\n#ifdef TERRAIN_WIREFRAME\nheight+=wireframeOffset;\n#endif\nglobe_pos+=up_vector*height;\n#ifndef GLOBE_POLES\nglobe_pos-=globe_derived_up_vector*u_skirt_height*decomposed_pos_and_skirt.z;\n#endif\n#ifdef GLOBE_POLES\nvec4 interpolated_pos=u_globe_matrix*vec4(globe_pos,1.0);\n#else\nvec4 globe_world_pos=u_globe_matrix*vec4(globe_pos,1.0);vec4 merc_world_pos=vec4(0.0);if (u_zoom_transition > 0.0) {merc_world_pos=vec4(merc_pos,height-u_skirt_height*decomposed_pos_and_skirt.z,1.0);merc_world_pos.xy-=u_merc_center;merc_world_pos.x=wrap(merc_world_pos.x,-0.5,0.5);merc_world_pos=u_merc_matrix*merc_world_pos;}vec4 interpolated_pos=vec4(mix(globe_world_pos.xyz,merc_world_pos.xyz,u_zoom_transition),1.0);\n#endif\ngl_Position=u_proj_matrix*interpolated_pos;\n#ifdef FOG\nv_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz);\n#endif\n}"),globeAtmosphere:pr("uniform float u_transition;uniform highp float u_fadeout_range;uniform highp float u_temporal_offset;uniform vec3 u_start_color;uniform vec4 u_color;uniform vec4 u_space_color;uniform vec4 u_high_color;uniform float u_star_intensity;uniform float u_star_size;uniform float u_star_density;uniform float u_horizon_angle;uniform mat4 u_rotation_matrix;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;highp float random(highp vec3 p) {p=fract(p*vec3(23.2342,97.1231,91.2342));p+=dot(p.zxy,p.yxz+123.1234);return fract(p.x*p.y);}float stars(vec3 p,float scale,vec2 offset) {vec2 uv_scale=(u_viewport/u_star_size)*scale;vec3 position=vec3(p.xy*uv_scale+offset*u_viewport,p.z);vec3 q=fract(position)-0.5;vec3 id=floor(position);float random_visibility=step(random(id),u_star_density);float circle=smoothstep(0.5+u_star_intensity,0.5,length(q));return circle*random_visibility;}void main() {highp vec3 dir=normalize(v_ray_dir);float globe_pos_dot_dir;\n#ifdef PROJECTION_GLOBE_VIEW\nglobe_pos_dot_dir=dot(u_globe_pos,dir);highp vec3 closest_point_forward=abs(globe_pos_dot_dir)*dir;float norm_dist_from_center=length(closest_point_forward-u_globe_pos)/u_globe_radius;if (norm_dist_from_center < 0.98) {discard;return;}\n#endif\nhighp vec3 horizon_dir=normalize(v_horizon_dir);float horizon_angle_mercator=dir.y < horizon_dir.y ?\n0.0 : max(acos(dot(dir,horizon_dir)),0.0);float horizon_angle;\n#ifdef PROJECTION_GLOBE_VIEW\nhighp vec3 closest_point=globe_pos_dot_dir*dir;float closest_point_to_center=length(closest_point-u_globe_pos);float theta=asin(clamp(closest_point_to_center/length(u_globe_pos),-1.0,1.0));horizon_angle=globe_pos_dot_dir < 0.0 ?\nPI-theta-u_horizon_angle : theta-u_horizon_angle;float angle_t=pow(u_transition,10.0);horizon_angle=mix(horizon_angle,horizon_angle_mercator,angle_t);\n#else\nhorizon_angle=horizon_angle_mercator;\n#endif\nhorizon_angle/=PI;float t=exp(-horizon_angle/u_fadeout_range);float alpha_0=u_color.a;float alpha_1=u_high_color.a;float alpha_2=u_space_color.a;vec3 color_stop_0=u_color.rgb;vec3 color_stop_1=u_high_color.rgb;vec3 color_stop_2=u_space_color.rgb;vec3 c0=mix(color_stop_2,color_stop_1,alpha_1);vec3 c1=mix(c0,color_stop_0,alpha_0);vec3 c2=mix(c0,c1,t);vec3 c =mix(color_stop_2,c2,t);float a0=mix(alpha_2,1.0,alpha_1);float a1=mix(a0,1.0,alpha_0);float a2=mix(a0,a1,t);float a =mix(alpha_2,a2,t);vec2 uv=gl_FragCoord.xy/u_viewport-0.5;float aspect_ratio=u_viewport.x/u_viewport.y;vec4 uv_dir=vec4(normalize(vec3(uv.x*aspect_ratio,uv.y,1.0)),1.0);uv_dir=u_rotation_matrix*uv_dir;vec3 n=abs(uv_dir.xyz);vec2 uv_remap=(n.x > n.y && n.x > n.z) ? uv_dir.yz/uv_dir.x:\n(n.y > n.x && n.y > n.z) ? uv_dir.zx/uv_dir.y:\nuv_dir.xy/uv_dir.z;uv_remap.x/=aspect_ratio;vec3 D=vec3(uv_remap,1.0);highp float star_field=0.0;if (u_star_intensity > 0.0) {star_field+=stars(D,1.2,vec2(0.0,0.0));star_field+=stars(D,1.0,vec2(1.0,0.0));star_field+=stars(D,0.8,vec2(0.0,1.0));star_field+=stars(D,0.6,vec2(1.0,1.0));star_field*=(1.0-pow(t,0.25+(1.0-u_high_color.a)*0.75));c+=star_field*alpha_2;}c=dither(c,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=vec4(c,a);}","attribute vec3 a_pos;attribute vec2 a_uv;uniform vec3 u_frustum_tl;uniform vec3 u_frustum_tr;uniform vec3 u_frustum_br;uniform vec3 u_frustum_bl;uniform float u_horizon;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;void main() {v_ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,a_uv.x),mix(u_frustum_bl,u_frustum_br,a_uv.x),a_uv.y);v_horizon_dir=mix(\nmix(u_frustum_tl,u_frustum_bl,u_horizon),mix(u_frustum_tr,u_frustum_br,u_horizon),a_uv.x);gl_Position=vec4(a_pos,1.0);}")};function fr(e,t){const r=e.replace(/\s*\/\/[^\n]*\n/g,"\n").split("\n");for(let e of r)if(e=e.trim(),"#"===e[0]&&e.includes("if")&&!e.includes("endif")){e=e.replace("#","").replace(/ifdef|ifndef|elif|if/g,"").replace(/!|defined|\(|\)|\|\||&&/g,"").replace(/\s+/g," ").trim();const r=e.split(" ");for(const e of r)t.includes(e)||t.push(e)}}function pr(e,t){const r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=t.match(/attribute (highp |mediump |lowp )?([\w]+) ([\w]+)/g),o={},i=[...sr];return fr(e,i),fr(t,i),{fragmentSource:e=e.replace(r,(e,t,r,n,i)=>(o[i]=!0,"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nvarying ${r} ${n} ${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = u_${i};\n#endif\n`)),vertexSource:t=t.replace(r,(e,t,r,n,i)=>{const a="float"===n?"vec2":"vec4",s=i.match(/color/)?"color":a;return o[i]?"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${r} ${a} a_${i};\nvarying ${r} ${n} ${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"vec4"===s?`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = a_${i};\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = unpack_mix_${s}(a_${i}, u_${i}_t);\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${r} ${a} a_${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"vec4"===s?`\n#ifndef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = a_${i};\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = unpack_mix_${s}(a_${i}, u_${i}_t);\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`}),staticAttributes:n,usedDefines:i}}class hr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffers=[],this.vao=null}bind(e,t,r,n,o,i,a){this.context=e;let s=this.boundPaintVertexBuffers.length!==n.length;for(let e=0;!s&&e{const o=r.paint.get("hillshade-shadow-color"),i=r.paint.get("hillshade-highlight-color"),a=r.paint.get("hillshade-accent-color");let s=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);const l=!e.options.moving;return{u_matrix:n||e.transform.calculateProjMatrix(t.tileID.toUnwrapped(),l),u_image:0,u_latrange:mr(0,t.tileID),u_light:[r.paint.get("hillshade-exaggeration"),s],u_shadow:o,u_highlight:i,u_accent:a}})(t,n,o,t.terrain?r.projMatrix:null);t.prepareDrawProgram(l,d,r.toUnwrapped());const{tileBoundsBuffer:p,tileBoundsIndexBuffer:h,tileBoundsSegments:m}=t.getTileBoundsBuffers(n);d.draw(l,c.TRIANGLES,i,a,s,e.CullFaceMode.disabled,f,o.id,p,h,m)}function yr(t,r,n){if(!r.needsDEMTextureUpload)return;const o=t.context,i=o.gl;o.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||t.getTileTexture(n.stride);const a=n.getPixels();r.demTexture?r.demTexture.update(a,{premultiply:!1}):r.demTexture=new e.Texture(o,a,i.RGBA,{premultiply:!1}),r.needsDEMTextureUpload=!1}function vr(t,r,n,o,i,a){const s=t.context,l=s.gl;if(!r.dem)return;const c=r.dem;if(s.activeTexture.set(l.TEXTURE1),yr(t,r,c),!r.demTexture)return;r.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);const u=c.dim;s.activeTexture.set(l.TEXTURE0);let d=r.fbo;if(!d){const t=new e.Texture(s,{width:u,height:u,data:null},l.RGBA);t.bind(l.LINEAR,l.CLAMP_TO_EDGE),d=r.fbo=s.createFramebuffer(u,u,!0),d.colorAttachment.set(t.texture)}s.bindFramebuffer.set(d.framebuffer),s.viewport.set([0,0,u,u]);const{tileBoundsBuffer:f,tileBoundsIndexBuffer:p,tileBoundsSegments:h}=t.getMercatorTileBoundsBuffers();t.useProgram("hillshadePrepare").draw(s,l.TRIANGLES,o,i,a,e.CullFaceMode.disabled,((t,r)=>{const n=r.stride,o=e.create();return e.ortho(o,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(o,o,[0,-e.EXTENT,0]),{u_matrix:o,u_image:1,u_dimension:[n,n],u_zoom:t.overscaledZ,u_unpack:r.unpackVector}})(r.tileID,c),n.id,f,p,h),r.needsHillshadePrepare=!1}const br=t=>({u_matrix:new e.UniformMatrix4f(t),u_image0:new e.Uniform1i(t),u_skirt_height:new e.Uniform1f(t)}),_r=(e,t)=>({u_matrix:e,u_image0:0,u_skirt_height:t}),xr=(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h)=>({u_proj_matrix:Float32Array.from(e),u_globe_matrix:t,u_normalize_matrix:Float32Array.from(n),u_merc_matrix:r,u_zoom_transition:o,u_merc_center:i,u_image0:0,u_frustum_tl:a,u_frustum_tr:s,u_frustum_br:l,u_frustum_bl:c,u_globe_pos:u,u_globe_radius:d,u_viewport:f,u_grid_matrix:h?Float32Array.from(h):new Float32Array(9),u_skirt_height:p});function wr(e,t){return null!=e&&null!=t&&!(!e.hasData()||!t.hasData())&&null!=e.demTexture&&null!=t.demTexture&&e.tileID.key!==t.tileID.key}const Ar=new class{constructor(){this.operations={}}newMorphing(e,t,r,n,o){if(e in this.operations){const t=this.operations[e];t.to.tileID.key!==r.tileID.key&&(t.queued=r)}else this.operations[e]={startTime:n,phase:0,duration:o,from:t,to:r,queued:null}}getMorphValuesForProxy(e){if(!(e in this.operations))return null;const t=this.operations[e];return{from:t.from,to:t.to,phase:t.phase}}update(e){for(const t in this.operations){const r=this.operations[t];for(r.phase=(e-r.startTime)/r.duration;r.phase>=1||!this._validOp(r);)if(!this._nextOp(r,e)){delete this.operations[t];break}}}_nextOp(e,t){return!!e.queued&&(e.from=e.to,e.to=e.queued,e.queued=null,e.phase=0,e.startTime=t,!0)}_validOp(e){return e.from.hasData()&&e.to.hasData()}},Sr={0:null,1:"TERRAIN_VERTEX_MORPHING",2:"TERRAIN_WIREFRAME"};function Cr(e){return 6*Math.pow(1.5,22-e)}function Er(e,t){const r=1<({u_matrix:e});function Ir(t,r,n,o,i){if(i>0){const a=e.exported.now(),s=(a-t.timeAdded)/i,l=r?(a-r.timeAdded)/i:-1,c=n.getSource(),u=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),d=!r||Math.abs(r.tileID.overscaledZ-u)>Math.abs(t.tileID.overscaledZ-u),f=d&&t.refreshedUponExpiration?1:e.clamp(d?s:1-l,0,1);return t.refreshedUponExpiration&&s>=1&&(t.refreshedUponExpiration=!1),r?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}class kr extends e.SourceCache{constructor(e){const t={type:"raster-dem",maxzoom:e.transform.maxZoom},r=new k(Be(),null),n=Me("mock-dem",t,r,e.style);super("mock-dem",n,!1),n.setEventedParent(this),this._sourceLoaded=!0}_loadTile(e,t){e.state="loaded",t(null)}}class Mr extends e.SourceCache{constructor(e){const t=Me("proxy",{type:"geojson",maxzoom:e.transform.maxZoom},new k(Be(),null),e.style);super("proxy",t,!1),t.setEventedParent(this),this.map=this.getSource().map=e,this.used=this._sourceLoaded=!0,this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}update(t,r,n){if(t.freezeTileCoverage)return;this.transform=t;const o=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce((r,n)=>{if(r[n.key]="",!this._tiles[n.key]){const r=new e.Tile(n,this._source.tileSize*n.overscaleFactor(),t.tileZoom);r.state="loaded",this._tiles[n.key]=r}return r},{});for(const e in this._tiles)e in o||(this.freeFBO(e),this._tiles[e].unloadVectorData(),delete this._tiles[e])}freeFBO(e){const t=this.proxyCachedFBO[e];if(void 0!==t){const r=Object.values(t);this.renderCachePool.push(...r),delete this.proxyCachedFBO[e]}}deallocRenderCache(){this.renderCache.forEach(e=>e.fb.destroy()),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class Rr extends e.OverscaledTileID{constructor(e,t,r){super(e.overscaledZ,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y),this.proxyTileKey=t,this.projMatrix=r}}class Pr extends e.Elevation{constructor(t,r){super(),this.painter=t,this.terrainTileForTile={},this.prevTerrainTileForTile={};const[n,o,i]=function(){const t=new e.StructArrayLayout2i4,r=new e.StructArrayLayout3ui6,n=131;t.reserve(17161),r.reserve(33800);const o=e.EXTENT/128,i=e.EXTENT+o/2,a=i+o;for(let r=-o;ri||r<0||r>i?24575:0,a=e.clamp(Math.round(n),0,e.EXTENT),s=e.clamp(Math.round(r),0,e.EXTENT);t.emplaceBack(a+o,s)}const s=(e,t)=>{const o=t*n+e;r.emplaceBack(o+1,o,o+n),r.emplaceBack(o+n,o+n+1,o+1)};for(let e=1;e<129;e++)for(let t=1;t<129;t++)s(t,e);return[0,129].forEach(e=>{for(let t=0;t<130;t++)s(t,e),s(e,t)}),[t,r,32768]}(),a=t.context;this.gridBuffer=a.createVertexBuffer(n,e.posAttributes.members),this.gridIndexBuffer=a.createIndexBuffer(o),this.gridSegments=e.SegmentVector.simpleSegment(0,0,n.length,o.length),this.gridNoSkirtSegments=e.SegmentVector.simpleSegment(0,0,n.length,i),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new Mr(r.map),this.orthoMatrix=e.create(),e.ortho(this.orthoMatrix,"globe"===this.painter.transform.projection.name?.015:0,e.EXTENT,0,e.EXTENT,0,1);const s=a.gl;this._overlapStencilMode=new e.StencilMode({func:s.GEQUAL,mask:255},0,255,s.KEEP,s.KEEP,s.REPLACE),this._previousZoom=t.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=r,this._useVertexMorphing=!0,this._exaggeration=1,this._mockSourceCache=new kr(r.map)}set style(e){e.on("data",this._onStyleDataEvent.bind(this)),e.on("neworder",this._checkRenderCacheEfficiency.bind(this)),this._style=e,this._checkRenderCacheEfficiency(),this._style.map.on("moveend",()=>{this._clearLineLayersFromRenderCache()})}update(t,r,n){if(t&&t.terrain){this._style!==t&&(this.style=t),this.enabled=!0;const o=t.terrain.properties;this.sourceCache=0===t.terrain.drapeRenderMode?this._mockSourceCache:t._getSourceCache(o.get("source")),this._exaggeration=o.get("exaggeration");const i=()=>{this.sourceCache.used&&e.warnOnce(`Raster DEM source '${this.sourceCache.id}' is used both for terrain and as layer source.\nThis leads to lower resolution of hillshade. For full hillshade resolution but higher memory consumption, define another raster DEM source.`);const t=this.getScaledDemTileSize();this.sourceCache.update(r,t,!0),this.resetTileLookupCache(this.sourceCache.id)};this.sourceCache.usedForTerrain||(this.resetTileLookupCache(this.sourceCache.id),this.sourceCache.usedForTerrain=!0,i(),this._initializing=!0),i(),r.updateElevation(!0,n),this.resetTileLookupCache(this.proxySourceCache.id),this.proxySourceCache.update(r),this._emptyDEMTextureDirty=!0}else this._disable()}resetTileLookupCache(e){this._findCoveringTileCache[e]={}}getScaledDemTileSize(){return this.sourceCache.getSource().tileSize/128*this.proxySourceCache.getSource().tileSize}_checkRenderCacheEfficiency(){const t=this.renderCacheEfficiency(this._style);this._style.map._optimizeForTerrain||100!==t.efficiency&&e.warnOnce(`Terrain render cache efficiency is not optimal (${t.efficiency}%) and performance\n may be affected negatively, consider placing all background, fill and line layers before layer\n with id '${t.firstUndrapedLayer}' or create a map using optimizeForTerrain: true option.`)}_onStyleDataEvent(e){e.coord&&"source"===e.dataType?this._clearRenderCacheForTile(e.sourceCacheId,e.coord):"style"===e.dataType&&(this._invalidateRenderCache=!0)}_disable(){if(this.enabled&&(this.enabled=!1,this._sharedDepthStencil=void 0,this.proxySourceCache.deallocRenderCache(),this._style))for(const e in this._style._sourceCaches)this._style._sourceCaches[e].usedForTerrain=!1}destroy(){this._disable(),this._emptyDEMTexture&&this._emptyDEMTexture.destroy(),this._emptyDepthBufferTexture&&this._emptyDepthBufferTexture.destroy(),this.pool.forEach(e=>e.fb.destroy()),this.pool=[],this._depthFBO&&(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0)}_source(){return this.enabled?this.sourceCache:null}isUsingMockSource(){return this.sourceCache===this._mockSourceCache}exaggeration(){return this._exaggeration}get visibleDemTiles(){return this._visibleDemTiles}get drapeBufferSize(){const e=2*this.proxySourceCache.getSource().tileSize;return[e,e]}set useVertexMorphing(e){this._useVertexMorphing=e}updateTileBinding(t){if(!this.enabled)return;this.prevTerrainTileForTile=this.terrainTileForTile;const r=this.proxySourceCache,n=this.painter.transform;this._initializing&&(this._initializing=0===n._centerAltitude&&-1===this.getAtPointOrZero(e.MercatorCoordinate.fromLngLat(n.center),-1),this._emptyDEMTextureDirty=!this._initializing);const o=this.proxyCoords=r.getIds().map(e=>{const t=r.getTileByID(e).tileID;return t.projMatrix=n.calculateProjMatrix(t.toUnwrapped()),t});!function(t,r){const n=r.transform.pointCoordinate(r.transform.getCameraPoint()),o=new e.Point(n.x,n.y);t.sort((t,r)=>{if(r.overscaledZ-t.overscaledZ)return r.overscaledZ-t.overscaledZ;const n=new e.Point(t.canonical.x+(1<{this.proxyToSource[e.key]={}}),this.terrainTileForTile={};const a=this._style._sourceCaches;for(const e in a){const r=a[e];if(!r.used)continue;if(r!==this.sourceCache&&this.resetTileLookupCache(r.id),this._setupProxiedCoordsForOrtho(r,t[e],i),r.usedForTerrain)continue;const n=t[e];r.getSource().reparseOverscaled&&this._assignTerrainTiles(n)}this.proxiedCoords[r.id]=o.map(e=>new Rr(e,e.key,this.orthoMatrix)),this._assignTerrainTiles(o),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(i),this.renderingToTexture=!1,this._updateTimestamp=e.exported.now();const s={};this._visibleDemTiles=[];for(const e of this.proxyCoords){const t=this.terrainTileForTile[e.key];if(!t)continue;const r=t.tileID.key;r in s||(this._visibleDemTiles.push(t),s[r]=r)}}_assignTerrainTiles(e){this._initializing||e.forEach(e=>{if(this.terrainTileForTile[e.key])return;const t=this._findTileCoveringTileID(e,this.sourceCache);t&&(this.terrainTileForTile[e.key]=t)})}_prepareDEMTextures(){const e=this.painter.context,t=e.gl;for(const r in this.terrainTileForTile){const n=this.terrainTileForTile[r],o=n.dem;!o||n.demTexture&&!n.needsDEMTextureUpload||(e.activeTexture.set(t.TEXTURE1),yr(this.painter,n,o))}}_prepareDemTileUniforms(e,t,r,n){if(!t||null==t.demTexture)return!1;const o=e.tileID.canonical,i=Math.pow(2,t.tileID.canonical.z-o.z),a=n||"";return r[`u_dem_tl${a}`]=[o.x*i%1,o.y*i%1],r[`u_dem_scale${a}`]=i,!0}get emptyDEMTexture(){return!this._emptyDEMTextureDirty&&this._emptyDEMTexture?this._emptyDEMTexture:this._updateEmptyDEMTexture()}get emptyDepthBufferTexture(){const t=this.painter.context,r=t.gl;if(!this._emptyDepthBufferTexture){const n=new e.RGBAImage({width:1,height:1},Uint8Array.of(255,255,255,255));this._emptyDepthBufferTexture=new e.Texture(t,n,r.RGBA,{premultiply:!1})}return this._emptyDepthBufferTexture}_getLoadedAreaMinimum(){let e=0;const t=this._visibleDemTiles.reduce((t,r)=>{if(!r.dem)return t;const n=r.dem.tree.minimums[0];return n>0&&e++,t+n},0);return e?t/e:0}_updateEmptyDEMTexture(){const t=this.painter.context,r=t.gl;t.activeTexture.set(r.TEXTURE2);const n=this._getLoadedAreaMinimum(),o=new e.RGBAImage({width:1,height:1},new Uint8Array(e.DEMData.pack(n,this.sourceCache.getSource().encoding)));this._emptyDEMTextureDirty=!1;let i=this._emptyDEMTexture;return i?i.update(o,{premultiply:!1}):i=this._emptyDEMTexture=new e.Texture(t,o,r.RGBA,{premultiply:!1}),i}setupElevationDraw(t,r,n){const o=this.painter.context,i=o.gl,a=(s=this.sourceCache.getSource().encoding,{u_dem:2,u_dem_prev:4,u_dem_unpack:e.DEMData.getUnpackVector(s),u_dem_tl:[0,0],u_dem_tl_prev:[0,0],u_dem_scale:0,u_dem_scale_prev:0,u_dem_size:0,u_dem_lerp:1,u_depth:3,u_depth_size_inv:[0,0],u_exaggeration:0});var s;a.u_dem_size=this.sourceCache.getSource().tileSize,a.u_exaggeration=this.exaggeration();let l=null,c=null,u=1;if(n&&n.morphing&&this._useVertexMorphing){const e=n.morphing.srcDemTile,r=n.morphing.dstDemTile;u=n.morphing.phase,e&&r&&(this._prepareDemTileUniforms(t,e,a,"_prev")&&(c=e),this._prepareDemTileUniforms(t,r,a)&&(l=r))}if(c&&l?(o.activeTexture.set(i.TEXTURE2),l.demTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE,i.NEAREST),o.activeTexture.set(i.TEXTURE4),c.demTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE,i.NEAREST),a.u_dem_lerp=u):(l=this.terrainTileForTile[t.tileID.key],o.activeTexture.set(i.TEXTURE2),(this._prepareDemTileUniforms(t,l,a)?l.demTexture:this.emptyDEMTexture).bind(i.NEAREST,i.CLAMP_TO_EDGE)),o.activeTexture.set(i.TEXTURE3),n&&n.useDepthForOcclusion?(this._depthTexture&&this._depthTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE),this._depthFBO&&(a.u_depth_size_inv=[1/this._depthFBO.width,1/this._depthFBO.height])):(this.emptyDepthBufferTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE),a.u_depth_size_inv=[1,1]),n&&n.useMeterToDem&&l){const t=(1<{if(c===e)return;const n=[Sr[e],"PROJECTION_GLOBE_VIEW"];f&&n.push("CUSTOM_ANTIALIASING"),r&&n.push(Sr[u]),l=t.useProgram("globeRaster",null,n),c=e},h=t.colorModeForRenderPass(),m=new e.DepthMode(s.LEQUAL,e.DepthMode.ReadWrite,t.depthRangeFor3D);Ar.update(i);const g=e.calculateGlobeMercatorMatrix(d),y=[e.mercatorXfromLng(d.center.lng),e.mercatorYfromLat(d.center.lat)],v=u?[!1,!0]:[!1],b=t.globeSharedBuffers,_=[d.width*e.exported.devicePixelRatio,d.height*e.exported.devicePixelRatio],x=Float32Array.from(d.globeMatrix),w={useDenormalizedUpVectorScale:!0};if(v.forEach(u=>{const d=t.transform,f=Cr(d.zoom)*r.exaggeration();c=-1;const v=u?s.LINES:s.TRIANGLES;for(const c of o){const o=n.getTile(c),A=e.StencilMode.disabled,S=r.prevTerrainTileForTile[c.key],C=r.terrainTileForTile[c.key];wr(S,C)&&Ar.newMorphing(c.key,S,C,i,250),a.activeTexture.set(s.TEXTURE0),o.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE);const E=Ar.getMorphValuesForProxy(c.key),T=E?1:0;E&&e.extend$1(w,{morphing:{srcDemTile:E.from,dstDemTile:E.to,phase:e.easeCubicInOut(E.phase)}});const I=e.tileCornersToBounds(c.canonical),k=e.getLatitudinalLod(I.getCenter().lat),M=e.getGridMatrix(c.canonical,I,k,d.worldSize/d._pixelsPerMercatorPixel),R=e.globeNormalizeECEF(e.globeTileBounds(c.canonical)),P=xr(d.projMatrix,x,g,R,e.globeToMercatorTransition(d.zoom),y,d.frustumCorners.TL,d.frustumCorners.TR,d.frustumCorners.BR,d.frustumCorners.BL,d.globeCenterInViewSpace,d.globeRadius,_,f,M);if(p(T,u),r.setupElevationDraw(o,l,w),t.prepareDrawProgram(a,l,c.toUnwrapped()),b){const[r,n,o]=u?b.getWirefameBuffers(t.context,k):b.getGridBuffers(k,0!==f);l.draw(a,v,m,A,h,e.CullFaceMode.backCCW,P,"globe_raster",r,n,o)}}}),b){const i=["GLOBE_POLES","PROJECTION_GLOBE_VIEW"];f&&i.push("CUSTOM_ANTIALIASING"),l=t.useProgram("globeRaster",null,i);for(const i of o){const{x:o,y:c,z:u}=i.canonical,f=0===c,p=c===(1<t.draw(a,s.TRIANGLES,m,e.StencilMode.disabled,h,e.CullFaceMode.disabled,xr(d.projMatrix,b,b,S,0,y,d.frustumCorners.TL,d.frustumCorners.TR,d.frustumCorners.BR,d.frustumCorners.BL,d.globeCenterInViewSpace,d.globeRadius,_,0),"globe_pole_raster",r,x,A);r.setupElevationDraw(c,l,w),t.prepareDrawProgram(a,l,i.toUnwrapped()),f&&C(l,g),p&&(b=e.scale(e.create(),b,[1,-1,1]),C(l,v))}}}}(t,r,n,o,i);else{const a=t.context,s=a.gl;let l,c;const u=t.options.showTerrainWireframe?2:0,d=(e,r)=>{if(c===e)return;const n=[Sr[e]];r&&n.push(Sr[u]),l=t.useProgram("terrainRaster",null,n),c=e},f=t.colorModeForRenderPass(),p=new e.DepthMode(s.LEQUAL,e.DepthMode.ReadWrite,t.depthRangeFor3D);Ar.update(i);const h=t.transform,m=Cr(h.zoom)*r.exaggeration();(u?[!1,!0]:[!1]).forEach(u=>{c=-1;const g=u?s.LINES:s.TRIANGLES,[y,v]=u?r.getWirefameBuffer():[r.gridIndexBuffer,r.gridSegments];for(const c of o){const o=n.getTile(c),b=e.StencilMode.disabled,_=r.prevTerrainTileForTile[c.key],x=r.terrainTileForTile[c.key];wr(_,x)&&Ar.newMorphing(c.key,_,x,i,250),a.activeTexture.set(s.TEXTURE0),o.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST);const w=Ar.getMorphValuesForProxy(c.key),A=w?1:0;let S;w&&(S={morphing:{srcDemTile:w.from,dstDemTile:w.to,phase:e.easeCubicInOut(w.phase)}});const C=_r(c.projMatrix,Er(c.canonical,h.renderWorldCopies)?m/10:m);d(A,u),r.setupElevationDraw(o,l,S),t.prepareDrawProgram(a,l,c.toUnwrapped()),l.draw(a,g,p,b,f,e.CullFaceMode.backCCW,C,"terrain_raster",r.gridBuffer,y,v)}})}}(r,this,this.proxySourceCache,t,this._updateTimestamp),this.renderingToTexture=!0,r.gpuTimingDeferredRenderEnd(),t.splice(0,t.length))}renderBatch(t){if(0===this._drapedRenderBatches.length)return t+1;this.renderingToTexture=!0;const r=this.painter,n=this.painter.context,o=this.proxySourceCache,i=this.proxiedCoords[o.id],a=this._drapedRenderBatches.shift(),s=[],l=r.style.order;let c=0;for(const u of i){const i=o.getTileByID(u.proxyTileKey),d=o.proxyCachedFBO[u.key]?o.proxyCachedFBO[u.key][t]:void 0,f=void 0!==d?o.renderCache[d]:this.pool[c++],p=void 0!==d;if(i.texture=f.tex,p&&!f.dirty){s.push(i.tileID);continue}let h;n.bindFramebuffer.set(f.fb.framebuffer),this.renderedToTile=!1,f.dirty&&(n.clear({color:e.Color.transparent,stencil:0}),f.dirty=!1);for(let e=a.start;e<=a.end;++e){const t=r.style._layers[l[e]];if(t.isHidden(r.transform.zoom))continue;const o=r.style._getLayerSourceCache(t),i=o?this.proxyToSource[u.key][o.id]:[u];if(!i)continue;const a=i;n.viewport.set([0,0,f.fb.width,f.fb.height]),h!==(o?o.id:null)&&(this._setupStencil(f,i,t,o),h=o?o.id:null),r.renderLayer(r,o,t,a)}this.renderedToTile?(f.dirty=!0,s.push(i.tileID)):p||--c,5===c&&(c=0,this.renderToBackBuffer(s))}return this.renderToBackBuffer(s),this.renderingToTexture=!1,n.bindFramebuffer.set(null),n.viewport.set([0,0,r.width,r.height]),a.end+1}postRender(){}renderCacheEfficiency(e){const t=e.order.length;if(0===t)return{efficiency:100};let r,n=0,o=0,i=!1;for(let a=0;ae.dem).forEach(t=>{e=Math.min(e,t.dem.tree.minimums[0])}),0===e?e:(e-30)*this._exaggeration}raycast(e,t,r){if(!this._visibleDemTiles)return null;const n=this._visibleDemTiles.filter(e=>e.dem).map(n=>{const o=n.tileID,i=1<(null!==e.t?e.t:Number.MAX_VALUE)-(null!==t.t?t.t:Number.MAX_VALUE));for(const o of n){if(null==o.t)return null;const n=o.tile.dem.tree.raycast(o.minx,o.miny,o.maxx,o.maxy,e,t,r);if(null!=n)return n}return null}_createFBO(){const t=this.painter.context,r=t.gl,n=this.drapeBufferSize;t.activeTexture.set(r.TEXTURE0);const o=new e.Texture(t,{width:n[0],height:n[1],data:null},r.RGBA);o.bind(r.LINEAR,r.CLAMP_TO_EDGE);const i=t.createFramebuffer(n[0],n[1],!1);return i.colorAttachment.set(o.texture),i.depthAttachment=new we(t,i.framebuffer),void 0===this._sharedDepthStencil?(this._sharedDepthStencil=t.createRenderbuffer(t.gl.DEPTH_STENCIL,n[0],n[1]),this._stencilRef=0,i.depthAttachment.set(this._sharedDepthStencil),t.clear({stencil:0})):i.depthAttachment.set(this._sharedDepthStencil),t.extTextureFilterAnisotropic&&!t.extTextureFilterAnisotropicForceOff&&r.texParameterf(r.TEXTURE_2D,t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.extTextureFilterAnisotropicMax),{fb:i,tex:o,dirty:!1}}_initFBOPool(){for(;this.pool.length{const t=this._style._layers[e],r=t.isHidden(this.painter.transform.zoom);return"custom"===t.type?!r&&t.shouldRedrape():!r&&t.hasTransition()})}_clearLineLayersFromRenderCache(){let t=!1;for(const e of this._style._getSources())if(e instanceof Ce){t=!0;break}if(!t)return;const r={};for(let t=0;tt.renderCachePool.length){const e=Object.values(t.proxyCachedFBO);t.proxyCachedFBO={};for(let r=0;r=0;o--){const i=r[o];if(t.getTileByID(i.key),void 0!==t.proxyCachedFBO[i.key]){const r=e[i.key],o=this.proxyToSource[i.key];let a=0;for(const e in o){const t=o[e],i=r[e];if(!i||i.length!==t.length||t.some((t,r)=>t!==i[r]||n[e]&&n[e].hasOwnProperty(t.key))){a=-1;break}++a}for(const e in t.proxyCachedFBO[i.key])t.renderCache[t.proxyCachedFBO[i.key][e]].dirty=a<0||a!==Object.values(r).length}}const o=[...this._drapedRenderBatches];o.sort((e,t)=>t.end-t.start-(e.end-e.start));for(const e of o)for(const n of r){if(t.proxyCachedFBO[n.key])continue;let r=t.renderCachePool.pop();void 0===r&&t.renderCache.length<50&&(r=t.renderCache.length,t.renderCache.push(this._createFBO())),void 0!==r&&(t.proxyCachedFBO[n.key]={},t.proxyCachedFBO[n.key][e.start]=r,t.renderCache[r].dirty=!0)}this._tilesDirty={}}_setupStencil(e,t,r,n){if(!n||!this._sourceTilesOverlap[n.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));const o=this.painter.context,i=o.gl;if(t.length<=1)return void(this._overlapStencilType=!1);let a;if(r.isTileClipped())a=t.length,this._overlapStencilMode.test={func:i.EQUAL,mask:255},this._overlapStencilType="Clip";else{if(!(t[0].overscaledZ>t[t.length-1].overscaledZ))return void(this._overlapStencilType=!1);a=1,this._overlapStencilMode.test={func:i.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+a>255&&(o.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=a,this._overlapStencilMode.ref=this._stencilRef,r.isTileClipped()&&this._renderTileClippingMasks(t,this._overlapStencilMode.ref)}clipOrMaskOverlapStencilType(){return"Clip"===this._overlapStencilType||"Mask"===this._overlapStencilType}stencilModeForRTTOverlap(t){return this.renderingToTexture&&this._overlapStencilType?("Clip"===this._overlapStencilType&&(this._overlapStencilMode.ref=this.painter._tileClippingMaskIDs[t.key]),this._overlapStencilMode):e.StencilMode.disabled}_renderTileClippingMasks(t,r){const n=this.painter,o=this.painter.context,i=o.gl;n._tileClippingMaskIDs={},o.setColorMode(e.ColorMode.disabled),o.setDepthMode(e.DepthMode.disabled);const a=n.useProgram("clippingMask");for(const s of t){const t=n._tileClippingMaskIDs[s.key]=--r;a.draw(o,i.TRIANGLES,e.DepthMode.disabled,new e.StencilMode({func:i.ALWAYS,mask:0},t,255,i.KEEP,i.KEEP,i.REPLACE),e.ColorMode.disabled,e.CullFaceMode.disabled,Tr(s.projMatrix),"$clipping",n.tileExtentBuffer,n.quadTriangleIndexBuffer,n.tileExtentSegments)}}pointCoordinate(t){const r=this.painter.transform;if(t.x<0||t.x>r.width||t.y<0||t.y>r.height)return null;const n=[t.x,t.y,1,1];e.transformMat4$1(n,n,r.pixelMatrixInverse),e.scale$1(n,n,1/n[3]),n[0]/=r.worldSize,n[1]/=r.worldSize;const o=r._camera.position,i=e.mercatorZfromAltitude(1,r.center.lat),a=[o[0],o[1],o[2]/i,0],s=e.subtract([],n.slice(0,3),a);e.normalize(s,s);const l=this.raycast(a,s,this._exaggeration);return null!==l&&l?(e.scaleAndAdd(a,a,s,l),a[3]=a[2],a[2]*=i,a):null}drawDepth(){const t=this.painter,r=t.context,n=this.proxySourceCache,o=Math.ceil(t.width),i=Math.ceil(t.height);if(!this._depthFBO||this._depthFBO.width===o&&this._depthFBO.height===i||(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0),!this._depthFBO){const t=r.gl,n=r.createFramebuffer(o,i,!0);r.activeTexture.set(t.TEXTURE0);const a=new e.Texture(r,{width:o,height:i,data:null},t.RGBA);a.bind(t.NEAREST,t.CLAMP_TO_EDGE),n.colorAttachment.set(a.texture);const s=r.createRenderbuffer(r.gl.DEPTH_COMPONENT16,o,i);n.depthAttachment.set(s),this._depthFBO=n,this._depthTexture=a}r.bindFramebuffer.set(this._depthFBO.framebuffer),r.viewport.set([0,0,o,i]),function(t,r,n,o){if("globe"===t.transform.projection.name)return;const i=t.context,a=i.gl;i.clear({depth:1});const s=t.useProgram("terrainDepth"),l=new e.DepthMode(a.LESS,e.DepthMode.ReadWrite,t.depthRangeFor3D);for(const t of o){const o=n.getTile(t),c=_r(t.projMatrix,0);r.setupElevationDraw(o,s),s.draw(i,a.TRIANGLES,l,e.StencilMode.disabled,e.ColorMode.unblended,e.CullFaceMode.backCCW,c,"terrain_depth",r.gridBuffer,r.gridIndexBuffer,r.gridNoSkirtSegments)}}(t,this,n,this.proxyCoords)}_setupProxiedCoordsForOrtho(e,t,r){if(e.getSource()instanceof Ie)return this._setupProxiedCoordsForImageSource(e,t,r);this._findCoveringTileCache[e.id]=this._findCoveringTileCache[e.id]||{};const n=this.proxiedCoords[e.id]=[],o=this.proxyCoords;for(let t=0;t(e.min.x=Math.min(e.min.x,t.x-s.x),e.min.y=Math.min(e.min.y,t.y-s.y),e.max.x=Math.max(e.max.x,t.x-s.x),e.max.y=Math.max(e.max.y,t.y-s.y),e),{min:new e.Point(Number.MAX_VALUE,Number.MAX_VALUE),max:new e.Point(-Number.MAX_VALUE,-Number.MAX_VALUE)}),c=(t,r)=>{const n=t.wrap+t.canonical.x/(1<a+l.max.x||o+is+l.max.y};for(let e=0;ee.key===r.tileID.key);if(e)return e}if(r.tileID.key!==t.key){const n=t.canonical.z-r.tileID.canonical.z;let i,a,s;o=e.create();const l=r.tileID.wrap-t.wrap<0?(i=e.EXTENT>>n,a=i*((r.tileID.canonical.x<=o){const n=t.canonical.z-o;r.getSource().reparseOverscaled?(s=Math.max(t.canonical.z+2,r.transform.tileZoom),a=new e.OverscaledTileID(s,t.wrap,o,t.canonical.x>>n,t.canonical.y>>n)):0!==n&&(s=o,a=new e.OverscaledTileID(s,t.wrap,o,t.canonical.x>>n,t.canonical.y>>n))}a.key!==t.key&&(c.push(a.key),n=r.getTile(a))}const u=e=>{c.forEach(t=>{o[t]=e}),c.length=0};for(s-=1;s>=l&&(!n||!n.hasData());s--){n&&u(n.tileID.key);const e=a.calculateScaledKey(s);if(n=r.getTileByID(e),n&&n.hasData())break;const t=o[e];if(null===t)break;void 0===t?c.push(e):n=r.getTileByID(t)}return u(n?n.tileID.key:null),n&&n.hasData()?n:null}findDEMTileFor(e){return this.enabled?this._findTileCoveringTileID(e,this.sourceCache):null}prepareDrawTile(){this.renderedToTile=!0}_clearRenderCacheForTile(e,t){let r=this._tilesDirty[e];r||(r=this._tilesDirty[e]={}),r[t.key]=!0}getWirefameBuffer(){if(!this.wireframeSegments){const t=function(){let t=0;const r=new e.StructArrayLayout2ui4,n=131;for(let e=1;e<129;e++){for(let o=1;o<129;o++)t=e*n+o,r.emplaceBack(t,t+1),r.emplaceBack(t,t+n),r.emplaceBack(t+1,t+n),128===e&&r.emplaceBack(t+n,t+n+1);r.emplaceBack(t+1,t+1+n)}return r}();this.wireframeIndexBuffer=this.painter.context.createIndexBuffer(t),this.wireframeSegments=e.SegmentVector.simpleSegment(0,0,this.gridBuffer.length,t.length)}return[this.wireframeIndexBuffer,this.wireframeSegments]}}class Or{static cacheKey(e,t,r,n){let o=`${t}${n?n.cacheKey:""}`;for(const t of r)e.usedDefines.includes(t)&&(o+=`/${t}`);return o}constructor(t,r,n,o,i,a){const s=t.gl;this.program=s.createProgram();const l=function(e){const t=[];for(let r=0;r`#define ${e}`));const f=t.isWebGL2?"#version 300 es\n":"",p=f+d.concat(t.extStandardDerivatives&&0===f.length?"#extension GL_OES_standard_derivatives : enable\n".concat(ur):ur,ur,cr,lr.fragmentSource,ar.fragmentSource,n.fragmentSource).join("\n"),h=f+d.concat("\n#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif",cr,lr.vertexSource,ar.vertexSource,ir.vertexSource,n.vertexSource).join("\n"),m=s.createShader(s.FRAGMENT_SHADER);if(s.isContextLost())return void(this.failedToCreate=!0);s.shaderSource(m,p),s.compileShader(m),s.attachShader(this.program,m);const g=s.createShader(s.VERTEX_SHADER);if(s.isContextLost())this.failedToCreate=!0;else{s.shaderSource(g,h),s.compileShader(g),s.attachShader(this.program,g),this.attributes={},this.numAttributes=u.length;for(let e=0;e({u_dem:new e.Uniform1i(t),u_dem_prev:new e.Uniform1i(t),u_dem_unpack:new e.Uniform4f(t),u_dem_tl:new e.Uniform2f(t),u_dem_scale:new e.Uniform1f(t),u_dem_tl_prev:new e.Uniform2f(t),u_dem_scale_prev:new e.Uniform1f(t),u_dem_size:new e.Uniform1f(t),u_dem_lerp:new e.Uniform1f(t),u_exaggeration:new e.Uniform1f(t),u_depth:new e.Uniform1i(t),u_depth_size_inv:new e.Uniform2f(t),u_meter_to_dem:new e.Uniform1f(t),u_label_plane_matrix_inv:new e.UniformMatrix4f(t)}))(t)),a.includes("GLOBE")&&(this.globeUniforms=(t=>({u_tile_tl_up:new e.Uniform3f(t),u_tile_tr_up:new e.Uniform3f(t),u_tile_br_up:new e.Uniform3f(t),u_tile_bl_up:new e.Uniform3f(t),u_tile_up_scale:new e.Uniform1f(t)}))(t)),a.includes("FOG")&&(this.fogUniforms=(t=>({u_fog_matrix:new e.UniformMatrix4f(t),u_fog_range:new e.Uniform2f(t),u_fog_color:new e.Uniform4f(t),u_fog_horizon_blend:new e.Uniform1f(t),u_fog_temporal_offset:new e.Uniform1f(t),u_frustum_tl:new e.Uniform3f(t),u_frustum_tr:new e.Uniform3f(t),u_frustum_br:new e.Uniform3f(t),u_frustum_bl:new e.Uniform3f(t),u_globe_pos:new e.Uniform3f(t),u_globe_radius:new e.Uniform1f(t),u_globe_transition:new e.Uniform1f(t),u_is_globe:new e.Uniform1i(t),u_viewport:new e.Uniform2f(t)}))(t))}}setTerrainUniformValues(e,t){if(!this.terrainUniforms)return;const r=this.terrainUniforms;if(!this.failedToCreate){e.program.set(this.program);for(const e in t)r[e]&&r[e].set(this.program,e,t[e])}}setGlobeUniformValues(e,t){if(!this.globeUniforms)return;const r=this.globeUniforms;if(!this.failedToCreate){e.program.set(this.program);for(const e in t)r[e]&&r[e].set(this.program,e,t[e])}}setFogUniformValues(e,t){if(!this.fogUniforms)return;const r=this.fogUniforms;if(!this.failedToCreate){e.program.set(this.program);for(const e in t)r[e].set(this.program,e,t[e])}}draw(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h){const m=e.gl;if(this.failedToCreate)return;e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(n),e.setColorMode(o),e.setCullFace(i);for(const e of Object.keys(this.fixedUniforms))this.fixedUniforms[e].set(this.program,e,a[e]);p&&p.setUniforms(this.program,e,this.binderUniforms,d,{zoom:f});const g={[m.LINES]:2,[m.TRIANGLES]:3,[m.LINE_STRIP]:1}[t];for(const r of u.get()){const n=r.vaos||(r.vaos={});(n[s]||(n[s]=new hr)).bind(e,this,l,p?p.getPaintVertexBuffers():[],c,r.vertexOffset,h||[]),m.drawElements(t,r.primitiveLength*g,m.UNSIGNED_SHORT,r.primitiveOffset*g*2)}}}function Dr(e,t){const r=Math.pow(2,t.tileID.overscaledZ),n=t.tileSize*Math.pow(2,e.transform.tileZoom)/r,o=n*(t.tileID.canonical.x+t.tileID.wrap*r),i=n*t.tileID.canonical.y;return{u_image:0,u_texsize:t.imageAtlasTexture.size,u_tile_units_to_pixels:1/M(t,1,e.transform.tileZoom),u_pixel_coord_upper:[o>>16,i>>16],u_pixel_coord_lower:[65535&o,65535&i]}}const Lr=e.create(),Nr=(t,r,n,o,i,a,s,l,c,u,d)=>{const f=r.style.light,p=f.properties.get("position"),h=[p.x,p.y,p.z],m=e.create$1();"viewport"===f.properties.get("anchor")&&(e.fromRotation(m,-r.transform.angle),e.transformMat3(h,h,m));const g=f.properties.get("color"),y=r.transform,v={u_matrix:t,u_lightpos:h,u_lightintensity:f.properties.get("intensity"),u_lightcolor:[g.r,g.g,g.b],u_vertical_gradient:+n,u_opacity:o,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:Lr,u_merc_center:[0,0],u_up_dir:[0,0,0],u_height_lift:0,u_ao:i,u_edge_radius:a};return"globe"===y.projection.name&&(v.u_tile_id=[s.canonical.x,s.canonical.y,1<{const p=Nr(t,r,n,o,i,a,s,c,u,d,f),h={u_height_factor:-Math.pow(2,s.overscaledZ)/l.tileSize/8};return e.extend(p,Dr(r,l),h)},zr=e=>({u_matrix:e}),Br=(t,r,n)=>e.extend(zr(t),Dr(r,n)),jr=(e,t)=>({u_matrix:e,u_world:t}),$r=(t,r,n,o)=>e.extend(Br(t,r,n),{u_world:o}),Ur=e.create(),Vr=(t,r,n,o,i,a)=>{const s=t.transform,l="globe"===s.projection.name;let c;if("map"===a.paint.get("circle-pitch-alignment"))if(l){const t=e.globePixelsToTileUnits(s.zoom,r.canonical)*s._pixelsPerMercatorPixel;c=Float32Array.from([t,0,0,t])}else c=s.calculatePixelsToTileUnitsMatrix(n);else c=new Float32Array([s.pixelsToGLUnits[0],0,0,s.pixelsToGLUnits[1]]);const u={u_camera_to_center_distance:s.cameraToCenterDistance,u_matrix:t.translatePosMatrix(r.projMatrix,n,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_device_pixel_ratio:e.exported.devicePixelRatio,u_extrude_scale:c,u_inv_rot_matrix:Ur,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(l){u.u_inv_rot_matrix=o,u.u_merc_center=i,u.u_tile_id=[r.canonical.x,r.canonical.y,1<{const t=[];return"map"===e.paint.get("circle-pitch-alignment")&&t.push("PITCH_WITH_MAP"),"map"===e.paint.get("circle-pitch-scale")&&t.push("SCALE_WITH_MAP"),t},Gr=(t,r,n,o)=>{const i=e.EXTENT/n.tileSize;return{u_matrix:t,u_camera_to_center_distance:r.getCameraToCenterDistance(o),u_extrude_scale:[r.pixelsToGLUnits[0]/i,r.pixelsToGLUnits[1]/i]}},Wr=(e,t,r=1)=>({u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:r}),qr=e.create(),Zr=(t,r,n,o,i,a,s)=>{const l=t.transform,c="globe"===l.projection.name,u=c?e.globePixelsToTileUnits(l.zoom,r.canonical)*l._pixelsPerMercatorPixel:M(n,1,a),d={u_matrix:r.projMatrix,u_extrude_scale:u,u_intensity:s,u_inv_rot_matrix:qr,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(c){d.u_inv_rot_matrix=o,d.u_merc_center=i,d.u_tile_id=[r.canonical.x,r.canonical.y,1<{const s=e.transform,l=s.calculatePixelsToTileUnitsMatrix(t);return{u_matrix:Jr(e,t,r,n),u_pixels_to_tile_units:l,u_device_pixel_ratio:i,u_units_to_pixels:[1/s.pixelsToGLUnits[0],1/s.pixelsToGLUnits[1]],u_dash_image:0,u_gradient_image:1,u_image_height:o,u_texsize:Qr(r)?t.lineAtlasTexture.size:[0,0],u_tile_units_to_pixels:Kr(t,e.transform),u_alpha_discard_threshold:0,u_trim_offset:a}},Xr=(e,t,r,n,o)=>{const i=e.transform;return{u_matrix:Jr(e,t,r,n),u_texsize:t.imageAtlasTexture.size,u_pixels_to_tile_units:i.calculatePixelsToTileUnitsMatrix(t),u_device_pixel_ratio:o,u_image:0,u_tile_units_to_pixels:Kr(t,i),u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]],u_alpha_discard_threshold:0}};function Kr(e,t){return 1/M(e,1,t.tileZoom)}function Jr(e,t,r,n){return e.translatePosMatrix(n||t.tileID.projMatrix,t,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}function Qr(e){const t=e.paint.get("line-dasharray").value;return t.value||"constant"!==t.kind}const en=(e,t,r,n,o,i)=>{return{u_matrix:e,u_tl_parent:t,u_scale_parent:r,u_fade_t:n.mix,u_opacity:n.opacity*o.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:o.paint.get("raster-brightness-min"),u_brightness_high:o.paint.get("raster-brightness-max"),u_saturation_factor:(s=o.paint.get("raster-saturation"),s>0?1-1/(1.001-s):-s),u_contrast_factor:(a=o.paint.get("raster-contrast"),a>0?1/(1-a):1+a),u_spin_weights:tn(o.paint.get("raster-hue-rotate")),u_perspective_transform:i};var a,s};function tn(e){e*=Math.PI/180;const t=Math.sin(e),r=Math.cos(e);return[(2*r+1)/3,(-Math.sqrt(3)*t-r+1)/3,(Math.sqrt(3)*t-r+1)/3]}const rn=e.create(),nn=(t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g)=>{const y=i.transform,v={u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:r?r.uSizeT:0,u_size:r?r.uSize:0,u_camera_to_center_distance:y.cameraToCenterDistance,u_rotate_symbol:+n,u_aspect_ratio:y.width/y.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+c,u_pitch_with_map:+o,u_texsize:u,u_texture:0,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:rn,u_merc_center:[0,0],u_camera_forward:[0,0,0],u_ecef_origin:[0,0,0],u_tile_matrix:rn,u_up_vector:[0,-1,0]};return"globe"===g.name&&(v.u_tile_id=[d.canonical.x,d.canonical.y,1<e.extend(nn(t,r,n,o,i,a,s,l,c,u,f,p,h,m,g,y),{u_gamma_scale:o?i.transform.cameraToCenterDistance*Math.cos(i.terrain?0:i.transform._pitch):1,u_device_pixel_ratio:e.exported.devicePixelRatio,u_is_halo:+d}),an=(t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g)=>e.extend(on(t,r,n,o,i,a,s,l,!0,c,!0,d,f,p,h,m,g),{u_texsize_icon:u,u_texture_icon:1}),sn=(e,t,r)=>({u_matrix:e,u_opacity:t,u_color:r}),ln=(t,r,n,o,i)=>e.extend(function(e,t,r){const n=t.imageManager.getPattern(e.toString()),{width:o,height:i}=t.imageManager.getPixelSize(),a=Math.pow(2,r.tileID.overscaledZ),s=r.tileSize*Math.pow(2,t.transform.tileZoom)/a,l=s*(r.tileID.canonical.x+r.tileID.wrap*a),c=s*r.tileID.canonical.y;return{u_image:0,u_pattern_tl:n.tl,u_pattern_br:n.br,u_texsize:[o,i],u_pattern_size:n.displaySize,u_tile_units_to_pixels:1/M(r,1,t.transform.tileZoom),u_pixel_coord_upper:[l>>16,c>>16],u_pixel_coord_lower:[65535&l,65535&c]}}(o,n,i),{u_matrix:t,u_opacity:r}),cn={fillExtrusion:t=>({u_matrix:new e.UniformMatrix4f(t),u_lightpos:new e.Uniform3f(t),u_lightintensity:new e.Uniform1f(t),u_lightcolor:new e.Uniform3f(t),u_vertical_gradient:new e.Uniform1f(t),u_opacity:new e.Uniform1f(t),u_edge_radius:new e.Uniform1f(t),u_ao:new e.Uniform2f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_up_dir:new e.Uniform3f(t),u_height_lift:new e.Uniform1f(t)}),fillExtrusionPattern:t=>({u_matrix:new e.UniformMatrix4f(t),u_lightpos:new e.Uniform3f(t),u_lightintensity:new e.Uniform1f(t),u_lightcolor:new e.Uniform3f(t),u_vertical_gradient:new e.Uniform1f(t),u_height_factor:new e.Uniform1f(t),u_edge_radius:new e.Uniform1f(t),u_ao:new e.Uniform2f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_up_dir:new e.Uniform3f(t),u_height_lift:new e.Uniform1f(t),u_image:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_pixel_coord_upper:new e.Uniform2f(t),u_pixel_coord_lower:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t),u_opacity:new e.Uniform1f(t)}),fill:t=>({u_matrix:new e.UniformMatrix4f(t)}),fillPattern:t=>({u_matrix:new e.UniformMatrix4f(t),u_image:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_pixel_coord_upper:new e.Uniform2f(t),u_pixel_coord_lower:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t)}),fillOutline:t=>({u_matrix:new e.UniformMatrix4f(t),u_world:new e.Uniform2f(t)}),fillOutlinePattern:t=>({u_matrix:new e.UniformMatrix4f(t),u_world:new e.Uniform2f(t),u_image:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_pixel_coord_upper:new e.Uniform2f(t),u_pixel_coord_lower:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t)}),circle:t=>({u_camera_to_center_distance:new e.Uniform1f(t),u_extrude_scale:new e.UniformMatrix2f(t),u_device_pixel_ratio:new e.Uniform1f(t),u_matrix:new e.UniformMatrix4f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_up_dir:new e.Uniform3f(t)}),collisionBox:t=>({u_matrix:new e.UniformMatrix4f(t),u_camera_to_center_distance:new e.Uniform1f(t),u_extrude_scale:new e.Uniform2f(t)}),collisionCircle:t=>({u_matrix:new e.UniformMatrix4f(t),u_inv_matrix:new e.UniformMatrix4f(t),u_camera_to_center_distance:new e.Uniform1f(t),u_viewport_size:new e.Uniform2f(t)}),debug:t=>({u_color:new e.UniformColor(t),u_matrix:new e.UniformMatrix4f(t),u_overlay:new e.Uniform1i(t),u_overlay_scale:new e.Uniform1f(t)}),clippingMask:t=>({u_matrix:new e.UniformMatrix4f(t)}),heatmap:t=>({u_extrude_scale:new e.Uniform1f(t),u_intensity:new e.Uniform1f(t),u_matrix:new e.UniformMatrix4f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_up_dir:new e.Uniform3f(t)}),heatmapTexture:t=>({u_image:new e.Uniform1i(t),u_color_ramp:new e.Uniform1i(t),u_opacity:new e.Uniform1f(t)}),hillshade:t=>({u_matrix:new e.UniformMatrix4f(t),u_image:new e.Uniform1i(t),u_latrange:new e.Uniform2f(t),u_light:new e.Uniform2f(t),u_shadow:new e.UniformColor(t),u_highlight:new e.UniformColor(t),u_accent:new e.UniformColor(t)}),hillshadePrepare:t=>({u_matrix:new e.UniformMatrix4f(t),u_image:new e.Uniform1i(t),u_dimension:new e.Uniform2f(t),u_zoom:new e.Uniform1f(t),u_unpack:new e.Uniform4f(t)}),line:t=>({u_matrix:new e.UniformMatrix4f(t),u_pixels_to_tile_units:new e.UniformMatrix2f(t),u_device_pixel_ratio:new e.Uniform1f(t),u_units_to_pixels:new e.Uniform2f(t),u_dash_image:new e.Uniform1i(t),u_gradient_image:new e.Uniform1i(t),u_image_height:new e.Uniform1f(t),u_texsize:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t),u_alpha_discard_threshold:new e.Uniform1f(t),u_trim_offset:new e.Uniform2f(t)}),linePattern:t=>({u_matrix:new e.UniformMatrix4f(t),u_texsize:new e.Uniform2f(t),u_pixels_to_tile_units:new e.UniformMatrix2f(t),u_device_pixel_ratio:new e.Uniform1f(t),u_image:new e.Uniform1i(t),u_units_to_pixels:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t),u_alpha_discard_threshold:new e.Uniform1f(t)}),raster:t=>({u_matrix:new e.UniformMatrix4f(t),u_tl_parent:new e.Uniform2f(t),u_scale_parent:new e.Uniform1f(t),u_fade_t:new e.Uniform1f(t),u_opacity:new e.Uniform1f(t),u_image0:new e.Uniform1i(t),u_image1:new e.Uniform1i(t),u_brightness_low:new e.Uniform1f(t),u_brightness_high:new e.Uniform1f(t),u_saturation_factor:new e.Uniform1f(t),u_contrast_factor:new e.Uniform1f(t),u_spin_weights:new e.Uniform3f(t),u_perspective_transform:new e.Uniform2f(t)}),symbolIcon:t=>({u_is_size_zoom_constant:new e.Uniform1i(t),u_is_size_feature_constant:new e.Uniform1i(t),u_size_t:new e.Uniform1f(t),u_size:new e.Uniform1f(t),u_camera_to_center_distance:new e.Uniform1f(t),u_rotate_symbol:new e.Uniform1i(t),u_aspect_ratio:new e.Uniform1f(t),u_fade_change:new e.Uniform1f(t),u_matrix:new e.UniformMatrix4f(t),u_label_plane_matrix:new e.UniformMatrix4f(t),u_coord_matrix:new e.UniformMatrix4f(t),u_is_text:new e.Uniform1i(t),u_pitch_with_map:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_camera_forward:new e.Uniform3f(t),u_tile_matrix:new e.UniformMatrix4f(t),u_up_vector:new e.Uniform3f(t),u_ecef_origin:new e.Uniform3f(t),u_texture:new e.Uniform1i(t)}),symbolSDF:t=>({u_is_size_zoom_constant:new e.Uniform1i(t),u_is_size_feature_constant:new e.Uniform1i(t),u_size_t:new e.Uniform1f(t),u_size:new e.Uniform1f(t),u_camera_to_center_distance:new e.Uniform1f(t),u_rotate_symbol:new e.Uniform1i(t),u_aspect_ratio:new e.Uniform1f(t),u_fade_change:new e.Uniform1f(t),u_matrix:new e.UniformMatrix4f(t),u_label_plane_matrix:new e.UniformMatrix4f(t),u_coord_matrix:new e.UniformMatrix4f(t),u_is_text:new e.Uniform1i(t),u_pitch_with_map:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_texture:new e.Uniform1i(t),u_gamma_scale:new e.Uniform1f(t),u_device_pixel_ratio:new e.Uniform1f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_camera_forward:new e.Uniform3f(t),u_tile_matrix:new e.UniformMatrix4f(t),u_up_vector:new e.Uniform3f(t),u_ecef_origin:new e.Uniform3f(t),u_is_halo:new e.Uniform1i(t)}),symbolTextAndIcon:t=>({u_is_size_zoom_constant:new e.Uniform1i(t),u_is_size_feature_constant:new e.Uniform1i(t),u_size_t:new e.Uniform1f(t),u_size:new e.Uniform1f(t),u_camera_to_center_distance:new e.Uniform1f(t),u_rotate_symbol:new e.Uniform1i(t),u_aspect_ratio:new e.Uniform1f(t),u_fade_change:new e.Uniform1f(t),u_matrix:new e.UniformMatrix4f(t),u_label_plane_matrix:new e.UniformMatrix4f(t),u_coord_matrix:new e.UniformMatrix4f(t),u_is_text:new e.Uniform1i(t),u_pitch_with_map:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_texsize_icon:new e.Uniform2f(t),u_texture:new e.Uniform1i(t),u_texture_icon:new e.Uniform1i(t),u_gamma_scale:new e.Uniform1f(t),u_device_pixel_ratio:new e.Uniform1f(t),u_is_halo:new e.Uniform1i(t)}),background:t=>({u_matrix:new e.UniformMatrix4f(t),u_opacity:new e.Uniform1f(t),u_color:new e.UniformColor(t)}),backgroundPattern:t=>({u_matrix:new e.UniformMatrix4f(t),u_opacity:new e.Uniform1f(t),u_image:new e.Uniform1i(t),u_pattern_tl:new e.Uniform2f(t),u_pattern_br:new e.Uniform2f(t),u_texsize:new e.Uniform2f(t),u_pattern_size:new e.Uniform2f(t),u_pixel_coord_upper:new e.Uniform2f(t),u_pixel_coord_lower:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t)}),terrainRaster:br,terrainDepth:br,skybox:t=>({u_matrix:new e.UniformMatrix4f(t),u_sun_direction:new e.Uniform3f(t),u_cubemap:new e.Uniform1i(t),u_opacity:new e.Uniform1f(t),u_temporal_offset:new e.Uniform1f(t)}),skyboxGradient:t=>({u_matrix:new e.UniformMatrix4f(t),u_color_ramp:new e.Uniform1i(t),u_center_direction:new e.Uniform3f(t),u_radius:new e.Uniform1f(t),u_opacity:new e.Uniform1f(t),u_temporal_offset:new e.Uniform1f(t)}),skyboxCapture:t=>({u_matrix_3f:new e.UniformMatrix3f(t),u_sun_direction:new e.Uniform3f(t),u_sun_intensity:new e.Uniform1f(t),u_color_tint_r:new e.Uniform4f(t),u_color_tint_m:new e.Uniform4f(t),u_luminance:new e.Uniform1f(t)}),globeRaster:t=>({u_proj_matrix:new e.UniformMatrix4f(t),u_globe_matrix:new e.UniformMatrix4f(t),u_normalize_matrix:new e.UniformMatrix4f(t),u_merc_matrix:new e.UniformMatrix4f(t),u_zoom_transition:new e.Uniform1f(t),u_merc_center:new e.Uniform2f(t),u_image0:new e.Uniform1i(t),u_grid_matrix:new e.UniformMatrix3f(t),u_skirt_height:new e.Uniform1f(t),u_frustum_tl:new e.Uniform3f(t),u_frustum_tr:new e.Uniform3f(t),u_frustum_br:new e.Uniform3f(t),u_frustum_bl:new e.Uniform3f(t),u_globe_pos:new e.Uniform3f(t),u_globe_radius:new e.Uniform1f(t),u_viewport:new e.Uniform2f(t)}),globeAtmosphere:t=>({u_frustum_tl:new e.Uniform3f(t),u_frustum_tr:new e.Uniform3f(t),u_frustum_br:new e.Uniform3f(t),u_frustum_bl:new e.Uniform3f(t),u_horizon:new e.Uniform1f(t),u_transition:new e.Uniform1f(t),u_fadeout_range:new e.Uniform1f(t),u_color:new e.Uniform4f(t),u_high_color:new e.Uniform4f(t),u_space_color:new e.Uniform4f(t),u_star_intensity:new e.Uniform1f(t),u_star_density:new e.Uniform1f(t),u_star_size:new e.Uniform1f(t),u_temporal_offset:new e.Uniform1f(t),u_horizon_angle:new e.Uniform1f(t),u_rotation_matrix:new e.UniformMatrix4f(t)})};let un;function dn(t,r,n,o,i,a,s){const l=t.context,c=l.gl,u=t.transform,d=t.useProgram("collisionBox"),f=[];let p=0,h=0;for(let m=0;m0){const t=e.create(),r=_;e.mul(t,v.placementInvProjMatrix,u.glCoordMatrix),e.mul(t,t,v.placementViewportMatrix),f.push({circleArray:w,circleOffset:h,transform:r,invTransform:t,projection:v.getProjection()}),p+=w.length/4,h=p}x&&(t.terrain&&t.terrain.setupElevationDraw(y,d),d.draw(l,c.LINES,e.DepthMode.disabled,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.disabled,Gr(_,u,y,v.getProjection()),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,u.zoom,null,[x.collisionVertexBuffer,x.collisionVertexBufferExt]))}if(!s||!f.length)return;const m=t.useProgram("collisionCircle"),g=new e.StructArrayLayout2f1f2i16;g.resize(4*p),g._trim();let y=0;for(const e of f)for(let t=0;t=0&&(m[_.associatedIconIndex]={x:C,y:E,z:T,angle:P})}else mt(A,p)}if(d){h.clear();const r=t.icon.placedSymbolArray;for(let t=0;te.sortKey-t.sortKey);for(const e of E){const r=e.state;if(t.terrain&&t.terrain.setupElevationDraw(r.tile,r.program,{useDepthForOcclusion:!C,labelPlaneMatrixInv:r.labelPlaneMatrixInv}),p.activeTexture.set(h.TEXTURE0),r.atlasTexture.bind(r.atlasInterpolation,h.CLAMP_TO_EDGE),r.atlasTextureIcon&&(p.activeTexture.set(h.TEXTURE1),r.atlasTextureIcon&&r.atlasTextureIcon.bind(r.atlasInterpolationIcon,h.CLAMP_TO_EDGE)),r.isSDF){const o=r.uniformValues;r.hasHalo&&(o.u_is_halo=1,yn(r.buffers,e.segments,n,t,r.program,w,d,f,o)),o.u_is_halo=0}yn(r.buffers,e.segments,n,t,r.program,w,d,f,r.uniformValues)}}function yn(t,r,n,o,i,a,s,l,c){const u=o.context,d=[t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer,t.globeExtVertexBuffer];i.draw(u,u.gl.TRIANGLES,a,s,l,e.CullFaceMode.disabled,c,n.id,t.layoutVertexBuffer,t.indexBuffer,r,n.paint,o.transform.zoom,t.programConfigurations.get(n.id),d)}function vn(t,r,n,o,i,a,s){const l=t.context.gl,c=n.paint.get("fill-pattern"),u=c&&c.constantOr(1);let d,f,p,h,m;s?(f=u&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",d=l.LINES):(f=u?"fillPattern":"fill",d=l.TRIANGLES);for(const g of o){const o=r.getTile(g);if(u&&!o.patternsLoaded())continue;const y=o.getBucket(n);if(!y)continue;t.prepareDrawTile();const v=y.programConfigurations.get(n.id),b=t.useProgram(f,v);u&&(t.context.activeTexture.set(l.TEXTURE0),o.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),v.updatePaintBuffers());const _=c.constantOr(null);if(_&&o.imageAtlas){const e=o.imageAtlas.patternPositions[_.toString()];e&&v.setConstantPatternPositions(e)}const x=t.translatePosMatrix(g.projMatrix,o,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(s){h=y.indexBuffer2,m=y.segments2;const e=t.terrain&&t.terrain.renderingToTexture?t.terrain.drapeBufferSize:[l.drawingBufferWidth,l.drawingBufferHeight];p="fillOutlinePattern"===f&&u?$r(x,t,o,e):jr(x,e)}else h=y.indexBuffer,m=y.segments,p=u?Br(x,t,o):zr(x);t.prepareDrawProgram(t.context,b,g.toUnwrapped()),b.draw(t.context,d,i,t.stencilModeForClipping(g),a,e.CullFaceMode.disabled,p,n.id,y.layoutVertexBuffer,h,m,n.paint,t.transform.zoom,v)}}function bn(t,r,n,o,i,a,s){const l=t.context,c=l.gl,u=t.transform,d=n.paint.get("fill-extrusion-pattern"),f=d.constantOr(1),p=n.paint.get("fill-extrusion-opacity"),h=[n.paint.get("fill-extrusion-ambient-occlusion-intensity"),n.paint.get("fill-extrusion-ambient-occlusion-radius")],m=n.layout.get("fill-extrusion-edge-radius"),g=m>0&&!n.paint.get("fill-extrusion-rounded-roof"),y=g?0:m,v="globe"===u.projection.name?e.fillExtrusionHeightLift():0,b="globe"===u.projection.name,_=b?e.globeToMercatorTransition(u.zoom):0,x=[e.mercatorXfromLng(u.center.lng),e.mercatorYfromLat(u.center.lat)],w=[];b&&w.push("PROJECTION_GLOBE_VIEW"),h[0]>0&&w.push("FAUX_AO"),g&&w.push("ZERO_ROOF_RADIUS");for(const m of o){const o=r.getTile(m),g=o.getBucket(n);if(!g||g.projection.name!==u.projection.name)continue;const A=g.programConfigurations.get(n.id),S=t.useProgram(f?"fillExtrusionPattern":"fillExtrusion",A,w);if(t.terrain){const e=t.terrain;if(t.style.terrainSetForDrapingOnly())e.setupElevationDraw(o,S,{useMeterToDem:!0});else{if(!g.enableTerrain)continue;if(e.setupElevationDraw(o,S,{useMeterToDem:!0}),_n(l,r,m,g,n,e),!g.centroidVertexBuffer){const e=S.attributes.a_centroid_pos;void 0!==e&&c.vertexAttrib2f(e,0,0)}}}f&&(t.context.activeTexture.set(c.TEXTURE0),o.imageAtlasTexture.bind(c.LINEAR,c.CLAMP_TO_EDGE),A.updatePaintBuffers());const C=d.constantOr(null);if(C&&o.imageAtlas){const e=o.imageAtlas.patternPositions[C.toString()];e&&A.setConstantPatternPositions(e)}const E=t.translatePosMatrix(m.projMatrix,o,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),T=u.projection.createInversionMatrix(u,m.canonical),I=n.paint.get("fill-extrusion-vertical-gradient"),k=f?Fr(E,t,I,p,h,y,m,o,v,_,x,T):Nr(E,t,I,p,h,y,m,v,_,x,T);t.prepareDrawProgram(l,S,m.toUnwrapped());const M=[];t.terrain&&M.push(g.centroidVertexBuffer),b&&M.push(g.layoutVertexExtBuffer),S.draw(l,l.gl.TRIANGLES,i,a,s,e.CullFaceMode.backCCW,k,n.id,g.layoutVertexBuffer,g.indexBuffer,g.segments,n.paint,t.transform.zoom,A,M)}}function _n(t,r,n,o,i,a){const s=[t=>{let r=t.canonical.x-1,n=t.wrap;return r<0&&(r=(1<{let r=t.canonical.x+1,n=t.wrap;return r===1<new e.OverscaledTileID(t.overscaledZ,t.wrap,t.canonical.z,t.canonical.x,(0===t.canonical.y?1<new e.OverscaledTileID(t.overscaledZ,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y===(1<{const t=r.getSource().minzoom,n=e=>{const t=r.getTileByID(e);if(t&&t.hasData())return t.getBucket(i)},o=[0,-1,1];for(const r of o){if(e.overscaledZ+r(c[0]=Math.min(t.min.y,r.min.y),c[1]=Math.max(t.max.y,r.max.y),c[2]=e.EXTENT-r.min.x>t.max.x?r.min.x-e.EXTENT:t.max.x,c),d=(t,r)=>(c[0]=Math.min(t.min.x,r.min.x),c[1]=Math.max(t.max.x,r.max.x),c[2]=e.EXTENT-r.min.y>t.max.y?r.min.y-e.EXTENT:t.max.y,c),f=[(e,t)=>u(e,t),(e,t)=>u(t,e),(e,t)=>d(e,t),(e,t)=>d(t,e)],p=new e.Point(0,0);let h,m,g;const y=(t,r,o,i,s)=>{const l=[[i?o:t,i?t:o,0],[i?o:r,i?r:o,0]],c=s<0?e.EXTENT+s:s,u=[i?c:(t+r)/2,i?(t+r)/2:c,0];return 0===o&&s<0||0!==o&&s>0?a.getForTilePoints(g,[u],!0,m):l.push(u),a.getForTilePoints(n,l,!0,h),Math.max(l[0][2],l[1][2],u[2])/a.exaggeration()};for(let t=0;t<4;t++){const r=(t<2?1:5)-t,i=o.borders[t];if(0===i.length)continue;const c=g=s[t](n),u=l(c);if(!(u&&u instanceof e.FillExtrusionBucket&&u.enableTerrain))continue;if(o.borderDoneWithNeighborZ[t]===u.canonical.z&&u.borderDoneWithNeighborZ[r]===o.canonical.z)continue;if(m=a.findDEMTileFor(c),!m||!m.dem)continue;if(!h){const e=a.findDEMTileFor(n);if(!e||!e.dem)return;h=e}const d=u.borders[r];let v=0;const b=u.borderDoneWithNeighborZ[r]!==o.canonical.z;if(o.canonical.z===u.canonical.z){for(let n=0;ns[0]+3));)b&&u.encodeCentroid(void 0,l,!1),v++;if(l&&vs[1]-3)&&(i++,++v!==d.length);)l=u.featuresOnBorder[d[v]];if(l=u.featuresOnBorder[d[n]],a.intersectsCount()>1||l.intersectsCount()>1||1!==i){1!==i&&(v=n),o.encodeCentroid(void 0,a,!1),b&&u.encodeCentroid(void 0,l,!1);continue}const c=f[t](a,l),h=t%2?e.EXTENT-1:0;p.x=y(c[0],Math.min(e.EXTENT-1,c[1]),h,t<2,c[2]),p.y=0,o.encodeCentroid(p,a,!1),b&&u.encodeCentroid(p,l,!1)}else o.encodeCentroid(void 0,a,!1)}o.borderDoneWithNeighborZ[t]=u.canonical.z,o.needsCentroidUpdate=!0,b&&(u.borderDoneWithNeighborZ[r]=o.canonical.z,u.needsCentroidUpdate=!0)}else{for(const e of i)o.encodeCentroid(void 0,o.featuresOnBorder[e],!1);if(b){for(const e of d)u.encodeCentroid(void 0,u.featuresOnBorder[e],!1);u.borderDoneWithNeighborZ[r]=o.canonical.z,u.needsCentroidUpdate=!0}o.borderDoneWithNeighborZ[t]=u.canonical.z,o.needsCentroidUpdate=!0}}(o.needsCentroidUpdate||!o.centroidVertexBuffer&&0!==o.centroidVertexArray.length)&&o.uploadCentroid(t)}const xn=new e.Color(1,0,0,1),wn=new e.Color(0,1,0,1),An=new e.Color(0,0,1,1),Sn=new e.Color(1,0,1,1),Cn=new e.Color(0,1,1,1);function En(t,r,n){const o=t.context,i=t.transform,a=o.gl,s="globe"===i.projection.name,l=s?["PROJECTION_GLOBE_VIEW"]:null;let c=n.projMatrix;if(s&&e.globeToMercatorTransition(i.zoom)>0){const t=e.transitionTileAABBinECEF(n.canonical,i),r=e.globeDenormalizeECEF(t);c=e.multiply(new Float32Array(16),i.globeMatrix,r),e.multiply(c,i.projMatrix,c)}const u=t.useProgram("debug",null,l),d=r.getTileByID(n.key);t.terrain&&t.terrain.setupElevationDraw(d,u);const f=e.DepthMode.disabled,p=e.StencilMode.disabled,h=t.colorModeForRenderPass(),m="$debug";o.activeTexture.set(a.TEXTURE0),t.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s?d._makeGlobeTileDebugBuffers(t.context,i):d._makeDebugTileBoundsBuffers(t.context,i.projection);const g=d._tileDebugBuffer||t.debugBuffer,y=d._tileDebugIndexBuffer||t.debugIndexBuffer,v=d._tileDebugSegments||t.debugSegments;u.draw(o,a.LINE_STRIP,f,p,h,e.CullFaceMode.disabled,Wr(c,e.Color.red),m,g,y,v,null,null,null,[d._globeTileDebugBorderBuffer]);const b=d.latestRawTileData,_=Math.floor((b&&b.byteLength||0)/1024),x=r.getTile(n).tileSize,w=512/Math.min(x,512)*(n.overscaledZ/i.zoom)*.5;let A=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(A+=` => ${n.overscaledZ}`),A+=` ${_}kb`,function(e,t){e.initDebugOverlayCanvas();const r=e.debugOverlayCanvas,n=e.context.gl,o=e.debugOverlayCanvas.getContext("2d");o.clearRect(0,0,r.width,r.height),o.shadowColor="white",o.shadowBlur=2,o.lineWidth=1.5,o.strokeStyle="white",o.textBaseline="top",o.font="bold 36px Open Sans, sans-serif",o.fillText(t,5,5),o.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(t,A);const S=d._tileDebugTextBuffer||t.debugBuffer,C=d._tileDebugTextIndexBuffer||t.quadTriangleIndexBuffer,E=d._tileDebugTextSegments||t.debugSegments;u.draw(o,a.TRIANGLES,f,p,e.ColorMode.alphaBlended,e.CullFaceMode.disabled,Wr(c,e.Color.transparent,w),m,S,C,E,null,null,null,[d._globeTileDebugTextBuffer])}function Tn(e,t,r,n){kn(e,0,t+r/2,e.transform.width,r,n)}function In(e,t,r,n){kn(e,t-r/2,0,r,e.transform.height,n)}function kn(t,r,n,o,i,a){const s=t.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*e.exported.devicePixelRatio,n*e.exported.devicePixelRatio,o*e.exported.devicePixelRatio,i*e.exported.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}const Mn=e.createLayout([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:Rn}=Mn;function Pn(e,t,r,n){e.emplaceBack(t,r,n)}class On{constructor(t){this.vertexArray=new e.StructArrayLayout3f12,this.indices=new e.StructArrayLayout3ui6,Pn(this.vertexArray,-1,-1,1),Pn(this.vertexArray,1,-1,1),Pn(this.vertexArray,-1,1,1),Pn(this.vertexArray,1,1,1),Pn(this.vertexArray,-1,-1,-1),Pn(this.vertexArray,1,-1,-1),Pn(this.vertexArray,-1,1,-1),Pn(this.vertexArray,1,1,-1),this.indices.emplaceBack(5,1,3),this.indices.emplaceBack(3,7,5),this.indices.emplaceBack(6,2,0),this.indices.emplaceBack(0,4,6),this.indices.emplaceBack(2,6,7),this.indices.emplaceBack(7,3,2),this.indices.emplaceBack(5,4,0),this.indices.emplaceBack(0,1,5),this.indices.emplaceBack(0,2,3),this.indices.emplaceBack(3,1,0),this.indices.emplaceBack(7,6,4),this.indices.emplaceBack(4,5,7),this.vertexBuffer=t.createVertexBuffer(this.vertexArray,Rn),this.indexBuffer=t.createIndexBuffer(this.indices),this.segment=e.SegmentVector.simpleSegment(0,0,36,12)}}function Dn(t,r,n,o,i,a){const s=t.gl,l=r.paint.get("sky-atmosphere-color"),c=r.paint.get("sky-atmosphere-halo-color"),u=r.paint.get("sky-atmosphere-sun-intensity"),d=((e,t,r,n,o)=>({u_matrix_3f:e,u_sun_direction:t,u_sun_intensity:r,u_color_tint_r:[n.r,n.g,n.b,n.a],u_color_tint_m:[o.r,o.g,o.b,o.a],u_luminance:5e-5}))(e.fromMat4(e.create$1(),o),i,u,l,c);s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+a,r.skyboxTexture,0),n.draw(t,s.TRIANGLES,e.DepthMode.disabled,e.StencilMode.disabled,e.ColorMode.unblended,e.CullFaceMode.frontCW,d,"skyboxCapture",r.skyboxGeometry.vertexBuffer,r.skyboxGeometry.indexBuffer,r.skyboxGeometry.segment)}const Ln=e.createLayout([{type:"Float32",name:"a_pos",components:3},{type:"Float32",name:"a_uv",components:2}]);class Nn{constructor(t){const r=new e.StructArrayLayout5f20;r.emplaceBack(-1,1,1,0,0),r.emplaceBack(1,1,1,1,0),r.emplaceBack(1,-1,1,1,1),r.emplaceBack(-1,-1,1,0,1);const n=new e.StructArrayLayout3ui6;n.emplaceBack(0,1,2),n.emplaceBack(2,3,0),this.vertexBuffer=t.createVertexBuffer(r,Ln.members),this.indexBuffer=t.createIndexBuffer(n),this.segments=e.SegmentVector.simpleSegment(0,0,4,2)}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy()}}const Fn={symbol:function(t,r,n,o,i){if("translucent"!==t.renderPass)return;const a=e.StencilMode.disabled,s=t.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(t,r,n,o,i,a,s){const l=r.transform,c="map"===i,u="map"===a;for(const r of t){const t=o.getTile(r),i=t.getBucket(n);if(!i||!i.text||!i.text.segments.get().length)continue;const a=e.evaluateSizeForZoom(i.textSizeData,l.zoom),d=xt(r,i.getProjection(),l),f=l.calculatePixelsToTileUnitsMatrix(t),p=rt(d,t.tileID.canonical,u,c,l,i.getProjection(),f),h="none"!==n.layout.get("icon-text-fit")&&i.hasIconData();if(a){const n=Math.pow(2,l.zoom-t.tileID.overscaledZ);hn(i,c,u,s,e.symbolSize,l,p,r,n,a,h)}}}(o,t,n,r,n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),i),0!==n.paint.get("icon-opacity").constantOr(1)&&gn(t,r,n,o,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"),a,s),0!==n.paint.get("text-opacity").constantOr(1)&&gn(t,r,n,o,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"),a,s),r.map.showCollisionBoxes&&(dn(t,r,n,o,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),!0),dn(t,r,n,o,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),!1))},circle:function(t,r,n,o){if("translucent"!==t.renderPass)return;const i=n.paint.get("circle-opacity"),a=n.paint.get("circle-stroke-width"),s=n.paint.get("circle-stroke-opacity"),l=void 0!==n.layout.get("circle-sort-key").constantOr(1);if(0===i.constantOr(1)&&(0===a.constantOr(1)||0===s.constantOr(1)))return;const c=t.context,u=c.gl,d=t.transform,f=t.depthModeForSublayer(0,e.DepthMode.ReadOnly),p=e.StencilMode.disabled,h=t.colorModeForRenderPass(),m="globe"===d.projection.name,g=[e.mercatorXfromLng(d.center.lng),e.mercatorYfromLat(d.center.lat)],y=[];for(let i=0;ie.sortKey-t.sortKey);const v={useDepthForOcclusion:!m};for(const r of y){const{programConfiguration:o,program:i,layoutVertexBuffer:a,globeExtVertexBuffer:s,indexBuffer:l,uniformValues:m,tile:g}=r.state,y=r.segments;t.terrain&&t.terrain.setupElevationDraw(g,i,v),t.prepareDrawProgram(c,i,g.tileID.toUnwrapped()),i.draw(c,u.TRIANGLES,f,p,h,e.CullFaceMode.disabled,m,n.id,a,l,y,n.paint,d.zoom,o,[s])}},heatmap:function(t,r,n,o){if(0!==n.paint.get("heatmap-opacity"))if("offscreen"===t.renderPass){const i=t.context,a=i.gl,s=e.StencilMode.disabled,l=new e.ColorMode([a.ONE,a.ONE],e.Color.transparent,[!0,!0,!0,!0]);!function(e,t,r,n){const o=e.gl,i=t.width*n,a=t.height*n;e.activeTexture.set(o.TEXTURE1),e.viewport.set([0,0,i,a]);let s=r.heatmapFbo;if(!s||s&&(s.width!==i||s.height!==a)){s&&s.destroy();const t=o.createTexture();o.bindTexture(o.TEXTURE_2D,t),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),s=r.heatmapFbo=e.createFramebuffer(i,a,!1),function(e,t,r,n,o,i){const a=e.gl;a.texImage2D(a.TEXTURE_2D,0,e.isWebGL2&&e.extRenderToTextureHalfFloat?a.RGBA16F:a.RGBA,o,i,0,a.RGBA,e.extRenderToTextureHalfFloat?e.isWebGL2?a.HALF_FLOAT:e.extTextureHalfFloat.HALF_FLOAT_OES:a.UNSIGNED_BYTE,null),n.colorAttachment.set(r)}(e,0,t,s,i,a)}else o.bindTexture(o.TEXTURE_2D,s.colorAttachment.get()),e.bindFramebuffer.set(s.framebuffer)}(i,t,n,"globe"===t.transform.projection.name?.5:.25),i.clear({color:e.Color.transparent});const c=t.transform,u="globe"===c.projection.name,d=u?["PROJECTION_GLOBE_VIEW"]:null,f=u?e.CullFaceMode.frontCCW:e.CullFaceMode.disabled,p=[e.mercatorXfromLng(c.center.lng),e.mercatorYfromLat(c.center.lat)];for(let h=0;h({u_image:0,u_color_ramp:1,u_opacity:t.paint.get("heatmap-opacity")}))(0,r),r.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,r.paint,t.transform.zoom)}(t,n))},line:function(t,r,n,o){if("translucent"!==t.renderPass)return;const i=n.paint.get("line-opacity"),a=n.paint.get("line-width");if(0===i.constantOr(1)||0===a.constantOr(1))return;const s=t.depthModeForSublayer(0,e.DepthMode.ReadOnly),l=t.colorModeForRenderPass(),c=t.terrain&&t.terrain.renderingToTexture?1:e.exported.devicePixelRatio,u=n.paint.get("line-dasharray"),d=u.constantOr(1),f=n.layout.get("line-cap"),p=n.paint.get("line-pattern"),h=p.constantOr(1),m=n.paint.get("line-gradient"),g=h?"linePattern":"line",y=t.context,v=y.gl,b=(e=>{const t=[];Qr(e)&&t.push("RENDER_LINE_DASH"),e.paint.get("line-gradient")&&t.push("RENDER_LINE_GRADIENT");const r=e.paint.get("line-trim-offset");0===r[0]&&0===r[1]||t.push("RENDER_LINE_TRIM_OFFSET");const n=e.paint.get("line-pattern").constantOr(1),o=1!==e.paint.get("line-opacity").constantOr(1);return!n&&o&&t.push("RENDER_LINE_ALPHA_DISCARD"),t})(n);let _=b.includes("RENDER_LINE_ALPHA_DISCARD");t.terrain&&t.terrain.clipOrMaskOverlapStencilType()&&(_=!1);for(const i of o){const o=r.getTile(i);if(h&&!o.patternsLoaded())continue;const a=o.getBucket(n);if(!a)continue;t.prepareDrawTile();const x=a.programConfigurations.get(n.id),w=t.useProgram(g,x,b),A=p.constantOr(null);if(A&&o.imageAtlas){const e=o.imageAtlas.patternPositions[A.toString()];e&&x.setConstantPatternPositions(e)}const S=u.constantOr(null),C=f.constantOr(null);if(!h&&S&&C&&o.lineAtlas){const e=o.lineAtlas.getDash(S,C);e&&x.setConstantPatternPositions(e)}let[E,T]=n.paint.get("line-trim-offset");if("round"===C||"square"===C){const e=1;E!==T&&(0===E&&(E-=e),1===T&&(T+=e))}const I=t.terrain?i.projMatrix:null,k=h?Xr(t,o,n,I,c):Yr(t,o,n,I,a.lineClipsArray.length,c,[E,T]);if(m){const o=a.gradients[n.id];let s=o.texture;if(n.gradientVersion!==o.version){let l=256;if(n.stepInterpolant){const n=r.getSource().maxzoom,o=i.canonical.z===n?Math.ceil(1<{w.draw(y,v.TRIANGLES,s,r,l,e.CullFaceMode.disabled,k,n.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,n.paint,t.transform.zoom,x,[a.layoutVertexBuffer2])};if(_){const r=t.stencilModeForClipping(i).ref;0===r&&t.terrain&&y.clear({stencil:0});const n={func:v.EQUAL,mask:255};k.u_alpha_discard_threshold=.8,M(new e.StencilMode(n,r,255,v.KEEP,v.KEEP,v.INVERT)),k.u_alpha_discard_threshold=0,M(new e.StencilMode(n,r,255,v.KEEP,v.KEEP,v.KEEP))}else M(t.stencilModeForClipping(i))}_&&(t.resetStencilClippingMasks(),t.terrain&&y.clear({stencil:0}))},fill:function(t,r,n,o){const i=n.paint.get("fill-color"),a=n.paint.get("fill-opacity");if(0===a.constantOr(1))return;const s=t.colorModeForRenderPass(),l=n.paint.get("fill-pattern"),c=t.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===i.constantOr(e.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(t.renderPass===c){const i=t.depthModeForSublayer(1,"opaque"===t.renderPass?e.DepthMode.ReadWrite:e.DepthMode.ReadOnly);vn(t,r,n,o,i,s,!1)}if("translucent"===t.renderPass&&n.paint.get("fill-antialias")){const i=t.depthModeForSublayer(n.getPaintProperty("fill-outline-color")?2:0,e.DepthMode.ReadOnly);vn(t,r,n,o,i,s,!0)}},"fill-extrusion":function(t,r,n,o){const i=n.paint.get("fill-extrusion-opacity");if(0!==i&&"translucent"===t.renderPass){const a=new e.DepthMode(t.context.gl.LEQUAL,e.DepthMode.ReadWrite,t.depthRangeFor3D);if(1!==i||n.paint.get("fill-extrusion-pattern").constantOr(1))bn(t,r,n,o,a,e.StencilMode.disabled,e.ColorMode.disabled),bn(t,r,n,o,a,t.stencilModeFor3D(),t.colorModeForRenderPass()),t.resetStencilClippingMasks();else{const i=t.colorModeForRenderPass();bn(t,r,n,o,a,e.StencilMode.disabled,i)}}},hillshade:function(t,r,n,o){if("offscreen"!==t.renderPass&&"translucent"!==t.renderPass)return;const i=t.context,a=t.depthModeForSublayer(0,e.DepthMode.ReadOnly),s=t.colorModeForRenderPass(),l=t.terrain&&t.terrain.renderingToTexture,[c,u]="translucent"!==t.renderPass||l?[{},o]:t.stencilConfigForOverlap(o);for(const o of u){const i=r.getTile(o);if(i.needsHillshadePrepare&&"offscreen"===t.renderPass)vr(t,i,n,a,e.StencilMode.disabled,s);else if("translucent"===t.renderPass){const e=l&&t.terrain?t.terrain.stencilModeForRTTOverlap(o):c[o.overscaledZ];gr(t,o,i,n,a,e,s)}}i.viewport.set([0,0,t.width,t.height]),t.resetStencilClippingMasks()},raster:function(t,r,n,o,i,a){if("translucent"!==t.renderPass)return;if(0===n.paint.get("raster-opacity"))return;if(!o.length)return;const s=t.context,l=s.gl,c=r.getSource(),u=t.useProgram("raster"),d=t.colorModeForRenderPass(),f=t.terrain&&t.terrain.renderingToTexture,[p,h]=c instanceof Ie||f?[{},o]:t.stencilConfigForOverlap(o),m=h[h.length-1].overscaledZ,g=!t.options.moving;for(const o of h){const i=f?e.DepthMode.disabled:t.depthModeForSublayer(o.overscaledZ-m,1===n.paint.get("raster-opacity")?e.DepthMode.ReadWrite:e.DepthMode.ReadOnly,l.LESS),h=o.toUnwrapped(),y=r.getTile(o);if(f&&(!y||!y.hasData()))continue;const v=f?o.projMatrix:t.transform.calculateProjMatrix(h,g),b=t.terrain&&f?t.terrain.stencilModeForRTTOverlap(o):p[o.overscaledZ],_=a?0:n.paint.get("raster-fade-duration");y.registerFadeDuration(_);const x=r.findLoadedParent(o,0),w=Ir(y,x,r,t.transform,_);let A,S;t.terrain&&t.terrain.prepareDrawTile();const C="nearest"===n.paint.get("raster-resampling")?l.NEAREST:l.LINEAR;s.activeTexture.set(l.TEXTURE0),y.texture.bind(C,l.CLAMP_TO_EDGE),s.activeTexture.set(l.TEXTURE1),x?(x.texture.bind(C,l.CLAMP_TO_EDGE),A=Math.pow(2,x.tileID.overscaledZ-y.tileID.overscaledZ),S=[y.tileID.canonical.x*A%1,y.tileID.canonical.y*A%1]):y.texture.bind(C,l.CLAMP_TO_EDGE),y.texture.useMipmap&&s.extTextureFilterAnisotropic&&t.transform.pitch>20&&l.texParameterf(l.TEXTURE_2D,s.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,s.extTextureFilterAnisotropicMax);const E=en(v,S||[0,0],A||1,w,n,c instanceof Ie?c.perspectiveTransform:[0,0]);if(t.prepareDrawProgram(s,u,h),c instanceof Ie)c.boundsBuffer&&c.boundsSegments&&u.draw(s,l.TRIANGLES,i,e.StencilMode.disabled,d,e.CullFaceMode.disabled,E,n.id,c.boundsBuffer,t.quadTriangleIndexBuffer,c.boundsSegments);else{const{tileBoundsBuffer:r,tileBoundsIndexBuffer:o,tileBoundsSegments:a}=t.getTileBoundsBuffers(y);u.draw(s,l.TRIANGLES,i,b,d,e.CullFaceMode.disabled,E,n.id,r,o,a)}}t.resetStencilClippingMasks()},background:function(t,r,n,o){const i=n.paint.get("background-color"),a=n.paint.get("background-opacity");if(0===a)return;const s=t.context,l=s.gl,c=t.transform,u=c.tileSize,d=n.paint.get("background-pattern");if(t.isPatternMissing(d))return;const f=!d&&1===i.a&&1===a&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass!==f)return;const p=e.StencilMode.disabled,h=t.depthModeForSublayer(0,"opaque"===f?e.DepthMode.ReadWrite:e.DepthMode.ReadOnly),m=t.colorModeForRenderPass(),g=t.useProgram(d?"backgroundPattern":"background");let y,v=o;v||(y=t.getBackgroundTiles(),v=Object.values(y).map(e=>e.tileID)),d&&(s.activeTexture.set(l.TEXTURE0),t.imageManager.bind(t.context));for(const f of v){const v=f.toUnwrapped(),b=o?f.projMatrix:t.transform.calculateProjMatrix(v);t.prepareDrawTile();const _=r?r.getTile(f):y?y[f.key]:new e.Tile(f,u,c.zoom,t),x=d?ln(b,a,t,d,{tileID:f,tileSize:u}):sn(b,a,i);t.prepareDrawProgram(s,g,v);const{tileBoundsBuffer:w,tileBoundsIndexBuffer:A,tileBoundsSegments:S}=t.getTileBoundsBuffers(_);g.draw(s,l.TRIANGLES,h,p,m,e.CullFaceMode.disabled,x,n.id,w,A,S)}},sky:function(t,r,n){const o=t.transform,i="mercator"===o.projection.name||"globe"===o.projection.name?1:e.smoothstep(7,8,o.zoom),a=n.paint.get("sky-opacity")*i;if(0===a)return;const s=t.context,l=n.paint.get("sky-type"),c=new e.DepthMode(s.gl.LEQUAL,e.DepthMode.ReadOnly,[0,1]),u=t.frameCounter/1e3%1;"atmosphere"===l?"offscreen"===t.renderPass?n.needsSkyboxCapture(t)&&(function(t,r){const n=t.context,o=n.gl;let i=r.skyboxFbo;if(!i){i=r.skyboxFbo=n.createFramebuffer(32,32,!1),r.skyboxGeometry=new On(n),r.skyboxTexture=n.gl.createTexture(),o.bindTexture(o.TEXTURE_CUBE_MAP,r.skyboxTexture),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MAG_FILTER,o.LINEAR);for(let e=0;e<6;++e)o.texImage2D(o.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,o.RGBA,32,32,0,o.RGBA,o.UNSIGNED_BYTE,null)}n.bindFramebuffer.set(i.framebuffer),n.viewport.set([0,0,32,32]);const a=r.getCenter(t,!0),s=t.useProgram("skyboxCapture"),l=new Float64Array(16);e.identity(l),e.rotateY(l,l,.5*-Math.PI),Dn(n,r,s,l,a,0),e.identity(l),e.rotateY(l,l,.5*Math.PI),Dn(n,r,s,l,a,1),e.identity(l),e.rotateX(l,l,.5*-Math.PI),Dn(n,r,s,l,a,2),e.identity(l),e.rotateX(l,l,.5*Math.PI),Dn(n,r,s,l,a,3),e.identity(l),Dn(n,r,s,l,a,4),e.identity(l),e.rotateY(l,l,Math.PI),Dn(n,r,s,l,a,5),n.viewport.set([0,0,t.width,t.height])}(t,n),n.markSkyboxValid(t)):"sky"===t.renderPass&&function(t,r,n,o,i){const a=t.context,s=a.gl,l=t.transform,c=t.useProgram("skybox");a.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_CUBE_MAP,r.skyboxTexture);const u=((e,t,r,n,o)=>({u_matrix:e,u_sun_direction:t,u_cubemap:0,u_opacity:n,u_temporal_offset:o}))(l.skyboxMatrix,r.getCenter(t,!1),0,o,i);t.prepareDrawProgram(a,c),c.draw(a,s.TRIANGLES,n,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.backCW,u,"skybox",r.skyboxGeometry.vertexBuffer,r.skyboxGeometry.indexBuffer,r.skyboxGeometry.segment)}(t,n,c,a,u):"gradient"===l&&"sky"===t.renderPass&&function(t,r,n,o,i){const a=t.context,s=a.gl,l=t.transform,c=t.useProgram("skyboxGradient");r.skyboxGeometry||(r.skyboxGeometry=new On(a)),a.activeTexture.set(s.TEXTURE0);let u=r.colorRampTexture;u||(u=r.colorRampTexture=new e.Texture(a,r.colorRamp,s.RGBA)),u.bind(s.LINEAR,s.CLAMP_TO_EDGE);const d=((t,r,n,o,i)=>({u_matrix:t,u_color_ramp:0,u_center_direction:r,u_radius:e.degToRad(n),u_opacity:o,u_temporal_offset:i}))(l.skyboxMatrix,r.getCenter(t,!1),r.paint.get("sky-gradient-radius"),o,i);t.prepareDrawProgram(a,c),c.draw(a,s.TRIANGLES,n,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.backCW,d,"skyboxGradient",r.skyboxGeometry.vertexBuffer,r.skyboxGeometry.indexBuffer,r.skyboxGeometry.segment)}(t,n,c,a,u)},debug:function(e,t,r){for(let n=0;nn)return void(this.transform.fogCullDistSq=null);const o=r+.78*(n-r);this.transform.fogCullDistSq=o*o}get terrain(){return this.transform._terrainEnabled()&&this._terrain&&this._terrain.enabled?this._terrain:null}resize(t,r){if(this.width=t*e.exported.devicePixelRatio,this.height=r*e.exported.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const e of this.style.order)this.style._layers[e].resize()}setup(){const t=this.context,r=new e.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(e.EXTENT,0),r.emplaceBack(0,e.EXTENT),r.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=t.createVertexBuffer(r,e.posAttributes.members),this.tileExtentSegments=e.SegmentVector.simpleSegment(0,0,4,2);const n=new e.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(e.EXTENT,0),n.emplaceBack(0,e.EXTENT),n.emplaceBack(e.EXTENT,e.EXTENT),this.debugBuffer=t.createVertexBuffer(n,e.posAttributes.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);const o=new e.StructArrayLayout2i4;o.emplaceBack(-1,-1),o.emplaceBack(1,-1),o.emplaceBack(-1,1),o.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(o,e.posAttributes.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);const i=new e.StructArrayLayout4i8;i.emplaceBack(0,0,0,0),i.emplaceBack(e.EXTENT,0,e.EXTENT,0),i.emplaceBack(0,e.EXTENT,0,e.EXTENT),i.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.mercatorBoundsBuffer=t.createVertexBuffer(i,e.boundsAttributes.members),this.mercatorBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);const a=new e.StructArrayLayout3ui6;a.emplaceBack(0,1,2),a.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(a);const s=new e.StructArrayLayout1ui2;for(const e of[0,1,3,2,0])s.emplaceBack(e);this.debugIndexBuffer=t.createIndexBuffer(s),this.emptyTexture=new e.Texture(t,new e.RGBAImage({width:1,height:1},Uint8Array.of(0,0,0,0)),t.gl.RGBA),this.identityMat=e.create();const l=this.context.gl;this.stencilClearMode=new e.StencilMode({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO),this.loadTimeStamps.push(e.window.performance.now()),this.atmosphereBuffer=new Nn(this.context)}getMercatorTileBoundsBuffers(){return{tileBoundsBuffer:this.mercatorBoundsBuffer,tileBoundsIndexBuffer:this.quadTriangleIndexBuffer,tileBoundsSegments:this.mercatorBoundsSegments}}getTileBoundsBuffers(e){return e._makeTileBoundsBuffers(this.context,this.transform.projection),e._tileBoundsBuffer?{tileBoundsBuffer:e._tileBoundsBuffer,tileBoundsIndexBuffer:e._tileBoundsIndexBuffer,tileBoundsSegments:e._tileBoundsSegments}:this.getMercatorTileBoundsBuffers()}clearStencil(){const t=this.context,r=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0,this._tileClippingMaskIDs={},this.useProgram("clippingMask").draw(t,r.TRIANGLES,e.DepthMode.disabled,this.stencilClearMode,e.ColorMode.disabled,e.CullFaceMode.disabled,Tr(this.identityMat),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}resetStencilClippingMasks(){this.terrain||(this.currentStencilSource=void 0,this._tileClippingMaskIDs={})}_renderTileClippingMasks(t,r,n){if(!r||this.currentStencilSource===r.id||!t.isTileClipped()||!n||0===n.length)return;if(this._tileClippingMaskIDs&&!this.terrain){let e=!1;for(const t of n)if(void 0===this._tileClippingMaskIDs[t.key]){e=!0;break}if(!e)return}this.currentStencilSource=r.id;const o=this.context,i=o.gl;this.nextStencilID+n.length>256&&this.clearStencil(),o.setColorMode(e.ColorMode.disabled),o.setDepthMode(e.DepthMode.disabled);const a=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const t of n){const n=r.getTile(t),s=this._tileClippingMaskIDs[t.key]=this.nextStencilID++,{tileBoundsBuffer:l,tileBoundsIndexBuffer:c,tileBoundsSegments:u}=this.getTileBoundsBuffers(n);a.draw(o,i.TRIANGLES,e.DepthMode.disabled,new e.StencilMode({func:i.ALWAYS,mask:0},s,255,i.KEEP,i.KEEP,i.REPLACE),e.ColorMode.disabled,e.CullFaceMode.disabled,Tr(t.projMatrix),"$clipping",l,c,u)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,r=this.context.gl;return new e.StencilMode({func:r.NOTEQUAL,mask:255},t,255,r.KEEP,r.KEEP,r.REPLACE)}stencilModeForClipping(t){if(this.terrain)return this.terrain.stencilModeForRTTOverlap(t);const r=this.context.gl;return new e.StencilMode({func:r.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,r.KEEP,r.KEEP,r.REPLACE)}stencilConfigForOverlap(t){const r=this.context.gl,n=t.sort((e,t)=>t.overscaledZ-e.overscaledZ),o=n[n.length-1].overscaledZ,i=n[0].overscaledZ-o+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();const t={};for(let n=0;n=0;this.currentLayer--){const e=this.style._layers[n[this.currentLayer]],r=t._getLayerSourceCache(e);if(e.isSky())continue;const o=r?a[r.id]:void 0;this._renderTileClippingMasks(e,r,o),this.renderLayer(this,r,e,o)}if(this.style.fog&&this.transform.projection.supportsFog&&function(t,r){const n=t.context,o=n.gl,i=t.transform,a=new e.DepthMode(o.LEQUAL,e.DepthMode.ReadOnly,[0,1]),s=t.useProgram("globeAtmosphere",null,"globe"===i.projection.name?["PROJECTION_GLOBE_VIEW","FOG"]:["FOG"]),l=e.globeToMercatorTransition(i.zoom),c=r.properties.get("color").toArray01(),u=r.properties.get("high-color").toArray01(),d=r.properties.get("space-color").toArray01PremultipliedAlpha(),f=e.identity$1([]);e.rotateY$1(f,f,-e.degToRad(i._center.lng)),e.rotateX$1(f,f,e.degToRad(i._center.lat)),e.rotateZ$1(f,f,i.angle),e.rotateX$1(f,f,-i._pitch);const p=e.fromQuat(new Float32Array(16),f),h=e.mapValue(r.properties.get("star-intensity"),0,1,0,.25),m=5e-4,g=e.mapValue(r.properties.get("horizon-blend"),0,1,m,.25),y=e.globeUseCustomAntiAliasing(t,n,i)&&g===m?i.worldSize/(2*Math.PI*1.025)-1:i.globeRadius,v=t.frameCounter/1e3%1,b=e.length(i.globeCenterInViewSpace),_=Math.sqrt(Math.pow(b,2)-Math.pow(y,2)),x=Math.acos(_/b),w=((t,r,n,o,i,a,s,l,c,u,d,f,p,h)=>({u_frustum_tl:t,u_frustum_tr:r,u_frustum_br:n,u_frustum_bl:o,u_horizon:i,u_transition:a,u_fadeout_range:s,u_color:l,u_high_color:c,u_space_color:u,u_star_intensity:d,u_star_size:5*e.exported.devicePixelRatio,u_star_density:0,u_temporal_offset:f,u_horizon_angle:p,u_rotation_matrix:h}))(i.frustumCorners.TL,i.frustumCorners.TR,i.frustumCorners.BR,i.frustumCorners.BL,i.frustumCorners.horizon,l,g,c,u,d,h,v,x,p);t.prepareDrawProgram(n,s);const A=t.atmosphereBuffer;A&&s.draw(n,o.TRIANGLES,a,e.StencilMode.disabled,e.ColorMode.alphaBlended,e.CullFaceMode.backCW,w,"skybox",A.vertexBuffer,A.indexBuffer,A.segments)}(this,this.style.fog),this.renderPass="sky",(e.globeToMercatorTransition(this.transform.zoom)>0||"globe"!==this.transform.projection.name)&&this.transform.isHorizonVisible())for(this.currentLayer=0;this.currentLayer{const n=t._getLayerSourceCache(e);n&&!e.isHidden(this.transform.zoom)&&(!r||r.getSource().maxzoom0?t.pop():null}isPatternMissing(e){return null===e||void 0!==e&&!this.imageManager.getPattern(e.toString())}terrainRenderModeElevated(){return this.style&&!!this.style.getTerrain()&&!!this.terrain&&!this.terrain.renderingToTexture}currentGlobalDefines(){const e=this.terrain&&this.terrain.renderingToTexture,t=this.terrain&&0===this.terrain.exaggeration(),r=this.style&&this.style.fog,n=[];return this.terrainRenderModeElevated()&&n.push("TERRAIN"),"globe"===this.transform.projection.name&&n.push("GLOBE"),t&&n.push("ZERO_EXAGGERATION"),r&&!e&&0!==r.getOpacity(this.transform.pitch)&&n.push("FOG"),e&&n.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&n.push("OVERDRAW_INSPECTOR"),n}useProgram(e,t,r){this.cache=this.cache||{};const n=r||[],o=this.currentGlobalDefines().concat(n),i=Or.cacheKey(dr[e],e,o,t);return this.cache[i]||(this.cache[i]=new Or(this.context,e,dr[e],t,cn[e],o)),this.cache[i]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.frontFace.setDefault(),this.context.cullFaceSide.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this._terrain&&this._terrain.destroy(),this.globeSharedBuffers&&this.globeSharedBuffers.destroy(),this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.atmosphereBuffer&&this.atmosphereBuffer.destroy()}prepareDrawTile(){this.terrain&&this.terrain.prepareDrawTile()}prepareDrawProgram(t,r,n){if(this.terrain&&this.terrain.renderingToTexture)return;const o=this.style.fog;if(o){const i=o.getOpacity(this.transform.pitch),a=((t,r,n,o,i,a,s,l,c,u,d)=>{const f=t.transform,p=r.properties.get("color").toArray01();p[3]=o;const h=t.frameCounter/1e3%1;return{u_fog_matrix:n?f.calculateFogTileMatrix(n):t.identityMat,u_fog_range:r.getFovAdjustedRange(f._fov),u_fog_color:p,u_fog_horizon_blend:r.properties.get("horizon-blend"),u_fog_temporal_offset:h,u_frustum_tl:i,u_frustum_tr:a,u_frustum_br:s,u_frustum_bl:l,u_globe_pos:c,u_globe_radius:u,u_viewport:d,u_globe_transition:e.globeToMercatorTransition(f.zoom),u_is_globe:+("globe"===f.projection.name)}})(this,o,n,i,this.transform.frustumCorners.TL,this.transform.frustumCorners.TR,this.transform.frustumCorners.BR,this.transform.frustumCorners.BL,this.transform.globeCenterInViewSpace,this.transform.globeRadius,[this.transform.width*e.exported.devicePixelRatio,this.transform.height*e.exported.devicePixelRatio]);r.setFogUniformValues(t,a)}}setTileLoadedFlag(e){this.tileLoaded=e}saveCanvasCopy(){const e=this.canvasCopy();e&&(this.frameCopies.push(e),this.tileLoaded=!1)}canvasCopy(){const e=this.context.gl,t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.copyTexImage2D(e.TEXTURE_2D,0,e.RGBA,0,0,e.drawingBufferWidth,e.drawingBufferHeight,0),t}getCanvasCopiesAndTimestamps(){return{canvasCopies:this.frameCopies,timeStamps:this.loadTimeStamps}}averageElevationNeedsEasing(){if(!this.transform._elevation)return!1;const e=this.style&&this.style.fog;return!!e&&0!==e.getOpacity(this.transform.pitch)}getBackgroundTiles(){const t=this._backgroundTiles,r=this._backgroundTiles={},n=this.transform.coveringTiles({tileSize:512});for(const o of n)r[o.key]=t[o.key]||new e.Tile(o,512,this.transform.tileZoom,this);return r}clearBackgroundTiles(){this._backgroundTiles={}}}class Bn{constructor(e=0,t=0,r=0,n=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=n}interpolate(t,r,n){return null!=r.top&&null!=t.top&&(this.top=e.number(t.top,r.top,n)),null!=r.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,r.bottom,n)),null!=r.left&&null!=t.left&&(this.left=e.number(t.left,r.left,n)),null!=r.right&&null!=t.right&&(this.right=e.number(t.right,r.right,n)),this}getCenter(t,r){const n=e.clamp((this.left+t-this.right)/2,0,t),o=e.clamp((this.top+r-this.bottom)/2,0,r);return new e.Point(n,o)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Bn(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function jn(t,r){const n=e.getColumn(t,3);e.fromQuat(t,r),e.setColumn(t,3,n)}function $n(t,r){const n=e.identity$1([]);return e.rotateZ$1(n,n,-r),e.rotateX$1(n,n,-t),n}function Un(t,r){const n=[t[0],t[1],0],o=[r[0],r[1],0];if(e.length(n)>=1e-15){const t=e.normalize([],n);e.scale$2(o,t,e.dot(o,t)),r[0]=o[0],r[1]=o[1]}const i=e.cross([],r,t);if(e.len(i)<1e-15)return null;const a=Math.atan2(-i[1],i[0]);return $n(Math.atan2(Math.sqrt(t[0]*t[0]+t[1]*t[1]),-t[2]),a)}class Vn{constructor(e,t){this.position=e,this.orientation=t}get position(){return this._position}set position(t){if(t){const r=t instanceof e.MercatorCoordinate?t:new e.MercatorCoordinate(t[0],t[1],t[2]);this._renderWorldCopies&&(r.x=e.wrap(r.x,0,1)),this._position=r}else this._position=null}lookAtPoint(t,r){if(this.orientation=null,!this.position)return;const n=this.position,o=this._elevation?this._elevation.getAtPointOrZero(e.MercatorCoordinate.fromLngLat(t)):0,i=e.MercatorCoordinate.fromLngLat(t,o),a=[i.x-n.x,i.y-n.y,i.z-n.z];r||(r=[0,0,1]),r[2]=Math.abs(r[2]),this.orientation=Un(a,r)}setPitchBearing(t,r){this.orientation=$n(e.degToRad(t),e.degToRad(-r))}}class Hn{constructor(t,r){this._transform=e.identity([]),this.orientation=r,this.position=t}get mercatorPosition(){const t=this.position;return new e.MercatorCoordinate(t[0],t[1],t[2])}get position(){const t=e.getColumn(this._transform,3);return[t[0],t[1],t[2]]}set position(t){var r;t&&e.setColumn(this._transform,3,[(r=t)[0],r[1],r[2],1])}get orientation(){return this._orientation}set orientation(t){this._orientation=t||e.identity$1([]),t&&jn(this._transform,this._orientation)}getPitchBearing(){const e=this.forward(),t=this.right();return{bearing:Math.atan2(-t[1],t[0]),pitch:Math.atan2(Math.sqrt(e[0]*e[0]+e[1]*e[1]),-e[2])}}setPitchBearing(e,t){this._orientation=$n(e,t),jn(this._transform,this._orientation)}forward(){const t=e.getColumn(this._transform,2);return[-t[0],-t[1],-t[2]]}up(){const t=e.getColumn(this._transform,1);return[-t[0],-t[1],-t[2]]}right(){const t=e.getColumn(this._transform,0);return[t[0],t[1],t[2]]}getCameraToWorld(t,r){const n=new Float64Array(16);return e.invert(n,this.getWorldToCamera(t,r)),n}getWorldToCameraPosition(t,r,n){const o=this.position;e.scale$2(o,o,-t);const i=new Float64Array(16);return e.fromScaling(i,[n,n,n]),e.translate(i,i,o),i[10]*=r,i}getWorldToCamera(t,r){const n=new Float64Array(16),o=new Float64Array(4),i=this.position;return e.conjugate(o,this._orientation),e.scale$2(i,i,-t),e.fromQuat(n,o),e.translate(n,n,i),n[1]*=-1,n[5]*=-1,n[9]*=-1,n[13]*=-1,n[8]*=r,n[9]*=r,n[10]*=r,n[11]*=r,n}getCameraToClipPerspective(t,r,n,o){const i=new Float64Array(16);return e.perspective(i,t,r,n,o),i}getDistanceToElevation(t,r=!1){const n=0===t?0:e.mercatorZfromAltitude(t,r?e.latFromMercatorY(this.position[1]):this.position[1]),o=this.forward();return(n-this.position[2])/o[2]}clone(){return new Hn([...this.position],[...this.orientation])}}function Gn(t,r){const n=qn(t.projection,t.zoom,t.width,t.height),o=function(t,r,n,o,i){const a=new e.LngLat(n.lng-180*Zn,n.lat),s=new e.LngLat(n.lng+180*Zn,n.lat),l=t.project(a.lng,a.lat),c=t.project(s.lng,s.lat),u=-Math.atan2(c.y-l.y,c.x-l.x),d=e.MercatorCoordinate.fromLngLat(n);d.y=e.clamp(d.y,-1+Zn,1-Zn);const f=d.toLngLat(),p=t.project(f.lng,f.lat),h=e.MercatorCoordinate.fromLngLat(f);h.x+=Zn;const m=h.toLngLat(),g=t.project(m.lng,m.lat),y=Xn(g.x-p.x,g.y-p.y,u),v=e.MercatorCoordinate.fromLngLat(f);v.y+=Zn;const b=v.toLngLat(),_=t.project(b.lng,b.lat),x=Xn(_.x-p.x,_.y-p.y,u),w=Math.abs(y.x)/Math.abs(x.y),A=e.identity([]);e.rotateZ(A,A,-u*(1-(i?0:o)));const S=e.identity([]);return e.scale(S,S,[1,1-(1-w)*o,1]),S[4]=-x.x/x.y*o,e.rotateZ(S,S,u),e.multiply(S,A,S),S}(t.projection,0,t.center,n,r),i=Wn(t);return e.scale(o,o,[i,i,1]),o}function Wn(t){const r=t.projection,n=qn(t.projection,t.zoom,t.width,t.height),o=Yn(r,t.center),i=Yn(r,e.LngLat.convert(r.center));return Math.pow(2,o*n+(1-n)*i)}function qn(t,r,n,o,i=1/0){const a=t.range;if(!a)return 0;const s=Math.min(i,Math.max(n,o)),l=Math.log(s/1024)/Math.LN2;return e.smoothstep(a[0]+l,a[1]+l,r)}const Zn=1/4e4;function Yn(t,r){const n=e.clamp(r.lat,-e.MAX_MERCATOR_LATITUDE,e.MAX_MERCATOR_LATITUDE),o=new e.LngLat(r.lng-180*Zn,n),i=new e.LngLat(r.lng+180*Zn,n),a=t.project(o.lng,n),s=t.project(i.lng,n),l=e.MercatorCoordinate.fromLngLat(o),c=e.MercatorCoordinate.fromLngLat(i),u=s.x-a.x,d=s.y-a.y,f=c.x-l.x,p=c.y-l.y,h=Math.sqrt((f*f+p*p)/(u*u+d*d));return Math.log(h)/Math.LN2}function Xn(e,t,r){const n=Math.cos(r),o=Math.sin(r);return{x:e*n-t*o,y:e*o+t*n}}class Kn{constructor(t,r,n,o,i,a,s){this.tileSize=512,this._renderWorldCopies=void 0===i||i,this._minZoom=t||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==o?60:o,this.setProjection(a),this.setMaxBounds(s),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._nearZ=0,this._farZ=0,this._unmodified=!0,this._edgeInsets=new Bn,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._distanceTileDataCache={},this._camera=new Hn,this._centerAltitude=0,this._averageElevation=0,this.cameraElevationReference="ground",this._pixelsPerMercatorPixel=1,this.globeRadius=0,this.globeCenterInViewSpace=[0,0,0],this._horizonShift=.1}clone(){const e=new Kn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies,this.getProjection());return e._elevation=this._elevation,e._centerAltitude=this._centerAltitude,e._centerAltitudeValidForExaggeration=this._centerAltitudeValidForExaggeration,e.tileSize=this.tileSize,e.mercatorFromTransition=this.mercatorFromTransition,e.width=this.width,e.height=this.height,e.cameraElevationReference=this.cameraElevationReference,e._center=this._center,e._setZoom(this.zoom),e._seaLevelZoom=this._seaLevelZoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._nearZ=this._nearZ,e._farZ=this._farZ,e._averageElevation=this._averageElevation,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._camera=this._camera.clone(),e._calcMatrices(),e.freezeTileCoverage=this.freezeTileCoverage,e.frustumCorners=this.frustumCorners,e}get elevation(){return this._elevation}set elevation(e){this._elevation!==e&&(this._elevation=e,this._updateCameraOnTerrain(),this._calcMatrices())}updateElevation(e,t=!1){const r=this._elevation&&this._elevation.exaggeration()!==this._centerAltitudeValidForExaggeration;(null==this._seaLevelZoom||r)&&this._updateCameraOnTerrain(),(e||r)&&this._constrainCamera(t),this._calcMatrices()}getProjection(){return e.pick(this.projection,["name","center","parallels"])}setProjection(r){this.projectionOptions=r||{name:"mercator"};const n=this.projection?this.getProjection():void 0;this.projection=e.getProjection(this.projectionOptions);const o=!t(n,this.getProjection());return o&&this._calcMatrices(),this.mercatorFromTransition=!1,o}setMercatorFromTransition(){const t=this.projection.name;this.mercatorFromTransition=!0,this.projectionOptions={name:"mercator"},this.projection=e.getProjection({name:"mercator"});const r=t!==this.projection.name;return r&&this._calcMatrices(),r}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies&&!0===this.projection.supportsWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get cameraWorldSizeForFog(){const e=Math.max(this._camera.getDistanceToElevation(this._averageElevation),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(e))}get cameraWorldSize(){const e=Math.max(this._camera.getDistanceToElevation(this._averageElevation,!0),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(e))}get pixelsPerMeter(){return this.projection.pixelsPerMeter(this.center.lat,this.worldSize)}get cameraPixelsPerMeter(){return e.mercatorZfromAltitude(this.center.lat,this.cameraWorldSizeForFog)}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.Point(this.width,this.height)}get bearing(){return e.wrap(this.rotation,-180,180)}set bearing(e){this.rotation=e}get rotation(){return-this.angle/Math.PI*180}set rotation(t){const r=-t*Math.PI/180;var n;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=(n=new e.ARRAY_TYPE(4),e.ARRAY_TYPE!=Float32Array&&(n[1]=0,n[2]=0),n[0]=1,n[3]=1,n),function(e,t,r){var n=t[0],o=t[1],i=t[2],a=t[3],s=Math.sin(r),l=Math.cos(r);e[0]=n*l+i*s,e[1]=o*l+a*s,e[2]=n*-s+i*l,e[3]=o*-s+a*l}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const r=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())}get aspect(){return this.width/this.height}get fov(){return this._fov/Math.PI*180}get fovX(){return this._fov}get fovY(){const e=1/Math.tan(.5*this.fovX);return 2*Math.atan(1/this.aspect/e)}set fov(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=e.degToRad(t),this._calcMatrices())}get averageElevation(){return this._averageElevation}set averageElevation(e){this._averageElevation=e,this._calcFogMatrices(),this._distanceTileDataCache={}}get zoom(){return this._zoom}set zoom(e){const t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._setZoom(t),this._updateSeaLevelZoom(),this._constrain(),this._calcMatrices())}_setZoom(e){this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom}_updateCameraOnTerrain(){if(!this._elevation||!this._elevation.isDataAvailableAtPoint(this.locationCoordinate(this.center)))return this._centerAltitude=0,this._seaLevelZoom=null,void(this._centerAltitudeValidForExaggeration=void 0);const e=this._elevation;this._centerAltitude=e.getAtPointOrZero(this.locationCoordinate(this.center)),this._centerAltitudeValidForExaggeration=e.exaggeration(),this._updateSeaLevelZoom()}_updateSeaLevelZoom(){void 0!==this._centerAltitudeValidForExaggeration&&(this._seaLevelZoom=this._zoomFromMercatorZ((this.pixelsPerMeter*this._centerAltitude+this.cameraToCenterDistance)/this.worldSize))}sampleAverageElevation(){if(!this._elevation)return 0;const t=this._elevation,r=[[.5,.2],[.3,.5],[.5,.5],[.7,.5],[.5,.8]],n=this.horizonLineFromTop();let o=0,i=0;for(let a=0;at.maxzoom&&(r=t.maxzoom);const a=this.locationCoordinate(this.center),s=this.center.lat,l=1<{const r=1/4e4,n=new e.MercatorCoordinate(t.x+r,t.y,t.z),o=new e.MercatorCoordinate(t.x,t.y+r,t.z),i=t.toLngLat(),a=n.toLngLat(),s=o.toLngLat(),l=this.locationCoordinate(i),c=this.locationCoordinate(a),u=this.locationCoordinate(s),d=Math.hypot(c.x-l.x,c.y-l.y),f=Math.hypot(u.x-l.x,u.y-l.y);return Math.sqrt(d*f)*x/r},A=t=>{const r=b,n=_;return{aabb:e.tileAABB(this,l,0,0,0,t,n,r,this.projection),zoom:0,x:0,y:0,minZ:n,maxZ:r,wrap:t,fullyVisible:!1}},S=[];let C=[];const E=r,T=t.reparseOverscaled?n:r,I=e=>e*e,k=I((m-this._centerAltitude)*h),M=e=>{if(!this._elevation||!e.tileID||!i)return;const t=this._elevation.getMinMaxForTile(e.tileID),r=e.aabb;t?(r.min[2]=t.min,r.max[2]=t.max,r.center[2]=(r.min[2]+r.max[2])/2):(e.shouldSplit=R(e),e.shouldSplit||(r.min[2]=r.max[2]=r.center[2]=this._centerAltitude))},R=t=>{if(t.zoom=.9)return!0}else if(o&&(a=I(t.aabb.distanceZ(g)*h)),this.projection.isReprojectedInTileSpace&&n<=5){const r=Math.pow(2,t.zoom),n=w(new e.MercatorCoordinate((t.x+.5)/r,(t.y+.5)/r));l=n>.85?1:n}const c=r*r+i*i+a,d=I((1<{if(t*I(.707)0;){const n=S.pop(),a=n.x,s=n.y;let d=n.fullyVisible;if(!d){const e=n.aabb.intersects(f);if(0===e)continue;d=2===e}if(n.zoom!==E&&R(n))for(let t=0;t<4;t++){const r=(a<<1)+t%2,c=(s<<1)+(t>>1),f={aabb:i?n.aabb.quadrant(t):e.tileAABB(this,l,n.zoom+1,r,c,n.wrap,n.minZ,n.maxZ,this.projection),zoom:n.zoom+1,x:r,y:c,wrap:n.wrap,fullyVisible:d,tileID:void 0,shouldSplit:void 0,minZ:n.minZ,maxZ:n.maxZ};o&&!u&&(f.tileID=new e.OverscaledTileID(n.zoom+1===E?T:n.zoom+1,n.wrap,n.zoom+1,r,c),M(f)),S.push(f)}else{const o=n.zoom===E?T:n.zoom;if(t.minzoom&&t.minzoom>o)continue;const i=c[0]-(.5+a+(n.wrap<{const i=[0,0,0,1],a=[e.EXTENT,e.EXTENT,0,1],s=this.calculateFogTileMatrix(o.tileID.toUnwrapped());e.transformMat4$1(i,i,s),e.transformMat4$1(a,a,s);const l=e.getAABBPointSquareDist(i,a);if(0===l)return!0;let c=!1;const u=this._elevation;if(u&&l>r&&0!==n){const r=this.calculateProjMatrix(o.tileID.toUnwrapped());let i;t.isTerrainDEM||(i=u.getMinMaxForTile(o.tileID)),i||(i={min:_,max:b});const a=e.furthestTileCorner(this.rotation),s=[a[0]*e.EXTENT,a[1]*e.EXTENT,i.max];e.transformMat4(s,s,r),c=(1-s[1])*this.height*.5e.distanceSq-t.distanceSq).map(e=>e.tileID)}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(t){const r=e.clamp(t.lat,-e.MAX_MERCATOR_LATITUDE,e.MAX_MERCATOR_LATITUDE),n=this.projection.project(t.lng,r);return new e.Point(n.x*this.worldSize,n.y*this.worldSize)}unproject(e){return this.projection.unproject(e.x/this.worldSize,e.y/this.worldSize)}get point(){return this.project(this.center)}get pointMerc(){return this.point._div(this.worldSize)}get pixelsPerMeterRatio(){return this.pixelsPerMeter/e.mercatorZfromAltitude(1,this.center.lat)/this.worldSize}setLocationAtPoint(t,r){let n,o;const i=this.centerPoint;if("globe"===this.projection.name){const e=this.worldSize;n=(r.x-i.x)/e,o=(r.y-i.y)/e}else{const e=this.pointCoordinate(r),t=this.pointCoordinate(i);n=e.x-t.x,o=e.y-t.y}const a=this.locationCoordinate(t);this.setLocation(new e.MercatorCoordinate(a.x-n,a.y-o))}setLocation(e){this.center=this.coordinateLocation(e),this.projection.wrap&&(this.center=this.center.wrap())}locationPoint(e){return this.projection.locationPoint(this,e)}locationPoint3D(e){return this.projection.locationPoint(this,e,!0)}pointLocation(e){return this.coordinateLocation(this.pointCoordinate(e))}pointLocation3D(e){return this.coordinateLocation(this.pointCoordinate3D(e))}locationCoordinate(t,r){const n=r?e.mercatorZfromAltitude(r,t.lat):void 0,o=this.projection.project(t.lng,t.lat);return new e.MercatorCoordinate(o.x,o.y,n)}coordinateLocation(e){return this.projection.unproject(e.x,e.y)}pointRayIntersection(t,r){const n=null!=r?r:this._centerAltitude,o=[t.x,t.y,0,1],i=[t.x,t.y,1,1];e.transformMat4$1(o,o,this.pixelMatrixInverse),e.transformMat4$1(i,i,this.pixelMatrixInverse);const a=i[3];e.scale$1(o,o,1/o[3]),e.scale$1(i,i,1/a);const s=o[2],l=i[2];return{p0:o,p1:i,t:s===l?0:(n-s)/(l-s)}}screenPointToMercatorRay(t){const r=[t.x,t.y,0,1],n=[t.x,t.y,1,1];return e.transformMat4$1(r,r,this.pixelMatrixInverse),e.transformMat4$1(n,n,this.pixelMatrixInverse),e.scale$1(r,r,1/r[3]),e.scale$1(n,n,1/n[3]),r[2]=e.mercatorZfromAltitude(r[2],this._center.lat)*this.worldSize,n[2]=e.mercatorZfromAltitude(n[2],this._center.lat)*this.worldSize,e.scale$1(r,r,1/this.worldSize),e.scale$1(n,n,1/this.worldSize),new e.Ray([r[0],r[1],r[2]],e.normalize([],e.sub([],n,r)))}rayIntersectionCoordinate(t){const{p0:r,p1:n,t:o}=t,i=e.mercatorZfromAltitude(r[2],this._center.lat),a=e.mercatorZfromAltitude(n[2],this._center.lat);return new e.MercatorCoordinate(e.number(r[0],n[0],o)/this.worldSize,e.number(r[1],n[1],o)/this.worldSize,e.number(i,a,o))}pointCoordinate(e,t=this._centerAltitude){return this.projection.pointCoordinate(this,e.x,e.y,t)}pointCoordinate3D(t){if(!this.elevation)return this.pointCoordinate(t);let r=this.projection.pointCoordinate3D(this,t.x,t.y);if(r)return new e.MercatorCoordinate(r[0],r[1],r[2]);let n=0,o=this.horizonLineFromTop();if(t.y>o)return this.pointCoordinate(t);const i=.02*o,a=t.clone();for(let t=0;t<10&&o-n>i;t++){a.y=e.number(n,o,.66);const t=this.projection.pointCoordinate3D(this,a.x,a.y);t?(o=a.y,r=t):n=a.y}return r?new e.MercatorCoordinate(r[0],r[1],r[2]):this.pointCoordinate(t)}isPointAboveHorizon(e){return this.projection.isPointAboveHorizon(this,e)}isPointOnSurface(t){if(t.y<0||t.y>this.height||t.x<0||t.x>this.width)return!1;if(this.elevation||this.zoom>=e.GLOBE_ZOOM_THRESHOLD_MAX)return!this.isPointAboveHorizon(t);const r=this.pointCoordinate(t);return r.y>=0&&r.y<=1}_coordinatePoint(t,r){const n=r&&this.elevation?this.elevation.getAtPointOrZero(t,this._centerAltitude):this._centerAltitude,o=[t.x*this.worldSize,t.y*this.worldSize,n+t.toAltitude(),1];return e.transformMat4$1(o,o,this.pixelMatrix),o[3]>0?new e.Point(o[0]/o[3],o[1]/o[3]):new e.Point(Number.MAX_VALUE,Number.MAX_VALUE)}_getBoundsNonRectangular(){const{top:t,left:r}=this._edgeInsets,n=this.height-this._edgeInsets.bottom,o=this.width-this._edgeInsets.right,i=this.pointLocation3D(new e.Point(r,t)),a=this.pointLocation3D(new e.Point(o,t)),s=this.pointLocation3D(new e.Point(o,n)),l=this.pointLocation3D(new e.Point(r,n));let c=Math.min(i.lng,a.lng,s.lng,l.lng),u=Math.max(i.lng,a.lng,s.lng,l.lng),d=Math.min(i.lat,a.lat,s.lat,l.lat),f=Math.max(i.lat,a.lat,s.lat,l.lat);const p=Math.pow(2,-this.zoom)/16*270,h="globe"===this.projection.name?1:4,m=(t,r,n,o,i)=>{const a=(t+n)/2,s=(r+o)/2,l=new e.Point(a,s),{lng:g,lat:y}=this.pointLocation3D(l),v=Math.max(0,c-g,d-y,g-u,y-f);c=Math.min(c,g),u=Math.max(u,g),d=Math.min(d,y),f=Math.max(f,y),(ip)&&(m(t,r,a,s,i+1),m(a,s,n,o,i+1))};if(m(r,t,o,t,1),m(o,t,o,n,1),m(o,n,r,n,1),m(r,n,r,t,1),"globe"===this.projection.name){const[t,r]=e.polesInViewport(this);t?(f=90,u=180,c=-180):r&&(d=-90,u=180,c=-180)}return new e.LngLatBounds(new e.LngLat(c,d),new e.LngLat(u,f))}_getBoundsRectangular(t,r){const{top:n,left:o}=this._edgeInsets,i=this.height-this._edgeInsets.bottom,a=this.width-this._edgeInsets.right,s=new e.Point(o,n),l=new e.Point(a,n),c=new e.Point(a,i),u=new e.Point(o,i);let d=this.pointCoordinate(s,t),f=this.pointCoordinate(l,t);const p=this.pointCoordinate(c,r),h=this.pointCoordinate(u,r),m=(e,t)=>(t.y-e.y)/(t.x-e.x);return d.y>1&&f.y>=0?d=new e.MercatorCoordinate((1-h.y)/m(h,d)+h.x,1):d.y<0&&f.y<=1&&(d=new e.MercatorCoordinate(-h.y/m(h,d)+h.x,0)),f.y>1&&d.y>=0?f=new e.MercatorCoordinate((1-p.y)/m(p,f)+p.x,1):f.y<0&&d.y<=1&&(f=new e.MercatorCoordinate(-p.y/m(p,f)+p.x,0)),(new e.LngLatBounds).extend(this.coordinateLocation(d)).extend(this.coordinateLocation(f)).extend(this.coordinateLocation(h)).extend(this.coordinateLocation(p))}_getBoundsRectangularTerrain(){const e=this.elevation;if(!e.visibleDemTiles.length||e.isUsingMockSource())return this._getBoundsRectangular(0,0);const t=e.visibleDemTiles.reduce((e,t)=>{if(t.dem){const r=t.dem.tree;e.min=Math.min(e.min,r.minimums[0]),e.max=Math.max(e.max,r.maximums[0])}return e},{min:Number.MAX_VALUE,max:0});return this._getBoundsRectangular(t.min*e.exaggeration(),t.max*e.exaggeration())}getBounds(){return"mercator"===this.projection.name||"equirectangular"===this.projection.name?this._terrainEnabled()?this._getBoundsRectangularTerrain():this._getBoundsRectangular(0,0):this._getBoundsNonRectangular()}horizonLineFromTop(e=!0){const t=this.height/2/Math.tan(this._fov/2)/Math.tan(Math.max(this._pitch,.1))+this.centerOffset.y,r=this.height/2-t*(1-this._horizonShift);return e?Math.max(0,r):r}getMaxBounds(){return this.maxBounds}setMaxBounds(t){this.maxBounds=t,this.minLat=-e.MAX_MERCATOR_LATITUDE,this.maxLat=e.MAX_MERCATOR_LATITUDE,this.minLng=-180,this.maxLng=180,t&&(this.minLat=t.getSouth(),this.maxLat=t.getNorth(),this.minLng=t.getWest(),this.maxLng=t.getEast(),this.maxLngd&&(s=d-c),d-ut&&(a=t-l),t-e.5?_-1:_,x>.5?x-1:x,0]),this.alignedProjMatrix=w,s=e.create(),e.scale(s,s,[this.width/2,-this.height/2,1]),e.translate(s,s,[1,-1,0]),this.labelPlaneMatrix=s,s=e.create(),e.scale(s,s,[1,-1,1]),e.translate(s,s,[-1,-1,0]),e.scale(s,s,[2/this.width,2/this.height,1]),this.glCoordMatrix=s,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),this._calcFogMatrices(),this._distanceTileDataCache={},s=e.invert(new Float64Array(16),this.pixelMatrix),!s)throw new Error("failed to invert matrix");if(this.pixelMatrixInverse=s,"globe"===this.projection.name||this.mercatorFromTransition){this.globeMatrix=e.calculateGlobeMatrix(this);const t=[this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]];this.globeCenterInViewSpace=e.transformMat4(t,t,i),this.globeRadius=this.worldSize/2/Math.PI-1}else this.globeMatrix=s;this._projMatrixCache={},this._alignedProjMatrixCache={},this._pixelsToTileUnitsCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};const t=this.cameraWorldSizeForFog,r=this.cameraPixelsPerMeter,n=this._camera.position,o=1/this.height/this._pixelsPerMercatorPixel,i=[t,t,r];e.scale$2(i,i,o),e.scale$2(n,n,-1),e.multiply$2(n,n,i);const a=e.create();e.translate(a,a,n),e.scale(a,a,i),this.mercatorFogMatrix=a,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(t,r,o)}_computeCameraPosition(e){const t=(e=e||this.pixelsPerMeter)/this.pixelsPerMeter,r=this._camera.forward(),n=this.point,o=this._mercatorZfromZoom(this._seaLevelZoom?this._seaLevelZoom:this._zoom)*t-e/this.worldSize*this._centerAltitude;return[n.x/this.worldSize-r[0]*o,n.y/this.worldSize-r[1]*o,e/this.worldSize*this._centerAltitude-r[2]*o]}_updateCameraState(){this.height&&(this._camera.setPitchBearing(this._pitch,this.angle),this._camera.position=this._computeCameraPosition())}_translateCameraConstrained(t){const r=this._maxCameraBoundsDistance()*Math.cos(this._pitch),n=this._camera.position[2],o=t[2];let i=1;this.projection.wrap&&(this.center=this.center.wrap()),o>0&&(i=Math.min((r-n)/o,1)),this._camera.position=e.scaleAndAdd([],this._camera.position,t,i),this._updateStateFromCamera()}_updateStateFromCamera(){const t=this._camera.position,r=this._camera.forward(),{pitch:n,bearing:o}=this._camera.getPitchBearing(),i=e.mercatorZfromAltitude(this._centerAltitude,this.center.lat)*this._pixelsPerMercatorPixel,a=this._mercatorZfromZoom(this._maxZoom)*Math.cos(e.degToRad(this._maxPitch)),s=Math.max((t[2]-i)/Math.cos(n),a),l=this._zoomFromMercatorZ(s);e.scaleAndAdd(t,t,r,s),this._pitch=e.clamp(n,e.degToRad(this.minPitch),e.degToRad(this.maxPitch)),this.angle=e.wrap(o,-Math.PI,Math.PI),this._setZoom(e.clamp(l,this._minZoom,this._maxZoom)),this._updateSeaLevelZoom(),this._center=this.coordinateLocation(new e.MercatorCoordinate(t[0],t[1],t[2])),this._unmodified=!1,this._constrain(),this._calcMatrices()}_worldSizeFromZoom(e){return Math.pow(2,e)*this.tileSize}_mercatorZfromZoom(e){return this.cameraToCenterDistance/this._worldSizeFromZoom(e)}_minimumHeightOverTerrain(){const e=Math.min((null!=this._seaLevelZoom?this._seaLevelZoom:this._zoom)+4,this._maxZoom);return this._mercatorZfromZoom(e)}_zoomFromMercatorZ(e){return this.scaleZoom(this.cameraToCenterDistance/(e*this.tileSize))}zoomFromMercatorZAdjusted(t){let r=0,n=e.GLOBE_ZOOM_THRESHOLD_MAX,o=0,i=1/0;for(;n-r>1e-6&&n>r;){const e=r+.5*(n-r),a=this.tileSize*Math.pow(2,e),s=this.getCameraToCenterDistance(this.projection,e,a),l=this.scaleZoom(s/(t*this.tileSize)),c=Math.abs(e-l);cc||r.y>1)return!0}return!1}isHorizonVisible(){return this.pitch+e.radToDeg(this.fovAboveCenter)>88||this.anyCornerOffEdge(new e.Point(0,0),new e.Point(this.width,this.height))}zoomDeltaToMovement(t,r){const n=e.length(e.sub([],this._camera.position,t)),o=this._zoomFromMercatorZ(n)+r;return n-this._mercatorZfromZoom(o)}getCameraPoint(){if("globe"===this.projection.name){const t=function([t,r,n],o){const i=[t,r,n,1];e.transformMat4$1(i,i,o);const a=i[3]=Math.max(i[3],1e-6);return i[0]/=a,i[1]/=a,i[2]/=a,i}([this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]],this.pixelMatrix);return new e.Point(t[0],t[1])}{const t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,t))}}getCameraToCenterDistance(e,t=this.zoom,r=this.worldSize){const n=qn(e,t,this.width,this.height,1024),o=e.pixelSpaceConversion(this.center.lat,r,n);return.5/Math.tan(.5*this._fov)*this.height*o}getWorldToCameraMatrix(){const t=this._camera.getWorldToCamera(this.worldSize,"meters"===this.projection.zAxisUnit?this.pixelsPerMeter:1);return"globe"===this.projection.name&&e.multiply(t,t,this.globeMatrix),t}}function Jn(e,t){let r=!1,n=null;const o=()=>{n=null,r&&(e(),n=setTimeout(o,t),r=!1)};return()=>(r=!0,n||o(),n)}class Qn{constructor(t){this._hashName=t&&encodeURIComponent(t),e.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=Jn(this._updateHashUnthrottled.bind(this),300)}addTo(t){return this._map=t,e.window.addEventListener("hashchange",this._onHashChange,!1),t.on("moveend",this._updateHash),this}remove(){return this._map?(this._map.off("moveend",this._updateHash),e.window.removeEventListener("hashchange",this._onHashChange,!1),clearTimeout(this._updateHash()),this._map=void 0,this):this}getHashString(){const t=this._map;if(!t)return"";const r=eo(t);if(this._hashName){const t=this._hashName;let n=!1;const o=e.window.location.hash.slice(1).split("&").map(e=>{const o=e.split("=")[0];return o===t?(n=!0,`${o}=${r}`):e}).filter(e=>e);return n||o.push(`${t}=${r}`),`#${o.join("&")}`}return`#${r}`}_getCurrentHash(){const t=e.window.location.hash.replace("#","");if(this._hashName){let e;return t.split("&").map(e=>e.split("=")).forEach(t=>{t[0]===this._hashName&&(e=t)}),(e&&e[1]||"").split("/")}return t.split("/")}_onHashChange(){const e=this._map;if(!e)return!1;const t=this._getCurrentHash();if(t.length>=3&&!t.some(e=>isNaN(e))){const r=e.dragRotate.isEnabled()&&e.touchZoomRotate.isEnabled()?+(t[3]||0):e.getBearing();return e.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:r,pitch:+(t[4]||0)}),!0}return!1}_updateHashUnthrottled(){const t=e.window.location.href.replace(/(#.+)?$/,this.getHashString());e.window.history.replaceState(e.window.history.state,null,t)}}function eo(e,t){const r=e.getCenter(),n=Math.round(100*e.getZoom())/100,o=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,o),a=Math.round(r.lng*i)/i,s=Math.round(r.lat*i)/i,l=e.getBearing(),c=e.getPitch();let u=t?`/${a}/${s}/${n}`:`${n}/${s}/${a}`;return(l||c)&&(u+="/"+Math.round(10*l)/10),c&&(u+=`/${Math.round(c)}`),u}const to={linearity:.3,easing:e.bezier(0,0,.3,1)},ro=e.extend({deceleration:2500,maxSpeed:1400},to),no=e.extend({deceleration:20,maxSpeed:1400},to),oo=e.extend({deceleration:1e3,maxSpeed:360},to),io=e.extend({deceleration:1e3,maxSpeed:90},to);class ao{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.exported.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,r=e.exported.now();for(;t.length>0&&r-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._map._prefersReducedMotion())return;if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const r={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0};for(const{settings:e}of this._inertiaBuffer)r.zoom+=e.zoomDelta||0,r.bearing+=e.bearingDelta||0,r.pitch+=e.pitchDelta||0,e.panDelta&&r.pan._add(e.panDelta),e.around&&(r.around=e.around),e.pinchAround&&(r.pinchAround=e.pinchAround);const n=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,o={};if(r.pan.mag()){const i=lo(r.pan.mag(),n,e.extend({},ro,t||{}));o.offset=r.pan.mult(i.amount/r.pan.mag()),o.center=this._map.transform.center,so(o,i)}if(r.zoom){const e=lo(r.zoom,n,no);o.zoom=this._map.transform.zoom+e.amount,so(o,e)}if(r.bearing){const t=lo(r.bearing,n,oo);o.bearing=this._map.transform.bearing+e.clamp(t.amount,-179,179),so(o,t)}if(r.pitch){const e=lo(r.pitch,n,io);o.pitch=this._map.transform.pitch+e.amount,so(o,e)}if(o.zoom||o.bearing){const e=void 0===r.pinchAround?r.around:r.pinchAround;o.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),o.noMoveStart=!0,o}}function so(e,t){(!e.duration||e.durationr.unproject(e)),s=i.reduce((e,t,r,n)=>e.add(t.div(n.length)),new e.Point(0,0));super(t,{points:i,point:s,lngLats:a,lngLat:r.unproject(s),originalEvent:n}),this._defaultPrevented=!1}}class fo extends e.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){super(e,{originalEvent:r}),this._defaultPrevented=!1}}class po{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){this._mousedownPos=void 0}wheel(e){return this._firePreventable(new fo(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new co(e.type,this._map,e))}mouseup(e){this._map.fire(new co(e.type,this._map,e))}preclick(t){const r=e.extend({},t);r.type="preclick",this._map.fire(new co(r.type,this._map,r))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||(this.preclick(e),this._map.fire(new co(e.type,this._map,e)))}dblclick(e){return this._firePreventable(new co(e.type,this._map,e))}mouseover(e){this._map.fire(new co(e.type,this._map,e))}mouseout(e){this._map.fire(new co(e.type,this._map,e))}touchstart(e){return this._firePreventable(new uo(e.type,this._map,e))}touchmove(e){this._map.fire(new uo(e.type,this._map,e))}touchend(e){this._map.fire(new uo(e.type,this._map,e))}touchcancel(e){this._map.fire(new uo(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ho{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._contextMenuEvent=void 0}mousemove(e){this._map.fire(new co(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new co("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new co(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class mo{constructor(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(u(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active)return;const r=t,n=this._startPos,o=this._lastPos;if(!n||!o||o.equals(r)||!this._box&&r.dist(n){this._box&&(this._box.style.transform=`translate(${a}px,${l}px)`,this._box.style.width=s-a+"px",this._box.style.height=c-l+"px")})}mouseupWindow(t,r){if(!this._active)return;const n=this._startPos,o=r;if(n&&0===t.button){if(this.reset(),p(),n.x!==o.x||n.y!==o.y)return this._map.fire(new e.Event("boxzoomend",{originalEvent:t})),{cameraAnimation:e=>e.fitScreenCoordinates(n,o,this._map.getBearing(),{linear:!1})};this._fireEvent("boxzoomcancel",t)}}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}blur(){this.reset()}reset(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.remove(),this._box=null),d(),delete this._startPos,delete this._lastPos}_fireEvent(t,r){return this._map.fire(new e.Event(t,{originalEvent:r}))}}function go(e,t){const r={};for(let n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(0===this.startTime&&(this.startTime=t.timeStamp),n.length===this.numTouches&&(this.centroid=function(t){const r=new e.Point(0,0);for(const e of t)r._add(e);return r.div(t.length)}(r),this.touches=go(n,r)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;const n=go(r,t);for(const e in this.touches){const t=n[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){const e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class vo{constructor(e){this.singleTap=new yo(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,this.lastTap=void 0,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){const n=this.singleTap.touchend(e,t,r);if(n){const t=e.timeStamp-this.lastTime<500,r=!this.lastTap||this.lastTap.dist(n)<30;if(t&&r||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}}}class bo{constructor(){this._zoomIn=new vo({numTouches:1,numTaps:2}),this._zoomOut=new vo({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,t,r){const n=this._zoomIn.touchend(e,t,r),o=this._zoomOut.touchend(e,t,r);return n?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(n)},{originalEvent:e})}):o?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(o)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const _o={0:1,2:2};class xo{constructor(e){this.reset(),this._clickTolerance=e.clickTolerance||1}blur(){this.reset()}reset(){this._active=!1,this._moved=!1,this._lastPoint=void 0,this._eventButton=void 0}_correctButton(e,t){return!1}_move(e,t){return{}}mousedown(e,t){if(this._lastPoint)return;const r=g(e);this._correctButton(e,r)&&(this._lastPoint=t,this._eventButton=r)}mousemoveWindow(e,t){const r=this._lastPoint;if(r)if(e.preventDefault(),null!=this._eventButton&&function(e,t){const r=_o[t];return void 0===e.buttons||(e.buttons&r)!==r}(e,this._eventButton))this.reset();else if(this._moved||!(t.dist(r)0&&(this._active=!0);const o=go(n,r),i=new e.Point(0,0),a=new e.Point(0,0);let s=0;for(const e in o){const t=o[e],r=this._touches[e];r&&(i._add(t),a._add(t.sub(r)),s++,o[e]=t)}if(this._touches=o,s{this._alertContainer.classList.remove("mapboxgl-touch-pan-blocker-show"),this._alertContainer.setAttribute("role","null")},500)}}class Eo{constructor(){this.reset()}reset(){this._active=!1,this._firstTwoTouches=void 0}_start(e){}_move(e,t,r){return{}}touchstart(e,t,r){this._firstTwoTouches||r.length<2||(this._firstTwoTouches=[r[0].identifier,r[1].identifier],this._start([t[0],t[1]]))}touchmove(e,t,r){const n=this._firstTwoTouches;if(!n)return;e.preventDefault();const[o,i]=n,a=To(r,t,o),s=To(r,t,i);if(!a||!s)return;const l=this._aroundCenter?null:a.add(s).div(2);return this._move([a,s],l,e)}touchend(e,t,r){if(!this._firstTwoTouches)return;const[n,o]=this._firstTwoTouches,i=To(r,t,n),a=To(r,t,o);i&&a||(this._active&&p(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function To(e,t,r){for(let n=0;nMath.abs(e.x)}class Oo extends Eo{constructor(e){super(),this._map=e}reset(){super.reset(),this._valid=void 0,this._firstMove=void 0,this._lastPoints=void 0}_start(e){this._lastPoints=e,Po(e[0].sub(e[1]))&&(this._valid=!1)}_move(t,r,n){const o=this._lastPoints;if(!o)return;const i=t[0].sub(o[0]),a=t[1].sub(o[1]);return this._map._cooperativeGestures&&!e.isFullscreen()&&n.touches.length<3||(this._valid=this.gestureBeginsVertically(i,a,n.timeStamp),!this._valid)?void 0:(this._lastPoints=t,this._active=!0,{pitchDelta:(i.y+a.y)/2*-.5})}gestureBeginsVertically(e,t,r){if(void 0!==this._valid)return this._valid;const n=e.mag()>=2,o=t.mag()>=2;if(!n&&!o)return;if(!n||!o)return null==this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;const i=e.y>0==t.y>0;return Po(e)&&Po(t)&&i}}const Do={panStep:100,bearingStep:15,pitchStep:10};class Lo{constructor(){const e=Do;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep,this._rotationDisabled=!1}blur(){this.reset()}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,r=0,n=0,o=0,i=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),o=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),o=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),i=-1);break;case 40:e.shiftKey?n=-1:(e.preventDefault(),i=1);break;default:return}return this._rotationDisabled&&(r=0,n=0),{cameraAnimation:a=>{const s=a.getZoom();a.easeTo({duration:300,easeId:"keyboardHandler",easing:No,zoom:t?Math.round(s)+t*(e.shiftKey?2:1):s,bearing:a.getBearing()+r*this._bearingStep,pitch:a.getPitch()+n*this._pitchStep,offset:[-o*this._panStep,-i*this._panStep],center:a.getCenter()},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function No(e){return e*(2-e)}const Fo=4.000244140625;class zo{constructor(t,r){this._map=t,this._el=t.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,e.bindAll(["_onTimeout","_addScrollZoomBlocker","_showBlockerAlert"],this)}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around,this._map._cooperativeGestures&&this._addScrollZoomBlocker())}disable(){this.isEnabled()&&(this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove()))}wheel(t){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!(t.ctrlKey||t.metaKey||this.isZooming()||e.isFullscreen()))return void this._showBlockerAlert();"hidden"!==this._alertContainer.style.visibility&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}let r=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const n=e.exported.now(),o=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%Fo==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":o>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(o*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=t,this._delta-=r,this._active||this._start(t)),t.preventDefault()}_onTimeout(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const t=h(this._el,e);this._aroundPoint=this._aroundCenter?this._map.transform.centerPoint:t,this._aroundCoord=this._map.transform.pointCoordinate3D(this._aroundPoint),this._targetZoom=void 0,this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const t=this._map.transform;"wheel"===this._type&&t.projection.wrap&&(t._center.lng>=180||t._center.lng<=-180)&&(this._prevEase=null,this._easing=null,this._lastWheelEvent=null,this._lastWheelEventTime=0);const r=()=>t._terrainEnabled()&&this._aroundCoord?t.computeZoomRelativeTo(this._aroundCoord):t.zoom;if(0!==this._delta){const e="wheel"===this._type&&Math.abs(this._delta)>Fo?this._wheelZoomRate:this._defaultZoomRate;let n=2/(1+Math.exp(-Math.abs(this._delta*e)));this._delta<0&&0!==n&&(n=1/n);const o=r(),i=Math.pow(2,o),a="number"==typeof this._targetZoom?t.zoomScale(this._targetZoom):i;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(a*n))),"wheel"===this._type&&(this._startZoom=o,this._easing=this._smoothOutEasing(200)),this._delta=0}const n="number"==typeof this._targetZoom?this._targetZoom:r(),o=this._startZoom,i=this._easing;let a,s=!1;if("wheel"===this._type&&o&&i){const t=Math.min((e.exported.now()-this._lastWheelEventTime)/200,1),r=i(t);a=e.number(o,n,r),t<1?this._frameId||(this._frameId=!0):s=!0}else a=n,s=!0;return this._active=!0,s&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!s,zoomDelta:a-r(),around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let r=e.ease;if(this._prevEase){const t=this._prevEase,n=(e.exported.now()-t.start)/t.duration,o=t.easing(n+.01)-t.easing(n),i=.27/Math.sqrt(o*o+1e-4)*.01,a=Math.sqrt(.0729-i*i);r=e.bezier(i,a,.25,1)}return this._prevEase={start:e.exported.now(),duration:t,easing:r},r}blur(){this.reset()}reset(){this._active=!1}_addScrollZoomBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=i("div","mapboxgl-scroll-zoom-blocker",this._map._container),this._alertContainer.textContent=/(Mac|iPad)/i.test(e.window.navigator.userAgent)?this._map._getUIString("ScrollZoomBlocker.CmdMessage"):this._map._getUIString("ScrollZoomBlocker.CtrlMessage"),this._alertContainer.style.fontSize=`${Math.max(10,Math.min(24,Math.floor(.05*this._el.clientWidth)))}px`)}_showBlockerAlert(){this._alertContainer.style.visibility="visible",this._alertContainer.classList.add("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","alert"),clearTimeout(this._alertTimer),this._alertTimer=setTimeout(()=>{this._alertContainer.classList.remove("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","null")},200)}}class Bo{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class jo{constructor(){this.reset()}reset(){this._active=!1}blur(){this.reset()}dblclick(e,t){return e.preventDefault(),{cameraAnimation:r=>{r.easeTo({duration:300,zoom:r.getZoom()+(e.shiftKey?-1:1),around:r.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class $o{constructor(){this._tap=new vo({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,this._swipePoint=void 0,this._swipeTouch=0,this._tapTime=0,this._tap.reset()}touchstart(e,t,r){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=t[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(e,t,r))}touchmove(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;const n=t[0],o=n.y-this._swipePoint.y;return this._swipePoint=n,e.preventDefault(),this._active=!0,{zoomDelta:o/128}}}else this._tap.touchmove(e,t,r)}touchend(e,t,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(e,t,r)&&(this._tapTime=e.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Uo{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Vo{constructor(e,t,r){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=r}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Ho{constructor(e,t,r,n){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const Go=e=>e.zoom||e.drag||e.pitch||e.rotate;class Wo extends e.Event{}class qo{constructor(){this.constants=[1,1,.01],this.radius=0}setup(t,r){const n=e.sub([],r,t);this.radius=e.length(n[2]<0?e.div([],n,this.constants):[n[0],n[1],0])}projectRay(t){e.div(t,t,this.constants),e.normalize(t,t),e.mul$1(t,t,this.constants);const r=e.scale$2([],t,this.radius);if(r[2]>0){const t=e.scale$2([],[0,0,1],e.dot(r,[0,0,1])),n=e.scale$2([],e.normalize([],[r[0],r[1],0]),this.radius),o=e.add([],r,e.scale$2([],e.sub([],e.add([],n,t),r),2));r[0]=o[0],r[1]=o[1]}return r}}function Zo(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}class Yo{constructor(t,r){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ao(t),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new qo,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(r),e.bindAll(["handleEvent","handleWindowEvent"],this);const n=this._el;this._listeners=[[n,"touchstart",{passive:!0}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[e.window,"blur",void 0]];for(const[t,r,n]of this._listeners)t.addEventListener(r,t===e.window.document?this.handleWindowEvent:this.handleEvent,n)}destroy(){for(const[t,r,n]of this._listeners)t.removeEventListener(r,t===e.window.document?this.handleWindowEvent:this.handleEvent,n)}_addDefaultHandlers(e){const t=this._map,r=t.getCanvasContainer();this._add("mapEvent",new po(t,e));const n=t.boxZoom=new mo(t,e);this._add("boxZoom",n);const o=new bo,i=new jo;t.doubleClickZoom=new Bo(i,o),this._add("tapZoom",o),this._add("clickZoom",i);const a=new $o;this._add("tapDragZoom",a);const s=t.touchPitch=new Oo(t);this._add("touchPitch",s);const l=new Ao(e),c=new So(e);t.dragRotate=new Vo(e,l,c),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",c,["mouseRotate"]);const u=new wo(e),d=new Co(t,e);t.dragPan=new Uo(r,u,d),this._add("mousePan",u),this._add("touchPan",d,["touchZoom","touchRotate"]);const f=new Ro,p=new ko;t.touchZoomRotate=new Ho(r,p,f,a),this._add("touchRotate",f,["touchPan","touchZoom"]),this._add("touchZoom",p,["touchPan","touchRotate"]),this._add("blockableMapEvent",new ho(t));const h=t.scrollZoom=new zo(t,this);this._add("scrollZoom",h,["mousePan"]);const m=t.keyboard=new Lo;this._add("keyboard",m);for(const r of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])e.interactive&&e[r]&&t[r].enable(e[r])}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(const{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Go(this._eventsInProgress)||this.isZooming()}_isDragging(){return!!this._eventsInProgress.drag}_blockedByActive(e,t,r){for(const n in e)if(n!==r&&(!t||t.indexOf(n)<0))return!0;return!1}handleWindowEvent(e){this.handleEvent(e,`${e.type}Window`)}_getMapTouches(e){const t=[];for(const r of e)this._el.contains(r.target)&&t.push(r);return t}handleEvent(e,t){this._updatingCamera=!0;const r="renderFrame"===e.type,n=r?void 0:e,o={needsRenderFrame:!1},i={},a={},s=e.touches?this._getMapTouches(e.touches):void 0,l=s?m(this._el,s):r?void 0:h(this._el,e);for(const{handlerName:r,handler:c,allowed:u}of this._handlers){if(!c.isEnabled())continue;let d;this._blockedByActive(a,u,r)?c.reset():c[t||e.type]&&(d=c[t||e.type](e,l,s),this.mergeHandlerResult(o,i,d,r,n),d&&d.needsRenderFrame&&this._triggerRenderFrame()),(d||c.isActive())&&(a[r]=c)}const c={};for(const e in this._previousActiveHandlers)a[e]||(c[e]=n);this._previousActiveHandlers=a,(Object.keys(c).length||Zo(o))&&(this._changes.push([o,i,c]),this._triggerRenderFrame()),(Object.keys(a).length||Zo(o))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:u}=o;u&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],u(this._map))}mergeHandlerResult(t,r,n,o,i){if(!n)return;e.extend(t,n);const a={handlerName:o,originalEvent:n.originalEvent||i};void 0!==n.zoomDelta&&(r.zoom=a),void 0!==n.panDelta&&(r.drag=a),void 0!==n.pitchDelta&&(r.pitch=a),void 0!==n.bearingDelta&&(r.rotate=a)}_applyChanges(){const t={},r={},n={};for(const[o,i,a]of this._changes)o.panDelta&&(t.panDelta=(t.panDelta||new e.Point(0,0))._add(o.panDelta)),o.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+o.zoomDelta),o.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+o.bearingDelta),o.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+o.pitchDelta),void 0!==o.around&&(t.around=o.around),void 0!==o.aroundCoord&&(t.aroundCoord=o.aroundCoord),void 0!==o.pinchAround&&(t.pinchAround=o.pinchAround),o.noInertia&&(t.noInertia=o.noInertia),e.extend(r,i),e.extend(n,a);this._updateMapTransform(t,r,n),this._changes=[]}_updateMapTransform(t,r,n){const o=this._map,i=o.transform,a=e=>[e.x,e.y,e.z];if((()=>{const e=this._eventsInProgress.drag;return e&&!this._handlersById[e.handlerName].isActive()})()&&!Zo(t)){const e=i.zoom;i.cameraElevationReference="sea",i.recenterOnTerrain(),i.cameraElevationReference="ground",e!==i.zoom&&this._map._update(!0)}if(i._isCameraConstrained&&o._stop(!0),!Zo(t))return void this._fireEvents(r,n,!0);let{panDelta:s,zoomDelta:l,bearingDelta:c,pitchDelta:u,around:d,aroundCoord:f,pinchAround:p}=t;i._isCameraConstrained&&(l>0&&(l=0),i._isCameraConstrained=!1),void 0!==p&&(d=p),(l||(e=>r[e]&&!this._eventsInProgress[e])("drag"))&&d&&(this._dragOrigin=a(i.pointCoordinate3D(d)),this._trackingEllipsoid.setup(i._camera.position,this._dragOrigin)),i.cameraElevationReference="sea",o._stop(!0),d=d||o.transform.centerPoint,c&&(i.bearing+=c),u&&(i.pitch+=u),i._updateCameraState();const h=[0,0,0];if(s)if("mercator"===i.projection.name){const e=this._trackingEllipsoid.projectRay(i.screenPointToMercatorRay(d).dir),t=this._trackingEllipsoid.projectRay(i.screenPointToMercatorRay(d.sub(s)).dir);h[0]=t[0]-e[0],h[1]=t[1]-e[1]}else{const t=i.pointCoordinate(d);if("globe"===i.projection.name){s=s.rotate(-i.angle);const r=i._pixelsPerMercatorPixel/i.worldSize;h[0]=-s.x*e.mercatorScale(e.latFromMercatorY(t.y))*r,h[1]=-s.y*e.mercatorScale(i.center.lat)*r}else{const e=i.pointCoordinate(d.sub(s));t&&e&&(h[0]=e.x-t.x,h[1]=e.y-t.y)}}const m=i.zoom,g=[0,0,0];if(l){const t=a(f||i.pointCoordinate3D(d)),r={dir:e.normalize([],e.sub([],t,i._camera.position))};if(r.dir[2]<0){const n=i.zoomDeltaToMovement(t,l);e.scale$2(g,r.dir,n)}}const y=e.add(h,h,g);i._translateCameraConstrained(y),l&&Math.abs(i.zoom-m)>1e-4&&i.recenterOnTerrain(),i.cameraElevationReference="ground",this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(r,n,!0)}_fireEvents(t,r,n){const o=Go(this._eventsInProgress),i=Go(t),a={};for(const e in t){const{originalEvent:r}=t[e];this._eventsInProgress[e]||(a[`${e}start`]=r),this._eventsInProgress[e]=t[e]}!o&&i&&this._fireEvent("movestart",i.originalEvent);for(const e in a)this._fireEvent(e,a[e]);i&&this._fireEvent("move",i.originalEvent);for(const e in t){const{originalEvent:r}=t[e];this._fireEvent(e,r)}const s={};let l;for(const e in this._eventsInProgress){const{handlerName:t,originalEvent:n}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=r[t]||n,s[`${e}end`]=l)}for(const e in s)this._fireEvent(e,s[e]);const c=Go(this._eventsInProgress);if(n&&(o||i)&&!c){this._updatingCamera=!0;const t=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),r=e=>0!==e&&-this._bearingSnap{this._frameId=void 0,this.handleEvent(new Wo("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}const Xo="map.setFreeCameraOptions(...) and map.getFreeCameraOptions() are not yet supported for non-mercator projections.";class Ko extends e.Evented{constructor(t,r){super(),this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=r.bearingSnap,this._respectPrefersReducedMotion=!1!==r.respectPrefersReducedMotion,e.bindAll(["_renderFrameCallback"],this)}getCenter(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}panBy(t,r,n){return t=e.Point.convert(t).mult(-1),this.panTo(this.transform.center,e.extend({offset:t},r),n)}panTo(t,r,n){return this.easeTo(e.extend({center:t},r),n)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(t,r,n){return this.easeTo(e.extend({zoom:t},r),n)}zoomIn(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}zoomOut(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}getBearing(){return this.transform.bearing}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(t,r,n){return this.easeTo(e.extend({bearing:t},r),n)}resetNorth(t,r){return this.rotateTo(0,e.extend({duration:1e3},t),r),this}resetNorthPitch(t,r){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},t),r),this}snapToNorth(e,t){return Math.abs(this.getBearing())e.aspect?r/(2*Math.tan(.5*e.fovX)*e.aspect):n/(2*Math.tan(.5*e.fovY)*e.aspect)}_cameraForBoundsOnGlobe(t,r,n,o,i,a){const s=t.clone(),l=this._extendCameraOptions(a);s.bearing=o,s.pitch=i;const c=e.LngLat.convert(r),u=e.LngLat.convert(n),d=.5*(c.lat+u.lat),f=.5*(c.lng+u.lng),p=e.latLngToECEF(d,f),h=e.normalize([],p),m=e.normalize([],e.cross([],h,[0,1,0])),g=e.cross([],m,h),y=[m[0],m[1],m[2],0,g[0],g[1],g[2],0,h[0],h[1],h[2],0,0,0,0,1],v=[p,e.latLngToECEF(c.lat,c.lng),e.latLngToECEF(u.lat,c.lng),e.latLngToECEF(u.lat,u.lng),e.latLngToECEF(c.lat,u.lng),e.latLngToECEF(d,c.lng),e.latLngToECEF(d,u.lng),e.latLngToECEF(c.lat,f),e.latLngToECEF(u.lat,f)];let b=e.Aabb.fromPoints(v.map(t=>[e.dot(m,t),e.dot(g,t),e.dot(h,t)]));const _=e.transformMat4([],b.center,y);0===e.squaredLength(_)&&e.set(_,0,0,1),e.normalize(_,_),e.scale$2(_,_,e.GLOBE_RADIUS),s.center=e.ecefToLatLng(_);const x=s.getWorldToCameraMatrix(),w=e.invert(new Float64Array(16),x);b=e.Aabb.applyTransform(b,e.multiply([],x,y)),e.transformMat4(_,_,x);const A=.5*(b.max[2]-b.min[2]),S=this._minimumAABBFrustumDistance(s,b),C=e.scale$2([],[0,0,1],A),E=e.add(C,_,C),T=S+(0===s.pitch?0:e.distance(_,E)),I=s.globeCenterInViewSpace,k=e.sub([],_,[I[0],I[1],I[2]]);e.normalize(k,k),e.scale$2(k,k,T);const M=e.add([],_,k);e.transformMat4(M,M,w);const R=e.earthRadius/e.GLOBE_RADIUS,P=e.length(M),O=e.mercatorZfromAltitude(Math.max(P*R-e.earthRadius,Number.EPSILON),0),D=Math.min(s.zoomFromMercatorZAdjusted(O),l.maxZoom);return D>.5*(e.GLOBE_ZOOM_THRESHOLD_MIN+e.GLOBE_ZOOM_THRESHOLD_MAX)?(s.setProjection({name:"mercator"}),s.zoom=D,this._cameraForBounds(s,r,n,o,i,a)):{center:s.center,zoom:D,bearing:o,pitch:i}}queryTerrainElevation(t,r){const n=this.transform.elevation;return n?(r=e.extend({},{exaggerated:!0},r),n.getAtPoint(e.MercatorCoordinate.fromLngLat(t),null,r.exaggerated)):null}_cameraForBounds(t,r,n,o,i,a){if("globe"===t.projection.name)return this._cameraForBoundsOnGlobe(t,r,n,o,i,a);const s=t.clone(),l=this._extendCameraOptions(a),c=s.padding;s.bearing=o,s.pitch=i;const u=e.LngLat.convert(r),d=e.LngLat.convert(n),f=new e.LngLat(u.lng,d.lat),p=new e.LngLat(d.lng,u.lat),h=s.project(u),m=s.project(d),g=this.queryTerrainElevation(u),y=this.queryTerrainElevation(d),v=this.queryTerrainElevation(f),b=this.queryTerrainElevation(p),_=[[h.x,h.y,Math.min(g||0,y||0,v||0,b||0)],[m.x,m.y,Math.max(g||0,y||0,v||0,b||0)]];let x=e.Aabb.fromPoints(_);const w=s.getWorldToCameraMatrix(),A=e.invert(new Float64Array(16),w);x=e.Aabb.applyTransform(x,w);const S=e.sub([],x.max,x.min),C=c.left||0,E=c.right||0,T=c.bottom||0,I=c.top||0,{left:k,right:M,top:R,bottom:P}=l.padding,O=.5*(C+E),D=.5*(I+T),L=Math.min(s.scaleZoom(s.scale*Math.min((s.width-(C+E+k+M))/S[0],(s.height-(T+I+P+R))/S[1])),l.maxZoom),N=s.scale/s.zoomScale(L);x=new e.Aabb([x.min[0]-(k+O)*N,x.min[1]-(P+D)*N,x.min[2]],[x.max[0]+(M+O)*N,x.max[1]+(R+D)*N,x.max[2]]);const F=.5*S[2],z=this._minimumAABBFrustumDistance(s,x),B=[0,0,1,0];e.transformMat4$1(B,B,w),e.normalize$2(B,B);const j=e.scale$2([],B,z+F),$=e.add([],x.center,j),U=("number"==typeof l.offset.x&&"number"==typeof l.offset.y?new e.Point(l.offset.x,l.offset.y):e.Point.convert(l.offset)).rotate(-e.degToRad(o));x.center[0]-=U.x*N,x.center[1]+=U.y*N,e.transformMat4(x.center,x.center,A),e.transformMat4($,$,A);const V=[x.center[0],x.center[1],$[2]*s.pixelsPerMeter];e.scale$2(V,V,1/s.worldSize);const H=e.lngFromMercatorX(V[0]),G=e.latFromMercatorY(V[1]),W=Math.min(s._zoomFromMercatorZ(V[2]),l.maxZoom),q=new e.LngLat(H,G);return s.mercatorFromTransition&&W<.5*(e.GLOBE_ZOOM_THRESHOLD_MIN+e.GLOBE_ZOOM_THRESHOLD_MAX)?(s.setProjection({name:"globe"}),s.zoom=W,this._cameraForBounds(s,r,n,o,i,a)):{center:q,zoom:W,bearing:o,pitch:i}}fitBounds(e,t,r){const n=this.cameraForBounds(e,t);return this._fitInternal(n,t,r)}fitScreenCoordinates(t,r,n,o,i){const a=e.Point.convert(t),s=e.Point.convert(r),l=new e.Point(Math.min(a.x,s.x),Math.min(a.y,s.y)),c=new e.Point(Math.max(a.x,s.x),Math.max(a.y,s.y));if("mercator"===this.transform.projection.name&&this.transform.anyCornerOffEdge(a,s))return this;const u=this.transform.pointLocation3D(l),d=this.transform.pointLocation3D(c),f=this.transform.pointLocation3D(new e.Point(l.x,c.y)),p=this.transform.pointLocation3D(new e.Point(c.x,l.y)),h=[Math.min(u.lng,d.lng,f.lng,p.lng),Math.min(u.lat,d.lat,f.lat,p.lat)],m=[Math.max(u.lng,d.lng,f.lng,p.lng),Math.max(u.lat,d.lat,f.lat,p.lat)],g=o&&o.pitch?o.pitch:this.getPitch(),y=this._cameraForBounds(this.transform,h,m,n,g,o);return this._fitInternal(y,o,i)}_fitInternal(t,r,n){return t?(delete(r=e.extend(t,r)).padding,r.linear?this.easeTo(r,n):this.flyTo(r,n)):this}jumpTo(t,r){this.stop();const n=t.preloadOnly?this.transform.clone():this.transform;let o=!1,i=!1,a=!1;return"zoom"in t&&n.zoom!==+t.zoom&&(o=!0,n.zoom=+t.zoom),void 0!==t.center&&(n.center=e.LngLat.convert(t.center)),"bearing"in t&&n.bearing!==+t.bearing&&(i=!0,n.bearing=+t.bearing),"pitch"in t&&n.pitch!==+t.pitch&&(a=!0,n.pitch=+t.pitch),null==t.padding||n.isPaddingEqual(t.padding)||(n.padding=t.padding),t.preloadOnly?(this._preloadTiles(n),this):(this.fire(new e.Event("movestart",r)).fire(new e.Event("move",r)),o&&this.fire(new e.Event("zoomstart",r)).fire(new e.Event("zoom",r)).fire(new e.Event("zoomend",r)),i&&this.fire(new e.Event("rotatestart",r)).fire(new e.Event("rotate",r)).fire(new e.Event("rotateend",r)),a&&this.fire(new e.Event("pitchstart",r)).fire(new e.Event("pitch",r)).fire(new e.Event("pitchend",r)),this.fire(new e.Event("moveend",r)))}getFreeCameraOptions(){return this.transform.projection.supportsFreeCamera||e.warnOnce(Xo),this.transform.getFreeCameraOptions()}setFreeCameraOptions(t,r){const n=this.transform;if(!n.projection.supportsFreeCamera)return e.warnOnce(Xo),this;this.stop();const o=n.zoom,i=n.pitch,a=n.bearing;n.setFreeCameraOptions(t);const s=o!==n.zoom,l=i!==n.pitch,c=a!==n.bearing;return this.fire(new e.Event("movestart",r)).fire(new e.Event("move",r)),s&&this.fire(new e.Event("zoomstart",r)).fire(new e.Event("zoom",r)).fire(new e.Event("zoomend",r)),c&&this.fire(new e.Event("rotatestart",r)).fire(new e.Event("rotate",r)).fire(new e.Event("rotateend",r)),l&&this.fire(new e.Event("pitchstart",r)).fire(new e.Event("pitch",r)).fire(new e.Event("pitchend",r)),this.fire(new e.Event("moveend",r)),this}easeTo(t,r){this._stop(!1,t.easeId),(!1===(t=e.extend({offset:[0,0],duration:500,easing:e.ease},t)).animate||this._prefersReducedMotion(t))&&(t.duration=0);const n=this.transform,o=this.getZoom(),i=this.getBearing(),a=this.getPitch(),s=this.getPadding(),l="zoom"in t?+t.zoom:o,c="bearing"in t?this._normalizeBearing(t.bearing,i):i,u="pitch"in t?+t.pitch:a,d="padding"in t?t.padding:n.padding,f=e.Point.convert(t.offset);let p,h,m;if("globe"===n.projection.name){const r=e.MercatorCoordinate.fromLngLat(n.center),o=f.rotate(-n.angle);r.x+=o.x/n.worldSize,r.y+=o.y/n.worldSize;const i=r.toLngLat(),a=e.LngLat.convert(t.center||i);this._normalizeCenter(a),p=n.centerPoint.add(o),h=new e.Point(r.x,r.y).mult(n.worldSize),m=new e.Point(e.mercatorXfromLng(a.lng),e.mercatorYfromLat(a.lat)).mult(n.worldSize).sub(h)}else{p=n.centerPoint.add(f);const r=n.pointLocation(p),o=e.LngLat.convert(t.center||r);this._normalizeCenter(o),h=n.project(r),m=n.project(o).sub(h)}const g=n.zoomScale(l-o);let y,v;t.around&&(y=e.LngLat.convert(t.around),v=n.locationPoint(y));const b=this._zooming||l!==o,_=this._rotating||i!==c,x=this._pitching||u!==a,w=!n.isPaddingEqual(d),A=n=>A=>{if(b&&(n.zoom=e.number(o,l,A)),_&&(n.bearing=e.number(i,c,A)),x&&(n.pitch=e.number(a,u,A)),w&&(n.interpolatePadding(s,d,A),p=n.centerPoint.add(f)),y)n.setLocationAtPoint(y,v);else{const e=n.zoomScale(n.zoom-o),t=l>o?Math.min(2,g):Math.max(.5,g),r=Math.pow(t,1-A),i=n.unproject(h.add(m.mult(A*r)).mult(e));n.setLocationAtPoint(n.renderWorldCopies?i.wrap():i,p)}return t.preloadOnly||this._fireMoveEvents(r),n};if(t.preloadOnly){const e=this._emulate(A,t.duration,n);return this._preloadTiles(e),this}const S={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=b,this._rotating=_,this._pitching=x,this._padding=w,this._easeId=t.easeId,this._prepareEase(r,t.noMoveStart,S),this._ease(A(n),e=>{n.recenterOnTerrain(),this._afterEase(r,e)},t),this}_prepareEase(t,r,n={}){this._moving=!0,this.transform.cameraElevationReference="sea",r||n.moving||this.fire(new e.Event("movestart",t)),this._zooming&&!n.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!n.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!n.pitching&&this.fire(new e.Event("pitchstart",t))}_fireMoveEvents(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))}_afterEase(t,r){if(this._easeId&&r&&this._easeId===r)return;this._easeId=void 0,this.transform.cameraElevationReference="ground";const n=this._zooming,o=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new e.Event("zoomend",t)),o&&this.fire(new e.Event("rotateend",t)),i&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}flyTo(t,r){if(this._prefersReducedMotion(t)){const n=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(n,r)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);const n=this.transform,o=this.getZoom(),i=this.getBearing(),a=this.getPitch(),s=this.getPadding(),l="zoom"in t?e.clamp(+t.zoom,n.minZoom,n.maxZoom):o,c="bearing"in t?this._normalizeBearing(t.bearing,i):i,u="pitch"in t?+t.pitch:a,d="padding"in t?t.padding:n.padding,f=n.zoomScale(l-o),p=e.Point.convert(t.offset);let h=n.centerPoint.add(p);const m=n.pointLocation(h),g=e.LngLat.convert(t.center||m);this._normalizeCenter(g);const y=n.project(m),v=n.project(g).sub(y);let b=t.curve;const _=Math.max(n.width,n.height),x=_/f,w=v.mag();if("minZoom"in t){const r=e.clamp(Math.min(t.minZoom,o,l),n.minZoom,n.maxZoom),i=_/n.zoomScale(r-o);b=Math.sqrt(i/w*2)}const A=b*b;function S(e){const t=(x*x-_*_+(e?-1:1)*A*A*w*w)/(2*(e?x:_)*A*w);return Math.log(Math.sqrt(t*t+1)-t)}function C(e){return(Math.exp(e)-Math.exp(-e))/2}function E(e){return(Math.exp(e)+Math.exp(-e))/2}const T=S(0);let I=function(e){return E(T)/E(T+b*e)},k=function(e){return _*((E(T)*(C(t=T+b*e)/E(t))-C(T))/A)/w;var t},M=(S(1)-T)/b;if(Math.abs(w)<1e-6||!isFinite(M)){if(Math.abs(_-x)<1e-6)return this.easeTo(t,r);const e=x<_?-1:1;M=Math.abs(Math.log(x/_))/b,k=function(){return 0},I=function(t){return Math.exp(e*b*t)}}t.duration="duration"in t?+t.duration:1e3*M/("screenSpeed"in t?+t.screenSpeed/b:+t.speed),t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0);const R=i!==c,P=u!==a,O=!n.isPaddingEqual(d),D=n=>f=>{const m=f*M,b=1/I(m);n.zoom=1===f?l:o+n.scaleZoom(b),R&&(n.bearing=e.number(i,c,f)),P&&(n.pitch=e.number(a,u,f)),O&&(n.interpolatePadding(s,d,f),h=n.centerPoint.add(p));const _=1===f?g:n.unproject(y.add(v.mult(k(m))).mult(b));return n.setLocationAtPoint(n.renderWorldCopies?_.wrap():_,h),n._updateCameraOnTerrain(),t.preloadOnly||this._fireMoveEvents(r),n};if(t.preloadOnly){const e=this._emulate(D,t.duration,n);return this._preloadTiles(e),this}return this._zooming=!0,this._rotating=R,this._pitching=P,this._padding=O,this._prepareEase(r,!1),this._ease(D(n),()=>this._afterEase(r),t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),this._easeFrameId=void 0,this._onEaseFrame=void 0),this._onEaseEnd){const e=this._onEaseEnd;this._onEaseEnd=void 0,e.call(this,t)}if(!e){const e=this.handlers;e&&e.stop(!1)}return this}_ease(t,r,n){!1===n.animate||0===n.duration?(t(1),r()):(this._easeStart=e.exported.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const t=Math.min((e.exported.now()-this._easeStart)/this._easeOptions.duration,1),r=this._onEaseFrame;r&&r(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(t,r){t=e.wrap(t,-180,180);const n=Math.abs(t-r);return Math.abs(t-360-r)180?-360:r<-180?360:0}_prefersReducedMotion(t){return this._respectPrefersReducedMotion&&e.exported.prefersReducedMotion&&!(t&&t.essential)}_emulate(e,t,r){const n=Math.ceil(15*t/1e3),o=[],i=e(r.clone());for(let e=0;e<=n;e++){const t=i(e/n);o.push(t.clone())}return o}}class Jo{constructor(t={}){this.options=t,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(e){const t=this.options&&this.options.compact;return this._map=e,this._container=i("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=i("button","mapboxgl-ctrl-attrib-button",this._container),i("span","mapboxgl-ctrl-icon",this._compactButton).setAttribute("aria-hidden","true"),this._compactButton.type="button",this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0}_setElementTitle(e,t){const r=this._map._getUIString(`AttributionControl.${t}`);e.setAttribute("aria-label",r),e.removeAttribute("title"),e.firstElementChild&&e.firstElementChild.setAttribute("title",r)}_toggleAttribution(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","true"))}_updateEditLink(){let t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));const r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){const n=r.reduce((e,t,n)=>(t.value&&(e+=`${t.key}=${t.value}${ne.length-t.length),e=e.filter((t,r)=>{for(let n=r+1;n=0)return!1;return!0}),this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=[...this.options.customAttribution,...e]:e.unshift(this.options.customAttribution));const r=e.join(" | ");r!==this._attribHTML&&(this._attribHTML=r,e.length?(this._innerContainer.innerHTML=r,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")}}class Qo{constructor(){e.bindAll(["_updateLogo","_updateCompact"],this)}onAdd(e){this._map=e,this._container=i("div","mapboxgl-ctrl");const t=i("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)}getDefaultPosition(){return"bottom-left"}_updateLogo(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")}_logoRequired(){if(!this._map.style)return!0;const e=this._map.style._sourceCaches;if(0===Object.entries(e).length)return!0;for(const t in e){const r=e[t].getSource();if(r.hasOwnProperty("mapbox_logo")&&!r.mapbox_logo)return!1}return!0}_updateCompact(){const e=this._container.children;if(e.length){const t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}}}class ei{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){const t=this._currentlyRunning,r=t?this._queue.concat(t):this._queue;for(const t of r)if(t.id===e)return void(t.cancelled=!0)}run(e=0){const t=this._currentlyRunning=this._queue;this._queue=[];for(const r of t)if(!r.cancelled&&(r.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}function ti(t,r,n){if(t=new e.LngLat(t.lng,t.lat),r){const o=new e.LngLat(t.lng-360,t.lat),i=new e.LngLat(t.lng+360,t.lat),a=360*Math.ceil(Math.abs(t.lng-n.center.lng)/360),s=n.locationPoint(t).distSqr(r),l=r.x<0||r.y<0||r.x>n.width||r.y>n.height;n.locationPoint(o).distSqr(r)180;){const e=n.locationPoint(t);if(e.x>=0&&e.y>=0&&e.x<=n.width&&e.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}const ri={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};class ni extends e.Evented{constructor(t,r){if(super(),(t instanceof e.window.HTMLElement||r)&&(t=e.extend({element:t},r)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this),this._anchor=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&t.pitchAlignment||"auto",this._updateMoving=()=>this._update(!0),this._occludedOpacity=t&&t.occludedOpacity||.2,t&&t.element)this._element=t.element,this._offset=e.Point.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=i("div");const r=41,n=27,o=a("svg",{display:"block",height:r*this._scale+"px",width:n*this._scale+"px",viewBox:`0 0 ${n} ${r}`},this._element),s=a("radialGradient",{id:"shadowGradient"},a("defs",{},o));a("stop",{offset:"10%","stop-opacity":.4},s),a("stop",{offset:"100%","stop-opacity":.05},s),a("ellipse",{cx:13.5,cy:34.8,rx:10.5,ry:5.25,fill:"url(#shadowGradient)"},o),a("path",{fill:this._color,d:"M27,13.5C27,19.07 20.25,27 14.75,34.5C14.02,35.5 12.98,35.5 12.25,34.5C6.75,27 0,19.22 0,13.5C0,6.04 6.04,0 13.5,0C20.96,0 27,6.04 27,13.5Z"},o),a("path",{opacity:.25,d:"M13.5,0C6.04,0 0,6.04 0,13.5C0,19.22 6.75,27 12.25,34.5C13,35.52 14.02,35.5 14.75,34.5C20.25,27 27,19.07 27,13.5C27,6.04 20.96,0 13.5,0ZM13.5,1C20.42,1 26,6.58 26,13.5C26,15.9 24.5,19.18 22.22,22.74C19.95,26.3 16.71,30.14 13.94,33.91C13.74,34.18 13.61,34.32 13.5,34.44C13.39,34.32 13.26,34.18 13.06,33.91C10.28,30.13 7.41,26.31 5.02,22.77C2.62,19.23 1,15.95 1,13.5C1,6.58 6.58,1 13.5,1Z"},o),a("circle",{fill:"white",cx:13.5,cy:13.5,r:5.5},o),this._offset=e.Point.convert(t&&t.offset||[0,-14])}this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label","Map marker"),this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",e=>{e.preventDefault()}),this._element.addEventListener("mousedown",e=>{e.preventDefault()});const n=this._element.classList;for(const e in ri)n.remove(`mapboxgl-marker-anchor-${e}`);n.add(`mapboxgl-marker-anchor-${this._anchor}`),this._popup=null}addTo(e){return e===this._map||(this.remove(),this._map=e,e.getCanvasContainer().appendChild(this._element),e.on("move",this._updateMoving),e.on("moveend",this._update),e.on("remove",this._clearFadeTimer),e._addMarker(this),this.setDraggable(this._draggable),this._update(),e.on("click",this._onMapClick)),this}remove(){const e=this._map;return e&&(e.off("click",this._onMapClick),e.off("move",this._updateMoving),e.off("moveend",this._update),e.off("mousedown",this._addDragHandler),e.off("touchstart",this._addDragHandler),e.off("mouseup",this._onUp),e.off("touchend",this._onUp),e.off("mousemove",this._onMove),e.off("touchmove",this._onMove),e.off("remove",this._clearFadeTimer),e._removeMarker(this),this._map=void 0),this._clearFadeTimer(),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(!0),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeAttribute("role"),this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const t=38.1,r=13.5,n=Math.sqrt(Math.pow(r,2)/2);e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-t],"bottom-left":[n,-1*(t-r+n)],"bottom-right":[-n,-1*(t-r+n)],left:[r,-1*(t-r)],right:[-r,-1*(t-r)]}:this._offset}this._popup=e,e._marker=this,this._lngLat&&this._popup.setLngLat(this._lngLat),this._element.setAttribute("role","button"),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress),this._element.setAttribute("aria-expanded","false")}return this}_onKeyPress(e){const t=e.code,r=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==r&&13!==r||this.togglePopup()}_onMapClick(e){const t=e.originalEvent.target,r=this._element;this._popup&&(t===r||r.contains(t))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const e=this._popup;return e?(e.isOpen()?(e.remove(),this._element.setAttribute("aria-expanded","false")):this._map&&(e.addTo(this._map),this._element.setAttribute("aria-expanded","true")),this):this}_behindTerrain(){const e=this._map,t=this._pos;if(!e||!t)return!1;const r=e.unproject(t),n=e.getFreeCameraOptions();if(!n.position)return!1;const o=n.position.toLngLat();return o.distanceTo(r)<.9*o.distanceTo(this._lngLat)}_evaluateOpacity(){const t=this._map;if(!t)return;const r=this._pos;if(!r||r.x<0||r.x>t.transform.width||r.y<0||r.y>t.transform.height)return void this._clearFadeTimer();const n=t.unproject(r);let o;t._showingGlobe()&&e.isLngLatBehindGlobe(t.transform,this._lngLat)?o=0:(o=1-t._queryFogOpacity(n),t.transform._terrainEnabled()&&t.getTerrain()&&this._behindTerrain()&&(o*=this._occludedOpacity)),this._element.style.opacity=`${o}`,this._element.style.pointerEvents=o>0?"auto":"none",this._popup&&this._popup._setOpacity(o),this._fadeTimer=null}_clearFadeTimer(){this._fadeTimer&&(clearTimeout(this._fadeTimer),this._fadeTimer=null)}_updateDOM(){const e=this._pos;if(!e||!this._map)return;const t=this._offset.mult(this._scale);this._element.style.transform=`\n translate(${e.x}px,${e.y}px)\n ${ri[this._anchor]}\n ${this._calculateXYTransform()} ${this._calculateZTransform()}\n translate(${t.x}px,${t.y}px)\n `}_calculateXYTransform(){const t=this._pos,r=this._map,n=this.getPitchAlignment();if(!r||!t||"map"!==n)return"";if(!r._showingGlobe()){const e=r.getPitch();return e?`rotateX(${e}deg)`:""}const o=e.radToDeg(e.globeTiltAtLngLat(r.transform,this._lngLat)),i=t.sub(e.globeCenterToScreenPoint(r.transform)),a=Math.abs(i.x)+Math.abs(i.y);if(0===a)return"";const s=o/a;return`rotateX(${-i.y*s}deg) rotateY(${i.x*s}deg)`}_calculateZTransform(){const t=this._pos,r=this._map;if(!r||!t)return"";let n=0;const o=this.getRotationAlignment();if("map"===o)if(r._showingGlobe()){const t=r.project(new e.LngLat(this._lngLat.lng,this._lngLat.lat+.001)),o=r.project(new e.LngLat(this._lngLat.lng,this._lngLat.lat-.001)).sub(t);n=e.radToDeg(Math.atan2(o.y,o.x))-90}else n=-r.getBearing();else if("horizon"===o){const o=e.smoothstep(4,6,r.getZoom()),i=e.globeCenterToScreenPoint(r.transform);i.y+=o*r.transform.height;const a=t.sub(i),s=e.radToDeg(Math.atan2(a.y,a.x));n=(s>90?s-270:s+90)*(1-o)}return n+=this._rotation,n?`rotateZ(${n}deg)`:""}_update(t){e.window.cancelAnimationFrame(this._updateFrameId);const r=this._map;r&&(r.transform.renderWorldCopies&&(this._lngLat=ti(this._lngLat,this._pos,r.transform)),this._pos=r.project(this._lngLat),!0===t?this._updateFrameId=e.window.requestAnimationFrame(()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())}):this._pos=this._pos.round(),r._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(r._showingGlobe()||r.getTerrain()||r.getFog())&&!this._fadeTimer&&(this._fadeTimer=setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(t){return this._offset=e.Point.convert(t),this._update(),this}_onMove(t){const r=this._map;if(!r)return;const n=this._pointerdownPos,o=this._positionDelta;if(n&&o){if(!this._isDragging){const e=this._clickTolerance||r._clickTolerance;if(t.point.dist(n)=this._endTime)return this._end;const r=e.easeCubicInOut((t-this._startTime)/(this._endTime-this._startTime));return this._start*(1-r)+this._end*r}isEasing(e){return e>=this._startTime&&e<=this._endTime}jumpTo(e){this._startTime=-1/0,this._endTime=-1/0,this._start=e,this._end=e}easeTo(e,t,r){this._start=this.getValue(t),this._end=e,this._startTime=t,this._endTime=t+r}}const li={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","Map.Title":"Map","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScrollZoomBlocker.CtrlMessage":"Use ctrl + scroll to zoom the map","ScrollZoomBlocker.CmdMessage":"Use ⌘ + scroll to zoom the map","TouchPanBlocker.Message":"Use two fingers to move the map"},ci={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:85,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,performanceMetricsCollection:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,optimizeForTerrain:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,minTileCacheSize:null,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",localFontFamily:null,transformRequest:null,accessToken:null,fadeDuration:300,respectPrefersReducedMotion:!0,crossSourceCollisions:!0},ui={showCompass:!0,showZoom:!0,visualizePitch:!1};class di{constructor(t,r,n=!1){this._clickTolerance=10,this.element=r,this.mouseRotate=new Ao({clickTolerance:t.dragRotate._mouseRotate._clickTolerance}),this.map=t,n&&(this.mousePitch=new So({clickTolerance:t.dragRotate._mousePitch._clickTolerance})),e.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),r.addEventListener("mousedown",this.mousedown),r.addEventListener("touchstart",this.touchstart,{passive:!1}),r.addEventListener("touchmove",this.touchmove),r.addEventListener("touchend",this.touchend),r.addEventListener("touchcancel",this.reset)}down(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),u()}move(e,t){const r=this.map,n=this.mouseRotate.mousemoveWindow(e,t),o=n&&n.bearingDelta;if(o&&r.setBearing(r.getBearing()+o),this.mousePitch){const n=this.mousePitch.mousemoveWindow(e,t),o=n&&n.pitchDelta;o&&r.setPitch(r.getPitch()+o)}}off(){const e=this.element;e.removeEventListener("mousedown",this.mousedown),e.removeEventListener("touchstart",this.touchstart,{passive:!1}),e.removeEventListener("touchmove",this.touchmove),e.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){d(),e.window.removeEventListener("mousemove",this.mousemove),e.window.removeEventListener("mouseup",this.mouseup)}mousedown(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:()=>t.preventDefault()}),h(this.element,t)),e.window.addEventListener("mousemove",this.mousemove),e.window.addEventListener("mouseup",this.mouseup)}mousemove(e){this.move(e,h(this.element,e))}mouseup(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()}touchstart(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=m(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>e.preventDefault()},this._startPos))}touchmove(e){1!==e.targetTouches.length?this.reset():(this._lastPos=m(this.element,e.targetTouches)[0],this.move({preventDefault:()=>e.preventDefault()},this._lastPos))}touchend(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&t.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(t.antialias&&e.isSafariWithAntialiasingBug(e.window)&&(t.antialias=!1,e.warnOnce("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Kn(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies),t),this._interactive=t.interactive,this._minTileCacheSize=t.minTileCacheSize,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._useWebGL2=t.useWebGL2,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=t.crossSourceCollisions,this._collectResourceTiming=t.collectResourceTiming,this._optimizeForTerrain=t.optimizeForTerrain,this._language=this._parseLanguage(t.language),this._worldview=t.worldview,this._renderTaskQueue=new ei,this._domRenderTaskQueue=new ei,this._controls=[],this._markers=[],this._popups=[],this._mapId=e.uniqueId(),this._locale=e.extend({},li,t.locale),this._clickTolerance=t.clickTolerance,this._cooperativeGestures=t.cooperativeGestures,this._performanceMetricsCollection=t.performanceMetricsCollection,this._containerWidth=0,this._containerHeight=0,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new si(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken,t.testMode),this._silenceAuthErrors=!!t.testMode,"string"==typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error(`Container '${t.container}' not found.`)}else{if(!(t.container instanceof e.window.HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(this._container.childNodes.length>0&&e.warnOnce("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),void 0!==e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1),e.window.addEventListener("webkitfullscreenchange",this._onWindowResize,!1),e.window.addEventListener("visibilitychange",this._onVisibilityChange,!1)),this.handlers=new Yo(this,t),this._localFontFamily=t.localFontFamily,this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),t.projection&&this.setProjection(t.projection),this._hash=t.hash&&new Qn("string"==typeof t.hash&&t.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),t.attributionControl&&this.addControl(new Jo({customAttribution:t.customAttribution})),this._logoControl=new Qo,this.addControl(this._logoControl,t.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",t=>{this._update("style"===t.dataType),this.fire(new e.Event(`${t.dataType}data`,t))}),this.on("dataloading",t=>{this.fire(new e.Event(`${t.dataType}dataloading`,t))})}_getMapId(){return this._mapId}addControl(t,r){if(void 0===r&&(r=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const n=t.onAdd(this);this._controls.push(t);const o=this._controlPositions[r];return-1!==r.indexOf("bottom")?o.insertBefore(n,o.firstChild):o.appendChild(n),this}removeControl(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const r=this._controls.indexOf(t);return r>-1&&this._controls.splice(r,1),t.onRemove(this),this}hasControl(e){return this._controls.indexOf(e)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(t){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const r=!this._moving;return r&&this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t)),this.fire(new e.Event("resize",t)),r&&this.fire(new e.Event("moveend",t)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()}setMinZoom(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t?this.setZoom(t):this.fire(new e.Event("zoomstart")).fire(new e.Event("zoom")).fire(new e.Event("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t?this.setPitch(t):this.fire(new e.Event("pitchstart")).fire(new e.Event("pitch")).fire(new e.Event("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.renderWorldCopies=e,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(t){return"auto"===t?e.window.navigator.language:Array.isArray(t)?0===t.length?void 0:t.map(t=>"auto"===t?e.window.navigator.language:t):t}setLanguage(e){const t=this._parseLanguage(e);if(!this.style||t===this._language)return this;this._language=t,this.style._reloadSources();for(const e of this._controls)e._setLanguage&&e._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(e){return this.style&&e!==this._worldview?(this._worldview=e,this.style._reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return"globe"===this.transform.projection.name}setProjection(e){return this._lazyInitEmptyStyle(),e?"string"==typeof e&&(e={name:e}):e=null,this._useExplicitProjection=!!e,this._prioritizeAndUpdateProjection(e,this.style.stylesheet?this.style.stylesheet.projection:null)}_updateProjectionTransition(){if("globe"!==this.getProjection().name)return;const t=this.transform,r=t.projection.name;let n;"globe"===r&&t.zoom>=e.GLOBE_ZOOM_THRESHOLD_MAX?(t.setMercatorFromTransition(),n=!0):"mercator"===r&&t.zoom=e.GLOBE_ZOOM_THRESHOLD_MAX?this.transform.setMercatorFromTransition():this.transform.setProjection(t),this.style.applyProjectionUpdate(),r){this.painter.clearBackgroundTiles();for(const e in this.style._sourceCaches)this.style._sourceCaches[e].clearTiles();this._update(!0),this._forceMarkerAndPopupUpdate(!0)}return this}project(t){return this.transform.locationPoint3D(e.LngLat.convert(t))}unproject(t){return this.transform.pointLocation3D(e.Point.convert(t))}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(e,t,r){if("mouseenter"===e||"mouseover"===e){let n=!1;const o=o=>{const i=t.filter(e=>this.getLayer(e)),a=i.length?this.queryRenderedFeatures(o.point,{layers:i}):[];a.length?n||(n=!0,r.call(this,new co(e,this,o.originalEvent,{features:a}))):n=!1},i=()=>{n=!1};return{layers:new Set(t),listener:r,delegates:{mousemove:o,mouseout:i}}}if("mouseleave"===e||"mouseout"===e){let n=!1;const o=o=>{const i=t.filter(e=>this.getLayer(e));(i.length?this.queryRenderedFeatures(o.point,{layers:i}):[]).length?n=!0:n&&(n=!1,r.call(this,new co(e,this,o.originalEvent)))},i=t=>{n&&(n=!1,r.call(this,new co(e,this,t.originalEvent)))};return{layers:new Set(t),listener:r,delegates:{mousemove:o,mouseout:i}}}{const n=e=>{const n=t.filter(e=>this.getLayer(e)),o=n.length?this.queryRenderedFeatures(e.point,{layers:n}):[];o.length&&(e.features=o,r.call(this,e),delete e.features)};return{layers:new Set(t),listener:r,delegates:{[e]:n}}}}on(e,t,r){if(void 0===r)return super.on(e,t);Array.isArray(t)||(t=[t]);const n=this._createDelegatedListener(e,t,r);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(n);for(const e in n.delegates)this.on(e,n.delegates[e]);return this}once(e,t,r){if(void 0===r)return super.once(e,t);Array.isArray(t)||(t=[t]);const n=this._createDelegatedListener(e,t,r);for(const e in n.delegates)this.once(e,n.delegates[e]);return this}off(e,t,r){if(void 0===r)return super.off(e,t);t=new Set(Array.isArray(t)?t:[t]);const n=(e,t)=>{if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0},o=this._delegatedListeners?this._delegatedListeners[e]:void 0;return o&&(e=>{for(let o=0;o{t?this.fire(new e.ErrorEvent(t)):n&&this._updateDiff(n,r)})}else"object"==typeof t&&this._updateDiff(t,r)}_updateDiff(t,r){try{this.style.setState(t)&&this._update(!0)}catch(n){e.warnOnce(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`),this._updateStyle(t,r)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(e.warnOnce("There is no style added to the map."),!1)}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){return!!this.style&&this.style._isSourceCacheLoaded(e)}areTilesLoaded(){const e=this.style&&this.style._sourceCaches;for(const t in e){const r=e[t]._tiles;for(const e in r){const t=r[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}}return!0}addSourceType(e,t,r){this._lazyInitEmptyStyle(),this.style.addSourceType(e,t,r)}removeSource(e){return this.style.removeSource(e),this._updateTerrain(),this._update(!0)}getSource(e){return this.style.getSource(e)}addImage(t,r,{pixelRatio:n=1,sdf:o=!1,stretchX:i,stretchY:a,content:s}={}){if(this._lazyInitEmptyStyle(),r instanceof e.window.HTMLImageElement||e.window.ImageBitmap&&r instanceof e.window.ImageBitmap){const{width:l,height:c,data:u}=e.exported.getImageData(r);this.style.addImage(t,{data:new e.RGBAImage({width:l,height:c},u),pixelRatio:n,stretchX:i,stretchY:a,content:s,sdf:o,version:0})}else if(void 0===r.width||void 0===r.height)this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:l,height:c}=r,u=r;this.style.addImage(t,{data:new e.RGBAImage({width:l,height:c},new Uint8Array(u.data)),pixelRatio:n,stretchX:i,stretchY:a,content:s,sdf:o,version:0,userImage:u}),u.onAdd&&u.onAdd(this,t)}}updateImage(t,r){const n=this.style.getImage(t);if(!n)return void this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const o=r instanceof e.window.HTMLImageElement||e.window.ImageBitmap&&r instanceof e.window.ImageBitmap?e.exported.getImageData(r):r,{width:i,height:a}=o;void 0!==i&&void 0!==a?i===n.data.width&&a===n.data.height?(n.data.replace(o.data,!(r instanceof e.window.HTMLImageElement||e.window.ImageBitmap&&r instanceof e.window.ImageBitmap)),this.style.updateImage(t,n)):this.fire(new e.ErrorEvent(new Error(`The width and height of the updated image (${i}, ${a})\n must be that same as the previous version of the image\n (${n.data.width}, ${n.data.height})`))):this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")))}hasImage(t){return t?!!this.style.getImage(t):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(t,r){e.getImage(this._requestManager.transformRequest(t,e.ResourceType.Image),(t,n)=>{r(t,n instanceof e.window.HTMLImageElement?e.exported.getImageData(n):n)})}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){return this.style.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,n={}){return this.style.setPaintProperty(e,t,r,n),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,n={}){return this.style.setLayoutProperty(e,t,r,n),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setTerrain(e){return this._lazyInitEmptyStyle(),!e&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(e),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(e){return this._lazyInitEmptyStyle(),this.style.setFog(e),this._update(!0)}getFog(){return this.style?this.style.getFog():null}_queryFogOpacity(t){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(e.LngLat.convert(t),this.transform):0}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}_updateContainerDimensions(){if(!this._container)return;const t=this._container.getBoundingClientRect().width||400,r=this._container.getBoundingClientRect().height||300;let n,o,i,a=this._container;for(;a&&(!o||!i);){const t=e.window.getComputedStyle(a).transform;t&&"none"!==t&&(n=t.match(/matrix.*\((.+)\)/)[1].split(", "),n[0]&&"0"!==n[0]&&"1"!==n[0]&&(o=n[0]),n[3]&&"0"!==n[3]&&"1"!==n[3]&&(i=n[3])),a=a.parentElement}this._containerWidth=o?Math.abs(t/o):t,this._containerHeight=i?Math.abs(r/i):r}_detectMissingCSS(){"rgb(250, 128, 114)"!==e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&e.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const e=this._container;e.classList.add("mapboxgl-map"),(this._missingCSSCanary=i("div","mapboxgl-canary",e)).style.visibility="hidden",this._detectMissingCSS();const t=this._canvasContainer=i("div","mapboxgl-canvas-container",e);this._interactive&&t.classList.add("mapboxgl-interactive"),this._canvas=i("canvas","mapboxgl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const r=this._controlContainer=i("div","mapboxgl-control-container",e),n=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(e=>{n[e]=i("div",`mapboxgl-ctrl-${e}`,r)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(t,r){const n=e.exported.devicePixelRatio||1;this._canvas.width=n*Math.ceil(t),this._canvas.height=n*Math.ceil(r),this._canvas.style.width=`${t}px`,this._canvas.style.height=`${r}px`}_addMarker(e){this._markers.push(e)}_removeMarker(e){const t=this._markers.indexOf(e);-1!==t&&this._markers.splice(t,1)}_addPopup(e){this._popups.push(e)}_removePopup(e){const t=this._popups.indexOf(e);-1!==t&&this._popups.splice(t,1)}_setupPainter(){const t=e.extend({},r.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),n=this._useWebGL2&&this._canvas.getContext("webgl2",t),o=n||this._canvas.getContext("webgl",t)||this._canvas.getContext("experimental-webgl",t);o?(this._useWebGL2&&!n&&e.warnOnce("Failed to create WebGL 2 context. Using WebGL 1."),e.storeAuthState(o,!0),this.painter=new zn(o,this.transform,!!n),this.on("data",e=>{"source"===e.dataType&&this.painter.setTileLoadedFlag(!0)}),e.exported$1.testSupport(o)):this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(t){t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:t}))}_contextRestored(t){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:t}))}_onMapScroll(e){if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style?(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_requestDomTask(e){!this.loaded()||this.loaded()&&!this.isMoving()?e():this._domRenderTaskQueue.add(e)}_render(t){let r;const n=this.painter.context.extTimerQuery,o=e.exported.now();if(this.listens("gpu-timing-frame")&&(r=n.createQueryEXT(),n.beginQueryEXT(n.TIME_ELAPSED_EXT,r)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],e.window.performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],e.window.performance.now())),this._renderTaskQueue.run(t),this._domRenderTaskQueue.run(t),this._removed)return;this._updateProjectionTransition();const i=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const t=this.transform.zoom,r=this.transform.pitch,n=e.exported.now(),o=new e.EvaluationParameters(t,{now:n,fadeDuration:i,pitch:r,transition:this.style.getTransition()});this.style.update(o)}this.style&&this.style.fog&&this.style.fog.hasTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let a=!1;if(this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),a=this._updateAverageElevation(o),this.style._updateSources(this.transform),this._forceMarkerAndPopupUpdate()):a=this._updateAverageElevation(o),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,i,this._crossSourceCollisions),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showTerrainWireframe:this.showTerrainWireframe,showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:i,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new e.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.Event("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),r){const t=e.exported.now()-o;n.endQueryEXT(n.TIME_ELAPSED_EXT,r),setTimeout(()=>{const i=n.getQueryObjectEXT(r,n.QUERY_RESULT_EXT)/1e6;n.deleteQueryEXT(r),this.fire(new e.Event("gpu-timing-frame",{cpuTime:t,gpuTime:i})),e.window.performance.mark("frame-gpu",{startTime:o,detail:{gpuTime:i}})},50)}if(this.listens("gpu-timing-layer")){const t=this.painter.collectGpuTimers();setTimeout(()=>{const r=this.painter.queryGpuTimers(t);this.fire(new e.Event("gpu-timing-layer",{layerTimes:r}))},50)}if(this.listens("gpu-timing-deferred-render")){const t=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const r=this.painter.queryGpuTimeDeferredRender(t);this.fire(new e.Event("gpu-timing-deferred-render",{gpuTime:r}))},50)}const s=this._sourcesDirty||this._styleDirty||this._placementDirty||a;if(s||this._repaint)this.triggerRepaint();else{const t=!this.isMoving()&&this.loaded();if(t&&(a=this._updateAverageElevation(o,!0)),a)this.triggerRepaint();else if(this._triggerFrame(!1),t&&(this.fire(new e.Event("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const t=this._calculateSpeedIndex();this.fire(new e.Event("speedindexcompleted",{speedIndex:t})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||s||(this._fullyLoaded=!0,e.LivePerformanceUtils.mark(e.PerformanceMarkers.fullLoad),this._performanceMetricsCollection&&e.postPerformanceEvent(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(e){for(const t of this._markers)e&&!this.getRenderWorldCopies()&&(t._lngLat=t._lngLat.wrap()),t._update();for(const t of this._popups)!e||this.getRenderWorldCopies()||t._trackPointer||(t._lngLat=t._lngLat.wrap()),t._update()}_updateAverageElevation(e,t=!1){const r=e=>(this.transform.averageElevation=e,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return 0!==this.transform.averageElevation&&r(0);if((t||e-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(e)){const t=this.transform.averageElevation;let n=this.transform.sampleAverageElevation(),o=!1;this.transform.elevation&&(o=this.transform.elevation.exaggeration()!==this._averageElevationExaggeration,this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(n)?n=0:this._averageElevationLastSampledAt=e;const i=Math.abs(t-n);if(i>1){if(this._isInitialLoad||o)return this._averageElevation.jumpTo(n),r(n);this._averageElevation.easeTo(n,e,300)}else if(i>1e-4)return this._averageElevation.jumpTo(n),r(n)}return!!this._averageElevation.isEasing(e)&&r(this._averageElevation.getValue(e))}_authenticate(){e.getMapSessionAPI(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,t=>{if(t&&(t.message===e.AUTH_ERR_MSG||401===t.status)){const t=this.painter.context.gl;e.storeAuthState(t,!1),this._logoControl instanceof Qo&&this._logoControl._updateLogo(),t&&t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT|t.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new e.ErrorEvent(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),e.postMapLoadEvent(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_updateTerrain(){const e=this._isDragging();this.painter.updateTerrain(this.style,e)}_calculateSpeedIndex(){const e=this.painter.canvasCopy(),t=this.painter.getCanvasCopiesAndTimestamps();t.timeStamps.push(performance.now());const r=this.painter.context.gl,n=r.createFramebuffer();function o(e){r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e,0);const t=new Uint8Array(r.drawingBufferWidth*r.drawingBufferHeight*4);return r.readPixels(0,0,r.drawingBufferWidth,r.drawingBufferHeight,r.RGBA,r.UNSIGNED_BYTE,t),t}return r.bindFramebuffer(r.FRAMEBUFFER,n),this._canvasPixelComparison(o(e),t.canvasCopies.map(o),t.timeStamps)}_canvasPixelComparison(e,t,r){let n=r[1]-r[0];const o=e.length/4;for(let i=0;i{const t=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,t&&this._render(e)}))}_preloadTiles(t){const r=this.style?Object.values(this.style._sourceCaches):[];return e.asyncAll(r,(e,r)=>e._preloadTiles(t,r),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(e){this._trackResize&&this.resize({originalEvent:e})._update()}_onVisibilityChange(){"hidden"===e.window.document.visibilityState&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(e){this._showTerrainWireframe!==e&&(this._showTerrainWireframe=e,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(e){this._speedIndexTiming!==e&&(this._speedIndexTiming=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(e){this._showTileAABBs!==e&&(this._showTileAABBs=e,e&&this._update())}_setCacheLimits(t,r){e.setCacheLimits(t,r)}get version(){return e.version}},NavigationControl:class{constructor(t){this.options=e.extend({},ui,t),this._container=i("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(e.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",e=>{this._map&&this._map.zoomIn({},{originalEvent:e})}),i("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",e=>{this._map&&this._map.zoomOut({},{originalEvent:e})}),i("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(e.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",e=>{const t=this._map;t&&(this.options.visualizePitch?t.resetNorthPitch({},{originalEvent:e}):t.resetNorth({},{originalEvent:e}))}),this._compassIcon=i("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const e=this._map;if(!e)return;const t=e.getZoom(),r=t===e.getMaxZoom(),n=t===e.getMinZoom();this._zoomInButton.disabled=r,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",r.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())}_rotateCompassArrow(){const e=this._map;if(!e)return;const t=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(e.transform.pitch*(Math.PI/180)),.5)}) rotateX(${e.transform.pitch}deg) rotateZ(${e.transform.angle*(180/Math.PI)}deg)`:`rotate(${e.transform.angle*(180/Math.PI)}deg)`;e._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=t)})}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),e.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&e.on("pitch",this._rotateCompassArrow),e.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new di(e,this._compass,this.options.visualizePitch)),this._container}onRemove(){const e=this._map;e&&(this._container.remove(),this.options.showZoom&&e.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&e.off("pitch",this._rotateCompassArrow),e.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(e,t){const r=i("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}_setButtonTitle(e,t){if(!this._map)return;const r=this._map._getUIString(`NavigationControl.${t}`);e.setAttribute("aria-label",r),e.firstElementChild&&e.firstElementChild.setAttribute("title",r)}},GeolocateControl:class extends e.Evented{constructor(t){super(),this.options=e.extend({geolocation:e.window.navigator.geolocation},fi,t),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=Jn(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(e){return this._map=e,this._container=i("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){void 0!==this._geolocationWatchID&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(t){const r=(e=!!this.options.geolocation)=>{this._supportsGeolocation=e,t(e)};void 0!==this._supportsGeolocation?t(this._supportsGeolocation):void 0!==e.window.navigator.permissions?e.window.navigator.permissions.query({name:"geolocation"}).then(e=>r("denied"!==e.state)).catch(()=>r()):r()}_isOutOfMapMaxBounds(e){const t=this._map.getMaxBounds(),r=e.coords;return!!t&&(r.longitudet.getEast()||r.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}}_updateCamera(t){const r=new e.LngLat(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,o=this._map.getBearing(),i=e.extend({bearing:o},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),i,{geolocateSource:!0})}_updateMarker(t){if(t){const r=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const t=this._map.transform,r=e.mercatorZfromAltitude(1,t._center.lat)*t.worldSize,n=Math.ceil(2*this._accuracy*r);this._circleElement.style.width=`${n}px`,this._circleElement.style.height=`${n}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&"number"==typeof this._heading?(this._userLocationDotMarker.setRotation(this._heading),this._dotElement.classList.add("mapboxgl-user-location-show-heading")):(this._dotElement.classList.remove("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",e),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&this._noTimeout)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(t){if(void 0!==this._map){if(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=i("button","mapboxgl-ctrl-geolocate",this._container),i("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",!1===t){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}else{const e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",e),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i("div","mapboxgl-user-location"),this._dotElement.appendChild(i("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(i("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new ni({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=i("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ni({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",t=>{t.geolocateSource||"ACTIVE_LOCK"!==this._watchState||t.originalEvent&&"resize"===t.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new e.Event("trackuserlocationend")))})}}_onDeviceOrientation(e){this._userLocationDotMarker&&(e.webkitCompassHeading?this._heading=e.webkitCompassHeading:!0===e.absolute&&(this._heading=-1*e.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(e={maximumAge:6e5,timeout:0},this._noTimeout=!0):(e=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,e),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const t=()=>{e.window.addEventListener("ondeviceorientationabsolute"in e.window?"deviceorientationabsolute":"deviceorientation",this._onDeviceOrientation)};void 0!==e.window.DeviceMotionEvent&&"function"==typeof e.window.DeviceMotionEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(e=>{"granted"===e&&t()}).catch(console.error):t()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),e.window.removeEventListener("deviceorientation",this._onDeviceOrientation),e.window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Jo,ScaleControl:class{constructor(t){this.options=e.extend({},pi,t),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch(e){return!1}}(),e.bindAll(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const e=this.options.maxWidth||100,t=this._map,r=t._containerHeight/2,n=t._containerWidth/2-e/2,o=t.unproject([n,r]),i=t.unproject([n+e,r]),a=o.distanceTo(i);if("imperial"===this.options.unit){const t=3.2808*a;t>5280?this._setScale(e,t/5280,"mile"):this._setScale(e,t,"foot")}else"nautical"===this.options.unit?this._setScale(e,a/1852,"nautical-mile"):a>=1e3?this._setScale(e,a/1e3,"kilometer"):this._setScale(e,a,"meter")}_setScale(e,t,r){this._map._requestDomTask(()=>{const n=function(e){const t=Math.pow(10,`${Math.floor(e)}`.length-1);let r=e/t;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:function(e){const t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(r),t*r}(t),o=n/t;this._container.innerHTML=this._isNumberFormatSupported&&"nautical-mile"!==r?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:r}).format(n):`${n} ${hi[r]}`,this._container.style.width=e*o+"px"})}onAdd(e){return this._map=e,this._language=e.getLanguage(),this._container=i("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(e){this._language=e,this._update()}setUnit(e){this.options.unit=e,this._update()}},FullscreenControl:class{constructor(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in e.window.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=i("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!e.window.document.fullscreenEnabled&&!e.window.document.webkitFullscreenEnabled)}_setupUI(){const t=this._fullscreenButton=i("button","mapboxgl-ctrl-fullscreen",this._controlContainer);i("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden","true"),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",e)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(e.window.document.fullscreenElement||e.window.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends e.Evented{constructor(t){super(),this.options=e.extend(Object.create(oi),t),e.bindAll(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(t&&t.className?t.className.trim().split(/\s+/):[])}addTo(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&t.on("preclick",this._onClose),this.options.closeOnMove&&t.on("move",this._onClose),t.on("remove",this.remove),this._update(),t._addPopup(this),this._focusFirstElement(),this._trackPointer?(t.on("mousemove",this._onMouseEvent),t.on("mouseup",this._onMouseEvent),t._canvasContainer.classList.add("mapboxgl-track-pointer")):t.on("move",this._update),this.fire(new e.Event("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const t=this._map;return t&&(t.off("move",this._update),t.off("move",this._onClose),t.off("preclick",this._onClose),t.off("click",this._onClose),t.off("remove",this.remove),t.off("mousemove",this._onMouseEvent),t.off("mouseup",this._onMouseEvent),t.off("drag",this._onMouseEvent),t._canvasContainer&&t._canvasContainer.classList.remove("mapboxgl-track-pointer"),t._removePopup(this),this._map=void 0),this.fire(new e.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(t){this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update();const r=this._map;return r&&(r.on("move",this._update),r.off("mousemove",this._onMouseEvent),r._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const e=this._map;return e&&(e.off("move",this._update),e.on("mousemove",this._onMouseEvent),e.on("drag",this._onMouseEvent),e._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(t){return this.setDOMContent(e.window.document.createTextNode(t))}setHTML(t){const r=e.window.document.createDocumentFragment(),n=e.window.document.createElement("body");let o;for(n.innerHTML=t;o=n.firstChild,o;)r.appendChild(o);return this.setDOMContent(r)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){let t=this._content;if(t)for(;t.hasChildNodes();)t.firstChild&&t.removeChild(t.firstChild);else t=this._content=i("div","mapboxgl-popup-content",this._container||void 0);if(t.appendChild(e),this.options.closeButton){const e=this._closeButton=i("button","mapboxgl-popup-close-button",t);e.type="button",e.setAttribute("aria-label","Close popup"),e.setAttribute("aria-hidden","true"),e.innerHTML="×",e.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(e){return this._classList.add(e),this._updateClassList(),this}removeClassName(e){return this._classList.delete(e),this._updateClassList(),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){let t;return this._classList.delete(e)?t=!1:(this._classList.add(e),t=!0),this._updateClassList(),t}_onMouseEvent(e){this._update(e.point)}_getAnchor(e){if(this.options.anchor)return this.options.anchor;const t=this._map,r=this._container,n=this._pos;if(!t||!r||!n)return"bottom";const o=r.offsetWidth,i=r.offsetHeight,a=n.xt.transform.width-o/2;if(n.y+et.transform.height-i){if(a)return"bottom-left";if(s)return"bottom-right"}return a?"left":s?"right":"bottom"}_updateClassList(){const e=this._container;if(!e)return;const t=[...this._classList];t.push("mapboxgl-popup"),this._anchor&&t.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&t.push("mapboxgl-popup-track-pointer"),e.className=t.join(" ")}_update(t){const r=this._map,n=this._content;if(!r||!this._lngLat&&!this._trackPointer||!n)return;let o=this._container;if(o||(o=this._container=i("div","mapboxgl-popup",r.getContainer()),this._tip=i("div","mapboxgl-popup-tip",o),o.appendChild(n)),this.options.maxWidth&&o.style.maxWidth!==this.options.maxWidth&&(o.style.maxWidth=this.options.maxWidth),r.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=ti(this._lngLat,this._pos,r.transform)),!this._trackPointer||t){const e=this._pos=this._trackPointer&&t?t:r.project(this._lngLat),n=ai(this.options.offset),o=this._anchor=this._getAnchor(n.y),i=ai(this.options.offset,o),a=e.add(i).round();r._requestDomTask(()=>{this._container&&o&&(this._container.style.transform=`${ri[o]} translate(${a.x}px,${a.y}px)`)})}if(!this._marker&&r._showingGlobe()){const t=e.isLngLatBehindGlobe(r.transform,this._lngLat)?0:1;this._setOpacity(t)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const e=this._container.querySelector(ii);e&&e.focus()}_onClose(){this.remove()}_setOpacity(e){this._container&&(this._container.style.opacity=`${e}`),this._content&&(this._content.style.pointerEvents=e?"auto":"none")}},Marker:ni,Style:Qt,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,FreeCameraOptions:Vn,Evented:e.Evented,config:e.config,prewarm:function(){Be().acquire(Ne)},clearPrewarmedResources:function(){const e=ze;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(Ne),ze=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return Fe.workerCount},set workerCount(e){Fe.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage(t){e.clearTileCache(t)},workerUrl:"",workerClass:null,setNow:e.exported.setNow,restoreNow:e.exported.restoreNow};return mi}),r}()},"49EM"(e,t,r){e.exports=function(e){function t(t,r){var n={each:u,map:function(e,t){var r=[];return u(e,function(e,n){r.push(t(e,n))}),r},mapTimes:function(e,t){var r=[];return d(e,function(e){r.push(t(e))}),r},eachTimes:d},o=function(){},i={animate:!1,animationSpeed:0,customPin:!1,initializeLeg:o,onClick:o,circleSpiralSwitchover:9,circleFootSeparation:25,spiralFootSeparation:28,spiralLengthStart:15,spiralLengthFactor:4},a=2*Math.PI,s=[];for(var l in r)i[l]=r[l];function c(){n.each(s.reverse(),function(e,t){i.animate?(e.elements.container.style.transitionDelay=i.animationSpeed/1e3/s.length*t+"s",e.elements.container.className+=" exit",setTimeout(function(){e.mapboxMarker.remove()},i.animationSpeed+100)):e.mapboxMarker.remove()}),s=[]}function u(e,t){var r=0;if(!e||!e.length)return[];for(r=0;r=i.circleSpiralSwitchover?function(e){var t=i.spiralLengthStart,r=0;return n.mapTimes(e,function(e){var n;return r+=i.spiralFootSeparation/t+5e-4*e,n={x:t*Math.cos(r),y:t*Math.sin(r),angle:r,legLength:t,index:e},t+=a*i.spiralLengthFactor/r,n})}(u):function(e){var t=i.circleFootSeparation*(2+e)/a,r=a/e;return n.mapTimes(e,function(e){var n=e*r;return{x:t*Math.cos(n),y:t*Math.sin(n),angle:n,legLength:t,index:e}})}(u);c(),l=n.map(o,function(t,n){var o,a,s=d[n],l=function(e){var t=document.createElement("div"),r=document.createElement("div"),n=document.createElement("div");return t.className="spider-leg-container"+(i.animate?" animate initial ":" "),n.className="spider-leg-line",r.className="spider-leg-pin"+(i.customPin?"":" default-spider-pin"),t.appendChild(n),t.appendChild(r),t.style["margin-left"]=e.x+"px",t.style["margin-top"]=e.y+"px",n.style.height=e.legLength+"px",n.style.transform="rotate("+(e.angle-Math.PI/2)+"rad)",{container:t,line:n,pin:r}}(s);return o=new e.Marker(l.container).setLngLat(r),a={feature:t,elements:l,mapboxMarker:o,param:s},i.initializeLeg(a),l.container.onclick=function(e){i.onClick(e,a)},a}),n.each(l.reverse(),function(e){e.mapboxMarker.addTo(t)}),i.animate&&setTimeout(function(){n.each(l.reverse(),function(e,t){e.elements.container.className=(e.elements.container.className||"").replace("initial",""),e.elements.container.style.transitionDelay=i.animationSpeed/1e3/l.length*t+"s"})}),s=l},this.unspiderfy=c,this.each=function(e){n.each(s,e)}}function r(e,t,r){return[e[0]+(t||0),e[1]+(r||0)]}return t.popupOffsetForSpiderLeg=function(e,t){var n=e.param.x,o=e.param.y;return{top:r([0,t=t||0],n,o),"top-left":r([t,t],n,o),"top-right":r([-t,t],n,o),bottom:r([0,-t],n,o),"bottom-left":r([t,-t],n,o),"bottom-right":r([-t,-t],n,o),left:r([t,-t],n,o),right:r([-t,-t],n,o)}},t}(r("4ZJM"))},F6qJ(e){"use strict";e.exports=Math.abs},ZZFE(e){"use strict";e.exports=Math.floor},jENR(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},"4FDZ"(e){"use strict";e.exports=Math.max},qyuN(e){"use strict";e.exports=Math.min},WetM(e){"use strict";e.exports=Math.pow},w65a(e){"use strict";e.exports=Math.round},jKBE(e,t,r){"use strict";var n=r("jENR");e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},MgzW(e){"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l0&&!o.call(e,0))for(var m=0;m0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),n}},vRGJ(e){e.exports=function e(r,n,o){n=n||[];var i,a=(o=o||{}).strict,s=!1!==o.end,l=o.sensitive?"":"i",c=!1!==o.lookahead,u=0,d=n.length,f=0,p=0,h=0,m="";if(r instanceof RegExp){for(;i=t.exec(r.source);)"\\"!==i[0][0]&&n.push({name:i[1]||p++,optional:!1,offset:i.index});return r}if(Array.isArray(r))return r=r.map(function(t){return e(t,n,o).source}),new RegExp(r.join("|"),l);if("string"!=typeof r)throw new TypeError("path must be a string, array of strings, or regular expression");for(r=r.replace(/\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g,function(e,t,o,i,a,s,l,c){if("\\"===e[0])return m+=e,h+=2,e;if("."===e)return m+="\\.",u+=1,h+=1,"\\.";if(t||o?m="":m+=r.slice(h,c),h=c+e.length,"*"===e)return u+=3,"(.*)";if("/("===e)return m+="/",u+=2,"/(?:";t=t||"",o=o?"\\.":"",l=l||"",a=a?a.replace(/\\.|\*/,function(e){return"*"===e?"(.*)":e}):m?"((?:(?!/|"+m+").)+?)":"([^/"+o+"]+?)",n.push({name:i,optional:!!l,offset:c+u});var d="(?:"+o+t+a+(s?"((?:[/"+o+"].+?)?)":"")+")"+l;return u+=d.length-e.length,d});i=t.exec(r);)"\\"!==i[0][0]&&((d+f===n.length||n[d+f].offset>i.index)&&n.splice(d+f,0,{name:p++,optional:!1,offset:i.index}),f++);return r+=a?"":"/"===r[r.length-1]?"?":"/?",s?r+="$":"/"!==r[r.length-1]&&(r+=c?"(?=/|$)":"(?:/|$)"),new RegExp("^"+r,l)};var t=/\\.|\((?:\?<(.*?)>)?(?!\?)/g},gzWB(e){e.exports=function(e,t,r,n){var o=e[0],i=e[1],a=!1;void 0===r&&(r=0),void 0===n&&(n=t.length);for(var s=(n-r)/2,l=0,c=s-1;li!=p>i&&o<(f-u)*(i-d)/(p-d)+u&&(a=!a)}return a}},cQc6(e,t,r){var n=r("gzWB"),o=r("wfnw");e.exports=function(e,t,r,i){return t.length>0&&Array.isArray(t[0])?o(e,t,r,i):n(e,t,r,i)},e.exports.nested=o,e.exports.flat=n},wfnw(e){e.exports=function(e,t,r,n){var o=e[0],i=e[1],a=!1;void 0===r&&(r=0),void 0===n&&(n=t.length);for(var s=n-r,l=0,c=s-1;li!=p>i&&o<(f-u)*(i-d)/(p-d)+u&&(a=!a)}return a}},"3L5V"(e,t,r){var n=r("8oxB");e.exports=function(){"use strict";function e(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]t?1:e0))break;if(null===r.right)break;if(n(e,r.right.key)>0&&(l=r.right,r.right=l.left,l.left=r,null===(r=l).right))break;i.right=r,i=r,r=r.right}}return i.right=r.left,a.left=r.right,r.left=o.right,r.right=o.left,r}function i(e,r,n,i){var a=new t(e,r);if(null===n)return a.left=a.right=null,a;var s=i(e,(n=o(e,n,i)).key);return s<0?(a.left=n.left,a.right=n,n.left=null):s>=0&&(a.right=n.right,a.left=n,n.right=null),a}function a(e,t,r){var n=null,i=null;if(t){var a=r((t=o(e,t,r)).key,e);0===a?(n=t.left,i=t.right):a<0?(i=t.right,t.right=null,n=t):(n=t.left,t.left=null,i=t)}return{left:n,right:i}}function s(e,t,r,n,o){if(e){n(t+(r?"└── ":"├── ")+o(e)+"\n");var i=t+(r?" ":"│ ");e.left&&s(e.left,i,!1,n,o),e.right&&s(e.right,i,!0,n,o)}}var l=function(){function n(e){void 0===e&&(e=r),this._root=null,this._size=0,this._comparator=e}return n.prototype.insert=function(e,t){return this._size++,this._root=i(e,t,this._root,this._comparator)},n.prototype.add=function(e,r){var n=new t(e,r);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,a=o(e,this._root,i),s=i(e,a.key);return 0===s?this._root=a:(s<0?(n.left=a.left,n.right=a,a.left=null):s>0&&(n.right=a.right,n.left=a,a.right=null),this._size++,this._root=n),this._root},n.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},n.prototype._remove=function(e,t,r){var n;return null===t?null:0===r(e,(t=o(e,t,r)).key)?(null===t.left?n=t.right:(n=o(e,t.left,r)).right=t.right,this._size--,n):t},n.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=o(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},n.prototype.findStatic=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(0===n)return t;t=n<0?t.left:t.right}return null},n.prototype.find=function(e){return this._root&&(this._root=o(e,this._root,this._comparator),0!==this._comparator(e,this._root.key))?null:this._root},n.prototype.contains=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(0===n)return!0;t=n<0?t.left:t.right}return!1},n.prototype.forEach=function(e,t){for(var r=this._root,n=[],o=!1;!o;)null!==r?(n.push(r),r=r.left):0!==n.length?(r=n.pop(),e.call(t,r),r=r.right):o=!0;return this},n.prototype.range=function(e,t,r,n){for(var o=[],i=this._comparator,a=this._root;0!==o.length||a;)if(a)o.push(a),a=a.left;else{if(i((a=o.pop()).key,t)>0)break;if(i(a.key,e)>=0&&r.call(n,a))return this;a=a.right}return this},n.prototype.keys=function(){var e=[];return this.forEach(function(t){var r=t.key;return e.push(r)}),e},n.prototype.values=function(){var e=[];return this.forEach(function(t){var r=t.data;return e.push(r)}),e},n.prototype.min=function(){return this._root?this.minNode(this._root).key:null},n.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},n.prototype.minNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.left;)e=e.left;return e},n.prototype.maxNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.right;)e=e.right;return e},n.prototype.at=function(e){for(var t=this._root,r=!1,n=0,o=[];!r;)if(t)o.push(t),t=t.left;else if(o.length>0){if(t=o.pop(),n===e)return t;n++,t=t.right}else r=!0;return null},n.prototype.next=function(e){var t=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var n=this._comparator;t;){var o=n(e.key,t.key);if(0===o)break;o<0?(r=t,t=t.left):t=t.right}return r},n.prototype.prev=function(e){var t=this._root,r=null;if(null!==e.left){for(r=e.left;r.right;)r=r.right;return r}for(var n=this._comparator;t;){var o=n(e.key,t.key);if(0===o)break;o<0?t=t.left:(r=t,t=t.right)}return r},n.prototype.clear=function(){return this._root=null,this._size=0,this},n.prototype.toList=function(){return function(e){for(var r=e,n=[],o=!1,i=new t(null,null),a=i;!o;)r?(n.push(r),r=r.left):n.length>0?r=(r=a=a.next=n.pop()).right:o=!0;return a.next=null,i.next}(this._root)},n.prototype.load=function(e,r,n){void 0===r&&(r=[]),void 0===n&&(n=!1);var o=e.length,i=this._comparator;if(n&&d(e,r,0,o-1,i),null===this._root)this._root=c(e,r,0,o),this._size=o;else{var a=function(e,r,n){for(var o=new t(null,null),i=o,a=e,s=r;null!==a&&null!==s;)n(a.key,s.key)<0?(i.next=a,a=a.next):(i.next=s,s=s.next),i=i.next;return null!==a?i.next=a:null!==s&&(i.next=s),o.next}(this.toList(),function(e,r){for(var n=new t(null,null),o=n,i=0;i0){var a=n+Math.floor(i/2),s=e[a],l=r[a],u=new t(s,l);return u.left=c(e,r,n,a),u.right=c(e,r,a+1,o),u}return null}function u(e,t,r){var n=r-t;if(n>0){var o=t+Math.floor(n/2),i=u(e,t,o),a=e.head;return a.left=i,e.head=e.head.next,a.right=u(e,o+1,r),a}return null}function d(e,t,r,n,o){if(!(r>=n)){for(var i=e[r+n>>1],a=r-1,s=n+1;;){do{a++}while(o(e[a],i)<0);do{s--}while(o(e[s],i)>0);if(a>=s)break;var l=e[a];e[a]=e[s],e[s]=l,l=t[a],t[a]=t[s],t[s]=l}d(e,t,r,s,o),d(e,t,s+1,n,o)}}const f=(e,t)=>e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y,p=(e,t)=>{if(t.ur.x{if(-hc==u>-c?(i=c,c=t[++d]):(i=u,u=n[++f]);let p=0;if(dc==u>-c?(a=c+i,s=i-(a-c),c=t[++d]):(a=u+i,s=i-(a-u),u=n[++f]),i=a,0!==s&&(o[p++]=s);dc==u>-c?(a=i+c,l=a-i,s=i-(a-l)+(c-l),c=t[++d]):(a=i+u,l=a-i,s=i-(a-l)+(u-l),u=n[++f]),i=a,0!==s&&(o[p++]=s);for(;d=33306690738754716e-32*c?l:-function(e,t,r,n,o,i,a){let s,l,c,u,d,f,p,h,m,g,y,v,b,A,k,M,R,P;const O=e-o,D=r-o,L=t-i,N=n-i;A=O*N,f=_*O,p=f-(f-O),h=O-p,f=_*N,m=f-(f-N),g=N-m,k=h*g-(A-p*m-h*m-p*g),M=L*D,f=_*L,p=f-(f-L),h=L-p,f=_*D,m=f-(f-D),g=D-m,R=h*g-(M-p*m-h*m-p*g),y=k-R,d=k-y,S[0]=k-(y+d)+(d-R),v=A+y,d=v-A,b=A-(v-d)+(y-d),y=b-M,d=b-y,S[1]=b-(y+d)+(d-M),P=v+y,d=P-v,S[2]=v-(P-d)+(y-d),S[3]=P;let F=function(e,t){let r=t[0];for(let n=1;n=z||-F>=z)return F;if(d=e-O,s=e-(O+d)+(d-o),d=r-D,c=r-(D+d)+(d-o),d=t-L,l=t-(L+d)+(d-i),d=n-N,u=n-(N+d)+(d-i),0===s&&0===l&&0===c&&0===u)return F;if(z=11093356479670487e-47*a+x*Math.abs(F),F+=O*u+N*s-(L*c+D*l),F>=z||-F>=z)return F;A=s*N,f=_*s,p=f-(f-s),h=s-p,f=_*N,m=f-(f-N),g=N-m,k=h*g-(A-p*m-h*m-p*g),M=l*D,f=_*l,p=f-(f-l),h=l-p,f=_*D,m=f-(f-D),g=D-m,R=h*g-(M-p*m-h*m-p*g),y=k-R,d=k-y,I[0]=k-(y+d)+(d-R),v=A+y,d=v-A,b=A-(v-d)+(y-d),y=b-M,d=b-y,I[1]=b-(y+d)+(d-M),P=v+y,d=P-v,I[2]=v-(P-d)+(y-d),I[3]=P;const B=w(4,S,4,I,C);A=O*u,f=_*O,p=f-(f-O),h=O-p,f=_*u,m=f-(f-u),g=u-m,k=h*g-(A-p*m-h*m-p*g),M=L*c,f=_*L,p=f-(f-L),h=L-p,f=_*c,m=f-(f-c),g=c-m,R=h*g-(M-p*m-h*m-p*g),y=k-R,d=k-y,I[0]=k-(y+d)+(d-R),v=A+y,d=v-A,b=A-(v-d)+(y-d),y=b-M,d=b-y,I[1]=b-(y+d)+(d-M),P=v+y,d=P-v,I[2]=v-(P-d)+(y-d),I[3]=P;const j=w(B,C,4,I,E);A=s*u,f=_*s,p=f-(f-s),h=s-p,f=_*u,m=f-(f-u),g=u-m,k=h*g-(A-p*m-h*m-p*g),M=l*c,f=_*l,p=f-(f-l),h=l-p,f=_*c,m=f-(f-c),g=c-m,R=h*g-(M-p*m-h*m-p*g),y=k-R,d=k-y,I[0]=k-(y+d)+(d-R),v=A+y,d=v-A,b=A-(v-d)+(y-d),y=b-M,d=b-y,I[1]=b-(y+d)+(d-M),P=v+y,d=P-v,I[2]=v-(P-d)+(y-d),I[3]=P;const $=w(j,E,4,I,T);return T[$-1]}(e,t,r,n,o,i,c)}const M=(e,t)=>e.x*t.y-e.y*t.x,R=(e,t)=>e.x*t.x+e.y*t.y,P=(e,t,r)=>{const n=k(e.x,e.y,t.x,t.y,r.x,r.y);return n>0?-1:n<0?1:0},O=e=>Math.sqrt(R(e,e)),D=(e,t,r)=>{const n={x:t.x-e.x,y:t.y-e.y},o={x:r.x-e.x,y:r.y-e.y};return M(o,n)/O(o)/O(n)},L=(e,t,r)=>{const n={x:t.x-e.x,y:t.y-e.y},o={x:r.x-e.x,y:r.y-e.y};return R(o,n)/O(o)/O(n)},N=(e,t,r)=>0===t.y?null:{x:e.x+t.x/t.y*(r-e.y),y:r},F=(e,t,r)=>0===t.x?null:{x:r,y:e.y+t.y/t.x*(r-e.x)};class z{static compare(e,t){const r=z.comparePoints(e.point,t.point);return 0!==r?r:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:j.compare(e.segment,t.segment))}static comparePoints(e,t){return e.xt.x?1:e.yt.y?1:0}constructor(e,t){void 0===e.events?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let e=0,r=t.length;e{const n=r.otherSE;t.set(r,{sine:D(this.point,e.point,n.point),cosine:L(this.point,e.point,n.point)})};return(e,n)=>{t.has(e)||r(e),t.has(n)||r(n);const{sine:o,cosine:i}=t.get(e),{sine:a,cosine:s}=t.get(n);return o>=0&&a>=0?is?-1:0:o<0&&a<0?is?1:0:ao?1:0}}}let B=0;class j{static compare(e,t){const r=e.leftSE.point.x,n=t.leftSE.point.x,o=e.rightSE.point.x,i=t.rightSE.point.x;if(ia&&s>l)return-1;const r=e.comparePoint(t.leftSE.point);if(r<0)return 1;if(r>0)return-1;const n=t.comparePoint(e.rightSE.point);return 0!==n?n:-1}if(r>n){if(as&&a>c)return 1;const r=t.comparePoint(e.leftSE.point);if(0!==r)return r;const n=e.comparePoint(t.rightSE.point);return n<0?1:n>0?-1:1}if(as)return 1;if(oi){const r=e.comparePoint(t.rightSE.point);if(r<0)return 1;if(r>0)return-1}if(o!==i){const e=l-a,t=o-r,u=c-s,d=i-n;if(e>t&&ud)return-1}return o>i?1:oc?1:e.idt.id?1:0}constructor(e,t,r,n){this.id=++B,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=r,this.windings=n}static fromRing(e,t,r){let n,o,i;const a=z.comparePoints(e,t);if(a<0)n=e,o=t,i=1;else{if(!(a>0))throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);n=t,o=e,i=-1}const s=new z(n,!0),l=new z(o,!1);return new j(s,l,[r],[i])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:et?e:t}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}comparePoint(e){if(this.isAnEndpoint(e))return 0;const t=this.leftSE.point,r=this.rightSE.point,n=this.vector();if(t.x===r.x)return e.x===t.x?0:e.x{if(0===t.x)return F(r,n,e.x);if(0===n.x)return F(e,t,r.x);if(0===t.y)return N(r,n,e.y);if(0===n.y)return N(e,t,r.y);const o=M(t,n);if(0==o)return null;const i={x:r.x-e.x,y:r.y-e.y},a=M(i,t)/o,s=M(i,n)/o;return{x:(e.x+s*t.x+(r.x+a*n.x))/2,y:(e.y+s*t.y+(r.y+a*n.y))/2}})(o,this.vector(),a,e.vector());return null===h?null:f(n,h)?v.round(h.x,h.y):null}split(e){const t=[],r=void 0!==e.events,n=new z(e,!0),o=new z(e,!1),i=this.rightSE;this.replaceRightSE(o),t.push(o),t.push(n);const a=new j(n,i,this.rings.slice(),this.windings.slice());return z.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),z.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(n.checkForConsuming(),o.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,t=this.windings.length;e0){const e=t;t=r,r=e}if(t.prev===r){const e=t;t=r,r=e}for(let e=0,n=r.rings.length;e1===e.length&&e[0].isSubject;this._isInResult=r(e)!==r(t);break}default:throw new Error(`Unrecognized operation type found ${X.type}`)}return this._isInResult}}class ${constructor(e,t,r){if(!Array.isArray(e)||0===e.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=r,this.segments=[],"number"!=typeof e[0][0]||"number"!=typeof e[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const n=v.round(e[0][0],e[0][1]);this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let o=n;for(let t=1,r=e.length;tthis.bbox.ur.x&&(this.bbox.ur.x=r.x),r.y>this.bbox.ur.y&&(this.bbox.ur.y=r.y),o=r)}n.x===o.x&&n.y===o.y||this.segments.push(j.fromRing(o,n,this))}getSweepEvents(){const e=[];for(let t=0,r=this.segments.length;tthis.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=t}getSweepEvents(){const e=this.exteriorRing.getSweepEvents();for(let t=0,r=this.interiorRings.length;tthis.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=t}getSweepEvents(){const e=[];for(let t=0,r=this.polys.length;t0&&(e=r)}let t=e.segment.prevInResult(),r=t?t.prevInResult():null;for(;;){if(!t)return null;if(!r)return t.ringOut;if(r.ringOut!==t.ringOut)return r.ringOut.enclosingRing()!==t.ringOut?t.ringOut:t.ringOut.enclosingRing();t=r.prevInResult(),r=t?t.prevInResult():null}}}class G{constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){const e=[this.exteriorRing.getGeom()];if(null===e[0])return null;for(let t=0,r=this.interiorRings.length;t1&&void 0!==arguments[1]?arguments[1]:j.compare;this.queue=e,this.tree=new l(t),this.segments=[]}process(e){const t=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),r;const n=e.isLeft?this.tree.add(t):this.tree.find(t);if(!n)throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);let o,i,a=n,s=n;for(;void 0===o;)a=this.tree.prev(a),null===a?o=null:void 0===a.key.consumedBy&&(o=a.key);for(;void 0===i;)s=this.tree.next(s),null===s?i=null:void 0===s.key.consumedBy&&(i=s.key);if(e.isLeft){let n=null;if(o){const e=o.getIntersection(t);if(null!==e&&(t.isAnEndpoint(e)||(n=e),!o.isAnEndpoint(e))){const t=this._splitSafely(o,e);for(let e=0,n=t.length;e0?(this.tree.remove(t),r.push(e)):(this.segments.push(t),t.prev=o)}else{if(o&&i){const e=o.getIntersection(i);if(null!==e){if(!o.isAnEndpoint(e)){const t=this._splitSafely(o,e);for(let e=0,n=t.length;eZ)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const i=new q(o);let a=o.size,s=o.pop();for(;s;){const e=s.key;if(o.size===a){const t=e.segment;throw new Error(`Unable to pop() ${e.isLeft?"left":"right"} SweepEvent [${e.point.x}, ${e.point.y}] from segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] from queue.`)}if(o.size>Z)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(i.segments.length>Y)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const t=i.process(e);for(let e=0,r=t.length;e1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n0?-1:1)*((n-o)*a)/s}):(t=function(e){return Math.exp(-e*i)*((e-d)*i+1)-.001},r=function(e){return Math.exp(-e*i)*(i*i*(d-e))});var m=function(e,t,r){for(var n=r,o=1;o<12;o++)n-=e(n)/t(n);return n}(t,r,5/i);if(i*=1e3,isNaN(m))return{stiffness:100,damping:10,duration:i};var g=Math.pow(m,2)*p;return{stiffness:g,damping:2*h*Math.sqrt(p*g),duration:i}}(e);(t=n.__assign(n.__assign(n.__assign({},t),r),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(g),b=v.stiffness,_=v.damping,x=v.mass,w=v.velocity,A=v.duration,S=v.isResolvedFromDuration,C=m,E=m;function T(){var e=w?-w/1e3:0,t=a-r,n=_/(2*Math.sqrt(b*x)),o=Math.sqrt(b/x)/1e3;if(null!=h||(h=Math.abs(a-r)<=1?.01:.4),n<1){var i=u(o,n);C=function(r){var s=Math.exp(-n*o*r);return a-s*((e+n*o*t)/i*Math.sin(i*r)+t*Math.cos(i*r))},E=function(r){var a=Math.exp(-n*o*r);return n*o*a*(Math.sin(i*r)*(e+n*o*t)/i+t*Math.cos(i*r))-a*(Math.cos(i*r)*(e+n*o*t)-i*t*Math.sin(i*r))}}else if(1===n)C=function(r){return a-Math.exp(-o*r)*(t+(e+o*t)*r)};else{var s=o*Math.sqrt(n*n-1);C=function(r){var i=Math.exp(-n*o*r),l=Math.min(s*r,300);return a-i*((e+n*o*t)*Math.sinh(l)+s*t*Math.cosh(l))/s}}}return T(),{next:function(e){var t=C(e);if(S)y.done=e>=A;else{var r=1e3*E(e),n=Math.abs(r)<=l,o=Math.abs(a-t)<=h;y.done=n&&o}return y.value=y.done?a:t,y},flipTarget:function(){var e;w=-w,r=(e=[a,r])[0],a=e[1],T()}}}h.needsInterpolation=function(e,t){return"string"==typeof e||"string"==typeof t};var m=function(e){return 0},g=function(e,t,r){var n=t-e;return 0===n?1:(r-e)/n},y=function(e,t,r){return-r*e+r*t+e},v=function(e,t,r){var n=e*e,o=t*t;return Math.sqrt(Math.max(0,r*(o-n)+n))},b=[i.hex,i.rgba,i.hsla],_=function(e){return b.find(function(t){return t.test(e)})},x=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},w=function(e,t){var r=_(e),a=_(t);o.invariant(!!r,x(e)),o.invariant(!!a,x(t)),o.invariant(r.transform===a.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var s=r.parse(e),l=a.parse(t),c=n.__assign({},s),u=r===i.hsla?y:v;return function(e){for(var t in c)"alpha"!==t&&(c[t]=u(s[t],l[t],e));return c.alpha=y(s.alpha,l.alpha,e),r.transform(c)}},A={x:0,y:0,z:0},S=function(e){return"number"==typeof e},C=function(e,t){return function(r){return t(e(r))}},E=function(){for(var e=[],t=0;t=a.numNumbers,"Complex values '"+e+"' and '"+t+"' too different to mix. Ensure all colors are of the same type."),E(I(n.parsed,a.parsed),r)},P=function(e,t){return function(r){return y(e,t,r)}};function O(e,t,r){var n=void 0===r?{}:r,a=n.clamp,s=void 0===a||a,l=n.ease,u=n.mixer,d=e.length;o.invariant(d===t.length,"Both input and output ranges must be the same length"),o.invariant(!l||!Array.isArray(l)||l.length===d-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[d-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var f=function(e,t,r){for(var n,o=[],a=r||("number"==typeof(n=e[0])?P:"string"==typeof n?i.color.test(n)?w:R:Array.isArray(n)?I:"object"==typeof n?k:void 0),s=e.length-1,l=0;l=e[n]&&(i=n-1,a=!0),!a){for(var s=1;so||s===n);s++);i=s-1}var l=g(e[i],e[i+1],o);return t[i](l)}}(e,f);return s?function(t){return p(c(e[0],e[d-1],t))}:p}var D=function(e){return function(t){return 1-e(1-t)}},L=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},N=function(e){return function(t){return Math.pow(t,e)}},F=function(e){return function(t){return t*t*((e+1)*t-e)}},z=function(e){var t=F(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}},B=4/11,j=8/11,$=function(e){return e},U=N(2),V=D(U),H=L(U),G=function(e){return 1-Math.sin(Math.acos(e))},W=D(G),q=L(W),Z=F(1.525),Y=D(Z),X=L(Z),K=z(1.525),J=4356/361,Q=35442/1805,ee=16061/1805,te=function(e){if(1===e||0===e)return e;var t=e*e;return e=l,c},flipTarget:function(){u.reverse(),p=f()}}}function ie(e){var t=e.velocity,r=void 0===t?0:t,n=e.from,o=void 0===n?0:n,i=e.power,a=void 0===i?.8:i,s=e.timeConstant,l=void 0===s?350:s,c=e.restDelta,u=void 0===c?.5:c,d=e.modifyTarget,f={done:!1,value:o},p=a*r,h=o+p,m=void 0===d?h:d(h);return m!==h&&(p=m-o),{next:function(e){var t=-p*Math.exp(-e/l);return f.done=!(t>u||t<-u),f.value=f.done?m:m+t,f},flipTarget:function(){}}}var ae={keyframes:oe,spring:h,decay:ie};function se(e,t,r){return void 0===r&&(r=0),e-t-r}var le=function(e){var t=function(t){var r=t.delta;return e(r)};return{start:function(){return l.default.update(t,!0)},stop:function(){return a.cancelSync.update(t)}}};function ce(e){var t,r,o,i,a,s=e.from,l=e.autoplay,c=void 0===l||l,u=e.driver,d=void 0===u?le:u,f=e.elapsed,p=void 0===f?0:f,m=e.repeat,g=void 0===m?0:m,y=e.repeatType,v=void 0===y?"loop":y,b=e.repeatDelay,_=void 0===b?0:b,x=e.onPlay,w=e.onStop,A=e.onComplete,S=e.onRepeat,C=e.onUpdate,E=n.__rest(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),T=E.to,I=0,k=E.duration,M=!1,R=!0,P=function(e){if(Array.isArray(e.to))return oe;if(ae[e.type])return ae[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?oe:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?h:oe}(E);(null===(r=(t=P).needsInterpolation)||void 0===r?void 0:r.call(t,s,T))&&(a=O([0,100],[s,T],{clamp:!1}),s=0,T=100);var D=P(n.__assign(n.__assign({},E),{from:s,to:T}));return c&&(null==x||x(),(o=d(function(e){if(R||(e=-e),p+=e,!M){var t=D.next(Math.max(0,p));i=t.value,a&&(i=a(i)),M=R?t.done:p<=0}null==C||C(i),M&&(0===I&&(null!=k||(k=p)),I=t+r:e<=-r}(p,k,_,R)&&(I++,"reverse"===v?p=function(e,t,r,n){return void 0===r&&(r=0),void 0===n&&(n=!0),n?se(t+-e,t,r):t-(e-t)+r}(p,k,_,R=I%2==0):(p=se(p,k,_),"mirror"===v&&D.flipTarget()),M=!1,S&&S()):(o.stop(),A&&A()))})).start()),{stop:function(){null==w||w(),o.stop()}}}function ue(e,t){return t?e*(1e3/t):0}var de=function(e){return 180*e/Math.PI},fe=function(e){return e},pe=function(e){return void 0===e&&(e=fe),function(t,r,n){var o=r-n,i=-(0-t+1)*(0-e(Math.abs(o)));return o<=0?r+i:r-i}},he=pe(),me=pe(Math.sqrt),ge=function(e){return e*Math.PI/180},ye=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},ve=function(e){return ye(e)&&e.hasOwnProperty("z")},be=function(e,t){return Math.abs(e-t)},_e=function(e,t){return void 0===t&&(t=2),t=Math.pow(10,t),Math.round(e*t)/t},xe=function(e,t,r,n){return void 0===n&&(n=0),_e(e+r*(t-e)/Math.max(n,r))},we=function(e,t){return 1-3*t+3*e},Ae=function(e,t){return 3*t-6*e},Se=function(e){return 3*e},Ce=function(e,t,r){return((we(t,r)*e+Ae(t,r))*e+Se(t))*e},Ee=function(e,t,r){return 3*we(t,r)*e*e+2*Ae(t,r)*e+Se(t)},Te=.1;t.angle=function(e,t){return void 0===t&&(t=A),de(Math.atan2(t.y-e.y,t.x-e.x))},t.animate=ce,t.anticipate=K,t.applyOffset=function(e,t){var r=!0;return void 0===t&&(t=e,r=!1),function(n){return r?n-e+t:(e=n,r=!0,t)}},t.attract=he,t.attractExpo=me,t.backIn=Z,t.backInOut=X,t.backOut=Y,t.bounceIn=re,t.bounceInOut=function(e){return e<.5?.5*(1-te(1-2*e)):.5*te(2*e-1)+.5},t.bounceOut=te,t.circIn=G,t.circInOut=q,t.circOut=W,t.clamp=c,t.createAnticipate=z,t.createAttractor=pe,t.createBackIn=F,t.createExpoIn=N,t.cubicBezier=function(e,t,r,n){if(e===t&&r===n)return $;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=Ce(i*Te,e,r);return function(i){return 0===i||1===i?i:Ce(function(t){for(var n=0,i=1;10!==i&&o[i]<=t;++i)n+=Te;--i;var a=n+(t-o[i])/(o[i+1]-o[i])*Te,s=Ee(a,e,r);return s>=.001?function(e,t,r,n){for(var o=0;o<8;++o){var i=Ee(t,r,n);if(0===i)return t;t-=(Ce(t,r,n)-e)/i}return t}(t,a,e,r):0===s?a:function(e,t,r,n,o){var i,a,s=0;do{(i=Ce(a=t+(r-t)/2,n,o)-e)>0?r=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,n,n+Te,e,r)}(i),t,n)}},t.decay=ie,t.degreesToRadians=ge,t.distance=function(e,t){if(S(e)&&S(t))return be(e,t);if(ye(e)&&ye(t)){var r=be(e.x,t.x),n=be(e.y,t.y),o=ve(e)&&ve(t)?be(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}},t.easeIn=U,t.easeInOut=H,t.easeOut=V,t.inertia=function(e){var t,r=e.from,o=void 0===r?0:r,i=e.velocity,s=void 0===i?0:i,l=e.min,c=e.max,u=e.power,d=void 0===u?.8:u,f=e.timeConstant,p=void 0===f?750:f,h=e.bounceStiffness,m=void 0===h?500:h,g=e.bounceDamping,y=void 0===g?10:g,v=e.restDelta,b=void 0===v?1:v,_=e.modifyTarget,x=e.driver,w=e.onUpdate,A=e.onComplete;function S(e){return void 0!==l&&ec}function C(e){return void 0===l?c:void 0===c||Math.abs(l-e)R||-1===P&&eo)return e[t-1];if(t===r-1)return i;o=a}}},t.spring=h,t.steps=function(e,t){return void 0===t&&(t="end"),function(r){var n=(r="end"===t?Math.min(r,.999):Math.max(r,.001))*e,o="end"===t?Math.floor(n):Math.ceil(n);return c(0,1,o/e)}},t.toDecimal=_e,t.velocityPerFrame=function(e,t){return e/(1e3/t)},t.velocityPerSecond=ue,t.wrap=function(e,t,r){var n=t-e;return((r-e)%n+n)%n+e}},"8oxB"(e){var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,u=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u1)for(var r=1;rr;){if(n-r>600){var s=n-r+1,l=t-r+1,c=Math.log(s),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);o(e,t,Math.max(r,Math.floor(t-l*u/s+d)),Math.min(n,Math.floor(t+(s-l)*u/s+d)),a)}var f=e[t],p=r,h=n;for(i(e,r,t),a(e[n],f)>0&&i(e,r,n);p0;)h--}0===a(e[r],f)?i(e,r,h):i(e,++h,n),h<=t&&(r=h+1),t<=h&&(n=h-1)}}function i(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function a(e,t){return et?1:0}r.r(t),r.d(t,{default:()=>n})},"A1R+"(e,t,r){"use strict";e.exports=o,e.exports.default=o;var n=r("Ficz");function o(e,t){if(!(this instanceof o))return new o(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function i(e,t,r){if(!r)return t.indexOf(e);for(var n=0;n=e.minX&&t.maxY>=e.minY}function y(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(e,t,r,o,i){for(var a,s=[t,r];s.length;)(r=s.pop())-(t=s.pop())<=o||(a=t+Math.ceil((r-t)/o/2)*o,n(e,a,t,r,i),s.push(t,a,a,r))}o.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,r=[],n=this.toBBox;if(!g(e,t))return r;for(var o,i,a,s,l=[];t;){for(o=0,i=t.children.length;o=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(o,i,t)},_split:function(e,t){var r=e[t],n=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,n);var i=this._chooseSplitIndex(r,o,n),s=y(r.children.splice(i,r.children.length-i));s.height=r.height,s.leaf=r.leaf,a(r,this.toBBox),a(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(r,s)},_splitRoot:function(e,t){this.data=y([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,r){var n,o,i,a,l,c,u,f;for(c=u=1/0,n=t;n<=r-t;n++)a=h(o=s(e,0,n,this.toBBox),i=s(e,n,r,this.toBBox)),l=d(o)+d(i),a=t;o--)i=e.children[o],l(u,e.leaf?a(i):i),d+=f(u);return d},_adjustParentBBoxes:function(e,t,r){for(var n=r;n>=0;n--)l(t[n],e)},_condense:function(e){for(var t,r=e.length-1;r>=0;r--)0===e[r].children.length?r>0?(t=e[r-1].children).splice(t.indexOf(e[r]),1):this.clear():a(e[r],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},"p/5y"(e,t,r){"use strict";r.d(t,{M:()=>n});var n=(0,r("q1tI").createContext)({dragDropManager:void 0})},hpHf(e,t,r){"use strict";r.d(t,{Q:()=>Re});var n=r("nKUr"),o=r("q1tI"),i=r("aKzv"),a="dnd-core/INIT_COORDS",s="dnd-core/BEGIN_DRAG",l="dnd-core/PUBLISH_DRAG_SOURCE",c="dnd-core/HOVER",u="dnd-core/DROP",d="dnd-core/END_DRAG";function f(e,t){return{type:a,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e){return"object"===p(e)}var m={type:a,payload:{clientOffset:null,sourceClientOffset:null}};function g(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},n=r.publishSource,o=void 0===n||n,a=r.clientOffset,l=r.getSourceClientOffset,c=e.getMonitor(),u=e.getRegistry();e.dispatch(f(a)),function(e,t,r){(0,i.V)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){(0,i.V)(r.getSource(e),"Expected sourceIds to be registered.")})}(t,c,u);var d=function(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}(t,c);if(null!==d){var p=null;if(a){if(!l)throw new Error("getSourceClientOffset must be defined");!function(e){(0,i.V)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(l),p=l(d)}e.dispatch(f(a,p));var g=u.getSource(d).beginDrag(c,d);if(null!=g){!function(e){(0,i.V)(h(e),"Item must be an object.")}(g),u.pinSource(d);var y=u.getSourceType(d);return{type:s,payload:{itemType:y,item:g,sourceId:d,clientOffset:a||null,sourceClientOffset:p||null,isSourcePublic:!!o}}}}else e.dispatch(m)}}function y(e){return function(){if(e.getMonitor().isDragging())return{type:l}}}function v(e,t){return null===t?null===e:Array.isArray(e)?e.some(function(e){return e===t}):e===t}function b(e){return function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).clientOffset;!function(e){(0,i.V)(Array.isArray(e),"Expected targetIds to be an array.")}(t);var n=t.slice(0),o=e.getMonitor(),a=e.getRegistry();return function(e,t,r){(0,i.V)(t.isDragging(),"Cannot call hover while not dragging."),(0,i.V)(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n=0;n--){var o=e[n];v(t.getTargetType(o),r)||e.splice(n,1)}}(n,a,o.getItemType()),function(e,t,r){e.forEach(function(e){r.getTarget(e).hover(t,e)})}(n,o,a),{type:c,payload:{targetIds:n,clientOffset:r||null}}}}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},r=e.getMonitor(),n=e.getRegistry();!function(e){(0,i.V)(e.isDragging(),"Cannot call drop while not dragging."),(0,i.V)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(r);var o=function(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(r);o.forEach(function(o,a){var s=function(e,t,r,n){var o=r.getTarget(e),a=o?o.drop(n,e):void 0;return function(e){(0,i.V)(void 0===e||h(e),"Drop result must either be an object or undefined.")}(a),void 0===a&&(a=0===t?{}:n.getDropResult()),a}(o,a,n,r),l={type:u,payload:{dropResult:x(x({},t),s)}};e.dispatch(l)})}}function S(e){return function(){var t=e.getMonitor(),r=e.getRegistry();!function(e){(0,i.V)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var n=t.getSourceId();return null!=n&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:d}}}function C(e,t){for(var r=0;r0;n.backend&&(e&&!n.isSetUp?(n.backend.setup(),n.isSetUp=!0):!e&&n.isSetUp&&(n.backend.teardown(),n.isSetUp=!1))}),this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}var t,r;return t=e,r=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,r=function(e){return{beginDrag:g(e),publishDragSource:y(e),hover:b(e),drop:A(e),endDrag:S(e)}}(this);return Object.keys(r).reduce(function(n,o){var i,a=r[o];return n[o]=(i=a,function(){for(var r=arguments.length,n=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:F,n=arguments.length>1?arguments[1]:void 0,o=n.payload;switch(n.type){case a:case s:return{initialSourceClientOffset:o.sourceClientOffset,initialClientOffset:o.clientOffset,clientOffset:o.clientOffset};case c:return e=r.clientOffset,t=o.clientOffset,!e&&!t||e&&t&&e.x===t.x&&e.y===t.y?r:L(L({},r),{},{clientOffset:o.clientOffset});case d:case u:return F;default:return r}}var B="dnd-core/ADD_SOURCE",j="dnd-core/ADD_TARGET",$="dnd-core/REMOVE_SOURCE",U="dnd-core/REMOVE_TARGET";function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:W,n=arguments.length>1?arguments[1]:void 0,o=n.payload;switch(n.type){case s:return H(H({},r),{},{itemType:o.itemType,item:o.item,sourceId:o.sourceId,isSourcePublic:o.isSourcePublic,dropResult:null,didDrop:!1});case l:return H(H({},r),{},{isSourcePublic:!0});case c:return H(H({},r),{},{targetIds:o.targetIds});case U:return-1===r.targetIds.indexOf(o.targetId)?r:H(H({},r),{},{targetIds:(e=r.targetIds,t=o.targetId,e.filter(function(e){return e!==t}))});case u:return H(H({},r),{},{dropResult:o.dropResult,didDrop:!0,targetIds:[]});case d:return H(H({},r),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return r}}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case B:case j:return e+1;case $:case U:return e-1;default:return e}}var Y=[],X=[];function K(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case c:break;case B:case j:case U:case $:return Y;default:return X}var t=e.payload,r=t.targetIds,n=void 0===r?[]:r,o=t.prevTargetIds,i=void 0===o?[]:o,a=function(e,t){var r=new Map,n=function(e){r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);var o=[];return r.forEach(function(e,t){1===e&&o.push(t)}),o}(n,i),s=a.length>0||!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O;if(e.length!==t.length)return!1;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0)+1}function Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:K(r.dirtyHandlerIds,{type:n.type,payload:ee(ee({},n.payload),{},{prevTargetIds:(e=r,t=[],"dragOperation.targetIds".split(".").reduce(function(e,r){return e&&e[r]?e[r]:t||null},e))})}),dragOffset:z(r.dragOffset,n),refCount:Z(r.refCount,n),dragOperation:q(r.dragOperation,n),stateId:J(r.stateId)}}function ne(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oe(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0}).handlerIds;(0,i.V)("function"==typeof e,"listener must be a function."),(0,i.V)(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var n=this.store.getState().stateId;return this.store.subscribe(function(){var o=t.store.getState(),i=o.stateId;try{var a=i===n||i===n+1&&!function(e,t){return e!==Y&&(e===X||void 0===t||(r=e,t.filter(function(e){return r.indexOf(e)>-1})).length>0);var r}(o.dirtyHandlerIds,r);a||e()}finally{n=i}})}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,i.V)("function"==typeof e,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe(function(){var n=t.store.getState().dragOffset;n!==r&&(r=n,e())})}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return(0,i.V)(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return(0,i.V)(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&v(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return(0,i.V)(t,"Expected to find a valid source. sourceId=".concat(e)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){if(!e)return!1;var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1}).shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),n=this.getItemType();if(n&&!v(r,n))return!1;var o=this.getTargetIds();if(!o.length)return!1;var i=o.indexOf(e);return t?i===o.length-1:i>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return n=(e=this.store.getState().dragOffset).clientOffset,o=e.initialClientOffset,i=e.initialSourceClientOffset,n&&o&&i?ne((r=i,{x:(t=n).x+r.x,y:t.y+r.y}),o):null;var e,t,r,n,o,i}},{key:"getDifferenceFromInitialOffset",value:function(){return t=(e=this.store.getState().dragOffset).clientOffset,r=e.initialClientOffset,t&&r?ne(t,r):null;var e,t,r}}],r&&oe(t.prototype,r),e}(),le=0;function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function ue(e,t){t&&Array.isArray(e)?e.forEach(function(e){return ue(e,!1)}):(0,i.V)("string"==typeof e||"symbol"===ce(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(ae||(ae={}));const de=void 0!==r.g?r.g:self,fe=de.MutationObserver||de.WebKitMutationObserver;function pe(e){return function(){const t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}const he="function"==typeof fe?function(e){let t=1;const r=new fe(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}:pe;class me{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const ge=new class{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.indexthis.capacity){for(let t=0,r=e.length-this.index;t{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=he(this.flush),this.requestErrorThrow=pe(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},ye=new class{create(e){const t=this.freeTasks,r=t.length?t.pop():new me(this.onError,e=>t[t.length]=e);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}(ge.registerPendingError);function ve(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]&&arguments[1];return(0,i.V)(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}},{key:"getTarget",value:function(e){return(0,i.V)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return(0,i.V)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return(0,i.V)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return we(e)===ae.SOURCE}},{key:"isTargetId",value:function(e){return we(e)===ae.TARGET}},{key:"removeSource",value:function(e){var t,r=this;(0,i.V)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:$,payload:{sourceId:e}}}(e)),t=function(){r.dragSources.delete(e),r.types.delete(e)},ge.enqueueTask(ye.create(t))}},{key:"removeTarget",value:function(e){(0,i.V)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:U,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);(0,i.V)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){(0,i.V)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,r){var n=function(e){var t=(le++).toString();switch(e){case ae.SOURCE:return"S".concat(t);case ae.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}(e);return this.types.set(n,t),e===ae.SOURCE?this.dragSources.set(n,r):e===ae.TARGET&&this.dropTargets.set(n,r),n}}],r&&ve(t.prototype,r),e}();function Ce(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(t=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__,P(re,t&&r&&r({name:"dnd-core",instanceId:"dnd-core"}))),a=new se(i,new Se(i)),s=new T(i,a),l=e(s,n,o);return s.receiveBackend(l),s}var Ee=r("p/5y"),Te=["children"];function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:Pe(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=t;return o[Me]||(o[Me]={dragDropManager:Ce(e,t,r,n)}),o[Me]}(e.backend,e.context,e.options,e.debugMode);return[t,!e.context]}(function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Te)),s=(r=2,function(e){if(Array.isArray(e))return e}(t=a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Ie(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ie(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=s[0],c=s[1];return(0,o.useEffect)(function(){if(c){var e=Pe();return++ke,function(){0===--ke&&(e[Me]=null)}}},[]),(0,n.jsx)(Ee.M.Provider,Object.assign({value:l},{children:i}),void 0)});function Pe(){return void 0!==r.g?r.g:window}},yl30(e,t,r){"use strict";var n=r("q1tI"),o=r("MgzW"),i=r("QCnb");function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r