import{a as be,b as mt,c as hB,d as Vf,e as Om,f as Ng,g as Ap,h as RJ,i as bt}from"./chunk-J4ERDEQQ.js";var Kw=Om((Jae,ele)=>{"use strict";(function(t,n){typeof Jae=="object"&&typeof ele<"u"?ele.exports=n():typeof define=="function"&&define.amd?define(n):(t=typeof globalThis<"u"?globalThis:t||self,t.mapboxgl=n())})(Jae,function(){"use strict";var t,n,e;function i(r,s){if(!t)t=s;else if(!n)n=s;else{var d="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 = {}; ("+t+")(sharedChunk); ("+n+")(sharedChunk); self.onerror = null;",m={};t(m),e=s(m),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(e.workerUrl=window.URL.createObjectURL(new Blob([d],{type:"text/javascript"})))}}i(["exports"],function(r){var s=1e-6,d=typeof Float32Array<"u"?Float32Array:Array;function m(u,a){var c=a[0],h=a[1],f=a[2],y=a[3],b=c*y-f*h;return b?(u[0]=y*(b=1/b),u[1]=-h*b,u[2]=-f*b,u[3]=c*b,u):null}function v(){var u=new d(9);return d!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[5]=0,u[6]=0,u[7]=0),u[0]=1,u[4]=1,u[8]=1,u}function w(u,a){var c=a[0],h=a[1],f=a[2],y=a[3],b=a[4],S=a[5],M=a[6],F=a[7],z=a[8];return u[0]=b*z-S*F,u[1]=f*F-h*z,u[2]=h*S-f*b,u[3]=S*M-y*z,u[4]=c*z-f*M,u[5]=f*y-c*S,u[6]=y*F-b*M,u[7]=h*M-c*F,u[8]=c*b-h*y,u}function O(u,a,c){var h=a[0],f=a[1],y=a[2],b=a[3],S=a[4],M=a[5],F=a[6],z=a[7],U=a[8],j=c[0],Z=c[1],X=c[2],ue=c[3],pe=c[4],me=c[5],Ae=c[6],Me=c[7],Be=c[8];return u[0]=j*h+Z*b+X*F,u[1]=j*f+Z*S+X*z,u[2]=j*y+Z*M+X*U,u[3]=ue*h+pe*b+me*F,u[4]=ue*f+pe*S+me*z,u[5]=ue*y+pe*M+me*U,u[6]=Ae*h+Me*b+Be*F,u[7]=Ae*f+Me*S+Be*z,u[8]=Ae*y+Me*M+Be*U,u}function N(){var u=new d(16);return d!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u}function V(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u}function $(u,a){var c=a[0],h=a[1],f=a[2],y=a[3],b=a[4],S=a[5],M=a[6],F=a[7],z=a[8],U=a[9],j=a[10],Z=a[11],X=a[12],ue=a[13],pe=a[14],me=a[15],Ae=c*S-h*b,Me=c*M-f*b,Be=c*F-y*b,nt=h*M-f*S,ot=h*F-y*S,pt=f*F-y*M,Ct=z*ue-U*X,Tt=z*pe-j*X,ai=z*me-Z*X,Mt=U*pe-j*ue,gi=U*me-Z*ue,Oi=j*me-Z*pe,vi=Ae*Oi-Me*gi+Be*Mt+nt*ai-ot*Tt+pt*Ct;return vi?(u[0]=(S*Oi-M*gi+F*Mt)*(vi=1/vi),u[1]=(f*gi-h*Oi-y*Mt)*vi,u[2]=(ue*pt-pe*ot+me*nt)*vi,u[3]=(j*ot-U*pt-Z*nt)*vi,u[4]=(M*ai-b*Oi-F*Tt)*vi,u[5]=(c*Oi-f*ai+y*Tt)*vi,u[6]=(pe*Be-X*pt-me*Me)*vi,u[7]=(z*pt-j*Be+Z*Me)*vi,u[8]=(b*gi-S*ai+F*Ct)*vi,u[9]=(h*ai-c*gi-y*Ct)*vi,u[10]=(X*ot-ue*Be+me*Ae)*vi,u[11]=(U*Be-z*ot-Z*Ae)*vi,u[12]=(S*Tt-b*Mt-M*Ct)*vi,u[13]=(c*Mt-h*Tt+f*Ct)*vi,u[14]=(ue*Me-X*nt-pe*Ae)*vi,u[15]=(z*nt-U*Me+j*Ae)*vi,u):null}function q(u,a,c){var h=a[0],f=a[1],y=a[2],b=a[3],S=a[4],M=a[5],F=a[6],z=a[7],U=a[8],j=a[9],Z=a[10],X=a[11],ue=a[12],pe=a[13],me=a[14],Ae=a[15],Me=c[0],Be=c[1],nt=c[2],ot=c[3];return u[0]=Me*h+Be*S+nt*U+ot*ue,u[1]=Me*f+Be*M+nt*j+ot*pe,u[2]=Me*y+Be*F+nt*Z+ot*me,u[3]=Me*b+Be*z+nt*X+ot*Ae,u[4]=(Me=c[4])*h+(Be=c[5])*S+(nt=c[6])*U+(ot=c[7])*ue,u[5]=Me*f+Be*M+nt*j+ot*pe,u[6]=Me*y+Be*F+nt*Z+ot*me,u[7]=Me*b+Be*z+nt*X+ot*Ae,u[8]=(Me=c[8])*h+(Be=c[9])*S+(nt=c[10])*U+(ot=c[11])*ue,u[9]=Me*f+Be*M+nt*j+ot*pe,u[10]=Me*y+Be*F+nt*Z+ot*me,u[11]=Me*b+Be*z+nt*X+ot*Ae,u[12]=(Me=c[12])*h+(Be=c[13])*S+(nt=c[14])*U+(ot=c[15])*ue,u[13]=Me*f+Be*M+nt*j+ot*pe,u[14]=Me*y+Be*F+nt*Z+ot*me,u[15]=Me*b+Be*z+nt*X+ot*Ae,u}function W(u,a,c){var h,f,y,b,S,M,F,z,U,j,Z,X,ue=c[0],pe=c[1],me=c[2];return a===u?(u[12]=a[0]*ue+a[4]*pe+a[8]*me+a[12],u[13]=a[1]*ue+a[5]*pe+a[9]*me+a[13],u[14]=a[2]*ue+a[6]*pe+a[10]*me+a[14],u[15]=a[3]*ue+a[7]*pe+a[11]*me+a[15]):(f=a[1],y=a[2],b=a[3],S=a[4],M=a[5],F=a[6],z=a[7],U=a[8],j=a[9],Z=a[10],X=a[11],u[0]=h=a[0],u[1]=f,u[2]=y,u[3]=b,u[4]=S,u[5]=M,u[6]=F,u[7]=z,u[8]=U,u[9]=j,u[10]=Z,u[11]=X,u[12]=h*ue+S*pe+U*me+a[12],u[13]=f*ue+M*pe+j*me+a[13],u[14]=y*ue+F*pe+Z*me+a[14],u[15]=b*ue+z*pe+X*me+a[15]),u}function te(u,a,c){var h=c[0],f=c[1],y=c[2];return u[0]=a[0]*h,u[1]=a[1]*h,u[2]=a[2]*h,u[3]=a[3]*h,u[4]=a[4]*f,u[5]=a[5]*f,u[6]=a[6]*f,u[7]=a[7]*f,u[8]=a[8]*y,u[9]=a[9]*y,u[10]=a[10]*y,u[11]=a[11]*y,u[12]=a[12],u[13]=a[13],u[14]=a[14],u[15]=a[15],u}function fe(u,a,c){var h=Math.sin(c),f=Math.cos(c),y=a[4],b=a[5],S=a[6],M=a[7],F=a[8],z=a[9],U=a[10],j=a[11];return a!==u&&(u[0]=a[0],u[1]=a[1],u[2]=a[2],u[3]=a[3],u[12]=a[12],u[13]=a[13],u[14]=a[14],u[15]=a[15]),u[4]=y*f+F*h,u[5]=b*f+z*h,u[6]=S*f+U*h,u[7]=M*f+j*h,u[8]=F*f-y*h,u[9]=z*f-b*h,u[10]=U*f-S*h,u[11]=j*f-M*h,u}function xe(u,a,c){var h=Math.sin(c),f=Math.cos(c),y=a[0],b=a[1],S=a[2],M=a[3],F=a[8],z=a[9],U=a[10],j=a[11];return a!==u&&(u[4]=a[4],u[5]=a[5],u[6]=a[6],u[7]=a[7],u[12]=a[12],u[13]=a[13],u[14]=a[14],u[15]=a[15]),u[0]=y*f-F*h,u[1]=b*f-z*h,u[2]=S*f-U*h,u[3]=M*f-j*h,u[8]=y*h+F*f,u[9]=b*h+z*f,u[10]=S*h+U*f,u[11]=M*h+j*f,u}function Fe(u,a,c){var h=Math.sin(c),f=Math.cos(c),y=a[0],b=a[1],S=a[2],M=a[3],F=a[4],z=a[5],U=a[6],j=a[7];return a!==u&&(u[8]=a[8],u[9]=a[9],u[10]=a[10],u[11]=a[11],u[12]=a[12],u[13]=a[13],u[14]=a[14],u[15]=a[15]),u[0]=y*f+F*h,u[1]=b*f+z*h,u[2]=S*f+U*h,u[3]=M*f+j*h,u[4]=F*f-y*h,u[5]=z*f-b*h,u[6]=U*f-S*h,u[7]=j*f-M*h,u}function Re(u,a){return u[0]=a[0],u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=a[1],u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=a[2],u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u}function Se(u,a,c){var h,f,y,b=c[0],S=c[1],M=c[2],F=Math.sqrt(b*b+S*S+M*M);return F0&&(y=1/Math.sqrt(y)),u[0]=a[0]*y,u[1]=a[1]*y,u[2]=a[2]*y,u}function Fo(u,a){return u[0]*a[0]+u[1]*a[1]+u[2]*a[2]}function Cn(u,a,c){var h=a[0],f=a[1],y=a[2],b=c[0],S=c[1],M=c[2];return u[0]=f*M-y*S,u[1]=y*b-h*M,u[2]=h*S-f*b,u}function zn(u,a,c,h){var f=a[0],y=a[1],b=a[2];return u[0]=f+h*(c[0]-f),u[1]=y+h*(c[1]-y),u[2]=b+h*(c[2]-b),u}function Co(u,a,c){var h=a[0],f=a[1],y=a[2],b=c[3]*h+c[7]*f+c[11]*y+c[15];return u[0]=(c[0]*h+c[4]*f+c[8]*y+c[12])/(b=b||1),u[1]=(c[1]*h+c[5]*f+c[9]*y+c[13])/b,u[2]=(c[2]*h+c[6]*f+c[10]*y+c[14])/b,u}function ro(u,a,c){var h=a[0],f=a[1],y=a[2];return u[0]=h*c[0]+f*c[3]+y*c[6],u[1]=h*c[1]+f*c[4]+y*c[7],u[2]=h*c[2]+f*c[5]+y*c[8],u}function pr(u,a,c){var h=c[0],f=c[1],y=c[2],b=c[3],S=a[0],M=a[1],F=a[2],z=f*F-y*M,U=y*S-h*F,j=h*M-f*S;return u[0]=S+b*(z+=z)+f*(j+=j)-y*(U+=U),u[1]=M+b*U+y*z-h*j,u[2]=F+b*j+h*U-f*z,u}function Qr(u){return u[0]=0,u[1]=0,u[2]=0,u}function Ee(u,a){return u[0]===a[0]&&u[1]===a[1]&&u[2]===a[2]}var xi=ei,bi=li,Dt=Et;function _t(){var u=new d(4);return d!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0,u[3]=0),u}function Zt(u,a,c){return u[0]=a[0]*c,u[1]=a[1]*c,u[2]=a[2]*c,u[3]=a[3]*c,u}function Ji(u,a){var c=a[0],h=a[1],f=a[2],y=a[3],b=c*c+h*h+f*f+y*y;return b>0&&(b=1/Math.sqrt(b)),u[0]=c*b,u[1]=h*b,u[2]=f*b,u[3]=y*b,u}function sn(u,a,c){var h=a[0],f=a[1],y=a[2],b=a[3];return u[0]=c[0]*h+c[4]*f+c[8]*y+c[12]*b,u[1]=c[1]*h+c[5]*f+c[9]*y+c[13]*b,u[2]=c[2]*h+c[6]*f+c[10]*y+c[14]*b,u[3]=c[3]*h+c[7]*f+c[11]*y+c[15]*b,u}function Ci(){var u=new d(4);return d!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0),u[3]=1,u}function Un(u){return u[0]=0,u[1]=0,u[2]=0,u[3]=1,u}function po(u,a,c){c*=.5;var h=a[0],f=a[1],y=a[2],b=a[3],S=Math.sin(c),M=Math.cos(c);return u[0]=h*M+b*S,u[1]=f*M+y*S,u[2]=y*M-f*S,u[3]=b*M-h*S,u}function Pn(u,a,c){c*=.5;var h=a[0],f=a[1],y=a[2],b=a[3],S=Math.sin(c),M=Math.cos(c);return u[0]=h*M-y*S,u[1]=f*M+b*S,u[2]=y*M+h*S,u[3]=b*M-f*S,u}yt(),_t();var go,Ar,Ur,$l=Ji,vu=(go=yt(),Ar=we(1,0,0),Ur=we(0,1,0),function(u,a,c){var h=Fo(a,c);return h<-.999999?(Cn(go,Ar,a),Dt(go)<1e-6&&Cn(go,Ur,a),vn(go,go),(function(f,y,b){b*=.5;var S=Math.sin(b);f[0]=S*y[0],f[1]=S*y[1],f[2]=S*y[2],f[3]=Math.cos(b)})(u,go,Math.PI),u):h>.999999?(u[0]=0,u[1]=0,u[2]=0,u[3]=1,u):(Cn(go,a,c),u[0]=go[0],u[1]=go[1],u[2]=go[2],u[3]=1+h,$l(u,u))});function ua(){var u=new d(2);return d!=Float32Array&&(u[0]=0,u[1]=0),u}function Sl(u,a){var c=new d(2);return c[0]=u,c[1]=a,c}function La(u,a,c){return u[0]=a,u[1]=c,u}function iu(u,a,c){return u[0]=a[0]+c[0],u[1]=a[1]+c[1],u}function Ku(u,a,c){return u[0]=a[0]-c[0],u[1]=a[1]-c[1],u}function dd(u,a,c){return u[0]=a[0]*c,u[1]=a[1]*c,u}function _m(u){var a=u[0],c=u[1];return Math.sqrt(a*a+c*c)}function qa(u,a){var c=a[0],h=a[1],f=c*c+h*h;return f>0&&(f=1/Math.sqrt(f)),u[0]=a[0]*f,u[1]=a[1]*f,u}function Yc(u,a){return u[0]*a[0]+u[1]*a[1]}Ci(),Ci(),v();var Ry,mf,nu=Ku;function fg(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}ua();var Gx=(function(){if(mf)return Ry;function u(a,c,h,f){this.cx=3*a,this.bx=3*(h-a)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*c,this.by=3*(f-c)-this.cy,this.ay=1-this.cy-this.by,this.p1x=a,this.p1y=c,this.p2x=h,this.p2y=f}return mf=1,Ry=u,u.prototype={sampleCurveX:function(a){return((this.ax*a+this.bx)*a+this.cx)*a},sampleCurveY:function(a){return((this.ay*a+this.by)*a+this.cy)*a},sampleCurveDerivativeX:function(a){return(3*this.ax*a+2*this.bx)*a+this.cx},solveCurveX:function(a,c){if(c===void 0&&(c=1e-6),a<0)return 0;if(a>1)return 1;for(var h=a,f=0;f<8;f++){var y=this.sampleCurveX(h)-a;if(Math.abs(y)y?S=h:M=h,h=.5*(M-S)+S;return h},solve:function(a,c){return this.sampleCurveY(this.solveCurveX(a,c))}},Ry})(),SS=fg(Gx);function Pi(u,a){this.x=u,this.y=a}function gg(u,a){if(Array.isArray(u)){if(!Array.isArray(a)||u.length!==a.length)return!1;for(let c=0;c=1)return 1;let a=u*u,c=a*u;return 4*(u<.5?c:3*(u-a)+c-.75)}function ht(u,a,c,h){let f=new SS(u,a,c,h);return function(y){return f.solve(y)}}let at=ht(.25,.1,.25,1);function st(u,a,c){return Math.min(c,Math.max(a,u))}function qt(u,a,c){return(c=st((c-u)/(a-u),0,1))*c*(3-2*c)}function It(u,a,c){let h=c-a,f=((u-a)%h+h)%h+a;return f===a?c:f}function Wt(u,a,c){if(!u.length)return c(null,[]);let h=u.length,f=new Array(u.length),y=null;u.forEach((b,S)=>{a(b,(M,F)=>{M&&(y=M),f[S]=F,--h==0&&c(y,f)})})}let $i=1;function Ti(){return $i++}function qn(u){return u<=1?1:Math.pow(2,Math.ceil(Math.log2(u)))}function So(u,a){u.forEach(c=>{a[c]&&(a[c]=a[c].bind(a))})}function No(u,a,c){let h={};for(let f in u)h[f]=a.call(this,u[f],f,u);return h}function Or(u,a,c){let h={};for(let f in u)a.call(this,u[f],f,u)&&(h[f]=u[f]);return h}function fr(u){return Array.isArray(u)?u.map(fr):typeof u=="object"&&u?No(u,fr):u}function Hr(u,a){for(let c=0;c=0)return!0;return!1}let pa={};function Er(u){pa[u]||(typeof console<"u"&&console.warn(u),pa[u]=!0)}function Ll(u,a,c){return(c.y-u.y)*(a.x-u.x)>(a.y-u.y)*(c.x-u.x)}function Xl(u){let a=0;for(let c,h,f=0,y=u.length,b=y-1;f@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(c,h,f,y)=>{let b=f||y;return a[h]=!b||b.toLowerCase(),""}),a["max-age"]){let c=parseInt(a["max-age"],10);isNaN(c)?delete a["max-age"]:a["max-age"]=c}return a}let ml=null;function fl(u,a){return[u[4*a],u[4*a+1],u[4*a+2],u[4*a+3]]}function xa(u,a,c,h){for(;a>1;u[f]>1;u[f]<=h?a=f+1:c=f}return a}function Wu(u){return u>0?1/(1.001-u):1+u}function Dh(u){return u>0?1-1/(1.001-u):-u}function v_(u,a,c){return(u-a.min)*(c.max-c.min)/(a.max-a.min)+c.min}let ou={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i},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(!ou.API_URL)return null;try{let u=new URL(ou.API_URL);return u.hostname==="api.mapbox.cn"?"https://events.mapbox.cn/events/v2":u.hostname==="api.mapbox.com"?"https://events.mapbox.com/events/v2":null}catch{return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",RASTERARRAYS_URL_PREFIX:"rasterarrays/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,DEFAULT_STYLE:"mapbox://styles/mapbox/standard",MAX_PARALLEL_IMAGE_REQUESTS:16,DRACO_URL:"https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm",MESHOPT_URL:"https://api.mapbox.com/mapbox-gl-js/meshopt_base_v0.20.wasm",MESHOPT_SIMD_URL:"https://api.mapbox.com/mapbox-gl-js/meshopt_simd_v0.20.wasm",BUILDING_GEN_URL:"https://api.mapbox.com/mapbox-gl-js/building-gen/building_gen_v1.2.3.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",TILES3D_URL_PREFIX:"3dtiles/v1"};function Fy(u){return ou.API_URL_REGEX.test(u)}function aD(u){return ou.API_SPRITE_REGEX.test(u)}let _g,bb,Cb,T0,b_,$x;function TS(){return _g==null&&(_g=self.OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),_g}let ff={now:()=>T0!==void 0?T0:performance.now(),setNow(u){T0=u},restoreNow(){T0=void 0},frame(u){let a=requestAnimationFrame(u);return{cancel:()=>cancelAnimationFrame(a)}},getImageData(u,a=0){let{width:c,height:h}=u;b_||(b_=document.createElement("canvas"));let f=b_.getContext("2d",{willReadFrequently:!0});if(!f)throw new Error("failed to create canvas 2d context");return(c>b_.width||h>b_.height)&&(b_.width=c,b_.height=h),f.clearRect(-a,-a,c+2*a,h+2*a),f.drawImage(u,0,0,c,h),f.getImageData(-a,-a,c+2*a,h+2*a)},resolveURL:u=>(bb||(bb=document.createElement("a")),bb.href=u,bb.href),get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(Cb==null&&(Cb=window.matchMedia("(prefers-reduced-motion: reduce)")),Cb.matches)},hasCanvasFingerprintNoise(){if($x!==void 0)return $x;if(!TS())return $x=!1,!1;let u=new OffscreenCanvas(85,1),a=u.getContext("2d",{willReadFrequently:!0}),c=0;for(let f=0;f0?`?${y}`:""}`}let Xp="mapbox-tiles",Ah=500,gf=50,Yu=["language","worldview","jobid"],bu,I0;function lD(){try{return caches}catch{}}function xb(){let u=lD();u&&bu==null&&(bu=u.open(Xp))}let C_=1/0,wb={supported:!1,testSupport:function(u){!kh&&Tb&&(cD?Ib(u):Sb=u)}},Sb,Tb,kh=!1,cD=!1,Kx=typeof self<"u"?self:{};function Ib(u){let a=u.createTexture();u.bindTexture(u.TEXTURE_2D,a);try{if(u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,Tb),u.isContextLost())return;wb.supported=!0}catch{}u.deleteTexture(a),kh=!0}Kx.document&&(Tb=Kx.document.createElement("img"),Tb.onload=function(){Sb&&Ib(Sb),Sb=null,cD=!0},Tb.onerror=function(){kh=!0,Sb=null},Tb.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");let ES={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Iconset:"Iconset",Image:"Image",Model:"Model"};typeof Object.freeze=="function"&&Object.freeze(ES);class dD extends Error{constructor(a,c,h){c===401&&Fy(h)&&(a+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(a),this.status=c,this.url=h}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}let DS=oa()?()=>self.worker.referrer:()=>(location.protocol==="blob:"?parent:self).location.href,jr=function(u,a){if(!(/^file:/.test(c=u.url)||/^file:/.test(DS())&&!/^\w+:/.test(c))){if(self.fetch&&self.Request&&self.AbortController&&Request.prototype.hasOwnProperty("signal"))return(function(h,f){let y=new AbortController,b=new Request(h.url,{method:h.method||"GET",body:h.body,credentials:h.credentials,headers:h.headers,referrer:DS(),referrerPolicy:h.referrerPolicy,signal:y.signal}),S=!1,M=!1,F=(z=b.url).indexOf("sku=")>0&&Fy(z);var z;h.type==="json"&&b.headers.set("Accept","application/json");let U=(Z,X,ue)=>{if(M)return;if(Z&&Z.message!=="SecurityError"&&Er(Z.toString()),X&&ue)return j(X);let pe=Date.now();fetch(b).then(me=>{if(me.ok){let Ae=F?me.clone():null;return j(me,Ae,pe)}return f(new dD(me.statusText,me.status,h.url))}).catch(me=>{me.name!=="AbortError"&&f(new Error(`${me.message} ${h.url}`))})},j=(Z,X,ue)=>{(h.type==="arrayBuffer"?Z.arrayBuffer():h.type==="json"?Z.json():Z.text()).then(pe=>{M||(X&&ue&&(function(me,Ae,Me){if(xb(),bu==null)return;let Be=Ss(Ae.headers.get("Cache-Control")||"");if(Be["no-store"])return;let nt={status:Ae.status,statusText:Ae.statusText,headers:new Headers};Ae.headers.forEach((Ct,Tt)=>nt.headers.set(Tt,Ct)),Be["max-age"]&&nt.headers.set("Expires",new Date(Me+1e3*Be["max-age"]).toUTCString());let ot=nt.headers.get("Expires");if(!ot||new Date(ot).getTime()-Me<42e4)return;let pt=IS(me.url,{persistentParams:Yu});if(Ae.status===206){let Ct=me.headers.get("Range");if(!Ct)return;nt.status=200,pt=qx(pt,{range:Ct})}(function(Ct,Tt){if(I0===void 0)try{new Response(new ReadableStream),I0=!0}catch{I0=!1}I0?Tt(Ct.body):Ct.blob().then(Tt).catch(ai=>Er(ai.message))})(Ae,Ct=>{let Tt=new Response((ai=Ae.status)!==200&&ai!==404&&[101,103,204,205,304].includes(ai)?null:Ct,nt);var ai;xb(),bu?.then(Mt=>Mt.put(pt,Tt)).catch(Mt=>Er(Mt.message))})})(b,X,ue),S=!0,f(null,pe,Z.headers.get("Cache-Control"),Z.headers.get("Expires")))}).catch(pe=>{M||f(new Error(pe.message))})};return F?(function(Z,X){if(xb(),bu==null)return X(null);bu.then(ue=>{let pe=IS(Z.url,{persistentParams:Yu}),me=Z.headers.get("Range");me&&(pe=qx(pe,{range:me})),ue.match(pe).then(Ae=>{let Me=(function(Be){if(!Be)return!1;let nt=new Date(Be.headers.get("Expires")||0),ot=Ss(Be.headers.get("Cache-Control")||"");return Number(nt)>Date.now()&&!ot["no-cache"]})(Ae);ue.delete(pe).catch(X),Me&&ue.put(pe,Ae.clone()).catch(X),X(null,Ae,Me)}).catch(X)}).catch(X)})(b,U):U(null,null),{cancel:()=>{M=!0,S||y.abort()}}})(u,a);if(oa(self)&&self.worker.actor)return self.worker.actor.send("getResource",u,a,void 0,!0)}var c;return(function(h,f){let y=new XMLHttpRequest;y.open(h.method||"GET",h.url,!0),h.type==="arrayBuffer"&&(y.responseType="arraybuffer");for(let b in h.headers)y.setRequestHeader(b,h.headers[b]);return h.type==="json"&&(y.responseType="text",y.setRequestHeader("Accept","application/json")),y.withCredentials=h.credentials==="include",y.onerror=()=>{f(new Error(y.statusText))},y.onload=()=>{if((y.status>=200&&y.status<300||y.status===0)&&y.response!==null){let b=y.response;if(h.type==="json")try{b=JSON.parse(y.response)}catch(S){return f(S)}f(null,b,y.getResponseHeader("Cache-Control"),y.getResponseHeader("Expires"))}else f(new dD(y.statusText,y.status,h.url))},y.send(h.body),{cancel:()=>y.abort()}})(u,a)},Eb=function(u,a){return jr(Object.assign(u,{type:"arrayBuffer"}),a)};function xM(u){let a=document.createElement("a");return a.href=u,a.protocol===location.protocol&&a.host===location.host}let wM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",AS,E0;AS=[],E0=0;let Tl=function(u,a){if(wb.supported&&(u.headers||(u.headers={}),u.headers.accept="image/webp,*/*"),E0>=ou.MAX_PARALLEL_IMAGE_REQUESTS){let y={requestParameters:u,callback:a,cancelled:!1,cancel(){this.cancelled=!0}};return AS.push(y),y}E0++;let c=!1,h=()=>{if(!c)for(c=!0,E0--;AS.length&&E0{h(),y?a(y):b&&(self.createImageBitmap?(function(F,z){let U=new Blob([new Uint8Array(F)],{type:"image/png"});createImageBitmap(U).then(j=>{z(null,j)}).catch(j=>{z(new Error(`Could not load image because of ${j.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})})(b,(F,z)=>a(F,z,S,M)):(function(F,z){let U=new Image;U.onload=()=>{z(null,U),URL.revokeObjectURL(U.src),U.onload=null,requestAnimationFrame(()=>{U.src=wM})},U.onerror=()=>z(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."));let j=new Blob([new Uint8Array(F)],{type:"image/png"});U.src=F.byteLength?URL.createObjectURL(j):wM})(b,(F,z)=>a(F,z,S,M)))});return{cancel:()=>{f.cancel(),h()}}};var Il,kS,SM,Py={exports:{}},TM={exports:{}},uD={exports:{}},Db=(function(){if(SM)return Py.exports;SM=1;var u=(Il||(Il=1,TM.exports=function(c,h){var f,y,b,S,M,F,z,U;for(y=c.length-(f=3&c.length),b=h,M=3432918353,F=461845907,U=0;U>>16)*M&65535)<<16)&4294967295)<<15|z>>>17))*F+(((z>>>16)*F&65535)<<16)&4294967295)<<13|b>>>19))+((5*(b>>>16)&65535)<<16)&4294967295))+((58964+(S>>>16)&65535)<<16);switch(z=0,f){case 3:z^=(255&c.charCodeAt(U+2))<<16;case 2:z^=(255&c.charCodeAt(U+1))<<8;case 1:b^=z=(65535&(z=(z=(65535&(z^=255&c.charCodeAt(U)))*M+(((z>>>16)*M&65535)<<16)&4294967295)<<15|z>>>17))*F+(((z>>>16)*F&65535)<<16)&4294967295}return b^=c.length,b=2246822507*(65535&(b^=b>>>16))+((2246822507*(b>>>16)&65535)<<16)&4294967295,b=3266489909*(65535&(b^=b>>>13))+((3266489909*(b>>>16)&65535)<<16)&4294967295,(b^=b>>>16)>>>0}),TM.exports),a=(kS||(kS=1,uD.exports=function(c,h){for(var f,y=c.length,b=h^y,S=0;y>=4;)f=1540483477*(65535&(f=255&c.charCodeAt(S)|(255&c.charCodeAt(++S))<<8|(255&c.charCodeAt(++S))<<16|(255&c.charCodeAt(++S))<<24))+((1540483477*(f>>>16)&65535)<<16),b=1540483477*(65535&b)+((1540483477*(b>>>16)&65535)<<16)^(f=1540483477*(65535&(f^=f>>>24))+((1540483477*(f>>>16)&65535)<<16)),y-=4,++S;switch(y){case 3:b^=(255&c.charCodeAt(S+2))<<16;case 2:b^=(255&c.charCodeAt(S+1))<<8;case 1:b=1540483477*(65535&(b^=255&c.charCodeAt(S)))+((1540483477*(b>>>16)&65535)<<16)}return b=1540483477*(65535&(b^=b>>>13))+((1540483477*(b>>>16)&65535)<<16),(b^=b>>>15)>>>0}),uD.exports);return Py.exports=u,Py.exports.murmur3=u,Py.exports.murmur2=a,Py.exports})(),Wx=fg(Db);class _f{constructor(a,...c){Object.assign(this,c[0]||{}),this.type=a}}class Qc extends _f{constructor(a,c={}){super("error",Object.assign({error:a},c))}}function Ab(u,a,c){c[u]&&c[u].indexOf(a)!==-1||(c[u]=c[u]||[],c[u].push(a))}function Nd(u,a,c){if(c&&c[u]){let h=c[u].indexOf(a);h!==-1&&c[u].splice(h,1)}}class D0{on(a,c){return this._listeners=this._listeners||{},Ab(a,c,this._listeners),this}off(a,c){return Nd(a,c,this._listeners),Nd(a,c,this._oneTimeListeners),this}once(a,c){return c?(this._oneTimeListeners=this._oneTimeListeners||{},Ab(a,c,this._oneTimeListeners),this):new Promise(h=>{this.once(a,h)})}fire(a,c){let h=typeof a=="string"?new _f(a,c):a,f=h.type;if(this.listens(f)){h.target=this;let y=this._listeners&&this._listeners[f]?this._listeners[f].slice():[];for(let M of y)M.call(this,h);let b=this._oneTimeListeners&&this._oneTimeListeners[f]?this._oneTimeListeners[f].slice():[];for(let M of b)Nd(f,M,this._oneTimeListeners),M.call(this,h);let S=this._eventedParent;if(S){let M=typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData;Object.assign(h,M),S.fire(h)}}else h instanceof Qc&&console.error(h.error);return this}listens(a){return!!(this._listeners&&this._listeners[a]&&this._listeners[a].length>0||this._oneTimeListeners&&this._oneTimeListeners[a]&&this._oneTimeListeners[a].length>0||this._eventedParent&&this._eventedParent.listens(a))}setEventedParent(a,c){return this._eventedParent=a,this._eventedParentData=c,this}}class xp{constructor(a){typeof a=="string"?this.name=a:(this.name=a.name,this.iconsetId=a.iconsetId)}static from(a){return new xp(a)}static toString(a){return a.iconsetId?`${a.name}${a.iconsetId}`:a.name}static parse(a){let[c,h]=a.split("");return new xp({name:c,iconsetId:h})}static isEqual(a,c){return a.name===c.name&&a.iconsetId===c.iconsetId}toString(){return xp.toString(this)}serialize(){return{name:this.name,iconsetId:this.iconsetId}}}var Jp,Yx={},MS=(function(){if(Jp)return Yx;Jp=1;var u={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 a(y){return(y=Math.round(y))<0?0:y>255?255:y}function c(y){return a(y[y.length-1]==="%"?parseFloat(y)/100*255:parseInt(y))}function h(y){return(b=y[y.length-1]==="%"?parseFloat(y)/100:parseFloat(y))<0?0:b>1?1:b;var b}function f(y,b,S){return S<0?S+=1:S>1&&(S-=1),6*S<1?y+(b-y)*S*6:2*S<1?b:3*S<2?y+(b-y)*(2/3-S)*6:y}try{Yx.parseCSSColor=function(y){var b,S=y.replace(/ /g,"").toLowerCase();if(S in u)return u[S].slice();if(S[0]==="#")return S.length===4?(b=parseInt(S.substr(1),16))>=0&&b<=4095?[(3840&b)>>4|(3840&b)>>8,240&b|(240&b)>>4,15&b|(15&b)<<4,1]:null:S.length===7&&(b=parseInt(S.substr(1),16))>=0&&b<=16777215?[(16711680&b)>>16,(65280&b)>>8,255&b,1]:null;var M=S.indexOf("("),F=S.indexOf(")");if(M!==-1&&F+1===S.length){var z=S.substr(0,M),U=S.substr(M+1,F-(M+1)).split(","),j=1;switch(z){case"rgba":if(U.length!==4)return null;j=h(U.pop());case"rgb":return U.length!==3?null:[c(U[0]),c(U[1]),c(U[2]),j];case"hsla":if(U.length!==4)return null;j=h(U.pop());case"hsl":if(U.length!==3)return null;var Z=(parseFloat(U[0])%360+360)%360/360,X=h(U[1]),ue=h(U[2]),pe=ue<=.5?ue*(X+1):ue+X-ue*X,me=2*ue-pe;return[a(255*f(me,pe,Z+1/3)),a(255*f(me,pe,Z)),a(255*f(me,pe,Z-1/3)),j];default:return null}}return null}}catch{}return Yx})();class Ts{constructor(a,c,h,f=1){this.r=a,this.g=c,this.b=h,this.a=f}static parse(a){if(!a)return;if(a instanceof Ts)return a;if(typeof a!="string")return;let c=MS.parseCSSColor(a);return c?new Ts(c[0]/255,c[1]/255,c[2]/255,c[3]):void 0}toString(){let[a,c,h,f]=[this.r,this.g,this.b,this.a];return`rgba(${Math.round(255*a)},${Math.round(255*c)},${Math.round(255*h)},${f})`}toNonPremultipliedRenderColor(a){let{r:c,g:h,b:f,a:y}=this;return new pD(a,c,h,f,y)}toPremultipliedRenderColor(a){let{r:c,g:h,b:f,a:y}=this;return new Qx(a,c*y,h*y,f*y,y)}clone(){return new Ts(this.r,this.g,this.b,this.a)}}class OS{constructor(a,c,h,f,y,b=!1){if(this.premultiplied=!1,this.premultiplied=b,a){let S=a.image.height,M=S*S;this.premultiplied?(c=y===0?0:c/y*(S-1),h=y===0?0:h/y*(S-1),f=y===0?0:f/y*(S-1)):(c*=S-1,h*=S-1,f*=S-1);let F=Math.floor(c),z=Math.floor(h),U=Math.floor(f),j=Math.ceil(c),Z=Math.ceil(h),X=Math.ceil(f),ue=c-F,pe=h-z,me=f-U,Ae=a.image.data,Me=4*(F+z*M+U*S),Be=4*(F+z*M+X*S),nt=4*(F+Z*M+U*S),ot=4*(F+Z*M+X*S),pt=4*(j+z*M+U*S),Ct=4*(j+z*M+X*S),Tt=4*(j+Z*M+U*S),ai=4*(j+Z*M+X*S);if(Me<0||ai>=Ae.length)throw new Error("out of range");this.r=eo(eo(eo(Ae[Me],Ae[Be],me),eo(Ae[nt],Ae[ot],me),pe),eo(eo(Ae[pt],Ae[Ct],me),eo(Ae[Tt],Ae[ai],me),pe),ue)/255*(this.premultiplied?y:1),this.g=eo(eo(eo(Ae[Me+1],Ae[Be+1],me),eo(Ae[nt+1],Ae[ot+1],me),pe),eo(eo(Ae[pt+1],Ae[Ct+1],me),eo(Ae[Tt+1],Ae[ai+1],me),pe),ue)/255*(this.premultiplied?y:1),this.b=eo(eo(eo(Ae[Me+2],Ae[Be+2],me),eo(Ae[nt+2],Ae[ot+2],me),pe),eo(eo(Ae[pt+2],Ae[Ct+2],me),eo(Ae[Tt+2],Ae[ai+2],me),pe),ue)/255*(this.premultiplied?y:1),this.a=y}else this.r=c,this.g=h,this.b=f,this.a=y}toArray(){let{r:a,g:c,b:h,a:f}=this;return[255*a,255*c,255*h,f]}toHslaArray(){let{r:a,g:c,b:h,a:f}=this;if(this.premultiplied){if(f===0)return[0,0,0,0];let X=1/f;a*=X,c*=X,h*=X}let y=Math.min(Math.max(a,0),1),b=Math.min(Math.max(c,0),1),S=Math.min(Math.max(h,0),1),M=Math.min(y,b,S),F=Math.max(y,b,S),z=F-M,U=.5*(M+F);if(z===0)return[0,0,100*U,f];let j=U>.5?z/(2-F-M):z/(F+M),Z;switch(F){case y:Z=60*((b-S)/z+(beo(h,a[f],c))}Ts.black=new Ts(0,0,0,1),Ts.white=new Ts(1,1,1,1),Ts.transparent=new Ts(0,0,0,0),Ts.red=new Ts(1,0,0,1),Ts.blue=new Ts(0,0,1,1);var Ic=Object.freeze({__proto__:null,array:hD,color:function(u,a,c){return new Ts(eo(u.r,a.r,c),eo(u.g,a.g,c),eo(u.b,a.b,c),eo(u.a,a.a,c))},number:eo});class yf extends Error{constructor(a,c){super(c),this.message=c,this.key=a}}class Zx{constructor(a,c=[]){this.parent=a,this.bindings={};for(let[h,f]of c)this.bindings[h]=f}concat(a){return new Zx(this,a)}get(a){if(this.bindings[a])return this.bindings[a];if(this.parent)return this.parent.get(a);throw new Error(`${a} not found in scope.`)}has(a){return!!this.bindings[a]||!!this.parent&&this.parent.has(a)}}let Cu={kind:"null"},jn={kind:"number"},fs={kind:"string"},sr={kind:"boolean"},ud={kind:"color"},x_={kind:"object"},gs={kind:"value"},kb={kind:"collator"},A0={kind:"formatted"},Xx={kind:"resolvedImage"};function xu(u,a){return{kind:"array",itemType:u,N:a}}function fc(u){if(u.kind==="array"){let a=fc(u.itemType);return typeof u.N=="number"?`array<${a}, ${u.N}>`:u.itemType.kind==="value"?"array":`array<${a}>`}return u.kind}let RS=[Cu,jn,fs,sr,ud,A0,x_,xu(gs),Xx];function yg(u,a){if(a.kind==="error")return null;if(u.kind==="array"){if(a.kind==="array"&&(a.N===0&&a.itemType.kind==="value"||!yg(u.itemType,a.itemType))&&(typeof u.N!="number"||u.N===a.N))return null}else{if(u.kind===a.kind)return null;if(u.kind==="value"){for(let c of RS)if(!yg(c,a))return null}}return`Expected ${fc(u)} but found ${fc(a)} instead.`}function mD(u,a){return a.some(c=>c.kind===u.kind)}function Mb(u,a){return a.some(c=>c==="null"?u===null:c==="array"?Array.isArray(u):c==="object"?u&&!Array.isArray(u)&&typeof u=="object":c===typeof u)}function Ob(u,a){return u.kind==="array"&&a.kind==="array"?u.N===a.N&&Ob(u.itemType,a.itemType):u.kind===a.kind}class vg{constructor(a,c,h){this.sensitivity=a?c?"variant":"case":c?"accent":"base",this.locale=h,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(a,c){return this.collator.compare(a,c)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Rb{constructor(a,c,h,f,y){this.text=a.normalize?a.normalize():a,this.image=c,this.scale=h,this.fontStack=f,this.textColor=y}}class wu{constructor(a){this.sections=a}static fromString(a){return new wu([new Rb(a,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(a=>a.text.length!==0||!!a.image&&a.image.hasPrimary())}static factory(a){return a instanceof wu?a:wu.fromString(a)}toString(){return this.sections.length===0?"":this.sections.map(a=>a.text).join("")}serialize(){let a=["format"];for(let c of this.sections){if(c.image){let f=c.image.getPrimary().id.toString();a.push(["image",f]);continue}a.push(c.text);let h={};c.fontStack&&(h["text-font"]=["literal",c.fontStack.split(",")]),c.scale&&(h["font-scale"]=c.scale),c.textColor&&(h["text-color"]=["rgba"].concat(c.textColor.toNonPremultipliedRenderColor(null).toArray())),a.push(h)}return a}}class vf{constructor(a,c={}){if(this.id=xp.from(a),this.options=Object.assign({},c),c.transform){let{a:h,b:f,c:y,d:b,e:S,f:M}=c.transform;this.options.transform=new DOMMatrix([h,f,y,b,S,M])}else this.options.transform=new DOMMatrix([1,0,0,1,0,0])}toString(){let{a,b:c,c:h,d:f,e:y,f:b}=this.options.transform;return JSON.stringify({name:this.id.name,iconsetId:this.id.iconsetId,params:this.options.params,transform:{a,b:c,c:h,d:f,e:y,f:b}})}static parse(a){let c,h,f,y;try{({name:c,iconsetId:h,params:f,transform:y}=JSON.parse(a)||{})}catch{return null}if(!c)return null;let{a:b,b:S,c:M,d:F,e:z,f:U}=y||{};return new vf({name:c,iconsetId:h},{params:f,transform:new DOMMatrix([b,S,M,F,z,U])})}scaleSelf(a,c){return this.options.transform.scaleSelf(a,c),this}}class Su{constructor(a,c,h,f,y=!1){this.primaryId=xp.from(a),this.primaryOptions=c,h&&(this.secondaryId=xp.from(h)),this.secondaryOptions=f,this.available=y}toString(){return this.primaryId&&this.secondaryId?`[${this.primaryId.name},${this.secondaryId.name}]`:this.primaryId.name}hasPrimary(){return!!this.primaryId}getPrimary(){return new vf(this.primaryId,this.primaryOptions)}hasSecondary(){return!!this.secondaryId}getSecondary(){return this.secondaryId?new vf(this.secondaryId,this.secondaryOptions):null}static from(a){return typeof a=="string"?Su.build({name:a}):a}static build(a,c,h,f){return!a||typeof a=="object"&&!("name"in a)?null:new Su(a,h,c,f)}}function FS(u,a,c,h){return typeof u=="number"&&u>=0&&u<=255&&typeof a=="number"&&a>=0&&a<=255&&typeof c=="number"&&c>=0&&c<=255?h===void 0||typeof h=="number"&&h>=0&&h<=1?null:`Invalid rgba value [${[u,a,c,h].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof h=="number"?[u,a,c,h]:[u,a,c]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Fb(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof Ts||u instanceof vg||u instanceof wu||u instanceof Su)return!0;if(Array.isArray(u)){for(let a of u)if(!Fb(a))return!1;return!0}if(typeof u=="object"){for(let a in u)if(!Fb(u[a]))return!1;return!0}return!1}function Bc(u){if(u===null)return Cu;if(typeof u=="string")return fs;if(typeof u=="boolean")return sr;if(typeof u=="number")return jn;if(u instanceof Ts)return ud;if(u instanceof vg)return kb;if(u instanceof wu)return A0;if(u instanceof Su)return Xx;if(Array.isArray(u)){let a=u.length,c;for(let h of u){let f=Bc(h);if(c){if(c===f)continue;c=gs;break}c=f}return xu(c||gs,a)}return x_}function Jl(u){let a=typeof u;return u===null?"":a==="string"||a==="number"||a==="boolean"?String(u):u instanceof wu||u instanceof Su||u instanceof Ts?u.toString():JSON.stringify(u)}class Qo{constructor(a,c){this.type=a,this.value=c}static parse(a,c){if(a.length!==2)return c.error(`'literal' expression requires exactly one argument, but found ${a.length-1} instead.`);if(!Fb(a[1]))return c.error("invalid value");let h=a[1],f=Bc(h),y=c.expectedType;return f.kind!=="array"||f.N!==0||!y||y.kind!=="array"||typeof y.N=="number"&&y.N!==0||(f=y),new Qo(f,h)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Ts?["rgba"].concat(this.value.toNonPremultipliedRenderColor(null).toArray()):this.value instanceof wu?this.value.serialize():this.value}}class gn{constructor(a){this.name="ExpressionEvaluationError",this.message=a}toJSON(){return this.message}}let Pb={string:fs,number:jn,boolean:sr,object:x_};class xo{constructor(a,c){this.type=a,this.args=c}static parse(a,c){if(a.length<2)return c.error("Expected at least one argument.");let h,f=1,y=a[0];if(y==="array"){let S,M;if(a.length>2){let F=a[1];if(typeof F!="string"||!(F in Pb)||F==="object")return c.error('The item type argument of "array" must be one of string, number, boolean',1);S=Pb[F],f++}else S=gs;if(a.length>3){if(a[2]!==null&&(typeof a[2]!="number"||a[2]<0||a[2]!==Math.floor(a[2])))return c.error('The length argument to "array" must be a positive integer literal',2);M=a[2],f++}h=xu(S,M)}else h=Pb[y];let b=[];for(;fa.outputDefined())}serialize(){let a=this.type,c=[a.kind];if(a.kind==="array"){let h=a.itemType;if(h.kind==="string"||h.kind==="number"||h.kind==="boolean"){c.push(h.kind);let f=a.N;(typeof f=="number"||this.args.length>1)&&c.push(f)}}return c.concat(this.args.map(h=>h.serialize()))}}class Ly{constructor(a){this.type=A0,this.sections=a}static parse(a,c){if(a.length<2)return c.error("Expected at least one argument.");let h=a[1];if(!Array.isArray(h)&&typeof h=="object")return c.error("First argument must be an image or text section.");let f=[],y=!1;for(let b=1;b<=a.length-1;++b){let S=a[b];if(y&&typeof S=="object"&&!Array.isArray(S)){y=!1;let M=null;if(S["font-scale"]&&(M=c.parseObjectValue(S["font-scale"],b,"font-scale",jn),!M))return null;let F=null;if(S["text-font"]&&(F=c.parseObjectValue(S["text-font"],b,"text-font",xu(fs)),!F))return null;let z=null;if(S["text-color"]&&(z=c.parseObjectValue(S["text-color"],b,"text-color",ud),!z))return null;let U=f[f.length-1];U.scale=M,U.font=F,U.textColor=z}else{let M=c.parse(a[b],b,gs);if(!M)return null;let F=M.type.kind;if(F!=="string"&&F!=="value"&&F!=="null"&&F!=="resolvedImage")return c.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");y=!0,f.push({content:M,scale:null,font:null,textColor:null})}}return new Ly(f)}evaluate(a){return new wu(this.sections.map(c=>{let h=c.content.evaluate(a);return Ob(Bc(h),Xx)?new Rb("",h,null,null,null):new Rb(Jl(h),null,c.scale?c.scale.evaluate(a):null,c.font?c.font.evaluate(a).join(","):null,c.textColor?c.textColor.evaluate(a):null)}))}eachChild(a){for(let c of this.sections)a(c.content),c.scale&&a(c.scale),c.font&&a(c.font),c.textColor&&a(c.textColor)}outputDefined(){return!1}serialize(){let a=["format"];for(let c of this.sections){a.push(c.content.serialize());let h={};c.scale&&(h["font-scale"]=c.scale.serialize()),c.font&&(h["text-font"]=c.font.serialize()),c.textColor&&(h["text-color"]=c.textColor.serialize()),a.push(h)}return a}}class Lb{constructor(a,c,h,f){this._imageWarnHistory={},this.type=Xx,this.namePrimary=a,this.nameSecondary=c,h&&(this.paramsPrimary=h.params,this.iconsetIdPrimary=h.iconset?h.iconset.id:void 0),f&&(this.paramsSecondary=f.params,this.iconsetIdSecondary=f.iconset?f.iconset.id:void 0)}static parse(a,c){if(a.length<2)return c.error("Expected two or more arguments.");let h=1,f=[];function y(){if(hxp.isEqual(b,y)),f.available){let b=f.getSecondary()?f.getSecondary().id:null;b&&(f.available=a.availableImages.some(S=>xp.isEqual(S,b)))}}return f}eachChild(a){if(a(this.namePrimary),this.paramsPrimary)for(let c in this.paramsPrimary)this.paramsPrimary[c]&&a(this.paramsPrimary[c]);if(this.nameSecondary&&(a(this.nameSecondary),this.paramsSecondary))for(let c in this.paramsSecondary)this.paramsSecondary[c]&&a(this.paramsSecondary[c])}outputDefined(){return!1}serializeOptions(a,c){let h={};if(c&&(h.iconset={id:c}),a){h.params={};for(let f in a)a[f]&&(h.params[f]=a[f].serialize())}return Object.keys(h).length>0?h:void 0}serialize(){let a=["image",this.namePrimary.serialize()];if(this.paramsPrimary||this.iconsetIdPrimary){let c=this.serializeOptions(this.paramsPrimary,this.iconsetIdPrimary);c&&a.push(c)}if(this.nameSecondary&&(a.push(this.nameSecondary.serialize()),this.paramsSecondary||this.iconsetIdSecondary)){let c=this.serializeOptions(this.paramsSecondary,this.iconsetIdSecondary);c&&a.push(c)}return a}}function Do(u){return Jx(u)?"string":bg(u)?"number":gD(u)?"boolean":Array.isArray(u)?"array":u===null?"null":fD(u)?"object":typeof u}function fD(u){return u!=null&&!Array.isArray(u)&&typeof u!="function"&&!(u instanceof String||u instanceof Number||u instanceof Boolean)&&typeof u=="object"}function Jx(u){return typeof u=="string"||u instanceof String}function bg(u){return typeof u=="number"||u instanceof Number}function gD(u){return typeof u=="boolean"||u instanceof Boolean}let PS={"to-boolean":sr,"to-color":ud,"to-number":jn,"to-string":fs};class ql{constructor(a,c){this.type=a,this.args=c}static parse(a,c){if(a.length<2)return c.error("Expected at least one argument.");let h=a[0],f=[],y=Cu;if(h==="to-array"){if(!Array.isArray(a[1]))return null;let b=a[1].length;if(c.expectedType){if(c.expectedType.kind!=="array")return c.error(`Expected ${c.expectedType.kind} but found array.`);y=xu(c.expectedType.itemType,b)}else{if(!(b>0&&Fb(a[1][0])))return null;y=xu(Bc(a[1][0]),b)}for(let S=0;S4?`Invalid rbga value ${JSON.stringify(c)}: expected an array containing either three or four numeric values.`:FS(c[0],c[1],c[2],c[3]),!h))return new Ts(c[0]/255,c[1]/255,c[2]/255,c[3])}throw new gn(h||`Could not parse color from value '${typeof c=="string"?c:String(JSON.stringify(c))}'`)}if(this.type.kind==="number"){let c=null;for(let h of this.args){if(c=h.evaluate(a),c===null)return 0;let f=Number(c);if(!isNaN(f))return f}throw new gn(`Could not convert ${JSON.stringify(c)} to number.`)}return this.type.kind==="formatted"?wu.fromString(Jl(this.args[0].evaluate(a))):this.type.kind==="resolvedImage"?Su.build(Jl(this.args[0].evaluate(a))):this.type.kind==="array"?this.args.map(c=>c.evaluate(a)):Jl(this.args[0].evaluate(a))}eachChild(a){this.args.forEach(a)}outputDefined(){return this.args.every(a=>a.outputDefined())}serialize(){if(this.type.kind==="formatted")return new Ly([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Lb(this.args[0]).serialize();let a=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild(c=>{a.push(c.serialize())}),a}}let LS=["Unknown","Point","LineString","Polygon"];class Qu{constructor(a,c,h){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,this.scope=a,this.options=c,this.iconImageUseTheme=h}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?LS[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||{}}measureLight(a){return this.globals.brightness||0}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){let a=this.featureDistanceData.center,c=this.featureDistanceData.scale,{x:h,y:f}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(h*c-a[0])+this.featureDistanceData.bearing[1]*(f*c-a[1])}return 0}parseColor(a){let c=this._parseColorCache[a];return c||(c=this._parseColorCache[a]=Ts.parse(a)),c}getConfig(a){return this.options?this.options.get(a):null}}class Bd{constructor(a,c,h,f,y){this.name=a,this.type=c,this._evaluate=h,this.args=f,this._overloadIndex=y}evaluate(a){if(!this._evaluate){let c=Bd.definitions[this.name];this._evaluate=Array.isArray(c)?c[2]:c.overloads[this._overloadIndex][1]}return this._evaluate(a,this.args)}eachChild(a){this.args.forEach(a)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(a=>a.serialize()))}static parse(a,c){let h=a[0],f=Bd.definitions[h];if(!f)return c.error(`Unknown expression "${h}". If you wanted a literal array, use ["literal", [...]].`,0);let y=Array.isArray(f)?f[0]:f.type,b=Array.isArray(f)?[[f[1],f[2]]]:f.overloads,S=[],M=null,F=-1;for(let[z,U]of b){if(Array.isArray(z)&&z.length!==a.length-1)continue;S.push(z),F++,M=new GS(c.registry,c.path,null,c.scope,void 0,c._scope,c.options,c.iconImageUseTheme);let j=[],Z=!1;for(let X=1;Xj)).map(k0).join(" | "),U=[];for(let j=1;jc;){if(h-c>600){let M=h-c+1,F=a-c+1,z=Math.log(M),U=.5*Math.exp(2*z/3),j=.5*Math.sqrt(z*U*(M-U)/M)*(F-M/2<0?-1:1);IM(u,a,Math.max(c,Math.floor(a-F*U/M+j)),Math.min(h,Math.floor(a+(M-F)*U/M+j)),f)}let y=u[a],b=c,S=h;for(Cg(u,c,a),f(u[h],y)>0&&Cg(u,c,h);b0;)S--}f(u[c],y)===0?Cg(u,c,S):(S++,Cg(u,S,h)),S<=a&&(c=S+1),a<=S&&(h=S-1)}}function Cg(u,a,c){let h=u[a];u[a]=u[c],u[c]=h}function bf(u,a){return ua?1:0}function e1(u){let a=0;for(let c,h,f=0,y=u.length,b=y-1;f=a[2]||u[1]<=a[1]||u[3]>=a[3])}function ZN(u,a,c){let h=u[0]-a[0],f=u[1]-a[1],y=u[0]-c[0],b=u[1]-c[1];return h*b-y*f==0&&h*y<=0&&f*b<=0}function Bb(u,a,c=!1){let h=!1;for(let S=0,M=a.length;S(f=u)[1]!=(b=X)[1]>f[1]&&f[0]<(b[0]-y[0])*(f[1]-y[1])/(b[1]-y[1])+y[0]&&(h=!h)}}var f,y,b;return h}function EM(u,a,c,h){let f=h[0]-c[0],y=h[1]-c[1],b=(u[0]-c[0])*y-f*(u[1]-c[1]),S=(a[0]-c[0])*y-f*(a[1]-c[1]);return b>0&&S<0||b<0&&S>0}function xf(u,a,c,h){return(f=[h[0]-c[0],h[1]-c[1]])[0]*(y=[a[0]-u[0],a[1]-u[1]])[1]-f[1]*y[0]!=0&&!(!EM(u,a,c,h)||!EM(c,h,u,a));var f,y}function mi(u){let a=new Pi(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),c=new Pi(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);for(let h of u[0])a.x>h.x&&(a.x=h.x),a.y>h.y&&(a.y=h.y),c.xc[2]){let f=.5*h,y=u[0]-c[0]>f?-h:c[0]-u[0]>f?h:0;y===0&&(y=u[0]-c[2]>f?-h:c[2]-u[0]>f?h:0),u[0]+=y}Nb(a,u)}function Mh(u,a,c,h){let f=Math.pow(2,h.z)*dn,y=[h.x*dn,h.y*dn],b=[];if(!u)return b;for(let S of u)for(let M of S){let F=[M.x+y[0],M.y+y[1]];DM(F,a,c,f),b.push(F)}return b}function t1(u,a,c,h){let f=Math.pow(2,h.z)*dn,y=[h.x*dn,h.y*dn],b=[];if(!u)return b;for(let M of u){let F=[];for(let z of M){let U=[z.x+y[0],z.y+y[1]];Nb(a,U),F.push(U)}b.push(F)}if(a[2]-a[0]<=f/2){(S=a)[0]=S[1]=1/0,S[2]=S[3]=-1/0;for(let M of b)for(let F of M)DM(F,a,c,f)}var S;return b}class Ny{constructor(a,c){this.type=sr,this.geojson=a,this.geometries=c}static parse(a,c){if(a.length!==2)return c.error(`'within' expression requires exactly one argument, but found ${a.length-1} instead.`);if(Fb(a[1])){let h=a[1];if(h.type==="FeatureCollection")for(let f=0;fc)return By(y,b,(c-(h-S))/S)}return a[a.length-1]}pointToSegmentDistance(a,c,h){let[f,y]=c,b=Oh(h[0]-f)*this.kx,S=(h[1]-y)*this.ky;if(b!==0||S!==0){let M=(Oh(a[0]-f)*this.kx*b+(a[1]-y)*this.ky*S)/(b*b+S*S);M>1?(f=h[0],y=h[1]):M>0&&(f+=b/this.kx*M,y+=S/this.ky*M)}return b=Oh(a[0]-f)*this.kx,S=(a[1]-y)*this.ky,Math.sqrt(b*b+S*S)}pointOnLine(a,c){let h=1/0,f=a[0][0],y=a[0][1],b=0,S=0;for(let M=0;M1?(F=a[M+1][0],z=a[M+1][1]):Z>0&&(F+=U/this.kx*Z,z+=j/this.ky*Z)),U=Oh(c[0]-F)*this.kx,j=(c[1]-z)*this.ky;let X=U*U+j*j;Xy.index||f.index===y.index&&f.t>y.t){let F=f;f=y,y=F}let b=[f.point],S=f.index+1,M=y.index;!NS(h[S],b[0])&&S<=M&&b.push(h[S]);for(let F=S+1;F<=M;F++)b.push(h[F]);return NS(h[M],y.point)||b.push(y.point),b}lineSliceAlong(a,c,h){let f=0,y=[];for(let b=0;ba&&y.length===0&&y.push(By(S,M,(a-(f-F))/F)),f>=c)return y.push(By(S,M,(c-(f-F))/F)),y;f>a&&y.push(M)}return y}bufferPoint(a,c){let h=c/this.ky,f=c/this.kx;return[a[0]-f,a[1]-h,a[0]+f,a[1]+h]}bufferBBox(a,c){let h=c/this.ky,f=c/this.kx;return[a[0]-f,a[1]-h,a[2]+f,a[3]+h]}insideBBox(a,c){return Oh(a[0]-c[0])>=0&&Oh(a[0]-c[2])<=0&&a[1]>=c[1]&&a[1]<=c[3]}}function NS(u,a){return u[0]===a[0]&&u[1]===a[1]}function By(u,a,c){let h=Oh(a[0]-u[0]);return[u[0]+h*c,u[1]+(a[1]-u[1])*c]}function Oh(u){for(;u<-180;)u+=360;for(;u>180;)u-=360;return u}class BS{constructor(a=[],c=(h,f)=>hf?1:0){if(this.data=a,this.length=this.data.length,this.compare=c,this.length>0)for(let h=(this.length>>1)-1;h>=0;h--)this._down(h)}push(a){this.data.push(a),this._up(this.length++)}pop(){if(this.length===0)return;let a=this.data[0],c=this.data.pop();return--this.length>0&&(this.data[0]=c,this._down(0)),a}peek(){return this.data[0]}_up(a){let{data:c,compare:h}=this,f=c[a];for(;a>0;){let y=a-1>>1,b=c[y];if(h(f,b)>=0)break;c[a]=b,a=y}c[a]=f}_down(a){let{data:c,compare:h}=this,f=this.length>>1,y=c[a];for(;a=0)break;c[a]=c[b],a=b}c[a]=y}}var qi=8192;function Hb(u,a){return a.dist-u.dist}let Rh=100,w_=50;function jb(u){let a=[1/0,1/0,-1/0,-1/0];if(a.length!==u.length)return!1;for(let c=0;c=u[0]&&u[1]u[1])return[null,null];let c=M0(u);if(a){if(c===2)return[u,null];let h=Math.floor(c/2);return[[u[0],u[0]+h],[u[0]+h,u[1]]]}{if(c===1)return[u,null];let h=Math.floor(c/2)-1;return[[u[0],u[0]+h],[u[0]+h+1,u[1]]]}}function wp(u,a){let c=[1/0,1/0,-1/0,-1/0];if(!wf(a,u.length))return c;for(let h=a[0];h<=a[1];++h)Nb(c,u[h]);return c}function kr(u){let a=[1/0,1/0,-1/0,-1/0];for(let c=0;ca[2]&&(h=u[0]-a[2]),u[1]>a[3]&&(f=u[1]-a[3]),u[3]=h)return h;if(Cf(f,y)){if(kM(u,a))return 0}else if(kM(a,u))return 0;let b=h;for(let S of u)for(let M=0,F=S.length,z=F-1;M=y)continue;let z=F.range1;if(M0(z)<=S){if(!wf(z,u.length))return NaN;if(a){let U=e3(u,z,c,h);if((y=Math.min(y,U))===0)return y}else for(let U=z[0];U<=z[1];++U){let j=AM(u[U],c,h);if((y=Math.min(y,j))===0)return y}}else{let U=i1(z,a);if(U[0]!==null){let j=wg(wp(u,U[0]),M,h);j=b)continue;let U=z.range1,j=z.range2;if(M0(U)<=M&&M0(j)<=F){if(!wf(U,u.length)||!wf(j,c.length))return NaN;if(a&&h?b=Math.min(b,_D(u,U,c,j,f)):a||h?a&&!h?b=Math.min(b,n1(c,j,u,U,f)):!a&&h&&(b=Math.min(b,n1(u,U,c,j,f))):b=Math.min(b,JN(u,U,c,j,f)),b===0)return b}else{let Z=i1(U,a),X=i1(j,h);Ud(S,b,f,u,c,Z[0],X[0]),Ud(S,b,f,u,c,Z[0],X[1]),Ud(S,b,f,u,c,Z[1],X[0]),Ud(S,b,f,u,c,Z[1],X[1])}}return b}function US(u,a,c,h,f=1/0){let y=f,b=wp(u,[0,u.length-1]);for(let S of c)if(!(y!==1/0&&wg(b,wp(S,[0,S.length-1]),h)>=y)&&(y=Math.min(y,MM(u,a,S,!0,h,y)),y===0))return y;return y}function HS(u,a,c,h,f=1/0){let y=f,b=wp(u,[0,u.length-1]);for(let S of c){if(y!==1/0&&wg(b,kr(S),h)>=y)continue;let M=t3(u,a,S,h,y);if(isNaN(M))return M;if((y=Math.min(y,M))===0)return y}return y}function o1(u){return u==="Point"||u==="MultiPoint"||u==="LineString"||u==="MultiLineString"||u==="Polygon"||u==="MultiPolygon"}class Sf{constructor(a,c){this.type=jn,this.geojson=a,this.geometries=c}static parse(a,c){if(a.length!==2)return c.error(`'distance' expression requires either one argument, but found ' ${a.length-1} instead.`);if(Fb(a[1])){let h=a[1];if(h.type==="FeatureCollection"){for(let f=0;f{a&&!O0(c)&&(a=!1)}),a}function S_(u){if(u instanceof Bd&&u.name==="feature-state")return!1;let a=!0;return u.eachChild(c=>{a&&!S_(c)&&(a=!1)}),a}function R0(u){if(u instanceof $b)return new Set([u.key]);let a=new Set;return u.eachChild(c=>{a=new Set([...a,...R0(c)])}),a}function Sg(u,a){if(u instanceof Bd&&a.indexOf(u.name)>=0)return!1;let c=!0;return u.eachChild(h=>{c&&!Sg(h,a)&&(c=!1)}),c}function r1(u,a,c){return[u,a,c].filter(Boolean).join("")}function F0(u,a){switch(u){case"string":return Jl(a);case"number":return+a;case"boolean":return!!a;case"color":return Ts.parse(a);case"formatted":return wu.fromString(Jl(a));case"resolvedImage":return Su.build(Jl(a))}return a}function OM(u,a,c,h){return h!==void 0&&(u=h*Math.round(u/h)),a!==void 0&&uc&&(u=c),u}class $b{constructor(a,c,h,f=!1){this.type=a,this.key=c,this.scope=h,this.featureConstant=f}static parse(a,c){let h=c.expectedType;if(h==null&&(h=gs),a.length<2||a.length>3)return c.error("Invalid number of arguments for 'config' expression.");let f=c.parse(a[1],1);if(!(f instanceof Qo))return c.error("Key name of 'config' expression must be a string literal.");let y,b=!0,S=Jl(f.value);if(a.length>=3){let M=c.parse(a[2],2);if(!(M instanceof Qo))return c.error("Scope of 'config' expression must be a string literal.");y=Jl(M.value)}if(c.options){let M=r1(S,y,c._scope),F=c.options.get(M);F&&(b=O0(F.value||F.default))}return new $b(h,S,y,b)}evaluate(a){let c=r1(this.key,this.scope,a.scope),h=a.getConfig(c);if(!h)return null;let{type:f,value:y,values:b,minValue:S,maxValue:M,stepValue:F}=h,z=h.default.evaluate(a),U=z;if(y){let j=a.scope;a.scope=(j||"").split("").slice(1).join(""),U=y.evaluate(a),a.scope=j}return f&&(U=F0(f,U)),U===void 0||S===void 0&&M===void 0&&F===void 0||(typeof U=="number"?U=OM(U,S,M,F):Array.isArray(U)&&(U=U.map(j=>typeof j=="number"?OM(j,S,M,F):j))),y!==void 0&&U!==void 0&&b&&!b.includes(U)&&(U=z,f&&(U=F0(f,U))),(f&&f!==this.type||U!==void 0&&!Ob(Bc(U),this.type))&&(U=F0(this.type.kind,U)),U}eachChild(){}outputDefined(){return!1}serialize(){let a=["config",this.key];return this.scope&&a.concat(this.scope),a}}class jS{constructor(a,c){this.type=c.type,this.name=a,this.boundExpression=c}static parse(a,c){if(a.length!==2||typeof a[1]!="string")return c.error("'var' expression requires exactly one string literal argument.");let h=a[1];return c.scope.has(h)?new jS(h,c.scope.get(h)):c.error(`Unknown variable "${h}". Make sure "${h}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(a){return this.boundExpression.evaluate(a)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}class GS{constructor(a,c=[],h,f=new Zx,y=[],b,S,M){this.registry=a,this.path=c,this.key=c.map(F=>typeof F=="string"?`['${F}']`:`[${F}]`).join(""),this.scope=f,this.errors=y,this.expectedType=h,this._scope=b,this.options=S,this.iconImageUseTheme=M}parse(a,c,h,f,y={}){return c||h?this.concat(c,null,h,f)._parse(a,y):this._parse(a,y)}parseObjectValue(a,c,h,f,y,b={}){return this.concat(c,h,f,y)._parse(a,b)}_parse(a,c){function h(f,y,b){return b==="assert"?new xo(y,[f]):b==="coerce"?new ql(y,[f]):f}if(a!==null&&typeof a!="string"&&typeof a!="boolean"&&typeof a!="number"||(a=["literal",a]),Array.isArray(a)){if(a.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let f=typeof a[0]=="string"?this.registry[a[0]]:void 0;if(f){let y=f.parse(a,this);if(!y)return null;if(this.expectedType){let b=this.expectedType,S=y.type;if(b.kind!=="string"&&b.kind!=="number"&&b.kind!=="boolean"&&b.kind!=="object"&&b.kind!=="array"||S.kind!=="value")if(b.kind!=="color"&&b.kind!=="formatted"&&b.kind!=="resolvedImage"||S.kind!=="value"&&S.kind!=="string"){if(this.checkSubtype(b,S))return null}else y=h(y,b,c.typeAnnotation||"coerce");else y=h(y,b,c.typeAnnotation||"assert")}if(!(y instanceof Qo)&&y.type.kind!=="resolvedImage"&&yD(y)){let b=new Qu(this._scope,this.options,this.iconImageUseTheme);try{y=new Qo(y.type,y.evaluate(b))}catch(S){return this.error(S.message),null}}return y}return ql.parse(["to-array",a],this)}return this.error(a===void 0?"'undefined' value invalid. Use null instead.":typeof a=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof a} instead.`)}concat(a,c,h,f){let y=typeof a=="number"?this.path.concat(a):this.path;y=typeof c=="string"?y.concat(c):y;let b=f?this.scope.concat(f):this.scope;return new GS(this.registry,y,h||null,b,this.errors,this._scope,this.options,this.iconImageUseTheme)}error(a,...c){let h=`${this.key}${c.map(f=>`[${f}]`).join("")}`;this.errors.push(new yf(h,a))}checkSubtype(a,c){let h=yg(a,c);return h&&this.error(h),h}}function yD(u){if(u instanceof jS)return yD(u.boundExpression);if(u instanceof Bd&&u.name==="error"||u instanceof Vd||u instanceof Ny||u instanceof Sf||u instanceof $b)return!1;let a=u instanceof ql||u instanceof xo,c=!0;return u.eachChild(h=>{c=a?c&&yD(h):c&&h instanceof Qo}),!!c&&O0(u)&&Sg(u,["zoom","heatmap-density","worldview","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light","raster-particle-speed"])}function zy(u,a){let c=u.length-1,h,f,y=0,b=c,S=0;for(;y<=b;)if(S=Math.floor((y+b)/2),h=u[S],f=u[S+1],h<=a){if(S===c||aa))throw new gn("Input is not a number.");b=S-1}return 0}class T_{constructor(a,c,h){this.type=a,this.input=c,this.labels=[],this.outputs=[];for(let[f,y]of h)this.labels.push(f),this.outputs.push(y)}static parse(a,c){if(a.length-1<4)return c.error(`Expected at least 4 arguments, but found only ${a.length-1}.`);if((a.length-1)%2!=0)return c.error("Expected an even number of arguments.");let h=c.parse(a[1],1,jn);if(!h)return null;let f=[],y=null;c.expectedType&&c.expectedType.kind!=="value"&&(y=c.expectedType);for(let b=1;b=S)return c.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',F);let U=c.parse(M,z,y);if(!U)return null;y=y||U.type,f.push([S,U])}return new T_(y,h,f)}evaluate(a){let c=this.labels,h=this.outputs;if(c.length===1)return h[0].evaluate(a);let f=this.input.evaluate(a);if(f<=c[0])return h[0].evaluate(a);let y=c.length;return f>=c[y-1]?h[y-1].evaluate(a):h[zy(c,f)].evaluate(a)}eachChild(a){a(this.input);for(let c of this.outputs)a(c)}outputDefined(){return this.outputs.every(a=>a.outputDefined())}serialize(){let a=["step",this.input.serialize()];for(let c=0;c0&&a.push(this.labels[c]),a.push(this.outputs[c].serialize());return a}}let vD=.95047,rt=1.08883,Uy=4/29,Tf=6/29,Fh=3*Tf*Tf,wa=Tf*Tf*Tf,i3=Math.PI/180,n3=180/Math.PI;function bD(u){return u>wa?Math.pow(u,1/3):u/Fh+Uy}function Tg(u){return u>Tf?u*u*u:Fh*(u-Uy)}function $S(u){return 255*(u<=.0031308?12.92*u:1.055*Math.pow(u,1/2.4)-.055)}function P0(u){return(u/=255)<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function CD(u){let a=P0(u.r),c=P0(u.g),h=P0(u.b),f=bD((.4124564*a+.3575761*c+.1804375*h)/vD),y=bD((.2126729*a+.7151522*c+.072175*h)/1);return{l:116*y-16,a:500*(f-y),b:200*(y-bD((.0193339*a+.119192*c+.9503041*h)/rt)),alpha:u.a}}function xD(u){let a=(u.l+16)/116,c=isNaN(u.a)?a:a+u.a/500,h=isNaN(u.b)?a:a-u.b/200;return a=1*Tg(a),c=vD*Tg(c),h=rt*Tg(h),new Ts($S(3.2404542*c-1.5371385*a-.4985314*h),$S(-.969266*c+1.8760108*a+.041556*h),$S(.0556434*c-.2040259*a+1.0572252*h),u.alpha)}function o3(u,a,c){let h=a-u;return u+c*(h>180||h<-180?h-360*Math.round(h/360):h)}let Sp={forward:CD,reverse:xD,interpolate:function(u,a,c){return{l:eo(u.l,a.l,c),a:eo(u.a,a.a,c),b:eo(u.b,a.b,c),alpha:eo(u.alpha,a.alpha,c)}}},Hy={forward:function(u){let{l:a,a:c,b:h}=CD(u),f=Math.atan2(h,c)*n3;return{h:f<0?f+360:f,c:Math.sqrt(c*c+h*h),l:a,alpha:u.a}},reverse:function(u){let a=u.h*i3,c=u.c;return xD({l:u.l,a:Math.cos(a)*c,b:Math.sin(a)*c,alpha:u.alpha})},interpolate:function(u,a,c){return{h:o3(u.h,a.h,c),c:eo(u.c,a.c,c),l:eo(u.l,a.l,c),alpha:eo(u.alpha,a.alpha,c)}}};var RM=Object.freeze({__proto__:null,hcl:Hy,lab:Sp});class Ph{constructor(a,c,h,f,y){this.type=a,this.operator=c,this.interpolation=h,this.input=f,this.labels=[],this.outputs=[];for(let[b,S]of y)this.labels.push(b),this.outputs.push(S)}static interpolationFactor(a,c,h,f){let y=0;if(a.name==="exponential")y=qS(c,a.base,h,f);else if(a.name==="linear")y=qS(c,1,h,f);else if(a.name==="cubic-bezier"){let b=a.controlPoints;y=new SS(b[0],b[1],b[2],b[3]).solve(qS(c,1,h,f))}return y}static parse(a,c){let[h,f,y,...b]=a;if(!Array.isArray(f)||f.length===0)return c.error("Expected an interpolation type expression.",1);if(f[0]==="linear")f={name:"linear"};else if(f[0]==="exponential"){let F=f[1];if(typeof F!="number")return c.error("Exponential interpolation requires a numeric base.",1,1);f={name:"exponential",base:F}}else{if(f[0]!=="cubic-bezier")return c.error(`Unknown interpolation type ${String(f[0])}`,1,0);{let F=f.slice(1);if(F.length!==4||F.some(z=>typeof z!="number"||z<0||z>1))return c.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);f={name:"cubic-bezier",controlPoints:F}}}if(a.length-1<4)return c.error(`Expected at least 4 arguments, but found only ${a.length-1}.`);if(a.length-1>3&&(a.length-1)%2!=0)return c.error("Expected an even number of arguments.");if(y=c.parse(y,2,jn),!y)return null;let S=[],M=null;h==="interpolate-hcl"||h==="interpolate-lab"?M=ud:c.expectedType&&c.expectedType.kind!=="value"&&(M=c.expectedType);for(let F=0;F=z)return c.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',j);let X=c.parse(U,Z,M);if(!X)return null;M=M||X.type,S.push([z,X])}return M.kind==="number"||M.kind==="color"||M.kind==="array"&&M.itemType.kind==="number"&&typeof M.N=="number"?new Ph(M,h,f,y,S):c.error(`Type ${fc(M)} is not interpolatable.`)}evaluate(a){let c=this.labels,h=this.outputs;if(c.length===1)return h[0].evaluate(a);let f=this.input.evaluate(a);if(f<=c[0])return h[0].evaluate(a);let y=c.length;if(f>=c[y-1])return h[y-1].evaluate(a);let b=zy(c,f),S=Ph.interpolationFactor(this.interpolation,f,c[b],c[b+1]),M=h[b].evaluate(a),F=h[b+1].evaluate(a);return this.operator==="interpolate"?Ic[this.type.kind.toLowerCase()](M,F,S):this.operator==="interpolate-hcl"?Hy.reverse(Hy.interpolate(Hy.forward(M),Hy.forward(F),S)):Sp.reverse(Sp.interpolate(Sp.forward(M),Sp.forward(F),S))}eachChild(a){a(this.input);for(let c of this.outputs)a(c)}outputDefined(){return this.outputs.every(a=>a.outputDefined())}serialize(){let a;a=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier",...this.interpolation.controlPoints];let c=[this.operator,a,this.input.serialize()];for(let h=0;hyg(f,S.type));return new s1(b?gs:h,y)}evaluate(a){let c,h=null,f=0;for(let y of this.args){if(f++,h=y.evaluate(a),h&&h instanceof Su&&!h.available&&(c||(c=h),h=null,f===this.args.length))return c;if(h!==null)break}return h}eachChild(a){this.args.forEach(a)}outputDefined(){return this.args.every(a=>a.outputDefined())}serialize(){let a=["coalesce"];return this.eachChild(c=>{a.push(c.serialize())}),a}}class ym{constructor(a,c){this.type=c.type,this.bindings=[].concat(a),this.result=c}evaluate(a){return this.result.evaluate(a)}eachChild(a){for(let c of this.bindings)a(c[1]);a(this.result)}static parse(a,c){if(a.length<4)return c.error(`Expected at least 3 arguments, but found ${a.length-1} instead.`);let h=[];for(let y=1;y=h.length)throw new gn("Array index out of bounds: index exceeds array size");if(c!==Math.floor(c))throw new gn("Array index must be an integer. Use at-interpolated for fractional indices");return h[c]}eachChild(a){a(this.index),a(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class SD{constructor(a,c,h){this.type=a,this.index=c,this.input=h}static parse(a,c){if(a.length!==3)return c.error(`Expected 2 arguments, but found ${a.length-1} instead.`);let h=c.parse(a[1],1,jn),f=c.parse(a[2],2,xu(c.expectedType||gs));return h&&f?new SD(f.type.itemType,h,f):null}evaluate(a){let c=this.index.evaluate(a),h=this.input.evaluate(a);if(c<0)throw new gn(`Array index out of bounds: ${c} < 0.`);if(c>h.length-1)throw new gn(`Array index out of bounds: ${c} > ${h.length-1}.`);if(c===Math.floor(c))return h[c];let f=Math.floor(c),y=Math.ceil(c),b=h[f],S=h[y];if(typeof b!="number"||typeof S!="number")throw new gn(`Cannot interpolate between non-number values at index ${c}.`);let M=c-f;return b*(1-M)+S*M}eachChild(a){a(this.index),a(this.input)}outputDefined(){return!1}serialize(){return["at-interpolated",this.index.serialize(),this.input.serialize()]}}class KS{constructor(a,c){this.type=sr,this.needle=a,this.haystack=c}static parse(a,c){if(a.length!==3)return c.error(`Expected 2 arguments, but found ${a.length-1} instead.`);let h=c.parse(a[1],1,gs),f=c.parse(a[2],2,gs);return h&&f?mD(h.type,[sr,fs,jn,Cu,gs])?new KS(h,f):c.error(`Expected first argument to be of type boolean, string, number or null, but found ${fc(h.type)} instead`):null}evaluate(a){let c=this.needle.evaluate(a),h=this.haystack.evaluate(a);if(h==null)return!1;if(!Mb(c,["boolean","string","number","null"]))throw new gn(`Expected first argument to be of type boolean, string, number or null, but found ${fc(Bc(c))} instead.`);if(!Mb(h,["string","array"]))throw new gn(`Expected second argument to be of type array or string, but found ${fc(Bc(h))} instead.`);return h.indexOf(c)>=0}eachChild(a){a(this.needle),a(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class a1{constructor(a,c,h){this.type=jn,this.needle=a,this.haystack=c,this.fromIndex=h}static parse(a,c){if(a.length<=2||a.length>=5)return c.error(`Expected 3 or 4 arguments, but found ${a.length-1} instead.`);let h=c.parse(a[1],1,gs),f=c.parse(a[2],2,gs);if(!h||!f)return null;if(!mD(h.type,[sr,fs,jn,Cu,gs]))return c.error(`Expected first argument to be of type boolean, string, number or null, but found ${fc(h.type)} instead`);if(a.length===4){let y=c.parse(a[3],3,jn);return y?new a1(h,f,y):null}return new a1(h,f)}evaluate(a){let c=this.needle.evaluate(a),h=this.haystack.evaluate(a);if(!Mb(c,["boolean","string","number","null"]))throw new gn(`Expected first argument to be of type boolean, string, number or null, but found ${fc(Bc(c))} instead.`);if(!Mb(h,["string","array"]))throw new gn(`Expected second argument to be of type array or string, but found ${fc(Bc(h))} instead.`);if(this.fromIndex){let f=this.fromIndex.evaluate(a);return h.indexOf(c,f)}return h.indexOf(c)}eachChild(a){a(this.needle),a(this.haystack),this.fromIndex&&a(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){let a=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),a]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}class qb{constructor(a,c,h,f,y,b){this.inputType=a,this.type=c,this.input=h,this.cases=f,this.outputs=y,this.otherwise=b}static parse(a,c){if(a.length<5)return c.error(`Expected at least 4 arguments, but found only ${a.length-1}.`);if(a.length%2!=1)return c.error("Expected an even number of arguments.");let h,f;c.expectedType&&c.expectedType.kind!=="value"&&(f=c.expectedType);let y={},b=[];for(let F=2;FNumber.MAX_SAFE_INTEGER)return j.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof X=="number"&&Math.floor(X)!==X)return j.error("Numeric branch labels must be integer values.");if(h){if(j.checkSubtype(h,Bc(X)))return null}else h=Bc(X);if(y[String(X)]!==void 0)return j.error("Branch labels must be unique.");y[String(X)]=b.length}let Z=c.parse(U,F,f);if(!Z)return null;f=f||Z.type,b.push(Z)}let S=c.parse(a[1],1,gs);if(!S)return null;let M=c.parse(a[a.length-1],a.length-1,f);return M?S.type.kind!=="value"&&c.concat(1).checkSubtype(h,S.type)?null:new qb(h,f,S,y,b,M):null}evaluate(a){let c=this.input.evaluate(a);return(Ob(Bc(c),this.inputType)&&this.outputs[this.cases[c]]||this.otherwise).evaluate(a)}eachChild(a){a(this.input),this.outputs.forEach(a),a(this.otherwise)}outputDefined(){return this.outputs.every(a=>a.outputDefined())&&this.otherwise.outputDefined()}serialize(){let a=["match",this.input.serialize()],c=Object.keys(this.cases).sort(),h=[],f={};for(let b of c){let S=f[this.cases[b]];S===void 0?(f[this.cases[b]]=h.length,h.push([this.cases[b],[b]])):h[S][1].push(b)}let y=b=>this.inputType.kind==="number"?Number(b):b;for(let[b,S]of h)a.push(S.length===1?y(S[0]):S.map(y)),a.push(this.outputs[b].serialize());return a.push(this.otherwise.serialize()),a}}class I_{constructor(a,c,h){this.type=a,this.branches=c,this.otherwise=h}static parse(a,c){if(a.length<4)return c.error(`Expected at least 3 arguments, but found only ${a.length-1}.`);if(a.length%2!=0)return c.error("Expected an odd number of arguments.");let h;c.expectedType&&c.expectedType.kind!=="value"&&(h=c.expectedType);let f=[];for(let b=1;bc.outputDefined())&&this.otherwise.outputDefined()}serialize(){let a=["case"];return this.eachChild(c=>{a.push(c.serialize())}),a}}class l1{constructor(a,c,h,f){this.type=a,this.input=c,this.beginIndex=h,this.endIndex=f}static parse(a,c){if(a.length<=2||a.length>=5)return c.error(`Expected 3 or 4 arguments, but found ${a.length-1} instead.`);let h=c.parse(a[1],1,gs),f=c.parse(a[2],2,jn);if(!h||!f)return null;if(!mD(h.type,[xu(gs),fs,gs]))return c.error(`Expected first argument to be of type array or string, but found ${fc(h.type)} instead`);if(a.length===4){let y=c.parse(a[3],3,jn);return y?new l1(h.type,h,f,y):null}return new l1(h.type,h,f)}evaluate(a){let c=this.input.evaluate(a),h=this.beginIndex.evaluate(a);if(!Mb(c,["string","array"]))throw new gn(`Expected first argument to be of type array or string, but found ${fc(Bc(c))} instead.`);if(this.endIndex){let f=this.endIndex.evaluate(a);return c.slice(h,f)}return c.slice(h)}eachChild(a){a(this.input),a(this.beginIndex),this.endIndex&&a(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){let a=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),a]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}class TD{constructor(a,c){this.type=xu(fs),this.str=a,this.delimiter=c}static parse(a,c){if(a.length!==3)return c.error(`Expected 2 arguments, but found ${a.length-1} instead.`);let h=c.parse(a[1],1,fs),f=c.parse(a[2],2,fs);return h&&f?new TD(h,f):void 0}evaluate(a){let c=this.str.evaluate(a),h=this.delimiter.evaluate(a);return c.split(h)}eachChild(a){a(this.str),a(this.delimiter)}outputDefined(){return!1}serialize(){return["split",this.str.serialize(),this.delimiter.serialize()]}}function vm(u,a){return u==="=="||u==="!="?a.kind==="boolean"||a.kind==="string"||a.kind==="number"||a.kind==="null"||a.kind==="value":a.kind==="string"||a.kind==="number"||a.kind==="value"}function ID(u,a,c,h){return h.compare(a,c)===0}function jy(u,a,c){let h=u!=="=="&&u!=="!=";return class o2e{constructor(y,b,S){this.type=sr,this.lhs=y,this.rhs=b,this.collator=S,this.hasUntypedArgument=y.type.kind==="value"||b.type.kind==="value"}static parse(y,b){if(y.length!==3&&y.length!==4)return b.error("Expected two or three arguments.");let S=y[0],M=b.parse(y[1],1,gs);if(!M)return null;if(!vm(S,M.type))return b.concat(1).error(`"${S}" comparisons are not supported for type '${fc(M.type)}'.`);let F=b.parse(y[2],2,gs);if(!F)return null;if(!vm(S,F.type))return b.concat(2).error(`"${S}" comparisons are not supported for type '${fc(F.type)}'.`);if(M.type.kind!==F.type.kind&&M.type.kind!=="value"&&F.type.kind!=="value")return b.error(`Cannot compare types '${fc(M.type)}' and '${fc(F.type)}'.`);h&&(M.type.kind==="value"&&F.type.kind!=="value"?M=new xo(F.type,[M]):M.type.kind!=="value"&&F.type.kind==="value"&&(F=new xo(M.type,[F])));let z=null;if(y.length===4){if(M.type.kind!=="string"&&F.type.kind!=="string"&&M.type.kind!=="value"&&F.type.kind!=="value")return b.error("Cannot use collator to compare non-string types.");if(z=b.parse(y[3],3,kb),!z)return null}return new o2e(M,F,z)}evaluate(y){let b=this.lhs.evaluate(y),S=this.rhs.evaluate(y);if(h&&this.hasUntypedArgument){let M=Bc(b),F=Bc(S);if(M.kind!==F.kind||M.kind!=="string"&&M.kind!=="number")throw new gn(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${M.kind}, ${F.kind}) instead.`)}if(this.collator&&!h&&this.hasUntypedArgument){let M=Bc(b),F=Bc(S);if(M.kind!=="string"||F.kind!=="string")return a(y,b,S)}return this.collator?c(y,b,S,this.collator.evaluate(y)):a(y,b,S)}eachChild(y){y(this.lhs),y(this.rhs),this.collator&&y(this.collator)}outputDefined(){return!0}serialize(){let y=[u];return this.eachChild(b=>{y.push(b.serialize())}),y}}}let r3=jy("==",function(u,a,c){return a===c},ID),s3=jy("!=",function(u,a,c){return a!==c},function(u,a,c,h){return!ID(0,a,c,h)}),a3=jy("<",function(u,a,c){return a",function(u,a,c){return a>c},function(u,a,c,h){return h.compare(a,c)>0}),FM=jy("<=",function(u,a,c){return a<=c},function(u,a,c,h){return h.compare(a,c)<=0}),l3=jy(">=",function(u,a,c){return a>=c},function(u,a,c,h){return h.compare(a,c)>=0});class ED{constructor(a,c,h,f,y,b){this.type=fs,this.number=a,this.locale=c,this.currency=h,this.unit=f,this.minFractionDigits=y,this.maxFractionDigits=b}static parse(a,c){if(a.length!==3)return c.error("Expected two arguments.");let h=c.parse(a[1],1,jn);if(!h)return null;let f=a[2];if(typeof f!="object"||Array.isArray(f))return c.error("NumberFormat options argument must be an object.");let y=null;if(f.locale&&(y=c.parseObjectValue(f.locale,2,"locale",fs),!y))return null;let b=null;if(f.currency&&(b=c.parseObjectValue(f.currency,2,"currency",fs),!b))return null;let S=null;if(f.unit&&(S=c.parseObjectValue(f.unit,2,"unit",fs),!S))return null;let M=null;if(f["min-fraction-digits"]&&(M=c.parseObjectValue(f["min-fraction-digits"],2,"min-fraction-digits",jn),!M))return null;let F=null;return f["max-fraction-digits"]&&(F=c.parseObjectValue(f["max-fraction-digits"],2,"max-fraction-digits",jn),!F)?null:new ED(h,y,b,S,M,F)}evaluate(a){return new Intl.NumberFormat(this.locale?this.locale.evaluate(a):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(a):void 0,unit:this.unit?this.unit.evaluate(a):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(a):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(a):void 0}).format(this.number.evaluate(a))}eachChild(a){a(this.number),this.locale&&a(this.locale),this.currency&&a(this.currency),this.unit&&a(this.unit),this.minFractionDigits&&a(this.minFractionDigits),this.maxFractionDigits&&a(this.maxFractionDigits)}outputDefined(){return!1}serialize(){let a={};return this.locale&&(a.locale=this.locale.serialize()),this.currency&&(a.currency=this.currency.serialize()),this.unit&&(a.unit=this.unit.serialize()),this.minFractionDigits&&(a["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(a["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),a]}}class d1{constructor(a){this.type=jn,this.input=a}static parse(a,c){if(a.length!==2)return c.error(`Expected 1 argument, but found ${a.length-1} instead.`);let h=c.parse(a[1],1);return h?h.type.kind!=="array"&&h.type.kind!=="string"&&h.type.kind!=="value"?c.error(`Expected argument of type string or array, but found ${fc(h.type)} instead.`):new d1(h):null}evaluate(a){let c=this.input.evaluate(a);if(typeof c=="string"||Array.isArray(c))return c.length;throw new gn(`Expected value to be of type string or array, but found ${fc(Bc(c))} instead.`)}eachChild(a){a(this.input)}outputDefined(){return!1}serialize(){let a=["length"];return this.eachChild(c=>{a.push(c.serialize())}),a}}function Gy(u){return function(){u=1831565813+(u|=0)|0;let a=Math.imul(u^u>>>15,1|u);return a=a+Math.imul(a^a>>>7,61|a)^a,((a^a>>>14)>>>0)/4294967296}}let E_={"==":r3,"!=":s3,">":c1,"<":a3,">=":l3,"<=":FM,array:xo,at:wD,"at-interpolated":SD,boolean:xo,case:I_,coalesce:s1,collator:Vd,format:Ly,image:Lb,in:KS,"index-of":a1,interpolate:Ph,"interpolate-hcl":Ph,"interpolate-lab":Ph,length:d1,let:ym,literal:Qo,match:qb,number:xo,"number-format":ED,object:xo,slice:l1,step:T_,string:xo,"to-boolean":ql,"to-color":ql,"to-number":ql,"to-string":ql,var:jS,within:Ny,distance:Sf,config:$b,split:TD};function PM(u,[a,c,h,f]){a=a.evaluate(u),c=c.evaluate(u),h=h.evaluate(u);let y=f?f.evaluate(u):1,b=FS(a,c,h,y);if(b)throw new gn(b);return new Ts(a/255,c/255,h/255,y)}function WS(u,[a,c,h,f]){a=a.evaluate(u),c=c.evaluate(u),h=h.evaluate(u);let y=f?f.evaluate(u):1,b=(function(F,z,U,j){return typeof F=="number"&&F>=0&&F<=360?typeof z=="number"&&z>=0&&z<=100&&typeof U=="number"&&U>=0&&U<=100?j===void 0||typeof j=="number"&&j>=0&&j<=1?null:`Invalid hsla value [${[F,z,U,j].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof j=="number"?[F,z,U,j]:[F,z,U]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof j=="number"?[F,z,U,j]:[F,z,U]).join(", ")}]: 'h' must be between 0 and 360.`})(a,c,h,y);if(b)throw new gn(b);let S=`hsla(${a}, ${c}%, ${h}%, ${y})`,M=Ts.parse(S);if(!M)throw new gn(`Failed to parse HSLA color: ${S}`);return M}function DD(u,a){return u in a}function bm(u,a){let c=a[u];return c===void 0?null:c}function D_(u){return{type:u}}function Lh(u){return{result:"success",value:u}}function Hd(u){return{result:"error",value:u}}function AD(u,a){return!!u&&!!u.parameters&&u.parameters.indexOf(a)>-1}function u1(u){return u["property-type"]==="data-driven"}function YS(u){return AD(u.expression,"measure-light")}function $y(u){return AD(u.expression,"zoom")}function If(u){return!!u.expression&&u.expression.interpolated}function p1(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function kD(u){return u}function qy(u,a){let c=a.type==="color",h=u.stops&&typeof u.stops[0][0]=="object",f=h||!(h||u.property!==void 0),y=u.type||(If(a)?"exponential":"interval");if(c&&((u=Object.assign({},u)).stops&&(u.stops=u.stops.map(F=>[F[0],Ts.parse(F[1])])),u.default=Ts.parse(u.default?u.default:a.default)),u.colorSpace&&u.colorSpace!=="rgb"&&!RM[u.colorSpace])throw new Error(`Unknown color space: ${u.colorSpace}`);let b,S,M;if(y==="exponential")b=QS;else if(y==="interval")b=ru;else if(y==="categorical"){b=LM,S=Object.create(null);for(let F of u.stops)S[F[0]]=F[1];M=typeof u.stops[0][0]}else{if(y!=="identity")throw new Error(`Unknown function type "${y}"`);b=NM}if(h){let F={},z=[];for(let Z=0;ZZ[0]),evaluate:({zoom:Z},X)=>QS({stops:U,base:u.base},a,Z).evaluate(Z,X)}}if(f){let F=y==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:F,interpolationFactor:Ph.interpolationFactor.bind(void 0,F),zoomStops:u.stops.map(z=>z[0]),evaluate:({zoom:z})=>b(u,a,z,S,M)}}return{kind:"source",evaluate(F,z){let U=z&&z.properties?z.properties[u.property]:void 0;return U===void 0?Kb(u.default,a.default):b(u,a,U,S,M)}}}function Kb(u,a,c){return u!==void 0?u:a!==void 0?a:c!==void 0?c:void 0}function LM(u,a,c,h,f){return Kb(typeof c===f?h[c]:void 0,u.default,a.default)}function ru(u,a,c){if(!bg(c))return Kb(u.default,a.default);let h=u.stops.length;if(h===1||c<=u.stops[0][0])return u.stops[0][1];if(c>=u.stops[h-1][0])return u.stops[h-1][1];let f=zy(u.stops.map(y=>y[0]),c);return u.stops[f][1]}function QS(u,a,c){let h=u.base!==void 0?u.base:1;if(!bg(c))return Kb(u.default,a.default);let f=u.stops.length;if(f===1||c<=u.stops[0][0])return u.stops[0][1];if(c>=u.stops[f-1][0])return u.stops[f-1][1];let y=zy(u.stops.map(z=>z[0]),c),b=(function(z,U,j,Z){let X=Z-j,ue=z-j;return X===0?0:U===1?ue/X:(Math.pow(U,ue)-1)/(Math.pow(U,X)-1)})(c,h,u.stops[y][0],u.stops[y+1][0]),S=u.stops[y][1],M=u.stops[y+1][1],F=Ic[a.type]||kD;if(u.colorSpace&&u.colorSpace!=="rgb"){let z=RM[u.colorSpace];F=(U,j)=>z.reverse(z.interpolate(z.forward(U),z.forward(j),b))}return typeof S.evaluate=="function"?{evaluate(...z){let U=S.evaluate.apply(void 0,z),j=M.evaluate.apply(void 0,z);if(U!==void 0&&j!==void 0)return F(U,j,b)}}:F(S,M,b)}function NM(u,a,c){return a.type==="color"?c=Ts.parse(c):a.type==="formatted"?c=wu.fromString(c.toString()):a.type==="resolvedImage"?c=Su.build(c.toString()):Do(c)===a.type||a.type==="enum"&&a.values[c]||(c=void 0),Kb(c,u.default,a.default)}Bd.register(E_,{error:[{kind:"error"},[fs],(u,[a])=>{throw new gn(a.evaluate(u))}],typeof:[fs,[gs],(u,[a])=>fc(Bc(a.evaluate(u)))],"to-rgba":[xu(jn,4),[ud],(u,[a])=>a.evaluate(u).toNonPremultipliedRenderColor(null).toArray()],"to-hsla":[xu(jn,4),[ud],(u,[a])=>a.evaluate(u).toNonPremultipliedRenderColor(null).toHslaArray()],rgb:[ud,[jn,jn,jn],PM],rgba:[ud,[jn,jn,jn,jn],PM],hsl:[ud,[jn,jn,jn],WS],hsla:[ud,[jn,jn,jn,jn],WS],has:{type:sr,overloads:[[[fs],(u,[a])=>DD(a.evaluate(u),u.properties())],[[fs,x_],(u,[a,c])=>DD(a.evaluate(u),c.evaluate(u))]]},get:{type:gs,overloads:[[[fs],(u,[a])=>bm(a.evaluate(u),u.properties())],[[fs,x_],(u,[a,c])=>bm(a.evaluate(u),c.evaluate(u))]]},"feature-state":[gs,[fs],(u,[a])=>bm(a.evaluate(u),u.featureState||{})],properties:[x_,[],u=>u.properties()],"geometry-type":[fs,[],u=>u.geometryType()],worldview:[fs,[],u=>u.globals.worldview||""],id:[gs,[],u=>u.id()],zoom:[jn,[],u=>u.globals.zoom],pitch:[jn,[],u=>u.globals.pitch||0],"distance-from-center":[jn,[],u=>u.distanceFromCenter()],"measure-light":[jn,[fs],(u,[a])=>u.measureLight(a.evaluate(u))],"heatmap-density":[jn,[],u=>u.globals.heatmapDensity||0],"line-progress":[jn,[],u=>u.globals.lineProgress||0],"raster-value":[jn,[],u=>u.globals.rasterValue||0],"raster-particle-speed":[jn,[],u=>u.globals.rasterParticleSpeed||0],"sky-radial-progress":[jn,[],u=>u.globals.skyRadialProgress||0],accumulated:[gs,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[jn,D_(jn),(u,a)=>{let c=0;for(let h of a)c+=h.evaluate(u);return c}],"*":[jn,D_(jn),(u,a)=>{let c=1;for(let h of a)c*=h.evaluate(u);return c}],"-":{type:jn,overloads:[[[jn,jn],(u,[a,c])=>a.evaluate(u)-c.evaluate(u)],[[jn],(u,[a])=>-a.evaluate(u)]]},"/":[jn,[jn,jn],(u,[a,c])=>a.evaluate(u)/c.evaluate(u)],"%":[jn,[jn,jn],(u,[a,c])=>a.evaluate(u)%c.evaluate(u)],ln2:[jn,[],()=>Math.LN2],pi:[jn,[],()=>Math.PI],e:[jn,[],()=>Math.E],"^":[jn,[jn,jn],(u,[a,c])=>Math.pow(a.evaluate(u),c.evaluate(u))],sqrt:[jn,[jn],(u,[a])=>Math.sqrt(a.evaluate(u))],log10:[jn,[jn],(u,[a])=>Math.log(a.evaluate(u))/Math.LN10],ln:[jn,[jn],(u,[a])=>Math.log(a.evaluate(u))],log2:[jn,[jn],(u,[a])=>Math.log2(a.evaluate(u))],sin:[jn,[jn],(u,[a])=>Math.sin(a.evaluate(u))],cos:[jn,[jn],(u,[a])=>Math.cos(a.evaluate(u))],tan:[jn,[jn],(u,[a])=>Math.tan(a.evaluate(u))],asin:[jn,[jn],(u,[a])=>Math.asin(a.evaluate(u))],acos:[jn,[jn],(u,[a])=>Math.acos(a.evaluate(u))],atan:[jn,[jn],(u,[a])=>Math.atan(a.evaluate(u))],min:[jn,D_(jn),(u,a)=>Math.min(...a.map(c=>c.evaluate(u)))],max:[jn,D_(jn),(u,a)=>Math.max(...a.map(c=>c.evaluate(u)))],abs:[jn,[jn],(u,[a])=>Math.abs(a.evaluate(u))],round:[jn,[jn],(u,[a])=>{let c=a.evaluate(u);return c<0?-Math.round(-c):Math.round(c)}],floor:[jn,[jn],(u,[a])=>Math.floor(a.evaluate(u))],ceil:[jn,[jn],(u,[a])=>Math.ceil(a.evaluate(u))],"filter-==":[sr,[fs,gs],(u,[a,c])=>u.properties()[a.value]===c.value],"filter-id-==":[sr,[gs],(u,[a])=>u.id()===a.value],"filter-type-==":[sr,[fs],(u,[a])=>u.geometryType()===a.value],"filter-<":[sr,[fs,gs],(u,[a,c])=>{let h=u.properties()[a.value],f=c.value;return typeof h==typeof f&&h{let c=u.id(),h=a.value;return typeof c==typeof h&&c":[sr,[fs,gs],(u,[a,c])=>{let h=u.properties()[a.value],f=c.value;return typeof h==typeof f&&h>f}],"filter-id->":[sr,[gs],(u,[a])=>{let c=u.id(),h=a.value;return typeof c==typeof h&&c>h}],"filter-<=":[sr,[fs,gs],(u,[a,c])=>{let h=u.properties()[a.value],f=c.value;return typeof h==typeof f&&h<=f}],"filter-id-<=":[sr,[gs],(u,[a])=>{let c=u.id(),h=a.value;return typeof c==typeof h&&c<=h}],"filter->=":[sr,[fs,gs],(u,[a,c])=>{let h=u.properties()[a.value],f=c.value;return typeof h==typeof f&&h>=f}],"filter-id->=":[sr,[gs],(u,[a])=>{let c=u.id(),h=a.value;return typeof c==typeof h&&c>=h}],"filter-has":[sr,[gs],(u,[a])=>a.value in u.properties()],"filter-has-id":[sr,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[sr,[xu(fs)],(u,[a])=>a.value.indexOf(u.geometryType())>=0],"filter-id-in":[sr,[xu(gs)],(u,[a])=>a.value.indexOf(u.id())>=0],"filter-in-small":[sr,[fs,xu(gs)],(u,[a,c])=>c.value.indexOf(u.properties()[a.value])>=0],"filter-in-large":[sr,[fs,xu(gs)],(u,[a,c])=>(function(h,f,y,b){for(;y<=b;){let S=y+b>>1;if(f[S]===h)return!0;f[S]>h?b=S-1:y=S+1}return!1})(u.properties()[a.value],c.value,0,c.value.length-1)],all:{type:sr,overloads:[[[sr,sr],(u,[a,c])=>a.evaluate(u)&&c.evaluate(u)],[D_(sr),(u,a)=>{for(let c of a)if(!c.evaluate(u))return!1;return!0}]]},any:{type:sr,overloads:[[[sr,sr],(u,[a,c])=>a.evaluate(u)||c.evaluate(u)],[D_(sr),(u,a)=>{for(let c of a)if(c.evaluate(u))return!0;return!1}]]},"!":[sr,[sr],(u,[a])=>!a.evaluate(u)],"is-supported-script":[sr,[fs],(u,[a])=>{let c=u.globals&&u.globals.isSupportedScript;return!c||c(a.evaluate(u))}],upcase:[fs,[fs],(u,[a])=>a.evaluate(u).toUpperCase()],downcase:[fs,[fs],(u,[a])=>a.evaluate(u).toLowerCase()],concat:[fs,D_(gs),(u,a)=>a.map(c=>Jl(c.evaluate(u))).join("")],"resolved-locale":[fs,[kb],(u,[a])=>a.evaluate(u).resolvedLocale()],random:[jn,[jn,jn,gs],(u,a)=>{let[c,h,f]=a.map(b=>b.evaluate(u));if(c>h||c===h)return c;let y;if(typeof f=="string")y=(function(b){let S=0;if(b.length===0)return S;for(let M=0;MJSON.stringify(U)).join(", ")}, but found ${JSON.stringify(z)} instead.`);return z}catch(z){return this._warningHistory[z.message]||(this._warningHistory[z.message]=!0,typeof console<"u"&&console.warn(`Failed to evaluate expression "${JSON.stringify(this.expression.serialize())}". ${z.message}`)),this._defaultValue}}}function h1(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in E_}function Bh(u,a,c,h,f){let y=new GS(E_,[],a?(function(S){let M={color:ud,string:fs,number:jn,enum:fs,boolean:sr,formatted:A0,resolvedImage:Xx};return S.type==="array"?xu(M[S.value]||gs,S.length):M[S.type]})(a):void 0,void 0,void 0,c,h,f),b=y.parse(u,void 0,void 0,void 0,a&&a.type==="string"?{typeAnnotation:"coerce"}:void 0);return b?Lh(new Nh(b,a,c,h,f)):Hd(y.errors)}class Ef{constructor(a,c,h,f){this.kind=a,this._styleExpression=c,this.isLightConstant=h,this.isLineProgressConstant=f,this.isStateDependent=a!=="constant"&&!S_(c.expression),this.configDependencies=R0(c.expression)}evaluateWithoutErrorHandling(a,c,h,f,y,b){return this._styleExpression.evaluateWithoutErrorHandling(a,c,h,f,y,b)}evaluate(a,c,h,f,y,b,S){return this._styleExpression.evaluate(a,c,h,f,y,b,void 0,void 0,S)}}class A_{constructor(a,c,h,f,y,b){this.kind=a,this.zoomStops=h,this._styleExpression=c,this.isStateDependent=a!=="camera"&&!S_(c.expression),this.isLightConstant=y,this.isLineProgressConstant=b,this.configDependencies=R0(c.expression),this.interpolationType=f}evaluateWithoutErrorHandling(a,c,h,f,y,b){return this._styleExpression.evaluateWithoutErrorHandling(a,c,h,f,y,b)}evaluate(a,c,h,f,y,b){return this._styleExpression.evaluate(a,c,h,f,y,b)}interpolationFactor(a,c,h){return this.interpolationType?Ph.interpolationFactor(this.interpolationType,a,c,h):0}}function Tu(u,a,c,h,f){if((u=Bh(u,a,c,h,f)).result==="error")return u;let y=u.value.expression,b=O0(y);if(!b&&!u1(a))return Hd([new yf("","data expressions not supported")]);let S=Sg(y,["zoom","pitch","distance-from-center"]);if(!S&&!$y(a))return Hd([new yf("","zoom expressions not supported")]);let M=Sg(y,["measure-light"]);if(!M&&!YS(a))return Hd([new yf("","measure-light expression not supported")]);let F=Sg(y,["line-progress"]);if(!F&&!(function(j){return AD(j.expression,"line-progress")})(a))return Hd([new yf("","line-progress expression not supported")]);let z=a.expression&&a.expression.relaxZoomRestriction,U=ZS(y);return U||S||z?U instanceof yf?Hd([U]):U instanceof Ph&&!If(a)?Hd([new yf("",'"interpolate" expressions cannot be used with this property')]):Lh(U?new A_(b&&F?"camera":"composite",u.value,U.labels,U instanceof Ph?U.interpolation:void 0,M,F):new Ef(b&&F?"constant":"source",u.value,M,F)):Hd([new yf("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class Wb{constructor(a,c){this._parameters=a,this._specification=c,Object.assign(this,qy(this._parameters,this._specification))}static deserialize(a){return new Wb(a._parameters,a._specification)}static serialize(a){return{_parameters:a._parameters,_specification:a._specification}}}function ZS(u){let a=null;if(u instanceof ym)a=ZS(u.result);else if(u instanceof s1){for(let c of u.args)if(a=ZS(c),a)break}else(u instanceof T_||u instanceof Ph)&&u.input instanceof Bd&&u.input.name==="zoom"&&(a=u);return a instanceof yf||u.eachChild(c=>{let h=ZS(c);h instanceof yf?a=h:a&&h&&a!==h&&(a=new yf("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),a}var m1,XS,JS=(function(){if(XS)return m1;XS=1,m1=a;var u=3;function a(c,h,f){var y=this.cells=[];if(c instanceof ArrayBuffer){this.arrayBuffer=c;var b=new Int32Array(this.arrayBuffer);c=b[0],this.d=(h=b[1])+2*(f=b[2]);for(var S=0;S=j[ue+0]&&y>=j[ue+1])?(M[X]=!0,S.push(U[X])):M[X]=!1}}},a.prototype._forEachCell=function(c,h,f,y,b,S,M,F){for(var z=this._convertToCellCoord(c),U=this._convertToCellCoord(h),j=this._convertToCellCoord(f),Z=this._convertToCellCoord(y),X=z;X<=j;X++)for(var ue=U;ue<=Z;ue++){var pe=this.d*ue+X;if((!F||F(this._convertFromCellCoord(X),this._convertFromCellCoord(ue),this._convertFromCellCoord(X+1),this._convertFromCellCoord(ue+1)))&&b.call(this,c,h,f,y,pe,S,M,F))return}},a.prototype._convertFromCellCoord=function(c){return(c-this.padding)/this.scale},a.prototype._convertToCellCoord=function(c){return Math.max(0,Math.min(this.d-1,Math.floor(c*this.scale)+this.padding))},a.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var c=this.cells,h=u+this.cells.length+1+1,f=0,y=0;y=0||(f[y]=Cm(u[y],a)));u instanceof Error&&(f.message=u.message)}if(f.$name)throw new Error("$name property is reserved for worker serialization logic.");return h!=="Object"&&(f.$name=h),f}throw new Error("can't serialize object of type "+typeof u)}function L0(u){if(u==null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||MD(u)||k_(u)||ArrayBuffer.isView(u)||u instanceof ImageData)return u;if(Array.isArray(u))return u.map(L0);if(typeof u=="object"){let a=u.$name||"Object";if(a==="Map"){let f=u.entries||[],y=new Map;for(let b=0;bu>=128&&u<=255,Arabic:u=>u>=1536&&u<=1791,"Arabic Supplement":u=>u>=1872&&u<=1919,"Arabic Extended-A":u=>u>=2208&&u<=2303,"Hangul Jamo":u=>u>=4352&&u<=4607,"Unified Canadian Aboriginal Syllabics":u=>u>=5120&&u<=5759,Khmer:u=>u>=6016&&u<=6143,"Unified Canadian Aboriginal Syllabics Extended":u=>u>=6320&&u<=6399,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"CJK Radicals Supplement":u=>u>=11904&&u<=12031,"Kangxi Radicals":u=>u>=12032&&u<=12255,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Hiragana:u=>u>=12352&&u<=12447,Katakana:u=>u>=12448&&u<=12543,Bopomofo:u=>u>=12544&&u<=12591,"Hangul Compatibility Jamo":u=>u>=12592&&u<=12687,Kanbun:u=>u>=12688&&u<=12703,"Bopomofo Extended":u=>u>=12704&&u<=12735,"CJK Strokes":u=>u>=12736&&u<=12783,"Katakana Phonetic Extensions":u=>u>=12784&&u<=12799,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"CJK Unified Ideographs Extension A":u=>u>=13312&&u<=19903,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"CJK Unified Ideographs":u=>u>=19968&&u<=40959,"Yi Syllables":u=>u>=40960&&u<=42127,"Yi Radicals":u=>u>=42128&&u<=42191,"Hangul Jamo Extended-A":u=>u>=43360&&u<=43391,"Hangul Syllables":u=>u>=44032&&u<=55215,"Hangul Jamo Extended-B":u=>u>=55216&&u<=55295,"Private Use Area":u=>u>=57344&&u<=63743,"CJK Compatibility Ideographs":u=>u>=63744&&u<=64255,"Arabic Presentation Forms-A":u=>u>=64336&&u<=65023,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Arabic Presentation Forms-B":u=>u>=65136&&u<=65279,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519,Osage:u=>u>=66736&&u<=66815,"CJK Unified Ideographs Extension B":u=>u>=131072&&u<=173791};function f1(u){for(let a of u)if(tT(a.charCodeAt(0)))return!0;return!1}function OD(u){for(let a of u)if(!eT(a.charCodeAt(0)))return!1;return!0}function eT(u){return!(_o.Arabic(u)||_o["Arabic Supplement"](u)||_o["Arabic Extended-A"](u)||_o["Arabic Presentation Forms-A"](u)||_o["Arabic Presentation Forms-B"](u))}function tT(u){return!(u!==746&&u!==747&&(u<4352||!(_o["Bopomofo Extended"](u)||_o.Bopomofo(u)||_o["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||_o["CJK Compatibility Ideographs"](u)||_o["CJK Compatibility"](u)||_o["CJK Radicals Supplement"](u)||_o["CJK Strokes"](u)||!(!_o["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||u===12336)||_o["CJK Unified Ideographs Extension A"](u)||_o["CJK Unified Ideographs"](u)||_o["Enclosed CJK Letters and Months"](u)||_o["Hangul Compatibility Jamo"](u)||_o["Hangul Jamo Extended-A"](u)||_o["Hangul Jamo Extended-B"](u)||_o["Hangul Jamo"](u)||_o["Hangul Syllables"](u)||_o.Hiragana(u)||_o["Ideographic Description Characters"](u)||_o.Kanbun(u)||_o["Kangxi Radicals"](u)||_o["Katakana Phonetic Extensions"](u)||_o.Katakana(u)&&u!==12540||!(!_o["Halfwidth and Fullwidth Forms"](u)||u===65288||u===65289||u===65293||u>=65306&&u<=65310||u===65339||u===65341||u===65343||u>=65371&&u<=65503||u===65507||u>=65512&&u<=65519)||!(!_o["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||_o["Unified Canadian Aboriginal Syllabics"](u)||_o["Unified Canadian Aboriginal Syllabics Extended"](u)||_o["Vertical Forms"](u)||_o["Yijing Hexagram Symbols"](u)||_o["Yi Syllables"](u)||_o["Yi Radicals"](u))))}function iT(u){return!(tT(u)||(function(a){return!!(_o["Latin-1 Supplement"](a)&&(a===167||a===169||a===174||a===177||a===188||a===189||a===190||a===215||a===247)||_o["General Punctuation"](a)&&(a===8214||a===8224||a===8225||a===8240||a===8241||a===8251||a===8252||a===8258||a===8263||a===8264||a===8265||a===8273)||_o["Letterlike Symbols"](a)||_o["Number Forms"](a)||_o["Miscellaneous Technical"](a)&&(a>=8960&&a<=8967||a>=8972&&a<=8991||a>=8996&&a<=9e3||a===9003||a>=9085&&a<=9114||a>=9150&&a<=9165||a===9167||a>=9169&&a<=9179||a>=9186&&a<=9215)||_o["Control Pictures"](a)&&a!==9251||_o["Optical Character Recognition"](a)||_o["Enclosed Alphanumerics"](a)||_o["Geometric Shapes"](a)||_o["Miscellaneous Symbols"](a)&&!(a>=9754&&a<=9759)||_o["Miscellaneous Symbols and Arrows"](a)&&(a>=11026&&a<=11055||a>=11088&&a<=11097||a>=11192&&a<=11243)||_o["CJK Symbols and Punctuation"](a)||_o.Katakana(a)||_o["Private Use Area"](a)||_o["CJK Compatibility Forms"](a)||_o["Small Form Variants"](a)||_o["Halfwidth and Fullwidth Forms"](a)||a===8734||a===8756||a===8757||a>=9984&&a<=10087||a>=10102&&a<=10131||a===65532||a===65533)})(u))}function BM(u){return _o.Arabic(u)||_o["Arabic Supplement"](u)||_o["Arabic Extended-A"](u)||_o["Arabic Presentation Forms-A"](u)||_o["Arabic Presentation Forms-B"](u)}function nT(u){return u>=1424&&u<=2303||_o["Arabic Presentation Forms-A"](u)||_o["Arabic Presentation Forms-B"](u)}function c3(u,a){return!(!a&&nT(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||_o.Khmer(u))}function RD(u){for(let a of u)if(nT(a.charCodeAt(0)))return!0;return!1}let Tp={unavailable:"unavailable",deferred:"deferred",loading:"loading",parsing:"parsing",parsed:"parsed",loaded:"loaded",error:"error"},oT=null,Iu=Tp.unavailable,Df=null,VM=function(u){u&&typeof u=="string"&&u.indexOf("NetworkError")>-1&&(Iu=Tp.error),oT&&oT(u)};function rT(){sT.fire(new _f("pluginStateChange",{pluginStatus:Iu,pluginURL:Df}))}let sT=new D0,aT=function(){return Iu},N0=function(){if(Iu!==Tp.deferred||!Df)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Iu=Tp.loading,rT(),Df&&Eb({url:Df},u=>{u?VM(u):(Iu=Tp.loaded,rT())})},Eg={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Iu===Tp.loaded||Eg.applyArabicShaping!=null,isLoading:()=>Iu===Tp.loading,setState(u){Iu=u.pluginStatus,Df=u.pluginURL},isParsing:()=>Iu===Tp.parsing,isParsed:()=>Iu===Tp.parsed,getPluginURL:()=>Df};class ra{constructor(a,c){this.zoom=a,c?(this.now=c.now,this.fadeDuration=c.fadeDuration,this.transition=c.transition,this.pitch=c.pitch,this.brightness=c.brightness,this.worldview=c.worldview):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0,this.brightness=0)}isSupportedScript(a){return(function(c,h){for(let f of c)if(!c3(f.charCodeAt(0),h))return!1;return!0})(a,Eg.isLoaded())}}class B0{constructor(a,c,h,f,y){this.property=a,this.value=c,this.expression=(function(b,S,M,F,z){if(p1(b))return new Wb(b,S);if(h1(b)||Array.isArray(b)&&b.length>0){let U=Tu(b,S,M,F,z);if(U.result==="error")throw new Error(U.value.map(j=>`${j.key}: ${j.message}`).join(", "));return U.value}{let U=b;return typeof b=="string"&&S.type==="color"&&(U=Ts.parse(b)),{kind:"constant",configDependencies:new Set,evaluate:()=>U}}})(c===void 0?a.specification.default:c,a.specification,h,f,y)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(a,c,h,f){return this.property.possiblyEvaluate(this,a,c,h,f)}}class g1{constructor(a,c,h,f){this.property=a,this.value=new B0(a,void 0,c,h,f)}transitioned(a,c){return new Af(this.property,this.value,c,Object.assign({},a.transition,this.transition),a.now)}untransitioned(){return new Af(this.property,this.value,null,{},0)}}class zM{constructor(a,c,h,f){this._properties=a,this._values=Object.create(a.defaultTransitionablePropertyValues),this._scope=c,this._options=h,this._iconImageUseTheme=f,this.configDependencies=new Set}getValue(a){return fr(this._values[a].value.value)}setValue(a,c){this._values.hasOwnProperty(a)||(this._values[a]=new g1(this._values[a].property,this._scope,this._options,this._iconImageUseTheme)),this._values[a].value=new B0(this._values[a].property,c===null?void 0:fr(c),this._scope,this._options,this._iconImageUseTheme),this._values[a].value.expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[a].value.expression.configDependencies]))}setTransitionOrValue(a,c){c&&(this._options=c);let h=this._properties.properties;if(a)for(let f in a){let y=a[f];if(f.endsWith("-transition")){let b=f.slice(0,-11);h[b]&&this.setTransition(b,y)}else h.hasOwnProperty(f)&&this.setValue(f,y)}}getTransition(a){return fr(this._values[a].transition)}setTransition(a,c){this._values.hasOwnProperty(a)||(this._values[a]=new g1(this._values[a].property)),this._values[a].transition=fr(c)||void 0}serialize(){let a={};for(let c of Object.keys(this._values)){let h=this.getValue(c);h!==void 0&&(a[c]=h);let f=this.getTransition(c);f!==void 0&&(a[`${c}-transition`]=f)}return a}transitioned(a,c){let h=new Zs(this._properties);for(let f of Object.keys(this._values))h._values[f]=this._values[f].transitioned(a,c._values[f]);return h}untransitioned(){let a=new Zs(this._properties);for(let c of Object.keys(this._values))a._values[c]=this._values[c].untransitioned();return a}}class Af{constructor(a,c,h,f,y){let b=f.delay||0,S=f.duration||0;y=y||0,this.property=a,this.value=c,this.begin=y+b,this.end=this.begin+S,a.specification.transition&&(f.delay||f.duration)&&(this.prior=h)}possiblyEvaluate(a,c,h){let f=a.now||0,y=this.value.possiblyEvaluate(a,c,h),b=this.prior;if(b){if(f>this.end)return this.prior=null,y;if(this.value.isDataDriven())return this.prior=null,y;if(f":1,">=":1,"<":1,"<=":1,"in":1,"!in":1,"all":1,"any":1,"none":1,"has":1,"!has":1}},"geometry_type":{"type":"enum","values":{"Point":1,"LineString":1,"Polygon":1}},"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":1,"exponential":1,"interval":1,"categorical":1},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":1,"lab":1,"hcl":1},"default":"rgb"},"default":{"type":"*"}},"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","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":true,"transition":true},"high-color":{"type":"color","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":true,"transition":true},"space-color":{"type":"color","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":true,"transition":true},"horizon-blend":{"type":"number","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"star-intensity":{"type":"number","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vertical-range":{"type":"array","default":[0,0],"minimum":0,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}}},"snow":{"density":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,0.85],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":true,"transition":true},"opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,0.3],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette-color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":true,"transition":true},"center-thinning":{"type":"number","default":0.4,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"direction":{"type":"array","default":[0,50],"minimum":0,"maximum":360,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"flake-size":{"type":"number","default":0.71,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true}},"rain":{"density":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,0.5],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"color":{"type":"color","default":["interpolate",["linear"],["measure-light","brightness"],0,"#03113d",0.3,"#a8adbc"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":true,"transition":true},"opacity":{"type":"number","default":["interpolate",["linear"],["measure-light","brightness"],0,0.88,1,0.7],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette-color":{"type":"color","default":["interpolate",["linear"],["measure-light","brightness"],0,"#001736",0.3,"#464646"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":true,"transition":true},"center-thinning":{"type":"number","default":0.57,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"direction":{"type":"array","default":[0,80],"minimum":0,"maximum":360,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"droplet-size":{"type":"array","default":[2.6,18.2],"minimum":0,"maximum":50,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"distortion-strength":{"type":"number","default":0.7,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true}},"camera":{"camera-projection":{"type":"enum","values":{"perspective":1,"orthographic":1},"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"default":"perspective"}},"colorTheme":{"data":{"type":"string","expression":{}}},"indoor":{"floorplanFeaturesetId":{"type":"string","expression":{}},"buildingFeaturesetId":{"type":"string","expression":{}}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"use-theme":true,"transition":true},"intensity":{"type":"number","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":1,"equalEarth":1,"equirectangular":1,"lambertConformalConic":1,"mercator":1,"naturalEarth":1,"winkelTripel":1,"globe":1},"default":"mercator"},"center":{"type":"array","length":2,"value":"number","minimum":[-180,-90],"maximum":[180,90]},"parallels":{"type":"array","length":2,"value":"number","minimum":[-90,-90],"maximum":[90,90]}},"terrain":{"source":{"type":"string"},"exaggeration":{"type":"number","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_building","paint_symbol","paint_raster","paint_raster-particle","paint_hillshade","paint_background","paint_sky","paint_model"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"fill-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-pattern-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-z-offset":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-bridge-guard-rail-color":{"type":"color","default":"rgba(241, 236, 225, 255)","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature"]},"property-type":"data-driven"},"fill-tunnel-structure-color":{"type":"color","default":"rgba(241, 236, 225, 255)","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","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"]}},"fill-extrusion-color":{"type":"color","default":"#000000","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"fill-extrusion-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-pattern-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-height-alignment":{"type":"enum","values":{"terrain":1,"flat":1},"default":"flat"},"fill-extrusion-base-alignment":{"type":"enum","values":{"terrain":1,"flat":1},"default":"terrain"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-ambient-occlusion-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-wall-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-flood-light-color":{"type":"color","default":"#ffffff","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-wall-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-radius":{"property-type":"data-driven","type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-vertical-scale":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-rounded-roof":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"fill-extrusion-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"fill-extrusion-line-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-cast-shadows":{"type":"boolean","default":true}},"paint_building":{"building-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"building-ambient-occlusion-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"parameters":[]},"transition":true},"building-ambient-occlusion-ground-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"building-ambient-occlusion-ground-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"building-ambient-occlusion-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"building-vertical-scale":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"building-cast-shadows":{"type":"boolean","default":true},"building-color":{"type":"color","default":"rgba(193, 154, 127, 1)","use-theme":true,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"property-type":"data-driven"},"building-emissive-strength":{"type":"number","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"property-type":"data-driven"},"building-facade-emissive-chance":{"type":"number","default":0.35,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["measure-light","zoom"]}},"building-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"building-flood-light-color":{"type":"color","default":"#ffffff","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"building-flood-light-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"building-flood-light-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"line-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light","line-progress"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"line-gradient":{"type":"color","use-theme":true,"expression":{"interpolated":true,"parameters":["line-progress"]}},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1]},"line-trim-fade-range":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"line-trim-color":{"type":"color","default":"transparent","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"line-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"line-border-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-border-color":{"type":"color","default":"rgba(0, 0, 0, 0)","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-occlusion-opacity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"circle-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"circle-pitch-scale":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"circle-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]}},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"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","measure-light"]},"property-type":"data-driven"},"circle-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"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"],"use-theme":true,"expression":{"interpolated":true,"parameters":["heatmap-density"]}},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-occlusion-opacity":{"type":"number","minimum":0,"maximum":1,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"text-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"icon-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"icon-image-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-occlusion-opacity":{"type":"number","minimum":0,"maximum":1,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","use-theme":true,"transition":true,"overridable":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"text-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"icon-color-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"expression":{}},"icon-color-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"expression":{}},"icon-color-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"icon-color-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{}},"symbol-z-offset":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color":{"type":"color","use-theme":true,"expression":{"interpolated":true,"parameters":["raster-value"]}},"raster-color-mix":{"type":"array","default":[0.2126,0.7152,0.0722,0],"length":4,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color-range":{"type":"array","length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-resampling":{"type":"enum","values":{"linear":1,"nearest":1},"default":"linear","expression":{"parameters":["zoom"]}},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"raster-array-band":{"type":"string"},"raster-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_raster-particle":{"raster-particle-array-band":{"type":"string"},"raster-particle-count":{"type":"number","default":512,"minimum":1},"raster-particle-color":{"type":"color","use-theme":true,"expression":{"interpolated":true,"parameters":["raster-particle-speed"]}},"raster-particle-max-speed":{"type":"number","default":1,"minimum":1},"raster-particle-speed-factor":{"type":"number","default":0.2,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-particle-fade-opacity-factor":{"type":"number","default":0.98,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-particle-reset-rate-factor":{"type":"number","default":0.8,"minimum":0,"maximum":1},"raster-particle-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"expression":{"interpolated":true,"parameters":["zoom"]}},"hillshade-illumination-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]}},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"hillshade-shadow-color":{"type":"color","default":"#000000","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-accent-color":{"type":"color","default":"#000000","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}}},"paint_background":{"background-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":[]}},"background-color":{"type":"color","default":"#000000","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"background-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom"]}},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"background-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":1,"atmosphere":1},"default":"atmosphere","expression":{"parameters":["zoom"]}},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]}},"sky-atmosphere-sun-intensity":{"type":"number","default":10,"minimum":0,"maximum":100},"sky-gradient-center":{"type":"array","value":"number","default":[0,0],"length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]}},"sky-gradient-radius":{"type":"number","default":90,"minimum":0,"maximum":180,"expression":{"parameters":["zoom"]}},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"use-theme":true,"expression":{"interpolated":true,"parameters":["sky-radial-progress"]}},"sky-atmosphere-halo-color":{"type":"color","default":"white","use-theme":true},"sky-atmosphere-color":{"type":"color","default":"white","use-theme":true},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_model":{"model-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"property-type":"data-driven"},"model-rotation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-scale":{"type":"array","value":"number","length":3,"default":[1,1,1],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-translation":{"type":"array","value":"number","length":3,"default":[0,0,0],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-color":{"type":"color","default":"#ffffff","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light","zoom"]},"use-theme":true,"transition":true},"model-color-mix-intensity":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-type":{"type":"enum","values":{"common-3d":1,"location-indicator":1},"default":"common-3d"},"model-cast-shadows":{"type":"boolean","default":true},"model-receive-shadows":{"type":"boolean","default":true},"model-ambient-occlusion-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"model-emissive-strength":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-roughness":{"type":"number","default":1,"minimum":0,"maximum":1,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"transition":true},"model-height-based-emissive-strength-multiplier":{"type":"array","default":[1,1,1,1,0],"length":5,"value":"number","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"model-front-cutoff":{"type":"array","value":"number","expression":{"interpolated":true,"parameters":["zoom"]},"length":3,"default":[0,0,1],"minimum":[0,0,0],"maximum":[1,1,1]},"model-elevation-reference":{"type":"enum","values":{"sea":1,"ground":1,"hd-road-markup":1},"default":"ground","expression":{}}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"promoteId":{"*":{"type":"*"}}}');function Qy(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function M_(u){if(Array.isArray(u))return u.map(M_);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){let a={};for(let c in u)a[c]=M_(u[c]);return a}return Qy(u)}function _1(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(let a of u.slice(1))if(!_1(a)&&typeof a!="boolean")return!1;return!0;default:return!0}}function Qb(u,a="",c=null,h="fill"){if(u==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};_1(u)||(u=Zb(u));let f=u,y=!0;try{y=(function(z){if(!V0(z))return z;let U=M_(z);return su(U),U=th(U),U})(f)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate. This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md and paste the contents of this message in the report. Thank you! Filter Expression: ${JSON.stringify(f,null,2)} `)}let b=null,S=null;if(h!=="background"&&h!=="sky"&&h!=="slot"){S=kt[`filter_${h}`];let z=Bh(y,S,a,c);if(z.result==="error")throw new Error(z.value.map(U=>`${U.key}: ${U.message}`).join(", "));b=(U,j,Z)=>z.value.evaluate(U,j,{},Z)}let M=null,F=null;if(y!==f){let z=Bh(f,S,a,c);if(z.result==="error")throw new Error(z.value.map(U=>`${U.key}: ${U.message}`).join(", "));M=(U,j,Z,X,ue)=>z.value.evaluate(U,j,{},Z,void 0,void 0,X,ue),F=!O0(z.value.expression)}return{filter:b,dynamicFilter:M||void 0,needGeometry:PD(y),needFeature:!!F}}function th(u){if(!Array.isArray(u))return u;let a=(function(c){if(FD.has(c[0])){for(let h=1;hth(c))}function su(u){let a=!1,c=[];if(u[0]==="case"){for(let h=1;h",">=","<","<=","to-boolean"]);function lT(u,a){return ua?1:0}function PD(u){if(!Array.isArray(u))return!1;if(u[0]==="within"||u[0]==="distance")return!0;for(let a=1;a"||a==="<="||a===">="?cT(u[1],u[2],a):a==="any"?(c=u.slice(1),["any"].concat(c.map(Zb))):a==="all"?["all"].concat(u.slice(1).map(Zb)):a==="none"?["all"].concat(u.slice(1).map(Zb).map(Mf)):a==="in"?dT(u[1],u.slice(2)):a==="!in"?Mf(dT(u[1],u.slice(2))):a==="has"?uT(u[1]):a!=="!has"||Mf(uT(u[1]));var c}function cT(u,a,c){switch(u){case"$type":return[`filter-type-${c}`,a];case"$id":return[`filter-id-${c}`,a];default:return[`filter-${c}`,u,a]}}function dT(u,a){if(a.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",a]];case"$id":return["filter-id-in",["literal",a]];default:return a.length>200&&!a.some(c=>typeof c!=typeof a[0])?["filter-in-large",u,["literal",a.sort(lT)]]:["filter-in-small",u,["literal",a]]}}function uT(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Mf(u){return["!",u]}let y1="";function Vh(u,a){return a?`${u}${y1}${a}`:u}let pT,LD=()=>pT||(pT=new qs({"icon-size":new an(kt.layout_symbol["icon-size"]),"icon-image":new an(kt.layout_symbol["icon-image"]),"icon-rotate":new an(kt.layout_symbol["icon-rotate"]),"icon-offset":new an(kt.layout_symbol["icon-offset"])}));class ND{constructor(a,c,h,f,y,b){let S=Bh(a,kt.appearance.condition);if(S.result==="success"&&(this.condition=S.value),this.name=c,h){this.properties=new kf(LD()),this.unevaluatedLayout=new Wy(LD(),f,y,b);for(let M in h)this.unevaluatedLayout.setValue(M,h[M])}}isActive(a){return!(this.condition||!a.isHidden||this.name!=="hidden")||this.condition.evaluate(a.globals,a.feature,a.featureState,a.canonical)}getCondition(){return this.condition}getName(){return this.name}getProperty(a){return this.properties.get(a)}getUnevaluatedProperties(){return this.unevaluatedLayout}serialize(){let a={};return a.condition=this.condition.expression.serialize(),this.name&&(a.name=this.name),this.properties&&(a.properties=this.properties),a}}let UM="-transition",HM=new Set(["fill","line","background","hillshade","raster"]);class Eu extends D0{constructor(a,c,h,f,y,b){if(super(),this.id=a.id,this.fqid=Vh(this.id,h),this.type=a.type,this.scope=h,this.lut=f,this.options=y,this.iconImageUseTheme=b,this.appearances=new Array,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,this.configDependencies=new Set,a.type!=="custom"){if(this.metadata=a.metadata,this.minzoom=a.minzoom,this.maxzoom=a.maxzoom,a.type&&a.type!=="background"&&a.type!=="sky"&&a.type!=="slot"){this.source=a.source,this.sourceLayer=a["source-layer"],this.filter=a.filter;let S=Bh(this.filter,kt[`filter_${a.type}`]);S.result!=="error"&&(this.configDependencies=new Set([...this.configDependencies,...S.value.configDependencies]))}if(a.slot&&(this.slot=a.slot),a.appearances&&a.appearances.forEach(S=>{this.appearances.push(new ND(S.condition,S.name,S.properties,this.scope,y,this.iconImageUseTheme))}),c.layout&&(this._unevaluatedLayout=new Wy(c.layout,this.scope,y,this.iconImageUseTheme),this.configDependencies=new Set([...this.configDependencies,...this._unevaluatedLayout.configDependencies])),c.paint){this._transitionablePaint=new zM(c.paint,this.scope,y);for(let S in a.paint)this.setPaintProperty(S,a.paint[S]);for(let S in a.layout)this.setLayoutProperty(S,a.layout[S]);this.configDependencies=new Set([...this.configDependencies,...this._transitionablePaint.configDependencies]),this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new kf(c.paint)}}}onAdd(a){}onRemove(a){}isDraped(a){return!this.is3D(!0)&&HM.has(this.type)}getLayoutProperty(a){return a==="visibility"?this.visibility:this._unevaluatedLayout.getValue(a)}setLayoutProperty(a,c){if(this.type==="custom"&&a==="visibility")return void(this.visibility=c);let h=this._unevaluatedLayout;h._properties.properties[a]&&(h.setValue(a,c),this.configDependencies=new Set([...this.configDependencies,...h.configDependencies]),a==="visibility"&&this.possiblyEvaluateVisibility())}possiblyEvaluateVisibility(){this._unevaluatedLayout._values.visibility&&(this.visibility=this._unevaluatedLayout._values.visibility.possiblyEvaluate({zoom:0}))}getPaintProperty(a){return a.endsWith(UM)?this._transitionablePaint.getTransition(a.slice(0,-11)):this._transitionablePaint.getValue(a)}setPaintProperty(a,c){let h=this._transitionablePaint,f=h._properties.properties;if(a.endsWith(UM)){let U=a.slice(0,-11);return f[U]&&h.setTransition(U,c||void 0),!1}if(!f[a])return!1;let y=h._values[a],b=y.value.isDataDriven(),S=y.value;h.setValue(a,c),this.configDependencies=new Set([...this.configDependencies,...h.configDependencies]),this._handleSpecialPaintPropertyUpdate(a);let M=h._values[a].value,F=M.isDataDriven(),z=a.endsWith("pattern")||a==="line-dasharray";return F||b||z||this._handleOverridablePaintPropertyUpdate(a,S,M)}_handleSpecialPaintPropertyUpdate(a){}getProgramIds(){return null}getDefaultProgramParams(a,c,h){return null}_handleOverridablePaintPropertyUpdate(a,c,h){return!1}isHidden(a){return!!(this.minzoom&&a=this.maxzoom)||this.visibility==="none"}updateTransitions(a){this._transitioningPaint=this._transitionablePaint.transitioned(a,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(a,c){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(a,void 0,c,this.iconImageUseTheme)),this.paint=this._transitioningPaint.possiblyEvaluate(a,void 0,c)}serialize(){let a={id:this.id,type:this.type,slot:this.slot,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.appearances.length!==0&&(a.appearances=this.appearances.map(c=>c.serialize())),Or(a,(c,h)=>!(c===void 0||h==="layout"&&!Object.keys(c).length||h==="paint"&&!Object.keys(c).length))}is3D(a){return!1}hasElevation(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}hasShadowPass(){return!1}canCastShadows(){return!1}hasLightBeamPass(){return!1}cutoffRange(){return 0}tileCoverLift(){return 0}resize(){}_clear(){}isStateDependent(){for(let a in this.paint._values){let c=this.paint.get(a);if(c instanceof Yy&&u1(c.property.specification)&&(c.value.kind==="source"||c.value.kind==="composite")&&c.value.isStateDependent)return!0}return!1}compileFilter(a){this._filterCompiled||(this._featureFilter=Qb(this.filter,this.scope,a),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}getLayerRenderingStats(){return this._stats}resetLayerRenderingStats(a){this._stats&&(a.renderPass==="shadow"?this._stats.numRenderedVerticesInShadowPass=0:this._stats.numRenderedVerticesInTransparentPass=0)}getAppearances(){return this.appearances}queryRadius(a){}queryIntersectsFeature(a,c,h,f,y,b,S,M,F){}}let O_={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Zy{constructor(a,c){this._structArray=a,this._pos1=c*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Aa{constructor(){this.capacity=-1,this.resize(0)}static serialize(a,c){return a._trim(),c&&c.add(a.arrayBuffer),{length:a.length,arrayBuffer:a.arrayBuffer}}static deserialize(a){let c=Object.create(this.prototype);return c.arrayBuffer=a.arrayBuffer,c.length=a.length,c.capacity=a.arrayBuffer.byteLength/c.bytesPerElement,c._refreshViews(),c}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(a){this.reserve(a),this.length=a}reserve(a){if(a>this.capacity){this.capacity=Math.max(a,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let c=this.uint8;this._refreshViews(),c&&this.uint8.set(c)}}_refreshViews(){throw new Error("StructArray#_refreshViews() must be implemented by each concrete StructArray layout")}emplace(...a){throw new Error("StructArray#emplace() must be implemented by each concrete StructArray layout")}emplaceBack(...a){throw new Error("StructArray#emplaceBack() 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 Mr(u,a=1){let c=0,h=0;return{members:u.map(f=>{let y=O_[f.type].BYTES_PER_ELEMENT,b=c=BD(c,Math.max(a,y)),S=f.components||1;return h=Math.max(h,y),c+=y*S,{name:f.name,type:f.type,components:S,offset:b}}),size:BD(c,Math.max(h,a)),alignment:a}}function BD(u,a){return Math.ceil(u/a)*a}class pd extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,c){let h=this.length;return this.resize(h+1),this.emplace(h,a,c)}emplace(a,c,h){let f=2*a;return this.int16[f+0]=c,this.int16[f+1]=h,a}}pd.prototype.bytesPerElement=4,yn(pd,"StructArrayLayout2i4");class Zu extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,c,h){let f=this.length;return this.resize(f+1),this.emplace(f,a,c,h)}emplace(a,c,h,f){let y=3*a;return this.int16[y+0]=c,this.int16[y+1]=h,this.int16[y+2]=f,a}}Zu.prototype.bytesPerElement=6,yn(Zu,"StructArrayLayout3i6");class Xy extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,c,h,f){let y=this.length;return this.resize(y+1),this.emplace(y,a,c,h,f)}emplace(a,c,h,f,y){let b=4*a;return this.int16[b+0]=c,this.int16[b+1]=h,this.int16[b+2]=f,this.int16[b+3]=y,a}}Xy.prototype.bytesPerElement=8,yn(Xy,"StructArrayLayout4i8");class z0 extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a){let c=this.length;return this.resize(c+1),this.emplace(c,a)}emplace(a,c){return this.float32[1*a+0]=c,a}}z0.prototype.bytesPerElement=4,yn(z0,"StructArrayLayout1f4");class Xb extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h){let f=this.length;return this.resize(f+1),this.emplace(f,a,c,h)}emplace(a,c,h,f){let y=4*a,b=2*a;return this.int16[y+0]=c,this.int16[y+1]=h,this.float32[b+1]=f,a}}Xb.prototype.bytesPerElement=8,yn(Xb,"StructArrayLayout2i1f8");class R_ extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,c,h){let f=this.length;return this.resize(f+1),this.emplace(f,a,c,h)}emplace(a,c,h,f){let y=4*a;return this.int16[y+0]=c,this.int16[y+1]=h,this.int16[y+2]=f,a}}R_.prototype.bytesPerElement=8,yn(R_,"StructArrayLayout3i8");class hT extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y){let b=this.length;return this.resize(b+1),this.emplace(b,a,c,h,f,y)}emplace(a,c,h,f,y,b){let S=5*a;return this.int16[S+0]=c,this.int16[S+1]=h,this.int16[S+2]=f,this.int16[S+3]=y,this.int16[S+4]=b,a}}hT.prototype.bytesPerElement=10,yn(hT,"StructArrayLayout5i10");class v1 extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b,S){let M=this.length;return this.resize(M+1),this.emplace(M,a,c,h,f,y,b,S)}emplace(a,c,h,f,y,b,S,M){let F=6*a,z=12*a,U=3*a;return this.int16[F+0]=c,this.int16[F+1]=h,this.uint8[z+4]=f,this.uint8[z+5]=y,this.uint8[z+6]=b,this.uint8[z+7]=S,this.float32[U+2]=M,a}}v1.prototype.bytesPerElement=12,yn(v1,"StructArrayLayout2i4ub1f12");class Ip extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h){let f=this.length;return this.resize(f+1),this.emplace(f,a,c,h)}emplace(a,c,h,f){let y=3*a;return this.float32[y+0]=c,this.float32[y+1]=h,this.float32[y+2]=f,a}}Ip.prototype.bytesPerElement=12,yn(Ip,"StructArrayLayout3f12");class F_ extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y){let b=this.length;return this.resize(b+1),this.emplace(b,a,c,h,f,y)}emplace(a,c,h,f,y,b){let S=6*a,M=3*a;return this.uint16[S+0]=c,this.uint16[S+1]=h,this.uint16[S+2]=f,this.uint16[S+3]=y,this.float32[M+2]=b,a}}F_.prototype.bytesPerElement=12,yn(F_,"StructArrayLayout4ui1f12");class Of extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,c,h,f){let y=this.length;return this.resize(y+1),this.emplace(y,a,c,h,f)}emplace(a,c,h,f,y){let b=4*a;return this.uint16[b+0]=c,this.uint16[b+1]=h,this.uint16[b+2]=f,this.uint16[b+3]=y,a}}Of.prototype.bytesPerElement=8,yn(Of,"StructArrayLayout4ui8");class U0 extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b){let S=this.length;return this.resize(S+1),this.emplace(S,a,c,h,f,y,b)}emplace(a,c,h,f,y,b,S){let M=6*a;return this.int16[M+0]=c,this.int16[M+1]=h,this.int16[M+2]=f,this.int16[M+3]=y,this.int16[M+4]=b,this.int16[M+5]=S,a}}U0.prototype.bytesPerElement=12,yn(U0,"StructArrayLayout6i12");class VD extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b,S,M,F,z,U,j){let Z=this.length;return this.resize(Z+1),this.emplace(Z,a,c,h,f,y,b,S,M,F,z,U,j)}emplace(a,c,h,f,y,b,S,M,F,z,U,j,Z){let X=12*a;return this.int16[X+0]=c,this.int16[X+1]=h,this.int16[X+2]=f,this.int16[X+3]=y,this.uint16[X+4]=b,this.uint16[X+5]=S,this.uint16[X+6]=M,this.uint16[X+7]=F,this.int16[X+8]=z,this.int16[X+9]=U,this.int16[X+10]=j,this.int16[X+11]=Z,a}}VD.prototype.bytesPerElement=24,yn(VD,"StructArrayLayout4i4ui4i24");class mT extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b){let S=this.length;return this.resize(S+1),this.emplace(S,a,c,h,f,y,b)}emplace(a,c,h,f,y,b,S){let M=10*a,F=5*a;return this.int16[M+0]=c,this.int16[M+1]=h,this.int16[M+2]=f,this.float32[F+2]=y,this.float32[F+3]=b,this.float32[F+4]=S,a}}mT.prototype.bytesPerElement=20,yn(mT,"StructArrayLayout3i3f20");class xm extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f){let y=this.length;return this.resize(y+1),this.emplace(y,a,c,h,f)}emplace(a,c,h,f,y){let b=4*a;return this.float32[b+0]=c,this.float32[b+1]=h,this.float32[b+2]=f,this.float32[b+3]=y,a}}xm.prototype.bytesPerElement=16,yn(xm,"StructArrayLayout4f16");class P_ extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(a){let c=this.length;return this.resize(c+1),this.emplace(c,a)}emplace(a,c){return this.uint32[1*a+0]=c,a}}P_.prototype.bytesPerElement=4,yn(P_,"StructArrayLayout1ul4");class gc extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,c){let h=this.length;return this.resize(h+1),this.emplace(h,a,c)}emplace(a,c,h){let f=2*a;return this.uint16[f+0]=c,this.uint16[f+1]=h,a}}gc.prototype.bytesPerElement=4,yn(gc,"StructArrayLayout2ui4");class L_ extends Aa{_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(a,c,h,f,y,b,S,M,F,z,U,j,Z){let X=this.length;return this.resize(X+1),this.emplace(X,a,c,h,f,y,b,S,M,F,z,U,j,Z)}emplace(a,c,h,f,y,b,S,M,F,z,U,j,Z,X){let ue=20*a,pe=10*a;return this.int16[ue+0]=c,this.int16[ue+1]=h,this.int16[ue+2]=f,this.int16[ue+3]=y,this.int16[ue+4]=b,this.float32[pe+3]=S,this.float32[pe+4]=M,this.float32[pe+5]=F,this.float32[pe+6]=z,this.int16[ue+14]=U,this.uint32[pe+8]=j,this.uint16[ue+18]=Z,this.uint16[ue+19]=X,a}}L_.prototype.bytesPerElement=40,yn(L_,"StructArrayLayout5i4f1i1ul2ui40");class Jb extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b,S){let M=this.length;return this.resize(M+1),this.emplace(M,a,c,h,f,y,b,S)}emplace(a,c,h,f,y,b,S,M){let F=8*a;return this.int16[F+0]=c,this.int16[F+1]=h,this.int16[F+2]=f,this.int16[F+4]=y,this.int16[F+5]=b,this.int16[F+6]=S,this.int16[F+7]=M,a}}Jb.prototype.bytesPerElement=16,yn(Jb,"StructArrayLayout3i2i2i16");class eC extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y){let b=this.length;return this.resize(b+1),this.emplace(b,a,c,h,f,y)}emplace(a,c,h,f,y,b){let S=4*a,M=8*a;return this.float32[S+0]=c,this.float32[S+1]=h,this.float32[S+2]=f,this.int16[M+6]=y,this.int16[M+7]=b,a}}eC.prototype.bytesPerElement=16,yn(eC,"StructArrayLayout2f1f2i16");class zD extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b){let S=this.length;return this.resize(S+1),this.emplace(S,a,c,h,f,y,b)}emplace(a,c,h,f,y,b,S){let M=20*a,F=5*a;return this.uint8[M+0]=c,this.uint8[M+1]=h,this.float32[F+1]=f,this.float32[F+2]=y,this.float32[F+3]=b,this.float32[F+4]=S,a}}zD.prototype.bytesPerElement=20,yn(zD,"StructArrayLayout2ub4f20");class Ec extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,c,h){let f=this.length;return this.resize(f+1),this.emplace(f,a,c,h)}emplace(a,c,h,f){let y=3*a;return this.uint16[y+0]=c,this.uint16[y+1]=h,this.uint16[y+2]=f,a}}Ec.prototype.bytesPerElement=6,yn(Ec,"StructArrayLayout3ui6");class H0 extends Aa{_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(a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe,me,Ae,Me,Be,nt){let ot=this.length;return this.resize(ot+1),this.emplace(ot,a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe,me,Ae,Me,Be,nt)}emplace(a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe,me,Ae,Me,Be,nt,ot){let pt=30*a,Ct=15*a,Tt=60*a;return this.int16[pt+0]=c,this.int16[pt+1]=h,this.int16[pt+2]=f,this.float32[Ct+2]=y,this.float32[Ct+3]=b,this.uint16[pt+8]=S,this.uint16[pt+9]=M,this.uint32[Ct+5]=F,this.uint32[Ct+6]=z,this.uint32[Ct+7]=U,this.uint16[pt+16]=j,this.uint16[pt+17]=Z,this.uint16[pt+18]=X,this.float32[Ct+10]=ue,this.float32[Ct+11]=pe,this.uint8[Tt+48]=me,this.uint8[Tt+49]=Ae,this.uint8[Tt+50]=Me,this.uint32[Ct+13]=Be,this.int16[pt+28]=nt,this.uint8[Tt+58]=ot,a}}H0.prototype.bytesPerElement=60,yn(H0,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class fT extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe,me,Ae,Me,Be,nt,ot,pt,Ct,Tt,ai,Mt,gi,Oi,vi,Ii,Ni,oi){let Ei=this.length;return this.resize(Ei+1),this.emplace(Ei,a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe,me,Ae,Me,Be,nt,ot,pt,Ct,Tt,ai,Mt,gi,Oi,vi,Ii,Ni,oi)}emplace(a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe,me,Ae,Me,Be,nt,ot,pt,Ct,Tt,ai,Mt,gi,Oi,vi,Ii,Ni,oi,Ei){let Kt=20*a,Ht=40*a,zi=80*a;return this.float32[Kt+0]=c,this.float32[Kt+1]=h,this.int16[Ht+4]=f,this.int16[Ht+5]=y,this.int16[Ht+6]=b,this.int16[Ht+7]=S,this.int16[Ht+8]=M,this.int16[Ht+9]=F,this.int16[Ht+10]=z,this.int16[Ht+11]=U,this.int16[Ht+12]=j,this.uint16[Ht+13]=Z,this.uint16[Ht+14]=X,this.uint16[Ht+15]=ue,this.uint16[Ht+16]=pe,this.uint16[Ht+17]=me,this.uint16[Ht+18]=Ae,this.uint16[Ht+19]=Me,this.uint16[Ht+20]=Be,this.uint16[Ht+21]=nt,this.uint16[Ht+22]=ot,this.uint16[Ht+23]=pt,this.uint16[Ht+24]=Ct,this.uint16[Ht+25]=Tt,this.uint16[Ht+26]=ai,this.uint16[Ht+27]=Mt,this.uint32[Kt+14]=gi,this.float32[Kt+15]=Oi,this.float32[Kt+16]=vi,this.float32[Kt+17]=Ii,this.float32[Kt+18]=Ni,this.uint8[zi+76]=oi,this.uint16[Ht+39]=Ei,a}}fT.prototype.bytesPerElement=80,yn(fT,"StructArrayLayout2f9i15ui1ul4f1ub1ui80");class Jy extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b){let S=this.length;return this.resize(S+1),this.emplace(S,a,c,h,f,y,b)}emplace(a,c,h,f,y,b,S){let M=6*a;return this.float32[M+0]=c,this.float32[M+1]=h,this.float32[M+2]=f,this.float32[M+3]=y,this.float32[M+4]=b,this.float32[M+5]=S,a}}Jy.prototype.bytesPerElement=24,yn(Jy,"StructArrayLayout6f24");class ev extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y){let b=this.length;return this.resize(b+1),this.emplace(b,a,c,h,f,y)}emplace(a,c,h,f,y,b){let S=5*a;return this.float32[S+0]=c,this.float32[S+1]=h,this.float32[S+2]=f,this.float32[S+3]=y,this.float32[S+4]=b,a}}ev.prototype.bytesPerElement=20,yn(ev,"StructArrayLayout5f20");class gT extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b,S){let M=this.length;return this.resize(M+1),this.emplace(M,a,c,h,f,y,b,S)}emplace(a,c,h,f,y,b,S,M){let F=7*a;return this.float32[F+0]=c,this.float32[F+1]=h,this.float32[F+2]=f,this.float32[F+3]=y,this.float32[F+4]=b,this.float32[F+5]=S,this.float32[F+6]=M,a}}gT.prototype.bytesPerElement=28,yn(gT,"StructArrayLayout7f28");class wm extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b,S,M,F,z,U){let j=this.length;return this.resize(j+1),this.emplace(j,a,c,h,f,y,b,S,M,F,z,U)}emplace(a,c,h,f,y,b,S,M,F,z,U,j){let Z=11*a;return this.float32[Z+0]=c,this.float32[Z+1]=h,this.float32[Z+2]=f,this.float32[Z+3]=y,this.float32[Z+4]=b,this.float32[Z+5]=S,this.float32[Z+6]=M,this.float32[Z+7]=F,this.float32[Z+8]=z,this.float32[Z+9]=U,this.float32[Z+10]=j,a}}wm.prototype.bytesPerElement=44,yn(wm,"StructArrayLayout11f44");class tC extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b,S,M,F){let z=this.length;return this.resize(z+1),this.emplace(z,a,c,h,f,y,b,S,M,F)}emplace(a,c,h,f,y,b,S,M,F,z){let U=9*a;return this.float32[U+0]=c,this.float32[U+1]=h,this.float32[U+2]=f,this.float32[U+3]=y,this.float32[U+4]=b,this.float32[U+5]=S,this.float32[U+6]=M,this.float32[U+7]=F,this.float32[U+8]=z,a}}tC.prototype.bytesPerElement=36,yn(tC,"StructArrayLayout9f36");class tv extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c){let h=this.length;return this.resize(h+1),this.emplace(h,a,c)}emplace(a,c,h){let f=2*a;return this.float32[f+0]=c,this.float32[f+1]=h,a}}tv.prototype.bytesPerElement=8,yn(tv,"StructArrayLayout2f8");class _T extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,c,h,f){let y=this.length;return this.resize(y+1),this.emplace(y,a,c,h,f)}emplace(a,c,h,f,y){let b=6*a;return this.uint32[3*a+0]=c,this.uint16[b+2]=h,this.uint16[b+3]=f,this.uint16[b+4]=y,a}}_T.prototype.bytesPerElement=12,yn(_T,"StructArrayLayout1ul3ui12");class b1 extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a){let c=this.length;return this.resize(c+1),this.emplace(c,a)}emplace(a,c){return this.uint16[1*a+0]=c,a}}b1.prototype.bytesPerElement=2,yn(b1,"StructArrayLayout1ui2");class UD extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe){let me=this.length;return this.resize(me+1),this.emplace(me,a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe)}emplace(a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe,me){let Ae=16*a;return this.float32[Ae+0]=c,this.float32[Ae+1]=h,this.float32[Ae+2]=f,this.float32[Ae+3]=y,this.float32[Ae+4]=b,this.float32[Ae+5]=S,this.float32[Ae+6]=M,this.float32[Ae+7]=F,this.float32[Ae+8]=z,this.float32[Ae+9]=U,this.float32[Ae+10]=j,this.float32[Ae+11]=Z,this.float32[Ae+12]=X,this.float32[Ae+13]=ue,this.float32[Ae+14]=pe,this.float32[Ae+15]=me,a}}UD.prototype.bytesPerElement=64,yn(UD,"StructArrayLayout16f64");class iC extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,c,h,f,y,b,S){let M=this.length;return this.resize(M+1),this.emplace(M,a,c,h,f,y,b,S)}emplace(a,c,h,f,y,b,S,M){let F=10*a,z=5*a;return this.uint16[F+0]=c,this.uint16[F+1]=h,this.uint16[F+2]=f,this.uint16[F+3]=y,this.float32[z+2]=b,this.float32[z+3]=S,this.float32[z+4]=M,a}}iC.prototype.bytesPerElement=20,yn(iC,"StructArrayLayout4ui3f20");class ih extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a){let c=this.length;return this.resize(c+1),this.emplace(c,a)}emplace(a,c){return this.int16[1*a+0]=c,a}}ih.prototype.bytesPerElement=2,yn(ih,"StructArrayLayout1i2");class nC extends Aa{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer)}emplaceBack(a){let c=this.length;return this.resize(c+1),this.emplace(c,a)}emplace(a,c){return this.uint8[1*a+0]=c,a}}nC.prototype.bytesPerElement=1,yn(nC,"StructArrayLayout1ub1");class yT extends Zy{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]}}yT.prototype.size=40;class C1 extends L_{get(a){return new yT(this,a)}}yn(C1,"CollisionBoxArray");class x1 extends Zy{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(a){this._structArray.uint8[this._pos1+49]=a}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(a){this._structArray.uint8[this._pos1+50]=a}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(a){this._structArray.uint32[this._pos4+13]=a}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(a){this._structArray.uint8[this._pos1+58]=a}}x1.prototype.size=60;class N_ extends H0{get(a){return new x1(this,a)}}yn(N_,"PlacedSymbolArray");class Wr extends Zy{get tileAnchorX(){return this._structArray.float32[this._pos4+0]}get tileAnchorY(){return this._structArray.float32[this._pos4+1]}get projectedAnchorX(){return this._structArray.int16[this._pos2+4]}get projectedAnchorY(){return this._structArray.int16[this._pos2+5]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+6]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+7]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+8]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+9]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+10]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+11]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+12]}get key(){return this._structArray.uint16[this._pos2+13]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+14]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+15]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+16]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+17]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+18]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+19]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+20]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+21]}get featureIndex(){return this._structArray.uint16[this._pos2+22]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+23]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+24]}get numIconVertices(){return this._structArray.uint16[this._pos2+25]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+26]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+27]}get crossTileID(){return this._structArray.uint32[this._pos4+14]}set crossTileID(a){this._structArray.uint32[this._pos4+14]=a}get textOffset0(){return this._structArray.float32[this._pos4+15]}get textOffset1(){return this._structArray.float32[this._pos4+16]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+17]}get zOffset(){return this._structArray.float32[this._pos4+18]}set zOffset(a){this._structArray.float32[this._pos4+18]=a}get hasIconTextFit(){return this._structArray.uint8[this._pos1+76]}get elevationFeatureIndex(){return this._structArray.uint16[this._pos2+39]}}Wr.prototype.size=80;class w1 extends fT{get(a){return new Wr(this,a)}}yn(w1,"SymbolInstanceArray");class vT extends z0{getoffsetX(a){return this.float32[1*a+0]}}yn(vT,"GlyphOffsetArray");class j0 extends pd{getx(a){return this.int16[2*a+0]}gety(a){return this.int16[2*a+1]}}yn(j0,"SymbolLineVertexArray");class HD extends Zy{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]}}HD.prototype.size=12;class bT extends _T{get(a){return new HD(this,a)}}yn(bT,"FeatureIndexArray");class jD extends gc{geta_centroid_pos0(a){return this.uint16[2*a+0]}geta_centroid_pos1(a){return this.uint16[2*a+1]}}yn(jD,"FillExtrusionCentroidArray");class Du extends Zy{get a_join_normal_inside0(){return this._structArray.int16[this._pos2+0]}get a_join_normal_inside1(){return this._structArray.int16[this._pos2+1]}get a_join_normal_inside2(){return this._structArray.int16[this._pos2+2]}}Du.prototype.size=6;class jM extends Zu{get(a){return new Du(this,a)}}yn(jM,"FillExtrusionWallArray");let d3=Mr([{name:"a_pos",components:2,type:"Int16"}],4),GM=Mr([{name:"a_circle_z_offset",components:1,type:"Float32"}],4),u3=Mr([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class Ya{constructor(a=[]){this.segments=a}_prepareSegment(a,c,h,f){let y=this.segments[this.segments.length-1];return a>Ya.MAX_VERTEX_ARRAY_LENGTH&&Er(`Max vertices per segment is ${Ya.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${a}`),(!y||y.vertexLength+a>Ya.MAX_VERTEX_ARRAY_LENGTH||y.sortKey!==f)&&(y={vertexOffset:c,primitiveOffset:h,vertexLength:0,primitiveLength:0},f!==void 0&&(y.sortKey=f),this.segments.push(y)),y}prepareSegment(a,c,h,f){return this._prepareSegment(a,c.length,h.length,f)}get(){return this.segments}destroy(){for(let a of this.segments)for(let c in a.vaos)a.vaos[c].destroy()}static simpleSegment(a,c,h,f){return new Ya([{vertexOffset:a,primitiveOffset:c,vertexLength:h,primitiveLength:f,vaos:{},sortKey:0}])}}function S1(u,a){return 256*(u=st(Math.floor(u),0,255))+st(Math.floor(a),0,255)}Ya.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,yn(Ya,"SegmentVector");let p3=Mr([{name:"a_pattern",components:4,type:"Uint16"},{name:"a_pixel_ratio",components:1,type:"Float32"}]),h3=Mr([{name:"a_pattern_b",components:4,type:"Uint16"}]),Sm=Mr([{name:"a_dash",components:4,type:"Uint16"}]);class jd{constructor(){this.ids=[],this.uniqueIds=[],this.positions=[],this.indexed=!1}add(a,c,h,f){this.ids.push(T1(a)),this.positions.push(c,h,f)}eachPosition(a,c){let h=T1(a),f=0,y=this.ids.length-1;for(;f>1;this.ids[b]>=h?y=b:f=b+1}for(;this.ids[f]===h;)c(this.positions[3*f],this.positions[3*f+1],this.positions[3*f+2]),f++}static serialize(a,c){let h=new Float64Array(a.ids),f=new Uint32Array(a.positions);return GD(h,f,0,h.length-1),c&&(c.add(h.buffer),c.add(f.buffer)),{ids:h,positions:f}}static deserialize(a){let c=new jd,h;c.ids=a.ids,c.positions=a.positions;for(let f of c.ids)f!==h&&c.uniqueIds.push(f),h=f;return c.indexed=!0,c}}function T1(u){let a=+u;return Number.isSafeInteger(a)?a:Wx(String(u))}function GD(u,a,c,h){for(;c>1],y=c-1,b=h+1;for(;;){do y++;while(u[y]f);if(y>=b)break;iv(u,y,b),iv(a,3*y,3*b),iv(a,3*y+1,3*b+1),iv(a,3*y+2,3*b+2)}b-c`u_${y}`),this.type=h,this.context=f}setUniform(a,c,h,f,y){let b=f.constantOr(this.value);c.set(a,y,b instanceof Ts?b.toPremultipliedRenderColor(this.lutExpression&&this.lutExpression.kind==="constant"&&this.lutExpression.value==="none"?null:this.context.lut):b)}getBinding(a,c){return this.type==="color"?new $M(a):new gl(a)}}class Ff{constructor(a,c){this.uniformNames=c.map(h=>`u_${h}`),this.pattern=null,this.patternTransition=null,this.pixelRatio=1}setConstantPatternPositions(a,c){this.pixelRatio=a.pixelRatio||1,this.pattern=a.tl.concat(a.br),this.patternTransition=c?c.tl.concat(c.br):this.pattern}setUniform(a,c,h,f,y){let b=null;y!=="u_pattern"&&y!=="u_dash"||(b=this.pattern),y==="u_pattern_b"&&(b=this.patternTransition),y==="u_pixel_ratio"&&(b=this.pixelRatio),b&&c.set(a,y,b)}getBinding(a,c){return c==="u_pattern"||c==="u_pattern_b"||c==="u_dash"?new E1(a):new gl(a)}}class Ag{constructor(a,c,h,f){this.expression=a,this.type=h,this.maxValue=0,this.paintVertexAttributes=c.map(y=>({name:`a_${y}`,type:"Float32",components:h==="color"?2:1,offset:0})),this.paintVertexArray=new f}populatePaintArray(a,c,h,f,y,b,S,M){let F=this.paintVertexArray.length,z=this.expression.kind==="composite"||this.expression.kind==="source"?this.expression.evaluate(new ra(0,{brightness:b,worldview:M}),c,{},y,f,S):this.expression.kind==="constant"&&this.expression.value,U=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new ra(0,{brightness:b,worldview:M}),c,{},y,f,S):this.lutExpression.value)==="none";this.paintVertexArray.resize(a),this._setPaintValue(F,a,z,U?null:this.context.lut)}updatePaintArray(a,c,h,f,y,b,S,M){let F=this.expression.kind==="composite"||this.expression.kind==="source"?this.expression.evaluate({zoom:0,brightness:S,worldview:M},h,f,void 0,y):this.expression.kind==="constant"&&this.expression.value,z=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new ra(0,{brightness:S,worldview:M}),h,f,void 0,y):this.lutExpression.value)==="none";this._setPaintValue(a,c,F,z?null:this.context.lut)}_setPaintValue(a,c,h,f){if(this.type==="color"){let y=nv(h.toPremultipliedRenderColor(f));for(let b=a;b`u_${S}_t`),this.type=h,this.useIntegerZoom=f,this.context=y,this.maxValue=0,this.paintVertexAttributes=c.map(S=>({name:`a_${S}`,type:"Float32",components:h==="color"?4:2,offset:0})),this.paintVertexArray=new b}populatePaintArray(a,c,h,f,y,b,S,M){let F=this.expression.evaluate(new ra(this.context.zoom,{brightness:b,worldview:M}),c,{},y,f,S),z=this.expression.evaluate(new ra(this.context.zoom+1,{brightness:b,worldview:M}),c,{},y,f,S),U=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new ra(0,{brightness:b,worldview:M}),c,{},y,f,S):this.lutExpression.value)==="none",j=this.paintVertexArray.length;this.paintVertexArray.resize(a),this._setPaintValue(j,a,F,z,U?null:this.context.lut)}updatePaintArray(a,c,h,f,y,b,S,M){let F=this.expression.evaluate({zoom:this.context.zoom,brightness:S,worldview:M},h,f,void 0,y),z=this.expression.evaluate({zoom:this.context.zoom+1,brightness:S,worldview:M},h,f,void 0,y),U=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new ra(0,{brightness:S,worldview:M}),h,f,void 0,y):this.lutExpression.value)==="none";this._setPaintValue(a,c,F,z,U?null:this.context.lut)}_setPaintValue(a,c,h,f,y){if(this.type==="color"){let b=nv(h.toPremultipliedRenderColor(y)),S=nv(h.toPremultipliedRenderColor(y));for(let M=a;M!0){this.binders={},this._buffers=[],this.context=c;let f=[];for(let y in a.paint._values){let b=a.paint.get(y);if(y.endsWith("-use-theme")||!h(y)||!(b instanceof Yy&&u1(b.property.specification)))continue;let S=rC(y,a.type),M=b.value,F=b.property.specification.type,z=!!b.property.useIntegerZoom,U=y==="line-dasharray"||y.endsWith("pattern"),j=a.paint.get(`${y}-use-theme`),Z=y==="line-dasharray"&&a.layout.get("line-cap").value.kind!=="constant"||j&&j.value.kind!=="constant";if(M.kind!=="constant"||Z)if(M.kind==="source"||Z||U){let X=p(y,F,"source");this.binders[y]=U?new Mg(M,S,F,X,a.id):new Ag(M,S,F,X),f.push(`/a_${y}`)}else{let X=p(y,F,"composite");this.binders[y]=new kg(M,S,F,z,c,X),f.push(`/z_${y}`)}else this.binders[y]=U?new Ff(M.value,S):new nh(M.value,S,F,c),f.push(`/u_${y}`);j&&(this.binders[y].lutExpression=j.value)}this.cacheKey=f.sort().join("")}getMaxValue(a){let c=this.binders[a];return c instanceof Ag||c instanceof kg?c.maxValue:0}populatePaintArrays(a,c,h,f,y,b,S,M){for(let F in this.binders){let z=this.binders[F];z.context=this.context,(z instanceof Ag||z instanceof kg||z instanceof Mg)&&z.populatePaintArray(a,c,h,f,y,b,S,M)}}setConstantPatternPositions(a,c){for(let h in this.binders){let f=this.binders[h];f instanceof Ff&&f.setConstantPatternPositions(a,c)}}getPatternTransitionVertexBuffer(a){let c=this.binders[a];return c instanceof Mg?c.paintTransitionVertexBuffer:null}updatePaintArrays(a,c,h,f,y,b,S,M,F,z){let U=!1,j=Object.keys(a),Z=j.length!==0&&!M,X=Z?j:c.uniqueIds;this.context.lut=y.lut;for(let ue in this.binders){let pe=this.binders[ue];if(pe.context=this.context,(pe instanceof Ag||pe instanceof kg||pe instanceof Mg)&&pe.expression&&pe.expression.kind&&pe.expression.kind!=="constant"&&(pe.expression.isStateDependent===!0||pe.expression.isLightConstant===!1)){let me=y.paint.get(ue);pe.expression=me.value;for(let Ae of X){let Me=a[Ae.toString()];c.eachPosition(Ae,(Be,nt,ot)=>{let pt=f.feature(Be);pe.updatePaintArray(nt,ot,pt,Me,b,S,F,z)})}if(!Z)for(let Ae of h.uniqueIds){let Me=a[Ae.toString()];h.eachPosition(Ae,(Be,nt,ot)=>{let pt=f.feature(Be);pe.updatePaintArray(nt,ot,pt,Me,b,S,F,z)})}U=!0}}return U}defines(){let a=[];for(let c in this.binders){let h=this.binders[c];(h instanceof nh||h instanceof Ff)&&a.push(...h.uniformNames.map(f=>`#define HAS_UNIFORM_${f}`))}return a}getPaintVertexBuffers(){return this._buffers}getUniforms(a){let c=[];for(let h in this.binders){let f=this.binders[h];if(f instanceof nh||f instanceof Ff||f instanceof kg)for(let y of f.uniformNames)c.push({name:y,property:h,binding:f.getBinding(a,y)})}return c}setUniforms(a,c,h,f,y){for(let{name:b,property:S,binding:M}of h)this.binders[S].setUniform(a,M,y,f.get(S),b)}updatePaintBuffers(){this._buffers=[];for(let a in this.binders){let c=this.binders[a];(c instanceof Ag||c instanceof kg||c instanceof Mg)&&c.paintVertexBuffer&&this._buffers.push(c.paintVertexBuffer),c instanceof Mg&&c.paintTransitionVertexBuffer&&this._buffers.push(c.paintTransitionVertexBuffer)}}upload(a){for(let c in this.binders){let h=this.binders[c];(h instanceof Ag||h instanceof kg||h instanceof Mg)&&h.upload(a)}this.updatePaintBuffers()}destroy(){for(let a in this.binders){let c=this.binders[a];(c instanceof Ag||c instanceof kg||c instanceof Mg)&&c.destroy()}}}class Tm{constructor(a,c,h=()=>!0){this.programConfigurations={};for(let f of a)this.programConfigurations[f.id]=new Og(f,c,h);this.needsUpload=!1,this._featureMap=new jd,this._featureMapWithoutIds=new jd,this._bufferOffset=0,this._idlessCounter=0}populatePaintArrays(a,c,h,f,y,b,S,M,F){for(let z in this.programConfigurations)this.programConfigurations[z].populatePaintArrays(a,c,f,y,b,S,M,F);c.id!==void 0?this._featureMap.add(c.id,h,this._bufferOffset,a):(this._featureMapWithoutIds.add(this._idlessCounter,h,this._bufferOffset,a),this._idlessCounter+=1),this._bufferOffset=a,this.needsUpload=!0}updatePaintArrays(a,c,h,f,y,b,S,M){for(let F of h)this.needsUpload=this.programConfigurations[F.id].updatePaintArrays(a,this._featureMap,this._featureMapWithoutIds,c,F,f,y,b,S||0,M)||this.needsUpload}get(a){return this.programConfigurations[a]}upload(a){if(this.needsUpload){for(let c in this.programConfigurations)this.programConfigurations[c].upload(a);this.needsUpload=!1}}destroy(){for(let a in this.programConfigurations)this.programConfigurations[a].destroy()}}let Pf={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-occlusion-opacity":["occlusion_opacity"],"icon-occlusion-opacity":["occlusion_opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-emissive-strength":["emissive_strength"],"icon-emissive-strength":["emissive_strength"],"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"],"symbol-z-offset":["z_offset"],"line-gap-width":["gapwidth"],"line-pattern":["pattern","pixel_ratio","pattern_b"],"fill-pattern":["pattern","pixel_ratio","pattern_b"],"fill-extrusion-pattern":["pattern","pixel_ratio","pattern_b"],"line-dasharray":["dash"],"fill-bridge-guard-rail-color":["structure_color"],"fill-tunnel-structure-color":["structure_color"]};function rC(u,a){return Pf[u]||[u.replace(`${a}-`,"").replace(/-/g,"_")]}let _={"line-pattern":{source:F_,composite:F_},"fill-pattern":{source:F_,composite:F_},"fill-extrusion-pattern":{source:F_,composite:F_},"line-dasharray":{source:Of,composite:Of}},l={color:{source:tv,composite:xm},number:{source:z0,composite:tv}};function p(u,a,c){let h=_[u];return h&&h[c]||l[a][c]}yn(nh,"ConstantBinder"),yn(Ff,"PatternConstantBinder"),yn(Ag,"SourceExpressionBinder"),yn(Mg,"PatternCompositeBinder"),yn(kg,"CompositeExpressionBinder"),yn(Og,"ProgramConfiguration",{omit:["_buffers"]}),yn(Tm,"ProgramConfigurationSet");let g=qi/Math.PI/2,C=5,x=6,A=16383,R=64,B=[R,32,16],H=-g,G=g;function J(u,a,c,h=g){return c=At(c),[u*Math.sin(c)*h,-a*h,u*Math.cos(c)*h]}function K(u,a,c){return J(Math.cos(At(u)),Math.sin(At(u)),a,c)}let oe=63710088e-1,le=2*Math.PI*oe;class de{constructor(a,c){if(isNaN(a)||isNaN(c))throw new Error(`Invalid LngLat object: (${a}, ${c})`);if(this.lng=+a,this.lat=+c,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new de(It(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(a){let c=Math.PI/180,h=this.lat*c,f=a.lat*c,y=Math.sin(h)*Math.sin(f)+Math.cos(h)*Math.cos(f)*Math.cos((a.lng-this.lng)*c);return oe*Math.acos(Math.min(y,1))}toBounds(a=0){let c=360*a/40075017,h=c/Math.cos(Math.PI/180*this.lat);return new Ce({lng:this.lng-h,lat:this.lat-c},{lng:this.lng+h,lat:this.lat+c})}toEcef(a){return K(this.lat,this.lng,g+a*g/oe)}static convert(a){if(a instanceof de)return a;if(Array.isArray(a)&&(a.length===2||a.length===3))return new de(Number(a[0]),Number(a[1]));if(!Array.isArray(a)&&typeof a=="object"&&a!==null)return new de(Number("lng"in a?a.lng:a.lon),Number(a.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 [, ]")}}class Ce{constructor(a,c){a&&(c?this.setSouthWest(a).setNorthEast(c):Array.isArray(a)&&a.length===4?this.setSouthWest([a[0],a[1]]).setNorthEast([a[2],a[3]]):this.setSouthWest(a[0]).setNorthEast(a[1]))}setNorthEast(a){return this._ne=a instanceof de?new de(a.lng,a.lat):de.convert(a),this}setSouthWest(a){return this._sw=a instanceof de?new de(a.lng,a.lat):de.convert(a),this}extend(a){let c=this._sw,h=this._ne,f,y;if(a instanceof de)f=a,y=a;else{if(!(a instanceof Ce))return Array.isArray(a)?a.length===4||a.every(Array.isArray)?this.extend(Ce.convert(a)):this.extend(de.convert(a)):typeof a=="object"&&a!==null&&a.hasOwnProperty("lat")&&(a.hasOwnProperty("lon")||a.hasOwnProperty("lng"))?this.extend(de.convert(a)):this;if(f=a._sw,y=a._ne,!f||!y)return this}return c||h?(c.lng=Math.min(f.lng,c.lng),c.lat=Math.min(f.lat,c.lat),h.lng=Math.max(y.lng,h.lng),h.lat=Math.max(y.lat,h.lat)):(this._sw=new de(f.lng,f.lat),this._ne=new de(y.lng,y.lat)),this}getCenter(){return new de((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 de(this.getWest(),this.getNorth())}getSouthEast(){return new de(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(a){let{lng:c,lat:h}=de.convert(a),f=this._sw.lng<=c&&c<=this._ne.lng;return this._sw.lng>this._ne.lng&&(f=this._sw.lng>=c&&c>=this._ne.lng),this._sw.lat<=h&&h<=this._ne.lat&&f}static convert(a){if(a)return a instanceof Ce?a:new Ce(a)}}let he=0,Te=25.5;function Pe(u){return le*Math.cos(u*Math.PI/180)}function Ve(u){return(180+u)/360}function et(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function Qe(u,a){return u/Pe(a)}function it(u){return 360*u-180}function Ze(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}function Ye(u,a){return u*Pe(Ze(a))}let Je=85.051129;function Bt(u){return Math.cos(At(st(u,-Je,Je)))}function St(u,a){let c=st(a,he,Te),h=Math.pow(2,c);return Bt(u)*le/(512*h)}function Jt(u){return 1/Math.cos(u*Math.PI/180)}function Ft(u,a=0){let c=Math.exp(Math.PI*(1-(u.y+a/qi)/(1<=M?(ji(u,a,c,F,z,y,U,S,M),ji(u,F,z,h,f,U,b,S,M)):u.push(b)}function Nt(u,a,c){let h=u[0],f=h.x,y=h.y;a(h);let b=[h];for(let S=1;Su.x+1||hu.y+1)&&Er("Geometry exceeds allowed extent, reduce your vector tile buffer size"),u}function un(u,a,c){let h=u.loadGeometry(),f=u.extent,y=qi/f;if(a&&c&&c.projection.isReprojectedInTileSpace){let b=1<{let Z=it((a.x+j.x/f)/b),X=Ze((a.y+j.y/f)/b),ue=z.project(Z,X);j.x=(ue.x*S-M)*f,j.y=(ue.y*S-F)*f};for(let j=0;j=f||X.y<0||X.y>=f||(U(X),Z.push(X));h[j]=Z}}for(let b of h)for(let S of b)Hi(S,y);return h}function Fi(u,a){return{type:u.type,id:u.id,properties:u.properties,geometry:a?un(u):[]}}class Mi{constructor(a,c,h,f,y){this.properties={},this.extent=h,this.type=0,this.id=void 0,this._pbf=a,this._geometry=-1,this._keys=f,this._values=y,a.readFields($n,this,c)}loadGeometry(){let a=this._pbf;a.pos=this._geometry;let c=a.readVarint()+a.pos,h=[],f,y=1,b=0,S=0,M=0;for(;a.pos>3}if(b--,y===1||y===2)S+=a.readSVarint(),M+=a.readSVarint(),y===1&&(f&&h.push(f),f=[]),f&&f.push(new Pi(S,M));else{if(y!==7)throw new Error(`unknown command ${y}`);f&&f.push(f[0].clone())}}return f&&h.push(f),h}bbox(){let a=this._pbf;a.pos=this._geometry;let c=a.readVarint()+a.pos,h=1,f=0,y=0,b=0,S=1/0,M=-1/0,F=1/0,z=-1/0;for(;a.pos>3}if(f--,h===1||h===2)y+=a.readSVarint(),b+=a.readSVarint(),yM&&(M=y),bz&&(z=b);else if(h!==7)throw new Error(`unknown command ${h}`)}return[S,F,M,z]}toGeoJSON(a,c,h){let f=this.extent*Math.pow(2,h),y=this.extent*a,b=this.extent*c,S=this.loadGeometry();function M(j){return[360*(j.x+y)/f-180,360/Math.PI*Math.atan(Math.exp((1-2*(j.y+b)/f)*Math.PI))-90]}function F(j){return j.map(M)}let z;if(this.type===1){let j=[];for(let X of S)j.push(X[0]);let Z=F(j);z=j.length===1?{type:"Point",coordinates:Z[0]}:{type:"MultiPoint",coordinates:Z}}else if(this.type===2){let j=S.map(F);z=j.length===1?{type:"LineString",coordinates:j[0]}:{type:"MultiLineString",coordinates:j}}else{if(this.type!==3)throw new Error("unknown feature type");{let j=(function(X){let ue=X.length;if(ue<=1)return[X];let pe=[],me,Ae;for(let Me=0;Me=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[a];let c=this._pbf.readVarint()+this._pbf.pos;return new Mi(this._pbf,c,this.extent,this._keys,this._values)}}function Rn(u,a,c){u===15?a.version=c.readVarint():u===1?a.name=c.readString():u===5?a.extent=c.readVarint():u===2?a._features.push(c.pos):u===3?a._keys.push(c.readString()):u===4&&a._values.push((function(h){let f=null,y=h.readVarint()+h.pos;for(;h.pos>3;f=b===1?h.readString():b===2?h.readFloat():b===3?h.readDouble():b===4?h.readVarint64():b===5?h.readVarint():b===6?h.readSVarint():b===7?h.readBoolean():null}if(f==null)throw new Error("unknown feature value");return f})(c))}class Ro{constructor(a,c){this.layers=a.readFields(Jo,{},c)}}function Jo(u,a,c){if(u===3){let h=new Gn(c,c.readVarint()+c.pos);h.length&&(a[h.name]=h)}}let or="3d_elevation_id",ks="level";class Bo{constructor(){this._valid=!1}reset(a){return this.feature=a,this._valid=!0,this._geometry=a.loadGeometry(),this._geometry.length!==0&&this._geometry[0].length!==0||(this._valid=!1),this}geometry(a,c){return this._valid&&a(c(this._geometry)),this}require(a,c,h){return this.get(a,!0,c,h)}optional(a,c,h){return this.get(a,!1,c,h)}success(){return this._valid}get(a,c,h,f){let y=this.feature.properties.hasOwnProperty(a)?+this.feature.properties[a]:void 0;return this._valid&&y!==void 0&&!Number.isNaN(y)?h(f?f(y):y):c&&(this._valid=!1),this}}class ts{constructor(a,c){this.featureFunc=a,this.vertexFunc=c}parseFeature(a,c,h){return this.featureFunc(a,c,h)}parseVertex(a,c,h){return this.vertexFunc(a,c,h)}}let Is=new ts((u,a,c)=>u.reset(a).require(or,h=>{c.id=h}).optional("fixed_height_relative",h=>{c.constantHeight=h},er.decodeRelativeHeight).geometry(h=>{c.bounds=h},mi).success(),(u,a,c)=>u.reset(a).require(or,h=>{c.id=h}).require("elevation_idx",h=>{c.idx=h}).require("extent",h=>{c.extent=h}).require("height_relative",h=>{c.height=h},er.decodeRelativeHeight).geometry(h=>{c.position=h},er.getPoint).success()),ka=new ts((u,a,c)=>u.reset(a).require(or,h=>{c.id=h}).optional("fixed_height",h=>{c.constantHeight=h},er.decodeMetricHeight).geometry(h=>{c.bounds=h},mi).success(),(u,a,c)=>u.reset(a).require(or,h=>{c.id=h}).require("elevation_idx",h=>{c.idx=h}).require("extent",h=>{c.extent=h}).require("height",h=>{c.height=h},er.decodeMetricHeight).geometry(h=>{c.position=h},er.getPoint).success());class er{static getPoint(a){return Sl(a[0][0].x,a[0][0].y)}static decodeRelativeHeight(a){return 1e-4*a*5}static decodeMetricHeight(a){return 1e-4*a}static getVersionSchema(a){return a?a==="1.0.1"?ka:void 0:Is}static parse(a){let c=[],h=[],f=a.length,y=new Bo;for(let b=0;b=0);if(y===0)return 0;y!==a.length&&(c=!1)}return c?2:1}function Zc(u,a){for(let c of u.projections){let h=Na(a,u.points[0],c.axis);if(c.projection[1]h[1])return 0}return 1}function Ba(u,a){let c=0,h=[0,0,0,0];for(let b=0;b=0&&c++;var f,y;return c}class rr{constructor(a,c){this.points=a||new Array(8).fill([0,0,0]),this.planes=c||new Array(6).fill([0,0,0,0]),this.bounds=wo.fromPoints(this.points),this.projections=[],this.frustumEdges=[xi([],this.points[2],this.points[3]),xi([],this.points[0],this.points[3]),xi([],this.points[4],this.points[0]),xi([],this.points[5],this.points[1]),xi([],this.points[6],this.points[2]),xi([],this.points[7],this.points[3])];for(let h of this.frustumEdges){let f=[0,-h[2],h[1]],y=[h[2],0,-h[0]];this.projections.push({axis:f,projection:Na(this.points,this.points[0],f)}),this.projections.push({axis:y,projection:Na(this.points,this.points[0],y)})}}static fromInvProjectionMatrix(a,c,h,f){let y=Math.pow(2,h),b=[[-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(F=>{let z=sn([],F,a),U=1/z[3]/c*y;return(j=z)[0]=(Z=z)[0]*(X=[U,U,f?1/z[3]:U,U])[0],j[1]=Z[1]*X[1],j[2]=Z[2]*X[2],j[3]=Z[3]*X[3],j;var j,Z,X}),S=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(F=>{let z=vn([],Cn([],xi([],b[F[0]],b[F[1]]),xi([],b[F[2]],b[F[1]]))),U=-Fo(z,b[F[1]]);return z.concat(U)}),M=[];for(let F=0;FF[1]||F[0]>M[1])return 0}return 1}containsPoint(a){for(let c of this.planes){let h=c[3];if(Fo([c[0],c[1],c[2]],a)+h<0)return!1}return!0}}class wo{static fromPoints(a){let c=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let f of a)zt(c,c,f),Bi(h,h,f);return new wo(c,h)}static fromTileIdAndHeight(a,c,h){let f=1<a.max[c]||a.min[c]>this.max[c])return!1;return!0}intersectsAabbXY(a){return!(this.min[0]>a.max[0]||a.min[0]>this.max[0]||this.min[1]>a.max[1]||a.min[1]>this.max[1])}encapsulate(a){for(let c=0;c<3;c++)this.min[c]=Math.min(this.min[c],a.min[c]),this.max[c]=Math.max(this.max[c],a.max[c])}encapsulatePoint(a){for(let c=0;c<3;c++)this.min[c]=Math.min(this.min[c],a[c]),this.max[c]=Math.max(this.max[c],a[c])}closestPoint(a){return[Math.max(Math.min(this.max[0],a[0]),this.min[0]),Math.max(Math.min(this.max[1],a[1]),this.min[1]),Math.max(Math.min(this.max[2],a[2]),this.min[2])]}}yn(wo,"Aabb");class Ms{constructor(a,c){this.feature=a,this.metersToTile=c,this.index=0}get(){let a=this.feature.vertices[this.index],c=this.feature.vertexProps[this.index].dir,h=c[1],f=-c[0],y=(a.extent+1)*this.metersToTile;return[new Pi(Math.trunc(a.position[0]+h*y),Math.trunc(a.position[1]+f*y)),new Pi(Math.trunc(a.position[0]-h*y),Math.trunc(a.position[1]-f*y))]}next(){this.index++}valid(){return this.index{return S.a0?wt(M,M,1/F):Qt(M,0,0,1)}getSafeArea(){return this.safeArea}isTunnel(){return this.heightRange.max<=-5}getClosestEdge(a){if(this.edges.length===0)return;let c=0,h=Number.POSITIVE_INFINITY,f=0,[y,b,S,M,F,z,U]=this._tmpVec2;La(U,a.x,a.y);let j=new ds(U,null);for(let Z=0;Z0?Yc(M,S)/Be:0,ot=st(nt,0,1),pt=Math.abs((nt-ot)*this.edgeProps[Z].len);Ku(F,U,pe),La(z,ue[1],-ue[0]);let Ct=pt+Math.abs(Yc(F,z));Ct=0;--b){let S=this.edges[b].a,M=this.edges[b].b,{position:F,height:z,extent:U}=this.vertices[S],{position:j,height:Z,extent:X}=this.vertices[M],ue=this.vertexProps[S].dir,pe=this.vertexProps[M].dir;if(Qt(c,F[0]/a,F[1]/a,z),Qt(h,j[0]/a,j[1]/a,Z),Qt(f,ue[1],-ue[0],0),wt(f,f,U),Qt(y,pe[1],-pe[0],0),wt(y,y,X),this.distSqLines(we(c[0]+.5*f[0],c[1]+.5*f[1],c[2]+.5*f[2]),we(h[0]-.5*y[0],h[1]-.5*y[1],h[2]-.5*y[2]),we(c[0]-.5*f[0],c[1]-.5*f[1],c[2]-.5*f[2]),we(h[0]+.5*y[0],h[1]+.5*y[1],h[2]+.5*y[2]))<=.0025000000000000005)continue;let me=this.vertices.length,Ae=iu(ua(),F,j);this.vertices.push({position:dd(Ae,Ae,.5),height:.5*(z+Z),extent:.5*(U+X)});let Me=iu(ua(),ue,pe);this.vertexProps.push({dir:qa(Me,Me)}),this.edges.splice(b,1),this.edgeProps.splice(b,1),this.edges.push({a:S,b:me}),this.edges.push({a:me,b:M});let Be=Ku(ua(),this.vertices[me].position,F),nt=_m(Be),ot={vec:Be,dir:dd(ua(),Be,1/nt),len:nt};this.edgeProps.push(ot),this.edgeProps.push(ot)}}distSqLines(a,c,h,f){let y=ei(yt(),c,a),b=ei(yt(),f,h),S=ei(yt(),a,h),M=Fo(y,y),F=Fo(y,b),z=Fo(y,S),U=Fo(b,b),j=Fo(b,S),Z=M*U-F*F;if(Z===0)return Yi(zn(y,h,f,Fo(S,b)/Fo(b,b)),a);let X=(M*j-F*z)/Z;return Yi(zn(y,a,c,(F*j-z*U)/Z),zn(b,h,f,X))}}class Va{static parseFrom(a,c){let h=er.parse(a);if(!h)return[];let{vertices:f,features:y}=h,b=1/Ft(c);y.sort((z,U)=>z.id-U.id),f.sort((z,U)=>z.id-U.id||z.idx-U.idx),f=f.filter((z,U,j)=>U===j.findIndex(Z=>Z.id===z.id&&Z.idx===z.idx));let S=new Array,M=0,F=f.length;for(let z of y){if(z.constantHeight){S.push(new _l(z.id,z.bounds,z.constantHeight));continue}for(;M!==F&&f[M].idf.id===h)}}class lc{constructor(a,c){this.zScale=1,this.xOffset=0,this.yOffset=0,a.equals(c)||(this.zScale=Math.pow(2,c.z-a.z),this.xOffset=(a.x*this.zScale-c.x)*qi,this.yOffset=(a.y*this.zScale-c.y)*qi)}constantElevation(a,c){if(a.constantHeight!=null)return this.computeBiasedHeight(a.constantHeight,c)}pointElevation(a,c,h){let f=this.constantElevation(c,h);return f??(a.x=a.x*this.zScale+this.xOffset,a.y=a.y*this.zScale+this.yOffset,this.computeBiasedHeight(c.pointElevation(a),h))}computeBiasedHeight(a,c){return c<=0?a:a+c*qt(0,c,a>=0?a:Math.abs(.5*a))}}yn(_l,"ElevationFeature");class Vc{constructor(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(c=>c.fqid),this.index=a.index,this.hasPattern=!1,this.projection=a.projection,this.layoutVertexArray=new pd,this.indexArray=new Ec,this.segments=new Ya,this.programConfigurations=new Tm(a.layers,{zoom:a.zoom,lut:a.lut}),this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.elevationMode=this.layers[0].layout.get("circle-elevation-reference"),this.hasElevation=!1,this.elevationMode!=="none"&&(this.elevatedLayoutVertexArray=new z0),this.worldview=a.worldview}updateFootprints(a,c){}populate(a,c,h,f){let y=this.layers[0],b=[],S=null;y.type==="circle"&&(S=y.layout.get("circle-sort-key"));for(let{feature:F,id:z,index:U,sourceLayerIndex:j}of a){let Z=this.layers[0]._featureFilter.needGeometry,X=Fi(F,Z);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom,{worldview:this.worldview}),X,h))continue;let ue=S?S.evaluate(X,{},h):void 0,pe={id:z,properties:F.properties,type:F.type,sourceLayerIndex:j,index:U,geometry:Z?X.geometry:un(F,h,f),patterns:{},sortKey:ue};b.push(pe)}S&&b.sort((F,z)=>F.sortKey-z.sortKey);let M=null;f.projection.name==="globe"&&(this.globeExtVertexArray=new U0,M=f.projection);for(let F of b){let{geometry:z,index:U,sourceLayerIndex:j}=F,Z=a[U].feature;this.addFeature(F,z,U,c.availableImages,h,M,c.brightness,c.elevationFeatures),c.featureIndex.insert(Z,z,U,j,this.index)}this.hasElevation||(this.elevatedLayoutVertexArray=void 0)}update(a,c,h,f,y,b,S){this.programConfigurations.updatePaintArrays(a,c,y,h,f,b,S,this.worldview)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(a){this.uploaded||(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,d3.members),this.indexBuffer=a.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=a.createVertexBuffer(this.globeExtVertexArray,u3.members)),this.elevatedLayoutVertexArray&&(this.elevatedLayoutVertexBuffer=a.createVertexBuffer(this.elevatedLayoutVertexArray,GM.members))),this.programConfigurations.upload(a),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy(),this.elevatedLayoutVertexBuffer&&this.elevatedLayoutVertexBuffer.destroy())}addFeature(a,c,h,f,y,b,S,M){let F;this.elevationMode!=="none"&&(F=Va.getElevationFeature(a,M));for(let z of c)for(let U of z){let j=U.x,Z=U.y;if(j<0||j>=qi||Z<0||Z>=qi)continue;if(b){let pe=b.projectTilePoint(j,Z,y),me=b.upVector(y,j,Z);this.addGlobeExtVertex(pe,me),this.addGlobeExtVertex(pe,me),this.addGlobeExtVertex(pe,me),this.addGlobeExtVertex(pe,me)}let X=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,a.sortKey),ue=X.vertexLength;if(this.addCircleVertex(j,Z,-1,-1),this.addCircleVertex(j,Z,1,-1),this.addCircleVertex(j,Z,1,1),this.addCircleVertex(j,Z,-1,1),this.elevationMode!=="none"){let pe=F?F.pointElevation(new Pi(j,Z)):0;this.hasElevation=this.hasElevation||pe!==0;for(let me=0;me<4;me++)this.elevatedLayoutVertexArray.emplaceBack(pe)}this.indexArray.emplaceBack(ue,ue+1,ue+2),this.indexArray.emplaceBack(ue,ue+2,ue+3),X.vertexLength+=4,X.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,a,h,{},f,y,S,void 0,this.worldview)}addCircleVertex(a,c,h,f){this.layoutVertexArray.emplaceBack(2*a+(h+1)/2,2*c+(f+1)/2)}addGlobeExtVertex(a,c){this.globeExtVertexArray.emplaceBack(a.x,a.y,a.z,c[0]*16384,c[1]*16384,c[2]*16384)}}function zh(u,a){for(let c=0;c1){if(Xu(u,a))return!0;for(let h=0;h1?c:c.sub(a)._mult(f)._add(a))}function Dc(u,a){let c,h,f,y=!1;for(let b=0;ba.y!=f.y>a.y&&a.x<(f.x-h.x)*(a.y-h.y)/(f.y-h.y)+h.x&&(y=!y)}return y}function Xc(u,a){let c=!1;for(let h=0,f=u.length-1;ha.y!=b.y>a.y&&a.x<(b.x-y.x)*(a.y-y.y)/(b.y-y.y)+y.x&&(c=!c)}return c}function ec(u,a,c,h,f){for(let b of u)if(a<=b.x&&c<=b.y&&h>=b.x&&f>=b.y)return!0;let y=[new Pi(a,c),new Pi(a,f),new Pi(h,f),new Pi(h,c)];if(u.length>2){for(let b of y)if(Xc(u,b))return!0}for(let b=0;bf.x&&a.x>f.x||u.yf.y&&a.y>f.y)return!1;let y=Ll(u,a,c[0]);return y!==Ll(u,a,c[1])||y!==Ll(u,a,c[2])||y!==Ll(u,a,c[3])}function Rg(u,a,c,h,f,y){let b=a.y-u.y,S=u.x-a.x;if(y=y||0){let M=b*b+S*S;if(M===0)return!0;let F=Math.sqrt(M);b/=F,S/=F}return!((c.x-u.x)*b+(c.y-u.y)*S-y<0||(h.x-u.x)*b+(h.y-u.y)*S-y<0||(f.x-u.x)*b+(f.y-u.y)*S-y<0)}function B_(u,a,c,h,f,y,b){return!(Rg(u,a,h,f,y,b)||Rg(a,c,h,f,y,b)||Rg(c,u,h,f,y,b)||Rg(h,f,u,a,c,b)||Rg(f,y,u,a,c,b)||Rg(y,h,u,a,c,b))}function Em(u,a,c){let h=a.paint.get(u).value;return h.kind==="constant"?h.value:c.programConfigurations.get(a.id).getMaxValue(u)}function V_(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function G0(u,a,c,h,f){if(!a[0]&&!a[1])return u;let y=Pi.convert(a)._mult(f);c==="viewport"&&y._rotate(-h);let b=[];for(let S=0;S>c&&a.y===this.y>>c}url(a,c){let h=(function(y,b,S){var M=Hh(256*y,256*(b=Math.pow(2,S)-b-1),S),F=Hh(256*(y+1),256*(b+1),S);return M[0]+","+M[1]+","+F[0]+","+F[1]})(this.x,this.y,this.z),f=(function(y,b,S){let M,F="";for(let z=y;z>0;z--)M=1<this.canonical.z?new Ju(a,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ju(a,this.wrap,a,this.canonical.x>>c,this.canonical.y>>c)}calculateScaledKey(a,c=!0){if(this.overscaledZ===a&&c)return this.key;if(a>this.canonical.z)return wT(this.wrap*+c,a,this.canonical.z,this.canonical.x,this.canonical.y);{let h=this.canonical.z-a;return wT(this.wrap*+c,a,a,this.canonical.x>>h,this.canonical.y>>h)}}isChildOf(a){if(a.wrap!==this.wrap)return!1;let c=this.canonical.z-a.canonical.z;return a.overscaledZ===0||a.overscaledZ>c&&a.canonical.y===this.canonical.y>>c}children(a){if(this.overscaledZ>=a)return[new Ju(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let c=this.canonical.z+1,h=2*this.canonical.x,f=2*this.canonical.y;return[new Ju(c,this.wrap,c,h,f),new Ju(c,this.wrap,c,h+1,f),new Ju(c,this.wrap,c,h,f+1),new Ju(c,this.wrap,c,h+1,f+1)]}isLessThan(a){return this.wrapa.wrap)&&(this.overscaledZa.overscaledZ)&&(this.canonical.xa.canonical.x)&&this.canonical.y{let a=u.canonical.x-1,c=u.wrap;return a<0&&(a=(1<{let a=u.canonical.x+1,c=u.wrap;return a===1<new Ju(u.overscaledZ,u.wrap,u.canonical.z,u.canonical.x,(u.canonical.y===0?1<new Ju(u.overscaledZ,u.wrap,u.canonical.z,u.canonical.x,u.canonical.y===(1<1?null:(function(h,f,y,b){let S=Math.sin(y);return h*(Math.sin((1-b)*y)/S)+f*(Math.sin(b*y)/S)})(u.a[a],u.b[a],u.angle,st(c,0,1))+u.center[a]}function H_(u){if(u.z<=1)return dX[u.z+2*u.y+u.x];let a=ZM(qD(u));return wo.fromPoints(a)}function j_(u,a,c){return wt(u,u,1-c),Lt(u,u,a,c)}function f3(u,a,c){for(let h of u)Co(h,h,a),wt(h,h,c)}function g3(u,a,c,h){let f=a/u.worldSize,y=u.globeMatrix;if(c.z<=1){let Tt=H_(c).getCorners();return f3(Tt,y,f),wo.fromPoints(Tt)}let b=qD(c,h),S=ZM(b,g+YM(u._tileCoverLift));f3(S,y,f);let M=Number.MAX_VALUE,F=[-M,-M,-M],z=[M,M,M];if(b.contains(u.center)){for(let Mt of S)zt(z,z,Mt),Bi(F,F,Mt);F[2]=0;let Tt=u.point,ai=[Tt.x*f,Tt.y*f,0];return zt(z,z,ai),Bi(F,F,ai),new wo(z,F)}if(u._tileCoverLift>0){for(let Tt of S)zt(z,z,Tt),Bi(F,F,Tt);return new wo(z,F)}let U=[y[12]*f,y[13]*f,y[14]*f],j=b.getCenter(),Z=st(u.center.lat,-Je,Je),X=st(j.lat,-Je,Je),ue=Ve(u.center.lng),pe=et(Z),me=ue-Ve(j.lng),Ae=pe-et(X);me>.5?me-=1:me<-.5&&(me+=1);let Me=0;Math.abs(me)>Math.abs(Ae)?Me=me>=0?1:3:(Me=Ae>=0?0:2,Lt(U,U,[y[4]*f,y[5]*f,y[6]*f],-Math.sin(At(Ae>=0?b.getSouth():b.getNorth()))*g));let Be=S[Me],nt=S[(Me+1)%4],ot=new uX(Be,nt,U),pt=[QM(ot,0)||Be[0],QM(ot,1)||Be[1],QM(ot,2)||Be[2]],Ct=ov(u.zoom);if(Ct>0){let Tt=(function({x:Mt,y:gi,z:Oi},vi,Ii,Ni,oi){let Ei=1/(1<.5?Qn=-1:bn<-.5&&(Qn=1),Kt=((Kt+Qn)*vi-(Ni*=vi))*Ii+Ni,Ht=((Ht+Qn)*vi-Ni)*Ii+Ni,zi=(zi*vi-(oi*=vi))*Ii+oi,Li=(Li*vi-oi)*Ii+oi,[[Kt,Li,0],[Ht,Li,0],[Ht,zi,0],[Kt,zi,0]]})(c,a,u._pixelsPerMercatorPixel,ue,pe);for(let Mt=0;MtMath.PI/2*1.01}let b8=At(85),pX=Math.cos(b8),hX=Math.sin(b8),mX=N(),C8=u=>{let a=[];return u.paint.get("circle-pitch-alignment")==="map"&&a.push("PITCH_WITH_MAP"),u.paint.get("circle-pitch-scale")==="map"&&a.push("SCALE_WITH_MAP"),a};function x8(u,a,c,h,f,y,b,S,M){if(y&&u.queryGeometry.isAboveHorizon)return!1;y&&(M*=u.pixelToTileUnitsFactor);let F=u.tileID.canonical,z=c.projection.upVectorScale(F,c.center.lat,c.worldSize).metersToTile;for(let U of a)for(let j of U){let Z=j.add(S),X=f&&c.elevation?c.elevation.exaggeration()*f.getElevationAt(Z.x,Z.y,!0):0,ue=c.projection.projectTilePoint(Z.x,Z.y,F);if(X>0){let Me=c.projection.upVector(F,Z.x,Z.y);ue.x+=Me[0]*z*X,ue.y+=Me[1]*z*X,ue.z+=Me[2]*z*X}let pe=y?Z:fX(ue.x,ue.y,ue.z,h),me=y?u.tilespaceRays.map(Me=>_X(Me,X)):u.queryGeometry.screenGeometry,Ae=sn([],[ue.x,ue.y,ue.z,1],h);if(!b&&y?M*=Ae[3]/c.cameraToCenterDistance:b&&!y&&(M*=c.cameraToCenterDistance/Ae[3]),y){let Me=Ze((j.y/qi+F.y)/(1<u.width||f.height>u.height||c.x>u.width-f.width||c.y>u.height-f.height)throw new RangeError("out of range source coordinates for image copy");if(f.width>a.width||f.height>a.height||h.x>a.width-f.width||h.y>a.height-f.height)throw new RangeError("out of range destination coordinates for image copy");let M=u.data,F=a.data,z=y===4&&S;for(let U=0;U{a[u.evaluationKey]=M;let F=u.expression.evaluate(a),z=F?F.toNonPremultipliedRenderColor(null):null;z&&(f.data[b+S+0]=Math.floor(255*z.r),f.data[b+S+1]=Math.floor(255*z.g),f.data[b+S+2]=Math.floor(255*z.b),f.data[b+S+3]=Math.floor(255*z.a))};if(u.clips)for(let b=0,S=0;b80*c){S=u[0],M=u[1];let z=S,U=M;for(let j=c;jz&&(z=Z),X>U&&(U=X)}F=Math.max(z-S,U-M),F=F!==0?32767/F:0}return dC(y,b,c,S,M,F,0),b}function $0(u,a,c,h,f){let y;if(f===(function(b,S,M,F){let z=0;for(let U=S,j=M-F;U0)for(let b=a;b=a;b-=h)y=k8(b/h|0,u[b],u[b+1],y);return y&&k1(y,y.next)&&(ZD(y),y=y.next),y}function cC(u,a){if(!u)return u;a||(a=u);let c,h=u;do if(c=!1,h.steiner||!k1(h,h.next)&&fd(h.prev,h,h.next)!==0)h=h.next;else{if(ZD(h),h=a=h.prev,h===h.next)break;c=!0}while(c||h!==a);return a}function dC(u,a,c,h,f,y,b){if(!u)return;!b&&y&&(function(M,F,z,U){let j=M;do j.z===0&&(j.z=b3(j.x,j.y,F,z,U)),j.prevZ=j.prev,j.nextZ=j.next,j=j.next;while(j!==M);j.prevZ.nextZ=null,j.prevZ=null,(function(Z){let X,ue=1;do{let pe,me=Z;Z=null;let Ae=null;for(X=0;me;){X++;let Me=me,Be=0;for(let ot=0;ot0||nt>0&&Me;)Be!==0&&(nt===0||!Me||me.z<=Me.z)?(pe=me,me=me.nextZ,Be--):(pe=Me,Me=Me.nextZ,nt--),Ae?Ae.nextZ=pe:Z=pe,pe.prevZ=Ae,Ae=pe;me=Me}Ae.nextZ=null,ue*=2}while(X>1)})(j)})(u,h,f,y);let S=u;for(;u.prev!==u.next;){let M=u.prev,F=u.next;if(y?Id(u,h,f,y):md(u))a.push(M.i,u.i,F.i),ZD(u),u=F.next,S=F.next;else if((u=F)===S){b?b===1?dC(u=D8(cC(u),a),a,c,h,f,y,2):b===2&&CX(u,a,c,h,f,y):dC(cC(u),a,c,h,f,y,1);break}}}function md(u){let a=u.prev,c=u,h=u.next;if(fd(a,c,h)>=0)return!1;let f=a.x,y=c.x,b=h.x,S=a.y,M=c.y,F=h.y,z=Math.min(f,y,b),U=Math.min(S,M,F),j=Math.max(f,y,b),Z=Math.max(S,M,F),X=h.next;for(;X!==a;){if(X.x>=z&&X.x<=j&&X.y>=U&&X.y<=Z&&rv(f,S,y,M,b,F,X.x,X.y)&&fd(X.prev,X,X.next)>=0)return!1;X=X.next}return!0}function Id(u,a,c,h){let f=u.prev,y=u,b=u.next;if(fd(f,y,b)>=0)return!1;let S=f.x,M=y.x,F=b.x,z=f.y,U=y.y,j=b.y,Z=Math.min(S,M,F),X=Math.min(z,U,j),ue=Math.max(S,M,F),pe=Math.max(z,U,j),me=b3(Z,X,a,c,h),Ae=b3(ue,pe,a,c,h),Me=u.prevZ,Be=u.nextZ;for(;Me&&Me.z>=me&&Be&&Be.z<=Ae;){if(Me.x>=Z&&Me.x<=ue&&Me.y>=X&&Me.y<=pe&&Me!==f&&Me!==b&&rv(S,z,M,U,F,j,Me.x,Me.y)&&fd(Me.prev,Me,Me.next)>=0||(Me=Me.prevZ,Be.x>=Z&&Be.x<=ue&&Be.y>=X&&Be.y<=pe&&Be!==f&&Be!==b&&rv(S,z,M,U,F,j,Be.x,Be.y)&&fd(Be.prev,Be,Be.next)>=0))return!1;Be=Be.nextZ}for(;Me&&Me.z>=me;){if(Me.x>=Z&&Me.x<=ue&&Me.y>=X&&Me.y<=pe&&Me!==f&&Me!==b&&rv(S,z,M,U,F,j,Me.x,Me.y)&&fd(Me.prev,Me,Me.next)>=0)return!1;Me=Me.prevZ}for(;Be&&Be.z<=Ae;){if(Be.x>=Z&&Be.x<=ue&&Be.y>=X&&Be.y<=pe&&Be!==f&&Be!==b&&rv(S,z,M,U,F,j,Be.x,Be.y)&&fd(Be.prev,Be,Be.next)>=0)return!1;Be=Be.nextZ}return!0}function D8(u,a){let c=u;do{let h=c.prev,f=c.next.next;!k1(h,f)&&YD(h,c,c.next,f)&&QD(h,f)&&QD(f,h)&&(a.push(h.i,c.i,f.i),ZD(c),ZD(c.next),c=u=f),c=c.next}while(c!==u);return cC(c)}function CX(u,a,c,h,f,y){let b=u;do{let S=b.next.next;for(;S!==b.prev;){if(b.i!==S.i&&x3(b,S)){let M=A8(b,S);return b=cC(b,b.next),M=cC(M,M.next),dC(b,a,c,h,f,y,0),void dC(M,a,c,h,f,y,0)}S=S.next}b=b.next}while(b!==u)}function xX(u,a){let c=u.x-a.x;return c===0&&(c=u.y-a.y,c===0)&&(c=(u.next.y-u.y)/(u.next.x-u.x)-(a.next.y-a.y)/(a.next.x-a.x)),c}function wX(u,a){let c=(function(f,y){let b=y,S=f.x,M=f.y,F,z=-1/0;if(k1(f,b))return b;do{if(k1(f,b.next))return b.next;if(M<=b.y&&M>=b.next.y&&b.next.y!==b.y){let ue=b.x+(M-b.y)*(b.next.x-b.x)/(b.next.y-b.y);if(ue<=S&&ue>z&&(z=ue,F=b.x=b.x&&b.x>=j&&S!==b.x&&C3(MF.x||b.x===F.x&&SX(F,b)))&&(F=b,X=ue)}b=b.next}while(b!==U);return F})(u,a);if(!c)return a;let h=A8(c,u);return cC(h,h.next),cC(c,c.next)}function SX(u,a){return fd(u.prev,u,a.prev)<0&&fd(a.next,u,u.next)<0}function b3(u,a,c,h,f){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-c)*f|0)|u<<8))|u<<4))|u<<2))|u<<1))|(a=1431655765&((a=858993459&((a=252645135&((a=16711935&((a=(a-h)*f|0)|a<<8))|a<<4))|a<<2))|a<<1))<<1}function TX(u){let a=u,c=u;do(a.x=(u-b)*(y-S)&&(u-b)*(h-S)>=(c-b)*(a-S)&&(c-b)*(y-S)>=(f-b)*(h-S)}function rv(u,a,c,h,f,y,b,S){return!(u===b&&a===S)&&C3(u,a,c,h,f,y,b,S)}function x3(u,a){return u.next.i!==a.i&&u.prev.i!==a.i&&!(function(c,h){let f=c;do{if(f.i!==c.i&&f.next.i!==c.i&&f.i!==h.i&&f.next.i!==h.i&&YD(f,f.next,c,h))return!0;f=f.next}while(f!==c);return!1})(u,a)&&(QD(u,a)&&QD(a,u)&&(function(c,h){let f=c,y=!1,b=(c.x+h.x)/2,S=(c.y+h.y)/2;do f.y>S!=f.next.y>S&&f.next.y!==f.y&&b<(f.next.x-f.x)*(S-f.y)/(f.next.y-f.y)+f.x&&(y=!y),f=f.next;while(f!==c);return y})(u,a)&&(fd(u.prev,u,a.prev)||fd(u,a.prev,a))||k1(u,a)&&fd(u.prev,u,u.next)>0&&fd(a.prev,a,a.next)>0)}function fd(u,a,c){return(a.y-u.y)*(c.x-a.x)-(a.x-u.x)*(c.y-a.y)}function k1(u,a){return u.x===a.x&&u.y===a.y}function YD(u,a,c,h){let f=sv(fd(u,a,c)),y=sv(fd(u,a,h)),b=sv(fd(c,h,u)),S=sv(fd(c,h,a));return f!==y&&b!==S||!(f!==0||!sh(u,c,a))||!(y!==0||!sh(u,h,a))||!(b!==0||!sh(c,u,h))||!(S!==0||!sh(c,a,h))}function sh(u,a,c){return a.x<=Math.max(u.x,c.x)&&a.x>=Math.min(u.x,c.x)&&a.y<=Math.max(u.y,c.y)&&a.y>=Math.min(u.y,c.y)}function sv(u){return u>0?1:u<0?-1:0}function QD(u,a){return fd(u.prev,u,u.next)<0?fd(u,a,u.next)>=0&&fd(u,u.prev,a)>=0:fd(u,a,u.prev)<0||fd(u,u.next,a)<0}function A8(u,a){let c=w3(u.i,u.x,u.y),h=w3(a.i,a.x,a.y),f=u.next,y=a.prev;return u.next=a,a.prev=u,c.next=f,f.prev=c,h.next=c,c.prev=h,y.next=h,h.prev=y,h}function k8(u,a,c,h){let f=w3(u,a,c);return h?(f.next=h.next,f.prev=h,h.next.prev=f,h.next=f):(f.prev=f,f.next=f),f}function ZD(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function w3(u,a,c){return{i:u,x:a,y:c,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function IT(u,a){let c=u.length;if(c<=1)return[u];let h=[],f,y;for(let b=0;b1)for(let b=0;b=qi&&c>=qi}static evaluate(a){if(a.length===0)return new lv;let c=[];for(let M of a)c.push(...M.portals);if(c.length===0)return new lv;for(let M of c){let F=M.va,z=M.vb;(lv.isOnBorder(F.x,z.x)||lv.isOnBorder(F.y,z.y))&&(M.type="border")}let h=c.filter(M=>M.type!=="unevaluated"),f=c.filter(M=>M.type==="unevaluated");if(f.length===0)return new lv;f.sort((M,F)=>M.hash===F.hash?M.isTunnel===F.isTunnel?0:M.isTunnel?-1:1:M.hashM.hashy!=="fill-tunnel-structure-color"),this.tunnelProgramConfigurations=new Tm(c,{zoom:h,lut:f},y=>y!=="fill-bridge-guard-rail-color")}addVertices(a,c){let h=this.unevalVertices.length;for(let f=0;f=y.min.x&&U.x<=y.max.x&&U.y>=y.min.y&&U.y<=y.max.y||j.x>=y.min.x&&j.x<=y.max.x&&j.y>=y.min.y&&j.y<=y.max.y||au(U,j,S))||this.isOnBorder(U.x,j.x)||this.isOnBorder(U.y,j.y))continue;let Z=Gh.computeEdgeHash(this.unevalVertices[F],this.unevalVertices[z]),X,ue=this.vertexHashLookup.get(Gh.computePosHash(U));ue!=null?X=ue.next:(ue=this.vertexHashLookup.get(Gh.computePosHash(j)),X=ue!=null?ue.prev:Z),this.unevalEdges.push({polygonIdx:a,a:F,b:z,hash:Z,portalHash:X,isTunnel:f,type:"unevaluated",featureInfo:b})}}addPortalCandidates(a,c,h,f,y){if(c.length===0)return;this.portalPolygons.add(a,{geometry:c,zLevel:y});let b=c[0];this.vertexHashLookup.clear();let S=Gh.computeEdgeHash(b[b.length-2],b[b.length-1]);for(let M=0;M({vertexOffset:0,primitiveOffset:this.indexArray.length}),h=j=>{j.primitiveLength=this.indexArray.length-j.primitiveOffset},f=new Kl(this.vertexPositions,this.vertexNormals,this.indexArray);this.prepareEdges(a.portals,this.unevalEdges);let y=c(),b=c(),S=c(),M=(j,Z)=>{j.sort((ue,pe)=>ue.type===Z&&pe.type!==Z?-1:ue.type!==Z&&pe.type===Z?1:0);let X=j.findIndex(ue=>ue.type!==Z);return X>=0?X:j.length},F=0;this.unevalEdges.length>0&&(F=M(this.unevalEdges,"none"),this.constructBridgeStructures(f,this.unevalVertices,this.unevalHeights,this.unevalEdges,{min:0,max:F},this.tileToMeters)),h(S);let z=c(),U=c();if(this.unevalEdges.length>0){let j=this.unevalEdges.splice(F),Z=M(j,"tunnel")+F;this.unevalEdges.push(...j),this.constructTunnelStructures(f,this.unevalVertices,this.unevalHeights,this.unevalEdges,{min:0,max:F},{min:F,max:Z})}h(z),f.addTriangles(this.unevalTriangles,this.unevalVertices,this.unevalHeights),h(U),f.addTriangles(this.unevalTunnelTriangles,this.unevalVertices,this.unevalHeights),h(b),f.addTriangles(this.unevalTunnelTriangles,this.unevalVertices,[-.1]),h(y),this.maskSegments=Ya.simpleSegment(0,U.primitiveOffset,0,U.primitiveLength),this.depthSegments=Ya.simpleSegment(0,b.primitiveOffset,0,b.primitiveLength),this.renderableBridgeSegments=Ya.simpleSegment(0,S.primitiveOffset,0,S.primitiveLength),this.renderableTunnelSegments=Ya.simpleSegment(0,z.primitiveOffset,0,z.primitiveLength),this.shadowCasterSegments=Ya.simpleSegment(0,y.primitiveOffset,0,y.primitiveLength)}update(a,c,h,f,y,b,S,M){this.bridgeProgramConfigurations.updatePaintArrays(a,c,y,h,f,b,S,M),this.tunnelProgramConfigurations.updatePaintArrays(a,c,y,h,f,b,S,M)}upload(a){this.vertexBuffer||this.vertexPositions.length===0||this.vertexNormals.length===0||this.indexArray.length===0||(this.vertexBuffer=a.createVertexBuffer(this.vertexPositions,bX.members),this.vertexBufferNormal=a.createVertexBuffer(this.vertexNormals,v3.members),this.indexBuffer=a.createIndexBuffer(this.indexArray),this.bridgeProgramConfigurations.upload(a),this.tunnelProgramConfigurations.upload(a))}destroy(){this.vertexBuffer&&(this.vertexBuffer.destroy(),this.vertexBufferNormal.destroy(),this.indexBuffer.destroy()),this.maskSegments&&(this.maskSegments.destroy(),this.depthSegments.destroy(),this.renderableBridgeSegments.destroy(),this.renderableTunnelSegments.destroy(),this.shadowCasterSegments.destroy()),this.bridgeProgramConfigurations.destroy(),this.tunnelProgramConfigurations.destroy()}populatePaintArrays(a,c,h,f,y){let b=(S,M)=>{for(let F=0;FQt(Ii,c[Ni].x,c[Ni].y,h[Ni]*M),U=yt(),j=yt(),Z=yt(),X=yt(),ue=yt(),pe=(Ii,Ni)=>{let oi=S.get(Gh.computePosHash(c[Ni])),Ei=oi.from,Kt=oi.to;if(!Ei||!Kt)return;z(U,Ei),z(j,Ni),z(Z,Kt),Qr(X),Ee(U,j)||(xi(ue,j,U),vn(X,ue)),Ee(Z,j)||(xi(ue,Z,j),Xi(X,X,vn(ue,ue)));let Ht=Dt(X);return Ht>0?wt(Ii,X,1/Ht):void 0},me=Number.POSITIVE_INFINITY;this.sortSubarray(f,y.min,y.max,(Ii,Ni)=>Ii.featureInfo.featureIndex-Ni.featureInfo.featureIndex);let Ae=yt(),Me=yt(),Be=yt(),nt=yt(),ot=yt(),pt=yt(),Ct=yt(),Tt=yt(),ai=yt(),Mt=[yt(),yt(),yt(),yt()],gi=[yt(),yt(),yt(),yt()],Oi=[{coord:new Pi(0,0),height:0},{coord:new Pi(0,0),height:0}],vi=(Ii,Ni)=>Ii>Ni;for(let Ii=y.min;Iime.featureInfo.featureIndex-Ae.featureInfo.featureIndex;this.sortSubarray(f,y.min,y.max,M),this.sortSubarray(f,b.min,b.max,M);let F=me=>vn(me,me),z=[{coord:new Pi(0,0),height:0},{coord:new Pi(0,0),height:0}],U=(me,Ae)=>meS.hash===M.hash?M.polygonIdx-S.polygonIdx:M.hash>S.hash?1:-1);let h=0,f=0,y=0,b=c[h].polygonIdx;do f++,(f===c.length||c[h].hash!==c[f].hash)&&((f-h==1||c[f-1].polygonIdx!==b)&&(yF.portalHashz.hash?S++:z.hash>F.portalHash?M++:(F.type=z.type,S++)}}}isOnBorder(a,c){return a<=0&&c<=0||a>=qi&&c>=qi}addFeatureSection(a,c,h,f){return a!==c&&(c=a,h.push({featureIndex:a,vertexStart:f.getVertexCount()}),f.clearVertexLookup()),c}sortSubarray(a,c,h,f){let y=a.slice(c,h);y.sort(f),a.splice(c,y.length,...y)}static computeEdgeHash(a,c){return(a.y===c.y&&a.x>c.x||a.y>c.y)&&([a,c]=[c,a]),BigInt(Gh.computePosHash(a))<<32n|BigInt(Gh.computePosHash(c))}static computePosHash(a){return((65535&a.x)<<16|65535&a.y)>>>0}}var T3,XD={exports:{}},M8=(T3||(T3=1,(function(u,a){(function(c){function h(Ue,He){return Ue>He?1:Ue0){var En=ri+Math.floor(en/2),ao={key:He[En],data:$t[En],parent:Ue};return ao.left=b(ao,He,$t,ri,En),ao.right=b(ao,He,$t,En+1,nn),ao}return null}function S(Ue,He,$t,ri,nn){if(!($t>=ri)){for(var en=Ue[$t+ri>>1],En=$t-1,ao=ri+1;;){do En++;while(nn(Ue[En],en)<0);do ao--;while(nn(Ue[ao],en)>0);if(En>=ao)break;var _r=Ue[En];Ue[En]=Ue[ao],Ue[ao]=_r,_r=He[En],He[En]=He[ao],He[ao]=_r}S(Ue,He,$t,ao,nn),S(Ue,He,ao+1,ri,nn)}}f.prototype.rotateLeft=function(Ue){var He=Ue.right;He&&(Ue.right=He.left,He.left&&(He.left.parent=Ue),He.parent=Ue.parent),Ue.parent?Ue===Ue.parent.left?Ue.parent.left=He:Ue.parent.right=He:this._root=He,He&&(He.left=Ue),Ue.parent=He},f.prototype.rotateRight=function(Ue){var He=Ue.left;He&&(Ue.left=He.right,He.right&&(He.right.parent=Ue),He.parent=Ue.parent),Ue.parent?Ue===Ue.parent.left?Ue.parent.left=He:Ue.parent.right=He:this._root=He,He&&(He.right=Ue),Ue.parent=He},f.prototype._splay=function(Ue){for(;Ue.parent;){var He=Ue.parent;He.parent?He.left===Ue&&He.parent.left===He?(this.rotateRight(He.parent),this.rotateRight(He)):He.right===Ue&&He.parent.right===He?(this.rotateLeft(He.parent),this.rotateLeft(He)):He.left===Ue&&He.parent.right===He?(this.rotateRight(He),this.rotateLeft(He)):(this.rotateLeft(He),this.rotateRight(He)):He.left===Ue?this.rotateRight(He):this.rotateLeft(He)}},f.prototype.splay=function(Ue){for(var He,$t,ri,nn,en;Ue.parent;)($t=(He=Ue.parent).parent)&&$t.parent?((ri=$t.parent).left===$t?ri.left=Ue:ri.right=Ue,Ue.parent=ri):(Ue.parent=null,this._root=Ue),nn=Ue.left,en=Ue.right,Ue===He.left?($t&&($t.left===He?(He.right?($t.left=He.right,$t.left.parent=$t):$t.left=null,He.right=$t,$t.parent=He):(nn?($t.right=nn,nn.parent=$t):$t.right=null,Ue.left=$t,$t.parent=Ue)),en?(He.left=en,en.parent=He):He.left=null,Ue.right=He,He.parent=Ue):($t&&($t.right===He?(He.left?($t.right=He.left,$t.right.parent=$t):$t.right=null,He.left=$t,$t.parent=He):(en?($t.left=en,en.parent=$t):$t.left=null,Ue.right=$t,$t.parent=Ue)),nn?(He.right=nn,nn.parent=He):He.right=null,Ue.left=He,He.parent=Ue)},f.prototype.replace=function(Ue,He){Ue.parent?Ue===Ue.parent.left?Ue.parent.left=He:Ue.parent.right=He:this._root=He,He&&(He.parent=Ue.parent)},f.prototype.minNode=function(Ue){if(Ue===void 0&&(Ue=this._root),Ue)for(;Ue.left;)Ue=Ue.left;return Ue},f.prototype.maxNode=function(Ue){if(Ue===void 0&&(Ue=this._root),Ue)for(;Ue.right;)Ue=Ue.right;return Ue},f.prototype.insert=function(Ue,He){var $t=this._root,ri=null,nn=this._compare;if(this._noDuplicates)for(;$t;){if(ri=$t,nn($t.key,Ue)===0)return;$t=nn($t.key,Ue)<0?$t.right:$t.left}else for(;$t;)ri=$t,$t=nn($t.key,Ue)<0?$t.right:$t.left;return $t={key:Ue,data:He,left:null,right:null,parent:ri},ri?nn(ri.key,$t.key)<0?ri.right=$t:ri.left=$t:this._root=$t,this.splay($t),this._size++,$t},f.prototype.find=function(Ue){for(var He=this._root,$t=this._compare;He;){var ri=$t(He.key,Ue);if(ri<0)He=He.right;else{if(!(ri>0))return He;He=He.left}}return null},f.prototype.contains=function(Ue){for(var He=this._root,$t=this._compare;He;){var ri=$t(Ue,He.key);if(ri===0)return!0;He=ri<0?He.left:He.right}return!1},f.prototype.remove=function(Ue){var He=this.find(Ue);if(!He)return!1;if(this.splay(He),He.left)if(He.right){var $t=this.minNode(He.right);$t.parent!==He&&(this.replace($t,$t.right),$t.right=He.right,$t.right.parent=$t),this.replace(He,$t),$t.left=He.left,$t.left.parent=$t}else this.replace(He,He.left);else this.replace(He,He.right);return this._size--,!0},f.prototype.removeNode=function(Ue){if(!Ue)return!1;if(this.splay(Ue),Ue.left)if(Ue.right){var He=this.minNode(Ue.right);He.parent!==Ue&&(this.replace(He,He.right),He.right=Ue.right,He.right.parent=He),this.replace(Ue,He),He.left=Ue.left,He.left.parent=He}else this.replace(Ue,Ue.left);else this.replace(Ue,Ue.right);return this._size--,!0},f.prototype.erase=function(Ue){var He=this.find(Ue);if(He){this.splay(He);var $t=He.left,ri=He.right,nn=null;$t&&($t.parent=null,nn=this.maxNode($t),this.splay(nn),this._root=nn),ri&&($t?nn.right=ri:this._root=ri,ri.parent=nn),this._size--}},f.prototype.pop=function(){var Ue=this._root,He=null;if(Ue){for(;Ue.left;)Ue=Ue.left;He={key:Ue.key,data:Ue.data},this.remove(Ue.key)}return He},f.prototype.next=function(Ue){var He=Ue;if(He)if(He.right)for(He=He.right;He&&He.left;)He=He.left;else for(He=Ue.parent;He&&He.right===Ue;)Ue=He,He=He.parent;return He},f.prototype.prev=function(Ue){var He=Ue;if(He)if(He.left)for(He=He.left;He&&He.right;)He=He.right;else for(He=Ue.parent;He&&He.left===Ue;)Ue=He,He=He.parent;return He},f.prototype.forEach=function(Ue){for(var He=this._root,$t=[],ri=!1,nn=0;!ri;)He?($t.push(He),He=He.left):$t.length>0?(Ue(He=$t.pop(),nn++),He=He.right):ri=!0;return this},f.prototype.range=function(Ue,He,$t,ri){for(var nn=[],en=this._compare,En=this._root;nn.length!==0||En;)if(En)nn.push(En),En=En.left;else{if(en((En=nn.pop()).key,He)>0)break;if(en(En.key,Ue)>=0&&$t.call(ri,En))return this;En=En.right}return this},f.prototype.keys=function(){for(var Ue=this._root,He=[],$t=[],ri=!1;!ri;)Ue?(He.push(Ue),Ue=Ue.left):He.length>0?(Ue=He.pop(),$t.push(Ue.key),Ue=Ue.right):ri=!0;return $t},f.prototype.values=function(){for(var Ue=this._root,He=[],$t=[],ri=!1;!ri;)Ue?(He.push(Ue),Ue=Ue.left):He.length>0?(Ue=He.pop(),$t.push(Ue.data),Ue=Ue.right):ri=!0;return $t},f.prototype.at=function(Ue){for(var He=this._root,$t=[],ri=!1,nn=0;!ri;)if(He)$t.push(He),He=He.left;else if($t.length>0){if(He=$t.pop(),nn===Ue)return He;nn++,He=He.right}else ri=!0;return null},f.prototype.load=function(Ue,He,$t){if(Ue===void 0&&(Ue=[]),He===void 0&&(He=[]),$t===void 0&&($t=!1),this._size!==0)throw new Error("bulk-load: tree is not empty");var ri=Ue.length;return $t&&S(Ue,He,0,ri-1,this._compare),this._root=b(null,Ue,He,0,ri),this._size=ri,this},f.prototype.min=function(){var Ue=this.minNode(this._root);return Ue?Ue.key:null},f.prototype.max=function(){var Ue=this.maxNode(this._root);return Ue?Ue.key:null},f.prototype.isEmpty=function(){return this._root===null},y.size.get=function(){return this._size},f.createTree=function(Ue,He,$t,ri,nn){return new f($t,nn).load(Ue,He,ri)},Object.defineProperties(f.prototype,y);var M=0,F=1,z=2,U=3,j=0,Z=1,X=2,ue=3;function pe(Ue,He,$t){He===null?(Ue.inOut=!1,Ue.otherInOut=!0):(Ue.isSubject===He.isSubject?(Ue.inOut=!He.inOut,Ue.otherInOut=He.otherInOut):(Ue.inOut=!He.otherInOut,Ue.otherInOut=He.isVertical()?!He.inOut:He.inOut),He&&(Ue.prevInResult=!me(He,$t)||He.isVertical()?He.prevInResult:He));var ri=me(Ue,$t);Ue.resultTransition=ri?(function(nn,en){var En,ao=!nn.inOut,_r=!nn.otherInOut;switch(en){case j:En=ao&&_r;break;case Z:En=ao||_r;break;case ue:En=ao^_r;break;case X:En=nn.isSubject?ao&&!_r:_r&&!ao}return En?1:-1})(Ue,$t):0}function me(Ue,He){switch(Ue.type){case M:switch(He){case j:return!Ue.otherInOut;case Z:return Ue.otherInOut;case X:return Ue.isSubject&&Ue.otherInOut||!Ue.isSubject&&!Ue.otherInOut;case ue:return!0}break;case z:return He===j||He===Z;case U:return He===X;case F:return!1}return!1}var Ae=function(Ue,He,$t,ri,nn){this.left=He,this.point=Ue,this.otherEvent=$t,this.isSubject=ri,this.type=nn||M,this.inOut=!1,this.otherInOut=!1,this.prevInResult=null,this.resultTransition=0,this.otherPos=-1,this.outputContourId=-1,this.isExteriorRing=!0},Me={inResult:{configurable:!0}};function Be(Ue,He){return Ue[0]===He[0]&&Ue[1]===He[1]}Ae.prototype.isBelow=function(Ue){var He=this.point,$t=this.otherEvent.point;return this.left?(He[0]-Ue[0])*($t[1]-Ue[1])-($t[0]-Ue[0])*(He[1]-Ue[1])>0:($t[0]-Ue[0])*(He[1]-Ue[1])-(He[0]-Ue[0])*($t[1]-Ue[1])>0},Ae.prototype.isAbove=function(Ue){return!this.isBelow(Ue)},Ae.prototype.isVertical=function(){return this.point[0]===this.otherEvent.point[0]},Me.inResult.get=function(){return this.resultTransition!==0},Ae.prototype.clone=function(){var Ue=new Ae(this.point,this.left,this.otherEvent,this.isSubject,this.type);return Ue.contourId=this.contourId,Ue.resultTransition=this.resultTransition,Ue.prevInResult=this.prevInResult,Ue.isExteriorRing=this.isExteriorRing,Ue.inOut=this.inOut,Ue.otherInOut=this.otherInOut,Ue},Object.defineProperties(Ae.prototype,Me);var nt=11102230246251565e-32,ot=134217729,pt=(3+8*nt)*nt;function Ct(Ue,He,$t,ri,nn){var en,En,ao,_r,vr=He[0],ur=ri[0],js=0,ol=0;ur>vr==ur>-vr?(en=vr,vr=He[++js]):(en=ur,ur=ri[++ol]);var cr=0;if(jsvr==ur>-vr?(ao=en-((En=vr+en)-vr),vr=He[++js]):(ao=en-((En=ur+en)-ur),ur=ri[++ol]),en=En,ao!==0&&(nn[cr++]=ao);jsvr==ur>-vr?(ao=en-((En=en+vr)-(_r=En-en))+(vr-_r),vr=He[++js]):(ao=en-((En=en+ur)-(_r=En-en))+(ur-_r),ur=ri[++ol]),en=En,ao!==0&&(nn[cr++]=ao);for(;js0!=js>0)return ol;var cr=Math.abs(ur+js);return Math.abs(ol)>=ai*cr?ol:-(function(Ma,Xs,_s,za,Ua,Sa,Oa){var Js,br,la,yl,Io,ns,Ha,Vl,Xa,ed,ma,zc,km,ip,Au,Mm,hC,td,Ed=Ma-Ua,np=_s-Ua,ah=Xs-Sa,Dp=za-Sa;Oi[0]=(Au=(Vl=Ed-(Ha=(ns=ot*Ed)-(ns-Ed)))*(ed=Dp-(Xa=(ns=ot*Dp)-(ns-Dp)))-((ip=Ed*Dp)-Ha*Xa-Vl*Xa-Ha*ed))-((ma=Au-(hC=(Vl=ah-(Ha=(ns=ot*ah)-(ns-ah)))*(ed=np-(Xa=(ns=ot*np)-(ns-np)))-((Mm=ah*np)-Ha*Xa-Vl*Xa-Ha*ed)))+(Io=Au-ma))+(Io-hC),Oi[1]=(km=ip-((zc=ip+ma)-(Io=zc-ip))+(ma-Io))-((ma=km-Mm)+(Io=km-ma))+(Io-Mm),Oi[2]=zc-((td=zc+ma)-(Io=td-zc))+(ma-Io),Oi[3]=td;var BT=(function(EQt,G0e){for(var $0e=G0e[0],OJ=1;OJ<4;OJ++)$0e+=G0e[OJ];return $0e})(0,Oi),pB=Mt*Oa;if(BT>=pB||-BT>=pB||(Js=Ma-(Ed+(Io=Ma-Ed))+(Io-Ua),la=_s-(np+(Io=_s-np))+(Io-Ua),br=Xs-(ah+(Io=Xs-ah))+(Io-Sa),yl=za-(Dp+(Io=za-Dp))+(Io-Sa),Js===0&&br===0&&la===0&&yl===0)||(pB=gi*Oa+pt*Math.abs(BT),(BT+=Ed*yl+Dp*Js-(ah*la+np*br))>=pB||-BT>=pB))return BT;oi[0]=(Au=(Vl=Js-(Ha=(ns=ot*Js)-(ns-Js)))*(ed=Dp-(Xa=(ns=ot*Dp)-(ns-Dp)))-((ip=Js*Dp)-Ha*Xa-Vl*Xa-Ha*ed))-((ma=Au-(hC=(Vl=br-(Ha=(ns=ot*br)-(ns-br)))*(ed=np-(Xa=(ns=ot*np)-(ns-np)))-((Mm=br*np)-Ha*Xa-Vl*Xa-Ha*ed)))+(Io=Au-ma))+(Io-hC),oi[1]=(km=ip-((zc=ip+ma)-(Io=zc-ip))+(ma-Io))-((ma=km-Mm)+(Io=km-ma))+(Io-Mm),oi[2]=zc-((td=zc+ma)-(Io=td-zc))+(ma-Io),oi[3]=td;var c8e=Ct(4,Oi,4,oi,vi);oi[0]=(Au=(Vl=Ed-(Ha=(ns=ot*Ed)-(ns-Ed)))*(ed=yl-(Xa=(ns=ot*yl)-(ns-yl)))-((ip=Ed*yl)-Ha*Xa-Vl*Xa-Ha*ed))-((ma=Au-(hC=(Vl=ah-(Ha=(ns=ot*ah)-(ns-ah)))*(ed=la-(Xa=(ns=ot*la)-(ns-la)))-((Mm=ah*la)-Ha*Xa-Vl*Xa-Ha*ed)))+(Io=Au-ma))+(Io-hC),oi[1]=(km=ip-((zc=ip+ma)-(Io=zc-ip))+(ma-Io))-((ma=km-Mm)+(Io=km-ma))+(Io-Mm),oi[2]=zc-((td=zc+ma)-(Io=td-zc))+(ma-Io),oi[3]=td;var d8e=Ct(c8e,vi,4,oi,Ii);oi[0]=(Au=(Vl=Js-(Ha=(ns=ot*Js)-(ns-Js)))*(ed=yl-(Xa=(ns=ot*yl)-(ns-yl)))-((ip=Js*yl)-Ha*Xa-Vl*Xa-Ha*ed))-((ma=Au-(hC=(Vl=br-(Ha=(ns=ot*br)-(ns-br)))*(ed=la-(Xa=(ns=ot*la)-(ns-la)))-((Mm=br*la)-Ha*Xa-Vl*Xa-Ha*ed)))+(Io=Au-ma))+(Io-hC),oi[1]=(km=ip-((zc=ip+ma)-(Io=zc-ip))+(ma-Io))-((ma=km-Mm)+(Io=km-ma))+(Io-Mm),oi[2]=zc-((td=zc+ma)-(Io=td-zc))+(ma-Io),oi[3]=td;var u8e=Ct(d8e,Ii,4,oi,Ni);return Ni[u8e-1]})(nn,en,En,ao,_r,vr,cr)})(Ue[0],Ue[1],He[0],He[1],$t[0],$t[1]);return ri>0?-1:ri<0?1:0}function Kt(Ue,He){var $t=Ue.point,ri=He.point;return $t[0]>ri[0]?1:$t[0]ri[1]?1:-1:(function(nn,en,En,ao){return nn.left!==en.left?nn.left?1:-1:Ei(En,nn.otherEvent.point,en.otherEvent.point)!==0?nn.isBelow(en.otherEvent.point)?-1:1:!nn.isSubject&&en.isSubject?1:-1})(Ue,He,$t)}function Ht(Ue,He,$t){var ri=new Ae(He,!1,Ue,Ue.isSubject),nn=new Ae(He,!0,Ue.otherEvent,Ue.isSubject);return Be(Ue.point,Ue.otherEvent.point)&&console.warn("what is that, a collapsed segment?",Ue),ri.contourId=nn.contourId=Ue.contourId,Kt(nn,Ue.otherEvent)>0&&(Ue.otherEvent.left=!0,nn.left=!1),Ue.otherEvent.otherEvent=nn,Ue.otherEvent=ri,$t.push(nn),$t.push(ri),$t}function zi(Ue,He){return Ue[0]*He[1]-Ue[1]*He[0]}function Li(Ue,He){return Ue[0]*He[0]+Ue[1]*He[1]}function Qn(Ue,He,$t){var ri=(function(_r,vr,ur,js,ol){var cr=[vr[0]-_r[0],vr[1]-_r[1]],Ma=[js[0]-ur[0],js[1]-ur[1]];function Xs(ns,Ha,Vl){return[ns[0]+Ha*Vl[0],ns[1]+Ha*Vl[1]]}var _s=[ur[0]-_r[0],ur[1]-_r[1]],za=zi(cr,Ma),Ua=za*za,Sa=Li(cr,cr);if(Ua>0){var Oa=zi(_s,Ma)/za;if(Oa<0||Oa>1)return null;var Js=zi(_s,cr)/za;return Js<0||Js>1?null:Oa===0||Oa===1?[Xs(_r,Oa,cr)]:Js===0||Js===1?[Xs(ur,Js,Ma)]:[Xs(_r,Oa,cr)]}if((Ua=(za=zi(_s,cr))*za)>0)return null;var br=Li(cr,_s)/Sa,la=br+Li(cr,Ma)/Sa,yl=Math.min(br,la),Io=Math.max(br,la);return yl<=1&&Io>=0?yl===1?[Xs(_r,yl>0?yl:0,cr)]:Io===0?[Xs(_r,Io<1?Io:1,cr)]:[Xs(_r,yl>0?yl:0,cr),Xs(_r,Io<1?Io:1,cr)]:null})(Ue.point,Ue.otherEvent.point,He.point,He.otherEvent.point),nn=ri?ri.length:0;if(nn===0||nn===1&&(Be(Ue.point,He.point)||Be(Ue.otherEvent.point,He.otherEvent.point))||nn===2&&Ue.isSubject===He.isSubject)return 0;if(nn===1)return Be(Ue.point,ri[0])||Be(Ue.otherEvent.point,ri[0])||Ht(Ue,ri[0],$t),Be(He.point,ri[0])||Be(He.otherEvent.point,ri[0])||Ht(He,ri[0],$t),1;var en=[],En=!1,ao=!1;return Be(Ue.point,He.point)?En=!0:Kt(Ue,He)===1?en.push(He,Ue):en.push(Ue,He),Be(Ue.otherEvent.point,He.otherEvent.point)?ao=!0:Kt(Ue.otherEvent,He.otherEvent)===1?en.push(He.otherEvent,Ue.otherEvent):en.push(Ue.otherEvent,He.otherEvent),En&&ao||En?(He.type=F,Ue.type=He.inOut===Ue.inOut?z:U,En&&!ao&&Ht(en[1].otherEvent,en[0].point,$t),2):ao?(Ht(en[0],en[1].point,$t),3):en[0]!==en[3].otherEvent?(Ht(en[0],en[1].point,$t),Ht(en[1],en[2].point,$t),3):(Ht(en[0],en[1].point,$t),Ht(en[3].otherEvent,en[2].point,$t),3)}function bn(Ue,He){if(Ue===He)return 0;if(Ei(Ue.point,Ue.otherEvent.point,He.point)!==0||Ei(Ue.point,Ue.otherEvent.point,He.otherEvent.point)!==0)return Be(Ue.point,He.point)?Ue.isBelow(He.otherEvent.point)?-1:1:Ue.point[0]===He.point[0]?Ue.point[1]He.contourId?1:-1:Kt(Ue,He)===1?1:-1}var Fn=function(){this.points=[],this.holeIds=[],this.holeOf=null,this.depth=null};function Ki(Ue,He,$t,ri){var nn,en=Ue+1,En=He[Ue].point,ao=He.length;for(enri;)en--;return en}Fn.prototype.isExterior=function(){return this.holeOf==null};var Yn=on,Po=on;function on(Ue,He){if(!(this instanceof on))return new on(Ue,He);if(this.data=Ue||[],this.length=this.data.length,this.compare=He||Hn,this.length>0)for(var $t=(this.length>>1)-1;$t>=0;$t--)this._down($t)}function Hn(Ue,He){return UeHe?1:0}on.prototype={push:function(Ue){this.data.push(Ue),this.length++,this._up(this.length-1)},pop:function(){if(this.length!==0){var Ue=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),Ue}},peek:function(){return this.data[0]},_up:function(Ue){for(var He=this.data,$t=this.compare,ri=He[Ue];Ue>0;){var nn=Ue-1>>1,en=He[nn];if($t(ri,en)>=0)break;He[Ue]=en,Ue=nn}He[Ue]=ri},_down:function(Ue){for(var He=this.data,$t=this.compare,ri=this.length>>1,nn=He[Ue];Ue=0)break;He[Ue]=ao,Ue=en}He[Ue]=nn}},Yn.default=Po;var To=Math.max,qo=Math.min,gr=0;function ir(Ue,He,$t,ri,nn,en){var En,ao,_r,vr,ur,js;for(En=0,ao=Ue.length-1;En0?js.left=!0:ur.left=!0;var ol=_r[0],cr=_r[1];nn[0]=qo(nn[0],ol),nn[1]=qo(nn[1],cr),nn[2]=To(nn[2],ol),nn[3]=To(nn[3],cr),ri.push(ur),ri.push(js)}}var An=[];function Zo(Ue,He,$t){typeof Ue[0][0][0]=="number"&&(Ue=[Ue]),typeof He[0][0][0]=="number"&&(He=[He]);var ri=(function(cr,Ma,Xs){var _s=null;return cr.length*Ma.length==0&&(Xs===j?_s=An:Xs===X?_s=cr:Xs!==Z&&Xs!==ue||(_s=cr.length===0?Ma:cr)),_s})(Ue,He,$t);if(ri)return ri===An?null:ri;var nn=[1/0,1/0,-1/0,-1/0],en=[1/0,1/0,-1/0,-1/0],En=(function(cr,Ma,Xs,_s,za){var Ua,Sa,Oa,Js,br,la,yl=new Yn(null,Kt);for(Oa=0,Js=cr.length;Oa_s[2]||_s[0]>Xs[2]||Xs[1]>_s[3]||_s[1]>Xs[3])&&(za===j?Ua=An:za===X?Ua=cr:za!==Z&&za!==ue||(Ua=cr.concat(Ma))),Ua})(Ue,He,nn,en,$t))return ri===An?null:ri;for(var ao=(function(cr){var Ma,Xs,_s=(function(Oa){var Js,br,la,yl,Io=[];for(br=0,la=Oa.length;br0){var ma=ns[ed];if(ma.holeOf!=null){var zc=ma.holeOf;ns[zc].holeIds.push(Ha),Vl.holeOf=zc,Vl.depth=ns[ed].depth}else ns[ed].holeIds.push(Ha),Vl.holeOf=ed,Vl.depth=ns[ed].depth+1}else Vl.holeOf=null,Vl.depth=ns[ed].depth}else Vl.holeOf=null,Vl.depth=0;return Vl})(_s[Ma],Ua,Oa),br=function(Io){za[Io]=!0,Io<_s.length&&_s[Io]&&(_s[Io].outputContourId=Oa)},la=Ma,yl=Ma;for(Js.points.push(_s[Ma].point);br(la),br(la=_s[la].otherPos),Js.points.push(_s[la].point),!((la=Ki(la,_s,za,yl))==yl||la>=_s.length)&&_s[la];);Ua.push(Js)}};for(Ma=0,Xs=_s.length;Mayl||Ua===X&&Io.point[0]>_s[2])break;if(Io.left){Oa=Sa=br.insert(Io),Sa=Sa!==(Js=br.minNode())?br.prev(Sa):null,Oa=br.next(Oa);var ns=Sa?Sa.key:null;if(pe(Io,ns,Ua),Oa&&Qn(Io,Oa.key,cr)===2&&(pe(Io,ns,Ua),pe(Oa.key,Io,Ua)),Sa&&Qn(Sa.key,Io,cr)===2){var Ha=Sa;pe(ns,(Ha=Ha!==Js?br.prev(Ha):null)?Ha.key:null,Ua),pe(Io,ns,Ua)}}else Oa=Sa=br.find(Io=Io.otherEvent),Sa&&Oa&&(Sa=Sa!==Js?br.prev(Sa):null,Oa=br.next(Oa),br.remove(Io),Oa&&Sa&&Qn(Sa.key,Oa.key,cr))}return la})(En,0,0,nn,en,$t)),_r=[],vr=0;vr{b.push(new Pi(U,M+(U-S)/(F-S)*(z-M)))}:(b,S,M,F,z,U)=>{b.push(new Pi(S+(U-M)/(z-M)*(F-S),U))};for(let b of u){let S=[];for(let M of b){if(M.length<=2)continue;let F=[];for(let j=0;ja&&y(F,Z,X,ue,pe,a):me>c?Ae=a&&y(F,Z,X,ue,pe,a),Ae>c&&me<=c&&y(F,Z,X,ue,pe,c)}let z=M[M.length-1],U=h===0?z.x:z.y;U>=a&&U<=c&&F.push(z),F.length&&(z=F[F.length-1],F[0].x===z.x&&F[0].y===z.y||F.push(F[0]),S.push(F))}S.length&&f.push(S)}return f}function IX(u,a){let c=I3(u),h=I3([a]),f=M8.intersection(c,h);return f==null?[]:O8(f)}function EX(u,a){let h=I3(u,65536),f=[];for(;a.valid();a.next()){let[y,b]=a.get(),S=y.x*65536,M=y.y*65536,F=b.x*65536,z=b.y*65536,U=F-S,j=z-M,Z=Math.hypot(U,j);if(Z===0)continue;let X=Math.trunc(j/Z*3),ue=-Math.trunc(U/Z*3);f.push([[[S,M],[F,z],[F+X,z+ue],[S+X,M+ue],[S,M]]])}return f.length>0&&(h=M8.diff(h,f)),O8(h,1/65536)}function I3(u,a=1){return[u.map(c=>c.map(h=>[h.x*a,h.y*a]))]}function O8(u,a=1){return u.map(c=>c.map((h,f)=>{let y=h.map(b=>new Pi(b[0]*a,b[1]*a).round());return f>0&&y.reverse(),y}))}class E3{constructor(a,c){this.layoutVertexArray=new pd,this.indexArray=new Ec,this.lineIndexArray=new gc,this.triangleSegments=new Ya,this.lineSegments=new Ya,this.programConfigurations=new Tm(a.layers,{zoom:a.zoom,lut:a.lut}),this.uploaded=!1,c&&(this.elevatedLayoutVertexArray=new z0)}update(a,c,h,f,y,b,S,M){this.programConfigurations.updatePaintArrays(a,c,y,h,f,b,S,M)}isEmpty(){return this.layoutVertexArray.length===0}needsUpload(){return this.programConfigurations.needsUpload}upload(a){this.uploaded||(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,yX.members),this.indexBuffer=a.createIndexBuffer(this.indexArray),this.lineIndexBuffer=a.createIndexBuffer(this.lineIndexArray),this.elevatedLayoutVertexArray&&this.elevatedLayoutVertexArray.length>0&&(this.elevatedLayoutVertexBuffer=a.createVertexBuffer(this.elevatedLayoutVertexArray,vX.members))),this.programConfigurations.upload(a),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.elevatedLayoutVertexBuffer&&this.elevatedLayoutVertexBuffer.destroy(),this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.lineIndexBuffer.destroy(),this.programConfigurations.destroy(),this.triangleSegments.destroy(),this.lineSegments.destroy())}populatePaintArrays(a,c,h,f,y,b,S){this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,a,c,h,f,y,b,void 0,S)}}class D3{constructor(a){this.zoom=a.zoom,this.pixelRatio=a.pixelRatio,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(c=>c.fqid),this.index=a.index,this.hasPattern=!1,this.patternFeatures=[],this.lut=a.lut,this.bufferData=new E3(a,!1),this.elevationBufferData=new E3(a,!0),this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.projection=a.projection,this.elevationMode=this.layers[0].layout.get("fill-elevation-reference"),this.sourceLayerIndex=a.sourceLayerIndex,this.worldview=a.worldview}updateFootprints(a,c){}populate(a,c,h,f){this.hasPattern=eO("fill",this.layers,this.pixelRatio,c);let y=this.layers[0].layout.get("fill-sort-key"),b=[];for(let{feature:S,id:M,index:F,sourceLayerIndex:z}of a){let U=this.layers[0]._featureFilter.needGeometry,j=Fi(S,U);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom,{worldview:this.worldview}),j,h))continue;let Z=y?y.evaluate(j,{},h,c.availableImages):void 0,X={id:M,properties:S.properties,type:S.type,sourceLayerIndex:z,index:F,geometry:U?j.geometry:un(S,h,f),patterns:{},sortKey:Z};b.push(X)}y&&b.sort((S,M)=>S.sortKey-M.sortKey);for(let S of b){let{geometry:M,index:F,sourceLayerIndex:z}=S;if(this.hasPattern){let U=Dm("fill",this.layers,S,this.zoom,this.pixelRatio,c);this.patternFeatures.push(U)}else this.addFeature(S,M,F,h,{},c.availableImages,c.brightness,c.elevationFeatures);c.featureIndex.insert(a[F].feature,M,F,z,this.index)}}update(a,c,h,f,y,b,S){this.bufferData.update(a,c,h,f,y,b,S,this.worldview),this.elevationBufferData.update(a,c,h,f,y,b,S,this.worldview),this.elevatedStructures&&this.elevatedStructures.update(a,c,h,f,y,b,S,this.worldview)}addFeatures(a,c,h,f,y,b){for(let S of this.patternFeatures)this.addFeature(S,S.geometry,S.index,c,h,f,b,a.elevationFeatures)}isEmpty(){return this.bufferData.isEmpty()&&this.elevationBufferData.isEmpty()}uploadPending(){return!this.uploaded||this.bufferData.needsUpload()||this.elevationBufferData.needsUpload()}upload(a){this.bufferData.upload(a),this.elevationBufferData.upload(a),this.elevatedStructures&&this.elevatedStructures.upload(a)}destroy(){this.bufferData.destroy(),this.elevationBufferData.destroy(),this.elevatedStructures&&this.elevatedStructures.destroy()}addFeature(a,c,h,f,y,b=[],S,M){let F=IT(c,500);this.elevationMode!=="none"?this.addElevatedRoadFeature(a,F,f,h,M):this.addGeometry(F,this.bufferData),this.bufferData.populatePaintArrays(a,h,y,b,f,S,this.worldview),this.elevationBufferData.populatePaintArrays(a,h,y,b,f,S,this.worldview)}getUnevaluatedPortalGraph(){return this.elevatedStructures?this.elevatedStructures.unevaluatedPortals:void 0}getElevationPolygons(){return this.elevatedStructures?this.elevatedStructures.portalPolygons:void 0}setEvaluatedPortalGraph(a,c,h,f,y){this.elevatedStructures&&(this.elevatedStructures.construct(a),this.elevatedStructures.populatePaintArrays(c,h,f,y,this.worldview))}addElevatedRoadFeature(a,c,h,f,y){let b=new Array,S=Va.getElevationFeature(a,y);if(!S)return void this.addGeometry(c,this.bufferData);{let F=this.clipPolygonsToTile(c,1);F.length>0&&b.push({polygons:F,elevationFeature:S,elevationTileID:h})}let M={guardRailEnabled:this.layers[0].layout.get("fill-construct-bridge-guard-rail").evaluate(a,{},h),featureIndex:f};for(let F of b)if(F.elevationFeature){if(this.elevationMode==="hd-road-base"){this.elevatedStructures||(this.elevatedStructures=new Gh(F.elevationTileID,this.layers,this.zoom,this.lut));let U=F.elevationFeature.isTunnel(),j=0;a.properties.hasOwnProperty(ks)&&(j=+a.properties[ks]);for(let Z of F.polygons)this.elevatedStructures.addPortalCandidates(F.elevationFeature.id,Z,U,F.elevationFeature,j)}F.elevationFeature.constantHeight==null&&(F.polygons=this.prepareElevatedPolygons(F.polygons,F.elevationFeature,F.elevationTileID));let z=new lc(h,F.elevationTileID);this.addElevatedGeometry(F.polygons,z,F.elevationFeature,this.elevationMode==="hd-road-base"?0:.05,f,M)}}addElevatedGeometry(a,c,h,f,y,b){let S={elevation:h,elevationSampler:c,bias:f,index:y,featureInfo:b},[M,F]=this.addGeometry(a,this.elevationBufferData,S);this.elevationBufferData.heightRange==null?this.elevationBufferData.heightRange={min:M,max:F}:(this.elevationBufferData.heightRange.min=Math.min(this.elevationBufferData.heightRange.min,M),this.elevationBufferData.heightRange.max=Math.max(this.elevationBufferData.heightRange.max,F))}addGeometry(a,c,h){let f=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,b=null;h&&(b=h.elevationSampler.constantElevation(h.elevation,h.bias),b!=null&&(f=b,y=b));let S=(M,F,z)=>{if(h!=null)if(F.push(M),b!=null)c.elevatedLayoutVertexArray.emplaceBack(b),z.push(b);else{let U=h.elevationSampler.pointElevation(M,h.elevation,h.bias);c.elevatedLayoutVertexArray.emplaceBack(U),z.push(U),f=Math.min(f,U),y=Math.max(y,U)}};for(let M of a){let F=0;for(let Me of M)F+=Me.length;let z=c.triangleSegments.prepareSegment(F,c.layoutVertexArray,c.indexArray),U=z.vertexLength,j=[],Z=[],X=[],ue=[],pe=[],me=c.layoutVertexArray.length;for(let Me of M){if(Me.length===0)continue;Me!==M[0]&&Z.push(j.length/2);let Be=c.lineSegments.prepareSegment(Me.length,c.layoutVertexArray,c.lineIndexArray),nt=Be.vertexLength;h&&pe.push(c.layoutVertexArray.length-me),S(Me[0],X,ue),c.layoutVertexArray.emplaceBack(Me[0].x,Me[0].y),c.lineIndexArray.emplaceBack(nt+Me.length-1,nt),j.push(Me[0].x),j.push(Me[0].y);for(let ot=1;ot0&&h&&this.elevationMode==="hd-road-base"){let Me=h.elevation.isTunnel(),Be=h.elevation.safeArea,nt=this.elevatedStructures.addVertices(X,ue);this.elevatedStructures.addTriangles(Ae,nt,Me);let ot=pe.length;if(ot>0){for(let pt=0;pt=h&&Z.max.x<=y&&Z.min.y>=f&&Z.max.y<=b?M:F).push(j)}if(M.length===a.length)return a;let z=[new Pi(h,f),new Pi(y,f),new Pi(y,b),new Pi(h,b),new Pi(h,f)],U=M;for(let j of F)U.push(...IX(j,z));return U}}let R8,F8,P8,L8;yn(D3,"FillBucket",{omit:["layers","patternFeatures"]}),yn(E3,"FillBufferData"),yn(Gh,"ElevatedStructures");class iO{constructor(a,c,h,f){if(this.triangleCount=c.length/3,this.min=new Pi(0,0),this.max=new Pi(0,0),this.xScale=0,this.yScale=0,this.cellsX=0,this.cellsY=0,this.cells=[],this.payload=[],this.triangleCount===0||a.length===0)return;let[y,b]=[a[0].clone(),a[0].clone()];for(let U=1;UU.cellIdx-j.cellIdx||U.triIdx-j.triIdx);let z=0;for(;zthis.max.x||this.min.x>a.x||a.y>this.max.y||this.min.y>a.y)return;let h=Lg(a.x-this.min.x,this.xScale,this.cellsX),f=Lg(a.y-this.min.y,this.yScale,this.cellsY),y=this.cells[f*this.cellsX+h];if(y){this._lazyInitLookup();for(let b=0;bthis.max.x||this.min.x>c.x||a.y>this.max.y||this.min.y>c.y)return;this._lazyInitLookup();let f=Lg(a.x-this.min.x,this.xScale,this.cellsX),y=Lg(c.x-this.min.x,this.xScale,this.cellsX),b=Lg(a.y-this.min.y,this.yScale,this.cellsY),S=Lg(c.y-this.min.y,this.yScale,this.cellsY);for(let M=b;M<=S;M++)for(let F=f;F<=y;F++){let z=this.cells[M*this.cellsX+F];if(z)for(let U=0;Uc.fqid),this.index=a.index,this.hasPattern=!1,this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.footprints=[],this.worldview=a.worldview}updateFootprints(a,c){for(let h of this.footprints)c.push({footprint:h,id:a})}populate(a,c,h,f){let y=[];for(let{feature:b,id:S,index:M,sourceLayerIndex:F}of a){let z=this.layers[0]._featureFilter.needGeometry,U=Fi(b,z);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom,{worldview:this.worldview}),U,h))continue;let j={id:S,properties:b.properties,type:b.type,sourceLayerIndex:F,index:M,geometry:z?U.geometry:un(b,h,f),patterns:{}};y.push(j)}for(let b of y){let{geometry:S,index:M,sourceLayerIndex:F}=b;this.addFeature(b,S,M,h,{},c.availableImages,c.brightness),c.featureIndex.insert(a[M].feature,S,M,F,this.index)}}isEmpty(){return this.footprints.length===0}uploadPending(){return!1}upload(a){}update(a,c,h,f,y,b,S){}destroy(){}addFeature(a,c,h,f,y,b=[],S){for(let M of IT(c,2)){let F=[],z=[],U=[],j=new Pi(1/0,1/0),Z=new Pi(-1/0,-1/0);for(let pe of M)if(pe.length!==0){pe!==M[0]&&U.push(z.length/2);for(let me=0;meb===f)===void 0})(h,u.clipScope)}function nO(u,a){return u.x-a.x||u.y-a.y}function V8(u,a){return nO(u.min,a.min)===0&&nO(u.max,a.max)===0}function M3(u,a){return!(u.min.x>a.max.x||u.max.xa.max.y||u.max.ynew Pi((M.x+y.x*qi)*S-b.x*qi,(M.y+y.y*qi)*S-b.y*qi))}return O3(c,f,u.indices,0,u.indices.length,0,0)}function F3(u,a,c,h){let f=Math.pow(2,h.z-c.z);return new Pi((u+c.x*qi)*f-h.x*qi,(a+c.y*qi)*f-h.y*qi)}function P3(u,a){let c=[];a.grid.queryPoint(u,c);let h=a.indices,f=a.vertices;for(let y=0;y0&&(h.length>1&&c.push(h),h=[])}return h.length>1&&c.push(h),c}let N3=Mi.types,ET=["fill-extrusion-base","fill-extrusion-height","fill-extrusion-color","fill-extrusion-pattern","fill-extrusion-flood-light-wall-radius","fill-extrusion-line-width","fill-extrusion-emissive-strength"],RX=["fill-extrusion-flood-light-ground-radius"],FX=Math.pow(2,13),PX=Math.pow(2,15)-1,H8=new Pi(0,1),uC=2147483648;function DT(u,a,c,h,f,y,b,S){u.emplaceBack((a<<1)+b,(c<<1)+y,(Math.floor(h*FX)<<1)+f,Math.round(S))}function AT(u,a,c){u.emplaceBack(a.x*qi,a.y*qi,c?1:0)}function oO(u,a,c,h,f,y){u.emplaceBack(a.x,a.y,(c.x<<1)+h,(c.y<<1)+f,y)}function tA(u,a,c){u.emplaceBack(a.x,a.y,a.z,c[0]*16384,c[1]*16384,c[2]*16384)}class j8{constructor(){this.vertexOffset=0,this.vertexCount=0,this.indexOffset=0,this.indexCount=0}}class G8{constructor(){this.centroidXY=new Pi(0,0),this.vertexArrayOffset=0,this.vertexCount=0,this.groundVertexArrayOffset=0,this.groundVertexCount=0,this.flags=0,this.footprintSegIdx=-1,this.footprintSegLen=0,this.polygonSegIdx=-1,this.polygonSegLen=0,this.min=new Pi(Number.MAX_VALUE,Number.MAX_VALUE),this.max=new Pi(-Number.MAX_VALUE,-Number.MAX_VALUE),this.height=0,this.buildingId=0}span(){return new Pi(this.max.x-this.min.x,this.max.y-this.min.y)}}class $8{constructor(){this.acc=new Pi(0,0),this.accCount=0,this.centroidDataIndex=0}startRing(a,c){a.min.x===Number.MAX_VALUE&&(a.min.x=a.max.x=c.x,a.min.y=a.max.y=c.y)}appendEdge(a,c,h){this.accCount++,this.acc._add(c);let f=!!this.borders;c.xa.max.x&&(a.max.x=c.x,f=!0),c.ya.max.y&&(a.max.y=c.y,f=!0),((c.x===0||c.x===qi)&&c.x===h.x)!=((c.y===0||c.y===qi)&&c.y===h.y)&&this.processBorderOverlap(c,h),f&&this.checkBorderIntersection(c,h)}checkBorderIntersection(a,c){c.x<0!=a.x<0&&this.addBorderIntersection(0,eo(c.y,a.y,(0-c.x)/(a.x-c.x))),c.x>qi!=a.x>qi&&this.addBorderIntersection(1,eo(c.y,a.y,(qi-c.x)/(a.x-c.x))),c.y<0!=a.y<0&&this.addBorderIntersection(2,eo(c.x,a.x,(0-c.y)/(a.y-c.y))),c.y>qi!=a.y>qi&&this.addBorderIntersection(3,eo(c.x,a.x,(qi-c.y)/(a.y-c.y)))}addBorderIntersection(a,c){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]]);let h=this.borders[a];ch[1]&&(h[1]=c)}processBorderOverlap(a,c){if(a.x===c.x){if(a.y===c.y)return;let h=a.x===0?0:1;this.addBorderIntersection(h,c.y),this.addBorderIntersection(h,a.y)}else{let h=a.y===0?2:3;this.addBorderIntersection(h,c.x),this.addBorderIntersection(h,a.x)}}centroid(){return this.accCount===0?new Pi(0,0):new Pi(Math.floor(Math.max(0,this.acc.x)/this.accCount),Math.floor(Math.max(0,this.acc.y)/this.accCount))}intersectsCount(){return this.borders?this.borders.reduce((a,c)=>a+ +(c[0]!==Number.MAX_VALUE),0):0}}function q8(u,a){let c=u.add(a)._unit(),h=st(u.x*c.x+u.y*c.y,-1,1);var f,y,b;return f=Math.acos(h),Math.min(4,Math.max(-4,Math.tan(f)))/4*PX*((y=u).x*(b=a).y-y.y*b.x<0?-1:1)}let LX=[u=>u.x<0,u=>u.x>qi,u=>u.y<0,u=>u.y>qi];function NX(u,a,c,h){let f=[4];if(h===0)return f;c._mult(h);let y=u.sub(c),b=a.sub(c),S=[u,a,y,b];for(let M=0;M<4;M++)for(let F of S)if(LX[M](F)){f.push(M);break}return f}class B3{constructor(a){this.vertexArray=new hT,this.indexArray=new Ec,this.programConfigurations=new Tm(a.layers,{zoom:a.zoom,lut:a.lut},c=>RX.includes(c)),this._segments=new Ya,this.hiddenByLandmarkVertexArray=new nC,this._segmentToGroundQuads={},this._segmentToGroundQuads[0]=[],this._segmentToRegionTriCounts={},this._segmentToRegionTriCounts[0]=[0,0,0,0,0],this.regionSegments={},this.regionSegments[4]=new Ya}getDefaultSegment(){return this.regionSegments[4]}hasData(){return this.vertexArray.length!==0}addData(a,c,h,f=!1){let y=a.length;if(y>2){let b=Math.max(0,this._segments.get().length-1),S=this._segments._prepareSegment(4*y,this.vertexArray.length,2*this._segmentToGroundQuads[b].length),M;b!==this._segments.get().length-1&&(b++,this._segmentToGroundQuads[b]=[],this._segmentToRegionTriCounts[b]=[0,0,0,0,0]);{let F=a[0],z=a[1];M=q8(F.sub(a[y-1])._perp()._unit(),z.sub(F)._perp()._unit())}for(let F=0;Ff.region-y.region);for(let h=0;hM+F,0);let S=0;for(let M=0;M<=4;M++){let F=b[M];if(F!==0){let z=this.regionSegments[M];z||(z=this.regionSegments[M]=new Ya);let U={vertexOffset:y.vertexOffset,primitiveOffset:y.primitiveOffset+S,vertexLength:y.vertexLength,primitiveLength:F};z.get().push(U)}S+=F}for(let M=0;M0?this.hiddenByLandmarkVertexBuffer=a.createVertexBuffer(this.hiddenByLandmarkVertexArray,ep.members,!0):this.hiddenByLandmarkVertexBuffer&&this.hiddenByLandmarkVertexBuffer.updateData(this.hiddenByLandmarkVertexArray),this._needsHiddenByLandmarkUpdate=!1)}destroy(){if(this.vertexBuffer){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.hiddenByLandmarkVertexBuffer&&this.hiddenByLandmarkVertexBuffer.destroy(),this._segments&&this._segments.destroy(),this.programConfigurations.destroy();for(let a=0;a<=4;a++){let c=this.regionSegments[a];c&&c.destroy()}}}}class rO{constructor(a){this.zoom=a.zoom,this.canonical=a.canonical,this.overscaling=a.overscaling,this.layers=a.layers,this.pixelRatio=a.pixelRatio,this.layerIds=this.layers.map(c=>c.fqid),this.index=a.index,this.hasPattern=!1,this.edgeRadius=0,this.projection=a.projection,this.activeReplacements=[],this.replacementUpdateTime=0,this.centroidData=[],this.footprintIndices=new Ec,this.footprintVertices=new pd,this.footprintSegments=[],this.layoutVertexArray=new Xy,this.centroidVertexArray=new jD,this.wallVertexArray=new jM,this.indexArray=new Ec,this.programConfigurations=new Tm(a.layers,{zoom:a.zoom,lut:a.lut},c=>ET.includes(c)),this.segments=new Ya,this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.groundEffect=new B3(a),this.maxHeight=0,this.partLookup={},this.triangleSubSegments=[],this.polygonSegments=[],this.worldview=a.worldview}updateFootprints(a,c){}populate(a,c,h,f){this.features=[],this.hasPattern=eO("fill-extrusion",this.layers,this.pixelRatio,c),this.featuresOnBorder=[],this.borderFeatureIndices=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.selfDEMTileTimestamp=Number.MAX_VALUE,this.borderDEMTileTimestamp=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE],this.tileToMeter=Ft(h),this.edgeRadius=this.layers[0].layout.get("fill-extrusion-edge-radius")/this.tileToMeter,this.wallMode=this.layers[0].paint.get("fill-extrusion-line-width").constantOr(1)!==0;for(let{feature:y,id:b,index:S,sourceLayerIndex:M}of a){let F=this.layers[0]._featureFilter.needGeometry,z=Fi(y,F);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom,{worldview:this.worldview}),z,h))continue;let U={id:b,sourceLayerIndex:M,index:S,geometry:F?z.geometry:un(y,h,f),properties:y.properties,type:y.type,patterns:{}},j=this.layoutVertexArray.length,Z=N3[U.type]==="Polygon";if(this.hasPattern)this.features.push({featureId:y.id,feature:Dm("fill-extrusion",this.layers,U,this.zoom,this.pixelRatio,c)});else if(this.wallMode)for(let X of U.geometry)for(let ue of U8(X,Z))this.addFeature(y.id,U,[ue],S,h,{},c.availableImages,f,c.brightness);else this.addFeature(y.id,U,U.geometry,S,h,{},c.availableImages,f,c.brightness);c.featureIndex.insert(y,U.geometry,S,M,this.index,j)}this.sortBorders(),this.projection.name==="mercator"&&this.splitToSubtiles(),this.groundEffect.prepareBorderSegments(),this.polygonSegments.length=0}addFeatures(a,c,h,f,y,b){for(let{featureId:S,feature:M}of this.features){let F=N3[M.type]==="Polygon",{geometry:z}=M;if(this.wallMode)for(let U of z)for(let j of U8(U,F))this.addFeature(S,M,[j],M.index,c,h,f,y,b);else this.addFeature(S,M,z,M.index,c,h,f,y,b)}this.sortBorders(),this.projection.name==="mercator"&&this.splitToSubtiles()}update(a,c,h,f,y,b,S){this.programConfigurations.updatePaintArrays(a,c,y,h,f,b,S,this.worldview),this.groundEffect.update(a,c,y,h,f,b,S,this.worldview)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload||this.groundEffect.programConfigurations.needsUpload}upload(a){this.uploaded||(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,MX),this.indexBuffer=a.createIndexBuffer(this.indexArray),this.wallVertexBuffer=a.createVertexBuffer(this.wallVertexArray,kX.members),this.layoutVertexExtArray&&(this.layoutVertexExtBuffer=a.createVertexBuffer(this.layoutVertexExtArray,Am.members,!0)),this.groundEffect.upload(a)),this.groundEffect.uploadPaintProperties(a),this.programConfigurations.upload(a),this.uploaded=!0}uploadCentroid(a){this.groundEffect.uploadHiddenByLandmark(a),this.needsCentroidUpdate&&(!this.centroidVertexBuffer&&this.centroidVertexArray.length>0?this.centroidVertexBuffer=a.createVertexBuffer(this.centroidVertexArray,AX.members,!0):this.centroidVertexBuffer&&this.centroidVertexBuffer.updateData(this.centroidVertexArray),this.needsCentroidUpdate=!1)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.centroidVertexBuffer&&this.centroidVertexBuffer.destroy(),this.layoutVertexExtBuffer&&this.layoutVertexExtBuffer.destroy(),this.groundEffect.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(a,c,h,f,y,b,S,M,F){let z=this.layers[0].paint.get("fill-extrusion-flood-light-ground-radius").evaluate(c,{})/this.tileToMeter,U=[new Pi(0,0),new Pi(qi,qi)],j=M.projection,Z=j.name==="globe",X=this.wallMode||N3[c.type]==="Polygon",ue=new $8;ue.centroidDataIndex=this.centroidData.length;let pe=new G8;pe.buildingId=a,c.properties&&c.properties.hasOwnProperty("building_id")&&(pe.buildingId=c.properties.building_id);let me=this.layers[0].paint.get("fill-extrusion-base").evaluate(c,{},y)<=0,Ae=this.layers[0].paint.get("fill-extrusion-height").evaluate(c,{},y),Me;if(pe.height=Ae,pe.vertexArrayOffset=this.layoutVertexArray.length,pe.groundVertexArrayOffset=this.groundEffect.vertexArray.length,Z&&!this.layoutVertexExtArray&&(this.layoutVertexExtArray=new U0),this.wallMode){if(Z)return void Er("Non zero fill-extrusion-line-width is not yet supported on globe.");if(h.length!==1)return;Me=(function(Mt){let gi=Mt[0].x===Mt[Mt.length-1].x&&Mt[0].y===Mt[Mt.length-1].y;(function(Ki){let Yn=0,Po=Ki.length;for(let on=0;on=0})(Mt)||(Mt=Mt.reverse());let vi={geometry:[],joinNormals:[],indices:[]},Ii=[],Ni=[],oi=[],Ei=Mt.length;for(;Ei>=2&&Mt[Ei-1].equals(Mt[Ei-2]);)Ei--;if(Ei<(gi?3:2))return vi;let Kt,Ht,zi,Li,Qn,bn=0;for(;bn0,To="miter",qo=2;To==="miter"&&on>qo&&(To="bevel"),To==="bevel"&&(on>100&&(To="flipbevel"),on{let Ue=new Pi(ir.x,ir.y),He=new Pi(ir.x,ir.y);Ue.x+=An.x*Yr,Ue.y+=An.y*Yr,He.x-=An.x*Math.max(Zo,1),He.y-=An.y*Math.max(Zo,1),oi.push(An),Ii.push(Ue),Ni.push(He)};if(To==="miter")Yn._mult(on),gr(Kt,Yn,0,0);else if(To==="flipbevel")Yn=Qn.mult(-1),gr(Kt,Yn,0,0),gr(Kt,Yn.mult(-1),0,0);else{let ir=-Math.sqrt(on*on-1),An=Hn?ir:0,Zo=Hn?0:ir;Ht&&gr(Kt,Li,An,Zo),zi&&gr(Kt,Qn,An,Zo)}}vi.geometry=[...Ii,...Ni.reverse(),Ii[0]],vi.joinNormals=[...oi,...oi.reverse(),oi[oi.length-1]];let Fn=vi.geometry.length-1;for(let Ki=0;KiMt<(gi.length-1)/2||Mt===gi.length-1,nt=this.wallMode?[h]:IT(h,500);for(let Mt=nt.length-1;Mt>=0;Mt--){let gi=nt[Mt];(gi.length===0||(ot=gi[0]).every(Oi=>Oi.x<=0)||ot.every(Oi=>Oi.x>=qi)||ot.every(Oi=>Oi.y<=0)||ot.every(Oi=>Oi.y>=qi))&&nt.splice(Mt,1)}var ot;let pt;if(Z)pt=J8(nt,U,y);else{pt=[];for(let Mt of nt)pt.push({polygon:Mt,bounds:U})}let Ct=X?this.edgeRadius:0,Tt=Ct>0&&this.zoom<17,ai=(Mt,gi)=>{if(Mt.length===0)return!1;let Oi=Mt[Mt.length-1];return gi.x===Oi.x&&gi.y===Oi.y};for(let{polygon:Mt,bounds:gi}of pt){let Oi=0,vi=0;for(let Ei of Mt)X&&!Ei[0].equals(Ei[Ei.length-1])&&Ei.push(Ei[0]),vi+=X?Ei.length-1:Ei.length;let Ii=this.segments.prepareSegment((X?5:4)*vi,this.layoutVertexArray,this.indexArray);pe.footprintSegIdx<0&&(pe.footprintSegIdx=this.footprintSegments.length),pe.polygonSegIdx<0&&(pe.polygonSegIdx=this.polygonSegments.length);let Ni={triangleArrayOffset:this.indexArray.length,triangleCount:0,triangleSegIdx:this.segments.segments.length-1},oi=new j8;if(oi.vertexOffset=this.footprintVertices.length,oi.indexOffset=3*this.footprintIndices.length,oi.ringIndices=[],X){let Ei=[],Kt=[];Oi=Ii.vertexLength;for(let zi=0;zi4&&Q8(Kt[Kt.length-2],Kt[0],Kt[1]),zi=Ct?BX(Kt[Kt.length-2],Kt[0],Kt[1],Ct):0,Li=[],Qn,bn,Fn;bn=Kt[1].sub(Kt[0])._perp()._unit();let Ki=!0;for(let Yn=1,Po=0;Yn0?1:0,An=on.dist(Hn);if(Po+An>32768&&(Po=0),Ct){Fn=To.sub(Hn)._perp()._unit();let He=W8(on,Hn,To,K8(bn,Fn),Ct);isNaN(He)&&(He=0);let $t=Hn.sub(on)._unit();on=on.add($t.mult(zi))._round(),Hn=Hn.add($t.mult(-He))._round(),zi=He,bn=Fn,me&&this.zoom>=17&&(ai(Li,on)||Li.push(on),ai(Li,Hn)||Li.push(Hn))}let Zo=Ii.vertexLength,Yr=Kt.length>4&&Q8(on,Hn,To),Ue=Z8(Po,Ht,Ki);if(DT(this.layoutVertexArray,on.x,on.y,gr,ir,0,0,Ue),DT(this.layoutVertexArray,on.x,on.y,gr,ir,0,1,Ue),this.wallMode){let He=Be(Yn-1,Kt),$t=Me.joinNormals[Yn-1];AT(this.wallVertexArray,$t,He),AT(this.wallVertexArray,$t,He)}if(Po+=An,Ue=Z8(Po,Yr,!Ki),Ht=Yr,DT(this.layoutVertexArray,Hn.x,Hn.y,gr,ir,0,0,Ue),DT(this.layoutVertexArray,Hn.x,Hn.y,gr,ir,0,1,Ue),this.wallMode){let He=Be(Yn,Kt),$t=Me.joinNormals[Yn];AT(this.wallVertexArray,$t,He),AT(this.wallVertexArray,$t,He)}if(Ii.vertexLength+=4,this.indexArray.emplaceBack(Zo+0,Zo+1,Zo+2),this.indexArray.emplaceBack(Zo+1,Zo+3,Zo+2),Ii.primitiveLength+=2,Ct){let He=Oi+(Yn===1?Kt.length-2:Yn-2),$t=Yn===1?Oi:He+1;if(this.indexArray.emplaceBack(Zo+1,He,Zo+3),this.indexArray.emplaceBack(He,$t,Zo+3),Ii.primitiveLength+=2,Qn===void 0&&(Qn=Zo),!V3(To,Kt[Yn],gi)){let ri=Yn===Kt.length-1?Qn:Ii.vertexLength;this.indexArray.emplaceBack(Zo+2,Zo+3,ri),this.indexArray.emplaceBack(Zo+3,ri+1,ri),this.indexArray.emplaceBack(Zo+3,$t,ri+1),Ii.primitiveLength+=3}Ki=!Ki}if(Z){let He=this.layoutVertexExtArray,$t=j.projectTilePoint(on.x,on.y,y),ri=j.projectTilePoint(Hn.x,Hn.y,y),nn=j.upVector(y,on.x,on.y),en=j.upVector(y,Hn.x,Hn.y);tA(He,$t,nn),tA(He,$t,nn),tA(He,ri,en),tA(He,ri,en)}}X&&(Oi+=Kt.length-1),me&&Ct&&this.zoom>=17&&(Li.length!==0&&ai(Li,Li[0])&&Li.pop(),this.groundEffect.addData(Li,gi,z,Ct>0))}this.footprintSegments.push(oi),Ni.triangleCount=this.indexArray.length-Ni.triangleArrayOffset,this.polygonSegments.push(Ni),++pe.footprintSegLen,++pe.polygonSegLen}if(pe.vertexCount=this.layoutVertexArray.length-pe.vertexArrayOffset,pe.groundVertexCount=this.groundEffect.vertexArray.length-pe.groundVertexArrayOffset,pe.vertexCount!==0){if(pe.centroidXY=ue.borders?H8:this.encodeCentroid(ue,pe),this.centroidData.push(pe),ue.borders){this.featuresOnBorder.push(ue);let Mt=this.featuresOnBorder.length-1;for(let gi=0;githis.featuresOnBorder[c].borders[a][0]-this.featuresOnBorder[h].borders[a][0])}splitToSubtiles(){let a=[];for(let S=0;Sqi),z=2*F+(+(M.min.x+M.max.x>qi)^F);for(let U=0;US.triangleSegmentIdx===M.triangleSegmentIdx?S.subtile-M.subtile:S.triangleSegmentIdx-M.triangleSegmentIdx);let h=0,f=0,y=0;for(let S of a){if(S.triangleSegmentIdx!==h)break;y++}let b=a.length;for(;f!==a.length;){h=a[f].triangleSegmentIdx;let S=0,M=f,F=f;for(let z=M;z0&&this.triangleSubSegments.push({segment:Z,min:U,max:j}),M=F;for(let X=M;X[ue[0]*(1-me[0])+pe[0]*me[0],ue[1]*(1-me[1])+pe[1]*me[1]],Z=[],X=[];for(let ue of this.triangleSubSegments){Z[0]=ue.min.x/qi,Z[1]=ue.min.y/qi,X[0]=ue.max.x/qi,X[1]=ue.max.y/qi;let pe=j(z,U,Z),me=j(z,U,X);if(new wo([pe[0],pe[1],y],[me[0],me[1],b]).intersectsPrecise(h)===0){F&&(f.segments.push(F),F=void 0);continue}let Ae=ue.segment;F&&F.vertexOffset!==Ae.vertexOffset&&(f.segments.push(F),F=void 0),F?(F.vertexLength+=Ae.vertexLength,F.primitiveLength+=Ae.primitiveLength):F={vertexOffset:Ae.vertexOffset,primitiveLength:Ae.primitiveLength,vertexLength:Ae.vertexLength,primitiveOffset:Ae.primitiveOffset,sortKey:void 0,vaos:{}}}return F&&f.segments.push(F),f}encodeCentroid(a,c){let h=a.centroid(),f=c.span(),y=Math.min(7,Math.round(f.x*this.tileToMeter/10)),b=Math.min(7,Math.round(f.y*this.tileToMeter/10));return new Pi(st(h.x,1,qi-1)<<3|y,st(h.y,1,qi-1)<<3|b)}encodeBorderCentroid(a){if(!a.borders)return new Pi(0,0);let c=a.borders,h=Number.MAX_VALUE;if(c[0][0]!==h||c[1][0]!==h){let f=c[0][0]!==h?0:1;return new Pi(6|(c[0][0]!==h?0:65528),(c[f][0]+c[f][1])/2<<3|6)}{let f=c[2][0]!==h?2:3;return new Pi((c[f][0]+c[f][1])/2<<3|6,6|(c[2][0]!==h?0:65528))}}showCentroid(a){let c=this.centroidData[a.centroidDataIndex];c.flags&=2147483647,c.centroidXY.x=0,c.centroidXY.y=0,this.writeCentroidToBuffer(c)}writeCentroidToBuffer(a){this.groundEffect.updateHiddenByLandmark(a);let c=a.vertexArrayOffset,h=a.vertexCount+a.vertexArrayOffset,f=a.flags&uC?H8:a.centroidXY,y=this.centroidVertexArray.geta_centroid_pos0(c);if(this.centroidVertexArray.geta_centroid_pos1(c)!==f.y||y!==f.x){for(let b=c;bM.max.x||M.min.x>b.max.x||b.min.y>M.max.y||M.min.y>b.max.y))for(let F=0;Fc!=Z>c&&a<(this.footprintVertices.int16[2*(z+b.vertexOffset)+0]-U)*(c-j)/(Z-j)+U&&(f=!f)}S=M}}return f}getHeightAtTileCoord(a,c){let h=Number.NEGATIVE_INFINITY,f=!0,y=4*(a+qi)*qi+(c+qi);if(this.partLookup.hasOwnProperty(y)){let b=this.partLookup[y];return b?{height:b.height,hidden:!!(b.flags&uC)}:void 0}for(let b of this.centroidData)a>b.max.x||b.min.x>a||c>b.max.y||b.min.y>c||b.height<=h||this.footprintContainsPoint(a,c,b)&&(h=b.height,this.partLookup[y]=b,f=!!(b.flags&uC));if(h!==Number.NEGATIVE_INFINITY)return{height:h,hidden:f};this.partLookup[y]=void 0}}function K8(u,a){let c=u.add(a)._unit();return u.x*c.x+u.y*c.y}function BX(u,a,c,h){let f=a.sub(u)._perp()._unit(),y=c.sub(a)._perp()._unit();return W8(u,a,c,K8(f,y),h)}function W8(u,a,c,h,f){let y=Math.sqrt(1-h*h);return Math.min(u.dist(a)/3,a.dist(c)/3,f*y/h)}function V3(u,a,c){return u.xc[1].x&&a.x>c[1].x||u.yc[1].y&&a.y>c[1].y}function Y8(u,a){return u.xa[1].x||u.ya[1].y}function Q8(u,a,c){if(u.x<0||u.x>=qi||a.x<0||a.x>=qi||c.x<0||c.x>=qi)return!1;let h=c.sub(a),f=h.perp(),y=u.sub(a);return(h.x*y.x+h.y*y.y)/Math.sqrt((h.x*h.x+h.y*h.y)*(y.x*y.x+y.y*y.y))>-.866&&f.x*y.x+f.y*y.y<0}function Z8(u,a,c){let h=a?2|u:-3&u;return c?1|h:-2&h}function X8(){let u=Math.PI/32,a=Math.tan(u),c=oe;return c*Math.sqrt(1+2*a*a)-c}function J8(u,a,c){let h=1<{for(let Ct of ot)X.push({polygon:Ct,bounds:pt})},pe=Math.ceil(Math.log2(z)),me=Math.ceil(Math.log2(U)),Ae=pe-me,Me=[];for(let ot=0;ot0?0:1);for(let ot=0;otpt+1?nt.push({polygons:vi,bounds:Ni,depth:pt+1}):ue(vi,Ni)}if(Ii.length){let Ni=[new Pi(Ct===0?Oi:Tt.x,Ct===1?Oi:Tt.y),ai];Me.length>pt+1?nt.push({polygons:Ii,bounds:Ni,depth:pt+1}):ue(Ii,Ni)}}return X})(u,a,Math.ceil((y-f)/11.25),Math.ceil((b-S)/11.25),1,(M,F,z)=>{if(M===0)return .5*(F+z);{let U=Ze((c.y+F/qi)/h);return(et(.5*(Ze((c.y+z/qi)/h)+U))*h-c.y)*qi}})}function VX(u,a,c,h,f,y){let b=Math.pow(2,h.z-f.z);for(let S=0;S=M[b]&&(S=a,M=u),S[b]f&&nH(S,M,b,f),S[b]y&&nH(M,S,b,y)}}function iA(u,a,c,h,f,y){let b=[];for(let S=0;S=h&&X.x>=h||(Z.x>=h?Z=new Pi(h,Z.y+(h-Z.x)/(X.x-Z.x)*(X.y-Z.y))._round():X.x>=h&&(X=new Pi(h,Z.y+(h-Z.x)/(X.x-Z.x)*(X.y-Z.y))._round()),Z.y>=f&&X.y>=f||(Z.y>=f?Z=new Pi(Z.x+(f-Z.y)/(X.y-Z.y)*(X.x-Z.x),f)._round():X.y>=f&&(X=new Pi(Z.x+(f-Z.y)/(X.y-Z.y)*(X.x-Z.x),f)._round()),F&&Z.equals(F[F.length-1])||(F=[Z],b.push(F),y&&y.push({progress:{min:pe+rH(me,Ae,Z)*ue,max:1},parentIndex:S,prevPoint:me,nextPoint:Ae})),F.push(X),y&&(y[y.length-1].progress.max=pe+rH(me,Ae,X)*ue,y[y.length-1].nextPoint=Ae)))))}if(y&&U>0)for(let j=z;jF.t-z.t);let b=0,S=0,M=[];for(h.push(M);b!==u.length;){if(S===y.length){for(;b!==u.length;)M.length!==0&&M[M.length-1].equals(u[b])||M.push(u[b]),b++;break}y[S].t<=b?(M.length!==0&&M[M.length-1].equals(y[S].point)||M.push(y[S].point),Math.trunc(y[S].t),S++):(M.length!==0&&M[M.length-1].equals(u[b])||M.push(u[b]),b++)}}function rH(u,a,c){return u.x!==a.x?(c.x-u.x)/(a.x-u.x):u.y!==a.y?(c.y-u.y)/(a.y-u.y):0}function nA(u,a){return u.x*a.x+u.y*a.y}function sH(u,a){if(u.length===1){let c=0,h=a[c++],f;for(;!f||h.equals(f);)if(f=a[c++],!f)return 1/0;for(;c{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 UX{constructor(){this.tasks={},this.taskQueue=[],So(["process"],this),this.invoker=new zX(this.process),this.nextId=0}add(a,c){let h=this.nextId++,f=(function({type:y,isSymbolTile:b,zoom:S}){return S=S||0,y==="message"?0:y!=="maybePrepare"||b?y!=="parseTile"||b?y==="parseTile"&&b?300-S:y==="maybePrepare"&&b?400-S:500:200-S:100-S})(c);if(f===0){try{a()}finally{}return null}return this.tasks[h]={fn:a,metadata:c,priority:f,id:h},this.taskQueue.push(h),this.invoker.trigger(),{cancel:()=>{delete this.tasks[h]}}}process(){try{if(this.taskQueue=this.taskQueue.filter(h=>!!this.tasks[h]),!this.taskQueue.length)return;let a=this.pick();if(a===null)return;let c=this.tasks[a];if(delete this.tasks[a],this.taskQueue.length&&this.invoker.trigger(),!c)return;c.fn()}finally{}}pick(){let a=null,c=1/0;for(let f=0;f{h&&delete this.callbacks[S],this.target.postMessage({id:S,type:"",targetMapId:f,sourceMapId:this.mapId})}}}receive(a){let c=a.data;if(!c)return;let h=c.id;if(h&&(!c.targetMapId||this.mapId===c.targetMapId))if(c.type===""){let f=this.cancelCallbacks[h];delete this.cancelCallbacks[h],f&&f.cancel()}else if(c.mustQueue||oa(self)){let f=this.callbacks[h],y=this.scheduler.add(()=>this.processTask(h,c),f&&f.metadata||{type:"message"});y&&(this.cancelCallbacks[h]=y)}else this.processTask(h,c)}processTask(a,c){if(delete this.cancelCallbacks[a],c.type===""){let h=this.callbacks[a];delete this.callbacks[a],h&&(c.error?h(L0(c.error)):h(null,L0(c.data)))}else{let h=new Set,f=c.hasCallback?(b,S)=>{this.target.postMessage({id:a,type:"",sourceMapId:this.mapId,error:b?Cm(b):null,data:Cm(S,h)},h)}:()=>{},y=L0(c.data);if(this.parent[c.type])this.parent[c.type](c.sourceMapId,y,f);else if(this.parent.getWorkerSource){let b=c.type.split("."),{source:S,scope:M}=y;this.parent.getWorkerSource(c.sourceMapId,b[0],S,M)[b[1]](y,f)}else f(new Error(`Could not find function ${c.type}`))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}}var tp={workerUrl:"",workerClass:null,workerParams:void 0};let oA="mapboxgl_preloaded_worker_pool",lO=(()=>{class u{constructor(){this.active={}}acquire(c,h=u.workerCount){if(!this.workers)for(this.workers=[];this.workers.length{h.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[oA]}numActive(){return Object.keys(this.active).length}}return u.workerCount=2,u})();class kT{constructor(a,c,h="Worker",f=lO.workerCount){this.workerPool=a,this.actors=[],this.currentActor=0,this.id=Ti();let y=this.workerPool.acquire(this.id,f);for(let b=0;b{this.ready=!0})}broadcast(a,c,h){Wt(this.actors,(f,y)=>{f.send(a,c,y)},h=h||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(a=>{a.remove()}),this.actors=[],this.workerPool.release(this.id)}}let rA,z3;function MT(){return rA||(rA=new lO),rA}kT.Actor=aH;class HX{constructor(a){this.module=a}createIntArray(a){let c=new Int32Array(a),h=this.module.malloc(c.length*c.BYTES_PER_ELEMENT);return this.module.heap32.set(c,h/c.BYTES_PER_ELEMENT),h}createFloatArray(a){let c=new Float32Array(a),h=this.module.malloc(c.length*c.BYTES_PER_ELEMENT);return this.module.heapF32.set(c,h/c.BYTES_PER_ELEMENT),h}createStringBuffer(a){let c=this.module.malloc(a.length+1);for(let h=0;hf.arrayBuffer()).then(f=>{a.buffers[c]=f})}function hH(u,a){let c=u.json.bufferViews[a];return new Uint8Array(u.buffers[c.buffer],c.byteOffset||0,c.byteLength)}function WX(u,a,c,h){if(u.uri){let f=pH(u.uri,h);return fetch(f).then(y=>y.blob()).then(y=>createImageBitmap(y)).then(y=>{a.images[c]=y})}if(u.bufferView!==void 0){let f=hH(a,u.bufferView),y=new Blob([f],{type:u.mimeType});return createImageBitmap(y).then(b=>{a.images[c]=b})}}function mH(u,a=0,c){let h={json:null,images:[],buffers:[]};if(new Uint32Array(u,a,1)[0]===dH){let z=new Uint32Array(u,a),U=2,j=(z[U++]>>2)-3,Z=z[U++]>>2;if(U++,h.json=JSON.parse(uH.decode(z.subarray(U,U+Z))),U+=Z,U{let z=[],U=S&&S.includes(j3),j=S&&S.includes(hO);if(U&&z.push((function(){if(!G_)return O1??(O1=(function(Z){let X,ue=null;function pe(){X=new Uint8Array(ue.buffer)}function me(){throw new Error("Unexpected Draco error.")}let Ae={a:{a:me,d:function(Me,Be,nt){return X.copyWithin(Me,Be,Be+nt)},c:function(Me){let Be=X.length,nt=Math.max(Me>>>0,Math.ceil(1.2*Be)),ot=Math.ceil((nt-Be)/65536);try{return ue.grow(ot),pe(),!0}catch{return!1}},b:me}};return(WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(Z,Ae):Z.then(Me=>Me.arrayBuffer()).then(Me=>WebAssembly.instantiate(Me,Ae))).then(Me=>{let{Rb:Be,Qb:nt,P:ot,T:pt,X:Ct,Ja:Tt,La:ai,Qa:Mt,Va:gi,Wa:Oi,eb:vi,jb:Ii,f:Ni,e:oi,yb:Ei,zb:Kt,Ab:Ht,Bb:zi,Db:Li,Gb:Qn}=Me.instance.exports;ue=oi;let bn=(()=>{let Fn=0,Ki=0,Yn=0,Po=0;return on=>{Yn&&(Be(Po),Be(Fn),Ki+=Yn,Yn=Fn=0),Fn||(Ki+=128,Fn=nt(Ki));let Hn=on.length+7&-8,To=Fn;Hn>=Ki&&(Yn=Hn,To=Po=nt(Hn));for(let qo=0;qo{G_=Z,O1=void 0}))})()),j&&z.push((function(){if(H3)return;let Z=(function(X){let ue,pe=WebAssembly.instantiateStreaming(X,{}).then(Me=>{ue=Me.instance,ue.exports.__wasm_call_ctors()}),me={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},Ae={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:pe,supported:!0,decodeGltfBuffer(Me,Be,nt,ot,pt,Ct){(function(Tt,ai,Mt,gi,Oi,vi,Ii){let Ni=Tt.exports.sbrk,oi=gi+3&-4,Ei=Ni(oi*Oi),Kt=Ni(vi.length),Ht=new Uint8Array(Tt.exports.memory.buffer);Ht.set(vi,Kt);let zi=ai(Ei,gi,Oi,Kt,vi.length);if(zi===0&&Ii&&Ii(Ei,oi,Oi),Mt.set(Ht.subarray(Ei,Ei+gi*Oi)),Ni(Ei-Ni(0)),zi!==0)throw new Error(`Malformed buffer data: ${zi}`)})(ue,ue.exports[Ae[pt]],Me,Be,nt,ot,ue.exports[me[Ct]])}}})(fetch(uO()));return Z.ready.then(()=>{H3=Z})})()),y)for(let Z=0;Z{if(U&&b)for(let{primitives:Z}of b)for(let X of Z)$X(X,h);if(j&&b&&M)for(let Z of M)qX(Z,h);return h})})}function G3(u){switch(u){case WebGL2RenderingContext.RGBA8:return WebGL2RenderingContext.RGBA;case WebGL2RenderingContext.DEPTH_COMPONENT16:return WebGL2RenderingContext.DEPTH_COMPONENT;case WebGL2RenderingContext.DEPTH24_STENCIL8:return WebGL2RenderingContext.DEPTH_STENCIL;case WebGL2RenderingContext.R8:case WebGL2RenderingContext.R32F:return WebGL2RenderingContext.RED}}function $3(u){switch(u){case WebGL2RenderingContext.RGBA8:return WebGL2RenderingContext.UNSIGNED_BYTE;case WebGL2RenderingContext.DEPTH_COMPONENT16:return WebGL2RenderingContext.UNSIGNED_SHORT;case WebGL2RenderingContext.DEPTH24_STENCIL8:return WebGL2RenderingContext.UNSIGNED_INT_24_8;case WebGL2RenderingContext.R8:return WebGL2RenderingContext.UNSIGNED_BYTE;case WebGL2RenderingContext.R32F:return WebGL2RenderingContext.FLOAT}}class q3{constructor(a,c,h,f){this.context=a,this.format=h,this.useMipmap=f&&f.useMipmap,this.texture=a.gl.createTexture(),this.update(c,{premultiply:f&&f.premultiply})}update(a,c){let h=a&&a instanceof HTMLVideoElement&&a.width===0?a.videoWidth:a.width,f=a&&a instanceof HTMLVideoElement&&a.height===0?a.videoHeight:a.height,{context:y}=this,{gl:b}=y,{x:S,y:M}=c&&c.position?c.position:{x:0,y:0},F=S+h,z=M+f;!this.size||this.size[0]===F&&this.size[1]===z||(b.bindTexture(b.TEXTURE_2D,null),b.deleteTexture(this.texture),this.texture=b.createTexture(),this.size=null),b.bindTexture(b.TEXTURE_2D,this.texture),y.pixelStoreUnpackFlipY.set(!1),y.pixelStoreUnpack.set(1),y.pixelStoreUnpackPremultiplyAlpha.set(this.format===b.RGBA8&&(!c||c.premultiply!==!1));let U=a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement||a instanceof ImageData||ImageBitmap&&a instanceof ImageBitmap;if(!this.size&&F>0&&z>0){let j=this.useMipmap?Math.floor(Math.log2(Math.max(F,z)))+1:1;b.texStorage2D(b.TEXTURE_2D,j,this.format,F,z),this.size=[F,z]}this.size&&(U?b.texSubImage2D(b.TEXTURE_2D,0,S,M,G3(this.format),$3(this.format),a):"data"in a&&a.data&&b.texSubImage2D(b.TEXTURE_2D,0,S,M,h,f,G3(this.format),$3(this.format),a.data)),this.useMipmap&&b.generateMipmap(b.TEXTURE_2D)}bind(a,c,h=!1){let{context:f}=this,{gl:y}=f;y.bindTexture(y.TEXTURE_2D,this.texture),a!==this.minFilter&&(y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,a),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,this.useMipmap&&!h?a===y.NEAREST?y.NEAREST_MIPMAP_NEAREST:y.LINEAR_MIPMAP_LINEAR:a),this.minFilter=a),c!==this.wrapS&&(y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_S,c),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_T,c),this.wrapS=c)}bindExtraParam(a,c,h,f,y){let{context:b}=this,{gl:S}=b;S.bindTexture(S.TEXTURE_2D,this.texture),c!==this.magFilter&&(S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,c),this.magFilter=c),a!==this.minFilter&&(S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,this.useMipmap?a===S.NEAREST?S.NEAREST_MIPMAP_NEAREST:S.LINEAR_MIPMAP_LINEAR:a),this.minFilter=a),h!==this.wrapS&&(S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,h),this.wrapS=h),f!==this.wrapT&&(S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,f),this.wrapT=f),y!==this.compareMode&&(y?(S.texParameteri(S.TEXTURE_2D,S.TEXTURE_COMPARE_MODE,S.COMPARE_REF_TO_TEXTURE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_COMPARE_FUNC,y)):S.texParameteri(S.TEXTURE_2D,S.TEXTURE_COMPARE_MODE,S.NONE),this.compareMode=y)}destroy(){let{gl:a}=this.context;a.deleteTexture(this.texture),this.texture=null}}class aA{constructor(a,c){this.context=a,this.texture=c}bind(a,c){let{context:h}=this,{gl:f}=h;f.bindTexture(f.TEXTURE_2D,this.texture),a!==this.minFilter&&(f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,a),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,a),this.minFilter=a),c!==this.wrapS&&(f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,c),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,c),this.wrapS=c)}}let YX=Mr([{name:"a_pos_3f",components:3,type:"Float32"}]),I=Mr([{name:"a_color_3f",components:3,type:"Float32"}]),L=Mr([{name:"a_color_4f",components:4,type:"Float32"}]),Y=Mr([{name:"a_uv_2f",components:2,type:"Float32"}]),ye=Mr([{name:"a_normal_3f",components:3,type:"Float32"}]),ze=Mr([{name:"a_normal_matrix0",components:4,type:"Float32"},{name:"a_normal_matrix1",components:4,type:"Float32"},{name:"a_normal_matrix2",components:4,type:"Float32"},{name:"a_normal_matrix3",components:4,type:"Float32"}]),ut=Mr([{name:"a_pbr",components:4,type:"Uint16"},{name:"a_heightBasedEmissiveStrength",components:3,type:"Float32"}]);function Vt(u,a){let c=wi(u.projection,u.zoom,u.width,u.height),h=(function(y,b,S,M,F){let z=new de(S.lng-180*xn,S.lat),U=new de(S.lng+180*xn,S.lat),j=y.project(z.lng,z.lat),Z=y.project(U.lng,U.lat),X=-Math.atan2(Z.y-j.y,Z.x-j.x),ue=Yt.fromLngLat(S);ue.y=st(ue.y,-1+xn,1-xn);let pe=ue.toLngLat(),me=y.project(pe.lng,pe.lat),Ae=Yt.fromLngLat(pe);Ae.x+=xn;let Me=Ae.toLngLat(),Be=y.project(Me.lng,Me.lat),nt=Wn(Be.x-me.x,Be.y-me.y,X),ot=Yt.fromLngLat(pe);ot.y+=xn;let pt=ot.toLngLat(),Ct=y.project(pt.lng,pt.lat),Tt=Wn(Ct.x-me.x,Ct.y-me.y,X),ai=Math.abs(nt.x)/Math.abs(Tt.y),Mt=V([]);Fe(Mt,Mt,-X*(1-(F?0:M)));let gi=V([]);return te(gi,gi,[1,1-(1-ai)*M,1]),gi[4]=-Tt.x/Tt.y*M,Fe(gi,gi,X),q(gi,Mt,gi),gi})(u.projection,0,u.center,c,a),f=ni(u);return te(h,h,[f,f,1]),h}function ni(u){let a=u.projection,c=wi(u.projection,u.zoom,u.width,u.height),h=kn(a,u.center),f=kn(a,de.convert(a.center));return Math.pow(2,h*c+(1-c)*f)}function wi(u,a,c,h,f=1/0){let y=u.range;if(!y)return 0;let b=Math.min(f,Math.max(c,h)),S=Math.log2(b/1024);return qt(y[0]+S,y[1]+S,a)}let xn=1/4e4;function kn(u,a){let c=st(a.lat,-Je,Je),h=new de(a.lng-180*xn,c),f=new de(a.lng+180*xn,c),y=u.project(h.lng,c),b=u.project(f.lng,c),S=Yt.fromLngLat(h),M=Yt.fromLngLat(f),F=b.x-y.x,z=b.y-y.y,U=M.x-S.x,j=M.y-S.y,Z=Math.sqrt((U*U+j*j)/(F*F+z*z));return Math.log2(Z)}function Wn(u,a,c){let h=Math.cos(c),f=Math.sin(c);return{x:u*h-a*f,y:u*f+a*h}}function Uo(u,a,c){V(u),Fe(u,u,At(a[2])),fe(u,u,At(a[0])),xe(u,u,At(a[1])),te(u,u,c),q(u,u,[1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1])}function Sr(u,a,c,h,f,y,b,S){let M=[c[0]-a[0],c[1]-a[1],0],F=[h[0]-a[0],h[1]-a[1],0];if(Et(M)<1e-12||Et(F)<1e-12)return Un(u);let z=Cn([],M,F);vn(z,z),ei(F,h,a),M[2]=(y-f)*S,F[2]=(b-f)*S;let U=M;return Cn(U,M,F),vn(U,U),vu(u,z,U)}function is(u,a,c=!1){let h=ov(a.zoom),f=(function(y,b,S){let M=b.worldSize,F=[y[12],y[13],y[14]],z=Ze(F[1]/M),U=it(F[0]/M),j=V([]),Z=Qe(1,z)*M,X=Qe(1,0)*M*St(z,b.zoom),ue=1/_3(M),pe=X*ue;if(S){let Be=wi(b.projection,b.zoom,b.width,b.height,1024);pe=ue*b.projection.pixelSpaceConversion(b.center.lat,M,Be)}let me=K(z,U);Xi(me,me,wt([],vn([],me),Z*pe*F[2]));let Ae=(function(Be){let nt=[Be[0],Be[1],Be[2]],ot=[0,1,0],pt=Cn([],ot,nt);return Cn(ot,nt,pt),fn(ot)===0&&(ot=[0,1,0],Cn(pt,nt,ot)),vn(pt,pt),vn(ot,ot),vn(nt,nt),[pt[0],pt[1],pt[2],0,ot[0],ot[1],ot[2],0,nt[0],nt[1],nt[2],0,Be[0],Be[1],Be[2],1]})(me);te(j,j,[pe,pe,pe*Z]),W(j,j,[-F[0],-F[1],-F[2]]);let Me=q([],b.globeMatrix,Ae);return q(Me,Me,j),q(Me,Me,y),Me})(u,a,c);if(h>0){let y=(function(b,S){let M=S.worldSize,F=Qe(1,0)*M*St(S.center.lat,S.zoom)/_3(M),z=Qe(1,S.center.lat)*M,U=V([]);xe(U,U,At(S.center.lng)),fe(U,U,At(S.center.lat)),W(U,U,[0,0,g]),te(U,U,[F,F,F*z]);let j=S.point;return W(U,U,[-j.x,-j.y,0]),q(U,U,b),q(U,S.globeMatrix,U)})(u,a);return(function(b,S,M){let F=(X,ue,pe)=>{let me=Et(X),Ae=Et(ue),Me=j_(X,ue,pe);return wt(Me,Me,1/Et(Me)*eo(me,Ae,pe))},z=F([b[0],b[1],b[2]],[S[0],S[1],S[2]],M),U=F([b[4],b[5],b[6]],[S[4],S[5],S[6]],M),j=F([b[8],b[9],b[10]],[S[8],S[9],S[10]],M),Z=j_([b[12],b[13],b[14]],[S[12],S[13],S[14]],M);return[z[0],z[1],z[2],0,U[0],U[1],U[2],0,j[0],j[1],j[2],0,Z[0],Z[1],Z[2],1]})(f,y,h)}return f}function ha(u,a,c,h){let f=wo.projectAabbCorners(h,c),y=Number.MAX_VALUE,b=-1;for(let F=0;Fnew Pi(f[F][0],f[F][1]),M;switch(b){case 0:case 6:M=[S(1),S(5),S(4),S(7),S(3),S(2),S(1)];break;case 1:case 7:M=[S(0),S(4),S(5),S(6),S(2),S(3),S(0)];break;case 3:case 5:M=[S(1),S(0),S(4),S(7),S(6),S(2),S(1)];break;default:M=[S(1),S(5),S(6),S(7),S(3),S(0),S(1)]}if(zh(u,M))return y}let Gr=64,aa={CoordinateSpaceTile:1,HasMapboxMeshFeatures:4,HasMeshoptCompression:8};function Za(u,a,c,h,f,y,b,S,M,F=!1){let z=c.zoom,U=c.project(h),j=St(h.lat,z),Z=1/j;V(u),W(u,u,[U.x+b[0]*Z,U.y+b[1]*Z,b[2]]);let X=1,ue=1,pe=c.worldSize;if(F){if(c.projection.name==="mercator"){let Be=0;c.elevation&&(Be=c.elevation.getAtPointOrZero(new Yt(U.x/pe,U.y/pe),0));let nt=sn([],[U.x,U.y,Be,1],c.projMatrix)[3]/c.cameraToCenterDistance;X=nt,ue=nt*St(c.center.lat,z)}else if(c.projection.name==="globe"){let Be=is(u,c),nt=[0,0,0,1];sn(nt,nt,q([],c.projMatrix,Be));let ot=nt[3]/c.cameraToCenterDistance,pt=ov(z),Ct=c.projection.pixelsPerMeter(h.lat,pe)*St(h.lat,z),Tt=c.projection.pixelsPerMeter(c.center.lat,pe)*St(c.center.lat,z);X=ot/eo(Ct,Bt(c.center.lat),pt),ue=ot*j/Ct,X*=Tt,ue*=Tt}}else X=Z;te(u,u,[X,X,ue]);let me=[...u],Ae=a.orientation,Me=[];if(Uo(Me,[Ae[0]+f[0],Ae[1]+f[1],Ae[2]+f[2]],y),q(u,me,Me),S&&c.elevation){let Be=0,nt=[];if(M&&c.elevation){Be=(function(pt,Ct,Tt,ai,Mt){let gi=Ct.elevation;if(!gi)return 0;let Oi=wo.projectAabbCorners(Tt,ai),vi=Qe(1,Mt.lat)*Ct.worldSize,Ii=(function(Ki,Yn){let Po=[0,0,1],on=[{corners:[0,1,3,2],dotProductWithUp:0},{corners:[1,5,2,6],dotProductWithUp:0},{corners:[0,4,1,5],dotProductWithUp:0},{corners:[2,6,3,7],dotProductWithUp:0},{corners:[4,7,5,6],dotProductWithUp:0},{corners:[0,3,4,7],dotProductWithUp:0}];for(let Hn of on){let To=Ki[Hn.corners[0]],qo=Ki[Hn.corners[1]],gr=Ki[Hn.corners[2]],ir=[qo[0]-To[0],qo[1]-To[1],Yn*(qo[2]-To[2])],An=Cn(ir,ir,[gr[0]-To[0],gr[1]-To[1],Yn*(gr[2]-To[2])]);vn(An,An),Hn.dotProductWithUp=Fo(An,Po)}return on.sort((Hn,To)=>Hn.dotProductWithUp-To.dotProductWithUp),on[0].corners})(Oi,vi),Ni=Oi[Ii[0]],oi=Oi[Ii[1]],Ei=Oi[Ii[2]],Kt=Oi[Ii[3]],Ht=gi.getAtPointOrZero(new Yt(Ni[0]/Ct.worldSize,Ni[1]/Ct.worldSize),0),zi=gi.getAtPointOrZero(new Yt(oi[0]/Ct.worldSize,oi[1]/Ct.worldSize),0),Li=gi.getAtPointOrZero(new Yt(Ei[0]/Ct.worldSize,Ei[1]/Ct.worldSize),0),Qn=gi.getAtPointOrZero(new Yt(Kt[0]/Ct.worldSize,Kt[1]/Ct.worldSize),0),bn=(Ht+Qn)/2,Fn=(zi+Li)/2;return bn>Fn?zi=a.gl.NEAREST_MIPMAP_NEAREST}),u.uploaded=!0,u.image=null)}function $h(u,a,c){u.indexBuffer=a.createIndexBuffer(u.indexArray,!1,!0),u.vertexBuffer=a.createVertexBuffer(u.vertexArray,YX.members,!1,!0),u.normalArray&&(u.normalBuffer=a.createVertexBuffer(u.normalArray,ye.members,!1,!0)),u.texcoordArray&&(u.texcoordBuffer=a.createVertexBuffer(u.texcoordArray,Y.members,!1,!0)),u.colorArray&&(u.colorBuffer=a.createVertexBuffer(u.colorArray,(u.colorArray.bytesPerElement===12?I:L).members,!1,!0)),u.featureArray&&(u.pbrBuffer=a.createVertexBuffer(u.featureArray,ut.members,!0)),u.segments=Ya.simpleSegment(0,0,u.vertexArray.length,u.indexArray.length);let h=u.material;h.pbrMetallicRoughness.baseColorTexture&&Ep(h.pbrMetallicRoughness.baseColorTexture,a),h.pbrMetallicRoughness.metallicRoughnessTexture&&Ep(h.pbrMetallicRoughness.metallicRoughnessTexture,a),h.normalTexture&&Ep(h.normalTexture,a),h.occlusionTexture&&Ep(h.occlusionTexture,a,c),h.emissionTexture&&Ep(h.emissionTexture,a)}function qh(u,a,c){if(u.meshes)for(let h of u.meshes)$h(h,a,c);if(u.children)for(let h of u.children)qh(h,a,c)}function Jc(u){if(u.meshes)for(let a of u.meshes)a.indexArray.destroy(),a.vertexArray.destroy(),a.colorArray&&a.colorArray.destroy(),a.normalArray&&a.normalArray.destroy(),a.texcoordArray&&a.texcoordArray.destroy(),a.featureArray&&a.featureArray.destroy();if(u.children)for(let a of u.children)Jc(a)}function Nf(u){if(u.meshes)for(let c of u.meshes)c.vertexBuffer&&(c.vertexBuffer.destroy(),c.indexBuffer.destroy(),c.normalBuffer&&c.normalBuffer.destroy(),c.texcoordBuffer&&c.texcoordBuffer.destroy(),c.colorBuffer&&c.colorBuffer.destroy(),c.pbrBuffer&&c.pbrBuffer.destroy(),c.segments.destroy(),c.material&&((a=c.material).pbrMetallicRoughness.baseColorTexture&&a.pbrMetallicRoughness.baseColorTexture.gfxTexture&&a.pbrMetallicRoughness.baseColorTexture.gfxTexture.destroy(),a.pbrMetallicRoughness.metallicRoughnessTexture&&a.pbrMetallicRoughness.metallicRoughnessTexture.gfxTexture&&a.pbrMetallicRoughness.metallicRoughnessTexture.gfxTexture.destroy(),a.normalTexture&&a.normalTexture.gfxTexture&&a.normalTexture.gfxTexture.destroy(),a.emissionTexture&&a.emissionTexture.gfxTexture&&a.emissionTexture.gfxTexture.destroy(),a.occlusionTexture&&a.occlusionTexture.gfxTexture&&a.occlusionTexture.gfxTexture.destroy()));var a;if(u.children)for(let c of u.children)Nf(c)}function Kh(u,a){let c=u.json.bufferViews[a.bufferView],h=pO[a.componentType];return new h(u.buffers[c.buffer],(a.byteOffset||0)+(c.byteOffset||0),a.count*(c.byteStride&&c.byteStride!==sA[a.type]*h.BYTES_PER_ELEMENT?c.byteStride/h.BYTES_PER_ELEMENT:sA[a.type]))}function mO(u,a,c,h){let f=pO[a.componentType],y=(function(z){switch(z){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:return 1}})(f),b=u.json.bufferViews[a.bufferView],S=b.byteStride?b.byteStride/f.BYTES_PER_ELEMENT:sA[a.type],M=c.float32,F=M.length/c.capacity;for(let z=0,U=0;z0){for(let pe=0;pe0){y.texcoordArray=new tv;let j=a.json.accessors[f.TEXCOORD_0];y.texcoordArray.resize(j.count);let Z=Kh(a,j);mO(a,j,y.texcoordArray,Z)}if(f._FEATURE_ID_RGBA4444!==void 0){let j=a.json.accessors[f._FEATURE_ID_RGBA4444];a.json.extensionsUsed&&a.json.extensionsUsed.includes("EXT_meshopt_compression")&&(y.featureData=Kh(a,j))}f._FEATURE_RGBA4444!==void 0&&(y.featureData=new Uint32Array(Kh(a,a.json.accessors[f._FEATURE_RGBA4444]).buffer));let U=u.material;return y.material=(function(j,Z){let{emissiveFactor:X=[0,0,0],alphaMode:ue="OPAQUE",alphaCutoff:pe=.5,normalTexture:me,occlusionTexture:Ae,emissiveTexture:Me,doubleSided:Be}=j,{baseColorFactor:nt=[1,1,1,1],metallicFactor:ot=1,roughnessFactor:pt=1,baseColorTexture:Ct,metallicRoughnessTexture:Tt}=j.pbrMetallicRoughness||{},ai=Ae?Z[Ae.index]:void 0;if(Ae&&Ae.extensions&&Ae.extensions.KHR_texture_transform&&ai){let Mt=Ae.extensions.KHR_texture_transform;ai.offsetScale=[Mt.offset[0],Mt.offset[1],Mt.scale[0],Mt.scale[1]]}return{pbrMetallicRoughness:{baseColorFactor:new Ts(...nt),metallicFactor:ot,roughnessFactor:pt,baseColorTexture:Ct?Z[Ct.index]:void 0,metallicRoughnessTexture:Tt?Z[Tt.index]:void 0},doubleSided:Be,emissiveFactor:new Ts(...X),alphaMode:ue,alphaCutoff:pe,normalTexture:me?Z[me.index]:void 0,occlusionTexture:ai,emissionTexture:Me?Z[Me.index]:void 0,defined:j.defined===void 0}})(U!==void 0?a.json.materials[U]:{defined:!1},c),y}function Ige(u,a,c){let{matrix:h,rotation:f,translation:y,scale:b,mesh:S,extras:M,children:F}=u,z={};if(z.matrix=h||(function(U,j,Z,X){var ue=j[0],pe=j[1],me=j[2],Ae=j[3],Me=ue+ue,Be=pe+pe,nt=me+me,ot=ue*Me,pt=ue*Be,Ct=ue*nt,Tt=pe*Be,ai=pe*nt,Mt=me*nt,gi=Ae*Me,Oi=Ae*Be,vi=Ae*nt,Ii=X[0],Ni=X[1],oi=X[2];return U[0]=(1-(Tt+Mt))*Ii,U[1]=(pt+vi)*Ii,U[2]=(Ct-Oi)*Ii,U[3]=0,U[4]=(pt-vi)*Ni,U[5]=(1-(ot+Mt))*Ni,U[6]=(ai+gi)*Ni,U[7]=0,U[8]=(Ct+Oi)*oi,U[9]=(ai-gi)*oi,U[10]=(1-(ot+Tt))*oi,U[11]=0,U[12]=Z[0],U[13]=Z[1],U[14]=Z[2],U[15]=1,U})([],f||[0,0,0,1],y||[0,0,0],b||[1,1,1]),S!==void 0){z.meshes=c[S];let U=z.anchor=[0,0];for(let j of z.meshes){let{min:Z,max:X}=j.aabb;U[0]+=Z[0]+X[0],U[1]+=Z[1]+X[1]}U[0]=Math.floor(U[0]/z.meshes.length/2),U[1]=Math.floor(U[1]/z.meshes.length/2)}if(M&&(M.id&&(z.id=M.id),M.lights&&(z.lights=(function(U){if(!U.length)return[];let j=(function(me){let Ae=atob(me),Me=new Uint8Array(Ae.length);for(let Be=0;Be1&&h[h.length-1].equals(h[0])&&h.pop();let f=0;for(let b=0;b0&&h.reverse();let y=TT(h.flatMap(b=>[b.x,b.y]),[]);return y.length===0?null:{vertices:h,indices:y}}function $ze(u,a){let c=[],h=[],f=0,y=[];for(let b of u){f=c.length;let S=b.vertexArray.float32,M=b.indexArray.uint16;for(let F=0;F0&&([h[b+1],h[b+2]]=[h[b+2],h[b+1]])}return{vertices:c,indices:h}}function Ege(u){let a=(function(M,F){let z=[],U=WebGL2RenderingContext;if(M.json.textures)for(let j of M.json.textures){let Z={magFilter:U.LINEAR,minFilter:U.NEAREST,wrapS:U.REPEAT,wrapT:U.REPEAT};j.sampler!==void 0&&Object.assign(Z,M.json.samplers[j.sampler]),z.push({image:F[j.source],sampler:Z,uploaded:!1})}return z})(u,u.images),c=(function(M,F){let z=[];for(let U of M.json.meshes){let j=[];for(let Z of U.primitives)j.push(Hze(Z,M,F));z.push(j)}return z})(u,a),{scenes:h,scene:f,nodes:y}=u.json,b=h?h[f||0].nodes:[...y.keys()],S=[];for(let M of b)S.push(Ige(y[M],u,c));return(function(M,F,z){let U={},j=new Set;for(let Z=0;Z0){let Z=Array.from(j.values()).sort((X,ue)=>X-ue);for(let X=Z.length-1;X>=0;X--)M.splice(Z[X],1)}})(S,b,u.json.nodes),S}function qze(u){u.heightmap=new Float32Array(4096),u.heightmap.fill(-1);let a=u.vertexArray.float32,c=u.aabb.min[0]-1,h=u.aabb.min[1]-1,f=Gr/(u.aabb.max[0]-c+2),y=Gr/(u.aabb.max[1]-h+2);for(let b=0;bu.heightmap[F*Gr+M]&&(u.heightmap[F*Gr+M]=S)}}function Dge(u,a,c,h,f){c.reserve(c.length+4*u.length),h.reserve(h.length+10*u.length),f.reserve(f.length+10*u.length);let y=h.length;for(let b of u){let S=Math.min(10,Math.max(4,1.3*b.height))*a,M=[-b.normal[1],b.normal[0],0],F=Math.min(.29,.1*b.width/b.depth),z=b.width-2*b.depth*a*(F+.01),U=Lt([],b.pos,M,z/2),j=Lt([],b.pos,M,-z/2),Z=[U[0],U[1],U[2]+b.height],X=[j[0],j[1],j[2]+b.height],ue=Lt([],b.normal,M,F);wt(ue,ue,S);let pe=Lt([],b.normal,M,-F);wt(pe,pe,S),Xi(ue,U,ue),Xi(pe,j,pe),U[2]+=.1,j[2]+=.1,h.emplaceBack(ue[0],ue[1],ue[2]),h.emplaceBack(pe[0],pe[1],pe[2]),h.emplaceBack(U[0],U[1],U[2]),h.emplaceBack(j[0],j[1],j[2]),h.emplaceBack(Z[0],Z[1],Z[2]),h.emplaceBack(X[0],X[1],X[2]),h.emplaceBack(U[0],U[1],U[2]),h.emplaceBack(j[0],j[1],j[2]),h.emplaceBack(ue[0],ue[1],ue[2]),h.emplaceBack(pe[0],pe[1],pe[2]);let me=z/S/2;f.emplaceBack(-me-F,-1,me,.8),f.emplaceBack(me+F,-1,me,.8),f.emplaceBack(-me,0,me,1.3),f.emplaceBack(me,0,me,1.3),f.emplaceBack(me+F,-.8,me,.7),f.emplaceBack(me+F,-.8,me,.7),f.emplaceBack(0,0,me,1.3),f.emplaceBack(0,0,me,1.3),f.emplaceBack(me+F,-1.2,me,.8),f.emplaceBack(me+F,-1.2,me,.8),c.emplaceBack(6+y,4+y,8+y),c.emplaceBack(7+y,9+y,5+y),c.emplaceBack(0+y,1+y,2+y),c.emplaceBack(1+y,3+y,2+y),y+=10}}function Kze(u,a){let c={};c.indexArray=new Ec,c.vertexArray=new Ip,c.colorArray=new xm,Dge(u,a,c.indexArray,c.vertexArray,c.colorArray);let h={defined:!0};h.emissiveFactor=Ts.black;let f={};return f.baseColorFactor=Ts.white,h.pbrMetallicRoughness=f,c.material=h,c.aabb=new wo([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),c}let Age=Mr([{name:"a_pos_3f",components:3,type:"Float32"}]),Wze=Mr([{name:"a_normal_3",components:3,type:"Int16"}]),Yze=Mr([{name:"a_centroid_3",components:3,type:"Int16"}]),kge=Mr([{name:"a_part_color_emissive",components:2,type:"Uint16"}]),Qze=Mr([{name:"a_faux_facade_color_emissive",components:2,type:"Uint16"}]),Zze=Mr([{name:"a_faux_facade_data",components:4,type:"Uint16"}]),Xze=Mr([{name:"a_faux_facade_vertical_range",components:2,type:"Uint16"}]),Jze=Mr([{name:"a_bloom_attenuation",components:4,type:"Float32"}]),Mge=Mi.types,QX=32767;function e6e(u,a){let c=qi+a;for(let h of u)for(let f of h)if(f.x<-a||f.x>c||f.y<-a||f.y>c)return!1;return!0}class Oge{constructor(){this.layoutVertexArray=new Ip,this.layoutAttenuationArray=new xm,this.layoutColorArray=new gc,this.indexArray=new Ec,this.indexArrayForConflation=new Ec,this.segmentsBucket=new Ya}}class ZX{constructor(){this.layoutVertexArray=new Ip,this.layoutNormalArray=new Zu,this.layoutCentroidArray=new Zu,this.layoutColorArray=new gc,this.layoutFacadePaintArray=null,this.layoutFacadeDataArray=null,this.layoutFacadeVerticalRangeArray=null,this.layoutAOArray=[],this.indexArray=new Ec,this.indexArrayForConflation=new Ec,this.segmentsBucket=new Ya,this.entranceBloom=new Oge}}class Rge{constructor(a){this.colorBufferUploaded=!1,this.maxHeight=0,this.replacementUpdateTime=0,this.activeReplacements=[],this.footprints=[],this.featuresOnBorder=[],this.buildingFeatures=[],this.buildingWithoutFacade=new ZX,this.buildingWithFacade=new ZX,this.indexArrayForConflationUploaded=!1,this.footprintLookup={},this.zoom=a.zoom,this.canonical=a.canonical,this.layers=a.layers,this.layerIds=this.layers.map(c=>c.fqid),this.index=a.index,this.hasPattern=!1,this.worldview=a.worldview,this.lut=a.lut,this.buildingWithFacade.layoutFacadePaintArray=new gc,this.buildingWithFacade.layoutFacadeDataArray=new Of,this.buildingWithFacade.layoutFacadeVerticalRangeArray=new gc,this.programConfigurations=new Tm(a.layers,{zoom:a.zoom,lut:a.lut}),this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.projection=a.projection,this.groundEffect=new B3(a)}updateFootprints(a,c){for(let h of this.footprints)c.push({footprint:h,id:a})}prepare(){return(function(){if(cO!=null||lH!=null)return null;if(RT!=null)return RT;let a=fetch(ou.BUILDING_GEN_URL);return RT=(function(c){let h,f,y,b;function S(){h=new Uint8Array(b.buffer),f=new Int32Array(b.buffer),y=new Float32Array(b.buffer)}function M(){throw new Error("Unexpected BuildingGen error.")}let F=()=>{},z={a:{a:M,f:function(U){let j=h.length,Z=Math.max(U>>>0,Math.ceil(1.2*j)),X=Math.ceil((Z-j)/65536);try{return b.grow(X),S(),!0}catch{return!1}},g:M,b:F,c:F,d:F,e:F}};return(WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(c,z):c.then(U=>U.arrayBuffer()).then(U=>WebAssembly.instantiate(U,z))).then(U=>{let j=U.instance.exports;return(0,j.g)(),b=j.f,S(),new HX({setStyle:j.h,setAOOptions:j.i,setMetricOptions:j.j,setStructuralOptions:j.k,setFacadeOptions:j.l,setFauxFacadeOptions:j.m,setFacadeClassifierOptions:j.n,addFeature:j.o,addFacade:j.p,generateMesh:j.q,getLastError:j.r,getOuterRingLength:j.s,getMeshCount:j.t,getPositionsPtr:j.u,getPositionsLength:j.v,getNormalsPtr:j.w,getNormalsLength:j.x,getColorsPtr:j.y,getColorsLength:j.z,getAOPtr:j.A,getAOLength:j.B,getUVPtr:j.C,getUVLength:j.D,getFauxFacadePtr:j.E,getFauxFacadeLength:j.F,getIndicesPtr:j.G,getIndicesLength:j.H,getBuildingPart:j.I,getRingCount:j.J,getRingPtr:j.K,getRingLength:j.L,free:j.M,malloc:j.N,heapU8:h,heap32:f,heapF32:y})})})(a).then(c=>(RT=null,cO=c,cO)).catch(c=>{Er("Could not load building-gen"),RT=null,lH=c}),RT})()}populate(a,c,h,f){let y=jX();if(!y)return;let b=Ft(h);this.tileToMeter=b,this.brightness=c.brightness,y.setStyle({convertToMeters:!1,entranceColorRgb:[1,1,1],facadeGlazingColorRgb:[.5607843137254902,.6745098039215687,.7215686274509804],normalScale:[1,-1,b],ridgeHeight:3,roofColorRgb:[.886274516,.784313738,.713725507],tileToMeters:b,tileZoom:16,wallColorRgb:[.988235294,.933333337,.811764717]}),y.setAOOptions(!1,.3),y.setMetricOptions(!1,16),y.setStructuralOptions(!0),y.setFacadeClassifierOptions(3);let S=new Map;for(let{feature:M}of a){if(Mge[M.type]!=="LineString")continue;let F=this.layers[0]._featureFilter.needGeometry,z=Fi(M,F);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom),z,h))continue;let U=F?z.geometry:un(M,h,f),j=[];for(let pe of U)for(let me of pe)j.push({x:me.x,y:me.y});let Z={coordinates:j,crossPerc:M.properties.cross_perc,distanceToRoad:M.properties.distance_to_road,entrances:M.properties.entrances,sourceId:0},X=M.properties.source_id,ue=S.get(X);ue||(ue=[],S.set(X,ue)),ue.push(Z)}this.maxHeight=0;for(let{feature:M,index:F}of a){if(Mge[M.type]==="LineString")continue;let z=this.layers[0]._featureFilter.needGeometry,U=Fi(M,z);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom),U,h))continue;let j=z?U.geometry:un(M,h,f),Z=IT(j,500);if(!e6e(j,163))continue;let X=this.layers[0],ue=X.layout.get("building-base").evaluate(M,{},h),pe=X.layout.get("building-height").evaluate(M,{},h),me=X.layout.get("building-roof-shape").evaluate(M,{},h),Ae=X.paint.get("building-ambient-occlusion-intensity"),Me=X.paint.get("building-ambient-occlusion-ground-radius")/this.tileToMeter;if(me==="flat")continue;let Be=X.layout.get("building-facade").evaluate(M,{},h);y.setFacadeOptions(4,!0),y.setFauxFacadeOptions(Be,!1,1);let nt=M.properties.source_id,ot;ot=S.has(nt)?S.get(nt):[];let pt=0,Ct=0,Tt=0,ai=0,Mt=0,gi=0;if(Be){let An=Math.round(X.layout.get("building-facade-floors").evaluate(M,{},h));if(ue===0){An=Math.max(1,An-(ot.length>0?1:0));let Yr=4;if(pe>100){let Ue=[10,13,15];Yr=Ue[M.id?M.id%Ue.length:0],y.setFacadeOptions(Yr,!0)}Mt=1.6803*Yr/b}else Mt=ue/b;gi=pe/b,Mt=Math.min(Mt,gi),Tt=X.layout.get("building-facade-unit-width").evaluate(M,{},h)/b,ai=(gi-Mt)/An,y.setFauxFacadeOptions(!0,!0,Tt);let Zo=X.layout.get("building-facade-window").evaluate(M,{},h);pt=Zo[0],Ct=Zo[1]}let Oi=[],vi=new Pi(1/0,1/0),Ii=new Pi(-1/0,-1/0),Ni=new Pi(0,0),oi=0;for(let An of Z)if(An.length>0){let Zo=[];for(let Yr of An){let Ue=[];for(let He=Yr.length-1;He>=0;He--){let $t=Yr[He];Ue.push({x:$t.x,y:$t.y}),vi.x=Math.min(vi.x,$t.x),vi.y=Math.min(vi.y,$t.y),Ii.x=Math.max(Ii.x,$t.x),Ii.y=Math.max(Ii.y,$t.y),Ni.x+=$t.x,Ni.y+=$t.y,oi++}Zo.push(Ue)}Oi.push({id:M.id?M.id:0,height:pe,minHeight:ue,sourceId:0,roofType:me,coordinates:Zo})}Ni.x/=oi||1,Ni.y/=oi||1;let Ei=y.generateMesh(Oi,ot);if(typeof Ei=="string"){Er(`Unable to generate building ${M.id}: ${Ei}`);continue}if(Ei.meshes.length===0||Ei.modifiedPolygonRings.length===0)continue;let Kt=0;for(let An of Ei.meshes)Kt+=An.positions.length/3;let Ht=Be?this.buildingWithFacade:this.buildingWithoutFacade,zi=Ht.segmentsBucket.prepareSegment(Kt,Ht.layoutVertexArray,Ht.indexArray),Li=[],Qn=null,bn=0,Fn=-1,Ki=Ht.indexArray.length,Yn=0;for(let An of Ei.meshes){let Zo=Ht.layoutVertexArray.length;if(An.buildingPart==="entrance"){let ri=new Array;for(let ao=0;aoqi||vi.y<0||Ii.y>qi)&&this.featuresOnBorder.push({featureId:M.id,footprintIndex:this.footprints.length});{let An=TT(on,null,2),Zo=new iO(Hn,An,8,256),Yr=M.id;M.properties&&M.properties.hasOwnProperty("building_id")&&(Yr=M.properties.building_id),this.footprints.push({vertices:Hn,indices:An,grid:Zo,min:To,max:qo,buildingId:Yr,hiddenFlags:0,indicesOffset:Ki,indicesLength:Po,bloomIndicesOffset:bn,bloomIndicesLength:Fn,groundEffectVertexOffset:gr,groundEffectVertexLength:ir,hasFauxFacade:Be,segment:zi,height:Yn})}this.programConfigurations.populatePaintArrays(Ht.layoutVertexArray.length,M,F,{},c.availableImages,h,c.brightness),this.groundEffect.addPaintPropertiesData(M,F,{},c.availableImages,h,c.brightness)}this.groundEffect.prepareBorderSegments(),this.evaluate(this.layers[0],{})}update(a,c,h,f,y,b,S){this.programConfigurations.updatePaintArrays(a,c,y,h,f,b,S),this.groundEffect.update(a,c,y,h,f,b,S),this.evaluate(this.layers[0],a),this.colorBufferUploaded=!1}isEmpty(){return this.buildingWithoutFacade.layoutVertexArray.length===0&&this.buildingWithFacade.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload||this.groundEffect.programConfigurations.needsUpload}upload(a){let c=h=>{h.layoutVertexBuffer=a.createVertexBuffer(h.layoutVertexArray,Age.members),h.layoutNormalBuffer=a.createVertexBuffer(h.layoutNormalArray,Wze.members),h.layoutCentroidBuffer=a.createVertexBuffer(h.layoutCentroidArray,Yze.members),h.layoutFacadeDataArray&&h.layoutFacadeDataArray.length&&(h.layoutFacadeDataBuffer=a.createVertexBuffer(h.layoutFacadeDataArray,Zze.members)),h.layoutFacadeVerticalRangeArray&&h.layoutFacadeVerticalRangeArray.length&&(h.layoutFacadeVerticalRangeBuffer=a.createVertexBuffer(h.layoutFacadeVerticalRangeArray,Xze.members)),h.entranceBloom.layoutVertexArray.length&&(h.entranceBloom.layoutVertexBuffer=a.createVertexBuffer(h.entranceBloom.layoutVertexArray,Age.members),h.entranceBloom.layoutAttenuationBuffer=a.createVertexBuffer(h.entranceBloom.layoutAttenuationArray,Jze.members)),this.uploadUpdatedColorBuffer(a),this.uploadUpdatedIndexBuffer(a)};this.uploaded||(c(this.buildingWithoutFacade),c(this.buildingWithFacade),this.groundEffect.upload(a)),this.groundEffect.uploadPaintProperties(a),this.programConfigurations.upload(a),this.uploaded=!0}destroy(){let a=c=>{c.layoutVertexBuffer&&(c.layoutVertexBuffer.destroy(),c.layoutNormalBuffer.destroy(),c.layoutColorBuffer.destroy(),c.segmentsBucket.destroy(),c.indexBuffer&&c.indexBuffer.destroy(),c.entranceBloom.layoutVertexBuffer&&(c.entranceBloom.layoutVertexBuffer.destroy(),c.entranceBloom.layoutColorBuffer.destroy(),c.entranceBloom.layoutAttenuationBuffer.destroy(),c.entranceBloom.indexBuffer.destroy(),c.entranceBloom.segmentsBucket.destroy()))};a(this.buildingWithoutFacade),a(this.buildingWithFacade),this.groundEffect.destroy(),this.programConfigurations.destroy()}updateFootprintHiddenFlags(a,c,h=!0){let f=!1,y=h?c:0,b=0|(h?-1:~c);this.groundEffect.hiddenByLandmarkVertexArray.length===0&&this.groundEffect.hiddenByLandmarkVertexArray.resize(this.groundEffect.vertexArray.length);for(let S of a){let M=this.footprints[S],F=M.hiddenFlags&b|y;M.hiddenFlags!==F&&(M.hiddenFlags=F,f=!0,this.groundEffect.updateHiddenByLandmarkRange(M.groundEffectVertexOffset,M.groundEffectVertexLength,M.hiddenFlags!==0))}return f&&(this.indexArrayForConflationUploaded=!1),f}uploadUpdatedIndexBuffer(a){if(this.groundEffect.uploadHiddenByLandmark(a),this.indexArrayForConflationUploaded)return;let c=f=>{f.indexArray.length!==0&&(f.indexArrayForConflation.resize(f.indexArray.length),f.indexArrayForConflation.uint16.set(f.indexArray.uint16),f.entranceBloom.indexArrayForConflation.resize(f.entranceBloom.indexArray.length),f.entranceBloom.indexArrayForConflation.uint16.set(f.entranceBloom.indexArray.uint16))};c(this.buildingWithoutFacade),c(this.buildingWithFacade);for(let f of this.footprints){let y=f.hasFauxFacade?this.buildingWithFacade:this.buildingWithoutFacade,b=f.indicesOffset+f.indicesLength;if(f.hiddenFlags!==0){for(let M=f.indicesOffset;M{f.indexArray.length!==0&&(f.indexBuffer?f.indexBuffer.updateData(f.indexArrayForConflation):f.indexBuffer=a.createIndexBuffer(f.indexArrayForConflation,!0),f.entranceBloom.indexBuffer?f.entranceBloom.indexBuffer.updateData(f.entranceBloom.indexArrayForConflation):f.entranceBloom.indexBuffer=a.createIndexBuffer(f.entranceBloom.indexArrayForConflation,!0))};h(this.buildingWithoutFacade),h(this.buildingWithFacade),this.indexArrayForConflationUploaded=!0}uploadUpdatedColorBuffer(a){let c=h=>{h.layoutColorBuffer?h.layoutColorBuffer.updateData(h.layoutColorArray):h.layoutColorBuffer=a.createVertexBuffer(h.layoutColorArray,kge.members,!0),h.layoutFacadePaintArray&&(h.layoutFacadePaintBuffer?h.layoutFacadePaintBuffer.updateData(h.layoutFacadePaintArray):h.layoutFacadePaintBuffer=a.createVertexBuffer(h.layoutFacadePaintArray,Qze.members,!0)),h.entranceBloom.layoutColorBuffer?h.entranceBloom.layoutColorBuffer.updateData(h.entranceBloom.layoutColorArray):h.entranceBloom.layoutColorBuffer=a.createVertexBuffer(h.entranceBloom.layoutColorArray,kge.members,!0)};c(this.buildingWithoutFacade),c(this.buildingWithFacade),this.colorBufferUploaded=!0}evaluate(a,c){let h=a.paint.get("building-ambient-occlusion-intensity");for(let f of this.buildingFeatures){let y=c[f.feature.id],b=f.feature;b.properties["building-part"]="roof";let S=a.paint.get("building-color").evaluate(b,y,this.canonical).toPremultipliedRenderColor(this.lut),M=a.paint.get("building-emissive-strength").evaluate(b,y,this.canonical);b.properties["building-part"]="wall";let F=a.paint.get("building-color").evaluate(b,y,this.canonical).toPremultipliedRenderColor(this.lut),z=a.paint.get("building-emissive-strength").evaluate(b,y,this.canonical);b.properties["building-part"]="window";let U=a.paint.get("building-color").evaluate(b,y,this.canonical).toPremultipliedRenderColor(this.lut),j=a.paint.get("building-emissive-strength").evaluate(b,y,this.canonical);b.properties["building-part"]="door";let Z=a.paint.get("building-color").evaluate(b,y,this.canonical).toPremultipliedRenderColor(this.lut),X=a.paint.get("building-emissive-strength").evaluate(b,y,this.canonical),ue=f.hasFauxFacade?this.buildingWithFacade:this.buildingWithoutFacade;for(let me of f.parts){let Ae,Me=S;me.part==="roof"?(Me=S,Ae=M):me.part==="wall"?(Me=F,Ae=z):me.part==="facade_glazing"?(Me=U,Ae=j):me.part==="entrance"&&(Me=Z,Ae=X),Ae=st(Ae,0,1);for(let Be=0;Beb.max.x||M.max.xb.max.y||M.max.yS.max.x||S.min.x>a||c>S.max.y||S.min.y>c||S.height<=h||P3(b,S)&&(h=S.height,this.footprintLookup[y]=S,f=S.hiddenFlags!==0);if(h!==Number.NEGATIVE_INFINITY)return{height:h,hidden:f};this.footprintLookup[y]=void 0}}function t6e(u,a,c,h,f,y){let b=Math.pow(2,h.z-f.z);for(let S=0;S1&&(M=a[++S]);let z=Math.abs(F-M.left),U=Math.abs(F-M.right),j=Math.min(z,U),Z,X=y/h*(f+1);if(M.isDash){let ue=f-Math.abs(X);Z=Math.sqrt(j*j+ue*ue)}else Z=f-Math.sqrt(j*j+X*X);this.image.data[b+F]=Math.max(0,Math.min(255,Z+128))}}}addRegularDash(a,c){for(let M=a.length-1;M>=0;--M){let F=a[M],z=a[M+1];F.zeroLength?a.splice(M,1):z&&z.isDash===F.isDash&&(z.left=F.left,a.splice(M,1))}let h=a[0],f=a[a.length-1];h.isDash===f.isDash&&(h.left=f.left-this.width,f.right=h.right+this.width);let y=this.width*this.nextRow,b=0,S=a[b];for(let M=0;M1&&(S=a[++b]);let F=Math.abs(M-S.left),z=Math.abs(M-S.right),U=Math.min(F,z);this.image.data[y+M]=Math.max(0,Math.min(255,(S.isDash?U:-U)+c+128))}}addDash(a,c){let h=this.getKey(a,c);if(this.positions[h])return this.positions[h];let f=c==="round",y=f?7:0,b=2*y+1;if(this.nextRow+b>this.height)return Er("LineAtlas out of space"),null;a.length===0&&a.push(1);let S=0;for(let z=0;zc.fqid),this.index=a.index,this.projection=a.projection,this.hasPattern=!1,this.hasCrossSlope=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(c=>{this.gradients[c.id]={}}),this.layoutVertexArray=new v1,this.layoutVertexArray2=new Ip,this.patternVertexArray=new Ip,this.indexArray=new Ec,this.programConfigurations=new Tm(a.layers,{zoom:a.zoom,lut:a.lut}),this.segments=new Ya,this.maxLineLength=0,this.zOffsetVertexArray=new Ip,this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.tessellationStep=a.tessellationStep?a.tessellationStep:qi/64,this.worldview=a.worldview}updateFootprints(a,c){}populate(a,c,h,f){this.hasPattern=eO("line",this.layers,this.pixelRatio,c);let y=this.layers[0].layout.get("line-sort-key");this.tileToMeter=Ft(h);let b=this.layers[0].layout.get("line-elevation-reference");if(b==="hd-road-markup")this.elevationType="road";else{let j=this.layers[0].layout.get("line-z-offset"),Z=j.isConstant()&&!j.constantOr(0);this.elevationType=b!=="sea"&&b!=="ground"&&Z?"none":"offset",this.elevationType==="offset"&&b==="none"&&Er(`line-elevation-reference: ground is used for the layer ${this.layerIds[0]} because non-zero line-z-offset value was found.`)}let S=this.layers[0].layout.get("line-cross-slope");this.hasCrossSlope=this.elevationType==="offset"&&S!==void 0;let M=[];for(let{feature:j,id:Z,index:X,sourceLayerIndex:ue}of a){let pe=this.layers[0]._featureFilter.needGeometry,me=Fi(j,pe);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom,{worldview:this.worldview}),me,h))continue;let Ae=y?y.evaluate(me,{},h):void 0,Me={id:Z,properties:j.properties,type:j.type,sourceLayerIndex:ue,index:X,geometry:pe?me.geometry:un(j,h,f),patterns:{},sortKey:Ae};M.push(Me)}y&&M.sort((j,Z)=>j.sortKey-Z.sortKey);let{lineAtlas:F,featureIndex:z}=c,U=this.addConstantDashes(F);for(let j of M){let{geometry:Z,index:X,sourceLayerIndex:ue}=j;if(U&&this.addFeatureDashes(j,F),this.hasPattern){let pe=Dm("line",this.layers,j,this.zoom,this.pixelRatio,c);this.patternFeatures.push(pe)}else this.addFeature(j,Z,X,h,F.positions,c.availableImages,c.brightness,c.elevationFeatures);z.insert(a[X].feature,Z,X,ue,this.index)}}addConstantDashes(a){let c=!1;for(let h of this.layers){let f=h.paint.get("line-dasharray").value,y=h.layout.get("line-cap").value;if(f.kind!=="constant"||y.kind!=="constant")c=!0;else{let b=y.value,S=f.value;if(!S)continue;a.addDash(S,b)}}return c}addFeatureDashes(a,c){let h=this.zoom;for(let f of this.layers){let y=f.paint.get("line-dasharray").value,b=f.layout.get("line-cap").value;if(y.kind==="constant"&&b.kind==="constant")continue;let S,M;if(y.kind==="constant"){if(S=y.value,!S)continue}else S=y.evaluate({zoom:h},a);M=b.kind==="constant"?b.value:b.evaluate({zoom:h},a),c.addDash(S,M),a.patterns[f.id]=[c.getKey(S,M)]}}update(a,c,h,f,y,b,S,M){this.programConfigurations.updatePaintArrays(a,c,y,h,f,b,S,M)}addFeatures(a,c,h,f,y,b){for(let S of this.patternFeatures)this.addFeature(S,S.geometry,S.index,c,h,f,b)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(a){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=a.createVertexBuffer(this.layoutVertexArray2,s6e)),this.patternVertexArray.length!==0&&(this.patternVertexBuffer=a.createVertexBuffer(this.patternVertexArray,l6e)),!this.zOffsetVertexBuffer&&this.zOffsetVertexArray.length>0&&(this.zOffsetVertexBuffer=a.createVertexBuffer(this.zOffsetVertexArray,n6e.members,!0)),this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,o6e),this.indexBuffer=a.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(a),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.zOffsetVertexBuffer&&this.zOffsetVertexBuffer.destroy(),this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(a,c){let h,f;if(c&&c>0?(h=`mapbox_clip_start_${c}`,f=`mapbox_clip_end_${c}`):(h="mapbox_clip_start",f="mapbox_clip_end"),a.properties&&a.properties.hasOwnProperty(h)&&a.properties.hasOwnProperty(f))return{start:+a.properties[h],end:+a.properties[f]}}addFeature(a,c,h,f,y,b,S,M){let F=this.layers[0].layout,z=F.get("line-join").evaluate(a,{}),U=F.get("line-cap").evaluate(a,{}),j=F.get("line-miter-limit"),Z=F.get("line-round-limit");this.lineClips=this.lineFeatureClips(a),this.lineFeature=a;let X=!(!a.properties||!a.properties.hasOwnProperty("mapbox_line_metrics"))&&a.properties.mapbox_line_metrics;this.zOffsetValue=F.get("line-z-offset").value;let ue=this.layers[0].paint.get("line-width").value;if(ue.kind!=="constant"&&ue.isLineProgressConstant===!1&&(this.variableWidthValue=ue),this.elevationType==="road"){let pe=this.layoutVertexArray.length;if(!this.addElevatedRoadFeature(a,c,f,M,z,U,j,Z)){let[me,Ae]=this.clipRuntimeLinesToTile(c,1);for(let Me=0;Me0?nt.parentIndex:null)}this.fillNonElevatedRoadSegment(pe)}}else for(let pe=0;pe0?pe:null);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,a,h,y,b,f,S,void 0,this.worldview)}computeSegNextDir(a,c){return a.nextPoint.sub(c.at(-2)).unit()}computeSegPrevDir(a,c){return c[1].sub(a.prevPoint).unit()}clipLinesToTile(a,c){return iA(a,-c,-c,qi+c,qi+c)}clipRuntimeLinesToTile(a,c){let h=[];return[iA(a,-c,-c,qi+c,qi+c,h),h]}addElevatedRoadFeature(a,c,h,f,y,b,S,M){let F=[],z=Va.getElevationFeature(a,f);if(z){let U=this.clipLinesToTile(c,1),j=this.prepareElevatedLines(U,z,h);for(let Z of j)F.push({geometry:Z,elevation:z,elevationTileID:h,segment:{progress:{min:0,max:1},nextDir:void 0,prevDir:void 0}})}if(F.length===0)return!1;for(let U of F){let j=this.layoutVertexArray.length;this.addLine(U.geometry,a,h,y,b,S,M);let Z=new lc(h,U.elevationTileID);if(U.elevation)for(let X=j;X>1,this.layoutVertexArray.int16[6*X+1]>>1),pe=Z.pointElevation(ue,U.elevation,.05);this.updateHeightRange(pe),this.zOffsetVertexArray.emplaceBack(pe,0,0)}else this.fillNonElevatedRoadSegment(j)}return!0}prepareElevatedLines(a,c,h){if(c.constantHeight!=null)return a;let f=[],y=1/Ft(h);for(let b of a)oH(b,new Ms(c,y),0,f);return f}fillNonElevatedRoadSegment(a){for(let c=a;c0,j=M&&M.progress.max<1;if(this.lineClips){let Tt={min:this.lineClips.start,max:this.lineClips.end},ai=1;if(M){let Oi=this.lineClips.end-this.lineClips.start;Tt=(function(vi,Ii,Ni){return{min:v_(vi.min,Ii,Ni),max:v_(vi.max,Ii,Ni)}})(M.progress,{min:0,max:1},Tt),Oi>0&&(ai=(Tt.max-Tt.min)/Oi)}let Mt=+c.properties.mapbox_clip_feature_len,gi=+c.properties.mapbox_clip_seg_len;if(Number.isNaN(Mt)||Number.isNaN(gi)){for(let vi=0;vi=2&&a[X-1].equals(a[X-2]);)X--;let ue=0;for(;ue0,Kt=this.overscaling<=16?15*qi/(512*this.overscaling):0;if(ai&&Mt==="round"){if(Iib&&(Mt="bevel"),Mt==="bevel"&&(Ii>2&&(Mt="flipbevel"),Ii2*Kt){let Li=me.sub(me.sub(Ae)._mult(Kt/Ht)._round());this.updateDistance(Ae,Li),this.addCurrentVertex(Li,Be,0,0,pe,Ct),Ae=Li}this.updateDistance(Ae,me),Oi._mult(Ii),this.addCurrentVertex(me,Oi,0,0,pe,Ct);let zi=me.dist(Me);if(zi>2*Kt){let Li=me.add(Me.sub(me)._mult(Kt/zi)._round());this.updateDistance(me,Li),this.addCurrentVertex(Li,nt,0,0,pe,Ct),me=Li}}else Oi._mult(Ii),this.addCurrentVertex(me,Oi,0,0,pe,Ct);else if(Mt==="flipbevel"){if(Ii>100)Oi=nt.mult(-1);else{let Ht=Ii*Be.add(nt).mag()/Be.sub(nt).mag();Oi._perp()._mult(Ht*(Ei?-1:1))}this.addCurrentVertex(me,Oi,0,0,pe,Ct),this.addCurrentVertex(me,Oi.mult(-1),0,0,pe,Ct)}else if(Mt==="bevel"||Mt==="fakeround"){Ct!=null&&Ae&&this.addCurrentVertex(me,pt||Be,-1,-1,pe,Ct);let Ht=me.dist(Ae)<=2*Kt&&Mt!=="bevel",zi=Oi.mult(Ei?1:-1);zi._mult(Ii);let Li=nt.mult(Ei?-1:1),Qn=Be.mult(Ei?-1:1),bn=this.evaluateLineProgressFeatures(this.distance);if(Ct==null&&(this.addHalfVertex(me,zi.x,zi.y,!1,!Ei,0,pe,bn),Ht||this.addHalfVertex(me,zi.x+2*Qn.x,zi.y+2*Qn.y,!1,Ei,0,pe,bn)),Mt==="fakeround"){let Fn=Math.round(180*Ni/Math.PI/20);this.addHalfVertex(me,Qn.x,Qn.y,!1,Ei,0,pe,bn);for(let Ki=0;Ki1){this.lineSoFar=a.w;let ue=(c.x-a.x)/U,pe=(c.y-a.y)/U,me=(c.z-a.z)/U,Ae=(c.w-a.w)/U;for(let Me=1;Me=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,z),M.primitiveLength++),b?this.e2=z:this.e1=z,F!=null&&this.zOffsetVertexArray.emplaceBack(F.zOffset,F.variableWidth,F.variableWidth)}updateScaledDistance(){this.lineClips?(this.scaledDistance=this.distance/this.totalDistance,this.lineSoFar=this.totalFeatureLength*this.lineClips.start+this.distance):this.lineSoFar=this.distance}updateDistance(a,c){this.prevDistance=this.distance,this.distance+=a.dist(c),this.updateScaledDistance()}}function JX(u,a,c){return u.xc||u.yc}let Nge,Bge;function Vge(u,a,c){return a*(qi/(u.tileSize*Math.pow(2,c-u.tileID.overscaledZ)))}yn(XX,"LineBucket",{omit:["layers","patternFeatures","currentVertex","currentVertexIsOutside"]});let zge=(u,a,c)=>(1-c)*u+c*a;function Uge(u,a){return 1/Vge(u,1,a.tileZoom)}function Hge(u,a,c,h){return u.translatePosMatrix(h||a.tileID.projMatrix,a,c.paint.get("line-translate"),c.paint.get("line-translate-anchor"))}let jge=u=>{let a=[];Gge(u)&&a.push("RENDER_LINE_DASH"),u.paint.get("line-gradient")&&a.push("RENDER_LINE_GRADIENT");let c=u.paint.get("line-trim-offset");c[0]===0&&c[1]===0||a.push("RENDER_LINE_TRIM_OFFSET"),u.paint.get("line-border-width").constantOr(1)!==0&&a.push("RENDER_LINE_BORDER");let h=u.layout.get("line-join").constantOr("miter")==="none",f=!!u.paint.get("line-pattern").constantOr(1);return h&&f&&a.push("LINE_JOIN_NONE"),a};function Gge(u){let a=u.paint.get("line-dasharray").value;return a.kind!=="constant"||a.value}let eJ,$ge=()=>eJ||(eJ={layout:Nge||(Nge=new qs({"line-cap":new an(kt.layout_line["line-cap"]),"line-join":new an(kt.layout_line["line-join"]),"line-miter-limit":new Vi(kt.layout_line["line-miter-limit"]),"line-round-limit":new Vi(kt.layout_line["line-round-limit"]),"line-sort-key":new an(kt.layout_line["line-sort-key"]),"line-z-offset":new an(kt.layout_line["line-z-offset"]),"line-elevation-reference":new Vi(kt.layout_line["line-elevation-reference"]),"line-cross-slope":new Vi(kt.layout_line["line-cross-slope"]),visibility:new Vi(kt.layout_line.visibility),"line-width-unit":new Vi(kt.layout_line["line-width-unit"])})),paint:Bge||(Bge=new qs({"line-opacity":new an(kt.paint_line["line-opacity"]),"line-color":new an(kt.paint_line["line-color"]),"line-translate":new Vi(kt.paint_line["line-translate"]),"line-translate-anchor":new Vi(kt.paint_line["line-translate-anchor"]),"line-width":new an(kt.paint_line["line-width"]),"line-gap-width":new an(kt.paint_line["line-gap-width"]),"line-offset":new an(kt.paint_line["line-offset"]),"line-blur":new an(kt.paint_line["line-blur"]),"line-dasharray":new an(kt.paint_line["line-dasharray"]),"line-pattern":new an(kt.paint_line["line-pattern"]),"line-pattern-cross-fade":new Vi(kt.paint_line["line-pattern-cross-fade"]),"line-gradient":new Yb(kt.paint_line["line-gradient"]),"line-trim-offset":new Vi(kt.paint_line["line-trim-offset"]),"line-trim-fade-range":new Vi(kt.paint_line["line-trim-fade-range"]),"line-trim-color":new Vi(kt.paint_line["line-trim-color"]),"line-emissive-strength":new Vi(kt.paint_line["line-emissive-strength"]),"line-border-width":new an(kt.paint_line["line-border-width"]),"line-border-color":new an(kt.paint_line["line-border-color"]),"line-occlusion-opacity":new Vi(kt.paint_line["line-occlusion-opacity"]),"line-color-use-theme":new an({type:"string",default:"default","property-type":"data-driven"}),"line-gradient-use-theme":new an({type:"string",default:"default","property-type":"data-driven"}),"line-trim-color-use-theme":new an({type:"string",default:"default","property-type":"data-driven"}),"line-border-color-use-theme":new an({type:"string",default:"default","property-type":"data-driven"})}))},eJ);class p6e extends an{possiblyEvaluate(a,c){return c=new ra(Math.floor(c.zoom),{now:c.now,fadeDuration:c.fadeDuration,transition:c.transition,worldview:c.worldview}),super.possiblyEvaluate(a,c)}evaluate(a,c,h,f){return c=Object.assign({},c,{zoom:Math.floor(c.zoom)}),super.evaluate(a,c,h,f)}}let K3;function qge(u,a){return a>0?a+2*u:u}let h6e=Mr([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_tex_size",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),m6e=Mr([{name:"a_globe_anchor",components:3,type:"Int16"},{name:"a_globe_normal",components:3,type:"Float32"}],4),f6e=Mr([{name:"a_projected_pos",components:4,type:"Float32"}],4);Mr([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let g6e=Mr([{name:"a_auto_z_offset",components:1,type:"Float32"}],4),_6e=Mr([{name:"a_x_axis",components:3,type:"Float32"},{name:"a_y_axis",components:3,type:"Float32"}]),y6e=Mr([{name:"a_texb",components:2,type:"Uint16"}]),v6e=Mr([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_elevation_from_sea",components:2,type:"Float32"}]),b6e=Mr([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"},{name:"a_auto_z_offset",components:1,type:"Float32"}]);Mr([{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"}]);let Kge=Mr([{name:"a_pos",components:3,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),C6e=Mr([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Mr([{name:"triangle",components:3,type:"Uint16"}]),Mr([{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"}]),Mr([{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{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"},{type:"Float32",name:"zOffset"},{type:"Uint8",name:"hasIconTextFit"},{type:"Uint16",name:"elevationFeatureIndex"}]),Mr([{type:"Float32",name:"offsetX"}]),Mr([{type:"Int16",name:"x"},{type:"Int16",name:"y"}]);var lu=24;function x6e(u,a,c){return u.sections.forEach(h=>{h.text=(function(f,y,b){let S=y.layout.get("text-transform").evaluate(b,{});return S==="uppercase"?f=f.toLocaleUpperCase():S==="lowercase"&&(f=f.toLocaleLowerCase()),Eg.applyArabicShaping&&(f=Eg.applyArabicShaping(f)),f})(h.text,a,c)}),u}let W3={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42","\u2190":"\u2191","\u2192":"\u2193"};function w6e(u){return u==="\uFE36"||u==="\uFE48"||u==="\uFE38"||u==="\uFE44"||u==="\uFE42"||u==="\uFE3E"||u==="\uFE3C"||u==="\uFE3A"||u==="\uFE18"||u==="\uFE40"||u==="\uFE10"||u==="\uFE13"||u==="\uFE14"||u==="\uFF40"||u==="\uFFE3"||u==="\uFE11"||u==="\uFE12"}function S6e(u){return u==="\uFE35"||u==="\uFE47"||u==="\uFE37"||u==="\uFE43"||u==="\uFE41"||u==="\uFE3D"||u==="\uFE3B"||u==="\uFE39"||u==="\uFE17"||u==="\uFE3F"}let tJ=4294967296,Wge=1/tJ,Yge=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),fH=class{constructor(u=new Uint8Array(16)){this.buf=ArrayBuffer.isView(u)?u:new Uint8Array(u),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(u,a,c=this.length){for(;this.pos>3,y=this.pos;this.type=7&h,u(f,a,this),this.pos===y&&this.skip(h)}return a}readMessage(u,a){return this.readFields(u,a,this.readVarint()+this.pos)}readFixed32(){let u=this.dataView.getUint32(this.pos,!0);return this.pos+=4,u}readSFixed32(){let u=this.dataView.getInt32(this.pos,!0);return this.pos+=4,u}readFixed64(){let u=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*tJ;return this.pos+=8,u}readSFixed64(){let u=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*tJ;return this.pos+=8,u}readFloat(){let u=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,u}readDouble(){let u=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,u}readVarint(u){let a=this.buf,c,h;return h=a[this.pos++],c=127&h,h<128?c:(h=a[this.pos++],c|=(127&h)<<7,h<128?c:(h=a[this.pos++],c|=(127&h)<<14,h<128?c:(h=a[this.pos++],c|=(127&h)<<21,h<128?c:(h=a[this.pos],c|=(15&h)<<28,(function(f,y,b){let S=b.buf,M,F;if(F=S[b.pos++],M=(112&F)>>4,F<128||(F=S[b.pos++],M|=(127&F)<<3,F<128)||(F=S[b.pos++],M|=(127&F)<<10,F<128)||(F=S[b.pos++],M|=(127&F)<<17,F<128)||(F=S[b.pos++],M|=(127&F)<<24,F<128)||(F=S[b.pos++],M|=(1&F)<<31,F<128))return fO(f,M,y);throw new Error("Expected varint not more than 10 bytes")})(c,u,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let u=this.readVarint();return u%2==1?(u+1)/-2:u/2}readBoolean(){return!!this.readVarint()}readString(){let u=this.readVarint()+this.pos,a=this.pos;return this.pos=u,u-a>=12&&Yge?Yge.decode(this.buf.subarray(a,u)):(function(c,h,f){let y="",b=h;for(;b239?4:S>223?3:S>191?2:1;if(b+j>f)break;j===1?S<128&&(U=S):j===2?(M=c[b+1],(192&M)==128&&(U=(31&S)<<6|63&M,U<=127&&(U=null))):j===3?(M=c[b+1],F=c[b+2],(192&M)==128&&(192&F)==128&&(U=(15&S)<<12|(63&M)<<6|63&F,(U<=2047||U>=55296&&U<=57343)&&(U=null))):j===4&&(M=c[b+1],F=c[b+2],z=c[b+3],(192&M)==128&&(192&F)==128&&(192&z)==128&&(U=(15&S)<<18|(63&M)<<12|(63&F)<<6|63&z,(U<=65535||U>=1114112)&&(U=null))),U===null?(U=65533,j=1):U>65535&&(U-=65536,y+=String.fromCharCode(U>>>10&1023|55296),U=56320|1023&U),y+=String.fromCharCode(U),b+=j}return y})(this.buf,a,u)}readBytes(){let u=this.readVarint()+this.pos,a=this.buf.subarray(this.pos,u);return this.pos=u,a}readPackedVarint(u=[],a){let c=this.readPackedEnd();for(;this.pos127;);else if(a===2)this.pos=this.readVarint()+this.pos;else if(a===5)this.pos+=4;else{if(a!==1)throw new Error(`Unimplemented type: ${a}`);this.pos+=8}}writeTag(u,a){this.writeVarint(u<<3|a)}realloc(u){let a=this.length||16;for(;a268435455||u<0?(function(a,c){let h,f;if(a>=0?(h=a%4294967296|0,f=a/4294967296|0):(h=~(-a%4294967296),f=~(-a/4294967296),4294967295^h?h=h+1|0:(h=0,f=f+1|0)),a>=18446744073709552e3||a<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");c.realloc(10),(function(y,b,S){S.buf[S.pos++]=127&y|128,y>>>=7,S.buf[S.pos++]=127&y|128,y>>>=7,S.buf[S.pos++]=127&y|128,y>>>=7,S.buf[S.pos++]=127&y|128,S.buf[S.pos]=127&(y>>>=7)})(h,0,c),(function(y,b){let S=(7&y)<<4;b.buf[b.pos++]|=S|((y>>>=3)?128:0),y&&(b.buf[b.pos++]=127&y|((y>>>=7)?128:0),y&&(b.buf[b.pos++]=127&y|((y>>>=7)?128:0),y&&(b.buf[b.pos++]=127&y|((y>>>=7)?128:0),y&&(b.buf[b.pos++]=127&y|((y>>>=7)?128:0),y&&(b.buf[b.pos++]=127&y)))))})(f,c)})(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))}writeSVarint(u){this.writeVarint(u<0?2*-u-1:2*u)}writeBoolean(u){this.writeVarint(+u)}writeString(u){u=String(u),this.realloc(4*u.length),this.pos++;let a=this.pos;this.pos=(function(h,f,y){for(let b,S,M=0;M55295&&b<57344){if(!S){b>56319||M+1===f.length?(h[y++]=239,h[y++]=191,h[y++]=189):S=b;continue}if(b<56320){h[y++]=239,h[y++]=191,h[y++]=189,S=b;continue}b=S-55296<<10|b-56320|65536,S=null}else S&&(h[y++]=239,h[y++]=191,h[y++]=189,S=null);b<128?h[y++]=b:(b<2048?h[y++]=b>>6|192:(b<65536?h[y++]=b>>12|224:(h[y++]=b>>18|240,h[y++]=b>>12&63|128),h[y++]=b>>6&63|128),h[y++]=63&b|128)}return y})(this.buf,u,this.pos);let c=this.pos-a;c>=128&&Qge(a,c,this),this.pos=a-1,this.writeVarint(c),this.pos+=c}writeFloat(u){this.realloc(4),this.dataView.setFloat32(this.pos,u,!0),this.pos+=4}writeDouble(u){this.realloc(8),this.dataView.setFloat64(this.pos,u,!0),this.pos+=8}writeBytes(u){let a=u.length;this.writeVarint(a),this.realloc(a);for(let c=0;c=128&&Qge(c,h,this),this.pos=c-1,this.writeVarint(h),this.pos+=h}writeMessage(u,a,c){this.writeTag(u,2),this.writeRawMessage(a,c)}writePackedVarint(u,a){a.length&&this.writeMessage(u,T6e,a)}writePackedSVarint(u,a){a.length&&this.writeMessage(u,I6e,a)}writePackedBoolean(u,a){a.length&&this.writeMessage(u,A6e,a)}writePackedFloat(u,a){a.length&&this.writeMessage(u,E6e,a)}writePackedDouble(u,a){a.length&&this.writeMessage(u,D6e,a)}writePackedFixed32(u,a){a.length&&this.writeMessage(u,k6e,a)}writePackedSFixed32(u,a){a.length&&this.writeMessage(u,M6e,a)}writePackedFixed64(u,a){a.length&&this.writeMessage(u,O6e,a)}writePackedSFixed64(u,a){a.length&&this.writeMessage(u,R6e,a)}writeBytesField(u,a){this.writeTag(u,2),this.writeBytes(a)}writeFixed32Field(u,a){this.writeTag(u,5),this.writeFixed32(a)}writeSFixed32Field(u,a){this.writeTag(u,5),this.writeSFixed32(a)}writeFixed64Field(u,a){this.writeTag(u,1),this.writeFixed64(a)}writeSFixed64Field(u,a){this.writeTag(u,1),this.writeSFixed64(a)}writeVarintField(u,a){this.writeTag(u,0),this.writeVarint(a)}writeSVarintField(u,a){this.writeTag(u,0),this.writeSVarint(a)}writeStringField(u,a){this.writeTag(u,2),this.writeString(a)}writeFloatField(u,a){this.writeTag(u,5),this.writeFloat(a)}writeDoubleField(u,a){this.writeTag(u,1),this.writeDouble(a)}writeBooleanField(u,a){this.writeVarintField(u,+a)}};function fO(u,a,c){return c?4294967296*a+(u>>>0):4294967296*(a>>>0)+(u>>>0)}function Qge(u,a,c){let h=a<=16383?1:a<=2097151?2:a<=268435455?3:Math.floor(Math.log(a)/(7*Math.LN2));c.realloc(h);for(let f=c.pos-1;f>=u;f--)c.buf[f+h]=c.buf[f]}function T6e(u,a){for(let c=0;c=0&&h>=a&&gH[this.text.charCodeAt(h)];h--)c--;this.text=this.text.substring(a,c),this.sectionIndex=this.sectionIndex.slice(a,c)}substring(a,c){let h=new gO;return h.text=this.text.substring(a,c),h.sectionIndex=this.sectionIndex.slice(a,c),h.sections=this.sections,h}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((a,c)=>Math.max(a,this.sections[c].scale),0)}addTextSection(a,c){this.text+=a.text,this.sections.push(Y3.forText(a.scale,a.fontStack||c));let h=this.sections.length-1;for(let f=0;f=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function nJ(u,a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue=1){let pe=gO.fromFeature(u,f,ue);U===Bf.vertical&&pe.verticalizePunctuation(j);let me=[],Ae=(function(pt,Ct,Tt,ai,Mt,gi){if(!pt)return[];let Oi=[],vi=(function(Ei,Kt,Ht,zi,Li,Qn){let bn=0;for(let Fn=0;Fn=0,Ni=0;for(let Ei=0;Ei0&&Ma>ir&&(ir=Ma)}else{let ol=Tt[He.fontStack];if(!ol)continue;ol[ri]&&(En=ol[ri]);let cr=Ct[He.fontStack];if(!cr)continue;let Ma=cr.glyphs[ri];if(!Ma)continue;if(en=Ma.metrics,_r=ri!==8203?lu:0,Qn){let Xs=cr.ascender!==void 0?Math.abs(cr.ascender):0,_s=cr.descender!==void 0?Math.abs(cr.descender):0,za=(Xs+_s)*nn;An-c/2;){if(b--,b<0)return!1;S-=u[b].dist(y),y=u[b]}S+=u[b].dist(u[b+1]),b++;let M=[],F=0;for(;Sh;)F-=M.shift().angleDelta;if(F>f)return!1;b++,S+=z.dist(U)}return!0}function d_e(u){let a=0;for(let c=0;cF){let X=(F-M)/Z,ue=eo(U.x,j.x,X),pe=eo(U.y,j.y,X),me=new F1(ue,pe,0,j.angleTo(U),z);return!b||c_e(u,me,S,b,a)?me:void 0}M+=Z}}function U6e(u,a,c,h,f,y,b,S,M){let F=u_e(h,y,b),z=p_e(h,f),U=z*b,j=u[0].x===0||u[0].x===M||u[0].y===0||u[0].y===M;return a-U=0&&Be=0&&nt=0&&j+F<=z){let ot=new F1(Be,nt,0,Ae,X);h&&!c_e(u,ot,y,h,f)||Z.push(ot)}}U+=me}return S||Z.length||b||(Z=h_e(u,U/2,c,h,f,y,b,!0,M)),Z}function m_e(u){let a=0,c=0;for(let b of u)a+=b.w*b.h,c=Math.max(c,b.w);u.sort((b,S)=>S.h-b.h);let h=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(a/.95)),c),h:1/0}],f=0,y=0;for(let b of u)for(let S=h.length-1;S>=0;S--){let M=h[S];if(!(b.w>M.w||b.h>M.h)){if(b.x=M.x,b.y=M.y,y=Math.max(y,b.y+b.h),f=Math.max(f,b.x+b.w),b.w===M.w&&b.h===M.h){let F=h.pop();F&&S1?X-1:X,_c.copy(U.data,F,{x:0,y:0},{x:ue,y:pe},U.data,h),_c.copy(U.data,F,{x:0,y:Ae-X},{x:ue,y:pe-X},{width:me,height:X},h),_c.copy(U.data,F,{x:0,y:0},{x:ue,y:pe+Ae},{width:me,height:X},h),_c.copy(U.data,F,{x:me-X,y:0},{x:ue-X,y:pe},{width:X,height:Ae},h),_c.copy(U.data,F,{x:0,y:0},{x:ue+me,y:pe},{width:X,height:Ae},h),_c.copy(U.data,F,{x:me-X,y:Ae-X},{x:ue-X,y:pe-X},{width:X,height:X},h),_c.copy(U.data,F,{x:0,y:Ae-X},{x:ue+me,y:pe-X},{width:X,height:X},h),_c.copy(U.data,F,{x:0,y:0},{x:ue+me,y:pe+Ae},{width:X,height:X},h),_c.copy(U.data,F,{x:me-X,y:0},{x:ue-X,y:pe+Ae},{width:X,height:X},h)}this.lut=h,this.image=F,this.iconPositions=f,this.patternPositions=y}addImages(a,c,h,f){for(let[y,b]of a.entries()){let{bin:S,imagePosition:M,imageVariant:F}=sJ(y,b,h);c.set(y,M),f.push(S),b.hasRenderCallback&&this.haveRenderCallbacks.push(F.id)}}patchUpdatedImages(a,c,h){this.haveRenderCallbacks=this.haveRenderCallbacks.filter(f=>a.hasImage(f,h)),a.dispatchRenderCallbacks(this.haveRenderCallbacks,h);for(let f of a.getUpdatedImages(h)){for(let y of this.iconPositions.keys()){let b=vf.parse(y);if(xp.isEqual(b.id,f)){let S=a.getImage(f,h);this.patchUpdatedImage(this.iconPositions.get(y),S,c,null)}}for(let y of this.patternPositions.keys()){let b=vf.parse(y);if(xp.isEqual(b.id,f)){let S=a.getImage(f,h);this.patchUpdatedImage(this.patternPositions.get(y),S,c,this.lut)}}}}patchUpdatedImage(a,c,h,f=null){if(!a||!c||a.version===c.version)return;a.version=c.version;let[y,b]=a.tl,S=a.sdf;if(this.lut||S){let M={width:c.data.width,height:c.data.height},F=new _c(M);_c.copy(c.data,F,{x:0,y:0},{x:0,y:0},M,f,S),h.update(F,{position:{x:y,y:b}})}else h.update(c.data,{position:{x:y,y:b}})}}yn(Z3,"ImagePosition"),yn(f_e,"ImageAtlas");let X3=1e20;function g_e(u,a,c,h,f,y,b,S,M){for(let F=a;F-1);M++,y[M]=S,b[M]=F,b[M+1]=X3}for(let S=0,M=0;S{let M=this.entries[y];M||(M=this.entries[y]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let F=M.glyphs[b];if(F!==void 0)return void S(null,{stack:y,id:b,glyph:F});if(F=this._tinySDF(M,y,b),F)return M.glyphs[b]=F,void S(null,{stack:y,id:b,glyph:F});let z=Math.floor(b/256);if(256*z>65535)return Er("glyphs > 65535 not supported"),void S(null,{stack:y,id:b,glyph:F});if(M.ranges[z])return void S(null,{stack:y,id:b,glyph:F});let U=M.requests[z];U||(U=M.requests[z]=[],_O.loadGlyphRange(y,z,f,this.requestManager,(j,Z)=>{if(Z){M.ascender=Z.ascender,M.descender=Z.descender;for(let X in Z.glyphs)this._doesCharSupportLocalGlyph(+X)||(M.glyphs[+X]=Z.glyphs[+X]);M.ranges[z]=!0}for(let X of U)X(j,Z);delete M.requests[z]})),U.push((j,Z)=>{j?S(j):Z&&S(null,{stack:y,id:b,glyph:Z.glyphs[b]||null})})},(y,b)=>{if(y)c(y);else if(b){let S={};for(let{stack:M,id:F,glyph:z}of b)S[M]===void 0&&(S[M]={}),S[M].glyphs===void 0&&(S[M].glyphs={}),S[M].glyphs[F]=z&&{id:z.id,bitmap:z.bitmap.clone(),metrics:z.metrics},S[M].ascender=this.entries[M].ascender,S[M].descender=this.entries[M].descender;c(null,S)}})}_doesCharSupportLocalGlyph(a){return this.localGlyphMode!==aJ.none&&(this.localGlyphMode===aJ.all?!!this.localFontFamily:!!this.localFontFamily&&(_o["CJK Unified Ideographs"](a)||_o["Hangul Syllables"](a)||_o.Hiragana(a)||_o.Katakana(a)||_o["CJK Symbols and Punctuation"](a)||_o["CJK Unified Ideographs Extension A"](a)||_o["CJK Unified Ideographs Extension B"](a)||_o.Osage(a)))}_tinySDF(a,c,h){let f=this.localFontFamily;if(!f||!this._doesCharSupportLocalGlyph(h))return;let y=a.tinySDF;if(!y){let ue="400";/bold/i.test(c)?ue="900":/medium/i.test(c)?ue="500":/light/i.test(c)&&(ue="200"),y=a.tinySDF=new _O.TinySDF({fontFamily:f,fontWeight:ue,fontSize:24*cv,buffer:3*cv,radius:8*cv}),y.fontWeight=ue}if(this.localGlyphs[y.fontWeight][h])return this.localGlyphs[y.fontWeight][h];let b=String.fromCodePoint(h),{data:S,width:M,height:F,glyphWidth:z,glyphHeight:U,glyphLeft:j,glyphTop:Z,glyphAdvance:X}=y.draw(b);return this.localGlyphs[y.fontWeight][h]={id:h,bitmap:new lC({width:M,height:F},S),metrics:{width:z/cv,height:U/cv,left:j/cv,top:Z/cv-27,advance:X/cv,localGlyph:!0}}}}_O.loadGlyphRange=function(u,a,c,h,f){let y=256*a,b=y+255,S=h.transformRequest(h.normalizeGlyphsURL(c).replace("{fontstack}",u).replace("{range}",`${y}-${b}`),ES.Glyphs);Eb(S,(M,F)=>{if(M)f(M);else if(F){let z={},U=(function(j){return new fH(j).readFields(F6e,{})})(F);for(let j of U.glyphs)z[j.id]=j;f(null,{glyphs:z,ascender:U.ascender,descender:U.descender})}})},_O.TinySDF=class{constructor({fontSize:u=24,buffer:a=3,radius:c=8,cutoff:h=.25,fontFamily:f="sans-serif",fontWeight:y="normal",fontStyle:b="normal",lang:S=null}={}){this.buffer=a,this.cutoff=h,this.radius=c,this.lang=S;let M=this.size=u+4*a,F=this._createCanvas(M),z=this.ctx=F.getContext("2d",{willReadFrequently:!0});z.font=`${b} ${y} ${u}px ${f}`,z.textBaseline="alphabetic",z.textAlign="left",z.fillStyle="black",this.gridOuter=new Float64Array(M*M),this.gridInner=new Float64Array(M*M),this.f=new Float64Array(M),this.z=new Float64Array(M+1),this.v=new Uint16Array(M)}_createCanvas(u){let a=document.createElement("canvas");return a.width=a.height=u,a}draw(u){let{width:a,actualBoundingBoxAscent:c,actualBoundingBoxDescent:h,actualBoundingBoxLeft:f,actualBoundingBoxRight:y}=this.ctx.measureText(u),b=Math.ceil(c),S=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(y-f))),M=Math.min(this.size-this.buffer,b+Math.ceil(h)),F=S+2*this.buffer,z=M+2*this.buffer,U=Math.max(F*z,0),j=new Uint8ClampedArray(U),Z={data:j,width:F,height:z,glyphWidth:S,glyphHeight:M,glyphTop:b,glyphLeft:0,glyphAdvance:a};if(S===0||M===0)return Z;let{ctx:X,buffer:ue,gridInner:pe,gridOuter:me}=this;this.lang&&(X.lang=this.lang),X.clearRect(ue,ue,S,M),X.fillText(u,ue,ue+b);let Ae=X.getImageData(ue,ue,S,M);me.fill(X3,0,U),pe.fill(0,0,U);for(let Me=0;Me0?pt*pt:0,pe[ot]=pt<0?pt*pt:0}}g_e(me,0,0,F,z,F,this.f,this.v,this.z),g_e(pe,ue,ue,S,M,F,this.f,this.v,this.z);for(let Me=0;Me{let Ii=yH(Mt.stretch-Ae,Me,z,u.left*f),Ni=vH(Mt.fixed-ot,pt,Mt.stretch,X),oi=yH(gi.stretch-Be,nt,U,u.top*f),Ei=vH(gi.fixed-Ct,Tt,gi.stretch,ue),Kt=yH(Oi.stretch-Ae,Me,z,u.left*f),Ht=vH(Oi.fixed-ot,pt,Oi.stretch,X),zi=yH(vi.stretch-Be,nt,U,u.top*f),Li=vH(vi.fixed-Ct,Tt,vi.stretch,ue),Qn=new Pi(Ii,oi),bn=new Pi(Kt,oi),Fn=new Pi(Kt,zi),Ki=new Pi(Ii,zi),Yn=new Pi(Ni/S,Ei/S),Po=new Pi(Ht/S,Li/S),on=a*Math.PI/180;if(on){let An=Math.sin(on),Zo=Math.cos(on),Yr=[Zo,-An,An,Zo];Qn._matMult(Yr),bn._matMult(Yr),Ki._matMult(Yr),Fn._matMult(Yr)}let Hn=Mt.stretch+Mt.fixed,To=Oi.stretch+Oi.fixed,qo=gi.stretch+gi.fixed,gr=vi.stretch+vi.fixed,ir=u.imageSecondary;return{tl:Qn,tr:bn,bl:Ki,br:Fn,texPrimary:{x:b.paddedRect.x+FT+Hn,y:b.paddedRect.y+FT+qo,w:To-Hn,h:gr-qo},texSecondary:ir?{x:ir.paddedRect.x+FT+Hn,y:ir.paddedRect.y+FT+qo,w:To-Hn,h:gr-qo}:void 0,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Yn,pixelOffsetBR:Po,minFontScaleX:pt/S/z,minFontScaleY:Tt/S/U,isSDF:c}};if(h&&(b.stretchX||b.stretchY)){let Mt=b_e(j,pe,X),gi=b_e(Z,me,ue);for(let Oi=0;Oiy)&&(y=X.x),(!Z||X.y>b)&&(b=X.y)}let M=Math.min(y-h,b-f),F=M/2,z=new BS([],G6e);if(M===0)return new Pi(h,f);for(let Z=h;ZU.d||!U.d)&&(U=Z,c&&console.log("found best %d after %d probes",Math.round(1e4*Z.d)/1e4,j)),Z.max-U.d<=a||(F=Z.h/2,z.push(new yO(Z.p.x-F,Z.p.y-F,F,u)),z.push(new yO(Z.p.x+F,Z.p.y-F,F,u)),z.push(new yO(Z.p.x-F,Z.p.y+F,F,u)),z.push(new yO(Z.p.x+F,Z.p.y+F,F,u)),j+=4)}return c&&(console.log(`num probes: ${j}`),console.log(`best distance: ${U.d}`)),U.p}function G6e(u,a){return a.max-u.max}class yO{constructor(a,c,h,f){this.p=new Pi(a,c),this.h=h,this.d=(function(y,b){let S=!1,M=1/0;for(let F=0;Fy.y!=ue.y>y.y&&y.x<(ue.x-X.x)*(y.y-X.y)/(ue.y-X.y)+X.x&&(S=!S),M=Math.min(M,Qa(y,X,ue))}}return(S?1:-1)*Math.sqrt(M)})(this.p,f),this.max=this.d+this.h*Math.SQRT2}}let $6e=Object.keys,lJ=Number.POSITIVE_INFINITY,q6e=Math.sqrt(2);function C_e(u,[a,c]){let h=0,f=0;if(c===lJ){a<0&&(a=0);let y=a/q6e;switch(u){case"top-right":case"top-left":f=y-7;break;case"bottom-right":case"bottom-left":f=7-y;break;case"bottom":f=7-a;break;case"top":f=a-7}switch(u){case"top-right":case"bottom-right":h=-y;break;case"top-left":case"bottom-left":h=y;break;case"left":h=a;break;case"right":h=-a}}else{switch(a=Math.abs(a),c=Math.abs(c),u){case"top-right":case"top-left":case"top":f=c-7;break;case"bottom-right":case"bottom-left":case"bottom":f=7-c}switch(u){case"top-right":case"bottom-right":case"right":h=-a;break;case"top-left":case"bottom-left":case"left":h=a}}return[h,f]}function bH(u,a,c,h,f,y,b,S,M){if(!a||!a.usvg)return;let F=a_e(h),z=a_e(f),U=y!=="both"&&y!=="width"||!r_e(h)?1:z.width/F.width,j=y!=="both"&&y!=="height"||!s_e(h)?1:z.height/F.height;c.scaleSelf(U,j);let Z=c.toString();b.set(Z,c),S.set(Z,a);let{imagePosition:X}=sJ(Z,a,lA);M.set(Z,X)}function x_e(u,a,c,h,f,y,b,S,M){if(!u)return;let F=(function(z,U,j,Z,X,ue){if(z.kind==="camera")return z.maxSize;if(z.kind==="composite"){let pe=U.possiblyEvaluate(new ra(z.maxZoom,{worldview:ue}),j).evaluate(X,{},j),me=U.possiblyEvaluate(new ra(z.minZoom,{worldview:ue}),j).evaluate(X,{},j);return Math.max(pe,me)}return U.possiblyEvaluate(new ra(Z,{worldview:ue})).evaluate(X,{},j)})(a,c,h,f,y,M);return u.scaleSelf(F*S*b)}function w_e(u,a,c,h,f,y,b,S,M){return{iconPrimary:x_e(u.getPrimary(),a,c,h,f,y,b,S,M),iconSecondary:x_e(u.getSecondary(),a,c,h,f,y,b,S,M)}}function K6e(u,a,c){if(!a)return;let h=c.get(u.toString()),f=c.get(a.toString());h&&f&&(h.paddedRect.w===f.paddedRect.w&&h.paddedRect.h===f.paddedRect.h||Er(`Mismatch in icon variant sizes: ${u.toString()} and ${a.toString()}`),h.usvg!==f.usvg&&Er(`Mismatch in icon variant image types: ${u.id} and ${a.id}`))}function S_e(u,a,c,h){if(!u)return;let f=a.get(c.toString());if(u.imagePrimary=f,h){let y=a.get(h.toString());u.imageSecondary=y}}function W6e(u,a){for(let c in u.horizontal)T_e(u.horizontal[c],a);T_e(u.vertical,a)}function T_e(u,a){if(u){for(let c of u.positionedLines)for(let h of c.positionedGlyphs)if(h.image!==null){let f=h.image.toString();h.rect=a.get(f).paddedRect}}}function cJ(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Y6e(u,a,c,h,f,y,b,S,M){let F=dJ(y.horizontal)||y.vertical,z=c.get("icon-text-fit-padding").evaluate(h,{},f),U,j=a;return a&&M!=="none"&&(u.allowVerticalPlacement&&y.vertical&&(U=o_e(a,y.vertical,M,z,S,b)),F&&(j=o_e(a,F,M,z,S,b))),{defaultShapedIcon:j,verticallyShapedIcon:U}}function Q6e(u,a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe,me,Ae,Me){let Be=b.textMaxSize.evaluate(a,{},j);Be===void 0?Be=S*b.textScaleFactor:Be*=b.textScaleFactor;let nt=u.layers[0].layout,ot=dJ(c.horizontal)||c.vertical,pt=Z.name==="globe",Ct=lu,Tt=u.tilePixelRatio*Be/Ct,ai=(Ni=u.overscaling,u.zoom>18&&Ni>2&&(Ni>>=1),Math.max(qi/(512*Ni),1)*nt.get("symbol-spacing")),Mt=nt.get("text-padding")*u.tilePixelRatio,gi=nt.get("icon-padding")*u.tilePixelRatio,Oi=At(nt.get("text-max-angle")),vi=nt.get("icon-rotation-alignment")==="map"&&Me!=="point",Ii=ai/2;var Ni;u.hasAnyIconTextFit===!1&&pe!=="none"&&(u.hasAnyIconTextFit=!0);let oi=a.properties?+a.properties[or]:null,Ei=oi&&u.elevationFeatureIdToIndex?u.elevationFeatureIdToIndex.get(oi):65535,Kt=(Ht,zi,Li)=>{if(zi.x<0||zi.x>=qi||zi.y<0||zi.y>=qi)return;let Qn=null;if(pt){let{x:bn,y:Fn,z:Ki}=Z.projectTilePoint(zi.x,zi.y,Li);Qn={anchor:new F1(bn,Fn,Ki,0,void 0),up:Z.upVector(Li,zi.x,zi.y)}}(function(bn,Fn,Ki,Yn,Po,on,Hn,To,qo,gr,ir,An,Zo,Yr,Ue,He,$t,ri,nn,en,En,ao,_r,vr,ur,js,ol,cr,Ma){let Xs=bn.addToLineVertexArray(Fn,Yn),_s,za,Ua,Sa,Oa,Js,br,la=0,yl=0,Io=0,ns=0,Ha=-1,Vl=-1,Xa={},ed=Wx(""),ma=Ki?Ki.anchor:Fn,zc=cr!=="none",km=0,ip=0;if(qo._unevaluatedLayout.getValue("text-radial-offset")===void 0){let td=qo.layout.get("text-offset").evaluate(En,{},ur);km=td[0]*lu,ip=td[1]*lu}else km=qo.layout.get("text-radial-offset").evaluate(En,{},ur)*lu,ip=lJ;if(bn.allowVerticalPlacement&&Po.vertical){let td=Po.vertical;if(Ue)Js=uJ(td),To&&(br=uJ(To));else{let Ed=qo.layout.get("text-rotate").evaluate(En,{},ur)+90;Ua=CH(gr,ma,Fn,ir,An,Zo,td,Yr,Ed,He),To&&(Sa=CH(gr,ma,Fn,ir,An,Zo,To,ri,Ed))}}if(on){let td=bn.iconSizeData,Ed=qo.layout.get("icon-rotate").evaluate(En,{},ur),np=v_e(on,Ed,_r,zc,ao.iconScaleFactor),ah=To?v_e(To,Ed,_r,zc,ao.iconScaleFactor):void 0;za=CH(gr,ma,Fn,ir,An,Zo,on,ri,Ed,null),la=4*np.length;let Dp=null;td.kind==="source"?(Dp=[pC*qo.layout.get("icon-size").evaluate(En,{},ur)*ao.iconScaleFactor],Dp[0]>PT&&Er(`${bn.layerIds[0]}: Value for "icon-size" is >= ${J3}. Reduce your "icon-size".`)):td.kind==="composite"&&(Dp=[pC*ao.compositeIconSizes[0].evaluate(En,{},ur)*ao.iconScaleFactor,pC*ao.compositeIconSizes[1].evaluate(En,{},ur)*ao.iconScaleFactor],(Dp[0]>PT||Dp[1]>PT)&&Er(`${bn.layerIds[0]}: Value for "icon-size" is >= ${J3}. Reduce your "icon-size".`)),bn.addSymbols(bn.icon,np,Dp,en,nn,En,void 0,Ki,Fn,Xs.lineStartIndex,Xs.lineLength,-1,vr,ur,js,ol),Ha=bn.icon.placedSymbolArray.length-1,ah&&(yl=4*ah.length,bn.addSymbols(bn.icon,ah,Dp,en,nn,En,Bf.vertical,Ki,Fn,Xs.lineStartIndex,Xs.lineLength,-1,vr,ur,js,ol),Vl=bn.icon.placedSymbolArray.length-1)}for(let td in Po.horizontal){let Ed=td,np=Po.horizontal[Ed];_s||(ed=Wx(np.text),Ue?Oa=uJ(np):_s=CH(gr,ma,Fn,ir,An,Zo,np,Yr,qo.layout.get("text-rotate").evaluate(En,{},ur),He));let ah=np.positionedLines.length===1;if(Io+=I_e(bn,Ki,Fn,np,Hn,qo,Ue,En,He,Xs,Po.vertical?Bf.horizontal:Bf.horizontalOnly,ah?$6e(Po.horizontal):[Ed],Xa,Ha,ao,vr,ur,js),ah)break}Po.vertical&&(ns+=I_e(bn,Ki,Fn,Po.vertical,Hn,qo,Ue,En,He,Xs,Bf.vertical,["vertical"],Xa,Vl,ao,vr,ur,js));let Au=-1,Mm=(td,Ed)=>td?Math.max(td,Ed):Ed;Au=Mm(Oa,Au),Au=Mm(Js,Au),Au=Mm(br,Au);let hC=Au>-1?1:0;bn.glyphOffsetArray.length>=65535&&Er("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),En.sortKey!==void 0&&bn.addToSortKeyRanges(bn.symbolInstances.length,En.sortKey),bn.symbolInstances.emplaceBack(Fn.x,Fn.y,ma.x,ma.y,ma.z,Xa.right>=0?Xa.right:-1,Xa.center>=0?Xa.center:-1,Xa.left>=0?Xa.left:-1,Xa.vertical>=0?Xa.vertical:-1,Ha,Vl,ed,_s!==void 0?_s:bn.collisionBoxArray.length,_s!==void 0?_s+1:bn.collisionBoxArray.length,Ua!==void 0?Ua:bn.collisionBoxArray.length,Ua!==void 0?Ua+1:bn.collisionBoxArray.length,za!==void 0?za:bn.collisionBoxArray.length,za!==void 0?za+1:bn.collisionBoxArray.length,Sa||bn.collisionBoxArray.length,Sa?Sa+1:bn.collisionBoxArray.length,ir,Io,ns,la,yl,hC,0,km,ip,Au,0,zc?1:0,Ma)})(u,zi,Qn,Ht,c,h,y,f,u.layers[0],u.collisionBoxArray,a.index,a.sourceLayerIndex,u.index,Mt,Ae,F,0,gi,vi,me,a,b,z,U,j,X,ue,pe,Ei)};if(Me==="line")for(let Ht of iA(a.geometry,0,0,qi,qi)){let zi=U6e(Ht,ai,Oi,c.vertical||ot,h,Ct,Tt,u.overscaling,qi);for(let Li of zi)ot&&Z6e(u,ot.text,Ii,Li)||Kt(Ht,Li,j)}else if(Me==="line-center"){for(let Ht of a.geometry)if(Ht.length>1){let zi=z6e(Ht,Oi,c.vertical||ot,h,Ct,Tt);zi&&Kt(Ht,zi,j)}}else if(a.type==="Polygon")for(let Ht of IT(a.geometry,0)){let zi=j6e(Ht,16);Kt(Ht[0],new F1(zi.x,zi.y,0,0,void 0),j)}else if(a.type==="LineString")for(let Ht of a.geometry)Kt(Ht,new F1(Ht[0].x,Ht[0].y,0,0,void 0),j);else if(a.type==="Point")for(let Ht of a.geometry)for(let zi of Ht)Kt([zi],new F1(zi.x,zi.y,0,0,void 0),j)}let J3=255,PT=J3*pC;function I_e(u,a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe,me){let Ae=(function(nt,ot,pt,Ct,Tt,ai,Mt,gi){let Oi=[];if(ot.positionedLines.length===0)return Oi;let vi=Ct.layout.get("text-rotate").evaluate(ai,{})*Math.PI/180,Ii=(function(Ht){let zi=Ht[0],Li=Ht[1],Qn=zi*Li;return Qn>0?[zi,-Li]:Qn<0?[-zi,Li]:zi===0?[Li,zi]:[Li,-zi]})(pt),Ni=Math.abs(ot.top-ot.bottom);for(let Ht of ot.positionedLines)Ni-=Ht.lineOffset;let oi=ot.positionedLines.length,Ei=Ni/oi,Kt=ot.top-pt[1];for(let Ht=0;HtPT&&Er(`${u.layerIds[0]}: Value for "text-size" is >= ${J3}. Reduce your "text-size".`)):Me.kind==="composite"&&(Be=[pC*X.compositeTextSizes[0].evaluate(S,{},pe)*X.textScaleFactor,pC*X.compositeTextSizes[1].evaluate(S,{},pe)*X.textScaleFactor],(Be[0]>PT||Be[1]>PT)&&Er(`${u.layerIds[0]}: Value for "text-size" is >= ${J3}. Reduce your "text-size".`)),u.addSymbols(u.text,Ae,Be,M,b,S,z,a,c,F.lineStartIndex,F.lineLength,Z,ue,pe,me,!1);for(let nt of U)j[nt]=u.text.placedSymbolArray.length-1;return 4*Ae.length}function dJ(u){for(let a in u)return u[a];return null}function CH(u,a,c,h,f,y,b,S,M,F){let z=b.top,U=b.bottom,j=b.left,Z=b.right;if(n_e(b)&&b.collisionPadding){let X=b.collisionPadding;j-=X[0],z-=X[1],Z+=X[2],U+=X[3]}if(M){let X=new Pi(j,z),ue=new Pi(Z,z),pe=new Pi(j,U),me=new Pi(Z,U),Ae=At(M),Me=new Pi(0,0);F&&(Me=new Pi(F[0],F[1])),X._rotateAround(Ae,Me),ue._rotateAround(Ae,Me),pe._rotateAround(Ae,Me),me._rotateAround(Ae,Me),j=Math.min(X.x,ue.x,pe.x,me.x),Z=Math.max(X.x,ue.x,pe.x,me.x),z=Math.min(X.y,ue.y,pe.y,me.y),U=Math.max(X.y,ue.y,pe.y,me.y)}return u.emplaceBack(a.x,a.y,a.z,c.x,c.y,j,z,Z,U,S,h,f,y),u.length-1}function uJ(u){n_e(u)&&u.collisionPadding&&(u.top-=u.collisionPadding[1],u.bottom+=u.collisionPadding[3]);let a=u.bottom-u.top;return a>0?Math.max(10,a):null}function Z6e(u,a,c,h){let f=u.compareText;if(a in f){let y=f[a];for(let b=y.length-1;b>=0;b--)if(h.dist(y[b])Me&&(Be(ot,vi,Ct,Tt,gi,Oi),Be(vi,pt,gi,Oi,ai,Mt))}Be(U,j,h,y,f,y),Be(j,Z,f,y,f,b),Be(Z,X,f,b,h,b),Be(X,U,h,b,h,y),ue-=Me,pe-=Me,me+=Me,Ae+=Me;let nt=1/Math.max(me-ue,Ae-pe);return{scale:nt,x:ue*nt,y:pe*nt,x2:me*nt,y2:Ae*nt,projection:a}}function D_e(u,{x:a,y:c},h=0){return new Pi(((a-h)*u.scale-u.x)*qi,(c*u.scale-u.y)*qi)}let X6e=V(new Float32Array(16));class LT{constructor(a){this.spec=a,this.name=a.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(a,c){return{x:0,y:0,z:0}}unproject(a,c){return new de(0,0)}projectTilePoint(a,c,h){return{x:a,y:c,z:0}}locationPoint(a,c,h,f=!0){return a._coordinatePoint(a.locationCoordinate(c,h),f)}pixelsPerMeter(a,c){return Qe(1,a)*c}pixelSpaceConversion(a,c,h){return 1}farthestPixelDistance(a){return E_e(a,a.pixelsPerMeter)}pointCoordinate(a,c,h,f){let y=a.horizonLineFromTop(!1),b=new Pi(c,Math.max(y,h));return a.rayIntersectionCoordinate(a.pointRayIntersection(b,f))}pointCoordinate3D(a,c,h){let f=new Pi(c,h);if(a.elevation)return a.elevation.pointCoordinate(f);{let y=this.pointCoordinate(a,f.x,f.y,0);return[y.x,y.y,y.z]}}isPointAboveHorizon(a,c){if(a.elevation&&a.elevation.visibleDemTiles.length)return!this.pointCoordinate3D(a,c.x,c.y);let h=a.horizonLineFromTop();return c.y0?c<-vO+h&&(c=-vO+h):c>vO-h&&(c=vO-h);let b=y/Math.pow(wH(c),f),S=b*Math.sin(f*a),M=y-b*Math.cos(f*a);return S=.5*(S/Math.PI+.5),M=.5*(M/Math.PI+.5),{x:S,y:this.southernCenter?M:1-M,z:0}}unproject(a,c){a=(2*a-.5)*Math.PI,this.southernCenter&&(c=1-c),c=(2*(1-c)-.5)*Math.PI;let{n:h,f}=this,y=f-c,b=Math.sign(y),S=Math.sign(h)*Math.sqrt(a*a+y*y),M=Math.atan2(a,Math.abs(y))*b;y*h<0&&(M-=Math.PI*Math.sign(a)*b);let F=st(ge(M/h)+this.center[0],-180,180),z=st(ge(2*Math.atan(Math.pow(f/S,1/h))-vO),-Je,Je);return new de(F,this.southernCenter?-z:z)}}class A_e extends LT{constructor(a){super(a),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(a,c){return{x:Ve(a),y:et(c),z:0}}unproject(a,c){let h=it(a),f=Ze(c);return new de(h,f)}}let k_e=At(Je);class nUe extends LT{project(a,c){let h=(c=At(c))*c,f=h*h;return{x:.5*((a=At(a))*(.8707-.131979*h+f*(f*(.003971*h-.001529*f)-.013791))/Math.PI+.5),y:1-.5*(c*(1.007226+h*(.015085+f*(.028874*h-.044475-.005916*f)))/Math.PI+1),z:0}}unproject(a,c){a=(2*a-.5)*Math.PI;let h=c=(2*(1-c)-1)*Math.PI,f=25,y=0,b=h*h;do{b=h*h;let F=b*b;y=(h*(1.007226+b*(.015085+F*(.028874*b-.044475-.005916*F)))-c)/(1.007226+b*(.045255+F*(.259866*b-.311325-.005916*11*F))),h=st(h-y,-k_e,k_e)}while(Math.abs(y)>1e-6&&--f>0);b=h*h;let S=st(ge(a/(.8707+b*(b*(b*b*b*(.003971-.001529*b)-.013791)-.131979))),-180,180),M=ge(h);return new de(S,M)}}let M_e=At(Je);class oUe extends LT{project(a,c){c=At(c),a=At(a);let h=Math.cos(c),f=2/Math.PI,y=Math.acos(h*Math.cos(a/2)),b=Math.sin(y)/y,S=.5*(a*f+2*h*Math.sin(a/2)/b)||0,M=.5*(c+Math.sin(c)/b)||0;return{x:.5*(S/Math.PI+.5),y:1-.5*(M/Math.PI+1),z:0}}unproject(a,c){let h=a=(2*a-.5)*Math.PI,f=c=(2*(1-c)-1)*Math.PI,y=25,b=1e-6,S=0,M=0;do{let F=Math.cos(f),z=Math.sin(f),U=2*z*F,j=z*z,Z=F*F,X=Math.cos(h/2),ue=Math.sin(h/2),pe=2*X*ue,me=ue*ue,Ae=1-Z*X*X,Me=Ae?1/Ae:0,Be=Ae?Math.acos(F*X)*Math.sqrt(1/Ae):0,nt=.5*(2*Be*F*ue+2*h/Math.PI)-a,ot=.5*(Be*z+f)-c,pt=.5*Me*(Z*me+Be*F*X*j)+1/Math.PI,Ct=Me*(pe*U/4-Be*z*ue),Tt=.125*Me*(U*ue-Be*z*Z*pe),ai=.5*Me*(j*X+Be*me*F)+.5,Mt=Ct*Tt-ai*pt;S=(ot*Ct-nt*ai)/Mt,M=(nt*Tt-ot*pt)/Mt,h=st(h-S,-Math.PI,Math.PI),f=st(f-M,-M_e,M_e)}while((Math.abs(S)>b||Math.abs(M)>b)&&--y>0);return new de(ge(h),ge(f))}}class O_e extends LT{constructor(a){super(a),this.center=a.center||[0,0],this.parallels=a.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(At(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(a,c){let{scale:h,cosPhi:f}=this;return{x:At(a)*f*h+.5,y:-Math.sin(At(c))/f*h+.5,z:0}}unproject(a,c){let{scale:h,cosPhi:f}=this,y=-(c-.5)/h,b=st(ge((a-.5)/h)/f,-180,180),S=Math.asin(st(y*f,-1,1)),M=st(ge(S),-Je,Je);return new de(b,M)}}class rUe extends A_e{constructor(a){super(a),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug"],this.range=[3,5]}projectTilePoint(a,c,h){let f=KD(a,c,h);return Co(f,f,A1(H_(h))),{x:f[0],y:f[1],z:f[2]}}locationPoint(a,c,h){let f=K(c.lat,c.lng),y=vn([],f),b=h?a._centerAltitude+h:a.elevation?a.elevation.getAtPointOrZero(a.locationCoordinate(c),a._centerAltitude):a._centerAltitude;Lt(f,f,y,Qe(1,0)*qi*b);let S=V(new Float64Array(16));return q(S,a.pixelMatrix,a.globeMatrix),Co(f,f,S),new Pi(f[0],f[1])}pixelsPerMeter(a,c){return Qe(1,0)*c}pixelSpaceConversion(a,c,h){let f=Qe(1,a)*c,y=eo(Qe(1,45)*c,f,h);return this.pixelsPerMeter(a,c)/y}createTileMatrix(a,c,h){let f=ST(H_(h.canonical));return q(new Float64Array(16),a.globeMatrix,f)}createInversionMatrix(a,c){let{center:h}=a,f=A1(H_(c));return xe(f,f,At(h.lng)),fe(f,f,At(h.lat)),te(f,f,[a._pixelsPerMercatorPixel,a._pixelsPerMercatorPixel,1]),Float32Array.from(f)}pointCoordinate(a,c,h,f){return $D(a,c,h,!0)||new Yt(0,0)}pointCoordinate3D(a,c,h){let f=this.pointCoordinate(a,c,h,0);return[f.x,f.y,f.z]}isPointAboveHorizon(a,c){return!$D(a,c.x,c.y,!1)}farthestPixelDistance(a){let c=(function(f,y){let b=f.cameraToCenterDistance,S=f._centerAltitude*y,M=f._camera,F=f._camera.forward(),z=Xi([],wt([],F,-b),[0,0,S]),U=f.worldSize/(2*Math.PI),j=[0,0,-U],Z=f.width/f.height,X=Math.tan(f.fovAboveCenter),ue=wt([],M.up(),X),pe=wt([],M.right(),X*Z),me=vn([],Xi([],Xi([],F,ue),pe)),Ae=[],Me;if(new Zr(z,me).closestPointOnSphere(j,U,Ae)){let Be=Xi([],Ae,j),nt=xi([],Be,z);Me=Math.cos(f.fovAboveCenter)*Et(nt)}else{let Be=xi([],z,j),nt=xi([],j,z);vn(nt,nt);let ot=Et(Be)-U;Me=Math.sqrt(ot*(ot+2*U));let pt=Math.acos(Me/(U+ot))-Math.acos(Fo(F,nt));Me*=Math.cos(pt)}return 1.01*Me})(a,this.pixelsPerMeter(a.center.lat,a.worldSize)),h=ov(a.zoom);if(h>0){let f=E_e(a,Qe(1,a.center.lat)*a.worldSize),y=a.worldSize/(2*Math.PI),b=Math.max(a.width,a.height)/a.worldSize*Math.PI;return eo(c,f+y*(1-Math.cos(b)),Math.pow(h,10))}return c}upVector(a,c,h){return KD(c,h,a,1)}upVectorScale(a){return{metersToTile:YM(XM(H_(a)))}}}function R_e(u){let a=u.parallels,c=!!a&&Math.abs(a[0]+a[1])<.01;switch(u.name){case"mercator":return new A_e(u);case"equirectangular":return new tUe(u);case"naturalEarth":return new nUe(u);case"equalEarth":return new eUe(u);case"winkelTripel":return new oUe(u);case"albers":return c?new O_e(u):new J6e(u);case"lambertConformalConic":return c?new O_e(u):new iUe(u);case"globe":return new rUe(u)}throw new Error(`Invalid projection name: ${u.name}`)}let sUe=Mi.types,aUe=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function SH(u,a,c,h,f,y,b,S,M,F,z,U,j){let Z=S?Math.min(PT,Math.round(S[0])):0,X=S?Math.min(PT,Math.round(S[1])):0;u.emplaceBack(a,c,Math.round(32*h),Math.round(32*f),y,b,(Z<<1)+(M?1:0),X,16*F,16*z,256*U,256*j)}function TH(u,a,c){u.emplaceBack(a,c)}function IH(u,a,c,h,f,y,b){u.emplaceBack(a,c,h,f,y,b)}let EH=(u,a,c,h)=>{for(let f=0;f0&&(this.iconTransitioningVertexBuffer=a.createVertexBuffer(this.iconTransitioningVertexArray,y6e.members,!0)),this.globeExtVertexArray.length>0&&(this.globeExtVertexBuffer=a.createVertexBuffer(this.globeExtVertexArray,m6e.members,!0)),!this.zOffsetVertexBuffer&&(this.zOffsetVertexArray.length>0||y)&&(this.zOffsetVertexBuffer=a.createVertexBuffer(this.zOffsetVertexArray,g6e.members,!0)),!this.orientationVertexBuffer&&this.orientationVertexArray&&this.orientationVertexArray.length>0&&(this.orientationVertexBuffer=a.createVertexBuffer(this.orientationVertexArray,_6e.members,!0)),this.opacityVertexBuffer.itemSize=1),(h||f)&&this.programConfigurations.upload(a))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy(),this.iconTransitioningVertexBuffer&&this.iconTransitioningVertexBuffer.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy(),this.zOffsetVertexBuffer&&this.zOffsetVertexBuffer.destroy(),this.orientationVertexBuffer&&this.orientationVertexBuffer.destroy())}}yn(pJ,"SymbolBuffers");class hJ{constructor(a,c,h){this.layoutVertexArray=new a,this.layoutAttributes=c,this.indexArray=new h,this.segments=new Ya,this.collisionVertexArray=new zD,this.collisionVertexArrayExt=new xm}upload(a){this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=a.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=a.createVertexBuffer(this.collisionVertexArray,v6e.members,!0),this.collisionVertexBufferExt=a.createVertexBuffer(this.collisionVertexArrayExt,b6e.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}yn(hJ,"CollisionBuffers");class AH{constructor(a){this.collisionBoxArray=a.collisionBoxArray,this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(b=>b.fqid),this.index=a.index,this.pixelRatio=a.pixelRatio,this.sourceLayerIndex=a.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.hasAnyIconTextFit=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=V([]),this.placementViewportMatrix=V([]);let c=this.layers[0]._unevaluatedLayout._values;this.worldview=a.worldview,this.textSizeData=l_e(this.zoom,c["text-size"],this.worldview),this.iconSizeData=l_e(this.zoom,c["icon-size"],this.worldview);let h=this.layers[0].layout,f=h.get("symbol-sort-key"),y=h.get("symbol-z-order");this.lut=a.lut,this.canOverlap=h.get("text-allow-overlap")||h.get("icon-allow-overlap")||h.get("text-ignore-placement")||h.get("icon-ignore-placement"),this.sortFeaturesByKey=y!=="viewport-y"&&f.constantOr(1)!==void 0,this.sortFeaturesByY=(y==="viewport-y"||y==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,this.writingModes=h.get("text-writing-mode").map(b=>Bf[b]),this.stateDependentLayerIds=this.layers.filter(b=>b.isStateDependent()).map(b=>b.id),this.sourceID=a.sourceID,this.projection=a.projection,this.hasAnyZOffset=!1,this.zOffsetSortDirty=!1,this.zOffsetBuffersNeedUpload=!1,this.elevationType="none",this.elevationStateComplete=!1,this.activeReplacements=[],this.replacementUpdateTime=0,this.hasAnySecondaryIcon=!1}createArrays(){this.text=new pJ(new Tm(this.layers,{zoom:this.zoom,lut:this.lut},a=>a.startsWith("text")||a.startsWith("symbol"))),this.icon=new pJ(new Tm(this.layers,{zoom:this.zoom,lut:this.lut},a=>a.startsWith("icon")||a.startsWith("symbol"))),this.glyphOffsetArray=new vT,this.lineVertexArray=new j0,this.symbolInstances=new w1}calculateGlyphDependencies(a,c,h,f,y){for(let b of a){let S=b.codePointAt(0);if(S===void 0)break;if(c[S]=!0,f&&y&&S<=65535){let M=W3[b];M&&(c[M.charCodeAt(0)]=!0)}}}updateFootprints(a,c){}updateReplacement(a,c){if(c.updateTime===this.replacementUpdateTime)return!1;this.replacementUpdateTime=c.updateTime;let h=c.getReplacementRegionsForTile(a.toUnwrapped(),!0);return!eA(this.activeReplacements,h)&&(this.activeReplacements=h,!0)}populate(a,c,h,f){let y=this.layers[0],b=y.layout,S=this.projection.name==="globe",M=b.get("text-font"),F=b.get("text-field"),z=b.get("icon-image"),[U,j]=b.get("icon-size-scale-range"),Z=st(c.scaleFactor||1,U,j),X=(F.value.kind!=="constant"||F.value.value instanceof wu&&!F.value.value.isEmpty()||F.value.value.toString().length>0)&&(M.value.kind!=="constant"||M.value.value.length>0),ue=z.value.kind!=="constant"||!!z.value.value||Object.keys(z.parameters).length>0,pe=b.get("symbol-sort-key");if(this.features=[],!X&&!ue)return;let me=c.iconDependencies,Ae=c.glyphDependencies,Me=c.availableImages,Be=new ra(this.zoom,{worldview:this.worldview});for(let{feature:nt,id:ot,index:pt,sourceLayerIndex:Ct}of a){let Tt=y._featureFilter.needGeometry,ai=Fi(nt,Tt);if(!y._featureFilter.filter(Be,ai,h))continue;if(Tt||(ai.geometry=un(nt,h,f)),S&&nt.type!==1&&h.z<=5){let Ii=ai.geometry,Ni=.98078528056,oi=(Ei,Kt)=>Fo(KD(Ei.x,Ei.y,h,1),KD(Kt.x,Kt.y,h,1))=0;for(let oi of Mt.sections)if(oi.image){let Ei=oi.image.getPrimary().scaleSelf(this.pixelRatio),Kt=Ei.id.toString(),Ht=me.get(Kt)||[];Ht.push(Ei),me.set(Kt,Ht)}else{let Ei=f1(Mt.toString()),Kt=oi.fontStack||Ii,Ht=Ae[Kt]=Ae[Kt]||{};this.calculateGlyphDependencies(oi.text,Ht,Ni,this.allowVerticalPlacement,Ei)}}}if(b.get("symbol-placement")==="line"&&(this.features=(function(nt){let ot={},pt={},Ct=[],Tt=0;function ai(vi){Ct.push(nt[vi]),Tt++}function Mt(vi,Ii,Ni){let oi=pt[vi];return delete pt[vi],pt[Ii]=oi,Ct[oi].geometry[0].pop(),Ct[oi].geometry[0]=Ct[oi].geometry[0].concat(Ni[0]),oi}function gi(vi,Ii,Ni){let oi=ot[Ii];return delete ot[Ii],ot[vi]=oi,Ct[oi].geometry[0].shift(),Ct[oi].geometry[0]=Ni[0].concat(Ct[oi].geometry[0]),oi}function Oi(vi,Ii,Ni){let oi=Ni?Ii[0][Ii[0].length-1]:Ii[0][0];return`${vi}:${oi.x}:${oi.y}`}for(let vi=0;vivi.geometry)})(this.features)),b.get("symbol-elevation-reference")==="hd-road-markup"){if(this.elevationType="road",c.elevationFeatures){!this.elevationFeatures&&c.elevationFeatures.length>0&&(this.elevationFeatures=[],this.elevationFeatureIdToIndex=new Map);for(let nt of c.elevationFeatures)this.elevationFeatureIdToIndex.set(nt.id,this.elevationFeatures.length),this.elevationFeatures.push(nt)}}else b.get("symbol-z-elevate")&&(this.elevationType="offset");this.elevationType!=="none"&&(this.zOffsetBuffersNeedUpload=!0),this.sortFeaturesByKey&&this.features.sort((nt,ot)=>nt.sortKey-ot.sortKey)}update(a,c,h,f,y,b,S){this.text.programConfigurations.updatePaintArrays(a,c,y,h,f,b,S,this.worldview),this.icon.programConfigurations.updatePaintArrays(a,c,y,h,f,b,S,this.worldview)}updateRoadElevation(a){if(this.elevationType!=="road"||!this.elevationFeatures||this.elevationStateComplete)return;this.elevationStateComplete=!0,this.hasAnyZOffset=!1;let c=!1,h=Ft(a),f=1/h,y=!1,b=!1;for(let S=0;S0||j>0,pe=Z>0,me=this.elevationFeatures[M.elevationFeatureIndex];if(me){let Ae=new Pi(M.tileAnchorX,M.tileAnchorY),Me=.075+me.pointElevation(Ae);M.zOffset!==Me&&(c=!0,M.zOffset=Me);let Be=me.computeSlopeNormal(Ae,f),nt=vu(Ci(),we(0,0,1),Be);pr(F,F,nt),pr(z,z,nt),F[2]*=h,z[2]*=h,F[0]===1&&F[1]===0&&F[2]===0&&z[0]===0&&z[1]===1&&z[2]===0||(y=y||ue,b=b||pe)}if(ue&&(EH(this.text.orientationVertexArray,U,F,z),EH(this.text.orientationVertexArray,j,F,z)),pe){let{placedIconSymbolIndex:Ae,verticalPlacedIconSymbolIndex:Me}=M;Ae>=0&&EH(this.icon.orientationVertexArray,Z,F,z),Me>=0&&EH(this.icon.orientationVertexArray,X,F,z)}}y||(this.text.orientationVertexArray=void 0),b||(this.icon.orientationVertexArray=void 0),c&&(this.zOffsetBuffersNeedUpload=!0,this.zOffsetSortDirty=!0)}updateZOffset(){let a=(y,b,S)=>{h+=b,h>y.length&&y.resize(h);for(let M=-b;M<0;M++)y.emplace(M+h,S)},c=(y,b,S)=>{f+=b,f>y.length&&y.resize(f);for(let M=-b;M<0;M++)y.emplace(M+f,S)};if(!this.zOffsetBuffersNeedUpload)return;this.zOffsetBuffersNeedUpload=!1;let h=0,f=0;for(let y=0;y0;if((S>0||M>0)&&(a(this.text.zOffsetVertexArray,S,z),a(this.text.zOffsetVertexArray,M,z)),U){let{placedIconSymbolIndex:j,verticalPlacedIconSymbolIndex:Z}=b;j>=0&&c(this.icon.zOffsetVertexArray,F,z),Z>=0&&c(this.icon.zOffsetVertexArray,b.numVerticalIconVertices,z)}}this.text.zOffsetVertexBuffer&&this.text.zOffsetVertexBuffer.updateData(this.text.zOffsetVertexArray),this.icon.zOffsetVertexBuffer&&this.icon.zOffsetVertexBuffer.updateData(this.icon.zOffsetVertexArray)}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(a){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(a),this.iconCollisionBox.upload(a)),this.text.upload(a,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload,this.zOffsetBuffersNeedUpload),this.icon.upload(a,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload,this.zOffsetBuffersNeedUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}getProjection(){return this.projectionInstance||(this.projectionInstance=R_e(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(a,c){let h=this.lineVertexArray.length;if(a.segment!==void 0)for(let{x:f,y}of c)this.lineVertexArray.emplaceBack(f,y);return{lineStartIndex:h,lineLength:this.lineVertexArray.length-h}}addSymbols(a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue,pe){let me=a.indexArray,Ae=a.layoutVertexArray,Me=a.globeExtVertexArray,Be=a.segments.prepareSegment(4*c.length,Ae,me,this.canOverlap?b.sortKey:void 0),nt=this.glyphOffsetArray.length,ot=Be.vertexLength,pt=this.allowVerticalPlacement&&S===Bf.vertical?Math.PI/2:0,Ct=b.text&&b.text.sections;for(let ai=0;ai=0?c.rightJustifiedTextSymbolIndex:c.centerJustifiedTextSymbolIndex>=0?c.centerJustifiedTextSymbolIndex:c.leftJustifiedTextSymbolIndex>=0?c.leftJustifiedTextSymbolIndex:c.verticalPlacedTextSymbolIndex>=0?c.verticalPlacedTextSymbolIndex:f),b=rJ(this.textSizeData,a,y)/lu;return this.tilePixelRatio*b}getSymbolInstanceIconSize(a,c,h){let f=this.icon.placedSymbolArray.get(h),y=rJ(this.iconSizeData,a,f);return this.tilePixelRatio*y}_commitDebugCollisionVertexUpdate(a,c,h,f){a.emplaceBack(c,-h,-h,f),a.emplaceBack(c,h,-h,f),a.emplaceBack(c,h,h,f),a.emplaceBack(c,-h,h,f)}_updateTextDebugCollisionBoxes(a,c,h,f,y,b,S){for(let M=f;M0}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}hasIconTextFit(){return this.hasAnyIconTextFit}addIndicesForPlacedSymbol(a,c){let h=a.placedSymbolArray.get(c),f=h.vertexStartIndex+4*h.numGlyphs;for(let y=h.vertexStartIndex;yf[S]-f[M]||y[M]-y[S]),b}getSortedIndexesByZOffset(){if(!this.zOffsetSortDirty)return this.symbolInstanceIndexesSortedZOffset;if(!this.symbolInstanceIndexesSortedZOffset){this.symbolInstanceIndexesSortedZOffset=[];for(let a=0;athis.symbolInstances.get(c).zOffset-this.symbolInstances.get(a).zOffset)}addToSortKeyRanges(a,c){let h=this.sortKeyRanges[this.sortKeyRanges.length-1];h&&h.sortKey===c?h.symbolInstanceEnd=a+1:this.sortKeyRanges.push({sortKey:c,symbolInstanceStart:a,symbolInstanceEnd:a+1})}sortFeatures(a){if(this.sortFeaturesByY&&this.sortedAngle!==a&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(a),this.sortedAngle=a,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let c of this.symbolInstanceIndexes){let h=this.symbolInstances.get(c);this.featureSortOrder.push(h.featureIndex);let{rightJustifiedTextSymbolIndex:f,centerJustifiedTextSymbolIndex:y,leftJustifiedTextSymbolIndex:b,verticalPlacedTextSymbolIndex:S,placedIconSymbolIndex:M,verticalPlacedIconSymbolIndex:F}=h;f>=0&&this.addIndicesForPlacedSymbol(this.text,f),y>=0&&y!==f&&this.addIndicesForPlacedSymbol(this.text,y),b>=0&&b!==y&&b!==f&&this.addIndicesForPlacedSymbol(this.text,b),S>=0&&this.addIndicesForPlacedSymbol(this.text,S),M>=0&&this.addIndicesForPlacedSymbol(this.icon,M),F>=0&&this.addIndicesForPlacedSymbol(this.icon,F)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let F_e,P_e,mJ;yn(AH,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),AH.addDynamicAttributes=DH;class L_e{constructor(a){this.type=a.property.overrides?a.property.overrides.runtimeType:Cu,this.defaultValue=a}evaluate(a){if(a.formattedSection){let c=this.defaultValue.property.overrides;if(c&&c.hasOverride(a.formattedSection))return c.getOverride(a.formattedSection)}return a.feature&&a.featureState?this.defaultValue.evaluate(a.feature,a.featureState):this.defaultValue.property.specification.default}eachChild(a){this.defaultValue.isConstant()||a(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}yn(L_e,"FormatSectionOverride",{omit:["defaultValue"]});let fJ=()=>mJ||(mJ={layout:F_e||(F_e=new qs({"symbol-placement":new Vi(kt.layout_symbol["symbol-placement"]),"symbol-spacing":new Vi(kt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Vi(kt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new an(kt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Vi(kt.layout_symbol["symbol-z-order"]),"symbol-z-elevate":new Vi(kt.layout_symbol["symbol-z-elevate"]),"symbol-elevation-reference":new Vi(kt.layout_symbol["symbol-elevation-reference"]),"icon-allow-overlap":new Vi(kt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Vi(kt.layout_symbol["icon-ignore-placement"]),"icon-optional":new Vi(kt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Vi(kt.layout_symbol["icon-rotation-alignment"]),"icon-size":new an(kt.layout_symbol["icon-size"]),"icon-size-scale-range":new Vi(kt.layout_symbol["icon-size-scale-range"]),"icon-text-fit":new an(kt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new an(kt.layout_symbol["icon-text-fit-padding"]),"icon-image":new an(kt.layout_symbol["icon-image"]),"icon-image-use-theme":new Vi({type:"string",default:"default","property-type":"data-constant"}),"icon-rotate":new an(kt.layout_symbol["icon-rotate"]),"icon-padding":new Vi(kt.layout_symbol["icon-padding"]),"icon-keep-upright":new Vi(kt.layout_symbol["icon-keep-upright"]),"icon-offset":new an(kt.layout_symbol["icon-offset"]),"icon-anchor":new an(kt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Vi(kt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Vi(kt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Vi(kt.layout_symbol["text-rotation-alignment"]),"text-field":new an(kt.layout_symbol["text-field"]),"text-font":new an(kt.layout_symbol["text-font"]),"text-size":new an(kt.layout_symbol["text-size"]),"text-size-scale-range":new Vi(kt.layout_symbol["text-size-scale-range"]),"text-max-width":new an(kt.layout_symbol["text-max-width"]),"text-line-height":new an(kt.layout_symbol["text-line-height"]),"text-letter-spacing":new an(kt.layout_symbol["text-letter-spacing"]),"text-justify":new an(kt.layout_symbol["text-justify"]),"text-radial-offset":new an(kt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Vi(kt.layout_symbol["text-variable-anchor"]),"text-anchor":new an(kt.layout_symbol["text-anchor"]),"text-max-angle":new Vi(kt.layout_symbol["text-max-angle"]),"text-writing-mode":new Vi(kt.layout_symbol["text-writing-mode"]),"text-rotate":new an(kt.layout_symbol["text-rotate"]),"text-padding":new Vi(kt.layout_symbol["text-padding"]),"text-keep-upright":new Vi(kt.layout_symbol["text-keep-upright"]),"text-transform":new an(kt.layout_symbol["text-transform"]),"text-offset":new an(kt.layout_symbol["text-offset"]),"text-allow-overlap":new Vi(kt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Vi(kt.layout_symbol["text-ignore-placement"]),"text-optional":new Vi(kt.layout_symbol["text-optional"]),visibility:new Vi(kt.layout_symbol.visibility)})),paint:P_e||(P_e=new qs({"icon-opacity":new an(kt.paint_symbol["icon-opacity"]),"icon-occlusion-opacity":new an(kt.paint_symbol["icon-occlusion-opacity"]),"icon-emissive-strength":new an(kt.paint_symbol["icon-emissive-strength"]),"text-emissive-strength":new an(kt.paint_symbol["text-emissive-strength"]),"icon-color":new an(kt.paint_symbol["icon-color"]),"icon-halo-color":new an(kt.paint_symbol["icon-halo-color"]),"icon-halo-width":new an(kt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new an(kt.paint_symbol["icon-halo-blur"]),"icon-translate":new Vi(kt.paint_symbol["icon-translate"]),"icon-translate-anchor":new Vi(kt.paint_symbol["icon-translate-anchor"]),"icon-image-cross-fade":new Vi(kt.paint_symbol["icon-image-cross-fade"]),"text-opacity":new an(kt.paint_symbol["text-opacity"]),"text-occlusion-opacity":new an(kt.paint_symbol["text-occlusion-opacity"]),"text-color":new an(kt.paint_symbol["text-color"],{runtimeType:ud,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new an(kt.paint_symbol["text-halo-color"]),"text-halo-width":new an(kt.paint_symbol["text-halo-width"]),"text-halo-blur":new an(kt.paint_symbol["text-halo-blur"]),"text-translate":new Vi(kt.paint_symbol["text-translate"]),"text-translate-anchor":new Vi(kt.paint_symbol["text-translate-anchor"]),"icon-color-saturation":new Vi(kt.paint_symbol["icon-color-saturation"]),"icon-color-contrast":new Vi(kt.paint_symbol["icon-color-contrast"]),"icon-color-brightness-min":new Vi(kt.paint_symbol["icon-color-brightness-min"]),"icon-color-brightness-max":new Vi(kt.paint_symbol["icon-color-brightness-max"]),"symbol-z-offset":new an(kt.paint_symbol["symbol-z-offset"]),"icon-color-use-theme":new an({type:"string",default:"default","property-type":"data-driven"}),"icon-halo-color-use-theme":new an({type:"string",default:"default","property-type":"data-driven"}),"text-color-use-theme":new an({type:"string",default:"default","property-type":"data-driven"}),"text-halo-color-use-theme":new an({type:"string",default:"default","property-type":"data-driven"})}))},mJ);class kH extends Eu{constructor(a,c,h,f){super(a,fJ(),c,h,f,a.layout?a.layout["icon-image-use-theme"]:null),this._colorAdjustmentMatrix=V([]),this.hasOcclusionOpacityProperties=a.paint!==void 0&&("icon-occlusion-opacity"in a.paint||"text-occlusion-opacity"in a.paint)}_handleSpecialPaintPropertyUpdate(a){a!=="icon-occlusion-opacity"&&a!=="text-occlusion-opacity"||(this.hasOcclusionOpacityProperties=!0)}recalculate(a,c){super.recalculate(a,c),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"));let h=this.layout.get("text-writing-mode");if(h){let f=[];for(let y of h)f.indexOf(y)<0&&f.push(y);this.layout._values["text-writing-mode"]=f}else this.layout._values["text-writing-mode"]=this.layout.get("symbol-placement")==="point"?["horizontal"]:["horizontal","vertical"];this._setPaintOverrides()}getColorAdjustmentMatrix(a,c,h,f){return this._saturation===a&&this._contrast===c&&this._brightnessMin===h&&this._brightnessMax===f||(this._colorAdjustmentMatrix=(function(y,b,S,M){y=Dh(y),b=Wu(b);let F=N(),z=y/3,U=1-2*z,j=[U,z,z,0,z,U,z,0,z,z,U,0,0,0,0,1],Z=.5-.5*b,X=M-S;return q(F,[X,0,0,0,0,X,0,0,0,0,X,0,S,S,S,1],[b,0,0,0,0,b,0,0,0,0,b,0,Z,Z,Z,1]),q(F,F,j),F})(a,c,h,f),this._saturation=a,this._contrast=c,this._brightnessMin=h,this._brightnessMax=f),this._colorAdjustmentMatrix}getValueAndResolveTokens(a,c,h,f){let y=this.layout.get(a).evaluate(c,{},h,f),b=this._unevaluatedLayout._values[a];return b.isDataDriven()||h1(b.value)||!y?y:(function(S,M){return M.replace(/{([^{}]+)}/g,(F,z)=>z in S?String(S[z]):"")})(c.properties,y)}createBucket(a){return new AH(a)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(let a of fJ().paint.overridableProperties){if(!kH.hasPaintOverride(this.layout,a))continue;let c=this.paint.get(a),h=new L_e(c),f=new Nh(h,c.property.specification,this.scope,this.options,this.layout.get("icon-image-use-theme")),y=null;y=c.value.kind==="constant"||c.value.kind==="source"?new Ef("source",f):new A_("composite",f,c.value.zoomStops,c.value.interpolationType),this.paint._values[a]=new Yy(c.property,y,c.parameters)}}_handleOverridablePaintPropertyUpdate(a,c,h){return!(!this.layout||c.isDataDriven()||h.isDataDriven())&&kH.hasPaintOverride(this.layout,a)}static hasPaintOverride(a,c){let h=a.get("text-field"),f=fJ().paint.properties[c],y=!1,b=S=>{for(let M of S)if(f.overrides&&f.overrides.hasOverride(M))return void(y=!0)};if(h.value.kind==="constant"&&h.value.value instanceof wu)b(h.value.value.sections);else if(h.value.kind==="source"){let S=F=>{y||(F instanceof Qo&&Bc(F.value)===A0?b(F.value.sections):F instanceof Ly?b(F.sections):F.eachChild(S))},M=h.value;M._styleExpression&&S(M._styleExpression.expression)}return y}getProgramIds(){return["symbol"]}getDefaultProgramParams(a,c,h){return{config:new Og(this,{zoom:c,lut:h}),overrideFog:!1}}hasElevation(){return this.layout&&this.layout.get("symbol-elevation-reference")==="hd-road-markup"}}let N_e,B_e,V_e,z_e;var gJ=Mr([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);function MH(u,a,c,h,f,y,b,S){let M=[u,a,1,c,h,1,f,y,1],F=[b,S,1],z=w([],M),[U,j,Z]=ro(F,F,z);return O(M,M,[U,0,0,0,j,0,0,0,Z])}function U_e(u,a,c,h,f,y,b,S){let M=(function(F,z,U,j,Z,X,ue,pe){let me=MH(0,0,1,0,1,1,0,1),Ae=MH(F,z,U,j,Z,X,ue,pe);return O(Ae,Ae,w([],me))})(u,a,c,h,f,y,b,S);return[M[2]/M[8]/qi,M[5]/M[8]/qi]}function OH(u){return[u[0],Math.min(Math.max(u[1],-Je),Je)]}class H_e extends D0{constructor(a,c,h,f){super(),this.id=a,this.dispatcher=h,this.coordinates=c.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.onNorthPole=!1,this.onSouthPole=!1,this.setEventedParent(f),this.options=c,this._dirty=!1}load(a,c){if(this._loaded=c||!1,this.fire(new _f("dataloading",{dataType:"source"})),this.url=this.options.url,!this.url)return a&&(this.coordinates=a),this._loaded=!0,void this._finishLoading();this._imageRequest=Tl(this.map._requestManager.transformRequest(this.url,ES.Image),(h,f)=>{this._imageRequest=null,this._loaded=!0,h?this.fire(new Qc(h)):f&&(this.image=f instanceof HTMLImageElement?ff.getImageData(f):f,this._dirty=!0,this.width=this.image.width,this.height=this.image.height,a&&(this.coordinates=a),this._finishLoading())})}loaded(){return this._loaded}updateImage(a){return a.url?(this._imageRequest&&a.url!==this.options.url&&(this._imageRequest.cancel(),this._imageRequest=null),this.options.url=a.url,this.load(a.coordinates,this._loaded),this):this}setTexture(a){if(!(a.handle instanceof WebGLTexture))throw new Error("The provided handle is not a WebGLTexture instance");return this.texture=new aA(this.map.painter.context,a.handle),this.width=a.dimensions[0],this.height=a.dimensions[1],this._dirty=!1,this._loaded=!0,this._finishLoading(),this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new _f("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(a){this.map=a,this.load()}onRemove(a){this._imageRequest&&(this._imageRequest.cancel(),this._imageRequest=null),!this.texture||this.texture instanceof aA||this.texture.destroy(),this.boundsBuffer&&(this.boundsBuffer.destroy(),this.elevatedGlobeVertexBuffer&&this.elevatedGlobeVertexBuffer.destroy(),this.elevatedGlobeIndexBuffer&&this.elevatedGlobeIndexBuffer.destroy())}setCoordinates(a){if(this.coordinates=a,this._boundsArray=void 0,this._unsupportedCoords=!1,!a.length)return this;this.onNorthPole=!1,this.onSouthPole=!1;let c=a[0][1],h=a[0][1];for(let y of a)y[1]>h&&(h=y[1]),y[1]Je?this.onNorthPole=!0:f<-Je&&(this.onSouthPole=!0),!this.onNorthPole&&!this.onSouthPole){let y=a.map(Yt.fromLngLat);this.tileID=(function(b){let S=1/0,M=1/0,F=-1/0,z=-1/0;for(let ue of b)S=Math.min(S,ue.x),M=Math.min(M,ue.y),F=Math.max(F,ue.x),z=Math.max(z,ue.y);let U=Math.max(F-S,z-M),j=Math.max(0,Math.floor(-Math.log2(U))),Z=Math.pow(2,j),X=Math.floor((S+F)/2*Z);return X>1&&(X-=1),new U_(j,X,Math.floor((M+z)/2*Z))})(y),this.minzoom=this.maxzoom=this.tileID.z}return this.fire(new _f("data",{dataType:"source",sourceDataType:"content"})),this}_clear(){!this.texture||this.texture instanceof aA||(this.texture.destroy(),this._dirty=!0),this.texture=null,this._boundsArray=void 0,this._unsupportedCoords=!1}_prepareData(a){for(let me in this.tiles){let Ae=this.tiles[me];Ae.state!=="loaded"&&(Ae.state="loaded",Ae.texture=this.texture)}if(this._boundsArray||this.onNorthPole||this.onSouthPole||this._unsupportedCoords)return;let c=eB(new U_(0,0,0),this.map.transform.projection),h=[c.projection.project(this.coordinates[0][0],this.coordinates[0][1]),c.projection.project(this.coordinates[1][0],this.coordinates[1][1]),c.projection.project(this.coordinates[2][0],this.coordinates[2][1]),c.projection.project(this.coordinates[3][0],this.coordinates[3][1])];if(!(function(me){let Ae=me[1].x-me[0].x,Me=me[1].y-me[0].y,Be=me[2].x-me[1].x,nt=me[2].y-me[1].y,ot=me[3].x-me[2].x,pt=me[3].y-me[2].y,Ct=me[0].x-me[3].x,Tt=me[0].y-me[3].y,ai=Ae*nt-Be*Me,Mt=Be*pt-ot*nt,gi=ot*Tt-Ct*pt,Oi=Ct*Me-Ae*Tt;return ai>0&&Mt>0&&gi>0&&Oi>0||ai<0&&Mt<0&&gi<0&&Oi<0})(h))return console.warn("Image source coordinates are defining non-convex area in the Mercator projection"),void(this._unsupportedCoords=!0);let f=eB(this.tileID,this.map.transform.projection),[y,b,S,M]=this.coordinates.map(me=>{let Ae=f.projection.project(me[0],me[1]);return D_e(f,Ae)._round()});this.perspectiveTransform=U_e(y.x,y.y,b.x,b.y,S.x,S.y,M.x,M.y);let F=this._boundsArray=new Xy;F.emplaceBack(y.x,y.y,0,0),F.emplaceBack(b.x,b.y,qi,0),F.emplaceBack(M.x,M.y,0,qi),F.emplaceBack(S.x,S.y,qi,qi),this.boundsBuffer&&(this.boundsBuffer.destroy(),this.elevatedGlobeVertexBuffer&&this.elevatedGlobeVertexBuffer.destroy(),this.elevatedGlobeIndexBuffer&&this.elevatedGlobeIndexBuffer.destroy()),this.boundsBuffer=a.createVertexBuffer(F,gJ.members),this.boundsSegments=Ya.simpleSegment(0,0,4,2);let z=[],U=[OH((j=this.coordinates)[0]),OH(j[1]),OH(j[2]),OH(j[3])];var j;let[Z,X,ue,pe]=(function(me){let Ae=me[0][0],Me=Ae,Be=me[0][1],nt=Be;for(let ot=1;otMe&&(Me=me[ot][0]),me[ot][1]nt&&(nt=me[ot][1]);return[Ae,Be,Me-Ae,nt-Be]})(U);{let me=new Xy,[Ae,Me,Be,nt]=(function(oi){let Ei=oi[0].x,Kt=Ei,Ht=oi[0].y,zi=Ht;for(let Li=1;LiKt&&(Kt=oi[Li].x),oi[Li].yzi&&(zi=oi[Li].y);return[Ei,Ht,Kt-Ei,zi-Ht]})(h),ot=oi=>[(oi.x-Ae)/Be,(oi.y-Me)/nt],[pt,Ct,Tt,ai]=h.map(ot),Mt=(function(oi,Ei,Kt,Ht,zi,Li,Qn,bn){let Fn=MH(0,0,1,0,1,1,0,1);return O(Fn,Fn,w([],MH(oi,Ei,Kt,Ht,zi,Li,Qn,bn)))})(pt[0],pt[1],Ct[0],Ct[1],Tt[0],Tt[1],ai[0],ai[1]);this.elevatedGlobePerspectiveTransform=U_e(pt[0],pt[1],Ct[0],Ct[1],Tt[0],Tt[1],ai[0],ai[1]);let gi=(oi,Ei)=>{z.push(oi.lng);let Kt=Math.round((oi.lng-Z)/ue*qi),Ht=Math.round((oi.lat-X)/pe*qi),zi=ot(Ei),Li=ro([],[zi[0],zi[1],1],Mt),Qn=Math.round(Li[0]/Li[2]*qi),bn=Math.round(Li[1]/Li[2]*qi);me.emplaceBack(Kt,Ht,Qn,bn)},Oi=h[3].x-h[0].x,vi=h[3].y-h[0].y,Ii=h[2].x-h[1].x,Ni=h[2].y-h[1].y;for(let oi=0;oi<65;oi++){let Ei=oi/64,Kt=[h[0].x+Ei*Oi,h[0].y+Ei*vi],Ht=[h[1].x+Ei*Ii,h[1].y+Ei*Ni],zi=Ht[0]-Kt[0],Li=Ht[1]-Kt[1];for(let Qn=0;Qn<65;Qn++){let bn=Qn/64,Fn={x:Kt[0]+zi*bn,y:Kt[1]+Li*bn};gi(c.projection.unproject(Fn.x,Fn.y),Fn)}}this.elevatedGlobeVertexBuffer=a.createVertexBuffer(me,gJ.members)}{this.maxLongitudeTriangleSize=0;let me=[],Ae=new Ec,Me=(Be,nt,ot)=>{Ae.emplaceBack(Be,nt,ot);let pt=z[Be],Ct=z[nt],Tt=z[ot],ai=Math.min(Math.min(pt,Ct),Tt),Mt=Math.max(Math.max(pt,Ct),Tt)-ai;Mt>this.maxLongitudeTriangleSize&&(this.maxLongitudeTriangleSize=Mt),me.push(ai+Mt/2)};for(let Be=0;Be<64;Be++)for(let nt=0;nt<64;nt++){let ot=65*Be+nt,pt=ot+1,Ct=ot+65,Tt=Ct+1;Me(ot,Ct,pt),Me(pt,Ct,Tt)}[me,Ae]=(function(Be,nt){let ot=Array.from({length:Be.length},(Tt,ai)=>ai);ot.sort((Tt,ai)=>Be[Tt]-Be[ai]);let pt=[],Ct=new Ec;for(let Tt=0;Tt{b.segments.push({vertexOffset:0,primitiveOffset:U,vertexLength:c.segments[0].vertexLength,primitiveLength:j,sortKey:void 0,vaos:{}})},M=.51*this.maxLongitudeTriangleSize;if(Math.abs(h[0]-f)<=M){let U=Ld(h,0,h.length,f+M);return U===h.length||S(U,xa(h,U+1,h.length,f+360-M)-U),b}fc.fqid),this.projection=a.projection,this.index=a.index,this.worldview=a.worldview,this.hasZoomDependentProperties=this.layers[0].isZoomDependent(),this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.hasPattern=!1,this.instancesPerModel={},this.validForExaggeration=0,this.maxVerticalOffset=0,this.maxScale=0,this.maxHeight=0,this.lookupDim=this.zoom>this.canonical.z+1?0:this.zoom>this.canonical.z?256:this.zoom>15?75:100,this.instanceCount=0,this.terrainElevationMin=0,this.terrainElevationMax=0,this.validForDEMTile={id:null,timestamp:0},this.modelUris=[],this.modelsRequested=!1,this.activeReplacements=[],this.replacementUpdateTime=0,this.styleDefinedModelURLs=a.styleDefinedModelURLs}updateFootprints(a,c){}populate(a,c,h,f){this.tileToMeter=Ft(h);let y=this.layers[0]._featureFilter.needGeometry;this.lookup=new Uint8Array(this.lookupDim*this.lookupDim);for(let{feature:b,id:S,index:M,sourceLayerIndex:F}of a){let z=S??(b.properties&&b.properties.hasOwnProperty("id")?b.properties.id:void 0),U=Fi(b,y);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom,{worldview:this.worldview}),U,h))continue;let j={id:z,sourceLayerIndex:F,index:M,geometry:y?U.geometry:un(b,h,f),properties:b.properties,type:b.type,patterns:{}},Z=this.addFeature(j,j.geometry,U);Z&&c.featureIndex.insert(b,j.geometry,M,F,this.index,this.instancesPerModel[Z].instancedDataArray.length,qi/32)}this.lookup=null}update(a,c,h,f){for(let y in this.instancesPerModel){let b=this.instancesPerModel[y];for(let S in a)b.idToFeaturesIndex.hasOwnProperty(S)&&(this.evaluate(b.features[b.idToFeaturesIndex[S]],a[S],b,!0),this.uploaded=!1)}this.maxHeight=0}updateZoomBasedPaintProperties(){if(!this.hasZoomDependentProperties)return!1;let a=!1;for(let c in this.instancesPerModel){let h=this.instancesPerModel[c];for(let f of h.features){let y=this.layers[0],b=f.feature,S=this.canonical,M=y.paint.get("model-rotation").evaluate(b,{},S),F=y.paint.get("model-scale").evaluate(b,{},S),z=y.paint.get("model-translation").evaluate(b,{},S);Ee(f.rotation,M)&&Ee(f.scale,F)&&Ee(f.translation,z)||(this.evaluate(f,f.featureStates,h,!0),a=!0)}}return a}updateReplacement(a,c,h,f){if(c.updateTime===this.replacementUpdateTime)return!1;this.replacementUpdateTime=c.updateTime;let y=c.getReplacementRegionsForTile(a.toUnwrapped(),!0);if(eA(this.activeReplacements,y))return!1;this.activeReplacements=y;let b=!1;for(let S in this.instancesPerModel){let M=this.instancesPerModel[S],F=M.instancedDataArray;for(let z of M.features){let U=z.instancedDataOffset,j=z.instancedDataCount;for(let Z=0;Zqi;ue=pe?ue-qi:ue;let me=Math.floor(ue),Ae=F.float32[X+1],Me=!1;for(let Be of this.activeReplacements)if(!k3(Be,h,Q_e.Model,f)&&!(Be.min.x>me||me>Be.max.x||Be.min.y>Ae||Ae>Be.max.y)&&(Me=P3(F3(me,Ae,a.canonical,Be.footprintTileId.canonical),Be.footprint),Me))break;F.float32[X]=Me?ue+qi:ue,b=b||Me!==pe}}}return b}isEmpty(){for(let a in this.instancesPerModel)if(this.instancesPerModel[a].instancedDataArray.length!==0)return!1;return!0}uploadPending(){return!this.uploaded}upload(a){if(!this.uploaded)for(let c in this.instancesPerModel){let h=this.instancesPerModel[c];h.instancedDataArray.length<0||h.instancedDataArray.length===0||(h.instancedDataBuffer?h.instancedDataBuffer.updateData(h.instancedDataArray):h.instancedDataBuffer=a.createVertexBuffer(h.instancedDataArray,ze.members,!0,void 0,this.instanceCount))}this.uploaded=!0}destroy(){for(let c in this.instancesPerModel){let h=this.instancesPerModel[c];h.instancedDataArray.length!==0&&h.instancedDataBuffer&&h.instancedDataBuffer.destroy()}let a=this.layers[0].modelManager;if(a&&this.modelUris&&this.modelsRequested)for(let c of this.modelUris)a.removeModel(c,"",!0)}addFeature(a,c,h){let f=this.layers[0],y=f.layout.get("model-id").evaluate(h,{},this.canonical);if(!y)return Er(`modelId is not evaluated for layer ${f.id} and it is not going to get rendered.`),y;(yJ(y,!1)||this.styleDefinedModelURLs[y]!==void 0)&&(this.modelUris.includes(y)||this.modelUris.push(y)),this.instancesPerModel[y]||(this.instancesPerModel[y]=new X_e);let b=this.instancesPerModel[y],S=b.instancedDataArray,M=new Z_e(h,S.length);for(let F of c)for(let z of F){if(z.x<0||z.x>=qi||z.y<0||z.y>=qi)continue;if(this.lookupDim!==0){let j=(this.lookupDim-1)/qi,Z=this.lookupDim*(z.y*j|0)+z.x*j|0;if(this.lookup){if(this.lookup[Z]!==0)continue;this.lookup[Z]=1}}this.instanceCount++;let U=S.length;S.resize(U+1),b.instancesEvaluatedElevation.push(0),S.float32[16*U]=z.x,S.float32[16*U+1]=z.y}return M.instancedDataCount=b.instancedDataArray.length-M.instancedDataOffset,M.instancedDataCount>0&&(a.id&&(b.idToFeaturesIndex[a.id]=b.features.length),b.features.push(M),this.evaluate(M,{},b,!1)),y}getModelUris(){return this.modelUris}evaluate(a,c,h,f){let y=this.layers[0],b=a.feature,S=this.canonical,M=a.rotation=y.paint.get("model-rotation").evaluate(b,c,S),F=a.scale=y.paint.get("model-scale").evaluate(b,c,S),z=a.translation=y.paint.get("model-translation").evaluate(b,c,S),U=y.paint.get("model-color").evaluate(b,c,S);U.a=y.paint.get("model-color-mix-intensity").evaluate(b,c,S);let j=[];this.maxVerticalOffset10?this.tileToMeter:Ft(S,Me)),me[pe+4]=z[0],me[pe+5]=z[1],me[pe+6]=z[2]+Ae,me[pe+7]=j[0],me[pe+8]=j[1],me[pe+9]=j[2],me[pe+10]=j[4],me[pe+11]=j[5],me[pe+12]=j[6],me[pe+13]=j[8],me[pe+14]=j[9],me[pe+15]=j[10],h.instancesEvaluatedElevation[ue]=z[2]}}}let J_e,e0e;yn(vJ,"ModelBucket",{omit:["layers"]}),yn(X_e,"PerModelAttributes"),yn(Z_e,"ModelFeature");class bO{constructor(a,c,h){this._demTile=a,this._dem=this._demTile.dem,this._scale=c,this._offset=h}static create(a,c,h){let f=h||a.findDEMTileFor(c);if(!f||!f.dem)return;let y=f.dem,b=f.tileID,S=1<F.fqid),this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id),this.modelTraits|=aa.CoordinateSpaceTile,this.uploaded=!1,this.hasPattern=!1,f&&(this.modelTraits|=aa.HasMapboxMeshFeatures),y&&(this.modelTraits|=aa.HasMeshoptCompression),this.zoom=-1,this.terrainExaggeration=1,this.projection={name:"mercator"},this.replacementUpdateTime=0,this.elevationReadFromZ=255,this.brightness=b,this.worldview=M,this.dirty=!0,this.needsUpload=!1,this.filter=null,this.nodesInfo=[];for(let F of c)this.nodesInfo.push(new o0e(F)),i0e(F,S.featureIndexArray.length,S.grid),S.featureIndexArray.emplaceBack(this.nodesInfo.length-1,0,S.bucketLayerIDs.length-1,0);this.states={}}updateFootprints(a,c){for(let h of this.getNodesInfo()){let f=h.node;f.footprint&&c.push({footprint:f.footprint,id:a})}}update(a){let c=Object.keys(a).length!==0;if(c&&!this.stateDependentLayers.length)return;let h=c?this.stateDependentLayers:this.layers;if(!gg(a,this.states))for(let f of h)this.evaluate(f,a);this.states=structuredClone(a)}populate(){console.log("populate 3D model bucket")}uploadPending(){return!this.uploaded||this.needsUpload}upload(a){if(!this.needsUpload)return;let c=this.getNodesInfo();for(let h of c){let f=h.node;this.uploaded?this.updatePbrBuffer(f):qh(f,a,!0)}for(let h of c)Jc(h.node);this.uploaded=!0,this.needsUpload=!1}updatePbrBuffer(a){let c=!1;if(!a.meshes)return c;for(let h of a.meshes)h.pbrBuffer&&(h.pbrBuffer.updateData(h.featureArray),c=!0);return c}needsReEvaluation(a,c,h){let f=a.transform.projectionOptions,y=a.style.getBrightness(),b=this.brightness!==y;if(!this.uploaded||this.dirty||f.name!==this.projection.name||rB(h.paint.get("model-color").value,b)||rB(h.paint.get("model-color-mix-intensity").value,b)||rB(h.paint.get("model-roughness").value,b)||rB(h.paint.get("model-emissive-strength").value,b)||rB(h.paint.get("model-height-based-emissive-strength-multiplier").value,b)){this.projection=f,this.brightness=y;let S=this.getNodesInfo();for(let M of S)M.state=null;return!0}return!1}evaluateTransform(a,c){if(a.transform.zoom===this.zoom)return;this.zoom=a.transform.zoom;let h=this.getNodesInfo(),f=this.id.canonical;for(let y of h){let b=y.feature;y.evaluatedTranslation=c.paint.get("model-translation").evaluate(b,{},f),y.evaluatedScale=c.paint.get("model-scale").evaluate(b,{},f)}}evaluate(a,c){let h=this.getNodesInfo();for(let f of h){if(!f.node.meshes)continue;let y=f.feature,b=c&&c[y.id];if(gg(b,f.state))continue;f.state=structuredClone(b);let S=f.node.meshes&&f.node.meshes[0].featureData,M=f.evaluatedColor[2],F=f.evaluatedRMEA[2],z=this.id.canonical;if(f.hasTranslucentParts=!1,S){for(let U=0;U=ot)continue;let oi=bJ[Ni],Ei=Math.abs(oi);Ei>Mt&&(ai=oi,Mt=Ei,gi=Ii,Oi=vi)}if(Mt>.1){let vi=1-(ot+.5*Math.abs(gi*Oi))/X,Ii=c._dem.get(Ct,pt)+ai*vi,Ni=c._dem.get(Ct+gi,pt+Oi),oi=c._dem.get(Ct-gi,pt-Oi,!0);(Ii-Ni)*(Ii-oi)>0&&(Ii=(Ni+oi)/2),bJ[Tt]=c._dem.set(Ct,pt,Ii),cA[Tt]=ot}}}}}S&&(c._demTile.needsDEMTextureUpload=!0,c._dem._timestamp=ff.now())}setFilter(a){this.filter=a?Qb(a):null}getNodesInfo(){return this.filter?this.nodesInfo.filter(a=>this.filter.filter(new ra(this.id.overscaledZ,{worldview:this.worldview}),a.feature,this.id.canonical)):this.nodesInfo}destroy(){let a=this.getNodesInfo();for(let c of a)Jc(c.node),Nf(c.node)}isEmpty(){return!this.nodesInfo.length}updateReplacement(a,c){if(c.updateTime===this.replacementUpdateTime)return;this.replacementUpdateTime=c.updateTime;let h=c.getReplacementRegionsForTile(a.toUnwrapped());for(let f of this.getNodesInfo()){let y=f.node.footprint;f.hiddenByReplacement=!!y&&!h.find(b=>b.footprint===y)}}getHeightAtTileCoord(a,c){let h=[],f=[0,0,0],y=V([]);for(let b of this.getNodesInfo()){let S=b.node.meshes[0],M=S.transformedAabb;if(aM.max[0]||c>M.max[1])continue;if(b.node.hidden===!0)return{height:1/0,maxHeight:b.feature.properties.height,hidden:!1,verticalScale:b.evaluatedScale[2]};$(y,b.node.matrix),f[0]=a,f[1]=c,Co(f,f,y);let F=(f[0]-S.aabb.min[0])/(S.aabb.max[0]-S.aabb.min[0])*Gr|0,z=Math.min(63,(f[1]-S.aabb.min[1])/(S.aabb.max[1]-S.aabb.min[1])*Gr|0)*Gr+Math.min(63,F),U=S.heightmap[z];if(!(U<0&&b.node.footprint))return b.hiddenByReplacement?void 0:{height:U,maxHeight:b.feature.properties.height,hidden:!1,verticalScale:b.evaluatedScale[2]};if(b.node.footprint.grid.query(new Pi(a,c),new Pi(a,c),h),h.length>0)return{height:void 0,maxHeight:b.feature.properties.height,hidden:b.hiddenByReplacement,verticalScale:b.evaluatedScale[2]}}}}function rB(u,a){return u instanceof Ef&&!u.isLightConstant&&a}function uUe(u,a,c,h,f,y,b,S){let M=(61440&a|(61440&a)>>4)>>8,F=(3840&a|(3840&a)>>4)>>4,z=240&a|(240&a)>>4;c[3]>0&&(M=eo(M,255*c[0],c[3]),F=eo(F,255*c[1],c[3]),z=eo(z,255*c[2],c[3]));let U=M<<8|F,j=z<<8|Math.floor(255*h[3]),Z=(function(ot){let pt=st(ot,0,2);return Math.min(Math.round(.5*pt*255),255)})(h[2])<<8|15*h[0]<<4|15*h[1],X=st(f[0],0,1),ue=st(f[1],0,1),pe=st(f[2],0,1),me=st(f[3],0,1),Ae,Me,Be,nt;if(X!==ue&&b!==y&&ue!==X){let ot=b-y;Me=1/(ot*(ue-X)),Be=-(y+ot*X)/(ot*(ue-X));let pt=st(f[4],-1,1);nt=Math.pow(10,pt),Ae=255*pe<<8|255*me}else Ae=65535,Me=0,Be=1,nt=1;if(u.emplaceBack(U,j,Z,Ae,Me,Be,nt),S){let ot=S.length;S.clear();for(let pt=0;pt>16&65535,z=y?M>>16&65535:65535&M,U=(15&z)<8?15&z:0,j=u.evaluatedRMEA[U],Z=u.evaluatedColor[U],X=u.emissionHeightBasedParams[U],ue;if(S&&U===2&&h.lights&&(ue=new iC,ue.resize(10*h.lights.length)),uUe(b.featureArray,F,Z,j,X,b.aabb.min[2],b.aabb.max[2],ue),ue&&S){S=!1;let pe=h.meshes[h.lightMeshIndex];pe.featureArray=ue,pe.featureArray._trim()}}b.featureArray._trim(),f++}}function r0e(u,a,c,h){let f=1<Be.polygon).flat());let pe=Z?S:null,[me,Ae]=(function(Be,nt,ot,pt,Ct,Tt,ai,Mt,gi,Oi,vi){return Be.projection.name==="globe"?(function(Ii,Ni,oi,Ei,Kt,Ht,zi,Li,Qn,bn,Fn){let Ki=[],Yn=[],Po=Ii.projection.upVectorScale(Fn,Ii.center.lat,Ii.worldSize).metersToTile,on=[0,0,0,1],Hn=[0,0,0,1],To=(gr,ir,An,Zo)=>{gr[0]=ir,gr[1]=An,gr[2]=Zo,gr[3]=1},qo=X8();oi>0&&(oi+=qo),Ei+=qo;for(let gr of Ni){let ir=[],An=[];for(let Zo of gr){let Yr=Zo.x+Kt.x,Ue=Zo.y+Kt.y,He=Ii.projection.projectTilePoint(Yr,Ue,Fn),$t=Ii.projection.upVector(Fn,Zo.x,Zo.y),ri=oi,nn=Ei;if(zi){let en=aO(Yr,Ue,oi,Ei,zi,Li,Qn,bn);ri+=en.base,nn+=en.top}oi!==0?To(on,He.x+$t[0]*Po*ri,He.y+$t[1]*Po*ri,He.z+$t[2]*Po*ri):To(on,He.x,He.y,He.z),To(Hn,He.x+$t[0]*Po*nn,He.y+$t[1]*Po*nn,He.z+$t[2]*Po*nn),Co(on,on,Ht),Co(Hn,Hn,Ht),ir.push(new M1(on[0],on[1],on[2])),An.push(new M1(Hn[0],Hn[1],Hn[2]))}Ki.push(ir),Yn.push(An)}return[Ki,Yn]})(Be,nt,ot,pt,Ct,Tt,ai,Mt,gi,Oi,vi):ai?(function(Ii,Ni,oi,Ei,Kt,Ht,zi,Li,Qn){let bn=[],Fn=[],Ki=[0,0,0,1];for(let Yn of Ii){let Po=[],on=[];for(let Hn of Yn){let To=Hn.x+Ei.x,qo=Hn.y+Ei.y,gr=aO(To,qo,Ni,oi,Ht,zi,Li,Qn);Ki[0]=To,Ki[1]=qo,Ki[2]=gr.base,Ki[3]=1,sn(Ki,Ki,Kt),Ki[3]=Math.max(Ki[3],1e-5);let ir=new M1(Ki[0]/Ki[3],Ki[1]/Ki[3],Ki[2]/Ki[3]);Ki[0]=To,Ki[1]=qo,Ki[2]=gr.top,Ki[3]=1,sn(Ki,Ki,Kt),Ki[3]=Math.max(Ki[3],1e-5);let An=new M1(Ki[0]/Ki[3],Ki[1]/Ki[3],Ki[2]/Ki[3]);Po.push(ir),on.push(An)}bn.push(Po),Fn.push(on)}return[bn,Fn]})(nt,ot,pt,Ct,Tt,ai,Mt,gi,Oi):(function(Ii,Ni,oi,Ei,Kt){let Ht=[],zi=[],Li=Kt[8]*Ni,Qn=Kt[9]*Ni,bn=Kt[10]*Ni,Fn=Kt[11]*Ni,Ki=Kt[8]*oi,Yn=Kt[9]*oi,Po=Kt[10]*oi,on=Kt[11]*oi;for(let Hn of Ii){let To=[],qo=[];for(let gr of Hn){let ir=gr.x+Ei.x,An=gr.y+Ei.y,Zo=Kt[0]*ir+Kt[4]*An+Kt[12],Yr=Kt[1]*ir+Kt[5]*An+Kt[13],Ue=Kt[2]*ir+Kt[6]*An+Kt[14],He=Kt[3]*ir+Kt[7]*An+Kt[15],$t=Zo+Li,ri=Yr+Qn,nn=Ue+bn,en=Math.max(He+Fn,1e-5),En=Zo+Ki,ao=Yr+Yn,_r=Ue+Po,vr=Math.max(He+on,1e-5);To.push(new M1($t/en,ri/en,nn/en)),qo.push(new M1(En/vr,ao/vr,_r/vr))}Ht.push(To),zi.push(qo)}return[Ht,zi]})(nt,ot,pt,Ct,Tt)})(y,h,U,z,F,b,pe,j,X,y.center.lat,u.tileID.canonical),Me=u.queryGeometry;return(function(Be,nt,ot){let pt=1/0;oh(ot,nt)&&(pt=sH(ot,nt[0]));for(let Ct=0;Ct{if(K3)return K3;let c=$ge();return K3=new p6e(c.paint.properties["line-width"].specification),K3.useIntegerZoom=!0,K3})().possiblyEvaluate(this._transitioningPaint._values["line-width"].value,u)}createBucket(u){return new XX(u)}getProgramIds(){return[this.paint.get("line-pattern").constantOr(1)?"linePattern":"line"]}getDefaultProgramParams(u,a,c){let h=jge(this);return{config:new Og(this,{zoom:a,lut:c}),defines:h,overrideFog:!1}}queryRadius(u){let a=u,c=qge(Em("line-width",this,a),Em("line-gap-width",this,a)),h=Em("line-offset",this,a);return c/2+Math.abs(h)+V_(this.paint.get("line-translate"))}queryIntersectsFeature(u,a,c,h,f,y){if(u.queryGeometry.isAboveHorizon)return!1;let b=G0(u.tilespaceGeometry,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),y.angle,u.pixelToTileUnitsFactor),S=u.pixelToTileUnitsFactor/2*qge(this.paint.get("line-width").evaluate(a,c),this.paint.get("line-gap-width").evaluate(a,c)),M=this.paint.get("line-offset").evaluate(a,c);return M&&(h=(function(F,z){let U=[],j=new Pi(0,0);for(let Z=0;Z=3){for(let X=0;X>16&255)/255,(u>>8&255)/255,(255&u)/255,1)}function EUe(u,a,c){u===1?(a.rgb_color=BH(c.readVarint()),a.paint="rgb_color"):u===2?(a.linear_gradient_idx=c.readVarint(),a.paint="linear_gradient_idx"):u===3?(a.radial_gradient_idx=c.readVarint(),a.paint="radial_gradient_idx"):u===5?c.readPackedFloat(a.dasharray):u===6?a.dashoffset=c.readFloat():u===7?a.miterlimit=c.readFloat():u===8?a.opacity=c.readVarint():u===9?a.width=c.readFloat():u===10?a.linecap=c.readVarint():u===11&&(a.linejoin=c.readVarint())}function DUe(u,a,c){u===1?a.transform=NH(c,c.readVarint()+c.pos):u===2?a.spread_method=c.readVarint():u===3?a.stops.push(c0e(c,c.readVarint()+c.pos)):u===4?a.x1=c.readFloat():u===5?a.y1=c.readFloat():u===6?a.x2=c.readFloat():u===7&&(a.y2=c.readFloat())}function c0e(u,a){return u.readFields(AUe,{offset:0,opacity:255,rgb_color:CJ},a)}function AUe(u,a,c){u===1?a.offset=c.readFloat():u===2?a.opacity=c.readVarint():u===3&&(a.rgb_color=BH(c.readVarint()))}function kUe(u,a,c){u===1?a.transform=NH(c,c.readVarint()+c.pos):u===2?a.spread_method=c.readVarint():u===3?a.stops.push(c0e(c,c.readVarint()+c.pos)):u===4?a.cx=c.readFloat():u===5?a.cy=c.readFloat():u===6?a.r=c.readFloat():u===7?a.fx=c.readFloat():u===8?a.fy=c.readFloat():u===9&&(a.fr=c.readFloat())}function MUe(u,a,c){u===1?a.transform=NH(c,c.readVarint()+c.pos):u===2?a.clip_path_idx=c.readVarint():u===3&&a.children.push(LH(c,c.readVarint()+c.pos))}function OUe(u,a,c){u===1?a.left=a.top=c.readFloat():u===2?a.width=a.height=c.readFloat():u===3?a.top=c.readFloat():u===4?a.height=c.readFloat():u===5?a.mask_type=c.readVarint():u===6?a.mask_idx=c.readVarint():u===7&&a.children.push(LH(c,c.readVarint()+c.pos))}class RUe{static calculate(a={},c=[]){let h=new Map,f=new Map;if(Object.keys(a).length===0)return h;c.forEach(y=>{f.set(y.name,y.rgb_color||new Ts(0,0,0))});for(let[y,b]of Object.entries(a))f.has(y)?h.set(f.get(y).toString(),b):console.warn(`Ignoring unknown image variable "${y}"`);return h}}function CO(u,a=255,c){let h=a/255,f=u.toString(),y=c.has(f)?c.get(f).clone():u.clone();return y.a*=h,y.toString()}function aB(u,a){if(!TS()){let c=document.createElement("canvas");return c.width=u,c.height=a,c}return new OffscreenCanvas(u,a)}function FUe(u,a){let c=RUe.calculate(a.params,u.metadata?u.metadata.variables:[]),h=u.usvg_tree,f=h.width,y=h.height,b=a.transform?a.transform:new DOMMatrix,S=Math.max(1,Math.round(f*b.a)),M=Math.max(1,Math.round(y*b.d)),F=new DOMMatrix([S/f,0,0,M/y,0,0]),z=aB(S,M).getContext("2d");return SJ(z,F,h,h,c),z.getImageData(0,0,S,M)}function SJ(u,a,c,h,f){for(let y of h.children)d0e(u,a,c,y,f)}function d0e(u,a,c,h,f){h.group?(u.save(),(function(y,b,S,M,F){let z=M.mask_idx!=null?S.masks[M.mask_idx]:null,U=M.clip_path_idx!=null?S.clip_paths[M.clip_path_idx]:null;if(M.transform&&(b=xO(M.transform).preMultiplySelf(b)),!(function(X,ue,pe){return X.opacity!==255||ue||pe})(M,U!=null,z!=null))return void SJ(y,b,S,M,F);let j=aB(y.canvas.width,y.canvas.height),Z=j.getContext("2d");SJ(Z,b,S,M,F),U&&_0e(Z,b,S,U),z&&y0e(Z,b,S,z,F),y.globalAlpha=M.opacity/255,y.drawImage(j,0,0)})(u,a,c,h.group,f),u.restore()):h.path&&(u.save(),(function(y,b,S,M,F){y.setTransform(b),M.paint_order===fUe.PAINT_ORDER_FILL_AND_STROKE?(u0e(y,S,M,F),h0e(y,S,M,F)):(h0e(y,S,M,F),u0e(y,S,M,F))})(u,a,c,h.path,f),u.restore())}function u0e(u,a,c,h){let f=c.fill;if(!f)return;let y=f.opacity/255;switch(u.save(),u.beginPath(),v0e(c,u),f.paint){case"rgb_color":u.fillStyle=CO(f.rgb_color,f.opacity,h);break;case"linear_gradient_idx":{let b=a.linear_gradients[f.linear_gradient_idx];b.transform&&u.setTransform(xO(b.transform).preMultiplySelf(u.getTransform())),u.fillStyle=m0e(u,b,y,h);break}case"radial_gradient_idx":{let b=a.radial_gradients[f.radial_gradient_idx];b.transform&&u.setTransform(xO(b.transform).preMultiplySelf(u.getTransform())),u.fillStyle=f0e(u,b,y,h)}}u.fill(p0e(c)),u.restore()}function p0e(u){return u.rule===xJ.PATH_RULE_NON_ZERO?"nonzero":u.rule===xJ.PATH_RULE_EVEN_ODD?"evenodd":void 0}function h0e(u,a,c,h){let f=c.stroke;if(!f)return;let y=b0e(c);u.lineWidth=f.width,u.miterLimit=f.miterlimit,u.setLineDash(f.dasharray),u.lineDashOffset=f.dashoffset;let b=f.opacity/255;switch(f.paint){case"rgb_color":u.strokeStyle=CO(f.rgb_color,f.opacity,h);break;case"linear_gradient_idx":u.strokeStyle=m0e(u,a.linear_gradients[f.linear_gradient_idx],b,h,!0);break;case"radial_gradient_idx":u.strokeStyle=f0e(u,a.radial_gradients[f.radial_gradient_idx],b,h,!0)}switch(f.linejoin){case PH.LINE_JOIN_MITER_CLIP:case PH.LINE_JOIN_MITER:u.lineJoin="miter";break;case PH.LINE_JOIN_ROUND:u.lineJoin="round";break;case PH.LINE_JOIN_BEVEL:u.lineJoin="bevel"}switch(f.linecap){case wJ.LINE_CAP_BUTT:u.lineCap="butt";break;case wJ.LINE_CAP_ROUND:u.lineCap="round";break;case wJ.LINE_CAP_SQUARE:u.lineCap="square"}u.stroke(y)}function m0e(u,a,c,h,f=!1){if(a.stops.length===1){let j=a.stops[0];return CO(j.rgb_color,j.opacity*c,h)}let{x1:y,y1:b,x2:S,y2:M}=a,F=new DOMPoint(y,b),z=new DOMPoint(S,M);if(f){let j=xO(a.transform);F=j.transformPoint(F),z=j.transformPoint(z)}let U=u.createLinearGradient(F.x,F.y,z.x,z.y);for(let j of a.stops)U.addColorStop(j.offset,CO(j.rgb_color,j.opacity*c,h));return U}function f0e(u,a,c,h,f=!1){if(a.stops.length===1){let me=a.stops[0];return CO(me.rgb_color,me.opacity*c,h)}let y=xO(a.transform),{fx:b,fy:S,fr:M,cx:F,cy:z,r:U}=a,j=new DOMPoint(b,S),Z=new DOMPoint(F,z),X=M,ue=U;if(f){j=y.transformPoint(j),Z=y.transformPoint(Z);let me=(y.a+y.d)/2;X=M*me,ue=a.r*me}let pe=u.createRadialGradient(j.x,j.y,X,Z.x,Z.y,ue);for(let me of a.stops)pe.addColorStop(me.offset,CO(me.rgb_color,me.opacity*c,h));return pe}function g0e(u,a,c,h){let f=h.transform?xO(h.transform).preMultiplySelf(a):a,y=aB(u.canvas.width,u.canvas.height),b=y.getContext("2d");for(let M of h.children)if(M.group)g0e(b,f,c,M.group);else if(M.path){let F=M.path,z=new Path2D;z.addPath(b0e(F),f),b.fill(z,p0e(F))}let S=h.clip_path_idx!=null?c.clip_paths[h.clip_path_idx]:null;S&&_0e(b,f,c,S),u.globalCompositeOperation="source-over",u.drawImage(y,0,0)}function _0e(u,a,c,h){let f=aB(u.canvas.width,u.canvas.height);g0e(f.getContext("2d"),a,c,h),u.globalCompositeOperation="destination-in",u.drawImage(f,0,0)}function y0e(u,a,c,h,f){if(h.children.length===0)return;let y=h.mask_idx!=null?c.masks[h.mask_idx]:null;y&&y0e(u,a,c,y,f);let b=u.canvas.width,S=u.canvas.height,M=aB(b,S),F=M.getContext("2d"),z=h.width,U=h.height,j=h.left,Z=h.top,X=new Path2D,ue=new Path2D;ue.rect(j,Z,z,U),X.addPath(ue,a),F.clip(X);for(let Ae of h.children)d0e(F,a,c,Ae,f);let pe=F.getImageData(0,0,b,S),me=pe.data;if(h.mask_type===s0e.MASK_TYPE_LUMINANCE)for(let Ae=0;Aea[b])return null}else{let S=1/h[b],M=(u[b]-c[b])*S,F=(a[b]-c[b])*S;if(M>F){let z=M;M=F,F=z}if(M>f&&(f=M),Fy)return null}return f}function w0e(u,a,c,h,f,y,b,S,M,F,z){let U=h-u,j=f-a,Z=y-c,X=b-u,ue=S-a,pe=M-c,me=z[1]*pe-z[2]*ue,Ae=z[2]*X-z[0]*pe,Me=z[0]*ue-z[1]*X,Be=U*me+j*Ae+Z*Me;if(Math.abs(Be)<1e-15)return null;let nt=1/Be,ot=F[0]-u,pt=F[1]-a,Ct=F[2]-c,Tt=(ot*me+pt*Ae+Ct*Me)*nt;if(Tt<0||Tt>1)return null;let ai=pt*Z-Ct*j,Mt=Ct*U-ot*Z,gi=ot*j-pt*U,Oi=(z[0]*ai+z[1]*Mt+z[2]*gi)*nt;return Oi<0||Tt+Oi>1?null:(X*ai+ue*Mt+pe*gi)*nt}function S0e(u,a,c){return(u-a)/(c-a)}function T0e(u,a,c,h,f,y,b,S,M){let F=1<{let Ae=pe?1:0,Me=(Z+1)*ue-Ae,Be=X*ue,nt=(X+1)*ue-Ae;me[0]=Z*ue,me[1]=Be,me[2]=Me,me[3]=nt},U=new C0e(M),j=[];for(let Z=0;Z=1;M/=2){let Z=S[S.length-1];U=new C0e(M);for(let X=0;X0;){let{idx:X,t:ue,nodex:pe,nodey:me,depth:Ae}=Z.pop();if(this.leaves[X]){T0e(pe,me,Ae,a,c,h,f,U,j);let Be=1<=Ni[2])return ue}continue}let Me=0;for(let Be=0;Be=F[z[Ct]]&&(z.splice(Ct,0,Be),pt=!0);pt||(z[Me]=Be),Me++}}for(let Be=0;Be=this.dim+1||c<-1||c>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(c+1)*this.stride+(a+1)}static pack(a,c){let h=[0,0,0,0],f=zH.getUnpackVector(c),y=Math.floor((a+f[3])/f[2]);return h[2]=y%256,y=Math.floor(y/256),h[1]=y%256,y=Math.floor(y/256),h[0]=y,h}getPixels(){return new E8({width:this.stride,height:this.stride},this.pixels)}backfillBorder(a,c,h){if(this.dim!==a.dim)throw new Error("dem dimension mismatch");let f=c*this.dim,y=c*this.dim+this.dim,b=h*this.dim,S=h*this.dim+this.dim;switch(c){case-1:f=y-1;break;case 1:y=f+1}switch(h){case-1:b=S-1;break;case 1:S=b+1}let M=-c*this.dim,F=-h*this.dim;for(let z=b;z=1;h--){let f=h===1?1:0,y=h===2?1:0;for(let b=0;b>>1^-(1&u[a]);return u}function WUe(u,a){switch(a){case"uint32":return u;case"uint16":for(let c=0;c>4|(61440&h)>>8|(240&f)<<4|61440&f,u[c+1]=15&h|(3840&h)>>4|(15&f)<<8|(3840&f)<<4}return u;case"uint8":for(let c=0;c>6|(192&f)>>4|(192&y)>>2|192&b,u[c+1]=(48&h)>>4|(48&f)>>2|48&y|(48&b)<<2,u[c+2]=(12&h)>>2|12&f|(12&y)<<2|(12&b)<<4,u[c+3]=3&h|(3&f)<<2|(3&y)<<4|(3&b)<<6}return u;default:throw new Error(`Invalid pixel format, "${a}"`)}}yn(zH,"DEMData"),yn(I0e,"DemMinMaxQuadTree",{omit:["dem"]});var $_=Uint8Array,lB=Uint16Array,YUe=Int32Array,D0e=new $_([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,0,0,0]),A0e=new $_([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,0,0]),QUe=new $_([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),k0e=function(u,a){for(var c=new lB(31),h=0;h<31;++h)c[h]=a+=1<>1|(21845&gd)<<1;R0e[gd]=((65280&(wO=(61680&(wO=(52428&wO)>>2|(13107&wO)<<2))>>4|(3855&wO)<<4))>>8|(255&wO)<<8)>>1}var cB=function(u,a,c){for(var h=u.length,f=0,y=new lB(a);f>M]=F;return b},dB=new $_(288);for(gd=0;gd<144;++gd)dB[gd]=8;for(gd=144;gd<256;++gd)dB[gd]=9;for(gd=256;gd<280;++gd)dB[gd]=7;for(gd=280;gd<288;++gd)dB[gd]=8;var F0e=new $_(32);for(gd=0;gd<32;++gd)F0e[gd]=5;var JUe=cB(dB,9),e8e=cB(F0e,5),IJ=function(u){for(var a=u[0],c=1;ca&&(a=u[c]);return a},dv=function(u,a,c){var h=a/8|0;return(u[h]|u[h+1]<<8)>>(7&a)&c},EJ=function(u,a){var c=a/8|0;return(u[c]|u[c+1]<<8|u[c+2]<<16)>>(7&a)},t8e=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],uv=function(u,a,c){var h=new Error(a||t8e[u]);if(h.code=u,Error.captureStackTrace&&Error.captureStackTrace(h,uv),!c)throw h;return h},i8e=new $_(0),n8e=typeof TextDecoder<"u"&&new TextDecoder;try{n8e.decode(i8e,{stream:!0})}catch{}let o8e={gzip_data:"gzip"};class q0 extends Error{constructor(a){super(a),this.name="MRTError"}}let r8e={0:"uint32",1:"uint32",2:"uint16",3:"uint8"},P0e={uint32:1,uint16:2,uint8:4},s8e={uint32:Uint32Array,uint16:Uint16Array,uint8:Uint8Array},DJ;class UH{constructor(a=5){this.x=NaN,this.y=NaN,this.z=NaN,this.layers={},this._cacheSize=a}getLayer(a){let c=this.layers[a];if(!c)throw new q0(`Layer '${a}' not found`);return c}getHeaderLength(a){let c=new Uint8Array(a),h=new DataView(a);if(c[0]!==13)throw new q0("File is not a valid MRT.");return h.getUint32(1,!0)}parseHeader(a){let c=new Uint8Array(a),h=this.getHeaderLength(a);if(c.length= ${h} but got buffer of length ${c.length}`);let f=new DJ(c.subarray(0,h)).readFields(BUe,{headerLength:0,x:0,y:0,z:0,layers:[]},void 0);if(!isNaN(this.x)&&(this.x!==f.x||this.y!==f.y||this.z!==f.z))throw new q0(`Invalid attempt to parse header ${f.z}/${f.x}/${f.y} for tile ${this.z}/${this.x}/${this.y}`);this.x=f.x,this.y=f.y,this.z=f.z;for(let y of f.layers)this.layers[y.name]=new L0e(y,{cacheSize:this._cacheSize});return this}createDecodingTask(a){let c=[],h=this.getLayer(a.layerName);for(let f of a.blockIndices){let y=h.dataIndex[f],b=y.firstByte-a.firstByte,S=y.lastByte-a.firstByte;if(h._blocksInProgress.has(f))continue;let M={layerName:h.name,firstByte:b,lastByte:S,pixelFormat:h.pixelFormat,blockIndex:f,blockShape:[y.bands.length].concat(h.bandShape),buffer:h.buffer,codec:y.codec.codec,filters:y.filters.map(F=>F.filter)};h._blocksInProgress.add(f),c.push(M)}return new N0e(c,()=>{c.forEach(f=>h._blocksInProgress.delete(f.blockIndex))},(f,y)=>{if(c.forEach(b=>h._blocksInProgress.delete(b.blockIndex)),f)throw f;y.forEach(b=>{this.getLayer(b.layerName).processDecodedData(b)})})}}class L0e{constructor({version:a,name:c,units:h,tileSize:f,pixelFormat:y,buffer:b,dataIndex:S},M){if(this.version=a,this.version!==1)throw new q0(`Cannot parse raster layer encoded with MRT version ${a}`);this.name=c,this.units=h,this.tileSize=f,this.buffer=b,this.pixelFormat=r8e[y],this.dataIndex=S,this.bandShape=[f+2*b,f+2*b,P0e[this.pixelFormat]],this._decodedBlocks=new VH(M?M.cacheSize:5),this._blocksInProgress=new Set}get dimension(){return P0e[this.pixelFormat]}get cacheSize(){return this._decodedBlocks.capacity}getBandList(){return this.dataIndex.map(({bands:a})=>a).flat()}processDecodedData(a){let c=a.blockIndex.toString();this._decodedBlocks.get(c)||this._decodedBlocks.put(c,a.data)}getBlockForBand(a){let c=0;switch(typeof a){case"string":for(let[h,f]of this.dataIndex.entries()){for(let[y,b]of f.bands.entries())if(b===a)return{bandIndex:c+y,blockIndex:h,blockBandIndex:y};c+=f.bands.length}break;case"number":for(let[h,f]of this.dataIndex.entries()){if(a>=c&&athis.cacheSize)throw new q0(`Number of blocks to decode (${y.size}) exceeds cache size (${this.cacheSize}).`);return{layerName:this.name,firstByte:c,lastByte:h,blockIndices:f}}hasBand(a){let{blockIndex:c}=this.getBlockForBand(a);return c>=0}hasDataForBand(a){let{blockIndex:c}=this.getBlockForBand(a);return c>=0&&!!this._decodedBlocks.get(c.toString())}getBandView(a){let{blockIndex:c,blockBandIndex:h}=this.getBlockForBand(a);if(c<0)throw new q0(`Band not found: ${JSON.stringify(a)}`);let f=this._decodedBlocks.get(c.toString());if(!f)throw new q0(`Data for band ${JSON.stringify(a)} of layer "${this.name}" not decoded.`);let y=this.dataIndex[c],b=this.bandShape.reduce((F,z)=>F*z,1),S=h*b,M=f.subarray(S,S+b);return{data:M,bytes:new Uint8Array(M.buffer).subarray(M.byteOffset,M.byteOffset+M.byteLength),tileSize:this.tileSize,buffer:this.buffer,pixelFormat:this.pixelFormat,dimension:this.dimension,offset:y.offset,scale:y.scale}}}UH.setPbf=function(u){DJ=u};class N0e{constructor(a,c,h){this.tasks=a,this._onCancel=c,this._onComplete=h,this._finalized=!1}cancel(){this._finalized||(this._onCancel(),this._finalized=!0)}complete(a,c){this._finalized||(this._onComplete(a,c),this._finalized=!0)}}UH.performDecoding=function(u,a){let c=new Uint8Array(u);return Promise.all(a.tasks.map(h=>{let{layerName:f,firstByte:y,lastByte:b,pixelFormat:S,blockShape:M,blockIndex:F,filters:z,codec:U}=h,j=c.subarray(y,b+1),Z=new Uint32Array(M[0]*M[1]*M[2]),X;if(U!=="gzip_data")throw new q0(`Unhandled codec: ${U}`);return X=(function(ue,pe){if(!globalThis.DecompressionStream&&pe==="gzip_data")return Promise.resolve(((Be=(function(pt){pt[0]==31&&pt[1]==139&&pt[2]==8||uv(6,"invalid gzip data");var Ct=pt[3],Tt=10;4&Ct&&(Tt+=2+(pt[10]|pt[11]<<8));for(var ai=(Ct>>3&1)+(Ct>>4&1);ai>0;ai-=!pt[Tt++]);return Tt+(2&Ct)})(Me=ue))+8>Me.length&&uv(6,"invalid gzip data"),(function(pt,Ct,Tt,ai){var Mt=pt.length;if(!Mt||Ct.f&&!Ct.l)return Tt||new $_(0);var gi=!Tt,Oi=gi||Ct.i!=2,vi=Ct.i;gi&&(Tt=new $_(3*Mt));var Ii,Ni,oi=function(za){var Ua=Tt.length;if(za>Ua){var Sa=new $_(Math.max(2*Ua,za));Sa.set(Tt),Tt=Sa}},Ei=Ct.f||0,Kt=Ct.p||0,Ht=Ct.b||0,zi=Ct.l,Li=Ct.d,Qn=Ct.m,bn=Ct.n,Fn=8*Mt;do{if(!zi){Ei=dv(pt,Kt,1);var Ki=dv(pt,Kt+1,3);if(Kt+=3,!Ki){var Yn=pt[(Ue=4+((Kt+7)/8|0))-4]|pt[Ue-3]<<8,Po=Ue+Yn;if(Po>Mt){vi&&uv(0);break}Oi&&oi(Ht+Yn),Tt.set(pt.subarray(Ue,Po),Ht),Ct.b=Ht+=Yn,Ct.p=Kt=8*Po,Ct.f=Ei;continue}if(Ki==1)zi=JUe,Li=e8e,Qn=9,bn=5;else if(Ki==2){var on=dv(pt,Kt,31)+257,Hn=dv(pt,Kt+10,15)+4,To=on+dv(pt,Kt+5,31)+1;Kt+=14;for(var qo=new $_(To),gr=new $_(19),ir=0;ir>4)<16)qo[ir++]=Ue;else{var $t=0,ri=0;for(Ue==16?(ri=3+dv(pt,Kt,3),Kt+=2,$t=qo[ir-1]):Ue==17?(ri=3+dv(pt,Kt,7),Kt+=3):Ue==18&&(ri=11+dv(pt,Kt,127),Kt+=7);ri--;)qo[ir++]=$t}}var nn=qo.subarray(0,on),en=qo.subarray(on);Qn=IJ(nn),bn=IJ(en),zi=cB(nn,Qn),Li=cB(en,bn)}else uv(1);if(Kt>Fn){vi&&uv(0);break}}Oi&&oi(Ht+131072);for(var En=(1<>4;if((Kt+=15&$t)>Fn){vi&&uv(0);break}if($t||uv(2),vr<256)Tt[Ht++]=vr;else{if(vr==256){_r=Kt,zi=null;break}var ur=vr-254;vr>264&&(ur=dv(pt,Kt,(1<<(cr=D0e[ir=vr-257]))-1)+O0e[ir],Kt+=cr);var js=Li[EJ(pt,Kt)&ao],ol=js>>4;if(js||uv(3),Kt+=15&js,en=XUe[ol],ol>3){var cr=A0e[ol];en+=EJ(pt,Kt)&(1<Fn){vi&&uv(0);break}Oi&&oi(Ht+131072);var Ma=Ht+ur;if(HtIi.length)&&(Ni=Ii.length),new $_(Ii.subarray(0,Ni))):Tt.subarray(0,Ht)})(Me.subarray(Be,-8),{i:2},new $_(((me=Me)[(Ae=me.length)-4]|me[Ae-3]<<8|me[Ae-2]<<16|me[Ae-1]<<24)>>>0))));var me,Ae,Me,Be;let nt=o8e[pe];if(!nt)throw new Error(`Unhandled codec: ${pe}`);let ot=new globalThis.DecompressionStream(nt);return new Response(new Blob([ue]).stream().pipeThrough(ot)).arrayBuffer().then(pt=>new Uint8Array(pt))})(j,U).then(ue=>((function(pe,me){pe.readFields(GUe,me)})(new DJ(ue),Z),new s8e[S](Z.buffer))),X.then(ue=>{for(let pe=z.length-1;pe>=0;pe--)switch(z[pe]){case"delta_filter":qUe(ue,M);break;case"zigzag_filter":KUe(ue);break;case"bitshuffle_filter":WUe(ue,S);break;default:throw new q0(`Unhandled filter "${z[pe]}"`)}return{layerName:f,blockIndex:F,data:ue}}).catch(ue=>{throw ue})}))},yn(N0e,"MRTDecodingBatch",{omit:["_onCancel","_onComplete"]}),yn(UH,"MapboxRasterTile"),yn(L0e,"MapboxRasterLayer",{omit:["_blocksInProgress"]});class B0e{constructor(a){this._stringToNumber={},this._numberToString=[];for(let c=0;c=0&&j[3]>=0&&F.insert(M,j[0],j[1],j[2],j[3])}}loadVTLayers(){if(!this.vtLayers){this.vtLayers=new Ro(new fH(this.rawTileData)).layers,this.sourceLayerCoder=new B0e(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]),this.vtFeatures={};for(let a in this.vtLayers)this.vtFeatures[a]=[]}return this.vtLayers}query(a,c){let{tilespaceGeometry:h,transform:f,tileTransform:y,pixelPosMatrix:b,availableImages:S,worldview:M}=c;this.loadVTLayers(),this.serializedLayersCache.clear();let F=h.bufferedTilespaceBounds,z=this.grid.query(F.min.x,F.min.y,F.max.x,F.max.y,(X,ue,pe,me)=>ec(h.bufferedTilespaceGeometry,X,ue,pe,me));z.sort(l8e);let U=null;f.elevation&&z.length>0&&(U=bO.create(f.elevation,this.tileID));let j={},Z;for(let X=0;X(me||(me=un(Ae,this.tileID.canonical,y)),Me.queryIntersectsFeature(h,Ae,Be,me,this.z,f,b,U,nt)))}return j}loadMatchingFeature(a,c,h,f,y,b){let{featureIndex:S,bucketIndex:M,sourceLayerIndex:F,layoutVertexArrayOffset:z}=c,U=this.bucketLayerIDs[M],j=h.layers,Z=Object.keys(j);if(Z.length&&!Hr(Z,U))return;let X=h.sourceCache,ue=this.sourceLayerCoder.decode(F),pe=this.vtLayers[ue].feature(S),me=this.getId(pe,ue);for(let Ae=0;Ae`${S.key}: ${S.message}`).join(", ");return void Er(`Failed to create expression for promoteId: ${b}`)}this.promoteIdExpression=y.value}this.promoteIdExpression._evaluator||(this.promoteIdExpression._evaluator=new Qu),h=this.promoteIdExpression.evaluate({zoom:0},a)}else h=a.properties[f];typeof h=="boolean"&&(h=Number(h))}return h}}function z0e(u,a,c,h,f){return No(u,(y,b)=>{let S=a instanceof kf?a.get(b):null;return S&&S.evaluate?S.evaluate(c,h,void 0,f):S})}function l8e(u,a){return a-u}yn(V0e,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});let U0e=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class AJ{static from(a){if(!(a instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[c,h]=new Uint8Array(a,0,2);if(c!==219)throw new Error("Data does not appear to be in a KDBush format.");let f=h>>4;if(f!==1)throw new Error(`Got v${f} data when expected v1.`);let y=U0e[15&h];if(!y)throw new Error("Unrecognized array type.");let[b]=new Uint16Array(a,2,1),[S]=new Uint32Array(a,4,1);return new AJ(S,b,y,a)}constructor(a,c=64,h=Float64Array,f){if(isNaN(a)||a<0)throw new Error(`Unpexpected numItems value: ${a}.`);this.numItems=+a,this.nodeSize=Math.min(Math.max(+c,2),65535),this.ArrayType=h,this.IndexArrayType=a<65536?Uint16Array:Uint32Array;let y=U0e.indexOf(this.ArrayType),b=2*a*this.ArrayType.BYTES_PER_ELEMENT,S=a*this.IndexArrayType.BYTES_PER_ELEMENT,M=(8-S%8)%8;if(y<0)throw new Error(`Unexpected typed array class: ${h}.`);f&&f instanceof ArrayBuffer?(this.data=f,this.ids=new this.IndexArrayType(this.data,8,a),this.coords=new this.ArrayType(this.data,8+S+M,2*a),this._pos=2*a,this._finished=!0):(this.data=new ArrayBuffer(8+b+S+M),this.ids=new this.IndexArrayType(this.data,8,a),this.coords=new this.ArrayType(this.data,8+S+M,2*a),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+y]),new Uint16Array(this.data,2,1)[0]=c,new Uint32Array(this.data,4,1)[0]=a)}add(a,c){let h=this._pos>>1;return this.ids[h]=h,this.coords[this._pos++]=a,this.coords[this._pos++]=c,h}finish(){let a=this._pos>>1;if(a!==this.numItems)throw new Error(`Added ${a} items when expected ${this.numItems}.`);return kJ(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(a,c,h,f){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:y,coords:b,nodeSize:S}=this,M=[0,y.length-1,0],F=[];for(;M.length;){let z=M.pop()||0,U=M.pop()||0,j=M.pop()||0;if(U-j<=S){for(let pe=j;pe<=U;pe++){let me=b[2*pe],Ae=b[2*pe+1];me>=a&&me<=h&&Ae>=c&&Ae<=f&&F.push(y[pe])}continue}let Z=j+U>>1,X=b[2*Z],ue=b[2*Z+1];X>=a&&X<=h&&ue>=c&&ue<=f&&F.push(y[Z]),(z===0?a<=X:c<=ue)&&(M.push(j),M.push(Z-1),M.push(1-z)),(z===0?h>=X:f>=ue)&&(M.push(Z+1),M.push(U),M.push(1-z))}return F}within(a,c,h){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:f,coords:y,nodeSize:b}=this,S=[0,f.length-1,0],M=[],F=h*h;for(;S.length;){let z=S.pop()||0,U=S.pop()||0,j=S.pop()||0;if(U-j<=b){for(let pe=j;pe<=U;pe++)j0e(y[2*pe],y[2*pe+1],a,c)<=F&&M.push(f[pe]);continue}let Z=j+U>>1,X=y[2*Z],ue=y[2*Z+1];j0e(X,ue,a,c)<=F&&M.push(f[Z]),(z===0?a-h<=X:c-h<=ue)&&(S.push(j),S.push(Z-1),S.push(1-z)),(z===0?a+h>=X:c+h>=ue)&&(S.push(Z+1),S.push(U),S.push(1-z))}return M}}function kJ(u,a,c,h,f,y){if(f-h<=c)return;let b=h+f>>1;H0e(u,a,b,h,f,y),kJ(u,a,c,h,b-1,1-y),kJ(u,a,c,b+1,f,1-y)}function H0e(u,a,c,h,f,y){for(;f>h;){if(f-h>600){let F=f-h+1,z=c-h+1,U=Math.log(F),j=.5*Math.exp(2*U/3),Z=.5*Math.sqrt(U*j*(F-j)/F)*(z-F/2<0?-1:1);H0e(u,a,c,Math.max(h,Math.floor(c-z*j/F+Z)),Math.min(f,Math.floor(c+(F-z)*j/F+Z)),y)}let b=a[2*c+y],S=h,M=f;for(uB(u,a,h,c),a[2*f+y]>b&&uB(u,a,h,f);Sb;)M--}a[2*h+y]===b?uB(u,a,h,M):(M++,uB(u,a,M,f)),M<=c&&(h=M+1),c<=M&&(f=M-1)}}function uB(u,a,c,h){MJ(u,c,h),MJ(a,2*c,2*h),MJ(a,2*c+1,2*h+1)}function MJ(u,a,c){let h=u[a];u[a]=u[c],u[c]=h}function j0e(u,a,c,h){let f=u-c,y=a-h;return f*f+y*y}r.$=gD,r.A=vf,r.B=Vh,r.C=2,r.D=kT,r.E=D0,r.F=Z3,r.G=m_e,r.H=fD,r.I=xp,r.J=Qy,r.K=Do,r.L=bg,r.M=If,r.N=u1,r.O=$y,r.P=Pi,r.Q=h1,r.R=ES,r.S=M_,r.T=q3,r.U=Bh,r.V=RH,r.W=Tu,r.X=Sg,r.Y=O0,r.Z=S_,r._=Bd,r.a=function(u){return ou.API_CDN_URL_REGEX.test(u)},r.a$=Ze,r.a0=Jx,r.a1=MS,r.a2=_1,r.a3=class extends RH{},r.a4=p1,r.a5=YS,r.a6=kt,r.a7=function(u){let a=u.value;return a?Jx(a)?yJ(a,!0)?[]:[new RH(u.key,a,`invalid url "${a}"`)]:[new RH(u.key,a,`string expected, "${Do(a)}" found`)]:[]},r.a8=zM,r.a9=qs,r.aA=st,r.aB=q,r.aC=sn,r.aD=g,r.aE=Xc,r.aF=Ve,r.aG=Nt,r.aH=function(u,a){let c={};for(let h=0;h{h(y,b)},a):h(y,b),()=>{}}return f.callbacks.push(h),f.cancel||(f.cancel=c((y,b)=>{f.result=[y,b];for(let S of f.callbacks)this.scheduler?this.scheduler.add(()=>{S(y,b)},a):S(y,b);setTimeout(()=>delete this.entries[u],3e3)})),()=>{f.result||(f.callbacks=f.callbacks.filter(y=>y!==h),f.callbacks.length||(f.cancel(),delete this.entries[u]))}}},r.aL=function(u,a,c){let h=JSON.stringify(u.request);return u.data&&(this.deduped.entries[h]={result:[null,u.data]}),this.deduped.request(h,{type:"parseTile",isSymbolTile:u.isSymbolTile,zoom:u.tileZoom},f=>{let y=Eb(u.request,(b,S,M,F)=>{b?f(b):S&&f(null,{vectorTile:c?void 0:new Ro(new fH(S)),rawData:S,cacheControl:M,expires:F})});return()=>{y.cancel(),f()}},a)},r.aM=function(u){C_++,C_>gf&&(u.getActor().send("enforceCacheSizeLimit",Ah),C_=0)},r.aN=function(u){return u<=1?1:Math.pow(2,Math.floor(Math.log2(u)))},r.aO=Ju,r.aP=j_e,r.aQ=Y_e,r.aR=de,r.aS=H_e,r.aT=function(u,a){let c=document.createElement("video");c.muted=!0,c.onloadstart=function(){a(null,c)};for(let h=0;h{}}},r.aU=aA,r.aV=function(u){return fetch(u).then(a=>a.arrayBuffer()).then(a=>mH(a,0,u))},r.aW=Ege,r.aX=class{constructor(u,a,c,h){this.id=u,this.position=a!=null?new de(a[0],a[1]):new de(0,0),this.orientation=c??[0,0,0],this.nodes=h,this.uploaded=!1,this.aabb=new wo([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),this.matrix=[]}_applyTransformations(u,a){if(q(u.matrix,a,u.matrix),u.meshes)for(let c of u.meshes){let h=wo.applyTransformFast(c.aabb,u.matrix);this.aabb.encapsulate(h)}if(u.children)for(let c of u.children)this._applyTransformations(c,u.matrix)}computeBoundsAndApplyParent(){let u=V([]);for(let a of this.nodes)this._applyTransformations(a,u)}computeModelMatrix(u,a,c,h,f,y,b=!1){Za(this.matrix,this,u.transform,this.position,a,c,h,f,y,b)}upload(u){if(!this.uploaded){for(let a of this.nodes)qh(a,u);for(let a of this.nodes)Jc(a);this.uploaded=!0}}destroy(){for(let u of this.nodes)Nf(u)}},r.aY=So,r.aZ=eB,r.a_=it,r.aa=Vi,r.ab=class{constructor(u){this.specification=u}possiblyEvaluate(u,a){return Tc(u.expression.evaluate(a))}interpolate(u,a,c){return{x:eo(u.x,a.x,c),y:eo(u.y,a.y,c),z:eo(u.z,a.z,c),azimuthal:eo(u.azimuthal,a.azimuthal,c),polar:eo(u.polar,a.polar,c)}}},r.ac=ra,r.ad=A_,r.ae=Yt,r.af=Co,r.ag=Et,r.ah=qt,r.ai=kf,r.aj=ov,r.ak=eo,r.al=qi,r.am=hD,r.an=At,r.ao=Ts,r.ap=class{constructor(u){this.specification=u}possiblyEvaluate(u,a){return(function([c,h]){let f=Tc([1,c,h]);return{x:f.x,y:f.y,z:f.z}})(u.expression.evaluate(a))}interpolate(u,a,c){return{x:eo(u.x,a.x,c),y:eo(u.y,a.y,c),z:eo(u.z,a.z,c)}}},r.aq=function(u,a,c=0,h=!0){let f=new Pi(c,c),y=u.sub(f),b=a.add(f),S=[y,new Pi(b.x,y.y),b,new Pi(y.x,b.y)];return h&&S.push(y.clone()),S},r.ar=function(u,a){let c=[];for(let h=0;h0&&c[0]<=u.width&&c[1]>0&&c[1]<=u.height&&!y3(u,new de(u.center.lat,90)),h[0]>0&&h[0]<=u.width&&h[1]>0&&h[1]<=u.height&&!y3(u,new de(u.center.lat,-90))]},r.cM=function(u,a){let{scale:c}=u.tileTransform,h=c*qi/(u.tileSize*Math.pow(2,a.zoom-u.tileID.overscaledZ+u.tileID.canonical.z));return(function(f,y,b){var S=y[1],M=y[2],F=y[3],z=b[0],U=b[1];return f[0]=y[0]*z,f[1]=S*z,f[2]=M*U,f[3]=F*U,f})(new Float32Array(4),a.inverseAdjustmentMatrix,[h,h])},r.cN=wi,r.cO=Xe,r.cP=Vt,r.cQ=function(u){let a=Vt(u,!0);return m([],[a[0],a[1],a[4],a[5]])},r.cR=te,r.cS=us,r.cT=fe,r.cU=function(u){let{x:a,y:c}=u.point,{lng:h,lat:f}=u._center;return JM(a,c,u.worldSize,h,f)},r.cV=li,r.cW=ge,r.cX=wT,r.cY=au,r.cZ=C,r.c_=function(u,a,c){let h=0;for(let f=0;f<2;++f)u[f]>0&&(h+=(u[f]-0)*(u[f]-0)),a[f]<0&&(h+=(0-a[f])*(0-a[f]));return h},r.ca=function(u,a){return u[0]=-a[0],u[1]=-a[1],u[2]=-a[2],u[3]=a[3],u},r.cb=ke,r.cc=function(u,a,c,h,f){var y=1/Math.tan(a/2);if(u[0]=y/c,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=y,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=-1,u[12]=0,u[13]=0,u[15]=0,f!=null&&f!==1/0){var b=1/(h-f);u[10]=(f+h)*b,u[14]=2*f*h*b}else u[10]=-1,u[14]=-2*h;return u},r.cd=function(u,a,c,h,f,y,b){var S=1/(a-c),M=1/(h-f),F=1/(y-b);return u[0]=-2*S,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=-2*M,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=2*F,u[11]=0,u[12]=(a+c)*S,u[13]=(f+h)*M,u[14]=(b+y)*F,u[15]=1,u},r.ce=Qe,r.cf=function(u,a,c){u[4*a+0]=c[0],u[4*a+1]=c[1],u[4*a+2]=c[2],u[4*a+3]=c[3]},r.cg=I1,r.ch=oC,r.ci=gl,r.cj=Rf,r.ck=D1,r.cl=R_e,r.cm=function(){var u=new d(4);return d!=Float32Array&&(u[1]=0,u[2]=0),u[0]=1,u[3]=1,u},r.cn=function(u,a,c){var h=a[0],f=a[1],y=a[2],b=a[3],S=Math.sin(c),M=Math.cos(c);return u[0]=h*M+y*S,u[1]=f*M+b*S,u[2]=h*-S+y*M,u[3]=f*-S+b*M,u},r.co=function(u,a){return u[0]===a[0]&&u[1]===a[1]&&u[2]===a[2]&&u[3]===a[3]},r.cp=Ee,r.cq=function(u){var a=u[0],c=u[1],h=u[2],f=u[3];return Math.sqrt(a*a+c*c+h*h+f*f)},r.cr=$l,r.cs=pr,r.ct=xT,r.cu=3,r.cv=2,r.cw=7,r.cx=6,r.cy=zn,r.cz=yt,r.d=function(u){return ou.API_TILEJSON_REGEX.test(u)},r.d$=jge,r.d0=Pe,r.d1=45,r.d2=E1,r.d3=function(u,a,c){let h=Math.sqrt(u*u+a*a+c*c),f=h>0?Math.acos(c/h)*vb:0,y=u!==0||a!==0?Math.atan2(-a,-u)*vb+90:0;return y<0&&(y+=360),[h,y,f]},r.d4=we,r.d5=Tc,r.d6=Ft,r.d7=Xi,r.d8=wo,r.d9=ei,r.dA=function(u,a,c){let h=ov(c.zoom),f=u.style.map._antialias,y=u.terrain&&u.terrain.exaggeration()>0;return h===0&&!f&&!y},r.dB=function(u){let a=u.pixelsPerMeter,c=a/Qe(1,u.center.lat),h=V(new Float64Array(16));return W(h,h,[u.point.x,u.point.y,0]),te(h,h,[c,c,a]),Float32Array.from(h)},r.dC=qD,r.dD=function(u){let a=Je-5;u=st(u,-a,a)/a*90;let c=Math.pow(Math.abs(Math.sin(At(u))),3);return Math.round(c*(B.length-1))},r.dE=function(u,a,c,h){let f=a.getNorth(),y=a.getSouth(),b=a.getWest(),S=a.getEast(),M=1<0){let X=180/h;O(Z,Z,[X/F+1,0,0,0,X/z+1,0,-.5*X/U,.5*X/j,1])}return Z[2]=M,Z[5]=u.x,Z[8]=u.y,Z},r.dF=H_,r.dG=function(u,a,c){let h=V(new Float64Array(16)),f=(a/(1<1)return!1;let c=a.getSource().maxzoom,h=1<1)return a;let f=h.getSource().maxzoom,y=1<{let y=this.getAtTileOffset(u,f.x,f.y),b=h.upVector(u.canonical,f.x,f.y);return wt(b,b,y*h.upVectorScale(u.canonical,a,c).metersToTile),b}}getForTilePoints(u,a,c,h){if(this.isUsingMockSource())return!1;let f=bO.create(this,u,h);return!!f&&(a.forEach(y=>{y[2]=this.exaggeration()*f.getElevationAt(y[0],y[1],c)}),!0)}getMinMaxForTile(u){if(this.isUsingMockSource())return null;let a=this.findDEMTileFor(u);if(!a||!a.dem)return null;let c=a.dem.tree,h=a.tileID,f=1<({u_matrix:new D1(u),u_texsize:new Rf(u),u_pixels_to_tile_units:new CT(u),u_device_pixel_ratio:new gl(u),u_width_scale:new gl(u),u_floor_width_scale:new gl(u),u_image:new I1(u),u_units_to_pixels:new Rf(u),u_tile_units_to_pixels:new gl(u),u_alpha_discard_threshold:new gl(u),u_trim_offset:new Rf(u),u_trim_fade_range:new Rf(u),u_trim_color:new E1(u),u_emissive_strength:new gl(u),u_zbias_factor:new gl(u),u_tile_to_meter:new gl(u),u_ground_shadow_factor:new oC(u),u_pattern_transition:new gl(u)}),r.dU=u=>({u_matrix:new D1(u),u_pixels_to_tile_units:new CT(u),u_device_pixel_ratio:new gl(u),u_width_scale:new gl(u),u_floor_width_scale:new gl(u),u_units_to_pixels:new Rf(u),u_dash_image:new I1(u),u_gradient_image:new I1(u),u_image_height:new gl(u),u_texsize:new Rf(u),u_tile_units_to_pixels:new gl(u),u_alpha_discard_threshold:new gl(u),u_trim_offset:new Rf(u),u_trim_fade_range:new Rf(u),u_trim_color:new E1(u),u_emissive_strength:new gl(u),u_zbias_factor:new gl(u),u_tile_to_meter:new gl(u),u_ground_shadow_factor:new oC(u)}),r.dV=u=>({u_camera_to_center_distance:new gl(u),u_extrude_scale:new CT(u),u_device_pixel_ratio:new gl(u),u_matrix:new D1(u),u_inv_rot_matrix:new D1(u),u_merc_center:new Rf(u),u_tile_id:new oC(u),u_zoom_transition:new gl(u),u_up_dir:new oC(u),u_emissive_strength:new gl(u)}),r.dW=eC,r.dX=C6e,r.dY=class{constructor(u,a,c,h){this.context=u,this.format=h,this.size=c,this.texture=u.gl.createTexture();let[f,y,b]=this.size,{gl:S}=u;S.bindTexture(S.TEXTURE_3D,this.texture),u.pixelStoreUnpackFlipY.set(!1),u.pixelStoreUnpack.set(1),u.pixelStoreUnpackPremultiplyAlpha.set(!1),"data"in a&&a.data&&S.texImage3D(S.TEXTURE_3D,0,this.format,f,y,b,0,G3(this.format),$3(this.format),a.data)}bind(u,a){let{context:c}=this,{gl:h}=c;h.bindTexture(h.TEXTURE_3D,this.texture),u!==this.minFilter&&(h.texParameteri(h.TEXTURE_3D,h.TEXTURE_MAG_FILTER,u),h.texParameteri(h.TEXTURE_3D,h.TEXTURE_MIN_FILTER,u),this.minFilter=u),a!==this.wrapS&&(h.texParameteri(h.TEXTURE_3D,h.TEXTURE_WRAP_S,a),h.texParameteri(h.TEXTURE_3D,h.TEXTURE_WRAP_T,a),this.wrapS=a)}destroy(){let{gl:u}=this.context;u.deleteTexture(this.texture),this.texture=null}},r.dZ=C8,r.d_=(u,a,c,h,f,y)=>{let b=u.transform,S=b.projection.name==="globe",M;if(y.paint.get("circle-pitch-alignment")==="map")if(S){let z=y8(b.zoom,a.canonical)*b._pixelsPerMercatorPixel;M=Float32Array.from([z,0,0,z])}else M=b.calculatePixelsToTileUnitsMatrix(c);else M=new Float32Array([b.pixelsToGLUnits[0],0,0,b.pixelsToGLUnits[1]]);let F={u_camera_to_center_distance:u.transform.getCameraToCenterDistance(b.projection),u_matrix:u.translatePosMatrix(a.projMatrix,c,y.paint.get("circle-translate"),y.paint.get("circle-translate-anchor")),u_device_pixel_ratio:ff.devicePixelRatio,u_extrude_scale:M,u_inv_rot_matrix:mX,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0],u_emissive_strength:y.paint.get("circle-emissive-strength")};if(S){F.u_inv_rot_matrix=h,F.u_merc_center=f,F.u_tile_id=[a.canonical.x,a.canonical.y,1<=0?u.slice(0,a):u},r.dm=function(u){return u.indexOf(y1)>=0},r.dn=function(u){let a=u.lastIndexOf(y1);return a>=0?u.slice(a+1):""},r.dp=function(u){let a=[],c=u.id;return c===void 0&&a.push({message:`layers.${c}: missing required property "id"`}),u.render===void 0&&a.push({message:`layers.${c}: missing required method "render"`}),u.renderingMode&&u.renderingMode!=="2d"&&u.renderingMode!=="3d"&&a.push({message:`layers.${c}: property "renderingMode" must be either "2d" or "3d"`}),a},r.dq=function(u,a,c,h){return u.type==="custom"?new dUe(u,a):new mUe[u.type](u,a,c,h)},r.dr=Or,r.ds=function(u){let a=u.indexOf(y1);return a>=0?u.slice(a+1):""},r.dt=class extends SO{constructor(u,a){super(u._vectorTileFeature,u._z,u._x,u._y,u.id),u.state&&(this.state=Object.assign({},u.state)),this.target=a.target,this.namespace=a.namespace,a.properties&&(this.properties=a.properties),this.target&&("featuresetId"in this.target&&!this.target.importId||"layerId"in this.target)&&(this.source=u.source,this.sourceLayer=u.sourceLayer,this.layer=u.layer)}toJSON(){let u=super.toJSON();return u.target=this.target,u.namespace=this.namespace,u}},r.du=sT,r.dv=jr,r.dw=function(u){return u({pluginStatus:Iu,pluginURL:Df}),sT.on("pluginStateChange",u),u},r.dx=$M,r.dy=class extends Dg{constructor(u){super(u),this.current=qM}set(u,a,c){if(this.fetchUniformLocation(u,a)){for(let h=0;h<9;h++)if(c[h]!==this.current[h]){this.current=c,this.gl.uniformMatrix3fv(this.location,!1,c);break}}}},r.dz=$e,r.e=ou,r.e$=function(){let u=rA;u&&(u.isPreloaded()&&u.numActive()===1?(u.release(oA),rA=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()"))},r.e0=Su,r.e1=(u,a,c,h,f,y,b,S,M,F)=>{let z=u.transform,U=z.pitch<15?zge(.07,.7,st((14-z.zoom)/5,0,1)):.07,j=c.paint.get("line-trim-color-use-theme").constantOr("default")==="none";return{u_matrix:Hge(u,a,c,h),u_texsize:a.imageAtlasTexture?a.imageAtlasTexture.size:[0,0],u_pixels_to_tile_units:z.calculatePixelsToTileUnitsMatrix(a),u_device_pixel_ratio:f,u_width_scale:y,u_floor_width_scale:b,u_image:0,u_tile_units_to_pixels:Uge(a,z),u_units_to_pixels:[1/z.pixelsToGLUnits[0],1/z.pixelsToGLUnits[1]],u_alpha_discard_threshold:0,u_trim_offset:S,u_trim_fade_range:c.paint.get("line-trim-fade-range"),u_trim_color:c.paint.get("line-trim-color").toPremultipliedRenderColor(j?null:c.lut).toArray01(),u_emissive_strength:c.paint.get("line-emissive-strength"),u_zbias_factor:U,u_tile_to_meter:Ft(a.tileID.canonical,0),u_ground_shadow_factor:M,u_pattern_transition:F}},r.e2=(u,a,c,h,f,y,b,S,M,F)=>{let z=u.transform,U=z.calculatePixelsToTileUnitsMatrix(a),j=c.paint.get("line-trim-color-use-theme").constantOr("default")==="none",Z=z.pitch<15?zge(.07,.7,st((14-z.zoom)/5,0,1)):.07;return{u_matrix:Hge(u,a,c,h),u_pixels_to_tile_units:U,u_device_pixel_ratio:y,u_width_scale:b,u_floor_width_scale:S,u_units_to_pixels:[1/z.pixelsToGLUnits[0],1/z.pixelsToGLUnits[1]],u_dash_image:0,u_gradient_image:1,u_image_height:f,u_texsize:Gge(c)&&a.lineAtlasTexture?a.lineAtlasTexture.size:[0,0],u_tile_units_to_pixels:Uge(a,u.transform),u_alpha_discard_threshold:0,u_trim_offset:M,u_trim_fade_range:c.paint.get("line-trim-fade-range"),u_trim_color:c.paint.get("line-trim-color").toPremultipliedRenderColor(j?null:c.lut).toArray01(),u_emissive_strength:c.paint.get("line-emissive-strength"),u_zbias_factor:Z,u_tile_to_meter:Ft(a.tileID.canonical,0),u_ground_shadow_factor:F}},r.e3=qn,r.e4=WD,r.e5=Ye,r.e6=aX,r.e7=rO,r.e8=X8,r.e9=uC,r.eA=gc,r.eB=tv,r.eC=function(u,a,c,h,f,y,b,S,M,F,z,U,j,Z,X,ue){var pe=new d(16);return pe[0]=u,pe[1]=a,pe[2]=c,pe[3]=h,pe[4]=f,pe[5]=y,pe[6]=b,pe[7]=S,pe[8]=M,pe[9]=F,pe[10]=z,pe[11]=U,pe[12]=j,pe[13]=Z,pe[14]=X,pe[15]=ue,pe},r.eD=oe,r.eE=tC,r.eF=wm,r.eG=class{constructor(){this._updateTime=0,this._sourceIds=[],this._activeRegions=[],this._prevRegions=[],this._globalClipBounds={min:new Pi(1/0,1/0),max:new Pi(-1/0,-1/0)}}clear(){this._activeRegions.length>0&&++this._updateTime,this._activeRegions=[],this._prevRegions=[]}get updateTime(){return this._updateTime}getReplacementRegionsForTile(u,a=!1){let c=z8(new Pi(0,0),new Pi(qi,qi),u),h=[];if(a&&!M3(c,this._globalClipBounds))return h;for(let f of this._activeRegions){if(f.hiddenByOverlap||!M3(c,f))continue;let y=OX(f.min,f.max,u);h.push({min:y.min,max:y.max,sourceId:this._sourceIds[f.priority],footprint:f.footprint,footprintTileId:f.tileId,order:f.order,clipMask:f.clipMask,clipScope:f.clipScope})}return h}setSources(u){this._setSources(u.map(a=>({getSourceId:()=>a.cache.id,getFootprints:()=>{let c=[];for(let h of a.cache.getVisibleCoordinates()){let f=a.cache.getTile(h).buckets[a.layer];f&&f.updateFootprints(h.toUnwrapped(),c)}return c},getOrder:()=>a.order,getClipMask:()=>a.clipMask,getClipScope:()=>a.clipScope})))}_addSource(u){let a=u.getFootprints();if(a.length===0)return;let c=u.getOrder(),h=u.getClipMask(),f=u.getClipScope();for(let y of a){if(!y.footprint)continue;let b=z8(y.footprint.min,y.footprint.max,y.id);this._activeRegions.push({min:b.min,max:b.max,hiddenByOverlap:!1,priority:this._sourceIds.length,tileId:y.id,footprint:y.footprint,order:c,clipMask:h,clipScope:f})}this._sourceIds.push(u.getSourceId())}_computeReplacement(){this._activeRegions.sort((a,c)=>a.priority-c.priority||nO(a.min,c.min)||nO(a.max,c.max)||a.order-c.order||a.clipMask-c.clipMask||(function(h,f){let y=(b,S)=>b+S;return h.length-f.length||h.reduce(y,"").localeCompare(f.reduce(y,""))})(a.clipScope,c.clipScope));let u=this._activeRegions.length!==this._prevRegions.length;if(!u){let a=0;for(;!u&&a!==this._activeRegions.length;){let c=this._activeRegions[a],h=this._prevRegions[a];u=c.priority!==h.priority||!V8(c,h)||c.order!==h.order||c.clipMask!==h.clipMask||!gg(c.clipScope,h.clipScope),++a}}if(u){++this._updateTime;for(let c of this._activeRegions)c.order!==JD&&(this._globalClipBounds.min.x=Math.min(this._globalClipBounds.min.x,c.min.x),this._globalClipBounds.min.y=Math.min(this._globalClipBounds.min.y,c.min.y),this._globalClipBounds.max.x=Math.max(this._globalClipBounds.max.x,c.max.x),this._globalClipBounds.max.y=Math.max(this._globalClipBounds.max.y,c.max.y));let a=c=>{let h=this._activeRegions;if(c>=h.length)return c;let f=h[c].priority;for(;c1){let c=0,h=a(c);for(;c!==h;){let f=c,y=c;for(;f!==h;){let b=this._activeRegions[f];b.hiddenByOverlap=!1;for(let S=0;S=0;a--)this._addSource(u[a]);this._computeReplacement()}},r.eH=JD,r.eI=class{constructor(u){this._createGrid(u),this._createPoles(u)}destroy(){this._poleIndexBuffer.destroy(),this._gridBuffer.destroy(),this._gridIndexBuffer.destroy(),this._poleNorthVertexBuffer.destroy(),this._poleSouthVertexBuffer.destroy();for(let u of this._poleSegments)u.destroy();for(let u of this._gridSegments)u.withSkirts.destroy(),u.withoutSkirts.destroy()}_fillGridMeshWithLods(u,a){let c=new pd,h=new Ec,f=[],y=u+1+2,b=a[0]+1,S=a[0]+1+(1+a.length),M=(F,z,U)=>{let j=F===y-1?F-2:F===0?F:F-1;return j+=U?24575:0,[j,z]};for(let F=0;FString.fromCharCode(+("0x"+c))))},r.f0=function(){MT().acquire(oA)},r.f1=aT,r.f2=function(u,a,c=!1){if(Iu===Tp.deferred||Iu===Tp.loading||Iu===Tp.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Df=ff.resolveURL(u),Iu=Tp.deferred,oT=a,rT(),c||N0()},r.f3=function(u){OT=ff.resolveURL(u),R1||(R1=new kT(MT(),new D0)),R1.broadcast("setMeshoptUrl",OT)},r.f4=uO,r.f5=function(u){U3=ff.resolveURL(u),R1||(R1=new kT(MT(),new D0)),R1.broadcast("setDracoUrl",U3)},r.f6=dO,r.f7=tp,r.f8=function(u){let a=lD();if(!a)return;let c=a.delete(Xp);u&&c.then(()=>u()).catch(u)},r.f9=lO,r.fA=function(u){xb(),bu?.then(a=>{a.keys().then(c=>{for(let h=0;hEr(f.message))}).catch(c=>Er(c.message))}).catch(a=>Er(a.message))},r.fa=yn,r.fb=lC,r.fc=cv,r.fd=B0e,r.fe=V0e,r.ff=Lge,r.fg=or,r.fh="hd_road_elevation",r.fi=Va,r.fj=No,r.fk=lv,r.fl=sJ,r.fm=lA,r.fn=function(u,a,c,h,f,y,b,S=1,M,F,z){u.createArrays(),u.tilePixelRatio=qi/(512*u.overscaling),u.compareText={},u.iconsNeedLinear=!1;let U=u.layers[0].layout,j=u.layers[0]._unevaluatedLayout._values,Z={};Z.scaleFactor=S,Z.textSizeScaleRange=U.get("text-size-scale-range"),Z.iconSizeScaleRange=U.get("icon-size-scale-range");let[X,ue]=Z.textSizeScaleRange,[pe,me]=Z.iconSizeScaleRange;Z.textScaleFactor=st(Z.scaleFactor,X,ue),Z.iconScaleFactor=st(Z.scaleFactor,pe,me);let Ae=j["text-size"],Me=j["icon-size"];if(u.textSizeData.kind==="composite"){let{minZoom:Tt,maxZoom:ai}=u.textSizeData;Z.compositeTextSizes=[Ae.possiblyEvaluate(new ra(Tt,{worldview:z}),y),Ae.possiblyEvaluate(new ra(ai,{worldview:z}),y)]}if(u.iconSizeData.kind==="composite"){let{minZoom:Tt,maxZoom:ai}=u.iconSizeData;Z.compositeIconSizes=[Me.possiblyEvaluate(new ra(Tt,{worldview:z}),y),Me.possiblyEvaluate(new ra(ai,{worldview:z}),y)]}Z.layoutTextSize=Ae.possiblyEvaluate(new ra(b+1,{worldview:z}),y),Z.layoutIconSize=Me.possiblyEvaluate(new ra(b+1,{worldview:z}),y),Z.textMaxSize=Ae.possiblyEvaluate(new ra(18,{worldview:z}),y);let Be=U.get("symbol-placement"),nt=U.get("text-rotation-alignment")==="map"&&Be!=="point",ot=U.get("text-size"),pt=!1,Ct=[];for(let Tt of u.features){let ai=U.get("text-font").evaluate(Tt,{},y).join(","),Mt=ot.evaluate(Tt,{},y)*Z.textScaleFactor,gi=Z.layoutTextSize.evaluate(Tt,{},y)*Z.textScaleFactor,Oi=Z.layoutIconSize.evaluate(Tt,{},y)*Z.iconScaleFactor,vi={horizontal:{},vertical:void 0},Ii=Tt.text,Ni,oi=[0,0];if(Ii){let Hn=Ii.toString(),To=U.get("text-letter-spacing").evaluate(Tt,{},y)*lu,qo=U.get("text-line-height").evaluate(Tt,{},y)*lu,gr=OD(Hn)?To:0,ir=U.get("text-anchor").evaluate(Tt,{},y),An=U.get("text-variable-anchor");if(!An){let $t=U.get("text-radial-offset").evaluate(Tt,{},y);if($t)oi=C_e(ir,[$t*lu,lJ]);else{let ri=U.get("text-offset").evaluate(Tt,{},y);oi=[ri[0]*lu,ri[1]*lu]}}let Zo=nt?"center":U.get("text-justify").evaluate(Tt,{},y),Yr=Be==="point",Ue=Yr?U.get("text-max-width").evaluate(Tt,{},y)*lu:1/0,He=$t=>{u.allowVerticalPlacement&&f1(Hn)&&(vi.vertical=nJ(Ii,a,c,f,ai,Ue,qo,ir,$t,gr,oi,Bf.vertical,!0,gi,Mt,M))};if(!nt&&An){let $t=Zo==="auto"?An.map(nn=>cJ(nn)):[Zo],ri=!1;for(let nn=0;nn<$t.length;nn++){let en=$t[nn];if(!vi.horizontal[en])if(ri)vi.horizontal[en]=vi.horizontal[0];else{let En=nJ(Ii,a,c,f,ai,Ue,qo,"center",en,gr,oi,Bf.horizontal,!1,gi,Mt,M);En&&(vi.horizontal[en]=En,ri=En.positionedLines.length===1)}}He("left")}else{if(Zo==="auto"&&(Zo=cJ(ir)),Yr||U.get("text-writing-mode").indexOf("horizontal")>=0||!f1(Hn)){let $t=nJ(Ii,a,c,f,ai,Ue,qo,ir,Zo,gr,oi,Bf.horizontal,!1,gi,Mt,M);$t&&(vi.horizontal[Zo]=$t)}He(Yr?"left":Zo)}}let Ei,Kt,Ht,zi,Li,Qn,bn=!1,Fn=U.get("icon-text-fit").evaluate(Tt,{},y);if(Tt.icon&&Tt.icon.hasPrimary()){let Hn=w_e(Tt.icon,u.iconSizeData,j["icon-size"],y,u.zoom,Tt,M,Z.iconScaleFactor,z);Ei=Hn.iconPrimary,Ht=Hn.iconSecondary;let To=Ei.toString();if(Kt=h.get(To),Kt&&(Li=U.get("icon-offset").evaluate(Tt,{},y),Qn=U.get("icon-anchor").evaluate(Tt,{},y),Ni=V6e(f.get(To),Ht?f.get(Ht.toString()):void 0,Li,Qn),bn=Kt.sdf,u.sdfIcons===void 0?u.sdfIcons=Kt.sdf:u.sdfIcons!==Kt.sdf&&Er("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Kt.pixelRatio!==u.pixelRatio||U.get("icon-rotate").constantOr(1)!==0)&&(u.iconsNeedLinear=!0)),Ht){let qo=Ht.toString();zi=h.get(qo)}}pt=pt||!(!Tt.icon||!Tt.icon.hasSecondary());let Ki=dJ(vi.horizontal)||vi.vertical;u.iconsInText||(u.iconsInText=!!Ki&&Ki.iconsInText);let Yn=gi*Z.textScaleFactor/lu,{defaultShapedIcon:Po,verticallyShapedIcon:on}=Y6e(u,Ni,U,Tt,y,vi,Yn,Li,Fn);Fn!=="none"&&Ni&&(r_e(Ni)||s_e(Ni))&&(bH(0,Kt,Ei,Ni,Po,Fn,F,h,f),bH(0,zi,Ht,Ni,Po,Fn,F,h,f),on&&(bH(0,Kt,Ei,Ni,on,Fn,F,h,f),bH(0,zi,Ht,Ni,on,Fn,F,h,f))),Ni=Po,Ct.push({feature:Tt,shapedTextOrientations:vi,shapedText:Ki,shapedIcon:Ni,iconPrimary:Ei,iconSecondary:Ht,iconOffset:Li,iconAnchor:Qn,verticallyShapedIcon:on,layoutTextSize:gi,layoutIconSize:Oi,textOffset:oi,isSDFIcon:bn,iconTextFit:Fn})}return{featureData:Ct,sizes:Z,hasAnySecondaryIcon:pt,textAlongLine:nt,symbolPlacement:Be}},r.fo=f_e,r.fp=function(u,a,c,h,f,y,b,S,M,F){let{featureData:z,hasAnySecondaryIcon:U,sizes:j,textAlongLine:Z,symbolPlacement:X}=a;for(let ue of z){let{shapedIcon:pe,verticallyShapedIcon:me,feature:Ae,shapedTextOrientations:Me,shapedText:Be,layoutTextSize:nt,textOffset:ot,isSDFIcon:pt,iconPrimary:Ct,iconSecondary:Tt,iconTextFit:ai,iconOffset:Mt}=ue;S_e(pe,F.iconPositions,Ct,Tt),S_e(me,F.iconPositions,Ct,Tt),W6e(Me,F.iconPositions),K6e(Ct,Tt,F.iconPositions),(Be||pe)&&Q6e(u,Ae,Me,pe,me,M,j,nt,0,ot,pt,h,f,b,S,U,ai,Mt,Z,X)}c&&u.generateCollisionDebugBuffers(y,u.collisionBoxArray,j.textScaleFactor)},r.fq=Ro,r.fr=zH,r.fs=Mi,r.ft=function(u){let a=0;if(new Uint32Array(u,0,1)[0]!==dH){let c=new Uint32Array(u,0,7),[,,h,f,y,b]=c;a=c.byteLength+f+y+b+y,(h!==u.byteLength||a>=u.byteLength)&&Er("Invalid b3dm header information.")}return mH(u,a)},r.fu=function(u,a){let c=Ege(u);for(let h of c){for(let f of h.meshes)qze(f);h.lights&&(h.lightMeshIndex=h.meshes.length,h.meshes.push(Kze(h.lights,a)))}return c},r.fv=FH,r.fw=oa,r.fx=aH,r.fy=Eg,r.fz=Tp,r.g=function(u,a){return jr(Object.assign(u,{method:"GET"}),a)},r.h=function(u){return u.indexOf("mapbox:")===0},r.i=function(u){return ou.API_STYLE_REGEX.test(u)&&!aD(u)},r.j=Fy,r.k=wb,r.l=function(u){return decodeURIComponent(atob(u).split("").map(a=>"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)).join(""))},r.m=function(u,a){return jr(Object.assign(u,{type:"json"}),a)},r.n=Tl,r.o=ff,r.p=function(u,a){return jr(Object.assign(u,{method:"POST"}),a)},r.q=_c,r.r=TS,r.s=function(u){try{let a=self[u];return a.setItem("_mapbox_test_",1),a.removeItem("_mapbox_test_"),!0}catch{return!1}},r.t=function(){return z3||(z3=new lO),z3},r.u=function(){return(function u(a){return a?(a^Math.random()*(16>>a/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,u)})()},r.v=function(u){return!!u&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(u)},r.w=Er,r.x=TJ,r.y=Qc,r.z=_f}),i(["./shared"],function(r){function s(At){let ge=At?At.url.toString():void 0;return ge?performance.getEntriesByName(ge):[]}function d(At){if(typeof At=="number"||typeof At=="boolean"||typeof At=="string"||At==null)return JSON.stringify(At);if(Array.isArray(At)){let Ie="[";for(let $e of At)Ie+=`${d($e)},`;return`${Ie}]`}let ge="{";for(let Ie of Object.keys(At).sort())ge+=`${Ie}:${d(At[Ie])},`;return`${ge}}`}function m(At){let ge="";for(let Ie of r.bx)ge+=`/${d(At[Ie])}`;return ge}class v{constructor(ge){this.keyCache={},this._layers={},this._layerConfigs={},ge&&this.replace(ge)}replace(ge,Ie){this._layerConfigs={},this._layers={},this.update(ge,[],Ie)}update(ge,Ie,$e){this._options=$e;for(let at of ge)this._layerConfigs[at.id]=at,(this._layers[at.id]=r.dq(at,this.scope,null,this._options)).compileFilter($e),this.keyCache[at.id]&&delete this.keyCache[at.id];for(let at of Ie)delete this.keyCache[at],delete this._layerConfigs[at],delete this._layers[at];this.familiesBySource={};let ht=(function(at,st){let qt={};for(let Wt=0;Wtthis._layers[qn.id]),qt=st[0];if(qt.visibility==="none")continue;let It=qt.source||"",Wt=this.familiesBySource[It];Wt||(Wt=this.familiesBySource[It]={});let $i=qt.sourceLayer||"_geojsonTileLayer",Ti=Wt[$i];Ti||(Ti=Wt[$i]=[]),Ti.push(st)}}}let w=1*r.fc;class O{constructor(ge){let Ie={},$e=[];for(let qt in ge){let It=ge[qt],Wt=Ie[qt]={};for(let $i in It.glyphs){let Ti=It.glyphs[+$i];if(!Ti||Ti.bitmap.width===0||Ti.bitmap.height===0)continue;let qn=Ti.metrics.localGlyph?w:1,So={x:0,y:0,w:Ti.bitmap.width+2*qn,h:Ti.bitmap.height+2*qn};$e.push(So),Wt[$i]=So}}let{w:ht,h:at}=r.G($e),st=new r.fb({width:ht||1,height:at||1});for(let qt in ge){let It=ge[qt];for(let Wt in It.glyphs){let $i=It.glyphs[+Wt];if(!$i||$i.bitmap.width===0||$i.bitmap.height===0)continue;let Ti=Ie[qt][Wt],qn=$i.metrics.localGlyph?w:1;r.fb.copy($i.bitmap,st,{x:0,y:0},{x:Ti.x+qn,y:Ti.y+qn},$i.bitmap)}}this.image=st,this.positions=Ie}}r.fa(O,"GlyphAtlas");class N{constructor(ge){this.tileID=new r.aO(ge.tileID.overscaledZ,ge.tileID.wrap,ge.tileID.canonical.z,ge.tileID.canonical.x,ge.tileID.canonical.y),this.tileZoom=ge.tileZoom,this.uid=ge.uid,this.zoom=ge.zoom,this.lut=ge.lut,this.canonical=ge.tileID.canonical,this.pixelRatio=ge.pixelRatio,this.tileSize=ge.tileSize,this.source=ge.source,this.scope=ge.scope,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=ge.showCollisionBoxes,this.collectResourceTiming=!!ge.request&&ge.request.collectResourceTiming,this.promoteId=ge.promoteId,this.isSymbolTile=ge.isSymbolTile,this.tileTransform=r.aZ(ge.tileID.canonical,ge.projection),this.projection=ge.projection,this.worldview=ge.worldview,this.localizableLayerIds=ge.localizableLayerIds,this.brightness=ge.brightness,this.extraShadowCaster=!!ge.extraShadowCaster,this.tessellationStep=ge.tessellationStep,this.scaleFactor=ge.scaleFactor,this.worldview=ge.worldview}parse(ge,Ie,$e,ht,at,st){this.status="parsing",this.data=ge,this.collisionBoxArray=new r.b3;let qt=new r.fd(Object.keys(ge.layers).sort()),It=new r.fe(this.tileID,this.promoteId);It.bucketLayerIDs=[];let Wt={},$i=new r.ff(256,256),Ti={featureIndex:It,iconDependencies:new Map,patternDependencies:new Map,glyphDependencies:{},lineAtlas:$i,availableImages:$e,brightness:this.brightness,scaleFactor:this.scaleFactor,elevationFeatures:void 0},qn=[],So=Ie.familiesBySource[this.source];for(let Or in So){let fr=ge.layers[Or];if(!fr)continue;let Hr=!1,pa=!1,Er=!1;for(let oa of So[Or])oa[0].type==="symbol"?Hr=!0:pa=!0,oa[0].is3D()&&oa[0].type!=="model"&&(Er=!0);if(this.extraShadowCaster&&!Er||this.isSymbolTile===!0&&!Hr||this.isSymbolTile===!1&&!pa)continue;fr.version===1&&r.w(`Vector tile source "${this.source}" layer "${Or}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let Ll=qt.encode(Or),Xl=[],Tc=!1;for(let oa=0,Ss=0;oa=Ss.maxzoom||Ss.visibility==="none")continue;V(oa,this.zoom,Ti.brightness,$e,this.worldview);let ml=Wt[Ss.id]=Ss.createBucket({index:It.bucketLayerIDs.length,layers:oa,zoom:this.zoom,lut:this.lut,canonical:this.canonical,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ll,sourceID:this.source,projection:this.projection.spec,tessellationStep:this.tessellationStep,styleDefinedModelURLs:ht,worldview:this.worldview});It.bucketLayerIDs.push(oa.map(xa=>r.B(xa.id,xa.scope)));let fl=ml.prepare?ml.prepare():null;fl!=null?(fl=fl.then(()=>ml.populate(Xl,Ti,this.tileID.canonical,this.tileTransform)),qn.push(fl)):ml.populate(Xl,Ti,this.tileID.canonical,this.tileTransform)}}let No=()=>{let Or,fr,Hr,pa,Er,Ll;$i.trim();let Xl={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},Tc=()=>{if(Or)return this.status="done",st(Or);if(this.extraShadowCaster)this.status="done",st(null,{buckets:Object.values(Wt).filter(Ss=>!Ss.isEmpty()),featureIndex:It,collisionBoxArray:null,glyphAtlasImage:null,lineAtlas:null,imageAtlas:null,brightness:Ti.brightness,glyphMap:null,iconMap:null,glyphPositions:null});else if(fr&&Hr&&pa){let Ss=new O(fr),ml=new Map;for(let[Ld,Wu]of Hr.entries()){let{imagePosition:Dh}=r.fl(Ld,Wu,r.fm);ml.set(Ld,Dh)}let fl={};for(let Ld in Wt){let Wu=Wt[Ld];Wu instanceof r.b4&&(V(Wu.layers,this.zoom,Ti.brightness,$e,this.worldview),fl[Ld]=r.fn(Wu,fr,Ss.positions,Hr,ml,this.tileID.canonical,this.tileZoom,this.scaleFactor,this.pixelRatio,Er,this.worldview))}let xa={iconsPending:!0,patternsPending:!0};this.rasterizeIfNeeded(at,Hr,Er,()=>{xa.iconsPending=!1,oa(fl,Ss,xa)}),this.rasterizeIfNeeded(at,pa,Ll,()=>{xa.patternsPending=!1,oa(fl,Ss,xa)})}},oa=(Ss,ml,fl,xa)=>{if(fl.iconsPending||fl.patternsPending)return;let Ld=new r.fo(Hr,pa,this.lut);for(let Wu in Wt){let Dh=Wt[Wu];if(Wu in Ss)r.fp(Dh,Ss[Wu],this.showCollisionBoxes,$e,this.tileID.canonical,this.tileZoom,this.projection,this.brightness,Hr,Ld);else if(Dh.hasPattern&&(Dh instanceof r.ba||Dh instanceof r.bb||Dh instanceof r.e7)){V(Dh.layers,this.zoom,Ti.brightness,$e,this.worldview);let v_=Object.fromEntries(Ld.patternPositions);Dh.addFeatures(Ti,this.tileID.canonical,v_,$e,this.tileTransform,this.brightness)}}this.status="done",st(null,{buckets:Object.values(Wt).filter(Wu=>!Wu.isEmpty()),featureIndex:It,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ml.image,lineAtlas:$i,imageAtlas:Ld,brightness:Ti.brightness})};if(!this.extraShadowCaster){let Ss=r.fj(Ti.glyphDependencies,xa=>Object.keys(xa).map(Number));Object.keys(Ss).length?at.send("getGlyphs",{uid:this.uid,stacks:Ss},(xa,Ld)=>{Or||(Or=xa,fr=Ld,Tc())},void 0,!1,Xl):fr={};let ml=Array.from(Ti.iconDependencies.keys()).map(xa=>r.I.parse(xa));ml.length?at.send("getImages",{images:ml,source:this.source,scope:this.scope,tileID:this.tileID,type:"icons"},(xa,Ld)=>{Or||(Or=xa,Hr=new Map,Er=this.updateImageMapAndGetImageTaskQueue(Hr,Ld,Ti.iconDependencies),Tc())},void 0,!1,Xl):(Hr=new Map,Er=new Map);let fl=Array.from(Ti.patternDependencies.keys()).map(xa=>r.I.parse(xa));fl.length?at.send("getImages",{images:fl,source:this.source,scope:this.scope,tileID:this.tileID,type:"patterns"},(xa,Ld)=>{Or||(Or=xa,pa=new Map,Ll=this.updateImageMapAndGetImageTaskQueue(pa,Ld,Ti.patternDependencies),Tc())},void 0,!1,Xl):(pa=new Map,Ll=new Map)}if(Ti.elevationFeatures&&Ti.elevationFeatures.length>0){let Ss=[];for(let fl of Object.values(Wt))if(fl instanceof r.bb){let xa=fl.getUnevaluatedPortalGraph();xa&&Ss.push(xa)}let ml=r.fk.evaluate(Ss);for(let fl of Object.values(Wt))if(fl instanceof r.bb){let xa=ge.layers[qt.decode(fl.sourceLayerIndex)];fl.setEvaluatedPortalGraph(ml,xa,this.tileID.canonical,Ti.availableImages,Ti.brightness)}}Tc()};qn.length>0?Promise.allSettled(qn).then(No).catch(st):No()}rasterizeIfNeeded(ge,Ie,$e,ht){Array.from(Ie.values()).some(at=>at.usvg)?this.rasterize(ge,Ie,$e,ht):ht()}updateImageMapAndGetImageTaskQueue(ge,Ie,$e){let ht=new Map;for(let at of Ie.keys()){let st=$e.get(at)||[];for(let qt of st){let It=qt.toString(),Wt=Ie.get(qt.id.toString());Wt.usvg?ht.has(It)||(ht.set(It,qt),ge.set(It,Object.assign({},Wt))):ge.set(It,Wt)}}return ht}rasterize(ge,Ie,$e,ht){this.rasterizeTask=ge.send("rasterizeImages",{scope:this.scope,tasks:$e},(at,st)=>{if(!at)for(let[qt,It]of st.entries()){let Wt=Object.assign(Ie.get(qt),{data:It});Ie.set(qt,Wt)}ht()})}cancelRasterize(){this.rasterizeTask&&this.rasterizeTask.cancel()}}function V(At,ge,Ie,$e,ht){let at=new r.ac(ge,{brightness:Ie,worldview:ht});for(let st of At)st.recalculate(at,$e)}class $ extends r.E{constructor(ge,Ie,$e,ht,at,st,qt){super(),this.actor=ge,this.layerIndex=Ie,this.availableImages=$e,this.availableModels=ht,this.loadVectorData=st||r.aL,this.loading={},this.loaded={},this.deduped=new r.aK(ge.scheduler),this.isSpriteLoaded=at,this.scheduler=ge.scheduler,this.brightness=qt}loadTile(ge,Ie){let $e=ge.uid,ht=ge&&ge.request,at=ht&&ht.collectResourceTiming,st=this.loading[$e]=new N(ge);st.abort=this.loadVectorData(ge,(qt,It)=>{let Wt=!this.loading[$e];if(delete this.loading[$e],st.cancelRasterize(),Wt||qt||!It)return st.status="done",Wt||(this.loaded[$e]=st),Ie(qt);let $i=It.rawData,Ti={};It.expires&&(Ti.expires=It.expires),It.cacheControl&&(Ti.cacheControl=It.cacheControl),st.vectorTile=It.vectorTile||new r.fq(new r.bt($i));let qn=()=>{st.parse(st.vectorTile,this.layerIndex,this.availableImages,this.availableModels,this.actor,(So,No)=>{if(So||!No)return Ie(So);let Or={};if(at){let fr=s(ht);fr.length>0&&(Or.resourceTiming=JSON.parse(JSON.stringify(fr)))}Ie(null,Object.assign({rawTileData:$i.slice(0)},No,Ti,Or))})};this.isSpriteLoaded?qn():this.once("isSpriteLoaded",()=>{this.scheduler?this.scheduler.add(qn,{type:"parseTile",isSymbolTile:ge.isSymbolTile,zoom:ge.tileZoom}):qn()}),this.loaded=this.loaded||{},this.loaded[$e]=st})}reloadTile(ge,Ie){let $e=this.loaded,ht=ge.uid;if($e&&$e[ht]){let at=$e[ht];at.scaleFactor=ge.scaleFactor,at.showCollisionBoxes=ge.showCollisionBoxes,at.projection=ge.projection,at.brightness=ge.brightness,at.tileTransform=r.aZ(ge.tileID.canonical,ge.projection),at.extraShadowCaster=ge.extraShadowCaster,at.lut=ge.lut,at.worldview=ge.worldview;let st=(qt,It)=>{let Wt=at.reloadCallback;Wt&&(delete at.reloadCallback,at.parse(at.vectorTile,this.layerIndex,this.availableImages,this.availableModels,this.actor,Wt)),Ie(qt,It)};at.status==="parsing"?at.reloadCallback=st:at.status==="done"&&(at.vectorTile?at.parse(at.vectorTile,this.layerIndex,this.availableImages,this.availableModels,this.actor,st):st())}else Ie(null,void 0)}abortTile(ge,Ie){let $e=ge.uid,ht=this.loading[$e];ht&&(ht.abort&&ht.abort(),delete this.loading[$e]),Ie()}removeTile(ge,Ie){let $e=this.loaded,ht=ge.uid;$e&&$e[ht]&&delete $e[ht],Ie()}}class q{loadTile(ge,Ie){let{uid:$e,encoding:ht,rawImageData:at,padding:st}=ge,qt=ImageBitmap&&at instanceof ImageBitmap?this.getImageData(at,st):at;Ie(null,new r.fr($e,qt,ht,st<1))}reloadTile(ge,Ie){Ie(null,null)}abortTile(ge,Ie){Ie()}removeTile(ge,Ie){Ie()}getImageData(ge,Ie){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(ge.width,ge.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=ge.width,this.offscreenCanvas.height=ge.height,this.offscreenCanvasContext.drawImage(ge,0,0,ge.width,ge.height);let $e=this.offscreenCanvasContext.getImageData(-Ie,-Ie,ge.width+2*Ie,ge.height+2*Ie);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),$e}}r.bs.setPbf(r.bt);class W{constructor(ge){this._mrt=new r.bs(ge.partial?30:1/0),this._isHeaderLoaded=!1,this.uid=ge.uid,this.tileID=ge.tileID,this.source=ge.source}parse(ge,Ie){let $e=this._mrt;this.status="parsing",this._entireBuffer=ge;try{$e.parseHeader(ge),this._isHeaderLoaded=!0;let ht=[];for(let at in $e.layers){let st=$e.getLayer(at),qt=st.getDataRange(st.getBandList()),It=$e.createDecodingTask(qt),Wt=ge.slice(qt.firstByte,qt.lastByte+1),$i=r.bs.performDecoding(Wt,It).then(Ti=>It.complete(null,Ti)).catch(Ti=>It.complete(Ti,null));ht.push($i)}Promise.allSettled(ht).then(()=>Ie(null,$e)).catch(at=>Ie(at))}catch(ht){Ie(ht)}}}class te{constructor(ge){this.actor=ge,this.loading={},this.loaded={}}loadTile(ge,Ie){let $e=ge.uid,ht=ge.request,at=this.loading[$e]=new W(ge),{cancel:st}=r.bu(ht,(qt,It,Wt,$i)=>{let Ti=!this.loading[$e];if(delete this.loading[$e],Ti||qt||!It)return at.status="done",Ti||(this.loaded[$e]=at),Ie(qt);at.parse(It,(qn,So)=>{if(qn||!So)return Ie(qn);Ie(null,So,Wt,$i)}),this.loaded[$e]=at});at.abort=st}reloadTile(ge,Ie){Ie(null,void 0)}abortTile(ge,Ie){let $e=ge.uid,ht=this.loading[$e];ht&&(ht.abort&&ht.abort(),delete this.loading[$e]),Ie()}removeTile(ge,Ie){let $e=ge.uid;this.loaded[$e]&&delete this.loaded[$e],Ie()}decodeRasterArray(ge,Ie){r.bs.performDecoding(ge.buffer,ge.task).then($e=>Ie(null,$e)).catch($e=>Ie($e))}}let fe=r.fs.prototype.toGeoJSON;class xe{constructor(ge){this._feature=ge,this.extent=r.al,this.type=ge.type,this.properties=ge.tags,"id"in ge&&!isNaN(ge.id)&&(this.id=parseInt(ge.id,10))}loadGeometry(){if(this._feature.type===1){let ge=[];for(let Ie of this._feature.geometry)ge.push([new r.P(Ie[0],Ie[1])]);return ge}{let ge=[];for(let Ie of this._feature.geometry){let $e=[];for(let ht of Ie)$e.push(new r.P(ht[0],ht[1]));ge.push($e)}return ge}}toGeoJSON(ge,Ie,$e){return fe.call(this,ge,Ie,$e)}}class Fe{constructor(ge,Ie){this.name=ge,this.extent=r.al,this.length=Ie.length,this._jsonFeatures=Ie}feature(ge){return new xe(this._jsonFeatures[ge])}}class Re{constructor(ge){this.layers={},this.extent=r.al;for(let Ie of Object.keys(ge))this.layers[Ie]=new Fe(Ie,ge[Ie])}}let Se=64/4096,ke=128;class Xe{constructor(){this.features=new Map}clear(){this.features.clear()}load(ge=[],Ie){for(let $e of ge){let ht=$e.id;if(ht==null)continue;let at=this.features.get(ht);at&&this.updateCache(at,Ie),$e.geometry?(at=We($e),this.updateCache(at,Ie),this.features.set(ht,at)):this.features.delete(ht),this.updateCache(at,Ie)}}updateCache(ge,Ie){for(let{canonical:$e,uid:ht}of Object.values(Ie)){let{z:at,x:st,y:qt}=$e;yt(ge,Math.pow(2,at),st,qt)&&delete Ie[ht]}}getTile(ge,Ie,$e){let ht=Math.pow(2,ge),at=[];for(let st of this.features.values())yt(st,ht,Ie,$e)&&at.push(Xi(st,ht,Ie,$e));return{features:at}}getFeatures(){return[...this.features.values()]}}function yt({minX:At,minY:ge,maxX:Ie,maxY:$e},ht,at,st){return At<(at+1+Se)/ht&&ge<(st+1+Se)/ht&&Ie>(at-Se)/ht&&$e>(st-Se)/ht}function We(At){let{id:ge,geometry:Ie,properties:$e}=At;if(!Ie)return;if(Ie.type==="GeometryCollection")throw new Error("GeometryCollection not supported in dynamic mode.");let{type:ht,coordinates:at}=Ie,st={id:ge,type:1,geometry:[],tags:$e,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},qt=st.geometry;if(ht==="Point")Et(at,qt,st);else if(ht==="MultiPoint")for(let It of at)Et(It,qt,st);else if(ht==="LineString")st.type=2,we(at,qt,st);else if(ht==="MultiLineString")st.type=2,Qt(at,qt,st);else if(ht==="Polygon")st.type=3,Qt(at,qt,st,!0);else{if(ht!=="MultiPolygon")throw new Error("Input data is not a valid GeoJSON object.");st.type=3;for(let It of at)Qt(It,qt,st,!0)}return st}function Et([At,ge],Ie,$e){let ht=r.aF(At),at=r.aJ(ge);at=at<0?0:at>1?1:at,Ie.push(ht,at),$e.minX=Math.min($e.minX,ht),$e.minY=Math.min($e.minY,at),$e.maxX=Math.max($e.maxX,ht),$e.maxY=Math.max($e.maxY,at)}function we(At,ge,Ie,$e=!1,ht=!1){let at=[];for(let st of At)Et(st,at,Ie);ge.push(at),$e&&(function(st,qt){let It=0;for(let Wt=0,$i=st.length,Ti=$i-2;Wt<$i;Ti=Wt,Wt+=2)It+=(st[Wt]-st[Ti])*(st[Wt+1]+st[Ti+1]);if(It>0===qt)for(let Wt=0,$i=st.length;Wt<$i/2;Wt+=2){let Ti=st[Wt],qn=st[Wt+1];st[Wt]=st[$i-2-Wt],st[Wt+1]=st[$i-1-Wt],st[$i-2-Wt]=Ti,st[$i-1-Wt]=qn}})(at,ht)}function Qt(At,ge,Ie,$e=!1){for(let ht=0;ht=st&&Ti>=st||(Wt>=st?($i+=Math.round(No*((st-Wt)/So)),Wt=st):Ti>=st&&(qn=$i+Math.round(No*((st-Wt)/So)),Ti=st),$i>=st&&qn>=st||($i>=st?(Wt+=Math.round(So*((st-$i)/No)),$i=st):qn>=st&&(Ti=Wt+Math.round(So*((st-$i)/No)),qn=st),qt&&Wt===qt[qt.length-1][0]&&$i===qt[qt.length-1][1]||(qt=[[Wt,$i]],ht.push(qt)),qt.push([Ti,qn])))))}}function li({name:At,features:ge},Ie){Ie.writeStringField(1,At),Ie.writeVarintField(5,r.al);let $e=new Map,ht=new Map,at={keys:$e,values:ht,feature:null};for(let st of ge)at.feature=st,Ie.writeMessage(2,zt,at);for(let st of $e.keys())Ie.writeStringField(3,st);for(let st of ht.keys())Ie.writeMessage(4,fn,st)}function zt(At,ge){let Ie=At.feature;Ie.id!==void 0&&Number.isSafeInteger(+Ie.id)&&ge.writeVarintField(1,+Ie.id),Ie.tags&&ge.writeMessage(2,Bi,At),ge.writeVarintField(3,Ie.type),ge.writeMessage(4,Yi,Ie)}function Bi({keys:At,values:ge,feature:Ie},$e){for(let ht of Object.keys(Ie.tags)){let at=Ie.tags[ht];if(at===null)continue;let st=At.get(ht);st===void 0&&(st=At.size,At.set(ht,st)),$e.writeVarint(st);let qt=typeof at;qt!=="string"&&qt!=="boolean"&&qt!=="number"&&(at=JSON.stringify(at));let It=ge.get(at);It===void 0&&(It=ge.size,ge.set(at,It)),$e.writeVarint(It)}}function wt(At,ge){return(ge<<3)+(7&At)}function Lt(At){return At<<1^At>>31}function Yi(At,ge){let{geometry:Ie,type:$e}=At,ht=0,at=0;if($e===1){ge.writeVarint(wt(1,Ie.length));for(let st of Ie){let qt=st[0]-ht,It=st[1]-at;ge.writeVarint(Lt(qt)),ge.writeVarint(Lt(It)),ht+=qt,at+=It}}else for(let st of Ie){ge.writeVarint(wt(1,1));let qt=st.length-($e===3?1:0);for(let It=0;ItAt},vn=Math.fround||(Fo=new Float32Array(1),At=>(Fo[0]=+At,Fo[0]));var Fo;let Cn=3,zn=5,Co=6;class ro{constructor(ge){this.options=Object.assign(Object.create(tn),ge),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(ge){let{log:Ie,minZoom:$e,maxZoom:ht}=this.options;Ie&&console.time("total time");let at=`prepare ${ge.length} points`;Ie&&console.time(at),this.points=ge;let st=[];for(let It=0;It=$e;It--){let Wt=+Date.now();qt=this.trees[It]=this._createTree(this._cluster(qt,It)),Ie&&console.log("z%d: %d clusters in %dms",It,qt.numItems,+Date.now()-Wt)}return Ie&&console.timeEnd("total time"),this}getClusters(ge,Ie){let $e=((ge[0]+180)%360+360)%360-180,ht=Math.max(-90,Math.min(90,ge[1])),at=ge[2]===180?180:((ge[2]+180)%360+360)%360-180,st=Math.max(-90,Math.min(90,ge[3]));if(ge[2]-ge[0]>=360)$e=-180,at=180;else if($e>at){let Ti=this.getClusters([$e,ht,180,st],Ie),qn=this.getClusters([-180,ht,at,st],Ie);return Ti.concat(qn)}let qt=this.trees[this._limitZoom(Ie)],It=qt.range(Ee($e),xi(st),Ee(at),xi(ht)),Wt=qt.data,$i=[];for(let Ti of It){let qn=this.stride*Ti;$i.push(Wt[qn+zn]>1?pr(Wt,qn,this.clusterProps):this.points[Wt[qn+Cn]])}return $i}getChildren(ge){let Ie=this._getOriginId(ge),$e=this._getOriginZoom(ge),ht="No cluster with the specified id.",at=this.trees[$e];if(!at)throw new Error(ht);let st=at.data;if(Ie*this.stride>=st.length)throw new Error(ht);let qt=this.options.radius/(this.options.extent*Math.pow(2,$e-1)),It=at.within(st[Ie*this.stride],st[Ie*this.stride+1],qt),Wt=[];for(let $i of It){let Ti=$i*this.stride;st[Ti+4]===ge&&Wt.push(st[Ti+zn]>1?pr(st,Ti,this.clusterProps):this.points[st[Ti+Cn]])}if(Wt.length===0)throw new Error(ht);return Wt}getLeaves(ge,Ie,$e){let ht=[];return this._appendLeaves(ht,ge,Ie=Ie||10,$e=$e||0,0),ht}getTile(ge,Ie,$e){let ht=this.trees[this._limitZoom(ge)],at=Math.pow(2,ge),{extent:st,radius:qt}=this.options,It=qt/st,Wt=($e-It)/at,$i=($e+1+It)/at,Ti={features:[]};return this._addTileFeatures(ht.range((Ie-It)/at,Wt,(Ie+1+It)/at,$i),ht.data,Ie,$e,at,Ti),Ie===0&&this._addTileFeatures(ht.range(1-It/at,Wt,1,$i),ht.data,at,$e,at,Ti),Ie===at-1&&this._addTileFeatures(ht.range(0,Wt,It/at,$i),ht.data,-1,$e,at,Ti),Ti.features.length?Ti:null}getClusterExpansionZoom(ge){let Ie=this._getOriginZoom(ge)-1;for(;Ie<=this.options.maxZoom;){let $e=this.getChildren(ge);if(Ie++,$e.length!==1)break;ge=$e[0].properties.cluster_id}return Ie}_appendLeaves(ge,Ie,$e,ht,at){let st=this.getChildren(Ie);for(let qt of st){let It=qt.properties;if(It&&It.cluster?at+It.point_count<=ht?at+=It.point_count:at=this._appendLeaves(ge,It.cluster_id,$e,ht,at):at1,$i,Ti,qn;if(Wt)$i=Qr(Ie,It,this.clusterProps),Ti=Ie[It],qn=Ie[It+1];else{let Or=this.points[Ie[It+Cn]];$i=Or.properties;let[fr,Hr]=Or.geometry.coordinates;Ti=Ee(fr),qn=xi(Hr)}let So={type:1,geometry:[[Math.round(this.options.extent*(Ti*at-$e)),Math.round(this.options.extent*(qn*at-ht))]],tags:$i},No;No=Wt||this.options.generateId?Ie[It+Cn]:this.points[Ie[It+Cn]].id,No!==void 0&&(So.id=No),st.features.push(So)}}_limitZoom(ge){return Math.max(this.options.minZoom,Math.min(Math.floor(+ge),this.options.maxZoom+1))}_cluster(ge,Ie){let{radius:$e,extent:ht,reduce:at,minPoints:st}=this.options,qt=$e/(ht*Math.pow(2,Ie)),It=ge.data,Wt=[],$i=this.stride;for(let Ti=0;TiIe&&(fr+=It[pa+zn])}if(fr>Or&&fr>=st){let Hr,pa=qn*Or,Er=So*Or,Ll=-1,Xl=(Ti/$i<<5)+(Ie+1)+this.points.length;for(let Tc of No){let oa=Tc*$i;if(It[oa+2]<=Ie)continue;It[oa+2]=Ie;let Ss=It[oa+zn];pa+=It[oa]*Ss,Er+=It[oa+1]*Ss,It[oa+4]=Xl,at&&(Hr||(Hr=this._map(It,Ti,!0),Ll=this.clusterProps.length,this.clusterProps.push(Hr)),at(Hr,this._map(It,oa)))}It[Ti+4]=Xl,Wt.push(pa/fr,Er/fr,1/0,Xl,-1,fr),at&&Wt.push(Ll)}else{for(let Hr=0;Hr<$i;Hr++)Wt.push(It[Ti+Hr]);if(fr>1)for(let Hr of No){let pa=Hr*$i;if(!(It[pa+2]<=Ie)){It[pa+2]=Ie;for(let Er=0;Er<$i;Er++)Wt.push(It[pa+Er])}}}}return Wt}_getOriginId(ge){return ge-this.points.length>>5}_getOriginZoom(ge){return(ge-this.points.length)%32}_map(ge,Ie,$e){if(ge[Ie+zn]>1){let st=this.clusterProps[ge[Ie+Co]];return $e?Object.assign({},st):st}let ht=this.points[ge[Ie+Cn]].properties,at=this.options.map(ht);return $e&&at===ht?Object.assign({},at):at}}function pr(At,ge,Ie){return{type:"Feature",id:At[ge+Cn],properties:Qr(At,ge,Ie),geometry:{type:"Point",coordinates:[($e=At[ge],360*($e-.5)),bi(At[ge+1])]}};var $e}function Qr(At,ge,Ie){let $e=At[ge+zn],ht=$e>=1e4?`${Math.round($e/1e3)}k`:$e>=1e3?Math.round($e/100)/10+"k":$e,at=At[ge+Co],st=at===-1?{}:Object.assign({},Ie[at]);return Object.assign(st,{cluster:!0,cluster_id:At[ge+Cn],point_count:$e,point_count_abbreviated:ht})}function Ee(At){return At/360+.5}function xi(At){let ge=Math.sin(At*Math.PI/180),Ie=.5-.25*Math.log((1+ge)/(1-ge))/Math.PI;return Ie<0?0:Ie>1?1:Ie}function bi(At){let ge=(180-360*At)*Math.PI/180;return 360*Math.atan(Math.exp(ge))/Math.PI-90}function Dt(At,ge,Ie,$e){let ht=$e,at=ge+(Ie-ge>>1),st,qt=Ie-ge,It=At[ge],Wt=At[ge+1],$i=At[Ie],Ti=At[Ie+1];for(let qn=ge+3;qnht)st=qn,ht=So;else if(So===ht){let No=Math.abs(qn-at);No$e&&(st-ge>3&&Dt(At,ge,st,$e),At[st+2]=ht,Ie-st>3&&Dt(At,st,Ie,$e))}function _t(At,ge,Ie,$e,ht,at){let st=ht-Ie,qt=at-$e;if(st!==0||qt!==0){let It=((At-Ie)*st+(ge-$e)*qt)/(st*st+qt*qt);It>1?(Ie=ht,$e=at):It>0&&(Ie+=st*It,$e+=qt*It)}return st=At-Ie,qt=ge-$e,st*st+qt*qt}function Zt(At,ge,Ie,$e){let ht={id:At??null,type:ge,geometry:Ie,tags:$e,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(ge==="Point"||ge==="MultiPoint"||ge==="LineString")Ji(ht,Ie);else if(ge==="Polygon")Ji(ht,Ie[0]);else if(ge==="MultiLineString")for(let at of Ie)Ji(ht,at);else if(ge==="MultiPolygon")for(let at of Ie)Ji(ht,at[0]);return ht}function Ji(At,ge){for(let Ie=0;Ie0&&(st+=$e?(ht*$i-Wt*at)/2:Math.sqrt(Math.pow(Wt-ht,2)+Math.pow($i-at,2))),ht=Wt,at=$i}let qt=ge.length-3;ge[2]=1,Dt(ge,0,qt,Ie),ge[qt+2]=1,ge.size=Math.abs(st),ge.start=0,ge.end=ge.size}function po(At,ge,Ie,$e){for(let ht=0;ht1?1:Ie}function Ar(At,ge,Ie,$e,ht,at,st,qt){if($e/=ge,at>=(Ie/=ge)&&st<$e)return At;if(st=$e)return null;let It=[];for(let Wt of At){let $i=Wt.geometry,Ti=Wt.type,qn=ht===0?Wt.minX:Wt.minY,So=ht===0?Wt.maxX:Wt.maxY;if(qn>=Ie&&So<$e){It.push(Wt);continue}if(So=$e)continue;let No=[];if(Ti==="Point"||Ti==="MultiPoint")Ur($i,No,Ie,$e,ht);else if(Ti==="LineString")$l($i,No,Ie,$e,ht,!1,qt.lineMetrics);else if(Ti==="MultiLineString")ua($i,No,Ie,$e,ht,!1);else if(Ti==="Polygon")ua($i,No,Ie,$e,ht,!0);else if(Ti==="MultiPolygon")for(let Or of $i){let fr=[];ua(Or,fr,Ie,$e,ht,!0),fr.length&&No.push(fr)}if(No.length){if(qt.lineMetrics&&Ti==="LineString"){for(let Or of No)It.push(Zt(Wt.id,Ti,Or,Wt.tags));continue}Ti!=="LineString"&&Ti!=="MultiLineString"||(No.length===1?(Ti="LineString",No=No[0]):Ti="MultiLineString"),Ti!=="Point"&&Ti!=="MultiPoint"||(Ti=No.length===3?"Point":"MultiPoint"),It.push(Zt(Wt.id,Ti,No,Wt.tags))}}return It.length?It:null}function Ur(At,ge,Ie,$e,ht){for(let at=0;at=Ie&&st<=$e&&Sl(ge,At[at],At[at+1],At[at+2])}}function $l(At,ge,Ie,$e,ht,at,st){let qt=vu(At),It=ht===0?La:iu,Wt,$i,Ti=At.start;for(let fr=0;frIe&&($i=It(qt,Hr,pa,Ll,Xl,Ie),st&&(qt.start=Ti+Wt*$i)):Tc>$e?oa<$e&&($i=It(qt,Hr,pa,Ll,Xl,$e),st&&(qt.start=Ti+Wt*$i)):Sl(qt,Hr,pa,Er),oa=Ie&&($i=It(qt,Hr,pa,Ll,Xl,Ie),Ss=!0),oa>$e&&Tc<=$e&&($i=It(qt,Hr,pa,Ll,Xl,$e),Ss=!0),!at&&Ss&&(st&&(qt.end=Ti+Wt*$i),ge.push(qt),qt=vu(At)),st&&(Ti+=Wt)}let qn=At.length-3,So=At[qn],No=At[qn+1],Or=ht===0?So:No;Or>=Ie&&Or<=$e&&Sl(qt,So,No,At[qn+2]),qn=qt.length-3,at&&qn>=3&&(qt[qn]!==qt[0]||qt[qn+1]!==qt[1])&&Sl(qt,qt[0],qt[1],qt[2]),qt.length&&ge.push(qt)}function vu(At){let ge=[];return ge.size=At.size,ge.start=At.start,ge.end=At.end,ge}function ua(At,ge,Ie,$e,ht,at){for(let st of At)$l(st,ge,Ie,$e,ht,at,!1)}function Sl(At,ge,Ie,$e){At.push(ge,Ie,$e)}function La(At,ge,Ie,$e,ht,at){let st=(at-ge)/($e-ge);return Sl(At,at,Ie+(ht-Ie)*st,1),st}function iu(At,ge,Ie,$e,ht,at){let st=(at-Ie)/(ht-Ie);return Sl(At,ge+($e-ge)*st,at,1),st}function Ku(At,ge){let Ie=[];for(let $e=0;$e0&&ge.size<(ht?st:$e))return void(Ie.numPoints+=ge.length/3);let qt=[];for(let It=0;Itst)&&(Ie.numSimplified++,qt.push(ge[It],ge[It+1])),Ie.numPoints++;ht&&(function(It,Wt){let $i=0;for(let Ti=0,qn=It.length,So=qn-2;Ti0===Wt)for(let Ti=0,qn=It.length;Ti24)throw new Error("maxZoom should be in the 0-24 range");if(Ie.promoteId&&Ie.generateId)throw new Error("promoteId and generateId cannot be used together.");let ht=(function(at,st){let qt=[];if(at.type==="FeatureCollection")for(let It=0;It1&&console.time("creation"),So=this.tiles[qn]=Yc(ge,Ie,$e,ht,Wt),this.tileCoords.push({z:Ie,x:$e,y:ht}),$i)){$i>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ie,$e,ht,So.numFeatures,So.numPoints,So.numSimplified),console.timeEnd("creation"));let Ss=`z${Ie}`;this.stats[Ss]=(this.stats[Ss]||0)+1,this.total++}if(So.source=ge,at==null){if(Ie===Wt.indexMaxZoom||So.numPoints<=Wt.indexMaxPoints)continue}else{if(Ie===Wt.maxZoom||Ie===at)continue;if(at!=null){let Ss=at-Ie;if($e!==st>>Ss||ht!==qt>>Ss)continue}}if(So.source=null,ge.length===0)continue;$i>1&&console.time("clipping");let No=.5*Wt.buffer/Wt.extent,Or=.5-No,fr=.5+No,Hr=1+No,pa=null,Er=null,Ll=null,Xl=null,Tc=Ar(ge,Ti,$e-No,$e+fr,0,So.minX,So.maxX,Wt),oa=Ar(ge,Ti,$e+Or,$e+Hr,0,So.minX,So.maxX,Wt);ge=null,Tc&&(pa=Ar(Tc,Ti,ht-No,ht+fr,1,So.minY,So.maxY,Wt),Er=Ar(Tc,Ti,ht+Or,ht+Hr,1,So.minY,So.maxY,Wt),Tc=null),oa&&(Ll=Ar(oa,Ti,ht-No,ht+fr,1,So.minY,So.maxY,Wt),Xl=Ar(oa,Ti,ht+Or,ht+Hr,1,So.minY,So.maxY,Wt),oa=null),$i>1&&console.timeEnd("clipping"),It.push(pa||[],Ie+1,2*$e,2*ht),It.push(Er||[],Ie+1,2*$e,2*ht+1),It.push(Ll||[],Ie+1,2*$e+1,2*ht),It.push(Xl||[],Ie+1,2*$e+1,2*ht+1)}}getTile(ge,Ie,$e){ge=+ge,Ie=+Ie,$e=+$e;let ht=this.options,{extent:at,debug:st}=ht;if(ge<0||ge>24)return null;let qt=1<1&&console.log("drilling down to z%d-%d-%d",ge,Ie,$e);let Wt,$i=ge,Ti=Ie,qn=$e;for(;!Wt&&$i>0;)$i--,Ti>>=1,qn>>=1,Wt=this.tiles[Gx($i,Ti,qn)];return Wt&&Wt.source?(st>1&&(console.log("found parent tile z%d-%d-%d",$i,Ti,qn),console.time("drilling down")),this.splitTile(Wt.source,$i,Ti,qn,ge,Ie,$e),st>1&&console.timeEnd("drilling down"),this.tiles[It]?_m(this.tiles[It],at):null):null}}function Gx(At,ge,Ie){return 32*((1<Wt.tags&&"3d_elevation_id"in Wt.tags&&"source"in Wt.tags&&Wt.tags.source==="elevation",at=$e.features.filter(Wt=>ht(Wt)),st={_geojsonTileLayer:$e.features};at.length>0&&(st={_geojsonTileLayer:$e.features.filter(Wt=>!ht(Wt)),hd_road_elevation:at});let qt=new Re(st),It=(function(Wt){let $i=new r.bt;for(let Ti of Object.keys(Wt))$i.writeMessage(3,li,{name:Ti,features:Wt[Ti]});return $i.finish()})(st).buffer;ge(null,{vectorTile:qt,rawData:It})}class Pi extends ${constructor(ge,Ie,$e,ht,at,st,qt){super(ge,Ie,$e,ht,at,SS,qt),st&&(this.loadGeoJSON=st),this._dynamicIndex=new Xe}loadData(ge,Ie){let $e=ge&&ge.request,ht=$e&&$e.collectResourceTiming;this._geoJSONIndex=null,this.loadGeoJSON(ge,(at,st)=>{if(at||!st)return Ie(at);if(typeof st!="object")return Ie(new Error(`Input data given to '${ge.source}' is not a valid GeoJSON object.`));{try{if(ge.filter){let It=r.U(ge.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(It.result==="error")throw new Error(It.value.map(Wt=>`${Wt.key}: ${Wt.message}`).join(", "));st.features=st.features.filter(Wt=>It.value.evaluate({zoom:0},Wt))}ge.dynamic?(st.type==="Feature"&&(st={type:"FeatureCollection",features:[st]}),ge.append||(this._dynamicIndex.clear(),this.loaded={}),this._dynamicIndex.load(st.features,this.loaded),ge.cluster&&(st.features=this._dynamicIndex.getFeatures())):this.loaded={},this._geoJSONIndex=ge.cluster?new ro((function({superclusterOptions:It,clusterProperties:Wt}){if(!Wt||!It)return It;let $i={},Ti={},qn={accumulated:null,zoom:0},So={properties:null},No=Object.keys(Wt);for(let Or of No){let[fr,Hr]=Wt[Or],pa=r.U(Hr),Er=r.U(typeof fr=="string"?[fr,["accumulated"],["get",Or]]:fr);$i[Or]=pa.value,Ti[Or]=Er.value}return It.map=Or=>{So.properties=Or;let fr={};for(let Hr of No)fr[Hr]=$i[Hr].evaluate(qn,So);return fr},It.reduce=(Or,fr)=>{So.properties=fr;for(let Hr of No)qn.accumulated=Or[Hr],Or[Hr]=Ti[Hr].evaluate(qn,So)},It})(ge)).load(st.features):ge.dynamic?this._dynamicIndex:(function(It,Wt){return new fg(It,Wt)})(st,ge.geojsonVtOptions)}catch(It){return Ie(It)}let qt={};if(ht){let It=s($e);It&&(qt.resourceTiming={},qt.resourceTiming[ge.source]=JSON.parse(JSON.stringify(It)))}Ie(null,qt)}})}reloadTile(ge,Ie){let $e=this.loaded;return $e&&$e[ge.uid]?ge.partial?Ie(null,void 0):super.reloadTile(ge,Ie):this.loadTile(ge,Ie)}loadGeoJSON(ge,Ie){if(ge.request)r.m(ge.request,Ie);else{if(typeof ge.data!="string")return Ie(new Error(`Input data given to '${ge.source}' is not a valid GeoJSON object.`));setTimeout(()=>{try{return Ie(null,JSON.parse(ge.data))}catch{return Ie(new Error(`Input data given to '${ge.source}' is not a valid GeoJSON object.`))}},0)}}getClusterExpansionZoom(ge,Ie){try{Ie(null,this._geoJSONIndex.getClusterExpansionZoom(ge.clusterId))}catch($e){Ie($e)}}getClusterChildren(ge,Ie){try{Ie(null,this._geoJSONIndex.getChildren(ge.clusterId))}catch($e){Ie($e)}}getClusterLeaves(ge,Ie){try{Ie(null,this._geoJSONIndex.getLeaves(ge.clusterId,ge.limit,ge.offset))}catch($e){Ie($e)}}}class gg{constructor(ge,Ie,$e){this.tileID=new r.aO(ge.tileID.overscaledZ,ge.tileID.wrap,ge.tileID.canonical.z,ge.tileID.canonical.x,ge.tileID.canonical.y),this.tileZoom=ge.tileZoom,this.uid=ge.uid,this.zoom=ge.zoom,this.canonical=ge.tileID.canonical,this.pixelRatio=ge.pixelRatio,this.tileSize=ge.tileSize,this.source=ge.source,this.overscaling=this.tileID.overscaleFactor(),this.projection=ge.projection,this.brightness=Ie,this.worldview=$e}parse(ge,Ie,$e,ht){this.status="parsing";let at=new r.aO($e.tileID.overscaledZ,$e.tileID.wrap,$e.tileID.canonical.z,$e.tileID.canonical.x,$e.tileID.canonical.y),st=[],qt=Ie.familiesBySource[$e.source],It=new r.fe(at,$e.promoteId);It.bucketLayerIDs=[],It.is3DTile=!0,r.ft(ge).then(Wt=>{if(!Wt)return ht(new Error("Could not parse tile"));let $i=Wt.json.extensionsUsed&&Wt.json.extensionsUsed.includes("MAPBOX_mesh_features")||Wt.json.asset.extras&&Wt.json.asset.extras.MAPBOX_mesh_features,Ti=Wt.json.extensionsUsed&&Wt.json.extensionsUsed.includes("EXT_meshopt_compression"),qn=new r.ac(this.zoom,{brightness:this.brightness,worldview:this.worldview});for(let So in qt)for(let No of qt[So]){let Or=No[0];It.bucketLayerIDs.push(No.map(pa=>r.B(pa.id,pa.scope))),Or.recalculate(qn,[]);let fr=r.fu(Wt,1/r.d6($e.tileID.canonical)),Hr=new r.fv(No,fr,at,$i,Ti,this.brightness,It,this.worldview);$i||(Hr.needsUpload=!0),st.push(Hr),Hr.evaluate(Or)}this.status="done",ht(null,{buckets:st,featureIndex:It,collisionBoxArray:null,glyphAtlasImage:null,lineAtlas:null,imageAtlas:null,brightness:null})}).catch(Wt=>ht(new Error(Wt.message)))}}class sD{constructor(ge,Ie,$e,ht,at,st,qt,It){this.actor=ge,this.layerIndex=Ie,this.availableImages=$e,this.availableModels=ht,this.brightness=qt,this.loading={},this.loaded={},this.worldview=It}loadTile(ge,Ie){let $e=ge.uid,ht=this.loading[$e]=new gg(ge,this.brightness,this.worldview);r.bu(ge.request,(at,st)=>{let qt=!this.loading[$e];return delete this.loading[$e],qt||at?(ht.status="done",qt||(this.loaded[$e]=ht),Ie(at)):st&&st.byteLength!==0?void ht.parse(st,this.layerIndex,ge,(It,Wt)=>{ht.status="done",this.loaded=this.loaded||{},this.loaded[$e]=ht,It||!Wt?Ie(It):Ie(null,Wt)}):(ht.status="done",this.loaded[$e]=ht,Ie())})}reloadTile(ge,Ie){let $e=this.loaded,ht=ge.uid;if($e&&$e[ht]){let at=$e[ht];at.projection=ge.projection,at.brightness=ge.brightness;let st=(qt,It)=>{at.reloadCallback&&(delete at.reloadCallback,this.loadTile(ge,Ie)),Ie(qt,It)};at.status==="parsing"?at.reloadCallback=st:at.status==="done"&&this.loadTile(ge,Ie)}}abortTile(ge,Ie){let $e=ge.uid;this.loading[$e]&&delete this.loading[$e],Ie()}removeTile(ge,Ie){let $e=this.loaded,ht=ge.uid;$e&&$e[ht]&&delete $e[ht],Ie()}}class vb{constructor(ge){this.self=ge,this.actor=new r.fx(ge,this),this.layerIndexes={},this.availableImages={},this.availableModels={},this.isSpriteLoaded={},this.imageRasterizer=new r.x,this.rtlPluginParsingListeners=[],this.projections={},this.defaultProjection=r.cl({name:"mercator"}),this.workerSourceTypes={vector:$,geojson:Pi,"raster-dem":q,"raster-array":te,"batched-model":sD},this.workerSources={},this.self.registerWorkerSource=(Ie,$e)=>{if(this.workerSourceTypes[Ie])throw new Error(`Worker source with name "${Ie}" already registered.`);this.workerSourceTypes[Ie]=$e},this.self.registerRTLTextPlugin=Ie=>{if(r.fy.isParsed())throw new Error("RTL text plugin already registered.");r.fy.setState({pluginStatus:r.fz.parsed,pluginURL:r.fy.getPluginURL()}),r.fy.applyArabicShaping=Ie.applyArabicShaping,r.fy.processBidirectionalText=Ie.processBidirectionalText,r.fy.processStyledBidirectionalText=Ie.processStyledBidirectionalText;for(let $e of this.rtlPluginParsingListeners)$e(null,!0);this.rtlPluginParsingListeners=[]}}clearCaches(ge,Ie,$e){delete this.layerIndexes[ge],delete this.availableImages[ge],delete this.availableModels[ge],delete this.workerSources[ge],$e()}checkIfReady(ge,Ie,$e){$e()}setReferrer(ge,Ie){this.referrer=Ie}spriteLoaded(ge,Ie){this.isSpriteLoaded[ge]||(this.isSpriteLoaded[ge]={});let{scope:$e,isLoaded:ht}=Ie;if(this.isSpriteLoaded[ge][$e]=ht,this.workerSources[ge]&&this.workerSources[ge][$e])for(let at in this.workerSources[ge][$e]){let st=this.workerSources[ge][$e][at];for(let qt in st){let It=st[qt];It instanceof $&&(It.isSpriteLoaded=ht,It.fire(new r.z("isSpriteLoaded")))}}}setImages(ge,Ie,$e){this.availableImages[ge]||(this.availableImages[ge]={});let{scope:ht,images:at}=Ie;if(this.availableImages[ge][ht]=at,this.workerSources[ge]&&this.workerSources[ge][ht]){for(let st in this.workerSources[ge][ht]){let qt=this.workerSources[ge][ht][st];for(let It in qt)qt[It].availableImages=at}$e()}else $e()}setModels(ge,{scope:Ie,models:$e},ht){if(this.availableModels[ge]||(this.availableModels[ge]={}),this.availableModels[ge][Ie]=$e,this.workerSources[ge]&&this.workerSources[ge][Ie]){for(let at in this.workerSources[ge][Ie]){let st=this.workerSources[ge][Ie][at];for(let qt in st)st[qt].availableModels=$e}ht()}else ht()}setProjection(ge,Ie){this.projections[ge]=r.cl(Ie)}setBrightness(ge,Ie,$e){this.brightness=Ie,$e()}setWorldview(ge,Ie,$e){this.worldview=Ie,$e()}setLayers(ge,Ie,$e){this.getLayerIndex(ge,Ie.scope).replace(Ie.layers,Ie.options),$e()}updateLayers(ge,Ie,$e){this.getLayerIndex(ge,Ie.scope).update(Ie.layers,Ie.removedIds,Ie.options),$e()}loadTile(ge,Ie,$e){Ie.projection=this.projections[ge]||this.defaultProjection,this.getWorkerSource(ge,Ie.type,Ie.source,Ie.scope).loadTile(Ie,$e)}decodeRasterArray(ge,Ie,$e){this.getWorkerSource(ge,Ie.type,Ie.source,Ie.scope).decodeRasterArray(Ie,$e)}reloadTile(ge,Ie,$e){Ie.projection=this.projections[ge]||this.defaultProjection,this.getWorkerSource(ge,Ie.type,Ie.source,Ie.scope).reloadTile(Ie,$e)}abortTile(ge,Ie,$e){this.getWorkerSource(ge,Ie.type,Ie.source,Ie.scope).abortTile(Ie,$e)}removeTile(ge,Ie,$e){this.getWorkerSource(ge,Ie.type,Ie.source,Ie.scope).removeTile(Ie,$e)}removeSource(ge,Ie,$e){if(!(this.workerSources[ge]&&this.workerSources[ge][Ie.scope]&&this.workerSources[ge][Ie.scope][Ie.type]&&this.workerSources[ge][Ie.scope][Ie.type][Ie.source]))return;let ht=this.workerSources[ge][Ie.scope][Ie.type][Ie.source];delete this.workerSources[ge][Ie.scope][Ie.type][Ie.source],ht.removeSource!==void 0?ht.removeSource(Ie,$e):$e()}loadWorkerSource(ge,Ie,$e){try{this.self.importScripts(Ie.url),$e()}catch(ht){$e(ht.toString())}}syncRTLPluginState(ge,Ie,$e){if(r.fy.isParsed())$e(null,!0);else if(r.fy.isParsing())this.rtlPluginParsingListeners.push($e);else try{r.fy.setState(Ie);let ht=r.fy.getPluginURL();!r.fy.isLoaded()||r.fy.isParsed()||r.fy.isParsing()||ht==null||(r.fy.setState({pluginStatus:r.fz.parsing,pluginURL:r.fy.getPluginURL()}),this.self.importScripts(ht),r.fy.isParsed()?$e(null,!0):this.rtlPluginParsingListeners.push($e))}catch(ht){$e(ht.toString())}}setDracoUrl(ge,Ie){this.dracoUrl=Ie}getAvailableImages(ge,Ie){this.availableImages[ge]||(this.availableImages[ge]={});let $e=this.availableImages[ge][Ie];return $e||($e=[]),$e}getAvailableModels(ge,Ie){this.availableModels[ge]||(this.availableModels[ge]={});let $e=this.availableModels[ge][Ie];return $e||($e={}),$e}getLayerIndex(ge,Ie){this.layerIndexes[ge]||(this.layerIndexes[ge]={});let $e=this.layerIndexes[ge][Ie];return $e||($e=this.layerIndexes[ge][Ie]=new v,$e.scope=Ie),$e}getWorkerSource(ge,Ie,$e,ht){let at=this.workerSources;return at[ge]||(at[ge]={}),at[ge][ht]||(at[ge][ht]={}),at[ge][ht][Ie]||(at[ge][ht][Ie]={}),this.isSpriteLoaded[ge]||(this.isSpriteLoaded[ge]={}),at[ge][ht][Ie][$e]||(at[ge][ht][Ie][$e]=new this.workerSourceTypes[Ie]({send:(st,qt,It,Wt,$i,Ti)=>this.actor.send(st,qt,It,ge,$i,Ti),scheduler:this.actor.scheduler},this.getLayerIndex(ge,ht),this.getAvailableImages(ge,ht),this.getAvailableModels(ge,ht),this.isSpriteLoaded[ge][ht],void 0,this.brightness,this.worldview)),at[ge][ht][Ie][$e]}rasterizeImagesWorker(ge,Ie,$e){let ht=new Map;for(let[at,{image:st,imageVariant:qt}]of Ie.tasks.entries()){let It=this.imageRasterizer.rasterize(qt,st,Ie.scope,ge);ht.set(at,It)}$e(void 0,ht)}removeRasterizedImages(ge,Ie,$e){this.imageRasterizer.removeImagesFromCacheByIds(Ie.imageIds,Ie.scope,ge),$e()}enforceCacheSizeLimit(ge,Ie){r.fA(Ie)}getWorkerPerformanceMetrics(ge,Ie,$e){$e(void 0,void 0)}}return r.fw(self)&&(self.worker=new vb(self)),vb}),i(["./shared"],function(r){var s="3.15.0";let d={create:"create",load:"load",fullLoad:"fullLoad"},m={mark(_){performance.mark(_)},measure(_,l,p){performance.measure(_,l,p)}};function v(_){let l=_.name.split("?")[0];return r.a(l)&&l.includes("mapbox-gl.js")?"javascript":r.a(l)&&l.includes("mapbox-gl.css")?"css":r.b(l)?"fontRange":r.c(l)?"sprite":r.i(l)?"style":r.d(l)?"tilejson":"other"}var w,O={},N=(function(){if(w)return O;function _(g){return!l(g)}function l(g){return typeof window>"u"||typeof document>"u"?"not a browser":(function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var x,A,R=new Blob([""],{type:"text/javascript"}),B=URL.createObjectURL(R);try{A=new Worker(B),x=!0}catch{x=!1}return A&&A.terminate(),URL.revokeObjectURL(B),x})()?(function(){var x=document.createElement("canvas");x.width=x.height=1;var A=x.getContext("2d");if(!A)return!1;var R=A.getImageData(0,0,1,1);return R&&R.width===x.width})()?(p[C=g&&g.failIfMajorPerformanceCaveat]===void 0&&(p[C]=(function(x){var A,R=(function(B){var H=document.createElement("canvas"),G=Object.create(_.webGLContextAttributes);return G.failIfMajorPerformanceCaveat=B,H.getContext("webgl2",G)})(x);if(!R)return!1;try{A=R.createShader(R.VERTEX_SHADER)}catch{return!1}return!(!A||R.isContextLost())&&(R.shaderSource(A,"void main() {}"),R.compileShader(A),R.getShaderParameter(A,R.COMPILE_STATUS)===!0)})(C)),p[C]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL2 support"):"insufficient Canvas/getImageData support":"insufficient worker support";var C}w=1,O.supported=_,O.notSupportedReason=l;var p={};return _.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0},O})();function V(_,l,p){let g=document.createElement(_);return l!=null&&(g.className=l),p&&p.appendChild(g),g}function $(_,l,p){let g=document.createElementNS("http://www.w3.org/2000/svg",_);for(let C of Object.keys(l))g.setAttributeNS(null,C,String(l[C]));return p&&p.appendChild(g),g}let q=typeof document<"u"?document.documentElement&&document.documentElement.style:null,W=q&&q.userSelect!==void 0?"userSelect":"WebkitUserSelect",te;function fe(){q&&W&&(te=q[W],q[W]="none")}function xe(){q&&W&&(q[W]=te)}function Fe(_){_.preventDefault(),_.stopPropagation(),window.removeEventListener("click",Fe,!0)}function Re(){window.addEventListener("click",Fe,!0),window.setTimeout(()=>{window.removeEventListener("click",Fe,!0)},0)}function Se(_,l){let p=_.getBoundingClientRect();return yt(_,p,l)}function ke(_,l){let p=_.getBoundingClientRect(),g=[];for(let C=0;Cthis._skuTokenExpiresAt}transformRequest(l,p){return this._transformRequestFn&&this._transformRequestFn(l,p)||{url:l}}normalizeStyleURL(l,p){if(!r.h(l))return l;let g=Xi(l);return g.params.push(`sdk=js-${s}`),g.path=`/styles/v1${g.path}`,this._makeAPIURL(g,this._customAccessToken||p)}normalizeGlyphsURL(l,p){if(!r.h(l))return l;let g=Xi(l);return g.path=`/fonts/v1${g.path}`,this._makeAPIURL(g,this._customAccessToken||p)}normalizeModelURL(l,p){if(!r.h(l))return l;let g=Xi(l);return g.path=`/models/v1${g.path}`,this._makeAPIURL(g,this._customAccessToken||p)}normalizeSourceURL(l,p,g,C){if(!r.h(l))return l;let x=Xi(l);return x.path=`/v4/${x.authority}.json`,x.params.push("secure"),g&&x.params.push(`language=${g}`),C&&x.params.push(`worldview=${C}`),this._makeAPIURL(x,this._customAccessToken||p)}normalizeIconsetURL(l,p){let g=Xi(l);return r.h(l)?(g.path=`/styles/v1${g.path}/iconset.pbf`,this._makeAPIURL(g,this._customAccessToken||p)):ei(g)}normalizeSpriteURL(l,p,g,C){let x=Xi(l);return r.h(l)?(x.path=`/styles/v1${x.path}/sprite${p}${g}`,this._makeAPIURL(x,this._customAccessToken||C)):(x.path+=`${p}${g}`,ei(x))}normalizeTileURL(l,p,g){if(this._isSkuTokenExpired()&&this._createSkuToken(),l&&!r.h(l))return l;let C=Xi(l);C.path=C.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${p||g&&C.authority!=="raster"&&g===512?"@2x":""}${r.k.supported?".webp":"$1"}`),C.authority==="raster"?C.path=`/${r.e.RASTER_URL_PREFIX}${C.path}`:C.authority==="rasterarrays"?C.path=`/${r.e.RASTERARRAYS_URL_PREFIX}${C.path}`:C.authority==="3dtiles"?C.path=`/${r.e.TILES3D_URL_PREFIX}${C.path}`:(C.path=C.path.replace(/^.+\/v4\//,"/"),C.path=`/${r.e.TILE_URL_VERSION}${C.path}`);let x=this._customAccessToken||(function(A){for(let R of A){let B=R.match(/^access_token=(.*)$/);if(B)return B[1]}return null})(C.params)||r.e.ACCESS_TOKEN;return r.e.REQUIRE_ACCESS_TOKEN&&x&&this._skuToken&&C.params.push(`sku=${this._skuToken}`),this._makeAPIURL(C,x)}canonicalizeTileURL(l,p){let g=Xi(l);if(!g.path.match(/^(\/v4\/|\/(raster|rasterarrays)\/v1\/)/)||!g.path.match(/\.[\w]+$/))return l;let C="mapbox://";g.path.match(/^\/raster\/v1\//)?C+=`raster/${g.path.replace(`/${r.e.RASTER_URL_PREFIX}/`,"")}`:g.path.match(/^\/rasterarrays\/v1\//)?C+=`rasterarrays/${g.path.replace(`/${r.e.RASTERARRAYS_URL_PREFIX}/`,"")}`:C+=`tiles/${g.path.replace(`/${r.e.TILE_URL_VERSION}/`,"")}`;let x=g.params;return p&&(x=x.filter(A=>!A.match(/^access_token=/))),x.length&&(C+=`?${x.join("&")}`),C}canonicalizeTileset(l,p){let g=!!p&&r.h(p),C=[];for(let x of l.tiles||[])r.j(x)?C.push(this.canonicalizeTileURL(x,g)):C.push(x);return C}_makeAPIURL(l,p){let g="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",C=Xi(r.e.API_URL);if(l.protocol=C.protocol,l.authority=C.authority,l.protocol==="http"){let x=l.params.indexOf("secure");x>=0&&l.params.splice(x,1)}if(C.path!=="/"&&(l.path=`${C.path}${l.path}`),!r.e.REQUIRE_ACCESS_TOKEN)return ei(l);if(p=p||r.e.ACCESS_TOKEN,!this._silenceAuthErrors){if(!p)throw new Error(`An API access token is required to use Mapbox GL. ${g}`);if(p[0]==="s")throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${g}`)}return l.params=l.params.filter(x=>x.indexOf("access_token")===-1),l.params.push(`access_token=${p||""}`),ei(l)}}let Qt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Xi(_){let l=_.match(Qt);if(!l)throw new Error("Unable to parse URL object");return{protocol:l[1],authority:l[2],path:l[3]||"/",params:l[4]?l[4].split("&"):[]}}function ei(_){let l=_.params.length?`?${_.params.join("&")}`:"";return`${_.protocol}://${_.authority}${_.path}${l}`}let li="mapbox.eventData";function zt(_){if(!_)return null;let l=_.split(".");if(!l||l.length!==3)return null;try{return JSON.parse(r.l(l[1]))}catch{return null}}class Bi{constructor(l){this.type=l,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(l){let p=zt(r.e.ACCESS_TOKEN),g="";return g=p&&p.u?r.f(p.u):r.e.ACCESS_TOKEN||"",l?`${li}.${l}:${g}`:`${li}:${g}`}fetchEventData(){let l=r.s("localStorage"),p=this.getStorageKey(),g=this.getStorageKey("uuid");if(l)try{let C=localStorage.getItem(p);C&&(this.eventData=JSON.parse(C));let x=localStorage.getItem(g);x&&(this.anonId=x)}catch{r.w("Unable to read from LocalStorage")}}saveEventData(){let l=r.s("localStorage"),p=this.getStorageKey(),g=this.getStorageKey("uuid"),C=this.anonId;if(l&&C)try{localStorage.setItem(g,C),Object.keys(this.eventData).length>=1&&localStorage.setItem(p,JSON.stringify(this.eventData))}catch{r.w("Unable to write to LocalStorage")}}processRequests(l){}postEvent(l,p,g,C){if(!r.e.EVENTS_URL)return;let x=Xi(r.e.EVENTS_URL);x.params.push(`access_token=${C||r.e.ACCESS_TOKEN||""}`);let A={event:this.type,created:new Date(l).toISOString()},R=p?Object.assign(A,p):A,B={url:ei(x),headers:{"Content-Type":"text/plain"},body:JSON.stringify([R])};this.pendingRequest=r.p(B,H=>{this.pendingRequest=null,g(H),this.saveEventData(),this.processRequests(C)})}queueRequest(l,p){this.queue.push(l),this.processRequests(p)}}let wt=new class extends Bi{constructor(_){super("appUserTurnstile"),this._customAccessToken=_}postTurnstileEvent(_,l){r.e.EVENTS_URL&&r.e.ACCESS_TOKEN&&Array.isArray(_)&&_.some(p=>r.h(p)||r.j(p))&&this.queueRequest(Date.now(),l)}processRequests(_){if(this.pendingRequest||this.queue.length===0)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();let l=zt(r.e.ACCESS_TOKEN),p=l?l.u:r.e.ACCESS_TOKEN,g=p!==this.eventData.tokenU;r.v(this.anonId)||(this.anonId=r.u(),g=!0);let C=this.queue.shift();if(this.eventData.lastSuccess){let x=new Date(this.eventData.lastSuccess),A=new Date(C),R=(C-this.eventData.lastSuccess)/864e5;g=g||R>=1||R<-1||x.getDate()!==A.getDate()}else g=!0;g?this.postEvent(C,{sdkIdentifier:"mapbox-gl-js",sdkVersion:s,skuId:We,"enabled.telemetry":!1,userId:this.anonId},x=>{x||(this.eventData.lastSuccess=C,this.eventData.tokenU=p)},_):this.processRequests()}},Lt=wt.postTurnstileEvent.bind(wt),Yi=new class extends Bi{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(_,l,p,g){this.skuToken=l,this.errorCb=g,r.e.EVENTS_URL&&(p||r.e.ACCESS_TOKEN?this.queueRequest({id:_,timestamp:Date.now()},p):this.errorCb(new Error(Et)))}processRequests(_){if(this.pendingRequest||this.queue.length===0)return;let{id:l,timestamp:p}=this.queue.shift();l&&this.success[l]||(this.anonId||this.fetchEventData(),r.v(this.anonId)||(this.anonId=r.u()),this.postEvent(p,{sdkIdentifier:"mapbox-gl-js",sdkVersion:s,skuId:We,skuToken:this.skuToken,userId:this.anonId},g=>{g?this.errorCb(g):l&&(this.success[l]=!0)},_))}remove(){this.errorCb=null}},fn=Yi.postMapLoadEvent.bind(Yi),tn=new class extends Bi{constructor(){super("style.load"),this.eventIdPerMapInstanceMap=new Map,this.mapInstanceIdMap=new WeakMap}getMapInstanceId(_){let l=this.mapInstanceIdMap.get(_);return l||(l=r.u(),this.mapInstanceIdMap.set(_,l)),l}getEventId(_){let l=this.eventIdPerMapInstanceMap.get(_)||0;return this.eventIdPerMapInstanceMap.set(_,l+1),l}postStyleLoadEvent(_,l){let{map:p,style:g,importedStyles:C}=l;if(!r.e.EVENTS_URL||!_&&!r.e.ACCESS_TOKEN)return;let x=this.getMapInstanceId(p),A={mapInstanceId:x,eventId:this.getEventId(x),style:g};C.length&&(A.importedStyles=C),this.queueRequest({timestamp:Date.now(),payload:A},_)}processRequests(_){if(this.pendingRequest||this.queue.length===0)return;let{timestamp:l,payload:p}=this.queue.shift();this.postEvent(l,p,()=>{},_)}},vn=tn.postStyleLoadEvent.bind(tn),Fo=new class extends Bi{constructor(){super("gljs.performance")}postPerformanceEvent(_,l){r.e.EVENTS_URL&&(_||r.e.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:l},_)}processRequests(_){if(this.pendingRequest||this.queue.length===0)return;let{timestamp:l,performanceData:p}=this.queue.shift(),g=(function(C){let x=performance.getEntriesByType("resource"),A=performance.getEntriesByType("mark"),R=(function(oe){let le={};if(oe){for(let de in oe)if(de!=="other")for(let Ce of oe[de]){let he=`${de}ResolveRangeMin`,Te=`${de}ResolveRangeMax`,Pe=`${de}RequestCount`,Ve=`${de}RequestCachedCount`;le[he]=Math.min(le[he]||1/0,Ce.startTime),le[Te]=Math.max(le[Te]||-1/0,Ce.responseEnd);let et=Qe=>{le[Qe]===void 0&&(le[Qe]=0),++le[Qe]};Ce.transferSize!==void 0&&Ce.transferSize===0&&et(Ve),et(Pe)}}return le})((function(oe,le){let de={};if(oe)for(let Ce of oe){let he=le(Ce);de[he]===void 0&&(de[he]=[]),de[he].push(Ce)}return de})(x,v)),B=window.devicePixelRatio,H=navigator.connection||navigator.mozConnection||navigator.webkitConnection,G=H?H.effectiveType:void 0,J={counters:[],metadata:[],attributes:[]},K=(oe,le,de)=>{de!=null&&oe.push({name:le,value:de.toString()})};for(let oe in R)K(J.counters,oe,R[oe]);if(C.interactionRange[0]!==1/0&&C.interactionRange[1]!==-1/0&&(K(J.counters,"interactionRangeMin",C.interactionRange[0]),K(J.counters,"interactionRangeMax",C.interactionRange[1])),A)for(let oe of Object.keys(d)){let le=d[oe],de=A.find(Ce=>Ce.name===le);de&&K(J.counters,le,de.startTime)}return K(J.counters,"visibilityHidden",C.visibilityHidden),K(J.attributes,"style",(function(oe){if(oe)for(let le of oe){let de=le.name.split("?")[0];if(r.i(de)){let Ce=de.split("/").slice(-2);if(Ce.length===2)return`mapbox://styles/${Ce[0]}/${Ce[1]}`}}})(x)),K(J.attributes,"terrainEnabled",C.terrainEnabled?"true":"false"),K(J.attributes,"fogEnabled",C.fogEnabled?"true":"false"),K(J.attributes,"projection",C.projection),K(J.attributes,"zoom",C.zoom),K(J.metadata,"devicePixelRatio",B),K(J.metadata,"connectionEffectiveType",G),K(J.metadata,"navigatorUserAgent",navigator.userAgent),K(J.metadata,"screenWidth",window.screen.width),K(J.metadata,"screenHeight",window.screen.height),K(J.metadata,"windowWidth",window.innerWidth),K(J.metadata,"windowHeight",window.innerHeight),K(J.metadata,"mapWidth",C.width/B),K(J.metadata,"mapHeight",C.height/B),K(J.metadata,"webglRenderer",C.renderer),K(J.metadata,"webglVendor",C.vendor),K(J.metadata,"sdkVersion",s),K(J.metadata,"sdkIdentifier","mapbox-gl-js"),J})(p);for(let C of g.metadata);for(let C of g.counters);for(let C of g.attributes);this.postEvent(l,g,()=>{},_)}},Cn=Fo.postPerformanceEvent.bind(Fo),zn=new class extends Bi{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(_,l,p,g){if(!r.e.API_URL||!r.e.SESSION_PATH)return;let C=Xi(r.e.API_URL+r.e.SESSION_PATH);C.params.push(`sku=${l||""}`),C.params.push(`access_token=${g||r.e.ACCESS_TOKEN||""}`);let x={url:ei(C),headers:{"Content-Type":"text/plain"}};this.pendingRequest=r.g(x,A=>{this.pendingRequest=null,p(A),this.saveEventData(),this.processRequests(g)})}getSessionAPI(_,l,p,g){this.skuToken=l,this.errorCb=g,r.e.SESSION_PATH&&r.e.API_URL&&(p||r.e.ACCESS_TOKEN?this.queueRequest({id:_,timestamp:Date.now()},p):this.errorCb(new Error(Et)))}processRequests(_){if(this.pendingRequest||this.queue.length===0)return;let{id:l,timestamp:p}=this.queue.shift();l&&this.success[l]||this.getSession(p,this.skuToken,g=>{g?this.errorCb(g):l&&(this.success[l]=!0)},_)}remove(){this.errorCb=null}},Co=zn.getSessionAPI.bind(zn),ro=new Set;function pr(_,l){l?ro.add(_):ro.delete(_)}class Qr{constructor(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSourceCaches={},this._updatedPaintProps=new Set,this._updatedImages={}}isDirty(){return this._changed}setDirty(){this._changed=!0}getUpdatedSourceCaches(){return this._updatedSourceCaches}updateSourceCache(l,p){this._updatedSourceCaches[l]=p,this.setDirty()}discardSourceCacheUpdate(l){delete this._updatedSourceCaches[l]}updateLayer(l){let p=l.scope;this._updatedLayers[p]=this._updatedLayers[p]||new Set,this._updatedLayers[p].add(l.id),this.setDirty()}removeLayer(l){let p=l.scope;this._removedLayers[p]=this._removedLayers[p]||{},this._updatedLayers[p]=this._updatedLayers[p]||new Set,this._removedLayers[p][l.id]=l,this._updatedLayers[p].delete(l.id),this._updatedPaintProps.delete(l.fqid),this.setDirty()}getRemovedLayer(l){return this._removedLayers[l.scope]?this._removedLayers[l.scope][l.id]:null}discardLayerRemoval(l){this._removedLayers[l.scope]&&delete this._removedLayers[l.scope][l.id]}getLayerUpdatesByScope(){let l={};for(let p in this._updatedLayers)l[p]=l[p]||{},l[p].updatedIds=Array.from(this._updatedLayers[p].values());for(let p in this._removedLayers)l[p]=l[p]||{},l[p].removedIds=Object.keys(this._removedLayers[p]);return l}getUpdatedPaintProperties(){return this._updatedPaintProps}updatePaintProperties(l){this._updatedPaintProps.add(l.fqid),this.setDirty()}getUpdatedImages(l){return this._updatedImages[l]?Array.from(this._updatedImages[l].values()):[]}updateImage(l,p){this._updatedImages[p]=this._updatedImages[p]||new Set,this._updatedImages[p].add(r.I.toString(l)),this.setDirty()}resetUpdatedImages(l){this._updatedImages[l]&&this._updatedImages[l].clear()}reset(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSourceCaches={},this._updatedPaintProps.clear(),this._updatedImages={}}}function Ee(_){let{userImage:l}=_;return!!(l&&l.render&&l.render())&&(_.data.replace(new Uint8Array(l.data.buffer)),!0)}class xi extends r.E{constructor(l){super(),this.imageProviders=new Map,this.images=new Map,this.updatedImages=new Map,this.callbackDispatchedThisFrame=new Map,this.loaded=new Map,this.requestors=[],this.patterns=new Map,this.patternsInFlight=new Set,this.atlasImage=new Map,this.atlasTexture=new Map,this.dirty=!0,this.spriteFormat=l,l!=="raster"&&r.r()&&(this.imageRasterizerDispatcher=new r.D(r.t(),this,"Image Rasterizer Worker",1))}addScope(l){this.loaded.set(l,!1),this.imageProviders.set(l,new Map),this.images.set(l,new Map),this.updatedImages.set(l,new Set),this.callbackDispatchedThisFrame.set(l,new Set),this.patterns.set(l,new Map),this.atlasImage.set(l,new r.q({width:1,height:1}))}removeScope(l){this.loaded.delete(l),this.imageProviders.delete(l),this.images.delete(l),this.updatedImages.delete(l),this.callbackDispatchedThisFrame.delete(l),this.patterns.delete(l),this.atlasImage.delete(l);let p=this.atlasTexture.get(l);p&&(p.destroy(),this.atlasTexture.delete(l))}addImageProvider(l,p){this.imageProviders.has(p)||this.imageProviders.set(p,new Map),this.imageProviders.get(p).set(l.id,l)}removeImageProvider(l,p){this.imageProviders.has(p)&&this.imageProviders.get(p).delete(l)}getPendingImageProviders(){let l=[];for(let p of this.imageProviders.values())for(let g of p.values())g.hasPendingRequests()&&l.push(g);return l}get imageRasterizer(){return this._imageRasterizer||(this._imageRasterizer=new r.x),this._imageRasterizer}isLoaded(){for(let l of this.loaded.keys())if(!this.loaded.get(l))return!1;return!0}setLoaded(l,p){if(this.loaded.get(p)!==l&&(this.loaded.set(p,l),l)){for(let{ids:g,callback:C}of this.requestors)this._notify(g,p,C);this.requestors=[]}}hasImage(l,p){return!!this.getImage(l,p)}getImage(l,p){return this.images.get(p).get(l.toString())}addImage(l,p,g){this._validate(l,g)&&this.images.get(p).set(l.toString(),g)}_validate(l,p){let g=!0;return this._validateStretch(p.stretchX,p.data&&p.data.width)||(this.fire(new r.y(new Error(`Image "${l.name}" has invalid "stretchX" value`))),g=!1),this._validateStretch(p.stretchY,p.data&&p.data.height)||(this.fire(new r.y(new Error(`Image "${l.name}" has invalid "stretchY" value`))),g=!1),this._validateContent(p.content,p)||(this.fire(new r.y(new Error(`Image "${l.name}" has invalid "content" value`))),g=!1),g}_validateStretch(l,p){if(!l)return!0;let g=0;for(let C of l){if(C[0]r.I.from(p))}getImages(l,p,g){let C=[],x=[],A=this.imageProviders.get(p);for(let G of l){if(!G.iconsetId){C.push(G);continue}let J=A.get(G.iconsetId);J&&(this.getImage(G,p)?x.push(G):J.addPendingRequest(G))}if(C.length===0)return void this._notify(x,p,g);let R=!0,B=!!this.loaded.get(p),H=this.images.get(p);if(!B)for(let G of C)H.has(G.toString())||(R=!1);B||R?this._notify(C,p,g):this.requestors.push({ids:C,scope:p,callback:g})}rasterizeImages(l,p){let g=new Map,{tasks:C,scope:x}=l;for(let[A,R]of C.entries()){let B=this.getImage(R.id,x);B&&g.set(A,{image:B,imageVariant:R})}this._rasterizeImages(x,g,p)}_rasterizeImages(l,p,g){if(r.r())this.imageRasterizerDispatcher.getActor().send("rasterizeImagesWorker",{tasks:p,scope:l},g);else{let C=new Map;for(let[x,{image:A,imageVariant:R}]of p.entries())C.set(x,this.imageRasterizer.rasterize(R,A,l,0));g(void 0,C)}}getUpdatedImages(l){return this.updatedImages.get(l)||new Set}_notify(l,p,g){let C=this.images.get(p),x=new Map;for(let A of l){if(!C.get(A.toString())){if(A.iconsetId)continue;this.fire(new r.z("styleimagemissing",{id:A.name}))}let R=C.get(A.toString());if(!R){r.w(`Image "${A.name}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`);continue}let B={data:R.usvg?null:R.data.clone(),pixelRatio:R.pixelRatio,sdf:R.sdf,usvg:R.usvg,version:R.version,stretchX:R.stretchX,stretchY:R.stretchY,content:R.content,hasRenderCallback:!!(R.userImage&&R.userImage.render)};R.usvg&&Object.assign(B,{width:R.icon.usvg_tree.width,height:R.icon.usvg_tree.height}),x.set(r.I.toString(A),B)}g(null,x)}getPixelSize(l){let{width:p,height:g}=this.atlasImage.get(l);return{width:p,height:g}}getPattern(l,p,g){let C=l.toString(),x=this.patterns.get(p),A=x.get(C),R=this.getImage(l,p);if(!R)return null;if(A){if(A.position.version===R.version)return A.position;A.position.version=R.version}else{if(R.usvg&&!R.data){let B=this.getPatternInFlightId(C,p);if(this.patternsInFlight.has(B))return null;this.patternsInFlight.add(B);let H=new r.A(l).scaleSelf(r.o.devicePixelRatio),G=new Map([[H.toString(),{image:R,imageVariant:H}]]);return this._rasterizeImages(p,G,(J,K)=>this.storePatternImage(H,p,R,g,K)),null}this.storePattern(l,p,R)}return this._updatePatternAtlas(p,g),x.get(C).position}getPatternInFlightId(l,p){return r.B(l,p)}hasPatternsInFlight(){return this.patternsInFlight.size!==0}storePatternImage(l,p,g,C,x){let A=l.toString(),R=x?x.get(A):void 0;R&&(g.data=R,this.storePattern(l.id,p,g),this._updatePatternAtlas(p,C),this.patternsInFlight.delete(this.getPatternInFlightId(l.id.toString(),p)))}storePattern(l,p,g){let C={w:g.data.width+2*r.C,h:g.data.height+2*r.C,x:0,y:0},x=new r.F(C,g,r.C);this.patterns.get(p).set(l.toString(),{bin:C,position:x})}destroyAtlasTextures(){for(let l of this.atlasTexture.values())l&&l.destroy();this.atlasTexture.clear()}bind(l,p){let g=l.gl,C=this.atlasTexture.get(p);C?this.dirty&&(C.update(this.atlasImage.get(p)),this.dirty=!1):(C=new r.T(l,this.atlasImage.get(p),g.RGBA8),this.atlasTexture.set(p,C)),C.bind(g.LINEAR,g.CLAMP_TO_EDGE)}_updatePatternAtlas(l,p){let g=this.patterns.get(l),C=Array.from(g.values()).map(({bin:H})=>H),{w:x,h:A}=r.G(C),R=this.atlasImage.get(l);R.resize({width:x||1,height:A||1});let B=this.images.get(l);for(let[H,{bin:G,position:J}]of g.entries()){let K=J.padding,oe=G.x+K,le=G.y+K,de=B.get(H).data,Ce=de.width,he=de.height;K=K>1?K-1:K,r.q.copy(de,R,{x:0,y:0},{x:oe,y:le},{width:Ce,height:he},p),r.q.copy(de,R,{x:0,y:he-K},{x:oe,y:le-K},{width:Ce,height:K},p),r.q.copy(de,R,{x:0,y:0},{x:oe,y:le+he},{width:Ce,height:K},p),r.q.copy(de,R,{x:Ce-K,y:0},{x:oe-K,y:le},{width:K,height:he},p),r.q.copy(de,R,{x:0,y:0},{x:oe+Ce,y:le},{width:K,height:he},p),r.q.copy(de,R,{x:Ce-K,y:he-K},{x:oe-K,y:le-K},{width:K,height:K},p),r.q.copy(de,R,{x:0,y:he-K},{x:oe+Ce,y:le-K},{width:K,height:K},p),r.q.copy(de,R,{x:0,y:0},{x:oe+Ce,y:le+he},{width:K,height:K},p),r.q.copy(de,R,{x:Ce-K,y:0},{x:oe-K,y:le+he},{width:K,height:K},p)}this.dirty=!0}beginFrame(){for(let l of this.images.keys())this.callbackDispatchedThisFrame.set(l,new Set)}dispatchRenderCallbacks(l,p){let g=this.images.get(p);for(let C of l){if(this.callbackDispatchedThisFrame.get(p).has(C.toString()))continue;this.callbackDispatchedThisFrame.get(p).add(C.toString());let x=g.get(C.toString());Ee(x)&&this.updateImage(C,p,x)}}destroy(){this.imageRasterizerDispatcher&&this.imageRasterizerDispatcher.remove()}}function bi(_){let l=_.value,p=_.valueSpec,g=_.style,C=_.styleSpec,x=_.key,A=_.arrayElementValidator||qa;if(!Array.isArray(l))return[new r.V(x,l,`array expected, ${r.K(l)} found`)];if(p.length&&l.length!==p.length)return[new r.V(x,l,`array length ${p.length} expected, length ${l.length} found`)];if(p["min-length"]&&l.lengthC)return[new r.V(l,p,`${p} is greater than the maximum value ${C}`)]}return[]}function _t(_){let l=_.key,p=_.value;if(!r.H(p))return[new r.V(l,p,`object expected, ${r.K(p)} found`)];let g=_.valueSpec,C=r.J(p.type),x,A,R,B={},H=C!=="categorical"&&p.property===void 0,G=!H,J=(function(de){let Ce=de.stops;return Array.isArray(Ce)&&Array.isArray(Ce[0])&&r.H(Ce[0][0])})(p),K=Yc({key:_.key,value:_.value,valueSpec:_.styleSpec.function,style:_.style,styleSpec:_.styleSpec,objectElementValidators:{stops:function(de){if(C==="identity")return[new r.V(de.key,de.value,'identity function may not have a "stops" property')];let Ce=[],he=de.value;return Ce=Ce.concat(bi({key:de.key,value:he,valueSpec:de.valueSpec,style:de.style,styleSpec:de.styleSpec,arrayElementValidator:oe})),Array.isArray(he)&&he.length===0&&Ce.push(new r.V(de.key,he,"array must have at least one stop")),Ce},default:function(de){return qa({key:de.key,value:de.value,valueSpec:g,style:de.style,styleSpec:de.styleSpec})}}});return C==="identity"&&H&&K.push(new r.V(_.key,_.value,'missing required property "property"')),C==="identity"||p.stops||K.push(new r.V(_.key,_.value,'missing required property "stops"')),C==="exponential"&&g.expression&&!r.M(g)&&K.push(new r.V(_.key,_.value,"exponential functions not supported")),_.styleSpec.$version>=8&&(G&&!r.N(g)?K.push(new r.V(_.key,_.value,"property functions not supported")):H&&!r.O(g)&&K.push(new r.V(_.key,_.value,"zoom functions not supported"))),C!=="categorical"&&!J||p.property!==void 0||K.push(new r.V(_.key,_.value,'"property" property is required')),K;function oe(de){let Ce=[],he=de.value,Te=de.key;if(!Array.isArray(he))return[new r.V(Te,he,`array expected, ${r.K(he)} found`)];if(he.length!==2)return[new r.V(Te,he,`array length 2 expected, length ${he.length} found`)];if(J){if(!r.H(he[0]))return[new r.V(Te,he,`object expected, ${r.K(he[0])} found`)];let Pe=he[0];if(Pe.zoom===void 0)return[new r.V(Te,he,"object stop key must have zoom")];if(Pe.value===void 0)return[new r.V(Te,he,"object stop key must have value")];let Ve=r.J(Pe.zoom);if(typeof Ve!="number")return[new r.V(Te,Pe.zoom,"stop zoom values must be numbers")];if(R&&R>Ve)return[new r.V(Te,Pe.zoom,"stop zoom values must appear in ascending order")];Ve!==R&&(R=Ve,A=void 0,B={}),Ce=Ce.concat(Yc({key:`${Te}[0]`,value:he[0],valueSpec:{zoom:{}},style:de.style,styleSpec:de.styleSpec,objectElementValidators:{zoom:Dt,value:le}}))}else Ce=Ce.concat(le({key:`${Te}[0]`,value:he[0],style:de.style,styleSpec:de.styleSpec},he));return r.Q(r.S(he[1]))?Ce.concat([new r.V(`${Te}[1]`,he[1],"expressions are not allowed in function stops.")]):Ce.concat(qa({key:`${Te}[1]`,value:he[1],valueSpec:g,style:de.style,styleSpec:de.styleSpec}))}function le(de,Ce){let he=r.K(de.value),Te=r.J(de.value),Pe=de.value!==null?de.value:Ce;if(x){if(he!==x)return[new r.V(de.key,Pe,`${he} stop domain type must match previous stop domain type ${x}`)]}else x=he;if(he!=="number"&&he!=="string"&&he!=="boolean"&&typeof Te!="number"&&typeof Te!="string"&&typeof Te!="boolean")return[new r.V(de.key,Pe,"stop domain value must be a number, string, or boolean")];if(he!=="number"&&C!=="categorical"){let Ve=`number expected, ${he} found`;return r.N(g)&&C===void 0&&(Ve+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new r.V(de.key,Pe,Ve)]}return C!=="categorical"||he!=="number"||typeof Te=="number"&&isFinite(Te)&&Math.floor(Te)===Te?C!=="categorical"&&he==="number"&&typeof Te=="number"&&typeof A=="number"&&A!==void 0&&Tenew r.V(`${_.key}${g.key}`,_.value,g.message));let p=l.value.expression||l.value._styleExpression.expression;if(_.expressionContext==="property"&&_.propertyKey==="text-font"&&!p.outputDefined())return[new r.V(_.key,_.value,`Invalid data expression for "${_.propertyKey}". Output values must be contained as literals within the expression.`)];if(_.expressionContext==="property"&&_.propertyType==="layout"&&!r.Z(p))return[new r.V(_.key,_.value,'"feature-state" data expressions are not supported with layout properties.')];if(_.expressionContext==="filter")return Ji(p,_);if(_.expressionContext==="appearance")return sn(p,_);if(_.expressionContext&&_.expressionContext.indexOf("cluster")===0){if(!r.X(p,["zoom","feature-state"]))return[new r.V(_.key,_.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(_.expressionContext==="cluster-initial"&&!r.Y(p))return[new r.V(_.key,_.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ji(_,l){let p=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(l.valueSpec&&l.valueSpec.expression)for(let C of l.valueSpec.expression.parameters)p.delete(C);if(p.size===0)return[];let g=[];return _ instanceof r._&&p.has(_.name)?[new r.V(l.key,l.value,`["${_.name}"] expression is not supported in a filter for a ${l.object.type} layer with id: ${l.object.id}`)]:(_.eachChild(C=>{g.push(...Ji(C,l))}),g)}function sn(_,l){let p=new Set;if(l.valueSpec&&l.valueSpec.expression)for(let C of l.valueSpec.expression.parameters)p.add(C);if(p.size===0)return[];let g=[];return _ instanceof r._&&!p.has(_.name)?[new r.V(l.key,l.value,`["${_.name}"] is not an allowed parameter`)]:(_.eachChild(C=>{g.push(...sn(C,l))}),g)}function Ci(_){let l=_.key,p=_.value,g=_.valueSpec,C=[];return Array.isArray(g.values)?g.values.indexOf(r.J(p))===-1&&C.push(new r.V(l,p,`expected one of [${g.values.join(", ")}], ${JSON.stringify(p)} found`)):Object.keys(g.values).indexOf(r.J(p))===-1&&C.push(new r.V(l,p,`expected one of [${Object.keys(g.values).join(", ")}], ${JSON.stringify(p)} found`)),C}function Un(_){return r.a2(r.S(_.value))?Zt(Object.assign({},_,{expressionContext:"filter",valueSpec:_.styleSpec[`filter_${_.layerType||"fill"}`]})):po(_)}function po(_){let l=_.value,p=_.key;if(!Array.isArray(l))return[new r.V(p,l,`array expected, ${r.K(l)} found`)];if(l.length<1)return[new r.V(p,l,"filter array must have at least 1 element")];let g=_.styleSpec,C=Ci({key:`${p}[0]`,value:l[0],valueSpec:g.filter_operator});switch(r.J(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&r.J(l[1])==="$type"&&C.push(new r.V(p,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&C.push(new r.V(p,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(r.a0(l[1])||C.push(new r.V(`${p}[1]`,l[1],`string expected, ${r.K(l[1])} found`)));for(let x=2;x{H in p&&l.push(new r.V(g,p[H],`"${H}" is prohibited for ref layers`))}),C.layers.forEach(H=>{r.J(H.id)===R&&(B=H)}),B?B.ref?l.push(new r.V(g,p.ref,"ref cannot reference another ref layer")):A=r.J(B.type):typeof R=="string"&&l.push(new r.V(g,p.ref,`ref layer "${R}" not found`))}else if(A!=="background"&&A!=="sky"&&A!=="slot")if(p.source)if(r.a0(p.source)){let B=C.sources&&C.sources[p.source],H=B&&r.J(B.type);B?H==="vector"&&A==="raster"?l.push(new r.V(g,p.source,`layer "${p.id}" requires a raster source`)):H==="raster"&&A!=="raster"?l.push(new r.V(g,p.source,`layer "${p.id}" requires a vector source`)):H!=="vector"||p["source-layer"]?H==="raster-dem"&&A!=="hillshade"?l.push(new r.V(g,p.source,"raster-dem source can only be used with layer type 'hillshade'.")):H!=="raster-array"||["raster","raster-particle"].includes(A)?A==="line"&&p.paint&&(p.paint["line-gradient"]||p.paint["line-trim-offset"])&&H==="geojson"&&!B.lineMetrics?l.push(new r.V(g,p,`layer "${p.id}" specifies a line-gradient, which requires the GeoJSON source to have \`lineMetrics\` enabled.`)):A==="raster-particle"&&H!=="raster-array"&&l.push(new r.V(g,p.source,`layer "${p.id}" requires a 'raster-array' source.`)):l.push(new r.V(g,p.source,"raster-array source can only be used with layer type 'raster'.")):l.push(new r.V(g,p,`layer "${p.id}" must specify a "source-layer"`)):l.push(new r.V(g,p.source,`source "${p.source}" not found`))}else l.push(new r.V(`${g}.source`,p.source,'"source" must be a string'));else l.push(new r.V(g,p,'missing required property "source"'));return l=l.concat(Yc({key:g,value:p,valueSpec:x.layer,style:_.style,styleSpec:_.styleSpec,objectElementValidators:{"*":()=>[],type:()=>qa({key:`${g}.type`,value:p.type,valueSpec:x.layer.type,style:_.style,styleSpec:_.styleSpec,object:p,objectKey:"type"}),filter:B=>Un(Object.assign({layerType:A},B)),layout:B=>Yc({layer:p,key:B.key,value:B.value,valueSpec:{},style:B.style,styleSpec:B.styleSpec,objectElementValidators:{"*":H=>Ar(Object.assign({layerType:A},H))}}),paint:B=>Yc({layer:p,key:B.key,value:B.value,valueSpec:{},style:B.style,styleSpec:B.styleSpec,objectElementValidators:{"*":H=>go(Object.assign({layerType:A,layer:p},H))}}),appearances(B){let H=bi({key:B.key,value:B.value,valueSpec:B.valueSpec,style:B.style,styleSpec:B.styleSpec,arrayElementValidator:K=>(function(oe){let{key:le,layer:de,layerType:Ce}=oe,he=r.J(oe.value),Te=r.J(he.name),Pe=r.J(he.condition),Ve=Yc({key:le,value:he,valueSpec:oe.styleSpec.appearance,style:oe.style,styleSpec:oe.styleSpec,objectElementValidators:{condition:et=>(function(Qe){let it=[];return it.push(...Zt({key:Qe.key,value:Qe.object.condition,valueSpec:r.a6.appearance.condition,expressionContext:"appearance"})),it})(Object.assign({layer:de,layerType:Ce},et)),properties:et=>(function(Qe){let it=[],{styleSpec:Ze,layer:Ye,layerType:Je}=Qe,Bt=Ze[`paint_${Je}`],St=Ze[`layout_${Je}`],Jt=Qe.object[Qe.objectKey];for(let Ft in Jt){let Yt=Ft in Bt?"paint":Ft in St?"layout":void 0;if(!Yt){it.push(new r.V(Qe.key,Ft,`unknown property "${Ft}" for layer type "${Je}"`));continue}let ji=Object.assign({},Qe,{key:`${Qe.key}.${Ft}`,object:Jt,objectKey:Ft,layer:Ye,layerType:Je,value:Jt[Ft],valueSpec:Yt==="paint"?Bt[Ft]:St[Ft]});it.push(...Pn(ji,Yt))}return it})(Object.assign({layer:de,layerType:Ce},et))}});return Te==="hidden"||Pe||Ve.push(new r.V(oe.key,"name",'Appearance with name different than "hidden" must have a condition')),Ve})(Object.assign({layerType:A,layer:p},K))}),G=Array.isArray(B.value)?B.value:[],J=new Set;return G.forEach((K,oe)=>{let le=r.J(K.name);if(le)if(J.has(le)){let de=r.J(p.id);H.push(new r.V(B.key,le,`Duplicated appearance name "${le}" for layer "${de}"`))}else J.add(le)}),H}}})),l}function $l({key:_,value:l}){return r.a0(l)?[]:[new r.V(_,l,`string expected, ${r.K(l)} found`)]}let vu={promoteId:function _({key:l,value:p}){if(r.a0(p))return $l({key:l,value:p});if(Array.isArray(p)){let C=[],x=r.S(p),A=r.U(x);return A.result==="error"&&A.value.forEach(R=>{C.push(new r.V(`${l}${R.key}`,null,`${R.message}`))}),r.X(A.value.expression,["zoom","heatmap-density","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light","raster-particle-speed"])||C.push(new r.V(`${l}`,null,"promoteId expression should be only feature dependent")),C}if(!r.H(p))return[new r.V(l,p,`string, expression or object expected, "${r.K(p)}" found`)];let g=[];for(let C in p)g.push(..._({key:`${l}.${C}`,value:p[C]}));return g}};function ua(_){let l=_.value,p=_.key,g=_.styleSpec,C=_.style;if(!r.H(l))return[new r.V(p,l,`object expected, ${r.K(l)} found`)];if(!("type"in l))return[new r.V(p,l,'"type" is required')];let x=r.J(l.type),A=[];switch(["vector","raster","raster-dem","raster-array"].includes(x)&&("url"in l||"tiles"in l||A.push(new r.a3(p,l,'Either "url" or "tiles" is required.'))),x){case"vector":case"raster":case"raster-dem":case"raster-array":return A=A.concat(Yc({key:p,value:l,valueSpec:g[`source_${x.replace("-","_")}`],style:_.style,styleSpec:g,objectElementValidators:vu})),A;case"geojson":if(A=Yc({key:p,value:l,valueSpec:g.source_geojson,style:C,styleSpec:g,objectElementValidators:vu}),"cluster"in l&&"clusterProperties"in l){if(!r.H(l.clusterProperties))return[new r.V(`${p}.clusterProperties`,l,`object expected, ${r.K(l)} found`)];for(let R in l.clusterProperties){let B=l.clusterProperties[R];if(!Array.isArray(B))return[new r.V(`${p}.clusterProperties.${R}`,B,"array expected")];let[H,G]=B,J=typeof H=="string"?[H,["accumulated"],["get",R]]:H;A.push(...Zt({key:`${p}.${R}.map`,value:G,expressionContext:"cluster-map"})),A.push(...Zt({key:`${p}.${R}.reduce`,value:J,expressionContext:"cluster-reduce"}))}}return A;case"video":return Yc({key:p,value:l,valueSpec:g.source_video,style:C,styleSpec:g});case"image":return Yc({key:p,value:l,valueSpec:g.source_image,style:C,styleSpec:g});case"canvas":return[new r.V(p,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ci({key:`${p}.type`,value:l.type,valueSpec:{values:Sl(g)}})}}function Sl(_){return _.source.reduce((l,p)=>{let g=_[p];return g.type.type==="enum"&&(l=l.concat(Object.keys(g.type.values))),l},[])}function La(_){let l=_.value,p=_.styleSpec,g=p.light,C=_.style;if(l===void 0)return[];if(!r.H(l))return[new r.V("light",l,`object expected, ${r.K(l)} found`)];let x=[];for(let A in l){let R=A.match(/^(.*)-transition$/),B=A.match(/^(.*)-use-theme$/);x=x.concat(B&&g[B[1]]?qa({key:A,value:l[A],valueSpec:{type:"string"},style:C,styleSpec:p}):R&&g[R[1]]&&g[R[1]].transition?qa({key:A,value:l[A],valueSpec:p.transition,style:C,styleSpec:p}):g[A]?qa({key:A,value:l[A],valueSpec:g[A],style:C,styleSpec:p}):[new r.V(A,l[A],`unknown property "${A}"`)])}return x}function iu(_){let l=_.value;if(!l)return[];let p=_.key;if(!r.H(l))return[new r.V(p,l,`object expected, ${r.K(l)} found`)];let g=[],C=_.styleSpec,x=C["light-3d"],A=_.style,R=_.style.lights;for(let G of["type","id"])if(!(G in l))return g=g.concat([new r.V(p,l,`missing property "${G}"`)]),g;if(!r.a0(l.type))return g=g.concat([new r.V(`${p}.type`,l.type,"string expected")]),g;if(R)for(let G=0;G<_.arrayIndex;G++){let J=r.J(l.type),K=R[G];r.J(K.type)===J&&g.push(new r.V(p,l.id,`duplicate light type "${l.type}", previously defined at line ${K.id.__line__}`))}let B=`properties_light_${l.type}`;if(!(B in C))return g=g.concat([new r.V(`${p}.type`,l,`Invalid light type ${l.type}`)]),g;let H=C[B];for(let G in l)if(G==="properties"){let J=l[G];if(!r.H(J))return g=g.concat([new r.V("properties",J,`object expected, ${r.K(J)} found`)]),g;for(let K in J){let oe=K.match(/^(.*)-transition$/),le=K.match(/^(.*)-use-theme$/);g=g.concat(le&&H[le[1]]?qa({key:G,value:J[K],valueSpec:{type:"string"},style:A,styleSpec:C}):oe&&H[oe[1]]&&H[oe[1]].transition?qa({key:G,value:l[G],valueSpec:C.transition,style:A,styleSpec:C}):H[K]?qa({key:K,value:J[K],valueSpec:H[K],style:A,styleSpec:C}):[new r.a3(_.key,J[K],`unknown property "${K}"`)])}}else g=g.concat(x[G]?qa({key:G,value:l[G],valueSpec:x[G],style:A,styleSpec:C}):[new r.a3(G,l[G],`unknown property "${G}"`)]);return g}function Ku(_){let l=_.value,p=_.key,g=_.style,C=_.styleSpec,x=C.terrain;if(l==null)return[];if(!r.H(l))return[new r.V("terrain",l,`object expected, ${r.K(l)} found`)];let A=[];for(let R in l){let B=R.match(/^(.*)-transition$/),H=R.match(/^(.*)-use-theme$/);A=A.concat(H&&x[H[1]]?qa({key:R,value:l[R],valueSpec:{type:"string"},style:g,styleSpec:C}):B&&x[B[1]]&&x[B[1]].transition?qa({key:R,value:l[R],valueSpec:C.transition,style:g,styleSpec:C}):x[R]?qa({key:R,value:l[R],valueSpec:x[R],style:g,styleSpec:C}):[new r.a3(R,l[R],`unknown property "${R}"`)])}if(l.source)if(r.a0(l.source)){let R=g.sources&&g.sources[l.source],B=R&&r.J(R.type);R?B!=="raster-dem"&&A.push(new r.V(`${p}.source`,l.source,`terrain cannot be used with a source of type ${B}, it only be used with a "raster-dem" source type`)):A.push(new r.V(`${p}.source`,l.source,`source "${l.source}" not found`))}else A.push(new r.V(`${p}.source`,l.source,"source must be a string"));else A.push(new r.V(p,l,'terrain is missing required property "source"'));return A}function dd(_){let l=_.value,p=_.style,g=_.styleSpec,C=g.fog;if(l===void 0)return[];if(!r.H(l))return[new r.V("fog",l,`object expected, ${r.K(l)} found`)];let x=[];for(let A in l){let R=A.match(/^(.*)-transition$/),B=A.match(/^(.*)-use-theme$/);x=x.concat(B&&C[B[1]]?qa({key:A,value:l[A],valueSpec:{type:"string"},style:p,styleSpec:g}):R&&C[R[1]]&&C[R[1]].transition?qa({key:A,value:l[A],valueSpec:g.transition,style:p,styleSpec:g}):C[A]?qa({key:A,value:l[A],valueSpec:C[A],style:p,styleSpec:g}):[new r.a3(A,l[A],`unknown property "${A}"`)])}return x}let _m={"*":()=>[],array:bi,boolean:function(_){let l=_.value,p=_.key;return r.$(l)?[]:[new r.V(p,l,`boolean expected, ${r.K(l)} found`)]},number:Dt,color:function({key:_,value:l}){return r.a0(l)?r.a1.parseCSSColor(l)===null?[new r.V(_,l,`color expected, "${l}" found`)]:[]:[new r.V(_,l,`color expected, ${r.K(l)} found`)]},enum:Ci,filter:Un,function:_t,layer:Ur,object:Yc,source:ua,model:r.a7,light:La,"light-3d":iu,terrain:Ku,fog:dd,string:$l,formatted:function(_){return $l(_).length===0?[]:Zt(_)},resolvedImage:function(_){return $l(_).length===0?[]:Zt(_)},projection:function(_){let l=_.value,p=_.styleSpec,g=p.projection,C=_.style;if(r.H(l)){let x=[];for(let A in l)x=x.concat(qa({key:A,value:l[A],valueSpec:g[A],style:C,styleSpec:p}));return x}return r.a0(l)?[]:[new r.V("projection",l,`object or string expected, ${r.K(l)} found`)]},import:function(_){let l=_.key,{value:p,styleSpec:g}=_;if(!r.H(p))return[new r.V(l,p,"import must be an object")];let R=p,{data:C}=R,x=Vf(R,["data"]);Object.defineProperty(x,"__line__",{value:p.__line__,enumerable:!1});let A=Yc(Object.assign({},_,{value:x,valueSpec:g.import}));return r.J(x.id)===""&&A.push(new r.V(`${_.key}.id`,x,"import id can't be an empty string")),C&&(A=A.concat(mf(C,g,{key:`${_.key}.data`}))),A},iconset:function(_){let l=_.value,p=_.key,g=_.styleSpec,C=_.style;if(!r.H(l))return[new r.V(p,l,"object expected")];if(!l.type)return[new r.V(p,l,'"type" is required')];let x=r.J(l.type),A=[];if(A=A.concat(Yc({key:p,value:l,valueSpec:g[`iconset_${x}`],style:C,styleSpec:g})),(function(R,B){return!(R!=="source"||!B.source)})(x,l)){let R=C.sources&&C.sources[l.source],B=R&&r.J(R.type);R?B!=="raster-array"&&A.push(new r.V(p,l.source,`iconset cannot be used with a source of type ${String(B)}, it only be used with a "raster-array" source type`)):A.push(new r.V(p,l.source,`source "${l.source}" not found`))}return A}};function qa(_,l=!1){let p=_.value,g=_.valueSpec,C=_.styleSpec;if(g.expression){if(r.a4(r.J(p)))return _t(_);if(r.Q(r.S(p)))return Zt(_)}if(g.type&&_m[g.type]){let x=_m[g.type](_);return l===!0&&x.length>0&&Array.isArray(_.value)?Zt(_):x}return Yc(Object.assign({},_,{valueSpec:g.type?C[g.type]:g}))}function Yc(_){let l=_.key,p=_.value,g=_.valueSpec||{},C=_.objectElementValidators||{},x=_.style,A=_.styleSpec;if(!r.H(p))return[new r.V(l,p,`object expected, ${r.K(p)} found`)];let R=[];for(let B in p){let H=B.split(".")[0],G;C[H]?G=C[H]:g[H]?G=qa:C["*"]?G=C["*"]:g["*"]&&(G=qa),G?R=R.concat(G({key:(l&&`${l}.`)+B,value:p[B],valueSpec:g[H]||g["*"],style:x,styleSpec:A,object:p,objectKey:B},p)):R.push(new r.a3(l,p[B],`unknown property "${B}"`))}for(let B in g)C[B]||g[B].required&&g[B].default===void 0&&p[B]===void 0&&R.push(new r.V(l,p,`missing required property "${B}"`));return R}function Ry({key:_,value:l}){let p=$l({key:_,value:l});if(p.length)return p;let g=l;return g.indexOf("{fontstack}")===-1&&p.push(new r.V(_,l,'"glyphs" url must include a "{fontstack}" token')),g.indexOf("{range}")===-1&&p.push(new r.V(_,l,'"glyphs" url must include a "{range}" token')),p}function mf(_,l=r.a6,p={}){return Yc({key:p.key||"",value:_,valueSpec:Object.assign(l.$root,{"*":{type:"*"}}),styleSpec:l,style:_,objectElementValidators:{glyphs:Ry}})}function nu(_,l=r.a6){return at(mf(_,l))}let fg=_=>at(ua(_)),Gx=_=>at(La(_)),SS=_=>at(iu(_)),Pi=_=>at(Ku(_)),gg=_=>at(dd(_)),sD=_=>at((function(l){let p=l.value,g=l.style,C=l.styleSpec,x=C.snow;if(p===void 0)return[];if(!r.H(p))return[new r.V("snow",p,`object expected, ${r.K(p)} found`)];let A=[];for(let R in p){let B=R.match(/^(.*)-transition$/);A=A.concat(B&&x[B[1]]&&x[B[1]].transition?qa({key:R,value:p[R],valueSpec:C.transition,style:g,styleSpec:C}):x[R]?qa({key:R,value:p[R],valueSpec:x[R],style:g,styleSpec:C}):[new r.a3(R,p[R],`unknown property "${R}"`)])}return A})(_)),vb=_=>at((function(l){let p=l.value,g=l.style,C=l.styleSpec,x=C.rain;if(p===void 0)return[];if(!r.H(p))return[new r.V("rain",p,`object expected, ${r.K(p)} found`)];let A=[];for(let R in p){let B=R.match(/^(.*)-transition$/);A=A.concat(B&&x[B[1]]&&x[B[1]].transition?qa({key:R,value:p[R],valueSpec:C.transition,style:g,styleSpec:C}):x[R]?qa({key:R,value:p[R],valueSpec:x[R],style:g,styleSpec:C}):[new r.a3(R,p[R],`unknown property "${R}"`)])}return A})(_)),At=_=>at(Ur(_)),ge=_=>at(Un(_)),Ie=_=>at(go(_)),$e=_=>at(Ar(_)),ht=_=>at(r.a7(_));function at(_){return _.slice().sort((l,p)=>l.line&&p.line?l.line-p.line:0)}function st(_,l){let p=!1;if(l&&l.length)for(let g of l)g instanceof r.a3?r.w(g.message):(_.fire(new r.y(new Error(g.message))),p=!0);return p}let qt;class It extends r.E{constructor(l,p="flat"){super(),this._transitionable=new r.a8(qt||(qt=new r.a9({anchor:new r.aa(r.a6.light.anchor),position:new r.ab(r.a6.light.position),color:new r.aa(r.a6.light.color),intensity:new r.aa(r.a6.light.intensity)}))),this.setLight(l,p),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(l,p,g={}){this._validate(Gx,l,g)||(this._transitionable.setTransitionOrValue(l),this.id=p)}updateTransitions(l){this._transitioning=this._transitionable.transitioned(l,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(l){this.properties=this._transitioning.possiblyEvaluate(l)}_validate(l,p,g){return(!g||g.validate!==!1)&&st(this,l.call(nu,Object.assign({value:p,style:{glyphs:!0,sprite:!0},styleSpec:r.a6})))}}let Wt=class extends r.E{constructor(_,l,p,g,C){super(),this.scope=p,this._transitionable=new r.a8(new r.a9({source:new r.aa(r.a6.terrain.source),exaggeration:new r.aa(r.a6.terrain.exaggeration)}),p,g),this._transitionable.setTransitionOrValue(_,g),this._transitioning=this._transitionable.untransitioned(),this.drapeRenderMode=l,this.worldview=C}get(){return this._transitionable.serialize()}set(_,l){this._transitionable.setTransitionOrValue(_,l)}updateTransitions(_){this._transitioning=this._transitionable.transitioned(_,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(_){this.properties=this._transitioning.possiblyEvaluate(_)}getExaggeration(_){return this._transitioning.possiblyEvaluate(new r.ac(_,{worldview:this.worldview})).get("exaggeration")}getAttenuationRange(){if(!this.isZoomDependent())return null;let _=this._transitionable._values.exaggeration;if(!_)return null;let l=_.value.expression;if(!l)return null;let p=-1,g=-1,C=1;for(let x of l.zoomStops)C=l.evaluate(new r.ac(x,{worldview:this.worldview})),C>.01?(p=x,g=-1):g=x;return C<.01&&p>0&&g>p?[p,g]:null}isZoomDependent(){let _=this._transitionable._values.exaggeration;return _!=null&&_.value!=null&&_.value.expression!=null&&_.value.expression instanceof r.ad}},$i=45,Ti=65,qn=.05;function So(_,l,p,g){let C=r.ah($i,Ti,p),[x,A]=No(_,g),R=1-Math.min(1,Math.exp((l-x)/(A-x)*-6));return R*=R*R,R=Math.min(1,1.00747*R),R*C*_.alpha}function No(_,l){let p=.5/Math.tan(.5*l);return[_.range[0]+p,_.range[1]+p]}function Or(_,l,p,g,C){let x=r.af([],[l,p,g],C.mercatorFogMatrix);return So(_,r.ag(x),C.pitch,C._fov)}function fr(_,l,p,g,C,x,A){let R=[[p,g,0],[C,g,0],[C,x,0],[p,x,0]],B=Number.MAX_VALUE,H=-Number.MAX_VALUE;for(let G of R){let J=r.af([],G,l),K=r.ag(J);B=Math.min(B,K),H=Math.max(H,K)}return[So(_,B,A.pitch,A._fov),So(_,H,A.pitch,A._fov)]}class Hr extends r.E{constructor(l,p,g,C){super();let x=new r.a9({range:new r.aa(r.a6.fog.range),color:new r.aa(r.a6.fog.color),"color-use-theme":new r.aa({type:"string","property-type":"data-constant",default:"default"}),"high-color":new r.aa(r.a6.fog["high-color"]),"high-color-use-theme":new r.aa({type:"string","property-type":"data-constant",default:"default"}),"space-color":new r.aa(r.a6.fog["space-color"]),"space-color-use-theme":new r.aa({type:"string","property-type":"data-constant",default:"default"}),"horizon-blend":new r.aa(r.a6.fog["horizon-blend"]),"star-intensity":new r.aa(r.a6.fog["star-intensity"]),"vertical-range":new r.aa(r.a6.fog["vertical-range"])});this._transitionable=new r.a8(x,g,new Map(C)),this.set(l,C),this._transitioning=this._transitionable.untransitioned(),this._transform=p,this.properties=new r.ai(x),this.scope=g}get state(){let l=this._transform,p=l.projection.name==="globe",g=r.aj(l.zoom),C=this.properties.get("range"),x=[.5,3];return{range:p?[r.ak(x[0],C[0],g),r.ak(x[1],C[1],g)]:C,horizonBlend:this.properties.get("horizon-blend"),alpha:this.properties.get("color").a}}get(){return this._transitionable.serialize()}set(l,p,g={}){if(this._validate(gg,l,g))return;let C=Object.assign({},l);for(let x of Object.keys(r.a6.fog))C[x]===void 0&&(C[x]=r.a6.fog[x].default);this._options=C,this._transitionable.setTransitionOrValue(this._options,p)}getOpacity(l){if(!this._transform.projection.supportsFog)return 0;let p=this.properties&&this.properties.get("color")||1;return(this._transform.projection.name==="globe"?1:r.ah($i,Ti,l))*p.a}getOpacityAtLatLng(l,p){return this._transform.projection.supportsFog?(function(g,C,x){let A=r.ae.fromLngLat(C),R=x.elevation?x.elevation.getAtPointOrZero(A):0;return Or(g,A.x,A.y,R,x)})(this.state,l,p):0}getOpacityForTile(l){if(!this._transform.projection.supportsFog)return[1,1];let p=this._transform.calculateFogTileMatrix(l.toUnwrapped());return fr(this.state,p,0,0,r.al,r.al,this._transform)}getOpacityForBounds(l,p,g,C,x){return this._transform.projection.supportsFog?fr(this.state,l,p,g,C,x,this._transform):[1,1]}getFovAdjustedRange(l){return this._transform.projection.supportsFog?No(this.state,l):[0,1]}isVisibleOnFrustum(l){if(!this._transform.projection.supportsFog)return!1;let p=[4,5,6,7];for(let g of p){let C=l.points[g],x;if(C[2]>=0)x=C;else{let A=l.points[g-4];x=r.am(A,C,A[2]/(A[2]-C[2]))}if(Or(this.state,x[0],x[1],0,this._transform)>=qn)return!0}return!1}updateConfig(l){this._transitionable.setTransitionOrValue(this._options,new Map(l))}updateTransitions(l){this._transitioning=this._transitionable.transitioned(l,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(l){this.properties=this._transitioning.possiblyEvaluate(l)}_validate(l,p,g){return(!g||g.validate!==!1)&&st(this,l.call(nu,Object.assign({value:p,style:{glyphs:!0,sprite:!0},styleSpec:r.a6})))}}let pa,Er,Ll,Xl,Tc=class extends r.E{constructor(_,l,p,g){super();let C=pa||(pa=new r.a9({density:new r.aa(r.a6.snow.density),intensity:new r.aa(r.a6.snow.intensity),color:new r.aa(r.a6.snow.color),opacity:new r.aa(r.a6.snow.opacity),vignette:new r.aa(r.a6.snow.vignette),"vignette-color":new r.aa(r.a6.snow["vignette-color"]),"center-thinning":new r.aa(r.a6.snow["center-thinning"]),direction:new r.aa(r.a6.snow.direction),"flake-size":new r.aa(r.a6.snow["flake-size"])}));this._transitionable=new r.a8(C,p,new Map(g)),this.set(_,g),this._transitioning=this._transitionable.untransitioned(),this.properties=new r.ai(C),this.scope=p}get state(){let _=this.properties.get("opacity"),l=this.properties.get("color"),p=this.properties.get("direction"),g=r.an(p[0]),C=-Math.max(r.an(p[1]),.01),x=[Math.cos(g)*Math.cos(C),Math.sin(g)*Math.cos(C),Math.sin(C)],A=this.properties.get("vignette"),R=this.properties.get("vignette-color");return R.a=A,{density:this.properties.get("density"),intensity:this.properties.get("intensity"),color:new r.ao(l.r,l.g,l.b,l.a*_),direction:x,centerThinning:this.properties.get("center-thinning"),flakeSize:this.properties.get("flake-size"),vignetteColor:R}}get(){return this._transitionable.serialize()}set(_,l,p={}){if(this._validate(sD,_,p))return;let g=Object.assign({},_);for(let C of Object.keys(r.a6.snow))g[C]===void 0&&(g[C]=r.a6.snow[C].default);this._options=g,this._transitionable.setTransitionOrValue(this._options,l)}updateConfig(_){this._transitionable.setTransitionOrValue(this._options,new Map(_))}updateTransitions(_){this._transitioning=this._transitionable.transitioned(_,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(_){this.properties=this._transitioning.possiblyEvaluate(_)}_validate(_,l,p){return(!p||p.validate!==!1)&&st(this,_.call(nu,Object.assign({value:l,style:{glyphs:!0,sprite:!0},styleSpec:r.a6})))}},oa=class extends r.E{constructor(_,l,p,g){super();let C=Er||(Er=new r.a9({density:new r.aa(r.a6.rain.density),intensity:new r.aa(r.a6.rain.intensity),color:new r.aa(r.a6.rain.color),opacity:new r.aa(r.a6.rain.opacity),vignette:new r.aa(r.a6.rain.vignette),"vignette-color":new r.aa(r.a6.rain["vignette-color"]),"center-thinning":new r.aa(r.a6.rain["center-thinning"]),direction:new r.aa(r.a6.rain.direction),"droplet-size":new r.aa(r.a6.rain["droplet-size"]),"distortion-strength":new r.aa(r.a6.rain["distortion-strength"])}));this._transitionable=new r.a8(C,p,new Map(g)),this.set(_,g),this._transitioning=this._transitionable.untransitioned(),this.properties=new r.ai(C),this.scope=p}get state(){let _=this.properties.get("opacity"),l=this.properties.get("color"),p=this.properties.get("direction"),g=r.an(p[0]),C=-Math.max(r.an(p[1]),.01),x=[Math.cos(g)*Math.cos(C),Math.sin(g)*Math.cos(C),Math.sin(C)],A=this.properties.get("vignette-color");return A.a=this.properties.get("vignette"),{density:this.properties.get("density"),intensity:this.properties.get("intensity"),color:new r.ao(l.r,l.g,l.b,l.a*_),direction:x,centerThinning:this.properties.get("center-thinning"),dropletSize:this.properties.get("droplet-size"),distortionStrength:this.properties.get("distortion-strength"),vignetteColor:A}}get(){return this._transitionable.serialize()}set(_,l,p={}){if(this._validate(vb,_,p))return;let g=Object.assign({},_);for(let C of Object.keys(r.a6.rain))g[C]===void 0&&(g[C]=r.a6.rain[C].default);this._options=g,this._transitionable.setTransitionOrValue(this._options,l)}updateConfig(_){this._transitionable.setTransitionOrValue(this._options,new Map(_))}updateTransitions(_){this._transitioning=this._transitionable.transitioned(_,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(_){this.properties=this._transitioning.possiblyEvaluate(_)}_validate(_,l,p){return(!p||p.validate!==!1)&&st(this,_.call(nu,Object.assign({value:l,style:{glyphs:!0,sprite:!0},styleSpec:r.a6})))}};class Ss extends r.E{constructor(l,p,g,C){super(),this.scope=g,this._options=l,this.properties=new r.ai(p),this._transitionable=new r.a8(p,g,new Map(C)),this._transitionable.setTransitionOrValue(l.properties),this._transitioning=this._transitionable.untransitioned()}updateConfig(l){this._transitionable.setTransitionOrValue(this._options.properties,new Map(l))}updateTransitions(l){this._transitioning=this._transitionable.transitioned(l,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(l){this.properties=this._transitioning.possiblyEvaluate(l)}get(){return this._options.properties=this._transitionable.serialize(),this._options}set(l,p){this._options=l,this._transitionable.setTransitionOrValue(l.properties,p)}shadowsEnabled(){return!!this.properties&&this.properties.get("cast-shadows")===!0}}class ml{constructor(l,p,g){this.screenBounds=l,this.cameraPoint=g.getCameraPoint(),this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=p,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this._bufferedScreenMercator(0,g)}static createFromScreenPoints(l,p){let g,C;if(l instanceof r.P||typeof l[0]=="number"){let x=r.P.convert(l);g=[x],C=p.isPointAboveHorizon(x)}else{let x=r.P.convert(l[0]),A=r.P.convert(l[1]),R=x.add(A)._div(2);g=[x,A],C=r.aq(x,A).every(B=>p.isPointAboveHorizon(B))&&p.isPointAboveHorizon(R)}return new ml(g,C,p)}isPointQuery(){return this.screenBounds.length===1}bufferedScreenGeometry(l){return r.aq(this.screenBounds[0],this.screenBounds.length===1?this.screenBounds[0]:this.screenBounds[1],l)}bufferedCameraGeometry(l){let p=this.screenBounds[0],g=this.screenBounds.length===1?this.screenBounds[0].add(new r.P(1,1)):this.screenBounds[1],C=r.aq(p,g,0,!1);return this.cameraPoint.y>g.y&&(this.cameraPoint.x>p.x&&this.cameraPoint.x=g.x?C[2]=this.cameraPoint:this.cameraPoint.x<=p.x&&(C[3]=this.cameraPoint)),r.ar(C,l)}bufferedCameraGeometryGlobe(l){let p=this.screenBounds[0],g=this.screenBounds.length===1?this.screenBounds[0].add(new r.P(1,1)):this.screenBounds[1],C=r.aq(p,g,l),x=this.cameraPoint.clone();switch(3*((x.y>p.y)+(x.y>g.y))+((x.x>p.x)+(x.x>g.x))){case 0:C[0]=x,C[4]=x.clone();break;case 1:C.splice(1,0,x);break;case 2:C[1]=x;break;case 3:C.splice(4,0,x);break;case 5:C.splice(2,0,x);break;case 6:C[3]=x;break;case 7:C.splice(3,0,x);break;case 8:C[2]=x}return C}containsTile(l,p,g,C=0){let x=l.queryPadding/p._pixelsPerMercatorPixel+1,A=g?this._bufferedCameraMercator(x,p):this._bufferedScreenMercator(x,p),R=l.tileID.wrap+(A.unwrapped?C:0),B=A.polygon.map(Ce=>r.as(l.tileTransform,Ce,R));if(!r.at(B,0,0,r.al,r.al))return;R=l.tileID.wrap+(this.screenGeometryMercator.unwrapped?C:0);let H=this.screenGeometryMercator.polygon.map(Ce=>r.au(l.tileTransform,Ce,R)),G=H.map(Ce=>new r.P(Ce[0],Ce[1])),J=p.getFreeCameraOptions().position||new r.ae(0,0,0),K=r.au(l.tileTransform,J,R),oe=H.map(Ce=>{let he=r.av(Ce,Ce,K);return r.aw(he,he),new r.ax(K,he)}),le=r.ay(l,1,p.zoom)*p._pixelsPerMercatorPixel;return{queryGeometry:this,tilespaceGeometry:G,tilespaceRays:oe,bufferedTilespaceGeometry:B,bufferedTilespaceBounds:(de=r.az(B),de.min.x=r.aA(de.min.x,0,r.al),de.min.y=r.aA(de.min.y,0,r.al),de.max.x=r.aA(de.max.x,0,r.al),de.max.y=r.aA(de.max.y,0,r.al),de),tile:l,tileID:l.tileID,pixelToTileUnitsFactor:le};var de}_bufferedScreenMercator(l,p){let g=Ld(l);if(this._screenRaycastCache[g])return this._screenRaycastCache[g];{let C;return C=p.projection.name==="globe"?this._projectAndResample(this.bufferedScreenGeometry(l),p):{polygon:this.bufferedScreenGeometry(l).map(x=>p.pointCoordinate3D(x)),unwrapped:!0},this._screenRaycastCache[g]=C,C}}_bufferedCameraMercator(l,p){let g=Ld(l);if(this._cameraRaycastCache[g])return this._cameraRaycastCache[g];{let C;return C=p.projection.name==="globe"?this._projectAndResample(this.bufferedCameraGeometryGlobe(l),p):{polygon:this.bufferedCameraGeometry(l).map(x=>p.pointCoordinate3D(x)),unwrapped:!0},this._cameraRaycastCache[g]=C,C}}_projectAndResample(l,p){let g=(function(x,A){let R=r.aB([],A.pixelMatrix,A.globeMatrix),B=[0,-r.aD,0,1],H=[0,r.aD,0,1],G=[0,0,0,1];r.aC(B,B,R),r.aC(H,H,R),r.aC(G,G,R);let J=new r.P(B[0]/B[3],B[1]/B[3]),K=new r.P(H[0]/H[3],H[1]/H[3]),oe=r.aE(x,J)&&B[3]1?fl(x.slice(0,Ce),A):[],Pe=Cenew r.P(xa(it.x),it.y)),Pe=Pe.map(it=>new r.P(xa(it.x),it.y));let Ve=[...Te];Ve.length===0&&Ve.push(Pe[Pe.length-1]);let et=r.ak(Ve[Ve.length-1].y,(Pe.length===0?Te[0]:Pe[0]).y,he),Qe;return Qe=oe?[new r.P(0,et),new r.P(0,0),new r.P(1,0),new r.P(1,et)]:[new r.P(1,et),new r.P(1,1),new r.P(0,1),new r.P(0,et)],Ve.push(...Qe),Pe.length===0?Ve.push(Te[0]):Ve.push(...Pe),{polygon:Ve.map(it=>new r.ae(it.x,it.y)),unwrapped:!1}})(l,p);if(g)return g;let C=(function(x,A){let R=!1,B=-1/0,H=0;for(let J=0;JB&&(B=x[J].x,H=J);for(let J=0;J.5&&(oe.x{J.x-=1}),{polygon:x,unwrapped:R}})(fl(l,p).map(x=>new r.P(xa(x.x),x.y)),p);return{polygon:C.polygon.map(x=>new r.ae(x.x,x.y)),unwrapped:C.unwrapped}}}function fl(_,l){return r.aG(_,p=>{let g=l.pointCoordinate3D(p);p.x=g.x,p.y=g.y},1/256)}function xa(_){return _<0?1+_%1:_%1}function Ld(_){return 100*_|0}function Wu(_,l,p,g,C){let x=function(R,B){if(R)return C(R);if(B){if(_.url&&B.tiles&&_.tiles&&delete _.tiles,B.variants){if(!Array.isArray(B.variants))return C(new Error("variants must be an array"));for(let G of B.variants){if(G==null||typeof G!="object"||G.constructor!==Object)return C(new Error("variant must be an object"));if(!Array.isArray(G.capabilities))return C(new Error("capabilities must be an array"));if(G.capabilities.length===1&&G.capabilities[0]==="meshopt"){B=Object.assign(B,G);break}}}let H=r.aH(Object.assign({},B,_),["tilejson","tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","extra_bounds","scheme","tileSize","encoding","vector_layers","raster_layers","worldview_options","worldview_default","worldview"]);H.tiles=l.canonicalizeTileset(H,_.url),C(null,H)}},A=(function(R,B,H){if(!R)return null;if(!B&&!H)return R;H=H||R.worldview_default;let G=Object.values(R.language||{});if(G.length===0)return null;let J=Object.values(R.worldview||{});if(J.length===0)return null;let K=G.every(le=>le===B),oe=J.every(le=>le===H);return K&&oe?R:B in(R.language_options||{})||H in(R.worldview_options||{})?null:R.language_options&&R.worldview_options?R:null})(_.data,p,g);return A?r.o.frame(()=>x(null,A)):_.url?r.m(l.transformRequest(l.normalizeSourceURL(_.url,null,p,g),r.R.Source),x):r.o.frame(()=>{let H=_,{data:R}=H,B=Vf(H,["data"]);x(null,B)})}function Dh(_,l){let p=Math.pow(2,l.z),g=Math.floor(r.aF(_.getWest())*p),C=Math.floor(r.aJ(_.getNorth())*p),x=Math.ceil(r.aF(_.getEast())*p),A=Math.ceil(r.aJ(_.getSouth())*p);return l.x>=g&&l.x=C&&l.ythis.maxzoom||l.z{if(this._tileJSONRequest=null,this._loaded=!0,C)p&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${p}`),g&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${g}`),this.fire(new r.y(C));else if(x){if(Object.assign(this,x),this.hasWorldviews=!!x.worldview_options,x.worldview_default&&(this.worldviewDefault=x.worldview_default),x.vector_layers){this.vectorLayers=x.vector_layers,this.vectorLayerIds=[],this.localizableLayerIds=new Set;for(let A of x.vector_layers)this.vectorLayerIds.push(A.id),x.worldview&&x.worldview[A.source]&&this.localizableLayerIds.add(A.id)}this.tileBounds=v_.fromTileJSON(x),Lt(x.tiles,this.map._requestManager._customAccessToken),this.fire(new r.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.z("data",{dataType:"source",sourceDataType:"content"}))}l&&l(C)})}loaded(){return this._loaded}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}onAdd(l){this.map=l,this.load()}reload(){this.cancelTileJSONRequest();let l=r.B(this.id,this.scope);this.load(()=>this.map.style.clearSource(l))}setTiles(l){return this._options.tiles=l,this.reload(),this}setUrl(l){return this.url=l,this._options.url=l,this.reload(),this}onRemove(l){this.cancelTileJSONRequest()}serialize(){return Object.assign({},this._options)}loadTile(l,p){let g=l.tileID.canonical.url(this.tiles,this.scheme),C=this.map._requestManager.normalizeTileURL(g),x=this.map._requestManager.transformRequest(C,r.R.Tile),A=this.map.style?this.map.style.getLut(this.scope):null,R=A?{image:A.image.clone()}:null,B={request:x,data:void 0,uid:l.uid,tileID:l.tileID,tileZoom:l.tileZoom,zoom:l.tileID.overscaledZ,maxZoom:this.maxzoom,lut:R,tileSize:this.tileSize*l.tileID.overscaleFactor(),type:this.type,source:this.id,scope:this.scope,pixelRatio:r.o.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,isSymbolTile:l.isSymbolTile,brightness:this.map.style&&this.map.style.getBrightness()||0,extraShadowCaster:l.isExtraShadowCaster,tessellationStep:this.map._tessellationStep,scaleFactor:this.map.getScaleFactor(),worldview:this.map.getWorldview()||this.worldviewDefault};if(this.hasWorldviews&&r.h(g)&&(B.localizableLayerIds=this.localizableLayerIds),B.request.collectResourceTiming=this._collectResourceTiming,l.actor&&l.state!=="expired")l.state==="loading"?l.reloadCallback=p:l.request=l.actor.send("reloadTile",B,H.bind(this));else if(l.actor=this._tileWorkers[C]=this._tileWorkers[C]||this.dispatcher.getActor(),this.dispatcher.ready)l.request=l.actor.send("loadTile",B,H.bind(this),void 0,!0);else{let G=r.aL.call({deduped:this._deduped},B,(J,K)=>{J||!K?H.call(this,J):(B.data={cacheControl:K.cacheControl,expires:K.expires,rawData:K.rawData.slice(0)},l.actor&&l.actor.send("loadTile",B,H.bind(this),void 0,!0))},!0);l.request={cancel:G}}function H(G,J){return delete l.request,l.aborted?p(null):G&&G.status!==404?p(G):(J&&J.resourceTiming&&(l.resourceTiming=J.resourceTiming),this.map._refreshExpiredTiles&&J&&l.setExpiryData(J),l.loadVectorData(J,this.map.painter),r.aM(this.dispatcher),p(null),void(l.reloadCallback&&(this.loadTile(l,l.reloadCallback),l.reloadCallback=null)))}}abortTile(l){l.request&&(l.request.cancel(),delete l.request),l.actor&&l.actor.send("abortTile",{uid:l.uid,type:this.type,source:this.id,scope:this.scope})}unloadTile(l,p){l.actor&&l.actor.send("removeTile",{uid:l.uid,type:this.type,source:this.id,scope:this.scope}),l.destroy()}hasTransition(){return!1}afterUpdate(){this._tileWorkers={}}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}class Fy extends r.E{constructor(l,p,g,C){super(),this.id=l,this.dispatcher=g,this.setEventedParent(C),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=Object.assign({type:"raster"},p),Object.assign(this,r.aH(p,["url","scheme","tileSize"]))}load(l){this._loaded=!1,this.fire(new r.z("dataloading",{dataType:"source"}));let p=this.map.getWorldview();this._tileJSONRequest=Wu(this._options,this.map._requestManager,null,p,(g,C)=>{this._tileJSONRequest=null,this._loaded=!0,g?this.fire(new r.y(g)):C&&(Object.assign(this,C),C.raster_layers&&(this.rasterLayers=C.raster_layers,this.rasterLayerIds=this.rasterLayers.map(x=>x.id)),this.tileBounds=v_.fromTileJSON(C),Lt(C.tiles),this.fire(new r.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.z("data",{dataType:"source",sourceDataType:"content"}))),l&&l(g)})}loaded(){return this._loaded}onAdd(l){this.map=l,this.load()}reload(){this.cancelTileJSONRequest();let l=r.B(this.id,this.scope);this.load(()=>this.map.style.clearSource(l))}setTiles(l){return this._options.tiles=l,this.reload(),this}setUrl(l){return this.url=l,this._options.url=l,this.reload(),this}onRemove(l){this.cancelTileJSONRequest()}serialize(){return Object.assign({},this._options)}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}loadTile(l,p){let g=r.o.devicePixelRatio>=2,C=this.map._requestManager.normalizeTileURL(l.tileID.canonical.url(this.tiles,this.scheme),g,this.tileSize);l.request=r.n(this.map._requestManager.transformRequest(C,r.R.Tile),(x,A,R,B)=>(delete l.request,l.aborted?(l.state="unloaded",p(null)):x?(l.state="errored",p(x)):A?(this.map._refreshExpiredTiles&&l.setExpiryData({cacheControl:R,expires:B}),l.setTexture(A,this.map.painter),l.state="loaded",r.aM(this.dispatcher),void p(null)):p(null)))}abortTile(l,p){l.request&&(l.request.cancel(),delete l.request),p&&p()}unloadTile(l,p){l.texture&&l.texture instanceof r.T?(l.destroy(!0),l.texture&&l.texture instanceof r.T&&this.map.painter.saveTileTexture(l.texture)):l.destroy(),p&&p()}hasTransition(){return!1}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}function aD([_,l],p,g,{scaled:C=!0}={}){let{tileSize:x,buffer:A}=g,{x:R,y:B,z:H}=p;if(!isFinite(R)||!isFinite(B)||!isFinite(H))throw new Error("Invalid MRT header");let G=2**H,J=G*r.aF(_),K=G*r.aJ(l);return(function([oe,le],de,{scaled:Ce=!0}={}){if(!de)throw new Error("bandView is undefined");let{data:he,tileSize:Te,buffer:Pe,offset:Ve,scale:et,dimension:Qe}=de;if(oe<-Pe||oe>Te+Pe||le<-Pe||le>Te+Pe)throw new Error(`Point (${oe}, ${le}) out of bounds for tileSize=${Te}, buffer=${Pe}`);let it=(le+Pe)*(Te+2*Pe)+(oe+Pe);if(new Uint32Array(he.buffer)[it]===4294967295)return null;let Ze=[];Ze=Ce?[]:new de.data.constructor(Qe);for(let Ye=0;Ye{if(delete l.request,l.aborted)return l.state="unloaded",p(null);if(R)return R.name==="AbortError"?void 0:(l.state="errored",p(R));if(this.map._refreshExpiredTiles&&B&&l.setExpiryData({cacheControl:H,expires:G}),this.partial&&l.state!=="expired")l.state="empty";else if(!this.partial){if(!B)return p(null);l.state="loaded",l._isHeaderLoaded=!0,l._mrt=B}p(null)};l.request=this.partial?l.fetchHeader(void 0,A.bind(this)):l.actor.send("loadTile",x,A.bind(this),void 0,!0)}abortTile(l){l.request&&(l.request.cancel(),delete l.request),l.actor&&l.actor.send("abortTile",{uid:l.uid,type:this.type,source:this.id,scope:this.scope})}unloadTile(l,p){let g=l.texturePerLayer;if(l.flushAllQueues(),g.size){l.destroy(!0);for(let C of g.values())this.map.painter.saveTileTexture(C)}else l.destroy()}prepareTile(l,p,g,C){l._isHeaderLoaded&&(l.state!=="empty"&&(l.state="reloading"),l.fetchBandForRender(p,g,C,(x,A)=>{if(x)return l.state="errored",this.fire(new r.y(x)),void this.triggerRepaint(l);A&&(l._isHeaderLoaded=!0,l.setTexturePerLayer(g,A,this.map.painter),l.state="loaded",this.triggerRepaint(l))}))}getInitialBand(l){if(!this.rasterLayers)return 0;let p=this.rasterLayers.find(({id:x})=>x===l),g=p&&p.fields,C=g&&g.bands&&g.bands;return C?C[0]:0}getTextureDescriptor(l,p,g){if(!l)return;let C=p.sourceLayer||this.rasterLayerIds&&this.rasterLayerIds[0];if(!C)return;let x=null;p instanceof r.aP?x=p.paint.get("raster-array-band"):p instanceof r.aQ&&(x=p.paint.get("raster-particle-array-band"));let A=x||this.getInitialBand(C);if(A==null)return;if(!l.textureDescriptorPerLayer.get(p.id))return void this.prepareTile(l,C,p.id,A);if(l.updateNeeded(p.id,A)&&!g)return;let R=l.textureDescriptorPerLayer.get(p.id);return Object.assign({},R,{texture:l.texturePerLayer.get(p.id)})}getImages(l,p){let g=new Map;for(let C of l)for(let x of p){let[A,R]=x.split("/"),B=C.getLayer(A);if(!B||!B.hasBand(R)||!B.hasDataForBand(R))continue;let{bytes:H,tileSize:G,buffer:J}=B.getBandView(R),K=G+2*J,oe={data:new r.q({width:K,height:K},H),pixelRatio:2,sdf:!1,usvg:!1,version:0};g.set(x,oe)}return g}queryRasterArrayValueByBandId(l,p,g){let C=p._mrt;return new Promise(x=>{let A={},R=new Set;for(let[B,H]of Object.entries(C.layers)){if(g.layerName&&B!==g.layerName)continue;let G={};A[B]=G;for(let{bands:J}of H.dataIndex)for(let K of J)g.bands&&!g.bands.includes(K)||(R.add(r.B(B,K)),p.fetchBand(B,null,K,oe=>{r.o.frame(()=>{G[K]=oe?null:aD([l.lng,l.lat],C,H.getBandView(K)),R.delete(r.B(B,K)),R.size===0&&x(A)})},!1))}R.size===0&&x(A)})}_loadTileForQuery(l,p){if(this._loadTileLoaded[l.uid])return void p(null,l._mrt);if(this._loadTilePending[l.uid])return void this._loadTilePending[l.uid].push(p);this._loadTilePending[l.uid]=[p];let g=this.map._requestManager.normalizeTileURL(l.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize),C=this.map._requestManager.transformRequest(g,r.R.Tile);l.actor.send("loadTile",{request:C,uid:l.uid,tileID:l.tileID,type:this.type,source:this.id,scope:this.scope,partial:!1},(x,A,R,B)=>x?(this._loadTilePending[l.uid].forEach(H=>H(x,null)),void delete this._loadTilePending[l.uid]):A?(this.map._refreshExpiredTiles&&A&&l.setExpiryData({cacheControl:R,expires:B}),l._mrt=A,l._isHeaderLoaded=!0,l.state="loaded",this._loadTilePending[l.uid].forEach(H=>H(null,A)),this._loadTileLoaded[l.uid]=!0,void delete this._loadTilePending[l.uid]):(this._loadTilePending[l.uid].forEach(H=>H(null,null)),void delete this._loadTilePending[l.uid]),void 0,!0)}queryRasterArrayValueByAllBands(l,p,g){return new Promise((C,x)=>{this._loadTileForQuery(p,(A,R)=>{A?x(A):C(R?this.queryRasterArrayValueByBandId(l,p,g):null)})})}queryRasterArrayValue(l,p){let g=r.aR.convert(l),C=this.findLoadedParent(g);return C&&C._mrt?p.bands||!this.partial?this.queryRasterArrayValueByBandId(g,C,p):this.queryRasterArrayValueByAllBands(g,C,p):Promise.resolve(null)}findLoadedParent(l){let p=r.ae.fromLngLat(l,this.map.transform.tileSize),g=this.maxzoom+1,C=1<0&&(R[new r.aO(_.overscaledZ,C,l.z,g,l.y-1).key]={backfilled:!1},R[new r.aO(_.overscaledZ,_.wrap,l.z,l.x,l.y-1).key]={backfilled:!1},R[new r.aO(_.overscaledZ,A,l.z,x,l.y-1).key]={backfilled:!1}),l.y+1{if(this._loaded=!0,this._pendingLoad=null,g)this.fire(new r.y(g));else{let x={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&C&&C.resourceTiming&&C.resourceTiming[this.id]&&(x.resourceTiming=C.resourceTiming[this.id]),_&&(this._partialReload=!0),this.fire(new r.z("data",x)),this._partialReload=!1,this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(_),this._coalesce=!1)})}loaded(){return this._loaded}reload(){let _=r.B(this.id,this.scope);this.map.style.clearSource(_),this._updateWorkerData()}loadTile(_,l){let p=_.actor?"reloadTile":"loadTile";_.actor=this.actor;let g=this.map.style?this.map.style.getLut(this.scope):null,C=g?{image:g.image.clone()}:null,x=this._partialReload,A={type:this.type,uid:_.uid,tileID:_.tileID,tileZoom:_.tileZoom,zoom:_.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,lut:C,scope:this.scope,pixelRatio:r.o.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,brightness:this.map.style&&this.map.style.getBrightness()||0,extraShadowCaster:_.isExtraShadowCaster,scaleFactor:this.map.getScaleFactor(),partial:x,worldview:this.map.getWorldview()};_.request=this.actor.send(p,A,(R,B)=>x&&!B?(_.state="loaded",l(null)):(delete _.request,_.destroy(),_.aborted?l(null):R?l(R):(_.loadVectorData(B,this.map.painter,p==="reloadTile"),l(null))),void 0,p==="loadTile")}abortTile(_){_.request&&(_.request.cancel(),delete _.request),_.aborted=!0}unloadTile(_,l){this.actor.send("removeTile",{uid:_.uid,type:this.type,source:this.id,scope:this.scope}),_.destroy()}onRemove(_){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return Object.assign({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}},video:class extends r.aS{constructor(_,l,p,g){super(_,l,p,g),this.roundZoom=!0,this.type="video",this.options=l}load(){this._loaded=!1;let _=this.options;this.urls=[];for(let l of _.urls)this.urls.push(this.map._requestManager.transformRequest(l,r.R.Source).url);r.aT(this.urls,(l,p)=>{this._loaded=!0,l?this.fire(new r.y(l)):p&&(this.video=p,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(_){if(this.video){let l=this.video.seekable;_l.end(0)?this.fire(new r.y(new r.V(`sources.${this.id}`,null,`Playback for this video can be set only between the ${l.start(0)} and ${l.end(0)}-second mark.`))):this.video.currentTime=_}}getVideo(){return this.video}onAdd(_){this.map||(this.map=_,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let _=this.map.painter.context,l=_.gl;this.texture?this.video.paused||(this.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE),l.texSubImage2D(l.TEXTURE_2D,0,0,0,l.RGBA,l.UNSIGNED_BYTE,this.video)):(this.texture=new r.T(_,this.video,l.RGBA8),this.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE),this.width=this.video.videoWidth,this.height=this.video.videoHeight),this._prepareData(_)}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},image:r.aS,model:class extends r.E{constructor(_,l,p,g){super(),this.id=_,this.type="model",this.models=[],this._loaded=!1,this._options=l}load(){let _=[];for(let l in this._options.models){let p=this._options.models[l],g=r.aV(this.map._requestManager.transformRequest(p.uri,r.R.Model).url).then(C=>{if(!C)return;let x=r.aW(C),A=new r.aX(l,p.position,p.orientation,x);A.computeBoundsAndApplyParent(),this.models.push(A)}).catch(C=>{this.fire(new r.y(new Error(`Could not load model ${l} from ${p.uri}: ${C.message}`)))});_.push(g)}Promise.allSettled(_).then(()=>{this._loaded=!0,this.fire(new r.z("data",{dataType:"source",sourceDataType:"metadata"}))}).catch(l=>{this._loaded=!0,this.fire(new r.y(new Error(`Could not load models: ${l.message}`)))})}onAdd(_){this.map=_,this.load()}hasTransition(){return!1}loaded(){return this._loaded}getModels(){return this.models}loadTile(_,l){}serialize(){return this._options}},"batched-model":class extends r.E{constructor(_,l,p,g){super(),this.type="batched-model",this.id=_,this.tileSize=512,this._options=l,this.tiles=this._options.tiles,this.maxzoom=l.maxzoom||19,this.minzoom=l.minzoom||0,this.roundZoom=!0,this.usedInConflation=!0,this.dispatcher=p,this.reparseOverscaled=!1,this.scheme="xyz",this._loaded=!1,this.setEventedParent(g)}onAdd(_){this.map=_,this.load()}reload(){this.cancelTileJSONRequest();let _=r.B(this.id,this.scope);this.load(()=>this.map.style.clearSource(_))}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}load(_){this._loaded=!1,this.fire(new r.z("dataloading",{dataType:"source"}));let l=Array.isArray(this.map._language)?this.map._language.join():this.map._language,p=this.map.getWorldview();this._tileJSONRequest=Wu(this._options,this.map._requestManager,l,p,(g,C)=>{this._tileJSONRequest=null,this._loaded=!0,g?(l&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${l}`),p&&p.length!==2&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${p}`),this.fire(new r.y(g))):C&&(Object.assign(this,C),C.bounds&&(this.tileBounds=new v_(C.bounds,this.minzoom,this.maxzoom)),Lt(C.tiles,this.map._requestManager._customAccessToken),this.fire(new r.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.z("data",{dataType:"source",sourceDataType:"content"}))),_&&_(g)})}hasTransition(){return!1}hasTile(_){return!this.tileBounds||this.tileBounds.contains(_.canonical)}loaded(){return this._loaded}loadTile(_,l){let p=this.map._requestManager.normalizeTileURL(_.tileID.canonical.url(this.tiles,this.scheme)),g={request:this.map._requestManager.transformRequest(p,r.R.Tile),data:void 0,uid:_.uid,tileID:_.tileID,tileZoom:_.tileZoom,zoom:_.tileID.overscaledZ,tileSize:this.tileSize*_.tileID.overscaleFactor(),type:this.type,source:this.id,scope:this.scope,showCollisionBoxes:this.map.showCollisionBoxes,isSymbolTile:_.isSymbolTile,brightness:this.map.style&&this.map.style.getBrightness()||0,pixelRatio:r.o.devicePixelRatio,promoteId:this.promoteId};if(_.actor&&_.state!=="expired")if(_.state==="loading")_.reloadCallback=l;else{if(_.buckets){let x=Object.values(_.buckets);for(let A of x)A.dirty=!0;return void(_.state="loaded")}_.request=_.actor.send("reloadTile",g,C.bind(this))}else _.actor=this.dispatcher.getActor(),_.request=_.actor.send("loadTile",g,C.bind(this),void 0,!0);function C(x,A){return _.aborted?l(null):x&&x.status!==404?l(x):(this.map._refreshExpiredTiles&&A&&_.setExpiryData(A),_.loadModelData(A,this.map.painter),_.state="loaded",void l(null))}}serialize(){return Object.assign({},this._options)}},canvas:class extends r.aS{constructor(_,l,p,g){super(_,l,p,g),l.coordinates?Array.isArray(l.coordinates)&&l.coordinates.length===4&&!l.coordinates.some(C=>!Array.isArray(C)||C.length!==2||C.some(x=>typeof x!="number"))||this.fire(new r.y(new r.V(`sources.${_}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new r.y(new r.V(`sources.${_}`,null,'missing required property "coordinates"'))),l.animate&&typeof l.animate!="boolean"&&this.fire(new r.y(new r.V(`sources.${_}`,null,'optional "animate" property must be a boolean value'))),l.canvas?typeof l.canvas=="string"||l.canvas instanceof HTMLCanvasElement||this.fire(new r.y(new r.V(`sources.${_}`,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 r.y(new r.V(`sources.${_}`,null,'missing required property "canvas"'))),this.options=l,this.animate=l.animate===void 0||l.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new r.y(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(_){this.map=_,this.load(),this.canvas&&this.animate&&this.play()}onRemove(_){this.pause()}prepare(){let _=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,_=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,_=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let l=this.map.painter.context;this.texture?!_&&!this._playing||this.texture instanceof r.aU||this.texture.update(this.canvas,{premultiply:!0}):this.texture=new r.T(l,this.canvas,l.gl.RGBA8,{premultiply:!0}),this._prepareData(l)}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let _ of[this.canvas.width,this.canvas.height])if(isNaN(_)||_<=0)return!0;return!1}},custom:class extends r.E{constructor(_,l,p,g){super(),this.id=_,this.type="custom",this._dataType="raster",this._dispatcher=p,this._implementation=l,this.setEventedParent(g),this.scheme="xyz",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this._loaded=!1,this.roundZoom=!0,this._implementation||this.fire(new r.y(new Error(`Missing implementation for ${this.id} custom source`))),this._implementation.loadTile||this.fire(new r.y(new Error(`Missing loadTile implementation for ${this.id} custom source`))),this._implementation.bounds&&(this.tileBounds=new v_(this._implementation.bounds,this.minzoom,this.maxzoom)),l.update=this._update.bind(this),l.clearTiles=this._clearTiles.bind(this),l.coveringTiles=this._coveringTiles.bind(this),Object.assign(this,r.aH(l,["dataType","scheme","minzoom","maxzoom","tileSize","attribution","minTileCacheSize","maxTileCacheSize"]))}serialize(){return r.aH(this,["type","scheme","minzoom","maxzoom","tileSize","attribution"])}load(){this._loaded=!0,this.fire(new r.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.z("data",{dataType:"source",sourceDataType:"content"}))}loaded(){return this._loaded}onAdd(_){this.map=_,this._loaded=!1,this.fire(new r.z("dataloading",{dataType:"source"})),this._implementation.onAdd&&this._implementation.onAdd(_),this.load()}onRemove(_){this._implementation.onRemove&&this._implementation.onRemove(_)}hasTile(_){if(this._implementation.hasTile){let{x:l,y:p,z:g}=_.canonical;return this._implementation.hasTile({x:l,y:p,z:g})}return!this.tileBounds||this.tileBounds.contains(_.canonical)}loadTile(_,l){let{x:p,y:g,z:C}=_.tileID.canonical,x=new AbortController;_.request=Promise.resolve(this._implementation.loadTile({x:p,y:g,z:C},{signal:x.signal})).then(function(A){return delete _.request,_.aborted?(_.state="unloaded",l(null)):A===void 0?(_.state="errored",l(null)):A===null?(this.loadTileData(_,{width:this.tileSize,height:this.tileSize,data:null}),_.state="loaded",l(null)):(function(R){return R instanceof ImageData||R instanceof HTMLCanvasElement||R instanceof ImageBitmap||R instanceof HTMLImageElement})(A)?(this.loadTileData(_,A),_.state="loaded",void l(null)):(_.state="errored",l(new Error(`Can't infer data type for ${this.id}, only raster data supported at the moment`)))}.bind(this)).catch(A=>{A.name!=="AbortError"&&(_.state="errored",l(A))}),_.request.cancel=()=>x.abort()}loadTileData(_,l){_.setTexture(l,this.map.painter)}unloadTile(_,l){if(_.texture&&_.texture instanceof r.T?(_.destroy(!0),_.texture&&_.texture instanceof r.T&&this.map.painter.saveTileTexture(_.texture)):_.destroy(),this._implementation.unloadTile){let{x:p,y:g,z:C}=_.tileID.canonical;this._implementation.unloadTile({x:p,y:g,z:C})}l&&l()}abortTile(_,l){_.request&&_.request.cancel&&(_.request.cancel(),delete _.request),l&&l()}hasTransition(){return!1}_coveringTiles(){return this.map.transform.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,roundZoom:this.roundZoom}).map(_=>({x:_.canonical.x,y:_.canonical.y,z:_.canonical.z}))}_clearTiles(){let _=r.B(this.id,this.scope);this.map.style.clearSource(_)}_update(){this.fire(new r.z("data",{dataType:"source",sourceDataType:"content"}))}}},Cb=function(_,l,p,g){let C=new bb[l.type](_,l,p,g);if(C.id!==_)throw new Error(`Expected Source id to be ${_} instead of ${C.id}`);return r.aY(["load","abort","unload","serialize","prepare"],C),C};function T0(_,l,p=""){return`${p}:${l.id||""}:${l.layer.id}:${(function(g){if("layerId"in g)return`layer:${g.layerId}`;{let{featuresetId:C,importId:x}=g;return`featureset:${C}${x?`:import:${x}`:""}`}})(_.target)}`}function b_(_,l,p,g=""){if(_.uniqueFeatureID){let C=T0(_,l,g);if(p.has(C))return!0;p.add(C)}return!1}function $x(_,l,p,g,C=!1){let x=l.sourceCache.transform,A=l.sourceCache.tilesIn(_,l.has3DLayers,C);A.sort(qx);let R=[];for(let B of A){let H=B.tile.queryRenderedFeatures(l,B,p,g,x,C);Object.keys(H).length&&R.push({wrappedTileID:B.tile.tileID.wrapped().key,queryResults:H})}return R.length===0?{}:(function(B){let H={},G={};for(let J of B){let K=J.queryResults,oe=J.wrappedTileID,le=G[oe]=G[oe]||{};for(let de in K){let Ce=K[de],he=le[de]=le[de]||{},Te=H[de]=H[de]||[];for(let Pe of Ce)he[Pe.featureIndex]||(he[Pe.featureIndex]=!0,Te.push(Pe))}}return H})(R)}function TS(_,l,p,g,C,x){let A={},R=g.queryRenderedSymbols(_),B=[];for(let H of Object.keys(R).map(Number))B.push(C[H]);B.sort(qx);for(let H of B){let G=H.featureIndex.lookupSymbolFeatures(R[H.bucketInstanceId],H.bucketIndex,H.sourceLayerIndex,l,p,x);for(let J in G){let K=A[J]=A[J]||[],oe=G[J];oe.sort((le,de)=>{let Ce=H.featureSortOrder;if(Ce){let he=Ce.indexOf(le.featureIndex);return Ce.indexOf(de.featureIndex)-he}return de.featureIndex-le.featureIndex});for(let le of oe)K.push(le)}}return A}function ff(_,l){let p=_.getRenderableIds().map(x=>_.getTileByID(x)),g=[],C={};for(let x=0;xl.getLayer(x)).filter(Boolean);if(C.length!==0){g.layers=C,g.stateDependentLayerIds&&(g.stateDependentLayers=g.stateDependentLayerIds.map(x=>C.filter(A=>A.id===x)[0]));for(let x of C)p[x.fqid]=g}}return p}let Xp=32,Ah=33,gf=new Uint16Array(8184);for(let _=0;_<2046;_++){let l=_+2,p=0,g=0,C=0,x=0,A=0,R=0;for(1&l?C=x=A=Xp:p=g=R=Xp;(l>>=1)>1;){let H=p+C>>1,G=g+x>>1;1&l?(C=p,x=g,p=A,g=R):(p=C,g=x,C=A,x=R),A=H,R=G}let B=4*_;gf[B+0]=p,gf[B+1]=g,gf[B+2]=C,gf[B+3]=x}let Yu=new Uint16Array(2178),bu=new Uint8Array(1089),I0=new Uint16Array(1089);function lD(_){return _===0?-.03125:_===32?.03125:0}let xb={type:2,extent:r.al,loadGeometry:()=>[[new r.P(0,0),new r.P(r.al+1,0),new r.P(r.al+1,r.al+1),new r.P(0,r.al+1),new r.P(0,0)]]};class C_{constructor(l,p,g,C,x,A){this.tileID=l,this.uid=r.b2(),this.uses=0,this.tileSize=p,this.tileZoom=g,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=x,C&&C.style&&(this._lastUpdatedBrightness=C.style.getBrightness()),this.expiredRequestCount=0,this.state="loading",C&&C.transform&&(this.projection=C.transform.projection),this.worldview=A}registerFadeDuration(l){let p=l+this.timeAdded;pg)C=!1;else if(p)if(this.expirationTime0&&!p;(le&&R.stateDependentLayers.length!==0||p)&&R.update(K,G,C,oe,le?R.stateDependentLayers:R.layers,p,x),(R instanceof r.ba||R instanceof r.bb)&&l._terrain&&l._terrain.enabled&&J&&R.uploadPending()&&l._terrain._clearRenderCacheForTile(J.id,this.tileID);let de=l&&l.style&&l.style.getOwnLayer(A);de&&(this.queryPadding=Math.max(this.queryPadding,de.queryRadius(R)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil=0;Ce--){let he=4*Ce,Te=gf[he+0],Pe=gf[he+1],Ve=gf[he+2],et=gf[he+3],Qe=Te+Ve>>1,it=Pe+et>>1,Ze=Qe+it-Pe,Ye=it+Te-Qe,Je=Pe*Ah+Te,Bt=et*Ah+Ve,St=it*Ah+Qe,Jt=Math.hypot((Yu[2*Je+0]+Yu[2*Bt+0])/2-Yu[2*St+0],(Yu[2*Je+1]+Yu[2*Bt+1])/2-Yu[2*St+1])>=16;bu[St]=bu[St]||(Jt?1:0),Ce<1022&&(bu[St]=bu[St]||bu[(Pe+Ye>>1)*Ah+(Te+Ze>>1)]||bu[(et+Ye>>1)*Ah+(Ve+Ze>>1)])}let J=new r.b0,K=new r.b1,oe=0;function le(Ce,he){let Te=he*Ah+Ce;return I0[Te]===0&&(J.emplaceBack(Yu[2*Te+0],Yu[2*Te+1],Ce*r.al/Xp,he*r.al/Xp),I0[Te]=++oe),I0[Te]-1}function de(Ce,he,Te,Pe,Ve,et){let Qe=Ce+Te>>1,it=he+Pe>>1;if(Math.abs(Ce-Ve)+Math.abs(he-et)>1&&bu[it*Ah+Qe])de(Ve,et,Ce,he,Qe,it),de(Te,Pe,Ve,et,Qe,it);else{let Ze=le(Ce,he),Ye=le(Te,Pe),Je=le(Ve,et);K.emplaceBack(Ze,Ye,Je)}}return de(0,0,Xp,Xp,Xp,0),de(Xp,Xp,0,0,0,Xp),{vertices:J,indices:K}})(this.tileID.canonical,p);C=A.vertices,x=A.indices}else{C=new r.b0,x=new r.b1;for(let{x:R,y:B}of g)C.emplaceBack(R,B,0,0);let A=r.bh(C.int16.subarray(0,4*C.length),void 0,4);for(let R=0;R0&&(B=r.bl(new Float64Array(16),p.globeMatrix)),this._makeGlobeTileDebugBorderBuffer(l,C,p,A,B,R),this._makeGlobeTileDebugTextBuffer(l,C,p,A,B,R)}_globePoint(l,p,g,C,x,A,R){let B=r.bm(l,p,g);if(A){let H=1<.5?oe=-1:K<-.5&&(oe=1);let le=(l/r.al+g.x)/H+oe,de=(p/r.al+g.y)/H;le=(le-G)*C._pixelsPerMercatorPixel+G,de=(de-J)*C._pixelsPerMercatorPixel+J;let Ce=[le*C.worldSize,de*C.worldSize,0];r.af(Ce,Ce,A),B=r.bn(B,Ce,R)}return r.af(B,B,x)}_makeGlobeTileDebugBorderBuffer(l,p,g,C,x,A){let R=new r.bd,B=new r.be,H=new r.bo,G=(K,oe,le,de,Ce)=>{let he=(le-K)/(Ce-1),Te=(de-oe)/(Ce-1),Pe=R.length;for(let Ve=0;VeJ*oe+le;for(let oe=0;oe{if(x)p(x);else try{let H=g.getHeaderLength(A);if(H>l)return void(this.request=this.fetchHeader(H,p));g.parseHeader(A),this._isHeaderLoaded=!0;let G=0;for(let J of Object.values(g.layers))G=Math.max(G,J.dataIndex[J.dataIndex.length-1].lastByte);A.byteLength>=G&&(this.entireBuffer=A),p(null,this.entireBuffer||A,R,B)}catch(H){p(H)}}),this.request}fetchBandForRender(l,p,g,C){this.fetchBand(l,p,g,x=>{if(x)return void C(x);this.updateTextureDescriptor(l,p,g);let A=this.textureDescriptorPerLayer.get(p);C(null,A?A.img:null)})}fetchBand(l,p,g,C,x=!0){let A=this._mrt;if(!this._isHeaderLoaded||!A)return void C(new Error("Tile header is not ready"));let R=this.actor;if(!R)return void C(new Error("Can't fetch tile band without an actor"));let B,H=r.B(String(g),r.B(this.tileID.key,l)),G=this._taskQueue.get(H);G?G.add(C):(G=new Set,G.add(C),this._taskQueue.set(H,G));let J=(de,Ce)=>{B.complete(de,Ce),de?C(de):(G.values().forEach(he=>he(null,Ce)),this._taskQueue.delete(H))},K=(de,Ce)=>{if(de)return C(de);let he=R.send("decodeRasterArray",{type:"raster-array",source:this.source,scope:this.scope,tileID:this.tileID,uid:this.uid,buffer:Ce,task:B},J,void 0,!0);if(p!==null){let Te=this._workQueuePerLayer.get(p)||[];Te.push(()=>{he&&he.cancel(),B.cancel()}),this._workQueuePerLayer.has(p)||this._workQueuePerLayer.set(p,Te)}},oe;try{oe=A.getLayer(l)}catch(de){if(this.state==="reloading")return;throw de}if(!oe)return void C(new Error(`Unknown sourceLayer "${l}"`));if(oe.hasDataForBand(g))return G.values().forEach(de=>de(null,null)),void this._taskQueue.delete(H);let le=oe.getDataRange([g]);if(B=A.createDecodingTask(le),!B||B.tasks.length)if(p!==null&&this.flushQueues(p),this.entireBuffer)K(null,this.entireBuffer.slice(le.firstByte,le.lastByte+1));else{let de=Object.assign({},this.requestParams,{headers:{Range:`bytes=${le.firstByte}-${le.lastByte}`}}),Ce=r.bu(de,K);if(p!==null){let he=this._fetchQueuePerLayer.get(p)||[];he.push(()=>{Ce.cancel(),B.cancel()}),this._fetchQueuePerLayer.has(p)||this._fetchQueuePerLayer.set(p,he)}}}updateNeeded(l,p){return(!this.textureDescriptorPerLayer.get(l)||this.textureDescriptorPerLayer.get(l).band!==p||this.refreshedUponExpiration)&&this.state!=="errored"}updateTextureDescriptor(l,p,g){if(!this._mrt)return;let C=this._mrt.getLayer(l);if(!C||!C.hasBand(g)||!C.hasDataForBand(g))return;let{bytes:x,tileSize:A,buffer:R,offset:B,scale:H}=C.getBandView(g),G=A+2*R,J=new r.q({width:G,height:G},x),K=this.texturePerLayer.get(p);K&&K instanceof r.T&&K.update(J,{premultiply:!1}),this.textureDescriptorPerLayer.set(p,{layer:l,band:g,img:J,buffer:R,offset:B,tileSize:A,format:C.pixelFormat,mix:[H,256*H,65536*H,16777216*H]})}destroy(l=!1){if(super.destroy(l),delete this._mrt,!l)for(let p of this.texturePerLayer.values())p&&p instanceof r.T&&p.destroy();this.texturePerLayer.clear(),this.textureDescriptorPerLayer.clear(),this.fbo&&(this.fbo.destroy(),delete this.fbo),delete this.request,delete this.requestParams,this._isHeaderLoaded=!1}}class Sb{constructor(l,p){this.max=l,this.onRemove=p,this.reset()}reset(){for(let l in this.data)for(let p of this.data[l])p.timeout&&clearTimeout(p.timeout),this.onRemove(p.value);return this.data={},this.order=[],this}add(l,p,g){let C=l.wrapped().key;this.data[C]===void 0&&(this.data[C]=[]);let x={value:p,timeout:void 0};if(g!==void 0&&(x.timeout=setTimeout(()=>{this.remove(l,x)},g)),this.data[C].push(x),this.order.push(C),this.order.length>this.max){let A=this._getAndRemoveByKey(this.order[0]);A&&this.onRemove(A)}return this}has(l){return l.wrapped().key in this.data}getAndRemove(l){return this.has(l)?this._getAndRemoveByKey(l.wrapped().key):null}_getAndRemoveByKey(l){let p=this.data[l].shift();return p.timeout&&clearTimeout(p.timeout),this.data[l].length===0&&delete this.data[l],this.order.splice(this.order.indexOf(l),1),p.value}getByKey(l){let p=this.data[l];return p?p[0].value:null}get(l){return this.has(l)?this.data[l.wrapped().key][0].value:null}remove(l,p){if(!this.has(l))return this;let g=l.wrapped().key,C=p===void 0?0:this.data[g].indexOf(p),x=this.data[g][C];return this.data[g].splice(C,1),x.timeout&&clearTimeout(x.timeout),this.data[g].length===0&&delete this.data[g],this.onRemove(x.value),this.order.splice(this.order.indexOf(g),1),this}setMaxSize(l){for(this.max=l;this.order.length>this.max;){let p=this._getAndRemoveByKey(this.order[0]);p&&this.onRemove(p)}return this}filter(l){let p=[];for(let g in this.data)for(let C of this.data[g])l(C.value)||p.push(C);for(let g of p)this.remove(g.value.tileID,g)}}class Tb{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(l,p,g){let C=String(p);if(this.stateChanges[l]=this.stateChanges[l]||{},this.stateChanges[l][C]=this.stateChanges[l][C]||{},Object.assign(this.stateChanges[l][C],g),this.deletedStates[l]===null){this.deletedStates[l]={};for(let x in this.state[l])x!==C&&(this.deletedStates[l][x]=null)}else if(this.deletedStates[l]&&this.deletedStates[l][C]===null){this.deletedStates[l][C]={};for(let x in this.state[l][C])g[x]||(this.deletedStates[l][C][x]=null)}else for(let x in g)this.deletedStates[l]&&this.deletedStates[l][C]&&this.deletedStates[l][C][x]===null&&delete this.deletedStates[l][C][x]}removeFeatureState(l,p,g){if(this.deletedStates[l]===null)return;let C=String(p);if(this.deletedStates[l]=this.deletedStates[l]||{},g&&p!==void 0)this.deletedStates[l][C]!==null&&(this.deletedStates[l][C]=this.deletedStates[l][C]||{},this.deletedStates[l][C][g]=null);else if(p!==void 0)if(this.stateChanges[l]&&this.stateChanges[l][C])for(g in this.deletedStates[l][C]={},this.stateChanges[l][C])this.deletedStates[l][C][g]=null;else this.deletedStates[l][C]=null;else this.deletedStates[l]=null}getState(l,p){let g=this.state[l]||{},C=this.stateChanges[l]||{},x=this.deletedStates[l];if(x===null)return{};if(p!==void 0){let R=String(p),B=Object.assign({},g[R],C[R]);if(x){let H=x[p];if(H===null)return{};for(let G in H)delete B[G]}return B}let A=Object.assign({},g,C);if(x)for(let R in x)delete A[R];return A}initializeTileState(l,p){l.refreshFeatureState(p)}coalesceChanges(l,p){let g={};for(let C in this.stateChanges){this.state[C]=this.state[C]||{};let x={};for(let A in this.stateChanges[C])this.state[C][A]||(this.state[C][A]={}),Object.assign(this.state[C][A],this.stateChanges[C][A]),x[A]=this.state[C][A];g[C]=x}for(let C in this.deletedStates){this.state[C]=this.state[C]||{};let x={};if(this.deletedStates[C]===null)for(let A in this.state[C])x[A]={},this.state[C][A]={};else for(let A in this.deletedStates[C]){if(this.deletedStates[C][A]===null)this.state[C][A]={};else if(this.state[C][A])for(let R of Object.keys(this.deletedStates[C][A]))delete this.state[C][A][R];x[A]=this.state[C][A]}g[C]=g[C]||{},Object.assign(g[C],x)}if(this.stateChanges={},this.deletedStates={},Object.keys(g).length!==0)for(let C in l)l[C].refreshFeatureState(p)}}class kh extends r.E{constructor(l,p,g){super(),this.id=l,this._onlySymbols=g,p.on("data",C=>{C.dataType==="source"&&C.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&C.dataType==="source"&&C.sourceDataType==="content"&&(this.reload(),this.transform&&this.update(this.transform))}),p.on("error",()=>{this._sourceErrored=!0}),this._source=p,this._tiles={},this._cache=new Sb(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._minTileCacheSize=p.minTileCacheSize,this._maxTileCacheSize=p.maxTileCacheSize,this._loadedParentTiles={},this.castsShadows=!1,this.tileCoverLift=0,this._coveredTiles={},this._shadowCasterTiles={},this._state=new Tb,this._isRaster=this._source.type==="raster"||this._source.type==="raster-dem"||this._source.type==="raster-array"||this._source.type==="custom"&&this._source._dataType==="raster"}onAdd(l){this.map=l,this._minTileCacheSize=this._minTileCacheSize===void 0&&l?l._minTileCacheSize:this._minTileCacheSize,this._maxTileCacheSize=this._maxTileCacheSize===void 0&&l?l._maxTileCacheSize:this._maxTileCacheSize}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(let l in this._tiles)if(!this._tiles[l].loaded())return!1;return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let l=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,l&&this.reload(),this.transform&&this.update(this.transform)}_loadTile(l,p){return l.isSymbolTile=this._onlySymbols,l.isExtraShadowCaster=this._shadowCasterTiles[l.tileID.key],this._source.loadTile(l,p)}_unloadTile(l){if(this._source.unloadTile)return this._source.unloadTile(l)}_abortTile(l){if(this._source.abortTile)return this._source.abortTile(l)}serialize(){return this._source.serialize()}prepare(l){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let p in this._tiles){let g=this._tiles[p];g.upload(l),g.prepare(this.map.style.imageManager,this.map?this.map.painter:null,this._source.scope)}}getIds(){return Object.values(this._tiles).map(l=>l.tileID).sort(cD).map(l=>l.key)}getRenderableIds(l,p){let g=[];for(let C in this._tiles)this._isIdRenderable(+C,l,p)&&g.push(this._tiles[C]);return l?g.sort((C,x)=>{let A=C.tileID,R=x.tileID,B=new r.P(A.canonical.x,A.canonical.y)._rotate(this.transform.angle),H=new r.P(R.canonical.x,R.canonical.y)._rotate(this.transform.angle);return A.overscaledZ-R.overscaledZ||H.y-B.y||H.x-B.x}).map(C=>C.tileID.key):g.map(C=>C.tileID).sort(cD).map(C=>C.key)}hasRenderableParent(l){let p=this.findLoadedParent(l,0);return!!p&&this._isIdRenderable(p.tileID.key)}_isIdRenderable(l,p,g){return this._tiles[l]&&this._tiles[l].hasData()&&!this._coveredTiles[l]&&(p||!this._tiles[l].holdingForFade())&&(g||!this._shadowCasterTiles[l])}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let l in this._tiles)this._tiles[l].state!=="errored"&&this._reloadTile(+l,"reloading")}}_reloadTile(l,p){let g=this._tiles[l];g&&(g.state!=="loading"&&(g.state=p),this._loadTile(g,this._tileLoaded.bind(this,g,l,p)))}_tileLoaded(l,p,g,C){if(C)if(l.state="errored",C.status!==404)this._source.fire(new r.y(C,{tile:l}));else{if(this._source.fire(new r.z("data",{dataType:"source",sourceDataType:"error",sourceId:this._source.id,tile:l})),!(l.tileID.key in this._loadedParentTiles))return;if(this._source.type==="raster-dem"&&this.usedForTerrain&&this.map.painter.terrain){let x=this.map.painter.terrain;this.update(this.transform,x.getScaledDemTileSize(),!0),x.resetTileLookupCache(this.id)}else this.update(this.transform)}else l.timeAdded=r.o.now(),g==="expired"&&(l.refreshedUponExpiration=!0),this._setTileReloadTimer(p,l),this._source.type==="raster-dem"&&l.dem&&this._backfillDEM(l),this._state.initializeTileState(l,this.map?this.map.painter:null),this._source.fire(new r.z("data",{dataType:"source",tile:l,coord:l.tileID,sourceCacheId:this.id}))}_backfillDEM(l){let p=this.getRenderableIds();for(let C=0;C1||(Math.abs(A)>1&&(Math.abs(A+B)===1?A+=B:Math.abs(A-B)===1&&(A-=B)),x.dem&&C.dem&&(C.dem.backfillBorder(x.dem,A,R),C.neighboringTiles&&C.neighboringTiles[H]&&(C.neighboringTiles[H].backfilled=!0)))}}getTile(l){return this.getTileByID(l.key)}getTileByID(l){return this._tiles[l]}_retainLoadedChildren(l,p,g,C){for(let x in this._tiles){let A=this._tiles[x];if(C[x]||!A.hasData()||A.tileID.overscaledZ<=p||A.tileID.overscaledZ>g)continue;let R=A.tileID;for(;A&&A.tileID.overscaledZ>p+1;){let H=A.tileID.scaledTo(A.tileID.overscaledZ-1);A=this._tiles[H.key],A&&A.hasData()&&(R=H)}let B=R;for(;B.overscaledZ>p;)if(B=B.scaledTo(B.overscaledZ-1),l[B.key]){C[R.key]=R;break}}}findLoadedParent(l,p){if(l.key in this._loadedParentTiles){let g=this._loadedParentTiles[l.key];return g&&g.tileID.overscaledZ>=p?g:null}for(let g=l.overscaledZ-1;g>=p;g--){let C=l.scaledTo(g),x=this._getLoadedTile(C);if(x)return x}}_getLoadedTile(l){let p=this._tiles[l.key];return p&&p.hasData()?p:this._cache.getByKey(this._source.reparseOverscaled?l.wrapped().key:l.canonical.key)}updateCacheSize(l,p){p=p||this._source.tileSize;let g=Math.ceil(l.width/p)+1,C=Math.ceil(l.height/p)+1,x=Math.floor(g*C*5),A=typeof this._minTileCacheSize=="number"?Math.max(this._minTileCacheSize,x):x,R=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,A):A;this._cache.setMaxSize(R)}handleWrapJump(l){let p=Math.round((l-(this._prevLng===void 0?l:this._prevLng))/360);if(this._prevLng=l,p){let g={};for(let C in this._tiles){let x=this._tiles[C];x.tileID=x.tileID.unwrapTo(x.tileID.wrap+p),g[x.tileID.key]=x}this._tiles=g;for(let C in this._timers)clearTimeout(this._timers[C]),delete this._timers[C];for(let C in this._tiles)this._setTileReloadTimer(+C,this._tiles[C])}}update(l,p,g,C,x){if(this.transform=l,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage||this.usedForTerrain&&!g)return;this.updateCacheSize(l,p),this.transform.projection.name!=="globe"&&this.handleWrapJump(this.transform.center.lng),this._shadowCasterTiles={},this._coveredTiles={};let A=this._source.type==="batched-model",R,B=this._source.maxzoom,H=this.map&&this.map.painter?this.map.painter._terrain:null;if(H&&H.sourceCache===this&&H.attenuationRange()){let K=H.attenuationRange()[0],oe=Math.floor(K)-Math.log2(H.getDemUpscale());B>oe&&(B=oe)}if(this.used||this.usedForTerrain){if(this._source.tileID)R=l.getVisibleUnwrappedCoordinates(this._source.tileID).map(K=>new r.aO(K.canonical.z,K.wrap,K.canonical.z,K.canonical.x,K.canonical.y));else if(this.tileCoverLift!==0){let K=l.clone();K.tileCoverLift=this.tileCoverLift,R=K.coveringTiles({tileSize:p||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:B,roundZoom:this._source.roundZoom&&!g,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain,calculateQuadrantVisibility:A}),this._source.minzoom<=1&&l.projection.name==="globe"&&(R.push(new r.aO(1,0,1,0,0)),R.push(new r.aO(1,0,1,1,0)),R.push(new r.aO(1,0,1,0,1)),R.push(new r.aO(1,0,1,1,1)))}else if(R=l.coveringTiles({tileSize:p||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:B,roundZoom:this._source.roundZoom&&!g,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain,calculateQuadrantVisibility:A}),this._source.hasTile){let K=this._source.hasTile.bind(this._source);R=R.filter(oe=>K(oe))}}else R=[];if(R.length>0&&this.transform.projection.name!=="globe"&&!this.usedForTerrain&&!Kx(this._source.type)){let K=l.coveringZoomLevel({tileSize:p||this._source.tileSize,roundZoom:this._source.roundZoom&&!g}),oe=Math.min(K,this._source.maxzoom);if(A){let le=l.extendTileCover(R,oe);for(let de of le)R.push(de)}else if(x){let le=l.extendTileCoverToNearPlane(R,this.transform.getFrustum(oe),oe);for(let de of le)R.push(de)}else if(this.castsShadows&&C){let le=l.extendTileCover(R,oe,C);for(let de of le)this._shadowCasterTiles[de.key]=!0,R.push(de)}}let G=this._updateRetainedTiles(R);if(Kx(this._source.type)&&R.length!==0){let K={},oe={},le=Object.keys(G);for(let Ce of le){let he=G[Ce],Te=this._tiles[Ce];if(!Te||Te.fadeEndTime&&Te.fadeEndTime<=r.o.now())continue;let Pe=this.findLoadedParent(he,Math.max(he.overscaledZ-kh.maxOverzooming,this._source.minzoom));Pe&&(this._addTile(Pe.tileID),K[Pe.tileID.key]=Pe.tileID),oe[Ce]=he}let de=R[R.length-1].overscaledZ;for(let Ce in this._tiles){let he=this._tiles[Ce];if(G[Ce]||!he.hasData())continue;let Te=he.tileID;for(;Te.overscaledZ>de;){Te=Te.scaledTo(Te.overscaledZ-1);let Pe=this._tiles[Te.key];if(Pe&&Pe.hasData()&&oe[Te.key]){G[Ce]=he.tileID;break}}}for(let Ce in K)G[Ce]||(this._coveredTiles[Ce]=!0,G[Ce]=K[Ce])}for(let K in G)this._tiles[K].clearFadeHold();let J=r.bv(this._tiles,G);for(let K of J){let oe=this._tiles[K];oe.hasSymbolBuckets&&!oe.holdingForFade()?oe.setHoldDuration(this.map._fadeDuration):oe.hasSymbolBuckets&&!oe.symbolFadeFinished()||this._removeTile(+K)}this._updateLoadedParentTileCache(),this._onlySymbols&&this._source.afterUpdate&&this._source.afterUpdate()}releaseSymbolFadeTiles(){for(let l in this._tiles)this._tiles[l].holdingForFade()&&this._removeTile(+l)}_updateRetainedTiles(l){let p={};if(l.length===0)return p;let g={},C=l.reduce((H,G)=>Math.min(H,G.overscaledZ),1/0),x=l[0].overscaledZ,A=Math.max(x-kh.maxOverzooming,this._source.minzoom),R=Math.max(x+kh.maxUnderzooming,this._source.minzoom),B={};for(let H of l){let G=this._addTile(H);p[H.key]=H,G.hasData()||C=this._source.maxzoom){let K=H.children(this._source.maxzoom)[0],oe=this.getTile(K);if(oe&&oe.hasData()){p[K.key]=K;continue}}else{let K=H.children(this._source.maxzoom);if(p[K[0].key]&&p[K[1].key]&&p[K[2].key]&&p[K[3].key])continue}let J=G.wasRequested();for(let K=H.overscaledZ-1;K>=A;--K){let oe=H.scaledTo(K);if(g[oe.key]||(g[oe.key]=!0,G=this.getTile(oe),!G&&J&&(G=this._addTile(oe)),G&&(p[oe.key]=oe,J=G.wasRequested(),G.hasData())))break}}return p}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let l in this._tiles){let p=[],g,C=this._tiles[l].tileID;for(;C.overscaledZ>0;){if(C.key in this._loadedParentTiles){g=this._loadedParentTiles[C.key];break}p.push(C.key);let x=C.scaledTo(C.overscaledZ-1);if(g=this._getLoadedTile(x),g)break;C=x}for(let x of p)this._loadedParentTiles[x]=g}}_addTile(l){let p=this._tiles[l.key];if(p)return p.isExtraShadowCaster!==!0||this._shadowCasterTiles[l.key]||this._reloadTile(l.key,"reloading"),p;p=this._cache.getAndRemove(l),p&&(this._setTileReloadTimer(l.key,p),p.tileID=l,this._state.initializeTileState(p,this.map?this.map.painter:null),this._cacheTimers[l.key]&&(clearTimeout(this._cacheTimers[l.key]),delete this._cacheTimers[l.key],this._setTileReloadTimer(l.key,p)));let g=!!p;if(!g){let C=this.map?this.map.painter:null,x=this._source.tileSize*l.overscaleFactor();p=this._source.type==="raster-array"?new wb(l,x,this.transform.tileZoom,C,this._isRaster):new C_(l,x,this.transform.tileZoom,C,this._isRaster,this._source.worldview),this._loadTile(p,this._tileLoaded.bind(this,p,l.key,p.state))}return p.uses++,this._tiles[l.key]=p,g||this._source.fire(new r.z("dataloading",{tile:p,coord:p.tileID,dataType:"source"})),p}_setTileReloadTimer(l,p){l in this._timers&&(clearTimeout(this._timers[l]),delete this._timers[l]);let g=p.getExpiryTimeout();g&&(this._timers[l]=setTimeout(()=>{this._reloadTile(l,"expired"),delete this._timers[l]},g))}_removeTile(l){let p=this._tiles[l];p&&(p.uses--,delete this._tiles[l],this._timers[l]&&(clearTimeout(this._timers[l]),delete this._timers[l]),p.uses>0||(p.hasData()&&p.state!=="reloading"||p.state==="empty"?this._cache.add(p.tileID,p,p.getExpiryTimeout()):(p.aborted=!0,this._abortTile(p),this._unloadTile(p))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let l in this._tiles)this._removeTile(+l);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(l,p,g){let C=[],x=this.transform;if(!x)return C;let A=x.projection.name==="globe",R=r.aF(x.center.lng);for(let B in this._tiles){let H=this._tiles[B];if(g&&H.clearQueryDebugViz(),H.holdingForFade())continue;let G;if(A){let J=H.tileID.canonical;if(J.z===0){let K=[Math.abs(r.aA(R,...Ib(J,-1))-R),Math.abs(r.aA(R,...Ib(J,1))-R)];G=[0,2*K.indexOf(Math.min(...K))-1]}else{let K=[Math.abs(r.aA(R,...Ib(J,-1))-R),Math.abs(r.aA(R,...Ib(J,0))-R),Math.abs(r.aA(R,...Ib(J,1))-R)];G=[K.indexOf(Math.min(...K))-1]}}else G=[0];for(let J of G){let K=l.containsTile(H,x,p,J);K&&C.push(K)}}return C}getShadowCasterCoordinates(){return this._getRenderableCoordinates(!1,!0)}getVisibleCoordinates(l){return this._getRenderableCoordinates(l)}_getRenderableCoordinates(l,p){let g=this.getRenderableIds(l,p).map(x=>this._tiles[x].tileID),C=this.transform.projection.name==="globe";for(let x of g)x.projMatrix=this.transform.calculateProjMatrix(x.toUnwrapped()),x.expandedProjMatrix=C?this.transform.calculateProjMatrix(x.toUnwrapped(),!1,!0):x.projMatrix;return g}sortCoordinatesByDistance(l){let p=l.slice(),g=this.transform._camera.position,C=this.transform._camera.forward(),x={};for(let A of p){let R=1/(1<x[A.key]-x[R.key]),p}hasTransition(){if(this._source.hasTransition())return!0;if(Kx(this._source.type))for(let l in this._tiles){let p=this._tiles[l];if(p.fadeEndTime!==void 0&&p.fadeEndTime>=r.o.now())return!0}return!1}setFeatureState(l,p,g){this._state.updateState(l=l||"_geojsonTileLayer",p,g)}removeFeatureState(l,p,g){this._state.removeFeatureState(l=l||"_geojsonTileLayer",p,g)}getFeatureState(l,p){return this._state.getState(l=l||"_geojsonTileLayer",p)}setDependencies(l,p,g){let C=this._tiles[l];C&&C.setDependencies(p,g)}reloadTilesForDependencies(l,p){for(let g in this._tiles)this._tiles[g].hasDependency(l,p)&&this._reloadTile(+g,"reloading");this._cache.filter(g=>!g.hasDependency(l,p))}_preloadTiles(l,p){if(!this._sourceLoaded){let B=()=>{this._sourceLoaded&&(this._source.off("data",B),this._preloadTiles(l,p))};return void this._source.on("data",B)}let g=new Map,C=Array.isArray(l)?l:[l],x=this.map.painter.terrain,A=this.usedForTerrain&&x?x.getScaledDemTileSize():this._source.tileSize;for(let B of C){let H=B.coveringTiles({tileSize:A,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!this.usedForTerrain,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain});for(let G of H)g.set(G.key,G);this.usedForTerrain&&B.updateElevation(!1)}let R=Array.from(g.values());r.bw(R,(B,H)=>{let G=new C_(B,this._source.tileSize*B.overscaleFactor(),this.transform.tileZoom,this.map.painter,this._isRaster,this._source.worldview);this._loadTile(G,J=>{this._source.type==="raster-dem"&&G.dem&&this._backfillDEM(G),H(J,G)})},p)}}function cD(_,l){let p=Math.abs(2*_.wrap)-+(_.wrap<0),g=Math.abs(2*l.wrap)-+(l.wrap<0);return _.overscaledZ-l.overscaledZ||g-p||l.canonical.y-_.canonical.y||l.canonical.x-_.canonical.x}function Kx(_){return _==="raster"||_==="image"||_==="video"||_==="custom"}function Ib(_,l){let p=1<<_.z;return[_.x/p+l,(_.x+1)/p+l]}kh.maxOverzooming=10,kh.maxUnderzooming=3;class ES{constructor(l){this.style=l,this.layersGotHidden=!1,this.layers=[]}processLayersChanged(){this.layers=[];let l=!1,p=!1;for(let g in this.style._mergedLayers){let C=this.style._mergedLayers[g];if(C.type==="fill-extrusion"||C.type==="building")this.layers.push({layer:C,visible:l,visibilityChanged:p});else if(C.type==="model"){let x=this.style.getLayerSource(C);x&&x.type==="batched-model"&&this.layers.push({layer:C,visible:l,visibilityChanged:p})}}}onNewFrame(l){this.layersGotHidden=!1;for(let p of this.layers){let g=p.layer,C=!1;g.type==="fill-extrusion"?C=!g.isHidden(l)&&g.paint.get("fill-extrusion-opacity")>0:g.type==="building"?C=!g.isHidden(l)&&g.paint.get("building-opacity")>0:g.type==="model"&&(C=!g.isHidden(l)&&g.paint.get("model-opacity").constantOr(1)>0),this.layersGotHidden=this.layersGotHidden||!C&&p.visible,p.visible=C}}updateZOffset(l,p){this.currentBuildingBuckets=[];for(let C of this.layers){let x=C.layer,A=this.style.getLayerSourceCache(x),R=1;x.type==="fill-extrusion"?R=C.visible?x.paint.get("fill-extrusion-vertical-scale"):0:x.type==="building"&&(R=C.visible?x.paint.get("building-vertical-scale"):0);let B=A?A.getTile(p):null;if(!B&&A)for(let H in A._tiles){let G=A._tiles[H];if(p.canonical.isChildOf(G.tileID.canonical)){B=G;break}}this.currentBuildingBuckets.push({bucket:B?B.getBucket(x):null,tileID:B?B.tileID:p,verticalScale:R})}l.hasAnyZOffset=!1;let g=!1;for(let C=0;C{g in l&&(p[g]=l[g])}),p}function DS(_){_=_.slice();let l=Object.create(null);for(let p=0;p<_.length;p++)l[_[p].id]=_[p];for(let p=0;p<_.length;p++)"ref"in _[p]&&(_[p]=dD(_[p],l[_[p].ref]));return _}let jr={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setSlot:"setSlot",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight",setTerrain:"setTerrain",setFog:"setFog",setSnow:"setSnow",setRain:"setRain",setCamera:"setCamera",setLights:"setLights",setProjection:"setProjection",addImport:"addImport",removeImport:"removeImport",updateImport:"updateImport",addIconset:"addIconset",removeIconset:"removeIconset"};function Eb(_,l,p){p.push({command:jr.addSource,args:[_,l[_]]})}function xM(_,l,p){l.push({command:jr.removeSource,args:[_]}),p[_]=!0}function wM(_,l,p,g){xM(_,p,g),Eb(_,l,p)}function AS(_,l,p){let g;for(g in _[p])if(_[p].hasOwnProperty(g)&&g!=="data"&&!r.by(_[p][g],l[p][g]))return!1;for(g in l[p])if(l[p].hasOwnProperty(g)&&g!=="data"&&!r.by(_[p][g],l[p][g]))return!1;return!0}function E0(_,l,p,g,C,x){let A;for(A in l=l||{},_=_||{})_.hasOwnProperty(A)&&(r.by(_[A],l[A])||p.push({command:x,args:[g,A,l[A],C]}));for(A in l)l.hasOwnProperty(A)&&!_.hasOwnProperty(A)&&(r.by(_[A],l[A])||p.push({command:x,args:[g,A,l[A],C]}))}function Tl(_){return _.id}function Il(_,l){return _[l.id]=l,_}function kS(_,l,p){let g=l.createTileMatrix(_,_.worldSize,p.toUnwrapped());return r.aB(new Float32Array(16),_.projMatrix,g)}function SM(_,l,p){if(l.projection.name===p.projection.name)return _.projMatrix;let g=p.clone();return g.setProjection(l.projection),kS(g,l.getProjection(),_)}function Py(_,l,p){return l.name===p.projection.name?_.projMatrix:kS(p,l,_)}class TM{constructor(l,p){this.reset(l,p)}reset(l,p){this.points=l||[],this._distances=[0];for(let g=1;g0?(C-A)/R:0;return this.points[x].mult(1-B).add(this.points[p].mult(B))}}class uD{constructor(l,p,g){let C=this.boxCells=[],x=this.circleCells=[];this.xCellCount=Math.ceil(l/g),this.yCellCount=Math.ceil(p/g);for(let A=0;Athis.width||C<0||p>this.height)return!x&&[];let R=[];if(l<=0&&p<=0&&this.width<=g&&this.height<=C){if(x)return!0;for(let B=0;B0:R}_queryCircle(l,p,g,C,x){let A=l-g,R=l+g,B=p-g,H=p+g;if(R<0||A>this.width||H<0||B>this.height)return!C&&[];let G=[];return this._forEachCell(A,B,R,H,this._queryCellCircle,G,{hitTest:C,circle:{x:l,y:p,radius:g},seenUids:{box:{},circle:{}}},x),C?G.length>0:G}query(l,p,g,C,x){return this._query(l,p,g,C,!1,x)}hitTest(l,p,g,C,x){return this._query(l,p,g,C,!0,x)}hitTestCircle(l,p,g,C){return this._queryCircle(l,p,g,!0,C)}_queryCell(l,p,g,C,x,A,R,B){let H=R.seenUids,G=this.boxCells[x];if(G!==null){let K=this.bboxes;for(let oe of G)if(!H.box[oe]){H.box[oe]=!0;let le=4*oe;if(l<=K[le+2]&&p<=K[le+3]&&g>=K[le+0]&&C>=K[le+1]&&(!B||B(this.boxKeys[oe]))){if(R.hitTest)return A.push(!0),!0;A.push({key:this.boxKeys[oe],x1:K[le],y1:K[le+1],x2:K[le+2],y2:K[le+3]})}}}let J=this.circleCells[x];if(J!==null){let K=this.circles;for(let oe of J)if(!H.circle[oe]){H.circle[oe]=!0;let le=3*oe;if(this._circleAndRectCollide(K[le],K[le+1],K[le+2],l,p,g,C)&&(!B||B(this.circleKeys[oe]))){if(R.hitTest)return A.push(!0),!0;{let de=K[le],Ce=K[le+1],he=K[le+2];A.push({key:this.circleKeys[oe],x1:de-he,y1:Ce-he,x2:de+he,y2:Ce+he})}}}}}_queryCellCircle(l,p,g,C,x,A,R,B){let H=R.circle,G=R.seenUids,J=this.boxCells[x];if(J!==null){let oe=this.bboxes;for(let le of J)if(!G.box[le]){G.box[le]=!0;let de=4*le;if(this._circleAndRectCollide(H.x,H.y,H.radius,oe[de+0],oe[de+1],oe[de+2],oe[de+3])&&(!B||B(this.boxKeys[le])))return A.push(!0),!0}}let K=this.circleCells[x];if(K!==null){let oe=this.circles;for(let le of K)if(!G.circle[le]){G.circle[le]=!0;let de=3*le;if(this._circlesCollide(oe[de],oe[de+1],oe[de+2],H.x,H.y,H.radius)&&(!B||B(this.circleKeys[le])))return A.push(!0),!0}}}_forEachCell(l,p,g,C,x,A,R,B){let H=this._convertToXCellCoord(l),G=this._convertToYCellCoord(p),J=this._convertToXCellCoord(g),K=this._convertToYCellCoord(C);for(let oe=H;oe<=J;oe++)for(let le=G;le<=K;le++)if(x.call(this,l,p,g,C,this.xCellCount*le+oe,A,R,B))return}_convertToXCellCoord(l){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(l*this.xScale)))}_convertToYCellCoord(l){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(l*this.yScale)))}_circlesCollide(l,p,g,C,x,A){let R=C-l,B=x-p,H=g+A;return H*H>R*R+B*B}_circleAndRectCollide(l,p,g,C,x,A,R){let B=(A-C)/2,H=Math.abs(l-(C+B));if(H>B+g)return!1;let G=(R-x)/2,J=Math.abs(p-(x+G));if(J>G+g)return!1;if(H<=B||J<=G)return!0;let K=H-B,oe=J-G;return K*K+oe*oe<=g*g}}let Db={unknown:0,flipRequired:1,flipNotRequired:2},Wx=Math.tan(85*Math.PI/180);function _f(_,l,p,g,C,x,A){let R=r.bC();if(p)if(x.name==="globe"){let B=r.bD(C,l);r.aB(R,R,B)}else{let B=r.bE([],A);R[0]=B[0],R[1]=B[1],R[4]=B[2],R[5]=B[3],g||r.bB(R,R,C.angle)}else r.aB(R,C.labelPlaneMatrix,_);return R}function Qc(_,l,p,g,C,x,A){let R=_f(_,l,p,g,C,x,A);return x.name==="globe"&&p||(R[2]=R[6]=R[10]=R[14]=0),R}function Ab(_,l,p,g,C,x,A){if(p){if(x.name==="globe"){let R=_f(_,l,p,g,C,x,A);return r.bl(R,R),r.aB(R,_,R),R}{let R=r.bz(_),B=r.bA([]);return B[0]=A[0],B[1]=A[1],B[4]=A[2],B[5]=A[3],r.aB(R,R,B),g||r.bB(R,R,-C.angle),R}}return C.glCoordMatrix}function Nd(_,l,p,g){let C=[_,l,p,1];p?r.aC(C,C,g):hD(C,C,g);let x=C[3];return C[0]/=x,C[1]/=x,C[2]/=x,C}function D0(_,l){return Math.min(.5+_/l*.5,1.5)}function xp(_,l){let p=_[0]/_[3],g=_[1]/_[3];return p>=-l[0]&&p<=l[0]&&g>=-l[1]&&g<=l[1]}function Jp(_,l,p,g,C,x,A,R,B,H){let G=p.transform,J=g?_.textSizeData:_.iconSizeData,K=r.bK(J,p.transform.zoom),oe=G.projection.name==="globe",le=[256/p.width*2+1,256/p.height*2+1],de=g?_.text.dynamicLayoutVertexArray:_.icon.dynamicLayoutVertexArray;de.clear();let Ce=null;oe&&(Ce=g?_.text.globeExtVertexArray:_.icon.globeExtVertexArray);let he=_.lineVertexArray,Te=g?_.text.placedSymbolArray:_.icon.placedSymbolArray,Pe=p.transform.width/p.transform.height,Ve,et=!1;for(let Qe=0;QeMath.abs(p)?{useVertical:!0}:_===r.bL.vertical?g>0?{needsFlipping:!0}:null:l!==Db.unknown&&(function(C,x){return C===0||Math.abs(x/C)>Wx})(p,g)?l===Db.flipRequired?{needsFlipping:!0}:null:p<0?{needsFlipping:!0}:null}function Ts(_,l,p,g,C,x,A,R,B,H,G,J,K,oe,le,de,Ce,he,Te,Pe){let Ve=l/24,et=_.lineOffsetX*Ve,Qe=_.lineOffsetY*Ve,{lineStartIndex:it,glyphStartIndex:Ze,numGlyphs:Ye,segment:Je,writingMode:Bt,flipState:St}=_,Jt=it+_.lineLength,Ft=Yt=>{if(G){let[ii,Ut,Si]=Yt.up,Hi=H.length;r.bN(G,Hi+0,ii,Ut,Si),r.bN(G,Hi+1,ii,Ut,Si),r.bN(G,Hi+2,ii,Ut,Si),r.bN(G,Hi+3,ii,Ut,Si)}let[ji,Nt,gt]=Yt.point;r.bO(H,ji,Nt,gt,Yt.angle)};if(Ye>1){let Yt=Yx(Ve,R,et,Qe,p,J,K,_,B,x,oe,de,!1,Ce,he,Te,Pe);if(!Yt)return{notEnoughRoom:!0};if(g&&!p){let[ji,Nt,gt]=Yt.first.point,[ii,Ut,Si]=Yt.last.point;[ji,Nt]=Nd(ji,Nt,gt,A),[ii,Ut]=Nd(ii,Ut,Si,A);let Hi=MS(Bt,St,(ii-ji)*le,Ut-Nt);if(_.flipState=Hi&&Hi.needsFlipping?Db.flipRequired:Db.flipNotRequired,Hi)return Hi}Ft(Yt.first);for(let ji=Ze+1;ji0?ii:pD(K,gt,ji,1,C,void 0,Ce,he.canonical),Si=MS(Bt,St,(Ut[0]-ji[0])*le,Ut[1]-ji[1]);if(_.flipState=Si&&Si.needsFlipping?Db.flipRequired:Db.flipNotRequired,Si)return Si}let Yt=Qx(Ve*R.getoffsetX(Ze),et,Qe,p,J,K,Je,it,Jt,B,x,oe,de,!1,!1,Ce,he,Te,Pe);if(!Yt)return{notEnoughRoom:!0};Ft(Yt)}return{}}function OS(_,l,p,g,C){let{x,y:A,z:R}=g.projectTilePoint(_.x,_.y,l);if(!C)return Nd(x,A,R,p);let[B,H,G]=C(_);return Nd(x+B,A+H,R+G,p)}function pD(_,l,p,g,C,x,A,R){let B=OS(_.sub(l)._unit()._add(_),R,C,A,x);return r.av(B,p,B),r.aw(B,B),r.bH(B,p,B,g)}function Qx(_,l,p,g,C,x,A,R,B,H,G,J,K,oe,le,de,Ce,he,Te){let Pe=g?_-l:_+l,Ve=Pe>0?1:-1,et=0;g&&(Ve*=-1,et=Math.PI),Ve<0&&(et+=Math.PI);let Qe=R+A+(Ve>0?0:1)|0,it=C,Ze=C,Ye=0,Je=0,Bt=Math.abs(Pe),St=[],Jt=[],Ft=x,Yt=Ft,ji=r.bF([]),Nt=()=>pD(Yt,Ft,Ze,Bt-Ye+1,G,K,de,Ce.canonical);for(;Ye+Je<=Bt;){if(Qe+=Ve,Qe=B)return null;if(Ze=it,Yt=Ft,St.push(Ze),oe&&Jt.push(Yt),Ft=new r.P(H.getx(Qe),H.gety(Qe)),it=J[Qe],!it){let Ln=OS(Ft,Ce.canonical,G,de,K);it=Ln[3]>0?J[Qe]=Ln:Nt()}Ye+=Je;let Mi=r.av([],it,Ze),$n=r.bG(Ze,it);if(p&&$n>0&&Je>0&&r.bJ(ji,Mi)/(Je*$n)0,Pe),it=H*Qe.perspectiveRatio,Ze=(g.x1*p+R.x-g.padding)*it+Qe.point.x,Ye=(g.y1*p+R.y-g.padding)*it+Qe.point.y,Je=(g.x2*p+R.x+g.padding)*it+Qe.point.x,Bt=(g.y2*p+R.y+g.padding)*it+Qe.point.y,St=Qe.perspectiveRatio<=.55||Qe.occluded;return!this.isInsideGrid(Ze,Ye,Je,Bt)||!B&&this.grid.hitTest(Ze,Ye,Je,Bt,J)||St?{box:[],offscreen:!1,occluded:Qe.occluded}:{box:[Ze,Ye,Je,Bt],offscreen:this.isOffscreen(Ze,Ye,Je,Bt),occluded:!1}}placeCollisionCircles(l,p,g,C,x,A,R,B,H,G,J,K,oe,le,de){let Ce=[],he=this.transform.elevation,Te=l.getProjection(),Pe=he?he.getAtTileOffsetFunc(de,this.transform.center.lat,this.transform.worldSize,Te):null,Ve=new r.P(g.tileAnchorX,g.tileAnchorY),{x:et,y:Qe,z:it}=Te.projectTilePoint(Ve.x,Ve.y,de.canonical);if(Pe){let[Si,Hi,un]=Pe(Ve);et+=Si,Qe+=Hi,it+=un}let Ze=Te.name==="globe",Ye=this.projectAndGetPerspectiveRatio(R,et,Qe,it,de,Ze||!!he||this.transform.pitch>0,Te),{perspectiveRatio:Je}=Ye,Bt=(J?A/Je:A*Je)/r.bX,St=Nd(et,Qe,it,B),Jt=g.lineOffsetX*Bt,Ft=g.lineOffsetY*Bt,Yt=r.an(l.layers[0].layout.get("text-max-angle")),ji=Math.cos(Yt),Nt=Ye.signedDistanceFromCamera>0?Yx(Bt,x,Jt,Ft,!1,St,Ve,g,C,B,{},he&&!J?Pe:null,J&&!!he,Te,de,J,ji):null,gt=!1,ii=!1,Ut=!0;if(Nt&&!Ye.occluded){let Si=.5*oe*Je+le,Hi=new r.P(-100,-100),un=new r.P(this.screenRightBoundary,this.screenBottomBoundary),Fi=new TM,{first:Mi,last:$n}=Nt,Ln=Mi.path.length,Gn=[];for(let Jo=Ln-1;Jo>=1;Jo--)Gn.push(Mi.path[Jo]);for(let Jo=1;Jo<$n.path.length;Jo++)Gn.push($n.path[Jo]);let Rn=2.5*Si;H&&(Gn=Gn.map(([Jo,or,ks],Bo)=>(Pe&&!Ze&&(ks=Pe(BoJo[3]<=0)&&(Gn=[]));let Ro=[];if(Gn.length>0){let Jo=1/0,or=-1/0,ks=1/0,Bo=-1/0;for(let ts of Gn)Jo=Math.min(Jo,ts[0]),ks=Math.min(ks,ts[1]),or=Math.max(or,ts[0]),Bo=Math.max(Bo,ts[1]);or>=Hi.x&&Jo<=un.x&&Bo>=Hi.y&&ks<=un.y&&(Ro=[Gn.map(ts=>new r.P(ts[0],ts[1]))],(Joun.x||ksun.y)&&(Ro=r.bV(Ro,Hi.x,Hi.y,un.x,un.y)))}for(let Jo of Ro){Fi.reset(Jo,.25*Si);let or=0;or=Fi.length<=.5*Si?1:Math.ceil(Fi.paddedLength/Rn)+1;for(let ks=0;ks0?(r.aC(B,B,l),this.fogState&&x&&R.name!=="globe"&&(H=(function(K,oe,le,de,Ce,he){let Te=he.calculateFogTileMatrix(Ce),Pe=[oe,le,de];return r.af(Pe,Pe,Te),So(K,r.ag(Pe),he.pitch,he._fov)})(this.fogState,p,g,C,x.toUnwrapped(),this.transform)>.9)):hD(B,B,l);let G=B[3];return{point:new r.P((B[0]/G+1)/2*this.transform.width+Ic,(-B[1]/G+1)/2*this.transform.height+Ic),perspectiveRatio:Math.min(.5+this.transform.getCameraToCenterDistance(R)/G*.5,1.5),signedDistanceFromCamera:G,occluded:A&&B[2]>G||H}}isOffscreen(l,p,g,C){return g=this.screenRightBoundary||Cthis.screenBottomBoundary}isInsideGrid(l,p,g,C){return g>=0&&l=0&&pg.collisionGroupID===p}}return this.collisionGroups[l]}}function x_(_,l,p,g,C){let{horizontalAlign:x,verticalAlign:A}=r.c0(_),R=-(x-.5)*l,B=-(A-.5)*p,H=r.c1(_,g);return new r.P(R+H[0]*C,B+H[1]*C)}function gs(_,l,p,g,C){let x=new r.P(_,l);return p&&x._rotate(g?C:-C),x}class kb{constructor(l,p,g,C,x,A){this.transform=l.clone(),this.projection=l.projection.name,this.collisionIndex=new yf(this.transform,x),this.buildingIndex=A,this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=p,this.retainedQueryData={},this.collisionGroups=new ud(g),this.collisionCircleArrays={},this.prevPlacement=C,C&&(C.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(l,p,g,C,x=1){let A=g.getBucket(p),R=g.latestFeatureIndex;if(!A||!R||p.fqid!==A.layerIds[0])return;let B=A.layers[0].layout,H=A.layers[0].paint,G=g.collisionBoxArray,J=Math.pow(2,this.transform.zoom-g.tileID.overscaledZ),K=g.tileSize/r.al,oe=g.tileID.toUnwrapped();this.transform.setProjection(A.projection);let le=(de=g.tileID,Ce=A.getProjection(),he=this.transform,Ce.name===this.projection?he.calculateProjMatrix(de.toUnwrapped()):kS(he,Ce,de));var de,Ce,he;let Te=B.get("text-pitch-alignment")==="map",Pe=B.get("text-rotation-alignment")==="map";p.compileFilter(p.options);let Ve=p.dynamicFilter(),et=p.dynamicFilterNeedsFeature(),Qe=this.transform.calculatePixelsToTileUnitsMatrix(g),it=Qc(le,g.tileID.canonical,Te,Pe,this.transform,A.getProjection(),Qe),Ze=null,Ye=A.getProjection().createInversionMatrix(this.transform,g.tileID.canonical);if(Te){let gt=Ab(le,g.tileID.canonical,Te,Pe,this.transform,A.getProjection(),Qe);Ze=r.aB([],this.transform.labelPlaneMatrix,gt)}let Je=null;Ve&&g.latestFeatureIndex&&(Je={unwrappedTileID:oe,dynamicFilter:Ve,dynamicFilterNeedsFeature:et}),this.retainedQueryData[A.bucketInstanceId]=new sr(A.bucketInstanceId,R,A.sourceLayerIndex,A.index,g.tileID);let[Bt,St]=A.layers[0].layout.get("text-size-scale-range"),Jt=r.aA(x,Bt,St),[Ft,Yt]=B.get("icon-size-scale-range"),ji=r.aA(x,Ft,Yt),Nt={bucket:A,layout:B,paint:H,posMatrix:le,invMatrix:Ye,mercatorCenter:[r.aF(this.transform.center.lng),r.aJ(this.transform.center.lat)],textLabelPlaneMatrix:it,labelToScreenMatrix:Ze,clippingData:Je,scale:J,textPixelRatio:K,holdingForFade:g.holdingForFade(),collisionBoxArray:G,partiallyEvaluatedTextSize:r.bK(A.textSizeData,this.transform.zoom,Jt),partiallyEvaluatedIconSize:r.bK(A.iconSizeData,this.transform.zoom,ji),collisionGroup:this.collisionGroups.get(A.sourceID),latestFeatureIndex:g.latestFeatureIndex};if(C)for(let gt of A.sortKeyRanges){let{sortKey:ii,symbolInstanceStart:Ut,symbolInstanceEnd:Si}=gt;l.push({sortKey:ii,symbolInstanceStart:Ut,symbolInstanceEnd:Si,parameters:Nt})}else l.push({symbolInstanceStart:0,symbolInstanceEnd:A.symbolInstances.length,parameters:Nt})}attemptAnchorPlacement(l,p,g,C,x,A,R,B,H,G,J,K,oe,le,de,Ce,he,Te,Pe,Ve,et){let{textOffset0:Qe,textOffset1:it,crossTileID:Ze}=de,Ye=[Qe,it],Je=x_(l,A,R,Ye,B),Bt=this.collisionIndex.placeCollisionBox(he,B,p,g,C,x,gs(Je.x,Je.y,H,G,this.transform.angle),le,J,K,oe.predicate);if(Pe){let St=he.getSymbolInstanceIconSize(et,this.transform.zoom,de.placedIconSymbolIndex);if(this.collisionIndex.placeCollisionBox(he,St,Pe,g,C,x,gs(Je.x,Je.y,H,G,this.transform.angle),le,J,K,oe.predicate).box.length===0)return}if(Bt.box.length>0){let St;return this.prevPlacement&&this.prevPlacement.variableOffsets[Ze]&&this.prevPlacement.placements[Ze]&&this.prevPlacement.placements[Ze].text&&(St=this.prevPlacement.variableOffsets[Ze].anchor),this.variableOffsets[Ze]={textOffset:Ye,width:A,height:R,anchor:l,textScale:B,prevAnchor:St},this.markUsedJustification(he,l,de,Te),he.allowVerticalPlacement&&(this.markUsedOrientation(he,Te,de),this.placedOrientations[Ze]=Te),{shift:Je,placedGlyphBoxes:Bt}}}placeLayerBucketPart(l,p,g,C,x=1){let{bucket:A,layout:R,paint:B,posMatrix:H,textLabelPlaneMatrix:G,labelToScreenMatrix:J,clippingData:K,textPixelRatio:oe,mercatorCenter:le,invMatrix:de,holdingForFade:Ce,collisionBoxArray:he,partiallyEvaluatedTextSize:Te,partiallyEvaluatedIconSize:Pe,collisionGroup:Ve,latestFeatureIndex:et}=l.parameters,Qe=R.get("text-optional"),it=R.get("icon-optional"),Ze=R.get("text-allow-overlap"),Ye=R.get("icon-allow-overlap"),Je=R.get("text-rotation-alignment")==="map",Bt=R.get("icon-rotation-alignment")==="map",St=R.get("text-pitch-alignment")==="map",Jt=B.get("symbol-z-offset"),Ft=R.get("symbol-elevation-reference")==="sea",Yt=R.get("symbol-placement"),[ji,Nt]=R.get("text-size-scale-range"),[gt,ii]=R.get("icon-size-scale-range"),Ut=r.aA(x,ji,Nt),Si=r.aA(x,gt,ii),Hi=R.get("text-variable-anchor"),un=Je&&Yt!=="point",Fi=Bt&&Yt!=="point",Mi=Hi&&A.hasTextData(),$n=A.hasIconTextFit()&&Mi&&A.hasIconData();this.transform.setProjection(A.projection);let Ln=Mi||un,Gn=Fi||$n,Rn=Ze&&(Ye||!A.hasIconData()||it),Ro=Ye&&(Ze||!A.hasTextData()||Qe),Jo=!Jt.isConstant();!A.collisionArrays&&he&&A.deserializeCollisionBoxes(he),g&&C&&A.updateCollisionDebugBuffers(this.transform.zoom,he,Ut,Si);let or=(Bo,ts,Is)=>{let{crossTileID:ka,numVerticalGlyphVertices:er}=Bo,ds=null;if(K&&K.dynamicFilterNeedsFeature||Jo){let Dl=this.retainedQueryData[A.bucketInstanceId];ds=et.loadFeature({featureIndex:Bo.featureIndex,bucketIndex:Dl.bucketIndex,sourceLayerIndex:Dl.sourceLayerIndex,layoutVertexArrayOffset:0})}if(K&&!(0,K.dynamicFilter)({zoom:this.transform.zoom,pitch:this.transform.pitch},ds,this.retainedQueryData[A.bucketInstanceId].tileID.canonical,new r.P(Bo.tileAnchorX,Bo.tileAnchorY),this.transform.calculateDistanceTileData(K.unwrappedTileID)))return this.placements[ka]=new jn(!1,!1,!1,!0),void p.add(ka);let Zr=Jt.evaluate(ds,{});if(p.has(ka))return;if(Ce)return void(this.placements[ka]=new jn(!1,!1,!1));let us=!1,Na=!1,Nl=!0,Zc=!1,Ba=!1,rr=null,wo={box:null,offscreen:null,occluded:null},Ms={box:null},_l=null,Va=null,lc=null,Vc=0,zh=0,Uh=0;Is.textFeatureIndex?Vc=Is.textFeatureIndex:Bo.useRuntimeCollisionCircles&&(Vc=Bo.featureIndex),Is.verticalTextFeatureIndex&&(zh=Is.verticalTextFeatureIndex);let oh=Dl=>{Dl.tileID=this.retainedQueryData[A.bucketInstanceId].tileID;let Bl=this.transform.elevation;Dl.elevation=Ft?Zr:Zr+(Bl?Bl.getAtTileOffset(Dl.tileID,Dl.tileAnchorX,Dl.tileAnchorY):0),Dl.elevation+=Bo.zOffset},rh=Is.textBox;if(rh){oh(rh);let Dl=Qa=>{let Dc=r.bL.horizontal;if(A.allowVerticalPlacement&&!Qa&&this.prevPlacement){let Xc=this.prevPlacement.placedOrientations[ka];Xc&&(this.placedOrientations[ka]=Xc,Dc=Xc,this.markUsedOrientation(A,Dc,Bo))}return Dc},Bl=(Qa,Dc)=>{if(A.allowVerticalPlacement&&er>0&&Is.verticalTextBox){for(let Xc of A.writingModes)if(Xc===r.bL.vertical?(wo=Dc(),Ms=wo):wo=Qa(),wo&&wo.box&&wo.box.length)break}else wo=Qa()};if(Hi){let Qa=Hi;if(this.prevPlacement&&this.prevPlacement.variableOffsets[ka]){let ec=this.prevPlacement.variableOffsets[ka];Qa.indexOf(ec.anchor)>0&&(Qa=Qa.filter(au=>au!==ec.anchor),Qa.unshift(ec.anchor))}let Dc=(ec,au,Rg)=>{let B_=A.getSymbolInstanceTextSize(Te,Bo,this.transform.zoom,ts),Em=(ec.x2-ec.x1)*B_+2*ec.padding,V_=(ec.y2-ec.y1)*B_+2*ec.padding,G0=Bo.hasIconTextFit&&!Ye?au:null;G0&&oh(G0);let Fg={box:[],offscreen:!1,occluded:!1},sC=Ze?2*Qa.length:Qa.length;for(let z_=0;z_=Qa.length,Bo,ts,A,Rg,G0,Te,Pe);if(Hh&&(Fg=Hh.placedGlyphBoxes,Fg&&Fg.box&&Fg.box.length)){us=!0,rr=Hh.shift;break}}return Fg};Bl(()=>Dc(rh,Is.iconBox,r.bL.horizontal),()=>{let ec=Is.verticalTextBox;return ec&&oh(ec),A.allowVerticalPlacement&&!(wo&&wo.box&&wo.box.length)&&er>0&&ec?Dc(ec,Is.verticalIconBox,r.bL.vertical):{box:null,offscreen:null,occluded:null}}),wo&&(us=wo.box,Nl=wo.offscreen,Zc=wo.occluded);let Xc=Dl(!(!wo||!wo.box));if(!us&&this.prevPlacement){let ec=this.prevPlacement.variableOffsets[ka];ec&&(this.variableOffsets[ka]=ec,this.markUsedJustification(A,ec.anchor,Bo,Xc))}}else{let Qa=(Dc,Xc)=>{let ec=A.getSymbolInstanceTextSize(Te,Bo,this.transform.zoom,ts),au=this.collisionIndex.placeCollisionBox(A,ec,Dc,le,de,Ln,new r.P(0,0),Ze,oe,H,Ve.predicate);return au&&au.box&&au.box.length&&(this.markUsedOrientation(A,Xc,Bo),this.placedOrientations[ka]=Xc),au};Bl(()=>Qa(rh,r.bL.horizontal),()=>{let Dc=Is.verticalTextBox;return A.allowVerticalPlacement&&er>0&&Dc?(oh(Dc),Qa(Dc,r.bL.vertical)):{box:null,offscreen:null,occluded:null}}),Dl(!!(wo&&wo.box&&wo.box.length))}}if(_l=wo,us=_l&&_l.box&&_l.box.length>0,Nl=_l&&_l.offscreen,Zc=_l&&_l.occluded,Bo.useRuntimeCollisionCircles){let Dl=A.text.placedSymbolArray.get(Bo.centerJustifiedTextSymbolIndex>=0?Bo.centerJustifiedTextSymbolIndex:Bo.verticalPlacedTextSymbolIndex),Bl=r.bM(A.textSizeData,Te,Dl),Qa=R.get("text-padding");Va=this.collisionIndex.placeCollisionCircles(A,Ze,Dl,A.lineVertexArray,A.glyphOffsetArray,Bl,H,G,J,g,St,Ve.predicate,Bo.collisionCircleDiameter*Bl/r.bX,Qa,this.retainedQueryData[A.bucketInstanceId].tileID),us=Ze||Va.circles.length>0&&!Va.collisionDetected,Nl=Nl&&Va.offscreen,Zc=Va.occluded}if(Is.iconFeatureIndex&&(Uh=Is.iconFeatureIndex),Is.iconBox){let Dl=Bl=>{oh(Bl);let Qa=Bo.hasIconTextFit&&rr?gs(rr.x,rr.y,Je,St,this.transform.angle):new r.P(0,0),Dc=A.getSymbolInstanceIconSize(Pe,this.transform.zoom,Bo.placedIconSymbolIndex);return this.collisionIndex.placeCollisionBox(A,Dc,Bl,le,de,Gn,Qa,Ye,oe,H,Ve.predicate)};Ms&&Ms.box&&Ms.box.length&&Is.verticalIconBox?(lc=Dl(Is.verticalIconBox),Na=lc.box.length>0):(lc=Dl(Is.iconBox),Na=lc.box.length>0),Nl=Nl&&lc.offscreen,Ba=lc.occluded}let Xu=Qe||Bo.numHorizontalGlyphVertices===0&&er===0,Im=it||Bo.numIconVertices===0;if(Xu||Im?Im?Xu||(Na=Na&&us):us=Na&&us:Na=us=Na&&us,us&&_l&&_l.box&&this.collisionIndex.insertCollisionBox(_l.box,R.get("text-ignore-placement"),A.bucketInstanceId,Ms&&Ms.box&&zh?zh:Vc,Ve.ID),Na&&lc&&this.collisionIndex.insertCollisionBox(lc.box,R.get("icon-ignore-placement"),A.bucketInstanceId,Uh,Ve.ID),Va&&(us&&this.collisionIndex.insertCollisionCircles(Va.circles,R.get("text-ignore-placement"),A.bucketInstanceId,Vc,Ve.ID),g)){let Dl=A.bucketInstanceId,Bl=this.collisionCircleArrays[Dl];Bl===void 0&&(Bl=this.collisionCircleArrays[Dl]=new fs);for(let Qa=0;Qa=0;--ts){let Is=Bo[ts];or(A.symbolInstances.get(Is),Is,A.collisionArrays[Is])}A.hasAnyZOffset&&r.w(`${A.layerIds[0]} layer symbol-z-elevate: symbols are not sorted by elevation if symbol-z-order is evaluated to viewport-y`)}else if(A.hasAnyZOffset){let Bo=A.getSortedIndexesByZOffset();for(let ts=0;ts=0&&(l.text.placedSymbolArray.get(x).crossTileID=J>=0&&x!==J?0:H),A>=0&&(l.text.placedSymbolArray.get(A).crossTileID=J>=0&&A!==J?0:H),R>=0&&(l.text.placedSymbolArray.get(R).crossTileID=J>=0&&R!==J?0:H),B>=0&&(l.text.placedSymbolArray.get(B).crossTileID=J>=0&&B!==J?0:H)}markUsedOrientation(l,p,g){let C=p===r.bL.horizontal||p===r.bL.horizontalOnly?p:0,x=p===r.bL.vertical?p:0,{leftJustifiedTextSymbolIndex:A,centerJustifiedTextSymbolIndex:R,rightJustifiedTextSymbolIndex:B,verticalPlacedTextSymbolIndex:H}=g,G=l.text.placedSymbolArray;A>=0&&(G.get(A).placedOrientation=C),R>=0&&(G.get(R).placedOrientation=C),B>=0&&(G.get(B).placedOrientation=C),H>=0&&(G.get(H).placedOrientation=x)}commit(l){this.commitTime=l,this.zoomAtLastRecencyCheck=this.transform.zoom;let p=this.prevPlacement,g=!1;this.prevZoomAdjustment=p?p.zoomAdjustment(this.transform.zoom):0;let C=p?p.symbolFadeChange(l):1,x=p?p.opacities:{},A=p?p.variableOffsets:{},R=p?p.placedOrientations:{};for(let B in this.placements){let H=this.placements[B],G=x[B];G?(this.opacities[B]=new Cu(G,C,H.text,H.icon,null,H.clipped),g=g||H.text!==G.text.placed||H.icon!==G.icon.placed):(this.opacities[B]=new Cu(null,C,H.text,H.icon,H.skipFade,H.clipped),g=g||H.text||H.icon)}for(let B in x){let H=x[B];if(!this.opacities[B]){let G=new Cu(H,C,!1,!1);G.isHidden()||(this.opacities[B]=G,g=g||H.text.placed||H.icon.placed)}}for(let B in A)this.variableOffsets[B]||!this.opacities[B]||this.opacities[B].isHidden()||(this.variableOffsets[B]=A[B]);for(let B in R)this.placedOrientations[B]||!this.opacities[B]||this.opacities[B].isHidden()||(this.placedOrientations[B]=R[B]);g?this.lastPlacementChangeTime=l:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=p?p.lastPlacementChangeTime:l)}updateLayerOpacities(l,p,g,C){let x=new Set;for(let A of p){let R=A.getBucket(l);R&&A.latestFeatureIndex&&l.fqid===R.layerIds[0]&&(this.updateBucketOpacities(R,x,A,A.collisionBoxArray,g,C,A.tileID,l.scope),R.elevationType==="offset"&&this.buildingIndex&&this.buildingIndex.updateZOffset(R,A.tileID),R.elevationType==="road"&&R.updateRoadElevation(A.tileID.canonical),R.updateZOffset())}}updateBucketOpacities(l,p,g,C,x,A,R,B){l.hasTextData()&&l.text.opacityVertexArray.clear(),l.hasIconData()&&l.icon.opacityVertexArray.clear(),l.hasIconCollisionBoxData()&&l.iconCollisionBox.collisionVertexArray.clear(),l.hasTextCollisionBoxData()&&l.textCollisionBox.collisionVertexArray.clear();let H=l.layers[0].layout,G=l.layers[0].paint,J=!!l.layers[0].dynamicFilter(),K=new Cu(null,0,!1,!1,!0),oe=H.get("text-allow-overlap"),le=H.get("icon-allow-overlap"),de=H.get("text-variable-anchor"),Ce=H.get("text-rotation-alignment")==="map",he=H.get("text-pitch-alignment")==="map",Te=G.get("symbol-z-offset"),Pe=H.get("symbol-elevation-reference")==="sea",Ve=!Te.isConstant(),et=new Cu(null,0,oe&&(le||!l.hasIconData()||H.get("icon-optional")),le&&(oe||!l.hasTextData()||H.get("text-optional")),!0);!l.collisionArrays&&C&&(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData())&&l.deserializeCollisionBoxes(C);let Qe=(Ze,Ye,Je)=>{for(let Bt=0;Bt0||Bt>0,Hi=Jt>0,un=this.placedOrientations[St],Fi=un===r.bL.vertical,Mi=un===r.bL.horizontal||un===r.bL.horizontalOnly;!Si&&!Hi||Ut.isHidden()||it++;let $n=!1;if((Si||Hi)&&A)for(let Ln of l.activeReplacements){if(r.bY(Ln,x,r.bZ.Symbol,B)||Ln.min.x>Ft||Ft>Ln.max.x||Ln.min.y>Yt||Yt>Ln.max.y)continue;let Gn=r.b_(Ft,Yt,R.canonical,Ln.footprintTileId.canonical);if($n=r.b$(Gn,Ln.footprint),$n)break}if(Si){let Ln=$n?vg:Ob(Ut.text);Qe(l.text,Je,Fi?vg:Ln),Qe(l.text,Bt,Mi?vg:Ln);let Gn=Ut.text.isHidden(),{leftJustifiedTextSymbolIndex:Rn,centerJustifiedTextSymbolIndex:Ro,rightJustifiedTextSymbolIndex:Jo,verticalPlacedTextSymbolIndex:or}=Ye,ks=l.text.placedSymbolArray,Bo=Gn||Fi?1:0;Rn>=0&&(ks.get(Rn).hidden=Bo),Ro>=0&&(ks.get(Ro).hidden=Bo),Jo>=0&&(ks.get(Jo).hidden=Bo),or>=0&&(ks.get(or).hidden=Gn||Mi?1:0);let ts=this.variableOffsets[St];ts&&this.markUsedJustification(l,ts.anchor,Ye,un);let Is=this.placedOrientations[St];Is&&(this.markUsedJustification(l,"left",Ye,Is),this.markUsedOrientation(l,Is,Ye))}if(Hi){let Ln=$n?vg:Ob(Ut.icon),{placedIconSymbolIndex:Gn,verticalPlacedIconSymbolIndex:Rn}=Ye,Ro=l.icon.placedSymbolArray,Jo=Ut.icon.isHidden()?1:0;Gn>=0&&(Qe(l.icon,Jt,Fi?vg:Ln),Ro.get(Gn).hidden=Jo),Rn>=0&&(Qe(l.icon,Ye.numVerticalIconVertices,Mi?vg:Ln),Ro.get(Rn).hidden=Jo)}if(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData()){let Ln=l.collisionArrays[Ze];if(Ln){let Gn=new r.P(0,0),Rn=!0;if(Ln.textBox||Ln.verticalTextBox){if(de){let Jo=this.variableOffsets[St];Jo?(Gn=x_(Jo.anchor,Jo.width,Jo.height,Jo.textOffset,Jo.textScale),Ce&&Gn._rotate(he?this.transform.angle:-this.transform.angle)):Rn=!1}J&&(Rn=!Ut.clipped),Ln.textBox&&A0(l.textCollisionBox.collisionVertexArray,Ut.text.placed,!Rn||Fi,gt,Pe,Gn.x,Gn.y),Ln.verticalTextBox&&A0(l.textCollisionBox.collisionVertexArray,Ut.text.placed,!Rn||Mi,gt,Pe,Gn.x,Gn.y)}let Ro=Rn&&!!(!Mi&&Ln.verticalIconBox);Ln.iconBox&&A0(l.iconCollisionBox.collisionVertexArray,Ut.icon.placed,Ro,gt,Pe,Ye.hasIconTextFit?Gn.x:0,Ye.hasIconTextFit?Gn.y:0),Ln.verticalIconBox&&A0(l.iconCollisionBox.collisionVertexArray,Ut.icon.placed,!Ro,gt,Pe,Ye.hasIconTextFit?Gn.x:0,Ye.hasIconTextFit?Gn.y:0)}}}if(l.fullyClipped=it===0,l.sortFeatures(this.transform.angle),this.retainedQueryData[l.bucketInstanceId]&&(this.retainedQueryData[l.bucketInstanceId].featureSortOrder=l.featureSortOrder),l.hasTextData()&&l.text.opacityVertexBuffer&&l.text.opacityVertexBuffer.updateData(l.text.opacityVertexArray),l.hasIconData()&&l.icon.opacityVertexBuffer&&l.icon.opacityVertexBuffer.updateData(l.icon.opacityVertexArray),l.hasIconCollisionBoxData()&&l.iconCollisionBox.collisionVertexBuffer&&l.iconCollisionBox.collisionVertexBuffer.updateData(l.iconCollisionBox.collisionVertexArray),l.hasTextCollisionBoxData()&&l.textCollisionBox.collisionVertexBuffer&&l.textCollisionBox.collisionVertexBuffer.updateData(l.textCollisionBox.collisionVertexArray),l.bucketInstanceId in this.collisionCircleArrays){let Ze=this.collisionCircleArrays[l.bucketInstanceId];l.placementInvProjMatrix=Ze.invProjMatrix,l.placementViewportMatrix=Ze.viewportMatrix,l.collisionCircleArray=Ze.circles,delete this.collisionCircleArrays[l.bucketInstanceId]}}symbolFadeChange(l){return this.fadeDuration===0?1:(l-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(l){return Math.max(0,(this.transform.zoom-l)/1.5)}hasTransitions(l){return this.stale||l-this.lastPlacementChangeTimel}setStale(){this.stale=!0}}function A0(_,l,p,g,C,x,A){_.emplaceBack(l?1:0,p?1:0,x||0,A||0,g,C?1:0),_.emplaceBack(l?1:0,p?1:0,x||0,A||0,g,C?1:0),_.emplaceBack(l?1:0,p?1:0,x||0,A||0,g,C?1:0),_.emplaceBack(l?1:0,p?1:0,x||0,A||0,g,C?1:0)}let Xx=Math.pow(2,25),xu=Math.pow(2,24),fc=Math.pow(2,17),RS=Math.pow(2,16),yg=Math.pow(2,9),mD=Math.pow(2,8),Mb=Math.pow(2,1);function Ob(_){if(_.opacity===0&&!_.placed)return 0;if(_.opacity===1&&_.placed)return 4294967295;let l=_.placed?1:0,p=Math.floor(127*_.opacity);return p*Xx+l*xu+p*fc+l*RS+p*yg+l*mD+p*Mb+l}let vg=0;class Rb{constructor(l){this._sortAcrossTiles=l.layout.get("symbol-z-order")!=="viewport-y"&&l.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs=new Set,this._bucketParts=[]}continuePlacement(l,p,g,C,x,A){let R=this._bucketParts;for(;this._currentTileIndexB.sortKey-H.sortKey));this._currentPartIndex{let B=r.o.now()-A;return!this._forceFullPlacement&&B>2};for(;this._currentPlacementIndex>=0;){let B=p[l[this._currentPlacementIndex]],H=this.placement.collisionIndex.transform.zoom;if(B.type==="symbol"&&(!B.minzoom||B.minzoom<=H)&&(!B.maxzoom||B.maxzoom>H)){let G=B,J=G.layout.get("symbol-z-elevate"),K=G.layout.get("symbol-sort-key").constantOr(1)!==void 0,oe=G.layout.get("symbol-z-order"),le=oe==="viewport-y"||oe==="auto"&&!(oe!=="viewport-y"&&K),de=G.layout.get("text-allow-overlap")||G.layout.get("icon-allow-overlap")||G.layout.get("text-ignore-placement")||G.layout.get("icon-ignore-placement"),Ce=le&&de,he=this._inProgressLayer=this._inProgressLayer||new Rb(G),Te=r.B(B.source,B.scope);if(he.continuePlacement(J||Ce?C[Te]:g[Te],this.placement,this._showCollisionBoxes,B,R,x))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(l){return this.placement.commit(l),this.placement}}let vf=512/r.al/2;class Su{constructor(l,p,g){this.tileID=l,this.bucketInstanceId=g,this.index=new r.c3(p.length,16,Int32Array),this.keys=[],this.crossTileIDs=[];let C=l.canonical.x*r.al,x=l.canonical.y*r.al;for(let A=0;ACe-he);for(let Ce of de){let he=this.crossTileIDs[Ce];if(this.keys[Ce]===G&&!g.has(he)){g.add(he),H.crossTileID=he;break}}}}}class FS{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Fb{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(l){let p=Math.round((l-this.lng)/360);if(p!==0)for(let g in this.indexes){let C=this.indexes[g],x={};for(let A in C){let R=C[A];R.tileID=R.tileID.unwrapTo(R.tileID.wrap+p),x[R.tileID.key]=R}this.indexes[g]=x}this.lng=l}addBucket(l,p,g){if(this.indexes[l.overscaledZ]&&this.indexes[l.overscaledZ][l.key]){if(this.indexes[l.overscaledZ][l.key].bucketInstanceId===p.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(l.overscaledZ,this.indexes[l.overscaledZ][l.key])}for(let x=0;xl.overscaledZ)for(let R in A){let B=A[R];B.tileID.isChildOf(l)&&B.findMatches(p.symbolInstances,l,C)}else{let R=A[l.scaledTo(Number(x)).key];R&&R.findMatches(p.symbolInstances,l,C)}}for(let x=0;x{p[g]=!0});for(let g in this.layerIndexes)p[g]||delete this.layerIndexes[g]}}let Jl=771;class Qo{constructor(l,p,g,C){this.blendFunction=l,this.blendColor=p.toNonPremultipliedRenderColor(null),this.mask=g,this.blendEquation=C}}Qo.Replace=[1,0,1,0],Qo.disabled=new Qo(Qo.Replace,r.ao.transparent,[!1,!1,!1,!1]),Qo.unblended=new Qo(Qo.Replace,r.ao.transparent,[!0,!0,!0,!0]),Qo.alphaBlended=new Qo([1,Jl,1,Jl],r.ao.transparent,[!0,!0,!0,!0]),Qo.alphaBlendedNonPremultiplied=new Qo([770,Jl,770,Jl],r.ao.transparent,[!0,!0,!0,!0]),Qo.multiply=new Qo([774,0,774,0],r.ao.transparent,[!0,!0,!0,!0]);class gn{constructor(l,p,g){this.func=l,this.mask=p,this.range=g}}gn.ReadOnly=!1,gn.ReadWrite=!0,gn.disabled=new gn(519,gn.ReadOnly,[0,1]);let Pb=7680;class xo{constructor(l,p,g,C,x,A){this.test=l,this.ref=p,this.mask=g,this.fail=C,this.depthFail=x,this.pass=A}}xo.disabled=new xo({func:519,mask:0},0,0,Pb,Pb,Pb);let Ly=1029,Lb=2305;class Do{constructor(l,p,g){this.enable=l,this.mode=p,this.frontFace=g}}function fD(_,l){let p=r.c9(_,3);r.cb(_,l),r.cf(_,3,p)}function Jx(_,l){let p=r.c6([]);return r.c7(p,p,-l),r.c8(p,p,-_),p}function bg(_,l){let p=[_[0],_[1],0],g=[l[0],l[1],0];if(r.ag(p)>=1e-15){let A=r.aw([],p);r.c4(g,A,r.bJ(g,A)),l[0]=g[0],l[1]=g[1]}let C=r.bI([],l,_);if(r.c5(C)<1e-15)return null;let x=Math.atan2(-C[1],C[0]);return Jx(Math.atan2(Math.sqrt(_[0]*_[0]+_[1]*_[1]),-_[2]),x)}Do.disabled=new Do(!1,Ly,Lb),Do.backCCW=new Do(!0,Ly,Lb),Do.backCW=new Do(!0,Ly,2304),Do.frontCW=new Do(!0,1028,2304),Do.frontCCW=new Do(!0,1028,Lb);class gD{constructor(l,p){this.position=l,this.orientation=p}get position(){return this._position}set position(l){if(l){let p=l instanceof r.ae?l:new r.ae(l[0],l[1],l[2]);this._renderWorldCopies&&(p.x=r.bT(p.x,0,1)),this._position=p}else this._position=null}lookAtPoint(l,p){if(this.orientation=null,!this.position)return;let g=this.position,C=this._elevation?this._elevation.getAtPointOrZero(r.ae.fromLngLat(l)):0,x=r.ae.fromLngLat(l,C),A=[x.x-g.x,x.y-g.y,x.z-g.z];p||(p=[0,0,1]),p[2]=Math.abs(p[2]),this.orientation=bg(A,p)}setPitchBearing(l,p){this.orientation=Jx(r.an(l),r.an(-p))}}class PS{constructor(l,p){this._transform=r.bA([]),this.orientation=p,this.position=l}get mercatorPosition(){let l=this.position;return new r.ae(l[0],l[1],l[2])}get position(){let l=r.c9(this._transform,3);return[l[0],l[1],l[2]]}set position(l){var p;l&&r.cf(this._transform,3,[(p=l)[0],p[1],p[2],1])}get orientation(){return this._orientation}set orientation(l){this._orientation=l||r.c6([]),l&&fD(this._transform,this._orientation)}getPitchBearing(){let l=this.forward(),p=this.right();return{bearing:Math.atan2(-p[1],p[0]),pitch:Math.atan2(Math.sqrt(l[0]*l[0]+l[1]*l[1]),-l[2])}}setPitchBearing(l,p){this._orientation=Jx(l,p),fD(this._transform,this._orientation)}forward(){let l=r.c9(this._transform,2);return[-l[0],-l[1],-l[2]]}up(){let l=r.c9(this._transform,1);return[-l[0],-l[1],-l[2]]}right(){let l=r.c9(this._transform,0);return[l[0],l[1],l[2]]}getCameraToWorld(l,p){let g=new Float64Array(16);return r.bl(g,this.getWorldToCamera(l,p)),g}getCameraToWorldMercator(){return this._transform}getWorldToCameraPosition(l,p,g){let C=this.position;r.c4(C,C,-l);let x=new Float64Array(16);return r.bq(x,[g,g,g]),r.br(x,x,C),x[10]*=p,x}getWorldToCamera(l,p){let g=new Float64Array(16),C=new Float64Array(4),x=this.position;return r.ca(C,this._orientation),r.c4(x,x,-l),r.cb(g,C),r.br(g,g,x),g[1]*=-1,g[5]*=-1,g[9]*=-1,g[13]*=-1,g[8]*=p,g[9]*=p,g[10]*=p,g[11]*=p,g}getCameraToClipPerspective(l,p,g,C){let x=new Float64Array(16);return r.cc(x,l,p,g,C),x}getCameraToClipOrthographic(l,p,g,C,x,A){let R=new Float64Array(16);return r.cd(R,l,p,g,C,x,A),R}getDistanceToElevation(l,p=!1){let g=l===0?0:r.ce(l,p?r.a$(this.position[1]):this.position[1]),C=this.forward();return(g-this.position[2])/C[2]}clone(){return new PS([...this.position],[...this.orientation])}}let ql={BaseColor:5,MetallicRoughness:6,Normal:7,Occlusion:8,Emission:9,LUT:10,ShadowMap0:11};class LS{constructor(l=0,p=0,g=0,C=0){if(isNaN(l)||l<0||isNaN(p)||p<0||isNaN(g)||g<0||isNaN(C)||C<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=p,this.left=g,this.right=C}interpolate(l,p,g){return p.top!=null&&l.top!=null&&(this.top=r.ak(l.top,p.top,g)),p.bottom!=null&&l.bottom!=null&&(this.bottom=r.ak(l.bottom,p.bottom,g)),p.left!=null&&l.left!=null&&(this.left=r.ak(l.left,p.left,g)),p.right!=null&&l.right!=null&&(this.right=r.ak(l.right,p.right,g)),this}getCenter(l,p){let g=r.aA((this.left+l-this.right)/2,0,l),C=r.aA((this.top+p-this.bottom)/2,0,p);return new r.P(g,C)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new LS(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Qu=15;class Bd{constructor(l,p,g,C,x,A,R){this.tileSize=512,this._renderWorldCopies=x===void 0||x,this._minZoom=l||0,this._maxZoom=p||22,this._minPitch=g??0,this._maxPitch=C??60,this.setProjection(A),this.setMaxBounds(R),this.width=0,this.height=0,this._center=new r.aR(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 LS,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._expandedProjMatrixCache={},this._distanceTileDataCache={},this._camera=new PS,this._centerAltitude=0,this._averageElevation=0,this.cameraElevationReference="ground",this._pixelsPerMercatorPixel=1,this.globeRadius=0,this.globeCenterInViewSpace=[0,0,0],this._tileCoverLift=0,this.freezeTileCoverage=!1,this._horizonShift=.1,this._orthographicProjectionAtLowPitch=!1,this._allowWorldUnderZoom=!1}clone(){let l=new Bd(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies,this.getProjection(),this.maxBounds);return l._elevation=this._elevation,l._centerAltitude=this._centerAltitude,l._centerAltitudeValidForExaggeration=this._centerAltitudeValidForExaggeration,l.tileSize=this.tileSize,l.mercatorFromTransition=this.mercatorFromTransition,l.width=this.width,l.height=this.height,l.cameraElevationReference=this.cameraElevationReference,l._center=this._center,l._setZoom(this.zoom),l._seaLevelZoom=this._seaLevelZoom,l.angle=this.angle,l._fov=this._fov,l._pitch=this._pitch,l._nearZ=this._nearZ,l._farZ=this._farZ,l._averageElevation=this._averageElevation,l._orthographicProjectionAtLowPitch=this._orthographicProjectionAtLowPitch,l._unmodified=this._unmodified,l._edgeInsets=this._edgeInsets.clone(),l._camera=this._camera.clone(),l._calcMatrices(),l.freezeTileCoverage=this.freezeTileCoverage,l.frustumCorners=this.frustumCorners,l._allowWorldUnderZoom=this._allowWorldUnderZoom,l}get isOrthographic(){return this.projection.name!=="globe"&&this._orthographicProjectionAtLowPitch&&this.pitch0&&this.elevation.exaggeration()>0&&this._centerAltitudeValidForExaggeration;if(!this._elevation||l===Number.NEGATIVE_INFINITY&&(!p||!this._centerAltitude))return this._centerAltitude=0,this._seaLevelZoom=null,void(this._centerAltitudeValidForExaggeration=void 0);let g=this._elevation;p||this._centerAltitude&&this._centerAltitudeValidForExaggeration&&g.exaggeration()&&this._centerAltitudeValidForExaggeration!==g.exaggeration()?(this._centerAltitude=this._centerAltitude/this._centerAltitudeValidForExaggeration*g.exaggeration(),this._centerAltitudeValidForExaggeration=g.exaggeration()):(this._centerAltitude=l||0,this._centerAltitudeValidForExaggeration=g.exaggeration()),this._updateSeaLevelZoom()}_updateSeaLevelZoom(){if(this._centerAltitudeValidForExaggeration===void 0)return;let l=Math.max(0,(this.pixelsPerMeter*this._centerAltitude+this.cameraToCenterDistance)/this.worldSize);this._seaLevelZoom=this._zoomFromMercatorZ(l)}sampleAverageElevation(){if(!this._elevation)return 0;let l=this._elevation,p=[[.5,.2],[.3,.5],[.5,.5],[.7,.5],[.5,.8]],g=this.horizonLineFromTop(),C=0,x=0;for(let A=0;A{let de=r.cX(J,G,K,oe,le);R.has(de)||(C.push(new r.aO(G,J,K,oe,le)),R.add(de))};for(let G=0;G0,Te=K.y+10,Ve=J.wrap-(he?0:1),et=J.wrap+(Ce?0:1),Qe=he?K.x-1:de-1,it=Ce?K.x+1:0;if(x)g[0]<0?(B(oe,et,K.z,it,K.y),g[1]<0&&Te&&(B(oe,le,K.z,K.x,K.y+1),B(oe,et,K.z,it,K.y+1)),g[1]>0&&Pe&&(B(oe,le,K.z,K.x,K.y-1),B(oe,et,K.z,it,K.y-1))):g[0]>0?(B(oe,Ve,K.z,Qe,K.y),g[1]<0&&Te&&(B(oe,le,K.z,K.x,K.y+1),B(oe,Ve,K.z,Qe,K.y+1)),g[1]>0&&Pe&&(B(oe,le,K.z,K.x,K.y-1),B(oe,Ve,K.z,Qe,K.y-1))):g[1]<0&&Te?B(oe,le,K.z,K.x,K.y+1):Pe&&B(oe,le,K.z,K.x,K.y-1);else{let Ze=J.visibleQuadrants;1&Ze&&(B(oe,Ve,K.z,Qe,K.y),Pe&&(B(oe,le,K.z,K.x,K.y-1),B(oe,Ve,K.z,Qe,K.y-1))),2&Ze&&(B(oe,et,K.z,it,K.y),Pe&&(B(oe,le,K.z,K.x,K.y-1),B(oe,et,K.z,it,K.y-1))),4&Ze&&(B(oe,Ve,K.z,Qe,K.y),Te&&(B(oe,le,K.z,K.x,K.y+1),B(oe,Ve,K.z,Qe,K.y+1))),8&Ze&&(B(oe,et,K.z,it,K.y),Te&&(B(oe,le,K.z,K.x,K.y+1),B(oe,et,K.z,it,K.y+1)))}}let H=[];for(let G of C)C.some(J=>G.isChildOf(J))||H.push(G);if(C=H.filter(G=>!l.some(J=>!!(G.overscaledZ{let Ce=de.canonical.x+.5-K[0],he=de.canonical.y+.5-K[1];return Ce*Ce+he*he{let it=r.cX(Pe,Te,Ve,et,Qe);x.has(it)||(C.push(new r.aO(Te,Pe,Ve,et,Qe)),x.add(it))},R=l.reduce((Te,Pe)=>Math.max(Te,Pe.overscaledZ),g),B=1<{let Ve=Math.floor(Te[0]),et=Math.floor(Te[1]),Qe=(Te[0]-Ve)*r.al,it=(Te[1]-et)*r.al,Ze=Math.floor(Pe[0]),Ye=Math.floor(Pe[1]),Je=(Pe[0]-Ze)*r.al,Bt=(Pe[1]-Ye)*r.al;for(let St=-1;St<=1;St++){let Jt=Ve+St;if(!(Jt<0||Jt>=B)){G.x=Qe-St*r.al,J.x=Je-(Jt-Ze)*r.al;for(let Ft=-1;Ft<=1;Ft++){let Yt=et+Ft;G.y=it-Ft*r.al,J.y=Bt-(Yt-Ye)*r.al,r.cY(G,J,H)&&A(R,0,g,Jt,Yt)}}}},oe=p.points,le=oe[r.cu],de=oe[r.cv],Ce=this._projectToGround(le,oe[r.cw]),he=this._projectToGround(de,oe[r.cx]);return K(le,Ce),K(de,he),C}_projectToGround(l,p){return r.cy(r.cz(),l,p,l[2]/(l[2]-p[2]))}coveringTiles(l){let p=this.coveringZoomLevel(l),g=p,C=this.elevation&&this.elevation.exaggeration(),x=C&&!l.isTerrainDEM,A=this.projection.name==="mercator";if(l.minzoom!==void 0&&pl.maxzoom&&(p=l.maxzoom);let R=this.locationCoordinate(this.center),B=this.center.lat,H=1<{let Ut=new r.ae(gt.x+25e-6,gt.y,gt.z),Si=new r.ae(gt.x,gt.y+25e-6,gt.z),Hi=gt.toLngLat(),un=Ut.toLngLat(),Fi=Si.toLngLat(),Mi=this.locationCoordinate(Hi),$n=this.locationCoordinate(un),Ln=this.locationCoordinate(Fi),Gn=Math.hypot($n.x-Mi.x,$n.y-Mi.y),Rn=Math.hypot(Ln.x-Mi.x,Ln.y-Mi.y);return Math.sqrt(Gn*Rn)*it/25e-6},Ye=gt=>{let ii=et,Ut=Qe;return{aabb:r.cE(this,H,0,0,0,gt,Ut,ii,this.projection),zoom:0,x:0,y:0,minZ:Ut,maxZ:ii,wrap:gt,fullyVisible:!1}},Je=[],Bt=[],St=p,Jt=l.reparseOverscaled?g:p,Ft=(Ce-this._centerAltitude)*de,Yt=gt=>{if(!this._elevation||!gt.tileID||!A)return;let ii=this._elevation.getMinMaxForTile(gt.tileID),Ut=gt.aabb;ii?(Ut.min[2]=ii.min,Ut.max[2]=ii.max,Ut.center[2]=(Ut.min[2]+Ut.max[2])/2):(gt.shouldSplit=Nt(gt),gt.shouldSplit||(Ut.min[2]=Ut.max[2]=Ut.center[2]=this._centerAltitude))},ji=(gt,ii)=>{if(.707*ii{if(gt.zoom=.9)return!0}else if(x&&(Si=gt.aabb.distanceZ(he)*de),this.projection.isReprojectedInTileSpace&&g<=5){let Rn=Math.pow(2,gt.zoom),Ro=Ze(new r.ae((gt.x+.5)/Rn,(gt.y+.5)/Rn));Hi=Ro>.85?1:Ro}if(!A){let Rn=Math.sqrt(ii*ii+Ut*Ut+Si*Si),Ro=(1<0;){let gt=Je.pop(),ii=gt.x,Ut=gt.y,Si=gt.fullyVisible,Hi=()=>this.projection.name==="globe"&&(gt.y===0||gt.y===(1<>1),$n={aabb:A?gt.aabb.quadrant(un):r.cE(this,H,gt.zoom+1,Fi,Mi,gt.wrap,gt.minZ,gt.maxZ,this.projection),zoom:gt.zoom+1,x:Fi,y:Mi,wrap:gt.wrap,fullyVisible:Si,tileID:void 0,shouldSplit:void 0,minZ:gt.minZ,maxZ:gt.maxZ};x&&!J&&($n.tileID=new r.aO(gt.zoom+1===St?Jt:gt.zoom+1,gt.wrap,gt.zoom+1,Fi,Mi),Yt($n)),Je.push($n)}else{let un=gt.zoom===St?Jt:gt.zoom;if(l.minzoom&&l.minzoom>un)continue;let Fi=0;if(!Si){let Gn=Te?gt.aabb.intersectsPrecise(oe):gt.aabb.intersectsPreciseFlat(oe);if(Gn===0&&Hi()){let Rn=new r.cC(gt.zoom,ii,Ut);Gn=r.cD(this,H,Rn,!0).intersectsPrecise(oe)}if(Gn===0)continue;if(l.calculateQuadrantVisibility)if(oe.containsPoint(gt.aabb.center))Fi=15;else for(let Rn=0;Rn<4;Rn++)gt.aabb.quadrant(Rn).intersects(oe)!==0&&(Fi|=1<{let Si=[0,0,0,1],Hi=[r.al,r.al,0,1],un=this.calculateFogTileMatrix(Ut.tileID.toUnwrapped());r.aC(Si,Si,un),r.aC(Hi,Hi,un);let Fi=r.cF([],Si,Hi),Mi=r.cG([],Si,Hi),$n=r.c_(Fi,Mi);if($n===0)return!0;let Ln=!1,Gn=this._elevation;if(Gn&&$n>gt&&ii!==0){let Rn=this.calculateProjMatrix(Ut.tileID.toUnwrapped()),Ro;l.isTerrainDEM||(Ro=Gn.getMinMaxForTile(Ut.tileID)),Ro||(Ro={min:Qe,max:et});let Jo=r.cH(this.rotation),or=[Jo[0]*r.al,Jo[1]*r.al,Ro.max];r.af(or,or,Rn),Ln=(1-or[1])*this.height*.5gt.distanceSq-ii.distanceSq).map(gt=>gt.tileID)}resize(l,p){this.width=l,this.height=p,this.pixelsToGLUnits=[2/l,-2/p],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(l){return Math.pow(2,l)}scaleZoom(l){return Math.log2(l)}project(l){let p=r.aA(l.lat,-r.cI,r.cI),g=this.projection.project(l.lng,p);return new r.P(g.x*this.worldSize,g.y*this.worldSize)}unproject(l){return this.projection.unproject(l.x/this.worldSize,l.y/this.worldSize)}get point(){return this.project(this.center)}get pointMerc(){return this.point._div(this.worldSize)}get pixelsPerMeterRatio(){return this.pixelsPerMeter/r.ce(1,this.center.lat)/this.worldSize}setLocationAtPoint(l,p){let g,C,x=this.centerPoint;if(this.projection.name==="globe"){let R=this.worldSize;g=(p.x-x.x)/R,C=(p.y-x.y)/R}else{let R=this.pointCoordinate(p),B=this.pointCoordinate(x);g=R.x-B.x,C=R.y-B.y}let A=this.locationCoordinate(l);this.setLocation(new r.ae(A.x-g,A.y-C))}setLocation(l){this.center=this.coordinateLocation(l),this.projection.wrap&&(this.center=this.center.wrap())}locationPoint(l,p){return this.projection.locationPoint(this,l,p)}locationPoint3D(l,p){return this.projection.locationPoint(this,l,p,!0)}pointLocation(l){return this.coordinateLocation(this.pointCoordinate(l))}pointLocation3D(l,p){return this.coordinateLocation(this.pointCoordinate3D(l,p))}locationCoordinate(l,p){let g=p?r.ce(p,l.lat):void 0,C=this.projection.project(l.lng,l.lat);return new r.ae(C.x,C.y,g)}coordinateLocation(l){return this.projection.unproject(l.x,l.y)}pointRayIntersection(l,p){let g=p??this._centerAltitude,C=[l.x,l.y,0,1],x=[l.x,l.y,1,1];r.aC(C,C,this.pixelMatrixInverse),r.aC(x,x,this.pixelMatrixInverse);let A=x[3];r.cJ(C,C,1/C[3]),r.cJ(x,x,1/A);let R=C[2],B=x[2];return{p0:C,p1:x,t:R===B?0:(g-R)/(B-R)}}screenPointToMercatorRay(l){let p=[l.x,l.y,0,1],g=[l.x,l.y,1,1];return r.aC(p,p,this.pixelMatrixInverse),r.aC(g,g,this.pixelMatrixInverse),r.cJ(p,p,1/p[3]),r.cJ(g,g,1/g[3]),p[2]=r.ce(p[2],this._center.lat)*this.worldSize,g[2]=r.ce(g[2],this._center.lat)*this.worldSize,r.cJ(p,p,1/this.worldSize),r.cJ(g,g,1/this.worldSize),new r.ax([p[0],p[1],p[2]],r.aw([],r.av([],g,p)))}rayIntersectionCoordinate(l){let{p0:p,p1:g,t:C}=l,x=r.ce(p[2],this._center.lat),A=r.ce(g[2],this._center.lat);return new r.ae(r.ak(p[0],g[0],C)/this.worldSize,r.ak(p[1],g[1],C)/this.worldSize,r.ak(x,A,C))}pointCoordinate(l,p=this._centerAltitude){return this.projection.pointCoordinate(this,l.x,l.y,p)}pointCoordinate3D(l,p){if(!this.elevation)return this.pointCoordinate(l,p);let g=this.projection.pointCoordinate3D(this,l.x,l.y);if(g)return new r.ae(g[0],g[1],g[2]);let C=0,x=this.horizonLineFromTop();if(l.y>x)return this.pointCoordinate(l,p);let A=.02*x,R=l.clone();for(let B=0;B<10&&x-C>A;B++){R.y=r.ak(C,x,.66);let H=this.projection.pointCoordinate3D(this,R.x,R.y);H?(x=R.y,g=H):C=R.y}return g?new r.ae(g[0],g[1],g[2]):this.pointCoordinate(l)}isPointAboveHorizon(l){return this.projection.isPointAboveHorizon(this,l)}isPointOnSurface(l){if(l.y<0||l.y>this.height||l.x<0||l.x>this.width)return!1;if(this.elevation||this.zoom>=r.cK)return!this.isPointAboveHorizon(l);let p=this.pointCoordinate(l);return p.y>=0&&p.y<=1}_coordinatePoint(l,p){let g=p&&this.elevation?this.elevation.getAtPointOrZero(l,this._centerAltitude):this._centerAltitude,C=[l.x*this.worldSize,l.y*this.worldSize,g+l.toAltitude(),1];return r.aC(C,C,this.pixelMatrix),C[3]>0?new r.P(C[0]/C[3],C[1]/C[3]):new r.P(Number.MAX_VALUE,Number.MAX_VALUE)}_getBoundsNonRectangular(){let{top:l,left:p}=this._edgeInsets,g=this.height-this._edgeInsets.bottom,C=this.width-this._edgeInsets.right,x=this.pointLocation3D(new r.P(p,l)),A=this.pointLocation3D(new r.P(C,l)),R=this.pointLocation3D(new r.P(C,g)),B=this.pointLocation3D(new r.P(p,g)),H=Math.min(x.lng,A.lng,R.lng,B.lng),G=Math.max(x.lng,A.lng,R.lng,B.lng),J=Math.min(x.lat,A.lat,R.lat,B.lat),K=Math.max(x.lat,A.lat,R.lat,B.lat),oe=Math.pow(2,-this.zoom)/16*270,le=this.projection.name==="globe"?1:4,de=(Ce,he,Te,Pe,Ve)=>{let et=(Ce+Te)/2,Qe=(he+Pe)/2,it=new r.P(et,Qe),{lng:Ze,lat:Ye}=this.pointLocation3D(it),Je=Math.max(0,H-Ze,J-Ye,Ze-G,Ye-K);H=Math.min(H,Ze),G=Math.max(G,Ze),J=Math.min(J,Ye),K=Math.max(K,Ye),(Veoe)&&(de(Ce,he,et,Qe,Ve+1),de(et,Qe,Te,Pe,Ve+1))};if(de(p,l,C,l,1),de(C,l,C,g,1),de(C,g,p,g,1),de(p,g,p,l,1),this.projection.name==="globe"){let[Ce,he]=r.cL(this);Ce?(K=90,G=180,H=-180):he&&(J=-90,G=180,H=-180)}return new r.aI(new r.aR(H,J),new r.aR(G,K))}_getBoundsRectangular(l,p){let{top:g,left:C}=this._edgeInsets,x=this.height-this._edgeInsets.bottom,A=this.width-this._edgeInsets.right,R=new r.P(C,g),B=new r.P(A,g),H=new r.P(A,x),G=new r.P(C,x),J=this.pointCoordinate(R,l),K=this.pointCoordinate(B,l),oe=this.pointCoordinate(H,p),le=this.pointCoordinate(G,p),de=(Ce,he)=>(he.y-Ce.y)/(he.x-Ce.x);return J.y>1&&K.y>=0?J=new r.ae((1-le.y)/de(le,J)+le.x,1):J.y<0&&K.y<=1&&(J=new r.ae(-le.y/de(le,J)+le.x,0)),K.y>1&&J.y>=0?K=new r.ae((1-oe.y)/de(oe,K)+oe.x,1):K.y<0&&J.y<=1&&(K=new r.ae(-oe.y/de(oe,K)+oe.x,0)),new r.aI().extend(this.coordinateLocation(J)).extend(this.coordinateLocation(K)).extend(this.coordinateLocation(le)).extend(this.coordinateLocation(oe))}_getBoundsRectangularTerrain(){let l=this.elevation;if(!l.visibleDemTiles.length||l.isUsingMockSource())return this._getBoundsRectangular(0,0);let p=l.visibleDemTiles.reduce((g,C)=>{if(C.dem){let x=C.dem.tree;g.min=Math.min(g.min,x.minimums[0]),g.max=Math.max(g.max,x.maximums[0])}return g},{min:Number.MAX_VALUE,max:0});return this._getBoundsRectangular(p.min*l.exaggeration(),p.max*l.exaggeration())}getBounds(){return this.projection.name==="mercator"||this.projection.name==="equirectangular"?this._terrainEnabled()?this._getBoundsRectangularTerrain():this._getBoundsRectangular(0,0):this._getBoundsNonRectangular()}horizonLineFromTop(l=!0){let p=this.height/2/Math.tan(this._fov/2)/Math.tan(Math.max(this._pitch,.1))-this.centerOffset.y,g=this.height/2-p*(1-this._horizonShift);return l?Math.max(0,g):g}getMaxBounds(){return this.maxBounds}setMaxBounds(l){this.maxBounds=l,this.minLat=-r.cI,this.maxLat=r.cI,this.minLng=-180,this.maxLng=180,l&&(this.minLat=l.getSouth(),this.maxLat=l.getNorth(),this.minLng=l.getWest(),this.maxLng=l.getEast(),this.maxLngJ&&(R=J-H),J-Goe&&(A=oe-B),oe-K{for(let Nt=0;Nt<16;Nt++)Jt[Nt]=r.ak(Ft[Nt],Yt[Nt],ji)})(R,R,B,r.c$(this.pitch>=Qu?1:this.pitch/Qu))}else R=B;let H=r.cO([],B,A),G=r.cO([],R,A);if(this.projection.isReprojectedInTileSpace){let Ye=this.locationCoordinate(this.center),Je=r.bA([]);r.br(Je,Je,[Ye.x*this.worldSize,Ye.y*this.worldSize,0]),r.aB(Je,Je,r.cP(this)),r.br(Je,Je,[-Ye.x*this.worldSize,-Ye.y*this.worldSize,0]),r.aB(G,G,Je),r.aB(H,H,Je),this.inverseAdjustmentMatrix=r.cQ(this)}else this.inverseAdjustmentMatrix=[1,0,0,1];if(this.mercatorMatrix=r.cR([],G,[this.worldSize,this.worldSize,this.worldSize/x,1]),this.projMatrix=G,this.invProjMatrix=r.bl(new Float64Array(16),this.projMatrix),p){let Ye=this._camera.getCameraToClipPerspective(this._fov,this.width/this.height,this._nearZ,1/0);Ye[8]=2*-l.x/this.width,Ye[9]=2*l.y/this.height,this.expandedFarZProjMatrix=r.cO([],Ye,A)}else this.expandedFarZProjMatrix=this.projMatrix;let J=r.bl([],R);this.frustumCorners=r.cS.fromInvProjectionMatrix(J,this.horizonLineFromTop(),this.height),this.cameraFrustum=r.cA.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,0,!p);let K=new Float32Array(16);r.bA(K),r.cR(K,K,[1,-1,1]),r.cT(K,K,this._pitch),r.bB(K,K,this.angle);let oe=r.cc(new Float32Array(16),this._fov,this.width/this.height,this._nearZ,this._farZ);this.starsProjMatrix=r.bz(oe);let le=(Math.PI/2-this._pitch)*(this.height/this._fov)*this._horizonShift;oe[8]=2*-l.x/this.width,oe[9]=2*(l.y+le)/this.height,this.skyboxMatrix=r.aB(K,oe,K);let de=this.point,Ce=de.x,he=de.y,Te=this.width%2/2,Pe=this.height%2/2,Ve=Math.cos(this.angle),et=Math.sin(this.angle),Qe=Ce-Math.round(Ce)+Ve*Te+et*Pe,it=he-Math.round(he)+Ve*Pe+et*Te,Ze=new Float64Array(G);if(r.br(Ze,Ze,[Qe>.5?Qe-1:Qe,it>.5?it-1:it,0]),this.alignedProjMatrix=Ze,G=r.bC(),r.cR(G,G,[this.width/2,-this.height/2,1]),r.br(G,G,[1,-1,0]),this.labelPlaneMatrix=G,G=r.bC(),r.cR(G,G,[1,-1,1]),r.br(G,G,[-1,-1,0]),r.cR(G,G,[2/this.width,2/this.height,1]),this.glCoordMatrix=G,this.pixelMatrix=r.aB(new Float64Array(16),this.labelPlaneMatrix,H),this._calcFogMatrices(),this._distanceTileDataCache={},G=r.bl(new Float64Array(16),this.pixelMatrix),!G)throw new Error("failed to invert matrix");if(this.pixelMatrixInverse=G,this.projection.name==="globe"||this.mercatorFromTransition){this.globeMatrix=r.cU(this);let Ye=[this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]];this.globeCenterInViewSpace=r.af(Ye,Ye,A),this.globeRadius=this.worldSize/2/Math.PI-1}else this.globeMatrix=G;this._projMatrixCache={},this._alignedProjMatrixCache={},this._pixelsToTileUnitsCache={},this._expandedProjMatrixCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};let l=this.cameraWorldSizeForFog,p=this.cameraPixelsPerMeter,g=this._camera.position,C=1/this.height/this._pixelsPerMercatorPixel,x=[l,l,p];r.c4(x,x,C),r.c4(g,g,-1),r.cV(g,g,x);let A=r.bC();r.br(A,A,g),r.cR(A,A,x),this.mercatorFogMatrix=A,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(l,p,C)}_computeCameraPosition(l){let p=(l=l||this.pixelsPerMeter)/this.pixelsPerMeter,g=this._camera.forward(),C=this.point,x=this._mercatorZfromZoom(this._seaLevelZoom?this._seaLevelZoom:this._zoom)*p-l/this.worldSize*this._centerAltitude;return[C.x/this.worldSize-g[0]*x,C.y/this.worldSize-g[1]*x,l/this.worldSize*this._centerAltitude-g[2]*x]}_updateCameraState(){this.height&&(this._camera.setPitchBearing(this._pitch,this.angle),this._camera.position=this._computeCameraPosition())}_translateCameraConstrained(l){let p=this._maxCameraBoundsDistance()*Math.cos(this._pitch),g=this._camera.position[2],C=l[2],x=1;this.projection.wrap&&(this.center=this.center.wrap()),C>0&&(x=Math.min((p-g)/C,1)),this._camera.position=r.bH([],this._camera.position,l,x),this._updateStateFromCamera()}_updateStateFromCamera(){let l=this._camera.position,p=this._camera.forward(),{pitch:g,bearing:C}=this._camera.getPitchBearing(),x=r.ce(this._centerAltitude,this.center.lat)*this._pixelsPerMercatorPixel,A=this._mercatorZfromZoom(this._maxZoom)*Math.cos(r.an(this._maxPitch)),R=Math.max((l[2]-x)/Math.cos(g),A),B=this._zoomFromMercatorZ(R);r.bH(l,l,p,R),this._pitch=r.aA(g,r.an(this.minPitch),r.an(this.maxPitch)),this.angle=r.bT(C,-Math.PI,Math.PI),this._setZoom(r.aA(B,this._minZoom,this._maxZoom)),this._updateSeaLevelZoom(),this._center=this.coordinateLocation(new r.ae(l[0],l[1],l[2])),this._unmodified=!1,this._constrain(),this._calcMatrices()}_worldSizeFromZoom(l){return Math.pow(2,l)*this.tileSize}_mercatorZfromZoom(l){return this.cameraToCenterDistance/this._worldSizeFromZoom(l)}_minimumHeightOverTerrain(){let l=Math.min(this._seaLevelZoom!=null?this._seaLevelZoom:this._zoom,this._maxZoom)+4;return this._mercatorZfromZoom(l)}_zoomFromMercatorZ(l){return this.scaleZoom(this.cameraToCenterDistance/(Math.max(0,l)*this.tileSize))}zoomFromMercatorZAdjusted(l){let p=0,g=r.cK,C=0,x=1/0;for(;g-p>1e-6&&g>p;){let A=p+.5*(g-p),R=this.tileSize*Math.pow(2,A),B=this.getCameraToCenterDistance(this.projection,A,R),H=this.scaleZoom(B/(Math.max(0,l)*this.tileSize)),G=Math.abs(A-H);GH||K.y>1)return!0}return!1}isHorizonVisible(){return this.pitch+r.cW(this.fovAboveCenter)>88||this.anyCornerOffEdge(new r.P(0,0),new r.P(this.width,this.height))}zoomDeltaToMovement(l,p){let g=r.ag(r.av([],this._camera.position,l)),C=this._zoomFromMercatorZ(g)+p;return g-this._mercatorZfromZoom(C)}getCameraPoint(){if(this.projection.name==="globe"){let l=(function([p,g,C],x){let A=[p,g,C,1];r.aC(A,A,x);let R=A[3]=Math.max(A[3],1e-6);return A[0]/=R,A[1]/=R,A[2]/=R,A})([this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]],this.pixelMatrix);return new r.P(l[0],l[1])}{let l=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.P(0,l))}}getCameraToCenterDistance(l,p=this.zoom,g=this.worldSize){let C=r.cN(l,p,this.width,this.height,1024),x=l.pixelSpaceConversion(this.center.lat,g,C),A=.5/Math.tan(.5*this._fov)*this.height*x;return this.isOrthographic&&(A=r.ak(1,A,r.c$(this.pitch>=Qu?1:this.pitch/Qu))),A}getWorldToCameraMatrix(){let l=this._camera.getWorldToCamera(this.worldSize,this.projection.zAxisUnit==="meters"?this.pixelsPerMeter:1);return this.projection.name==="globe"&&r.aB(l,l,this.globeMatrix),l}getFrustum(l){return r.cA.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,l,this.projection.zAxisUnit==="meters")}}let k0=(_,l)=>{if(l>0&&_.terrain&&r.w("Cutoff is currently disabled on terrain"),l<=0||_.terrain)return{shouldRenderCutoff:!1,uniformValues:{u_cutoff_params:[0,0,0,1]}};let p=_.transform,g=Math.max(Math.abs(p._zoom-(_.minCutoffZoom-1)),1),C=p.isLODDisabled(!1)?r.ah(60,45,p.pitch):r.ah(30,15,p.pitch),x=p._farZ-p._nearZ,A=l*p.height,R=((1-(B=C))*p.cameraToCenterDistance+B*(p._farZ+A))*g;var B;return{shouldRenderCutoff:C<1,uniformValues:{u_cutoff_params:[p._nearZ,p._farZ,(R-p._nearZ)/x,(R-A-p._nearZ)/x]}}},Vd={cascadeCount:2,normalOffset:3,shadowMapResolution:2048};class IM{constructor(l,p){this.aabb=l,this.lastCascade=p}}class Cg{add(l,p){let g=this.receivers[l.key];g!==void 0?(g.aabb.min[0]=Math.min(g.aabb.min[0],p.min[0]),g.aabb.min[1]=Math.min(g.aabb.min[1],p.min[1]),g.aabb.min[2]=Math.min(g.aabb.min[2],p.min[2]),g.aabb.max[0]=Math.max(g.aabb.max[0],p.max[0]),g.aabb.max[1]=Math.max(g.aabb.max[1],p.max[1]),g.aabb.max[2]=Math.max(g.aabb.max[2],p.max[2])):this.receivers[l.key]=new IM(p,null)}clear(){this.receivers={}}get(l){return this.receivers[l.key]}computeRequiredCascades(l,p,g){let C=r.d8.fromPoints(l.points),x=0;for(let A in this.receivers){let R=this.receivers[A];if(!R||!C.intersectsAabb(R.aabb))continue;R.aabb.min=C.closestPoint(R.aabb.min),R.aabb.max=C.closestPoint(R.aabb.max);let B=R.aabb.getCorners();for(let H=0;H1||K[1]<-1||K[1]>1){G=!1;break}}if(R.lastCascade=H,x=Math.max(x,H),G)break}}return x+1}}class bf{constructor(l){this.painter=l,this._enabled=!1,this._shadowLayerCount=0,this._numCascadesToRender=0,this._cascades=[],this._groundShadowTiles=[],this._receivers=new Cg,this._depthMode=new gn(l.context.gl.LEQUAL,gn.ReadWrite,[0,1]),this._uniformValues={u_light_matrix_0:new Float32Array(16),u_light_matrix_1:new Float32Array(16),u_shadow_intensity:0,u_fade_range:[0,0],u_shadow_normal_offset:[1,1,1],u_shadow_texel_size:1,u_shadow_map_resolution:1,u_shadow_direction:[0,0,1],u_shadow_bias:[36e-5,.0012,.012],u_shadowmap_0:0,u_shadowmap_1:0},this._forceDisable=!1,this.useNormalOffset=!1,l.tp.registerParameter(this,["Shadows"],"_forceDisable",{label:"forceDisable"},()=>{this.painter.style.map.triggerRepaint()}),l.tp.registerParameter(Vd,["Shadows"],"cascadeCount",{min:1,max:2,step:1}),l.tp.registerParameter(Vd,["Shadows"],"normalOffset",{min:0,max:10,step:.05}),l.tp.registerParameter(Vd,["Shadows"],"shadowMapResolution",{min:32,max:2048,step:32}),l.tp.registerBinding(this,["Shadows"],"_numCascadesToRender",{readonly:!0,label:"numCascadesToRender"})}destroy(){for(let l of this._cascades)l.texture.destroy(),l.framebuffer.destroy();this._cascades=[]}updateShadowParameters(l,p){let g=this.painter;if(this._enabled=!1,this._shadowLayerCount=0,this._receivers.clear(),!p||!p.properties)return;let C=p.properties.get("shadow-intensity");if(!p.shadowsEnabled()||C<=0||(this._shadowLayerCount=g.style.order.reduce((le,de)=>{let Ce=g.style._mergedLayers[de];return le+(Ce.hasShadowPass()&&!Ce.isHidden(l.zoom)?1:0)},0),this._enabled=this._shadowLayerCount>0,!this.enabled))return;let x=g.context,A=Vd.shadowMapResolution,R=Vd.shadowMapResolution;if(this._cascades.length===0||Vd.shadowMapResolution!==this._cascades[0].texture.size[0]){this._cascades=[];for(let le=0;leCe.dem).forEach(Ce=>{let he=Ce.dem.tree;de[0]=Math.min(de[0],he.minimums[0]),de[1]=Math.max(de[1],he.maximums[0])}),de[0]!==1e4&&(B=(de[1]-de[0])*le.exaggeration())}let H=1.5*l.cameraToCenterDistance,G=3*H,J=new Float64Array(16);for(let le=0;le=0)return{};let x=(function(B,H,G){let J=G/(1<0&&(r.d7(x[1],x[1],[C[0]*A,0,0]),r.d7(x[2],x[2],[C[0]*A,0,0])),C[1]<0?(r.d7(x[0],x[0],[0,C[1]*A,0]),r.d7(x[1],x[1],[0,C[1]*A,0])):C[1]>0&&(r.d7(x[2],x[2],[0,C[1]*A,0]),r.d7(x[3],x[3],[0,C[1]*A,0]));let R={};return R.vertices=x,R.planes=[e1(x[1],x[0],x[4]),e1(x[2],x[1],x[5]),e1(x[3],x[2],x[6]),e1(x[0],x[3],x[7])],R}addShadowReceiver(l,p,g){this._receivers.add(l,r.d8.fromTileIdAndHeight(l,p,g))}getMaxCascadeForTile(l){let p=this._receivers.get(l);return p&&p.lastCascade?p.lastCascade:0}}function e1(_,l,p){let g=r.av([],p,l),C=r.av([],_,l),x=r.bI([],g,C),A=r.ag(x);return A===0?[0,0,1,0]:(r.c4(x,x,1/A),[x[0],x[1],x[2],-r.bJ(x,l)])}function Nb(_){let l=_.properties.get("direction"),p=r.d3(l.x,l.y,l.z);p[2]=r.aA(p[2],0,75);let g=r.d5([p[0],p[1],p[2]]);return r.d4(g.x,g.y,g.z)}function Cf(_,l,p){let g=l.properties.get("color-use-theme")==="none",C=l.properties.get("color"),x=l.properties.get("intensity"),A=l.properties.get("direction"),R=[A.x,A.y,A.z],B=p.properties.get("color-use-theme")==="none",H=p.properties.get("color"),G=p.properties.get("intensity"),J=Math.max(r.bJ([0,0,1],R),0),K=[0,0,0];r.c4(K,H.toPremultipliedRenderColor(B?null:_.getLut(l.scope)).toArray01Linear().slice(0,3),G);let oe=[0,0,0];return r.c4(oe,C.toPremultipliedRenderColor(g?null:_.getLut(p.scope)).toArray01Linear().slice(0,3),J*x),r.da([K[0]>0?K[0]/(K[0]+oe[0]):0,K[1]>0?K[1]/(K[1]+oe[1]):0,K[2]>0?K[2]/(K[2]+oe[2]):0])}function ZN(_,l,p,g,C,x){let A=_.zoom,R=_.scale,B=_.worldSize,H=1/B,G=_.aspect,J=Math.sqrt(1+G*G)*Math.tan(.5*_.fovX),K=J*J,oe=g-p,le=g+p,de,Ce;K>oe/le?(de=g,Ce=g*J):(de=.5*le*(1+K),Ce=.5*Math.sqrt(oe*oe+2*(g*g+p*p)*K+le*le*K*K));let he=_.projection.pixelsPerMeter(_.center.lat,B),Te=_._camera.getCameraToWorldMercator(),Pe=[0,0,-de*H];r.af(Pe,Pe,Te);let Ve=Ce*H,et=_._edgeInsets;if(!(et.left===0&&et.top===0&&et.right===0&&et.bottom===0||et.left===et.right&&et.top===et.bottom)){let Si=_._camera.getWorldToCamera(_.worldSize,_.projection.zAxisUnit==="meters"?he:1),Hi=_._camera.getCameraToClipPerspective(_._fov,_.width/_.height,p,g);Hi[8]=2*-_.centerOffset.x/_.width,Hi[9]=2*_.centerOffset.y/_.height;let un=new Float64Array(16);r.cO(un,Hi,Si);let Fi=new Float64Array(16);r.bl(Fi,un);let Mi=r.cA.fromInvProjectionMatrix(Fi,B,A,!0);for(let $n of Mi.points){let Ln=((Qe=$n)[0]/=R,Qe[1]/=R,Qe[2]=r.ce(Qe[2],_._center.lat),Qe);Ve=Math.max(Ve,r.c5(r.d9([],Pe,Ln)))}}var Qe;Ve*=C/(C-1);let it=Math.acos(l[2]),Ze=Math.atan2(-l[0],-l[1]),Ye=new PS;Ye.position=Pe,Ye.setPitchBearing(it,Ze);let Je=Ye.getWorldToCamera(B,he),Bt=Ve*B,St=Math.min(_._mercatorZfromZoom(17)*B*-2,-2*Bt),Jt=Ye.getCameraToClipOrthographic(-Bt,Bt,-Bt,Bt,St,(Bt+x*he)/l[2]),Ft=new Float64Array(16);r.aB(Ft,Jt,Je);let Yt=r.d4(Math.floor(1e6*Pe[0])/1e6*B,Math.floor(1e6*Pe[1])/1e6*B,0),ji=.5*C,Nt=[0,0,0];r.af(Nt,Yt,Ft),r.c4(Nt,Nt,ji);let gt=[Math.floor(Nt[0]),Math.floor(Nt[1]),Math.floor(Nt[2])],ii=[0,0,0];r.av(ii,Nt,gt),r.c4(ii,ii,-1/ji);let Ut=new Float64Array(16);return r.bA(Ut),r.br(Ut,Ut,ii),r.aB(Ft,Ut,Ft),[Ft,Bt]}class Bb extends r.E{constructor(l){super(),this.requestManager=l,this.models={"":{}},this.modelUris={"":{}},this.modelByURL={},this.numModelsLoading={}}loadModel(l,p){return r.aV(this.requestManager.transformRequest(p,r.R.Model).url).then(g=>{if(!g)return;let C=r.aW(g),x=new r.aX(l,void 0,void 0,C);return x.computeBoundsAndApplyParent(),x}).catch(g=>{if(g&&g.status===404)return null;this.fire(new r.y(new Error(`Could not load model ${l} from ${p}: ${g.message}`)))})}load(l,p,g={forceReload:!1}){this.models[p]||(this.models[p]={});let C=Object.keys(l),x=[],A=[];for(let R of C){let B=l[R];this.hasURLBeenRequested(B)&&!g.forceReload||(this.modelByURL[B]={modelId:R,scope:p},x.push(this.loadModel(R,B)),A.push(R)),this.models[p][R]||(this.models[p][R]={model:null,numReferences:1})}this.numModelsLoading[p]=(this.numModelsLoading[p]||0)+A.length,Promise.allSettled(x).then(R=>{for(let B=0;B{this.fire(new r.y(new Error(`Could not load models: ${R.message}`)))})}isLoaded(){for(let l in this.numModelsLoading)if(this.numModelsLoading[l]>0)return!1;return!0}hasModel(l,p,g={exactIdMatch:!1}){return!!(g.exactIdMatch?this.getModel(l,p):this.getModelByURL(this.modelUris[p][l]))}getModel(l,p){return this.models[p]||(this.models[p]={}),this.models[p][l]?this.models[p][l].model:void 0}getModelByURL(l){if(!l)return null;let p=this.modelByURL[l];return p?this.models[p.scope][p.modelId].model:null}hasModelBeenAdded(l,p){return this.models[p]&&this.models[p][l]!==void 0}getModelURIs(l){return this.modelUris[l]||{}}addModel(l,p,g){this.models[g]||(this.models[g]={}),this.modelUris[g]||(this.modelUris[g]={});let C=this.requestManager.normalizeModelURL(p);if((this.hasModel(l,g,{exactIdMatch:!0})||this.hasModelBeenAdded(l,g))&&this.modelUris[g][l]===C)this.models[g][l].numReferences++;else if(this.hasURLBeenRequested(C)){let{scope:x,modelId:A}=this.modelByURL[C];this.models[x][A].numReferences++}else this.modelUris[g][l]=C,this.load({[l]:this.modelUris[g][l]},g)}addModelURLs(l,p){this.models[p]||(this.models[p]={}),this.modelUris[p]||(this.modelUris[p]={});let g=this.modelUris[p];for(let C in l)g[C]=this.requestManager.normalizeModelURL(l[C])}reloadModels(l){this.load(this.modelUris[l],l,{forceReload:!0})}addModelsFromBucket(l,p){this.models[p]||(this.models[p]={}),this.modelUris[p]||(this.modelUris[p]={});let g={};for(let C of l)this.hasModel(C,p,{exactIdMatch:!0})||this.hasURLBeenRequested(C)?this.models[p][C].numReferences++:this.modelUris[p][C]&&!this.hasURLBeenRequested(C)?g[C]=this.modelUris[p][C]:!this.hasURLBeenRequested(C)&&r.db(C,!1)&&(this.modelUris[p][C]=this.requestManager.normalizeModelURL(C),g[C]=this.modelUris[p][C]);this.load(g,p)}hasURLBeenRequested(l){return this.modelByURL[l]!==void 0}removeModel(l,p,g=!1,C=!1){if(this.models[p]&&this.models[p][l]&&(this.models[p][l].numReferences--,this.models[p][l].numReferences===0||C)){let x=this.modelUris[p][l];g||delete this.modelUris[p][l],delete this.modelByURL[x];let A=this.models[p][l].model;if(!A)return;delete this.models[p][l],A.destroy()}}destroy(){for(let l of Object.keys(this.models))for(let p of Object.keys(this.models[l])){let g=this.models[l][p].model;delete this.models[l][p],g&&g.destroy()}this.models={"":{}},this.modelUris={"":{}},this.modelByURL={},this.numModelsLoading={}}listModels(l){return this.models[l]||(this.models[l]={}),Object.keys(this.models[l])}upload(l,p){this.models[p]||(this.models[p]={});for(let g in this.models[p])this.models[p][g].model&&this.models[p][g].model.upload(l.context)}}let EM=new r.a9({data:new r.aa(r.a6.colorTheme.data)});function xf(_){if(!_.metadata||!_.metadata.content_area)return;let l=r.o.devicePixelRatio,{left:p,top:g,width:C,height:x}=_.metadata.content_area,A=p*l,R=g*l;return[A,R,A+C*l,R+x*l]}function mi(_){if(_)return _.map(([l,p])=>[l*r.o.devicePixelRatio,p*r.o.devicePixelRatio])}class dn{constructor(l,p,g){this.id=l,this.scope=p,this.sourceCache=g,this.pendingRequests=new Set,this.missingRequests=new Set}addPendingRequest(l){this.missingRequests.has(l.name)||this.pendingRequests.has(l.name)||this.pendingRequests.add(l.name)}hasPendingRequests(){return this.pendingRequests.size>0}resolvePendingRequests(){let l=new Map;if(!this.sourceCache.loaded())return l;let p=this.sourceCache.getVisibleCoordinates();if(p.length===0)return l;let g=this.sourceCache.getSource();if(!(g instanceof _g))return l;let C=p.map(A=>this.sourceCache.getTile(A)),x=g.getImages(C,Array.from(this.pendingRequests));for(let[A,R]of x)l.set(r.I.from({name:A,iconsetId:this.id}),R),this.pendingRequests.delete(A);for(let A of this.pendingRequests)this.missingRequests.add(A);return this.pendingRequests.clear(),l}}let Wi=(_,l)=>st(_,l&&l.filter(p=>p.identifier!=="source.canvas")),ar=r.aH(jr,["addLayer","removeLayer","setLights","setPaintProperty","setLayoutProperty","setSlot","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog","setSnow","setRain","setProjection","setCamera","addImport","removeImport","updateImport","addIconset","removeIconset"]),Fs=r.aH(jr,["setCenter","setZoom","setBearing","setPitch"]),Ka=new Set(["background","sky","slot","custom"]),Td={version:8,layers:[],sources:{}},El={duration:300,delay:0};class eh extends r.E{constructor(l,p={}){super(),this.map=l,this.scope=p.scope||"",this.globalId=null,this.fragments=[],this.importDepth=p.importDepth||0,this.importsCache=p.importsCache||new Map,this.resolvedImports=p.resolvedImports||new Set,this.transition=Object.assign({},El),this._buildingIndex=new ES(this),this.crossTileSymbolIndex=new Bc,this._mergedOrder=[],this._drapedFirstOrder=[],this._mergedLayers={},this._mergedSourceCaches={},this._mergedOtherSourceCaches={},this._mergedSymbolSourceCaches={},this._clipLayerPresent=!1,this._has3DLayers=!1,this._hasCircleLayers=!1,this._hasSymbolLayers=!1,this._changes=p.styleChanges||new Qr,this.dispatcher=p.dispatcher?p.dispatcher:new r.D(r.dd(),this),p.imageManager?this.imageManager=p.imageManager:(this.imageManager=new xi(this.map._spriteFormat),this.imageManager.setEventedParent(this)),this.imageManager.addScope(this.scope),this.glyphManager=p.glyphManager?p.glyphManager:new r.de(l._requestManager,p.localFontFamily?r.df.all:p.localIdeographFontFamily?r.df.ideographs:r.df.none,p.localFontFamily||p.localIdeographFontFamily),p.modelManager?this.modelManager=p.modelManager:(this.modelManager=new Bb(l._requestManager),this.modelManager.setEventedParent(this)),this._layers={},this._sourceCaches={},this._otherSourceCaches={},this._symbolSourceCaches={},this._loaded=!1,this._precompileDone=!1,this._shouldPrecompile=!1,this._availableImages=[],this._availableModels={},this._order=[],this._markersNeedUpdate=!1,this.options=p.configOptions?p.configOptions:new Map,this._configDependentLayers=p.configDependentLayers?p.configDependentLayers:new Set,this._config=p.config,this._styleColorTheme={lut:null,lutLoading:!1,lutLoadingCorrelationID:0,colorTheme:null,colorThemeOverride:p.colorThemeOverride},this._styleColorThemeForScope={},this._initialConfig=p.initialConfig,this.dispatcher.broadcast("setReferrer",r.dg());let g=this;this._rtlTextPluginCallback=eh.registerForPluginStateChange(C=>{g.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:C.pluginStatus,pluginURL:C.pluginURL},(x,A)=>{if(r.dh(x),A&&A.every(R=>R))for(let R in g._sourceCaches){let B=g._sourceCaches[R],H=B.getSource().type;H!=="vector"&&H!=="geojson"||B.reload()}})}),this.on("data",C=>{if(C.dataType!=="source"||C.sourceDataType!=="metadata")return;let x=this.getOwnSource(C.sourceId);if(x&&x.vectorLayerIds)for(let A in this._layers){let R=this._layers[A];R.source===x.id&&this._validateLayer(R)}})}load(l){return l?(typeof l=="string"?this.loadURL(l):this.loadJSON(l),this):this}_getGlobalId(l){if(!l)return null;if(typeof l=="string"){if(r.h(l))return l;let p=r.di(l);if(!p.startsWith("http"))try{return new URL(p,location.href).toString()}catch{return p}return p}return`json://${r.dj(JSON.stringify(l))}`}_diffStyle(l,p,g){this.globalId=this._getGlobalId(l);let C=(x,A)=>{try{A(null,this.setState(x,g))}catch(R){A(R,!1)}};if(typeof l=="string"){let x=this.map._requestManager.normalizeStyleURL(l),A=this.map._requestManager.transformRequest(x,r.R.Style);r.m(A,(R,B)=>{R?this.fire(new r.y(R)):B&&C(B,p)})}else typeof l=="object"&&C(l,p)}loadURL(l,p={}){this.fire(new r.z("dataloading",{dataType:"style"}));let g=typeof p.validate=="boolean"?p.validate:!r.h(l);this.globalId=this._getGlobalId(l),l=this.map._requestManager.normalizeStyleURL(l,p.accessToken),this.resolvedImports.add(l);let C=this.importsCache.get(l);if(C)return this._load(C,g);let x=this.map._requestManager.transformRequest(l,r.R.Style);this._request=r.m(x,(A,R)=>{if(this._request=null,A)this.fire(new r.y(A));else if(R)return this.importsCache.set(l,R),this._load(R,g)})}loadJSON(l,p={}){this.fire(new r.z("dataloading",{dataType:"style"})),this.globalId=this._getGlobalId(l),this._request=r.o.frame(()=>{this._request=null,this._load(l,p.validate!==!1)})}loadEmpty(){this.fire(new r.z("dataloading",{dataType:"style"})),this._load(Td,!1)}_loadImports(l,p,g){if(this.importDepth>=4)return r.w("Style doesn't support nesting deeper than 5"),Promise.resolve();let C=[];for(let x of l){let A=this._createFragmentStyle(x),R=new Promise(G=>{A.once("style.import.load",G),A.once("error",G)}).then(()=>this.mergeAll());if(C.push(R),this.resolvedImports.has(x.url)){A.loadEmpty();continue}let B=x.data||this.importsCache.get(x.url);B?(A.loadJSON(B,{validate:p}),this._isInternalStyle(B)&&(A.globalId=null)):x.url?A.loadURL(x.url,{validate:p}):A.loadEmpty();let H={style:A,id:x.id,config:x.config};if(g){let G=this.fragments.findIndex(({id:J})=>J===g);this.fragments=this.fragments.slice(0,G).concat(H).concat(this.fragments.slice(G))}else this.fragments.push(H)}return Promise.allSettled(C)}getImportGlobalIds(l=this,p=new Set){for(let g of l.fragments)g.style.globalId&&p.add(g.style.globalId),this.getImportGlobalIds(g.style,p);return[...p.values()]}_createFragmentStyle(l){let p=this.scope?r.B(l.id,this.scope):l.id,g,C=this._initialConfig&&this._initialConfig[p];(l.config||C)&&(g=Object.assign({},l.config,C));let x=new eh(this.map,{scope:p,styleChanges:this._changes,importDepth:this.importDepth+1,importsCache:this.importsCache,resolvedImports:new Set(this.resolvedImports),dispatcher:this.dispatcher,imageManager:this.imageManager,glyphManager:this.glyphManager,modelManager:this.modelManager,config:g,configOptions:this.options,colorThemeOverride:l["color-theme"],configDependentLayers:this._configDependentLayers});return x.setEventedParent(this.map,{style:x}),x}_reloadImports(){this.mergeAll(),this._updateMapProjection(),this.updateConfigDependencies(),this.map._triggerCameraUpdate(this.camera),this.dispatcher.broadcast("setLayers",{layers:this._serializeLayers(this._order),scope:this.scope,options:this.options}),this._shouldPrecompile=this.map._precompilePrograms&&this.isRootStyle()}_isInternalStyle(l){return this.isRootStyle()&&(l.fragment||!!l.schema&&l.fragment!==!1)}_load(l,p){if(this._isInternalStyle(l)){let x=Object.assign({},Td,{imports:[{id:"basemap",data:l,url:""}]});return void this._load(x,p)}if(this.updateConfig(this._config,l.schema),p&&Wi(this,nu(l)))return;this._loaded=!0,this.stylesheet=r.dk(l);let g=()=>{for(let B in l.sources)this.addSource(B,l.sources[B],{validate:!1,isInitialLoad:!0});if(l.iconsets)for(let B in l.iconsets)this.addIconset(B,l.iconsets[B]);l.sprite?this._loadIconset(l.sprite):(this.imageManager.setLoaded(!0,this.scope),this.dispatcher.broadcast("spriteLoaded",{scope:this.scope,isLoaded:!0})),!this.glyphManager.url&&l.glyphs&&this.glyphManager.setURL(l.glyphs);let x=DS(this.stylesheet.layers);if(this._order=x.map(B=>B.id),this.stylesheet.light&&r.w("The `light` root property is deprecated, prefer using `lights` with `flat` light type instead."),this.stylesheet.lights)if(this.stylesheet.lights.length===1&&this.stylesheet.lights[0].type==="flat"){let B=this.stylesheet.lights[0];this.light=new It(B.properties,B.id)}else this.setLights(this.stylesheet.lights);this.light||(this.light=new It(this.stylesheet.light)),this._layers={};for(let B of x){let H=r.dq(B,this.scope,this._styleColorTheme.lut,this.options);H.configDependencies.size!==0&&this._configDependentLayers.add(H.fqid),H.setEventedParent(this,{layer:{id:H.id}}),this._layers[H.id]=H;let G=this.getOwnLayerSourceCache(H),J=!!this.directionalLight&&this.directionalLight.shadowsEnabled();G&&H.canCastShadows()&&J&&(G.castsShadows=!0)}this.stylesheet.featuresets&&this.setFeaturesetSelectors(this.stylesheet.featuresets),this.stylesheet.models&&this.addModelURLs(this.stylesheet.models);let A=this.stylesheet.terrain;A&&(this.checkCanvasFingerprintNoise(),this.disableElevatedTerrain||this.terrainSetForDrapingOnly()||this._createTerrain(A,1)),this.stylesheet.fog&&this._createFog(this.stylesheet.fog),this.stylesheet.snow&&this._createSnow(this.stylesheet.snow),this.stylesheet.rain&&this._createRain(this.stylesheet.rain),this.stylesheet.transition&&this.setTransition(this.stylesheet.transition),this.fire(new r.z("data",{dataType:"style"}));let R=this.isRootStyle();l.imports?this._loadImports(l.imports,p).then(()=>{this._reloadImports(),this.fire(new r.z(R?"style.load":"style.import.load"))}).catch(B=>{this.fire(new r.y(new Error("Failed to load imports",B))),this.fire(new r.z(R?"style.load":"style.import.load"))}):(this._reloadImports(),this.fire(new r.z(R?"style.load":"style.import.load")))};this._styleColorTheme.colorTheme=this.stylesheet["color-theme"];let C=this._styleColorTheme.colorThemeOverride?this._styleColorTheme.colorThemeOverride:this._styleColorTheme.colorTheme;if(C){let x=this._evaluateColorThemeData(C);this._loadColorTheme(x).then(()=>{g()}).catch(A=>{r.w(`Couldn't load color theme from the stylesheet: ${A}`),g()})}else this._styleColorTheme.lut=null,g()}isRootStyle(){return this.importDepth===0}mergeAll(){let l,p,g,C,x,A,R,B,H,G,J={};this.terrain&&this.terrain.scope!==this.scope&&delete this.terrain,this.forEachFragmentStyle(K=>{if(K.stylesheet){if(K.light!=null&&(l=K.light),K.stylesheet.lights)for(let oe of K.stylesheet.lights)oe.type==="ambient"&&K.ambientLight!=null&&(p=K.ambientLight),oe.type==="directional"&&K.directionalLight!=null&&(g=K.directionalLight);C=this._prioritizeTerrain(C,K.terrain,K.stylesheet.terrain),K.stylesheet.fog&&K.fog!=null&&(x=K.fog),K.stylesheet.snow&&K.snow!=null&&(A=K.snow),K.stylesheet.rain&&K.rain!=null&&(R=K.rain),K.stylesheet.camera!=null&&(G=K.stylesheet.camera),K.stylesheet.projection!=null&&(B=K.stylesheet.projection),K.stylesheet.transition!=null&&(H=K.stylesheet.transition),J[K.scope]=K._styleColorTheme}}),this.light=l,this.ambientLight=p,this.directionalLight=g,this.fog=x,this.snow=A,this.rain=R,this._styleColorThemeForScope=J,C===null?delete this.terrain:this.terrain=C,this.camera=G||{"camera-projection":"perspective"},this.projection=B||{name:"mercator"},this.transition=Object.assign({},El,H),this.mergeSources(),this.mergeLayers()}forEachFragmentStyle(l){let p=g=>{for(let C of g.fragments)p(C.style);l(g)};p(this)}_prioritizeTerrain(l,p,g){let C=l&&l.drapeRenderMode===0;return g===null?p&&p.drapeRenderMode===0?p:C?l:null:p!=null&&(!l||C||p&&p.drapeRenderMode===1)?p:l}mergeTerrain(){let l;this.terrain&&this.terrain.scope!==this.scope&&delete this.terrain,this.forEachFragmentStyle(p=>{l=this._prioritizeTerrain(l,p.terrain,p.stylesheet.terrain)}),l===null?delete this.terrain:this.terrain=l}mergeProjection(){let l;this.forEachFragmentStyle(p=>{p.stylesheet.projection!=null&&(l=p.stylesheet.projection)}),this.projection=l||{name:"mercator"}}mergeSources(){let l={},p={},g={};this.forEachFragmentStyle(C=>{for(let x in C._sourceCaches){let A=r.B(x,C.scope);l[A]=C._sourceCaches[x]}for(let x in C._otherSourceCaches){let A=r.B(x,C.scope);p[A]=C._otherSourceCaches[x]}for(let x in C._symbolSourceCaches){let A=r.B(x,C.scope);g[A]=C._symbolSourceCaches[x]}}),this._mergedSourceCaches=l,this._mergedOtherSourceCaches=p,this._mergedSymbolSourceCaches=g}mergeLayers(){let l={},p=[],g={};this._mergedSlots=[],this._has3DLayers=!1,this._hasCircleLayers=!1,this._hasSymbolLayers=!1,this.forEachFragmentStyle(A=>{for(let R of A._order){let B=A._layers[R];if(B.type==="slot"){let H=r.dl(R);if(l[H])continue;l[H]=[]}B.slot&&l[B.slot]?l[B.slot].push(B):p.push(B)}}),this._mergedOrder=[];let C=-1,x=(A=[])=>{for(let R of A)if(R.type==="slot"){let B=r.dl(R.id);l[B]&&x(l[B]),this._mergedSlots.push(B)}else{let B=r.B(R.id,R.scope);this._mergedOrder.push(B),g[B]=R,R.is3D(!!this.terrain)&&(this._has3DLayers=!0,C=this._mergedOrder.length-1),R.type==="circle"&&(this._hasCircleLayers=!0),R.type==="symbol"&&(this._hasSymbolLayers=!0),R.type==="clip"&&(this._clipLayerPresent=!0)}};if(x(p),this._has3DLayers){let A={};for(let R=0;RA[R]-A[B])}this._mergedLayers=g,this.updateDrapeFirstLayers(),this._buildingIndex.processLayersChanged()}terrainSetForDrapingOnly(){return!!this.terrain&&this.terrain.drapeRenderMode===0}getCamera(){return this.stylesheet.camera}setCamera(l){return this.stylesheet.camera=Object.assign({},this.stylesheet.camera,l),this.camera=this.stylesheet.camera,this}_evaluateColorThemeData(l){return l.data?(function(p,g,C,x){let A=Object.assign({},g);for(let B of Object.keys(r.a6.colorTheme))A[B]===void 0&&(A[B]=r.a6.colorTheme[B].default);let R=new r.a8(EM,p,new Map(C));return R.setTransitionOrValue(A,C),R.untransitioned().possiblyEvaluate(new r.ac(0,{worldview:void 0}))})(this.scope,l,this.options).get("data"):null}_loadColorTheme(l){this._styleColorTheme.lutLoading=!0,this._styleColorTheme.lutLoadingCorrelationID+=1;let p=this._styleColorTheme.lutLoadingCorrelationID;return new Promise((g,C)=>{let x="data:image/png;base64,";if(!l||l.length===0)return this._styleColorTheme.lut=null,this._styleColorTheme.lutLoading=!1,void g();let A=l;A.startsWith(x)||(A=x+A);let R=r.I.from("mapbox-reserved-lut"),B=new Image;B.src=A,B.onerror=()=>{this._styleColorTheme.lutLoading=!1,C(new Error("Failed to load image data"))},B.onload=()=>{if(this._styleColorTheme.lutLoadingCorrelationID!==p)return void g();this._styleColorTheme.lutLoading=!1;let{width:H,height:G,data:J}=r.o.getImageData(B);if(G>32)return void C(new Error("The height of the image must be less than or equal to 32 pixels."));if(H!==G*G)return void C(new Error("The width of the image must be equal to the height squared."));this.getImage(R)&&this.removeImage(R),this.addImage(R,{data:new r.q({width:H,height:G},J),pixelRatio:1,sdf:!1,usvg:!1,version:0});let K=this.imageManager.getImage(R,this.scope);K?(this._styleColorTheme.lut={image:K.data,data:l},g()):C(new Error("Missing LUT image."))}})}getLut(l){let p=this._styleColorThemeForScope[l];return p?p.lut:null}setProjection(l){l?this.stylesheet.projection=l:delete this.stylesheet.projection,this.mergeProjection(),this._updateMapProjection()}applyProjectionUpdate(){this._loaded&&(this.dispatcher.broadcast("setProjection",this.map.transform.projectionOptions),this.map.transform.projection.requiresDraping?(this.getTerrain()||this.stylesheet.terrain)&&!this.disableElevatedTerrain||this.setTerrainForDraping():this.terrainSetForDrapingOnly()&&this.setTerrain(null,0))}_updateMapProjection(){this.isRootStyle()&&(this.map._useExplicitProjection?this.applyProjectionUpdate():this.map._prioritizeAndUpdateProjection(null,this.projection))}_loadSprite(l){this._spriteRequest=(function(p,g,C){let x,A,R,B=r.o.devicePixelRatio>1?"@2x":"",H=r.m(g.transformRequest(g.normalizeSpriteURL(p,B,".json"),r.R.SpriteJSON),(K,oe)=>{H=null,R||(R=K,x=oe,J())}),G=r.n(g.transformRequest(g.normalizeSpriteURL(p,B,".png"),r.R.SpriteImage),(K,oe)=>{G=null,R||(R=K,A=oe,J())});function J(){if(R)C(R);else if(x&&A){let K=r.o.getImageData(A),oe={};for(let le in x){let{width:de,height:Ce,x:he,y:Te,sdf:Pe,pixelRatio:Ve,stretchX:et,stretchY:Qe,content:it}=x[le],Ze=new r.q({width:de,height:Ce});r.q.copy(K,Ze,{x:he,y:Te},{x:0,y:0},{width:de,height:Ce},null),oe[le]={data:Ze,pixelRatio:Ve!==void 0?Ve:1,sdf:Pe!==void 0&&Pe,stretchX:et,stretchY:Qe,content:it,usvg:!1,version:0}}C(null,oe)}}return{cancel(){H&&(H.cancel(),H=null),G&&(G.cancel(),G=null)}}})(l,this.map._requestManager,(p,g)=>{if(this._spriteRequest=null,p)this.fire(new r.y(p));else if(g){let C=new Map;for(let x in g)C.set(r.I.from(x),g[x]);this.addImages(C)}this.imageManager.setLoaded(!0,this.scope),this.dispatcher.broadcast("spriteLoaded",{scope:this.scope,isLoaded:!0}),this.fire(new r.z("data",{dataType:"style"}))})}addIconset(l,p){if(p.type==="sprite")return void this._loadSprite(p.url);let g=this.getOwnSourceCache(p.source);if(!g)return void this.fire(new r.y(new Error(`Source "${p.source}" as specified by iconset "${l}" does not exist and cannot be used as an iconset source`)));let C=g.getSource();if(C.type!=="raster-array")return void this.fire(new r.y(new Error(`Source "${p.source}" as specified by iconset "${l}" is not a "raster-array" source and cannot be used as an iconset source`)));C.partial=!1;let x=new dn(l,this.scope,g);this.imageManager.addImageProvider(x,this.scope)}removeIconset(l){this.imageManager.removeImageProvider(l,this.scope)}_loadIconset(l){if(!r.h(l)&&this.map._spriteFormat!=="icon_set"||this.map._spriteFormat==="raster")return void this._loadSprite(l);let p=this.map._spriteFormat==="auto";var g,C;this._spriteRequest=(C=(x,A)=>{if(this._spriteRequest=null,x)p?this._loadSprite(l):this.fire(new r.y(x));else if(A){let R=new Map;for(let B in A)R.set(r.I.from(B),A[B]);this.addImages(R)}this.imageManager.setLoaded(!0,this.scope),this.dispatcher.broadcast("spriteLoaded",{scope:this.scope,isLoaded:!0}),this.fire(new r.z("data",{dataType:"style"}))},r.bu((g=this.map._requestManager).transformRequest(g.normalizeIconsetURL(l),r.R.Iconset),(x,A)=>{if(x)return void C(x);let R={},B=r.dc(new r.bt(A));for(let H of B.icons){let G={version:1,pixelRatio:r.o.devicePixelRatio,content:xf(H),stretchX:H.metadata?mi(H.metadata.stretch_x_areas):void 0,stretchY:H.metadata?mi(H.metadata.stretch_y_areas):void 0,sdf:!1,usvg:!0,icon:H};R[H.name]=G}C(null,R)}))}_validateLayer(l){let p=this.getOwnSource(l.source);if(!p)return;let g=l.sourceLayer;g&&(p.type==="geojson"||p.vectorLayerIds&&p.vectorLayerIds.indexOf(g)===-1)&&this.fire(new r.y(new Error(`Source layer "${g}" does not exist on source "${p.id}" as specified by style layer "${l.id}"`)))}loaded(){if(!this._loaded||Object.keys(this._changes.getUpdatedSourceCaches()).length)return!1;for(let l in this._sourceCaches)if(!this._sourceCaches[l].loaded())return!1;if(!this.imageManager.isLoaded()||this.imageManager.hasPatternsInFlight()||!this.modelManager.isLoaded()||this._styleColorTheme.lutLoading)return!1;for(let{style:l}of this.fragments)if(!l.loaded())return!1;return!0}_serializeImports(){if(this.stylesheet.imports)return this.stylesheet.imports.map((l,p)=>{let g=this.fragments[p];return g&&g.style&&(l.data=g.style.serialize()),l})}_serializeSources(){let l={};for(let p in this._sourceCaches){let g=this._sourceCaches[p].getSource();l[g.id]||(l[g.id]=g.serialize())}return l}_serializeLayers(l){let p=[];for(let g of l){let C=this._layers[g];C&&C.type!=="custom"&&p.push(C.serialize())}return p}hasLightTransitions(){return!(!this.light||!this.light.hasTransition())||!(!this.ambientLight||!this.ambientLight.hasTransition())||!(!this.directionalLight||!this.directionalLight.hasTransition())}hasFogTransition(){return!!this.fog&&this.fog.hasTransition()}hasSnowTransition(){return!!this.snow&&this.snow.hasTransition()}hasRainTransition(){return!!this.rain&&this.rain.hasTransition()}hasTransitions(){if(this.hasLightTransitions()||this.hasFogTransition()||this.hasSnowTransition()||this.hasRainTransition())return!0;for(let l in this._sourceCaches)if(this._sourceCaches[l].hasTransition())return!0;for(let l in this._layers)if(this._layers[l].hasTransition())return!0;return!1}get order(){return this.terrain?this._drapedFirstOrder:this._mergedOrder}_getOrder(l){return l?this.order:this._mergedOrder}isLayerDraped(l){return!!this.terrain&&l.isDraped(this.getLayerSourceCache(l))}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading")}_checkLayer(l){let p=this.getOwnLayer(l);if(p)return p;this.fire(new r.y(new Error(`The layer '${l}' does not exist in the map's style.`)))}_checkSource(l){let p=this.getOwnSource(l);if(p)return p;this.fire(new r.y(new Error(`The source '${l}' does not exist in the map's style.`)))}precompilePrograms(l,p){let g=this.map.painter;if(g)for(let C=l.minzoom||0;C<(l.maxzoom||25.5);C++){let x=l.getProgramIds();if(x)for(let A of x){let R=l.getDefaultProgramParams(A,p.zoom,this._styleColorTheme.lut);R&&(g.style=this,this.fog&&(g._fogVisible=!0,R.overrideFog=!0,g.getOrCreateProgram(A,R)),g._fogVisible=!1,R.overrideFog=!1,g.getOrCreateProgram(A,R),(this.stylesheet.terrain||this.stylesheet.projection&&this.stylesheet.projection.name==="globe")&&(R.overrideRtt=!0,g.getOrCreateProgram(A,R)))}}}update(l){if(!this._loaded)return;this.ambientLight&&this.ambientLight.recalculate(l),this.directionalLight&&this.directionalLight.recalculate(l);let p=this.calculateLightsBrightness();l.brightness=p||0,p!==this._brightness&&(this._brightness=p,this.dispatcher.broadcast("setBrightness",p)),l.worldview!==this._worldview&&(this._worldview=l.worldview,this.dispatcher.broadcast("setWorldview",this._worldview));let g=this._changes.isDirty(),C=!1;if(this._changes.isDirty()){let R=this._changes.getLayerUpdatesByScope();for(let B in R){let{updatedIds:H,removedIds:G}=R[B];(H||G)&&(this._updateWorkerLayers(B,H,G),C=!0)}this.updateSourceCaches(),this._updateTilesForChangedImages(),this.updateLayers(l),this.light&&this.light.updateTransitions(l),this.ambientLight&&this.ambientLight.updateTransitions(l),this.directionalLight&&this.directionalLight.updateTransitions(l),this.fog&&this.fog.updateTransitions(l),this.snow&&this.snow.updateTransitions(l),this.rain&&this.rain.updateTransitions(l),this._changes.reset()}let x={};for(let R in this._mergedSourceCaches){let B=this._mergedSourceCaches[R];x[R]=B.used,B.used=!1,B.tileCoverLift=0}for(let R of this._mergedOrder){let B=this._mergedLayers[R];if(B.recalculate(l,this._availableImages),!B.isHidden(l.zoom)){let H=this.getLayerSourceCache(B);H&&(H.used=!0,H.tileCoverLift=Math.max(H.tileCoverLift,B.tileCoverLift()))}!this._precompileDone&&this._shouldPrecompile&&("requestIdleCallback"in window?requestIdleCallback(()=>{this.precompilePrograms(B,l)}):this.precompilePrograms(B,l))}this._shouldPrecompile&&(this._precompileDone=!0),this.terrain&&C&&this.mergeLayers();let A=this.imageManager.getPendingImageProviders();for(let R of A)R.sourceCache.used=!0;for(let R in x){let B=this._mergedSourceCaches[R];x[R]!==B.used&&B.getSource().fire(new r.z("data",{sourceDataType:"visibility",dataType:"source",sourceId:B.getSource().id}))}this.light&&this.light.recalculate(l),this.terrain&&this.terrain.recalculate(l),this.fog&&this.fog.recalculate(l),this.snow&&this.snow.recalculate(l),this.rain&&this.rain.recalculate(l),this.z=l.zoom,this._markersNeedUpdate&&(this._updateMarkersOpacity(),this._markersNeedUpdate=!1),this.imageManager.clearUpdatedImages(this.scope),g&&this.fire(new r.z("data",{dataType:"style"}))}updateImageProviders(){let l=this.imageManager.getPendingImageProviders();for(let p of l){let g=p.resolvePendingRequests(),C=this.getFragmentStyle(p.scope);C&&C.addImages(g)}}_updateTilesForChangedImages(){let l={};for(let p in this._mergedSourceCaches){let g=this._mergedSourceCaches[p].getSource().scope;l[g]=l[g]||this._changes.getUpdatedImages(g),l[g].length!==0&&this._mergedSourceCaches[p].reloadTilesForDependencies(["icons","patterns"],l[g])}for(let p in l)this._changes.resetUpdatedImages(p)}_updateWorkerLayers(l,p,g){let C=this.getFragmentStyle(l);C&&this.dispatcher.broadcast("updateLayers",{layers:p?C._serializeLayers(p):[],scope:l,removedIds:g||[],options:C.options})}setState(l,p){if(this._checkLoaded(),Wi(this,nu(l)))return!1;(l=r.dk(l)).layers=DS(l.layers);let g=(function(A,R){if(!A)return[{command:jr.setStyle,args:[R]}];let B=[];try{if(!r.by(A.version,R.version))return[{command:jr.setStyle,args:[R]}];if(r.by(A.center,R.center)||B.push({command:jr.setCenter,args:[R.center]}),r.by(A.zoom,R.zoom)||B.push({command:jr.setZoom,args:[R.zoom]}),r.by(A.bearing,R.bearing)||B.push({command:jr.setBearing,args:[R.bearing]}),r.by(A.pitch,R.pitch)||B.push({command:jr.setPitch,args:[R.pitch]}),r.by(A.sprite,R.sprite)||B.push({command:jr.setSprite,args:[R.sprite]}),r.by(A.glyphs,R.glyphs)||B.push({command:jr.setGlyphs,args:[R.glyphs]}),r.by(A.imports,R.imports)||(function(oe=[],le=[],de){le=le||[];let Ce=(oe=oe||[]).map(Tl),he=le.map(Tl),Te=oe.reduce(Il,{}),Pe=le.reduce(Il,{}),Ve=Ce.slice(),et,Qe,it,Ze;for(et=0,Qe=0;et{oe.source&&H[oe.source]?B.push({command:jr.removeLayer,args:[oe.id]}):J.push(oe)});let K=A.terrain;K&&H[K.source]&&(B.push({command:jr.setTerrain,args:[void 0]}),K=void 0),B=B.concat(G),r.by(K,R.terrain)||B.push({command:jr.setTerrain,args:[R.terrain]}),(function(oe,le,de){le=le||[];let Ce=(oe=oe||[]).map(Tl),he=le.map(Tl),Te=oe.reduce(Il,{}),Pe=le.reduce(Il,{}),Ve=Ce.slice(),et=Object.create(null),Qe,it,Ze,Ye,Je,Bt,St;for(Qe=0,it=0;Qe!(A.command in Fs));if(g.length===0)return!1;let C=g.filter(A=>!(A.command in ar));if(C.length>0)throw new Error(`Unimplemented: ${C.map(A=>A.command).join(", ")}.`);let x=[];return g.forEach(A=>{x.push(this[A.command](...A.args))}),p&&Promise.all(x).then(p).catch(p),this.stylesheet=l,this.mergeAll(),this.dispatcher.broadcast("setLayers",{layers:this._serializeLayers(this._order),scope:this.scope,options:this.options}),!0}_updateWorkerImages(){this._availableImages=this.imageManager.listImages(this.scope),this.dispatcher.broadcast("setImages",{scope:this.scope,images:this._availableImages})}_updateWorkerModels(){this._availableModels=this.modelManager.getModelURIs(this.scope),this.dispatcher.broadcast("setModels",{scope:this.scope,models:this._availableModels})}addImages(l){if(l.size===0)return this;for(let[p,g]of l.entries()){if(this.getImage(p))return this.fire(new r.y(new Error(`An image with the name "${p.name}" already exists.`)));this.imageManager.addImage(p,this.scope,g),this._changes.updateImage(p,this.scope)}return this._updateWorkerImages(),this.fire(new r.z("data",{dataType:"style"})),this}addImage(l,p){return this.getImage(l)?this.fire(new r.y(new Error(`An image with the name "${l.name}" already exists.`))):(this.imageManager.addImage(l,this.scope,p),this._changes.updateImage(l,this.scope),this._updateWorkerImages(),this.fire(new r.z("data",{dataType:"style"})),this)}updateImage(l,p,g=!1){this.imageManager.updateImage(l,this.scope,p),g&&(this._changes.updateImage(l,this.scope),this._updateWorkerImages(),this.fire(new r.z("data",{dataType:"style"})))}getImage(l){return this.imageManager.getImage(l,this.scope)}removeImage(l){return this.getImage(l)?(this.imageManager.removeImage(l,this.scope),this._changes.updateImage(l,this.scope),this._updateWorkerImages(),this.fire(new r.z("data",{dataType:"style"})),this):this.fire(new r.y(new Error("No image with this name exists.")))}listImages(){return this._checkLoaded(),this._availableImages.slice()}addModelURLs(l){return this.modelManager.addModelURLs(l,this.scope),this._updateWorkerModels(),this.fire(new r.z("data",{dataType:"style"})),this}addModel(l,p,g={}){return this._checkLoaded(),this._validate(ht,`models.${l}`,p,null,g)||(this.modelManager.addModel(l,p,this.scope),this.fire(new r.z("data",{dataType:"style"}))),this}hasModel(l){return this.modelManager.hasModel(l,this.scope)}removeModel(l){return this.hasModel(l)?(this.modelManager.removeModel(l,this.scope,!1,!0),this.fire(new r.z("data",{dataType:"style"})),this):this.fire(new r.y(new Error("No model with this ID exists.")))}listModels(){return this._checkLoaded(),this.modelManager.listModels(this.scope)}addSource(l,p,g={}){if(this._checkLoaded(),this.getOwnSource(l)!==void 0)throw new Error(`There is already a source with ID "${l}".`);if(!p.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(p).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(p.type)>=0&&this._validate(fg,`sources.${l}`,p,null,g))return;this.map&&this.map._collectResourceTiming&&(p.collectResourceTiming=!0);let C=Cb(l,p,this.dispatcher,this);C.scope=this.scope,C.setEventedParent(this,()=>({isSourceLoaded:this._isSourceCacheLoaded(C.id),source:C.serialize(),sourceId:C.id}));let x=A=>{let R=(A?"symbol:":"other:")+C.id,B=r.B(R,this.scope),H=this._sourceCaches[R]=new kh(B,C,A);(A?this._symbolSourceCaches:this._otherSourceCaches)[C.id]=H,H.onAdd(this.map)};x(!1),p.type!=="vector"&&p.type!=="geojson"||x(!0),C.onAdd&&C.onAdd(this.map),g.isInitialLoad||(this.mergeSources(),this._changes.setDirty())}removeSource(l){this._checkLoaded();let p=this.getOwnSource(l);if(!p)throw new Error("There is no source with this ID");for(let C in this._layers)if(this._layers[C].source===l)return this.fire(new r.y(new Error(`Source "${l}" cannot be removed while layer "${C}" is using it.`)));if(this.terrain&&this.terrain.scope===this.scope&&this.terrain.get().source===l)return this.fire(new r.y(new Error(`Source "${l}" cannot be removed while terrain is using it.`)));if(this.stylesheet.iconsets){let C=Object.entries(this.stylesheet.iconsets).find(([x,A])=>A.type==="source"&&A.source===l);if(C)return this.fire(new r.y(new Error(`Source "${l}" cannot be removed while iconset "${C[0]}" is using it.`)))}let g=this.getOwnSourceCaches(l);for(let C of g){let x=r.dl(C.id);delete this._sourceCaches[x],this._changes.discardSourceCacheUpdate(C.id),C.fire(new r.z("data",{sourceDataType:"metadata",dataType:"source",sourceId:C.getSource().id})),C.setEventedParent(null),C.clearTiles()}return delete this._otherSourceCaches[l],delete this._symbolSourceCaches[l],this.mergeSources(),p.setEventedParent(null),p.onRemove&&p.onRemove(this.map),this._changes.setDirty(),this}setGeoJSONSourceData(l,p){this._checkLoaded(),this.getOwnSource(l).setData(p),this._changes.setDirty()}getOwnSource(l){let p=this.getOwnSourceCache(l);return p&&p.getSource()}getOwnSources(){let l=[];for(let p in this._otherSourceCaches){let g=this.getOwnSourceCache(p);g&&l.push(g.getSource())}return l}areTilesLoaded(){let l=this._mergedSourceCaches;for(let p in l){let g=l[p]._tiles;for(let C in g){let x=g[C];if(x.state!=="loaded"&&x.state!=="errored")return!1}}return!0}setLights(l){if(this._checkLoaded(),!l)return delete this.ambientLight,void delete this.directionalLight;let p=this._getTransitionParameters();for(let x of l){if(this._validate(SS,"lights",x))return;switch(x.type){case"ambient":if(this.ambientLight){let A=this.ambientLight;A.set(x),A.updateTransitions(p)}else this.ambientLight=new Ss(x,Ll||(Ll=new r.a9({color:new r.aa(r.a6.properties_light_ambient.color),"color-use-theme":new r.aa({type:"string",default:"default","property-type":"data-constant"}),intensity:new r.aa(r.a6.properties_light_ambient.intensity)})),this.scope,this.options);break;case"directional":if(this.directionalLight){let A=this.directionalLight;A.set(x),A.updateTransitions(p)}else this.directionalLight=new Ss(x,Xl||(Xl=new r.a9({direction:new r.ap(r.a6.properties_light_directional.direction),color:new r.aa(r.a6.properties_light_directional.color),"color-use-theme":new r.aa({type:"string",default:"default","property-type":"data-constant"}),intensity:new r.aa(r.a6.properties_light_directional.intensity),"cast-shadows":new r.aa(r.a6.properties_light_directional["cast-shadows"]),"shadow-quality":new r.aa(r.a6.properties_light_directional["shadow-quality"]),"shadow-intensity":new r.aa(r.a6.properties_light_directional["shadow-intensity"])})),this.scope,this.options)}}let g=Object.assign(p,{worldview:this.map.getWorldview()}),C=new r.ac(this.z||0,g);this.ambientLight&&this.ambientLight.recalculate(C),this.directionalLight&&this.directionalLight.recalculate(C),this._brightness=this.calculateLightsBrightness(),this.dispatcher.broadcast("setBrightness",this._brightness)}calculateLightsBrightness(){let l=this.directionalLight,p=this.ambientLight;if(!l||!p)return;let g=K=>.2126*(K[0]<=.03928?K[0]/12.92:Math.pow((K[0]+.055)/1.055,2.4))+.7152*(K[1]<=.03928?K[1]/12.92:Math.pow((K[1]+.055)/1.055,2.4))+.0722*(K[2]<=.03928?K[2]/12.92:Math.pow((K[2]+.055)/1.055,2.4)),C=l.properties.get("color").toNonPremultipliedRenderColor(null).toArray01(),x=l.properties.get("intensity"),A=l.properties.get("direction"),R=1-r.d3(A.x,A.y,A.z)[2]/90,B=g(C)*x*R,H=p.properties.get("color").toNonPremultipliedRenderColor(null).toArray01(),G=p.properties.get("intensity"),J=g(H)*G;return Number(((B+J)/2).toFixed(6))}getBrightness(){return this._brightness}getLights(){if(!this.enable3dLights())return null;let l=[];return this.directionalLight&&l.push(this.directionalLight.get()),this.ambientLight&&l.push(this.ambientLight.get()),l}enable3dLights(){return!!this.ambientLight&&!!this.directionalLight}getFragmentStyle(l){if(l==null||l===""&&this.isRootStyle())return this;if(r.dm(l)){let p=r.dn(l),g=this.fragments.find(({id:x})=>x===p);if(!g)return;let C=r.dl(l);return g.style.getFragmentStyle(C)}{let p=this.fragments.find(({id:g})=>g===l);return p?p.style:void 0}}setFeaturesetSelectors(l){if(!l)return;let p={},g=(C,x="")=>`${C}::${x}`;this._featuresetSelectors={};for(let C in l){let x=this._featuresetSelectors[C]=[];for(let A of l[C].selectors){if(A.featureNamespace){let B=this.getOwnLayer(A.layer);if(!B){r.w(`Layer is undefined for selector: ${A.layer}`);continue}let H=g(B.source,B.sourceLayer);if(H in p&&p[H]!==A.featureNamespace){r.w(`"featureNamespace ${A.featureNamespace} of featureset ${C}'s selector is not associated to the same source, skip this selector`);continue}p[H]=A.featureNamespace}let R;if(A.properties)for(let B in A.properties){let H=r.U(A.properties[B]);H.result==="success"&&(R=R||{},R[B]=H.value)}x.push({layerId:A.layer,namespace:A.featureNamespace,properties:R,uniqueFeatureID:A._uniqueFeatureID})}}}getFeaturesetDescriptors(l){let p=this.getFragmentStyle(l);if(!p||!p.stylesheet.featuresets)return[];let g=[];for(let C in p.stylesheet.featuresets)g.push({featuresetId:C,importId:p.scope?p.scope:void 0});return g}getFeaturesetLayers(l,p){let g=this.getFragmentStyle(p),C=g.stylesheet.featuresets;if(!C||!C[l])return this.fire(new r.y(new Error(`The featureset '${l}' does not exist in the map's style and cannot be queried.`))),[];let x=[];for(let A of C[l].selectors){let R=g.getOwnLayer(A.layer);R&&x.push(R)}return x}getConfigProperty(l,p){let g=this.getFragmentStyle(l);if(!g)return null;let C=r.B(p,g.scope),x=g.options.get(C),A=x?x.value||x.default:null;return A?A.serialize():null}setConfigProperty(l,p,g){let C=this.getFragmentStyle(l);if(!C)return;let x=C.stylesheet.schema;if(!x||!x[p])return;let A=r.U(g);if(A.result!=="success")return void Wi(this,A.value);let R=A.value.expression,B=r.B(p,C.scope),H=C.options.get(B);if(!H)return;let G,{minValue:J,maxValue:K,stepValue:oe,type:le,values:de}=x[p],Ce=r.U(x[p].default);Ce.result==="success"&&(G=Ce.value.expression),G?(this.options.set(B,Object.assign({},H,{value:R,default:G,minValue:J,maxValue:K,stepValue:oe,type:le,values:de})),this.updateConfigDependencies(p)):this.fire(new r.y(new Error(`No schema defined for the config option "${p}" in the "${l}" fragment.`)))}getConfig(l){let p=this.getFragmentStyle(l);if(!p)return null;let g=p.stylesheet.schema;if(!g)return null;let C={};for(let x in g){let A=r.B(x,p.scope),R=p.options.get(A),B=R?R.value||R.default:null;C[x]=B?B.serialize():null}return C}setConfig(l,p){let g=this.getFragmentStyle(l);g&&(g.updateConfig(p,g.stylesheet.schema),this.updateConfigDependencies())}getSchema(l){let p=this.getFragmentStyle(l);return p?p.stylesheet.schema:null}setSchema(l,p){let g=this.getFragmentStyle(l);g&&(g.stylesheet.schema=p,g.updateConfig(g._config,p),this.updateConfigDependencies())}updateConfig(l,p){if(this._config=l,l||p)if(p)for(let g in p){let C,x,A=r.U(p[g].default);if(A.result==="success"&&(C=A.value.expression),l&&l[g]!==void 0){let K=r.U(l[g]);K.result==="success"&&(x=K.value.expression)}let{minValue:R,maxValue:B,stepValue:H,type:G,values:J}=p[g];if(C){let K=r.B(g,this.scope);this.options.set(K,{default:C,value:x,minValue:R,maxValue:B,stepValue:H,type:G,values:J})}else this.fire(new r.y(new Error(`No schema defined for config option "${g}".`)))}else this.fire(new r.y(new Error("Attempting to set config for a style without schema.")))}updateConfigDependencies(l){for(let p of this._configDependentLayers){let g=this.getLayer(p);if(g){if(l&&!g.configDependencies.has(l))continue;g.possiblyEvaluateVisibility(),this._updateLayer(g)}}this.ambientLight&&this.ambientLight.updateConfig(this.options),this.directionalLight&&this.directionalLight.updateConfig(this.options),this.fog&&this.fog.updateConfig(this.options),this.snow&&this.snow.updateConfig(this.options),this.rain&&this.rain.updateConfig(this.options),this.forEachFragmentStyle(p=>{let g=p._styleColorTheme.colorThemeOverride?p._styleColorTheme.colorThemeOverride:p._styleColorTheme.colorTheme;if(g){let C=p._evaluateColorThemeData(g);(!p._styleColorTheme.lut&&C!==""||p._styleColorTheme.lut&&C!==p._styleColorTheme.lut.data)&&p.setColorTheme(g)}}),this._changes.setDirty()}addLayer(l,p,g={}){this._checkLoaded();let C=l.id;if(this._layers[C])return void this.fire(new r.y(new Error(`Layer with id "${C}" already exists on this map`)));let x;if(l.type==="custom"){if(Wi(this,r.dp(l)))return;x=r.dq(l,this.scope,this._styleColorTheme.lut,this.options)}else{if(typeof l.source=="object"&&(this.addSource(C,l.source),l=r.dk(l),l=Object.assign(l,{source:C})),this._validate(At,`layers.${C}`,l,{arrayIndex:-1},g))return;x=r.dq(l,this.scope,this._styleColorTheme.lut,this.options),this._validateLayer(x),x.setEventedParent(this,{layer:{id:C}})}x.configDependencies.size!==0&&this._configDependentLayers.add(x.fqid);let A=this._order.length;if(p){let G=this._order.indexOf(p);if(G===-1)return void this.fire(new r.y(new Error(`Layer with id "${p}" does not exist on this map.`)));x.slot===this._layers[p].slot?A=G:r.w(`Layer with id "${p}" has a different slot. Layers can only be rearranged within the same slot.`)}this._order.splice(A,0,C),this._layerOrderChanged=!0,this._layers[C]=x;let R=this.getOwnLayerSourceCache(x),B=!!this.directionalLight&&this.directionalLight.shadowsEnabled();R&&x.canCastShadows()&&B&&(R.castsShadows=!0);let H=this._changes.getRemovedLayer(x);if(H&&x.source&&R&&x.type!=="custom"){this._changes.discardLayerRemoval(x);let G=r.B(x.source,x.scope);H.type!==x.type?this._changes.updateSourceCache(G,"clear"):(this._changes.updateSourceCache(G,"reload"),R.pause())}this._updateLayer(x),x.onAdd&&x.onAdd(this.map),x.scope=this.scope,this.mergeLayers()}moveLayer(l,p){this._checkLoaded();let g=this._checkLayer(l);if(!g||l===p)return;let C=this._order.indexOf(l);this._order.splice(C,1);let x=this._order.length;if(p){let A=this._order.indexOf(p);if(A===-1)return void this.fire(new r.y(new Error(`Layer with id "${p}" does not exist on this map.`)));g.slot===this._layers[p].slot?x=A:r.w(`Layer with id "${p}" has a different slot. Layers can only be rearranged within the same slot.`)}this._order.splice(x,0,l),this._changes.setDirty(),this._layerOrderChanged=!0,this.mergeLayers()}removeLayer(l){this._checkLoaded();let p=this._checkLayer(l);if(!p)return;p.setEventedParent(null);let g=this._order.indexOf(l);this._order.splice(g,1),delete this._layers[l],this._changes.setDirty(),this._layerOrderChanged=!0,this._configDependentLayers.delete(p.fqid),this._changes.removeLayer(p);let C=this.getOwnLayerSourceCache(p);if(C&&C.castsShadows){let x=!1;for(let A in this._layers)if(this._layers[A].source===p.source&&this._layers[A].canCastShadows()){x=!0;break}C.castsShadows=x}p.onRemove&&p.onRemove(this.map),this.mergeLayers()}getOwnLayer(l){return this._layers[l]}hasLayer(l){return l in this._mergedLayers}hasLayerType(l){for(let p in this._layers)if(this._layers[p].type===l)return!0;return!1}setLayerZoomRange(l,p,g){this._checkLoaded();let C=this._checkLayer(l);C&&(C.minzoom===p&&C.maxzoom===g||(p!=null&&(C.minzoom=p),g!=null&&(C.maxzoom=g),this._updateLayer(C)))}getSlots(){return this._checkLoaded(),this._mergedSlots}setSlot(l,p){this._checkLoaded();let g=this._checkLayer(l);g&&g.slot!==p&&(g.slot=p,this._updateLayer(g))}setFilter(l,p,g={}){this._checkLoaded();let C=this._checkLayer(l);if(C&&!r.by(C.filter,p))return p==null?(C.filter=void 0,void this._updateLayer(C)):void(this._validate(ge,`layers.${C.id}.filter`,p,{layerType:C.type},g)||(C.filter=r.dk(p),this._updateLayer(C)))}getFilter(l){let p=this._checkLayer(l);if(p)return r.dk(p.filter)}setLayoutProperty(l,p,g,C={}){this._checkLoaded();let x=this._checkLayer(l);if(x&&!r.by(x.getLayoutProperty(p),g)){if(g!=null&&(!C||C.validate!==!1)&&Wi(x,$e.call(nu,{key:`layers.${l}.layout.${p}`,layerType:x.type,objectKey:p,value:g,styleSpec:r.a6,style:{glyphs:!0,sprite:!0}})))return;x.setLayoutProperty(p,g),x.configDependencies.size!==0&&this._configDependentLayers.add(x.fqid),this._updateLayer(x)}}getLayoutProperty(l,p){let g=this._checkLayer(l);if(g)return g.getLayoutProperty(p)}setPaintProperty(l,p,g,C={}){this._checkLoaded();let x=this._checkLayer(l);if(!x||r.by(x.getPaintProperty(p),g)||g!=null&&(!C||C.validate!==!1)&&Wi(x,Ie.call(nu,{key:`layers.${l}.paint.${p}`,layerType:x.type,objectKey:p,value:g,styleSpec:r.a6})))return;let A=x.setPaintProperty(p,g);x.configDependencies.size!==0&&this._configDependentLayers.add(x.fqid),A&&this._updateLayer(x),this._changes.updatePaintProperties(x)}getPaintProperty(l,p){let g=this._checkLayer(l);if(g)return g.getPaintProperty(p)}setFeatureState(l,p){if(this._checkLoaded(),"target"in l){if("featuresetId"in l.target){let{featuresetId:B,importId:H}=l.target,G=this.getFragmentStyle(H),J=G.getFeaturesetLayers(B);for(let{source:K,sourceLayer:oe}of J)G.setFeatureState({id:l.id,source:K,sourceLayer:oe},p)}else if("layerId"in l.target){let{layerId:B}=l.target,H=this.getLayer(B);this.setFeatureState({id:l.id,source:H.source,sourceLayer:H.sourceLayer},p)}return}let g=l.source,C=l.sourceLayer,x=this._checkSource(g);if(!x)return;let A=x.type;if(A==="geojson"&&C)return void this.fire(new r.y(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if(A==="vector"&&!C)return void this.fire(new r.y(new Error("The sourceLayer parameter must be provided for vector source types.")));l.id===void 0&&this.fire(new r.y(new Error("The feature id parameter must be provided.")));let R=this.getOwnSourceCaches(g);for(let B of R)B.setFeatureState(C,l.id,p)}removeFeatureState(l,p){if(this._checkLoaded(),"target"in l){if("featuresetId"in l.target){let{featuresetId:B,importId:H}=l.target,G=this.getFragmentStyle(H),J=G.getFeaturesetLayers(B);for(let{source:K,sourceLayer:oe}of J)G.removeFeatureState({id:l.id,source:K,sourceLayer:oe},p)}else if("layerId"in l.target){let{layerId:B}=l.target,H=this.getLayer(B);this.removeFeatureState({id:l.id,source:H.source,sourceLayer:H.sourceLayer},p)}return}let g=l.source,C=this._checkSource(g);if(!C)return;let x=C.type,A=x==="vector"?l.sourceLayer:void 0;if(x==="vector"&&!A)return void this.fire(new r.y(new Error("The sourceLayer parameter must be provided for vector source types.")));if(p&&typeof l.id!="string"&&typeof l.id!="number")return void this.fire(new r.y(new Error("A feature id is required to remove its specific state property.")));let R=this.getOwnSourceCaches(g);for(let B of R)B.removeFeatureState(A,l.id,p)}getFeatureState(l){if(this._checkLoaded(),"target"in l){let x;if("featuresetId"in l.target){let{featuresetId:A,importId:R}=l.target,B=this.getFragmentStyle(R),H=B.getFeaturesetLayers(A);for(let{source:G,sourceLayer:J}of H){let K=B.getFeatureState({id:l.id,source:G,sourceLayer:J});if(K&&!x)x=K;else if(!r.by(x,K))return void this.fire(new r.y(new Error("The same feature id exists in multiple sources in the featureset, but their feature states are not consistent through the sources.")))}}else if("layerId"in l.target){let{layerId:A}=l.target,R=this.getLayer(A);x=this.getFeatureState({id:l.id,source:R.source,sourceLayer:R.sourceLayer})}return x}let p=l.source,g=l.sourceLayer,C=this._checkSource(p);if(C){if(C.type!=="vector"||g)return l.id===void 0&&this.fire(new r.y(new Error("The feature id parameter must be provided."))),this.getOwnSourceCaches(p)[0].getFeatureState(g,l.id);this.fire(new r.y(new Error("The sourceLayer parameter must be provided for vector source types.")))}}setTransition(l){return this.stylesheet.transition=Object.assign({},this.stylesheet.transition,l),this.transition=this.stylesheet.transition,this}getTransition(){return Object.assign({},this.stylesheet.transition)}serialize(){this._checkLoaded();let l=this.getTerrain(),p=l&&this.terrain&&this.terrain.scope===this.scope?l:this.stylesheet.terrain;return r.dr({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,fragment:this.stylesheet.fragment,iconsets:this.stylesheet.iconsets,imports:this._serializeImports(),schema:this.stylesheet.schema,camera:this.stylesheet.camera,light:this.stylesheet.light,lights:this.stylesheet.lights,terrain:p,fog:this.stylesheet.fog,snow:this.stylesheet.snow,rain:this.stylesheet.rain,center:this.stylesheet.center,"color-theme":this.stylesheet["color-theme"],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:this._serializeSources(),layers:this._serializeLayers(this._order)},g=>g!==void 0)}_updateFilteredLayers(l){for(let p of Object.values(this._mergedLayers))l(p)&&this._updateLayer(p)}_updateLayer(l){this._changes.updateLayer(l);let p=this.getLayerSourceCache(l),g=r.B(l.source,l.scope),C=this._changes.getUpdatedSourceCaches();l.source&&!C[g]&&p&&p.getSource().type!=="raster"&&(this._changes.updateSourceCache(g,"reload"),p.pause()),l.invalidateCompiledFilter()}_flattenAndSortRenderedFeatures(l){let p=R=>this._mergedLayers[R].is3D(!!this.terrain),g=this.order,C={},x=[];for(let R=g.length-1;R>=0;R--){let B=g[R];if(p(B)){C[B]=R;for(let H of l){let G=H[B];if(G)for(let J of G)x.push(J)}}}x.sort((R,B)=>B.intersectionZ-R.intersectionZ);let A=[];for(let R=g.length-1;R>=0;R--){let B=g[R];if(p(B))for(let H=x.length-1;H>=0;H--){let G=x[H].feature;if(G.layer&&C[G.layer.id]{if(Ka.has(G.type))return;let J=this.getOwnLayerSourceCache(G),K=x[J.id]=x[J.id]||{sourceCache:J,layers:{},has3DLayers:!1};G.is3D(!!this.terrain)&&(K.has3DLayers=!0),K.layers[G.fqid]=K.layers[G.fqid]||{styleLayer:G,targets:[]},K.layers[G.fqid].targets.push({filter:C})};if(p&&p.layers){if(!Array.isArray(p.layers))return this.fire(new r.y(new Error("parameters.layers must be an Array."))),[];for(let G of p.layers){let J=this._layers[G];if(!J)return this.fire(new r.y(new Error(`The layer '${G}' does not exist in the map's style and cannot be queried for features.`))),[];A(J)}}else for(let G in this._layers)A(this._layers[G]);let R=this._queryRenderedFeatures(l,x,g),B=this._flattenAndSortRenderedFeatures(R),H=[];for(let G of B)r.ds(G.layer.id)===this.scope&&H.push(G);return H}queryRenderedFeatureset(l,p,g){let C;p&&!Array.isArray(p)&&p.filter&&(this._validate(ge,"queryRenderedFeatures.filter",p.filter,null,p),C=r.b6(p.filter));let x="mock",A=[];if(p&&p.target)A.push(Object.assign({},p,{targetId:x,filter:C}));else{let G=this.getFeaturesetDescriptors();for(let J of G)A.push({targetId:x,filter:C,target:J});for(let{style:J}of this.fragments){let K=J.getFeaturesetDescriptors();for(let oe of K)A.push({targetId:x,filter:C,target:oe})}}let R=this.queryRenderedTargets(l,A,g),B=[],H=new Set;for(let G of R)for(let J of G.variants[x])b_(J,G,H)||B.push(new r.dt(G,J));return B}queryRenderedTargets(l,p,g){let C={},x=(R,B,H,G)=>{let J=C[B.id]=C[B.id]||{sourceCache:B,layers:{},has3DLayers:!1};if(J.layers[R.fqid]=J.layers[R.fqid]||{styleLayer:R,targets:[]},R.is3D(!!this.terrain)&&(J.has3DLayers=!0),!G)return H.uniqueFeatureID=!1,void J.layers[R.fqid].targets.push(H);J.layers[R.fqid].targets.push(Object.assign({},H,{namespace:G.namespace,properties:G.properties,uniqueFeatureID:G.uniqueFeatureID}))};for(let R of p)if("featuresetId"in R.target){let{featuresetId:B,importId:H}=R.target,G=this.getFragmentStyle(H);if(!G||!G._featuresetSelectors)continue;let J=G._featuresetSelectors[B];if(!J){this.fire(new r.y(new Error(`The featureset '${B}' does not exist in the map's style and cannot be queried for features.`)));continue}for(let K of J){let oe=G.getOwnLayer(K.layerId);oe&&!Ka.has(oe.type)&&x(oe,G.getOwnLayerSourceCache(oe),R,K)}}else if("layerId"in R.target){let{layerId:B}=R.target,H=this.getLayer(B);if(!H||Ka.has(H.type))continue;x(H,this.getLayerSourceCache(H),R)}let A=this._queryRenderedFeatures(l,C,g);return this._flattenAndSortRenderedFeatures(A)}_queryRenderedFeatures(l,p,g){let C=[],x=!!this.map._showQueryGeometry,A=ml.createFromScreenPoints(l,g);for(let R in p){let B=$x(A,p[R],this._availableImages,g,x);Object.keys(B).length&&C.push(B)}if(this.placement)for(let R in p){if(!p[R].sourceCache._onlySymbols)continue;let B=TS(A.screenGeometry,p[R],this._availableImages,this.placement.collisionIndex,this.placement.retainedQueryData,this.map.getWorldview());Object.keys(B).length&&C.push(B)}return C}querySourceFeatures(l,p){let g=p&&p.filter;g&&this._validate(ge,"querySourceFeatures.filter",g,null,p);let C=[],x=this.getOwnSourceCaches(l);for(let A of x)C=C.concat(ff(A,p));return C}addSourceType(l,p,g){return eh.getSourceType(l)?g(new Error(`A source type called "${l}" already exists.`)):(eh.setSourceType(l,p),p.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:l,url:p.workerSourceURL},g):g(null,null))}getFlatLight(){return this.light.getLight()}setFlatLight(l,p,g={}){this._checkLoaded();let C=this.light.getLight(),x=!1;for(let R in l)if(!r.by(l[R],C[R])){x=!0;break}if(!x)return;let A=this._getTransitionParameters();this.light.setLight(l,p,g),this.light.updateTransitions(A)}getTerrain(){return this.terrain&&this.terrain.drapeRenderMode===1?this.terrain.get():null}setTerrainForDraping(){this.setTerrain({source:"",exaggeration:0},0)}checkCanvasFingerprintNoise(){this.disableElevatedTerrain===void 0&&(this.disableElevatedTerrain=r.o.hasCanvasFingerprintNoise(),this.disableElevatedTerrain&&r.w("Terrain and hillshade are disabled because of Canvas2D limitations when fingerprinting protection is enabled (e.g. in private browsing mode)."))}setTerrain(l,p=1){if(this._checkLoaded(),!l)return this.terrainSetForDrapingOnly()||(delete this.terrain,this.map.transform.projection.requiresDraping&&this.setTerrainForDraping()),p===0&&delete this.terrain,l===null?this.stylesheet.terrain=null:delete this.stylesheet.terrain,this._force3DLayerUpdate(),void(this._markersNeedUpdate=!0);this.checkCanvasFingerprintNoise();let g=l,C=l.source==null;if(p===1){if(this.disableElevatedTerrain)return;if(typeof g.source=="object"){let R="terrain-dem-src";this.addSource(R,g.source),g=r.dk(g),g=Object.assign(g,{source:R})}let x=Object.assign({},g),A={};if(this.terrain&&C){x.source=this.terrain.get().source;let R=this.terrain?this.getFragmentStyle(this.terrain.scope):null;R&&(A.style=R.serialize())}if(this._validate(Pi,"terrain",x,A))return}if(!this.terrain||this.terrain.scope!==this.scope&&!C||this.terrain&&p!==this.terrain.drapeRenderMode){if(!g)return;this._createTerrain(g,p),this.fire(new r.z("data",{dataType:"style"}))}else{let x=this.terrain,A=x.get();for(let R of Object.keys(r.a6.terrain))!g.hasOwnProperty(R)&&r.a6.terrain[R].default&&(g[R]=r.a6.terrain[R].default);for(let R in l)if(!r.by(l[R],A[R])){x.set(l,this.options),this.stylesheet.terrain=l;let B=this._getTransitionParameters({duration:0});x.updateTransitions(B),this.fire(new r.z("data",{dataType:"style"}));break}}this.mergeTerrain(),this.updateDrapeFirstLayers(),this._markersNeedUpdate=!0}_createFog(l){let p=this.fog=new Hr(l,this.map.transform,this.scope,this.options);this.stylesheet.fog=p.get();let g=this._getTransitionParameters({duration:0});p.updateTransitions(g)}_createSnow(l){let p=this.snow=new Tc(l,this.map.transform,this.scope,this.options);this.stylesheet.snow=p.get();let g=this._getTransitionParameters({duration:0});p.updateTransitions(g)}_createRain(l){let p=this.rain=new oa(l,this.map.transform,this.scope,this.options);this.stylesheet.rain=p.get();let g=this._getTransitionParameters({duration:0});p.updateTransitions(g)}_updateMarkersOpacity(){this.map._markers.length!==0&&this.map._requestDomTask(()=>{for(let l of this.map._markers)l._evaluateOpacity()})}getFog(){return this.fog?this.fog.get():null}setFog(l){if(this._checkLoaded(),!l)return delete this.fog,delete this.stylesheet.fog,void(this._markersNeedUpdate=!0);if(this.fog){let p=this.fog;if(!r.by(p.get(),l)){p.set(l,this.options),this.stylesheet.fog=p.get();let g=this._getTransitionParameters({duration:0});p.updateTransitions(g)}}else this._createFog(l);this._markersNeedUpdate=!0}getSnow(){return this.snow?this.snow.get():null}setSnow(l){if(this._checkLoaded(),!l)return delete this.snow,void delete this.stylesheet.snow;if(this.snow){let p=this.snow;if(!r.by(p.get(),l)){p.set(l,this.options),this.stylesheet.snow=p.get();let g=this._getTransitionParameters({duration:0});p.updateTransitions(g)}}else this._createSnow(l);this._markersNeedUpdate=!0}getRain(){return this.rain?this.rain.get():null}setRain(l){if(this._checkLoaded(),!l)return delete this.rain,void delete this.stylesheet.rain;if(this.rain){let p=this.rain;if(!r.by(p.get(),l)){p.set(l,this.options),this.stylesheet.rain=p.get();let g=this._getTransitionParameters({duration:0});p.updateTransitions(g)}}else this._createRain(l);this._markersNeedUpdate=!0}_reloadColorTheme(){let l=()=>{for(let C in this._layers)this._layers[C].lut=this._styleColorTheme.lut;for(let C in this._sourceCaches)this._sourceCaches[C].clearTiles()},p=this._styleColorTheme.colorThemeOverride?this._styleColorTheme.colorThemeOverride:this._styleColorTheme.colorTheme;if(!p)return this._styleColorTheme.lut=null,void l();let g=this._evaluateColorThemeData(p);this._loadColorTheme(g).then(()=>{this.fire(new r.z("colorthemeset")),l()}).catch(C=>{r.w(`Couldn't set color theme: ${C}`)})}setColorTheme(l){this._checkLoaded(),this._styleColorTheme.colorThemeOverride&&r.w("Note: setColorTheme is called on a style with a color-theme override, the passed color-theme won't be visible."),this._styleColorTheme.colorTheme=l,this._reloadColorTheme()}setImportColorTheme(l,p){let g=this.getFragmentStyle(l);g&&(g._styleColorTheme.colorThemeOverride=p,g._reloadColorTheme())}_getTransitionParameters(l){return{now:r.o.now(),transition:Object.assign(this.transition,l)}}updateDrapeFirstLayers(){if(!this.terrain)return;let l=[],p=[];for(let g of this._mergedOrder)this.isLayerDraped(this._mergedLayers[g])?l.push(g):p.push(g);this._drapedFirstOrder=[],this._drapedFirstOrder.push(...l),this._drapedFirstOrder.push(...p)}_createTerrain(l,p){let g=this.terrain=new Wt(l,p,this.scope,this.options,this.map.getWorldview());p===1&&(this.stylesheet.terrain=l),this.mergeTerrain(),this.updateDrapeFirstLayers(),this._force3DLayerUpdate();let C=this._getTransitionParameters({duration:0});g.updateTransitions(C)}_force3DLayerUpdate(){for(let l in this._layers){let p=this._layers[l];p.type==="fill-extrusion"&&this._updateLayer(p)}}_forceSymbolLayerUpdate(){for(let l in this._layers){let p=this._layers[l];p.type==="symbol"&&this._updateLayer(p)}}_validate(l,p,g,C,x={}){if(x&&x.validate===!1)return!1;let A=Object.assign({},this.serialize());return Wi(this,l.call(nu,Object.assign({key:p,style:A,value:g,styleSpec:r.a6},C)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),r.du.off("pluginStateChange",this._rtlTextPluginCallback);for(let l in this._mergedLayers)this._mergedLayers[l].setEventedParent(null);for(let l in this._mergedSourceCaches)this._mergedSourceCaches[l].clearTiles(),this._mergedSourceCaches[l].setEventedParent(null);this.imageManager.removeScope(this.scope),this.setEventedParent(null),delete this.fog,delete this.snow,delete this.rain,delete this.terrain,delete this.ambientLight,delete this.directionalLight,this.isRootStyle()&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this.modelManager.setEventedParent(null),this.modelManager.destroy(),this.dispatcher.remove())}clearSource(l){let p=this.getSourceCaches(l);for(let g of p)g.clearTiles()}clearSources(){for(let l in this._mergedSourceCaches)this._mergedSourceCaches[l].clearTiles()}clearLayers(){for(let l in this._mergedLayers){let p=this._mergedLayers[l];p._clear&&p._clear()}}reloadSource(l){let p=this.getSourceCaches(l);for(let g of p)g.resume(),g.reload()}reloadSources(){for(let l of this.getSources())l.reload&&l.reload()}reloadModels(){this.modelManager.reloadModels(""),this.forEachFragmentStyle(l=>{l.modelManager.reloadModels(l.scope)})}updateSources(l){let p;this.directionalLight&&(p=Nb(this.directionalLight));let g=new Set;for(let C in this._mergedLayers){let x=this._mergedLayers[C];x.hasElevation()&&!g.has(x.source)&&g.add(x.source)}for(let C in this._mergedSourceCaches){let x=this._mergedSourceCaches[C],A=g.has(x._source.id);x.update(l,void 0,void 0,p,A)}}_generateCollisionBoxes(){for(let l in this._sourceCaches){let p=this._sourceCaches[l];p.resume(),p.reload()}}_updatePlacement(l,p,g,C,x,A,R=!1){let B=!1,H=!1,G={},J={};for(let K of this._mergedOrder){let oe=this._mergedLayers[K];if(oe.type!=="symbol")continue;let le=r.B(oe.source,oe.scope),de=G[le];if(!de){let he=this.getLayerSourceCache(oe);if(!he)continue;let Te=he.getRenderableIds(!0).map(Pe=>he.getTileByID(Pe));J[le]=Te.slice(),de=G[le]=Te.sort((Pe,Ve)=>Ve.tileID.overscaledZ-Pe.tileID.overscaledZ||(Pe.tileID.isLessThan(Ve.tileID)?-1:1))}let Ce=this.crossTileSymbolIndex.addLayer(oe,de,p.center.lng,p.projection);B=B||Ce}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._mergedOrder),R=R||this._layerOrderChanged||C===0,this._layerOrderChanged&&this.fire(new r.z("neworder")),(R||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(r.o.now(),p.zoom))&&(this.pauseablePlacement=new wu(p,this._mergedOrder,R,g,C,x,this.placement,this.fog&&p.projection.supportsFog?this.fog.state:null,this._buildingIndex),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._mergedOrder,this._mergedLayers,G,J,this.map.painter.scaleFactor),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(r.o.now()),H=!0),B&&this.pauseablePlacement.placement.setStale()),H||B){this._buildingIndex.onNewFrame(p.zoom);for(let K=0;Kx===l.id)!==-1)return void this.fire(new r.y(new Error(`Import with id '${l.id}' already exists in the map's style.`)));if(!p)return g.push(l),this._loadImports([l],!0);let C=g.findIndex(({id:x})=>x===p);return C===-1&&this.fire(new r.y(new Error(`Import with id "${p}" does not exist on this map.`))),this.stylesheet.imports=g.slice(0,C).concat(l).concat(g.slice(C)),this._loadImports([l],!0,p)}updateImport(l,p){this._checkLoaded();let g=this.stylesheet.imports||[],C=this.getImportIndex(l);return C===-1?this:typeof p=="string"?(this.setImportUrl(l,p),this):(p.url&&p.url!==g[C].url&&this.setImportUrl(l,p.url),r.by(p.config,g[C].config)||this.setImportConfig(l,p.config,p.data.schema),r.by(p.data,g[C].data)||this.setImportData(l,p.data),this)}moveImport(l,p){this._checkLoaded();let g=this.stylesheet.imports||[],C=this.getImportIndex(l);if(C===-1)return this;let x=this.getImportIndex(p);if(x===-1)return this;let A=g[C],R=this.fragments[C];return g=g.filter(({id:B})=>B!==l),this.fragments=this.fragments.filter(({id:B})=>B!==l),this.stylesheet.imports=g.slice(0,x).concat(A).concat(g.slice(x)),this.fragments=this.fragments.slice(0,x).concat(R).concat(this.fragments.slice(x)),this.mergeLayers(),this}setImportUrl(l,p){this._checkLoaded();let g=this.stylesheet.imports||[],C=this.getImportIndex(l);if(C===-1)return this;g[C].url=p;let x=this.fragments[C];return x.style=this._createFragmentStyle(g[C]),x.style.on("style.import.load",()=>this.mergeAll()),x.style.loadURL(p),this}setImportData(l,p){this._checkLoaded();let g=this.getImportIndex(l),C=this.stylesheet.imports||[];return g===-1?this:p?(this.fragments[g].style.setState(p),this._reloadImports(),this):(delete C[g].data,this.setImportUrl(l,C[g].url))}setImportConfig(l,p,g){this._checkLoaded();let C=this.getImportIndex(l),x=this.stylesheet.imports||[];if(C===-1)return this;p?x[C].config=p:delete x[C].config;let A=this.fragments[C];g&&A.style.stylesheet&&(A.style.stylesheet.schema=g);let R=A.style.stylesheet&&A.style.stylesheet.schema;return A.config=p,A.style.updateConfig(p,R),this.updateConfigDependencies(),this}removeImport(l){this._checkLoaded();let p=this.stylesheet.imports||[],g=this.getImportIndex(l);g!==-1&&(p.splice(g,1),this.fragments[g].style._remove(),this.fragments.splice(g,1),this._reloadImports())}getImportIndex(l){let p=(this.stylesheet.imports||[]).findIndex(g=>g.id===l);return p===-1&&this.fire(new r.y(new Error(`Import '${l}' does not exist in the map's style and cannot be updated.`))),p}getLayer(l){return this._mergedLayers[l]}getSources(){let l=[];for(let p in this._mergedOtherSourceCaches){let g=this._mergedOtherSourceCaches[p];g&&l.push(g.getSource())}return l}getSource(l,p){let g=this.getSourceCache(l,p);return g&&g.getSource()}getLayerSource(l){let p=this.getLayerSourceCache(l);return p&&p.getSource()}getSourceCache(l,p){let g=r.B(l,p);return this._mergedOtherSourceCaches[g]}getLayerSourceCache(l){let p=r.B(l.source,l.scope);return l.type==="symbol"?this._mergedSymbolSourceCaches[p]:this._mergedOtherSourceCaches[p]}getSourceCaches(l){if(l==null)return Object.values(this._mergedSourceCaches);let p=[];return this._mergedOtherSourceCaches[l]&&p.push(this._mergedOtherSourceCaches[l]),this._mergedSymbolSourceCaches[l]&&p.push(this._mergedSymbolSourceCaches[l]),p}updateSourceCaches(){let l=this._changes.getUpdatedSourceCaches();for(let p in l){let g=l[p];g==="reload"?this.reloadSource(p):g==="clear"&&this.clearSource(p)}}updateLayers(l){let p=this._changes.getUpdatedPaintProperties();for(let g of p){let C=this.getLayer(g);C&&C.updateTransitions(l)}}getGlyphsUrl(){return this.stylesheet.glyphs}setGlyphsUrl(l){this.stylesheet.glyphs=l,this.glyphManager.setURL(l)}getImages(l,p,g){this.imageManager.getImages(p.images,p.scope,g),this._updateTilesForChangedImages();let C=A=>{if(A){let R=p.images.map(B=>r.I.toString(B));A.setDependencies(p.tileID.key,p.type,R)}},x=r.B(p.source,p.scope);C(this._mergedOtherSourceCaches[x]),C(this._mergedSymbolSourceCaches[x]),p.images.some(A=>A.iconsetId)&&this.fire(new r.z("data",{dataType:"style"}))}rasterizeImages(l,p,g){this.imageManager.rasterizeImages(p,g)}getGlyphs(l,p,g){this.glyphManager.getGlyphs(p.stacks,g)}getResource(l,p,g){return r.dv(p,g)}getOwnSourceCache(l){return this._otherSourceCaches[l]}getOwnLayerSourceCache(l){return l.type==="symbol"?this._symbolSourceCaches[l.source]:this._otherSourceCaches[l.source]}getOwnSourceCaches(l){let p=[];return this._otherSourceCaches[l]&&p.push(this._otherSourceCaches[l]),this._symbolSourceCaches[l]&&p.push(this._symbolSourceCaches[l]),p}_isSourceCacheLoaded(l){let p=this.getOwnSourceCaches(l);return p.length===0?(this.fire(new r.y(new Error(`There is no source with ID '${l}'`))),!1):p.every(g=>g.loaded())}has3DLayers(){return this._has3DLayers}hasSymbolLayers(){return this._hasSymbolLayers}hasCircleLayers(){return this._hasCircleLayers}isLayerClipped(l,p){if(!this._clipLayerPresent&&l.type!=="fill-extrusion"&&l.type!=="building")return!1;let g=l.type==="fill-extrusion"&&(l.sourceLayer==="building"||l.sourceLayer==="procedural_buildings"),C=l.type==="building";if(l.is3D(!!this.terrain)){if(g||C||p&&p.type==="batched-model"||l.type==="model")return!0}else if(l.type==="symbol")return!0;return!1}_clearWorkerCaches(){this.dispatcher.broadcast("clearCaches")}destroy(){this._clearWorkerCaches(),this.fragments.forEach(l=>{l.style._remove()}),this.terrainSetForDrapingOnly()&&(delete this.terrain,delete this.stylesheet.terrain)}}eh.getSourceType=function(_){return bb[_]},eh.setSourceType=function(_,l){bb[_]=l},eh.registerForPluginStateChange=r.dw;class DM{execute(l){let p=this._makeBuildingsQueryArea(l),g=this._makeFloorsQueryArea(l),C=l.queryRenderedFeatures(p).reduce((H,G)=>{let J=G.properties.id;return G.properties.type!=="building"||H.some(K=>K.properties.id===J)||H.push(G),H},[]),x=l.queryRenderedFeatures(g).reduce((H,G)=>{let J=G.properties.id;return G.properties.type!=="floor"||H.some(K=>K.properties.id===J)||H.push(G),H},[]),A=[l.getCenter().lng,l.getCenter().lat],R=this._findBuildingAtCenter(A,C),B=C.length>0?C[0]:null;return{floors:x.map(H=>({id:H.properties.id,name:H.properties.name,isDefault:H.properties.is_default,zIndex:H.properties.z_index,connectedFloorIds:H.properties.connected_floor_ids,conflictedFloorIds:H.properties.conflicted_floor_ids,buildingIds:H.properties.building_ids})),building:R?{id:R.properties.id,name:R.properties.name}:{id:B.properties.id,name:B.properties.name}}}_makeBuildingsQueryArea(l){let p=l.transform.width,g=l.transform.height,C=Math.min(p,g)*(1/8),x=.5*(p-C),A=.5*(g-C);return[new r.P(x,A),new r.P(x+C,A+C)]}_makeFloorsQueryArea(l){let p=l.transform.width,g=l.transform.height;return[new r.P(0,0),new r.P(p,g)]}_findBuildingAtCenter(l,p){for(let g of p)if(g.geometry.type==="Polygon"&&this._pointInPolygon(l,g.geometry.coordinates[0]))return g;return null}_pointInPolygon(l,p){let g=!1;for(let C=0,x=p.length-1;Cl[1]!=B>l[1]&&l[0]<(p[x][0]-A)*(l[1]-R)/(B-R)+A&&(g=!g)}return g}}class Mh{constructor(){this._floors=new Map,this._buildings=new Map}append(l){let p=l.building,g=!1;if(p){let C=p.id;C&&(this._buildings.set(C,p),g||this._buildings.has(C)||(g=!0))}return l.floors.forEach(C=>{let x=C.id;g||this._floors.has(x)||(g=!0),this._floors.set(x,C)}),g}clear(){this._floors.clear(),this._buildings.clear()}getFloors(l=null){let p=Array.from(this._floors.values());return l?p.filter(g=>{let C=g.buildingIds;return!!C&&C.split(";").includes(l)}):p}}class t1{constructor(){this._selectedFloorId=null,this._selectedBuildingId=null,this._lastActiveFloors=[],this._featuresStorage=new Mh}setIndoorData(l){let p=this._featuresStorage.append(l);return this._selectedBuildingId=l.building?l.building.id:null,p}setFloorId(l){let p=this._selectedFloorId!==l;return p&&(this._selectedFloorId=l),p}getCurrentBuildingSelection(){if(!this._selectedBuildingId)return{selectedFloorId:null,floors:[]};let l=this._featuresStorage.getFloors(this._selectedBuildingId),p=this.getActiveFloors().find(g=>{let C=g.buildingIds;if(!C)return!1;let x=C.split(";");return!!this._selectedBuildingId&&x.includes(this._selectedBuildingId)});return{selectedFloorId:p?p.id:null,floors:l}}getActiveFloors(l=!1){let p=this._featuresStorage.getFloors(),g=p.find(B=>B.id===this._selectedFloorId),C=p.filter(B=>B.isDefault===!0),x=[];if(g)return x=this._calculateCurrentActiveFloors(p,g,C,l),x;if(C.length===0){let B=this._featuresStorage.getFloors(this._selectedBuildingId);x=B.length>0?[B[0]]:[]}else x=C;let A=this._getNonConflictingLastActiveFloors(x),R=[...x,...A];return this._lastActiveFloors=R,R}hasBuildingChanged(l){return this._selectedBuildingId!==(l.building?l.building.id:null)}hasActiveBuilding(){return this._selectedBuildingId!==null}isEmpty(){return this._selectedFloorId===null&&this._selectedBuildingId===null&&this._lastActiveFloors.length===0}_calculateCurrentActiveFloors(l,p,g,C){if(!p)return this._getNonConflictingDefaultFloors(this._lastActiveFloors,g);let x=this._getConnectedFloors(p,l);return C?this._buildExplicitSelectionFloors(p,x,g):this._buildImplicitSelectionFloors(x,g)}_getConnectedFloors(l,p){let g=l.connectedFloorIds;if(!g)return[];let C=new Set(g.split(";"));return p.filter(x=>C.has(x.id))}_buildExplicitSelectionFloors(l,p,g){let C=[l,...p],x=this._getNonConflictingLastActiveFloors(C),A=[...C,...x],R=this._deduplicateFloors(A),B=this._getConflictingFloorIdsFrom(R),H=g.filter(J=>!B.has(J.id)),G=[...R,...H];return this._lastActiveFloors=G,G}_buildImplicitSelectionFloors(l,p){let g=this._getConflictingFloorIdsFrom(this._lastActiveFloors),C=p.filter(A=>!g.has(A.id)),x=this._deduplicateFloors([...this._lastActiveFloors,...C]);return this._lastActiveFloors=x,x}_getNonConflictingDefaultFloors(l,p){let g=this._getConflictingFloorIdsFrom(l),C=p.filter(A=>!g.has(A.id)),x=this._deduplicateFloors([...l,...C]);return this._lastActiveFloors=x,x}_deduplicateFloors(l){let p=new Set;return l.filter(g=>{let C=g.id;return!p.has(C)&&(p.add(C),!0)})}_getConflictingFloorIdsFrom(l){let p=new Set;return l.forEach(g=>{let C=g.conflictedFloorIds;C&&C.split(";").forEach(x=>p.add(x))}),p}_getNonConflictingLastActiveFloors(l){if(!this._lastActiveFloors||this._lastActiveFloors.length===0)return[];let p=new Set(l.map(C=>C.id)),g=this._getConflictingFloorIdsFrom(l);return this._lastActiveFloors.filter(C=>{let x=C.id;return!p.has(x)&&!g.has(x)})}_isFloorConflicted(l,p){let g=l.id;return p.some(C=>{let x=C.conflictedFloorIds;return!!x&&x.split(";").includes(g)})}reset(){this._selectedFloorId=null,this._selectedBuildingId=null,this._lastActiveFloors=[],this._featuresStorage.clear()}}class Ny extends r.E{constructor(l){super(),r.aY(["_onLoad","_onMove"],this),this._map=l,this._floorSelectionState=new t1,this._queryIndoor(),this._map.on("load",this._onLoad),this._map.on("move",this._onMove)}destroy(){this._map.off("load",this._onLoad),this._map.off("move",this._onMove),this._map=null,this._floorSelectionState=null}selectFloor(l){this._floorSelectionState.setFloorId(l)&&this._updateIndoorConfig(!0)}_onLoad(){this._map.style.forEachFragmentStyle(l=>{l.stylesheet.indoor&&(this._indoorDataQuery?this.fire(new r.y(new Error("Multiple indoor map styles detected, simultaneous usage is not allowed currently."))):(this._scope=l.scope,this._indoorDataQuery=new DM))}),this._map._addIndoorControl(),this._queryIndoor()}_onMove(){this._queryIndoor()}_queryIndoor(){if(!this._indoorDataQuery||!this._map.isStyleLoaded())return;if(this._map.transform.zoom<15)return void this._clearIndoorData();let l=this._indoorDataQuery.execute(this._map);if(!l||l.floors.length===0||this._map.transform.zoom<16)this._clearIndoorData();else if(this._floorSelectionState.hasBuildingChanged(l)){if(!l.building&&this._floorSelectionState.getActiveFloors().length<=0)return void this._clearIndoorData();this._setIndoorData(l),l.building&&this._updateIndoorSelector()}else this._setIndoorData(l)}_setIndoorData(l){this._floorSelectionState.setIndoorData(l)&&this._updateIndoorConfig()}_clearIndoorData(){this._floorSelectionState.isEmpty()||(this._floorSelectionState.reset(),this._updateIndoorSelector(),this._map.setConfigProperty(this._scope,"activeFloors",["literal",[]]))}_updateIndoorSelector(){let l=this._floorSelectionState.getCurrentBuildingSelection(),p=l.floors.map(g=>({id:g.id,name:g.name,shortName:g.zIndex.toString(),levelOrder:g.zIndex}));this.fire(new r.z("indoorupdate",{selectedFloorId:l.selectedFloorId,floors:p}))}_updateIndoorConfig(l=!1){let p=this._floorSelectionState.getActiveFloors(l).map(g=>g.id)||[];this._map.setConfigProperty(this._scope,"activeFloors",["literal",p])}}var xg=` #define EPSILON 0.0000001 #define PI 3.141592653589793 #ifdef RENDER_CUTOFF float cutoff_opacity(vec4 cutoff_params,float depth) {float near=cutoff_params.x;float far=cutoff_params.y;float cutoffStart=cutoff_params.z;float cutoffEnd=cutoff_params.w;float linearDepth=(depth-near)/(far-near);return clamp((linearDepth-cutoffStart)/(cutoffEnd-cutoffStart),0.0,1.0);} #endif`,Vb=` out vec4 glFragColor;highp float unpack_depth(highp vec4 rgba_depth) {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;} #ifdef INDICATOR_CUTOUT uniform vec3 u_indicator_cutout_centers;uniform vec4 u_indicator_cutout_params; #endif vec4 applyCutout(vec4 color,float height) { #ifdef INDICATOR_CUTOUT float verticalFadeRange=u_indicator_cutout_centers.z*0.25;float holeMinOpacity=mix(1.0,u_indicator_cutout_params.x,smoothstep(u_indicator_cutout_centers.z,u_indicator_cutout_centers.z+verticalFadeRange,height));float holeRadius=max(u_indicator_cutout_params.y,0.0);float holeAspectRatio=u_indicator_cutout_params.z;float fadeStart=u_indicator_cutout_params.w;float distA=distance(vec2(gl_FragCoord.x,gl_FragCoord.y*holeAspectRatio),vec2(u_indicator_cutout_centers[0],u_indicator_cutout_centers[1]*holeAspectRatio));return color*min(smoothstep(fadeStart,holeRadius,distA)+holeMinOpacity,1.0); #else return color; #endif } #ifdef DEBUG_WIREFRAME #define HANDLE_WIREFRAME_DEBUG \\ glFragColor=vec4(0.7,0.0,0.0,0.7); \\ gl_FragDepth=gl_FragCoord.z-0.0001; #else #define HANDLE_WIREFRAME_DEBUG #endif #ifdef RENDER_CUTOFF uniform highp vec4 u_cutoff_params;in float v_cutoff_opacity; #endif vec4 textureLodCustom(sampler2D image,highp vec2 pos,highp vec2 lod_coord) {highp vec2 size=vec2(textureSize(image,0));highp vec2 dx=dFdx(lod_coord.xy*size);highp vec2 dy=dFdy(lod_coord.xy*size);highp float delta_max_sqr=max(dot(dx,dx),dot(dy,dy));highp float lod=0.5*log2(delta_max_sqr);return textureLod(image,pos,lod);}vec4 applyLUT(highp sampler3D lut,vec4 col) {vec3 size=vec3(textureSize(lut,0));vec3 uvw=(col.rbg*float(size-1.0)+0.5)/size;return vec4(texture(lut,uvw).rgb*col.a,col.a);}vec3 applyLUT(highp sampler3D lut,vec3 col) {return applyLUT(lut,vec4(col,1.0)).rgb;}`,zb=` #define EXTENT 8192.0 #define RAD_TO_DEG 180.0/PI #define DEG_TO_RAD PI/180.0 #define GLOBE_RADIUS EXTENT/PI/2.0 float 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;} #ifdef PROJECTION_GLOBE_VIEW vec3 mercator_tile_position(mat4 matrix,vec2 tile_anchor,vec3 tile_id,vec2 mercator_center) { #ifndef PROJECTED_POS_ON_VIEWPORT float 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; #else return vec3(0.0); #endif }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);} #endif vec2 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( unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 );}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 vec2 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 (units_to_pixels*pos+offset)/pattern_size;}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) {return get_pattern_pos(pixel_coord_upper,pixel_coord_lower,pattern_size,vec2(tile_units_to_pixels),pos);}float mercatorXfromLng(float lng) {return (180.0+lng)/360.0;}float mercatorYfromLat(float lat) {return (180.0-(RAD_TO_DEG*log(tan(PI/4.0+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);} #ifdef RENDER_CUTOFF uniform vec4 u_cutoff_params;out float v_cutoff_opacity; #endif const vec4 AWAY=vec4(-1000.0,-1000.0,-1000.0,1);const float skirtOffset=24575.0;vec3 decomposeToPosAndSkirt(vec2 posWithComposedSkirt) {float skirt=float(posWithComposedSkirt.x >=skirtOffset);vec2 pos=posWithComposedSkirt-vec2(skirt*skirtOffset,0.0);return vec3(pos,skirt);}`,Wa="in highp vec3 a_pos_3f;uniform lowp mat4 u_matrix;out 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;}",Ub=` #define ELEVATION_SCALE 7.0 #define ELEVATION_OFFSET 450.0 #ifdef PROJECTION_GLOBE_VIEW uniform 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( mix(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;} #else vec3 elevationVector(vec2 pos) { return vec3(0,0,1); } #endif #ifdef TERRAIN uniform highp sampler2D u_dem;uniform highp sampler2D u_dem_prev;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;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 currentElevation(vec2 apos) { #ifdef TERRAIN_DEM_FLOAT_FORMAT vec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale+u_dem_tl)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture(u_dem,pos).r; #else float 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=texture(u_dem,pos).r;float tr=texture(u_dem,pos+vec2(dd,0)).r;float bl=texture(u_dem,pos+vec2(0,dd)).r;float br=texture(u_dem,pos+vec2(dd,dd)).r;return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y); #endif }float prevElevation(vec2 apos) { #ifdef TERRAIN_DEM_FLOAT_FORMAT vec2 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*texture(u_dem_prev,pos).r; #else float 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=texture(u_dem_prev,pos).r;float tr=texture(u_dem_prev,pos+vec2(dd,0)).r;float bl=texture(u_dem_prev,pos+vec2(0,dd)).r;float br=texture(u_dem_prev,pos+vec2(dd,dd)).r;return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y); #endif } #ifdef TERRAIN_VERTEX_MORPHING float elevation(vec2 apos) { #ifdef ZERO_EXAGGERATION return 0.0; #endif float nextElevation=currentElevation(apos);float prevElevation=prevElevation(apos);return mix(prevElevation,nextElevation,u_dem_lerp);} #else float elevation(vec2 apos) { #ifdef ZERO_EXAGGERATION return 0.0; #endif return currentElevation(apos);} #endif vec4 fourSample(vec2 pos,vec2 off) {float tl=texture(u_dem,pos).r;float tr=texture(u_dem,pos+vec2(off.x,0.0)).r;float bl=texture(u_dem,pos+vec2(0.0,off.y)).r;float br=texture(u_dem,pos+off).r;return 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);} #else float elevation(vec2 pos) { return 0.0; } #endif #ifdef DEPTH_OCCLUSION uniform highp sampler2D u_depth;uniform highp vec2 u_depth_size_inv;uniform highp vec2 u_depth_range_unpack;uniform highp float u_occluder_half_size;uniform highp float u_occlusion_depth_offset; #ifdef DEPTH_D24 float unpack_depth(float depth) {return depth*u_depth_range_unpack.x+u_depth_range_unpack.y;}vec4 unpack_depth4(vec4 depth) {return depth*u_depth_range_unpack.x+vec4(u_depth_range_unpack.y);} #else highp float unpack_depth_rgba(vec4 rgba_depth) {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;} #endif bool isOccluded(vec4 frag) {vec3 coord=frag.xyz/frag.w; #ifdef DEPTH_D24 float depth=unpack_depth(texture(u_depth,(coord.xy+1.0)*0.5).r); #else float depth=unpack_depth_rgba(texture(u_depth,(coord.xy+1.0)*0.5)); #endif return coord.z+u_occlusion_depth_offset > depth;}highp vec4 getCornerDepths(vec2 coord) {highp vec3 df=vec3(u_occluder_half_size*u_depth_size_inv,0.0);highp vec2 uv=0.5*coord.xy+0.5; #ifdef DEPTH_D24 highp vec4 depth=vec4( texture(u_depth,uv-df.xz).r,texture(u_depth,uv+df.xz).r,texture(u_depth,uv-df.zy).r,texture(u_depth,uv+df.zy).r );depth=unpack_depth4(depth); #else highp vec4 depth=vec4( unpack_depth_rgba(texture(u_depth,uv-df.xz)),unpack_depth_rgba(texture(u_depth,uv+df.xz)),unpack_depth_rgba(texture(u_depth,uv-df.zy)),unpack_depth_rgba(texture(u_depth,uv+df.zy)) ); #endif return depth;}highp float occlusionFadeMultiSample(vec4 frag) {highp vec3 coord=frag.xyz/frag.w;highp vec2 uv=0.5*coord.xy+0.5;int NX=3;int NY=4;highp vec2 df=u_occluder_half_size*u_depth_size_inv;highp vec2 oneStep=2.0*u_occluder_half_size*u_depth_size_inv/vec2(NX-1,NY-1);highp float res=0.0;for (int y=0; y < NY;++y) {for (int x=0; x < NX;++x) { #ifdef DEPTH_D24 highp float depth=unpack_depth(texture(u_depth,uv-df+vec2(float(x)*oneStep.x,float(y)*oneStep.y)).r); #else highp float depth=unpack_depth_rgba(texture(u_depth,uv-df+vec2(float(x)*oneStep.x,float(y)*oneStep.y))); #endif res+=1.0-clamp(300.0*(coord.z+u_occlusion_depth_offset-depth),0.0,1.0);}}res=clamp(2.0*res/float(NX*NY)-0.5,0.0,1.0);return res;}highp float occlusionFade(vec4 frag) {highp vec3 coord=frag.xyz/frag.w;highp vec4 depth=getCornerDepths(coord.xy);return dot(vec4(0.25),vec4(1.0)-clamp(300.0*(vec4(coord.z+u_occlusion_depth_offset)-depth),0.0,1.0));} #else bool isOccluded(vec4 frag) { return false; }highp float occlusionFade(vec4 frag) { return 1.0; }highp float occlusionFadeMultiSample(vec4 frag) { return 1.0; } #endif//DEPTH_OCCLUSION`,NS=`#ifdef FOG uniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump mat4 u_fog_matrix;out 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);} #endif`,By=`#ifdef FOG uniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump vec2 u_fog_vertical_limit;uniform mediump float u_fog_temporal_offset;in 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; #ifdef FLIP_Y uv.y=1.0-uv.y; #endif highp vec3 ray_dir=mix( mix(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 opacity_limit) {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,min(opacity,opacity_limit));}vec3 fog_apply(vec3 color,vec3 pos) {return fog_apply(color,pos,1.0);}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;}vec4 fog_apply_premultiplied(vec4 color,vec3 pos,float heightMeters) {float verticalProgress=(u_fog_vertical_limit.x > 0.0 || u_fog_vertical_limit.y > 0.0) ? smoothstep(u_fog_vertical_limit.x,u_fog_vertical_limit.y,heightMeters) : 0.0;float opacityLimit=1.0-smoothstep(0.9,1.0,fog_opacity(pos));return mix(fog_apply_premultiplied(color,pos),color,min(verticalProgress,opacityLimit));}vec3 fog_dither(vec3 color) {return color;}vec4 fog_dither(vec4 color) {return vec4(fog_dither(color.rgb),color.a);} #endif`,Oh=`#ifdef RASTER_ARRAY uniform highp sampler2D u_image0;uniform sampler2D u_image1;const vec4 NODATA=vec4(1);ivec4 _raTexLinearCoord(highp vec2 texCoord,highp vec2 texResolution,out highp vec2 fxy) {texCoord=texCoord*texResolution-0.5;fxy=fract(texCoord);texCoord-=fxy;return ivec4(texCoord.xxyy+vec2(1.5,0.5).xyxy);}vec2 _raTexLinearMix(highp vec2 fxy,highp vec4 colorMix,highp float colorOffset,highp vec4 t00,highp vec4 t10,highp vec4 t01,highp vec4 t11) {vec2 c00=t00==NODATA ? vec2(0) : vec2(colorOffset+dot(t00,colorMix),1);vec2 c10=t10==NODATA ? vec2(0) : vec2(colorOffset+dot(t10,colorMix),1);vec2 c01=t01==NODATA ? vec2(0) : vec2(colorOffset+dot(t01,colorMix),1);vec2 c11=t11==NODATA ? vec2(0) : vec2(colorOffset+dot(t11,colorMix),1);return mix(mix(c01,c11,fxy.x),mix(c00,c10,fxy.x),fxy.y);}vec2 raTexture2D_image0_linear(highp vec2 texCoord,highp vec2 texResolution,highp vec4 colorMix,highp float colorOffset) {vec2 fxy;ivec4 c=_raTexLinearCoord(texCoord,texResolution,fxy);return _raTexLinearMix(fxy,colorMix,colorOffset,texelFetch(u_image0,c.yz,0),texelFetch(u_image0,c.xz,0),texelFetch(u_image0,c.yw,0),texelFetch(u_image0,c.xw,0) );}vec2 raTexture2D_image1_linear(highp vec2 texCoord,highp vec2 texResolution,highp vec4 colorMix,highp float colorOffset) {vec2 fxy;ivec4 c=_raTexLinearCoord(texCoord,texResolution,fxy);return _raTexLinearMix(fxy,colorMix,colorOffset,texelFetch(u_image1,c.yz,0),texelFetch(u_image1,c.xz,0),texelFetch(u_image1,c.yw,0),texelFetch(u_image1,c.xw,0) );}vec2 raTexture2D_image0_nearest(highp vec2 texCoord,highp vec2 texResolution,highp vec4 colorMix,highp float colorOffset) {vec4 t=texelFetch(u_image0,ivec2(texCoord*texResolution),0);return t==NODATA ? vec2(0) : vec2(colorOffset+dot(t,colorMix),1);}vec2 raTexture2D_image1_nearest(highp vec2 texCoord,highp vec2 texResolution,highp vec4 colorMix,highp float colorOffset) {vec4 t=texelFetch(u_image1,ivec2(texCoord*texResolution),0);return t==NODATA ? vec2(0) : vec2(colorOffset+dot(t,colorMix),1);} #endif`,BS=`#ifdef RASTER_ARRAY uniform sampler2D u_velocity;uniform mediump vec2 u_velocity_res;uniform mediump float u_max_speed;const vec4 NO_DATA=vec4(1);const vec2 INVALID_VELOCITY=vec2(-1);uniform highp vec2 u_uv_offset;uniform highp float u_data_offset;uniform highp vec2 u_data_scale;ivec4 rasterArrayLinearCoord(highp vec2 texCoord,highp vec2 texResolution,out highp vec2 fxy) {texCoord=texCoord*texResolution-0.5;fxy=fract(texCoord);texCoord-=fxy;return ivec4(texCoord.xxyy+vec2(1.5,0.5).xyxy);}highp vec2 lookup_velocity(highp vec2 uv) {uv=u_uv_offset.x+u_uv_offset.y*uv;highp vec2 fxy;ivec4 c=rasterArrayLinearCoord(uv,u_velocity_res,fxy);highp vec4 tl=texelFetch(u_velocity,c.yz,0);highp vec4 tr=texelFetch(u_velocity,c.xz,0);highp vec4 bl=texelFetch(u_velocity,c.yw,0);highp vec4 br=texelFetch(u_velocity,c.xw,0);if (tl==NO_DATA) {return INVALID_VELOCITY;}if (tr==NO_DATA) {return INVALID_VELOCITY;}if (bl==NO_DATA) {return INVALID_VELOCITY;}if (br==NO_DATA) {return INVALID_VELOCITY;}highp vec4 t=mix(mix(bl,br,fxy.x),mix(tl,tr,fxy.x),fxy.y);highp vec2 velocity=u_data_offset+vec2(dot(t.rg,u_data_scale),dot(t.ba,u_data_scale));velocity.y=-velocity.y;velocity/=max(u_max_speed,length(velocity));return velocity;} #endif uniform highp float u_particle_pos_scale;uniform highp vec2 u_particle_pos_offset;highp vec4 pack_pos_to_rgba(highp vec2 p) {highp vec2 v=(p+u_particle_pos_offset)/u_particle_pos_scale;highp vec4 r=vec4(v.x,fract(v.x*255.0),v.y,fract(v.y*255.0));return vec4(r.x-r.y/255.0,r.y,r.z-r.w/255.0,r.w);}highp vec2 unpack_pos_from_rgba(highp vec4 v) {v=floor(v*255.0+0.5)/255.0;highp vec2 p=vec2(v.x+(v.y/255.0),v.z+(v.w/255.0));return u_particle_pos_scale*p-u_particle_pos_offset;}`,qi=`#ifdef RENDER_SHADOWS uniform mediump vec3 u_shadow_direction;uniform highp vec3 u_shadow_normal_offset;vec3 shadow_normal_offset(vec3 normal) {float tileInMeters=u_shadow_normal_offset[0];vec3 n=vec3(-normal.xy,tileInMeters*normal.z);float dotScale=min(1.0-dot(normal,u_shadow_direction),1.0)*0.5+0.5;return n*dotScale;}vec3 shadow_normal_offset_model(vec3 normal) {vec3 transformed_normal=vec3(-normal.xy,normal.z);float NDotL=dot(normalize(transformed_normal),u_shadow_direction);float dotScale=min(1.0-NDotL,1.0)*0.5+0.5;return normal*dotScale;}float shadow_normal_offset_multiplier0() {return u_shadow_normal_offset[1];}float shadow_normal_offset_multiplier1() {return u_shadow_normal_offset[2];} #endif//RENDER_SHADOWS`,Hb=`#ifdef RENDER_SHADOWS precision highp sampler2DShadow;uniform sampler2DShadow u_shadowmap_0;uniform sampler2DShadow u_shadowmap_1;uniform float u_shadow_intensity;uniform float u_shadow_map_resolution;uniform float u_shadow_texel_size;uniform highp vec3 u_shadow_normal_offset;uniform vec2 u_fade_range;uniform mediump vec3 u_shadow_direction;uniform highp vec3 u_shadow_bias;float shadow_sample(sampler2DShadow shadowmap,highp vec3 pos,highp float bias) { #ifdef CLIP_ZERO_TO_ONE highp vec3 coord=vec3(pos.xy*0.5+0.5,pos.z-bias); #else highp vec3 coord=vec3(pos.xy*0.5+0.5,pos.z*0.5+0.5-bias); #endif return texture(shadowmap,coord);}float shadow_occlusion(highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth,highp float bias) {light_view_pos0.xyz/=light_view_pos0.w; #ifdef SHADOWS_SINGLE_CASCADE vec2 abs_bounds=abs(light_view_pos0.xy);if (abs_bounds.x >=1.0 || abs_bounds.y >=1.0) {return 0.0;}return shadow_sample(u_shadowmap_0,light_view_pos0.xyz,bias); #else light_view_pos1.xyz/=light_view_pos1.w;vec4 abs_bounds=abs(vec4(light_view_pos0.xy,light_view_pos1.xy));if (abs_bounds.x < 1.0 && abs_bounds.y < 1.0) {return shadow_sample(u_shadowmap_0,light_view_pos0.xyz,bias);}if (abs_bounds.z >=1.0 || abs_bounds.w >=1.0) {return 0.0;}float occlusion1=shadow_sample(u_shadowmap_1,light_view_pos1.xyz,bias);return clamp(mix(occlusion1,0.0,smoothstep(u_fade_range.x,u_fade_range.y,view_depth)),0.0,1.0); #endif }highp float calculate_shadow_bias(float NDotL) { #ifdef NORMAL_OFFSET return 0.5*u_shadow_bias.x; #else return 0.5*(u_shadow_bias.x+clamp(u_shadow_bias.y*tan(acos(NDotL)),0.0,u_shadow_bias.z)); #endif }float shadowed_light_factor_normal(vec3 N,highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth) {float NDotL=dot(N,u_shadow_direction);float bias=calculate_shadow_bias(NDotL);float occlusion=shadow_occlusion(light_view_pos0,light_view_pos1,view_depth,bias);return mix(0.0,(1.0-(u_shadow_intensity*occlusion))*NDotL,step(0.0,NDotL));}float shadowed_light_factor_normal_opacity(vec3 N,highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth,float shadow_opacity) {float NDotL=dot(N,u_shadow_direction);float bias=calculate_shadow_bias(NDotL);float occlusion=shadow_occlusion(light_view_pos0,light_view_pos1,view_depth,bias)*shadow_opacity;return mix(0.0,(1.0-(u_shadow_intensity*occlusion))*NDotL,step(0.0,NDotL));}float shadowed_light_factor_normal_unbiased(vec3 N,highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth) {float NDotL=dot(N,u_shadow_direction);float bias=0.0;float occlusion=shadow_occlusion(light_view_pos0,light_view_pos1,view_depth,bias);return mix(0.0,(1.0-(u_shadow_intensity*occlusion))*NDotL,step(0.0,NDotL));}highp vec2 compute_receiver_plane_depth_bias(highp vec3 pos_dx,highp vec3 pos_dy) {highp vec2 biasUV=vec2( pos_dy.y*pos_dx.z-pos_dx.y*pos_dy.z,pos_dx.x*pos_dy.z-pos_dy.x*pos_dx.z);biasUV*=1.0/((pos_dx.x*pos_dy.y)-(pos_dx.y*pos_dy.x));return biasUV;}float shadowed_light_factor_plane_bias(highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth) {highp vec3 light_view_pos0_xyz=light_view_pos0.xyz/light_view_pos0.w*0.5+0.5;highp vec3 light_view_pos0_ddx=dFdx(light_view_pos0_xyz);highp vec3 light_view_pos0_ddy=dFdy(light_view_pos0_xyz);highp vec2 plane_depth_bias=compute_receiver_plane_depth_bias(light_view_pos0_ddx,light_view_pos0_ddy);highp float bias=dot(vec2(u_shadow_texel_size,u_shadow_texel_size),plane_depth_bias)+0.0001;float occlusion=shadow_occlusion(light_view_pos0,light_view_pos1,view_depth,bias);return 1.0-(u_shadow_intensity*occlusion);}float shadowed_light_factor(highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth) {float bias=0.0;float occlusion=shadow_occlusion(light_view_pos0,light_view_pos1,view_depth,bias);return 1.0-(u_shadow_intensity*occlusion);}float shadow_occlusion(float ndotl,highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth) {float bias=calculate_shadow_bias(ndotl);return shadow_occlusion(light_view_pos0,light_view_pos1,view_depth,bias);} #endif`;let Rh=[];wp(xg,Rh),wp(zb,Rh),wp(Vb,Rh);let w_={"_prelude_fog.vertex.glsl":NS,"_prelude_terrain.vertex.glsl":Ub,"_prelude_shadow.vertex.glsl":qi,"_prelude_fog.fragment.glsl":By,"_prelude_shadow.fragment.glsl":Hb,"_prelude_lighting.glsl":` #ifdef LIGHTING_3D_MODE uniform mediump vec3 u_lighting_ambient_color;uniform mediump vec3 u_lighting_directional_dir;uniform mediump vec3 u_lighting_directional_color;uniform mediump vec3 u_ground_radiance;float calculate_ambient_directional_factor(vec3 normal) {float NdotL=dot(normal,u_lighting_directional_dir);const float factor_reduction_max=0.3;float dir_luminance=dot(u_lighting_directional_color,vec3(0.2126,0.7152,0.0722));float directional_factor_min=1.0-factor_reduction_max*min(dir_luminance,1.0);float ambient_directional_factor=mix(directional_factor_min,1.0,min((NdotL+1.0),1.0));const float vertical_factor_min=0.92;float vertical_factor=mix(vertical_factor_min,1.0,normal.z*0.5+0.5);return vertical_factor*ambient_directional_factor;}vec3 linearProduct(vec3 srgbIn,vec3 k) {return srgbIn*pow(k,vec3(1./2.2));}vec3 apply_lighting(vec3 color,vec3 normal,float dir_factor) {float ambient_directional_factor=calculate_ambient_directional_factor(normal);vec3 ambient_contrib=ambient_directional_factor*u_lighting_ambient_color;vec3 directional_contrib=u_lighting_directional_color*dir_factor;return linearProduct(color,ambient_contrib+directional_contrib);}vec4 apply_lighting(vec4 color,vec3 normal,float dir_factor) {return vec4(apply_lighting(color.rgb,normal,dir_factor),color.a);}vec3 apply_lighting(vec3 color,vec3 normal) {float dir_factor=max(dot(normal,u_lighting_directional_dir),0.0);return apply_lighting(color.rgb,normal,dir_factor);}vec4 apply_lighting(vec4 color,vec3 normal) {float dir_factor=max(dot(normal,u_lighting_directional_dir),0.0);return vec4(apply_lighting(color.rgb,normal,dir_factor),color.a);}vec3 apply_lighting_ground(vec3 color) {return color*u_ground_radiance;}vec4 apply_lighting_ground(vec4 color) {return vec4(apply_lighting_ground(color.rgb),color.a);}float calculate_NdotL(vec3 normal) {const float ext=0.70710678118;return (clamp(dot(normal,u_lighting_directional_dir),-ext,1.0)+ext)/(1.0+ext);}vec4 apply_lighting_with_emission_ground(vec4 color,float emissive_strength) {return mix(apply_lighting_ground(color),color,emissive_strength);}vec3 compute_flood_lighting(vec3 flood_light_color,float fully_occluded_factor,float occlusion,vec3 ground_shadow_factor) {vec3 fully_occluded_color=flood_light_color*mix(ground_shadow_factor,vec3(1.0),fully_occluded_factor);float occlusion_ramp=smoothstep(0.0,0.2,1.0-occlusion);return mix(fully_occluded_color,flood_light_color,occlusion_ramp);}vec3 compute_emissive_draped(vec3 unlit_color,float fully_occluded_factor,float occlusion,vec3 ground_shadow_factor) {vec3 fully_occluded_color=unlit_color*mix(ground_shadow_factor,vec3(1.0),fully_occluded_factor);return mix(fully_occluded_color,unlit_color,1.0-occlusion);} #endif//LIGHTING_3D_MODE`,"_prelude_raster_array.glsl":Oh,"_prelude_raster_particle.glsl":BS},jb={};kr("",Ub),kr(By,NS),kr(Hb,qi),kr(Oh,""),kr(BS,"");let M0=kr(Vb,zb),wf=xg;var i1={background:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" uniform vec4 u_color;uniform float u_opacity; #ifdef LIGHTING_3D_MODE in vec4 v_color; #endif void main() {vec4 out_color; #ifdef LIGHTING_3D_MODE out_color=v_color; #else out_color=u_color; #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif glFragColor=out_color*u_opacity; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_lighting.glsl" in vec2 a_pos;uniform mat4 u_matrix; #ifdef LIGHTING_3D_MODE uniform mediump vec4 u_color;out vec4 v_color;uniform float u_emissive_strength; #endif void main() {gl_Position=u_matrix*vec4(a_pos,0,1); #ifdef LIGHTING_3D_MODE v_color=apply_lighting_with_emission_ground(u_color,u_emissive_strength); #endif #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),backgroundPattern:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" uniform vec2 u_pattern_tl;uniform vec2 u_pattern_br;uniform vec2 u_texsize;uniform float u_opacity;uniform float u_emissive_strength;uniform sampler2D u_image;in highp vec2 v_pos;void main() {highp vec2 imagecoord=mod(v_pos,1.0);highp vec2 pos=mix(u_pattern_tl/u_texsize,u_pattern_br/u_texsize,imagecoord);vec4 out_color=textureLodCustom(u_image,pos,v_pos); #ifdef LIGHTING_3D_MODE out_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength); #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif glFragColor=out_color*u_opacity; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" uniform mat4 u_matrix;uniform vec2 u_pattern_size;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec2 u_pattern_units_to_pixels;in vec2 a_pos;out highp 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_pattern_units_to_pixels,a_pos); #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),building:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_shadow.fragment.glsl" #include "_prelude_lighting.glsl" const float window_depth=0.5;const float ao_radius=0.2;in vec4 v_color;in highp vec3 v_normal;in highp vec3 v_pos; #ifdef BUILDING_FAUX_FACADE in lowp float v_faux_facade;in highp float v_faux_facade_ed;in highp vec2 v_faux_facade_window;in highp vec2 v_faux_facade_floor;in highp vec2 v_faux_facade_range;in highp float v_aspect;in highp vec3 v_tbn_0;in highp vec3 v_tbn_1;in highp vec3 v_tbn_2;in highp vec4 v_faux_color_emissive;uniform float u_faux_facade_ao_intensity; #endif #ifdef RENDER_SHADOWS in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in float v_depth_shadows; #endif uniform lowp float u_opacity;uniform vec3 u_camera_pos;uniform highp float u_tile_to_meter;uniform float u_facade_emissive_chance;vec3 linearTosRGB(in vec3 color) {return pow(color,vec3(1./2.2));} #ifdef BUILDING_FAUX_FACADE float hash12(in vec2 p) {vec3 p3 =fract(vec3(p.xyx)*0.1031);p3+=dot(p3,p3.yzx+33.33);return fract((p3.x+p3.y)*p3.z);}float min3(in vec3 v) {return min(min(v.x,v.y),v.z);}vec2 get_uv_mask_id(in vec2 q,out float mask,out vec2 id) {vec2 p=q;mask=step(v_faux_facade_range.x,p.y)*step(p.y,v_faux_facade_range.y);p.y=p.y-v_faux_facade_range.x;vec2 uv=modf(p/v_faux_facade_floor,id);vec4 d=(v_faux_facade_floor.xyxy+vec4(-v_faux_facade_window,v_faux_facade_window))*0.5;vec4 edge=d/v_faux_facade_floor.xyxy;vec2 m=step(edge.xy,uv)*step(uv,edge.zw);mask*=m.x*m.y;uv-=vec2(0.5);uv*=vec2(0.5)/(vec2(0.5)-edge.xy);uv+=vec2(0.5);return uv;}float ray_unit_box(in vec3 ray_o,in vec3 ray_d,in vec3 bmin,in vec3 bmax) {vec3 planes=mix(bmin,bmax,step(0.0,ray_d));vec3 t=(planes-ray_o)/ray_d;return min3(t);}float get_emissive(in vec2 id) {if (u_facade_emissive_chance > 0.0) {return (step(hash12(id),u_facade_emissive_chance)+0.05)*v_faux_color_emissive.a;}return 0.0;}vec3 get_shade_info(in vec3 v,in vec3 v_normalized,in vec3 color,in vec2 id,in mat3 tbn,inout vec3 out_normal,inout float out_emissive) {vec3 out_color=color;vec3 abs_v=abs(v_normalized);bool x_major=abs_v.x >=abs_v.y && abs_v.x >=abs_v.z;bool y_major=abs_v.y >=abs_v.x && abs_v.y >=abs_v.z;bool z_major=abs_v.z >=abs_v.x && abs_v.z >=abs_v.y; #if 0 if (x_major) {out_color=v.x > 0.0 ? vec3(1.0,0.0,0.0) : vec3(0.0,1.0,1.0);} else if (y_major) {out_color=v.y > 0.0 ? vec3(0.0,1.0,0.0) : vec3(1.0,0.0,1.0);} else if (z_major) {out_color=v.z > 0.0 ? vec3(0.0,0.0,1.0) : vec3(1.0,1.0,0.0);}out_emissive=1.0; #else if (x_major) {out_normal=sign(v.x)*tbn[0];} else if (y_major) {out_normal=vec3(0.0,0.0,-sign(v.y));} else if (z_major) {out_color=v_faux_color_emissive.rgb;out_emissive=v.z <=0.0 ? get_emissive(id) : out_emissive;}float ao=1.0;if (u_faux_facade_ao_intensity > 0.0) {vec4 ao_range=v_faux_facade_window.xxyy*0.5-vec4(0,ao_radius,0,ao_radius);vec2 ao_range_z=vec2(window_depth*0.5)-vec2(0.0,ao_radius);if (x_major || y_major) {ao*=smoothstep(-ao_range_z.x,-ao_range_z.y,v.z);} else if (z_major) {ao*=smoothstep(-ao_range.x,-ao_range.y,v.x)*(1.0-smoothstep(ao_range.y,ao_range.x,v.x));ao*=smoothstep(-ao_range.z,-ao_range.w,v.y)*(1.0-smoothstep(ao_range.w,ao_range.z,v.y));}ao=mix(1.0,min(1.0,ao+0.25),u_faux_facade_ao_intensity);}out_color*=ao; #endif return out_color;} #endif vec3 apply_lighting_linear(in vec3 color,in vec3 normal,in float dir_factor) {float ambient_directional_factor=calculate_ambient_directional_factor(normal);vec3 ambient_contrib=ambient_directional_factor*u_lighting_ambient_color;vec3 directional_contrib=u_lighting_directional_color*dir_factor;return color*(ambient_contrib+directional_contrib);}void main() {vec3 normal=normalize(v_normal);vec3 base_color=v_color.rgb;float emissive=v_color.a; #ifdef BUILDING_FAUX_FACADE if (v_faux_facade > 0.0) {mat3 tbn=mat3(v_tbn_0,v_tbn_1,v_tbn_2);vec3 v=vec3(v_pos.xy,v_pos.z/u_tile_to_meter)-u_camera_pos;vec3 view_tangent=transpose(tbn)*v;vec2 q=vec2(v_faux_facade_ed,v_pos.z);float mask=0.0;vec2 id=vec2(0.0);vec2 uv=get_uv_mask_id(q,mask,id);uv*=v_faux_facade_window;vec3 bmin=vec3(0.0,0.0,-window_depth);vec3 bmax=bmin+vec3(v_faux_facade_window,window_depth);vec3 ray_o=vec3(uv,0.0);vec3 ray_d=normalize(view_tangent);float t_min=ray_unit_box(ray_o,ray_d,bmin,bmax);vec3 hit=ray_o+t_min*ray_d;vec3 r=vec3(v_faux_facade_window,-window_depth);hit-=r*0.5;vec3 normalized=hit/r;vec3 out_normal=normal;float out_emissive=emissive;vec3 room_color=get_shade_info(hit,normalized,base_color,id,tbn,out_normal,out_emissive);base_color=mix(base_color,room_color,mask);normal=mix(normal,out_normal,mask);emissive=mix(emissive,out_emissive,mask);} #endif vec4 color=vec4(base_color,1.0);vec3 xy_flipped_normal=vec3(-normal.xy,normal.z);float shadowed_lighting_factor=0.0; #ifdef RENDER_SHADOWS shadowed_lighting_factor=shadowed_light_factor_normal(xy_flipped_normal,v_pos_light_view_0,v_pos_light_view_1,v_depth_shadows); #else shadowed_lighting_factor=dot(normal,u_lighting_directional_dir); #endif color.rgb=apply_lighting_linear(color.rgb,xy_flipped_normal,shadowed_lighting_factor);color.rgb=mix(color.rgb,base_color.rgb,emissive); #ifdef FOG color=fog_dither(fog_apply_premultiplied(color,v_fog_pos,v_pos.z)); #endif color.rgb=linearTosRGB(color.rgb);color*=u_opacity; #ifdef INDICATOR_CUTOUT color=applyCutout(color,v_pos.z); #endif glFragColor=color; #ifdef DEBUG_SHOW_NORMALS color.rgb=xy_flipped_normal*0.5+vec3(0.5,0.5,0.5);color.a=1.0;glFragColor=color; #endif #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_shadow.vertex.glsl" in vec3 a_pos_3f;in vec3 a_normal_3;in vec3 a_centroid_3;in vec4 a_faux_facade_data;in vec2 a_faux_facade_vertical_range;uniform mat4 u_matrix;uniform mat4 u_normal_matrix;uniform highp float u_tile_to_meter;out vec4 v_color;out vec3 v_normal;out highp vec3 v_pos; #ifdef BUILDING_FAUX_FACADE out lowp float v_faux_facade;out highp float v_faux_facade_ed;out highp vec2 v_faux_facade_window;out highp vec2 v_faux_facade_floor;out highp vec2 v_faux_facade_range;out highp float v_aspect;out highp vec3 v_tbn_0;out highp vec3 v_tbn_1;out highp vec3 v_tbn_2;out highp vec4 v_faux_color_emissive; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out float v_depth_shadows; #endif const float MAX_UINT_16=65535.0;const float MAX_INT_16=32767.0;const float MAX_UINT_8=255.0;const float TWO_POW_8=256.0;vec3 sRGBToLinear(vec3 srgbIn) {return pow(srgbIn,vec3(2.2));} #ifdef BUILDING_FAUX_FACADE mat3 get_tbn(in vec3 normal) {const vec3 bitangent=vec3(0.0,0.0,1.0);vec3 tangent=normalize(vec3(normal.y,-normal.x,0.0));return mat3(tangent,bitangent,normal);} #endif #pragma mapbox: define-attribute-vertex-shader-only highp vec2 part_color_emissive #pragma mapbox: define-attribute-vertex-shader-only highp vec2 faux_facade_color_emissive void main() { #pragma mapbox: initialize-attribute-custom highp vec2 part_color_emissive #pragma mapbox: initialize-attribute-custom highp vec2 faux_facade_color_emissive vec4 color_emissive=decode_color(part_color_emissive);v_color=vec4(sRGBToLinear(color_emissive.rgb),color_emissive.a);vec3 a_normal_3f=a_normal_3/MAX_INT_16;v_normal=vec3(u_normal_matrix*vec4(a_normal_3f,0.0));float hidden=0.0; #ifdef BUILDING_FAUX_FACADE v_faux_facade=a_faux_facade_data.x;if (v_faux_facade > 0.0) {v_faux_facade_ed=a_faux_facade_data.x *u_tile_to_meter;float window_x_perc=floor(a_faux_facade_data.y/TWO_POW_8);float window_y_perc=a_faux_facade_data.y-TWO_POW_8*window_x_perc;vec2 window_perc=vec2(window_x_perc,window_y_perc)/MAX_UINT_8;v_faux_facade_floor=(a_faux_facade_data.zw/MAX_UINT_16*EXTENT)*u_tile_to_meter;v_faux_facade_window=window_perc*v_faux_facade_floor;v_faux_facade_range=(a_faux_facade_vertical_range/MAX_UINT_16*EXTENT)*u_tile_to_meter;v_aspect=v_faux_facade_window.x/v_faux_facade_window.y;mat3 tbn=get_tbn(normalize(v_normal));v_tbn_0=tbn[0];v_tbn_1=tbn[1];v_tbn_2=tbn[2];v_faux_color_emissive=decode_color(faux_facade_color_emissive);v_faux_color_emissive.rgb=sRGBToLinear(v_faux_color_emissive.rgb);} #endif v_pos=a_pos_3f; #ifdef RENDER_CUTOFF vec4 ground=u_matrix*vec4(a_centroid_3,1.0);v_cutoff_opacity=cutoff_opacity(u_cutoff_params,ground.z);hidden=float(v_cutoff_opacity==0.0);v_pos.z*=v_cutoff_opacity; #endif #ifdef RENDER_SHADOWS vec3 shadow_pos=v_pos; #ifdef NORMAL_OFFSET vec3 offset=shadow_normal_offset_model(v_normal);shadow_pos+=offset*shadow_normal_offset_multiplier0(); #endif v_pos_light_view_0=u_light_matrix_0*vec4(shadow_pos,1.0);v_pos_light_view_1=u_light_matrix_1*vec4(shadow_pos,1.0);v_depth_shadows=gl_Position.w; #endif #ifdef FOG v_fog_pos=fog_position(v_pos); #endif gl_Position=mix(u_matrix*vec4(v_pos,1),AWAY,hidden);}`),buildingBloom:kr(`in vec4 v_color_emissive; #pragma mapbox: define-attribute highp vec4 bloom_attenuation #pragma mapbox: initialize-attribute highp vec4 bloom_attenuation float saturate(float val) {return clamp(val,0.0,1.0);}void main() {float emission=v_color_emissive.a;float opacity=1.0; #ifdef HAS_ATTRIBUTE_a_bloom_attenuation float distance=length(vec2(1.3*max(0.0,abs(bloom_attenuation.x)-bloom_attenuation.z),bloom_attenuation.y));distance+= mix(0.5,0.0,clamp(emission-1.0,0.0,1.0));opacity*=saturate(1.0-distance*distance); #endif glFragColor=vec4(v_color_emissive.rgb,1.0)*opacity;}`,`in vec3 a_pos_3f; #pragma mapbox: define-attribute-vertex-shader-only highp vec2 part_color_emissive #pragma mapbox: define-attribute highp vec4 bloom_attenuation out vec4 v_color_emissive;uniform mat4 u_matrix;vec3 sRGBToLinear(vec3 srgbIn) {return pow(srgbIn,vec3(2.2));}void main() { #pragma mapbox: initialize-attribute-custom highp vec2 part_color_emissive #pragma mapbox: initialize-attribute highp vec4 bloom_attenuation #ifdef HAS_ATTRIBUTE_a_part_color_emissive vec4 color_emissive=decode_color(part_color_emissive);float part_emissive=color_emissive.a*5.0;v_color_emissive=vec4(sRGBToLinear(color_emissive.rgb),part_emissive); #else v_color_emissive=vec4(1.0); #endif gl_Position=u_matrix*vec4(a_pos_3f,1.0);}`),buildingDepth:kr(`in highp float v_depth;void main() { #ifndef DEPTH_TEXTURE glFragColor=pack_depth(v_depth); #endif }`,"in vec3 a_pos_3f;uniform mat4 u_matrix;out highp float v_depth;void main() {gl_Position=u_matrix*vec4(a_pos_3f,1.0);v_depth=gl_Position.z/gl_Position.w;}"),circle:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" in vec3 v_data;in float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity uniform float u_emissive_strength;void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=v_data.xy;float blur_positive=blur < 0.0 ? 0.0 : 1.0;lowp float antialiasblur=v_data.z;float extrude_length=length(extrude)+antialiasblur*(1.0-blur_positive);float antialiased_blur=-max(abs(blur),antialiasblur);float antialiase_blur_opacity=smoothstep(0.0,antialiasblur,extrude_length-1.0);float opacity_t=blur_positive==1.0 ? smoothstep(0.0,-antialiased_blur,1.0-extrude_length) : smoothstep(antialiased_blur,0.0,extrude_length-1.0)-antialiase_blur_opacity;float color_t=stroke_width < 0.01 ? 0.0 : smoothstep( antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width) );vec4 out_color=mix(color*opacity,stroke_color*stroke_opacity,color_t); #ifdef LIGHTING_3D_MODE out_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength); #endif #ifdef FOG out_color=fog_apply_premultiplied(out_color,v_fog_pos); #endif glFragColor=out_color*(v_visibility*opacity_t); #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif }`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_terrain.vertex.glsl" #define NUM_VISIBILITY_RINGS 2 #define INV_SQRT2 0.70710678 #define ELEVATION_BIAS 0.0001 #define NUM_SAMPLES_PER_RING 16 uniform mat4 u_matrix;uniform mat2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;in vec2 a_pos; #ifdef PROJECTION_GLOBE_VIEW in vec3 a_pos_3;in 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; #endif #ifdef ELEVATED_ROADS in float a_circle_z_offset; #endif out vec3 v_data;out float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity vec2 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) { #if defined(TERRAIN) return elevation(pos)+ELEVATION_BIAS; #else return 0.0; #endif }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); #ifdef PITCH_WITH_MAP #ifdef PROJECTION_GLOBE_VIEW return u_matrix*( world_center+vec4(sample_offset.x*surface_vectors[0]+sample_offset.y*surface_vectors[1],0) ); #else return u_matrix*( world_center+vec4(sample_offset,0,0) ); #endif #else return projected_center+vec4(sample_offset,0,0); #endif }float get_sample_step() { #ifdef PITCH_WITH_MAP return 2.0*PI/float(NUM_SAMPLES_PER_RING); #else return PI/float(NUM_SAMPLES_PER_RING); #endif }void main(void) { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 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; #ifdef PROJECTION_GLOBE_VIEW vec3 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); #else surface_vectors=mat3(1.0);float height=circle_elevation(circle_center);world_center=vec4(circle_center,height,1); #endif #ifdef ELEVATED_ROADS world_center.z+=a_circle_z_offset+ELEVATION_BIAS; #endif vec4 projected_center=u_matrix*world_center;float view_scale=0.0; #ifdef PITCH_WITH_MAP #ifdef SCALE_WITH_MAP view_scale=1.0; #else view_scale=projected_center.w/u_camera_to_center_distance; #endif #else #ifdef SCALE_WITH_MAP view_scale=u_camera_to_center_distance; #else view_scale=projected_center.w; #endif #endif gl_Position=project_vertex(extrude,world_center,projected_center,radius,stroke_width,view_scale,surface_vectors);float visibility=0.0; #ifdef TERRAIN float step=get_sample_step();vec4 occlusion_world_center;vec4 occlusion_projected_center; #ifdef PITCH_WITH_MAP float 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; #else occlusion_world_center=world_center;occlusion_projected_center=projected_center; #endif for(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); #else visibility=1.0; #endif #ifdef PROJECTION_GLOBE_VIEW visibility=1.0; #endif v_visibility=visibility;lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur); #ifdef FOG v_fog_pos=fog_position(world_center.xyz); #endif }`),clippingMask:kr("void main() {glFragColor=vec4(1.0);}","in vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:kr(`#include "_prelude_fog.fragment.glsl" uniform highp float u_intensity;in vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);glFragColor=vec4(val,1.0,1.0,1.0); #ifdef FOG if (u_is_globe==0) {glFragColor.r*=pow(1.0-fog_opacity(v_fog_pos),2.0);} #endif #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_terrain.vertex.glsl" #include "_prelude_fog.vertex.glsl" uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;in vec2 a_pos; #ifdef PROJECTION_GLOBE_VIEW in vec3 a_pos_3;in 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; #endif out vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; #define GAUSS_COEF 0.3989422804014327 void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius vec2 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; #ifdef PROJECTION_GLOBE_VIEW vec3 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); #else pos=vec3(tilePos+extrude,elevation(tilePos)); #endif gl_Position=u_matrix*vec4(pos,1); #ifdef FOG v_fog_pos=fog_position(pos); #endif }`),heatmapTexture:kr(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));glFragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(0.0); #endif HANDLE_WIREFRAME_DEBUG;}`,"in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=vec4(a_pos,0,1);v_pos=a_pos*0.5+0.5;}"),collisionBox:kr("in float v_placed;in 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);glFragColor =mix(red,blue,step(0.5,v_placed))*0.5;glFragColor*=mix(1.0,0.1,step(0.5,v_notUsed));}",`#include "_prelude_terrain.vertex.glsl" in vec3 a_pos;in vec2 a_anchor_pos;in vec2 a_extrude;in vec2 a_placed;in vec2 a_shift;in vec2 a_elevation_from_sea;in float a_size_scale;in vec2 a_padding;in float a_auto_z_offset;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance; #ifdef PROJECTION_GLOBE_VIEW uniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform float u_zoom_transition; #endif out float v_placed;out float v_notUsed;void main() {float feature_elevation=a_elevation_from_sea.x+a_auto_z_offset;float terrain_elevation=(a_elevation_from_sea.y==1.0 ? 0.0 : elevation(a_anchor_pos));vec3 proj_pos=a_pos+elevationVector(a_anchor_pos)*(feature_elevation+terrain_elevation); #ifdef PROJECTION_GLOBE_VIEW #ifndef PROJECTED_POS_ON_VIEWPORT vec3 globe_pos=proj_pos;vec3 mercator_pos=mercator_tile_position(u_inv_rot_matrix,a_anchor_pos,u_tile_id,u_merc_center);proj_pos=mix_globe_mercator(globe_pos,mercator_pos,u_zoom_transition); #endif #endif vec4 projectedPoint=u_matrix*vec4(proj_pos,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp( 0.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:kr("in float v_radius;in vec2 v_extrude;in float v_perspective_ratio;in 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);glFragColor=color*alpha*opacity_t;}",`in vec2 a_pos_2f;in float a_radius;in vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;out float v_radius;out vec2 v_extrude;out float v_perspective_ratio;out 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( mix(-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( 0.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:kr("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);glFragColor=mix(u_color,overlay_color,overlay_color.a);}",`#include "_prelude_terrain.vertex.glsl" in vec2 a_pos; #ifdef PROJECTION_GLOBE_VIEW in vec3 a_pos_3; #endif out 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; #ifdef PROJECTION_GLOBE_VIEW gl_Position=u_matrix*vec4(a_pos_3+elevationVector(a_pos)*h,1); #else gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,h,1); #endif }`),elevatedStructuresDepth:kr(`void main() { #ifndef DEPTH_TEXTURE glFragColor=vec4(0.); #endif }`,"in vec2 a_pos;in float a_height;uniform mat4 u_matrix;uniform float u_depth_bias;void main() {gl_Position=u_matrix*vec4(a_pos,a_height,1);gl_Position.z=gl_Position.z+u_depth_bias;}"),elevatedStructuresDepthReconstruct:kr(`#ifdef DEPTH_RECONSTRUCTION in float v_height; #endif void main() { #ifdef DEPTH_RECONSTRUCTION if (v_height >=0.0) discard; #else #ifdef FEATURE_CUTOUT apply_feature_cutout(vec4(0.0,0.0,0.0,1.0),gl_FragCoord); #endif #endif glFragColor=vec4(1.0,0.0,0.0,1.0);}`,`in vec2 a_pos;in float a_height;uniform mat4 u_matrix;uniform vec3 u_camera_pos;uniform highp float u_depth_bias;uniform lowp float u_height_scale;uniform lowp float u_reset_depth; #ifdef DEPTH_RECONSTRUCTION out float v_height; #endif void main() {vec3 vpos=vec3(a_pos,a_height*u_height_scale); #ifdef DEPTH_RECONSTRUCTION if (u_camera_pos.z > vpos.z) {vpos-=(u_camera_pos-vpos)*(vpos.z/(u_camera_pos.z-vpos.z));}v_height=a_height; #endif gl_Position=u_matrix*vec4(vpos,1);gl_Position.z=u_reset_depth==1.0 ? gl_Position.w : gl_Position.z+u_depth_bias;}`),elevatedStructures:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" #include "_prelude_shadow.fragment.glsl" in vec3 v_normal;in float v_height; #ifdef RENDER_SHADOWS in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in float v_depth; #endif vec3 linearTosRGB(vec3 color) {return pow(color,vec3(1./2.2));}vec3 sRGBToLinear(vec3 srgbIn) {return pow(srgbIn,vec3(2.2));}vec3 compute_view_dependent_emissive_color(float ndotl,float emissive_strength,vec3 color) {color=sRGBToLinear(color);color=color*(ndotl+(1.0-min(ndotl*57.29,1.0))*emissive_strength);color=linearTosRGB(color.rgb);return color;}uniform float u_emissive_strength; #pragma mapbox: define highp vec4 structure_color void main() { #pragma mapbox: initialize highp vec4 structure_color vec3 color=structure_color.xyz; #ifdef LIGHTING_3D_MODE vec3 normal=normalize(v_normal);vec3 transformed_normal=vec3(-normal.xy,normal.z);float ndotl=calculate_NdotL(transformed_normal);float emissive_strength=u_emissive_strength;emissive_strength=0.0;vec3 emissive_color=compute_view_dependent_emissive_color(ndotl,emissive_strength,color.xyz); #ifdef RENDER_SHADOWS float shadowed_lighting_factor=shadowed_light_factor_normal(transformed_normal,v_pos_light_view_0,v_pos_light_view_1,v_depth);color.rgb=apply_lighting(color.rgb,transformed_normal,shadowed_lighting_factor); #else color=apply_lighting(color,transformed_normal); #endif color=mix(color,emissive_color,emissive_strength);if (v_height < 0.0) {float penetration=max(v_height+7.5,0.0);float occlusion=1.0-1.0/PI*acos(1.0-penetration/4.0);color=color*(1.0-pow(occlusion,2.0)*0.3);} #endif #ifdef FOG color=fog_apply(color,v_fog_pos); #endif vec4 out_color=vec4(color,1.0); #ifdef INDICATOR_CUTOUT out_color=applyCutout(out_color,v_height); #endif #ifdef FEATURE_CUTOUT out_color=apply_feature_cutout(out_color,gl_FragCoord); #endif glFragColor=out_color;HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_shadow.vertex.glsl" in vec2 a_pos;in float a_height;in vec3 a_pos_normal_3;uniform mat4 u_matrix;out vec3 v_normal;out float v_height; #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out float v_depth; #endif #pragma mapbox: define highp vec4 structure_color void main() { #pragma mapbox: initialize highp vec4 structure_color v_normal=a_pos_normal_3/16384.0;v_height=a_height;vec3 pos=vec3(a_pos,a_height);gl_Position=u_matrix*vec4(pos,1); #ifdef RENDER_SHADOWS vec3 shd_pos0=pos;vec3 shd_pos1=pos; #ifdef NORMAL_OFFSET vec3 offset=shadow_normal_offset(vec3(-v_normal.xy,v_normal.z));shd_pos0+=offset*shadow_normal_offset_multiplier0();shd_pos1+=offset*shadow_normal_offset_multiplier1(); #endif v_pos_light_view_0=u_light_matrix_0*vec4(shd_pos0,1);v_pos_light_view_1=u_light_matrix_1*vec4(shd_pos1,1);v_depth=gl_Position.w; #endif #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),fill:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" #include "_prelude_shadow.fragment.glsl" #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity uniform float u_emissive_strength; #ifdef RENDER_SHADOWS uniform vec3 u_ground_shadow_factor;in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in highp float v_depth; #endif #ifdef ELEVATED_ROADS in highp float v_road_z_offset; #endif #ifdef INDICATOR_CUTOUT in highp float v_z_offset; #endif void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity vec4 out_color=color; #ifdef LIGHTING_3D_MODE out_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength); #ifdef RENDER_SHADOWS float light=shadowed_light_factor(v_pos_light_view_0,v_pos_light_view_1,v_depth);out_color.rgb*=mix(u_ground_shadow_factor,vec3(1.0),light); #endif #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif out_color*=opacity; #ifdef INDICATOR_CUTOUT if (v_z_offset >=0.0) {out_color=applyCutout(out_color,v_z_offset);} #endif #ifdef FEATURE_CUTOUT out_color=apply_feature_cutout(out_color,gl_FragCoord); #endif glFragColor=out_color; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_shadow.vertex.glsl" in vec2 a_pos; #ifdef ELEVATED_ROADS in float a_road_z_offset;out highp float v_road_z_offset; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out highp float v_depth; #endif #ifdef INDICATOR_CUTOUT out highp float v_z_offset; #endif uniform mat4 u_matrix; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity #pragma mapbox: define highp float z_offset void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp float z_offset #ifdef ELEVATED_ROADS z_offset+=a_road_z_offset;v_road_z_offset=z_offset; #endif float hidden=float(opacity==0.0);gl_Position=mix(u_matrix*vec4(a_pos,z_offset,1),AWAY,hidden); #ifdef RENDER_SHADOWS vec3 shd_pos0=vec3(a_pos,z_offset);vec3 shd_pos1=vec3(a_pos,z_offset); #ifdef NORMAL_OFFSET vec3 offset=shadow_normal_offset(vec3(0.0,0.0,1.0));shd_pos0+=offset*shadow_normal_offset_multiplier0();shd_pos1+=offset*shadow_normal_offset_multiplier1(); #endif v_pos_light_view_0=u_light_matrix_0*vec4(shd_pos0,1);v_pos_light_view_1=u_light_matrix_1*vec4(shd_pos1,1);v_depth=gl_Position.w; #endif #ifdef FOG v_fog_pos=fog_position(a_pos); #endif #ifdef INDICATOR_CUTOUT v_z_offset=z_offset; #endif }`),fillOutline:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" #include "_prelude_shadow.fragment.glsl" in highp vec2 v_pos;uniform float u_emissive_strength; #ifdef RENDER_SHADOWS uniform vec3 u_ground_shadow_factor;in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in highp float v_depth; #endif #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=outline_color; #ifdef LIGHTING_3D_MODE out_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength); #ifdef RENDER_SHADOWS float light=shadowed_light_factor(v_pos_light_view_0,v_pos_light_view_1,v_depth);out_color.rgb*=mix(u_ground_shadow_factor,vec3(1.0),light); #endif #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif #ifdef FEATURE_CUTOUT out_color=apply_feature_cutout(out_color,gl_FragCoord); #endif glFragColor=out_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_shadow.vertex.glsl" in vec2 a_pos; #ifdef ELEVATED_ROADS in float a_road_z_offset; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out highp float v_depth; #endif uniform mat4 u_matrix;uniform vec2 u_world;out highp vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity #pragma mapbox: define highp float z_offset void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp float z_offset #ifdef ELEVATED_ROADS z_offset+=a_road_z_offset; #endif float hidden=float(opacity==0.0);gl_Position=mix(u_matrix*vec4(a_pos,z_offset,1),AWAY,hidden); #ifdef FLIP_Y v_pos=(vec2(gl_Position.x,-gl_Position.y)/gl_Position.w+1.0)/2.0*u_world; #else v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; #endif #ifdef RENDER_SHADOWS vec3 shd_pos0=vec3(a_pos,z_offset);vec3 shd_pos1=vec3(a_pos,z_offset); #ifdef NORMAL_OFFSET vec3 offset=shadow_normal_offset(vec3(0.0,0.0,1.0));shd_pos0+=offset*shadow_normal_offset_multiplier0();shd_pos1+=offset*shadow_normal_offset_multiplier1(); #endif v_pos_light_view_0=u_light_matrix_0*vec4(shd_pos0,1);v_pos_light_view_1=u_light_matrix_1*vec4(shd_pos1,1);v_depth=gl_Position.w; #endif #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),fillOutlinePattern:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" #include "_prelude_shadow.fragment.glsl" uniform vec2 u_texsize;uniform sampler2D u_image; #ifdef FILL_PATTERN_TRANSITION uniform float u_pattern_transition; #endif uniform float u_emissive_strength; #ifdef APPLY_LUT_ON_GPU uniform highp sampler3D u_lutTexture; #endif #ifdef RENDER_SHADOWS uniform vec3 u_ground_shadow_factor;in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in highp float v_depth; #endif in highp vec2 v_pos;in highp vec2 v_pos_world; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern #ifdef FILL_PATTERN_TRANSITION #pragma mapbox: define mediump vec4 pattern_b #endif void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern #ifdef FILL_PATTERN_TRANSITION #pragma mapbox: initialize mediump vec4 pattern_b #endif vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;highp vec2 imagecoord=mod(v_pos,1.0);highp vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);highp vec2 lod_pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,v_pos);float dist=length(v_pos_world-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=textureLodCustom(u_image,pos,lod_pos); #ifdef APPLY_LUT_ON_GPU out_color=applyLUT(u_lutTexture,out_color); #endif #ifdef FILL_PATTERN_TRANSITION vec2 pattern_b_tl=pattern_b.xy;vec2 pattern_b_br=pattern_b.zw;highp vec2 pos_b=mix(pattern_b_tl/u_texsize,pattern_b_br/u_texsize,imagecoord);vec4 color_b=textureLodCustom(u_image,pos_b,lod_pos);out_color=out_color*(1.0-u_pattern_transition)+color_b*u_pattern_transition; #endif #ifdef LIGHTING_3D_MODE out_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength); #ifdef RENDER_SHADOWS float light=shadowed_light_factor(v_pos_light_view_0,v_pos_light_view_1,v_depth);out_color.rgb*=mix(u_ground_shadow_factor,vec3(1.0),light); #endif #endif #ifdef FEATURE_CUTOUT out_color=apply_feature_cutout(out_color,gl_FragCoord); #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif glFragColor=out_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_shadow.vertex.glsl" 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;in vec2 a_pos; #ifdef ELEVATED_ROADS in float a_road_z_offset; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out highp float v_depth; #endif out highp vec2 v_pos;out highp vec2 v_pos_world; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern #ifdef FILL_PATTERN_TRANSITION #pragma mapbox: define mediump vec4 pattern_b #endif #pragma mapbox: define lowp float pixel_ratio #pragma mapbox: define highp float z_offset void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern #ifdef FILL_PATTERN_TRANSITION #pragma mapbox: initialize mediump vec4 pattern_b #endif #pragma mapbox: initialize lowp float pixel_ratio #pragma mapbox: initialize highp float z_offset vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw; #ifdef ELEVATED_ROADS z_offset+=a_road_z_offset; #endif float hidden=float(opacity==0.0);gl_Position=mix(u_matrix*vec4(a_pos,z_offset,1),AWAY,hidden);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); #ifdef FLIP_Y v_pos_world=(vec2(gl_Position.x,-gl_Position.y)/gl_Position.w+1.0)/2.0*u_world; #else v_pos_world=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; #endif #ifdef RENDER_SHADOWS vec3 shd_pos0=vec3(a_pos,z_offset);vec3 shd_pos1=vec3(a_pos,z_offset); #ifdef NORMAL_OFFSET vec3 offset=shadow_normal_offset(vec3(0.0,0.0,1.0));shd_pos0+=offset*shadow_normal_offset_multiplier0();shd_pos1+=offset*shadow_normal_offset_multiplier1(); #endif v_pos_light_view_0=u_light_matrix_0*vec4(shd_pos0,1);v_pos_light_view_1=u_light_matrix_1*vec4(shd_pos1,1);v_depth=gl_Position.w; #endif #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),fillPattern:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" #include "_prelude_shadow.fragment.glsl" uniform vec2 u_texsize;uniform sampler2D u_image; #ifdef FILL_PATTERN_TRANSITION uniform float u_pattern_transition; #endif in highp vec2 v_pos;uniform float u_emissive_strength; #ifdef RENDER_SHADOWS uniform vec3 u_ground_shadow_factor;in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in highp float v_depth; #endif #ifdef ELEVATED_ROADS in highp float v_road_z_offset; #endif #ifdef APPLY_LUT_ON_GPU uniform highp sampler3D u_lutTexture; #endif #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern #ifdef FILL_PATTERN_TRANSITION #pragma mapbox: define mediump vec4 pattern_b #endif void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern #ifdef FILL_PATTERN_TRANSITION #pragma mapbox: initialize mediump vec4 pattern_b #endif vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;highp vec2 imagecoord=mod(v_pos,1.0);highp vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);highp vec2 lod_pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,v_pos);vec4 out_color=textureLodCustom(u_image,pos,lod_pos); #ifdef APPLY_LUT_ON_GPU out_color=applyLUT(u_lutTexture,out_color); #endif #ifdef FILL_PATTERN_TRANSITION vec2 pattern_b_tl=pattern_b.xy;vec2 pattern_b_br=pattern_b.zw;highp vec2 pos_b=mix(pattern_b_tl/u_texsize,pattern_b_br/u_texsize,imagecoord);vec4 color_b=textureLodCustom(u_image,pos_b,lod_pos);out_color=out_color*(1.0-u_pattern_transition)+color_b*u_pattern_transition; #endif #ifdef LIGHTING_3D_MODE out_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength); #ifdef RENDER_SHADOWS float light=shadowed_light_factor(v_pos_light_view_0,v_pos_light_view_1,v_depth); #ifdef ELEVATED_ROADS out_color.rgb*=mix(v_road_z_offset !=0.0 ? u_ground_shadow_factor : vec3(1.0),vec3(1.0),light); #else out_color.rgb*=mix(u_ground_shadow_factor,vec3(1.0),light); #endif #endif #endif #ifdef FEATURE_CUTOUT out_color=apply_feature_cutout(out_color,gl_FragCoord); #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif glFragColor=out_color*opacity; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_shadow.vertex.glsl" uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;in vec2 a_pos; #ifdef ELEVATED_ROADS in float a_road_z_offset;out highp float v_road_z_offset; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out highp float v_depth; #endif out highp vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern #ifdef FILL_PATTERN_TRANSITION #pragma mapbox: define mediump vec4 pattern_b #endif #pragma mapbox: define lowp float pixel_ratio #pragma mapbox: define highp float z_offset void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern #pragma mapbox: initialize lowp float pixel_ratio #pragma mapbox: initialize highp float z_offset #ifdef FILL_PATTERN_TRANSITION #pragma mapbox: initialize mediump vec4 pattern_b #endif vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio; #ifdef ELEVATED_ROADS z_offset+=a_road_z_offset;v_road_z_offset=z_offset; #endif float hidden=float(opacity==0.0);gl_Position=mix(u_matrix*vec4(a_pos,z_offset,1),AWAY,hidden);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos); #ifdef RENDER_SHADOWS vec3 shd_pos0=vec3(a_pos,z_offset);vec3 shd_pos1=vec3(a_pos,z_offset); #ifdef NORMAL_OFFSET vec3 offset=shadow_normal_offset(vec3(0.0,0.0,1.0));shd_pos0+=offset*shadow_normal_offset_multiplier0();shd_pos1+=offset*shadow_normal_offset_multiplier1(); #endif v_pos_light_view_0=u_light_matrix_0*vec4(shd_pos0,1);v_pos_light_view_1=u_light_matrix_1*vec4(shd_pos1,1);v_depth=gl_Position.w; #endif #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),fillExtrusion:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_shadow.fragment.glsl" #include "_prelude_lighting.glsl" in vec4 v_color;in vec4 v_flat; #ifdef RENDER_SHADOWS in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1; #endif uniform lowp float u_opacity; #ifdef FAUX_AO uniform lowp vec2 u_ao;in vec2 v_ao; #endif #if defined(ZERO_ROOF_RADIUS) && !defined(LIGHTING_3D_MODE) in vec4 v_roof_color; #endif #if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) || defined(LIGHTING_3D_MODE) in highp vec3 v_normal; #endif uniform vec3 u_flood_light_color;uniform highp float u_vertical_scale;uniform float u_flood_light_intensity;uniform vec3 u_ground_shadow_factor; #if defined(LIGHTING_3D_MODE) && defined(FLOOD_LIGHT) in float v_flood_radius;in float v_has_floodlight; #endif in float v_height; #pragma mapbox: define highp float emissive_strength void main() { #pragma mapbox: initialize highp float emissive_strength #if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) || defined(LIGHTING_3D_MODE) vec3 normal=normalize(v_normal); #endif float z;vec4 color=v_color; #ifdef ZERO_ROOF_RADIUS z=float(normal.z > 0.00001); #ifdef LIGHTING_3D_MODE normal=mix(normal,vec3(0.0,0.0,1.0),z); #else color=mix(v_color,v_roof_color,z); #endif #endif float h=max(0.0,v_height);float ao_shade=1.0; #ifdef FAUX_AO float intensity=u_ao[0];float h_floors=h/(u_ao[1]*u_vertical_scale);float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);ao_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; #ifdef ZERO_ROOF_RADIUS concave*=(1.0-z); #endif 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);ao_shade*=mix(1.0,x_shade*x_shade*x_shade,concave); #ifdef LIGHTING_3D_MODE #ifdef FLOOD_LIGHT color.rgb*=mix(ao_shade,1.0,v_has_floodlight); #else color.rgb*=ao_shade; #endif #else color.rgb*=ao_shade; #endif #endif #ifdef LIGHTING_3D_MODE float flood_radiance=0.0; #ifdef FLOOD_LIGHT flood_radiance=(1.0-min(h/v_flood_radius,1.0))*u_flood_light_intensity*v_has_floodlight; #endif #ifdef RENDER_SHADOWS #ifdef FLOOD_LIGHT float ndotl_unclamped=dot(normal,u_shadow_direction);float ndotl=max(0.0,ndotl_unclamped);float occlusion=ndotl_unclamped < 0.0 ? 1.0 : shadow_occlusion(ndotl,v_pos_light_view_0,v_pos_light_view_1,1.0/gl_FragCoord.w);vec3 litColor=apply_lighting(color.rgb,normal,(1.0-u_shadow_intensity*occlusion)*ndotl);vec3 floodLitColor=compute_flood_lighting(u_flood_light_color*u_opacity,1.0-u_shadow_intensity,occlusion,u_ground_shadow_factor);color.rgb=mix(litColor,floodLitColor,flood_radiance); #else float shadowed_lighting_factor; #ifdef RENDER_CUTOFF shadowed_lighting_factor=shadowed_light_factor_normal_opacity(normal,v_pos_light_view_0,v_pos_light_view_1,1.0/gl_FragCoord.w,v_cutoff_opacity);if (v_cutoff_opacity==0.0) {discard;} #else shadowed_lighting_factor=shadowed_light_factor_normal(normal,v_pos_light_view_0,v_pos_light_view_1,1.0/gl_FragCoord.w); #endif color.rgb=apply_lighting(color.rgb,normal,shadowed_lighting_factor); #endif #else color.rgb=apply_lighting(color.rgb,normal); #ifdef FLOOD_LIGHT color.rgb=mix(color.rgb,u_flood_light_color*u_opacity,flood_radiance); #endif #endif color.rgb=mix(color.rgb,v_flat.rgb,emissive_strength);color*=u_opacity; #endif #ifdef FOG color=fog_dither(fog_apply_premultiplied(color,v_fog_pos,h)); #endif #ifdef INDICATOR_CUTOUT color=applyCutout(color,h); #endif #ifdef FEATURE_CUTOUT color=apply_feature_cutout(color,gl_FragCoord); #endif glFragColor=color; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_terrain.vertex.glsl" #include "_prelude_shadow.vertex.glsl" #include "_prelude_lighting.glsl" 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;uniform float u_width_scale;in vec4 a_pos_normal_ed;in vec2 a_centroid_pos; #ifdef RENDER_WALL_MODE in vec3 a_join_normal_inside; #endif #ifdef PROJECTION_GLOBE_VIEW in vec3 a_pos_3;in 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; #endif #ifdef TERRAIN uniform int u_height_type;uniform int u_base_type; #endif uniform highp float u_vertical_scale;out vec4 v_color;out vec4 v_flat; #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1; #endif #if defined(ZERO_ROOF_RADIUS) && !defined(LIGHTING_3D_MODE) out vec4 v_roof_color; #endif #if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) || defined(LIGHTING_3D_MODE) out highp vec3 v_normal; #endif #ifdef FAUX_AO uniform lowp vec2 u_ao;out vec2 v_ao; #endif #if defined(LIGHTING_3D_MODE) && defined(FLOOD_LIGHT) out float v_flood_radius;out float v_has_floodlight; #endif out float v_height;vec3 linearTosRGB(vec3 color) {return pow(color,vec3(1./2.2));}vec3 sRGBToLinear(vec3 srgbIn) {return pow(srgbIn,vec3(2.2));} #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color #pragma mapbox: define highp float flood_light_wall_radius #pragma mapbox: define highp float line_width #pragma mapbox: define highp float emissive_strength void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize highp float flood_light_wall_radius #pragma mapbox: initialize highp float line_width #pragma mapbox: initialize highp float emissive_strength base*=u_vertical_scale;height*=u_vertical_scale;vec4 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)); #if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) || defined(LIGHTING_3D_MODE) v_normal=normal; #endif base=max(0.0,base);float attr_height=height;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); #if defined(HAS_CENTROID) || defined(TERRAIN) centroid_pos=a_centroid_pos; #endif float ele=0.0;float h=0.0;float c_ele=0.0;vec3 pos; #ifdef TERRAIN bool is_flat_height=centroid_pos.x !=0.0 && u_height_type==1;bool is_flat_base=centroid_pos.x !=0.0 && u_base_type==1;ele=elevation(pos_nx.xy);c_ele=is_flat_height || is_flat_base ? (centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos)) : ele;float h_height=is_flat_height ? max(c_ele+height,ele+base+2.0) : ele+height;float h_base=is_flat_base ? max(c_ele+base,ele+base) : ele+(base==0.0 ?-5.0 : base);h=t > 0.0 ? max(h_base,h_height) : h_base;pos=vec3(pos_nx.xy,h); #else h=t > 0.0 ? height : base;pos=vec3(pos_nx.xy,h); #endif #ifdef PROJECTION_GLOBE_VIEW float 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); #endif float cutoff=1.0;vec3 scaled_pos=pos; #ifdef RENDER_CUTOFF vec3 centroid_random=vec3(centroid_pos.xy,centroid_pos.x+centroid_pos.y+1.0);vec3 ground_pos=centroid_pos.x==0.0 ? pos.xyz : (centroid_random/8.0);vec4 ground=u_matrix*vec4(ground_pos.xy,ele,1.0); #ifdef CLIP_ZERO_TO_ONE cutoff=cutoff_opacity(u_cutoff_params,ground.z*2.0-ground.w); #else cutoff=cutoff_opacity(u_cutoff_params,ground.z); #endif if (centroid_pos.y !=0.0 && centroid_pos.x !=0.0) {vec3 g=floor(ground_pos);vec3 mod_=centroid_random-g*8.0;float seed=min(1.0,0.1*(min(3.5,max(mod_.x+mod_.y,0.2*attr_height))*0.35+mod_.z));if (cutoff < 0.8-seed) {cutoff=0.0;}}float cutoff_scale=cutoff;v_cutoff_opacity=cutoff;scaled_pos.z=mix(c_ele,h,cutoff_scale); #endif float hidden=float((centroid_pos.x==0.0 && centroid_pos.y==1.0) || (cutoff==0.0 && centroid_pos.x !=0.0) || (color.a==0.0)); #ifdef RENDER_WALL_MODE vec2 wall_offset=u_width_scale*line_width*(a_join_normal_inside.xy/EXTENT);scaled_pos.xy+=(1.0-a_join_normal_inside.z)*wall_offset*0.5;scaled_pos.xy-=a_join_normal_inside.z*wall_offset*0.5; #endif gl_Position=mix(u_matrix*vec4(scaled_pos,1),AWAY,hidden);h=h-ele;v_height=h; #ifdef RENDER_SHADOWS vec3 shd_pos0=pos;vec3 shd_pos1=pos; #ifdef NORMAL_OFFSET vec3 offset=shadow_normal_offset(normal);shd_pos0+=offset*shadow_normal_offset_multiplier0();shd_pos1+=offset*shadow_normal_offset_multiplier1(); #endif v_pos_light_view_0=u_light_matrix_0*vec4(shd_pos0,1);v_pos_light_view_1=u_light_matrix_1*vec4(shd_pos1,1); #endif float NdotL=0.0;float colorvalue=0.0; #ifndef LIGHTING_3D_MODE colorvalue=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);if (normal.y !=0.0) {float r=0.84;r=mix(0.7,0.98,1.0-u_lightintensity);NdotL*=( (1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));} #endif #ifdef FAUX_AO float 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; #ifdef TERRAIN top_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); #endif v_ao=vec2(mix(concave,-concave,start),y_ground);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]); #ifdef PROJECTION_GLOBE_VIEW top_height+=u_height_lift; #endif gl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w; #endif #ifdef LIGHTING_3D_MODE #ifdef FLOOD_LIGHT float is_wall=1.0-float(t > 0.0 && top_up_ny.y > 0.0);v_has_floodlight=float(flood_light_wall_radius > 0.0 && is_wall > 0.0);v_flood_radius=flood_light_wall_radius*u_vertical_scale; #endif v_color=vec4(color.rgb,1.0);float ndotl=calculate_NdotL(normal);v_flat.rgb=sRGBToLinear(color.rgb);v_flat.rgb=v_flat.rgb*(ndotl+(1.0-min(ndotl*57.29,1.0))*emissive_strength);v_flat=vec4(linearTosRGB(v_flat.rgb),1.0); #else v_color=vec4(0.0,0.0,0.0,1.0);v_color.rgb+=clamp(color.rgb*NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_color*=u_opacity; #endif #if defined(ZERO_ROOF_RADIUS) && !defined(LIGHTING_3D_MODE) float 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=vec4(0.0,0.0,0.0,1.0);v_roof_color.rgb+=clamp(color.rgb*roofNdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_roof_color*=u_opacity; #endif #ifdef FOG v_fog_pos=fog_position(pos); #endif }`),fillExtrusionDepth:kr(`in highp float v_depth;void main() { #ifndef DEPTH_TEXTURE glFragColor=pack_depth(v_depth); #endif }`,`#include "_prelude_terrain.vertex.glsl" uniform mat4 u_matrix;uniform float u_edge_radius;uniform float u_width_scale;uniform float u_vertical_scale; #ifdef TERRAIN uniform int u_height_type;uniform int u_base_type; #endif in vec4 a_pos_normal_ed;in vec2 a_centroid_pos; #ifdef RENDER_WALL_MODE in vec3 a_join_normal_inside; #endif #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp float line_width #pragma mapbox: define highp vec4 color out highp float v_depth;void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp float line_width #pragma mapbox: initialize highp vec4 color base*=u_vertical_scale;height*=u_vertical_scale;vec3 pos_nx=floor(a_pos_normal_ed.xyz*0.5);mediump vec3 top_up_ny=a_pos_normal_ed.xyz-2.0*pos_nx;base=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); #if defined(HAS_CENTROID) || defined(TERRAIN) centroid_pos=a_centroid_pos; #endif vec3 pos; #ifdef TERRAIN bool is_flat_height=centroid_pos.x !=0.0 && u_height_type==1;bool is_flat_base=centroid_pos.x !=0.0 && u_base_type==1;float ele=elevation(pos_nx.xy);float c_ele=is_flat_height || is_flat_base ? (centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos)) : ele;float h_height=is_flat_height ? max(c_ele+height,ele+base+2.0) : ele+height;float h_base=is_flat_base ? max(c_ele+base,ele+base) : ele+(base==0.0 ?-5.0 : base);float h=t > 0.0 ? max(h_base,h_height) : h_base;pos=vec3(pos_nx.xy,h); #else pos=vec3(pos_nx.xy,t > 0.0 ? height : base); #endif #ifdef RENDER_WALL_MODE vec2 wall_offset=u_width_scale*line_width*(a_join_normal_inside.xy/EXTENT);pos.xy+=(1.0-a_join_normal_inside.z)*wall_offset*0.5;pos.xy-=a_join_normal_inside.z*wall_offset*0.5; #endif float hidden=float((centroid_pos.x==0.0 && centroid_pos.y==1.0) || (color.a==0.0));gl_Position=mix(u_matrix*vec4(pos,1),AWAY,hidden);v_depth=gl_Position.z/gl_Position.w;}`),fillExtrusionPattern:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" uniform vec2 u_texsize;uniform sampler2D u_image; #ifdef FILL_EXTRUSION_PATTERN_TRANSITION uniform float u_pattern_transition; #endif #ifdef FAUX_AO uniform lowp vec2 u_ao;in vec3 v_ao; #endif #ifdef LIGHTING_3D_MODE in vec3 v_normal; #endif #ifdef APPLY_LUT_ON_GPU uniform highp sampler3D u_lutTexture; #endif in highp vec2 v_pos;in vec4 v_lighting;uniform lowp float u_opacity; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define mediump vec4 pattern #ifdef FILL_EXTRUSION_PATTERN_TRANSITION #pragma mapbox: define mediump vec4 pattern_b #endif #pragma mapbox: define highp float pixel_ratio void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize mediump vec4 pattern #ifdef FILL_EXTRUSION_PATTERN_TRANSITION #pragma mapbox: initialize mediump vec4 pattern_b #endif #pragma mapbox: initialize highp float pixel_ratio vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;highp vec2 imagecoord=mod(v_pos,1.0);highp vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);highp vec2 lod_pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,v_pos);vec4 out_color=textureLodCustom(u_image,pos,lod_pos); #ifdef APPLY_LUT_ON_GPU out_color=applyLUT(u_lutTexture,out_color); #endif #ifdef FILL_EXTRUSION_PATTERN_TRANSITION vec2 pattern_b_tl=pattern_b.xy;vec2 pattern_b_br=pattern_b.zw;highp vec2 pos_b=mix(pattern_b_tl/u_texsize,pattern_b_br/u_texsize,imagecoord);vec4 color_b=textureLodCustom(u_image,pos_b,lod_pos);out_color=out_color*(1.0-u_pattern_transition)+color_b*u_pattern_transition; #endif #ifdef LIGHTING_3D_MODE out_color=apply_lighting(out_color,normalize(v_normal))*u_opacity; #else out_color=out_color*v_lighting; #endif #ifdef FAUX_AO float 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; #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif #ifdef INDICATOR_CUTOUT out_color=applyCutout(out_color,height); #endif glFragColor=out_color; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_terrain.vertex.glsl" #include "_prelude_lighting.glsl" 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 float u_width_scale;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;in vec4 a_pos_normal_ed;in vec2 a_centroid_pos; #ifdef RENDER_WALL_MODE in vec3 a_join_normal_inside; #endif #ifdef PROJECTION_GLOBE_VIEW in vec3 a_pos_3;in 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; #endif #ifdef TERRAIN uniform int u_height_type;uniform int u_base_type; #endif out highp vec2 v_pos;out vec4 v_lighting; #ifdef FAUX_AO uniform lowp vec2 u_ao;out vec3 v_ao; #endif #ifdef LIGHTING_3D_MODE out vec3 v_normal; #endif #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump vec4 pattern #ifdef FILL_EXTRUSION_PATTERN_TRANSITION #pragma mapbox: define mediump vec4 pattern_b #endif #pragma mapbox: define highp float pixel_ratio #pragma mapbox: define highp float line_width void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump vec4 pattern #ifdef FILL_EXTRUSION_PATTERN_TRANSITION #pragma mapbox: initialize mediump vec4 pattern_b #endif #pragma mapbox: initialize highp float pixel_ratio #pragma mapbox: initialize highp float line_width vec2 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); #if defined(HAS_CENTROID) || defined(TERRAIN) centroid_pos=a_centroid_pos; #endif float ele=0.0;float h=z;vec3 p;float c_ele; #ifdef TERRAIN bool is_flat_height=centroid_pos.x !=0.0 && u_height_type==1;bool is_flat_base=centroid_pos.x !=0.0 && u_base_type==1;ele=elevation(pos_nx.xy);c_ele=is_flat_height || is_flat_base ? (centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos)) : ele;float h_height=is_flat_height ? max(c_ele+height,ele+base+2.0) : ele+height;float h_base=is_flat_base ? max(c_ele+base,ele+base) : ele+(base==0.0 ?-5.0 : base);h=t > 0.0 ? max(h_base,h_height) : h_base;p=vec3(pos_nx.xy,h); #else p=vec3(pos_nx.xy,z); #endif #ifdef PROJECTION_GLOBE_VIEW float 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); #endif #ifdef RENDER_WALL_MODE vec2 wall_offset=u_width_scale*line_width*(a_join_normal_inside.xy/EXTENT);p.xy+=(1.0-a_join_normal_inside.z)*wall_offset*0.5;p.xy-=a_join_normal_inside.z*wall_offset*0.5; #endif float hidden=float((centroid_pos.x==0.0 && centroid_pos.y==1.0) || (color.a==0.0));gl_Position=mix(u_matrix*vec4(p,1),AWAY,hidden);vec2 pos=normal.z==1.0 ? pos_nx.xy : 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; #ifdef LIGHTING_3D_MODE NdotL=calculate_NdotL(normal); #else NdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),NdotL); #endif if (normal.y !=0.0) {float r=0.84; #ifndef LIGHTING_3D_MODE r=mix(0.7,0.98,1.0-u_lightintensity); #endif NdotL*=( (1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));} #ifdef FAUX_AO float 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; #ifdef TERRAIN top_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); #endif v_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]); #ifdef PROJECTION_GLOBE_VIEW top_height+=u_height_lift; #endif gl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w; #endif #ifdef LIGHTING_3D_MODE v_normal=normal; #else v_lighting.rgb+=clamp(NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity; #endif #ifdef FOG v_fog_pos=fog_position(p); #endif }`),groundShadow:kr(`#include "_prelude_shadow.fragment.glsl" precision highp float;uniform vec3 u_ground_shadow_factor;in vec4 v_pos_light_view_0;in vec4 v_pos_light_view_1; #ifdef FOG in float v_fog_opacity; #endif void main() {float light=shadowed_light_factor_plane_bias(v_pos_light_view_0,v_pos_light_view_1,1.0/gl_FragCoord.w);vec3 shadow=mix(u_ground_shadow_factor,vec3(1.0),light); #ifdef RENDER_CUTOFF shadow=mix(vec3(1.0),shadow,cutoff_opacity(u_cutoff_params,1.0/gl_FragCoord.w)); #endif #ifdef FOG shadow=mix(shadow,vec3(1.0),v_fog_opacity); #endif #ifdef INDICATOR_CUTOUT shadow=mix(shadow,vec3(1.0),1.0-applyCutout(vec4(1.0),0.0).r); #endif glFragColor=vec4(shadow,1.0);}`,`#include "_prelude_fog.vertex.glsl" uniform mat4 u_matrix;uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;in vec2 a_pos;out vec4 v_pos_light_view_0;out vec4 v_pos_light_view_1; #ifdef FOG out float v_fog_opacity; #endif void main() {gl_Position=u_matrix*vec4(a_pos,0.0,1.0);v_pos_light_view_0=u_light_matrix_0*vec4(a_pos,0.0,1.0);v_pos_light_view_1=u_light_matrix_1*vec4(a_pos,0.0,1.0); #ifdef FOG v_fog_pos=fog_position(a_pos);v_fog_opacity=fog(v_fog_pos); #endif }`),fillExtrusionGroundEffect:kr(`uniform highp float u_ao_pass;uniform highp float u_opacity;uniform highp float u_flood_light_intensity;uniform highp vec3 u_flood_light_color;uniform highp float u_attenuation;uniform sampler2D u_fb;uniform float u_fb_size; #ifdef SDF_SUBPASS in highp vec2 v_pos;in highp vec4 v_line_segment;in highp float v_flood_light_radius_tile;in highp vec2 v_ao;float line_df(highp vec2 a,highp vec2 b,highp vec2 p) {highp vec2 ba=b-a;highp vec2 pa=p-a;highp float r=clamp(dot(pa,ba)/dot(ba,ba),0.0,1.0);return length(pa-r*ba);} #ifdef FOG in highp float v_fog; #endif #endif void main() { #ifdef CLEAR_SUBPASS vec4 color=vec4(1.0); #ifdef CLEAR_FROM_TEXTURE color=texture(u_fb,gl_FragCoord.xy/vec2(u_fb_size)); #endif glFragColor=color; #else #ifdef SDF_SUBPASS highp float d=line_df(v_line_segment.xy,v_line_segment.zw,v_pos);highp float effect_radius=mix(v_flood_light_radius_tile,v_ao.y,u_ao_pass);d/=effect_radius;d=min(d,1.0);d=1.0-pow(1.0-d,u_attenuation);highp float effect_intensity=mix(u_flood_light_intensity,v_ao.x,u_ao_pass);highp float fog=1.0; #ifdef FOG fog=v_fog; #endif #ifdef RENDER_CUTOFF fog*=v_cutoff_opacity; #endif glFragColor=vec4(vec3(0.0),mix(1.0,d,effect_intensity*u_opacity*fog)); #else vec4 color=mix(vec4(u_flood_light_color,1.0),vec4(vec3(0.0),1.0),u_ao_pass); #ifdef OVERDRAW_INSPECTOR color=vec4(1.0); #endif glFragColor=color; #endif HANDLE_WIREFRAME_DEBUG; #endif }`,`#include "_prelude_fog.vertex.glsl" in highp vec4 a_pos_end;in highp float a_angular_offset_factor;in highp float a_hidden_by_landmark; #ifdef SDF_SUBPASS out highp vec2 v_pos;out highp vec4 v_line_segment;out highp float v_flood_light_radius_tile;out highp vec2 v_ao; #ifdef FOG out highp float v_fog; #endif #endif uniform highp float u_flood_light_intensity;uniform highp mat4 u_matrix;uniform highp float u_ao_pass;uniform highp float u_meter_to_tile;uniform highp float u_edge_radius;uniform highp float u_dynamic_offset;uniform highp vec2 u_ao; #pragma mapbox: define highp float flood_light_ground_radius const float TANGENT_CUTOFF=4.0;const float NORM=32767.0;void main() { #pragma mapbox: initialize highp float flood_light_ground_radius vec2 p=a_pos_end.xy;vec2 q=floor(a_pos_end.zw*0.5);vec2 start_bottom=a_pos_end.zw-q*2.0;float fl_ground_radius=flood_light_ground_radius;fl_ground_radius=abs(flood_light_ground_radius);float direction=flood_light_ground_radius < 0.0 ?-1.0 : 1.0;float flood_radius_tile=fl_ground_radius*u_meter_to_tile;vec2 v=normalize(q-p);float ao_radius=u_ao.y/3.5;float effect_radius=mix(flood_radius_tile,ao_radius,u_ao_pass)+u_edge_radius;float angular_offset_factor=a_angular_offset_factor/NORM*TANGENT_CUTOFF;float angular_offset=direction*angular_offset_factor*effect_radius;float top=1.0-start_bottom.y;float side=(0.5-start_bottom.x)*2.0;vec2 extrusion_parallel=v*side*mix(u_dynamic_offset,angular_offset,top);vec2 perp=vec2(v.y,-v.x);vec2 extrusion_perp=direction*perp*effect_radius*top;vec3 pos=vec3(mix(q,p,start_bottom.x),0.0);pos.xy+=extrusion_parallel+extrusion_perp; #ifdef SDF_SUBPASS v_pos=pos.xy;v_line_segment=vec4(p,q)+perp.xyxy*u_edge_radius;v_flood_light_radius_tile=flood_radius_tile;v_ao=vec2(u_ao.x,ao_radius); #ifdef FOG v_fog_pos=fog_position(pos);v_fog=1.0-fog(v_fog_pos); #endif #endif float hidden_by_landmark=0.0; #ifdef HAS_CENTROID hidden_by_landmark=a_hidden_by_landmark; #endif float isFloodlit=float(fl_ground_radius > 0.0 && u_flood_light_intensity > 0.0);float hidden=mix(1.0-isFloodlit,isFloodlit,u_ao_pass);hidden+=hidden_by_landmark;gl_Position=mix(u_matrix*vec4(pos,1.0),AWAY,float(hidden > 0.0)); #ifdef RENDER_CUTOFF v_cutoff_opacity=cutoff_opacity(u_cutoff_params,gl_Position.z); #endif }`),hillshadePrepare:kr(`precision highp float;uniform highp sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;float getElevation(vec2 coord) {return texture(u_image,coord).r/4.0;}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( (c+e+e+h)-(a+d+d+f),(f+g+g+h)-(a+b+b+c) )/pow(2.0,exaggeration+(19.2562-u_zoom));glFragColor=clamp(vec4( deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;uniform float u_emissive_strength;void main() {vec4 pixel=texture(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);glFragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef LIGHTING_3D_MODE glFragColor=apply_lighting_with_emission_ground(glFragColor,u_emissive_strength); #endif #ifdef FOG glFragColor=fog_dither(fog_apply_premultiplied(glFragColor,v_fog_pos)); #endif #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" uniform mat4 u_matrix;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0; #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),line:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" #include "_prelude_shadow.fragment.glsl" uniform lowp float u_device_pixel_ratio;uniform highp float u_width_scale;uniform highp float u_floor_width_scale;uniform float u_alpha_discard_threshold;uniform highp vec2 u_trim_offset;uniform highp vec2 u_trim_fade_range;uniform lowp vec4 u_trim_color;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec3 v_uv; #ifdef ELEVATED_ROADS in highp float v_road_z_offset; #endif #ifdef RENDER_LINE_DASH uniform sampler2D u_dash_image;in vec2 v_tex; #endif #ifdef RENDER_LINE_GRADIENT uniform sampler2D u_gradient_image; #endif #ifdef INDICATOR_CUTOUT in highp float v_z_offset; #endif #ifdef RENDER_SHADOWS uniform vec3 u_ground_shadow_factor;in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in highp float v_depth; #endif float luminance(vec3 c) {return (c.r+c.r+c.b+c.g+c.g+c.g)*0.1667;}uniform float u_emissive_strength; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 dash #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float border_width #pragma mapbox: define lowp vec4 border_color float linearstep(float edge0,float edge1,float x) {return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize lowp vec4 dash #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float border_width #pragma mapbox: initialize lowp vec4 border_color float dist=length(v_normal)*v_width2.s;float blur2=(u_width_scale*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); #ifdef RENDER_LINE_DASH float sdfdist=texture(u_dash_image,v_tex).r;float sdfgamma=1.0/(2.0*u_device_pixel_ratio)/dash.z;float scaled_floorwidth=(floorwidth*u_floor_width_scale);alpha*=linearstep(0.5-sdfgamma/scaled_floorwidth,0.5+sdfgamma/scaled_floorwidth,sdfdist); #endif highp vec4 out_color; #ifdef RENDER_LINE_GRADIENT out_color=texture(u_gradient_image,v_uv.xy); #else out_color=color; #endif float trim_alpha=1.0; #ifdef RENDER_LINE_TRIM_OFFSET highp float trim_start=u_trim_offset[0];highp float trim_end=u_trim_offset[1];highp float line_progress=v_uv[2];if (trim_end > trim_start) {highp float start_transition=max(0.0,min(1.0,(line_progress-trim_start)/max(u_trim_fade_range[0],1.0e-9)));highp float end_transition=max(0.0,min(1.0,(trim_end-line_progress)/max(u_trim_fade_range[1],1.0e-9)));highp float transition_factor=min(start_transition,end_transition);out_color=mix(out_color,u_trim_color,transition_factor);trim_alpha=1.0-transition_factor;} #endif if (u_alpha_discard_threshold !=0.0) {if (alpha < u_alpha_discard_threshold) {discard;}} #ifdef RENDER_LINE_BORDER float edgeBlur=((border_width*u_width_scale)+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);if (border_color.a==0.0) {float 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);}} else {out_color=mix(border_color*trim_alpha,out_color,smoothAlpha);}} #endif #ifdef LIGHTING_3D_MODE out_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength); #ifdef RENDER_SHADOWS float light=shadowed_light_factor(v_pos_light_view_0,v_pos_light_view_1,v_depth); #ifdef ELEVATED_ROADS out_color.rgb*=mix(v_road_z_offset !=0.0 ? u_ground_shadow_factor : vec3(1.0),vec3(1.0),light); #else out_color.rgb*=mix(u_ground_shadow_factor,vec3(1.0),light); #endif #endif #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif out_color*=(alpha*opacity); #ifdef INDICATOR_CUTOUT out_color=applyCutout(out_color,v_z_offset); #endif #ifdef FEATURE_CUTOUT out_color=apply_feature_cutout(out_color,gl_FragCoord); #endif glFragColor=out_color; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_shadow.vertex.glsl" #include "_prelude_terrain.vertex.glsl" #define EXTRUDE_SCALE 0.015873016 in vec2 a_pos_normal;in vec4 a_data; #if defined(ELEVATED) || defined(ELEVATED_ROADS) || defined(VARIABLE_LINE_WIDTH) in vec3 a_z_offset_width; #endif #if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET) in highp vec3 a_packed; #endif #ifdef RENDER_LINE_DASH in float a_linesofar; #endif uniform mat4 u_matrix;uniform mat2 u_pixels_to_tile_units;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;uniform float u_width_scale;uniform highp float u_floor_width_scale; #ifdef ELEVATED uniform lowp float u_zbias_factor;uniform lowp float u_tile_to_meter;float sample_elevation(vec2 apos) { #ifdef ELEVATION_REFERENCE_SEA return 0.0; #else return elevation(apos); #endif } #endif out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec3 v_uv; #ifdef ELEVATED_ROADS out highp float v_road_z_offset; #endif #ifdef RENDER_LINE_DASH uniform vec2 u_texsize;uniform float u_tile_units_to_pixels;out vec2 v_tex; #endif #ifdef RENDER_LINE_GRADIENT uniform float u_image_height; #endif #ifdef INDICATOR_CUTOUT out highp float v_z_offset; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out highp float v_depth; #endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 dash #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float border_width #pragma mapbox: define lowp vec4 border_color void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize lowp vec4 dash #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float border_width #pragma mapbox: initialize lowp vec4 border_color float a_z_offset; #if defined(ELEVATED) || defined(ELEVATED_ROADS) a_z_offset=a_z_offset_width.x; #endif float 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; #ifdef VARIABLE_LINE_WIDTH float left=a_pos_normal.y-2.0*floor(a_pos_normal.y*0.5);halfwidth=(u_width_scale*(left==1.0 ? a_z_offset_width.y : a_z_offset_width.z))/2.0; #else halfwidth=(u_width_scale*width)/2.0; #endif offset=-1.0*offset*u_width_scale;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);float hidden=float(opacity==0.0);vec2 extrude=dist*u_pixels_to_tile_units;vec4 projected_extrude=u_matrix*vec4(extrude,0.0,0.0);vec2 projected_extrude_xy=projected_extrude.xy; #ifdef ELEVATED_ROADS v_road_z_offset=a_z_offset;gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,a_z_offset,1.0)+projected_extrude; #else #ifdef ELEVATED vec2 offsetTile=offset2*u_pixels_to_tile_units;vec2 offset_pos=pos+offsetTile;float ele=0.0; #ifdef CROSS_SLOPE_VERTICAL float top=a_pos_normal.y-2.0*floor(a_pos_normal.y*0.5);float line_height=2.0*u_tile_to_meter*outset*top*u_pixels_to_tile_units[1][1]+a_z_offset;ele=sample_elevation(offset_pos)+line_height;projected_extrude=vec4(0); #else #ifdef CROSS_SLOPE_HORIZONTAL float ele0=sample_elevation(offset_pos);float ele1=max(sample_elevation(offset_pos+extrude),sample_elevation(offset_pos+extrude/2.0));float ele2=max(sample_elevation(offset_pos-extrude),sample_elevation(offset_pos-extrude/2.0));float ele_max=max(ele0,max(ele1,ele2));ele=ele_max+a_z_offset; #else float ele0=sample_elevation(offset_pos);float ele1=max(sample_elevation(offset_pos+extrude),sample_elevation(offset_pos+extrude/2.0));float ele2=max(sample_elevation(offset_pos-extrude),sample_elevation(offset_pos-extrude/2.0));float ele_max=max(ele0,0.5*(ele1+ele2));ele=ele_max-ele0+ele1+a_z_offset; #endif #endif gl_Position=u_matrix*vec4(offset_pos,ele,1.0)+projected_extrude;float z=clamp(gl_Position.z/gl_Position.w,0.5,1.0);float zbias=max(0.00005,(pow(z,0.8)-z)*u_zbias_factor*u_exaggeration);gl_Position.z-=(gl_Position.w*zbias);gl_Position=mix(gl_Position,AWAY,hidden); #else gl_Position=mix(u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude,AWAY,hidden); #endif #endif #ifdef ELEVATED_ROADS #ifdef RENDER_SHADOWS vec3 shd_pos=vec3(pos+(offset2+dist)*u_pixels_to_tile_units,a_z_offset);vec3 shd_pos0=shd_pos;vec3 shd_pos1=shd_pos; #ifdef NORMAL_OFFSET vec3 shd_pos_offset=shadow_normal_offset(vec3(0.0,0.0,1.0));shd_pos0+=shd_pos_offset*shadow_normal_offset_multiplier0();shd_pos1+=shd_pos_offset*shadow_normal_offset_multiplier1(); #endif v_pos_light_view_0=u_light_matrix_0*vec4(shd_pos0,1);v_pos_light_view_1=u_light_matrix_1*vec4(shd_pos1,1);v_depth=gl_Position.w; #endif #endif #ifndef RENDER_TO_TEXTURE float epsilon=0.0001;float extrude_length_without_perspective=max(length(dist),epsilon);float extrude_length_with_perspective=max(length(projected_extrude_xy/gl_Position.w*u_units_to_pixels),epsilon);v_gamma_scale=mix(extrude_length_without_perspective/extrude_length_with_perspective,1.0,step(0.01,blur)); #else v_gamma_scale=1.0; #endif #if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET) highp float a_uv_x=a_packed[0];float a_split_index=a_packed[1];highp float line_progress=a_packed[2]; #ifdef RENDER_LINE_GRADIENT highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec3(a_uv_x,a_split_index*texel_height-half_texel_height,line_progress); #else v_uv=vec3(a_uv_x,0.0,line_progress); #endif #endif #ifdef RENDER_LINE_DASH float 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*u_floor_width_scale),(-normal.y*height+dash.x+0.5)/u_texsize.y); #endif v_width2=vec2(outset,inset); #ifdef FOG v_fog_pos=fog_position(pos); #endif #ifdef INDICATOR_CUTOUT v_z_offset=a_z_offset; #endif }`),linePattern:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" #include "_prelude_shadow.fragment.glsl" uniform highp float u_device_pixel_ratio;uniform highp float u_width_scale;uniform highp float u_alpha_discard_threshold;uniform highp vec2 u_texsize;uniform highp float u_tile_units_to_pixels;uniform highp vec2 u_trim_offset;uniform highp vec2 u_trim_fade_range;uniform lowp vec4 u_trim_color;uniform sampler2D u_image; #ifdef APPLY_LUT_ON_GPU uniform highp sampler3D u_lutTexture; #endif #ifdef LINE_PATTERN_TRANSITION uniform float u_pattern_transition; #endif in vec2 v_normal;in vec2 v_width2;in highp float v_linesofar;in float v_gamma_scale;in float v_width; #ifdef RENDER_LINE_TRIM_OFFSET in highp vec3 v_uv; #endif #ifdef ELEVATED_ROADS in highp float v_road_z_offset; #endif #ifdef LINE_JOIN_NONE in vec2 v_pattern_data; #endif #ifdef INDICATOR_CUTOUT in highp float v_z_offset; #endif #ifdef RENDER_SHADOWS uniform vec3 u_ground_shadow_factor;in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in highp float v_depth; #endif uniform float u_emissive_strength; #pragma mapbox: define mediump vec4 pattern #ifdef LINE_PATTERN_TRANSITION #pragma mapbox: define mediump vec4 pattern_b #endif #pragma mapbox: define mediump float pixel_ratio #pragma mapbox: define mediump float blur #pragma mapbox: define mediump float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern #ifdef LINE_PATTERN_TRANSITION #pragma mapbox: initialize mediump vec4 pattern_b #endif #pragma mapbox: initialize mediump float pixel_ratio #pragma mapbox: initialize mediump float blur #pragma mapbox: initialize mediump float opacity vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;highp float pattern_size=display_size.x/u_tile_units_to_pixels;float aspect=display_size.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(u_width_scale*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);highp float pattern_x=v_linesofar/pattern_size*aspect;highp float x=mod(pattern_x,1.0);highp float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;highp vec2 pos=mix(pattern_tl*texel_size-texel_size,pattern_br*texel_size+texel_size,vec2(x,y));highp vec2 lod_pos=mix(pattern_tl*texel_size-texel_size,pattern_br*texel_size+texel_size,vec2(pattern_x,y));vec4 color=textureLodCustom(u_image,pos,lod_pos); #ifdef APPLY_LUT_ON_GPU color=applyLUT(u_lutTexture,color); #endif #ifdef LINE_PATTERN_TRANSITION vec2 pattern_b_tl=pattern_b.xy;vec2 pattern_b_br=pattern_b.zw;highp vec2 pos_b=mix(pattern_b_tl*texel_size-texel_size,pattern_b_br*texel_size+texel_size,vec2(x,y));vec4 color_b=textureLodCustom(u_image,pos_b,lod_pos);color=color*(1.0-u_pattern_transition)+color_b*u_pattern_transition; #endif #ifdef RENDER_LINE_TRIM_OFFSET highp float trim_start=u_trim_offset[0];highp float trim_end=u_trim_offset[1];highp float line_progress=v_uv[2];if (trim_end > trim_start) {highp float start_transition=max(0.0,min(1.0,(line_progress-trim_start)/max(u_trim_fade_range[0],1.0e-9)));highp float end_transition=max(0.0,min(1.0,(trim_end-line_progress)/max(u_trim_fade_range[1],1.0e-9)));highp float transition_factor=min(start_transition,end_transition);color=mix(color,color.a*u_trim_color,transition_factor);} #endif #ifdef LINE_JOIN_NONE highp float pattern_len=pattern_size/aspect;highp float segment_phase=pattern_len-mod(v_linesofar-v_pattern_data.x+pattern_len,pattern_len);highp float visible_start=segment_phase-step(pattern_len*0.5,segment_phase)*pattern_len;highp float visible_end=floor((v_pattern_data.y-segment_phase)/pattern_len)*pattern_len+segment_phase;visible_end+=step(pattern_len*0.5,v_pattern_data.y-visible_end)*pattern_len;if (v_pattern_data.x < visible_start || v_pattern_data.x >=visible_end) {color=vec4(0.0);} #endif #ifdef LIGHTING_3D_MODE color=apply_lighting_with_emission_ground(color,u_emissive_strength); #ifdef RENDER_SHADOWS float light=shadowed_light_factor(v_pos_light_view_0,v_pos_light_view_1,v_depth); #ifdef ELEVATED_ROADS color.rgb*=mix(v_road_z_offset !=0.0 ? u_ground_shadow_factor : vec3(1.0),vec3(1.0),light); #else color.rgb*=mix(u_ground_shadow_factor,vec3(1.0),light); #endif #endif #endif #ifdef FOG color=fog_dither(fog_apply_premultiplied(color,v_fog_pos)); #endif color*=(alpha*opacity);if (u_alpha_discard_threshold !=0.0) {if (color.a < u_alpha_discard_threshold) {discard;}} #ifdef INDICATOR_CUTOUT color=applyCutout(color,v_z_offset); #endif glFragColor=color; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_shadow.vertex.glsl" #include "_prelude_terrain.vertex.glsl" #define scale 0.015873016 in vec2 a_pos_normal;in vec4 a_data; #if defined(ELEVATED) || defined(ELEVATED_ROADS) in vec3 a_z_offset_width; #endif #ifdef RENDER_LINE_TRIM_OFFSET in highp vec3 a_packed; #endif in highp float a_linesofar; #ifdef LINE_JOIN_NONE in highp vec3 a_pattern_data;out vec2 v_pattern_data; #endif #ifdef INDICATOR_CUTOUT out highp float v_z_offset; #endif uniform mat4 u_matrix;uniform float u_tile_units_to_pixels;uniform vec2 u_units_to_pixels;uniform mat2 u_pixels_to_tile_units;uniform float u_device_pixel_ratio;uniform float u_width_scale;uniform float u_floor_width_scale; #ifdef ELEVATED uniform lowp float u_zbias_factor;uniform lowp float u_tile_to_meter;float sample_elevation(vec2 apos) { #ifdef ELEVATION_REFERENCE_SEA return 0.0; #else return elevation(apos); #endif } #endif out vec2 v_normal;out vec2 v_width2;out highp float v_linesofar;out float v_gamma_scale;out float v_width; #ifdef RENDER_LINE_TRIM_OFFSET out highp vec3 v_uv; #endif #ifdef ELEVATED_ROADS out highp float v_road_z_offset; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out highp float v_depth; #endif #pragma mapbox: define mediump float blur #pragma mapbox: define mediump float opacity #pragma mapbox: define mediump float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define mediump float floorwidth #pragma mapbox: define mediump vec4 pattern #ifdef LINE_PATTERN_TRANSITION #pragma mapbox: define mediump vec4 pattern_b #endif #pragma mapbox: define mediump float pixel_ratio void main() { #pragma mapbox: initialize mediump float blur #pragma mapbox: initialize mediump float opacity #pragma mapbox: initialize mediump float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize mediump float floorwidth #pragma mapbox: initialize mediump vec4 pattern #ifdef LINE_PATTERN_TRANSITION #pragma mapbox: initialize mediump vec4 pattern_b #endif #pragma mapbox: initialize mediump float pixel_ratio float a_z_offset; #if defined(ELEVATED) || defined(ELEVATED_ROADS) a_z_offset=a_z_offset_width.x; #endif float 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);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=(u_width_scale*width)/2.0;offset=-1.0*offset*u_width_scale;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);vec2 dist=outset*a_extrude*scale;float u=0.5*a_direction;float t=1.0-abs(u);vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float hidden=float(opacity==0.0);vec2 extrude=dist*u_pixels_to_tile_units;vec4 projected_extrude=u_matrix*vec4(extrude,0.0,0.0);vec2 projected_extrude_xy=projected_extrude.xy; #ifdef ELEVATED_ROADS v_road_z_offset=a_z_offset;gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,a_z_offset,1.0)+projected_extrude; #else #ifdef ELEVATED vec2 offsetTile=offset2*u_pixels_to_tile_units;vec2 offset_pos=pos+offsetTile;float ele=0.0; #ifdef CROSS_SLOPE_VERTICAL float top=a_pos_normal.y-2.0*floor(a_pos_normal.y*0.5);float line_height=2.0*u_tile_to_meter*outset*top*u_pixels_to_tile_units[1][1]+a_z_offset;ele=sample_elevation(offset_pos)+line_height;projected_extrude=vec4(0); #else #ifdef CROSS_SLOPE_HORIZONTAL float ele0=sample_elevation(offset_pos);float ele1=max(sample_elevation(offset_pos+extrude),sample_elevation(offset_pos+extrude/2.0));float ele2=max(sample_elevation(offset_pos-extrude),sample_elevation(offset_pos-extrude/2.0));float ele_max=max(ele0,max(ele1,ele2));ele=ele_max+a_z_offset; #else float ele0=sample_elevation(offset_pos);float ele1=max(sample_elevation(offset_pos+extrude),sample_elevation(offset_pos+extrude/2.0));float ele2=max(sample_elevation(offset_pos-extrude),sample_elevation(offset_pos-extrude/2.0));float ele_max=max(ele0,0.5*(ele1+ele2));ele=ele_max-ele0+ele1+a_z_offset; #endif #endif gl_Position=u_matrix*vec4(offset_pos,ele,1.0)+projected_extrude;float z=clamp(gl_Position.z/gl_Position.w,0.5,1.0);float zbias=max(0.00005,(pow(z,0.8)-z)*u_zbias_factor*u_exaggeration);gl_Position.z-=(gl_Position.w*zbias);gl_Position=mix(gl_Position,AWAY,hidden); #else gl_Position=mix(u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude,AWAY,hidden); #endif #endif #ifdef ELEVATED_ROADS #ifdef RENDER_SHADOWS vec3 shd_pos=vec3(pos+(offset2+dist)*u_pixels_to_tile_units,a_z_offset);vec3 shd_pos0=shd_pos;vec3 shd_pos1=shd_pos; #ifdef NORMAL_OFFSET vec3 shd_pos_offset=shadow_normal_offset(vec3(0.0,0.0,1.0));shd_pos0+=shd_pos_offset*shadow_normal_offset_multiplier0();shd_pos1+=shd_pos_offset*shadow_normal_offset_multiplier1(); #endif v_pos_light_view_0=u_light_matrix_0*vec4(shd_pos0,1);v_pos_light_view_1=u_light_matrix_1*vec4(shd_pos1,1);v_depth=gl_Position.w; #endif #endif #ifndef RENDER_TO_TEXTURE float 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=mix(extrude_length_without_perspective/extrude_length_with_perspective,1.0,step(0.01,blur)); #else v_gamma_scale=1.0; #endif #ifdef RENDER_LINE_TRIM_OFFSET highp float a_uv_x=a_packed[0];highp float line_progress=a_packed[2];v_uv=vec3(a_uv_x,0.0,line_progress); #endif v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=(floorwidth*u_floor_width_scale); #ifdef LINE_JOIN_NONE v_width=(floorwidth*u_floor_width_scale)+ANTIALIASING;mediump float pixels_to_tile_units=1.0/u_tile_units_to_pixels;mediump float pixel_ratio_inverse=1.0/pixel_ratio;mediump float aspect=v_width/((pattern.w-pattern.y)*pixel_ratio_inverse);highp float subt_multiple=(pattern.z-pattern.x)*pixel_ratio_inverse*pixels_to_tile_units*aspect*32.0;highp float subt=floor(a_pattern_data.z/subt_multiple)*subt_multiple;float offset_sign=(fract(a_pattern_data.x)-0.5)*4.0;float line_progress_offset=offset_sign*v_width*0.5*pixels_to_tile_units;v_linesofar=(a_pattern_data.z-subt)+a_linesofar+line_progress_offset;v_pattern_data=vec2(a_pattern_data.x+line_progress_offset,a_pattern_data.y); #endif #ifdef FOG v_fog_pos=fog_position(pos); #endif #ifdef INDICATOR_CUTOUT v_z_offset=a_z_offset; #endif }`),raster:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" #include "_prelude_raster_array.glsl" uniform float u_fade_t;uniform float u_opacity;uniform highp float u_raster_elevation;uniform highp float u_zoom_transition;in vec2 v_pos0;in vec2 v_pos1;in float v_depth; #ifdef PROJECTION_GLOBE_VIEW in float v_split_fade; #endif 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;uniform float u_emissive_strength; #ifndef RASTER_ARRAY uniform highp sampler2D u_image0;uniform sampler2D u_image1; #endif #ifdef RASTER_COLOR uniform sampler2D u_color_ramp;uniform highp vec4 u_colorization_mix;uniform highp float u_colorization_offset;uniform vec2 u_texture_res; #endif void main() {vec4 color0,color1,color;vec2 value; #ifdef RASTER_COLOR #ifdef RASTER_ARRAY #ifdef RASTER_ARRAY_LINEAR value=mix( raTexture2D_image0_linear(v_pos0,u_texture_res,u_colorization_mix,u_colorization_offset),raTexture2D_image1_linear(v_pos1,u_texture_res,u_colorization_mix,u_colorization_offset),u_fade_t ); #else value=mix( raTexture2D_image0_nearest(v_pos0,u_texture_res,u_colorization_mix,u_colorization_offset),raTexture2D_image1_nearest(v_pos1,u_texture_res,u_colorization_mix,u_colorization_offset),u_fade_t ); #endif if (value.y > 0.0) value.x/=value.y; #else color=mix(texture(u_image0,v_pos0),texture(u_image1,v_pos1),u_fade_t);value=vec2(u_colorization_offset+dot(color.rgb,u_colorization_mix.rgb),color.a); #endif color=texture(u_color_ramp,vec2(value.x,0.5));if (color.a > 0.0) color.rgb/=color.a;color.a*=value.y; #else color0=texture(u_image0,v_pos0);color1=texture(u_image1,v_pos1);if (color0.a > 0.0) color0.rgb/=color0.a;if (color1.a > 0.0) color1.rgb/=color1.a;color=mix(color0,color1,u_fade_t); #endif color.a*=u_opacity; #ifdef GLOBE_POLES color.a*=1.0-smoothstep(0.0,0.05,u_zoom_transition); #endif vec3 rgb=color.rgb;rgb=vec3( dot(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); #ifdef LIGHTING_3D_MODE out_color=apply_lighting_with_emission_ground(vec4(out_color,1.0),u_emissive_strength).rgb; #endif #ifdef FOG highp float fog_limit_high_meters=1000000.0;highp float fog_limit_low_meters=600000.0;float fog_limit=1.0-smoothstep(fog_limit_low_meters,fog_limit_high_meters,u_raster_elevation);out_color=fog_dither(fog_apply(out_color,v_fog_pos,fog_limit)); #endif glFragColor=vec4(out_color*color.a,color.a); #ifdef PROJECTION_GLOBE_VIEW glFragColor*=mix(1.0,1.0-smoothstep(0.0,0.05,u_zoom_transition),smoothstep(0.8,0.9,v_split_fade)); #endif #ifdef RENDER_CUTOFF glFragColor=glFragColor*cutoff_opacity(u_cutoff_params,v_depth); #endif #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" uniform mat4 u_matrix;uniform mat4 u_normalize_matrix;uniform mat4 u_globe_matrix;uniform mat4 u_merc_matrix;uniform mat3 u_grid_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform vec2 u_perspective_transform;uniform vec2 u_texture_offset;uniform float u_raster_elevation;uniform float u_zoom_transition;uniform vec2 u_merc_center; #define GLOBE_UPSCALE GLOBE_RADIUS/6371008.8 #ifdef GLOBE_POLES in vec3 a_globe_pos;in vec2 a_uv; #else in vec2 a_pos;in vec2 a_texture_pos; #endif out vec2 v_pos0;out vec2 v_pos1;out float v_depth; #ifdef PROJECTION_GLOBE_VIEW out float v_split_fade; #endif void main() {vec2 uv; #ifdef GLOBE_POLES vec3 globe_pos=a_globe_pos;globe_pos+=normalize(globe_pos)*u_raster_elevation*GLOBE_UPSCALE;gl_Position=u_matrix*u_globe_matrix*vec4(globe_pos ,1.0);uv=a_uv; #ifdef FOG v_fog_pos=fog_position((u_normalize_matrix*vec4(a_globe_pos,1.0)).xyz); #endif #else float w=1.0+dot(a_texture_pos,u_perspective_transform);uv=a_texture_pos/8192.0; #ifdef PROJECTION_GLOBE_VIEW vec3 decomposed_pos_and_skirt=decomposeToPosAndSkirt(a_pos);vec3 latLng=u_grid_matrix*vec3(decomposed_pos_and_skirt.xy,1.0);vec3 globe_pos=latLngToECEF(latLng.xy);globe_pos+=normalize(globe_pos)*u_raster_elevation*GLOBE_UPSCALE;vec4 globe_world_pos=u_globe_matrix*vec4(globe_pos,1.0);vec4 merc_world_pos=vec4(0.0);float mercatorY=mercatorYfromLat(latLng[0]);float mercatorX=mercatorXfromLng(latLng[1]); v_split_fade=0.0;if (u_zoom_transition > 0.0) {vec2 merc_pos=vec2(mercatorX,mercatorY);merc_world_pos=vec4(merc_pos,u_raster_elevation,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;float opposite_merc_center=mod(u_merc_center.x+0.5,1.0);float dist_from_poles=(abs(mercatorY-0.5)*2.0);float range=0.1;v_split_fade=abs(opposite_merc_center-mercatorX);v_split_fade=clamp(1.0-v_split_fade,0.0,1.0);v_split_fade=max(smoothstep(1.0-range,1.0,dist_from_poles),max(smoothstep(1.0-range,1.0,v_split_fade),smoothstep(1.0-range,1.0,1.0-v_split_fade)));}float tiles=u_grid_matrix[0][2];if (tiles > 0.0) {float idx=u_grid_matrix[1][2];float idy=u_grid_matrix[2][2];float uvY=mercatorY*tiles-idy;float uvX=mercatorX*tiles-idx;uv=vec2(uvX,uvY);}vec4 interpolated_pos=vec4(mix(globe_world_pos.xyz,merc_world_pos.xyz,u_zoom_transition)*w,w);gl_Position=u_matrix*interpolated_pos; #ifdef FOG v_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz); #endif #else gl_Position=u_matrix*vec4(a_pos*w,u_raster_elevation*w,w); #ifdef FOG v_fog_pos=fog_position(a_pos); #endif #endif #endif v_pos0=uv;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;v_pos0=u_texture_offset.x+u_texture_offset.y*v_pos0;v_pos1=u_texture_offset.x+u_texture_offset.y*v_pos1; #ifdef RENDER_CUTOFF v_depth=gl_Position.z; #endif }`),rasterParticle:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" uniform float u_fade_t;uniform float u_opacity;uniform highp float u_raster_elevation;in vec2 v_pos0;in vec2 v_pos1;uniform sampler2D u_image0;uniform sampler2D u_image1;void main() {vec4 color0,color1,color;color0=texture(u_image0,v_pos0);color1=texture(u_image1,v_pos1);if (color0.a > 0.0) color0.rgb/=color0.a;if (color1.a > 0.0) color1.rgb/=color1.a;color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 out_color=color.rgb; #ifdef LIGHTING_3D_MODE out_color=apply_lighting_with_emission_ground(vec4(out_color,1.0),0.0).rgb; #endif #ifdef FOG highp float fog_limit_high_meters=1000000.0;highp float fog_limit_low_meters=600000.0;float fog_limit=1.0-smoothstep(fog_limit_low_meters,fog_limit_high_meters,u_raster_elevation);out_color=fog_dither(fog_apply(out_color,v_fog_pos,fog_limit)); #endif glFragColor=vec4(out_color*color.a,color.a); #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" uniform mat4 u_matrix;uniform mat4 u_normalize_matrix;uniform mat4 u_globe_matrix;uniform mat4 u_merc_matrix;uniform mat3 u_grid_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_raster_elevation;uniform float u_zoom_transition;uniform vec2 u_merc_center; #define GLOBE_UPSCALE GLOBE_RADIUS/6371008.8 in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {float w=1.0;vec2 uv; #ifdef PROJECTION_GLOBE_VIEW 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 mercatorX=mercatorXfromLng(latLng[1]);float tiles=u_grid_matrix[0][2];float idx=u_grid_matrix[1][2];float idy=u_grid_matrix[2][2];float uvX=mercatorX*tiles-idx;float uvY=mercatorY*tiles-idy;uv=vec2(uvX,uvY);vec3 globe_pos=latLngToECEF(latLng.xy);globe_pos+=normalize(globe_pos)*u_raster_elevation*GLOBE_UPSCALE;vec4 globe_world_pos=u_globe_matrix*vec4(globe_pos,1.0);vec4 merc_world_pos=vec4(0.0);if (u_zoom_transition > 0.0) {vec2 merc_pos=vec2(mercatorX,mercatorY);merc_world_pos=vec4(merc_pos,u_raster_elevation,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)*w,w);gl_Position=u_matrix*interpolated_pos; #ifdef FOG v_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz); #endif #else uv=a_texture_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*w,u_raster_elevation*w,w); #ifdef FOG v_fog_pos=fog_position(a_pos); #endif #endif v_pos0=uv;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),rasterParticleDraw:kr("uniform sampler2D u_color_ramp;in float v_particle_speed;void main() {glFragColor=texture(u_color_ramp,vec2(v_particle_speed,0.5));}",`#include "_prelude_raster_particle.glsl" in float a_index;uniform sampler2D u_particle_texture;uniform float u_particle_texture_side_len;uniform vec2 u_tile_offset;out float v_particle_speed;void main() {ivec2 pixel_coord=ivec2( mod(a_index,u_particle_texture_side_len),a_index/u_particle_texture_side_len);vec4 pixel=texelFetch(u_particle_texture,pixel_coord,0);vec2 pos=unpack_pos_from_rgba(pixel)+u_tile_offset;vec2 tex_coord=fract(pos);vec2 velocity=lookup_velocity(tex_coord);if (velocity==INVALID_VELOCITY) {gl_Position=AWAY;v_particle_speed=0.0;} else {gl_Position=vec4(2.0*pos-1.0,0,1);v_particle_speed=length(velocity);}gl_PointSize=1.0;}`),rasterParticleTexture:kr("uniform sampler2D u_texture;uniform float u_opacity;in vec2 v_tex_pos;void main() {vec4 color=texture(u_texture,v_tex_pos);glFragColor=vec4(floor(255.0*color*u_opacity)/255.0);}","in vec2 a_pos;out vec2 v_tex_pos;void main() {vec2 uv=0.5*a_pos+vec2(0.5);v_tex_pos=uv;gl_Position=vec4(a_pos,0.0,1.0);}"),rasterParticleUpdate:kr(`#include "_prelude_raster_particle.glsl" uniform sampler2D u_particle_texture;uniform mediump float u_particle_texture_side_len;uniform mediump float u_speed_factor;uniform highp float u_reset_rate;uniform highp float u_rand_seed;in highp vec2 v_tex_coord;vec2 linearstep(vec2 edge0,vec2 edge1,vec2 x) {return clamp((x-edge0)/(edge1-edge0),vec2(0),vec2(1));}const highp vec3 rand_constants=vec3(12.9898,78.233,4375.85453);highp float rand(const highp vec2 co) {highp float t=dot(rand_constants.xy,co);return fract(sin(t)*(rand_constants.z+t));}void main() {ivec2 pixel_coord=ivec2(v_tex_coord*u_particle_texture_side_len);highp vec4 pixel=texelFetch(u_particle_texture,pixel_coord,0);highp vec2 pos=unpack_pos_from_rgba(pixel);highp vec2 velocity=lookup_velocity(clamp(pos,0.0,1.0));highp vec2 dp=velocity==INVALID_VELOCITY ? vec2(0) : velocity*u_speed_factor;pos=pos+dp;highp vec2 seed=(pos+v_tex_coord)*u_rand_seed;highp vec2 random_pos=vec2(rand(seed+1.3),rand(seed+2.1));highp vec2 persist_rate=pow( linearstep(vec2(-u_particle_pos_offset),vec2(0),pos)*linearstep(vec2(1.0+u_particle_pos_offset),vec2(1),pos),vec2(4) );highp vec2 per_frame_persist=pow(persist_rate,abs(dp)/u_particle_pos_offset);highp float drop_rate=1.0-per_frame_persist.x*per_frame_persist.y;drop_rate=any(greaterThanEqual(abs(pos-0.5),vec2(0.5+u_particle_pos_offset))) ? 1.0 : drop_rate;highp float drop=step(1.0-drop_rate-u_reset_rate,rand(seed));highp vec2 next_pos=mix(pos,random_pos,drop);glFragColor=pack_pos_to_rgba(next_pos);}`,"in vec2 a_pos;out vec2 v_tex_coord;void main() {v_tex_coord=0.5*(a_pos+vec2(1.0));gl_Position=vec4(a_pos,0.0,1.0);}"),symbol:kr(`#include "_prelude_lighting.glsl" #include "_prelude_shadow.fragment.glsl" #define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;uniform bool u_is_halo;uniform lowp float u_scale_factor; #ifdef ICON_TRANSITION uniform float u_icon_transition; #endif #ifdef COLOR_ADJUSTMENT uniform mat4 u_color_adj_mat; #endif #ifdef INDICATOR_CUTOUT in highp float v_z_offset; #else #ifdef RENDER_SHADOWS in highp float v_z_offset; #endif #endif in vec2 v_tex_a; #ifdef ICON_TRANSITION in vec2 v_tex_b; #endif in float v_draw_halo;in vec3 v_gamma_scale_size_fade_opacity; #ifdef RENDER_TEXT_AND_SYMBOL in float is_sdf;in vec2 v_tex_a_icon; #endif #ifdef RENDER_SHADOWS uniform vec3 u_ground_shadow_factor;in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in highp float v_depth; #endif #ifdef APPLY_LUT_ON_GPU uniform highp sampler3D u_lutTexture; #endif #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur #pragma mapbox: define lowp float emissive_strength void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur #pragma mapbox: initialize lowp float emissive_strength vec4 out_color;float fade_opacity=v_gamma_scale_size_fade_opacity[2]; #ifdef RENDER_TEXT_AND_SYMBOL if (is_sdf==ICON) {vec2 tex_icon=v_tex_a_icon;lowp float alpha=opacity*fade_opacity;glFragColor=texture(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif return;} #endif #ifdef RENDER_SDF float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_gamma_scale_size_fade_opacity.x;float size=v_gamma_scale_size_fade_opacity.y;float fontScale=u_is_text ? size/24.0 : size;out_color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;bool draw_halo=v_draw_halo > 0.0;if (draw_halo) {out_color=halo_color;gamma=(halo_blur*u_scale_factor*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width*u_scale_factor/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,v_tex_a).r;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);out_color*=alpha; #else #ifdef ICON_TRANSITION vec4 a=texture(u_texture,v_tex_a)*(1.0-u_icon_transition);vec4 b=texture(u_texture,v_tex_b)*u_icon_transition;out_color=(a+b); #else out_color=texture(u_texture,v_tex_a); #endif #ifdef APPLY_LUT_ON_GPU out_color=applyLUT(u_lutTexture,out_color); #endif #ifdef COLOR_ADJUSTMENT out_color=u_color_adj_mat*out_color; #endif #endif out_color*=opacity*fade_opacity; #ifdef LIGHTING_3D_MODE out_color=apply_lighting_with_emission_ground(out_color,emissive_strength); #ifdef RENDER_SHADOWS float light=shadowed_light_factor(v_pos_light_view_0,v_pos_light_view_1,v_depth); #ifdef TERRAIN out_color.rgb*=mix(u_ground_shadow_factor,vec3(1.0),light); #else out_color.rgb*=mix(v_z_offset !=0.0 ? u_ground_shadow_factor : vec3(1.0),vec3(1.0),light); #endif #endif #endif #ifdef INDICATOR_CUTOUT out_color=applyCutout(out_color,v_z_offset); #endif #ifdef FEATURE_CUTOUT out_color=apply_feature_cutout(out_color,gl_FragCoord); #endif glFragColor=out_color; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_terrain.vertex.glsl" #include "_prelude_shadow.vertex.glsl" in vec4 a_pos_offset;in vec4 a_tex_size;in vec4 a_pixeloffset;in vec4 a_projected_pos;in float a_fade_opacity; #ifdef Z_OFFSET in float a_auto_z_offset; #endif #ifdef PROJECTION_GLOBE_VIEW in vec3 a_globe_anchor;in vec3 a_globe_normal; #endif #ifdef ICON_TRANSITION in vec2 a_texb; #endif #ifdef OCCLUSION_QUERIES in float a_occlusion_query_opacity; #endif #ifdef ELEVATED_ROADS in vec3 a_x_axis;in vec3 a_y_axis;uniform float u_normal_scale; #endif #ifdef INDICATOR_CUTOUT out highp float v_z_offset; #else #ifdef RENDER_SHADOWS out highp float v_z_offset; #endif #endif uniform 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_inv_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_elevation_from_sea;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;uniform bool u_is_halo; #ifdef PROJECTION_GLOBE_VIEW uniform 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; #endif out vec2 v_tex_a; #ifdef ICON_TRANSITION out vec2 v_tex_b; #endif out float v_draw_halo;out vec3 v_gamma_scale_size_fade_opacity; #ifdef RENDER_TEXT_AND_SYMBOL out float is_sdf;out vec2 v_tex_a_icon; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out highp float v_depth; #endif #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur #pragma mapbox: define lowp float emissive_strength #pragma mapbox: define lowp float occlusion_opacity #pragma mapbox: define lowp float z_offset void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur #pragma mapbox: initialize lowp float emissive_strength #pragma mapbox: initialize lowp float occlusion_opacity #pragma mapbox: initialize lowp float z_offset vec2 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;float e=u_elevation_from_sea ? z_offset : z_offset+elevation(tile_anchor); #ifdef Z_OFFSET e+=a_auto_z_offset; #endif vec3 h=elevationVector(tile_anchor)*e;float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;vec3 world_pos_globe; #ifdef PROJECTION_GLOBE_VIEW mercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos_globe=a_globe_anchor+h;world_pos=mix_globe_mercator(world_pos_globe,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; #else world_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0; #endif vec4 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 ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp( 0.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;vec2 a; #ifdef PROJECTION_GLOBE_VIEW vec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetprojected_point=u_matrix*vec4(a_globe_anchor+displacement,1);vec4 projected_point_globe=u_matrix*vec4(world_pos_globe,1);a=projected_point_globe.xy/projected_point_globe.w; #else offsetprojected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);a=projected_point.xy/projected_point.w; #endif 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; #ifdef PROJECTION_GLOBE_VIEW #ifdef PROJECTED_POS_ON_VIEWPORT projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xyz+h,1.0); #else vec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz,mercator_pos,u_zoom_transition)+h;projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0); #endif #else projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0); #endif highp 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); #ifdef TERRAIN #ifdef PITCH_WITH_MAP_TERRAIN vec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy); #endif #endif #ifdef Z_OFFSET z+=u_pitch_with_map ? a_auto_z_offset+z_offset : 0.0; #else z+=u_pitch_with_map ? z_offset : 0.0; #endif float occlusion_fade=globe_occlusion_fade;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float out_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change)); #ifdef DEPTH_OCCLUSION float depth_occlusion=occlusionFadeMultiSample(projected_point);float depth_occlusion_multplier=mix(occlusion_opacity,1.0,depth_occlusion);out_fade_opacity*=depth_occlusion_multplier; #endif #ifdef OCCLUSION_QUERIES float occludedFadeMultiplier=mix(occlusion_opacity,1.0,a_occlusion_query_opacity);out_fade_opacity*=occludedFadeMultiplier; #endif float alpha=opacity*out_fade_opacity;float hidden=float(alpha==0.0 || projected_point.w <=0.0 || occlusion_fade==0.0);vec3 pos; #ifdef PROJECTION_GLOBE_VIEW vec3 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);pos=projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y; #else #ifdef ELEVATED_ROADS vec3 xAxis=vec3(a_x_axis.xy,a_x_axis.z*u_normal_scale);vec3 yAxis=vec3(a_y_axis.xy,a_y_axis.z*u_normal_scale);pos=projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y; #else pos=vec3(projected_pos.xy/projected_pos.w+offset,z); #endif #endif gl_Position=mix(u_coord_matrix*vec4(pos,1.0),AWAY,hidden);float gamma_scale=gl_Position.w;v_draw_halo=(u_is_halo && float(gl_InstanceID)==0.0) ? 1.0 : 0.0;v_gamma_scale_size_fade_opacity=vec3(gamma_scale,size,out_fade_opacity);v_tex_a=a_tex/u_texsize; #ifdef RENDER_TEXT_AND_SYMBOL is_sdf=a_size[0]-2.0*a_size_min;v_tex_a_icon=a_tex/u_texsize_icon; #endif #ifdef ICON_TRANSITION v_tex_b=a_texb/u_texsize; #endif #ifdef RENDER_SHADOWS vec4 shd_pos=u_inv_matrix*vec4(pos,1.0);vec3 shd_pos0=shd_pos.xyz;vec3 shd_pos1=shd_pos.xyz; #ifdef NORMAL_OFFSET vec3 shd_pos_offset=shadow_normal_offset(vec3(0.0,0.0,1.0));shd_pos0+=shd_pos_offset*shadow_normal_offset_multiplier0();shd_pos1+=shd_pos_offset*shadow_normal_offset_multiplier1(); #endif v_pos_light_view_0=u_light_matrix_0*vec4(shd_pos0,1);v_pos_light_view_1=u_light_matrix_1*vec4(shd_pos1,1);v_depth=gl_Position.w; #endif #ifdef INDICATOR_CUTOUT v_z_offset=e; #else #ifdef RENDER_SHADOWS v_z_offset=e; #endif #endif }`),terrainRaster:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_shadow.fragment.glsl" #include "_prelude_lighting.glsl" uniform sampler2D u_image0;in vec2 v_pos0; #ifdef FOG in float v_fog_opacity; #endif #ifdef RENDER_SHADOWS in vec4 v_pos_light_view_0;in vec4 v_pos_light_view_1; #endif uniform vec3 u_ground_shadow_factor;void main() {vec4 image_color=texture(u_image0,v_pos0);vec4 color; #ifdef LIGHTING_3D_MODE const vec3 normal=vec3(0.0,0.0,1.0); #ifdef RENDER_SHADOWS float cutoffOpacity=1.0; #ifdef RENDER_CUTOFF cutoffOpacity=cutoff_opacity(u_cutoff_params,1.0/gl_FragCoord.w); #endif #ifdef LIGHTING_3D_ALPHA_EMISSIVENESS vec3 unlit_base=image_color.rgb*(1.0-image_color.a);vec3 emissive_base=image_color.rgb*image_color.a;float ndotl=u_shadow_direction.z;float occlusion=ndotl < 0.0 ? 1.0 : shadow_occlusion(v_pos_light_view_0,v_pos_light_view_1,1.0/gl_FragCoord.w,0.0);ndotl=max(0.0,ndotl);vec3 lit=apply_lighting(unlit_base,normal,mix(1.0,(1.0-(u_shadow_intensity*occlusion))*ndotl,cutoffOpacity));vec3 emissive=compute_emissive_draped(emissive_base,1.0-u_shadow_intensity,occlusion,u_ground_shadow_factor);color.rgb=lit+emissive;color.a=1.0; #else float lighting_factor=shadowed_light_factor_normal_unbiased(normal,v_pos_light_view_0,v_pos_light_view_1,1.0/gl_FragCoord.w);color=apply_lighting(image_color,normal,mix(1.0,lighting_factor,cutoffOpacity)); #endif #else float lighting_factor=u_lighting_directional_dir.z;color=apply_lighting(image_color,normal,lighting_factor); #ifdef LIGHTING_3D_ALPHA_EMISSIVENESS color.rgb=mix(color.rgb,image_color.rgb,image_color.a);color.a=1.0; #endif #endif #else color=image_color; #endif #ifdef FOG #ifdef ZERO_EXAGGERATION color=fog_dither(fog_apply_premultiplied(color,v_fog_pos)); #else color=fog_dither(fog_apply_from_vert(color,v_fog_opacity)); #endif #endif glFragColor=color; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_terrain.vertex.glsl" uniform mat4 u_matrix;uniform float u_skirt_height;in vec2 a_pos;out vec2 v_pos0; #ifdef FOG out float v_fog_opacity; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out vec4 v_pos_light_view_0;out vec4 v_pos_light_view_1; #endif void main() {vec3 decomposedPosAndSkirt=decomposeToPosAndSkirt(a_pos);float skirt=decomposedPosAndSkirt.z;vec2 decodedPos=decomposedPosAndSkirt.xy;float elevation=elevation(decodedPos)-skirt*u_skirt_height;v_pos0=decodedPos/8192.0;gl_Position=u_matrix*vec4(decodedPos,elevation,1.0); #ifdef FOG #ifdef ZERO_EXAGGERATION v_fog_pos=fog_position(decodedPos); #else v_fog_opacity=fog(fog_position(vec3(decodedPos,elevation))); #endif #endif #ifdef RENDER_SHADOWS vec3 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.); #endif }`),terrainDepth:kr("precision highp float;in float v_depth;void main() {glFragColor=pack_depth(v_depth);}",`#include "_prelude_terrain.vertex.glsl" uniform mat4 u_matrix;in vec2 a_pos;out 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:kr(`#include "_prelude_fog.fragment.glsl" in 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( cos_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=texture(u_cubemap,uv).rgb; #ifdef FOG sky_color=fog_apply_sky_gradient(v_uv.xzy,sky_color); #endif sky_color+=0.1*sun_disk(v_uv,u_sun_direction);glFragColor=vec4(sky_color*u_opacity,u_opacity); #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif }`,Wa),skyboxGradient:kr(`#include "_prelude_fog.fragment.glsl" in 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=texture(u_color_ramp,vec2(progress,0.5)); #ifdef FOG color.rgb=fog_apply_sky_gradient(v_uv.xzy,color.rgb/color.a)*color.a; #endif color*=u_opacity;glFragColor=color; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif }`,Wa),skyboxCapture:kr(` in 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;precision highp float; #define BETA_R vec3(5.5e-6,13.0e-6,22.4e-6) #define BETA_M vec3(21e-6,21e-6,21e-6) #define MIE_G 0.76 #define DENSITY_HEIGHT_SCALE_R 8000.0 #define DENSITY_HEIGHT_SCALE_M 1200.0 #define PLANET_RADIUS 6360e3 #define ATMOSPHERE_RADIUS 6420e3 #define SAMPLE_STEPS 10 #define DENSITY_STEPS 4 float 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;glFragColor=vec4(color,1.0);}`,"in highp vec3 a_pos_3f;uniform mat3 u_matrix_3f;out 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:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_lighting.glsl" uniform sampler2D u_image0;uniform float u_far_z_cutoff;in vec2 v_pos0; #ifndef FOG 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 vec2 u_viewport; #endif void main() {vec4 color; #ifdef CUSTOM_ANTIALIASING highp vec2 uv=gl_FragCoord.xy/u_viewport; #ifdef FLIP_Y uv.y=1.0-uv.y; #endif highp vec3 ray_dir=mix( mix(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 norm_dist_from_center=1.0-length(closest_point-u_globe_pos)/u_globe_radius;const float antialias_pixel=2.0;highp float antialias_factor=antialias_pixel*fwidth(norm_dist_from_center);highp float antialias=smoothstep(0.0,antialias_factor,norm_dist_from_center);vec4 raster=texture(u_image0,v_pos0); #ifdef LIGHTING_3D_MODE #ifdef LIGHTING_3D_ALPHA_EMISSIVENESS raster=apply_lighting_with_emission_ground(raster,raster.a);color=vec4(clamp(raster.rgb,vec3(0),vec3(1))*antialias,antialias); #else raster=apply_lighting_ground(raster);color=vec4(raster.rgb*antialias,raster.a*antialias); #endif #else color=vec4(raster.rgb*antialias,raster.a*antialias); #endif #else color=texture(u_image0,v_pos0); #ifdef LIGHTING_3D_MODE #ifdef LIGHTING_3D_ALPHA_EMISSIVENESS color=apply_lighting_with_emission_ground(color,color.a);color.a=1.0; #else color=apply_lighting_ground(color); #endif #endif #endif #ifdef FOG color=fog_dither(fog_apply_premultiplied(color,v_fog_pos)); #endif color*=1.0-step(u_far_z_cutoff,1.0/gl_FragCoord.w);glFragColor=color; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_terrain.vertex.glsl" 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; #ifdef GLOBE_POLES in vec3 a_globe_pos;in vec2 a_uv; #else in vec2 a_pos; #endif out vec2 v_pos0;void main() { #ifdef GLOBE_POLES vec3 globe_pos=a_globe_pos;vec2 uv=a_uv; #else float 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); #endif v_pos0=uv;vec2 tile_pos=uv*EXTENT;vec3 globe_derived_up_vector=normalize(globe_pos)*u_tile_up_scale; #ifdef GLOBE_POLES vec3 up_vector=globe_derived_up_vector; #else vec3 up_vector=elevationVector(tile_pos); #endif float height=elevation(tile_pos);globe_pos+=up_vector*height; #ifndef GLOBE_POLES globe_pos-=globe_derived_up_vector*u_skirt_height*decomposed_pos_and_skirt.z; #endif #ifdef GLOBE_POLES vec4 interpolated_pos=u_globe_matrix*vec4(globe_pos,1.0); #else vec4 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); #endif gl_Position=u_proj_matrix*interpolated_pos; #ifdef FOG v_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz); #endif }`),globeAtmosphere:kr(`#include "_prelude_fog.fragment.glsl" uniform float u_transition;uniform highp float u_fadeout_range;uniform highp float u_temporal_offset;uniform vec4 u_atmosphere_fog_color;uniform vec4 u_high_color;uniform vec4 u_space_color;uniform float u_horizon_angle;in highp vec3 v_ray_dir;in highp vec3 v_horizon_dir;void main() {highp vec3 dir=normalize(v_ray_dir);float globe_pos_dot_dir; #ifdef PROJECTION_GLOBE_VIEW globe_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) { #ifdef ALPHA_PASS glFragColor=vec4(0,0,0,0);return; #else #ifdef NATIVE glFragColor=vec4(1,1,1,1); #else glFragColor=vec4(0,0,0,1); #endif return; #endif } #endif highp vec3 horizon_dir=normalize(v_horizon_dir);float horizon_angle_mercator=dir.y < horizon_dir.y ? 0.0 : max(acos(clamp(dot(dir,horizon_dir),-1.0,1.0)),0.0);float horizon_angle; #ifdef PROJECTION_GLOBE_VIEW highp vec3 closest_point=globe_pos_dot_dir*dir;highp float closest_point_to_center=length(closest_point-u_globe_pos);highp float theta=asin(clamp(closest_point_to_center/length(u_globe_pos),-1.0,1.0));horizon_angle=globe_pos_dot_dir < 0.0 ? PI-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); #else horizon_angle=horizon_angle_mercator; #endif horizon_angle/=PI;float t=exp(-horizon_angle/u_fadeout_range);float alpha_0=u_atmosphere_fog_color.a;float alpha_1=u_high_color.a;float alpha_2=u_space_color.a;vec3 color_stop_0=u_atmosphere_fog_color.rgb;vec3 color_stop_1=u_high_color.rgb;vec3 color_stop_2=u_space_color.rgb; #ifdef ALPHA_PASS 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);glFragColor=vec4(1.0,1.0,1.0,a); #else 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=c2;glFragColor=vec4(c*t,t); #endif }`,`in vec3 a_pos;in 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;out highp vec3 v_ray_dir;out highp vec3 v_horizon_dir;void main() {v_ray_dir=mix( mix(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( mix(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);}`),model:kr(`#include "_prelude_fog.fragment.glsl" #include "_prelude_shadow.fragment.glsl" #include "_prelude_lighting.glsl" uniform float u_opacity;uniform vec3 u_lightcolor;uniform vec3 u_lightpos;uniform float u_lightintensity;uniform vec4 u_baseColorFactor;uniform vec4 u_emissiveFactor;uniform float u_metallicFactor;uniform float u_roughnessFactor;uniform float u_emissive_strength;in highp vec4 v_position_height;in lowp vec4 v_color_mix; #ifdef RENDER_SHADOWS in highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in float v_depth_shadows; #endif #ifdef OCCLUSION_TEXTURE_TRANSFORM uniform vec4 u_occlusionTextureTransform; #endif #pragma mapbox: define-attribute highp vec3 normal_3f #pragma mapbox: define-attribute highp vec3 color_3f #pragma mapbox: define-attribute highp vec4 color_4f #pragma mapbox: define-attribute highp vec2 uv_2f #pragma mapbox: initialize-attribute highp vec3 normal_3f #pragma mapbox: initialize-attribute highp vec3 color_3f #pragma mapbox: initialize-attribute highp vec4 color_4f #pragma mapbox: initialize-attribute highp vec2 uv_2f #ifdef HAS_ATTRIBUTE_a_pbr in lowp vec4 v_roughness_metallic_emissive_alpha;in mediump vec4 v_height_based_emission_params; #endif #ifdef HAS_TEXTURE_u_baseColorTexture uniform sampler2D u_baseColorTexture;uniform bool u_baseTextureIsAlpha;uniform bool u_alphaMask;uniform float u_alphaCutoff; #endif #ifdef HAS_TEXTURE_u_metallicRoughnessTexture uniform sampler2D u_metallicRoughnessTexture; #endif #ifdef HAS_TEXTURE_u_occlusionTexture uniform sampler2D u_occlusionTexture;uniform float u_aoIntensity; #endif #ifdef HAS_TEXTURE_u_normalTexture uniform sampler2D u_normalTexture; #endif #ifdef HAS_TEXTURE_u_emissionTexture uniform sampler2D u_emissionTexture; #endif #ifdef APPLY_LUT_ON_GPU uniform highp sampler3D u_lutTexture; #endif #ifdef TERRAIN_FRAGMENT_OCCLUSION in highp float v_depth;uniform highp sampler2D u_depthTexture;uniform highp vec2 u_inv_depth_size;uniform highp vec2 u_depth_range_unpack; #ifdef DEPTH_D24 highp float unpack_depth(highp float depth) {return depth*u_depth_range_unpack.x+u_depth_range_unpack.y;} #else highp float unpack_depth_rgba(highp vec4 rgba_depth) {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;} #endif bool isOccluded() {highp vec2 coord=gl_FragCoord.xy*u_inv_depth_size; #ifdef DEPTH_D24 highp float depth=unpack_depth(texture(u_depthTexture,coord).r); #else highp float depth=unpack_depth_rgba(texture(u_depthTexture,coord)); #endif return v_depth > depth+0.0005;} #endif #define saturate(_x) clamp(_x,0.,1.) vec3 linearTosRGB(vec3 color) {return pow(color,vec3(1./2.2));}vec3 sRGBToLinear(vec3 srgbIn) {return pow(srgbIn,vec3(2.2));}float calculate_NdotL(vec3 normal,vec3 lightDir) {const float ext=0.70710678118;return (clamp(dot(normal,lightDir),-ext,1.0)+ext)/(1.0+ext);}vec3 getDiffuseShadedColor(vec3 albedo,vec3 normal,vec3 lightDir,vec3 lightColor) { #ifdef LIGHTING_3D_MODE vec3 transformed_normal=vec3(-normal.xy,normal.z);float lighting_factor; #ifdef RENDER_SHADOWS lighting_factor=shadowed_light_factor_normal(transformed_normal,v_pos_light_view_0,v_pos_light_view_1,v_depth_shadows); #else lighting_factor=saturate(dot(transformed_normal,u_lighting_directional_dir)); #endif return apply_lighting(albedo,transformed_normal,lighting_factor); #else vec3 n=normal;float colorvalue=((albedo.x*0.2126)+(albedo.y*0.7152))+(albedo.z*0.0722);vec3 c=vec3(0.03,0.03,0.03);float directional=clamp(dot(n,vec3(lightDir)),0.0,1.0);directional=mix(1.0-u_lightintensity,max((1.0-colorvalue)+u_lightintensity,1.0),directional);vec3 c3=c+clamp((albedo*directional)*lightColor,mix(vec3(0.0),vec3(0.3),vec3(1.0)-lightColor),vec3(1.0));return c3; #endif }vec4 getBaseColor() {vec4 albedo=u_baseColorFactor; #ifdef HAS_ATTRIBUTE_a_color_3f albedo*=vec4(color_3f,1.0); #endif #ifdef HAS_ATTRIBUTE_a_pbr #else #ifdef HAS_ATTRIBUTE_a_color_4f albedo*=color_4f; #endif #endif #if defined (HAS_TEXTURE_u_baseColorTexture) && defined (HAS_ATTRIBUTE_a_uv_2f) vec4 texColor=texture(u_baseColorTexture,uv_2f);if(u_alphaMask) {if (texColor.w < u_alphaCutoff) {discard;}} #ifdef UNPREMULT_TEXTURE_IN_SHADER if(texColor.w > 0.0) {texColor.rgb/=texColor.w;}texColor.w=1.0; #endif if(u_baseTextureIsAlpha) {if (texColor.r < 0.5) {discard;}} else {texColor.rgb=sRGBToLinear(texColor.rgb);albedo*=texColor;} #endif vec4 color=vec4(mix(albedo.rgb,v_color_mix.rgb,v_color_mix.a),albedo.a); #ifdef APPLY_LUT_ON_GPU color=applyLUT(u_lutTexture,color); #endif return color;}highp mat3 cotangentFrame(highp vec3 N,highp vec3 p,highp vec2 uv ) { #ifdef HAS_TEXTURE_u_normalTexture highp vec3 dp1=vec3(dFdx(p.x),dFdx(p.y),dFdx(p.z));highp vec3 dp2=vec3(dFdy(p.x),dFdy(p.y),dFdy(p.z));highp vec2 duv1=vec2(dFdx(uv.x),dFdx(uv.y));highp vec2 duv2=vec2(dFdy(uv.x),dFdy(uv.y));highp vec3 dp2perp=cross( dp2,N );highp vec3 dp1perp=cross( N,dp1 );highp vec3 T=dp2perp*duv1.x+dp1perp*duv2.x;highp vec3 B=dp2perp*duv1.y+dp1perp*duv2.y; #ifdef FLIP_Y T=-T;B=-B; #endif highp float lengthT=dot(T,T);highp float lengthB=dot(B,B);highp float maxLength=max(lengthT,lengthB);highp float invmax=inversesqrt( maxLength );highp mat3 res=mat3( T*invmax,B*invmax,N );return res; #else return mat3(1.0); #endif }highp vec3 getNormal(){highp vec3 n; #ifdef HAS_ATTRIBUTE_a_normal_3f n=normalize(normal_3f); #else highp vec3 fdx=vec3(dFdx(v_position_height.x),dFdx(v_position_height.y),dFdx(v_position_height.z));highp vec3 fdy=vec3(dFdy(v_position_height.x),dFdy(v_position_height.y),dFdy(v_position_height.z)); #ifdef FLIP_Y n=normalize(cross(fdx,fdy)); #else n=normalize(cross(fdx,fdy))*-1.0; #endif #endif #if defined(HAS_TEXTURE_u_normalTexture) && defined(HAS_ATTRIBUTE_a_uv_2f) vec3 nMap=texture( u_normalTexture,uv_2f).xyz;nMap=normalize(2.0*nMap-vec3(1.0));highp vec3 v=normalize(-v_position_height.xyz);highp mat3 TBN=cotangentFrame(n,v,uv_2f);n=normalize(TBN*nMap); #endif return n;}struct Material {float perceptualRoughness;float alphaRoughness;float metallic;vec3 f90;vec4 baseColor;vec3 diffuseColor;vec3 specularColor;highp vec3 normal;};Material getPBRMaterial() {Material mat;mat.baseColor=getBaseColor();mat.perceptualRoughness=u_roughnessFactor;mat.metallic=u_metallicFactor; #ifdef HAS_ATTRIBUTE_a_pbr mat.perceptualRoughness=v_roughness_metallic_emissive_alpha.x;mat.metallic=v_roughness_metallic_emissive_alpha.y;mat.baseColor.w*=v_roughness_metallic_emissive_alpha.w; #endif #if defined(HAS_TEXTURE_u_metallicRoughnessTexture) && defined(HAS_ATTRIBUTE_a_uv_2f) vec4 mrSample=texture(u_metallicRoughnessTexture,uv_2f);mat.perceptualRoughness*=mrSample.g;mat.metallic*=mrSample.b; #endif const float c_minRoughness=0.04;mat.perceptualRoughness=clamp(mat.perceptualRoughness,c_minRoughness,1.0);mat.metallic=saturate(mat.metallic);mat.alphaRoughness=mat.perceptualRoughness*mat.perceptualRoughness;const vec3 f0=vec3(0.04);mat.diffuseColor=mat.baseColor.rgb*(vec3(1.0)-f0);mat.diffuseColor*=1.0-mat.metallic;mat.specularColor=mix(f0,mat.baseColor.rgb,mat.metallic);highp float reflectance=max(max(mat.specularColor.r,mat.specularColor.g),mat.specularColor.b);highp float reflectance90=saturate(reflectance*25.0);mat.f90=vec3(reflectance90);mat.normal=getNormal();return mat;}float V_GGX(float NdotL,float NdotV,float roughness) {float a2=roughness*roughness;float GGXV=NdotL*sqrt(NdotV*NdotV*(1.0-a2)+a2);float GGXL=NdotV*sqrt(NdotL*NdotL*(1.0-a2)+a2);return 0.5/(GGXV+GGXL);}float V_GGXFast(float NdotL,float NdotV,float roughness) {float a=roughness;float GGXV=NdotL*(NdotV*(1.0-a)+a);float GGXL=NdotV*(NdotL*(1.0-a)+a);return 0.5/(GGXV+GGXL);}vec3 F_Schlick(vec3 specularColor,vec3 f90,float VdotH) {return specularColor+(f90-specularColor)*pow(clamp(1.0-VdotH,0.0,1.0),5.0);}vec3 F_SchlickFast(vec3 specularColor,float VdotH) {float x=1.0-VdotH;float x4=x*x*x*x;return specularColor+(1.0-specularColor)*x4*x;}float D_GGX(highp float NdotH,float alphaRoughness) {highp float a4=alphaRoughness*alphaRoughness;highp float f=(NdotH*a4-NdotH)*NdotH+1.0;return a4/(PI*f*f);}vec3 diffuseBurley(Material mat,float LdotH,float NdotL,float NdotV) {float f90=2.0*LdotH*LdotH*mat.alphaRoughness-0.5;return (mat.diffuseColor/PI)*(1.0+f90*pow((1.0-NdotL),5.0))*(1.0+f90*pow((1.0-NdotV),5.0));}vec3 diffuseLambertian(Material mat) { #ifdef LIGHTING_3D_MODE return mat.diffuseColor; #else return mat.diffuseColor/PI; #endif }vec3 EnvBRDFApprox(vec3 specularColor,float roughness,highp float NdotV) {vec4 c0=vec4(-1,-0.0275,-0.572,0.022);vec4 c1=vec4(1,0.0425,1.04,-0.04);highp vec4 r=roughness*c0+c1;highp float a004=min(r.x*r.x,exp2(-9.28*NdotV))*r.x+r.y;vec2 AB=vec2(-1.04,1.04)*a004+r.zw;return specularColor*AB.x+AB.y;}vec3 computeIndirectLightContribution(Material mat,float NdotV,vec3 normal) {vec3 env_light=vec3(0.65,0.65,0.65); #ifdef LIGHTING_3D_MODE float ambient_factor=calculate_ambient_directional_factor(normal);env_light=u_lighting_ambient_color*ambient_factor; #endif vec3 envBRDF=EnvBRDFApprox(mat.specularColor,mat.perceptualRoughness,NdotV);vec3 indirectSpecular= envBRDF*env_light;vec3 indirectDiffuse=mat.diffuseColor*env_light;return indirectSpecular+indirectDiffuse;}vec3 computeLightContribution(Material mat,vec3 lightPosition,vec3 lightColor) {highp vec3 n=mat.normal;highp vec3 v=normalize(-v_position_height.xyz);highp vec3 l=normalize(lightPosition);highp vec3 h=normalize(v+l);float NdotV=clamp(abs(dot(n,v)),0.001,1.0);float NdotL=saturate(dot(n,l));highp float NdotH=saturate(dot(n,h));float VdotH=saturate(dot(v,h));vec3 f=F_SchlickFast(mat.specularColor,VdotH);float g=V_GGXFast(NdotL,NdotV,mat.alphaRoughness);float d=D_GGX(NdotH,mat.alphaRoughness);vec3 diffuseTerm=(1.0-f)*diffuseLambertian(mat);vec3 specularTerm=f*g*d;vec3 transformed_normal=vec3(-n.xy,n.z);float lighting_factor; #ifdef RENDER_SHADOWS lighting_factor=shadowed_light_factor_normal(transformed_normal,v_pos_light_view_0,v_pos_light_view_1,v_depth_shadows); #else lighting_factor=NdotL; #endif vec3 directLightColor=(specularTerm+diffuseTerm)*lighting_factor*lightColor;vec3 indirectLightColor=computeIndirectLightContribution(mat,NdotV,transformed_normal);vec3 color=(saturate(directLightColor)+indirectLightColor);float intensityFactor=1.0; #if !defined(LIGHTING_3D_MODE) const vec3 luminosityFactor=vec3(0.2126,0.7152,0.0722);float luminance=dot(diffuseTerm,luminosityFactor);intensityFactor=mix((1.0-u_lightintensity),max((1.0-luminance+u_lightintensity),1.0),NdotL); #endif color*=intensityFactor;return color;}void main() { #ifdef TERRAIN_FRAGMENT_OCCLUSION if (isOccluded()) {discard;} #endif vec3 lightDir=u_lightpos;vec3 lightColor=u_lightcolor; #ifdef LIGHTING_3D_MODE lightDir=u_lighting_directional_dir;lightDir.xy=-lightDir.xy;lightColor=u_lighting_directional_color; #endif vec4 finalColor; #ifdef DIFFUSE_SHADED vec3 N=getNormal();vec3 baseColor=getBaseColor().rgb;vec3 diffuse=getDiffuseShadedColor(baseColor,N,lightDir,lightColor); #ifdef HAS_TEXTURE_u_occlusionTexture float ao=(texture(u_occlusionTexture,uv_2f).r-1.0)*u_aoIntensity+1.0;diffuse*=ao; #endif finalColor=vec4(mix(diffuse,baseColor,u_emissive_strength),1.0)*u_opacity; #else Material mat=getPBRMaterial();vec3 color=computeLightContribution(mat,lightDir,lightColor);float ao=1.0; #if defined (HAS_TEXTURE_u_occlusionTexture) && defined(HAS_ATTRIBUTE_a_uv_2f) #ifdef OCCLUSION_TEXTURE_TRANSFORM vec2 uv=uv_2f.xy*u_occlusionTextureTransform.zw+u_occlusionTextureTransform.xy; #else vec2 uv=uv_2f; #endif ao=(texture(u_occlusionTexture,uv).x-1.0)*u_aoIntensity+1.0;color*=ao; #endif vec4 emissive=u_emissiveFactor; #if defined(HAS_TEXTURE_u_emissionTexture) && defined(HAS_ATTRIBUTE_a_uv_2f) emissive.rgb*=sRGBToLinear(texture(u_emissionTexture,uv_2f).rgb); #endif #ifdef APPLY_LUT_ON_GPU float emissiveFactorLength=max(length(u_emissiveFactor.rgb),0.001);emissive.rgb=sRGBToLinear(applyLUT(u_lutTexture,linearTosRGB(emissive.rgb/emissiveFactorLength).rbg))*emissiveFactorLength; #endif color+=emissive.rgb;float opacity=mat.baseColor.w*u_opacity; #ifdef HAS_ATTRIBUTE_a_pbr float resEmission=v_roughness_metallic_emissive_alpha.z;resEmission*=v_height_based_emission_params.z+v_height_based_emission_params.w*pow(clamp(v_height_based_emission_params.x,0.0,1.0),v_height_based_emission_params.y);vec3 color_mix=v_color_mix.rgb; #ifdef APPLY_LUT_ON_GPU color_mix=applyLUT(u_lutTexture,color_mix); #endif color=mix(color,color_mix,min(1.0,resEmission)); #ifdef HAS_ATTRIBUTE_a_color_4f float distance=length(vec2(1.3*max(0.0,abs(color_4f.x)-color_4f.z),color_4f.y));distance+= mix(0.5,0.0,clamp(resEmission-1.0,0.0,1.0));opacity*=v_roughness_metallic_emissive_alpha.w*saturate(1.0-distance*distance); #endif #endif vec3 unlitColor=mat.baseColor.rgb*ao+emissive.rgb;color=mix(color,unlitColor,u_emissive_strength);color=linearTosRGB(color);color*=opacity;finalColor=vec4(color,opacity); #endif #ifdef FOG finalColor=fog_dither(fog_apply_premultiplied(finalColor,v_fog_pos,v_position_height.w)); #endif #ifdef RENDER_CUTOFF finalColor*=v_cutoff_opacity; #endif #ifdef INDICATOR_CUTOUT finalColor=applyCutout(finalColor,v_position_height.w); #endif #ifdef FEATURE_CUTOUT finalColor=apply_feature_cutout(finalColor,gl_FragCoord); #endif glFragColor=finalColor; #ifdef OVERDRAW_INSPECTOR glFragColor=vec4(1.0); #endif HANDLE_WIREFRAME_DEBUG;}`,`#include "_prelude_fog.vertex.glsl" #include "_prelude_shadow.vertex.glsl" in vec3 a_pos_3f; #pragma mapbox: define-attribute highp vec3 normal_3f #pragma mapbox: define-attribute highp vec2 uv_2f #pragma mapbox: define-attribute highp vec3 color_3f #pragma mapbox: define-attribute highp vec4 color_4f #pragma mapbox: define-attribute-vertex-shader-only highp vec4 pbr #pragma mapbox: define-attribute-vertex-shader-only highp vec3 heightBasedEmissiveStrength uniform mat4 u_matrix;uniform mat4 u_node_matrix;uniform mat4 u_lighting_matrix;uniform vec3 u_camera_pos;uniform vec4 u_color_mix; #ifdef INSTANCED_ARRAYS in vec4 a_normal_matrix0;in vec4 a_normal_matrix1;in vec4 a_normal_matrix2;in vec4 a_normal_matrix3; #else uniform highp mat4 u_normal_matrix; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out float v_depth_shadows; #endif out vec4 v_position_height;out lowp vec4 v_color_mix; #ifdef TERRAIN_FRAGMENT_OCCLUSION out highp float v_depth; #endif #ifdef HAS_ATTRIBUTE_a_pbr out lowp vec4 v_roughness_metallic_emissive_alpha;out mediump vec4 v_height_based_emission_params; #endif vec3 sRGBToLinear(vec3 srgbIn) {return pow(srgbIn,vec3(2.2));}void main() { #pragma mapbox: initialize-attribute highp vec3 normal_3f #pragma mapbox: initialize-attribute highp vec2 uv_2f #pragma mapbox: initialize-attribute highp vec3 color_3f #pragma mapbox: initialize-attribute highp vec4 color_4f #pragma mapbox: initialize-attribute-custom highp vec4 pbr #pragma mapbox: initialize-attribute-custom highp vec3 heightBasedEmissiveStrength highp mat4 normal_matrix; #ifdef INSTANCED_ARRAYS normal_matrix=mat4(a_normal_matrix0,a_normal_matrix1,a_normal_matrix2,a_normal_matrix3); #else normal_matrix=u_normal_matrix; #endif vec3 local_pos;mat3 rs; #ifdef MODEL_POSITION_ON_GPU vec3 pos_color=normal_matrix[0].xyz;vec4 translate=normal_matrix[1];vec3 pos_a=floor(pos_color);vec3 rgb=1.05*(pos_color-pos_a);float hidden=float(pos_a.x > EXTENT);float color_mix=pos_a.z/100.0;v_color_mix=vec4(sRGBToLinear(rgb),color_mix);float meter_to_tile=normal_matrix[0].w;vec4 pos=vec4(pos_a.xy,translate.z,1.0);rs[0].x=normal_matrix[1].w;rs[0].yz=normal_matrix[2].xy;rs[1].xy=normal_matrix[2].zw;rs[1].z=normal_matrix[3].x;rs[2].xyz=normal_matrix[3].yzw;vec4 pos_node=u_lighting_matrix*vec4(a_pos_3f,1.0);vec3 rotated_pos_node=rs*pos_node.xyz;vec3 pos_model_tile=(rotated_pos_node+vec3(translate.xy,0.0))*vec3(meter_to_tile,meter_to_tile,1.0);pos.xyz+=pos_model_tile;local_pos=pos.xyz;gl_Position=mix(u_matrix*pos,AWAY,hidden);pos.z*=meter_to_tile;v_position_height.xyz=pos.xyz-u_camera_pos; #else local_pos=a_pos_3f;gl_Position=u_matrix*vec4(a_pos_3f,1);v_position_height.xyz=vec3(u_lighting_matrix*vec4(a_pos_3f,1));v_color_mix=vec4(sRGBToLinear(u_color_mix.rgb),u_color_mix.a); #endif v_position_height.w=a_pos_3f.z; #ifdef HAS_ATTRIBUTE_a_pbr vec4 albedo_c=decode_color(pbr.xy);vec2 e_r_m=unpack_float(pbr.z);vec2 r_m= unpack_float(e_r_m.y*16.0);r_m.r=r_m.r*16.0;v_color_mix=vec4(albedo_c.rgb,1.0);v_roughness_metallic_emissive_alpha=vec4(vec3(r_m,e_r_m.x)/255.0,albedo_c.a);v_roughness_metallic_emissive_alpha.z*=2.0;float heightBasedRelativeIntepolation=a_pos_3f.z*heightBasedEmissiveStrength.x+heightBasedEmissiveStrength.y;v_height_based_emission_params.x=heightBasedRelativeIntepolation;v_height_based_emission_params.y=heightBasedEmissiveStrength.z;vec2 emissionMultiplierValues=unpack_float(pbr.w)/256.0;v_height_based_emission_params.z=emissionMultiplierValues.x;v_height_based_emission_params.w=emissionMultiplierValues.y-emissionMultiplierValues.x; #endif #ifdef FOG v_fog_pos=fog_position(local_pos); #endif #ifdef RENDER_CUTOFF v_cutoff_opacity=cutoff_opacity(u_cutoff_params,gl_Position.z); #endif #ifdef TERRAIN_FRAGMENT_OCCLUSION v_depth=gl_Position.z/gl_Position.w; #endif #ifdef HAS_ATTRIBUTE_a_normal_3f #ifdef MODEL_POSITION_ON_GPU float x_squared_scale=dot(rs[0],rs[0]);float y_squared_scale=dot(rs[1],rs[1]);float z_squared_scale=dot(rs[2],rs[2]);vec3 squared_scale=vec3(x_squared_scale,y_squared_scale,z_squared_scale);normal_3f=rs*((u_lighting_matrix*vec4(normal_3f,0.0)).xyz/squared_scale);normal_3f=normalize(normal_3f); #else normal_3f=vec3(normal_matrix*vec4(normal_3f,0)); #endif #endif #ifdef HAS_ATTRIBUTE_a_pbr #ifdef HAS_ATTRIBUTE_a_color_4f v_roughness_metallic_emissive_alpha.w=clamp(color_4f.a*v_roughness_metallic_emissive_alpha.w*(v_roughness_metallic_emissive_alpha.z-1.0),0.0,1.0); #endif #endif #ifdef RENDER_SHADOWS vec4 shadow_pos=u_node_matrix*vec4(local_pos,1.0); #ifdef NORMAL_OFFSET #ifdef HAS_ATTRIBUTE_a_normal_3f #ifdef MODEL_POSITION_ON_GPU vec3 offset=shadow_normal_offset(vec3(-normal_3f.xy,normal_3f.z));shadow_pos.xyz+=offset*shadow_normal_offset_multiplier0(); #else vec3 offset=shadow_normal_offset_model(normal_3f);shadow_pos.xyz+=offset*shadow_normal_offset_multiplier0(); #endif #endif #endif v_pos_light_view_0=u_light_matrix_0*shadow_pos;v_pos_light_view_1=u_light_matrix_1*shadow_pos;v_depth_shadows=gl_Position.w; #endif }`),modelDepth:kr(`in highp float v_depth;void main() { #ifndef DEPTH_TEXTURE glFragColor=pack_depth(v_depth); #endif }`,`in vec3 a_pos_3f;uniform mat4 u_matrix;out highp float v_depth; #ifdef MODEL_POSITION_ON_GPU #ifdef INSTANCED_ARRAYS in vec4 a_normal_matrix0;in vec4 a_normal_matrix1;in vec4 a_normal_matrix2;in vec4 a_normal_matrix3; #else uniform highp mat4 u_instance; #endif uniform highp mat4 u_node_matrix; #endif void main() { #ifdef MODEL_POSITION_ON_GPU highp mat4 instance; #ifdef INSTANCED_ARRAYS instance=mat4(a_normal_matrix0,a_normal_matrix1,a_normal_matrix2,a_normal_matrix3); #else instance=u_instance; #endif vec3 pos_color=instance[0].xyz;vec4 translate=instance[1];vec3 pos_a=floor(pos_color);float hidden=float(pos_a.x > EXTENT);float meter_to_tile=instance[0].w;vec4 pos=vec4(pos_a.xy,translate.z,1.0);mat3 rs;rs[0].x=instance[1].w;rs[0].yz=instance[2].xy;rs[1].xy=instance[2].zw;rs[1].z=instance[3].x;rs[2].xyz=instance[3].yzw;vec4 pos_node=u_node_matrix*vec4(a_pos_3f,1.0);vec3 rotated_pos_node=rs*pos_node.xyz;vec3 pos_model_tile=(rotated_pos_node+vec3(translate.xy,0.0))*vec3(meter_to_tile,meter_to_tile,1.0);pos.xyz+=pos_model_tile;gl_Position=mix(u_matrix*pos,AWAY,hidden); #else gl_Position=u_matrix*vec4(a_pos_3f,1); #endif v_depth=gl_Position.z/gl_Position.w;}`),stars:kr(`in highp vec2 v_uv;in mediump float v_intensity;float shapeCircle(in vec2 uv) {float beginFade=0.6;float lengthFromCenter=length(v_uv);return 1.0-clamp((lengthFromCenter-beginFade)/(1.0-beginFade),0.0,1.0);}void main() {float alpha=shapeCircle(v_uv);vec3 color=vec3(1.0,1.0,1.0);alpha*=v_intensity;glFragColor=vec4(color*alpha,alpha);HANDLE_WIREFRAME_DEBUG;}`,` in vec3 a_pos_3f;in vec2 a_uv;in float a_size_scale;in float a_fade_opacity;uniform mat4 u_matrix;uniform vec3 u_up;uniform vec3 u_right;uniform float u_intensity_multiplier;out highp vec2 v_uv;out mediump float v_intensity;void main() {v_uv=a_uv;v_intensity=a_fade_opacity*u_intensity_multiplier;vec3 pos=a_pos_3f;pos+=a_uv.x*u_right*a_size_scale;pos+=a_uv.y*u_up*a_size_scale;gl_Position=u_matrix*vec4(pos,1.0);}`),snowParticle:kr("in highp vec2 uv;in highp float alphaMultiplier;uniform vec4 u_particleColor;uniform vec2 u_simpleShapeParameters;void main() {float t=clamp((length(uv)-u_simpleShapeParameters.x)/(1.0-u_simpleShapeParameters.x),0.0,1.0);float alpha=1.0-pow(t,pow(10.0,u_simpleShapeParameters.y));alpha*=alphaMultiplier;alpha*=u_particleColor.a;vec3 color=u_particleColor.rgb*alpha;glFragColor=vec4(color,alpha) ;HANDLE_WIREFRAME_DEBUG;}",` in highp vec3 a_pos_3f;in highp vec2 a_uv;in highp vec4 a_snowParticleData;in highp vec4 a_snowParticleDataHorizontalOscillation;uniform mat4 u_modelview;uniform mat4 u_projection;uniform vec3 u_cam_pos;uniform vec2 u_screenSize;uniform float u_time;uniform float u_boxSize;uniform float u_velocityConeAperture; uniform float u_velocity;uniform vec3 u_direction;uniform float u_horizontalOscillationRadius; uniform float u_horizontalOscillationRate; uniform float u_billboardSize;uniform vec2 u_thinningCenterPos;uniform vec3 u_thinningShape;uniform float u_thinningAffectedRatio;uniform float u_thinningParticleOffset;out highp vec2 uv;out highp float alphaMultiplier;void main() {vec3 pos=a_pos_3f;float halfBoxSize=0.5*u_boxSize;pos.xyz*=halfBoxSize;pos+=u_cam_pos;float velocityConeApertureRad=radians(u_velocityConeAperture*0.5);float coneAnglePichRad=velocityConeApertureRad*a_snowParticleData.z;float coneAngleHeadingRad=a_snowParticleData.w*radians(360.0);vec3 localZ=normalize(u_direction);vec3 localX=normalize(cross(localZ,vec3(1,0,0)));vec3 localY=normalize(cross(localZ,localX));vec3 direction;direction.x=cos(coneAngleHeadingRad)*sin(coneAnglePichRad);direction.y=sin(coneAngleHeadingRad)*sin(coneAnglePichRad);direction.z=cos(coneAnglePichRad);direction=normalize(direction);vec3 simPosLocal=vec3(0,0,0);float velocityScale=(1.0+3.0*a_snowParticleData.y)*u_velocity;simPosLocal+=direction*velocityScale*u_time;float horizontalOscillationRadius=u_horizontalOscillationRadius*a_snowParticleDataHorizontalOscillation.x;float horizontalOscillationAngle=u_horizontalOscillationRate*u_time*(-1.0+2.0*a_snowParticleDataHorizontalOscillation.y);simPosLocal.xy+=horizontalOscillationRadius*vec2(cos(horizontalOscillationAngle),sin(horizontalOscillationAngle));vec3 simPos=localX*simPosLocal.x+ localY*simPosLocal.y+localZ*simPosLocal.z;pos+=simPos;pos=fract((pos+vec3(halfBoxSize))/vec3(u_boxSize))*u_boxSize-vec3(halfBoxSize);float clipZ=-u_cam_pos.z+pos.z;vec4 posView=u_modelview*vec4(pos,1.0);float size=u_billboardSize;alphaMultiplier=1.0;vec4 posScreen=u_projection*posView;posScreen/=posScreen.w;posScreen.xy=vec2(0.5)+posScreen.xy*0.5;posScreen.xy*=u_screenSize;vec2 thinningCenterPos=u_thinningCenterPos.xy;thinningCenterPos.y=u_screenSize.y-thinningCenterPos.y;float screenDist=length((thinningCenterPos-posScreen.xy)/(0.5*u_screenSize));screenDist+=a_snowParticleData.x*u_thinningParticleOffset;float scaleFactorMode=0.0;float thinningShapeDist=u_thinningShape.x+u_thinningShape.y;if (screenDist < thinningShapeDist) {float thinningFadeRatio=clamp((screenDist-u_thinningShape.x)/u_thinningShape.y,0.0,1.0);thinningFadeRatio=pow(thinningFadeRatio,u_thinningShape.z);if (a_snowParticleData.x < u_thinningAffectedRatio) {scaleFactorMode=1.0-thinningFadeRatio;alphaMultiplier=thinningFadeRatio;}}vec4 posScreen1=u_projection*vec4(posView.x-size,posView.yzw);posScreen1/=posScreen1.w;vec4 posScreen2=u_projection*vec4(posView.x+size,posView.yzw);posScreen2/=posScreen2.w;posScreen1.xy=vec2(0.5)+posScreen1.xy*0.5;posScreen1.xy*=u_screenSize;posScreen2.xy=vec2(0.5)+posScreen2.xy*0.5;posScreen2.xy*=u_screenSize;float screenLength=length(posScreen1.xy-posScreen2.xy);float screenEpsilon=3.0;float scaleFactor=1.0;if (screenLength < screenEpsilon) {scaleFactor=screenEpsilon/max(screenLength,0.01);scaleFactor=mix(scaleFactor,1.0,scaleFactorMode);}float screenEpsilon2=15.0;if (screenLength > screenEpsilon2) {scaleFactor=screenEpsilon2/max(screenLength,0.01);}size*=scaleFactor;vec2 right=size*vec2(1,0);vec2 up=size*vec2(0,1);posView.xy+=right*a_uv.x;posView.xy+=up*a_uv.y;uv=a_uv;gl_Position=u_projection*posView;}`),rainParticle:kr("in highp vec2 uv;in highp float particleRandomValue;uniform sampler2D u_texScreen;uniform float u_distortionStrength;uniform vec4 u_color;uniform vec2 u_thinningCenterPos;uniform vec3 u_thinningShape;uniform float u_thinningAffectedRatio;uniform float u_thinningParticleOffset;uniform float u_shapeDirectionalPower;uniform float u_mode;void main() {vec2 st=uv*0.5+vec2(0.5);vec2 uvm=uv;uvm.y=-1.0+2.0*pow(st.y,u_shapeDirectionalPower);float shape=clamp(1.0-length(uvm),0.0,1.0);float alpha=abs(shape)*u_color.a;vec2 screenSize=vec2(textureSize(u_texScreen,0));vec2 thinningCenterPos=u_thinningCenterPos.xy;thinningCenterPos.y=screenSize.y-thinningCenterPos.y;float screenDist=length((thinningCenterPos-gl_FragCoord.xy)/(0.5*screenSize));screenDist+=(0.5+0.5*particleRandomValue)*u_thinningParticleOffset;float thinningShapeDist=u_thinningShape.x+u_thinningShape.y;float thinningAlpha=1.0;if (screenDist < thinningShapeDist) {float thinningFadeRatio=clamp((screenDist-u_thinningShape.x)/u_thinningShape.y,0.0,1.0);thinningFadeRatio=pow(thinningFadeRatio,u_thinningShape.z);thinningAlpha*=thinningFadeRatio;}vec2 offsetXY=normalize(uvm)*abs(shape);vec2 stScreen=(gl_FragCoord.xy+offsetXY*u_distortionStrength*thinningAlpha)/screenSize;vec3 colorScreen=texture(u_texScreen,stScreen).rgb;alpha*=thinningAlpha;glFragColor=mix(vec4(colorScreen,1.0),vec4(u_color.rgb*alpha,alpha),u_mode);HANDLE_WIREFRAME_DEBUG;}",` in highp vec3 a_pos_3f;in highp vec2 a_uv;in highp vec4 a_rainParticleData;uniform mat4 u_modelview;uniform mat4 u_projection;uniform vec3 u_cam_pos;uniform float u_time;uniform float u_boxSize;uniform float u_velocityConeAperture; uniform float u_velocity; uniform vec2 u_rainDropletSize;uniform vec3 u_rainDirection;out highp vec2 uv;out highp float particleRandomValue;void main() {vec3 pos=a_pos_3f;float halfBoxSize=0.5*u_boxSize;pos*=halfBoxSize; pos+=u_cam_pos;float velocityConeApertureRad=radians(u_velocityConeAperture*0.5);float coneAnglePichRad=velocityConeApertureRad*a_rainParticleData.z;float coneAngleHeadingRad=a_rainParticleData.w*radians(360.0);vec3 localZ=normalize(u_rainDirection);vec3 localX=normalize(cross(localZ,vec3(1,0,0)));vec3 localY=normalize(cross(localZ,localX));vec3 directionLocal;directionLocal.x=cos(coneAngleHeadingRad)*sin(coneAnglePichRad);directionLocal.y=sin(coneAngleHeadingRad)*sin(coneAnglePichRad);directionLocal.z=cos(coneAnglePichRad);directionLocal=normalize(directionLocal);vec3 directionWorld=localX*directionLocal.x+localY*directionLocal.y+localZ*directionLocal.z;float velocityScale=(1.0+3.0*a_rainParticleData.y)*u_velocity;vec3 simPosLocal=vec3(0,0,0);simPosLocal+=directionLocal*velocityScale*u_time;vec3 simPos=localX*simPosLocal.x+ localY*simPosLocal.y+localZ*simPosLocal.z;pos+=simPos;pos=fract((pos+vec3(halfBoxSize))/vec3(u_boxSize))*u_boxSize-vec3(halfBoxSize);vec4 posView=u_modelview*vec4(pos,1.0);vec3 directionView=normalize((u_modelview*vec4(directionWorld,0.0)).xyz);vec3 side=cross(directionView,normalize(posView.xyz));posView.xyz+=side*a_uv.x*u_rainDropletSize.x;posView.xyz+=directionView*a_uv.y*u_rainDropletSize.y;uv=a_uv;particleRandomValue=a_rainParticleData.x;gl_Position=u_projection*posView;}`),vignette:kr("uniform vec3 u_vignetteShape;uniform vec4 u_vignetteColor;in vec2 st;void main() {float screenDist=length(st);float alpha=clamp((screenDist-u_vignetteShape.x)/u_vignetteShape.y,0.0,1.0);alpha=pow(alpha,u_vignetteShape.z)*u_vignetteColor.a;vec3 color=u_vignetteColor.rgb;glFragColor=vec4(color*alpha,alpha) ;}","in vec2 a_pos_2f;out vec2 st;void main() {st=a_pos_2f;gl_Position=vec4(a_pos_2f,0,1);}"),occlusion:kr("uniform vec4 u_color;void main() {glFragColor=u_color;}",`#include "_prelude_terrain.vertex.glsl" in highp vec2 a_offset_xy;uniform highp vec3 u_anchorPos;uniform mat4 u_matrix;uniform vec2 u_screenSizePx;uniform vec2 u_occluderSizePx;void main() {vec3 world_pos=u_anchorPos; #ifdef TERRAIN float e=elevation(world_pos.xy);world_pos.z+=e; #endif vec4 projected_point=u_matrix*vec4(world_pos,1.0);projected_point.xy+=projected_point.w*a_offset_xy*0.5*u_occluderSizePx/u_screenSizePx;gl_Position=projected_point;}`)};function wp(_,l){let p=_.replace(/\s*\/\/[^\n]*\n/g,` `).split(` `);for(let g of p)if(g=g.trim(),g[0]==="#"&&g.includes("if")&&!g.includes("endif")){g=g.replace("#","").replace(/ifdef|ifndef|elif|if/g,"").replace(/!|defined|\(|\)|\|\||&&/g,"").replace(/\s+/g," ").trim();let C=g.split(" ");for(let x of C)l.includes(x)||l.push(x)}}function kr(_,l){let p=/#include\s+"([^"]+)"/g,g=/#pragma mapbox: ([\w\-]+) ([\w]+) ([\w]+) ([\w]+)/g,C={},x=[],A=[];if(_=_.replace(p,(B,H)=>(A.push(H),"")),(l=l.replace(p,(B,H)=>(x.push(H),""))).includes("flat out"))return void console.error('The usage of "flat" qualifier is disallowed, see: https://bugs.webkit.org/show_bug.cgi?id=268071');let R=[...Rh];wp(_,R),wp(l,R);for(let B of[...x,...A])w_[B]||console.error(`Undefined include: ${B}`),jb[B]||(jb[B]=[],wp(w_[B],jb[B])),R=[...R,...jb[B]];return{fragmentSource:_=_.replace(g,(B,H,G,J,K)=>(C[K]=!0,H==="define"?` #ifndef HAS_UNIFORM_u_${K} in ${G} ${J} ${K}; #else uniform ${G} ${J} u_${K}; #endif `:H==="initialize"?` #ifdef HAS_UNIFORM_u_${K} ${G} ${J} ${K} = u_${K}; #endif `:H==="define-attribute"?` #ifdef HAS_ATTRIBUTE_a_${K} in ${G} ${J} ${K}; #endif `:H==="initialize-attribute"?"":void 0)),vertexSource:l=l.replace(g,(B,H,G,J,K)=>{let oe=J==="float"?"vec2":J,le=K.match(/color/)?"color":oe;return H==="define-attribute-vertex-shader-only"?` #ifdef HAS_ATTRIBUTE_a_${K} in ${G} ${J} a_${K}; #endif `:C[K]?H==="define"?` #ifndef HAS_UNIFORM_u_${K} uniform lowp float u_${K}_t; in ${G} ${oe} a_${K}; out ${G} ${J} ${K}; #else uniform ${G} ${J} u_${K}; #endif `:H==="initialize"?le==="vec4"?` #ifndef HAS_UNIFORM_u_${K} ${K} = a_${K}; #else ${G} ${J} ${K} = u_${K}; #endif `:` #ifndef HAS_UNIFORM_u_${K} ${K} = unpack_mix_${le}(a_${K}, u_${K}_t); #else ${G} ${J} ${K} = u_${K}; #endif `:H==="define-attribute"?` #ifdef HAS_ATTRIBUTE_a_${K} in ${G} ${J} a_${K}; out ${G} ${J} ${K}; #endif `:H==="initialize-attribute"?` #ifdef HAS_ATTRIBUTE_a_${K} ${K} = a_${K}; #endif `:void 0:H==="define"?` #ifndef HAS_UNIFORM_u_${K} uniform lowp float u_${K}_t; in ${G} ${oe} a_${K}; #else uniform ${G} ${J} u_${K}; #endif `:H==="define-instanced"?le==="mat4"?` #ifdef INSTANCED_ARRAYS in vec4 a_${K}0; in vec4 a_${K}1; in vec4 a_${K}2; in vec4 a_${K}3; #else uniform ${G} ${J} u_${K}; #endif `:` #ifdef INSTANCED_ARRAYS in ${G} ${oe} a_${K}; #else uniform ${G} ${J} u_${K}; #endif `:H==="initialize-attribute-custom"?` #ifdef HAS_ATTRIBUTE_a_${K} ${G} ${J} ${K} = a_${K}; #endif `:le==="vec4"?` #ifndef HAS_UNIFORM_u_${K} ${G} ${J} ${K} = a_${K}; #else ${G} ${J} ${K} = u_${K}; #endif `:` #ifndef HAS_UNIFORM_u_${K} ${G} ${J} ${K} = unpack_mix_${le}(a_${K}, u_${K}_t); #else ${G} ${J} ${K} = u_${K}; #endif `}),usedDefines:R,vertexIncludes:x,fragmentIncludes:A}}class wg{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffers=[],this.vao=null}bind(l,p,g,C,x,A,R,B){this.context=l;let H=this.boundPaintVertexBuffers.length!==C.length;for(let J=0;!H&&J{let Ve=Te.paint.get("hillshade-shadow-color"),et=Te.paint.get("hillshade-shadow-color-use-theme").constantOr("default")==="none",Qe=Te.paint.get("hillshade-highlight-color"),it=Te.paint.get("hillshade-highlight-color-use-theme").constantOr("default")==="none",Ze=Te.paint.get("hillshade-accent-color"),Ye=Te.paint.get("hillshade-accent-color-use-theme").constantOr("default")==="none",Je=Te.paint.get("hillshade-emissive-strength"),Bt=r.an(Te.paint.get("hillshade-illumination-direction"));if(Te.paint.get("hillshade-illumination-anchor")==="viewport")Bt-=Ce.transform.angle;else if(Ce.style&&Ce.style.enable3dLights()&&Ce.style.directionalLight){let Jt=Ce.style.directionalLight.properties.get("direction"),Ft=r.d3(Jt.x,Jt.y,Jt.z);Bt=r.an(Ft[1])}let St=!Ce.options.moving;return{u_matrix:Pe||Ce.transform.calculateProjMatrix(he.tileID.toUnwrapped(),St),u_image:0,u_latrange:Vy(0,he.tileID),u_light:[Te.paint.get("hillshade-exaggeration"),Bt],u_shadow:Ve.toPremultipliedRenderColor(et?null:Te.lut),u_highlight:Qe.toPremultipliedRenderColor(it?null:Te.lut),u_emissive_strength:Je,u_accent:Ze.toPremultipliedRenderColor(Ye?null:Te.lut)}})(_,p,g,_.terrain?l.projMatrix:null);_.uploadCommonUniforms(R,J,l.toUnwrapped());let{tileBoundsBuffer:oe,tileBoundsIndexBuffer:le,tileBoundsSegments:de}=_.getTileBoundsBuffers(p);J.draw(_,B.TRIANGLES,C,x,A,Do.disabled,K,g.id,oe,le,de)}function zS(_,l,p){if(!l.needsDEMTextureUpload)return;let g=_.context,C=g.gl;g.pixelStoreUnpackPremultiplyAlpha.set(!1),l.demTexture=l.demTexture||_.getTileTexture(p.stride);let x=p.getPixels();l.demTexture?l.demTexture.update(x,{premultiply:!1}):l.demTexture=new r.T(g,x,C.R32F,{premultiply:!1}),l.needsDEMTextureUpload=!1}function XN(_,l,p){let g=_.context,C=g.gl;if(!l.dem)return;let x=l.dem;if(g.activeTexture.set(C.TEXTURE1),zS(_,l,x),!l.demTexture)return;l.demTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE);let A=x.dim;g.activeTexture.set(C.TEXTURE0);let R=l.hillshadeFBO;if(!R){let K=new r.T(g,{width:A,height:A,data:null},C.RGBA8);K.bind(C.LINEAR,C.CLAMP_TO_EDGE),R=l.hillshadeFBO=g.createFramebuffer(A,A,!0,"renderbuffer"),R.colorAttachment.set(K.texture)}g.bindFramebuffer.set(R.framebuffer),g.viewport.set([0,0,A,A]);let{tileBoundsBuffer:B,tileBoundsIndexBuffer:H,tileBoundsSegments:G}=_.getMercatorTileBoundsBuffers(),J=[];_.linearFloatFilteringSupported()&&J.push("TERRAIN_DEM_FLOAT_FORMAT"),_.getOrCreateProgram("hillshadePrepare",{defines:J}).draw(_,C.TRIANGLES,gn.disabled,xo.disabled,Qo.unblended,Do.disabled,((K,oe)=>{let le=oe.stride,de=r.bC();return r.cd(de,0,r.al,-r.al,0,0,1),r.br(de,de,[0,-r.al,0]),{u_matrix:de,u_image:1,u_dimension:[le,le],u_zoom:K.overscaledZ}})(l.tileID,x),p.id,B,H,G),l.needsHillshadePrepare=!1}class nl{constructor(l){this.gl=l.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(l){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class n1 extends nl{getDefault(){return r.ao.transparent.toNonPremultipliedRenderColor(null)}set(l){let p=this.current;(l.r!==p.r||l.g!==p.g||l.b!==p.b||l.a!==p.a||this.dirty)&&(this.gl.clearColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class Gb extends nl{getDefault(){return 1}set(l){(l!==this.current||this.dirty)&&(this.gl.clearDepth(l),this.current=l,this.dirty=!1)}}class _D extends nl{getDefault(){return 0}set(l){(l!==this.current||this.dirty)&&(this.gl.clearStencil(l),this.current=l,this.dirty=!1)}}class JN extends nl{getDefault(){return[!0,!0,!0,!0]}set(l){let p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||l[3]!==p[3]||this.dirty)&&(this.gl.colorMask(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class AM extends nl{getDefault(){return!0}set(l){(l!==this.current||this.dirty)&&(this.gl.depthMask(l),this.current=l,this.dirty=!1)}}class e3 extends nl{getDefault(){return 255}set(l){(l!==this.current||this.dirty)&&(this.gl.stencilMask(l),this.current=l,this.dirty=!1)}}class kM extends nl{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(l){let p=this.current;(l.func!==p.func||l.ref!==p.ref||l.mask!==p.mask||this.dirty)&&(this.gl.stencilFunc(l.func,l.ref,l.mask),this.current=l,this.dirty=!1)}}class zd extends nl{getDefault(){let l=this.gl;return[l.KEEP,l.KEEP,l.KEEP]}set(l){let p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||this.dirty)&&(this.gl.stencilOp(l[0],l[1],l[2]),this.current=l,this.dirty=!1)}}class Ud extends nl{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;l?p.enable(p.STENCIL_TEST):p.disable(p.STENCIL_TEST),this.current=l,this.dirty=!1}}class t3 extends nl{getDefault(){return[0,1]}set(l){let p=this.current;(l[0]!==p[0]||l[1]!==p[1]||this.dirty)&&(this.gl.depthRange(l[0],l[1]),this.current=l,this.dirty=!1)}}class MM extends nl{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;l?p.enable(p.DEPTH_TEST):p.disable(p.DEPTH_TEST),this.current=l,this.dirty=!1}}class US extends nl{getDefault(){return this.gl.LESS}set(l){(l!==this.current||this.dirty)&&(this.gl.depthFunc(l),this.current=l,this.dirty=!1)}}class HS extends nl{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;l?p.enable(p.BLEND):p.disable(p.BLEND),this.current=l,this.dirty=!1}}class o1 extends nl{getDefault(){let l=this.gl;return[l.ONE,l.ZERO,l.ONE,l.ZERO]}set(l){let p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||l[3]!==p[3]||this.dirty)&&(this.gl.blendFuncSeparate(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class Sf extends nl{getDefault(){return r.ao.transparent.toNonPremultipliedRenderColor(null)}set(l){let p=this.current;(l.r!==p.r||l.g!==p.g||l.b!==p.b||l.a!==p.a||this.dirty)&&(this.gl.blendColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class O0 extends nl{getDefault(){return this.gl.FUNC_ADD}set(l){(l!==this.current||this.dirty)&&(this.gl.blendEquationSeparate(l,l),this.current=l,this.dirty=!1)}}class S_ extends nl{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;l?p.enable(p.CULL_FACE):p.disable(p.CULL_FACE),this.current=l,this.dirty=!1}}class R0 extends nl{getDefault(){return this.gl.BACK}set(l){(l!==this.current||this.dirty)&&(this.gl.cullFace(l),this.current=l,this.dirty=!1)}}class Sg extends nl{getDefault(){return this.gl.CCW}set(l){(l!==this.current||this.dirty)&&(this.gl.frontFace(l),this.current=l,this.dirty=!1)}}let r1=class extends nl{getDefault(){return null}set(_){(_!==this.current||this.dirty)&&(this.gl.useProgram(_),this.current=_,this.dirty=!1)}};class F0 extends nl{getDefault(){return this.gl.TEXTURE0}set(l){(l!==this.current||this.dirty)&&(this.gl.activeTexture(l),this.current=l,this.dirty=!1)}}class OM extends nl{getDefault(){let l=this.gl;return[0,0,l.drawingBufferWidth,l.drawingBufferHeight]}set(l){let p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||l[3]!==p[3]||this.dirty)&&(this.gl.viewport(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class $b extends nl{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;p.bindFramebuffer(p.FRAMEBUFFER,l),this.current=l,this.dirty=!1}}class jS extends nl{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;p.bindRenderbuffer(p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class GS extends nl{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;p.bindTexture(p.TEXTURE_2D,l),this.current=l,this.dirty=!1}}class yD extends nl{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;p.bindBuffer(p.ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class zy extends nl{getDefault(){return null}set(l){let p=this.gl;p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class T_ extends nl{getDefault(){return null}set(l){this.gl&&(l!==this.current||this.dirty)&&(this.gl.bindVertexArray(l),this.current=l,this.dirty=!1)}}class vD extends nl{getDefault(){return 4}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;p.pixelStorei(p.UNPACK_ALIGNMENT,l),this.current=l,this.dirty=!1}}class rt extends nl{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),this.current=l,this.dirty=!1}}class Uy extends nl{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let p=this.gl;p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,l),this.current=l,this.dirty=!1}}class Tf extends nl{constructor(l,p){super(l),this.context=l,this.parent=p}getDefault(){return null}}class Fh extends Tf{setDirty(){this.dirty=!0}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let p=this.gl;p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_2D,l,0),this.current=l,this.dirty=!1}}class wa extends Tf{attachment(){return this.gl.DEPTH_ATTACHMENT}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let p=this.gl;p.framebufferRenderbuffer(p.FRAMEBUFFER,this.attachment(),p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class i3 extends Tf{attachment(){return this.gl.DEPTH_ATTACHMENT}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let p=this.gl;p.framebufferTexture2D(p.FRAMEBUFFER,this.attachment(),p.TEXTURE_2D,l,0),this.current=l,this.dirty=!1}}class n3 extends wa{attachment(){return this.gl.DEPTH_STENCIL_ATTACHMENT}}let bD=(_,l,p)=>({u_matrix:_,u_image0:0,u_skirt_height:l,u_ground_shadow_factor:p}),Tg=(_,l,p,g,C,x,A,R,B,H,G,J,K,oe,le,de)=>({u_proj_matrix:Float32Array.from(_),u_globe_matrix:l,u_normalize_matrix:Float32Array.from(g),u_merc_matrix:p,u_zoom_transition:C,u_merc_center:x,u_image0:0,u_frustum_tl:A,u_frustum_tr:R,u_frustum_br:B,u_frustum_bl:H,u_globe_pos:G,u_globe_radius:J,u_viewport:K,u_grid_matrix:de?Float32Array.from(de):new Float32Array(9),u_skirt_height:oe,u_far_z_cutoff:le});function $S(_,l){return _!=null&&l!=null&&!(!_.hasData()||!l.hasData())&&_.demTexture!=null&&l.demTexture!=null&&_.tileID.key!==l.tileID.key}let P0=new class{constructor(){this.operations={}}newMorphing(_,l,p,g,C){if(_ in this.operations){let x=this.operations[_];x.to.tileID.key!==p.tileID.key&&(x.queued=p)}else this.operations[_]={startTime:g,phase:0,duration:C,from:l,to:p,queued:null}}getMorphValuesForProxy(_){if(!(_ in this.operations))return null;let l=this.operations[_];return{from:l.from,to:l.to,phase:l.phase}}update(_){for(let l in this.operations){let p=this.operations[l];for(p.phase=(_-p.startTime)/p.duration;p.phase>=1||!this._validOp(p);)if(!this._nextOp(p,_)){delete this.operations[l];break}}}_nextOp(_,l){return!!_.queued&&(_.from=_.to,_.to=_.queued,_.queued=null,_.phase=0,_.startTime=l,!0)}_validOp(_){return _.from.hasData()&&_.to.hasData()}},CD={0:null,1:"TERRAIN_VERTEX_MORPHING"};function xD(_,l,p){if(l===0)return 0;let g=l<1&&p===514?.25/l:1;return 6*Math.pow(1.5,22-_)*Math.max(l,1)*g}function o3(_,l){let p=1<<_.z;return!l&&(_.x===0||_.x===p-1)||_.y===0||_.y===p-1}let Sp=_=>({u_matrix:_});function Hy(_,l,p,g,C){if(C>0){let x=r.o.now(),A=(x-_.timeAdded)/C,R=l?(x-l.timeAdded)/C:-1,B=p.getSource(),H=g.coveringZoomLevel({tileSize:B.tileSize,roundZoom:B.roundZoom}),G=!l||Math.abs(l.tileID.overscaledZ-H)>Math.abs(_.tileID.overscaledZ-H),J=G&&_.refreshedUponExpiration?1:r.aA(G?A:1-R,0,1);return l?{opacity:1,mix:1-J,isFading:A<1}:{opacity:J,mix:0,isFading:A<1}}return{opacity:1,mix:0,isFading:!1}}class RM extends kh{constructor(l){let p=Cb("mock-dem",{type:"raster-dem",maxzoom:l.transform.maxZoom},l.style.dispatcher,l.style);super("mock-dem",p,!1),p.setEventedParent(this),this._sourceLoaded=!0}_loadTile(l,p){l.state="loaded",p(null)}}class Ph extends kh{constructor(l){let p=Cb("proxy",{type:"geojson",maxzoom:l.transform.maxZoom},l.style.dispatcher,l.style);super("proxy",p,!1),p.setEventedParent(this),this.map=this.getSource().map=l,this.used=this._sourceLoaded=!0,this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}update(l,p,g){if(l.freezeTileCoverage)return;this.transform=l;let C=l.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce((x,A)=>{if(x[A.key]="",!this._tiles[A.key]){let R=new C_(A,this._source.tileSize*A.overscaleFactor(),l.tileZoom,void 0,void 0,this._source.worldview);R.state="loaded",this._tiles[A.key]=R}return x},{});for(let x in this._tiles)x in C||(this.freeFBO(x),this._tiles[x].unloadVectorData(),delete this._tiles[x])}freeFBO(l){let p=this.proxyCachedFBO[l];if(p!==void 0){let g=Object.values(p);this.renderCachePool.push(...g),delete this.proxyCachedFBO[l]}}deallocRenderCache(){this.renderCache.forEach(l=>l.fb.destroy()),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class qS extends r.aO{constructor(l,p,g){super(l.overscaledZ,l.wrap,l.canonical.z,l.canonical.x,l.canonical.y),this.proxyTileKey=p,this.projMatrix=g}}class s1 extends r.dH{constructor(l,p){super(),this._debugParams={sortTilesHiZFirst:!0,disableRenderCache:!1},l.tp.registerParameter(this._debugParams,["Terrain"],"sortTilesHiZFirst",{},()=>{this._style.map.triggerRepaint()}),l.tp.registerParameter(this._debugParams,["Terrain"],"disableRenderCache",{},()=>{this._style.map.triggerRepaint()}),l.tp.registerButton(["Terrain"],"Invalidate Render Cache",()=>{this.invalidateRenderCache=!0,this._style.map.triggerRepaint()}),this.painter=l,this.terrainTileForTile={},this.prevTerrainTileForTile={};let[g,C,x]=(function(B){let H=new r.bd,G=new r.b1,J=131;H.reserve(17161),G.reserve(33800);let K=r.al/128,oe=r.al+K/2,le=oe+K;for(let Ce=-K;Ceoe||Ce<0||Ce>oe?24575:0,Pe=r.aA(Math.round(he),0,r.al),Ve=r.aA(Math.round(Ce),0,r.al);H.emplaceBack(Pe+Te,Ve)}let de=(Ce,he)=>{let Te=he*J+Ce;G.emplaceBack(Te+1,Te,Te+J),G.emplaceBack(Te+J,Te+J+1,Te+1)};for(let Ce=1;Ce<129;Ce++)for(let he=1;he<129;he++)de(he,Ce);return[0,129].forEach(Ce=>{for(let he=0;he<130;he++)de(he,Ce),de(Ce,he)}),[H,G,32768]})(),A=l.context;this.gridBuffer=A.createVertexBuffer(g,r.bf.members),this.gridIndexBuffer=A.createIndexBuffer(C),this.gridSegments=r.bg.simpleSegment(0,0,g.length,C.length),this.gridNoSkirtSegments=r.bg.simpleSegment(0,0,g.length,x),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new Ph(p.map),this.orthoMatrix=r.bC(),r.cd(this.orthoMatrix,this.painter.transform.projection.name==="globe"?.015:0,r.al,0,r.al,0,1);let R=A.gl;this._overlapStencilMode=new xo({func:R.GEQUAL,mask:255},0,255,R.KEEP,R.KEEP,R.REPLACE),this._previousZoom=l.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=p,this._useVertexMorphing=!0,this._exaggeration=1,this._mockSourceCache=new RM(p.map),this._pendingGroundEffectLayers=[]}set style(l){l.on("data",this._onStyleDataEvent.bind(this)),this._style=l,this._style.map.on("moveend",()=>{this._clearLineLayersFromRenderCache()})}update(l,p,g){if(l&&l.terrain){this._style!==l&&(this.style=l,this._evaluationZoom=void 0);let C=l.terrain.properties,x=l.terrain.drapeRenderMode===0,A=l.terrain.isZoomDependent();this._previousUpdateTimestamp=this.enabled?this._updateTimestamp:void 0,this._updateTimestamp=r.o.now();let R=l.terrain&&l.terrain.scope,B=C.get("source"),H=x?this._mockSourceCache:l.getSourceCache(B,R);if(!H)return void r.w(`Couldn't find terrain source "${B}".`);if(this.sourceCache=H,this._attenuationRange=l.terrain.getAttenuationRange(),this._exaggeration=A?this.calculateExaggeration(p):C.get("exaggeration"),!p.projection.requiresDraping&&A&&this._exaggeration===0)return void this._disable();this.enabled=!0;let G=()=>{this.sourceCache.used&&r.w(`Raster DEM source '${this.sourceCache.id}' is used both for terrain and as layer source. This leads to lower resolution of hillshade. For full hillshade resolution but higher memory consumption, define another raster DEM source.`);let J=this.getScaledDemTileSize();this.sourceCache.update(p,J,!0),this.resetTileLookupCache(this.sourceCache.id)};this.sourceCache.usedForTerrain||(this.resetTileLookupCache(this.sourceCache.id),this.sourceCache.usedForTerrain=!0,G(),this._initializing=!0),G(),p.updateElevation(!0,g),this.resetTileLookupCache(this.proxySourceCache.id),this.proxySourceCache.update(p),this._emptyDEMTextureDirty=!0,this._previousZoom=p.zoom}else this._disable()}calculateExaggeration(l){if(this._attenuationRange&&l.zoom>=Math.ceil(this._attenuationRange[1]))return this._style.terrain.getExaggeration(l.zoom);let p=this._previousCameraAltitude,g=l.getFreeCameraOptions().position.z/l.pixelsPerMeter*l.worldSize;this._previousCameraAltitude=g;let C=p!=null?g-p:Number.MAX_VALUE;if(Math.abs(C)<2)return this._exaggeration;let x=l.zoom,A=this._style.terrain;if(!this._previousUpdateTimestamp)return A.getExaggeration(x);let R=x-this._previousZoom,B=this._previousUpdateTimestamp,H=x;this._evaluationZoom!=null&&(H=this._evaluationZoom,Math.abs(x-H)>.5&&(R=.5*(x-H+R)),R*C<0&&(H+=R)),this._evaluationZoom=H;let G=A.getExaggeration(H),J=G===A.getExaggeration(Math.max(0,H-.1));if(J&&Math.abs(G-this._exaggeration)<.01)return G;let K=Math.min(.1,.00375*(this._updateTimestamp-B));return(J||G<.1||Math.abs(R)<1e-4)&&(K=Math.min(.2,4*K)),r.ak(this._exaggeration,G,K)}resetTileLookupCache(l){this._findCoveringTileCache[l]={}}attenuationRange(){return this._attenuationRange}getDemUpscale(){return this.proxySourceCache.getSource().tileSize/128}getScaledDemTileSize(){return this.sourceCache.getSource().tileSize/128*this.proxySourceCache.getSource().tileSize}_onStyleDataEvent(l){l.dataType==="source"&&l.coord?this._clearRenderCacheForTile(l.sourceCacheId,l.coord):l.dataType==="style"&&(this.invalidateRenderCache=!0,this._evaluationZoom=void 0,this._previousUpdateTimestamp=void 0,this._previousCameraAltitude=void 0)}_disable(){if(this.enabled&&(this.enabled=!1,this._emptyDEMTextureDirty=!0,this._sharedDepthStencil=void 0,this._evaluationZoom=void 0,this._previousUpdateTimestamp=void 0,this.proxySourceCache.deallocRenderCache(),this._style))for(let l in this._style._mergedSourceCaches)this._style._mergedSourceCaches[l].usedForTerrain=!1}destroy(){this._disable(),this._emptyDEMTexture&&this._emptyDEMTexture.destroy(),this.pool.forEach(l=>l.fb.destroy()),this.pool=[],this.framebufferCopyTexture&&this.framebufferCopyTexture.destroy()}_source(){return this.enabled?this.sourceCache:null}isUsingMockSource(){return this.sourceCache===this._mockSourceCache}exaggeration(){return this.enabled?this._exaggeration:0}get visibleDemTiles(){return this._visibleDemTiles}get drapeBufferSize(){let l=2*this.proxySourceCache.getSource().tileSize;return[l,l]}set useVertexMorphing(l){this._useVertexMorphing=l}updateTileBinding(l){if(!this.enabled)return;this.prevTerrainTileForTile=this.terrainTileForTile;let p=this.proxySourceCache,g=this.painter.transform;this._initializing&&(this._initializing=g._centerAltitude===0&&this.getAtPointOrZero(r.ae.fromLngLat(g.center),-1)===-1,this._emptyDEMTextureDirty=!this._initializing);let C=this.proxyCoords=p.getIds().map(B=>{let H=p.getTileByID(B).tileID;return H.projMatrix=g.calculateProjMatrix(H.toUnwrapped()),H});(function(B,H){let G=H.transform.pointCoordinate(H.transform.getCameraPoint()),J=new r.P(G.x,G.y);B.sort((K,oe)=>{if(oe.overscaledZ-K.overscaledZ)return oe.overscaledZ-K.overscaledZ;let le=new r.P(K.canonical.x+(1<{this.proxyToSource[B.key]={}}),this.terrainTileForTile={};let A=this._style._mergedSourceCaches;for(let B in A){let H=A[B];if(!H.used||(H!==this.sourceCache&&this.resetTileLookupCache(H.id),this._setupProxiedCoordsForOrtho(H,l[B],x),H.usedForTerrain))continue;let G=l[B];H.getSource().reparseOverscaled&&this._assignTerrainTiles(G)}this.proxiedCoords[p.id]=C.map(B=>new qS(B,B.key,this.orthoMatrix)),this._assignTerrainTiles(C),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(x),this.renderingToTexture=!1;let R={};this._visibleDemTiles=[];for(let B of this.proxyCoords){let H=this.terrainTileForTile[B.key];if(!H)continue;let G=H.tileID.key;G in R||(this._visibleDemTiles.push(H),R[G]=G)}}_assignTerrainTiles(l){this._initializing||l.forEach(p=>{if(this.terrainTileForTile[p.key])return;let g=this._findTileCoveringTileID(p,this.sourceCache);g&&(this.terrainTileForTile[p.key]=g)})}_prepareDEMTextures(){let l=this.painter.context,p=l.gl;for(let g in this.terrainTileForTile){let C=this.terrainTileForTile[g],x=C.dem;!x||C.demTexture&&!C.needsDEMTextureUpload||(l.activeTexture.set(p.TEXTURE1),zS(this.painter,C,x))}}_prepareDemTileUniforms(l,p,g,C){if(!p||p.demTexture==null)return!1;let x=l.tileID.canonical,A=Math.pow(2,p.tileID.canonical.z-x.z),R=C||"";return g[`u_dem_tl${R}`]=[x.x*A%1,x.y*A%1],g[`u_dem_scale${R}`]=A,!0}get emptyDEMTexture(){return!this._emptyDEMTextureDirty&&this._emptyDEMTexture?this._emptyDEMTexture:this._updateEmptyDEMTexture()}_getLoadedAreaMinimum(){if(!this.enabled)return 0;let l=0,p=this._visibleDemTiles.reduce((g,C)=>{if(!C.dem)return g;let x=C.dem.tree.minimums[0];return x>0&&l++,g+x},0);return l?p/l:0}_updateEmptyDEMTexture(){let l=this.painter.context,p=l.gl;l.activeTexture.set(p.TEXTURE2);let g=this._getLoadedAreaMinimum(),C=new r.dI({width:1,height:1},new Float32Array([g]));this._emptyDEMTextureDirty=!1;let x=this._emptyDEMTexture;return x?x.update(C,{premultiply:!1}):x=this._emptyDEMTexture=new r.T(l,C,p.R32F,{premultiply:!1}),x}setupElevationDraw(l,p,g){let C=this.painter.context,x=C.gl,A={u_dem:2,u_dem_prev:4,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_depth_range_unpack:[0,1],u_occluder_half_size:16,u_occlusion_depth_offset:-1e-4,u_exaggeration:0};A.u_exaggeration=this.exaggeration();let R=null,B=null,H=1;if(g&&g.morphing&&this._useVertexMorphing){let oe=g.morphing.srcDemTile,le=g.morphing.dstDemTile;H=g.morphing.phase,oe&&le&&(this._prepareDemTileUniforms(l,oe,A,"_prev")&&(B=oe),this._prepareDemTileUniforms(l,le,A)&&(R=le))}let G=oe=>oe&&oe.demTexture&&this.painter.linearFloatFilteringSupported()?x.LINEAR:x.NEAREST,J=null;var K;if(this.enabled?B&&R?(J=R.demTexture,C.activeTexture.set(x.TEXTURE4),B.demTexture.bind(G(B),x.CLAMP_TO_EDGE),A.u_dem_lerp=H):(R=this.terrainTileForTile[l.tileID.key],J=this._prepareDemTileUniforms(l,R,A)?R.demTexture:this.emptyDEMTexture):J=this.emptyDEMTexture,C.activeTexture.set(x.TEXTURE2),J&&(A.u_dem_size=(K=J).size[0]===1?1:K.size[0]-2,J.bind(G(R),x.CLAMP_TO_EDGE)),this.painter.setupDepthForOcclusion(g&&g.useDepthForOcclusion,p,A),g&&g.useMeterToDem&&R){let oe=(1<{if(he===Ft)return;let Yt=[CD[Ft],"PROJECTION_GLOBE_VIEW"];Pe&&Yt.push("CUSTOM_ANTIALIASING");let ji=H.isTileAffectedByFog(Jt);Ce=H.getOrCreateProgram("globeRaster",{defines:Yt,overrideFog:ji}),he=Ft},et=H.colorModeForRenderPass(),Qe=new gn(de.LEQUAL,gn.ReadWrite,H.depthRangeFor3D);P0.update(oe);let it=r.dB(Te),Ze=[r.aF(Te.center.lng),r.aJ(Te.center.lat)],Ye=H.globeSharedBuffers,Je=[Te.width*r.o.devicePixelRatio,Te.height*r.o.devicePixelRatio],Bt=Float32Array.from(Te.globeMatrix),St={useDenormalizedUpVectorScale:!0};{let Jt=H.transform,Ft=xD(Jt.zoom,G.exaggeration(),G.sourceCache._source.tileSize);he=-1;let Yt=de.TRIANGLES;for(let ji of K){let Nt=J.getTile(ji),gt=xo.disabled,ii=G.prevTerrainTileForTile[ji.key],Ut=G.terrainTileForTile[ji.key];$S(ii,Ut)&&P0.newMorphing(ji.key,ii,Ut,oe,250),le.activeTexture.set(de.TEXTURE0),Nt.texture&&Nt.texture.bind(de.LINEAR,de.CLAMP_TO_EDGE);let Si=P0.getMorphValuesForProxy(ji.key),Hi=Si?1:0;Si&&Object.assign(St,{morphing:{srcDemTile:Si.from,dstDemTile:Si.to,phase:r.dz(Si.phase)}});let un=r.dC(ji.canonical),Fi=r.dD(un.getCenter().lat),Mi=r.dE(ji.canonical,un,Fi,Jt.worldSize/Jt._pixelsPerMercatorPixel),$n=r.bk(r.dF(ji.canonical)),Ln=Tg(Jt.expandedFarZProjMatrix,Bt,it,$n,r.aj(Jt.zoom),Ze,Jt.frustumCorners.TL,Jt.frustumCorners.TR,Jt.frustumCorners.BR,Jt.frustumCorners.BL,Jt.globeCenterInViewSpace,Jt.globeRadius,Je,Ft,Jt._farZ,Mi);if(Ve(ji,Hi),Ce&&(G.setupElevationDraw(Nt,Ce,St),H.uploadCommonUniforms(le,Ce,ji.toUnwrapped()),Ye)){let[Gn,Rn,Ro]=Ye.getGridBuffers(Fi,Ft!==0);Ce.draw(H,Yt,Qe,gt,et,Do.backCCW,Ln,"globe_raster",Gn,Rn,Ro)}}}if(Ye&&(H.renderDefaultNorthPole||H.renderDefaultSouthPole)){let Jt=["GLOBE_POLES","PROJECTION_GLOBE_VIEW"];Pe&&Jt.push("CUSTOM_ANTIALIASING"),Ce=H.getOrCreateProgram("globeRaster",{defines:Jt});for(let Ft of K){let{x:Yt,y:ji,z:Nt}=Ft.canonical,gt=ji===0,ii=ji===(1<Gn.draw(H,de.TRIANGLES,Qe,xo.disabled,et,Do.disabled,Tg(Te.expandedFarZProjMatrix,Mi,Mi,$n,0,Ze,Te.frustumCorners.TL,Te.frustumCorners.TR,Te.frustumCorners.BR,Te.frustumCorners.BL,Te.globeCenterInViewSpace,Te.globeRadius,Je,0,Te._farZ),"globe_pole_raster",Rn,Hi,un);G.setupElevationDraw(Fi,Ce,St),H.uploadCommonUniforms(le,Ce,Ft.toUnwrapped()),gt&&H.renderDefaultNorthPole&&Ln(Ce,Ut),ii&&H.renderDefaultSouthPole&&(Mi=r.cR(r.bC(),Mi,[1,-1,1]),Ln(Ce,Si))}}}})(C,x,A,R,B);else{let H=C.context,G=H.gl,J,K,oe=C.shadowRenderer,le=k0(C,C.longestCutoffRange),de=et=>{if(K===et)return;let Qe=[];Qe.push(CD[et]),le.shouldRenderCutoff&&Qe.push("RENDER_CUTOFF"),oe&&(Qe.push("RENDER_SHADOWS","DEPTH_TEXTURE"),oe.useNormalOffset&&Qe.push("NORMAL_OFFSET")),J=C.getOrCreateProgram("terrainRaster",{defines:Qe}),K=et},Ce=C.colorModeForRenderPass(),he=new gn(G.LEQUAL,gn.ReadWrite,C.depthRangeFor3D);P0.update(B);let Te=C.transform,Pe=xD(Te.zoom,x.exaggeration(),x.sourceCache._source.tileSize),Ve=[0,0,0];if(oe){let et=C.style.directionalLight,Qe=C.style.ambientLight;et&&Qe&&(Ve=Cf(C.style,et,Qe))}{K=-1;let et=G.TRIANGLES,[Qe,it]=[x.gridIndexBuffer,x.gridSegments];for(let Ze of R){let Ye=A.getTile(Ze),Je=xo.disabled,Bt=x.prevTerrainTileForTile[Ze.key],St=x.terrainTileForTile[Ze.key];$S(Bt,St)&&P0.newMorphing(Ze.key,Bt,St,B,250),H.activeTexture.set(G.TEXTURE0),Ye.texture&&Ye.texture.bind(G.LINEAR,G.CLAMP_TO_EDGE);let Jt=P0.getMorphValuesForProxy(Ze.key),Ft=Jt?1:0,Yt;Jt&&(Yt={morphing:{srcDemTile:Jt.from,dstDemTile:Jt.to,phase:r.dz(Jt.phase)}});let ji=bD(Ze.projMatrix,o3(Ze.canonical,Te.renderWorldCopies)?Pe/10:Pe,Ve);if(de(Ft),!J)continue;x.setupElevationDraw(Ye,J,Yt);let Nt=Ze.toUnwrapped();oe&&oe.setupShadows(Nt,J),C.uploadCommonUniforms(H,J,Nt,null,le),J.draw(C,et,he,Je,Ce,Do.backCCW,ji,"terrain_raster",x.gridBuffer,Qe,it)}}}})(p,this,this.proxySourceCache,l,this._updateTimestamp),this.renderingToTexture=!0,p.gpuTimingDeferredRenderEnd(),l.splice(0,l.length))}renderBatch(l){if(this._drapedRenderBatches.length===0)return l+1;this.renderingToTexture=!0;let p=this.painter,g=this.painter.context,C=this.proxySourceCache,x=this.proxiedCoords[C.id],A=this._drapedRenderBatches.shift(),R=p.style.order,B=[],H=0;for(let G of x){let J=C.getTileByID(G.proxyTileKey),K=C.proxyCachedFBO[G.key]?C.proxyCachedFBO[G.key][l]:void 0,oe=K!==void 0?C.renderCache[K]:this.pool[H++],le=K!==void 0;if(J.texture=oe.tex,le&&!oe.dirty){B.push(J.tileID);continue}let de;g.bindFramebuffer.set(oe.fb.framebuffer),this.renderedToTile=!1,oe.dirty&&(g.clear({color:r.ao.transparent,stencil:0}),oe.dirty=!1);for(let Ce=A.start;Ce<=A.end;++Ce){let he=p.style._mergedLayers[R[Ce]];if(he.isHidden(p.transform.zoom))continue;let Te=p.style.getLayerSourceCache(he),Pe=Te?this.proxyToSource[G.key][Te.id]:[G];if(!Pe)continue;let Ve=Pe;g.viewport.set([0,0,oe.fb.width,oe.fb.height]),de!==(Te?Te.id:null)&&(this._setupStencil(oe,Pe,he,Te),de=Te?Te.id:null),p.renderLayer(p,Te,he,Ve)}if(this._drapedRenderBatches.length===0)for(let Ce of this._pendingGroundEffectLayers){let he=p.style._mergedLayers[R[Ce]];if(he.isHidden(p.transform.zoom))continue;let Te=p.style.getLayerSourceCache(he),Pe=Te?this.proxyToSource[G.key][Te.id]:[G];if(!Pe)continue;let Ve=Pe;g.viewport.set([0,0,oe.fb.width,oe.fb.height]),de!==(Te?Te.id:null)&&(this._setupStencil(oe,Pe,he,Te),de=Te?Te.id:null),p.renderLayer(p,Te,he,Ve)}this.renderedToTile?(oe.dirty=!0,B.push(J.tileID)):le||--H,H===5&&(H=0,this.renderToBackBuffer(B))}return this.renderToBackBuffer(B),this.renderingToTexture=!1,g.bindFramebuffer.set(null),g.viewport.set([0,0,p.width,p.height]),A.end+1}postRender(){}isLayerOrderingCorrect(l){let p=l.order.length,g=-1,C=p;for(let x=0;xg}getMinElevationBelowMSL(){let l=0;return this._visibleDemTiles.filter(p=>p.dem).forEach(p=>{l=Math.min(l,p.dem.tree.minimums[0])}),l===0?l:(l-30)*this._exaggeration}raycast(l,p,g){if(!this._visibleDemTiles)return null;let C=this._visibleDemTiles.filter(x=>x.dem).map(x=>{let A=x.tileID,R=1<(x.t!==null?x.t:Number.MAX_VALUE)-(A.t!==null?A.t:Number.MAX_VALUE));for(let x of C){if(x.t==null)return null;let A=x.tile.dem.tree.raycast(x.minx,x.miny,x.maxx,x.maxy,l,p,g);if(A!=null)return A}return null}_createFBO(){let l=this.painter.context,p=l.gl,g=this.drapeBufferSize;l.activeTexture.set(p.TEXTURE0);let C=new r.T(l,{width:g[0],height:g[1],data:null},p.RGBA8);C.bind(p.LINEAR,p.CLAMP_TO_EDGE);let x=l.createFramebuffer(g[0],g[1],!0,null);return x.colorAttachment.set(C.texture),x.depthAttachment=new n3(l,x.framebuffer),this._sharedDepthStencil===void 0?(this._sharedDepthStencil=l.createRenderbuffer(l.gl.DEPTH_STENCIL,g[0],g[1]),this._stencilRef=0,x.depthAttachment.set(this._sharedDepthStencil),l.clear({stencil:0})):x.depthAttachment.set(this._sharedDepthStencil),l.extTextureFilterAnisotropic&&p.texParameterf(p.TEXTURE_2D,l.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,l.extTextureFilterAnisotropicMax),{fb:x,tex:C,dirty:!1}}_initFBOPool(){for(;this.pool.length{let p=this._style._mergedLayers[l],g=p.isHidden(this.painter.transform.zoom);return p.type==="hillshade"||p.type==="custom"?!g&&p.shouldRedrape():!g&&p.hasTransition()})}_clearLineLayersFromRenderCache(){let l=!1;for(let g of this._style.getSources())if(g instanceof ou){l=!0;break}if(!l)return;let p={};for(let g=0;gB>R.end)||r.w("fill-extrusion with flood lighting and/or ground ambient occlusion should be moved to be on top of all draped layers.")}this._drapedRenderBatches=g}_setupRenderCache(l){let p=this.proxySourceCache;if(this._shouldDisableRenderCache()||this.invalidateRenderCache){if(this.invalidateRenderCache=!1,p.renderCache.length>p.renderCachePool.length){let A=Object.values(p.proxyCachedFBO);p.proxyCachedFBO={};for(let R=0;R=0;A--){let R=g[A];if(p.getTileByID(R.key),p.proxyCachedFBO[R.key]!==void 0){let B=l[R.key],H=this.proxyToSource[R.key],G=0;for(let J in H){let K=H[J],oe=B[J];if(!oe||oe.length!==K.length||K.some((le,de)=>le!==oe[de]||C[J]&&C[J].hasOwnProperty(le.key))){G=-1;break}++G}for(let J in p.proxyCachedFBO[R.key])p.renderCache[p.proxyCachedFBO[R.key][J]].dirty=G<0||G!==Object.values(B).length}}let x=[...this._drapedRenderBatches];x.sort((A,R)=>R.end-R.start-(A.end-A.start));for(let A of x)for(let R of g){if(p.proxyCachedFBO[R.key])continue;let B=p.renderCachePool.pop();B===void 0&&p.renderCache.length<50&&(B=p.renderCache.length,p.renderCache.push(this._createFBO())),B!==void 0&&(p.proxyCachedFBO[R.key]={},p.proxyCachedFBO[R.key][A.start]=B,p.renderCache[B].dirty=!0)}this._tilesDirty={}}_setupStencil(l,p,g,C){if(!C||!this._sourceTilesOverlap[C.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));let x=this.painter.context,A=x.gl;if(p.length<=1)return void(this._overlapStencilType=!1);let R;if(g.isTileClipped())R=p.length,this._overlapStencilMode.test={func:A.EQUAL,mask:255},this._overlapStencilType="Clip";else{if(!(p[0].overscaledZ>p[p.length-1].overscaledZ))return void(this._overlapStencilType=!1);R=1,this._overlapStencilMode.test={func:A.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+R>255&&(x.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=R,this._overlapStencilMode.ref=this._stencilRef,g.isTileClipped()&&this._renderTileClippingMasks(p,this._overlapStencilMode.ref)}clipOrMaskOverlapStencilType(){return this._overlapStencilType==="Clip"||this._overlapStencilType==="Mask"}stencilModeForRTTOverlap(l){return this.renderingToTexture&&this._overlapStencilType?(this._overlapStencilType==="Clip"&&(this._overlapStencilMode.ref=this.painter._tileClippingMaskIDs[l.key]),this._overlapStencilMode):xo.disabled}_renderTileClippingMasks(l,p){let g=this.painter,C=this.painter.context,x=C.gl;g._tileClippingMaskIDs={},C.setColorMode(Qo.disabled),C.setDepthMode(gn.disabled);let A=g.getOrCreateProgram("clippingMask");for(let R of l){let B=g._tileClippingMaskIDs[R.key]=--p;A.draw(g,x.TRIANGLES,gn.disabled,new xo({func:x.ALWAYS,mask:0},B,255,x.KEEP,x.KEEP,x.REPLACE),Qo.disabled,Do.disabled,Sp(R.projMatrix),"$clipping",g.tileExtentBuffer,g.quadTriangleIndexBuffer,g.tileExtentSegments)}}pointCoordinate(l){let p=this.painter.transform;if(l.x<0||l.x>p.width||l.y<0||l.y>p.height)return null;let g=[l.x,l.y,1,1];r.aC(g,g,p.pixelMatrixInverse),r.cJ(g,g,1/g[3]),g[0]/=p.worldSize,g[1]/=p.worldSize;let C=p._camera.position,x=r.ce(1,p.center.lat),A=[C[0],C[1],C[2]/x,0],R=r.d9([],g.slice(0,3),A);r.aw(R,R);let B=this.raycast(A,R,this._exaggeration);return B!==null&&B?(r.bH(A,A,R,B),A[3]=A[2],A[2]*=x,A):null}_setupProxiedCoordsForOrtho(l,p,g){if(l.getSource()instanceof r.aS)return this._setupProxiedCoordsForImageSource(l,p,g);this._findCoveringTileCache[l.id]=this._findCoveringTileCache[l.id]||{};let C=this.proxiedCoords[l.id]=[],x=this.proxyCoords;for(let B=0;BG.overscaledZ-H.overscaledZ)}_setupProxiedCoordsForImageSource(l,p,g){if(!l.getSource().loaded())return;let C=this.proxiedCoords[l.id]=[],x=this.proxyCoords,A=l.getSource(),R=A.tileID;if(!R)return;let B=new r.P(R.x,R.y)._div(1<(J.min.x=Math.min(J.min.x,K.x-B.x),J.min.y=Math.min(J.min.y,K.y-B.y),J.max.x=Math.max(J.max.x,K.x-B.x),J.max.y=Math.max(J.max.y,K.y-B.y),J),{min:new r.P(Number.MAX_VALUE,Number.MAX_VALUE),max:new r.P(-Number.MAX_VALUE,-Number.MAX_VALUE)}),G=(J,K)=>{let oe=J.wrap+J.canonical.x/(1<Ce+H.max.x||le+dehe+H.max.y};for(let J=0;JA.key===p.tileID.key);if(x)return x}if(p.tileID.key!==l.key){let x=l.canonical.z-p.tileID.canonical.z,A,R,B;C=r.bC();let H=p.tileID.wrap-l.wrap<0?(A=r.al>>x,R=A*((p.tileID.canonical.x<=J){let K=l.canonical.z-J;p.getSource().reparseOverscaled?(R=Math.max(l.canonical.z+2,p.transform.tileZoom),A=new r.aO(R,l.wrap,J,l.canonical.x>>K,l.canonical.y>>K)):K!==0&&(R=J,A=new r.aO(R,l.wrap,J,l.canonical.x>>K,l.canonical.y>>K))}A.key!==l.key&&(H.push(A.key),g=p.getTile(A))}let G=J=>{H.forEach(K=>{C[K]=J}),H.length=0};for(R-=1;R>=B&&(!g||!g.hasData());R--){g&&G(g.tileID.key);let J=A.calculateScaledKey(R);if(g=p.getTileByID(J),g&&g.hasData())break;let K=C[J];if(K===null)break;K===void 0?H.push(J):g=p.getTileByID(K)}return G(g?g.tileID.key:null),g&&g.hasData()?g:null}findDEMTileFor(l){return this.enabled?this._findTileCoveringTileID(l,this.sourceCache):null}prepareDrawTile(){this.renderedToTile=!0}_clearRenderCacheForTile(l,p){let g=this._tilesDirty[l];g||(g=this._tilesDirty[l]={}),g[p.key]=!0}}function ym(_,l,p){let g=(function(R,B,H){let G=r.bJ(B,R),J=r.bJ(H,[.2126,.7152,.0722]),K=(le,de,Ce)=>(1-Ce)*le+Ce*de,oe=K(1-.3*Math.min(J,1),1,Math.min(G+1,1));return K(.92,1,Math.asin(r.aA(B[2],-1,1))/Math.PI+.5)*oe})(_,[0,0,1],l),C=[0,0,0];r.c4(C,p.slice(0,3),g);let x=[0,0,0];r.c4(x,l.slice(0,3),_[2]);let A=[0,0,0];return r.d7(A,C,x),r.da(A)}let wD=["fill","fillOutline","fillPattern","line","linePattern","background","backgroundPattern","hillshade","raster"],SD=["stars","rainParticle","snowParticle","fillExtrusion","fillExtrusionGroundEffect","elevatedStructures","model","symbol"];class KS{static cacheKey(l,p,g,C){let x=`${p}${C?C.cacheKey:""}`;for(let A of g)l.usedDefines.includes(A)&&(x+=`/${A}`);return x}constructor(l,p,g,C,x,A){let R=l.gl;this.program=R.createProgram(),this.configuration=C,this.name=p,this.fixedDefines=[...A];let B=C?C.defines():[];B=B.concat(A.map(le=>`#define ${le}`));let H=`#version 300 es `,G=H+B.concat("precision mediump float;",wf,M0.fragmentSource).join(` `);for(let le of g.fragmentIncludes)G+=` ${w_[le]}`;G+=` ${g.fragmentSource}`;let J=H+B.concat("precision highp float;",wf,M0.vertexSource).join(` `);for(let le of g.vertexIncludes)J+=` ${w_[le]}`;this.forceManualRenderingForInstanceIDShaders=l.forceManualRenderingForInstanceIDShaders&&g.vertexSource.indexOf("gl_InstanceID")!==-1,this.forceManualRenderingForInstanceIDShaders&&(J+=` uniform int u_instanceID; `),J+=` ${g.vertexSource}`,this.forceManualRenderingForInstanceIDShaders&&(J=J.replaceAll("gl_InstanceID","u_instanceID"));let K=R.createShader(R.FRAGMENT_SHADER);if(R.isContextLost())return void(this.failedToCreate=!0);R.shaderSource(K,G),R.compileShader(K),R.attachShader(this.program,K);let oe=R.createShader(R.VERTEX_SHADER);R.isContextLost()?this.failedToCreate=!0:(R.shaderSource(oe,J),R.compileShader(oe),R.attachShader(this.program,oe),this.attributes={},R.linkProgram(this.program),R.deleteShader(oe),R.deleteShader(K),this.fixedUniforms=x(l),this.binderUniforms=C?C.getUniforms(l):[],this.forceManualRenderingForInstanceIDShaders&&(this.instancingUniforms=(le=>({u_instanceID:new r.cg(le)}))(l)),(A.includes("TERRAIN")||p.indexOf("symbol")!==-1||p.indexOf("circle")!==-1)&&(this.terrainUniforms=(le=>({u_dem:new r.cg(le),u_dem_prev:new r.cg(le),u_dem_tl:new r.cj(le),u_dem_scale:new r.ci(le),u_dem_tl_prev:new r.cj(le),u_dem_scale_prev:new r.ci(le),u_dem_size:new r.ci(le),u_dem_lerp:new r.ci(le),u_exaggeration:new r.ci(le),u_depth:new r.cg(le),u_depth_size_inv:new r.cj(le),u_depth_range_unpack:new r.cj(le),u_occluder_half_size:new r.ci(le),u_occlusion_depth_offset:new r.ci(le),u_meter_to_dem:new r.ci(le),u_label_plane_matrix_inv:new r.ck(le)}))(l)),A.includes("GLOBE")&&(this.globeUniforms=(le=>({u_tile_tl_up:new r.ch(le),u_tile_tr_up:new r.ch(le),u_tile_br_up:new r.ch(le),u_tile_bl_up:new r.ch(le),u_tile_up_scale:new r.ci(le)}))(l)),A.includes("FOG")&&(this.fogUniforms=(le=>({u_fog_matrix:new r.ck(le),u_fog_range:new r.cj(le),u_fog_color:new r.d2(le),u_fog_horizon_blend:new r.ci(le),u_fog_vertical_limit:new r.cj(le),u_fog_temporal_offset:new r.ci(le),u_frustum_tl:new r.ch(le),u_frustum_tr:new r.ch(le),u_frustum_br:new r.ch(le),u_frustum_bl:new r.ch(le),u_globe_pos:new r.ch(le),u_globe_radius:new r.ci(le),u_globe_transition:new r.ci(le),u_is_globe:new r.cg(le),u_viewport:new r.cj(le)}))(l)),A.includes("RENDER_CUTOFF")&&(this.cutoffUniforms=(le=>({u_cutoff_params:new r.d2(le)}))(l)),A.includes("LIGHTING_3D_MODE")&&(this.lightsUniforms=(le=>({u_lighting_ambient_color:new r.ch(le),u_lighting_directional_dir:new r.ch(le),u_lighting_directional_color:new r.ch(le),u_ground_radiance:new r.ch(le)}))(l)),A.includes("RENDER_SHADOWS")&&(this.shadowUniforms=(le=>({u_light_matrix_0:new r.ck(le),u_light_matrix_1:new r.ck(le),u_fade_range:new r.cj(le),u_shadow_normal_offset:new r.ch(le),u_shadow_intensity:new r.ci(le),u_shadow_texel_size:new r.ci(le),u_shadow_map_resolution:new r.ci(le),u_shadow_direction:new r.ch(le),u_shadow_bias:new r.ch(le),u_shadowmap_0:new r.cg(le),u_shadowmap_1:new r.cg(le)}))(l)))}getAttributeLocation(l,p){let g=this.attributes[p];return g===void 0&&(g=this.attributes[p]=l.getAttribLocation(this.program,p)),g}setTerrainUniformValues(l,p){if(!this.terrainUniforms)return;let g=this.terrainUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let C in p)g[C]&&g[C].set(this.program,C,p[C])}}setGlobeUniformValues(l,p){if(!this.globeUniforms)return;let g=this.globeUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let C in p)g[C]&&g[C].set(this.program,C,p[C])}}setFogUniformValues(l,p){if(!this.fogUniforms)return;let g=this.fogUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let C in p)g[C].set(this.program,C,p[C])}}setCutoffUniformValues(l,p){if(!this.cutoffUniforms)return;let g=this.cutoffUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let C in p)g[C].set(this.program,C,p[C])}}setLightsUniformValues(l,p){if(!this.lightsUniforms)return;let g=this.lightsUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let C in p)g[C].set(this.program,C,p[C])}}setShadowUniformValues(l,p){if(this.failedToCreate||!this.shadowUniforms)return;let g=this.shadowUniforms;l.program.set(this.program);for(let C in p)g[C].set(this.program,C,p[C])}_drawDebugWireframe(l,p,g,C,x,A,R,B,H,G){let J=l.options.wireframe;if(J.terrain===!1&&J.layers2D===!1&&J.layers3D===!1)return;let K=l.context;if(!(!(!J.terrain||this.name!=="terrainRaster"&&this.name!=="globeRaster")||!(!J.layers2D||l._terrain&&l._terrain.renderingToTexture||!wD.includes(this.name))||!(!J.layers3D||!SD.includes(this.name))))return;let oe=K.gl,le=l.wireframeDebugCache.getLinesFromTrianglesBuffer(l.frameCounter,x,K);if(!le)return;let de=[...this.fixedDefines];de.push("DEBUG_WIREFRAME");let Ce=l.getOrCreateProgram(this.name,{config:this.configuration,defines:de});K.program.set(Ce.program);let he=(Ve,et,Qe)=>{if(et[Ve]&&Qe[Ve])for(let it in et[Ve])Qe[Ve][it]&&Qe[Ve][it].set(Qe.program,it,et[Ve][it].current)};H&&H.setUniforms(Ce.program,K,Ce.binderUniforms,R,{zoom:B}),he("fixedUniforms",this,Ce),he("terrainUniforms",this,Ce),he("globeUniforms",this,Ce),he("fogUniforms",this,Ce),he("lightsUniforms",this,Ce),he("shadowUniforms",this,Ce),le.bind(),K.setColorMode(new Qo([oe.ONE,oe.ONE_MINUS_SRC_ALPHA,oe.ZERO,oe.ONE],r.ao.transparent,[!0,!0,!0,!1])),K.setDepthMode(new gn(p.func===oe.LESS?oe.LEQUAL:p.func,gn.ReadOnly,p.range)),K.setStencilMode(xo.disabled);let Te=3*A.primitiveLength*2,Pe=3*A.primitiveOffset*2*2;if(this.forceManualRenderingForInstanceIDShaders){let Ve=G||1;for(let et=0;et1?oe.drawElementsInstanced(oe.LINES,Te,oe.UNSIGNED_SHORT,Pe,G):oe.drawElements(oe.LINES,Te,oe.UNSIGNED_SHORT,Pe);x.bind(),K.program.set(this.program),K.setDepthMode(p),K.setStencilMode(g),K.setColorMode(C)}checkUniforms(l,p,g){if(this.fixedDefines.includes(p)){for(let C of Object.keys(g))if(!g[C].initialized)throw new Error(`Program '${this.name}', from draw '${l}': uniform ${C} not set but required by ${p} being defined`)}}draw(l,p,g,C,x,A,R,B,H,G,J,K,oe,le,de,Ce){let he=l.context,Te=he.gl;if(this.failedToCreate)return;he.program.set(this.program),he.setDepthMode(g),he.setStencilMode(C),he.setColorMode(x),he.setCullFace(A);for(let et of Object.keys(this.fixedUniforms))this.fixedUniforms[et].set(this.program,et,R[et]);le&&le.setUniforms(this.program,he,this.binderUniforms,K,{zoom:oe});let Pe={[Te.POINTS]:1,[Te.LINES]:2,[Te.TRIANGLES]:3,[Te.LINE_STRIP]:1}[p];this.checkUniforms(B,"RENDER_SHADOWS",this.shadowUniforms);let Ve=Ce&&Ce>0?1:void 0;for(let et of J.get()){let Qe=et.vaos||(et.vaos={});if((Qe[B]||(Qe[B]=new wg)).bind(he,this,H,le?le.getPaintVertexBuffers():[],G,et.vertexOffset,de||[],Ve),this.forceManualRenderingForInstanceIDShaders){let it=Ce||1;for(let Ze=0;Ze1?Te.drawElementsInstanced(p,et.primitiveLength*Pe,Te.UNSIGNED_SHORT,et.primitiveOffset*Pe*2,Ce):G?Te.drawElements(p,et.primitiveLength*Pe,Te.UNSIGNED_SHORT,et.primitiveOffset*Pe*2):Te.drawArrays(p,et.vertexOffset,et.vertexLength);p===Te.TRIANGLES&&G&&this._drawDebugWireframe(l,g,C,x,G,et,K,oe,le,Ce)}}}function a1(_,l,p=0){let g=Math.pow(2,l.tileID.overscaledZ),C=l.tileSize*Math.pow(2,_.transform.tileZoom)/g,x=C*(l.tileID.canonical.x+l.tileID.wrap*g),A=C*l.tileID.canonical.y;return{u_image:0,u_texsize:l.imageAtlasTexture?l.imageAtlasTexture.size:[0,0],u_tile_units_to_pixels:1/r.ay(l,1,_.transform.tileZoom),u_pixel_coord_upper:[x>>16,A>>16],u_pixel_coord_lower:[65535&x,65535&A],u_pattern_transition:p}}let qb={terrain:0,flat:1},I_=r.bC(),l1=(_,l,p,g,C,x,A,R,B,H,G,J,K,oe,le,de,Ce,he)=>{let Te=l.style.light,Pe=Te.properties.get("position"),Ve=[Pe.x,Pe.y,Pe.z],et=r.dL();Te.properties.get("anchor")==="viewport"&&(r.dM(et,-l.transform.angle),r.dN(Ve,Ve,et));let Qe=Te.properties.get("color").toPremultipliedRenderColor(null),it=l.transform,Ze={u_matrix:_,u_lightpos:Ve,u_lightintensity:Te.properties.get("intensity"),u_lightcolor:[Qe.r,Qe.g,Qe.b],u_vertical_gradient:+p,u_opacity:g,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:I_,u_merc_center:[0,0],u_up_dir:[0,0,0],u_height_lift:0,u_height_type:qb[H],u_base_type:qb[G],u_ao:C,u_edge_radius:x,u_width_scale:A,u_flood_light_color:le,u_vertical_scale:de,u_flood_light_intensity:Ce,u_ground_shadow_factor:he};return it.projection.name==="globe"&&(Ze.u_tile_id=[R.canonical.x,R.canonical.y,1<({u_matrix:_,u_edge_radius:l,u_width_scale:p,u_vertical_scale:g,u_height_type:qb[C],u_base_type:qb[x]}),vm=(_,l,p,g,C,x,A,R,B,H,G,J,K,oe,le,de,Ce,he)=>{let Te=l1(_,l,p,g,C,x,A,R,H,G,J,K,oe,le,de,Ce,1,[0,0,0]),Pe={u_height_factor:-Math.pow(2,R.overscaledZ)/B.tileSize/8};return Object.assign(Te,a1(l,B,he),Pe)},ID=(_,l,p)=>({u_matrix:_,u_emissive_strength:l,u_ground_shadow_factor:p}),jy=(_,l,p,g,C,x=0)=>Object.assign(ID(_,l,C),a1(p,g,x)),r3=(_,l,p,g)=>({u_matrix:_,u_world:p,u_emissive_strength:l,u_ground_shadow_factor:g}),s3=(_,l,p,g,C,x,A=0)=>Object.assign(jy(_,l,p,g,x,A),{u_world:C}),a3=(_,l)=>({u_matrix:_,u_ground_shadow_factor:l}),c1=(_,l,p,g,C)=>({u_matrix:_,u_camera_pos:[l[0],l[1],l[2]],u_depth_bias:p,u_height_scale:g,u_reset_depth:C}),FM=(_,l,p,g,C,x,A)=>({u_matrix:_,u_normal_matrix:l,u_opacity:p,u_faux_facade_ao_intensity:g,u_camera_pos:C,u_tile_to_meter:x,u_facade_emissive_chance:A}),l3=_=>({u_matrix:_}),ED=_=>({u_matrix:_}),d1=(_,l,p,g,C,x,A,R)=>{let B=r.al/x.tileSize;return{u_matrix:_,u_inv_rot_matrix:l,u_camera_to_center_distance:p.getCameraToCenterDistance(R),u_extrude_scale:[p.pixelsToGLUnits[0]/B,p.pixelsToGLUnits[1]/B],u_zoom_transition:g,u_tile_id:A,u_merc_center:C}},Gy=(_,l,p=1)=>({u_matrix:_,u_color:l,u_overlay:0,u_overlay_scale:p}),E_=r.bC(),PM=(_,l,p,g,C,x,A)=>{let R=_.transform,B=R.projection.name==="globe",H=B?r.dO(R.zoom,l.canonical)*R._pixelsPerMercatorPixel:r.ay(p,1,x),G={u_matrix:l.projMatrix,u_extrude_scale:H,u_intensity:A,u_inv_rot_matrix:E_,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(B){G.u_inv_rot_matrix=g,G.u_merc_center=C,G.u_tile_id=[l.canonical.x,l.canonical.y,1<({u_matrix:_,u_normalize_matrix:l,u_globe_matrix:p,u_merc_matrix:g,u_grid_matrix:C,u_tl_parent:x,u_scale_parent:H,u_fade_t:G.mix,u_opacity:G.opacity*J.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:J.paint.get("raster-brightness-min"),u_brightness_high:J.paint.get("raster-brightness-max"),u_saturation_factor:r.dQ(J.paint.get("raster-saturation")),u_contrast_factor:r.dP(J.paint.get("raster-contrast")),u_spin_weights:D_(J.paint.get("raster-hue-rotate")),u_perspective_transform:K,u_raster_elevation:oe,u_zoom_transition:A,u_merc_center:R,u_cutoff_params:B,u_colorization_mix:WS(r.dR,de,he),u_colorization_offset:DD(r.dR,Ce,he),u_color_ramp:le,u_texture_offset:[Pe/(Te+2*Pe),Te/(Te+2*Pe)],u_texture_res:[Te+2*Pe,Te+2*Pe],u_emissive_strength:Ve});function D_(_){_*=Math.PI/180;let l=Math.sin(_),p=Math.cos(_);return[(2*p+1)/3,(-Math.sqrt(3)*l-p+1)/3,(Math.sqrt(3)*l-p+1)/3]}let Lh=.05,Hd=(_,l,p,g,C,x,A,R,B,H,G,J)=>({u_matrix:_,u_normalize_matrix:l,u_globe_matrix:p,u_merc_matrix:g,u_grid_matrix:C,u_tl_parent:x,u_scale_parent:H,u_fade_t:G.mix,u_opacity:G.opacity,u_image0:0,u_image1:1,u_raster_elevation:J,u_zoom_transition:A,u_merc_center:R,u_cutoff_params:B}),AD=(_,l,p,g,C,x,A,R,B,H)=>({u_particle_texture:_,u_particle_texture_side_len:l,u_tile_offset:p,u_velocity:g,u_color_ramp:x,u_velocity_res:C,u_max_speed:A,u_uv_offset:R,u_data_scale:[255*B[0],255*B[1]],u_data_offset:H,u_particle_pos_scale:1.1,u_particle_pos_offset:[Lh,Lh]}),u1=(_,l,p,g,C,x,A,R,B,H)=>({u_particle_texture:_,u_particle_texture_side_len:l,u_velocity:p,u_velocity_res:g,u_max_speed:C,u_speed_factor:x,u_reset_rate:A,u_rand_seed:Math.random(),u_uv_offset:R,u_data_scale:[255*B[0],255*B[1]],u_data_offset:H,u_particle_pos_scale:1.1,u_particle_pos_offset:[Lh,Lh]}),YS=r.bC(),$y=(_,l,p,g,C,x,A,R,B,H,G,J,K,oe,le,de,Ce,he,Te,Pe,Ve,et,Qe,it)=>{let Ze=C.transform,Ye={u_is_size_zoom_constant:+(_==="constant"||_==="source"),u_is_size_feature_constant:+(_==="constant"||_==="camera"),u_size_t:l?l.uSizeT:0,u_size:l?l.uSize:0,u_camera_to_center_distance:Ze.getCameraToCenterDistance(Te),u_rotate_symbol:+p,u_aspect_ratio:Ze.width/Ze.height,u_fade_change:C.options.fadeDuration?C.symbolFadeChange:1,u_matrix:x,u_label_plane_matrix:A,u_coord_matrix:R,u_is_text:+H,u_elevation_from_sea:B?1:0,u_pitch_with_map:+g,u_texsize:G,u_texsize_icon:J,u_texture:0,u_texture_icon:1,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:YS,u_merc_center:[0,0],u_camera_forward:[0,0,0],u_ecef_origin:[0,0,0],u_tile_matrix:YS,u_up_vector:[0,-1,0],u_color_adj_mat:et,u_icon_transition:Qe||0,u_gamma_scale:g?C.transform.getCameraToCenterDistance(Te)*Math.cos(C.terrain?0:C.transform._pitch):1,u_device_pixel_ratio:r.o.devicePixelRatio,u_is_halo:1,u_scale_factor:it||1,u_ground_shadow_factor:Pe,u_inv_matrix:r.bl(r.bC(),A),u_normal_scale:Ve,u_lutTexture:ql.LUT};return Te.name==="globe"&&(Ye.u_tile_id=[oe.canonical.x,oe.canonical.y,1<({u_matrix:_,u_emissive_strength:l,u_opacity:p,u_color:g}),p1=(_,l,p,g,C,x,A,R,B)=>Object.assign((function(H,G,J,K,oe,le){let{width:de,height:Ce}=K.imageManager.getPixelSize(G),he=Math.pow(2,le.tileID.overscaledZ),Te=le.tileSize*Math.pow(2,K.transform.tileZoom)/he,Pe=Te*(le.tileID.canonical.x+le.tileID.wrap*he),Ve=Te*le.tileID.canonical.y;return{u_image:0,u_pattern_tl:J.tl,u_pattern_br:J.br,u_texsize:[de,Ce],u_pattern_size:J.displaySize,u_pattern_units_to_pixels:oe?[K.transform.width,-1*K.transform.height]:[1/r.ay(le,1,K.transform.tileZoom),1/r.ay(le,1,K.transform.tileZoom)],u_pixel_coord_upper:[Pe>>16,Ve>>16],u_pixel_coord_lower:[65535&Pe,65535&Ve]}})(0,x,A,g,R,B),{u_matrix:_,u_emissive_strength:l,u_opacity:p}),kD=new Float32Array(r.bA([])),qy=(_,l,p,g,C,x,A,R,B,H,G,J,K,oe=[0,0,0],le)=>{let de=C.style.light,Ce=de.properties.get("position"),he=[-Ce.x,-Ce.y,Ce.z],Te=r.dL();de.properties.get("anchor")==="viewport"&&(r.dM(Te,-C.transform.angle),r.dN(he,he,Te));let Pe=G.alphaMode==="MASK",Ve=de.properties.get("color").toNonPremultipliedRenderColor(null),et=K.paint.get("model-ambient-occlusion-intensity"),Qe=K.paint.get("model-color").constantOr(r.ao.white).toNonPremultipliedRenderColor(null);return Qe.a=K.paint.get("model-color-mix-intensity").constantOr(0),{u_matrix:_,u_lighting_matrix:l,u_normal_matrix:p,u_node_matrix:g||kD,u_lightpos:he,u_lightintensity:de.properties.get("intensity"),u_lightcolor:[Ve.r,Ve.g,Ve.b],u_camera_pos:oe,u_opacity:x,u_baseTextureIsAlpha:0,u_alphaMask:+Pe,u_alphaCutoff:G.alphaCutoff,u_baseColorFactor:A.toNonPremultipliedRenderColor(null).toArray01(),u_emissiveFactor:R.toNonPremultipliedRenderColor(null).toArray01(),u_metallicFactor:B,u_roughnessFactor:H,u_baseColorTexture:ql.BaseColor,u_metallicRoughnessTexture:ql.MetallicRoughness,u_normalTexture:ql.Normal,u_occlusionTexture:ql.Occlusion,u_emissionTexture:ql.Emission,u_lutTexture:ql.LUT,u_color_mix:Qe.toArray01(),u_aoIntensity:et,u_emissive_strength:J,u_occlusionTextureTransform:le||[0,0,0,0]}},Kb=(_,l=kD,p=kD)=>({u_matrix:_,u_instance:l,u_node_matrix:p}),LM={fillExtrusion:_=>({u_matrix:new r.ck(_),u_lightpos:new r.ch(_),u_lightintensity:new r.ci(_),u_lightcolor:new r.ch(_),u_vertical_gradient:new r.ci(_),u_opacity:new r.ci(_),u_edge_radius:new r.ci(_),u_width_scale:new r.ci(_),u_ao:new r.cj(_),u_height_type:new r.cg(_),u_base_type:new r.cg(_),u_tile_id:new r.ch(_),u_zoom_transition:new r.ci(_),u_inv_rot_matrix:new r.ck(_),u_merc_center:new r.cj(_),u_up_dir:new r.ch(_),u_height_lift:new r.ci(_),u_flood_light_color:new r.ch(_),u_vertical_scale:new r.ci(_),u_flood_light_intensity:new r.ci(_),u_ground_shadow_factor:new r.ch(_)}),fillExtrusionDepth:_=>({u_matrix:new r.ck(_),u_edge_radius:new r.ci(_),u_width_scale:new r.ci(_),u_vertical_scale:new r.ci(_),u_height_type:new r.cg(_),u_base_type:new r.cg(_)}),fillExtrusionPattern:_=>({u_matrix:new r.ck(_),u_lightpos:new r.ch(_),u_lightintensity:new r.ci(_),u_lightcolor:new r.ch(_),u_vertical_gradient:new r.ci(_),u_height_factor:new r.ci(_),u_edge_radius:new r.ci(_),u_width_scale:new r.ci(_),u_ao:new r.cj(_),u_height_type:new r.cg(_),u_base_type:new r.cg(_),u_tile_id:new r.ch(_),u_zoom_transition:new r.ci(_),u_inv_rot_matrix:new r.ck(_),u_merc_center:new r.cj(_),u_up_dir:new r.ch(_),u_height_lift:new r.ci(_),u_image:new r.cg(_),u_texsize:new r.cj(_),u_pixel_coord_upper:new r.cj(_),u_pixel_coord_lower:new r.cj(_),u_tile_units_to_pixels:new r.ci(_),u_opacity:new r.ci(_),u_pattern_transition:new r.ci(_)}),fillExtrusionGroundEffect:_=>({u_matrix:new r.ck(_),u_opacity:new r.ci(_),u_ao_pass:new r.ci(_),u_meter_to_tile:new r.ci(_),u_ao:new r.cj(_),u_flood_light_intensity:new r.ci(_),u_flood_light_color:new r.ch(_),u_attenuation:new r.ci(_),u_edge_radius:new r.ci(_),u_fb:new r.cg(_),u_fb_size:new r.ci(_),u_dynamic_offset:new r.ci(_)}),fill:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_ground_shadow_factor:new r.ch(_)}),fillPattern:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_image:new r.cg(_),u_texsize:new r.cj(_),u_pixel_coord_upper:new r.cj(_),u_pixel_coord_lower:new r.cj(_),u_tile_units_to_pixels:new r.ci(_),u_ground_shadow_factor:new r.ch(_),u_pattern_transition:new r.ci(_)}),fillOutline:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_world:new r.cj(_),u_ground_shadow_factor:new r.ch(_)}),fillOutlinePattern:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_world:new r.cj(_),u_image:new r.cg(_),u_texsize:new r.cj(_),u_pixel_coord_upper:new r.cj(_),u_pixel_coord_lower:new r.cj(_),u_tile_units_to_pixels:new r.ci(_),u_ground_shadow_factor:new r.ch(_),u_pattern_transition:new r.ci(_)}),building:_=>({u_matrix:new r.ck(_),u_normal_matrix:new r.ck(_),u_opacity:new r.ci(_),u_faux_facade_ao_intensity:new r.ci(_),u_camera_pos:new r.ch(_),u_tile_to_meter:new r.ci(_),u_facade_emissive_chance:new r.ci(_)}),buildingBloom:_=>({u_matrix:new r.ck(_)}),buildingDepth:_=>({u_matrix:new r.ck(_)}),elevatedStructuresDepth:_=>({u_matrix:new r.ck(_),u_depth_bias:new r.ci(_)}),elevatedStructures:_=>({u_matrix:new r.ck(_),u_ground_shadow_factor:new r.ch(_)}),elevatedStructuresDepthReconstruct:_=>({u_matrix:new r.ck(_),u_camera_pos:new r.ch(_),u_depth_bias:new r.ci(_),u_height_scale:new r.ci(_),u_reset_depth:new r.ci(_)}),circle:r.dV,collisionBox:_=>({u_matrix:new r.ck(_),u_inv_rot_matrix:new r.ck(_),u_camera_to_center_distance:new r.ci(_),u_extrude_scale:new r.cj(_),u_zoom_transition:new r.ci(_),u_merc_center:new r.cj(_),u_tile_id:new r.ch(_)}),collisionCircle:_=>({u_matrix:new r.ck(_),u_inv_matrix:new r.ck(_),u_camera_to_center_distance:new r.ci(_),u_viewport_size:new r.cj(_)}),debug:_=>({u_color:new r.dx(_),u_matrix:new r.ck(_),u_overlay:new r.cg(_),u_overlay_scale:new r.ci(_)}),clippingMask:_=>({u_matrix:new r.ck(_)}),heatmap:_=>({u_extrude_scale:new r.ci(_),u_intensity:new r.ci(_),u_matrix:new r.ck(_),u_inv_rot_matrix:new r.ck(_),u_merc_center:new r.cj(_),u_tile_id:new r.ch(_),u_zoom_transition:new r.ci(_),u_up_dir:new r.ch(_)}),heatmapTexture:_=>({u_image:new r.cg(_),u_color_ramp:new r.cg(_),u_opacity:new r.ci(_)}),hillshade:_=>({u_matrix:new r.ck(_),u_image:new r.cg(_),u_latrange:new r.cj(_),u_light:new r.cj(_),u_shadow:new r.dx(_),u_highlight:new r.dx(_),u_emissive_strength:new r.ci(_),u_accent:new r.dx(_)}),hillshadePrepare:_=>({u_matrix:new r.ck(_),u_image:new r.cg(_),u_dimension:new r.cj(_),u_zoom:new r.ci(_)}),line:r.dU,linePattern:r.dT,raster:_=>({u_matrix:new r.ck(_),u_normalize_matrix:new r.ck(_),u_globe_matrix:new r.ck(_),u_merc_matrix:new r.ck(_),u_grid_matrix:new r.dy(_),u_tl_parent:new r.cj(_),u_scale_parent:new r.ci(_),u_fade_t:new r.ci(_),u_opacity:new r.ci(_),u_image0:new r.cg(_),u_image1:new r.cg(_),u_brightness_low:new r.ci(_),u_brightness_high:new r.ci(_),u_saturation_factor:new r.ci(_),u_contrast_factor:new r.ci(_),u_spin_weights:new r.ch(_),u_perspective_transform:new r.cj(_),u_raster_elevation:new r.ci(_),u_zoom_transition:new r.ci(_),u_merc_center:new r.cj(_),u_cutoff_params:new r.d2(_),u_colorization_mix:new r.d2(_),u_colorization_offset:new r.ci(_),u_color_ramp:new r.cg(_),u_texture_offset:new r.cj(_),u_texture_res:new r.cj(_),u_emissive_strength:new r.ci(_)}),rasterParticle:_=>({u_matrix:new r.ck(_),u_normalize_matrix:new r.ck(_),u_globe_matrix:new r.ck(_),u_merc_matrix:new r.ck(_),u_grid_matrix:new r.dy(_),u_tl_parent:new r.cj(_),u_scale_parent:new r.ci(_),u_fade_t:new r.ci(_),u_opacity:new r.ci(_),u_image0:new r.cg(_),u_image1:new r.cg(_),u_raster_elevation:new r.ci(_),u_zoom_transition:new r.ci(_),u_merc_center:new r.cj(_),u_cutoff_params:new r.d2(_)}),rasterParticleTexture:_=>({u_texture:new r.cg(_),u_opacity:new r.ci(_)}),rasterParticleDraw:_=>({u_particle_texture:new r.cg(_),u_particle_texture_side_len:new r.ci(_),u_tile_offset:new r.cj(_),u_velocity:new r.cg(_),u_color_ramp:new r.cg(_),u_velocity_res:new r.cj(_),u_max_speed:new r.ci(_),u_uv_offset:new r.cj(_),u_data_scale:new r.cj(_),u_data_offset:new r.ci(_),u_particle_pos_scale:new r.ci(_),u_particle_pos_offset:new r.cj(_)}),rasterParticleUpdate:_=>({u_particle_texture:new r.cg(_),u_particle_texture_side_len:new r.ci(_),u_velocity:new r.cg(_),u_velocity_res:new r.cj(_),u_max_speed:new r.ci(_),u_speed_factor:new r.ci(_),u_reset_rate:new r.ci(_),u_rand_seed:new r.ci(_),u_uv_offset:new r.cj(_),u_data_scale:new r.cj(_),u_data_offset:new r.ci(_),u_particle_pos_scale:new r.ci(_),u_particle_pos_offset:new r.cj(_)}),symbol:_=>({u_is_size_zoom_constant:new r.cg(_),u_is_size_feature_constant:new r.cg(_),u_size_t:new r.ci(_),u_size:new r.ci(_),u_camera_to_center_distance:new r.ci(_),u_rotate_symbol:new r.cg(_),u_aspect_ratio:new r.ci(_),u_fade_change:new r.ci(_),u_matrix:new r.ck(_),u_label_plane_matrix:new r.ck(_),u_coord_matrix:new r.ck(_),u_is_text:new r.cg(_),u_elevation_from_sea:new r.cg(_),u_pitch_with_map:new r.cg(_),u_texsize:new r.cj(_),u_texsize_icon:new r.cj(_),u_texture:new r.cg(_),u_texture_icon:new r.cg(_),u_gamma_scale:new r.ci(_),u_device_pixel_ratio:new r.ci(_),u_tile_id:new r.ch(_),u_zoom_transition:new r.ci(_),u_inv_rot_matrix:new r.ck(_),u_merc_center:new r.cj(_),u_camera_forward:new r.ch(_),u_tile_matrix:new r.ck(_),u_up_vector:new r.ch(_),u_ecef_origin:new r.ch(_),u_is_halo:new r.cg(_),u_icon_transition:new r.ci(_),u_color_adj_mat:new r.ck(_),u_scale_factor:new r.ci(_),u_ground_shadow_factor:new r.ch(_),u_inv_matrix:new r.ck(_),u_normal_scale:new r.ci(_),u_lutTexture:new r.cg(_)}),background:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_opacity:new r.ci(_),u_color:new r.dx(_)}),backgroundPattern:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_opacity:new r.ci(_),u_image:new r.cg(_),u_pattern_tl:new r.cj(_),u_pattern_br:new r.cj(_),u_texsize:new r.cj(_),u_pattern_size:new r.cj(_),u_pixel_coord_upper:new r.cj(_),u_pixel_coord_lower:new r.cj(_),u_pattern_units_to_pixels:new r.cj(_)}),terrainRaster:_=>({u_matrix:new r.ck(_),u_image0:new r.cg(_),u_skirt_height:new r.ci(_),u_ground_shadow_factor:new r.ch(_)}),skybox:_=>({u_matrix:new r.ck(_),u_sun_direction:new r.ch(_),u_cubemap:new r.cg(_),u_opacity:new r.ci(_),u_temporal_offset:new r.ci(_)}),skyboxGradient:_=>({u_matrix:new r.ck(_),u_color_ramp:new r.cg(_),u_center_direction:new r.ch(_),u_radius:new r.ci(_),u_opacity:new r.ci(_),u_temporal_offset:new r.ci(_)}),skyboxCapture:_=>({u_matrix_3f:new r.dy(_),u_sun_direction:new r.ch(_),u_sun_intensity:new r.ci(_),u_color_tint_r:new r.d2(_),u_color_tint_m:new r.d2(_),u_luminance:new r.ci(_)}),globeRaster:_=>({u_proj_matrix:new r.ck(_),u_globe_matrix:new r.ck(_),u_normalize_matrix:new r.ck(_),u_merc_matrix:new r.ck(_),u_zoom_transition:new r.ci(_),u_merc_center:new r.cj(_),u_image0:new r.cg(_),u_grid_matrix:new r.dy(_),u_skirt_height:new r.ci(_),u_far_z_cutoff:new r.ci(_),u_frustum_tl:new r.ch(_),u_frustum_tr:new r.ch(_),u_frustum_br:new r.ch(_),u_frustum_bl:new r.ch(_),u_globe_pos:new r.ch(_),u_globe_radius:new r.ci(_),u_viewport:new r.cj(_)}),globeAtmosphere:_=>({u_frustum_tl:new r.ch(_),u_frustum_tr:new r.ch(_),u_frustum_br:new r.ch(_),u_frustum_bl:new r.ch(_),u_horizon:new r.ci(_),u_transition:new r.ci(_),u_fadeout_range:new r.ci(_),u_atmosphere_fog_color:new r.d2(_),u_high_color:new r.d2(_),u_space_color:new r.d2(_),u_temporal_offset:new r.ci(_),u_horizon_angle:new r.ci(_)}),model:_=>({u_matrix:new r.ck(_),u_lighting_matrix:new r.ck(_),u_normal_matrix:new r.ck(_),u_node_matrix:new r.ck(_),u_lightpos:new r.ch(_),u_lightintensity:new r.ci(_),u_lightcolor:new r.ch(_),u_camera_pos:new r.ch(_),u_opacity:new r.ci(_),u_baseColorFactor:new r.d2(_),u_emissiveFactor:new r.d2(_),u_metallicFactor:new r.ci(_),u_roughnessFactor:new r.ci(_),u_baseTextureIsAlpha:new r.cg(_),u_alphaMask:new r.cg(_),u_alphaCutoff:new r.ci(_),u_baseColorTexture:new r.cg(_),u_metallicRoughnessTexture:new r.cg(_),u_normalTexture:new r.cg(_),u_occlusionTexture:new r.cg(_),u_emissionTexture:new r.cg(_),u_lutTexture:new r.cg(_),u_color_mix:new r.d2(_),u_aoIntensity:new r.ci(_),u_emissive_strength:new r.ci(_),u_occlusionTextureTransform:new r.d2(_)}),modelDepth:_=>({u_matrix:new r.ck(_),u_instance:new r.ck(_),u_node_matrix:new r.ck(_)}),groundShadow:_=>({u_matrix:new r.ck(_),u_ground_shadow_factor:new r.ch(_)}),stars:_=>({u_matrix:new r.ck(_),u_up:new r.ch(_),u_right:new r.ch(_),u_intensity_multiplier:new r.ci(_)}),snowParticle:_=>({u_modelview:new r.ck(_),u_projection:new r.ck(_),u_time:new r.ci(_),u_cam_pos:new r.ch(_),u_velocityConeAperture:new r.ci(_),u_velocity:new r.ci(_),u_horizontalOscillationRadius:new r.ci(_),u_horizontalOscillationRate:new r.ci(_),u_boxSize:new r.ci(_),u_billboardSize:new r.ci(_),u_simpleShapeParameters:new r.cj(_),u_screenSize:new r.cj(_),u_thinningCenterPos:new r.cj(_),u_thinningShape:new r.ch(_),u_thinningAffectedRatio:new r.ci(_),u_thinningParticleOffset:new r.ci(_),u_particleColor:new r.d2(_),u_direction:new r.ch(_)}),rainParticle:_=>({u_modelview:new r.ck(_),u_projection:new r.ck(_),u_time:new r.ci(_),u_cam_pos:new r.ch(_),u_texScreen:new r.cg(_),u_velocityConeAperture:new r.ci(_),u_velocity:new r.ci(_),u_boxSize:new r.ci(_),u_rainDropletSize:new r.cj(_),u_distortionStrength:new r.ci(_),u_rainDirection:new r.ch(_),u_color:new r.d2(_),u_screenSize:new r.cj(_),u_thinningCenterPos:new r.cj(_),u_thinningShape:new r.ch(_),u_thinningAffectedRatio:new r.ci(_),u_thinningParticleOffset:new r.ci(_),u_shapeDirectionalPower:new r.ci(_),u_shapeNormalPower:new r.ci(_),u_mode:new r.ci(_)}),vignette:_=>({u_vignetteShape:new r.ch(_),u_vignetteColor:new r.d2(_)}),occlusion:_=>({u_matrix:new r.ck(_),u_anchorPos:new r.ch(_),u_screenSizePx:new r.cj(_),u_occluderSizePx:new r.cj(_),u_color:new r.d2(_)})},ru=(()=>{class _{constructor(p,g,C,x){this.id=_.uniqueIdxCounter,_.uniqueIdxCounter++,this.context=p;let A=p.gl;this.buffer=A.createBuffer(),this.dynamicDraw=!!C,this.context.unbindVAO(),p.bindElementBuffer.set(this.buffer),A.bufferData(A.ELEMENT_ARRAY_BUFFER,g.arrayBuffer,this.dynamicDraw?A.DYNAMIC_DRAW:A.STATIC_DRAW),this.dynamicDraw||x||g.destroy()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(p){this.id=_.uniqueIdxCounter,_.uniqueIdxCounter++;let g=this.context.gl;this.context.unbindVAO(),this.bind(),g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,0,p.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}return _.uniqueIdxCounter=0,_})(),QS={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class NM{constructor(l,p,g,C,x,A){this.length=p.length,this.attributes=g,this.itemSize=p.bytesPerElement,this.dynamicDraw=C,this.instanceCount=A,this.context=l;let R=l.gl;this.buffer=R.createBuffer(),l.bindVertexBuffer.set(this.buffer),R.bufferData(R.ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?R.DYNAMIC_DRAW:R.STATIC_DRAW),this.dynamicDraw||x||p.destroy()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(l){let p=this.context.gl;this.bind(),p.bufferSubData(p.ARRAY_BUFFER,0,l.arrayBuffer)}enableAttributes(l,p){for(let g=0;g0&&l.vertexAttribDivisor(x,g)}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Nh{constructor(l,p,g,C,x){this.context=l,this.width=p,this.height=g;let A=this.framebuffer=l.gl.createFramebuffer();C&&(this.colorAttachment=new Fh(l,A)),x&&(this.depthAttachmentType=x,this.depthAttachment=x==="renderbuffer"?new wa(l,A):new i3(l,A))}destroy(){let l=this.context.gl;if(this.colorAttachment){let p=this.colorAttachment.get();p&&l.deleteTexture(p)}if(this.depthAttachment&&this.depthAttachmentType)if(this.depthAttachmentType==="renderbuffer"){let p=this.depthAttachment.get();p&&l.deleteRenderbuffer(p)}else{let p=this.depthAttachment.get();p&&l.deleteTexture(p)}l.deleteFramebuffer(this.framebuffer)}}class h1{constructor(l,p){this.gl=l,this.clearColor=new n1(this),this.clearDepth=new Gb(this),this.clearStencil=new _D(this),this.colorMask=new JN(this),this.depthMask=new AM(this),this.stencilMask=new e3(this),this.stencilFunc=new kM(this),this.stencilOp=new zd(this),this.stencilTest=new Ud(this),this.depthRange=new t3(this),this.depthTest=new MM(this),this.depthFunc=new US(this),this.blend=new HS(this),this.blendFunc=new o1(this),this.blendColor=new Sf(this),this.blendEquation=new O0(this),this.cullFace=new S_(this),this.cullFaceSide=new R0(this),this.frontFace=new Sg(this),this.program=new r1(this),this.activeTexture=new F0(this),this.viewport=new OM(this),this.bindFramebuffer=new $b(this),this.bindRenderbuffer=new jS(this),this.bindTexture=new GS(this),this.bindVertexBuffer=new yD(this),this.bindElementBuffer=new zy(this),this.bindVertexArrayOES=new T_(this),this.pixelStoreUnpack=new vD(this),this.pixelStoreUnpackPremultiplyAlpha=new rt(this),this.pixelStoreUnpackFlipY=new Uy(this),this.options=p?Object.assign({},p):{},this.options.extTextureFilterAnisotropicForceOff||(this.extTextureFilterAnisotropic=l.getExtension("EXT_texture_filter_anisotropic")||l.getExtension("MOZ_EXT_texture_filter_anisotropic")||l.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=l.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT))),this.extDebugRendererInfo=l.getExtension("WEBGL_debug_renderer_info"),this.extDebugRendererInfo&&(this.renderer=l.getParameter(this.extDebugRendererInfo.UNMASKED_RENDERER_WEBGL),this.vendor=l.getParameter(this.extDebugRendererInfo.UNMASKED_VENDOR_WEBGL)),this.forceManualRenderingForInstanceIDShaders=p&&!!p.forceManualRenderingForInstanceIDShaders||this.renderer&&this.renderer.indexOf("PowerVR")!==-1,this.options.extTextureFloatLinearForceOff||(this.extTextureFloatLinear=l.getExtension("OES_texture_float_linear")),this.extRenderToTextureHalfFloat=l.getExtension("EXT_color_buffer_half_float"),this.extTimerQuery=l.getExtension("EXT_disjoint_timer_query_webgl2"),this.maxTextureSize=l.getParameter(l.MAX_TEXTURE_SIZE),this.maxPointSize=l.getParameter(l.ALIASED_POINT_SIZE_RANGE)[1]}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArrayOES.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(l,p,g){return new ru(this,l,p,g)}createVertexBuffer(l,p,g,C,x){return new NM(this,l,p,g,C,x)}createRenderbuffer(l,p,g){let C=this.gl,x=C.createRenderbuffer();return this.bindRenderbuffer.set(x),C.renderbufferStorage(C.RENDERBUFFER,l,p,g),this.bindRenderbuffer.set(null),x}createFramebuffer(l,p,g,C){return new Nh(this,l,p,g,C)}clear({color:l,depth:p,stencil:g,colorMask:C}){let x=this.gl,A=0;l&&(A|=x.COLOR_BUFFER_BIT,this.clearColor.set(l.toNonPremultipliedRenderColor(null)),this.colorMask.set(C||[!0,!0,!0,!0])),p!==void 0&&(A|=x.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(p),this.depthMask.set(!0)),g!==void 0&&(A|=x.STENCIL_BUFFER_BIT,this.clearStencil.set(g),this.stencilMask.set(255)),x.clear(A)}setCullFace(l){l.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(l.mode),this.frontFace.set(l.frontFace))}setDepthMode(l){l.func!==this.gl.ALWAYS||l.mask?(this.depthTest.set(!0),this.depthFunc.set(l.func),this.depthMask.set(l.mask),this.depthRange.set(l.range)):this.depthTest.set(!1)}setStencilMode(l){l.test.func!==this.gl.ALWAYS||l.mask?(this.stencilTest.set(!0),this.stencilMask.set(l.mask),this.stencilOp.set([l.fail,l.depthFail,l.pass]),this.stencilFunc.set({func:l.test.func,ref:l.ref,mask:l.test.mask})):this.stencilTest.set(!1)}setColorMode(l){r.by(l.blendFunction,Qo.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(l.blendFunction),this.blendColor.set(l.blendColor),l.blendEquation?this.blendEquation.set(l.blendEquation):this.blendEquation.setDefault()),this.colorMask.set(l.mask)}unbindVAO(){this.bindVertexArrayOES.set(null)}}let Bh;function Ef(_,l,p,g,C,x,A){let R=_.context,B=R.gl,H=_.transform,G=[r.aF(H.center.lng),r.aJ(H.center.lat)],J=p.layout.get("symbol-placement"),K=p.layout.get("text-variable-anchor"),oe=p.layout.get("icon-rotation-alignment")==="map",le=p.layout.get("text-rotation-alignment")==="map",de=J!=="point",Ce=[],he=0,Te=0;for(let Ye=0;Ye0){let Gn=r.bC(),Rn=Fi;r.cO(Gn,St.placementInvProjMatrix,H.glCoordMatrix),r.cO(Gn,Gn,St.placementViewportMatrix),Ce.push({circleArray:$n,circleOffset:Te,transform:Rn,invTransform:Gn,projection:St.getProjection()}),he+=$n.length/4,Te=he}if(!Mi)continue;_.terrain&&_.terrain.setupElevationDraw(Bt,un);let Ln=Si?[Je.canonical.x,Je.canonical.y,1<=0&&(oe[Pe.associatedIconIndex]={x:Bt,y:St,z:Jt,angle:gt})}else eo(Qe,J)}if(H){K.clear();let Te=_.icon.placedSymbolArray;for(let Pe=0;Pe{let rr=[0,0,0];if(Ba){let wo=_.style.directionalLight,Ms=_.style.ambientLight;wo&&Ms&&(rr=Cf(_.style,wo,Ms))}return rr},ts=Ba=>{Ye.depthOcclusionForSymbolsAndCircles&&(p.hasOcclusionOpacityProperties||_.terrain)&&(Ba.push("DEPTH_D24"),Ba.push("DEPTH_OCCLUSION"))},Is=Ba=>{p.lut&&!Qe&&(p.lut.texture||(p.lut.texture=new r.dY(_.context,p.lut.image,[p.lut.image.height,p.lut.image.height,p.lut.image.height],it.gl.RGBA8)),it.activeTexture.set(it.gl.TEXTURE0+ql.LUT),p.lut.texture&&p.lut.texture.bind(it.gl.LINEAR,it.gl.CLAMP_TO_EDGE),Ba.push("APPLY_LUT_ON_GPU"))},ka=()=>{let Ba=Je&&p.layout.get("symbol-placement")!=="point",rr=[];ts(rr),Is(rr);let wo=Ba||Jo,Ms=Mi.elevationType==="road",_l=_.shadowRenderer,Va=Ms&&St&&!!_l&&_l.enabled,lc=Bo(Va),Vc=Ms&&St&&!_.terrain?Nt:ji,zh=p.paint.get("icon-image-cross-fade");_.terrainRenderModeElevated()&&St&&rr.push("PITCH_WITH_MAP_TERRAIN"),$n&&(rr.push("PROJECTION_GLOBE_VIEW"),wo&&rr.push("PROJECTED_POS_ON_VIEWPORT")),zh>0&&Mi.hasAnySecondaryIcon&&rr.push("ICON_TRANSITION"),!Mi.icon.zOffsetVertexBuffer||Ms&&_.terrain||rr.push("Z_OFFSET"),he===0&&Te===0&&Pe===0&&Ve===1||rr.push("COLOR_ADJUSTMENT"),Mi.sdfIcons&&rr.push("RENDER_SDF"),Va&&rr.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET"),Ms&&St&&!_.terrain&&Mi.icon.orientationVertexBuffer&&rr.push("ELEVATED_ROADS");let Uh=Mi.icon.programConfigurations.get(p.id),oh=_.getOrCreateProgram("symbol",{config:Uh,defines:rr}),rh=Fi.imageAtlasTexture?Fi.imageAtlasTexture.size:[0,0],Xu=Mi.iconSizeData,Im=r.bK(Xu,Ye.zoom),Lf=St||!Ye.isOrthographic,Dl=_f(Gn,Fi.tileID.canonical,St,Je,Ye,Mi.getProjection(),Rn),Bl=Ab(Gn,Fi.tileID.canonical,St,Je,Ye,Mi.getProjection(),Rn),Qa=_.translatePosMatrix(Bl,Fi,R,H,!0),Dc=_.translatePosMatrix(Gn,Fi,R,H),Xc=wo?A_:Dl,ec=Je&&!St&&!Ba,au=Hi;!Ut&&!Ye.mercatorFromTransition||Je||(au=Tu(Ye));let Rg=$n?au:Hi,B_=p.getColorAdjustmentMatrix(he,Te,Pe,Ve),Em=$y(Xu.kind,Im,ec,St,_,Dc,Xc,Qa,et,!1,rh,[0,0],0,un,Ln,gt,or,Rg,Mi.getProjection(),lc,ks,B_,zh,null),V_=Fi.imageAtlasTexture?Fi.imageAtlasTexture:null,G0=p.layout.get("icon-size").constantOr(0)!==1||Mi.iconsNeedLinear,Fg=Mi.sdfIcons||_.options.rotating||_.options.zooming||G0||Lf?Ze.LINEAR:Ze.NEAREST,sC=Mi.sdfIcons&&p.paint.get("icon-halo-width").constantOr(1)!==0,z_=_.terrain&&St&&Ba?r.bl(r.bC(),Dl):A_;if(Ba&&Mi.icon){let Hh=Ye.elevation,U_=Hh?Hh.getAtTileOffsetFunc(un,Ye.center.lat,Ye.worldSize,Mi.getProjection()):null,xT=Qc(Gn,Fi.tileID.canonical,St,Je,Ye,Mi.getProjection(),Rn);Jp(Mi,Gn,_,!1,xT,Bl,St,de,U_,un)}return{program:oh,buffers:Mi.icon,uniformValues:Em,atlasTexture:V_,atlasTextureIcon:null,atlasInterpolation:Fg,atlasInterpolationIcon:null,isSDF:Mi.sdfIcons,hasHalo:sC,depthMode:Vc,tile:Fi,renderWithShadows:Va,labelPlaneMatrixInv:z_}},er=()=>{let Ba=Bt&&p.layout.get("symbol-placement")!=="point",rr=[],wo=Ba||ii||Jo,Ms=Mi.elevationType==="road",_l=_.shadowRenderer,Va=Ms&&Jt&&!!_l&&_l.enabled,lc=Bo(Va),Vc=Ms&&Jt&&!_.terrain?Nt:ji;_.terrainRenderModeElevated()&&Jt&&rr.push("PITCH_WITH_MAP_TERRAIN"),$n&&(rr.push("PROJECTION_GLOBE_VIEW"),wo&&rr.push("PROJECTED_POS_ON_VIEWPORT")),!Mi.text.zOffsetVertexBuffer||Ms&&_.terrain||rr.push("Z_OFFSET"),Mi.iconsInText&&rr.push("RENDER_TEXT_AND_SYMBOL"),rr.push("RENDER_SDF"),Va&&rr.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET"),Ms&&Jt&&!_.terrain&&Mi.text.orientationVertexBuffer&&rr.push("ELEVATED_ROADS"),ts(rr);let zh=Mi.text.programConfigurations.get(p.id),Uh=_.getOrCreateProgram("symbol",{config:zh,defines:rr}),oh,rh=[0,0],Xu=null,Im=Mi.textSizeData;Mi.iconsInText&&(rh=Fi.imageAtlasTexture?Fi.imageAtlasTexture.size:[0,0],Xu=Fi.imageAtlasTexture?Fi.imageAtlasTexture:null,oh=Jt||!Ye.isOrthographic||_.options.rotating||_.options.zooming||Im.kind==="composite"||Im.kind==="camera"?Ze.LINEAR:Ze.NEAREST);let Lf=Fi.glyphAtlasTexture?Fi.glyphAtlasTexture.size:[0,0],Dl=p.layout.get("text-size-scale-range"),Bl=r.aA(_.scaleFactor,Dl[0],Dl[1]),Qa=r.bK(Im,Ye.zoom,Bl),Dc=_f(Gn,Fi.tileID.canonical,Jt,Bt,Ye,Mi.getProjection(),Rn),Xc=Ab(Gn,Fi.tileID.canonical,Jt,Bt,Ye,Mi.getProjection(),Rn),ec=_.translatePosMatrix(Xc,Fi,B,G,!0),au=_.translatePosMatrix(Gn,Fi,B,G),Rg=wo?A_:Dc,B_=Bt&&!Jt&&!Ba,Em=Hi;!Ut&&!Ye.mercatorFromTransition||Bt||(Em=Tu(Ye));let V_=$y(Im.kind,Qa,B_,Jt,_,au,Rg,ec,et,!0,Lf,rh,0,un,Ln,gt,or,$n?Em:Hi,Mi.getProjection(),lc,ks,null,null,Bl),G0=Fi.glyphAtlasTexture?Fi.glyphAtlasTexture:null,Fg=Ze.LINEAR,sC=p.paint.get("text-halo-width").constantOr(1)!==0,z_=_.terrain&&Jt&&Ba?r.bl(r.bC(),Dc):A_;if(Ba&&Mi.text){let Hh=Ye.elevation,U_=Hh?Hh.getAtTileOffsetFunc(un,Ye.center.lat,Ye.worldSize,Mi.getProjection()):null,xT=Qc(Gn,Fi.tileID.canonical,Jt,Bt,Ye,Mi.getProjection(),Rn);Jp(Mi,Gn,_,!0,xT,Xc,Jt,Ce,U_,un)}return{program:Uh,buffers:Mi.text,uniformValues:V_,atlasTexture:G0,atlasTextureIcon:Xu,atlasInterpolation:Fg,atlasInterpolationIcon:oh,isSDF:!0,hasHalo:sC,depthMode:Vc,tile:Fi,renderWithShadows:Va,labelPlaneMatrixInv:z_}},ds=Mi.icon.segments.get().length,Zr=Mi.text.segments.get().length,us=ds&&!A.onlyText?ka():null,Na=Zr&&!A.onlyIcons?er():null,Nl=p.paint.get("icon-opacity").constantOr(1),Zc=p.paint.get("text-opacity").constantOr(1);if(Ft&&Mi.canOverlap){Yt=!0;let Ba=Nl&&!A.onlyText?Mi.icon.segments.get():[],rr=Zc&&!A.onlyIcons?Mi.text.segments.get():[];for(let wo of Ba)Si.push({segments:new r.bg([wo]),sortKey:wo.sortKey,state:us});for(let wo of rr)Si.push({segments:new r.bg([wo]),sortKey:wo.sortKey,state:Na})}else A.onlyText||Si.push({segments:Nl?Mi.icon.segments:new r.bg([]),sortKey:0,state:us}),A.onlyIcons||Si.push({segments:Zc?Mi.text.segments:new r.bg([]),sortKey:0,state:Na})}Yt&&Si.sort((un,Fi)=>un.sortKey-Fi.sortKey);for(let un of Si){let Fi=un.state;if(Fi)if(_.terrain?_.terrain.setupElevationDraw(Fi.tile,Fi.program,{useDepthForOcclusion:Ye.depthOcclusionForSymbolsAndCircles,labelPlaneMatrixInv:Fi.labelPlaneMatrixInv}):_.setupDepthForOcclusion(Ye.depthOcclusionForSymbolsAndCircles,Fi.program),it.activeTexture.set(Ze.TEXTURE0),Fi.atlasTexture&&Fi.atlasTexture.bind(Fi.atlasInterpolation,Ze.CLAMP_TO_EDGE,!0),Fi.atlasTextureIcon&&(it.activeTexture.set(Ze.TEXTURE1),Fi.atlasTextureIcon&&Fi.atlasTextureIcon.bind(Fi.atlasInterpolationIcon,Ze.CLAMP_TO_EDGE,!0)),Fi.renderWithShadows&&_.shadowRenderer.setupShadows(Fi.tile.tileID.toUnwrapped(),Fi.program,"vector-tile"),_.uploadCommonLightUniforms(_.context,Fi.program),Fi.hasHalo){let Mi=Fi.uniformValues;Mi.u_is_halo=1,XS(Fi.buffers,un.segments,p,_,Fi.program,Fi.depthMode,C,x,Mi,2),Mi.u_is_halo=0}else{if(Fi.isSDF){let Mi=Fi.uniformValues;Fi.hasHalo&&(Mi.u_is_halo=1,XS(Fi.buffers,un.segments,p,_,Fi.program,Fi.depthMode,C,x,Mi,1)),Mi.u_is_halo=0}XS(Fi.buffers,un.segments,p,_,Fi.program,Fi.depthMode,C,x,Fi.uniformValues,1)}}}function XS(_,l,p,g,C,x,A,R,B,H){let G=[_.dynamicLayoutVertexBuffer,_.opacityVertexBuffer,_.iconTransitioningVertexBuffer,_.globeExtVertexBuffer,_.zOffsetVertexBuffer,_.orientationVertexBuffer];C.draw(g,g.context.gl.TRIANGLES,x,A,R,Do.disabled,B,p.id,_.layoutVertexBuffer,_.indexBuffer,l,p.paint,g.transform.zoom,_.programConfigurations.get(p.id),G,H)}function JS(_,l){let p=1<<_.canonical.z,g=(l.x*p-_.canonical.x-_.wrap*p)*r.al,C=(l.y*p-_.canonical.y)*r.al,x=r.e5(l.z,l.y);return r.d4(g,C,x)}function Ky(_,l,p,g,C){if(!p.layout||p.layout.get("fill-elevation-reference")==="none")return;let x=_.context.gl,A=new gn(_.context.gl.LEQUAL,gn.ReadWrite,_.depthRangeFor3D),R=new gn(_.context.gl.GREATER,gn.ReadWrite,_.depthRangeFor3D),B=(function(oe){let le=.01;return oe.isOrthographic&&(le=r.ak(1e-4,le,r.c$(oe.pitch>=Qu?1:oe.pitch/Qu))),2*le})(_.transform),H=_.transform.getFreeCameraOptions().position,G="elevatedStructuresDepthReconstruct",J=_.getOrCreateProgram(G,{defines:["DEPTH_RECONSTRUCTION"]}),K=_.getOrCreateProgram(G);for(let oe of g){let le=l.getTile(oe),de=le.getBucket(p);if(!de)continue;let Ce=de.elevatedStructures;if(!Ce)continue;let he=de.elevationBufferData.heightRange,Te=JS(oe.toUnwrapped(),H),Pe=_.translatePosMatrix(oe.projMatrix,le,p.paint.get("fill-translate"),p.paint.get("fill-translate-anchor")),Ve,et,Qe,it;if(C==="initialize"){if(!he||he.min>=1||Ce.depthSegments.segments[0].primitiveLength===0)continue;Ve=c1(Pe,Te,B,1,0),et=A,Qe=Ce.depthSegments,it=J}else if(C==="reset"){if(!he||he.min>=0||Ce.maskSegments.segments[0].primitiveLength===0)continue;Ve=c1(Pe,Te,0,0,1),et=R,Qe=Ce.maskSegments,it=J}else if(C==="geometry"){if(Ce.depthSegments.segments[0].primitiveLength===0)continue;Ve=c1(Pe,Te,B,1,0),et=A,Qe=Ce.depthSegments,it=K}it.draw(_,x.TRIANGLES,et,xo.disabled,Qo.disabled,Do.disabled,Ve,p.id,Ce.vertexBuffer,Ce.indexBuffer,Qe,p.paint,_.transform.zoom)}}function Ig(_,l,p){let{painter:g,sourceCache:C,layer:x,coords:A,colorMode:R,elevationType:B,terrainEnabled:H,pass:G}=_,J=g.context.gl,K=x.paint.get("fill-pattern"),oe=x.paint.get("fill-pattern-cross-fade"),le=K.constantOr(null),de=B;B!=="road"||l&&!H||(de="none");let Ce=de==="road",he=_.painter.shadowRenderer,Te=Ce&&!!he&&he.enabled,Pe=new gn(g.context.gl.LEQUAL,gn.ReadOnly,g.depthRangeFor3D),Ve=[0,0,0];if(Te){let it=g.style.directionalLight,Ze=g.style.ambientLight;it&&Ze&&(Ve=Cf(g.style,it,Ze))}let et=K&&K.constantOr(1),Qe=(it,Ze)=>{let Ye,Je,Bt,St,Jt;Ze?(Ye=et&&!x.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Bt=J.LINES):(Ye=et?"fillPattern":"fill",Bt=J.TRIANGLES);for(let Ft of A){let Yt=C.getTile(Ft);if(et&&!Yt.patternsLoaded())continue;let ji=Yt.getBucket(x);if(!ji)continue;let Nt=l?ji.elevationBufferData:ji.bufferData;if(Nt.isEmpty())continue;g.prepareDrawTile();let gt=Nt.programConfigurations.get(x.id),ii=g.isTileAffectedByFog(Ft),Ut=[],Si=[];Ce&&(Ut.push("ELEVATED_ROADS"),Si.push(Nt.elevatedLayoutVertexBuffer)),Te&&Ut.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET"),et&&(g.context.activeTexture.set(J.TEXTURE0),Yt.imageAtlasTexture&&Yt.imageAtlasTexture.bind(J.LINEAR,J.CLAMP_TO_EDGE),gt.updatePaintBuffers());let Hi=!1;if(le&&Yt.imageAtlas){let Ln=Yt.imageAtlas,Gn=r.e0.from(le),Rn=Gn.getPrimary().scaleSelf(r.o.devicePixelRatio).toString(),Ro=Gn.getSecondary(),Jo=Ln.patternPositions.get(Rn),or=Ro?Ln.patternPositions.get(Ro.scaleSelf(r.o.devicePixelRatio).toString()):null;Hi=!!Jo&&!!or,Jo&>.setConstantPatternPositions(Jo,or)}oe>0&&(Hi||gt.getPatternTransitionVertexBuffer("fill-pattern"))&&Ut.push("FILL_PATTERN_TRANSITION");let un=g.getOrCreateProgram(Ye,{config:gt,overrideFog:ii,defines:Ut}),Fi=g.translatePosMatrix(Ft.projMatrix,Yt,x.paint.get("fill-translate"),x.paint.get("fill-translate-anchor"));Te&&he.setupShadows(Yt.tileID.toUnwrapped(),un,"vector-tile");let Mi=x.paint.get("fill-emissive-strength");if(Ze){St=Nt.lineIndexBuffer,Jt=Nt.lineSegments;let Ln=g.terrain&&g.terrain.renderingToTexture?g.terrain.drapeBufferSize:[J.drawingBufferWidth,J.drawingBufferHeight];Je=Ye==="fillOutlinePattern"&&et?s3(Fi,Mi,g,Yt,Ln,Ve,oe):r3(Fi,Mi,Ln,Ve)}else St=Nt.indexBuffer,Jt=Nt.triangleSegments,Je=et?jy(Fi,Mi,g,Yt,Ve,oe):ID(Fi,Mi,Ve);g.uploadCommonUniforms(g.context,un,Ft.toUnwrapped());let $n=it;(B==="road"&&!H||B==="offset")&&($n=Pe),un.draw(g,Bt,$n,p||g.stencilModeForClipping(Ft),R,Do.disabled,Je,x.id,Nt.layoutVertexBuffer,St,Jt,x.paint,g.transform.zoom,gt,Si)}};g.renderPass===G&&Qe(g.depthModeForSublayer(1,g.renderPass==="opaque"?gn.ReadWrite:gn.ReadOnly),!1),de==="none"&&g.renderPass==="translucent"&&x.paint.get("fill-antialias")&&Qe(g.depthModeForSublayer(x.getPaintProperty("fill-outline-color")?2:0,gn.ReadOnly),!0)}function yn(_,l,p,g,C,x,A,R){p.resetLayerRenderingStats(_);let B=_.context,H=B.gl,G=_.transform,J=p.paint.get("fill-extrusion-pattern"),K=p.paint.get("fill-extrusion-pattern-cross-fade"),oe=J.constantOr(null),le=J.constantOr(1),de=p.paint.get("fill-extrusion-opacity"),Ce=_.style.enable3dLights(),he=p.paint.get(Ce&&!le?"fill-extrusion-ambient-occlusion-wall-radius":"fill-extrusion-ambient-occlusion-radius"),Te=[p.paint.get("fill-extrusion-ambient-occlusion-intensity"),he],Pe=p.layout.get("fill-extrusion-edge-radius"),Ve=Pe>0&&!p.paint.get("fill-extrusion-rounded-roof"),et=Ve?0:Pe,Qe=G.projection.name==="globe"?r.e8():0,it=G.projection.name==="globe",Ze=it?r.aj(G.zoom):0,Ye=[r.aF(G.center.lng),r.aJ(G.center.lat)],Je=p.paint.get("fill-extrusion-flood-light-color-use-theme").constantOr("default")==="none",Bt=p.paint.get("fill-extrusion-flood-light-color").toNonPremultipliedRenderColor(Je?null:p.lut).toArray01().slice(0,3),St=p.paint.get("fill-extrusion-flood-light-intensity"),Jt=p.paint.get("fill-extrusion-vertical-scale"),Ft=p.paint.get("fill-extrusion-line-width").constantOr(1)!==0,Yt=p.paint.get("fill-extrusion-height-alignment"),ji=p.paint.get("fill-extrusion-base-alignment"),Nt=k0(_,p.paint.get("fill-extrusion-cutoff-fade-range")),gt=[],ii;it&>.push("PROJECTION_GLOBE_VIEW"),Te[0]>0&>.push("FAUX_AO"),Ve&>.push("ZERO_ROOF_RADIUS"),R&>.push("HAS_CENTROID"),St>0&>.push("FLOOD_LIGHT"),Nt.shouldRenderCutoff&>.push("RENDER_CUTOFF"),Ft&>.push("RENDER_WALL_MODE");let Ut=_.renderPass==="shadow",Si=_.shadowRenderer,Hi=Ut&&!!Si,un=Ut?Do.disabled:Do.backCCW;_.shadowRenderer&&(_.shadowRenderer.useNormalOffset=!0);let Fi=[0,0,0];if(Si){let Ln=_.style.directionalLight,Gn=_.style.ambientLight;Ln&&Gn&&(Fi=Cf(_.style,Ln,Gn)),Ut||(gt.push("RENDER_SHADOWS","DEPTH_TEXTURE"),Si.useNormalOffset&>.push("NORMAL_OFFSET")),ii=gt.concat(["SHADOWS_SINGLE_CASCADE"])}let Mi=Hi?"fillExtrusionDepth":le?"fillExtrusionPattern":"fillExtrusion",$n=p.getLayerRenderingStats();for(let Ln of g){let Gn=l.getTile(Ln),Rn=Gn.getBucket(p);if(!Rn||Rn.projection.name!==G.projection.name)continue;let Ro=!1;Si&&(Ro=Si.getMaxCascadeForTile(Ln.toUnwrapped())===0);let Jo=_.isTileAffectedByFog(Ln),or=Rn.programConfigurations.get(p.id),ks=!1;if(oe&&Gn.imageAtlas){let Zr=Gn.imageAtlas,us=r.e0.from(oe),Na=us.getPrimary().scaleSelf(r.o.devicePixelRatio).toString(),Nl=us.getSecondary(),Zc=Zr.patternPositions.get(Na),Ba=Nl?Zr.patternPositions.get(Nl.scaleSelf(r.o.devicePixelRatio).toString()):null;ks=!!Zc&&!!Ba,Zc&&or.setConstantPatternPositions(Zc,Ba)}K>0&&(ks||or.getPatternTransitionVertexBuffer("fill-extrusion-pattern"))&>.push("FILL_EXTRUSION_PATTERN_TRANSITION");let Bo=_.getOrCreateProgram(Mi,{config:or,defines:Ro?ii:gt,overrideFog:Jo});if(_.terrain&&_.terrain.setupElevationDraw(Gn,Bo,{useMeterToDem:!0}),!Rn.centroidVertexBuffer){let Zr=Bo.getAttributeLocation(H,"a_centroid_pos");Zr!==-1&&H.vertexAttrib2f(Zr,0,0)}!Ut&&Si&&Si.setupShadows(Gn.tileID.toUnwrapped(),Bo,"vector-tile"),le&&(_.context.activeTexture.set(H.TEXTURE0),Gn.imageAtlasTexture&&Gn.imageAtlasTexture.bind(H.LINEAR,H.CLAMP_TO_EDGE),or.updatePaintBuffers());let ts=p.paint.get("fill-extrusion-vertical-gradient"),Is=1/Rn.tileToMeter,ka;if(Ut&&Si){if(OD(Gn.tileID,Rn.maxHeight,_))continue;let Zr=Si.calculateShadowPassMatrixFromTile(Gn.tileID.toUnwrapped());ka=TD(Zr,et,Is,Jt,Yt,ji)}else{let Zr=_.translatePosMatrix(Ln.expandedProjMatrix,Gn,p.paint.get("fill-extrusion-translate"),p.paint.get("fill-extrusion-translate-anchor")),us=G.projection.createInversionMatrix(G,Ln.canonical);ka=le?vm(Zr,_,ts,de,Te,et,Is,Ln,Gn,Qe,Yt,ji,Ze,Ye,us,Bt,Jt,K):l1(Zr,_,ts,de,Te,et,Is,Ln,Qe,Yt,ji,Ze,Ye,us,Bt,Jt,St,Fi)}_.uploadCommonUniforms(B,Bo,Ln.toUnwrapped(),null,Nt);let er=Rn.segments;if(G.projection.name==="mercator"&&!Ut&&(er=Rn.getVisibleSegments(Gn.tileID,_.terrain,_.transform.getFrustum(0)),!er.get().length))continue;if($n)if(Ut)for(let Zr of er.get())$n.numRenderedVerticesInShadowPass+=Zr.primitiveLength;else for(let Zr of er.get())$n.numRenderedVerticesInTransparentPass+=Zr.primitiveLength;let ds=[];(_.terrain||R)&&ds.push(Rn.centroidVertexBuffer),it&&ds.push(Rn.layoutVertexExtBuffer),Ft&&ds.push(Rn.wallVertexBuffer),Bo.draw(_,B.gl.TRIANGLES,C,x,A,un,ka,p.id,Rn.layoutVertexBuffer,Rn.indexBuffer,er,p.paint,_.transform.zoom,or,ds)}_.shadowRenderer&&(_.shadowRenderer.useNormalOffset=!1)}class MD{constructor(){this.translate=[0,0],this.translateAnchor="map",this.edgeRadius=0,this.cutoffFadeRange=0}}function k_(_,l,p,g,C,x,A,R,B,H,G,J,K,oe,le,de,Ce,he,Te,Pe){let Ve=l.context,et=Ve.gl,Qe=l.transform,it=l.transform.zoom,Ze=[],Ye=_.translate,Je=_.translateAnchor,Bt=_.edgeRadius,St=k0(l,_.cutoffFadeRange);G==="clear"?(Ze.push("CLEAR_SUBPASS"),Pe&&(Ze.push("CLEAR_FROM_TEXTURE"),Ve.activeTexture.set(et.TEXTURE0),Pe.bind(et.LINEAR,et.CLAMP_TO_EDGE))):G==="sdf"&&Ze.push("SDF_SUBPASS"),he&&Ze.push("HAS_CENTROID"),St.shouldRenderCutoff&&Ze.push("RENDER_CUTOFF");let Jt=(Ft,Yt,ji,Nt,gt)=>{let ii=Yt.programConfigurations.get(g.id),Ut=l.isTileAffectedByFog(Ft),Si=l.getOrCreateProgram("fillExtrusionGroundEffect",{config:ii,defines:Ze,overrideFog:Ut}),Hi=((Fi,Mi,$n,Ln,Gn,Rn,Ro,Jo,or,ks,Bo)=>({u_matrix:Mi,u_opacity:$n,u_ao_pass:Ln?1:0,u_meter_to_tile:Gn,u_ao:Rn,u_flood_light_intensity:Ro,u_flood_light_color:Jo,u_attenuation:or,u_edge_radius:ks,u_fb:0,u_fb_size:Bo,u_dynamic_offset:1}))(0,Nt,J,H,gt,[K,oe*gt],le,de,Ce,it>=17?0:Bt*gt,Pe?Pe.size[0]:0),un=[];he&&un.push(Yt.hiddenByLandmarkVertexBuffer),l.uploadCommonUniforms(Ve,Si,Ft.toUnwrapped(),null,St),Si.draw(l,Ve.gl.TRIANGLES,x,A,R,B,Hi,g.id,Yt.vertexBuffer,Yt.indexBuffer,ji,g.paint,it,ii,un)};for(let Ft of C){let Yt=p.getTile(Ft),ji=Yt.getBucket(g);if(!ji||ji.projection.name!==Qe.projection.name||!ji.groundEffect||ji.groundEffect&&!ji.groundEffect.hasData())continue;let Nt=ji.groundEffect,gt=1/ji.tileToMeter;{let ii=l.translatePosMatrix(Ft.projMatrix,Yt,Ye,Je),Ut=Nt.getDefaultSegment();Jt(Ft,Nt,Ut,ii,gt)}if(Te)for(let ii=0;ii<4;ii++){let Ut=r.e6[ii](Ft),Si=p.getTile(Ut);if(!Si)continue;let Hi=Si.getBucket(g);if(!Hi||Hi.projection.name!==Qe.projection.name||!Hi.groundEffect||Hi.groundEffect&&!Hi.groundEffect.hasData())continue;let un=Hi.groundEffect,Fi,Mi;ii===0?(Fi=[-r.al,0,0],Mi=1):ii===1?(Fi=[r.al,0,0],Mi=0):ii===2?(Fi=[0,-r.al,0],Mi=3):(Fi=[0,r.al,0],Mi=2);let $n=un.regionSegments[Mi];if(!$n)continue;let Ln=new Float32Array(16);r.br(Ln,Ft.projMatrix,Fi),Jt(Ft,un,$n,l.translatePosMatrix(Ln,Yt,Ye,Je),gt)}}}function Cm(_,l,p,g,C,x,A){g.centroidVertexArray.length===0&&g.createCentroidsBuffer();let R=x?x.findDEMTileFor(p):null;if(!(R&&R.dem||A))return;x&&R&&R.dem&&g.selfDEMTileTimestamp!==R.dem._timestamp&&(g.borderDoneWithNeighborZ=[-1,-1,-1,-1],g.selfDEMTileTimestamp=R.dem._timestamp);let B=he=>new r.P(Math.ceil((he+r.ea)*r.eb),0),H=he=>{let Te=l.getSource().minzoom,Pe=et=>{let Qe=l.getTileByID(et);if(Qe&&Qe.hasData())return Qe.getBucket(C)},Ve=[0,-1,1];for(let et of Ve){if(he.overscaledZ+et(G[0]=Math.min(he.min.y,Te.min.y),G[1]=Math.max(he.max.y,Te.max.y),G[2]=r.al-Te.min.x>he.max.x?Te.min.x-r.al:he.max.x,G),K=(he,Te)=>(G[0]=Math.min(he.min.x,Te.min.x),G[1]=Math.max(he.max.x,Te.max.x),G[2]=r.al-Te.min.y>he.max.y?Te.min.y-r.al:he.max.y,G),oe=[(he,Te)=>J(he,Te),(he,Te)=>J(Te,he),(he,Te)=>K(he,Te),(he,Te)=>K(Te,he)],le=(he,Te,Pe,Ve,et,Qe,it)=>{if(!x)return 0;let Ze=[[Qe?Pe:he,Qe?he:Pe,0],[Qe?Pe:Te,Qe?Te:Pe,0]],Ye=it<0?r.al+it:it,Je=[Qe?Ye:(he+Te)/2,Qe?(he+Te)/2:Ye,0];return Pe===0&&it<0||Pe!==0&&it>0?x.getForTilePoints(et,[Je],!0,Ve):Ze.push(Je),x.getForTilePoints(p,Ze,!0,R),Math.max(Ze[0][2],Ze[1][2],Je[2])/x.exaggeration()};for(let he=0;he<4;he++){let Te=g.borderFeatureIndices[he];if(Te.length===0)continue;let Pe=r.e6[he](p),Ve=H(Pe);if(!(Ve&&Ve instanceof r.e7))continue;let et=x?x.findDEMTileFor(Pe):null;if(!(et&&et.dem||A)||(x&&et&&et.dem&&g.borderDEMTileTimestamp[he]!==et.dem._timestamp&&(g.borderDoneWithNeighborZ[he]=-1,g.borderDEMTileTimestamp[he]=et.dem._timestamp),g.borderDoneWithNeighborZ[he]===Ve.canonical.z))continue;Ve.centroidVertexArray.length===0&&Ve.createCentroidsBuffer();let Qe=(he<2?1:5)-he,it=Ve.borderDoneWithNeighborZ[Qe]!==g.canonical.z,Ze=Ve.borderFeatureIndices[Qe],Ye=0;if(g.canonical.z!==Ve.canonical.z){for(let Je of Te)g.showCentroid(g.featuresOnBorder[Je]);if(it)for(let Je of Ze)Ve.showCentroid(Ve.featuresOnBorder[Je]);g.borderDoneWithNeighborZ[he]=Ve.canonical.z,Ve.borderDoneWithNeighborZ[Qe]=g.canonical.z}for(let Je of Te){let Bt=g.featuresOnBorder[Je],St=g.centroidData[Bt.centroidDataIndex],Jt=Bt.borders[he],Ft;for(;YeJt[0]+3||Yt[0]>Jt[0]-3)break;Ve.showCentroid(Ft),Ye++}if(Ft&&YeJt[1]-3)&&(ji++,++Ye!==Ze.length);)Ft=Ve.featuresOnBorder[Ze[Ye]];Ft=Ve.featuresOnBorder[Ze[Yt]];let Nt=!1;if(ji>=1){let Ut=Ft.borders[Qe];Math.abs(Jt[0]-Ut[0])<3&&Math.abs(Jt[1]-Ut[1])<3&&(ji=1,Nt=!0,Ye=Yt+1)}else if(ji===0){g.showCentroid(Bt);continue}let gt=Ve.centroidData[Ft.centroidDataIndex];A&&Nt&&(((de=St).flags|(Ce=gt).flags)&r.e9?(de.flags|=r.e9,Ce.flags|=r.e9):(de.flags&=~r.e9,Ce.flags&=~r.e9));let ii=Bt.intersectsCount()>1||Ft.intersectsCount()>1;if(ji>1)Ye=Yt,St.centroidXY=gt.centroidXY=new r.P(0,0);else if(et&&et.dem&&!ii){let Ut=oe[he](St,gt),Si=he%2?r.al-1:0,Hi=le(Ut[0],Math.min(r.al-1,Ut[1]),Si,et,Pe,he<2,Ut[2]);St.centroidXY=gt.centroidXY=B(Hi)}else ii?St.centroidXY=gt.centroidXY=new r.P(0,0):(St.centroidXY=g.encodeBorderCentroid(Bt),gt.centroidXY=Ve.encodeBorderCentroid(Ft));g.writeCentroidToBuffer(St),Ve.writeCentroidToBuffer(gt)}else g.showCentroid(Bt)}g.borderDoneWithNeighborZ[he]=Ve.canonical.z,Ve.borderDoneWithNeighborZ[Qe]=g.canonical.z}var de,Ce;(g.needsCentroidUpdate||!g.centroidVertexBuffer&&g.centroidVertexArray.length!==0)&&g.uploadCentroid(_)}let L0=[1,0,0],_o=[0,1,0],f1=[0,0,1];function OD(_,l,p){let g=p.transform,C=p.shadowRenderer;if(!C)return!0;let x=_.toUnwrapped(),A=g.tileSize*C._cascades[p.currentShadowCascade].scale,R=l;if(g.elevation){let de=g.elevation.getMinMaxForTile(_);de&&(R+=de.max)}let B=[...C.shadowDirection];B[2]=-B[2];let H=C.computeSimplifiedTileShadowVolume(x,R,A,B);if(!H)return!1;let G=[L0,_o,f1,B,[B[0],0,B[2]],[0,B[1],B[2]]],J=g.projection.name==="globe",K=g.scaleZoom(A),oe=r.cA.fromInvProjectionMatrix(g.invProjMatrix,g.worldSize,K,!J),le=C.getCurrentCascadeFrustum();return oe.intersectsPrecise(H.vertices,H.planes,G)===0||le.intersectsPrecise(H.vertices,H.planes,G)===0}function eT(_){let{painter:l,source:p,layer:g,coords:C}=_,x=_.defines,A=l.context,R=l.renderPass==="shadow",B=l.renderPass==="light-beam",H=l.shadowRenderer,G=r.ec(l.transform.center.lat,l.transform.zoom),J=k0(l,g.paint.get("building-cutoff-fade-range"));J.shouldRenderCutoff&&(x=x.concat("RENDER_CUTOFF"));for(let K of C){let oe=p.getTile(K),le=oe.getBucket(g);if(!le)continue;H&&H.getMaxCascadeForTile(K.toUnwrapped())===0&&(x=x.concat("SHADOWS_SINGLE_CASCADE"));let de=le.programConfigurations.get(g.id),Ce,he,Te,Pe=l.translatePosMatrix(K.expandedProjMatrix,oe,[0,0],"map");if(Pe=r.cR(r.bC(),Pe,[1,1,_.verticalScale]),R&&H){if(OD(oe.tileID,le.maxHeight*G,l))continue;let et=H.calculateShadowPassMatrixFromTile(oe.tileID.toUnwrapped());et=r.cR(r.bC(),et,[1,1,_.verticalScale]),Te=ED(et),Ce=he=l.getOrCreateProgram("buildingDepth",{config:de,defines:x,overrideFog:!1})}else if(B)Ce=he=l.getOrCreateProgram("buildingBloom",{config:de,defines:x,overrideFog:!1}),Te=l3(Pe);else{let et=l.transform.calculatePosMatrix(K.toUnwrapped(),l.transform.worldSize);r.cR(et,et,[1,1,_.verticalScale]);let Qe=r.bC();r.cR(Qe,et,[1,-1,1/G]),r.bl(Qe,Qe),r.ed(Qe,Qe);let it=l.transform.getFreeCameraOptions().position,Ze=1<{if(B){let it=et.entranceBloom;Qe.draw(l,A.gl.TRIANGLES,_.depthMode,xo.disabled,_.blendMode,Do.disabled,Te,g.id,it.layoutVertexBuffer,it.indexBuffer,it.segmentsBucket,g.paint,l.transform.zoom,de,[it.layoutAttenuationBuffer,it.layoutColorBuffer])}else{let it=et.segmentsBucket,Ze=[et.layoutNormalBuffer,et.layoutCentroidBuffer,et.layoutColorBuffer];et.layoutFacadePaintBuffer&&(Ze=Ze.concat([et.layoutFacadeDataBuffer,et.layoutFacadeVerticalRangeBuffer,et.layoutFacadePaintBuffer])),Qe.draw(l,A.gl.TRIANGLES,_.depthMode,xo.disabled,_.blendMode,R?Do.disabled:Do.backCW,Te,g.id,et.layoutVertexBuffer,et.indexBuffer,it,g.paint,l.transform.zoom,de,Ze)}};l.uploadCommonUniforms(A,he,K.toUnwrapped(),null,J),le.buildingWithoutFacade&&Ve(le.buildingWithoutFacade,he),Ce!==he&&l.uploadCommonUniforms(A,Ce,K.toUnwrapped(),null,J),le.buildingWithFacade&&Ve(le.buildingWithFacade,Ce)}}function tT(_){return[_[0]*r.ee,_[1]*r.ee,_[2]*r.ee,0]}function iT(_,l,p,g,C,x,A,R,B){let H=g.getSource(),G=p.globeSharedBuffers;if(!G)return;let J,K,oe;if(l&&(J=g.getTile(l)),H instanceof r.aS?(K=H.texture,oe=r.dG(0,0,p.transform)):J&&l&&(K=J.texture,oe=r.dG(l.canonical.z,l.canonical.x,p.transform)),!K||!oe)return;_||(oe=r.cR(r.bC(),oe,[1,-1,1]));let le=p.context,de=le.gl,Ce=C.paint.get("raster-resampling")==="nearest"?de.NEAREST:de.LINEAR,he=p.colorModeForDrapableLayerRenderPass(x),Te=A.defines;Te.push("GLOBE_POLES");let Pe=new gn(de.LEQUAL,gn.ReadWrite,p.depthRangeFor3D),Ve=Float32Array.from(p.transform.expandedFarZProjMatrix),et=Float32Array.from(r.bk(r.dF(new r.cC(0,0,0))));p.terrain&&p.terrain.prepareDrawTile(),le.activeTexture.set(de.TEXTURE0),K.bind(Ce,de.CLAMP_TO_EDGE),le.activeTexture.set(de.TEXTURE1),K.bind(Ce,de.CLAMP_TO_EDGE),"useMipmap"in K&&le.extTextureFilterAnisotropic&&p.transform.pitch>20&&de.texParameterf(de.TEXTURE_2D,le.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,le.extTextureFilterAnisotropicMax);let[Qe,it,Ze,Ye]=l?G.getPoleBuffers(l.canonical.z,!1):G.getPoleBuffers(0,!0),Je=C.paint.get("raster-elevation"),Bt;_?(Bt=Qe,p.renderDefaultNorthPole=Je!==0):(Bt=it,p.renderDefaultSouthPole=Je!==0);let St=tT(A.mix),Jt=((Yt,ji,Nt,gt,ii,Ut,Si,Hi,un,Fi,Mi,$n,Ln)=>bm(Yt,ji,Nt,new Float32Array(16),new Float32Array(9),[0,0],gt,[0,0],[0,0,0,0],1,{opacity:1,mix:0},Ut,[0,0],Hi,2,Fi,Mi,$n,1,0,Ln))(Ve,et,oe,r.aj(p.transform.zoom),0,C,0,Je,0,St,A.offset,A.range,x),Ft=p.getOrCreateProgram("raster",{defines:Te});p.uploadCommonUniforms(le,Ft,null),Ft.draw(p,de.TRIANGLES,Pe,B,he,R,Jt,C.id,Bt,Ze,Ye)}function BM(_){let l=_._nearZ,p=_.projection.farthestPixelDistance(_),g=p-l,C=.2*_.height,x=l+C;return[l,p,(x-C-l)/g,(x-l)/g]}function nT(_,l,p,g){if(_)return l instanceof _g&&_ instanceof wb?l.getTextureDescriptor(_,p,!0):{texture:_.texture,mix:tT(g.mix),offset:g.offset,buffer:0,tileSize:1}}var c3=r.ef([{name:"a_index",type:"Int16",components:1}]);class RD{constructor(l,p,g,C){let x={width:g[0],height:g[1],data:null},A=l.gl;this.targetColorTexture=new r.T(l,x,A.RGBA8,{useMipmap:!1}),this.backgroundColorTexture=new r.T(l,x,A.RGBA8,{useMipmap:!1}),this.context=l,this.updateParticleTexture(p,C),this.lastInvalidatedAt=0}updateParticleTexture(l,p){if(this.particleTextureDimension===p.width)return;(this.particleTexture0||this.particleTexture1||this.particleIndexBuffer||this.particleSegment)&&(this.particleTexture0.destroy(),this.particleTexture1.destroy(),this.particleIndexBuffer.destroy(),this.particleSegment.destroy());let g=this.context.gl,C=p.width*p.height;this.particleTexture0=new r.T(this.context,p,g.RGBA8,{premultiply:!1,useMipmap:!1}),this.particleTexture1=new r.T(this.context,p,g.RGBA8,{premultiply:!1,useMipmap:!1});let x=new r.eg;x.reserve(C);for(let A=0;A0){let St=r.bj(p.canonical,B),Jt=r.ei(St);K=r.aB(new Float32Array(16),B.globeMatrix,Jt),r.aB(K,B.projMatrix,K)}let oe=r.bC();oe[12]+=2*C/(r.o.devicePixelRatio*B.width),oe[13]+=2*x/(r.o.devicePixelRatio*B.height),r.aB(K,oe,K);let le=_.getOrCreateProgram("debug",{defines:J}),de=l.getTileByID(p.key);_.terrain&&_.terrain.setupElevationDraw(de,le);let Ce=gn.disabled,he=xo.disabled,Te=_.colorModeForRenderPass(),Pe="$debug";R.activeTexture.set(H.TEXTURE0),_.emptyTexture.bind(H.LINEAR,H.CLAMP_TO_EDGE),G?de._makeGlobeTileDebugBuffers(_.context,B):de._makeDebugTileBoundsBuffers(_.context,B.projection);let Ve=de._tileDebugBuffer||_.debugBuffer,et=de._tileDebugIndexBuffer||_.debugIndexBuffer,Qe=de._tileDebugSegments||_.debugSegments;if(le.draw(_,H.LINE_STRIP,Ce,he,Te,Do.disabled,Gy(K,g.toPremultipliedRenderColor(null)),Pe,Ve,et,Qe,null,null,null,[de._globeTileDebugBorderBuffer]),A){let St=de.latestRawTileData,Jt=Math.floor((St&&St.byteLength||0)/1024),Ft=p.canonical.toString();p.overscaledZ!==p.canonical.z&&(Ft+=` => ${p.overscaledZ}`),Ft+=` ${de.state}`,Ft+=` ${Jt}kb`,(function(Yt,ji){Yt.initDebugOverlayCanvas();let Nt=Yt.debugOverlayCanvas,gt=Yt.context.gl,ii=Yt.debugOverlayCanvas.getContext("2d");ii.clearRect(0,0,Nt.width,Nt.height),ii.shadowColor="white",ii.shadowBlur=2,ii.lineWidth=1.5,ii.strokeStyle="white",ii.textBaseline="top",ii.font="bold 36px Open Sans, sans-serif",ii.fillText(ji,5,5),ii.strokeText(ji,5,5),Yt.debugOverlayTexture.update(Nt),Yt.debugOverlayTexture.bind(gt.LINEAR,gt.CLAMP_TO_EDGE)})(_,Ft)}let it=l.getTile(p).tileSize,Ze=512/Math.min(it,512)*(p.overscaledZ/B.zoom)*.5,Ye=de._tileDebugTextBuffer||_.debugBuffer,Je=de._tileDebugTextIndexBuffer||_.quadTriangleIndexBuffer,Bt=de._tileDebugTextSegments||_.debugSegments;le.draw(_,H.TRIANGLES,Ce,he,Qo.alphaBlended,Do.disabled,Gy(K,r.ao.transparent.toPremultipliedRenderColor(null),Ze),Pe,Ye,Je,Bt,null,null,null,[de._globeTileDebugTextBuffer])}function Eg(_,l,p,g){B0(_,0,l+p/2,_.transform.width,p,g)}function ra(_,l,p,g){B0(_,l-p/2,0,p,_.transform.height,g)}function B0(_,l,p,g,C,x){let A=_.context,R=A.gl;R.enable(R.SCISSOR_TEST),R.scissor(l*r.o.devicePixelRatio,p*r.o.devicePixelRatio,g*r.o.devicePixelRatio,C*r.o.devicePixelRatio),A.clear({color:x}),R.disable(R.SCISSOR_TEST)}let g1=r.ef([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:zM}=g1;function Af(_,l,p,g){_.emplaceBack(l,p,g)}class Zs{constructor(l){this.vertexArray=new r.ej,this.indices=new r.b1,Af(this.vertexArray,-1,-1,1),Af(this.vertexArray,1,-1,1),Af(this.vertexArray,-1,1,1),Af(this.vertexArray,1,1,1),Af(this.vertexArray,-1,-1,-1),Af(this.vertexArray,1,-1,-1),Af(this.vertexArray,-1,1,-1),Af(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=l.createVertexBuffer(this.vertexArray,zM),this.indexBuffer=l.createIndexBuffer(this.indices),this.segment=r.bg.simpleSegment(0,0,36,12)}}function Wy(_,l,p,g,C,x){let A=_.context.gl,R=l.paint.get("sky-atmosphere-color"),B=l.paint.get("sky-atmosphere-halo-color"),H=l.paint.get("sky-atmosphere-sun-intensity"),G=((J,K,oe,le,de)=>({u_matrix_3f:J,u_sun_direction:K,u_sun_intensity:oe,u_color_tint_r:[le.r,le.g,le.b,le.a],u_color_tint_m:[de.r,de.g,de.b,de.a],u_luminance:5e-5}))(r.el(r.dL(),g),C,H,R.toPremultipliedRenderColor(null),B.toPremultipliedRenderColor(null));A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_CUBE_MAP_POSITIVE_X+x,l.skyboxTexture,0),p.draw(_,A.TRIANGLES,gn.disabled,xo.disabled,Qo.unblended,Do.frontCW,G,"skyboxCapture",l.skyboxGeometry.vertexBuffer,l.skyboxGeometry.indexBuffer,l.skyboxGeometry.segment)}let Yy=r.ef([{type:"Float32",name:"a_pos",components:3},{type:"Float32",name:"a_uv",components:2}]);class kf{constructor(l){let p=new r.em;p.emplaceBack(-1,1,1,0,0),p.emplaceBack(1,1,1,1,0),p.emplaceBack(1,-1,1,1,1),p.emplaceBack(-1,-1,1,0,1);let g=new r.b1;g.emplaceBack(0,1,2),g.emplaceBack(2,3,0),this.vertexBuffer=l.createVertexBuffer(p,Yy.members),this.indexBuffer=l.createIndexBuffer(g),this.segments=r.bg.simpleSegment(0,0,4,2)}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy()}}let Vi=r.ef([{type:"Float32",name:"a_pos_3f",components:3},{type:"Float32",name:"a_uv",components:2},{type:"Float32",name:"a_size_scale",components:1},{type:"Float32",name:"a_fade_opacity",components:1}]);class an{constructor(){this.starsCount=16e3,this.sizeMultiplier=.15,this.sizeRange=100,this.intensityRange=200}}class Yb{constructor(l){this.colorModeAlphaBlendedWriteRGB=new Qo([1,Jl,1,Jl],r.ao.transparent,[!0,!0,!0,!1]),this.colorModeWriteAlpha=new Qo([1,0,1,0],r.ao.transparent,[!1,!1,!1,!0]),this.params=new an,this.updateNeeded=!0,l.tp.registerParameter(this.params,["Stars"],"starsCount",{min:100,max:16e3,step:1},()=>{this.updateNeeded=!0}),l.tp.registerParameter(this.params,["Stars"],"sizeMultiplier",{min:.01,max:2,step:.01}),l.tp.registerParameter(this.params,["Stars"],"sizeRange",{min:0,max:200,step:1},()=>{this.updateNeeded=!0}),l.tp.registerParameter(this.params,["Stars"],"intensityRange",{min:0,max:200,step:1},()=>{this.updateNeeded=!0})}update(l){let p=l.context;if(!this.atmosphereBuffer||this.updateNeeded){this.updateNeeded=!1,this.atmosphereBuffer=new kf(p);let g=this.params.sizeRange,C=this.params.intensityRange,x=(function(G){let J=r.eo(30),K=[];for(let oe=0;oe{let Ze=x.projection.name==="globe"?["PROJECTION_GLOBE_VIEW","FOG"]:["FOG"];it&&Ze.push("ALPHA_PASS");let Ye=l.getOrCreateProgram("globeAtmosphere",{defines:Ze}),Je=((St,Jt,Ft,Yt,ji,Nt,gt,ii,Ut,Si,Hi,un)=>({u_frustum_tl:St,u_frustum_tr:Jt,u_frustum_br:Ft,u_frustum_bl:Yt,u_horizon:ji,u_transition:Nt,u_fadeout_range:gt,u_atmosphere_fog_color:ii.toArray01(),u_high_color:Ut.toArray01(),u_space_color:Si.toArray01(),u_temporal_offset:Hi,u_horizon_angle:un}))(x.frustumCorners.TL,x.frustumCorners.TR,x.frustumCorners.BR,x.frustumCorners.BL,x.frustumCorners.horizon,R,Ce,G,K,le,Te,et);l.uploadCommonUniforms(g,Ye);let Bt=this.atmosphereBuffer;Bt&&Ye.draw(l,C.TRIANGLES,A,xo.disabled,it?this.colorModeWriteAlpha:this.colorModeAlphaBlendedWriteRGB,Do.backCW,Je,it?"atmosphere_glow_alpha":"atmosphere_glow",Bt.vertexBuffer,Bt.indexBuffer,Bt.segments)};Qe(!1),Qe(!0)}drawStars(l,p){let g=r.aA(p.properties.get("star-intensity"),0,1);if(g===0)return;let C=l.context,x=C.gl,A=l.transform,R=l.getOrCreateProgram("stars"),B=r.c6([]);r.c8(B,B,-A._pitch),r.c7(B,B,-A.angle),r.c8(B,B,r.an(A._center.lat)),r.eq(B,B,-r.an(A._center.lng));let H=r.cb(new Float32Array(16),B),G=r.aB([],A.starsProjMatrix,H),J=r.el([],H),K=r.er([],J),oe=[0,1,0];r.dN(oe,oe,K),r.c4(oe,oe,this.params.sizeMultiplier);let le=[1,0,0];r.dN(le,le,K),r.c4(le,le,this.params.sizeMultiplier);let de=(Ce=oe,he=le,Te=g,{u_matrix:Float32Array.from(G),u_up:Ce,u_right:he,u_intensity_multiplier:Te});var Ce,he,Te;l.uploadCommonUniforms(C,R),this.starsVx&&this.starsIdx&&R.draw(l,x.TRIANGLES,gn.disabled,xo.disabled,this.colorModeAlphaBlendedWriteRGB,Do.disabled,de,"atmosphere_stars",this.starsVx,this.starsIdx,this.starsSegments)}}class qs{constructor(){this.visibleTiles=[]}updateBorders(l,p){let g=[],C=[],x=l._getRenderableCoordinates(!1,!0);for(let B of x){let H=l.getTile(B);if(!H.hasData())continue;let G=H.getBucket(p);G&&(G.isEmpty()||(g.push(B.key),C.push({bucket:G,tileID:B.canonical})))}let A=g.length!==this.visibleTiles.length;if(!A){g.sort();for(let B=0;BB.tileID.z-H.tileID.z||B.tileID.x-H.tileID.x||B.tileID.y-H.tileID.y);for(let B of C){let H=new Array,G=new Array,J=B.bucket;for(let K of J.featuresOnBorder)R.has(K.featureId)?G.push(K.footprintIndex):(R.add(K.featureId),H.push(K.footprintIndex));J.updateFootprintHiddenFlags(H,r.es,!1),J.updateFootprintHiddenFlags(G,r.es,!0)}}}function kt(_,l){let p=[..._],g=l.cameraWorldSizeForFog/l.worldSize,C=r.bA([]);return r.cR(C,C,[g,g,1]),r.aB(p,C,p),r.aB(p,l.worldToFogMatrix,p),p}function Qy(_,l,p,g,C){let x=p.material,A=g.context,{baseColorTexture:R,metallicRoughnessTexture:B}=x.pbrMetallicRoughness,{normalTexture:H,occlusionTexture:G,emissionTexture:J}=x;function K(le,de,Ce){if(le&&(_.push(de),A.activeTexture.set(A.gl.TEXTURE0+Ce),le.gfxTexture)){let{minFilter:he,magFilter:Te,wrapS:Pe,wrapT:Ve}=le.sampler;le.gfxTexture.bindExtraParam(he,Te,Pe,Ve)}}K(R,"HAS_TEXTURE_u_baseColorTexture",ql.BaseColor),K(B,"HAS_TEXTURE_u_metallicRoughnessTexture",ql.MetallicRoughness),K(H,"HAS_TEXTURE_u_normalTexture",ql.Normal),K(G,"HAS_TEXTURE_u_occlusionTexture",ql.Occlusion),K(J,"HAS_TEXTURE_u_emissionTexture",ql.Emission),C&&(C.texture||(C.texture=new r.dY(g.context,C.image,[C.image.height,C.image.height,C.image.height],A.gl.RGBA8)),A.activeTexture.set(A.gl.TEXTURE0+ql.LUT),C.texture&&C.texture.bind(A.gl.LINEAR,A.gl.CLAMP_TO_EDGE),_.push("APPLY_LUT_ON_GPU")),p.texcoordBuffer&&(_.push("HAS_ATTRIBUTE_a_uv_2f"),l.push(p.texcoordBuffer)),p.colorBuffer&&(_.push(p.colorBuffer.itemSize===12?"HAS_ATTRIBUTE_a_color_3f":"HAS_ATTRIBUTE_a_color_4f"),l.push(p.colorBuffer)),p.normalBuffer&&(_.push("HAS_ATTRIBUTE_a_normal_3f"),l.push(p.normalBuffer)),p.pbrBuffer&&(_.push("HAS_ATTRIBUTE_a_pbr"),_.push("HAS_ATTRIBUTE_a_heightBasedEmissiveStrength"),l.push(p.pbrBuffer)),x.alphaMode!=="OPAQUE"&&x.alphaMode!=="MASK"||_.push("UNPREMULT_TEXTURE_IN_SHADER"),x.defined||_.push("DIFFUSE_SHADED");let oe=g.shadowRenderer;oe&&(_.push("RENDER_SHADOWS","DEPTH_TEXTURE"),oe.useNormalOffset&&_.push("NORMAL_OFFSET"))}function M_(_,l,p,g,C,x){let A=p.paint.get("model-opacity").constantOr(1),R=l.context,B=new gn(l.context.gl.LEQUAL,gn.ReadWrite,l.depthRangeFor3D),H=l.transform,G=_.mesh,J=G.material,K=J.pbrMetallicRoughness,oe=l.style.fog,le;le=l.transform.projection.zAxisUnit==="pixels"?[..._.nodeModelMatrix]:r.aB([],g.zScaleMatrix,_.nodeModelMatrix),r.aB(le,g.negCameraPosMatrix,le);let de=r.bl([],le);r.ed(de,de);let Ce=p.paint.get("model-color-use-theme").constantOr("default")==="none",he=p.paint.get("model-emissive-strength").constantOr(0),Te=qy(new Float32Array(_.worldViewProjection),new Float32Array(le),new Float32Array(de),null,l,A,K.baseColorFactor,J.emissiveFactor,K.metallicFactor,K.roughnessFactor,J,he,p),Pe={defines:[]},Ve=[],et=l.shadowRenderer;et&&(et.useNormalOffset=!1),Qy(Pe.defines,Ve,G,l,Ce?null:p.lut);let Qe=null;if(oe){let Ye=kt(_.nodeModelMatrix,l.transform);if(Qe=new Float32Array(Ye),H.projection.name!=="globe"){let Je=G.aabb.min,Bt=G.aabb.max,[St,Jt]=oe.getOpacityForBounds(Ye,Je[0],Je[1],Bt[0],Bt[1]);Pe.overrideFog=St>=qn||Jt>=qn}}let it=k0(l,p.paint.get("model-cutoff-fade-range"));it.shouldRenderCutoff&&Pe.defines.push("RENDER_CUTOFF");let Ze=l.getOrCreateProgram("model",Pe);l.uploadCommonUniforms(R,Ze,null,Qe,it),l.renderPass!=="shadow"&&et&&et.setupShadowsFromMatrix(_.nodeModelMatrix,Ze),Ze.draw(l,R.gl.TRIANGLES,B,C,x,G.material.doubleSided?Do.disabled:Do.backCCW,Te,p.id,G.vertexBuffer,G.indexBuffer,G.segments,p.paint,l.transform.zoom,void 0,Ve)}function _1(_,l,p,g,C,x,A){let R;R=_.projection.name==="globe"?r.eu(p,_):[...p],r.aB(R,R,l.matrix);let B=r.aB([],g,R);if(l.meshes)for(let H of l.meshes){if(H.material.alphaMode!=="BLEND"){A.push({mesh:H,depth:0,modelIndex:C,worldViewProjection:B,nodeModelMatrix:R});continue}let G=r.af([],H.centroid,B);!_.isOrthographic&&G[2]<=0||x.push({mesh:H,depth:G[2],modelIndex:C,worldViewProjection:B,nodeModelMatrix:R})}if(l.children)for(let H of l.children)_1(_,H,p,g,C,x,A)}function Qb(_,l,p,g){let C=p.shadowRenderer;if(!C)return;let x=C.getShadowPassDepthMode(),A=C.getShadowPassColorMode(),R=C.calculateShadowPassMatrixFromMatrix(l),B=Kb(R);p.getOrCreateProgram("modelDepth",{defines:p._shadowMapDebug?[]:["DEPTH_TEXTURE"]}).draw(p,p.context.gl.TRIANGLES,x,xo.disabled,A,Do.backCCW,B,g.id,_.vertexBuffer,_.indexBuffer,_.segments,g.paint,p.transform.zoom,void 0,void 0)}function th(_,l,p){let g=l.updateZoomBasedPaintProperties(),C=(function(x,A,R){let B,H,G,J=x.terrain?x.terrain.exaggeration():0;if(x.terrain&&J>0){let K=x.terrain,oe=K.findDEMTileFor(R);oe&&oe.dem?B=r.ew.create(K,R,oe):J=0}if(J===0&&(A.terrainElevationMin=0,A.terrainElevationMax=0),J===A.validForExaggeration&&(J===0||B&&B._demTile&&B._demTile.tileID===A.validForDEMTile.id&&B._dem._timestamp===A.validForDEMTile.timestamp))return!1;for(let K in A.instancesPerModel){let oe=A.instancesPerModel[K];for(let le=0;leH&&(H=oe.max)}let G=r.aA(g.x,x,A)-g.x,J=r.aA(g.y,R,B)-g.y,K=r.ce(H,l.center.lat)-g.z;return l._zoomFromMercatorZ(Math.sqrt(G*G+J*J+K*K))}function FD(_,l,p,g,C,x,A){let R=_.context,B=_.renderPass==="shadow",H=_.shadowRenderer,G=B&&H?H.getShadowPassDepthMode():new gn(R.gl.LEQUAL,gn.ReadWrite,_.depthRangeFor3D),J=_.isTileAffectedByFog(x);if(p.meshes)for(let K of p.meshes){let oe=["MODEL_POSITION_ON_GPU"],le=[],de,Ce,he;g.instancedDataArray.length>20&&oe.push("INSTANCED_ARRAYS");let Te=k0(_,l.paint.get("model-cutoff-fade-range"));if(Te.shouldRenderCutoff&&oe.push("RENDER_CUTOFF"),B&&H)de=_.getOrCreateProgram("modelDepth",{defines:oe}),Ce=Kb(A.shadowTileMatrix,A.shadowTileMatrix,Float32Array.from(p.matrix)),he=H.getShadowPassColorMode();else{Qy(oe,le,K,_,l.paint.get("model-color-use-theme").constantOr("default")==="none"?null:l.lut),de=_.getOrCreateProgram("model",{defines:oe,overrideFog:J});let Ve=K.material,et=Ve.pbrMetallicRoughness,Qe=l.paint.get("model-opacity").constantOr(1),it=l.paint.get("model-emissive-strength").constantOr(0);Ce=qy(x.expandedProjMatrix,Float32Array.from(p.matrix),new Float32Array(16),null,_,Qe,et.baseColorFactor,Ve.emissiveFactor,et.metallicFactor,et.roughnessFactor,Ve,it,l,C),H&&(A.shadowUniformsInitialized?de.setShadowUniformValues(R,H.getShadowUniformValues()):(H.setupShadows(x.toUnwrapped(),de,"model-tile"),A.shadowUniformsInitialized=!0)),he=Te.shouldRenderCutoff||Qe<1||Ve.alphaMode!=="OPAQUE"?Qo.alphaBlended:Qo.unblended}_.uploadCommonUniforms(R,de,x.toUnwrapped(),null,Te);let Pe=K.material.doubleSided?Do.disabled:Do.backCCW;if(g.instancedDataArray.length>20)le.push(g.instancedDataBuffer),de.draw(_,R.gl.TRIANGLES,G,xo.disabled,he,Pe,Ce,l.id,K.vertexBuffer,K.indexBuffer,K.segments,l.paint,_.transform.zoom,void 0,le,g.instancedDataArray.length);else{let Ve=B?"u_instance":"u_normal_matrix";for(let et=0;etB[1]?A:B,x[0]=p.max[0],A=r.aC(r.ex(),x,C),R=A[1]B[1]?A:B,x[1]=p.min[1],A=r.aC(r.ex(),x,C),R=A[1]B[1]?A:B;let H=r.aA(g[0],0,1),G=100*l.pixelsPerMeter*r.aA(g[1],0,1),J=r.aA(g[2],0,1),K=r.ey(r.ex(),R,B,H),oe=Math.tan(.5*l.fovX),le=-K[2]*oe;if(G===0)return K[1]<-Math.abs(le)?J:1;let de=(-Math.abs(le)-K[1])/G,Ce=(Te,Pe,Ve)=>(1-Ve)*Te+Ve*Pe,he=r.aA(Ce(1,J,de),J,1);return Ce(1,he,r.aA((l.pitch-20)/20,0,1))}class dT{}class uT{constructor(){this._storage=new Map}getLinesFromTrianglesBuffer(l,p,g){{let J=this._storage.get(p.id);if(J)return J.lastUsedFrameIdx=l,J.buf}let C=g.gl,x=C.getBufferParameter(C.ELEMENT_ARRAY_BUFFER,C.BUFFER_SIZE),A=new ArrayBuffer(x),R=new Int16Array(A);C.getBufferSubData(C.ELEMENT_ARRAY_BUFFER,0,new Int16Array(A));let B=new r.eA;for(let J=0;J30&&(g.buf.destroy(),this._storage.delete(p))}destroy(){for(let[l,p]of this._storage)p.buf.destroy(),this._storage.delete(l)}}class Mf{constructor(l){this.occluderSize=30,this.depthOffset=-1e-4,l.registerParameter(this,["Occlusion"],"occluderSize",{min:1,max:100,step:1}),l.registerParameter(this,["Occlusion"],"depthOffset",{min:-.05,max:0,step:1e-5})}}let y1=r.ef([{type:"Float32",name:"a_pos_3f",components:3},{type:"Float32",name:"a_uv",components:2},{type:"Float32",name:"a_rainParticleData",components:4}]);class Vh{registerParameter(){}registerButton(){}registerBinding(){}refreshUI(){}}class pT{constructor(l,p){this.revealStart=11,this.revealRange=2,l.registerParameter(this,[...p,"Reveal"],"revealStart",{min:0,max:17,step:.05}),l.registerParameter(this,[...p,"Reveal"],"revealRange",{min:.1,max:5.1,step:.05})}}let LD=r.ef([{type:"Float32",name:"a_pos_2f",components:2}]);class ND{destroy(){this.vignetteVx&&this.vignetteVx.destroy(),this.vignetteIdx&&this.vignetteIdx.destroy()}draw(l,p){let g=l.getOrCreateProgram("vignette");if(!this.vignetteVx||!this.vignetteIdx){let A=new r.eB,R=new r.b1;A.emplaceBack(-1,-1),A.emplaceBack(1,-1),A.emplaceBack(1,1),A.emplaceBack(-1,1),R.emplaceBack(0,1,2),R.emplaceBack(0,2,3),this.vignetteVx=l.context.createVertexBuffer(A,LD.members),this.vignetteIdx=l.context.createIndexBuffer(R)}let C=r.bg.simpleSegment(0,0,4,6);if(this.vignetteVx&&this.vignetteIdx){l.uploadCommonUniforms(l.context,g);let A={u_vignetteShape:(x={vignetteShape:[p.start,p.range,Math.pow(10,p.fadePower)],vignetteColor:[p.color.r,p.color.g,p.color.b,p.color.a*p.strength]}).vignetteShape,u_vignetteColor:x.vignetteColor};g.draw(l,l.context.gl.TRIANGLES,gn.disabled,xo.disabled,Qo.alphaBlended,Do.disabled,A,"vignette",this.vignetteVx,this.vignetteIdx,C)}var x}}class UM{constructor(){this._accumulatedOffsetX=0,this._accumulatedOffsetY=0,this._accumulatedElevation=0}update(l,p){let g=l.getFreeCameraOptions().position,C=g.toAltitude(),x=g.toLngLat(),A=r.an(x.lng),R=r.an(x.lat),B=l.pixelsPerMeter/p,H=A*r.eD,G=r.eD*Math.log(Math.tan(Math.PI/4+R/2));if(this._offsetXPrev===void 0)this._offsetXPrev=0,this._offsetYPrev=0,this._elevationPrev=0,this._accumulatedOffsetX=0,this._accumulatedOffsetY=0,this._accumulatedElevation=0;else{let J=-this._offsetYPrev+G,K=-this._elevationPrev+C;this._accumulatedOffsetX+=(-this._offsetXPrev+H)*B,this._accumulatedOffsetY+=J*B,this._accumulatedElevation+=K*B,this._offsetXPrev=H,this._offsetYPrev=G,this._elevationPrev=C}}getPosition(){return[this._accumulatedOffsetX,this._accumulatedOffsetY,this._accumulatedElevation]}}function HM(_,l){return[-(_[0]-Math.floor(_[0]/l)*l),-(_[1]-Math.floor(_[1]/l)*l),-(_[2]-Math.floor(_[2]/l)*l)]}function Eu(_){let l=r.eo(1323123451230),p=[];for(let g=0;g<_;++g){let C=2*l()-1,x=2*l()-1,A=2*l()-1;p.push(r.d4(C,x,A))}return p}function O_(_,l,p,g,C){let x=r.aA((C-p)/(g-p),0,1);return(1-x)*_+x*l}class Zy{constructor(l){this._movement=new UM,this._accumulatedTimeFromStart=0,this._prevTime=Date.now()/1e3,this._vignette=new ND,this._ppmScaleFactor=l}destroy(){this.particlesVx&&this.particlesVx.destroy(),this.particlesIdx&&this.particlesIdx.destroy(),this._vignette&&this._vignette.destroy()}updateOnRender(l,p){let g=l.transform;this._movement.update(g,this._ppmScaleFactor);let C=g.starsProjMatrix,x=r.c6([]);r.c8(x,x,r.an(90)-g._pitch),r.c7(x,x,-g.angle);let A=r.cb(new Float32Array(16),x),R=r.eC(1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1),B=r.ed([],R),H=r.aB([],B,A),G=Date.now()/1e3;return this._accumulatedTimeFromStart+=(G-this._prevTime)*p,this._prevTime=G,{projectionMatrix:C,modelviewMatrix:H}}}class Aa extends Zy{constructor(l){super(4.25),this._params={overrideStyleParameters:!1,intensity:.5,timeFactor:1,velocityConeAperture:0,velocity:300,boxSize:2500,dropletSizeX:1,dropletSizeYScale:10,distortionStrength:70,screenThinning:{intensity:.57,start:.46,range:1.17,fadePower:.17,affectedRatio:1,particleOffset:-.2},color:{r:.66,g:.68,b:.74,a:.7},direction:{x:-50,y:-35},shapeDirPower:2,shapeNormalPower:1},this._revealParams=new pT(l.tp,["Precipitation","Rain"]),this._vignetteParams={strength:1,start:.7,range:1,fadePower:.4,color:{r:.27,g:.27,b:.27,a:1}},this.particlesCount=16e3}update(l){let p=l.context;if(!this.particlesVx){let g=Eu(this.particlesCount),C=new r.eE,x=new r.b1,A=0,R=r.eo(1323123451230);for(let B=0;Bg)return;let C=O_(0,1,p.revealStart,p.revealStart+p.revealRange,g);if(!this.particlesVx||!this.particlesIdx)return;let x=structuredClone(this._params),A=[-x.direction.x,x.direction.y,-100];r.aw(A,A);let R=structuredClone(this._vignetteParams);R.strength*=C,x.overrideStyleParameters||(x.intensity=l.style.rain.state.density,x.timeFactor=l.style.rain.state.intensity,x.color=structuredClone(l.style.rain.state.color),A=structuredClone(l.style.rain.state.direction),x.screenThinning.intensity=l.style.rain.state.centerThinning,x.dropletSizeX=l.style.rain.state.dropletSize[0],x.dropletSizeYScale=l.style.rain.state.dropletSize[1]/l.style.rain.state.dropletSize[0],x.distortionStrength=100*l.style.rain.state.distortionStrength,R.strength=1,R.color=structuredClone(l.style.rain.state.vignetteColor));let B=this.updateOnRender(l,x.timeFactor),H=l.context,G=H.gl,J=l.transform;this.screenTexture&&this.screenTexture.size[0]===l.width&&this.screenTexture.size[1]===l.height||(this.screenTexture=new r.T(H,{width:l.width,height:l.height,data:null},G.RGBA8)),x.distortionStrength>0&&(H.activeTexture.set(G.TEXTURE0),this.screenTexture.bind(G.LINEAR,G.CLAMP_TO_EDGE),G.copyTexSubImage2D(G.TEXTURE_2D,0,0,0,0,0,l.width,l.height));let K=l.getOrCreateProgram("rainParticle");l.uploadCommonUniforms(H,K),H.activeTexture.set(G.TEXTURE0),this.screenTexture.bind(G.LINEAR,G.CLAMP_TO_EDGE);let oe=[x.color.r,x.color.g,x.color.b,x.color.a],le=(de,Ce)=>{let he=HM(this._movement.getPosition(),de),Te=x.dropletSizeX,Pe=x.dropletSizeX*x.dropletSizeYScale,Ve=l.width/2,et=l.height/2,Qe=O_(0,x.screenThinning.start,0,1,x.screenThinning.intensity),it=O_(.001,x.screenThinning.range,0,1,x.screenThinning.intensity),Ze=O_(0,x.screenThinning.particleOffset,0,1,x.screenThinning.intensity),Ye=(Je={modelview:B.modelviewMatrix,projection:B.projectionMatrix,time:this._accumulatedTimeFromStart,camPos:he,velocityConeAperture:x.velocityConeAperture,velocity:x.velocity,boxSize:de,rainDropletSize:[Te,Pe],distortionStrength:x.distortionStrength,rainDirection:A,color:oe,screenSize:[J.width,J.height],thinningCenterPos:[Ve,et],thinningShape:[Qe,it,Math.pow(10,x.screenThinning.fadePower)],thinningAffectedRatio:x.screenThinning.affectedRatio,thinningParticleOffset:Ze,shapeDirectionalPower:x.shapeDirPower,shapeNormalPower:x.shapeNormalPower,mode:Ce?0:1},{u_modelview:Float32Array.from(Je.modelview),u_projection:Float32Array.from(Je.projection),u_time:Je.time,u_cam_pos:Je.camPos,u_texScreen:0,u_velocityConeAperture:Je.velocityConeAperture,u_velocity:Je.velocity,u_boxSize:Je.boxSize,u_rainDropletSize:Je.rainDropletSize,u_distortionStrength:Je.distortionStrength,u_rainDirection:Je.rainDirection,u_color:Je.color,u_screenSize:Je.screenSize,u_thinningCenterPos:Je.thinningCenterPos,u_thinningShape:Je.thinningShape,u_thinningAffectedRatio:Je.thinningAffectedRatio,u_thinningParticleOffset:Je.thinningParticleOffset,u_shapeDirectionalPower:Je.shapeDirectionalPower,u_shapeNormalPower:Je.shapeNormalPower,u_mode:Je.mode});var Je;let Bt=Math.round(x.intensity*this.particlesCount),St=r.bg.simpleSegment(0,0,4*Bt,2*Bt);K.draw(l,G.TRIANGLES,gn.disabled,xo.disabled,Qo.alphaBlended,Do.disabled,Ye,"rain_particles",this.particlesVx,this.particlesIdx,St)};x.distortionStrength>0&&le(x.boxSize,!0),le(x.boxSize,!1),this._vignette.draw(l,R)}}let Mr=r.ef([{type:"Float32",name:"a_pos_3f",components:3},{type:"Float32",name:"a_uv",components:2},{type:"Float32",name:"a_snowParticleData",components:4},{type:"Float32",name:"a_snowParticleDataHorizontalOscillation",components:2}]);class BD extends Zy{constructor(l){super(2.25),this._params={overrideStyleParameters:!1,intensity:.85,timeFactor:.75,velocityConeAperture:70,velocity:40,horizontalOscillationRadius:4,horizontalOscillationRate:1.5,boxSize:2e3,billboardSize:2,shapeFadeStart:.27,shapeFadePower:.21,screenThinning:{intensity:.4,start:.15,range:1.4,fadePower:.24,affectedRatio:1,particleOffset:-.2},color:{r:1,g:1,b:1,a:1},direction:{x:-50,y:-35}},this._revealParams=new pT(l.tp,["Precipitation","Snow"]),this._vignetteParams={strength:.3,start:.78,range:.46,fadePower:.2,color:{r:1,g:1,b:1,a:1}},this.particlesCount=16e3}update(l){let p=l.context;if(!this.particlesVx){let g=Eu(this.particlesCount),C=new r.eF,x=new r.b1,A=0,R=r.eo(1323123451230);for(let B=0;BA)return;let R=O_(0,1,x.revealStart,x.revealStart+x.revealRange,A);C.strength*=R,p.overrideStyleParameters||(p.intensity=l.style.snow.state.density,p.timeFactor=l.style.snow.state.intensity,p.color=structuredClone(l.style.snow.state.color),g=structuredClone(l.style.snow.state.direction),p.screenThinning.intensity=l.style.snow.state.centerThinning,p.billboardSize=2.79*l.style.snow.state.flakeSize,C.strength=1,C.color=structuredClone(l.style.snow.state.vignetteColor));let B=this.updateOnRender(l,p.timeFactor);if(!this.particlesVx||!this.particlesIdx)return;let H=l.context,G=H.gl,J=l.transform,K=l.getOrCreateProgram("snowParticle");l.uploadCommonUniforms(H,K),((oe,le,de)=>{let Ce=HM(this._movement.getPosition(),oe),he=J.width/2,Te=J.height/2,Pe=O_(0,de.screenThinning.start,0,1,de.screenThinning.intensity),Ve=O_(.001,de.screenThinning.range,0,1,de.screenThinning.intensity),et=O_(0,de.screenThinning.particleOffset,0,1,de.screenThinning.intensity),Qe=(it={modelview:B.modelviewMatrix,projection:B.projectionMatrix,time:this._accumulatedTimeFromStart,camPos:Ce,velocityConeAperture:de.velocityConeAperture,velocity:de.velocity,horizontalOscillationRadius:de.horizontalOscillationRadius,horizontalOscillationRate:de.horizontalOscillationRate,boxSize:oe,billboardSize:1*de.billboardSize,simpleShapeParameters:[de.shapeFadeStart,de.shapeFadePower],screenSize:[J.width,J.height],thinningCenterPos:[he,Te],thinningShape:[Pe,Ve,Math.pow(10,de.screenThinning.fadePower)],thinningAffectedRatio:de.screenThinning.affectedRatio,thinningParticleOffset:et,color:[de.color.r,de.color.g,de.color.b,de.color.a],direction:g},{u_modelview:Float32Array.from(it.modelview),u_projection:Float32Array.from(it.projection),u_time:it.time,u_cam_pos:it.camPos,u_velocityConeAperture:it.velocityConeAperture,u_velocity:it.velocity,u_horizontalOscillationRadius:it.horizontalOscillationRadius,u_horizontalOscillationRate:it.horizontalOscillationRate,u_boxSize:it.boxSize,u_billboardSize:it.billboardSize,u_simpleShapeParameters:it.simpleShapeParameters,u_screenSize:it.screenSize,u_thinningCenterPos:it.thinningCenterPos,u_thinningShape:it.thinningShape,u_thinningAffectedRatio:it.thinningAffectedRatio,u_thinningParticleOffset:it.thinningParticleOffset,u_particleColor:it.color,u_direction:it.direction});var it;let Ze=Math.round(de.intensity*this.particlesCount),Ye=r.bg.simpleSegment(0,0,4*Ze,2*Ze);this.particlesVx&&this.particlesIdx&&K.draw(l,G.TRIANGLES,gn.disabled,xo.disabled,Qo.alphaBlended,Do.disabled,Qe,"snow_particles",this.particlesVx,this.particlesIdx,Ye)})(p.boxSize,0,p),this._vignette.draw(l,C)}}let pd={symbol:function(_,l,p,g,C){if(_.renderPass!=="translucent")return;let x=xo.disabled,A=_.colorModeForRenderPass(),R=p.layout.get("text-variable-anchor"),B=p.layout.get("text-size-scale-range"),H=r.aA(_.scaleFactor,B[0],B[1]);R&&(function(K,oe,le,de,Ce,he,Te,Pe){let Ve=oe.transform,et=Ce==="map",Qe=he==="map";for(let it of K){let Ze=de.getTile(it),Ye=Ze.getBucket(le);if(!Ye||!Ye.text||!Ye.text.segments.get().length)continue;let Je=r.bK(Ye.textSizeData,Ve.zoom,Pe),Bt=Py(it,Ye.getProjection(),Ve),St=Ve.calculatePixelsToTileUnitsMatrix(Ze),Jt=_f(Bt,Ze.tileID.canonical,Qe,et,Ve,Ye.getProjection(),St),Ft=Ye.hasIconTextFit()&&Ye.hasIconData();Je&&ZS(Ye,et,Qe,Te,Ve,Jt,it,Math.pow(2,Ve.zoom-Ze.tileID.overscaledZ),Je,Ft)}})(g,_,p,l,p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),C,H);let G=p.paint.get("icon-opacity").constantOr(1)!==0,J=p.paint.get("text-opacity").constantOr(1)!==0;p.layout.get("symbol-sort-key").constantOr(1)!==void 0&&(G||J)?m1(_,l,p,g,x,A):(G&&m1(_,l,p,g,x,A,{onlyIcons:!0}),J&&m1(_,l,p,g,x,A,{onlyText:!0})),l.map.showCollisionBoxes&&(Ef(_,l,p,g,p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),!0),Ef(_,l,p,g,p.paint.get("icon-translate"),p.paint.get("icon-translate-anchor"),!1))},circle:function(_,l,p,g){if(_.renderPass!=="translucent")return;let C=p.paint.get("circle-opacity"),x=p.paint.get("circle-stroke-width"),A=p.paint.get("circle-stroke-opacity"),R=p.layout.get("circle-sort-key").constantOr(1)!==void 0,B=p.paint.get("circle-emissive-strength");if(C.constantOr(1)===0&&(x.constantOr(1)===0||A.constantOr(1)===0))return;let H=_.context,G=H.gl,J=_.transform,K=!(!_.terrain||!_.terrain.enabled),oe=p.layout.get("circle-elevation-reference"),le=_.depthModeForSublayer(0,gn.ReadOnly),de=new gn(_.context.gl.LEQUAL,gn.ReadOnly,_.depthRangeFor3D),Ce=oe==="none"||K?le:de,he=xo.disabled,Te=_.colorModeForDrapableLayerRenderPass(B),Pe=J.projection.name==="globe",Ve=[r.aF(J.center.lng),r.aJ(J.center.lat)],et=[];for(let it=0;itit.sortKey-Ze.sortKey);let Qe={useDepthForOcclusion:J.depthOcclusionForSymbolsAndCircles};for(let it of et){let{programConfiguration:Ze,program:Ye,layoutVertexBuffer:Je,dynamicBuffers:Bt,indexBuffer:St,uniformValues:Jt,tile:Ft}=it.state,Yt=it.segments;_.terrain&&_.terrain.setupElevationDraw(Ft,Ye,Qe),_.uploadCommonUniforms(H,Ye,Ft.tileID.toUnwrapped()),Ye.draw(_,G.TRIANGLES,Ce,he,Te,Do.disabled,Jt,p.id,Je,St,Yt,p.paint,J.zoom,Ze,Bt)}},heatmap:function(_,l,p,g){if(p.paint.get("heatmap-opacity")!==0)if(_.renderPass==="offscreen"){let C=_.context,x=C.gl,A=xo.disabled,R=new Qo([x.ONE,x.ONE,x.ONE,x.ONE],r.ao.transparent,[!0,!0,!0,!0]);(function(oe,le,de,Ce){let he=oe.gl,Te=le.width*Ce,Pe=le.height*Ce;oe.activeTexture.set(he.TEXTURE1),oe.viewport.set([0,0,Te,Pe]);let Ve=de.heatmapFbo;if(!Ve||Ve&&(Ve.width!==Te||Ve.height!==Pe)){Ve&&Ve.destroy();let et=he.createTexture();he.bindTexture(he.TEXTURE_2D,et),he.texParameteri(he.TEXTURE_2D,he.TEXTURE_WRAP_S,he.CLAMP_TO_EDGE),he.texParameteri(he.TEXTURE_2D,he.TEXTURE_WRAP_T,he.CLAMP_TO_EDGE),he.texParameteri(he.TEXTURE_2D,he.TEXTURE_MIN_FILTER,he.LINEAR),he.texParameteri(he.TEXTURE_2D,he.TEXTURE_MAG_FILTER,he.LINEAR),Ve=de.heatmapFbo=oe.createFramebuffer(Te,Pe,!0,null),(function(Qe,it,Ze,Ye,Je,Bt){let St=Qe.gl;St.texImage2D(St.TEXTURE_2D,0,Qe.extRenderToTextureHalfFloat?St.RGBA16F:St.RGBA,Je,Bt,0,St.RGBA,Qe.extRenderToTextureHalfFloat?St.HALF_FLOAT:St.UNSIGNED_BYTE,null),Ye.colorAttachment.set(Ze)})(oe,0,et,Ve,Te,Pe)}else he.bindTexture(he.TEXTURE_2D,Ve.colorAttachment.get()),oe.bindFramebuffer.set(Ve.framebuffer)})(C,_,p,_.transform.projection.name==="globe"?.5:.25),C.clear({color:r.ao.transparent});let B=_.transform,H=B.projection.name==="globe",G=H?["PROJECTION_GLOBE_VIEW"]:[],J=H?Do.frontCCW:Do.disabled,K=[r.aF(B.center.lng),r.aJ(B.center.lat)];for(let oe=0;oe({u_image:0,u_color_ramp:1,u_opacity:J.paint.get("heatmap-opacity")}))(0,x),x.id,C.viewportBuffer,C.quadTriangleIndexBuffer,C.viewportSegments,x.paint,C.transform.zoom)})(_,p))},line:function(_,l,p,g){if(_.renderPass!=="translucent")return;let C=p.paint.get("line-opacity"),x=p.paint.get("line-width");if(C.constantOr(1)===0||x.constantOr(1)===0)return;let A=p.paint.get("line-emissive-strength"),R=p.paint.get("line-occlusion-opacity"),B=p.layout.get("line-elevation-reference"),H=p.layout.get("line-width-unit")==="meters",G=B==="sea",J=!(!_.terrain||!_.terrain.enabled),K=_.context,oe=K.gl;if(p.hasElevatedBuckets&&_.transform.projection.name==="globe")return;let le=p.layout.get("line-cross-slope"),de=le!==void 0,Ce=le<1,he=_.colorModeForDrapableLayerRenderPass(A),Te=_.terrain&&_.terrain.renderingToTexture,Pe=Te?1:r.o.devicePixelRatio,Ve=p.paint.get("line-dasharray"),et=Ve.constantOr(1),Qe=p.layout.get("line-cap"),it=Ve.constantOr(null),Ze=Qe.constantOr(null),Ye=p.paint.get("line-pattern"),Je=Ye.constantOr(1),Bt=p.paint.get("line-pattern-cross-fade"),St=Ye.constantOr(null),Jt=p.paint.get("line-opacity").constantOr(1),Ft=!Je&&Jt!==1||_.depthOcclusion&&R>0&&R<1,Yt=p.paint.get("line-gradient"),ji=Je?"linePattern":"line",Nt=r.d$(p),gt;if(Te&&_.terrain&&_.terrain.clipOrMaskOverlapStencilType()&&(Ft=!1),R!==0&&_.depthOcclusion){let Hi=p.paint._values["line-opacity"];Hi&&Hi.value&&Hi.value.kind==="constant"?gt=Hi.value:r.w(`Occlusion opacity for layer ${p.id} is supported only when line-opacity isn't data-driven.`)}x.value.kind!=="constant"&&x.value.isLineProgressConstant===!1&&Nt.push("VARIABLE_LINE_WIDTH");let ii=(Hi,un,Fi,Mi,$n,Ln)=>{for(let Gn of Hi){let Rn=l.getTile(Gn);if(Je&&!Rn.patternsLoaded())continue;let Ro=Rn.getBucket(p);if(!Ro||Ro.elevationType!=="none"&&!$n||Ro.elevationType==="none"&&$n)continue;_.prepareDrawTile();let Jo=[...un],or=_.shadowRenderer,ks=Ro.elevationType==="road"&&!!or&&or.enabled,Bo=[0,0,0];if(ks){let rr=_.style.directionalLight,wo=_.style.ambientLight;rr&&wo&&(Bo=Cf(_.style,rr,wo)),Jo.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET")}let ts=Ro.programConfigurations.get(p.id),Is=!1;if(St&&Rn.imageAtlas){let rr=r.e0.from(St),wo=rr.getPrimary().scaleSelf(Pe).toString(),Ms=Rn.imageAtlas.patternPositions.get(wo),_l=rr.getSecondary(),Va=_l?Rn.imageAtlas.patternPositions.get(_l.scaleSelf(Pe).toString()):null;Is=!!Ms&&!!Va,Ms&&ts.setConstantPatternPositions(Ms,Va)}Bt>0&&(Is||ts.getPatternTransitionVertexBuffer("line-pattern"))&&Jo.push("LINE_PATTERN_TRANSITION");let ka=_.isTileAffectedByFog(Gn),er=_.getOrCreateProgram(ji,{config:ts,defines:Jo,overrideFog:ka});if(!Je&&it&&Ze&&Rn.lineAtlas){let rr=Rn.lineAtlas.getDash(it,Ze);rr&&ts.setConstantPatternPositions(rr)}ks&&or.setupShadows(Rn.tileID.toUnwrapped(),er,"vector-tile");let[ds,Zr]=p.paint.get("line-trim-offset");(Ze==="round"||Ze==="square")&&ds!==Zr&&(ds===0&&(ds-=1),Zr===1&&(Zr+=1));let us=Te?Gn.projMatrix:null,Na=H?1/Ro.tileToMeter/r.ay(Rn,1,_.transform.zoom):1,Nl=H?1/Ro.tileToMeter/r.ay(Rn,1,Math.floor(_.transform.zoom)):1,Zc=Je?r.e1(_,Rn,p,us,Pe,Na,Nl,[ds,Zr],Bo,Bt):r.e2(_,Rn,p,us,Ro.lineClipsArray.length,Pe,Na,Nl,[ds,Zr],Bo);if(Yt){let rr=Ro.gradients[p.id],wo=rr.texture;if(p.gradientVersion!==rr.version){let Ms=256;if(p.stepInterpolant){let _l=l.getSource().maxzoom,Va=Gn.canonical.z===_l?Math.ceil(1<<_.transform.maxZoom-Gn.canonical.z):1;Ms=r.aA(r.e3(Ro.maxLineLength/r.al*1024*Va),256,K.maxTextureSize)}rr.gradient=r.e4({expression:p.gradientExpression(),evaluationKey:"lineProgress",resolution:Ms,image:rr.gradient||void 0,clips:Ro.lineClipsArray}),rr.texture?rr.texture.update(rr.gradient):rr.texture=new r.T(K,rr.gradient,oe.RGBA8),rr.version=p.gradientVersion,wo=rr.texture}K.activeTexture.set(oe.TEXTURE1),wo.bind(p.stepInterpolant?oe.NEAREST:oe.LINEAR,oe.CLAMP_TO_EDGE)}et&&(K.activeTexture.set(oe.TEXTURE0),Rn.lineAtlasTexture&&Rn.lineAtlasTexture.bind(oe.LINEAR,oe.REPEAT),ts.updatePaintBuffers()),Je&&(K.activeTexture.set(oe.TEXTURE0),Rn.imageAtlasTexture&&Rn.imageAtlasTexture.bind(oe.LINEAR,oe.CLAMP_TO_EDGE),ts.updatePaintBuffers()),$n&&!G&&_.terrain.setupElevationDraw(Rn,er),_.uploadCommonUniforms(K,er,Gn.toUnwrapped());let Ba=rr=>{gt!=null&&(gt.value=Jt*R),er.draw(_,oe.TRIANGLES,Fi,rr,he,Do.disabled,Zc,p.id,Ro.layoutVertexBuffer,Ro.indexBuffer,Ro.segments,p.paint,_.transform.zoom,ts,[Ro.layoutVertexBuffer2,Ro.patternVertexBuffer,Ro.zOffsetVertexBuffer]),gt!=null&&(gt.value=Jt)};if(Ft&&!$n){let rr=_.stencilModeForClipping(Gn).ref;rr===0&&Te&&K.clear({stencil:0});let wo={func:oe.EQUAL,mask:255};Zc.u_alpha_discard_threshold=.8,Ba(new xo(wo,rr,255,oe.KEEP,oe.KEEP,oe.INVERT)),Zc.u_alpha_discard_threshold=0,Ba(new xo(wo,rr,255,oe.KEEP,oe.KEEP,oe.KEEP))}else Zc.u_alpha_discard_threshold=Ft&&$n&&Ln?.8:0,Ba($n?Mi:_.stencilModeForClipping(Gn))}},Ut=_.depthModeForSublayer(0,gn.ReadOnly),Si=new gn(_.depthOcclusion?oe.GREATER:oe.LEQUAL,gn.ReadOnly,_.depthRangeFor3D);if(p.hasNonElevatedBuckets){let Hi=!Te&&_.terrain;R!==0&&Hi?r.w(`Occlusion opacity for layer ${p.id} is supported on terrain only if the layer has line-z-offset enabled.`):Hi?r.w(`Cannot render non-elevated lines in immediate mode when terrain is enabled. Layer: ${p.id}.`):ii(g,Nt,Ut,xo.disabled,!1,!0)}if(p.hasElevatedBuckets){B==="hd-road-markup"?J||(Ut=Si,Nt.push("ELEVATED_ROADS")):(Nt.push("ELEVATED"),Ut=Si,de&&Nt.push(Ce?"CROSS_SLOPE_HORIZONTAL":"CROSS_SLOPE_VERTICAL"),G&&Nt.push("ELEVATION_REFERENCE_SEA"));let Hi=Ft?_.stencilModeFor3D():xo.disabled;_.forceTerrainMode=!0,ii(g,Nt,Ut,Hi,!0,!0),Ft&&ii(g,Nt,Ut,Hi,!0,!1),_.forceTerrainMode=!1}Ft&&(_.resetStencilClippingMasks(),Te&&K.clear({stencil:0})),R===0||_.depthOcclusion||Te||_.layersWithOcclusionOpacity.push(_.currentLayer)},fill:function(_,l,p,g){let C=p.paint.get("fill-color"),x=p.paint.get("fill-opacity");if(x.constantOr(1)===0)return;let A=p.paint.get("fill-emissive-strength"),R=_.colorModeForDrapableLayerRenderPass(A),B=p.paint.get("fill-pattern"),H=_.opaquePassEnabledForLayer()&&!B.constantOr(1)&&C.constantOr(r.ao.transparent).a===1&&x.constantOr(0)===1?"opaque":"translucent",G="none";p.layout.get("fill-elevation-reference")!=="none"?G="road":p.paint.get("fill-z-offset").constantOr(1)!==0&&(G="offset");let J=!(!_.terrain||!_.terrain.enabled),K={painter:_,sourceCache:l,layer:p,coords:g,colorMode:R,elevationType:G,terrainEnabled:J,pass:H};if(_.renderPass!=="shadow")if(G!=="offset"){if(Ig(K,!1),G==="road"){let oe=!J&&_.renderPass==="translucent";oe&&Ky(_,l,p,g,"geometry"),Ig(K,!0,xo.disabled),oe&&(function(le){let{painter:de,sourceCache:Ce,layer:he,coords:Te,colorMode:Pe}=le,Ve=de.context.gl,et=le.painter.shadowRenderer,Qe=!!et&&et.enabled,it=new gn(de.context.gl.LEQUAL,gn.ReadOnly,de.depthRangeFor3D),Ze=[0,0,0];if(Qe){let Je=de.style.directionalLight,Bt=de.style.ambientLight;Je&&Bt&&(Ze=Cf(de.style,Je,Bt))}let Ye=Je=>{for(let Bt of Te){let St=Ce.getTile(Bt),Jt=St.getBucket(he);if(!Jt)continue;let Ft=Jt.elevatedStructures;if(!Ft)continue;let Yt,ji;if(Je?(Yt=Ft.renderableBridgeSegments,ji=Ft.bridgeProgramConfigurations.get(he.id)):(Yt=Ft.renderableTunnelSegments,ji=Ft.tunnelProgramConfigurations.get(he.id)),!Yt||Yt.segments[0].primitiveLength===0)continue;ji.updatePaintBuffers(),de.prepareDrawTile();let Nt=de.isTileAffectedByFog(Bt),gt=[];Qe&>.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET");let ii=de.getOrCreateProgram("elevatedStructures",{config:ji,overrideFog:Nt,defines:gt}),Ut=de.translatePosMatrix(Bt.projMatrix,St,he.paint.get("fill-translate"),he.paint.get("fill-translate-anchor"));Qe&&et.setupShadows(St.tileID.toUnwrapped(),ii,"vector-tile");let Si=a3(Ut,Ze);de.uploadCommonUniforms(de.context,ii,Bt.toUnwrapped()),ii.draw(de,Ve.TRIANGLES,it,xo.disabled,Pe,Do.backCCW,Si,he.id,Ft.vertexBuffer,Ft.indexBuffer,Yt,he.paint,de.transform.zoom,ji,[Ft.vertexBufferNormal])}};Ye(!0),Ye(!1)})(K)}}else Ig(K,!1,_.stencilModeFor3D());else _.shadowRenderer&&G==="road"&&!J&&(function(oe){let{painter:le,sourceCache:de,layer:Ce,coords:he}=oe,Te=le.context.gl,Pe=oe.painter.shadowRenderer;for(let Ve of he){let et=de.getTile(Ve),Qe=et.getBucket(Ce);if(!Qe)continue;let it=Qe.elevatedStructures;if(!it||!it.shadowCasterSegments||it.shadowCasterSegments.segments[0].primitiveLength===0)continue;le.prepareDrawTile();let Ze=Qe.bufferData.programConfigurations.get(Ce.id),Ye=le.isTileAffectedByFog(Ve),Je=le.getOrCreateProgram("elevatedStructuresDepth",{config:Ze,overrideFog:Ye}),Bt=Pe.calculateShadowPassMatrixFromTile(et.tileID.toUnwrapped());le.uploadCommonUniforms(le.context,Je,Ve.toUnwrapped());let St={u_matrix:Bt,u_depth_bias:0};Je.draw(le,Te.TRIANGLES,Pe.getShadowPassDepthMode(),xo.disabled,Pe.getShadowPassColorMode(),Do.disabled,St,Ce.id,it.vertexBuffer,it.indexBuffer,it.shadowCasterSegments,Ce.paint,le.transform.zoom,Ze)}})(K)},"fill-extrusion":function(_,l,p,g){let C=p.paint.get("fill-extrusion-opacity"),x=_.context,A=x.gl,R=_.terrain,B=R&&R.renderingToTexture;if(C===0)return;let H=_.conflationActive&&_.style.isLayerClipped(p,l.getSource()),G=_.style.order.indexOf(p.fqid);if(H&&(function(J,K,oe,le,de){for(let Ce of le){let he=K.getTile(Ce).getBucket(oe);he&&(he.updateReplacement(Ce,J.replacementSource,de),he.uploadCentroid(J.context))}})(_,l,p,g,G),R||H)for(let J of g){let K=l.getTile(J).getBucket(p);K&&Cm(_.context,l,J,K,p,R,H)}if(_.renderPass==="shadow"&&_.shadowRenderer){let J=_.shadowRenderer;if(R&&C<.65&&p._transitionablePaint._values["fill-extrusion-opacity"].value.expression instanceof r.ad)return;let K=J.getShadowPassDepthMode(),oe=J.getShadowPassColorMode();yn(_,l,p,g,K,xo.disabled,oe,H)}else if(_.renderPass==="translucent"){let J=!p.paint.get("fill-extrusion-pattern").constantOr(1),K=p.paint.get("fill-extrusion-color").constantOr(r.ao.white);if(!B&&K.a!==0){let oe=new gn(_.context.gl.LEQUAL,gn.ReadWrite,_.depthRangeFor3D);C===1&&J?yn(_,l,p,g,oe,xo.disabled,Qo.unblended,H):(yn(_,l,p,g,oe,xo.disabled,Qo.disabled,H),yn(_,l,p,g,oe,_.stencilModeFor3D(),_.colorModeForRenderPass(),H),_.resetStencilClippingMasks())}if(_.style.enable3dLights()&&J&&(!R&&_.transform.projection.name!=="globe"||B)){let oe=p.paint.get("fill-extrusion-opacity"),le=p.paint.get("fill-extrusion-ambient-occlusion-intensity"),de=p.paint.get("fill-extrusion-ambient-occlusion-ground-radius"),Ce=p.paint.get("fill-extrusion-flood-light-intensity"),he=p.paint.get("fill-extrusion-flood-light-color-use-theme").constantOr("default")==="none",Te=p.paint.get("fill-extrusion-flood-light-color").toNonPremultipliedRenderColor(he?null:p.lut).toArray01().slice(0,3),Pe=le>0&&de>0,Ve=Ce>0,et=(Ze,Ye,Je)=>(1-Je)*Ze+Je*Ye,Qe=new MD;Qe.translate=p.paint.get("fill-extrusion-translate"),Qe.translateAnchor=p.paint.get("fill-extrusion-translate-anchor"),Qe.edgeRadius=p.layout.get("fill-extrusion-edge-radius"),Qe.cutoffFadeRange=p.paint.get("fill-extrusion-cutoff-fade-range");let it=Ze=>{let Ye=_.depthModeForSublayer(1,gn.ReadOnly,A.LEQUAL,!0),Je=p.paint.get(Ze?"fill-extrusion-ambient-occlusion-ground-attenuation":"fill-extrusion-flood-light-ground-attenuation"),Bt=et(.1,3,Je),St=_._showOverdrawInspector;if(!St){let Jt=new xo({func:A.ALWAYS,mask:255},255,255,A.KEEP,A.KEEP,A.REPLACE),Ft=new Qo([A.ONE,A.ONE,A.ONE,A.ONE],r.ao.transparent,[!1,!1,!1,!0],A.MIN);k_(Qe,_,l,p,g,Ye,Jt,Ft,Do.disabled,Ze,"sdf",oe,le,de,Ce,Te,Bt,H,!1)}{let Jt=St?xo.disabled:new xo({func:A.EQUAL,mask:255},255,255,A.KEEP,A.DECR,A.DECR),Ft=St?_.colorModeForRenderPass():new Qo([A.ONE_MINUS_DST_ALPHA,A.DST_ALPHA,A.ONE,A.ONE],r.ao.transparent,[!0,!0,!0,!0]);k_(Qe,_,l,p,g,Ye,Jt,Ft,Do.disabled,Ze,"color",oe,le,de,Ce,Te,Bt,H,!1)}};if(B){let Ze=(Ye,Je,Bt)=>{let St=_.depthModeForSublayer(1,gn.ReadOnly,A.LEQUAL,!1),Jt=p.paint.get(Ye?"fill-extrusion-ambient-occlusion-ground-attenuation":"fill-extrusion-flood-light-ground-attenuation"),Ft=et(.1,3,Jt);{let Yt=new Qo([A.ONE,A.ONE,A.ONE,A.ONE],r.ao.transparent,[!1,!1,!1,!0]);k_(Qe,_,l,p,g,St,xo.disabled,Yt,Do.disabled,Ye,"clear",oe,le,de,Ce,Te,Ft,H,Je)}{let Yt=new xo({func:A.ALWAYS,mask:255},255,255,A.KEEP,A.KEEP,A.REPLACE),ji=new Qo([A.ONE,A.ONE,A.ONE,A.ONE],r.ao.transparent,[!1,!1,!1,!0],A.MIN);k_(Qe,_,l,p,g,St,Yt,ji,Do.disabled,Ye,"sdf",oe,le,de,Ce,Te,Ft,H,Je)}{let Yt=Ye?A.ZERO:A.ONE_MINUS_DST_ALPHA,ji=new xo({func:A.EQUAL,mask:255},255,255,A.KEEP,A.DECR,A.DECR),Nt=new Qo([Yt,A.DST_ALPHA,A.ONE_MINUS_DST_ALPHA,A.ZERO],r.ao.transparent,[!0,!0,!0,!0]);k_(Qe,_,l,p,g,St,ji,Nt,Do.disabled,Ye,"color",oe,le,de,Ce,Te,Ft,H,Je)}{let Yt=new Qo([A.ONE,A.ONE,A.ONE,Ye?A.ZERO:A.ONE],r.ao.transparent,[!1,!1,!1,!0],Ye?A.FUNC_ADD:A.MAX);k_(Qe,_,l,p,g,St,xo.disabled,Yt,Do.disabled,Ye,"clear",oe,le,de,Ce,Te,Ft,H,Je,Bt)}};if(Pe||Ve){let Ye;if(_.prepareDrawTile(),R){let Je=R.drapeBufferSize[0],Bt=R.drapeBufferSize[1];Ye=R.framebufferCopyTexture,Ye&&(!Ye||Ye.size[0]===Je&&Ye.size[1]===Bt)||(Ye&&Ye.destroy(),Ye=R.framebufferCopyTexture=new r.T(x,new r.q({width:Je,height:Bt}),A.RGBA8)),Ye.bind(A.LINEAR,A.CLAMP_TO_EDGE),A.copyTexSubImage2D(A.TEXTURE_2D,0,0,0,0,0,Je,Bt)}Pe&&Ze(!0,!1,Ye),Ve&&Ze(!1,!0,Ye)}}else Pe&&it(!0),Ve&&it(!1),(Pe||Ve)&&_.resetStencilClippingMasks()}}},building:function(_,l,p,g){_.currentLayer<_.firstLightBeamLayer&&(_.firstLightBeamLayer=_.currentLayer);let C=p.paint.get("building-ambient-occlusion-ground-intensity"),x=p.paint.get("building-ambient-occlusion-ground-radius"),A=p.paint.get("building-ambient-occlusion-ground-attenuation"),R=p.paint.get("building-opacity");if(R<=0)return;let B=C>0&&x>0,H=!0,G=p.paint.get("building-vertical-scale");(!_.shadowRenderer||G<1)&&(H=!1);let J=_.conflationActive&&_.style.isLayerClipped(p,l.getSource()),K=_.style.order.indexOf(p.fqid);if((function(oe,le,de,Ce,he,Te){for(let Pe of Te){let Ve=le.getTile(Pe).getBucket(de);Ve&&(he&&Ve.updateReplacement(Pe,oe.replacementSource,Ce),Ve.uploadUpdatedIndexBuffer(oe.context))}})(_,l,p,K,J,g),(function(oe,le,de,Ce){for(let he of Ce){let Te=le.getTile(he).getBucket(de);Te&&Te.needsEvaluation()&&Te.uploadUpdatedColorBuffer(oe.context)}})(_,l,p,g),p.resetLayerRenderingStats(_),_.shadowRenderer&&(_.shadowRenderer.useNormalOffset=!0),_.renderPass==="shadow"&&_.shadowRenderer){let oe=_.shadowRenderer,le=[],de=oe.getShadowPassDepthMode();eT({painter:_,source:l,layer:p,coords:g,defines:le,blendMode:oe.getShadowPassColorMode(),depthMode:de,opacity:R,verticalScale:G,facadeEmissiveChance:0,facadeAOIntensity:0})}else if(_.renderPass==="translucent"){let oe=["HAS_ATTRIBUTE_a_part_color_emissive","LIGHTING_3D_MODE"];H&&(oe=oe.concat("RENDER_SHADOWS","DEPTH_TEXTURE")),_.shadowRenderer&&_.shadowRenderer.useNormalOffset&&(oe=oe.concat("NORMAL_OFFSET"));let le=p.paint.get("building-facade-emissive-chance"),de=p.paint.get("building-ambient-occlusion-intensity"),Ce=new gn(_.context.gl.LEQUAL,gn.ReadWrite,_.depthRangeFor3D);R<1&&eT({painter:_,source:l,layer:p,coords:g,defines:oe,blendMode:Qo.disabled,depthMode:Ce,opacity:R,verticalScale:G,facadeEmissiveChance:le,facadeAOIntensity:de});let he=_.colorModeForRenderPass();eT({painter:_,source:l,layer:p,coords:g,defines:oe,blendMode:he,depthMode:Ce,opacity:R,verticalScale:G,facadeEmissiveChance:le,facadeAOIntensity:de}),B&&(function(Te,Pe,Ve,et,Qe,it,Ze,Ye,Je,Bt,St,Jt,Ft){let Yt=Te.context.gl,ji=Te.depthModeForSublayer(1,gn.ReadOnly,Yt.LEQUAL,!0),Nt=.1*(1-(gt=St))+3*gt;var gt;let ii=Te._showOverdrawInspector,Ut=Jt,Si=new MD;ii||k_(Si,Te,Pe,Ve,et,ji,new xo({func:Yt.ALWAYS,mask:255},255,255,Yt.KEEP,Yt.KEEP,Yt.REPLACE),new Qo([Yt.ONE,Yt.ONE,Yt.ONE,Yt.ONE],r.ao.transparent,[!1,!1,!1,!0],Yt.MIN),Do.disabled,Qe,"sdf",it,Ze,Ye,0,Bt,Nt,Ut,!1);{let Hi=ii?xo.disabled:new xo({func:Yt.EQUAL,mask:255},255,255,Yt.KEEP,Yt.DECR,Yt.DECR),un=ii?Te.colorModeForRenderPass():new Qo([Yt.ONE_MINUS_DST_ALPHA,Yt.DST_ALPHA,Yt.ONE,Yt.ONE],r.ao.transparent,[!0,!0,!0,!0]);k_(Si,Te,Pe,Ve,et,ji,Hi,un,Do.disabled,Qe,"color",it,Ze,Ye,0,Bt,Nt,Ut,!1)}})(_,l,p,g,!0,R,C,x,0,[0,0,0],A,J)}else if(_.renderPass==="light-beam"){let oe=["HAS_ATTRIBUTE_a_part_color_emissive","HAS_ATTRIBUTE_a_bloom_attenuation"],le=new gn(_.context.gl.LEQUAL,gn.ReadOnly,_.depthRangeFor3D);eT({painter:_,source:l,layer:p,coords:g,defines:oe,blendMode:Qo.alphaBlended,depthMode:le,opacity:R,verticalScale:G,facadeEmissiveChance:0,facadeAOIntensity:0})}_.shadowRenderer&&(_.shadowRenderer.useNormalOffset=!1),_.resetStencilClippingMasks()},hillshade:function(_,l,p,g){if(_.renderPass!=="offscreen"&&_.renderPass!=="translucent"||_.style.disableElevatedTerrain)return;let C=_.context,x=_.terrain&&_.terrain.renderingToTexture,[A,R]=_.renderPass!=="translucent"||x?[{},g]:_.stencilConfigForOverlap(g);for(let B of R){let H=l.getTile(B);if(H.needsHillshadePrepare&&_.renderPass==="offscreen")XN(_,H,p);else if(_.renderPass==="translucent"){let G=_.depthModeForSublayer(0,gn.ReadOnly),J=p.paint.get("hillshade-emissive-strength"),K=_.colorModeForDrapableLayerRenderPass(J),oe=x&&_.terrain?_.terrain.stencilModeForRTTOverlap(B):A[B.overscaledZ];VS(_,B,H,p,G,oe,K)}}C.viewport.set([0,0,_.width,_.height]),_.resetStencilClippingMasks()},raster:function(_,l,p,g,C,x){if(_.renderPass!=="translucent"||p.paint.get("raster-opacity")===0)return;let A=_.transform.projection.name==="globe",R=p.paint.get("raster-elevation")!==0,B=R&&A;if(_.renderElevatedRasterBackface&&!B)return;let H=_.context,G=H.gl,J=l.getSource(),K=(function(Qe,it,Ze,Ye){let Je=it.paint.get("raster-color"),Bt=Qe.type==="raster-array",St=[],Jt=it.paint.get("raster-resampling"),Ft=it.paint.get("raster-color-mix"),Yt=it.paint.get("raster-color-range"),ji=[Ft[0],Ft[1],Ft[2],0],Nt=Ft[3],gt=Jt==="nearest"?Ye.NEAREST:Ye.LINEAR;if(Bt&&(St.push("RASTER_ARRAY"),Je||St.push("RASTER_COLOR"),Jt==="linear"&&St.push("RASTER_ARRAY_LINEAR"),gt=Ye.NEAREST,!Yt&&Qe.rasterLayers)){let ii=Qe.rasterLayers.find(({id:Ut})=>Ut===it.sourceLayer);ii&&ii.fields&&ii.fields.range&&(Yt=ii.fields.range)}if(Yt=Yt||[0,1],Je){St.push("RASTER_COLOR"),Ze.activeTexture.set(Ye.TEXTURE2),it.updateColorRamp(Yt);let ii=it.colorRampTexture;ii||(ii=it.colorRampTexture=new r.T(Ze,it.colorRamp,Ye.RGBA8)),ii.bind(Ye.LINEAR,Ye.CLAMP_TO_EDGE)}return{mix:ji,range:Yt,offset:Nt,defines:St,resampling:gt}})(J,p,H,G);if(J instanceof r.aS&&!g.length&&!A)return;let oe=p.paint.get("raster-emissive-strength"),le=_.colorModeForDrapableLayerRenderPass(oe),de=_.terrain&&_.terrain.renderingToTexture,Ce=!_.options.moving,he=p.paint.get("raster-resampling")==="nearest"?G.NEAREST:G.LINEAR;if(J instanceof r.aS&&!g.length&&(J.onNorthPole||J.onSouthPole)){let Qe=R?_.stencilModeFor3D():xo.disabled;return void iT(!!J.onNorthPole,null,_,l,p,oe,K,Do.disabled,Qe)}if(!g.length)return;let[Te,Pe]=J instanceof r.aS||de?[{},g]:_.stencilConfigForOverlap(g),Ve=Pe[Pe.length-1].overscaledZ;B&&K.defines.push("PROJECTION_GLOBE_VIEW"),R&&K.defines.push("RENDER_CUTOFF");let et=(Qe,it,Ze)=>{for(let Ye of Qe){let Je=Ye.toUnwrapped(),Bt=l.getTile(Ye);if(de&&(!Bt||!Bt.hasData()))continue;H.activeTexture.set(G.TEXTURE0);let St=nT(Bt,J,p,K);if(!St||!St.texture)continue;let{texture:Jt,mix:Ft,offset:Yt,tileSize:ji,buffer:Nt}=St,gt,ii;de?(gt=gn.disabled,ii=Ye.projMatrix):R?(gt=new gn(G.LEQUAL,gn.ReadWrite,_.depthRangeFor3D),ii=A?Float32Array.from(_.transform.expandedFarZProjMatrix):_.transform.calculateProjMatrix(Je,Ce)):(gt=_.depthModeForSublayer(Ye.overscaledZ-Ve,p.paint.get("raster-opacity")===1?gn.ReadWrite:gn.ReadOnly,G.LESS),ii=_.transform.calculateProjMatrix(Je,Ce));let Ut=_.terrain&&de?_.terrain.stencilModeForRTTOverlap(Ye):Te[Ye.overscaledZ],Si=x?0:p.paint.get("raster-fade-duration");Bt.registerFadeDuration(Si);let Hi=l.findLoadedParent(Ye,0),un=Hy(Bt,Hi,l,_.transform,Si),Fi,Mi;!un.isFading&&Bt.refreshedUponExpiration&&(Bt.refreshedUponExpiration=!1),_.terrain&&_.terrain.prepareDrawTile(),H.activeTexture.set(G.TEXTURE0),Jt.bind(he,G.CLAMP_TO_EDGE),H.activeTexture.set(G.TEXTURE1),Hi?(Hi.texture&&Hi.texture.bind(he,G.CLAMP_TO_EDGE),Fi=Math.pow(2,Hi.tileID.overscaledZ-Bt.tileID.overscaledZ),Mi=[Bt.tileID.canonical.x*Fi%1,Bt.tileID.canonical.y*Fi%1]):Jt.bind(he,G.CLAMP_TO_EDGE),"useMipmap"in Jt&&H.extTextureFilterAnisotropic&&_.transform.pitch>20&&G.texParameterf(G.TEXTURE_2D,H.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,H.extTextureFilterAnisotropicMax);let $n=_.transform,Ln,Gn=R?BM($n):[0,0,0,0],Rn,Ro,Jo,or,ks,Bo=0;if(B&&J instanceof r.aS&&J.coordinates.length>3)Rn=Float32Array.from(r.bk(r.dF(new r.cC(0,0,0)))),Ro=Float32Array.from($n.globeMatrix),Jo=Float32Array.from(r.dB($n)),or=[r.aF($n.center.lng),r.aJ($n.center.lat)],Ln=J.elevatedGlobePerspectiveTransform,ks=J.elevatedGlobeGridMatrix||new Float32Array(9);else if(B){let er=r.dC(Ye.canonical);Bo=r.dD(er.getCenter().lat),Rn=Float32Array.from(r.bk(r.dF(Ye.canonical))),Ro=Float32Array.from($n.globeMatrix),Jo=Float32Array.from(r.dB($n)),or=[r.aF($n.center.lng),r.aJ($n.center.lat)],Ln=[0,0],ks=Float32Array.from(r.dE(Ye.canonical,er,Bo,$n.worldSize/$n._pixelsPerMercatorPixel))}else Ln=J instanceof r.aS?J.perspectiveTransform:[0,0],Rn=new Float32Array(16),Ro=new Float32Array(9),Jo=new Float32Array(16),or=[0,0],ks=new Float32Array(9);let ts=bm(ii,Rn,Ro,Jo,ks,Mi||[0,0],r.aj(_.transform.zoom),or,Gn,Fi||1,un,p,Ln,R?p.paint.get("raster-elevation"):0,2,Ft,Yt,K.range,ji,Nt,oe),Is=_.isTileAffectedByFog(Ye),ka=_.getOrCreateProgram("raster",{defines:K.defines,overrideFog:Is});if(_.uploadCommonUniforms(H,ka,Je),J instanceof r.aS){let er=J.elevatedGlobeVertexBuffer,ds=J.elevatedGlobeIndexBuffer;if(de||!A)J.boundsBuffer&&J.boundsSegments&&ka.draw(_,G.TRIANGLES,gt,xo.disabled,le,Do.disabled,ts,p.id,J.boundsBuffer,_.quadTriangleIndexBuffer,J.boundsSegments);else if(er&&ds){let Zr=$n.zoom<=r.cZ?J.elevatedGlobeSegments:J.getSegmentsForLongitude($n.center.lng);Zr&&ka.draw(_,G.TRIANGLES,gt,xo.disabled,le,it,ts,p.id,er,ds,Zr)}}else if(B){gt=new gn(G.LEQUAL,gn.ReadOnly,_.depthRangeFor3D);let er=_.globeSharedBuffers;if(er){let[ds,Zr,us]=er.getGridBuffers(Bo,!1);ka.draw(_,G.TRIANGLES,gt,Ze||Ut,_.colorModeForRenderPass(),it,ts,p.id,ds,Zr,us)}}else{let{tileBoundsBuffer:er,tileBoundsIndexBuffer:ds,tileBoundsSegments:Zr}=_.getTileBoundsBuffers(Bt);ka.draw(_,G.TRIANGLES,gt,Ut,le,Do.disabled,ts,p.id,er,ds,Zr)}}if(!(J instanceof r.aS)&&B)for(let Ye of Qe){let Je=Ye.canonical.y===(1<>>16,2654435769),((Ye=Math.imul(Ye^Ye>>>16,2654435769))>>>0)/4294967296},Ze=1/1.1;for(let Ye=0;Yer.e6[Ut](Jt));Nt.push(Jt);let gt=Jt.canonical.x,ii=Jt.canonical.y;for(let Ut of Nt){let Si=Ve.getTile(Je?Ut.wrapped():Ut);if(!Si)continue;let Hi=Si.rasterParticleState;if(!Hi)continue;let un=Ut.canonical.x+(1<Qe.tileID)),oe&&(H.activeTexture.set(G.TEXTURE0),_.imageManager.bind(_.context,p.scope)),B){let Qe=_.getOrCreateProgram(Pe,{overrideFog:!1,overrideRtt:!0}),it=new Float32Array(r.bA([])),Ze=new r.aO(0,0,0,0,0),Ye=oe?p1(it,R,A,_,0,p.scope,le,B,{tileID:Ze,tileSize:K}):If(it,R,A,C.toPremultipliedRenderColor(x?null:p.lut));Qe.draw(_,G.TRIANGLES,he,Ce,Te,Do.disabled,Ye,p.id,_.viewportBuffer,_.quadTriangleIndexBuffer,_.viewportSegments)}else for(let Qe of et){let it=_.isTileAffectedByFog(Qe),Ze=_.getOrCreateProgram(Pe,{overrideFog:it}),Ye=Qe.toUnwrapped(),Je=g?Qe.projMatrix:_.transform.calculateProjMatrix(Ye);_.prepareDrawTile();let Bt=l?l.getTile(Qe):Ve?Ve[Qe.key]:new C_(Qe,K,J.zoom,_),St=oe?p1(Je,R,A,_,0,p.scope,le,B,{tileID:Qe,tileSize:K}):If(Je,R,A,C.toPremultipliedRenderColor(x?null:p.lut));_.uploadCommonUniforms(H,Ze,Ye);let{tileBoundsBuffer:Jt,tileBoundsIndexBuffer:Ft,tileBoundsSegments:Yt}=_.getTileBoundsBuffers(Bt);Ze.draw(_,G.TRIANGLES,he,Ce,Te,Do.disabled,St,p.id,Jt,Ft,Yt)}},sky:function(_,l,p){let g=_._atmosphere?r.aj(_.transform.zoom):1,C=p.paint.get("sky-opacity")*g;if(C===0)return;let x=_.context,A=p.paint.get("sky-type"),R=new gn(x.gl.LEQUAL,gn.ReadOnly,[0,1]),B=_.frameCounter/1e3%1;A==="atmosphere"?_.renderPass==="offscreen"?p.needsSkyboxCapture(_)&&((function(H,G,J,K){let oe=H.context,le=oe.gl,de=G.skyboxFbo;if(!de){de=G.skyboxFbo=oe.createFramebuffer(32,32,!0,null),G.skyboxGeometry=new Zs(oe),G.skyboxTexture=oe.gl.createTexture(),le.bindTexture(le.TEXTURE_CUBE_MAP,G.skyboxTexture),le.texParameteri(le.TEXTURE_CUBE_MAP,le.TEXTURE_WRAP_S,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_CUBE_MAP,le.TEXTURE_WRAP_T,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_CUBE_MAP,le.TEXTURE_MIN_FILTER,le.LINEAR),le.texParameteri(le.TEXTURE_CUBE_MAP,le.TEXTURE_MAG_FILTER,le.LINEAR);for(let Pe=0;Pe<6;++Pe)le.texImage2D(le.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,le.RGBA,32,32,0,le.RGBA,le.UNSIGNED_BYTE,null)}oe.bindFramebuffer.set(de.framebuffer),oe.viewport.set([0,0,32,32]);let Ce=G.getCenter(H,!0),he=H.getOrCreateProgram("skyboxCapture"),Te=new Float64Array(16);r.bA(Te),r.ek(Te,Te,.5*-Math.PI),Wy(H,G,he,Te,Ce,0),r.bA(Te),r.ek(Te,Te,.5*Math.PI),Wy(H,G,he,Te,Ce,1),r.bA(Te),r.cT(Te,Te,.5*-Math.PI),Wy(H,G,he,Te,Ce,2),r.bA(Te),r.cT(Te,Te,.5*Math.PI),Wy(H,G,he,Te,Ce,3),r.bA(Te),Wy(H,G,he,Te,Ce,4),r.bA(Te),r.ek(Te,Te,Math.PI),Wy(H,G,he,Te,Ce,5),oe.viewport.set([0,0,H.width,H.height])})(_,p),p.markSkyboxValid(_)):_.renderPass==="sky"&&(function(H,G,J,K,oe){let le=H.context,de=le.gl,Ce=H.transform,he=H.getOrCreateProgram("skybox");le.activeTexture.set(de.TEXTURE0),de.bindTexture(de.TEXTURE_CUBE_MAP,G.skyboxTexture);let Te=((Pe,Ve,et,Qe,it)=>({u_matrix:Pe,u_sun_direction:Ve,u_cubemap:0,u_opacity:Qe,u_temporal_offset:it}))(Ce.skyboxMatrix,G.getCenter(H,!1),0,K,oe);H.uploadCommonUniforms(le,he),he.draw(H,de.TRIANGLES,J,xo.disabled,H.colorModeForRenderPass(),Do.backCW,Te,"skybox",G.skyboxGeometry.vertexBuffer,G.skyboxGeometry.indexBuffer,G.skyboxGeometry.segment)})(_,p,R,C,B):A==="gradient"&&_.renderPass==="sky"&&(function(H,G,J,K,oe){let le=H.context,de=le.gl,Ce=H.transform,he=H.getOrCreateProgram("skyboxGradient");G.skyboxGeometry||(G.skyboxGeometry=new Zs(le)),le.activeTexture.set(de.TEXTURE0);let Te=G.colorRampTexture;Te||(Te=G.colorRampTexture=new r.T(le,G.colorRamp,de.RGBA8)),Te.bind(de.LINEAR,de.CLAMP_TO_EDGE);let Pe=((Ve,et,Qe,it,Ze)=>({u_matrix:Ve,u_color_ramp:0,u_center_direction:et,u_radius:r.an(Qe),u_opacity:it,u_temporal_offset:Ze}))(Ce.skyboxMatrix,G.getCenter(H,!1),G.paint.get("sky-gradient-radius"),K,oe);H.uploadCommonUniforms(le,he),he.draw(H,de.TRIANGLES,J,xo.disabled,H.colorModeForRenderPass(),Do.backCW,Pe,"skyboxGradient",G.skyboxGeometry.vertexBuffer,G.skyboxGeometry.indexBuffer,G.skyboxGeometry.segment)})(_,p,R,C,B)},custom:function(_,l,p,g){let C=_.context,x=p.implementation;if(!_.transform.projection.unsupportedLayers||!_.transform.projection.unsupportedLayers.includes("custom")||_.terrain&&(_.terrain.renderingToTexture||_.renderPass==="offscreen")&&p.isDraped(l)){if(_.renderPass==="offscreen"){let A=x.prerender;if(A){if(_.setCustomLayerDefaults(),C.setColorMode(_.colorModeForRenderPass()),_.transform.projection.name==="globe"){let R=_.transform.pointMerc;A.call(x,C.gl,_.transform.customLayerMatrix(),_.transform.getProjection(),_.transform.globeToMercatorMatrix(),r.aj(_.transform.zoom),[R.x,R.y],_.transform.pixelsPerMeterRatio)}else A.call(x,C.gl,_.transform.customLayerMatrix());C.setDirty(),_.setBaseState()}}else if(_.renderPass==="translucent"){if(_.terrain&&_.terrain.renderingToTexture){let R=x.renderToTile;if(R){let B=g[0].canonical,H={x:B.x+g[0].wrap*(x.wrapTileId?0:1<{A&&(A.useNormalOffset=!0,R||(A.enabled=!0))},H=l.getSource();if(_.renderPass==="light-beam"&&H.type!=="batched-model")return;if(H.type==="vector"||H.type==="geojson")return(function(he,Te,Pe,Ve,et){let Qe=he.transform;if(Qe.projection.name!=="mercator")return void r.w(`Drawing 3D models for ${Qe.projection.name} projection is not yet implemented`);let it=Qe.getFreeCameraOptions().position;if(!he.modelManager)return;let Ze=he.modelManager;Pe.modelManager=Ze;let Ye=he.shadowRenderer;if(!Pe._unevaluatedLayout._values.hasOwnProperty("model-id"))return;let Je=Pe._unevaluatedLayout._values["model-id"],Bt=Object.assign({},Pe.layout.get("model-id").parameters),St=he.style.order.indexOf(Pe.fqid);for(let Jt of Ve){let Ft=Te.getTile(Jt).getBucket(Pe);if(!Ft||Ft.projection.name!==Qe.projection.name)continue;let Yt=Ft.getModelUris();Yt&&!Ft.modelsRequested&&(Ze.addModelsFromBucket(Yt,et),Ft.modelsRequested=!0);let ji=V0(Jt,Qe);Bt.zoom=ji;let Nt=Je.possiblyEvaluate(Bt);if(th(he,Ft,Jt),su.shadowUniformsInitialized=!1,su.useSingleShadowCascade=!!Ye&&Ye.getMaxCascadeForTile(Jt.toUnwrapped())===0,he.renderPass==="shadow"&&Ye){if(he.currentShadowCascade===1&&Ft.isInsideFirstShadowMapFrustum)continue;let Ut=Qe.calculatePosMatrix(Jt.toUnwrapped(),Qe.worldSize);if(su.tileMatrix.set(Ut),su.shadowTileMatrix=Float32Array.from(Ye.calculateShadowPassMatrixFromMatrix(Ut)),su.aabb.min=[0,0,0],su.aabb.max[0]=su.aabb.max[1]=r.al,su.aabb.max[2]=0,PD(Ft,su,he,Pe.scope))continue}let gt=1<0&&he.style.isLayerClipped(Pe,Te.getSource())&&Ft.updateReplacement(Jt,he.replacementSource,St,et)&&(Ft.uploaded=!1,Ft.upload(he.context));for(let Ut in Ft.instancesPerModel){let Si=Ft.instancesPerModel[Ut];Si.features.length>0&&(Ut=Nt.evaluate(Si.features[0].feature,{}));let Hi=Ze.getModel(Ut,et);if(Hi||Ze.hasURLBeenRequested(Ut)||Ft.modelUris.includes(Ut)||(Ft.modelUris.push(Ut),Ft.modelsRequested=!1),Hi&&Hi.uploaded)for(let un of Hi.nodes)FD(he,Pe,un,Si,ii,Jt,su)}}})(_,l,p,g,H.type==="vector"?p.scope:""),void B();if(!H.loaded())return;if(H.type==="batched-model")return(function(he,Te,Pe,Ve){Pe.resetLayerRenderingStats(he);let et=he.context,Qe=he.transform,it=he.style.fog,Ze=he.shadowRenderer;if(Qe.projection.name!=="mercator")return void r.w(`Drawing 3D landmark models for ${Qe.projection.name} projection is not yet implemented`);let Ye=he.transform.getFreeCameraOptions().position,Je=r.c4([],[Ye.x,Ye.y,Ye.z],he.transform.worldSize),Bt=r.et([],Je),St=r.bA([]),Jt=r.ec(Qe.center.lat,Qe.zoom),Ft=r.bq([],[1,1,1/Jt]);r.br(St,St,Bt);let Yt=Pe.paint.get("model-opacity").constantOr(1),ji=new gn(et.gl.LEQUAL,gn.ReadWrite,he.depthRangeFor3D),Nt=new gn(et.gl.LEQUAL,gn.ReadOnly,he.depthRangeFor3D),gt=new r.d8([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),ii=he.renderPass==="shadow",Ut=ii&&Ze?Ze.getCurrentCascadeFrustum():Qe.getFrustum(Qe.scaleZoom(Qe.worldSize)),Si=Pe.paint.get("model-front-cutoff"),Hi=Si[2]<1,un=k0(he,Pe.paint.get("model-cutoff-fade-range")),Fi=Pe.getLayerRenderingStats();(function(Mi,$n,Ln,Gn){let Rn=Mi.terrain?Mi.terrain.exaggeration():0,Ro=Mi.transform.zoom;for(let Jo of Gn){let or=$n.getTile(Jo).getBucket(Ln);or&&(or.setFilter(Ln.filter),Mi.conflationActive&&or.updateReplacement(Jo,Mi.replacementSource),or.evaluateTransform(Mi,Ln),Mi.terrain&&Rn>0&&or.elevationUpdate(Mi.terrain,Rn,Jo,Ln.source),or.needsReEvaluation(Mi,Ro,Ln)&&or.evaluate(Ln))}})(he,Te,Pe,Ve),(function(){let Mi,$n,Ln;Hi?(Mi=Ve.length-1,$n=-1,Ln=-1):(Mi=0,$n=Ve.length,Ln=1);let Gn=new Float64Array(16),Rn=r.cz(),Ro=new r.P(0,0);for(let Jo=Mi;Jo!==$n;Jo+=Ln){let or=Ve[Jo],ks=Te.getTile(or).getBucket(Pe);if(!ks||!ks.uploaded)continue;let Bo=!1;Ze&&(Bo=Ze.getMaxCascadeForTile(or.toUnwrapped())===0);let ts=Qe.calculatePosMatrix(or.toUnwrapped(),Qe.worldSize),Is=ks.modelTraits;!ii&&Hi&&(r.bl(Gn,ts),r.af(Rn,Je,Gn),Ro.x=Rn[0],Ro.y=Rn[1]);let ka=[];ks.setFilter(Pe.filter);for(let er of ks.getNodesInfo()){if(er.hiddenByReplacement||!er.node.meshes)continue;let ds=er.node,Zr=0;he.terrain&&ds.elevation&&(Zr=ds.elevation*he.terrain.exaggeration());let us=(()=>{let Vc=er.aabb;return gt.min=[...Vc.min],gt.max=[...Vc.max],gt.min[2]+=Zr,gt.max[2]+=Zr,r.af(gt.min,gt.min,ts),r.af(gt.max,gt.max,ts),gt})(),Na=er.evaluatedScale;if(Na[0]<=1&&Na[1]<=1&&Na[2]<=1&&us.intersects(Ut)===0)continue;if(!ii&&Hi){let Vc=.16666666666666666;er.cameraCollisionOpacity=Je[0]>us.min[0]&&Je[0]us.min[1]&&Je[1]!Hi||er.opacity===1&&ds.opacity===1?er.depthds.depth?-1:1);for(let er of ka){let ds=er.nodeInfo,Zr=ds.node,us=r.aB([],Ft,er.tileModelMatrix);r.aB(us,St,us);let Na=r.bl([],us);r.ed(Na,Na),r.cR(Na,Na,lT),us=r.aB(us,us,Zr.matrix);let Nl=he.renderPass==="light-beam",Zc=Pe.paint.get("model-color-use-theme").constantOr("default")==="none",Ba=Is&r.ez.HasMapboxMeshFeatures,rr=Ba?0:ds.evaluatedRMEA[0][2];for(let wo=0;wo=qn||Dc>=qn}}let Uh=Ms.material,oh;Uh.occlusionTexture&&Uh.occlusionTexture.offsetScale&&(oh=Uh.occlusionTexture.offsetScale,lc.defines.push("OCCLUSION_TEXTURE_TRANSFORM"));let rh=he.getOrCreateProgram("model",lc);!ii&&Ze&&Ze.setupShadowsFromMatrix(er.tileModelMatrix,rh,Ze.useNormalOffset),he.uploadCommonUniforms(et,rh,null,zh);let Xu=Uh.pbrMetallicRoughness;Xu.metallicFactor=.9,Xu.roughnessFactor=.5;let Im=qy(new Float32Array(Va),new Float32Array(us),new Float32Array(Na),new Float32Array(Zr.matrix),he,er.opacity,Xu.baseColorFactor,Uh.emissiveFactor,Xu.metallicFactor,Xu.roughnessFactor,Uh,rr,Pe,[0,0,0],oh);!_l&&(ds.hasTranslucentParts||er.opacity<1)&&rh.draw(he,et.gl.TRIANGLES,ji,xo.disabled,Qo.disabled,Do.backCCW,Im,Pe.id,Ms.vertexBuffer,Ms.indexBuffer,Ms.segments,Pe.paint,he.transform.zoom,void 0,Vc),rh.draw(he,et.gl.TRIANGLES,_l?Nt:ji,xo.disabled,_l||er.opacity<1||ds.hasTranslucentParts?Qo.alphaBlended:Qo.unblended,Do.backCCW,Im,Pe.id,Ms.vertexBuffer,Ms.indexBuffer,Ms.segments,Pe.paint,he.transform.zoom,void 0,Vc)}}}})()})(_,l,p,g),void B();if(H.type!=="model")return;let G=H.getModels(),J=[],K=_.transform.getFreeCameraOptions().position,oe=r.c4([],[K.x,K.y,K.z],_.transform.worldSize);r.et(oe,oe);let le=[],de=[],Ce=0;for(let he of G){let Te=p.paint.get("model-rotation").constantOr(null),Pe=p.paint.get("model-scale").constantOr(null),Ve=p.paint.get("model-translation").constantOr(null);he.computeModelMatrix(_,Te,Pe,Ve,!0,!0,!1);let et=r.bA([]),Qe=r.ec(he.position.lat,_.transform.zoom),it=r.bq([],[1,1,1/Qe]);r.br(et,et,oe),J.push({zScaleMatrix:it,negCameraPosMatrix:et});for(let Ze of he.nodes)_1(_.transform,Ze,he.matrix,_.transform.expandedFarZProjMatrix,Ce,le,de);Ce++}if(le.sort((he,Te)=>Te.depth-he.depth),_.renderPass!=="shadow"){if(C===1)for(let he of de)M_(he,_,p,J[he.modelIndex],xo.disabled,_.colorModeForRenderPass());else{for(let he of de)M_(he,_,p,J[he.modelIndex],xo.disabled,Qo.disabled);for(let he of de)M_(he,_,p,J[he.modelIndex],_.stencilModeFor3D(),_.colorModeForRenderPass());_.resetStencilClippingMasks()}for(let he of le)M_(he,_,p,J[he.modelIndex],xo.disabled,_.colorModeForRenderPass());B()}else{for(let he of de)Qb(he.mesh,he.nodeModelMatrix,_,p);for(let he of le)Qb(he.mesh,he.nodeModelMatrix,_,p);B()}}},Zu={line:function(_,l,p){if(_.hasElevatedBuckets=!1,_.hasNonElevatedBuckets=!1,_._unevaluatedLayout.getValue("line-elevation-reference")!==void 0||_._unevaluatedLayout.getValue("line-z-offset")!==void 0){if(l){let g=l.getVisibleCoordinates();for(let C of g){let x=l.getTile(C).getBucket(_);if(x&&(x.elevationType!=="none"?_.hasElevatedBuckets=!0:_.hasNonElevatedBuckets=!0,_.hasElevatedBuckets&&_.hasNonElevatedBuckets))break}}}else _.hasNonElevatedBuckets=!0},model:function(_,l,p){let g=l.getSource();if(!g.loaded())return;if(g.type==="vector"||g.type==="geojson")return void(p.modelManager&&p.modelManager.upload(p,g.type==="vector"?_.scope:""));if(g.type==="batched-model"||g.type!=="model")return;let C=g.getModels();for(let x of C)x.upload(p.context)},raster:function(_,l,p){let g=l.getSource();if(!(g instanceof _g&&g.loaded()))return;let C=_.sourceLayer||g.rasterLayerIds&&g.rasterLayerIds[0];if(!C)return;let x=_.paint.get("raster-array-band")||g.getInitialBand(C);if(x==null)return;let A=l.getIds().map(R=>l.getTileByID(R));for(let R of A)R.updateNeeded(_.id,x)&&g.prepareTile(R,C,_.id,x)},"raster-particle":function(_,l,p){let g=l.getSource();if(!(g instanceof _g&&g.loaded()))return;let C=_.sourceLayer||g.rasterLayerIds&&g.rasterLayerIds[0];if(!C)return;let x=_.paint.get("raster-particle-array-band")||g.getInitialBand(C);if(x==null)return;let A=l.getIds().map(R=>l.getTileByID(R));for(let R of A)R.updateNeeded(_.id,x)&&g.prepareTile(R,C,_.id,x)}},Xy={fill:Ky},z0={fill:function(_,l,p,g){if(!p.layout||p.layout.get("fill-elevation-reference")==="none")return;let C=_.context.gl,x=new gn(C.LEQUAL,gn.ReadOnly,_.depthRangeFor3D),A=new xo({func:C.ALWAYS,mask:255},255,255,C.KEEP,C.KEEP,C.REPLACE),R=_.transform.getFreeCameraOptions().position,B=_.getOrCreateProgram("elevatedStructuresDepthReconstruct");for(let H of g){let G=l.getTile(H),J=G.getBucket(p);if(!J)continue;let K=J.elevatedStructures;if(!K||K.depthSegments.segments[0].primitiveLength===0)continue;let oe=JS(H.toUnwrapped(),R),le=_.translatePosMatrix(H.projMatrix,G,p.paint.get("fill-translate"),p.paint.get("fill-translate-anchor")),de=c1(le,oe,0,1,0);B.draw(_,C.TRIANGLES,x,A,Qo.disabled,Do.disabled,de,p.id,K.vertexBuffer,K.indexBuffer,K.depthSegments,p.paint,_.transform.zoom)}}};class Xb{constructor(l,p,g,C,x,A){this.context=new h1(l,p),this.transform=g,this._tileTextures={},this.frameCopies=[],this.loadTimeStamps=[],this.tp=x,this._timeStamp=r.o.now(),this._averageFPS=0,this._fpsHistory=[],this._dt=0,this._debugParams={forceEnablePrecipitation:!1,showTerrainProxyTiles:!1,fpsWindow:30,continousRedraw:!1,enabledLayers:{}};let R=["fill","line","symbol","circle","heatmap","fill-extrusion","building","raster","raster-particle","hillshade","model","background","sky"];for(let H of R)this._debugParams.enabledLayers[H]=!0;x.registerParameter(this._debugParams,["Terrain"],"showTerrainProxyTiles",{},()=>{this.style.map.triggerRepaint()}),x.registerParameter(this._debugParams,["Precipitation"],"forceEnablePrecipitation"),x.registerParameter(this._debugParams,["FPS"],"fpsWindow",{min:1,max:100,step:1}),x.registerBinding(this._debugParams,["FPS"],"continousRedraw",{readonly:!0,label:"continuous redraw"}),x.registerBinding(this,["FPS"],"_averageFPS",{readonly:!0,label:"value"}),x.registerBinding(this,["FPS"],"_averageFPS",{readonly:!0,label:"graph",view:"graph",min:0,max:200});for(let H of R)x.registerParameter(this._debugParams.enabledLayers,["Debug","Layers"],H);this.occlusionParams=new Mf(x),this.setup(),this.numSublayers=kh.maxUnderzooming+kh.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.deferredRenderGpuTimeQueries=[],this.gpuTimers={},this.frameCounter=0,this._backgroundTiles={},this.conflationActive=!1,this.replacementSource=new r.eG,this.longestCutoffRange=0,this.minCutoffZoom=0,this._fogVisible=!1,this._cachedTileFogOpacities={},this._shadowRenderer=new bf(this),this._wireframeDebugCache=new uT,this.renderDefaultNorthPole=!0,this.renderDefaultSouthPole=!0,this.layersWithOcclusionOpacity=[];let B=new r.q({width:1,height:1},Uint8Array.of(0,0,0,0));this.emptyDepthTexture=new r.T(this.context,B,l.RGBA8),this._clippingActiveLastFrame=!1,this.scaleFactor=C,this.worldview=A}updateTerrain(l,p){let g=!!l&&!!l.terrain&&this.transform.projection.supportsTerrain;if(!(g||this._terrain&&this._terrain.enabled))return;this._terrain||(this._terrain=new s1(this,l));let C=this._terrain;this.transform.elevation=g?C:null,C.update(l,this.transform,p),this.transform.elevation&&!C.enabled&&(this.transform.elevation=null)}_updateFog(l){let p=l.fog;if(!p||this.transform.projection.name==="globe"||p.getOpacity(this.transform.pitch)<1||p.properties.get("horizon-blend")<.03)return void(this.transform.fogCullDistSq=null);let[g,C]=p.getFovAdjustedRange(this.transform._fov);if(g>C)return void(this.transform.fogCullDistSq=null);let x=g+.78*(C-g);this.transform.fogCullDistSq=x*x}get terrain(){return this.transform._terrainEnabled()&&this._terrain&&this._terrain.enabled||this._forceTerrainMode?this._terrain:null}get forceTerrainMode(){return this._forceTerrainMode}set forceTerrainMode(l){l&&!this._terrain&&(this._terrain=new s1(this,this.style)),this._forceTerrainMode=l}get shadowRenderer(){return this._shadowRenderer&&this._shadowRenderer.enabled?this._shadowRenderer:null}get wireframeDebugCache(){return this._wireframeDebugCache}resize(l,p){if(this.width=l*r.o.devicePixelRatio,this.height=p*r.o.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let g of this.style.order)this.style._mergedLayers[g].resize()}setup(){let l=this.context,p=new r.bd;p.emplaceBack(0,0),p.emplaceBack(r.al,0),p.emplaceBack(0,r.al),p.emplaceBack(r.al,r.al),this.tileExtentBuffer=l.createVertexBuffer(p,r.bf.members),this.tileExtentSegments=r.bg.simpleSegment(0,0,4,2);let g=new r.bd;g.emplaceBack(0,0),g.emplaceBack(r.al,0),g.emplaceBack(0,r.al),g.emplaceBack(r.al,r.al),this.debugBuffer=l.createVertexBuffer(g,r.bf.members),this.debugSegments=r.bg.simpleSegment(0,0,4,5);let C=new r.bd;C.emplaceBack(-1,-1),C.emplaceBack(1,-1),C.emplaceBack(-1,1),C.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(C,r.bf.members),this.viewportSegments=r.bg.simpleSegment(0,0,4,2);let x=new r.b0;x.emplaceBack(0,0,0,0),x.emplaceBack(r.al,0,r.al,0),x.emplaceBack(0,r.al,0,r.al),x.emplaceBack(r.al,r.al,r.al,r.al),this.mercatorBoundsBuffer=l.createVertexBuffer(x,r.bi.members),this.mercatorBoundsSegments=r.bg.simpleSegment(0,0,4,2);let A=new r.b1;A.emplaceBack(0,1,2),A.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=l.createIndexBuffer(A);let R=new r.be;for(let H of[0,1,3,2,0])R.emplaceBack(H);this.debugIndexBuffer=l.createIndexBuffer(R),this.emptyTexture=new r.T(l,new r.q({width:1,height:1},Uint8Array.of(0,0,0,0)),l.gl.RGBA8),this.identityMat=r.bC();let B=this.context.gl;this.stencilClearMode=new xo({func:B.ALWAYS,mask:0},0,255,B.ZERO,B.ZERO,B.ZERO),this.loadTimeStamps.push(performance.now())}getMercatorTileBoundsBuffers(){return{tileBoundsBuffer:this.mercatorBoundsBuffer,tileBoundsIndexBuffer:this.quadTriangleIndexBuffer,tileBoundsSegments:this.mercatorBoundsSegments}}getTileBoundsBuffers(l){return l._makeTileBoundsBuffers(this.context,this.transform.projection),l._tileBoundsBuffer?{tileBoundsBuffer:l._tileBoundsBuffer,tileBoundsIndexBuffer:l._tileBoundsIndexBuffer,tileBoundsSegments:l._tileBoundsSegments}:this.getMercatorTileBoundsBuffers()}clearStencil(){let l=this.context.gl;this.nextStencilID=1,this.currentStencilSource=void 0,this._tileClippingMaskIDs={},this.getOrCreateProgram("clippingMask").draw(this,l.TRIANGLES,gn.disabled,this.stencilClearMode,Qo.disabled,Do.disabled,Sp(this.identityMat),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}resetStencilClippingMasks(){this.terrain||(this.currentStencilSource=void 0,this._tileClippingMaskIDs={})}_renderTileClippingMasks(l,p,g){if(!p||this.currentStencilSource===p.id||!l.isTileClipped()||!g||g.length===0)return;if(this._tileClippingMaskIDs&&!this.terrain){let R=!1;for(let B of g)if(this._tileClippingMaskIDs[B.key]===void 0){R=!0;break}if(!R)return}this.currentStencilSource=p.id;let C=this.context,x=C.gl;this.nextStencilID+g.length>256&&this.clearStencil(),C.setColorMode(Qo.disabled),C.setDepthMode(gn.disabled);let A=this.getOrCreateProgram("clippingMask");this._tileClippingMaskIDs={};for(let R of g){let B=p.getTile(R),H=this._tileClippingMaskIDs[R.key]=this.nextStencilID++,{tileBoundsBuffer:G,tileBoundsIndexBuffer:J,tileBoundsSegments:K}=this.getTileBoundsBuffers(B);A.draw(this,x.TRIANGLES,gn.disabled,new xo({func:x.ALWAYS,mask:0},H,255,x.KEEP,x.KEEP,x.REPLACE),Qo.disabled,Do.disabled,Sp(R.projMatrix),"$clipping",G,J,K)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let l=this.nextStencilID++,p=this.context.gl;return new xo({func:p.NOTEQUAL,mask:255},l,255,p.KEEP,p.KEEP,p.REPLACE)}stencilModeForClipping(l){if(this.terrain)return this.terrain.stencilModeForRTTOverlap(l);let p=this.context.gl;return new xo({func:p.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,p.KEEP,p.KEEP,p.REPLACE)}stencilConfigForOverlap(l){let p=this.context.gl,g=l.sort((A,R)=>R.overscaledZ-A.overscaledZ),C=g[g.length-1].overscaledZ,x=g[0].overscaledZ-C+1;if(x>1){this.currentStencilSource=void 0,this.nextStencilID+x>256&&this.clearStencil();let A={};for(let R=0;Rthis._debugParams.fpsWindow&&this._fpsHistory.splice(0,this._fpsHistory.length-this._debugParams.fpsWindow),this._averageFPS=Math.round(this._fpsHistory.reduce((l,p)=>l+p/this._fpsHistory.length,0))}render(l,p){let g=r.o.now();this._dt=g-this._timeStamp,this._timeStamp=g,this._wireframeDebugCache.update(this.frameCounter),this._debugParams.continousRedraw=l.map.repaint,this.style=l,this.options=p;let C=this.style._mergedLayers,x=!(!this.terrain||!this.terrain.enabled),A=()=>this.style._getOrder(x).filter(Nt=>{let gt=C[Nt];return!(gt.type in this._debugParams.enabledLayers)||this._debugParams.enabledLayers[gt.type]}),R=A(),B=!1,H=!1,G=null;for(let Nt of R){let gt=C[Nt];gt.type==="circle"?B=!0:gt.type==="building"?G=gt:gt.type==="symbol"&&(gt.hasOcclusionOpacityProperties?H=!0:B=!0)}let J=R.map(Nt=>C[Nt]),K=this.style._mergedSourceCaches;this.imageManager=l.imageManager,this.modelManager=l.modelManager,this.symbolFadeChange=l.placement.symbolFadeChange(r.o.now()),this.imageManager.beginFrame();let oe=0,le=!1;for(let Nt in K){let gt=K[Nt];gt.used&&(gt.prepare(this.context),gt.getSource().usedInConflation&&++oe)}let de=!1;for(let Nt of J)Nt.isHidden(this.transform.zoom)||(Nt.type==="clip"&&(de=!0),this.prepareLayer(Nt));let Ce={},he={},Te={},Pe={},Ve={};for(let Nt in K){let gt=K[Nt];Ce[Nt]=gt.getVisibleCoordinates(),he[Nt]=Ce[Nt].slice().reverse(),Te[Nt]=gt.getVisibleCoordinates(!0).reverse(),Pe[Nt]=gt.getShadowCasterCoordinates(),Ve[Nt]=gt.sortCoordinatesByDistance(Ce[Nt])}let et=Nt=>{let gt=this.style.getLayerSourceCache(Nt);return gt&>.used?gt.getSource():null};if(oe||de||this._clippingActiveLastFrame){let Nt=[],gt=[],ii=0;for(let Ut of J)this.isSourceForClippingOrConflation(Ut,et(Ut))&&(Nt.push(Ut),gt.push(ii)),ii++;if(Nt&&(de||Nt.length>1)||this._clippingActiveLastFrame){de=!1;let Ut=[];for(let Si=0;Si0){let Ut=et(gt);Ut&&(this.minCutoffZoom=Math.max(Ut.minzoom,this.minCutoffZoom)),gt.minzoom&&(this.minCutoffZoom=Math.max(gt.minzoom,this.minCutoffZoom))}gt.is3D(x)&&(this.opaquePassCutoff===1/0&&(this.opaquePassCutoff=Nt),this._lastOcclusionLayer=Nt)}let Qe=this.style&&this.style.fog;Qe?(this._fogVisible=Qe.getOpacity(this.transform.pitch)!==0,this._fogVisible&&this.transform.projection.name!=="globe"&&(this._fogVisible=Qe.isVisibleOnFrustum(this.transform.cameraFrustum))):this._fogVisible=!1,this._cachedTileFogOpacities={},this.terrain&&(this.terrain.updateTileBinding(Te),this.opaquePassCutoff=0,R=A(),J=R.map(Nt=>C[Nt]));let it=this._shadowRenderer;if(it){it.updateShadowParameters(this.transform,this.style.directionalLight);for(let Nt in K)for(let gt of Ce[Nt]){let ii={min:0,max:0};this.terrain&&(ii=this.terrain.getMinMaxForTile(gt)||ii),it.addShadowReceiver(gt.toUnwrapped(),ii.min,ii.max)}}this.transform.projection.name!=="globe"||this.globeSharedBuffers||(this.globeSharedBuffers=new r.eI(this.context)),this.style.fog&&this.transform.projection.supportsFog?(this._atmosphere||(this._atmosphere=new Yb(this)),this._atmosphere.update(this)):this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=void 0);let Ze=this._debugParams.forceEnablePrecipitation||!(!this.style||!this.style.snow),Ye=this._debugParams.forceEnablePrecipitation||!(!this.style||!this.style.rain);if(Ze&&!this._snow&&(this._snow=new BD(this)),!Ze&&this._snow&&(this._snow.destroy(),delete this._snow),Ye&&!this._rain&&(this._rain=new Aa(this)),!Ye&&this._rain&&(this._rain.destroy(),delete this._rain),this._snow&&this._snow.update(this),this._rain&&this._rain.update(this),G){this.buildingTileBorderManager||(this.buildingTileBorderManager=new qs);let Nt=this.style.getLayerSourceCache(G);this.buildingTileBorderManager.updateBorders(Nt,G)}if(!ro.has(this.context.gl))return;this.renderPass="offscreen";for(let Nt of J){let gt=l.getLayerSourceCache(Nt);if(!Nt.hasOffscreenPass()||Nt.isHidden(this.transform.zoom))continue;let ii=gt?he[gt.id]:void 0;(Nt.type==="custom"||Nt.type==="raster"||Nt.type==="raster-particle"||Nt.isSky()||ii&&ii.length)&&this.renderLayer(this,gt,Nt,ii)}this.depthRangeFor3D=[0,1-(J.length+2)*this.numSublayers*this.depthEpsilon],this._shadowRenderer&&(this.renderPass="shadow",this._shadowRenderer.drawShadowPass(this.style,Pe)),this.context.bindFramebuffer.set(null),this.context.viewport.set([0,0,this.width,this.height]);let Je=this.transform.projection.name==="globe"||this.transform.isHorizonVisible(),Bt=(()=>{if(p.showOverdrawInspector)return r.ao.black;let Nt=this.style.fog;if(Nt&&this.transform.projection.supportsFog){let gt=this.style.getLut(Nt.scope);if(!Je){let ii=Nt.properties.get("color-use-theme")==="none",Ut=Nt.properties.get("color").toNonPremultipliedRenderColor(ii?null:gt).toArray01();return new r.ao(...Ut)}if(Je){let ii=Nt.properties.get("space-color-use-theme")==="none",Ut=Nt.properties.get("space-color").toNonPremultipliedRenderColor(ii?null:gt).toArray01();return new r.ao(...Ut)}}return r.ao.transparent})();if(this.context.clear({color:Bt,depth:1}),this.clearStencil(),this._showOverdrawInspector=p.showOverdrawInspector,this.renderPass="opaque",this.style.fog&&this.transform.projection.supportsFog&&this._atmosphere&&!this._showOverdrawInspector&&Je&&this._atmosphere.drawStars(this,this.style.fog),!this.terrain)for(this.currentLayer=R.length-1;this.currentLayer>=0;this.currentLayer--){let Nt=J[this.currentLayer],gt=l.getLayerSourceCache(Nt);if(Nt.isSky())continue;let ii=gt?(Nt.is3D(x)?Ve:he)[gt.id]:void 0;this._renderTileClippingMasks(Nt,gt,ii),this.renderLayer(this,gt,Nt,ii)}if(this.style.fog&&this.transform.projection.supportsFog&&this._atmosphere&&!this._showOverdrawInspector&&Je&&this._atmosphere.drawAtmosphereGlow(this,this.style.fog),this.renderPass="sky",(!this._atmosphere||r.aj(this.transform.zoom)>0)&&(this.transform.projection.name==="globe"||this.transform.isHorizonVisible()))for(this.currentLayer=0;this.currentLayer{for(this.currentLayer=0;this.currentLayer0&&Nt.hasShadowPass()&&--Jt==0){{this.clearStencil(),this.resetStencilClippingMasks();let ii=this.currentLayer;for(this.currentLayer=0;this.currentLayer=this._lastOcclusionLayer&&this.layersWithOcclusionOpacity.length>0){let ii=this.currentLayer;this.depthOcclusion=!0;for(let Ut of this.layersWithOcclusionOpacity){this.currentLayer=Ut;let Si=J[this.currentLayer],Hi=l.getLayerSourceCache(Si),un=Hi?he[Hi.id]:void 0;this.terrain||this._renderTileClippingMasks(Si,Hi,Hi?Ce[Hi.id]:void 0),this.renderLayer(this,Hi,Si,un)}this.depthOcclusion=!1,this.currentLayer=ii,this.renderPass="translucent",this.layersWithOcclusionOpacity=[]}++this.currentLayer}}if(this.terrain&&this.terrain.postRender(),this._snow&&this._snow.draw(this),this._rain&&this._rain.draw(this),this.options.showTileBoundaries||this.options.showQueryGeometry||this.options.showTileAABBs){let Nt=null;J.forEach(gt=>{let ii=l.getLayerSourceCache(gt);ii&&!gt.isHidden(this.transform.zoom)&&ii.getVisibleCoordinates().length&&(!Nt||Nt.getSource().maxzoom0?p.pop():null}terrainRenderModeElevated(){return this.style&&!!this.style.getTerrain()&&!!this.terrain&&!this.terrain.renderingToTexture||this.forceTerrainMode}linearFloatFilteringSupported(){return this.context.extTextureFloatLinear!=null}currentGlobalDefines(l,p,g){let C=g===void 0?this.terrain&&this.terrain.renderingToTexture:g,x=[];return this.style&&this.style.enable3dLights()&&(l==="globeRaster"||l==="terrainRaster"?(x.push("LIGHTING_3D_MODE"),x.push("LIGHTING_3D_ALPHA_EMISSIVENESS")):C||x.push("LIGHTING_3D_MODE")),this.renderPass==="shadow"&&(this._shadowMapDebug||x.push("DEPTH_TEXTURE")),this.terrainRenderModeElevated()&&(x.push("TERRAIN"),this.linearFloatFilteringSupported()&&x.push("TERRAIN_DEM_FLOAT_FORMAT")),this.transform.projection.name==="globe"&&x.push("GLOBE"),!this._fogVisible||C||p!==void 0&&!p||x.push("FOG","FOG_DITHERING"),C&&x.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&x.push("OVERDRAW_INSPECTOR"),x}getOrCreateProgram(l,p){this.cache=this.cache||{};let g=p&&p.defines||[],C=p&&p.config,x=this.currentGlobalDefines(l,p&&p.overrideFog,p&&p.overrideRtt).concat(g),A=KS.cacheKey(i1[l],l,x,C);return this.cache[A]||(this.cache[A]=new KS(this.context,l,i1[l],C,LM[l],x)),this.cache[A]}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(){let l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new r.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA8))}destroy(){this._terrain&&this._terrain.destroy(),this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=void 0),this.globeSharedBuffers&&this.globeSharedBuffers.destroy(),this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this._wireframeDebugCache.destroy(),this.depthFBO&&(this.depthFBO.destroy(),this.depthFBO=void 0,this.depthTexture=void 0),this.emptyDepthTexture&&this.emptyDepthTexture.destroy()}prepareDrawTile(){this.terrain&&this.terrain.prepareDrawTile()}uploadCommonLightUniforms(l,p){if(this.style.enable3dLights()){let g=this.style.directionalLight,C=this.style.ambientLight;if(g&&C){let x=((A,R,B)=>{let H=A.properties.get("direction"),G=A.properties.get("color-use-theme")==="none",J=A.properties.get("color").toNonPremultipliedRenderColor(G?null:B.getLut(A.scope)).toArray01(),K=A.properties.get("intensity"),oe=R.properties.get("color-use-theme")==="none",le=R.properties.get("color").toNonPremultipliedRenderColor(oe?null:B.getLut(R.scope)).toArray01(),de=R.properties.get("intensity"),Ce=[H.x,H.y,H.z],he=r.dK(le,de),Te=r.dK(J,K);return{u_lighting_ambient_color:he,u_lighting_directional_dir:Ce,u_lighting_directional_color:Te,u_ground_radiance:ym(Ce,Te,he)}})(g,C,this.style);p.setLightsUniformValues(l,x)}}}uploadCommonUniforms(l,p,g,C,x){if(this.uploadCommonLightUniforms(l,p),this.terrain&&this.terrain.renderingToTexture)return;let A=this.style.fog;if(A){let R=A.getOpacity(this.transform.pitch),B=((H,G,J,K,oe,le,de,Ce,he,Te,Pe,Ve)=>{let et=H.transform,Qe=G.properties.get("color-use-theme")==="none",it=G.properties.get("color").toNonPremultipliedRenderColor(Qe?null:H.style.getLut(G.scope)).toArray01();it[3]=K;let Ze=H.frameCounter/1e3%1,[Ye,Je]=G.properties.get("vertical-range");return{u_fog_matrix:J?et.calculateFogTileMatrix(J):Ve||H.identityMat,u_fog_range:G.getFovAdjustedRange(et._fov),u_fog_color:it,u_fog_horizon_blend:G.properties.get("horizon-blend"),u_fog_vertical_limit:[Math.min(Ye,Je),Je],u_fog_temporal_offset:Ze,u_frustum_tl:oe,u_frustum_tr:le,u_frustum_br:de,u_frustum_bl:Ce,u_globe_pos:he,u_globe_radius:Te,u_viewport:Pe,u_globe_transition:r.aj(et.zoom),u_is_globe:+(et.projection.name==="globe")}})(this,A,g,R,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*r.o.devicePixelRatio,this.transform.height*r.o.devicePixelRatio],C);p.setFogUniformValues(l,B)}x&&p.setCutoffUniformValues(l,x.uniformValues)}setTileLoadedFlag(l){this.tileLoaded=l}saveCanvasCopy(){let l=this.canvasCopy();l&&(this.frameCopies.push(l),this.tileLoaded=!1)}canvasCopy(){let l=this.context.gl,p=l.createTexture();return l.bindTexture(l.TEXTURE_2D,p),l.copyTexImage2D(l.TEXTURE_2D,0,l.RGBA,0,0,l.drawingBufferWidth,l.drawingBufferHeight,0),p}getCanvasCopiesAndTimestamps(){return{canvasCopies:this.frameCopies,timeStamps:this.loadTimeStamps}}averageElevationNeedsEasing(){if(!this.transform._elevation)return!1;let l=this.style&&this.style.fog;return!!l&&l.getOpacity(this.transform.pitch)!==0}getBackgroundTiles(){let l=this._backgroundTiles,p=this._backgroundTiles={},g=this.transform.coveringTiles({tileSize:512});for(let C of g)p[C.key]=l[C.key]||new C_(C,512,this.transform.tileZoom,this,void 0,this.worldview);return p}clearBackgroundTiles(){this._backgroundTiles={}}isSourceForClippingOrConflation(l,p){return!(!l.is3D(!(!this.terrain||!this.terrain.enabled))||l.type!=="clip"&&l.type!=="building"&&(l.minzoom&&l.minzoom>this.transform.zoom||(this.style._clipLayerPresent||l.sourceLayer!=="building"&&l.sourceLayer!=="procedural_buildings")&&(!p||p.type!=="batched-model")))}isTileAffectedByFog(l){if(!this.style||!this.style.fog)return!1;if(this.transform.projection.name==="globe")return!0;let p=this._cachedTileFogOpacities[l.key];return p||(this._cachedTileFogOpacities[l.key]=p=this.style.fog.getOpacityForTile(l)),p[0]>=qn||p[1]>=qn}setupDepthForOcclusion(l,p,g){let C=this.context,x=C.gl,A=!!g;var R;g||(g={u_dem:2,u_dem_prev:4,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_depth_range_unpack:[0,1],u_occluder_half_size:16,u_occlusion_depth_offset:-1e-4,u_exaggeration:0}),C.activeTexture.set(x.TEXTURE3),l&&this.depthFBO&&this.depthTexture?(this.depthTexture.bind(x.NEAREST,x.CLAMP_TO_EDGE),g.u_depth_size_inv=[1/this.depthFBO.width,1/this.depthFBO.height],g.u_depth_range_unpack=[2/((R=this.depthRangeFor3D)[1]-R[0]),-1-2*R[0]/(R[1]-R[0])],g.u_occluder_half_size=.5*this.occlusionParams.occluderSize,g.u_occlusion_depth_offset=this.occlusionParams.depthOffset):this.emptyDepthTexture.bind(x.NEAREST,x.CLAMP_TO_EDGE),C.activeTexture.set(x.TEXTURE0),A||p.setTerrainUniformValues(C,g)}}function R_(_,l){let p=!1,g=null,C=()=>{g=null,p&&(_(),g=setTimeout(C,l),p=!1)};return()=>(p=!0,g||C(),g)}class hT{constructor(l){this._hashName=l&&encodeURIComponent(l),r.aY(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=R_(this._updateHashUnthrottled.bind(this),300)}addTo(l){return this._map=l,window.addEventListener("hashchange",this._onHashChange,!1),l.on("moveend",this._updateHash),this}remove(){return this._map?(this._map.off("moveend",this._updateHash),window.removeEventListener("hashchange",this._onHashChange,!1),clearTimeout(this._updateHash()),this._map=void 0,this):this}getHashString(){let l=this._map;if(!l)return"";let p=v1(l);if(this._hashName){let g=this._hashName,C=!1,x=location.hash.slice(1).split("&").map(A=>{let R=A.split("=")[0];return R===g?(C=!0,`${R}=${p}`):A}).filter(A=>A);return C||x.push(`${g}=${p}`),`#${x.join("&")}`}return`#${p}`}_getCurrentHash(){let l=location.hash.replace("#","");if(this._hashName){let p;return l.split("&").map(g=>g.split("=")).forEach(g=>{g[0]===this._hashName&&(p=g)}),(p&&p[1]||"").split("/")}return l.split("/")}_onHashChange(){let l=this._map;if(!l)return!1;let p=this._getCurrentHash();if(p.length>=3&&!p.some(g=>isNaN(Number(g)))){let g=l.dragRotate.isEnabled()&&l.touchZoomRotate.isEnabled()?+(p[3]||0):l.getBearing();return l.jumpTo({center:[+p[2],+p[1]],zoom:+p[0],bearing:g,pitch:+(p[4]||0)}),!0}return!1}_updateHashUnthrottled(){history.replaceState(history.state,"",location.href.replace(/(#.+)?$/,this.getHashString()))}}function v1(_,l){let p=_.getCenter(),g=Math.round(100*_.getZoom())/100,C=Math.ceil((g*Math.LN2+Math.log(512/360/.5))/Math.LN10),x=Math.pow(10,C),A=Math.round(p.lng*x)/x,R=Math.round(p.lat*x)/x,B=_.getBearing(),H=_.getPitch(),G=l?`/${A}/${R}/${g}`:`${g}/${R}/${A}`;return(B||H)&&(G+="/"+Math.round(10*B)/10),H&&(G+=`/${Math.round(H)}`),G}let Ip={linearity:.3,easing:r.eK(0,0,.3,1)},F_=Object.assign({deceleration:2500,maxSpeed:1400},Ip),Of=Object.assign({deceleration:20,maxSpeed:1400},Ip),U0=Object.assign({deceleration:1e3,maxSpeed:360},Ip),VD=Object.assign({deceleration:1e3,maxSpeed:90},Ip);class mT{constructor(l){this._map=l,this.clear()}clear(){this._inertiaBuffer=[]}record(l){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:r.o.now(),settings:l})}_drainInertiaBuffer(){let l=this._inertiaBuffer,p=r.o.now();for(;l.length>0&&p-l[0].time>160;)l.shift()}_onMoveEnd(l){if(this._map._prefersReducedMotion()||(this._drainInertiaBuffer(),this._inertiaBuffer.length<2))return;let p={zoom:0,bearing:0,pitch:0,pan:new r.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:x}of this._inertiaBuffer)p.zoom+=x.zoomDelta||0,p.bearing+=x.bearingDelta||0,p.pitch+=x.pitchDelta||0,x.panDelta&&p.pan._add(x.panDelta),x.around&&(p.around=x.around),x.pinchAround&&(p.pinchAround=x.pinchAround);let g=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,C={};if(p.pan.mag()){let x=P_(p.pan.mag(),g,Object.assign({},F_,l||{}));C.offset=p.pan.mult(x.amount/p.pan.mag()),C.center=this._map.transform.center,xm(C,x)}if(p.zoom){let x=P_(p.zoom,g,Of);C.zoom=this._map.transform.zoom+x.amount,xm(C,x)}if(p.bearing){let x=P_(p.bearing,g,U0);C.bearing=this._map.transform.bearing+r.aA(x.amount,-179,179),xm(C,x)}if(p.pitch){let x=P_(p.pitch,g,VD);C.pitch=this._map.transform.pitch+x.amount,xm(C,x)}if(C.zoom||C.bearing){let x=p.pinchAround===void 0?p.around:p.pinchAround;C.around=x?this._map.unproject(x):this._map.getCenter()}return this.clear(),C.noMoveStart=!0,C}}function xm(_,l){(!_.duration||_.durationp.unproject(B)),R=x.reduce((B,H,G,J)=>B.add(H.div(J.length)),new r.P(0,0));super(l,{points:x,point:R,lngLats:A,lngLat:p.unproject(R),originalEvent:g}),this._defaultPrevented=!1}}class Jb extends r.z{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p){super("wheel",{originalEvent:p}),this._defaultPrevented=!1}}class eC{constructor(l,p){this._map=l,this._clickTolerance=p.clickTolerance}reset(){this._mousedownPos=void 0}wheel(l){return this._firePreventable(new Jb(this._map,l))}mousedown(l,p){return this._mousedownPos=p,this._firePreventable(new gc(l.type,this._map,l))}mouseup(l){this._map.fire(new gc(l.type,this._map,l))}preclick(l){let p=new MouseEvent("preclick",l);this._map.fire(new gc(p.type,this._map,p))}click(l,p){this._mousedownPos&&this._mousedownPos.dist(p)>=this._clickTolerance||(this.preclick(l),this._map.fire(new gc(l.type,this._map,l)))}dblclick(l){return this._firePreventable(new gc(l.type,this._map,l))}mouseover(l){this._map.fire(new gc(l.type,this._map,l))}mouseout(l){this._map.fire(new gc(l.type,this._map,l))}touchstart(l){return this._firePreventable(new L_(l.type,this._map,l))}touchmove(l){this._map.fire(new L_(l.type,this._map,l))}touchend(l){this._map.fire(new L_(l.type,this._map,l))}touchcancel(l){this._map.fire(new L_(l.type,this._map,l))}_firePreventable(l){if(this._map.fire(l),l.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class zD{constructor(l){this._map=l}reset(){this._delayContextMenu=!1,this._contextMenuEvent=void 0}mousemove(l){this._map.fire(new gc(l.type,this._map,l))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new gc("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(l){this._delayContextMenu?this._contextMenuEvent=l:this._map.fire(new gc(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ec{constructor(l,p){this._map=l,this._el=l.getCanvasContainer(),this._container=l.getContainer(),this._clickTolerance=p.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(l,p){this.isEnabled()&&l.shiftKey&&l.button===0&&(fe(),this._startPos=this._lastPos=p,this._active=!0)}mousemoveWindow(l,p){if(!this._active)return;let g=p,C=this._startPos,x=this._lastPos;if(!C||!x||x.equals(g)||!this._box&&g.dist(C){this._box&&(this._box.style.transform=`translate(${A}px,${B}px)`,this._box.style.width=R-A+"px",this._box.style.height=H-B+"px")})}mouseupWindow(l,p){if(!this._active)return;let g=this._startPos,C=p;if(g&&l.button===0){if(this.reset(),Re(),g.x!==C.x||g.y!==C.y)return this._map.fire(new r.z("boxzoomend",{originalEvent:l})),{cameraAnimation:x=>x.fitScreenCoordinates(g,C,this._map.getBearing(),{linear:!1})};this._fireEvent("boxzoomcancel",l)}}keydown(l){this._active&&l.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",l))}blur(){this.reset()}reset(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.remove(),this._box=null),xe(),delete this._startPos,delete this._lastPos}_fireEvent(l,p){return this._map.fire(new r.z(l,{originalEvent:p}))}}function H0(_,l){let p={};for(let g=0;g<_.length;g++)p[_[g].identifier]=l[g];return p}class fT{constructor(l){this.reset(),this.numTouches=l.numTouches}reset(){this.centroid=void 0,this.startTime=0,this.touches={},this.aborted=!1}touchstart(l,p,g){(this.centroid||g.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===0&&(this.startTime=l.timeStamp),g.length===this.numTouches&&(this.centroid=(function(C){let x=new r.P(0,0);for(let A of C)x._add(A);return x.div(C.length)})(p),this.touches=H0(g,p)))}touchmove(l,p,g){if(this.aborted||!this.centroid)return;let C=H0(g,p);for(let x in this.touches){let A=C[x];(!A||A.dist(this.touches[x])>30)&&(this.aborted=!0)}}touchend(l,p,g){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),g.length===0){let C=!this.aborted&&this.centroid;if(this.reset(),C)return C}}}class Jy{constructor(l){this.singleTap=new fT(l),this.numTaps=l.numTaps,this.reset()}reset(){this.lastTime=1/0,this.lastTap=void 0,this.count=0,this.singleTap.reset()}touchstart(l,p,g){this.singleTap.touchstart(l,p,g)}touchmove(l,p,g){this.singleTap.touchmove(l,p,g)}touchend(l,p,g){let C=this.singleTap.touchend(l,p,g);if(C){let x=l.timeStamp-this.lastTime<500,A=!this.lastTap||this.lastTap.dist(C)<30;if(x&&A||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=C,this.count===this.numTaps)return this.reset(),C}}}class ev{constructor(){this._zoomIn=new Jy({numTouches:1,numTaps:2}),this._zoomOut=new Jy({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(l,p,g){this._zoomIn.touchstart(l,p,g),this._zoomOut.touchstart(l,p,g)}touchmove(l,p,g){this._zoomIn.touchmove(l,p,g),this._zoomOut.touchmove(l,p,g)}touchend(l,p,g){let C=this._zoomIn.touchend(l,p,g),x=this._zoomOut.touchend(l,p,g);return C?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:A=>A.easeTo({duration:300,zoom:A.getZoom()+1,around:A.unproject(C)},{originalEvent:l})}):x?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:A=>A.easeTo({duration:300,zoom:A.getZoom()-1,around:A.unproject(x)},{originalEvent:l})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}let gT={0:1,2:2},wm={Control:"ctrlKey",Alt:"altKey",Shift:"shiftKey",Meta:"metaKey"};class tC{constructor(l){this.reset(),this._clickTolerance=l.clickTolerance||1}blur(){this.reset()}reset(){this._active=!1,this._moved=!1,this._lastPoint=void 0,this._eventButton=void 0}_correctButton(l,p){return!1}_move(l,p){return{}}mousedown(l,p){if(this._lastPoint)return;let g=Xe(l);this._correctButton(l,g)&&(this._lastPoint=p,this._eventButton=g)}mousemoveWindow(l,p){let g=this._lastPoint;if(g){if(l.preventDefault(),this._eventButton!=null&&(function(C,x){let A=gT[x];return C.buttons===void 0||(C.buttons&A)!==A})(l,this._eventButton))this.reset();else if(this._moved||!(p.dist(g)0&&(this._active=!0);let C=H0(g,p),x=new r.P(0,0),A=new r.P(0,0),R=0;for(let H in C){let G=C[H],J=this._touches[H];J&&(x._add(G),A._add(G.sub(J)),R++,C[H]=G)}if(this._touches=C,R{this._alertContainer.classList.remove("mapboxgl-touch-pan-blocker-show"),this._alertContainer.removeAttribute("role")},500)}}class iC{constructor(){this.reset()}reset(){this._active=!1,this._firstTwoTouches=void 0}_start(l){}_move(l,p,g){return{}}touchstart(l,p,g){this._firstTwoTouches||g.length<2||(this._firstTwoTouches=[g[0].identifier,g[1].identifier],this._start([p[0],p[1]]))}touchmove(l,p,g){let C=this._firstTwoTouches;if(!C)return;l.preventDefault();let[x,A]=C,R=ih(g,p,x),B=ih(g,p,A);if(!R||!B)return;let H=this._aroundCenter?null:R.add(B).div(2);return this._move([R,B],H,l)}touchend(l,p,g){if(!this._firstTwoTouches)return;let[C,x]=this._firstTwoTouches,A=ih(g,p,C),R=ih(g,p,x);A&&R||(this._active&&Re(),this.reset())}touchcancel(){this.reset()}enable(l){this._enabled=!0,this._aroundCenter=!!l&&l.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function ih(_,l,p){for(let g=0;g<_.length;g++)if(_[g].identifier===p)return l[g]}function nC(_,l){return Math.log2(_/l)}class yT extends iC{reset(){super.reset(),this._distance=0,this._startDistance=0}_start(l){this._startDistance=this._distance=l[0].dist(l[1])}_move(l,p){let g=this._distance;if(this._distance=l[0].dist(l[1]),this._active||!(Math.abs(nC(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:nC(this._distance,g),pinchAround:p}}}function C1(_,l){return 180*_.angleWith(l)/Math.PI}class x1 extends iC{reset(){super.reset(),this._minDiameter=0,this._startVector=void 0,this._vector=void 0}_start(l){this._startVector=this._vector=l[0].sub(l[1]),this._minDiameter=l[0].dist(l[1])}_move(l,p){let g=this._vector;if(this._vector=l[0].sub(l[1]),g&&(this._active||!this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:C1(this._vector,g),pinchAround:p}}_isBelowThreshold(l){this._minDiameter=Math.min(this._minDiameter,l.mag());let p=25/(Math.PI*this._minDiameter)*360,g=this._startVector;if(!g)return!1;let C=C1(l,g);return Math.abs(C)Math.abs(_.x)}class Wr extends iC{constructor(l){super(),this._map=l}reset(){super.reset(),this._valid=void 0,this._firstMove=void 0,this._lastPoints=void 0}_start(l){this._lastPoints=l,N_(l[0].sub(l[1]))&&(this._valid=!1)}_move(l,p,g){let C=this._lastPoints;if(!C)return;let x=l[0].sub(C[0]),A=l[1].sub(C[1]);return this._map._cooperativeGestures&&!r.eL()&&g.touches.length<3||(this._valid=this.gestureBeginsVertically(x,A,g.timeStamp),!this._valid)?void 0:(this._lastPoints=l,this._active=!0,{pitchDelta:(x.y+A.y)/2*-.5})}gestureBeginsVertically(l,p,g){if(this._valid!==void 0)return this._valid;let C=l.mag()>=2,x=p.mag()>=2;if(!C&&!x)return;if(!C||!x)return this._firstMove==null&&(this._firstMove=g),g-this._firstMove<100&&void 0;let A=l.y>0==p.y>0;return N_(l)&&N_(p)&&A}}let w1={panStep:100,bearingStep:15,pitchStep:10};class vT{constructor(){let l=w1;this._panStep=l.panStep,this._bearingStep=l.bearingStep,this._pitchStep=l.pitchStep,this._rotationDisabled=!1}blur(){this.reset()}reset(){this._active=!1}keydown(l){if(l.altKey||l.ctrlKey||l.metaKey)return;let p=0,g=0,C=0,x=0,A=0;switch(l.keyCode){case 61:case 107:case 171:case 187:p=1;break;case 189:case 109:case 173:p=-1;break;case 37:l.shiftKey?g=-1:(l.preventDefault(),x=-1);break;case 39:l.shiftKey?g=1:(l.preventDefault(),x=1);break;case 38:l.shiftKey?C=1:(l.preventDefault(),A=-1);break;case 40:l.shiftKey?C=-1:(l.preventDefault(),A=1);break;default:return}return this._rotationDisabled&&(g=0,C=0),{cameraAnimation:R=>{let B=R.getZoom();R.easeTo({duration:300,easeId:"keyboardHandler",easing:j0,zoom:p?Math.round(B)+p*(l.shiftKey?2:1):B,bearing:R.getBearing()+g*this._bearingStep,pitch:R.getPitch()+C*this._pitchStep,offset:[-x*this._panStep,-A*this._panStep],center:R.getCenter()},{originalEvent:l})}}}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 j0(_){return _*(2-_)}let HD=4.000244140625,bT=1/450;class jD{constructor(l,p){this._map=l,this._el=l.getCanvasContainer(),this._handler=p,this._delta=0,this._lastDelta=0,this._defaultZoomRate=.01,this._wheelZoomRate=bT,r.aY(["_onTimeout","_addScrollZoomBlocker","_showBlockerAlert"],this)}setZoomRate(l){this._defaultZoomRate=l}setWheelZoomRate(l){this._wheelZoomRate=l}isEnabled(){return!!this._enabled}isActive(){return this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(l){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!l&&l.around==="center",this._map._cooperativeGestures&&this._addScrollZoomBlocker())}disable(){this.isEnabled()&&(this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove()))}wheel(l){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!(l.ctrlKey||l.metaKey||this.isZooming()||r.eL()))return void this._showBlockerAlert();this._alertContainer.style.visibility!=="hidden"&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}let p=l.deltaMode===WheelEvent.DOM_DELTA_LINE?40*l.deltaY:l.deltaY,g=r.o.now(),C=g-(this._lastWheelEventTime||0);this._lastWheelEventTime=g,p!==0&&p%HD==0?this._type="wheel":p!==0&&Math.abs(p)<4?this._type="trackpad":C>400?(this._type=null,this._lastValue=p,this._timeout=window.setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(C*p)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,p+=this._lastValue)),l.shiftKey&&p&&(p/=4),this._type&&(this._lastWheelEvent=l,this._delta-=p,this._active||this._start(l)),l.preventDefault()}_onTimeout(l){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(l)}_start(l){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);let p=Se(this._el,l);this._aroundPoint=this._aroundCenter?this._map.transform.centerPoint:p,this._aroundCoord=this._map.transform.pointCoordinate3D(this._aroundPoint),this._targetZoom=void 0,this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let l=this._map.transform;this._type==="wheel"&&l.projection.wrap&&(l._center.lng>=180||l._center.lng<=-180)&&(this._prevEase=null,this._easing=null,this._lastWheelEvent=null,this._lastWheelEventTime=0);let p=()=>l._terrainEnabled()&&this._aroundCoord?l.computeZoomRelativeTo(this._aroundCoord):l.zoom;if(this._delta!==0){let H=this._type==="wheel"&&Math.abs(this._delta)>HD?this._wheelZoomRate:this._defaultZoomRate,G=2/(1+Math.exp(-Math.abs(this._delta*H)));this._delta<0&&G!==0&&(G=1/G);let J=p(),K=Math.pow(2,J),oe=typeof this._targetZoom=="number"?l.zoomScale(this._targetZoom):K;this._targetZoom=Math.min(l.maxZoom,Math.max(l.minZoom,l.scaleZoom(oe*G))),this._type==="wheel"&&(this._startZoom=J,this._easing=this._smoothOutEasing(200)),this._lastDelta=this._delta,this._delta=0}let g=typeof this._targetZoom=="number"?this._targetZoom:p(),C=this._startZoom,x=this._easing,A,R=!1;if(this._type==="wheel"&&C&&x){let H=Math.min((r.o.now()-this._lastWheelEventTime)/200,1),G=x(H);A=r.ak(C,g,G),H<1?this._frameId||(this._frameId=!0):R=!0}else A=g,R=!0;this._active=!0,R&&(this._active=!1,this._finishTimeout=window.setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200));let B=A-p();return B*this._lastDelta<0&&(B=0),{noInertia:!0,needsRenderFrame:!R,zoomDelta:B,around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(l){let p=r.eM;if(this._prevEase){let g=this._prevEase,C=(r.o.now()-g.start)/g.duration,x=g.easing(C+.01)-g.easing(C),A=.27/Math.sqrt(x*x+1e-4)*.01,R=Math.sqrt(.0729-A*A);p=r.eK(A,R,.25,1)}return this._prevEase={start:r.o.now(),duration:l,easing:p},p}blur(){this.reset()}reset(){this._active=!1}_addScrollZoomBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=V("div","mapboxgl-scroll-zoom-blocker",this._map._container),this._alertContainer.textContent=/(Mac|iPad)/i.test(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=window.setTimeout(()=>{this._alertContainer.classList.remove("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.removeAttribute("role")},200)}}class Du{constructor(l,p){this._clickZoom=l,this._tapZoom=p}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 jM{constructor(){this.reset()}reset(){this._active=!1}blur(){this.reset()}dblclick(l,p){return l.preventDefault(),{cameraAnimation:g=>{g.easeTo({duration:300,zoom:g.getZoom()+(l.shiftKey?-1:1),around:g.unproject(p)},{originalEvent:l})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class d3{constructor(){this._tap=new Jy({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,this._swipePoint=void 0,this._swipeTouch=0,this._tapTime=0,this._tap.reset()}touchstart(l,p,g){this._swipePoint||(this._tapTime&&l.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?g.length>0&&(this._swipePoint=p[0],this._swipeTouch=g[0].identifier):this._tap.touchstart(l,p,g))}touchmove(l,p,g){if(this._tapTime){if(this._swipePoint){if(g[0].identifier!==this._swipeTouch)return;let C=p[0],x=C.y-this._swipePoint.y;return this._swipePoint=C,l.preventDefault(),this._active=!0,{zoomDelta:x/128}}}else this._tap.touchmove(l,p,g)}touchend(l,p,g){this._tapTime?this._swipePoint&&g.length===0&&this.reset():this._tap.touchend(l,p,g)&&(this._tapTime=l.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class GM{constructor(l,p,g){this._el=l,this._mousePan=p,this._touchPan=g}enable(l){this._inertiaOptions=l||{},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 u3{constructor(l,p,g){this._pitchWithRotate=l.pitchWithRotate,this._mouseRotate=p,this._mousePitch=g}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 Ya{constructor(l,p,g,C){this._el=l,this._touchZoom=p,this._touchRotate=g,this._tapDragZoom=C,this._rotationDisabled=!1,this._enabled=!0}enable(l){this._touchZoom.enable(l),this._rotationDisabled||this._touchRotate.enable(l),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()}}let S1=_=>_.zoom||_.drag||_.pitch||_.rotate;class p3 extends r.z{}class h3{constructor(){this.constants=[1,1,.01],this.radius=0}setup(l,p){let g=r.av([],p,l);this.radius=r.ag(g[2]<0?r.eO([],g,this.constants):[g[0],g[1],0])}projectRay(l){r.eO(l,l,this.constants),r.aw(l,l),r.eP(l,l,this.constants);let p=r.c4([],l,this.radius);if(p[2]>0){let g=r.c4([],[0,0,1],r.bJ(p,[0,0,1])),C=r.c4([],r.aw([],[p[0],p[1],0]),this.radius),x=r.d7([],p,r.c4([],r.av([],r.d7([],C,g),p),2));p[0]=x[0],p[1]=x[1]}return p}}function Sm(_){return _.panDelta&&_.panDelta.mag()||_.zoomDelta||_.bearingDelta||_.pitchDelta}class jd{constructor(l,p){this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new mT(l),this._bearingSnap=p.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new h3,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(p),r.aY(["handleEvent","handleWindowEvent"],this);let g=this._el;this._listeners=[[g,"touchstart",{passive:!0}],[g,"touchmove",{passive:!1}],[g,"touchend",void 0],[g,"touchcancel",void 0],[g,"mousedown",void 0],[g,"mousemove",void 0],[g,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[g,"mouseover",void 0],[g,"mouseout",void 0],[g,"dblclick",void 0],[g,"click",void 0],[g,"keydown",{capture:!1}],[g,"keyup",void 0],[g,"wheel",{passive:!1}],[g,"contextmenu",void 0],[window,"blur",void 0]];for(let[C,x,A]of this._listeners){let R=C===document?this.handleWindowEvent:this.handleEvent;C.addEventListener(x,R,A)}}destroy(){for(let[l,p,g]of this._listeners){let C=l===document?this.handleWindowEvent:this.handleEvent;l.removeEventListener(p,C,g)}}_addDefaultHandlers(l){let p=this._map,g=p.getCanvasContainer();this._add("mapEvent",new eC(p,l));let C=p.boxZoom=new Ec(p,l);this._add("boxZoom",C);let x=new ev,A=new jM;p.doubleClickZoom=new Du(A,x),this._add("tapZoom",x),this._add("clickZoom",A);let R=new d3;this._add("tapDragZoom",R);let B=p.touchPitch=new Wr(p);this._add("touchPitch",B);let H=new _T(l),G=new b1(l);p.dragRotate=new u3(l,H,G),this._add("mouseRotate",H,["mousePitch"]),this._add("mousePitch",G,["mouseRotate"]);let J=new tv(l),K=new UD(p,l);p.dragPan=new GM(g,J,K),this._add("mousePan",J),this._add("touchPan",K,["touchZoom","touchRotate"]);let oe=new x1,le=new yT;p.touchZoomRotate=new Ya(g,le,oe,R),this._add("touchRotate",oe,["touchPan","touchZoom"]),this._add("touchZoom",le,["touchPan","touchRotate"]),this._add("blockableMapEvent",new zD(p));let de=p.scrollZoom=new jD(p,this);this._add("scrollZoom",de,["mousePan"]);let Ce=p.keyboard=new vT;this._add("keyboard",Ce);for(let he of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])l.interactive&&l[he]&&p[he].enable(l[he])}_add(l,p,g){this._handlers.push({handlerName:l,handler:p,allowed:g}),this._handlersById[l]=p}stop(l){if(!this._updatingCamera){for(let{handler:p}of this._handlers)p.reset();this._inertia.clear(),this._fireEvents({},{},l),this._changes=[],this._originalZoom=void 0}}isActive(){for(let{handler:l}of this._handlers)if(l.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!S1(this._eventsInProgress)||this.isZooming()}_isDragging(){return!!this._eventsInProgress.drag}_blockedByActive(l,p,g){for(let C in l)if(C!==g&&(!p||p.indexOf(C)<0))return!0;return!1}handleWindowEvent(l){this.handleEvent(l,`${l.type}Window`)}_getMapTouches(l){let p=[];for(let g of l)this._el.contains(g.target)&&p.push(g);return p}handleEvent(l,p){this._updatingCamera=!0;let g=l.type==="renderFrame",C=g?void 0:l,x={needsRenderFrame:!1},A={},R={},B=l.touches?this._getMapTouches(l.touches):void 0,H=B?ke(this._el,B):g?void 0:Se(this._el,l);for(let{handlerName:K,handler:oe,allowed:le}of this._handlers){if(!oe.isEnabled())continue;let de;this._blockedByActive(R,le,K)?oe.reset():oe[p||l.type]&&(de=oe[p||l.type](l,H,B),this.mergeHandlerResult(x,A,de,K,C),de&&de.needsRenderFrame&&this._triggerRenderFrame()),(de||oe.isActive())&&(R[K]=oe)}let G={};for(let K in this._previousActiveHandlers)R[K]||(G[K]=C);this._previousActiveHandlers=R,(Object.keys(G).length||Sm(x))&&(this._changes.push([x,A,G]),this._triggerRenderFrame()),(Object.keys(R).length||Sm(x))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:J}=x;J&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],J(this._map))}mergeHandlerResult(l,p,g,C,x){if(!g)return;Object.assign(l,g);let A={handlerName:C,originalEvent:g.originalEvent||x};g.zoomDelta!==void 0&&(p.zoom=A),g.panDelta!==void 0&&(p.drag=A),g.pitchDelta!==void 0&&(p.pitch=A),g.bearingDelta!==void 0&&(p.rotate=A)}_applyChanges(){let l={},p={},g={};for(let[C,x,A]of this._changes)C.panDelta&&(l.panDelta=(l.panDelta||new r.P(0,0))._add(C.panDelta)),C.zoomDelta&&(l.zoomDelta=(l.zoomDelta||0)+C.zoomDelta),C.bearingDelta&&(l.bearingDelta=(l.bearingDelta||0)+C.bearingDelta),C.pitchDelta&&(l.pitchDelta=(l.pitchDelta||0)+C.pitchDelta),C.around!==void 0&&(l.around=C.around),C.aroundCoord!==void 0&&(l.aroundCoord=C.aroundCoord),C.pinchAround!==void 0&&(l.pinchAround=C.pinchAround),C.noInertia&&(l.noInertia=C.noInertia),Object.assign(p,x),Object.assign(g,A);this._updateMapTransform(l,p,g),this._changes=[]}_updateMapTransform(l,p,g){let C=this._map,x=C.transform,A=Te=>[Te.x,Te.y,Te.z];if((Te=>{let Pe=this._eventsInProgress.drag;return Pe&&!this._handlersById[Pe.handlerName].isActive()})()&&!Sm(l)){let Te=x.zoom;x.cameraElevationReference="sea",this._originalZoom!=null&&x._orthographicProjectionAtLowPitch&&x.projection.name!=="globe"&&x.pitch===0?(x.cameraElevationReference="ground",x.zoom=this._originalZoom):(x.recenterOnTerrain(),x.cameraElevationReference="ground"),Te!==x.zoom&&this._map._update(!0)}if(x._isCameraConstrained&&C._stop(!0),!Sm(l))return void this._fireEvents(p,g,!0);let{panDelta:R,zoomDelta:B,bearingDelta:H,pitchDelta:G,around:J,aroundCoord:K,pinchAround:oe}=l;x._isCameraConstrained&&(B>0&&(B=0),x._isCameraConstrained=!1),oe!==void 0&&(J=oe),(B||(Te=>p[Te]&&!this._eventsInProgress[Te])("drag"))&&J&&(this._dragOrigin=A(x.pointCoordinate3D(J)),this._originalZoom=x.zoom,this._trackingEllipsoid.setup(x._camera.position,this._dragOrigin)),x.cameraElevationReference="sea",C._stop(!0),J=J||C.transform.centerPoint,H&&(x.bearing+=H),G&&(x.pitch+=G),x._updateCameraState();let le=[0,0,0];if(R)if(x.projection.name==="mercator"){let Te=this._trackingEllipsoid.projectRay(x.screenPointToMercatorRay(J).dir),Pe=this._trackingEllipsoid.projectRay(x.screenPointToMercatorRay(J.sub(R)).dir);le[0]=Pe[0]-Te[0],le[1]=Pe[1]-Te[1]}else{let Te=x.pointCoordinate(J);if(x.projection.name==="globe"){R=R.rotate(-x.angle);let Pe=x._pixelsPerMercatorPixel/x.worldSize;le[0]=-R.x*r.eN(r.a$(Te.y))*Pe,le[1]=-R.y*r.eN(x.center.lat)*Pe}else{let Pe=x.pointCoordinate(J.sub(R));Te&&Pe&&(le[0]=Pe.x-Te.x,le[1]=Pe.y-Te.y)}}let de=x.zoom,Ce=[0,0,0];if(B){let Te=A(K||x.pointCoordinate3D(J)),Pe={dir:r.aw([],r.av([],Te,x._camera.position))};if(Pe.dir[2]<0){let Ve=x.zoomDeltaToMovement(Te,B);r.c4(Ce,Pe.dir,Ve)}}let he=r.d7(le,le,Ce);x._translateCameraConstrained(he),B&&Math.abs(x.zoom-de)>1e-4&&x.recenterOnTerrain(),x.cameraElevationReference="ground",this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(p,g,!0)}_fireEvents(l,p,g){let C=S1(this._eventsInProgress),x=S1(l),A={};for(let G in l){let{originalEvent:J}=l[G];this._eventsInProgress[G]||(A[`${G}start`]=J),this._eventsInProgress[G]=l[G]}!C&&x&&this._fireEvent("movestart",x.originalEvent);for(let G in A)this._fireEvent(G,A[G]);x&&this._fireEvent("move",x.originalEvent);for(let G in l){let{originalEvent:J}=l[G];this._fireEvent(G,J)}let R={},B;for(let G in this._eventsInProgress){let{handlerName:J,originalEvent:K}=this._eventsInProgress[G];this._handlersById[J].isActive()||(delete this._eventsInProgress[G],B=p[J]||K,R[`${G}end`]=B)}for(let G in R)this._fireEvent(G,R[G]);let H=S1(this._eventsInProgress);if(g&&(C||x)&&!H){this._updatingCamera=!0;let G=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),J=K=>K!==0&&-this._bearingSnap{this._frameId=void 0,this.handleEvent(new p3("renderFrame",{timeStamp:l})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}let T1="map.setFreeCameraOptions(...) and map.getFreeCameraOptions() are not yet supported for non-mercator projections.";class GD extends r.E{constructor(l,p){super(),this._moving=!1,this._zooming=!1,this.transform=l,this._bearingSnap=p.bearingSnap,this._respectPrefersReducedMotion=p.respectPrefersReducedMotion!==!1,r.aY(["_renderFrameCallback"],this)}getCenter(){return new r.aR(this.transform.center.lng,this.transform.center.lat)}setCenter(l,p){return this.jumpTo({center:l},p)}panBy(l,p,g){return l=r.P.convert(l).mult(-1),this.panTo(this.transform.center,Object.assign({offset:l},p),g)}panTo(l,p,g){return this.easeTo(Object.assign({center:l},p),g)}getZoom(){return this.transform.zoom}setZoom(l,p){return this.jumpTo({zoom:l},p),this}zoomTo(l,p,g){return this.easeTo(Object.assign({zoom:l},p),g)}zoomIn(l,p){return this.zoomTo(this.getZoom()+1,l,p),this}zoomOut(l,p){return this.zoomTo(this.getZoom()-1,l,p),this}getBearing(){return this.transform.bearing}setBearing(l,p){return this.jumpTo({bearing:l},p),this}getPadding(){return this.transform.padding}setPadding(l,p){return this.jumpTo({padding:l},p),this}rotateTo(l,p,g){return this.easeTo(Object.assign({bearing:l},p),g)}resetNorth(l,p){return this.rotateTo(0,Object.assign({duration:1e3},l),p),this}resetNorthPitch(l,p){return this.easeTo(Object.assign({bearing:0,pitch:0,duration:1e3},l),p),this}snapToNorth(l,p){return Math.abs(this.getBearing())l.aspect?g/(2*Math.tan(.5*l.fovX)*l.aspect):C/(2*Math.tan(.5*l.fovY)*l.aspect)}_cameraForBoundsOnGlobe(l,p,g,C,x,A){let R=l.clone(),B=this._extendCameraOptions(A);R.bearing=C,R.pitch=x;let H=r.aR.convert(p),G=r.aR.convert(g),J=.5*(H.lat+G.lat),K=.5*(H.lng+G.lng),oe=r.eQ(J,K),le=r.aw([],oe),de=r.aw([],r.bI([],le,[0,1,0])),Ce=r.bI([],de,le),he=[de[0],de[1],de[2],0,Ce[0],Ce[1],Ce[2],0,le[0],le[1],le[2],0,0,0,0,1],Te=[oe,r.eQ(H.lat,H.lng),r.eQ(G.lat,H.lng),r.eQ(G.lat,G.lng),r.eQ(H.lat,G.lng),r.eQ(J,H.lng),r.eQ(J,G.lng),r.eQ(H.lat,K),r.eQ(G.lat,K)],Pe=r.d8.fromPoints(Te.map(Ut=>[r.bJ(de,Ut),r.bJ(Ce,Ut),r.bJ(le,Ut)])),Ve=r.af([],Pe.center,he);r.eR(Ve)===0&&r.eS(Ve,0,0,1),r.aw(Ve,Ve),r.c4(Ve,Ve,r.aD),R.center=r.eT(Ve);let et=R.getWorldToCameraMatrix(),Qe=r.bl(new Float64Array(16),et);Pe=r.d8.applyTransform(Pe,r.aB([],et,he));let it=this._extendAABB(Pe,R,B,C);if(!it)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");Pe=it,r.af(Ve,Ve,et);let Ze=.5*(Pe.max[2]-Pe.min[2]),Ye=this._minimumAABBFrustumDistance(R,Pe),Je=r.c4([],[0,0,1],Ze),Bt=r.d7(Je,Ve,Je),St=Ye+(R.pitch===0?0:r.bG(Ve,Bt)),Jt=R.globeCenterInViewSpace,Ft=r.av([],Ve,[Jt[0],Jt[1],Jt[2]]);r.aw(Ft,Ft),r.c4(Ft,Ft,St);let Yt=r.d7([],Ve,Ft);r.af(Yt,Yt,Qe);let ji=r.eD/r.aD,Nt=r.ag(Yt),gt=r.ce(Math.max(Nt*ji-r.eD,Number.EPSILON),0),ii=Math.min(R.zoomFromMercatorZAdjusted(gt),B.maxZoom);return ii>.5*(r.cZ+r.cK)?(R.setProjection({name:"mercator"}),R.zoom=ii,this._cameraForBounds(R,p,g,C,x,A)):{center:R.center,zoom:ii,bearing:C,pitch:x}}_extendAABB(l,p,g,C){let x=.5*((g.padding.left||0)+(g.padding.right||0)),A=.5*((g.padding.top||0)+(g.padding.bottom||0)),R=A,B=x,H=x,G=A,J=p.width-(B+H),K=p.height-(R+G),oe=r.av([],l.max,l.min),le=Math.min(J/oe[0],K/oe[1]),de=Math.min(p.scaleZoom(p.scale*le),g.maxZoom);if(isNaN(de))return null;let Ce=p.scale/p.zoomScale(de),he=new r.d8([l.min[0]-B*Ce,l.min[1]-G*Ce,l.min[2]],[l.max[0]+H*Ce,l.max[1]+R*Ce,l.max[2]]),Te=(typeof g.offset.x=="number"&&typeof g.offset.y=="number"?new r.P(g.offset.x,g.offset.y):r.P.convert(g.offset)).rotate(-r.an(C));return he.center[0]-=Te.x*Ce,he.center[1]+=Te.y*Ce,he}queryTerrainElevation(l,p){let g=this.transform.elevation;return g?(p=Object.assign({},{exaggerated:!0},p),g.getAtPoint(r.ae.fromLngLat(l),null,p.exaggerated)):null}_cameraForBounds(l,p,g,C,x,A){if(l.projection.name==="globe")return this._cameraForBoundsOnGlobe(l,p,g,C,x,A);let R=l.clone(),B=this._extendCameraOptions(A);R.bearing=C,R.pitch=x;let H=r.aR.convert(p),G=r.aR.convert(g),J=new r.aR(H.lng,G.lat),K=new r.aR(G.lng,H.lat),oe=R.project(H),le=R.project(G),de=this.queryTerrainElevation(H),Ce=this.queryTerrainElevation(G),he=this.queryTerrainElevation(J),Te=this.queryTerrainElevation(K),Pe=[[oe.x,oe.y,Math.min(de||0,Ce||0,he||0,Te||0)],[le.x,le.y,Math.max(de||0,Ce||0,he||0,Te||0)]],Ve=r.d8.fromPoints(Pe),et=R.getWorldToCameraMatrix(),Qe=r.bl(new Float64Array(16),et);Ve=r.d8.applyTransform(Ve,et);let it=this._extendAABB(Ve,R,B,C);if(!it)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");Ve=it;let Ze=.5*r.av([],Ve.max,Ve.min)[2],Ye=this._minimumAABBFrustumDistance(R,Ve),Je=[0,0,1,0];r.aC(Je,Je,et),r.eU(Je,Je);let Bt=r.c4([],Je,Ye+Ze),St=r.d7([],Ve.center,Bt);r.af(Ve.center,Ve.center,Qe),r.af(St,St,Qe);let Jt=R.unproject(new r.P(Ve.center[0],Ve.center[1])),Ft=r.eV(R.projection,Jt),Yt=Math.pow(2,Ft),ji=Math.min(R._zoomFromMercatorZ(St[2]*R.pixelsPerMeter*Yt/R.worldSize),B.maxZoom);return R.mercatorFromTransition&&ji<.5*(r.cZ+r.cK)?(R.setProjection({name:"globe"}),R.zoom=ji,this._cameraForBounds(R,p,g,C,x,A)):{center:Jt,zoom:ji,bearing:C,pitch:x}}fitBounds(l,p,g){let C=this.cameraForBounds(l,p);return this._fitInternal(C,p,g)}fitScreenCoordinates(l,p,g,C,x){let A=r.P.convert(l),R=r.P.convert(p),B=new r.P(Math.min(A.x,R.x),Math.min(A.y,R.y)),H=new r.P(Math.max(A.x,R.x),Math.max(A.y,R.y));if(this.transform.projection.name==="mercator"&&this.transform.anyCornerOffEdge(A,R))return this;let G=this.transform.pointLocation3D(B),J=this.transform.pointLocation3D(H),K=this.transform.pointLocation3D(new r.P(B.x,H.y)),oe=this.transform.pointLocation3D(new r.P(H.x,B.y)),le=[Math.min(G.lng,J.lng,K.lng,oe.lng),Math.min(G.lat,J.lat,K.lat,oe.lat)],de=[Math.max(G.lng,J.lng,K.lng,oe.lng),Math.max(G.lat,J.lat,K.lat,oe.lat)],Ce=C&&C.pitch?C.pitch:this.getPitch(),he=this._cameraForBounds(this.transform,le,de,g,Ce,C);return this._fitInternal(he,C,x)}_fitInternal(l,p,g){return l?(p=Object.assign(l,p)).linear?this.easeTo(p,g):this.flyTo(p,g):this}jumpTo(l,p){this.stop();let g=l.preloadOnly?this.transform.clone():this.transform,C=!1,x=!1,A=!1;"zoom"in l&&g.zoom!==+l.zoom&&(C=!0,g.zoom=+l.zoom),l.center!==void 0&&(g.center=r.aR.convert(l.center)),"bearing"in l&&g.bearing!==+l.bearing&&(x=!0,g.bearing=+l.bearing),"pitch"in l&&g.pitch!==+l.pitch&&(A=!0,g.pitch=+l.pitch);let R=typeof l.padding=="number"?this._extendPadding(l.padding):l.padding;if(l.padding!=null&&!g.isPaddingEqual(R))if(l.retainPadding===!1){let B=g.clone();B.padding=R,g.setLocationAtPoint(g.center,B.centerPoint)}else g.padding=R;return l.preloadOnly?(this._preloadTiles(g),this):(this.fire(new r.z("movestart",p)).fire(new r.z("move",p)),C&&this.fire(new r.z("zoomstart",p)).fire(new r.z("zoom",p)).fire(new r.z("zoomend",p)),x&&this.fire(new r.z("rotatestart",p)).fire(new r.z("rotate",p)).fire(new r.z("rotateend",p)),A&&this.fire(new r.z("pitchstart",p)).fire(new r.z("pitch",p)).fire(new r.z("pitchend",p)),this.fire(new r.z("moveend",p)))}getFreeCameraOptions(){return this.transform.projection.supportsFreeCamera||r.w(T1),this.transform.getFreeCameraOptions()}setFreeCameraOptions(l,p){let g=this.transform;if(!g.projection.supportsFreeCamera)return r.w(T1),this;this.stop();let C=g.zoom,x=g.pitch,A=g.bearing;g.setFreeCameraOptions(l);let R=C!==g.zoom,B=x!==g.pitch,H=A!==g.bearing;return this.fire(new r.z("movestart",p)).fire(new r.z("move",p)),R&&this.fire(new r.z("zoomstart",p)).fire(new r.z("zoom",p)).fire(new r.z("zoomend",p)),H&&this.fire(new r.z("rotatestart",p)).fire(new r.z("rotate",p)).fire(new r.z("rotateend",p)),B&&this.fire(new r.z("pitchstart",p)).fire(new r.z("pitch",p)).fire(new r.z("pitchend",p)),this.fire(new r.z("moveend",p)),this}easeTo(l,p){this._stop(!1,l.easeId),((l=Object.assign({offset:[0,0],duration:500,easing:r.eM},l)).animate===!1||this._prefersReducedMotion(l))&&(l.duration=0);let g=this.transform,C=this.getZoom(),x=this.getBearing(),A=this.getPitch(),R=this.getPadding(),B="zoom"in l?+l.zoom:C,H="bearing"in l?this._normalizeBearing(l.bearing,x):x,G="pitch"in l?+l.pitch:A,J=this._extendPadding(l.padding),K=r.P.convert(l.offset),oe,le,de;if(g.projection.name==="globe"){let Je=r.ae.fromLngLat(g.center),Bt=K.rotate(-g.angle);Je.x+=Bt.x/g.worldSize,Je.y+=Bt.y/g.worldSize;let St=Je.toLngLat(),Jt=r.aR.convert(l.center||St);this._normalizeCenter(Jt),oe=g.centerPoint.add(Bt),le=new r.P(Je.x,Je.y).mult(g.worldSize),de=new r.P(r.aF(Jt.lng),r.aJ(Jt.lat)).mult(g.worldSize).sub(le)}else{oe=g.centerPoint.add(K);let Je=g.pointLocation(oe),Bt=r.aR.convert(l.center||Je);this._normalizeCenter(Bt),le=g.project(Je),de=g.project(Bt).sub(le)}let Ce=g.zoomScale(B-C),he,Te;l.around&&(he=r.aR.convert(l.around),Te=g.locationPoint(he));let Pe=this._zooming||B!==C,Ve=this._rotating||x!==H,et=this._pitching||G!==A,Qe=!g.isPaddingEqual(J),it=l.retainPadding===!1?g.clone():g,Ze=Je=>Bt=>{if(Pe&&(Je.zoom=r.ak(C,B,Bt)),Ve&&(Je.bearing=r.ak(x,H,Bt)),et&&(Je.pitch=r.ak(A,G,Bt)),Qe&&(it.interpolatePadding(R,J,Bt),oe=it.centerPoint.add(K)),he)Je.setLocationAtPoint(he,Te);else{let St=Je.zoomScale(Je.zoom-C),Jt=B>C?Math.min(2,Ce):Math.max(.5,Ce),Ft=Math.pow(Jt,1-Bt),Yt=Je.unproject(le.add(de.mult(Bt*Ft)).mult(St));Je.setLocationAtPoint(Je.renderWorldCopies?Yt.wrap():Yt,oe)}return l.preloadOnly||this._fireMoveEvents(p),Je};if(l.preloadOnly){let Je=this._emulate(Ze,l.duration,g);return this._preloadTiles(Je),this}let Ye={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=Pe,this._rotating=Ve,this._pitching=et,this._padding=Qe,this._easeId=l.easeId,this._prepareEase(p,l.noMoveStart,Ye),this._ease(Ze(g),Je=>{g.cameraElevationReference==="sea"&&g.recenterOnTerrain(),this._afterEase(p,Je)},l),this}_prepareEase(l,p,g={}){this._moving=!0,this.transform.cameraElevationReference="sea",this.transform._orthographicProjectionAtLowPitch&&this.transform.pitch===0&&this.transform.projection.name!=="globe"&&(this.transform.cameraElevationReference="ground"),p||g.moving||this.fire(new r.z("movestart",l)),this._zooming&&!g.zooming&&this.fire(new r.z("zoomstart",l)),this._rotating&&!g.rotating&&this.fire(new r.z("rotatestart",l)),this._pitching&&!g.pitching&&this.fire(new r.z("pitchstart",l))}_fireMoveEvents(l){this.fire(new r.z("move",l)),this._zooming&&this.fire(new r.z("zoom",l)),this._rotating&&this.fire(new r.z("rotate",l)),this._pitching&&this.fire(new r.z("pitch",l))}_afterEase(l,p){if(this._easeId&&p&&this._easeId===p)return;this._easeId=void 0,this.transform.cameraElevationReference="ground";let g=this._zooming,C=this._rotating,x=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,g&&this.fire(new r.z("zoomend",l)),C&&this.fire(new r.z("rotateend",l)),x&&this.fire(new r.z("pitchend",l)),this.fire(new r.z("moveend",l))}flyTo(l,p){if(this._prefersReducedMotion(l)){let Ut=r.aH(l,["center","zoom","bearing","pitch","around","padding","retainPadding"]);return this.jumpTo(Ut,p)}this.stop(),l=Object.assign({offset:[0,0],speed:1.2,curve:1.42,easing:r.eM},l);let g=this.transform,C=this.getZoom(),x=this.getBearing(),A=this.getPitch(),R=this.getPadding(),B="zoom"in l?r.aA(+l.zoom,g.minZoom,g.maxZoom):C,H="bearing"in l?this._normalizeBearing(l.bearing,x):x,G="pitch"in l?+l.pitch:A,J=this._extendPadding(l.padding),K=g.zoomScale(B-C),oe=r.P.convert(l.offset),le=g.centerPoint.add(oe),de=g.pointLocation(le),Ce=r.aR.convert(l.center||de);this._normalizeCenter(Ce);let he=g.project(de),Te=g.project(Ce).sub(he),Pe=l.curve,Ve=Math.max(g.width,g.height),et=Ve/K,Qe=Te.mag();if("minZoom"in l){let Ut=r.aA(Math.min(l.minZoom,C,B),g.minZoom,g.maxZoom),Si=Ve/g.zoomScale(Ut-C);Pe=Math.sqrt(Si/Qe*2)}let it=Pe*Pe;function Ze(Ut){let Si=(et*et-Ve*Ve+(Ut?-1:1)*it*it*Qe*Qe)/(2*(Ut?et:Ve)*it*Qe);return Math.log(Math.sqrt(Si*Si+1)-Si)}function Ye(Ut){return(Math.exp(Ut)-Math.exp(-Ut))/2}function Je(Ut){return(Math.exp(Ut)+Math.exp(-Ut))/2}let Bt=Ze(0),St=function(Ut){return Je(Bt)/Je(Bt+Pe*Ut)},Jt=function(Ut){return Ve*((Je(Bt)*(Ye(Si=Bt+Pe*Ut)/Je(Si))-Ye(Bt))/it)/Qe;var Si},Ft=(Ze(1)-Bt)/Pe;if(Math.abs(Qe)<1e-6||!isFinite(Ft)){if(Math.abs(Ve-et)<1e-6)return this.easeTo(l,p);let Ut=etl.maxDuration&&(l.duration=0);let Yt=x!==H,ji=G!==A,Nt=!g.isPaddingEqual(J),gt=l.retainPadding===!1?g.clone():g,ii=Ut=>Si=>{let Hi=Si*Ft,un=1/St(Hi);Ut.zoom=Si===1?B:C+Ut.scaleZoom(un),Yt&&(Ut.bearing=r.ak(x,H,Si)),ji&&(Ut.pitch=r.ak(A,G,Si)),Nt&&(gt.interpolatePadding(R,J,Si),le=gt.centerPoint.add(oe));let Fi=Si===1?Ce:Ut.unproject(he.add(Te.mult(Jt(Hi))).mult(un));return Ut.setLocationAtPoint(Ut.renderWorldCopies?Fi.wrap():Fi,le),Ut._updateCameraOnTerrain(),l.preloadOnly||this._fireMoveEvents(p),Ut};if(l.preloadOnly){let Ut=this._emulate(ii,l.duration,g);return this._preloadTiles(Ut),this}return this._zooming=!0,this._rotating=Yt,this._pitching=ji,this._padding=Nt,this._prepareEase(p,!1),this._ease(ii(g),()=>this._afterEase(p),l),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_requestRenderFrame(l){}_cancelRenderFrame(l){}_stop(l,p){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),this._easeFrameId=void 0,this._onEaseFrame=void 0),this._onEaseEnd){let g=this._onEaseEnd;this._onEaseEnd=void 0,g.call(this,p)}if(!l){let g=this.handlers;g&&g.stop(!1)}return this}_ease(l,p,g){g.animate===!1||g.duration===0?(l(1),p()):(this._easeStart=r.o.now(),this._easeOptions=g,this._onEaseFrame=l,this._onEaseEnd=p,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){let l=Math.min((r.o.now()-this._easeStart)/this._easeOptions.duration,1),p=this._onEaseFrame;p&&p(this._easeOptions.easing(l)),l<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(l,p){l=r.bT(l,-180,180);let g=Math.abs(l-p);return Math.abs(l-360-p)180?-360:g<-180?360:0}_prefersReducedMotion(l){return this._respectPrefersReducedMotion&&r.o.prefersReducedMotion&&!(l&&l.essential)}_emulate(l,p,g){let C=Math.ceil(15*p/1e3),x=[],A=l(g.clone());for(let R=0;R<=C;R++){let B=A(R/C);x.push(B.clone())}return x}_preloadTiles(l,p){}}class iv{constructor(l={}){this.options=l,r.aY(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(l){let p=this.options&&this.options.compact,g=l._getUIString("AttributionControl.ToggleAttribution");this._map=l,this._container=V("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=V("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.type="button",this._compactButton.addEventListener("click",this._toggleAttribution),this._compactButton.setAttribute("aria-label",g);let C=V("span","mapboxgl-ctrl-icon",this._compactButton);return C.setAttribute("aria-hidden","true"),C.setAttribute("title",g),this._innerContainer=V("div","mapboxgl-ctrl-attrib-inner",this._container),p&&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),p===void 0&&(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}_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 l=this._editLink;l||(l=this._editLink=this._container.querySelector(".mapbox-improve-map"));let p=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||r.e.ACCESS_TOKEN}];if(l){let g=p.reduce((C,x,A)=>(x.value&&(C+=`${x.key}=${x.value}${AC.length-x.length),l=l.filter((C,x)=>{for(let A=x+1;A=0)return!1;return!0}),this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?l=[...this.options.customAttribution,...l]:l.unshift(this.options.customAttribution));let g=l.join(" | ");g!==this._attribHTML&&(this._attribHTML=g,l.length?(this._innerContainer.innerHTML=g,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 Dg{constructor(){r.aY(["_updateLogo","_updateCompact"],this)}onAdd(l){this._map=l,this._container=V("div","mapboxgl-ctrl");let p=V("a","mapboxgl-ctrl-logo");return p.target="_blank",p.rel="noopener nofollow",p.href="https://www.mapbox.com/",p.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),p.setAttribute("rel","noopener nofollow"),this._container.appendChild(p),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(l){l&&l.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")}_logoRequired(){if(!this._map.style)return!0;let l=this._map.style._sourceCaches;if(Object.entries(l).length===0)return!0;for(let p in l){let g=l[p].getSource();if(g.hasOwnProperty("mapbox_logo")&&!g.mapbox_logo)return!1}return!0}_updateCompact(){let l=this._container.children;if(l.length){let p=l[0];this._map.getCanvasContainer().offsetWidth<250?p.classList.add("mapboxgl-compact"):p.classList.remove("mapboxgl-compact")}}}class I1{constructor(){r.aY(["_onIndoorUpdate"],this)}onAdd(l){return this._map=l,this._container=V("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._map.indoor.on("indoorupdate",p=>this._onIndoorUpdate({selectedFloorId:p.selectedFloorId,floors:p.floors})),this._container}_createButton(l,p){let g=V("button",l,this._container);return g.type="button",g.addEventListener("click",p),g}_createSeparator(){return V("div","mapboxgl-ctrl-separator",this._container)}_setButtonTitle(l,p){this._map&&(l.setAttribute("aria-label",p),l.textContent=p)}onRemove(){this._container&&this._container.remove(),this._map&&this._map.indoor&&(this._map.indoor.off("indoorupdate",this._onIndoorUpdate),this._map=null)}getDefaultPosition(){return"right"}_onIndoorUpdate(l){if(!l||!l.floors)return void(this._container.style.display="none");let p=this._model;this._model=l,this._container.style.display="inline-block",this._container.style.borderRadius="8px";let g=l.floors.sort((C,x)=>x.levelOrder-C.levelOrder);p?(Array.from(this._container.children).forEach(C=>C.remove()),this.addCurrentFloors(g)):this.addCurrentFloors(g)}addCurrentFloors(l){for(let p=0;p{this._map._selectIndoorFloor(g.id),this._model&&(this._model.selectedFloorId=g.id),Array.from(this._container.children).forEach(x=>{x.classList.contains("mapboxgl-ctrl-level-button")&&x.classList.remove("mapboxgl-ctrl-level-button-selected")}),C.classList.add("mapboxgl-ctrl-level-button-selected")});this._setButtonTitle(C,g.shortName),this._model&&g.id===this._model.selectedFloorId&&C.classList.add("mapboxgl-ctrl-level-button-selected"),this._container.append(C),p=this._endTime)return this._end;let p=r.dz((l-this._startTime)/(this._endTime-this._startTime));return this._start*(1-p)+this._end*p}isEasing(l){return l>=this._startTime&&l<=this._endTime}jumpTo(l){this._startTime=-1/0,this._endTime=-1/0,this._start=l,this._end=l}easeTo(l,p,g){this._start=this.getValue(p),this._end=l,this._startTime=p,this._endTime=p+g}}let oC={"AttributionControl.ToggleAttribution":"Toggle attribution","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox homepage","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 \u2318 + scroll to zoom the map","TouchPanBlocker.Message":"Use two fingers to move the map"};class E1 extends r.z{constructor(l,p,g,C){let{point:x,lngLat:A,originalEvent:R,target:B}=l;super(l.type,{point:x,lngLat:A,originalEvent:R,target:B}),this.preventDefault=()=>{l.preventDefault()},this.id=p,this.interaction=g,this.feature=C}}class $M{constructor(l){this.map=l,this.interactionsByType=new Map,this.delegatedInteractions=new Map,this.typeById=new Map,this.filters=new Map,this.handleType=this.handleType.bind(this),this.handleMove=this.handleMove.bind(this),this.handleOut=this.handleOut.bind(this),this.hoveredFeatures=new Map,this.prevHoveredFeatures=new Map}add(l,p){if(this.typeById.has(l))throw new Error(`Interaction id "${l}" already exists.`);let g=p.filter,C=p.type;g&&this.filters.set(l,r.b6(g)),C==="mouseover"&&(C="mouseenter"),C==="mouseout"&&(C="mouseleave");let x=this.interactionsByType.get(C)||new Map;C==="mouseenter"||C==="mouseleave"?(this.delegatedInteractions.size===0&&(this.map.on("mousemove",this.handleMove),this.map.on("mouseout",this.handleOut)),this.delegatedInteractions.set(l,p)):x.size===0&&this.map.on(C,this.handleType),x.size===0&&this.interactionsByType.set(C,x),x.set(l,p),this.typeById.set(l,C)}get(l){let p=this.typeById.get(l);if(!p)return;let g=this.interactionsByType.get(p);return g?g.get(l):void 0}remove(l){let p=this.typeById.get(l);if(!p)return;this.typeById.delete(l),this.filters.delete(l);let g=this.interactionsByType.get(p);g&&(g.delete(l),p==="mouseenter"||p==="mouseleave"?(this.delegatedInteractions.delete(l),this.delegatedInteractions.size===0&&(this.map.off("mousemove",this.handleMove),this.map.off("mouseout",this.handleOut))):g.size===0&&this.map.off(p,this.handleType))}queryTargets(l,p){let g=[];for(let[C,x]of p)x.target&&g.push({targetId:C,target:x.target,filter:this.filters.get(C)});return this.map.style.queryRenderedTargets(l,g,this.map.transform)}handleMove(l){this.prevHoveredFeatures=this.hoveredFeatures,this.hoveredFeatures=new Map;let p=this.queryTargets(l.point,Array.from(this.delegatedInteractions).reverse());p.length&&(l.type="mouseenter",this.handleType(l,p));let g=new Map;for(let[C,{feature:x}]of this.prevHoveredFeatures)this.hoveredFeatures.has(C)||g.set(x.id,x);g.size&&(l.type="mouseleave",this.handleType(l,Array.from(g.values())))}handleOut(l){let p=Array.from(this.hoveredFeatures.values()).map(({feature:g})=>g);p.length&&(l.type="mouseleave",this.handleType(l,p)),this.hoveredFeatures.clear()}handleType(l,p){let g=l.type==="mouseenter";if(g&&!this.interactionsByType.has(l.type))return void r.w("mouseenter interaction required for mouseleave to work.");let C=Array.from(this.interactionsByType.get(l.type)).reverse(),x=!!p;p=p||this.queryTargets(l.point,C);let A=!1,R=new Set;for(let B of p){for(let[H,G]of C){if(!G.target)continue;let J=B.variants?B.variants[H]:null;if(J){for(let K of J){if(b_(K,B,R,H))continue;let oe=new r.dt(B,K),le=T0(K,B,H);x&&(oe.state=this.map.getFeatureState(oe));let de=g?this.prevHoveredFeatures.get(le):null,Ce=new E1(l,H,G,oe),he=de?de.stop:G.handler(Ce);if(g&&this.hoveredFeatures.set(le,{feature:B,stop:he}),he!==!1){A=!0;break}}if(A)break}}if(A)break}if(!A)for(let[B,H]of C){let{handler:G,target:J}=H;if(!J&&G(new E1(l,B,H,null))!==!1)break}}}function m3(_,l){if(Array.isArray(_)&&Array.isArray(l)){let p=new Set(_),g=new Set(l);return p.size===g.size&&_.every(C=>g.has(C))}return r.by(_,l)}let D1={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,antialias:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,minTileCacheSize:null,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",localFontFamily:null,transformRequest:null,accessToken:null,fadeDuration:300,respectPrefersReducedMotion:!0,crossSourceCollisions:!0,collectResourceTiming:!1,testMode:!1,precompilePrograms:!0,scaleFactor:1,spriteFormat:"auto"},qM={showCompass:!0,showZoom:!0,visualizePitch:!1};class KM{constructor(l,p,g=!1){this._clickTolerance=10,this.element=p,this.mouseRotate=new _T({clickTolerance:l.dragRotate._mouseRotate._clickTolerance}),this.map=l,g&&(this.mousePitch=new b1({clickTolerance:l.dragRotate._mousePitch._clickTolerance})),r.aY(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),p.addEventListener("mousedown",this.mousedown),p.addEventListener("touchstart",this.touchstart,{passive:!1}),p.addEventListener("touchmove",this.touchmove),p.addEventListener("touchend",this.touchend),p.addEventListener("touchcancel",this.reset)}down(l,p){this.mouseRotate.mousedown(l,p),this.mousePitch&&this.mousePitch.mousedown(l,p),fe()}move(l,p){let g=this.map,C=this.mouseRotate.mousemoveWindow(l,p),x=C&&C.bearingDelta;if(x&&g.setBearing(g.getBearing()+x),this.mousePitch){let A=this.mousePitch.mousemoveWindow(l,p),R=A&&A.pitchDelta;R&&g.setPitch(g.getPitch()+R)}}off(){let l=this.element;l.removeEventListener("mousedown",this.mousedown),l.removeEventListener("touchstart",this.touchstart),l.removeEventListener("touchmove",this.touchmove),l.removeEventListener("touchend",this.touchend),l.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){xe(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup)}mousedown(l){this.down(Object.assign({},l,{ctrlKey:!0,preventDefault:()=>l.preventDefault()}),Se(this.element,l)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)}mousemove(l){this.move(l,Se(this.element,l))}mouseup(l){this.mouseRotate.mouseupWindow(l),this.mousePitch&&this.mousePitch.mouseupWindow(l),this.offTemp()}touchstart(l){l.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=ke(this.element,l.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>l.preventDefault()},this._startPos))}touchmove(l){l.targetTouches.length!==1?this.reset():(this._lastPos=ke(this.element,l.targetTouches)[0],this.move({preventDefault:()=>l.preventDefault()},this._lastPos))}touchend(l){l.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)p.width||l.y>p.height;p.locationPoint3D(g).distSqr(l)180;){let g=p.locationPoint3D(_);if(g.x>=0&&g.y>=0&&g.x<=p.width&&g.y<=p.height)break;_.lng>p.center.lng?_.lng-=360:_.lng+=360}return _}let nv={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%)"},nh={rotation:0,rotationAlignment:"auto",pitchAlignment:"auto",occludedOpacity:.2,altitude:0};class Ff extends r.E{constructor(l,p){super(),(l instanceof HTMLElement||p)&&(l=Object.assign({element:l},p)),r.aY(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this);let{anchor:g="center",color:C="#3FB1CE",scale:x=1,draggable:A=!1,clickTolerance:R=0,rotation:B=nh.rotation,rotationAlignment:H=nh.rotationAlignment,pitchAlignment:G=nh.pitchAlignment,occludedOpacity:J=nh.occludedOpacity,altitude:K=nh.altitude}=l||{};this._anchor=g,this._color=C,this._scale=x,this._draggable=A,this._clickTolerance=R,this._rotation=B,this._rotationAlignment=H,this._pitchAlignment=G,this._occludedOpacity=J,this._altitude=K,this._state="inactive",this._isDragging=!1,this._updateMoving=()=>this._update(!0),l&&l.element?(this._element=l.element,this._offset=r.P.convert(l&&l.offset||[0,0])):(this._defaultMarker=!0,this._element=this._createDefaultMarker(),this._offset=r.P.convert(l&&l.offset||[0,-14])),this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label","Map marker"),this._element.hasAttribute("role")||this._element.setAttribute("role","img"),this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",de=>{de.preventDefault()}),this._element.addEventListener("mousedown",de=>{de.preventDefault()});let oe=this._element.classList;for(let de in nv)oe.remove(`mapboxgl-marker-anchor-${de}`);oe.add(`mapboxgl-marker-anchor-${this._anchor}`);let le=l&&l.className?l.className.trim().split(/\s+/):[];oe.add(...le),this._popup=null}_createDefaultMarker(){let l=V("div"),p=$("svg",{display:"block",height:41*this._scale+"px",width:27*this._scale+"px",viewBox:"0 0 27 41"},l);if(this._altitude===0){let g=$("radialGradient",{id:"shadowGradient"},$("defs",{},p));$("stop",{offset:"10%","stop-opacity":.4},g),$("stop",{offset:"100%","stop-opacity":.05},g),$("ellipse",{cx:13.5,cy:34.8,rx:10.5,ry:5.25,fill:"url(#shadowGradient)"},p)}return $("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"},p),$("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"},p),$("circle",{fill:"white",cx:13.5,cy:13.5,r:5.5},p),l}addTo(l){return l===this._map||(this.remove(),this._map=l,l.getCanvasContainer().appendChild(this._element),l.on("move",this._updateMoving),l.on("moveend",this._update),l.on("remove",this._clearFadeTimer),l._addMarker(this),this.setDraggable(this._draggable),this._update(),l.on("click",this._onMapClick)),this}remove(){let l=this._map;return l&&(l.off("click",this._onMapClick),l.off("move",this._updateMoving),l.off("moveend",this._update),l.off("mousedown",this._addDragHandler),l.off("touchstart",this._addDragHandler),l.off("mouseup",this._onUp),l.off("touchend",this._onUp),l.off("mousemove",this._onMove),l.off("touchmove",this._onMove),l.off("remove",this._clearFadeTimer),l._removeMarker(this),this._map=void 0),this._clearFadeTimer(),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(l){return this._lngLat=r.aR.convert(l),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(!0),this}setAltitude(l){return l===this._altitude||(this._defaultMarker&&(this._altitude===0&&l!==0||this._altitude!==0&&l===0)&&(this._element=this._createDefaultMarker()),this._altitude=l||nh.altitude,this._update()),this}getAltitude(){return this._altitude}getElement(){return this._element}setPopup(l){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")),l){if(!("offset"in l.options)){let C=Math.sqrt(Math.pow(13.5,2)/2);l.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[C,-1*(38.1-13.5+C)],"bottom-right":[-C,-1*(38.1-13.5+C)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=l,l._marker=this,l._altitude=this._altitude,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(l){let p=l.code,g=l.charCode||l.keyCode;p!=="Space"&&p!=="Enter"&&g!==32&&g!==13||this.togglePopup()}_onMapClick(l){let p=l.originalEvent.target,g=this._element;this._popup&&(p===g||g.contains(p))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){let l=this._popup;return l?(l.isOpen()?(l.remove(),this._element.setAttribute("aria-expanded","false")):this._map&&(l.addTo(this._map),this._element.setAttribute("aria-expanded","true")),this):this}_behindTerrain(){let l=this._map,p=this._pos;if(!l||!p)return!1;let g=l.unproject(p,this._altitude),C=l.getFreeCameraOptions();if(!C.position)return!1;let x=C.position.toLngLat();return x.distanceTo(g)<.9*x.distanceTo(this._lngLat)}_evaluateOpacity(){let l=this._map;if(!l)return;let p=this._pos;if(!p||p.x<0||p.x>l.transform.width||p.y<0||p.y>l.transform.height)return void this._clearFadeTimer();let g=l.unproject(p,this._altitude),C;l._showingGlobe()&&r.eY(l.transform,this._lngLat)?C=0:(C=1-l._queryFogOpacity(g),l.transform._terrainEnabled()&&l.getTerrain()&&this._behindTerrain()&&(C*=this._occludedOpacity)),this._element.style.opacity=`${C}`,this._element.style.pointerEvents=C>0?"auto":"none",this._popup&&this._popup._setOpacity(C),this._fadeTimer=null}_clearFadeTimer(){this._fadeTimer&&(clearTimeout(this._fadeTimer),this._fadeTimer=null)}_updateDOM(){let l=this._pos;if(!l||!this._map)return;let p=this._offset.mult(this._scale);this._element.style.transform=` translate(${l.x}px,${l.y}px) ${nv[this._anchor]} ${this._calculateXYTransform()} ${this._calculateZTransform()} translate(${p.x}px,${p.y}px) `}_calculateXYTransform(){let l=this._pos,p=this._map,g=this.getPitchAlignment();if(!p||!l||g!=="map")return"";if(!p._showingGlobe()){let B=p.getPitch();return B?`rotateX(${B}deg)`:""}let C=r.cW(r.eZ(p.transform,this._lngLat)),x=l.sub(r.e_(p.transform)),A=Math.abs(x.x)+Math.abs(x.y);if(A===0)return"";let R=C/A;return`rotateX(${-x.y*R}deg) rotateY(${x.x*R}deg)`}_calculateZTransform(){let l=this._pos,p=this._map;if(!p||!l)return"";let g=0,C=this.getRotationAlignment();if(C==="map")if(p._showingGlobe()){let x=p.project(new r.aR(this._lngLat.lng,this._lngLat.lat+.001),this._altitude),A=p.project(new r.aR(this._lngLat.lng,this._lngLat.lat-.001),this._altitude).sub(x);g=r.cW(Math.atan2(A.y,A.x))-90}else g=-p.getBearing();else if(C==="horizon"){let x=r.ah(4,6,p.getZoom()),A=r.e_(p.transform);A.y+=x*p.transform.height;let R=l.sub(A),B=r.cW(Math.atan2(R.y,R.x));g=(B>90?B-270:B+90)*(1-x)}return g+=this._rotation,g?`rotateZ(${g}deg)`:""}_update(l){cancelAnimationFrame(this._updateFrameId);let p=this._map;p&&(p.transform.renderWorldCopies&&(this._lngLat=CT(this._lngLat,this._pos,p.transform)),this._pos=p.project(this._lngLat,this._altitude),l===!0?this._updateFrameId=requestAnimationFrame(()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())}):this._pos=this._pos.round(),p._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(p._showingGlobe()||p.getTerrain()||p.getFog())&&!this._fadeTimer&&(this._fadeTimer=window.setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(l){return this._offset=r.P.convert(l),this._update(),this}addClassName(l){return this._element.classList.add(l),this}removeClassName(l){return this._element.classList.remove(l),this}toggleClassName(l){return this._element.classList.toggle(l)}_onMove(l){let p=this._map;if(!p)return;let g=this._pointerdownPos,C=this._positionDelta;if(g&&C){if(!this._isDragging){let x=this._clickTolerance||p._clickTolerance;if(l.point.dist(g)_.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(_.minPitch!=null&&_.maxPitch!=null&&_.minPitch>_.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(_.minPitch!=null&&_.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(_.maxPitch!=null&&_.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(_.antialias&&r.eW(window)&&(_.antialias=!1,r.w("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Bd(_.minZoom,_.maxZoom,_.minPitch,_.maxPitch,_.renderWorldCopies,null,null),_),this._repaint=!!_.repaint,this._interactive=_.interactive,this._minTileCacheSize=_.minTileCacheSize,this._maxTileCacheSize=_.maxTileCacheSize,this._failIfMajorPerformanceCaveat=_.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=_.preserveDrawingBuffer,this._antialias=_.antialias,this._trackResize=_.trackResize,this._bearingSnap=_.bearingSnap,this._refreshExpiredTiles=_.refreshExpiredTiles,this._fadeDuration=_.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=_.crossSourceCollisions,this._collectResourceTiming=_.collectResourceTiming,this._language=this._parseLanguage(_.language),this._worldview=_.worldview,this._renderTaskQueue=new gl,this._domRenderTaskQueue=new gl,this._controls=[],this._markers=[],this._popups=[],this._mapId=r.b2(),this._locale=Object.assign({},oC,_.locale),this._clickTolerance=_.clickTolerance,this._cooperativeGestures=_.cooperativeGestures,this._performanceMetricsCollection=_.performanceMetricsCollection,this._tessellationStep=_.tessellationStep,this._containerWidth=0,this._containerHeight=0,this._showParseStatus=!0,this._precompilePrograms=_.precompilePrograms,this._scaleFactorChanged=!1,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new Rf(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._frameId=0,this._scaleFactor=_.scaleFactor,this._requestManager=new we(_.transformRequest,_.accessToken,_.testMode),this._silenceAuthErrors=!!_.testMode,this._contextCreateOptions=_.contextCreateOptions?Object.assign({},_.contextCreateOptions):{},typeof _.container=="string"){let p=document.getElementById(_.container);if(!p)throw new Error(`Container '${_.container.toString()}' not found.`);this._container=p}else{if(!(_.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=_.container}if(this._container.childNodes.length>0&&r.w("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."),_.maxBounds&&this.setMaxBounds(_.maxBounds),this._spriteFormat=_.spriteFormat,r.aY(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._tp||(this._tp=new Vh),this._tp.registerParameter(this,["Debug"],"showOverdrawInspector"),this._tp.registerParameter(this,["Debug"],"showTileBoundaries"),this._tp.registerParameter(this,["Debug"],"showParseStatus"),this._tp.registerParameter(this,["Debug"],"repaint"),this._tp.registerParameter(this,["Debug"],"showTileAABBs"),this._tp.registerParameter(this,["Debug"],"showPadding"),this._tp.registerParameter(this,["Debug"],"showCollisionBoxes",{noSave:!0}),this._tp.registerParameter(this.transform,["Debug"],"freezeTileCoverage",{noSave:!0},()=>{this._update()}),this._tp.registerParameter(this,["Debug","Wireframe"],"showTerrainWireframe"),this._tp.registerParameter(this,["Debug","Wireframe"],"showLayers2DWireframe"),this._tp.registerParameter(this,["Debug","Wireframe"],"showLayers3DWireframe"),this._tp.registerParameter(this,["Scaling"],"_scaleFactor",{min:.1,max:10,step:.1},()=>{this.setScaleFactor(this._scaleFactor)}),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");if(this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this._fullscreenchangeEvent="onfullscreenchange"in document?"fullscreenchange":"webkitfullscreenchange",window.addEventListener("online",this._onWindowOnline,!1),window.addEventListener("resize",this._onWindowResize,!1),window.addEventListener("orientationchange",this._onWindowResize,!1),window.addEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.addEventListener("visibilitychange",this._onVisibilityChange,!1),this.handlers=new jd(this,_),this._localFontFamily=_.localFontFamily,this._localIdeographFontFamily=_.localIdeographFontFamily,(_.style||!_.testMode)&&this.setStyle(_.style||r.e.DEFAULT_STYLE,{config:_.config,localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),_.projection&&this.setProjection(_.projection),this.indoor=new Ny(this),_.hash&&(this._hash=new hT(typeof _.hash=="string"&&_.hash||void 0).addTo(this)),!this._hash||!this._hash._onHashChange()){l.center==null&&l.zoom==null||(this.transform._unmodified=!1),this.jumpTo({center:_.center,zoom:_.zoom,bearing:_.bearing,pitch:_.pitch});let p=_.bounds;p&&(this.resize(),this.fitBounds(p,Object.assign({},_.fitBoundsOptions,{duration:0})))}this.resize(),_.attributionControl&&this.addControl(new iv({customAttribution:_.customAttribution})),this._logoControl=new Dg,this.addControl(this._logoControl,_.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this._postStyleLoadEvent()}),this.on("data",p=>{this._update(p.dataType==="style"),this.fire(new r.z(`${p.dataType}data`,p))}),this.on("dataloading",p=>{this.fire(new r.z(`${p.dataType}dataloading`,p))}),this._interactions=new $M(this)}_getMapId(){return this._mapId}addControl(_,l){if(l===void 0&&(l=_.getDefaultPosition?_.getDefaultPosition():"top-right"),!_||!_.onAdd)return this.fire(new r.y(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let p=_.onAdd(this);this._controls.push(_);let g=this._controlPositions[l];return l.indexOf("bottom")!==-1?g.insertBefore(p,g.firstChild):g.appendChild(p),this}removeControl(_){if(!_||!_.onRemove)return this.fire(new r.y(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let l=this._controls.indexOf(_);return l>-1&&this._controls.splice(l,1),_.onRemove(this),this}hasControl(_){return this._controls.indexOf(_)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(_){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));let l=!this._moving;return l&&this.fire(new r.z("movestart",_)).fire(new r.z("move",_)),this.fire(new r.z("resize",_)),l&&this.fire(new r.z("moveend",_)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(_){return this.transform.setMaxBounds(r.aI.convert(_)),this._update()}setMinZoom(_){if((_=_??-2)>=-2&&_<=this.transform.maxZoom)return this.transform.minZoom=_,this._update(),this.getZoom()<_?this.setZoom(_):this.fire(new r.z("zoomstart")).fire(new r.z("zoom")).fire(new r.z("zoomend")),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(_){if((_=_??22)>=this.transform.minZoom)return this.transform.maxZoom=_,this._update(),this.getZoom()>_?this.setZoom(_):this.fire(new r.z("zoomstart")).fire(new r.z("zoom")).fire(new r.z("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(_){if((_=_??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(_>=0&&_<=this.transform.maxPitch)return this.transform.minPitch=_,this._update(),this.getPitch()<_?this.setPitch(_):this.fire(new r.z("pitchstart")).fire(new r.z("pitch")).fire(new r.z("pitchend")),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(_){if((_=_??85)>85)throw new Error("maxPitch must be less than or equal to 85");if(_>=this.transform.minPitch)return this.transform.maxPitch=_,this._update(),this.getPitch()>_?this.setPitch(_):this.fire(new r.z("pitchstart")).fire(new r.z("pitch")).fire(new r.z("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getScaleFactor(){return this._scaleFactor}setScaleFactor(_){return this._scaleFactor=_,this.painter.scaleFactor=_,this._tp.refreshUI(),this._scaleFactorChanged=!0,this.style._updateFilteredLayers(l=>l.type==="symbol"),this._update(!0),this}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(_){return this.transform.renderWorldCopies=_,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(_){return _==="auto"?navigator.language:Array.isArray(_)?_.length===0?void 0:_.map(l=>l==="auto"?navigator.language:l):_}setLanguage(_){let l=this._parseLanguage(_);if(!this.style||l===this._language)return this;this._language=l,this.style.reloadSources();for(let p of this._controls)p._setLanguage&&p._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(_){return this.style&&_!==this._worldview?(this._worldview=_,this._styleDirty=!0,this.style.reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return this.transform.projection.name==="globe"}setProjection(_){return this._lazyInitEmptyStyle(),_?typeof _=="string"&&(_={name:_}):_=null,this._useExplicitProjection=!!_,this._prioritizeAndUpdateProjection(_,this.style.projection)}_updateProjectionTransition(){if(this.getProjection().name!=="globe")return;let _=this.transform,l=_.projection.name,p;l==="globe"&&_.zoom>=r.cK?(_.setMercatorFromTransition(),p=!0):l==="mercator"&&_.zoom=r.cK?this.transform.setMercatorFromTransition():this.transform.setProjection(_),this.style.applyProjectionUpdate(),l&&(this.painter.clearBackgroundTiles(),this.style.clearSources(),this._update(!0),this._forceMarkerAndPopupUpdate(!0)),this}project(_,l){return this.transform.locationPoint3D(r.aR.convert(_),l)}unproject(_,l){return this.transform.pointLocation3D(r.P.convert(_),l)}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(_,l,p){let g=C=>{let x=[];if(Array.isArray(l)){let A=l.filter(R=>this.getLayer(R));x=A.length?this.queryRenderedFeatures(C,{layers:A}):[]}else x=this.queryRenderedFeatures(C,{target:l});return x};if(_==="mouseenter"||_==="mouseover"){let C=!1;return{listener:p,targets:l,delegates:{mousemove:A=>{let R=g(A.point);R.length?C||(C=!0,p.call(this,new gc(_,this,A.originalEvent,{features:R}))):C=!1},mouseout:()=>{C=!1}}}}if(_==="mouseleave"||_==="mouseout"){let C=!1;return{listener:p,targets:l,delegates:{mousemove:R=>{g(R.point).length?C=!0:C&&(C=!1,p.call(this,new gc(_,this,R.originalEvent)))},mouseout:R=>{C&&(C=!1,p.call(this,new gc(_,this,R.originalEvent)))}}}}{let C=x=>{let A=g(x.point);A.length&&(x.features=A,p.call(this,x),delete x.features)};return{listener:p,targets:l,delegates:{[_]:C}}}}on(_,l,p){if(typeof l=="function"||p===void 0)return super.on(_,l);if(typeof l=="string"&&(l=[l]),!this._areTargetsValid(l))return this;let g=this._createDelegatedListener(_,l,p);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[_]=this._delegatedListeners[_]||[],this._delegatedListeners[_].push(g);for(let C in g.delegates)this.on(C,g.delegates[C]);return this}once(_,l,p){if(typeof l=="function"||p===void 0)return super.once(_,l);if(typeof l=="string"&&(l=[l]),!this._areTargetsValid(l))return this;let g=this._createDelegatedListener(_,l,p);for(let C in g.delegates)this.once(C,g.delegates[C]);return this}off(_,l,p){if(typeof l=="function"||p===void 0)return super.off(_,l);if(typeof l=="string"&&(l=[l]),!this._areTargetsValid(l))return this;let g=this._delegatedListeners?this._delegatedListeners[_]:void 0;return g&&(C=>{for(let x=0;x{if(p){let C=typeof p=="string"?p:p instanceof Error?p.message:p.error;r.w(`Unable to perform style diff: ${C}. Rebuilding the style from scratch.`),this._updateStyle(_,l)}else g&&this._update(!0)},()=>this._postStyleLoadEvent()),this):(this._localIdeographFontFamily=l.localIdeographFontFamily,this._localFontFamily=l.localFontFamily,this._updateStyle(_,l))}_getUIString(_){let l=this._locale[_];if(l==null)throw new Error(`Missing UI string '${_}'`);return l}_updateStyle(_,l){if(this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),_){let p=Object.assign({},l);l&&l.config&&(p.initialConfig=l.config,delete p.config),this.style=new eh(this,p).load(_),this.style.setEventedParent(this,{style:this.style})}return this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new eh(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(r.w("There is no style added to the map."),!1)}_isValidId(_){return _==null?(this.fire(new r.y(new Error("IDs can't be empty."))),!1):!r.dm(_)||(this.fire(new r.y(new Error(`IDs can't contain special symbols: "${_}".`))),!1)}_isTargetValid(_){return"featuresetId"in _?this._isValidId("importId"in _?_.importId:_.featuresetId):"layerId"in _&&this._isValidId(_.layerId)}_areTargetsValid(_){if(Array.isArray(_)){for(let l of _)if(!this._isValidId(l))return!1;return!0}return this._isTargetValid(_)}addSource(_,l){return this._isValidId(_)?(this._lazyInitEmptyStyle(),this.style.addSource(_,l),this._update(!0)):this}isSourceLoaded(_){return!!this._isValidId(_)&&!!this.style&&this.style._isSourceCacheLoaded(_)}areTilesLoaded(){return this.style.areTilesLoaded()}addSourceType(_,l,p){this._lazyInitEmptyStyle(),this.style.addSourceType(_,l,p)}removeSource(_){return this._isValidId(_)?(this.style.removeSource(_),this._updateTerrain(),this._update(!0)):this}getSource(_){return this._isValidId(_)?this.style.getOwnSource(_):null}addImage(_,l,{pixelRatio:p=1,sdf:g=!1,stretchX:C,stretchY:x,content:A}={}){this._lazyInitEmptyStyle();let R=r.I.from(_);if(l instanceof HTMLImageElement||ImageBitmap&&l instanceof ImageBitmap){let{width:B,height:H,data:G}=r.o.getImageData(l);this.style.addImage(R,{data:new r.q({width:B,height:H},G),pixelRatio:p,stretchX:C,stretchY:x,content:A,sdf:g,version:0,usvg:!1})}else if(l.width===void 0||l.height===void 0)this.fire(new r.y(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{let{width:B,height:H}=l,G=l;this.style.addImage(R,{data:new r.q({width:B,height:H},new Uint8Array(G.data)),pixelRatio:p,stretchX:C,stretchY:x,content:A,sdf:g,usvg:!1,version:0,userImage:G}),G.onAdd&&G.onAdd(this,_)}}updateImage(_,l){this._lazyInitEmptyStyle();let p=r.I.from(_),g=this.style.getImage(p);if(!g)return void this.fire(new r.y(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let C=l instanceof HTMLImageElement||ImageBitmap&&l instanceof ImageBitmap?r.o.getImageData(l):l,{width:x,height:A,data:R}=C;if(x===void 0||A===void 0)return void this.fire(new r.y(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`")));if(x!==(g.usvg?g.icon.usvg_tree.width:g.data.width)||A!==(g.usvg?g.icon.usvg_tree.height:g.data.height))return void this.fire(new r.y(new Error(`The width and height of the updated image (${x}, ${A}) must be that same as the previous version of the image (${g.data.width}, ${g.data.height})`)));let B=!(l instanceof HTMLImageElement||ImageBitmap&&l instanceof ImageBitmap),H=!1;g.usvg?(g.data=new r.q({width:x,height:A},new Uint8Array(R)),g.usvg=!1,g.icon=void 0,H=!0):g.data.replace(R,B),this.style.updateImage(p,g,H)}hasImage(_){return _?!!this.style&&!!this.style.getImage(r.I.from(_)):(this.fire(new r.y(new Error("Missing required image id"))),!1)}removeImage(_){this.style.removeImage(r.I.from(_))}loadImage(_,l){r.n(this._requestManager.transformRequest(_,r.R.Image),(p,g)=>{l(p,g instanceof HTMLImageElement?r.o.getImageData(g):g)})}listImages(){return this.style.listImages().map(_=>_.name)}addModel(_,l){this._lazyInitEmptyStyle(),this.style.addModel(_,l)}hasModel(_){return _?this.style.hasModel(_):(this.fire(new r.y(new Error("Missing required model id"))),!1)}removeModel(_){this.style.removeModel(_)}listModels(){return this.style.listModels()}addLayer(_,l){return this._isValidId(_.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(_,l),this._update(!0)):this}getSlot(_){let l=this.getLayer(_);return l&&l.slot||null}setSlot(_,l){return this.style.setSlot(_,l),this.style.mergeLayers(),this._update(!0)}addImport(_,l){return this.style.addImport(_,l).catch(p=>this.fire(new r.y(new Error("Failed to add import",p)))),this}updateImport(_,l){return typeof l!="string"&&l.id!==_?(this.removeImport(_),this.addImport(l)):(this.style.updateImport(_,l),this._update(!0))}removeImport(_){return this.style.removeImport(_),this}moveImport(_,l){return this.style.moveImport(_,l),this._update(!0)}moveLayer(_,l){return this._isValidId(_)?(this.style.moveLayer(_,l),this._update(!0)):this}removeLayer(_){return this._isValidId(_)?(this.style.removeLayer(_),this._update(!0)):this}getLayer(_){if(!this._isValidId(_))return null;let l=this.style.getOwnLayer(_);return l?l.type==="custom"?l.implementation:l.serialize():void 0}getSlots(){return this.style.getSlots()}setLayerZoomRange(_,l,p){return this._isValidId(_)?(this.style.setLayerZoomRange(_,l,p),this._update(!0)):this}setFilter(_,l,p={}){return this._isValidId(_)?(this.style.setFilter(_,l,p),this._update(!0)):this}getFilter(_){return this._isValidId(_)?this.style.getFilter(_):null}setPaintProperty(_,l,p,g={}){return this._isValidId(_)?(this.style.setPaintProperty(_,l,p,g),this._update(!0)):this}getPaintProperty(_,l){return this._isValidId(_)?this.style.getPaintProperty(_,l):null}setLayoutProperty(_,l,p,g={}){return this._isValidId(_)?(this.style.setLayoutProperty(_,l,p,g),this._update(!0)):this}getLayoutProperty(_,l){return this._isValidId(_)?this.style.getLayoutProperty(_,l):null}getGlyphsUrl(){return this.style.getGlyphsUrl()}setGlyphsUrl(_){return this.style.setGlyphsUrl(_),this._update(!0)}getSchema(_){return this.style.getSchema(_)}setSchema(_,l){return this.style.setSchema(_,l),this._update(!0)}getConfig(_){return this.style.getConfig(_)}setConfig(_,l){return this.style.setConfig(_,l),this._update(!0)}getConfigProperty(_,l){return this.style.getConfigProperty(_,l)}setConfigProperty(_,l,p){return this.style.setConfigProperty(_,l,p),this._update(!0)}getFeaturesetDescriptors(_){return this.style.getFeaturesetDescriptors(_)}setLights(_){if(this._lazyInitEmptyStyle(),_&&_.length===1&&_[0].type==="flat"){let l=_[0];l.properties?this.style.setFlatLight(l.properties,l.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(_),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){let _=this.style.getLights()||[];return _.length===0&&_.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),_}setLight(_,l={}){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:_}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(_){return this._lazyInitEmptyStyle(),!_&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(_),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(_){return this._lazyInitEmptyStyle(),this.style.setFog(_),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setSnow(_){return this._lazyInitEmptyStyle(),this.style.setSnow(_),this._update(!0)}getSnow(){return this.style?this.style.getSnow():null}setRain(_){return this._lazyInitEmptyStyle(),this.style.setRain(_),this._update(!0)}getRain(){return this.style?this.style.getRain():null}setColorTheme(_){return this._lazyInitEmptyStyle(),this.style.setColorTheme(_),this._update(!0)}setImportColorTheme(_,l){return this._lazyInitEmptyStyle(),this.style.setImportColorTheme(_,l),this._update(!0)}setCamera(_){return this.style.setCamera(_),this._triggerCameraUpdate(_)}_triggerCameraUpdate(_){return this._update(this.transform.setOrthographicProjectionAtLowPitch(_["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(_){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(r.aR.convert(_),this.transform):0}setFeatureState(_,l){return _.source&&!this._isValidId(_.source)?this:(this.style.setFeatureState(_,l),this._update())}removeFeatureState(_,l){return _.source&&!this._isValidId(_.source)?this:(this.style.removeFeatureState(_,l),this._update())}getFeatureState(_){return _.source&&!this._isValidId(_.source)?null:this.style.getFeatureState(_)}_selectIndoorFloor(_){this.indoor.selectFloor(_)}_addIndoorControl(){this._indoorControl||(this._indoorControl=new I1),this.addControl(this._indoorControl,"right")}_removeIndoorControl(){this._indoorControl&&this.removeControl(this._indoorControl)}_updateContainerDimensions(){if(!this._container)return;let _=this._container.getBoundingClientRect().width||400,l=this._container.getBoundingClientRect().height||300,p,g,C,x=this._container;for(;x&&(!g||!C);){let A=window.getComputedStyle(x).transform;A&&A!=="none"&&(p=A.match(/matrix.*\((.+)\)/)[1].split(", "),p[0]&&p[0]!=="0"&&p[0]!=="1"&&(g=p[0]),p[3]&&p[3]!=="0"&&p[3]!=="1"&&(C=p[3])),x=x.parentElement}this._containerWidth=g?Math.abs(_/g):_,this._containerHeight=C?Math.abs(l/C):l}_detectMissingCSS(){window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&r.w("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(){let _=this._container;_.classList.add("mapboxgl-map"),(this._missingCSSCanary=V("div","mapboxgl-canary",_)).style.visibility="hidden",this._detectMissingCSS();let l=this._canvasContainer=V("div","mapboxgl-canvas-container",_);this._canvas=V("canvas","mapboxgl-canvas",l),this._interactive&&(l.classList.add("mapboxgl-interactive"),this._canvas.setAttribute("tabindex","0")),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);let p=this._controlContainer=V("div","mapboxgl-control-container",_),g=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach(C=>{g[C]=V("div",`mapboxgl-ctrl-${C}`,p)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(_,l){let p=r.o.devicePixelRatio||1;this._canvas.width=p*Math.ceil(_),this._canvas.height=p*Math.ceil(l),this._canvas.style.width=`${_}px`,this._canvas.style.height=`${l}px`}_addMarker(_){this._markers.push(_)}_removeMarker(_){let l=this._markers.indexOf(_);l!==-1&&this._markers.splice(l,1)}_addPopup(_){this._popups.push(_)}_removePopup(_){let l=this._popups.indexOf(_);l!==-1&&this._popups.splice(l,1)}_setupPainter(){let _=Object.assign({},N.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),l=this._canvas.getContext("webgl2",_);l?(pr(l,!0),this.painter=new Xb(l,this._contextCreateOptions,this.transform,this._scaleFactor,this._tp,this._worldview),this.on("data",p=>{p.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),r.k.testSupport(l)):this.fire(new r.y(new Error("Failed to initialize WebGL")))}_contextLost(_){_.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new r.z("webglcontextlost",{originalEvent:_}))}_contextRestored(_){this._setupPainter(),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight)),this._updateTerrain(),this.style&&(this.style.clearLayers(),this.style.imageManager.destroyAtlasTextures(),this.style.reloadModels(),this.style.clearSources()),this._update(),this.fire(new r.z("webglcontextrestored",{originalEvent:_}))}_onMapScroll(_){if(_.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}idle(){return!this.isMoving()&&this.loaded()}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}frameReady(){return this.loaded()&&!this._placementDirty}_update(_){return this.style?(this._styleDirty=this._styleDirty||_,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(_){return this._update(),this._renderTaskQueue.add(_)}_cancelRenderFrame(_){this._renderTaskQueue.remove(_)}_requestDomTask(_){!this.loaded()||this.loaded()&&!this.isMoving()?_():this._domRenderTaskQueue.add(_)}_render(_){let l;this.fire(new r.z("renderstart")),++this._frameId;let p=this.painter.context.extTimerQuery,g=r.o.now(),C=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(l=C.createQuery(),C.beginQuery(p.TIME_ELAPSED_EXT,l)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],performance.now())),this._renderTaskQueue.run(_),this._domRenderTaskQueue.run(_),this._removed)return;this._updateProjectionTransition();let x=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;let H=this.transform.zoom,G=this.transform.pitch,J=r.o.now(),K=new r.ac(H,{now:J,fadeDuration:x,pitch:G,transition:this.style.transition,worldview:this._worldview});this.style.update(K)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let A=!1;this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),A=this._updateAverageElevation(g),this.style.updateSources(this.transform),this.style.updateImageProviders(),this.isMoving()||this._forceMarkerAndPopupUpdate()):A=this._updateAverageElevation(g);let R=this.style&&this.style._updatePlacement(this.painter,this.painter.transform,this.showCollisionBoxes,x,this._crossSourceCollisions,this.painter.replacementSource,this._scaleFactorChanged);if(this._scaleFactorChanged&&(this._scaleFactorChanged=!1),R&&(this._placementDirty=R.needsRerender),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showParseStatus:this.showParseStatus,wireframe:{terrain:this.showTerrainWireframe,layers2D:this.showLayers2DWireframe,layers3D:this.showLayers3DWireframe},showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:x,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 r.z("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,m.mark(d.load),this.fire(new r.z("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&(this.style.snow||this.style.rain)&&(this._styleDirty=!0),this.style&&this.style.imageManager.hasPatternsInFlight()&&(this._styleDirty=!0),this.style&&!this.style.modelManager.isLoaded()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),l){let H=r.o.now()-g;C.endQuery(p.TIME_ELAPSED_EXT),setTimeout(()=>{let G=C.getQueryParameter(l,C.QUERY_RESULT)/1e6;C.deleteQuery(l),this.fire(new r.z("gpu-timing-frame",{cpuTime:H,gpuTime:G}))},50)}if(this.listens("gpu-timing-layer")){let H=this.painter.collectGpuTimers();setTimeout(()=>{let G=this.painter.queryGpuTimers(H);this.fire(new r.z("gpu-timing-layer",{layerTimes:G}))},50)}if(this.listens("gpu-timing-deferred-render")){let H=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{let G=this.painter.queryGpuTimeDeferredRender(H);this.fire(new r.z("gpu-timing-deferred-render",{gpuTime:G}))},50)}let B=this._sourcesDirty||this._styleDirty||this._placementDirty||A;if(B||this._repaint)this.triggerRepaint();else{let H=this.idle();if(H&&(A=this._updateAverageElevation(g,!0)),A)this.triggerRepaint();else if(this._triggerFrame(!1),H&&(this.fire(new r.z("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){let G=this._calculateSpeedIndex();this.fire(new r.z("speedindexcompleted",{speedIndex:G})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||B||(this._fullyLoaded=!0,m.mark(d.fullLoad),this._performanceMetricsCollection&&Cn(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(_){for(let l of this._markers)_&&!this.getRenderWorldCopies()&&(l._lngLat=l._lngLat.wrap()),l._update();for(let l of this._popups)!_||this.getRenderWorldCopies()||l._trackPointer||(l._lngLat=l._lngLat.wrap()),l._update()}_updateAverageElevation(_,l=!1){let p=C=>(this.transform.averageElevation=C,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&p(0);let g=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(g||(l||_-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(_)){let C=this.transform.averageElevation,x=this.transform.sampleAverageElevation();this.transform.elevation!=null&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(x)?x=0:this._averageElevationLastSampledAt=_;let A=Math.abs(C-x);if(A>1){if(this._isInitialLoad||g)return this._averageElevation.jumpTo(x),p(x);this._averageElevation.easeTo(x,_,300)}else if(A>1e-4)return this._averageElevation.jumpTo(x),p(x)}return!!this._averageElevation.isEasing(_)&&p(this._averageElevation.getValue(_))}_authenticate(){Co(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,_=>{if(_&&(_.message===Et||_.status===401)){let l=this.painter.context.gl;pr(l,!1),this._logoControl instanceof Dg&&this._logoControl._updateLogo(),l&&l.clear(l.DEPTH_BUFFER_BIT|l.COLOR_BUFFER_BIT|l.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new r.y(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/")))}}),fn(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_postStyleLoadEvent(){this.style.globalId&&vn(this._requestManager._customAccessToken,{map:this,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_updateTerrain(){let _=this._isDragging();this.painter.updateTerrain(this.style,_)}_calculateSpeedIndex(){let _=this.painter.canvasCopy(),l=this.painter.getCanvasCopiesAndTimestamps();l.timeStamps.push(performance.now());let p=this.painter.context.gl,g=p.createFramebuffer();function C(x){p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_2D,x,0);let A=new Uint8Array(p.drawingBufferWidth*p.drawingBufferHeight*4);return p.readPixels(0,0,p.drawingBufferWidth,p.drawingBufferHeight,p.RGBA,p.UNSIGNED_BYTE,A),A}return p.bindFramebuffer(p.FRAMEBUFFER,g),this._canvasPixelComparison(C(_),l.canvasCopies.map(C),l.timeStamps)}_canvasPixelComparison(_,l,p){let g=p[1]-p[0],C=_.length/4;for(let x=0;x{let p=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,p&&this._render(l)}))}_preloadTiles(_){let l=this.style?this.style.getSourceCaches():[];return r.bw(l,(p,g)=>p._preloadTiles(_,g),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(_){this._trackResize&&this.resize({originalEvent:_})._update()}_onVisibilityChange(){document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(_){this._showTileBoundaries!==_&&(this._showTileBoundaries=_,this._tp.refreshUI(),this._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(_){this._showParseStatus!==_&&(this._showParseStatus=_,this._tp.refreshUI(),this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(_){this._showTerrainWireframe!==_&&(this._showTerrainWireframe=_,this._tp.refreshUI(),this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(_){this._showLayers2DWireframe!==_&&(this._showLayers2DWireframe=_,this._tp.refreshUI(),this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(_){this._showLayers3DWireframe!==_&&(this._showLayers3DWireframe=_,this._tp.refreshUI(),this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(_){this._speedIndexTiming!==_&&(this._speedIndexTiming=_,this._update())}get showPadding(){return!!this._showPadding}set showPadding(_){this._showPadding!==_&&(this._showPadding=_,this._tp.refreshUI(),this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(_){this._showCollisionBoxes!==_&&(this._showCollisionBoxes=_,this._tp.refreshUI(),_?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(_){this._showOverdrawInspector!==_&&(this._showOverdrawInspector=_,this._tp.refreshUI(),this._update())}get repaint(){return!!this._repaint}set repaint(_){this._repaint!==_&&(this._repaint=_,this._tp.refreshUI(),this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(_){this._vertices=_,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(_){this._showTileAABBs!==_&&(this._showTileAABBs=_,this._tp.refreshUI(),_&&this._update())}_setCacheLimits(_,l){r.eX(_,l)}get version(){return s}},NavigationControl:class{constructor(_={}){this.options=Object.assign({},qM,_),this._container=V("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",l=>l.preventDefault()),this.options.showZoom&&(r.aY(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",l=>{this._map&&this._map.zoomIn({},{originalEvent:l})}),V("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",l=>{this._map&&this._map.zoomOut({},{originalEvent:l})}),V("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(r.aY(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",l=>{let p=this._map;p&&(this.options.visualizePitch?p.resetNorthPitch({},{originalEvent:l}):p.resetNorth({},{originalEvent:l}))}),this._compassIcon=V("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){let _=this._map;if(!_)return;let l=_.getZoom(),p=l===_.getMaxZoom(),g=l===_.getMinZoom();this._zoomInButton.disabled=p,this._zoomOutButton.disabled=g,this._zoomInButton.setAttribute("aria-disabled",p.toString()),this._zoomOutButton.setAttribute("aria-disabled",g.toString())}_rotateCompassArrow(){let _=this._map;if(!_)return;let l=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(_.transform.pitch*(Math.PI/180)),.5)}) rotateX(${_.transform.pitch}deg) rotateZ(${_.transform.angle*(180/Math.PI)}deg)`:`rotate(${_.transform.angle*(180/Math.PI)}deg)`;_._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=l)})}onAdd(_){return this._map=_,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),_.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&_.on("pitch",this._rotateCompassArrow),_.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new KM(_,this._compass,this.options.visualizePitch)),this._container}onRemove(){let _=this._map;_&&(this._container.remove(),this.options.showZoom&&_.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&_.off("pitch",this._rotateCompassArrow),_.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(_,l){let p=V("button",_,this._container);return p.type="button",p.addEventListener("click",l),p}_setButtonTitle(_,l){if(!this._map)return;let p=this._map._getUIString(`NavigationControl.${l}`);_.setAttribute("aria-label",p),_.firstElementChild&&_.firstElementChild.setAttribute("title",p)}},GeolocateControl:class extends r.E{constructor(_={}){super();let l=navigator.geolocation;this.options=Object.assign({geolocation:l},Ag,_),r.aY(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=R_(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(_){return this._map=_,this._container=V("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(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(_){let l=(p=!!this.options.geolocation)=>{this._supportsGeolocation=p,_(p)};this._supportsGeolocation!==void 0?_(this._supportsGeolocation):navigator.permissions!==void 0?navigator.permissions.query({name:"geolocation"}).then(p=>l(p.state!=="denied")).catch(()=>l()):l()}_isOutOfMapMaxBounds(_){let l=this._map.getMaxBounds(),p=_.coords;return!!l&&(p.longitudel.getEast()||p.latitudel.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(_){if(this._map){if(this._isOutOfMapMaxBounds(_))return this._setErrorState(),this.fire(new r.z("outofmaxbounds",_)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=_,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&&this._watchState!=="OFF"&&this._updateMarker(_),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(_),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new r.z("geolocate",_)),this._finish()}}_updateCamera(_){let l=new r.aR(_.coords.longitude,_.coords.latitude),p=_.coords.accuracy,g=this._map.getBearing(),C=Object.assign({bearing:g},this.options.fitBoundsOptions);this._map.fitBounds(l.toBounds(p),C,{geolocateSource:!0})}_updateMarker(_){if(_){let l=new r.aR(_.coords.longitude,_.coords.latitude);this._accuracyCircleMarker.setLngLat(l).addTo(this._map),this._userLocationDotMarker.setLngLat(l).addTo(this._map),this._accuracy=_.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){let _=this._map.transform,l=r.ce(1,_._center.lat)*_.worldSize,p=Math.ceil(2*this._accuracy*l);this._circleElement.style.width=`${p}px`,this._circleElement.style.height=`${p}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(_){if(this._map){if(this.options.trackUserLocation)if(_.code===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._geolocateButton.disabled=!0;let l=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",l),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",l),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(_.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new r.z("error",_)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(_){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",l=>l.preventDefault()),this._geolocateButton=V("button","mapboxgl-ctrl-geolocate",this._container),V("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",_===!1){r.w("Geolocation support is not available so the GeolocateControl will be disabled.");let l=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",l),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",l)}else{let l=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",l),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",l)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=V("div","mapboxgl-user-location"),this._dotElement.appendChild(V("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(V("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new Ff({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=V("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ff({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",l=>{l.geolocateSource||this._watchState!=="ACTIVE_LOCK"||l.originalEvent&&l.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new r.z("trackuserlocationend")))})}}_onDeviceOrientation(_){this._userLocationDotMarker&&(_.webkitCompassHeading?this._heading=_.webkitCompassHeading:_.absolute===!0&&(this._heading=-1*_.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return r.w("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 r.z("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 r.z("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 r.z("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(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let _;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(_={maximumAge:6e5,timeout:0},this._noTimeout=!0):(_=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,_),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=window.setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){let _=()=>{"ondeviceorientationabsolute"in window?window.addEventListener("deviceorientationabsolute",this._onDeviceOrientation):window.addEventListener("deviceorientation",this._onDeviceOrientation)};typeof DeviceMotionEvent<"u"&&typeof DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(l=>{l==="granted"&&_()}).catch(console.error):_()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),window.removeEventListener("deviceorientation",this._onDeviceOrientation),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:iv,ScaleControl:class{constructor(_={}){this.options=Object.assign({},kg,_),this._isNumberFormatSupported=(function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}})(),r.aY(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){let _=this.options.maxWidth||100,l=this._map,p=l._containerHeight/2,g=l._containerWidth/2-_/2,C=l.unproject([g,p]),x=l.unproject([g+_,p]),A=C.distanceTo(x);if(this.options.unit==="imperial"){let R=3.2808*A;R>5280?this._setScale(_,R/5280,"mile"):this._setScale(_,R,"foot")}else this.options.unit==="nautical"?this._setScale(_,A/1852,"nautical-mile"):A>=1e3?this._setScale(_,A/1e3,"kilometer"):this._setScale(_,A,"meter")}_setScale(_,l,p){this._map._requestDomTask(()=>{let g=(function(x){let A=Math.pow(10,`${Math.floor(x)}`.length-1),R=x/A;return R=R>=10?10:R>=5?5:R>=3?3:R>=2?2:R>=1?1:(function(B){let H=Math.pow(10,Math.ceil(-Math.log(B)/Math.LN10));return Math.round(B*H)/H})(R),A*R})(l),C=g/l;this._container.innerHTML=this._isNumberFormatSupported&&p!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:p}).format(g):`${g} ${Mg[p]}`,this._container.style.width=_*C+"px"})}onAdd(_){return this._map=_,this._language=_.getLanguage(),this._container=V("div","mapboxgl-ctrl mapboxgl-ctrl-scale",_.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(_){this._language=_,this._update()}setUnit(_){this.options.unit=_,this._update()}},FullscreenControl:class{constructor(_={}){this._fullscreen=!1,_&&_.container&&(_.container instanceof HTMLElement?this._container=_.container:r.w("Full screen control 'container' must be a DOM element.")),r.aY(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(_){return this._map=_,this._container||(this._container=this._map.getContainer()),this._controlContainer=V("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",r.w("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}_setupUI(){let _=this._fullscreenButton=V("button","mapboxgl-ctrl-fullscreen",this._controlContainer);V("span","mapboxgl-ctrl-icon",_).setAttribute("aria-hidden","true"),_.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){let _=this._getTitle();this._fullscreenButton.setAttribute("aria-label",_),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",_)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(document.fullscreenElement||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()?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},IndoorControl:I1,Popup:class extends r.E{constructor(_){super(),this.options=Object.assign(Object.create(Og),_),this._altitude=this.options.altitude,r.aY(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(_&&_.className?_.className.trim().split(/\s+/):[])}addTo(_){return this._map&&this.remove(),this._map=_,this.options.closeOnClick&&_.on("preclick",this._onClose),this.options.closeOnMove&&_.on("move",this._onClose),_.on("remove",this.remove),this._update(),_._addPopup(this),this._focusFirstElement(),this._trackPointer?(_.on("mousemove",this._onMouseEvent),_.on("mouseup",this._onMouseEvent),_._canvasContainer.classList.add("mapboxgl-track-pointer")):_.on("move",this._update),this.fire(new r.z("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);let _=this._map;return _&&(_.off("move",this._update),_.off("move",this._onClose),_.off("preclick",this._onClose),_.off("click",this._onClose),_.off("remove",this.remove),_.off("mousemove",this._onMouseEvent),_.off("mouseup",this._onMouseEvent),_.off("drag",this._onMouseEvent),_._canvasContainer&&_._canvasContainer.classList.remove("mapboxgl-track-pointer"),_._removePopup(this),this._map=void 0),this.fire(new r.z("close")),this}getLngLat(){return this._lngLat}setLngLat(_){this._lngLat=r.aR.convert(_),this._pos=null,this._trackPointer=!1,this._update();let l=this._map;return l&&(l.on("move",this._update),l.off("mousemove",this._onMouseEvent),l._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}getAltitude(){return this._altitude}setAltitude(_){return this._altitude=_,this._update(),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();let _=this._map;return _&&(_.off("move",this._update),_.on("mousemove",this._onMouseEvent),_.on("drag",this._onMouseEvent),_._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(_){return this.setDOMContent(document.createTextNode(_))}setHTML(_){let l=document.createDocumentFragment(),p=document.createElement("body"),g;for(p.innerHTML=_;g=p.firstChild,g;)l.appendChild(g);return this.setDOMContent(l)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(_){return this.options.maxWidth=_,this._update(),this}setDOMContent(_){let l=this._content;if(l)for(;l.hasChildNodes();)l.firstChild&&l.removeChild(l.firstChild);else l=this._content=V("div","mapboxgl-popup-content",this._container||void 0);if(l.appendChild(_),this.options.closeButton){let p=this._closeButton=V("button","mapboxgl-popup-close-button",l);p.type="button",p.setAttribute("aria-label","Close popup"),p.innerHTML='',p.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(_){return this._classList.add(_),this._updateClassList(),this}removeClassName(_){return this._classList.delete(_),this._updateClassList(),this}setOffset(_){return this.options.offset=_,this._update(),this}toggleClassName(_){let l;return this._classList.delete(_)?l=!1:(this._classList.add(_),l=!0),this._updateClassList(),l}_onMouseEvent(_){this._update(_.point)}_getAnchor(_){if(this.options.anchor)return this.options.anchor;let l=this._map,p=this._container,g=this._pos;if(!l||!p||!g)return"bottom";let C=p.offsetWidth,x=p.offsetHeight,A=g.xl.transform.width-C/2;if(g.y+_l.transform.height-x){if(A)return"bottom-left";if(R)return"bottom-right"}return A?"left":R?"right":"bottom"}_updateClassList(){let _=this._container;if(!_)return;let l=[...this._classList];l.push("mapboxgl-popup"),this._anchor&&l.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&l.push("mapboxgl-popup-track-pointer"),_.className=l.join(" ")}_update(_){let l=this._map,p=this._content;if(!l||!this._lngLat&&!this._trackPointer||!p)return;let g=this._container;if(g||(g=this._container=V("div","mapboxgl-popup",l.getContainer()),this._tip=V("div","mapboxgl-popup-tip",g),g.appendChild(p)),this.options.maxWidth&&g.style.maxWidth!==this.options.maxWidth&&(g.style.maxWidth=this.options.maxWidth),l.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=CT(this._lngLat,this._pos,l.transform)),!this._trackPointer||_){let C=this._pos=this._trackPointer&&_ instanceof r.P?_:l.project(this._lngLat,this._altitude),x=Pf(this.options.offset),A=this._anchor=this._getAnchor(x.y),R=Pf(this.options.offset,A),B=C.add(R).round();l._requestDomTask(()=>{this._container&&A&&(this._container.style.transform=`${nv[A]} translate(${B.x}px,${B.y}px)`)})}if(!this._marker&&l._showingGlobe()){let C=r.eY(l.transform,this._lngLat)?0:1;this._setOpacity(C)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let _=this._container.querySelector(Tm);_&&_.focus()}_onClose(){this.remove()}_setOpacity(_){this._container&&(this._container.style.opacity=`${_}`),this._content&&(this._content.style.pointerEvents=_?"auto":"none")}},Marker:Ff,Style:eh,LngLat:r.aR,LngLatBounds:r.aI,Point:r.P,MercatorCoordinate:r.ae,FreeCameraOptions:gD,Evented:r.E,config:r.e,prewarm:r.f0,clearPrewarmedResources:r.e$,get accessToken(){return r.e.ACCESS_TOKEN},set accessToken(_){r.e.ACCESS_TOKEN=_},get baseApiUrl(){return r.e.API_URL},set baseApiUrl(_){r.e.API_URL=_},get workerCount(){return r.f9.workerCount},set workerCount(_){r.f9.workerCount=_},get maxParallelImageRequests(){return r.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(_){r.e.MAX_PARALLEL_IMAGE_REQUESTS=_},clearStorage(_){r.f8(_)},get workerUrl(){return r.f7.workerUrl},set workerUrl(_){r.f7.workerUrl=_},get workerClass(){return r.f7.workerClass},set workerClass(_){r.f7.workerClass=_},get workerParams(){return r.f7.workerParams},set workerParams(_){r.f7.workerParams=_},get dracoUrl(){return r.f6()},set dracoUrl(_){r.f5(_)},get meshoptUrl(){return r.f4()},set meshoptUrl(_){r.f3(_)},setNow:r.o.setNow,restoreNow:r.o.restoreNow}});var o=e;return o})});var I2e=Om(vle=>{"use strict";vle.supported=yle;vle.notSupportedReason=T2e;function yle(t){return!T2e(t)}function T2e(t){if(!Cdt())return"not a browser";if(!xdt())return"insufficient worker support";if(!wdt())return"insufficient Canvas/getImageData support";if(!Sdt(t&&t.failIfMajorPerformanceCaveat))return"insufficient WebGL2 support";if(!Edt())return"insufficient ECMAScript 6 support"}function Cdt(){return typeof window<"u"&&typeof document<"u"}function xdt(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t=new Blob([""],{type:"text/javascript"}),n=URL.createObjectURL(t),e,i;try{i=new Worker(n),e=!0}catch{e=!1}return i&&i.terminate(),URL.revokeObjectURL(n),e}function wdt(){var t=document.createElement("canvas");t.width=t.height=1;var n=t.getContext("2d");if(!n)return!1;var e=n.getImageData(0,0,1,1);return e&&e.width===t.width}var _le={};function Sdt(t){return _le[t]===void 0&&(_le[t]=Idt(t)),_le[t]}yle.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function Tdt(t){var n=document.createElement("canvas"),e=Object.create(yle.webGLContextAttributes);return e.failIfMajorPerformanceCaveat=t,n.getContext("webgl2",e)}function Idt(t){var n=Tdt(t);if(!n)return!1;var e;try{e=n.createShader(n.VERTEX_SHADER)}catch{return!1}return!e||n.isContextLost()?!1:(n.shaderSource(e,"void main() {}"),n.compileShader(e),n.getShaderParameter(e,n.COMPILE_STATUS)===!0)}function Edt(){return!document.documentMode}});var WRe=Om((sfn,KRe)=>{"use strict";KRe.exports=function(n,e,i,o){var r=n[0],s=n[1],d=!1;i===void 0&&(i=0),o===void 0&&(o=e.length);for(var m=(o-i)/2,v=0,w=m-1;vs!=$>s&&r<(V-O)*(s-N)/($-N)+O;q&&(d=!d)}return d}});var QRe=Om((afn,YRe)=>{"use strict";YRe.exports=function(n,e,i,o){var r=n[0],s=n[1],d=!1;i===void 0&&(i=0),o===void 0&&(o=e.length);for(var m=o-i,v=0,w=m-1;vs!=$>s&&r<(V-O)*(s-N)/($-N)+O;q&&(d=!d)}return d}});var JRe=Om((lfn,vY)=>{"use strict";var ZRe=WRe(),XRe=QRe();vY.exports=function(n,e,i,o){return e.length>0&&Array.isArray(e[0])?XRe(n,e,i,o):ZRe(n,e,i,o)};vY.exports.nested=XRe;vY.exports.flat=ZRe});var uFe=Om((fde,gde)=>{"use strict";(function(t,n){typeof fde=="object"&&typeof gde<"u"?gde.exports=n():typeof define=="function"&&define.amd?define(n):(t=t||self).RBush=n()})(fde,function(){"use strict";function t(W,te,fe,xe,Fe){(function Re(Se,ke,Xe,yt,We){for(;yt>Xe;){if(yt-Xe>600){var Et=yt-Xe+1,we=ke-Xe+1,Qt=Math.log(Et),Xi=.5*Math.exp(2*Qt/3),ei=.5*Math.sqrt(Qt*Xi*(Et-Xi)/Et)*(we-Et/2<0?-1:1),li=Math.max(Xe,Math.floor(ke-we*Xi/Et+ei)),zt=Math.min(yt,Math.floor(ke+(Et-we)*Xi/Et+ei));Re(Se,ke,li,zt,We)}var Bi=Se[ke],wt=Xe,Lt=yt;for(n(Se,Xe,ke),We(Se[yt],Bi)>0&&n(Se,Xe,yt);wt0;)Lt--}We(Se[Xe],Bi)===0?n(Se,Xe,Lt):n(Se,++Lt,yt),Lt<=ke&&(Xe=Lt+1),ke<=Lt&&(yt=Lt-1)}})(W,te,fe||0,xe||W.length-1,Fe||e)}function n(W,te,fe){var xe=W[te];W[te]=W[fe],W[fe]=xe}function e(W,te){return Wte?1:0}var i=function(W){W===void 0&&(W=9),this._maxEntries=Math.max(4,W),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(W,te,fe){if(!fe)return te.indexOf(W);for(var xe=0;xe=W.minX&&te.maxY>=W.minY}function $(W){return{children:W,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function q(W,te,fe,xe,Fe){for(var Re=[te,fe];Re.length;)if(!((fe=Re.pop())-(te=Re.pop())<=xe)){var Se=te+Math.ceil((fe-te)/xe/2)*xe;t(W,Se,te,fe,Fe),Re.push(te,Se,Se,fe)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(W){var te=this.data,fe=[];if(!V(W,te))return fe;for(var xe=this.toBBox,Fe=[];te;){for(var Re=0;Re=0&&Fe[te].children.length>this._maxEntries;)this._split(Fe,te),te--;this._adjustParentBBoxes(xe,Fe,te)},i.prototype._split=function(W,te){var fe=W[te],xe=fe.children.length,Fe=this._minEntries;this._chooseSplitAxis(fe,Fe,xe);var Re=this._chooseSplitIndex(fe,Fe,xe),Se=$(fe.children.splice(Re,fe.children.length-Re));Se.height=fe.height,Se.leaf=fe.leaf,r(fe,this.toBBox),r(Se,this.toBBox),te?W[te-1].children.push(Se):this._splitRoot(fe,Se)},i.prototype._splitRoot=function(W,te){this.data=$([W,te]),this.data.height=W.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(W,te,fe){for(var xe,Fe,Re,Se,ke,Xe,yt,We=1/0,Et=1/0,we=te;we<=fe-te;we++){var Qt=s(W,0,we,this.toBBox),Xi=s(W,we,fe,this.toBBox),ei=(Fe=Qt,Re=Xi,Se=void 0,ke=void 0,Xe=void 0,yt=void 0,Se=Math.max(Fe.minX,Re.minX),ke=Math.max(Fe.minY,Re.minY),Xe=Math.min(Fe.maxX,Re.maxX),yt=Math.min(Fe.maxY,Re.maxY),Math.max(0,Xe-Se)*Math.max(0,yt-ke)),li=w(Qt)+w(Xi);ei=te;We--){var Et=W.children[We];d(Se,W.leaf?Fe(Et):Et),ke+=O(Se)}return ke},i.prototype._adjustParentBBoxes=function(W,te,fe){for(var xe=fe;xe>=0;xe--)d(te[xe],W)},i.prototype._condense=function(W){for(var te=W.length-1,fe=void 0;te>=0;te--)W[te].children.length===0?te>0?(fe=W[te-1].children).splice(fe.indexOf(W[te]),1):this.clear():r(W[te],this.toBBox)},i})});var Cde=Om(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.earthRadius=63710088e-1;xs.factors={centimeters:xs.earthRadius*100,centimetres:xs.earthRadius*100,degrees:xs.earthRadius/111325,feet:xs.earthRadius*3.28084,inches:xs.earthRadius*39.37,kilometers:xs.earthRadius/1e3,kilometres:xs.earthRadius/1e3,meters:xs.earthRadius,metres:xs.earthRadius,miles:xs.earthRadius/1609.344,millimeters:xs.earthRadius*1e3,millimetres:xs.earthRadius*1e3,nauticalmiles:xs.earthRadius/1852,radians:1,yards:xs.earthRadius*1.0936};xs.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/xs.earthRadius,yards:1.0936133};xs.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function DE(t,n,e){e===void 0&&(e={});var i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=n||{},i.geometry=t,i}xs.feature=DE;function R0t(t,n,e){switch(e===void 0&&(e={}),t){case"Point":return _de(n).geometry;case"LineString":return vde(n).geometry;case"Polygon":return yde(n).geometry;case"MultiPoint":return hFe(n).geometry;case"MultiLineString":return pFe(n).geometry;case"MultiPolygon":return mFe(n).geometry;default:throw new Error(t+" is invalid")}}xs.geometry=R0t;function _de(t,n,e){if(e===void 0&&(e={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!CY(t[0])||!CY(t[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:t};return DE(i,n,e)}xs.point=_de;function F0t(t,n,e){return e===void 0&&(e={}),xY(t.map(function(i){return _de(i,n)}),e)}xs.points=F0t;function yde(t,n,e){e===void 0&&(e={});for(var i=0,o=t;i=0))throw new Error("precision must be a positive number");var e=Math.pow(10,n||0);return Math.round(t*e)/e}xs.round=B0t;function fFe(t,n){n===void 0&&(n="kilometers");var e=xs.factors[n];if(!e)throw new Error(n+" units is invalid");return t*e}xs.radiansToLength=fFe;function bde(t,n){n===void 0&&(n="kilometers");var e=xs.factors[n];if(!e)throw new Error(n+" units is invalid");return t/e}xs.lengthToRadians=bde;function V0t(t,n){return gFe(bde(t,n))}xs.lengthToDegrees=V0t;function z0t(t){var n=t%360;return n<0&&(n+=360),n}xs.bearingToAzimuth=z0t;function gFe(t){var n=t%(2*Math.PI);return n*180/Math.PI}xs.radiansToDegrees=gFe;function U0t(t){var n=t%360;return n*Math.PI/180}xs.degreesToRadians=U0t;function H0t(t,n,e){if(n===void 0&&(n="kilometers"),e===void 0&&(e="kilometers"),!(t>=0))throw new Error("length must be a positive number");return fFe(bde(t,n),e)}xs.convertLength=H0t;function j0t(t,n,e){if(n===void 0&&(n="meters"),e===void 0&&(e="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=xs.areaFactors[n];if(!i)throw new Error("invalid original units");var o=xs.areaFactors[e];if(!o)throw new Error("invalid final units");return t/i*o}xs.convertArea=j0t;function CY(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}xs.isNumber=CY;function G0t(t){return!!t&&t.constructor===Object}xs.isObject=G0t;function $0t(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(n){if(!CY(n))throw new Error("bbox must only contain numbers")})}xs.validateBBox=$0t;function q0t(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}xs.validateId=q0t});var CFe=Om(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var rf=Cde();function l6(t,n,e){if(t!==null)for(var i,o,r,s,d,m,v,w=0,O=0,N,V=t.type,$=V==="FeatureCollection",q=V==="Feature",W=$?t.features.length:1,te=0;tem||$>v||q>w){d=O,m=i,v=$,w=q,r=0;return}var W=rf.lineString([d,O],e.properties);if(n(W,i,o,q,r)===!1)return!1;r++,d=O})===!1)return!1}}})}function J0t(t,n,e){var i=e,o=!1;return vFe(t,function(r,s,d,m,v){o===!1&&e===void 0?i=r:i=n(i,r,s,d,m,v),o=!0}),i}function bFe(t,n){if(!t)throw new Error("geojson is required");wY(t,function(e,i,o){if(e.geometry!==null){var r=e.geometry.type,s=e.geometry.coordinates;switch(r){case"LineString":if(n(e,i,o,0,0)===!1)return!1;break;case"Polygon":for(var d=0;d{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var l_=63710088e-1,Sde={centimeters:l_*100,centimetres:l_*100,degrees:360/(2*Math.PI),feet:l_*3.28084,inches:l_*39.37,kilometers:l_/1e3,kilometres:l_/1e3,meters:l_,metres:l_,miles:l_/1609.344,millimeters:l_*1e3,millimetres:l_*1e3,nauticalmiles:l_/1852,radians:1,yards:l_*1.0936},wde={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function AE(t,n,e={}){let i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=n||{},i.geometry=t,i}function nyt(t,n,e={}){switch(t){case"Point":return Tde(n).geometry;case"LineString":return Ede(n).geometry;case"Polygon":return Ide(n).geometry;case"MultiPoint":return wFe(n).geometry;case"MultiLineString":return xFe(n).geometry;case"MultiPolygon":return SFe(n).geometry;default:throw new Error(t+" is invalid")}}function Tde(t,n,e={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!SY(t[0])||!SY(t[1]))throw new Error("coordinates must contain numbers");return AE({type:"Point",coordinates:t},n,e)}function oyt(t,n,e={}){return TY(t.map(i=>Tde(i,n)),e)}function Ide(t,n,e={}){for(let o of t){if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(o[o.length-1].length!==o[0].length)throw new Error("First and last Position are not equivalent.");for(let r=0;rIde(i,n)),e)}function Ede(t,n,e={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return AE({type:"LineString",coordinates:t},n,e)}function syt(t,n,e={}){return TY(t.map(i=>Ede(i,n)),e)}function TY(t,n={}){let e={type:"FeatureCollection"};return n.id&&(e.id=n.id),n.bbox&&(e.bbox=n.bbox),e.features=t,e}function xFe(t,n,e={}){return AE({type:"MultiLineString",coordinates:t},n,e)}function wFe(t,n,e={}){return AE({type:"MultiPoint",coordinates:t},n,e)}function SFe(t,n,e={}){return AE({type:"MultiPolygon",coordinates:t},n,e)}function ayt(t,n,e={}){return AE({type:"GeometryCollection",geometries:t},n,e)}function lyt(t,n=0){if(n&&!(n>=0))throw new Error("precision must be a positive number");let e=Math.pow(10,n||0);return Math.round(t*e)/e}function TFe(t,n="kilometers"){let e=Sde[n];if(!e)throw new Error(n+" units is invalid");return t*e}function Dde(t,n="kilometers"){let e=Sde[n];if(!e)throw new Error(n+" units is invalid");return t/e}function cyt(t,n){return IFe(Dde(t,n))}function dyt(t){let n=t%360;return n<0&&(n+=360),n}function uyt(t){return t=t%360,t>180?t-360:t<-180?t+360:t}function IFe(t){return t%(2*Math.PI)*180/Math.PI}function pyt(t){return t%360*Math.PI/180}function hyt(t,n="kilometers",e="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return TFe(Dde(t,n),e)}function myt(t,n="meters",e="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");let i=wde[n];if(!i)throw new Error("invalid original units");let o=wde[e];if(!o)throw new Error("invalid final units");return t/i*o}function SY(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function fyt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function gyt(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(n=>{if(!SY(n))throw new Error("bbox must only contain numbers")})}function _yt(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}Zl.areaFactors=wde;Zl.azimuthToBearing=uyt;Zl.bearingToAzimuth=dyt;Zl.convertArea=myt;Zl.convertLength=hyt;Zl.degreesToRadians=pyt;Zl.earthRadius=l_;Zl.factors=Sde;Zl.feature=AE;Zl.featureCollection=TY;Zl.geometry=nyt;Zl.geometryCollection=ayt;Zl.isNumber=SY;Zl.isObject=fyt;Zl.lengthToDegrees=cyt;Zl.lengthToRadians=Dde;Zl.lineString=Ede;Zl.lineStrings=syt;Zl.multiLineString=xFe;Zl.multiPoint=wFe;Zl.multiPolygon=SFe;Zl.point=Tde;Zl.points=oyt;Zl.polygon=Ide;Zl.polygons=ryt;Zl.radiansToDegrees=IFe;Zl.radiansToLength=TFe;Zl.round=lyt;Zl.validateBBox=gyt;Zl.validateId=_yt});var OFe=Om(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});var sf=EFe();function c6(t,n,e){if(t!==null)for(var i,o,r,s,d,m,v,w=0,O=0,N,V=t.type,$=V==="FeatureCollection",q=V==="Feature",W=$?t.features.length:1,te=0;tem||$>v||q>w){d=O,m=i,v=$,w=q,r=0;return}var W=sf.lineString.call(void 0,[d,O],e.properties);if(n(W,i,o,q,r)===!1)return!1;r++,d=O})===!1)return!1}}})}function Syt(t,n,e){var i=e,o=!1;return kFe(t,function(r,s,d,m,v){o===!1&&e===void 0?i=r:i=n(i,r,s,d,m,v),o=!0}),i}function MFe(t,n){if(!t)throw new Error("geojson is required");IY(t,function(e,i,o){if(e.geometry!==null){var r=e.geometry.type,s=e.geometry.coordinates;switch(r){case"LineString":if(n(e,i,o,0,0)===!1)return!1;break;case"Polygon":for(var d=0;d{"use strict";Object.defineProperty(EY,"__esModule",{value:!0});var Dyt=OFe();function RFe(t,n={}){if(t.bbox!=null&&n.recompute!==!0)return t.bbox;let e=[1/0,1/0,-1/0,-1/0];return Dyt.coordEach.call(void 0,t,i=>{e[0]>i[0]&&(e[0]=i[0]),e[1]>i[1]&&(e[1]=i[1]),e[2]{"use strict";var Ix=uFe(),LFe=Cde(),NFe=CFe(),RL=FFe().default,kyt=NFe.featureEach,t0n=NFe.coordEach,i0n=LFe.polygon,PFe=LFe.featureCollection;function BFe(t){var n=new Ix(t);return n.insert=function(e){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:RL(e),Ix.prototype.insert.call(this,e)},n.load=function(e){var i=[];return Array.isArray(e)?e.forEach(function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:RL(o),i.push(o)}):kyt(e,function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:RL(o),i.push(o)}),Ix.prototype.load.call(this,i)},n.remove=function(e,i){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:RL(e),Ix.prototype.remove.call(this,e,i)},n.clear=function(){return Ix.prototype.clear.call(this)},n.search=function(e){var i=Ix.prototype.search.call(this,this.toBBox(e));return PFe(i)},n.collides=function(e){return Ix.prototype.collides.call(this,this.toBBox(e))},n.all=function(){var e=Ix.prototype.all.call(this);return PFe(e)},n.toJSON=function(){return Ix.prototype.toJSON.call(this)},n.fromJSON=function(e){return Ix.prototype.fromJSON.call(this,e)},n.toBBox=function(e){var i;if(e.bbox)i=e.bbox;else if(Array.isArray(e)&&e.length===4)i=e;else if(Array.isArray(e)&&e.length===6)i=[e[0],e[1],e[3],e[4]];else if(e.type==="Feature")i=RL(e);else if(e.type==="FeatureCollection")i=RL(e);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},n}kde.exports=BFe;kde.exports.default=BFe});var XPe=Om((ZPe,Mpe)=>{"use strict";(function(t){typeof ZPe=="object"&&typeof Mpe<"u"?Mpe.exports=t():typeof define=="function"&&define.amd?define([],t):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=t()})(function(){return(function t(n,e,i){function o(d,m){if(!e[d]){if(!n[d]){var v=typeof hB=="function"&&hB;if(!m&&v)return v(d,!0);if(r)return r(d,!0);var w=new Error("Cannot find module '"+d+"'");throw w.code="MODULE_NOT_FOUND",w}var O=e[d]={exports:{}};n[d][0].call(O.exports,function(N){var V=n[d][1][N];return o(V||N)},O,O.exports,t,n,e,i)}return e[d].exports}for(var r=typeof hB=="function"&&hB,s=0;s>2,O=(3&d)<<4|m>>4,N=1>6:64,V=2>4,m=(15&w)<<4|(O=r.indexOf(s.charAt(V++)))>>2,v=(3&O)<<6|(N=r.indexOf(s.charAt(V++))),W[$++]=d,O!==64&&(W[$++]=m),N!==64&&(W[$++]=v);return W}},{"./support":30,"./utils":32}],2:[function(t,n,e){"use strict";var i=t("./external"),o=t("./stream/DataWorker"),r=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");function d(m,v,w,O,N){this.compressedSize=m,this.uncompressedSize=v,this.crc32=w,this.compression=O,this.compressedContent=N}d.prototype={getContentWorker:function(){var m=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),v=this;return m.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),m},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(m,v,w){return m.pipe(new r).pipe(new s("uncompressedSize")).pipe(v.compressWorker(w)).pipe(new s("compressedSize")).withStreamInfo("compression",v)},n.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,e){"use strict";var i=t("./stream/GenericWorker");e.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},e.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,e){"use strict";var i=t("./utils"),o=(function(){for(var r,s=[],d=0;d<256;d++){r=d;for(var m=0;m<8;m++)r=1&r?3988292384^r>>>1:r>>>1;s[d]=r}return s})();n.exports=function(r,s){return r!==void 0&&r.length?i.getTypeOf(r)!=="string"?(function(d,m,v,w){var O=o,N=w+v;d^=-1;for(var V=w;V>>8^O[255&(d^m[V])];return-1^d})(0|s,r,r.length,0):(function(d,m,v,w){var O=o,N=w+v;d^=-1;for(var V=w;V>>8^O[255&(d^m.charCodeAt(V))];return-1^d})(0|s,r,r.length,0):0}},{"./utils":32}],5:[function(t,n,e){"use strict";e.base64=!1,e.binary=!1,e.dir=!1,e.createFolders=!0,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null},{}],6:[function(t,n,e){"use strict";var i=null;i=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:i}},{lie:37}],7:[function(t,n,e){"use strict";var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=t("pako"),r=t("./utils"),s=t("./stream/GenericWorker"),d=i?"uint8array":"array";function m(v,w){s.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=w,this.meta={}}e.magic="\b\0",r.inherits(m,s),m.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(r.transformTo(d,v.data),!1)},m.prototype.flush=function(){s.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},m.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},m.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(w){v.push({data:w,meta:v.meta})}},e.compressWorker=function(v){return new m("Deflate",v)},e.uncompressWorker=function(){return new m("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,e){"use strict";function i(O,N){var V,$="";for(V=0;V>>=8;return $}function o(O,N,V,$,q,W){var te,fe,xe=O.file,Fe=O.compression,Re=W!==d.utf8encode,Se=r.transformTo("string",W(xe.name)),ke=r.transformTo("string",d.utf8encode(xe.name)),Xe=xe.comment,yt=r.transformTo("string",W(Xe)),We=r.transformTo("string",d.utf8encode(Xe)),Et=ke.length!==xe.name.length,we=We.length!==Xe.length,Qt="",Xi="",ei="",li=xe.dir,zt=xe.date,Bi={crc32:0,compressedSize:0,uncompressedSize:0};N&&!V||(Bi.crc32=O.crc32,Bi.compressedSize=O.compressedSize,Bi.uncompressedSize=O.uncompressedSize);var wt=0;N&&(wt|=8),Re||!Et&&!we||(wt|=2048);var Lt=0,Yi=0;li&&(Lt|=16),q==="UNIX"?(Yi=798,Lt|=(function(tn,vn){var Fo=tn;return tn||(Fo=vn?16893:33204),(65535&Fo)<<16})(xe.unixPermissions,li)):(Yi=20,Lt|=(function(tn){return 63&(tn||0)})(xe.dosPermissions)),te=zt.getUTCHours(),te<<=6,te|=zt.getUTCMinutes(),te<<=5,te|=zt.getUTCSeconds()/2,fe=zt.getUTCFullYear()-1980,fe<<=4,fe|=zt.getUTCMonth()+1,fe<<=5,fe|=zt.getUTCDate(),Et&&(Xi=i(1,1)+i(m(Se),4)+ke,Qt+="up"+i(Xi.length,2)+Xi),we&&(ei=i(1,1)+i(m(yt),4)+We,Qt+="uc"+i(ei.length,2)+ei);var fn="";return fn+=` \0`,fn+=i(wt,2),fn+=Fe.magic,fn+=i(te,2),fn+=i(fe,2),fn+=i(Bi.crc32,4),fn+=i(Bi.compressedSize,4),fn+=i(Bi.uncompressedSize,4),fn+=i(Se.length,2),fn+=i(Qt.length,2),{fileRecord:v.LOCAL_FILE_HEADER+fn+Se+Qt,dirRecord:v.CENTRAL_FILE_HEADER+i(Yi,2)+fn+i(yt.length,2)+"\0\0\0\0"+i(Lt,4)+i($,4)+Se+Qt+yt}}var r=t("../utils"),s=t("../stream/GenericWorker"),d=t("../utf8"),m=t("../crc32"),v=t("../signature");function w(O,N,V,$){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=N,this.zipPlatform=V,this.encodeFileName=$,this.streamFiles=O,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}r.inherits(w,s),w.prototype.push=function(O){var N=O.meta.percent||0,V=this.entriesCount,$=this._sources.length;this.accumulate?this.contentBuffer.push(O):(this.bytesWritten+=O.data.length,s.prototype.push.call(this,{data:O.data,meta:{currentFile:this.currentFile,percent:V?(N+100*(V-$-1))/V:100}}))},w.prototype.openedSource=function(O){this.currentSourceOffset=this.bytesWritten,this.currentFile=O.file.name;var N=this.streamFiles&&!O.file.dir;if(N){var V=o(O,N,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:V.fileRecord,meta:{percent:0}})}else this.accumulate=!0},w.prototype.closedSource=function(O){this.accumulate=!1;var N=this.streamFiles&&!O.file.dir,V=o(O,N,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(V.dirRecord),N)this.push({data:(function($){return v.DATA_DESCRIPTOR+i($.crc32,4)+i($.compressedSize,4)+i($.uncompressedSize,4)})(O),meta:{percent:100}});else for(this.push({data:V.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},w.prototype.flush=function(){for(var O=this.bytesWritten,N=0;N=this.index;s--)d=(d<<8)+this.byteAt(s);return this.index+=r,d},readString:function(r){return i.transformTo("string",this.readData(r))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var r=this.readInt(4);return new Date(Date.UTC(1980+(r>>25&127),(r>>21&15)-1,r>>16&31,r>>11&31,r>>5&63,(31&r)<<1))}},n.exports=o},{"../utils":32}],19:[function(t,n,e){"use strict";var i=t("./Uint8ArrayReader");function o(r){i.call(this,r)}t("../utils").inherits(o,i),o.prototype.readData=function(r){this.checkOffset(r);var s=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,s},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,e){"use strict";var i=t("./DataReader");function o(r){i.call(this,r)}t("../utils").inherits(o,i),o.prototype.byteAt=function(r){return this.data.charCodeAt(this.zero+r)},o.prototype.lastIndexOfSignature=function(r){return this.data.lastIndexOf(r)-this.zero},o.prototype.readAndCheckSignature=function(r){return r===this.readData(4)},o.prototype.readData=function(r){this.checkOffset(r);var s=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,s},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,n,e){"use strict";var i=t("./ArrayReader");function o(r){i.call(this,r)}t("../utils").inherits(o,i),o.prototype.readData=function(r){if(this.checkOffset(r),r===0)return new Uint8Array(0);var s=this.data.subarray(this.zero+this.index,this.zero+this.index+r);return this.index+=r,s},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,e){"use strict";var i=t("../utils"),o=t("../support"),r=t("./ArrayReader"),s=t("./StringReader"),d=t("./NodeBufferReader"),m=t("./Uint8ArrayReader");n.exports=function(v){var w=i.getTypeOf(v);return i.checkSupport(w),w!=="string"||o.uint8array?w==="nodebuffer"?new d(v):o.uint8array?new m(i.transformTo("uint8array",v)):new r(i.transformTo("array",v)):new s(v)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,e){"use strict";e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,e){"use strict";var i=t("./GenericWorker"),o=t("../utils");function r(s){i.call(this,"ConvertWorker to "+s),this.destType=s}o.inherits(r,i),r.prototype.processChunk=function(s){this.push({data:o.transformTo(this.destType,s.data),meta:s.meta})},n.exports=r},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,e){"use strict";var i=t("./GenericWorker"),o=t("../crc32");function r(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(r,i),r.prototype.processChunk=function(s){this.streamInfo.crc32=o(s.data,this.streamInfo.crc32||0),this.push(s)},n.exports=r},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,e){"use strict";var i=t("../utils"),o=t("./GenericWorker");function r(s){o.call(this,"DataLengthProbe for "+s),this.propName=s,this.withStreamInfo(s,0)}i.inherits(r,o),r.prototype.processChunk=function(s){if(s){var d=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=d+s.data.length}o.prototype.processChunk.call(this,s)},n.exports=r},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,e){"use strict";var i=t("../utils"),o=t("./GenericWorker");function r(s){o.call(this,"DataWorker");var d=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,s.then(function(m){d.dataIsReady=!0,d.data=m,d.max=m&&m.length||0,d.type=i.getTypeOf(m),d.isPaused||d._tickAndRepeat()},function(m){d.error(m)})}i.inherits(r,o),r.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var s=null,d=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":s=this.data.substring(this.index,d);break;case"uint8array":s=this.data.subarray(this.index,d);break;case"array":case"nodebuffer":s=this.data.slice(this.index,d)}return this.index=d,this.push({data:s,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=r},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,e){"use strict";function i(o){this.name=o||"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}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,r){return this._listeners[o].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,r){if(this._listeners[o])for(var s=0;s "+o:o}},n.exports=i},{}],29:[function(t,n,e){"use strict";var i=t("../utils"),o=t("./ConvertWorker"),r=t("./GenericWorker"),s=t("../base64"),d=t("../support"),m=t("../external"),v=null;if(d.nodestream)try{v=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function w(N,V){return new m.Promise(function($,q){var W=[],te=N._internalType,fe=N._outputType,xe=N._mimeType;N.on("data",function(Fe,Re){W.push(Fe),V&&V(Re)}).on("error",function(Fe){W=[],q(Fe)}).on("end",function(){try{var Fe=(function(Re,Se,ke){switch(Re){case"blob":return i.newBlob(i.transformTo("arraybuffer",Se),ke);case"base64":return s.encode(Se);default:return i.transformTo(Re,Se)}})(fe,(function(Re,Se){var ke,Xe=0,yt=null,We=0;for(ke=0;ke"u")e.blob=!1;else{var i=new ArrayBuffer(0);try{e.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),e.blob=o.getBlob("application/zip").size===0}catch{e.blob=!1}}}try{e.nodestream=!!t("readable-stream").Readable}catch{e.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,e){"use strict";for(var i=t("./utils"),o=t("./support"),r=t("./nodejsUtils"),s=t("./stream/GenericWorker"),d=new Array(256),m=0;m<256;m++)d[m]=252<=m?6:248<=m?5:240<=m?4:224<=m?3:192<=m?2:1;d[254]=d[254]=1;function v(){s.call(this,"utf-8 decode"),this.leftOver=null}function w(){s.call(this,"utf-8 encode")}e.utf8encode=function(O){return o.nodebuffer?r.newBufferFrom(O,"utf-8"):(function(N){var V,$,q,W,te,fe=N.length,xe=0;for(W=0;W>>6:($<65536?V[te++]=224|$>>>12:(V[te++]=240|$>>>18,V[te++]=128|$>>>12&63),V[te++]=128|$>>>6&63),V[te++]=128|63&$);return V})(O)},e.utf8decode=function(O){return o.nodebuffer?i.transformTo("nodebuffer",O).toString("utf-8"):(function(N){var V,$,q,W,te=N.length,fe=new Array(2*te);for(V=$=0;V>10&1023,fe[$++]=56320|1023&q)}return fe.length!==$&&(fe.subarray?fe=fe.subarray(0,$):fe.length=$),i.applyFromCharCode(fe)})(O=i.transformTo(o.uint8array?"uint8array":"array",O))},i.inherits(v,s),v.prototype.processChunk=function(O){var N=i.transformTo(o.uint8array?"uint8array":"array",O.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var V=N;(N=new Uint8Array(V.length+this.leftOver.length)).set(this.leftOver,0),N.set(V,this.leftOver.length)}else N=this.leftOver.concat(N);this.leftOver=null}var $=(function(W,te){var fe;for((te=te||W.length)>W.length&&(te=W.length),fe=te-1;0<=fe&&(192&W[fe])==128;)fe--;return fe<0||fe===0?te:fe+d[W[fe]]>te?fe:te})(N),q=N;$!==N.length&&(o.uint8array?(q=N.subarray(0,$),this.leftOver=N.subarray($,N.length)):(q=N.slice(0,$),this.leftOver=N.slice($,N.length))),this.push({data:e.utf8decode(q),meta:O.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=v,i.inherits(w,s),w.prototype.processChunk=function(O){this.push({data:e.utf8encode(O.data),meta:O.meta})},e.Utf8EncodeWorker=w},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,e){"use strict";var i=t("./support"),o=t("./base64"),r=t("./nodejsUtils"),s=t("./external");function d(V){return V}function m(V,$){for(var q=0;q>8;this.dir=!!(16&this.externalFileAttributes),O==0&&(this.dosPermissions=63&this.externalFileAttributes),O==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var O=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=O.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=O.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=O.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=O.readInt(4))}},readExtraFields:function(O){var N,V,$,q=O.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});O.index+4>>6:(O<65536?w[$++]=224|O>>>12:(w[$++]=240|O>>>18,w[$++]=128|O>>>12&63),w[$++]=128|O>>>6&63),w[$++]=128|63&O);return w},e.buf2binstring=function(v){return m(v,v.length)},e.binstring2buf=function(v){for(var w=new i.Buf8(v.length),O=0,N=w.length;O>10&1023,W[N++]=56320|1023&V)}return m(W,N)},e.utf8border=function(v,w){var O;for((w=w||v.length)>v.length&&(w=v.length),O=w-1;0<=O&&(192&v[O])==128;)O--;return O<0||O===0?w:O+s[v[O]]>w?O:w}},{"./common":41}],43:[function(t,n,e){"use strict";n.exports=function(i,o,r,s){for(var d=65535&i|0,m=i>>>16&65535|0,v=0;r!==0;){for(r-=v=2e3>>1:o>>>1;r[s]=o}return r})();n.exports=function(o,r,s,d){var m=i,v=d+s;o^=-1;for(var w=d;w>>8^m[255&(o^r[w])];return-1^o}},{}],46:[function(t,n,e){"use strict";var i,o=t("../utils/common"),r=t("./trees"),s=t("./adler32"),d=t("./crc32"),m=t("./messages"),v=0,w=4,O=0,N=-2,V=-1,$=4,q=2,W=8,te=9,fe=286,xe=30,Fe=19,Re=2*fe+1,Se=15,ke=3,Xe=258,yt=Xe+ke+1,We=42,Et=113,we=1,Qt=2,Xi=3,ei=4;function li(Ee,xi){return Ee.msg=m[xi],xi}function zt(Ee){return(Ee<<1)-(4Ee.avail_out&&(bi=Ee.avail_out),bi!==0&&(o.arraySet(Ee.output,xi.pending_buf,xi.pending_out,bi,Ee.next_out),Ee.next_out+=bi,xi.pending_out+=bi,Ee.total_out+=bi,Ee.avail_out-=bi,xi.pending-=bi,xi.pending===0&&(xi.pending_out=0))}function Lt(Ee,xi){r._tr_flush_block(Ee,0<=Ee.block_start?Ee.block_start:-1,Ee.strstart-Ee.block_start,xi),Ee.block_start=Ee.strstart,wt(Ee.strm)}function Yi(Ee,xi){Ee.pending_buf[Ee.pending++]=xi}function fn(Ee,xi){Ee.pending_buf[Ee.pending++]=xi>>>8&255,Ee.pending_buf[Ee.pending++]=255&xi}function tn(Ee,xi){var bi,Dt,_t=Ee.max_chain_length,Zt=Ee.strstart,Ji=Ee.prev_length,sn=Ee.nice_match,Ci=Ee.strstart>Ee.w_size-yt?Ee.strstart-(Ee.w_size-yt):0,Un=Ee.window,po=Ee.w_mask,Pn=Ee.prev,go=Ee.strstart+Xe,Ar=Un[Zt+Ji-1],Ur=Un[Zt+Ji];Ee.prev_length>=Ee.good_match&&(_t>>=2),sn>Ee.lookahead&&(sn=Ee.lookahead);do if(Un[(bi=xi)+Ji]===Ur&&Un[bi+Ji-1]===Ar&&Un[bi]===Un[Zt]&&Un[++bi]===Un[Zt+1]){Zt+=2,bi++;do;while(Un[++Zt]===Un[++bi]&&Un[++Zt]===Un[++bi]&&Un[++Zt]===Un[++bi]&&Un[++Zt]===Un[++bi]&&Un[++Zt]===Un[++bi]&&Un[++Zt]===Un[++bi]&&Un[++Zt]===Un[++bi]&&Un[++Zt]===Un[++bi]&&ZtCi&&--_t!=0);return Ji<=Ee.lookahead?Ji:Ee.lookahead}function vn(Ee){var xi,bi,Dt,_t,Zt,Ji,sn,Ci,Un,po,Pn=Ee.w_size;do{if(_t=Ee.window_size-Ee.lookahead-Ee.strstart,Ee.strstart>=Pn+(Pn-yt)){for(o.arraySet(Ee.window,Ee.window,Pn,Pn,0),Ee.match_start-=Pn,Ee.strstart-=Pn,Ee.block_start-=Pn,xi=bi=Ee.hash_size;Dt=Ee.head[--xi],Ee.head[xi]=Pn<=Dt?Dt-Pn:0,--bi;);for(xi=bi=Pn;Dt=Ee.prev[--xi],Ee.prev[xi]=Pn<=Dt?Dt-Pn:0,--bi;);_t+=Pn}if(Ee.strm.avail_in===0)break;if(Ji=Ee.strm,sn=Ee.window,Ci=Ee.strstart+Ee.lookahead,Un=_t,po=void 0,po=Ji.avail_in,Un=ke)for(Zt=Ee.strstart-Ee.insert,Ee.ins_h=Ee.window[Zt],Ee.ins_h=(Ee.ins_h<=ke&&(Ee.ins_h=(Ee.ins_h<=ke)if(Dt=r._tr_tally(Ee,Ee.strstart-Ee.match_start,Ee.match_length-ke),Ee.lookahead-=Ee.match_length,Ee.match_length<=Ee.max_lazy_match&&Ee.lookahead>=ke){for(Ee.match_length--;Ee.strstart++,Ee.ins_h=(Ee.ins_h<=ke&&(Ee.ins_h=(Ee.ins_h<=ke&&Ee.match_length<=Ee.prev_length){for(_t=Ee.strstart+Ee.lookahead-ke,Dt=r._tr_tally(Ee,Ee.strstart-1-Ee.prev_match,Ee.prev_length-ke),Ee.lookahead-=Ee.prev_length-1,Ee.prev_length-=2;++Ee.strstart<=_t&&(Ee.ins_h=(Ee.ins_h<Ee.pending_buf_size-5&&(bi=Ee.pending_buf_size-5);;){if(Ee.lookahead<=1){if(vn(Ee),Ee.lookahead===0&&xi===v)return we;if(Ee.lookahead===0)break}Ee.strstart+=Ee.lookahead,Ee.lookahead=0;var Dt=Ee.block_start+bi;if((Ee.strstart===0||Ee.strstart>=Dt)&&(Ee.lookahead=Ee.strstart-Dt,Ee.strstart=Dt,Lt(Ee,!1),Ee.strm.avail_out===0)||Ee.strstart-Ee.block_start>=Ee.w_size-yt&&(Lt(Ee,!1),Ee.strm.avail_out===0))return we}return Ee.insert=0,xi===w?(Lt(Ee,!0),Ee.strm.avail_out===0?Xi:ei):(Ee.strstart>Ee.block_start&&(Lt(Ee,!1),Ee.strm.avail_out),we)}),new zn(4,4,8,4,Fo),new zn(4,5,16,8,Fo),new zn(4,6,32,32,Fo),new zn(4,4,16,16,Cn),new zn(8,16,32,32,Cn),new zn(8,16,128,128,Cn),new zn(8,32,128,256,Cn),new zn(32,128,258,1024,Cn),new zn(32,258,258,4096,Cn)],e.deflateInit=function(Ee,xi){return Qr(Ee,xi,W,15,8,0)},e.deflateInit2=Qr,e.deflateReset=pr,e.deflateResetKeep=ro,e.deflateSetHeader=function(Ee,xi){return Ee&&Ee.state?Ee.state.wrap!==2?N:(Ee.state.gzhead=xi,O):N},e.deflate=function(Ee,xi){var bi,Dt,_t,Zt;if(!Ee||!Ee.state||5>8&255),Yi(Dt,Dt.gzhead.time>>16&255),Yi(Dt,Dt.gzhead.time>>24&255),Yi(Dt,Dt.level===9?2:2<=Dt.strategy||Dt.level<2?4:0),Yi(Dt,255&Dt.gzhead.os),Dt.gzhead.extra&&Dt.gzhead.extra.length&&(Yi(Dt,255&Dt.gzhead.extra.length),Yi(Dt,Dt.gzhead.extra.length>>8&255)),Dt.gzhead.hcrc&&(Ee.adler=d(Ee.adler,Dt.pending_buf,Dt.pending,0)),Dt.gzindex=0,Dt.status=69):(Yi(Dt,0),Yi(Dt,0),Yi(Dt,0),Yi(Dt,0),Yi(Dt,0),Yi(Dt,Dt.level===9?2:2<=Dt.strategy||Dt.level<2?4:0),Yi(Dt,3),Dt.status=Et);else{var Ji=W+(Dt.w_bits-8<<4)<<8;Ji|=(2<=Dt.strategy||Dt.level<2?0:Dt.level<6?1:Dt.level===6?2:3)<<6,Dt.strstart!==0&&(Ji|=32),Ji+=31-Ji%31,Dt.status=Et,fn(Dt,Ji),Dt.strstart!==0&&(fn(Dt,Ee.adler>>>16),fn(Dt,65535&Ee.adler)),Ee.adler=1}if(Dt.status===69)if(Dt.gzhead.extra){for(_t=Dt.pending;Dt.gzindex<(65535&Dt.gzhead.extra.length)&&(Dt.pending!==Dt.pending_buf_size||(Dt.gzhead.hcrc&&Dt.pending>_t&&(Ee.adler=d(Ee.adler,Dt.pending_buf,Dt.pending-_t,_t)),wt(Ee),_t=Dt.pending,Dt.pending!==Dt.pending_buf_size));)Yi(Dt,255&Dt.gzhead.extra[Dt.gzindex]),Dt.gzindex++;Dt.gzhead.hcrc&&Dt.pending>_t&&(Ee.adler=d(Ee.adler,Dt.pending_buf,Dt.pending-_t,_t)),Dt.gzindex===Dt.gzhead.extra.length&&(Dt.gzindex=0,Dt.status=73)}else Dt.status=73;if(Dt.status===73)if(Dt.gzhead.name){_t=Dt.pending;do{if(Dt.pending===Dt.pending_buf_size&&(Dt.gzhead.hcrc&&Dt.pending>_t&&(Ee.adler=d(Ee.adler,Dt.pending_buf,Dt.pending-_t,_t)),wt(Ee),_t=Dt.pending,Dt.pending===Dt.pending_buf_size)){Zt=1;break}Zt=Dt.gzindex_t&&(Ee.adler=d(Ee.adler,Dt.pending_buf,Dt.pending-_t,_t)),Zt===0&&(Dt.gzindex=0,Dt.status=91)}else Dt.status=91;if(Dt.status===91)if(Dt.gzhead.comment){_t=Dt.pending;do{if(Dt.pending===Dt.pending_buf_size&&(Dt.gzhead.hcrc&&Dt.pending>_t&&(Ee.adler=d(Ee.adler,Dt.pending_buf,Dt.pending-_t,_t)),wt(Ee),_t=Dt.pending,Dt.pending===Dt.pending_buf_size)){Zt=1;break}Zt=Dt.gzindex_t&&(Ee.adler=d(Ee.adler,Dt.pending_buf,Dt.pending-_t,_t)),Zt===0&&(Dt.status=103)}else Dt.status=103;if(Dt.status===103&&(Dt.gzhead.hcrc?(Dt.pending+2>Dt.pending_buf_size&&wt(Ee),Dt.pending+2<=Dt.pending_buf_size&&(Yi(Dt,255&Ee.adler),Yi(Dt,Ee.adler>>8&255),Ee.adler=0,Dt.status=Et)):Dt.status=Et),Dt.pending!==0){if(wt(Ee),Ee.avail_out===0)return Dt.last_flush=-1,O}else if(Ee.avail_in===0&&zt(xi)<=zt(bi)&&xi!==w)return li(Ee,-5);if(Dt.status===666&&Ee.avail_in!==0)return li(Ee,-5);if(Ee.avail_in!==0||Dt.lookahead!==0||xi!==v&&Dt.status!==666){var sn=Dt.strategy===2?(function(Ci,Un){for(var po;;){if(Ci.lookahead===0&&(vn(Ci),Ci.lookahead===0)){if(Un===v)return we;break}if(Ci.match_length=0,po=r._tr_tally(Ci,0,Ci.window[Ci.strstart]),Ci.lookahead--,Ci.strstart++,po&&(Lt(Ci,!1),Ci.strm.avail_out===0))return we}return Ci.insert=0,Un===w?(Lt(Ci,!0),Ci.strm.avail_out===0?Xi:ei):Ci.last_lit&&(Lt(Ci,!1),Ci.strm.avail_out===0)?we:Qt})(Dt,xi):Dt.strategy===3?(function(Ci,Un){for(var po,Pn,go,Ar,Ur=Ci.window;;){if(Ci.lookahead<=Xe){if(vn(Ci),Ci.lookahead<=Xe&&Un===v)return we;if(Ci.lookahead===0)break}if(Ci.match_length=0,Ci.lookahead>=ke&&0Ci.lookahead&&(Ci.match_length=Ci.lookahead)}if(Ci.match_length>=ke?(po=r._tr_tally(Ci,1,Ci.match_length-ke),Ci.lookahead-=Ci.match_length,Ci.strstart+=Ci.match_length,Ci.match_length=0):(po=r._tr_tally(Ci,0,Ci.window[Ci.strstart]),Ci.lookahead--,Ci.strstart++),po&&(Lt(Ci,!1),Ci.strm.avail_out===0))return we}return Ci.insert=0,Un===w?(Lt(Ci,!0),Ci.strm.avail_out===0?Xi:ei):Ci.last_lit&&(Lt(Ci,!1),Ci.strm.avail_out===0)?we:Qt})(Dt,xi):i[Dt.level].func(Dt,xi);if(sn!==Xi&&sn!==ei||(Dt.status=666),sn===we||sn===Xi)return Ee.avail_out===0&&(Dt.last_flush=-1),O;if(sn===Qt&&(xi===1?r._tr_align(Dt):xi!==5&&(r._tr_stored_block(Dt,0,0,!1),xi===3&&(Bi(Dt.head),Dt.lookahead===0&&(Dt.strstart=0,Dt.block_start=0,Dt.insert=0))),wt(Ee),Ee.avail_out===0))return Dt.last_flush=-1,O}return xi!==w?O:Dt.wrap<=0?1:(Dt.wrap===2?(Yi(Dt,255&Ee.adler),Yi(Dt,Ee.adler>>8&255),Yi(Dt,Ee.adler>>16&255),Yi(Dt,Ee.adler>>24&255),Yi(Dt,255&Ee.total_in),Yi(Dt,Ee.total_in>>8&255),Yi(Dt,Ee.total_in>>16&255),Yi(Dt,Ee.total_in>>24&255)):(fn(Dt,Ee.adler>>>16),fn(Dt,65535&Ee.adler)),wt(Ee),0=bi.w_size&&(Zt===0&&(Bi(bi.head),bi.strstart=0,bi.block_start=0,bi.insert=0),Un=new o.Buf8(bi.w_size),o.arraySet(Un,xi,po-bi.w_size,bi.w_size,0),xi=Un,po=bi.w_size),Ji=Ee.avail_in,sn=Ee.next_in,Ci=Ee.input,Ee.avail_in=po,Ee.next_in=0,Ee.input=xi,vn(bi);bi.lookahead>=ke;){for(Dt=bi.strstart,_t=bi.lookahead-(ke-1);bi.ins_h=(bi.ins_h<>>=ke=Se>>>24,te-=ke,(ke=Se>>>16&255)===0)Qt[m++]=65535&Se;else{if(!(16&ke)){if((64&ke)==0){Se=fe[(65535&Se)+(W&(1<>>=ke,te-=ke),te<15&&(W+=we[s++]<>>=ke=Se>>>24,te-=ke,!(16&(ke=Se>>>16&255))){if((64&ke)==0){Se=xe[(65535&Se)+(W&(1<>>=ke,te-=ke,(ke=m-v)>3,W&=(1<<(te-=Xe<<3))-1,i.next_in=s,i.next_out=m,i.avail_in=s>>24&255)+(We>>>8&65280)+((65280&We)<<8)+((255&We)<<24)}function W(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function te(We){var Et;return We&&We.state?(Et=We.state,We.total_in=We.total_out=Et.total=0,We.msg="",Et.wrap&&(We.adler=1&Et.wrap),Et.mode=N,Et.last=0,Et.havedict=0,Et.dmax=32768,Et.head=null,Et.hold=0,Et.bits=0,Et.lencode=Et.lendyn=new i.Buf32(V),Et.distcode=Et.distdyn=new i.Buf32($),Et.sane=1,Et.back=-1,w):O}function fe(We){var Et;return We&&We.state?((Et=We.state).wsize=0,Et.whave=0,Et.wnext=0,te(We)):O}function xe(We,Et){var we,Qt;return We&&We.state?(Qt=We.state,Et<0?(we=0,Et=-Et):(we=1+(Et>>4),Et<48&&(Et&=15)),Et&&(Et<8||15=ei.wsize?(i.arraySet(ei.window,Et,we-ei.wsize,ei.wsize,0),ei.wnext=0,ei.whave=ei.wsize):(Qt<(Xi=ei.wsize-ei.wnext)&&(Xi=Qt),i.arraySet(ei.window,Et,we-Qt,Xi,ei.wnext),(Qt-=Xi)?(i.arraySet(ei.window,Et,we-Qt,Qt,0),ei.wnext=Qt,ei.whave=ei.wsize):(ei.wnext+=Xi,ei.wnext===ei.wsize&&(ei.wnext=0),ei.whave>>8&255,we.check=r(we.check,Zt,2,0),Lt=wt=0,we.mode=2;break}if(we.flags=0,we.head&&(we.head.done=!1),!(1&we.wrap)||(((255&wt)<<8)+(wt>>8))%31){We.msg="incorrect header check",we.mode=30;break}if((15&wt)!=8){We.msg="unknown compression method",we.mode=30;break}if(Lt-=4,Ee=8+(15&(wt>>>=4)),we.wbits===0)we.wbits=Ee;else if(Ee>we.wbits){We.msg="invalid window size",we.mode=30;break}we.dmax=1<>8&1),512&we.flags&&(Zt[0]=255&wt,Zt[1]=wt>>>8&255,we.check=r(we.check,Zt,2,0)),Lt=wt=0,we.mode=3;case 3:for(;Lt<32;){if(zt===0)break e;zt--,wt+=Qt[ei++]<>>8&255,Zt[2]=wt>>>16&255,Zt[3]=wt>>>24&255,we.check=r(we.check,Zt,4,0)),Lt=wt=0,we.mode=4;case 4:for(;Lt<16;){if(zt===0)break e;zt--,wt+=Qt[ei++]<>8),512&we.flags&&(Zt[0]=255&wt,Zt[1]=wt>>>8&255,we.check=r(we.check,Zt,2,0)),Lt=wt=0,we.mode=5;case 5:if(1024&we.flags){for(;Lt<16;){if(zt===0)break e;zt--,wt+=Qt[ei++]<>>8&255,we.check=r(we.check,Zt,2,0)),Lt=wt=0}else we.head&&(we.head.extra=null);we.mode=6;case 6:if(1024&we.flags&&(zt<(tn=we.length)&&(tn=zt),tn&&(we.head&&(Ee=we.head.extra_len-we.length,we.head.extra||(we.head.extra=new Array(we.head.extra_len)),i.arraySet(we.head.extra,Qt,ei,tn,Ee)),512&we.flags&&(we.check=r(we.check,Qt,tn,ei)),zt-=tn,ei+=tn,we.length-=tn),we.length))break e;we.length=0,we.mode=7;case 7:if(2048&we.flags){if(zt===0)break e;for(tn=0;Ee=Qt[ei+tn++],we.head&&Ee&&we.length<65536&&(we.head.name+=String.fromCharCode(Ee)),Ee&&tn>9&1,we.head.done=!0),We.adler=we.check=0,we.mode=12;break;case 10:for(;Lt<32;){if(zt===0)break e;zt--,wt+=Qt[ei++]<>>=7&Lt,Lt-=7&Lt,we.mode=27;break}for(;Lt<3;){if(zt===0)break e;zt--,wt+=Qt[ei++]<>>=1)){case 0:we.mode=14;break;case 1:if(Xe(we),we.mode=20,Et!==6)break;wt>>>=2,Lt-=2;break e;case 2:we.mode=17;break;case 3:We.msg="invalid block type",we.mode=30}wt>>>=2,Lt-=2;break;case 14:for(wt>>>=7&Lt,Lt-=7≪Lt<32;){if(zt===0)break e;zt--,wt+=Qt[ei++]<>>16^65535)){We.msg="invalid stored block lengths",we.mode=30;break}if(we.length=65535&wt,Lt=wt=0,we.mode=15,Et===6)break e;case 15:we.mode=16;case 16:if(tn=we.length){if(zt>>=5,Lt-=5,we.ndist=1+(31&wt),wt>>>=5,Lt-=5,we.ncode=4+(15&wt),wt>>>=4,Lt-=4,286>>=3,Lt-=3}for(;we.have<19;)we.lens[Ji[we.have++]]=0;if(we.lencode=we.lendyn,we.lenbits=7,bi={bits:we.lenbits},xi=d(0,we.lens,0,19,we.lencode,0,we.work,bi),we.lenbits=bi.bits,xi){We.msg="invalid code lengths set",we.mode=30;break}we.have=0,we.mode=19;case 19:for(;we.have>>16&255,Co=65535&_t,!((Cn=_t>>>24)<=Lt);){if(zt===0)break e;zt--,wt+=Qt[ei++]<>>=Cn,Lt-=Cn,we.lens[we.have++]=Co;else{if(Co===16){for(Dt=Cn+2;Lt>>=Cn,Lt-=Cn,we.have===0){We.msg="invalid bit length repeat",we.mode=30;break}Ee=we.lens[we.have-1],tn=3+(3&wt),wt>>>=2,Lt-=2}else if(Co===17){for(Dt=Cn+3;Lt>>=Cn)),wt>>>=3,Lt-=3}else{for(Dt=Cn+7;Lt>>=Cn)),wt>>>=7,Lt-=7}if(we.have+tn>we.nlen+we.ndist){We.msg="invalid bit length repeat",we.mode=30;break}for(;tn--;)we.lens[we.have++]=Ee}}if(we.mode===30)break;if(we.lens[256]===0){We.msg="invalid code -- missing end-of-block",we.mode=30;break}if(we.lenbits=9,bi={bits:we.lenbits},xi=d(m,we.lens,0,we.nlen,we.lencode,0,we.work,bi),we.lenbits=bi.bits,xi){We.msg="invalid literal/lengths set",we.mode=30;break}if(we.distbits=6,we.distcode=we.distdyn,bi={bits:we.distbits},xi=d(v,we.lens,we.nlen,we.ndist,we.distcode,0,we.work,bi),we.distbits=bi.bits,xi){We.msg="invalid distances set",we.mode=30;break}if(we.mode=20,Et===6)break e;case 20:we.mode=21;case 21:if(6<=zt&&258<=Bi){We.next_out=li,We.avail_out=Bi,We.next_in=ei,We.avail_in=zt,we.hold=wt,we.bits=Lt,s(We,fn),li=We.next_out,Xi=We.output,Bi=We.avail_out,ei=We.next_in,Qt=We.input,zt=We.avail_in,wt=we.hold,Lt=we.bits,we.mode===12&&(we.back=-1);break}for(we.back=0;zn=(_t=we.lencode[wt&(1<>>16&255,Co=65535&_t,!((Cn=_t>>>24)<=Lt);){if(zt===0)break e;zt--,wt+=Qt[ei++]<>ro)])>>>16&255,Co=65535&_t,!(ro+(Cn=_t>>>24)<=Lt);){if(zt===0)break e;zt--,wt+=Qt[ei++]<>>=ro,Lt-=ro,we.back+=ro}if(wt>>>=Cn,Lt-=Cn,we.back+=Cn,we.length=Co,zn===0){we.mode=26;break}if(32&zn){we.back=-1,we.mode=12;break}if(64&zn){We.msg="invalid literal/length code",we.mode=30;break}we.extra=15&zn,we.mode=22;case 22:if(we.extra){for(Dt=we.extra;Lt>>=we.extra,Lt-=we.extra,we.back+=we.extra}we.was=we.length,we.mode=23;case 23:for(;zn=(_t=we.distcode[wt&(1<>>16&255,Co=65535&_t,!((Cn=_t>>>24)<=Lt);){if(zt===0)break e;zt--,wt+=Qt[ei++]<>ro)])>>>16&255,Co=65535&_t,!(ro+(Cn=_t>>>24)<=Lt);){if(zt===0)break e;zt--,wt+=Qt[ei++]<>>=ro,Lt-=ro,we.back+=ro}if(wt>>>=Cn,Lt-=Cn,we.back+=Cn,64&zn){We.msg="invalid distance code",we.mode=30;break}we.offset=Co,we.extra=15&zn,we.mode=24;case 24:if(we.extra){for(Dt=we.extra;Lt>>=we.extra,Lt-=we.extra,we.back+=we.extra}if(we.offset>we.dmax){We.msg="invalid distance too far back",we.mode=30;break}we.mode=25;case 25:if(Bi===0)break e;if(tn=fn-Bi,we.offset>tn){if((tn=we.offset-tn)>we.whave&&we.sane){We.msg="invalid distance too far back",we.mode=30;break}vn=tn>we.wnext?(tn-=we.wnext,we.wsize-tn):we.wnext-tn,tn>we.length&&(tn=we.length),Fo=we.window}else Fo=Xi,vn=li-we.offset,tn=we.length;for(BiRe?(ke=vn[Fo+$[Et]],Lt[Yi+$[Et]]):(ke=96,0),W=1<>li)+(te-=W)]=Se<<24|ke<<16|Xe|0,te!==0;);for(W=1<>=1;if(W!==0?(wt&=W-1,wt+=W):wt=0,Et++,--fn[We]==0){if(We===Qt)break;We=v[w+$[Et]]}if(Xi>>7)]}function Yi(_t,Zt){_t.pending_buf[_t.pending++]=255&Zt,_t.pending_buf[_t.pending++]=Zt>>>8&255}function fn(_t,Zt,Ji){_t.bi_valid>q-Ji?(_t.bi_buf|=Zt<<_t.bi_valid&65535,Yi(_t,_t.bi_buf),_t.bi_buf=Zt>>q-_t.bi_valid,_t.bi_valid+=Ji-q):(_t.bi_buf|=Zt<<_t.bi_valid&65535,_t.bi_valid+=Ji)}function tn(_t,Zt,Ji){fn(_t,Ji[2*Zt],Ji[2*Zt+1])}function vn(_t,Zt){for(var Ji=0;Ji|=1&_t,_t>>>=1,Ji<<=1,0<--Zt;);return Ji>>>1}function Fo(_t,Zt,Ji){var sn,Ci,Un=new Array($+1),po=0;for(sn=1;sn<=$;sn++)Un[sn]=po=po+Ji[sn-1]<<1;for(Ci=0;Ci<=Zt;Ci++){var Pn=_t[2*Ci+1];Pn!==0&&(_t[2*Ci]=vn(Un[Pn]++,Pn))}}function Cn(_t){var Zt;for(Zt=0;Zt>1;1<=Ji;Ji--)ro(_t,Un,Ji);for(Ci=go;Ji=_t.heap[1],_t.heap[1]=_t.heap[_t.heap_len--],ro(_t,Un,1),sn=_t.heap[1],_t.heap[--_t.heap_max]=Ji,_t.heap[--_t.heap_max]=sn,Un[2*Ci]=Un[2*Ji]+Un[2*sn],_t.depth[Ci]=(_t.depth[Ji]>=_t.depth[sn]?_t.depth[Ji]:_t.depth[sn])+1,Un[2*Ji+1]=Un[2*sn+1]=Ci,_t.heap[1]=Ci++,ro(_t,Un,1),2<=_t.heap_len;);_t.heap[--_t.heap_max]=_t.heap[1],(function(Ur,$l){var vu,ua,Sl,La,iu,Ku,dd=$l.dyn_tree,_m=$l.max_code,qa=$l.stat_desc.static_tree,Yc=$l.stat_desc.has_stree,Ry=$l.stat_desc.extra_bits,mf=$l.stat_desc.extra_base,nu=$l.stat_desc.max_length,fg=0;for(La=0;La<=$;La++)Ur.bl_count[La]=0;for(dd[2*Ur.heap[Ur.heap_max]+1]=0,vu=Ur.heap_max+1;vu>=7;Ci>>=1)if(1&Ar&&Pn.dyn_ltree[2*go]!==0)return o;if(Pn.dyn_ltree[18]!==0||Pn.dyn_ltree[20]!==0||Pn.dyn_ltree[26]!==0)return r;for(go=32;go>>3,(Un=_t.static_len+3+7>>>3)<=Ci&&(Ci=Un)):Ci=Un=Ji+5,Ji+4<=Ci&&Zt!==-1?Dt(_t,Zt,Ji,sn):_t.strategy===4||Un===Ci?(fn(_t,2+(sn?1:0),3),pr(_t,yt,We)):(fn(_t,4+(sn?1:0),3),(function(Pn,go,Ar,Ur){var $l;for(fn(Pn,go-257,5),fn(Pn,Ar-1,5),fn(Pn,Ur-4,4),$l=0;$l>>8&255,_t.pending_buf[_t.d_buf+2*_t.last_lit+1]=255&Zt,_t.pending_buf[_t.l_buf+_t.last_lit]=255&Ji,_t.last_lit++,Zt===0?_t.dyn_ltree[2*Ji]++:(_t.matches++,Zt--,_t.dyn_ltree[2*(we[Ji]+v+1)]++,_t.dyn_dtree[2*Lt(Zt)]++),_t.last_lit===_t.lit_bufsize-1},e._tr_align=function(_t){fn(_t,2,3),tn(_t,te,yt),(function(Zt){Zt.bi_valid===16?(Yi(Zt,Zt.bi_buf),Zt.bi_buf=0,Zt.bi_valid=0):8<=Zt.bi_valid&&(Zt.pending_buf[Zt.pending++]=255&Zt.bi_buf,Zt.bi_buf>>=8,Zt.bi_valid-=8)})(_t)}},{"../utils/common":41}],53:[function(t,n,e){"use strict";n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,n,e){(function(i){(function(o,r){"use strict";if(!o.setImmediate){var s,d,m,v,w=1,O={},N=!1,V=o.document,$=Object.getPrototypeOf&&Object.getPrototypeOf(o);$=$&&$.setTimeout?$:o,s={}.toString.call(o.process)==="[object process]"?function(fe){process.nextTick(function(){W(fe)})}:(function(){if(o.postMessage&&!o.importScripts){var fe=!0,xe=o.onmessage;return o.onmessage=function(){fe=!1},o.postMessage("","*"),o.onmessage=xe,fe}})()?(v="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",te,!1):o.attachEvent("onmessage",te),function(fe){o.postMessage(v+fe,"*")}):o.MessageChannel?((m=new MessageChannel).port1.onmessage=function(fe){W(fe.data)},function(fe){m.port2.postMessage(fe)}):V&&"onreadystatechange"in V.createElement("script")?(d=V.documentElement,function(fe){var xe=V.createElement("script");xe.onreadystatechange=function(){W(fe),xe.onreadystatechange=null,d.removeChild(xe),xe=null},d.appendChild(xe)}):function(fe){setTimeout(W,0,fe)},$.setImmediate=function(fe){typeof fe!="function"&&(fe=new Function(""+fe));for(var xe=new Array(arguments.length-1),Fe=0;Fe"u"?i===void 0?this:i:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var CU=Om((Ope,Rpe)=>{"use strict";(function(t,n){typeof define=="function"&&define.amd?define([],n):typeof Ope<"u"?n():(n(),t.FileSaver={})})(Ope,function(){"use strict";function t(d,m){return typeof m>"u"?m={autoBom:!1}:typeof m!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),m={autoBom:!m}),m.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(d.type)?new Blob(["\uFEFF",d],{type:d.type}):d}function n(d,m,v){var w=new XMLHttpRequest;w.open("GET",d),w.responseType="blob",w.onload=function(){s(w.response,m,v)},w.onerror=function(){console.error("could not download file")},w.send()}function e(d){var m=new XMLHttpRequest;m.open("HEAD",d,!1);try{m.send()}catch{}return 200<=m.status&&299>=m.status}function i(d){try{d.dispatchEvent(new MouseEvent("click"))}catch{var m=document.createEvent("MouseEvents");m.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),d.dispatchEvent(m)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,r=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!r?function(d,m,v){var w=o.URL||o.webkitURL,O=document.createElement("a");m=m||d.name||"download",O.download=m,O.rel="noopener",typeof d=="string"?(O.href=d,O.origin===location.origin?i(O):e(O.href)?n(d,m,v):i(O,O.target="_blank")):(O.href=w.createObjectURL(d),setTimeout(function(){w.revokeObjectURL(O.href)},4e4),setTimeout(function(){i(O)},0))}:"msSaveOrOpenBlob"in navigator?function(d,m,v){if(m=m||d.name||"download",typeof d!="string")navigator.msSaveOrOpenBlob(t(d,v),m);else if(e(d))n(d,m,v);else{var w=document.createElement("a");w.href=d,w.target="_blank",setTimeout(function(){i(w)})}}:function(d,m,v,w){if(w=w||open("","_blank"),w&&(w.document.title=w.document.body.innerText="downloading..."),typeof d=="string")return n(d,m,v);var O=d.type==="application/octet-stream",N=/constructor/i.test(o.HTMLElement)||o.safari,V=/CriOS\/[\d]+/.test(navigator.userAgent);if((V||O&&N||r)&&typeof FileReader<"u"){var $=new FileReader;$.onloadend=function(){var te=$.result;te=V?te:te.replace(/^data:[^;]*;/,"data:attachment/file;"),w?w.location.href=te:location=te,w=null},$.readAsDataURL(d)}else{var q=o.URL||o.webkitURL,W=q.createObjectURL(d);w?w.location=W:location.href=W,w=null,setTimeout(function(){q.revokeObjectURL(W)},4e4)}});o.saveAs=s.saveAs=s,typeof Rpe<"u"&&(Rpe.exports=s)})});var che=Om((ahe,lhe)=>{"use strict";((t,n)=>{typeof define=="function"&&define.amd?define([],n):typeof lhe=="object"&&typeof ahe<"u"?lhe.exports=n():t.Papa=n()})(ahe,function t(){var n=typeof self<"u"?self:typeof window<"u"?window:n!==void 0?n:{},e,i=!n.document&&!!n.postMessage,o=n.IS_PAPA_WORKER||!1,r={},s=0,d={};function m(Se){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(ke){var Xe=xe(ke);Xe.chunkSize=parseInt(Xe.chunkSize),ke.step||ke.chunk||(Xe.chunkSize=null),this._handle=new V(Xe),(this._handle.streamer=this)._config=Xe}.call(this,Se),this.parseChunk=function(ke,Xe){var yt=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview),o)n.postMessage({results:We,workerId:d.WORKER_ID,finished:yt});else if(Re(this._config.chunk)&&!Xe){if(this._config.chunk(We,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=We=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(We.data),this._completeResults.errors=this._completeResults.errors.concat(We.errors),this._completeResults.meta=We.meta),this._completed||!yt||!Re(this._config.complete)||We&&We.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),yt||We&&We.meta.paused||this._nextChunk(),We}this._halted=!0},this._sendError=function(ke){Re(this._config.error)?this._config.error(ke):o&&this._config.error&&n.postMessage({workerId:d.WORKER_ID,error:ke,finished:!1})}}function v(Se){var ke;(Se=Se||{}).chunkSize||(Se.chunkSize=d.RemoteChunkSize),m.call(this,Se),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(Xe){this._input=Xe,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(ke=new XMLHttpRequest,this._config.withCredentials&&(ke.withCredentials=this._config.withCredentials),i||(ke.onload=Fe(this._chunkLoaded,this),ke.onerror=Fe(this._chunkError,this)),ke.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var Xe,yt=this._config.downloadRequestHeaders;for(Xe in yt)ke.setRequestHeader(Xe,yt[Xe])}var We;this._config.chunkSize&&(We=this._start+this._config.chunkSize-1,ke.setRequestHeader("Range","bytes="+this._start+"-"+We));try{ke.send(this._config.downloadRequestBody)}catch(Et){this._chunkError(Et.message)}i&&ke.status===0&&this._chunkError()}},this._chunkLoaded=function(){ke.readyState===4&&(ke.status<200||400<=ke.status?this._chunkError():(this._start+=this._config.chunkSize||ke.responseText.length,this._finished=!this._config.chunkSize||this._start>=(Xe=>(Xe=Xe.getResponseHeader("Content-Range"))!==null?parseInt(Xe.substring(Xe.lastIndexOf("/")+1)):-1)(ke),this.parseChunk(ke.responseText)))},this._chunkError=function(Xe){Xe=ke.statusText||Xe,this._sendError(new Error(Xe))}}function w(Se){(Se=Se||{}).chunkSize||(Se.chunkSize=d.LocalChunkSize),m.call(this,Se);var ke,Xe,yt=typeof FileReader<"u";this.stream=function(We){this._input=We,Xe=We.slice||We.webkitSlice||We.mozSlice,yt?((ke=new FileReader).onload=Fe(this._chunkLoaded,this),ke.onerror=Fe(this._chunkError,this)):ke=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(We.target.result)},this._chunkError=function(){this._sendError(ke.error)}}function O(Se){var ke;m.call(this,Se=Se||{}),this.stream=function(Xe){return ke=Xe,this._nextChunk()},this._nextChunk=function(){var Xe,yt;if(!this._finished)return Xe=this._config.chunkSize,ke=Xe?(yt=ke.substring(0,Xe),ke.substring(Xe)):(yt=ke,""),this._finished=!ke,this.parseChunk(yt)}}function N(Se){m.call(this,Se=Se||{});var ke=[],Xe=!0,yt=!1;this.pause=function(){m.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){m.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(We){this._input=We,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){yt&&ke.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),ke.length?this.parseChunk(ke.shift()):Xe=!0},this._streamData=Fe(function(We){try{ke.push(typeof We=="string"?We:We.toString(this._config.encoding)),Xe&&(Xe=!1,this._checkIsFinished(),this.parseChunk(ke.shift()))}catch(Et){this._streamError(Et)}},this),this._streamError=Fe(function(We){this._streamCleanUp(),this._sendError(We)},this),this._streamEnd=Fe(function(){this._streamCleanUp(),yt=!0,this._streamData("")},this),this._streamCleanUp=Fe(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function V(Se){var ke,Xe,yt,We,Et=Math.pow(2,53),we=-Et,Qt=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Xi=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,ei=this,li=0,zt=0,Bi=!1,wt=!1,Lt=[],Yi={data:[],errors:[],meta:{}};function fn(Cn){return Se.skipEmptyLines==="greedy"?Cn.join("").trim()==="":Cn.length===1&&Cn[0].length===0}function tn(){if(Yi&&yt&&(Fo("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+d.DefaultDelimiter+"'"),yt=!1),Se.skipEmptyLines&&(Yi.data=Yi.data.filter(function(pr){return!fn(pr)})),vn()){let pr=function(Qr,Ee){Re(Se.transformHeader)&&(Qr=Se.transformHeader(Qr,Ee)),Lt.push(Qr)};var ro=pr;if(Yi)if(Array.isArray(Yi.data[0])){for(var Cn=0;vn()&&Cn(Ji=>(Se.dynamicTypingFunction&&Se.dynamicTyping[Ji]===void 0&&(Se.dynamicTyping[Ji]=Se.dynamicTypingFunction(Ji)),(Se.dynamicTyping[Ji]||Se.dynamicTyping)===!0))(_t)?Zt==="true"||Zt==="TRUE"||Zt!=="false"&&Zt!=="FALSE"&&((Ji=>{if(Qt.test(Ji)&&(Ji=parseFloat(Ji),we=Lt.length?"__parsed_extra":Lt[xi]:bi,Dt=Se.transform?Se.transform(Dt,bi):Dt);bi==="__parsed_extra"?(Ee[bi]=Ee[bi]||[],Ee[bi].push(Dt)):Ee[bi]=Dt}return Se.header&&(xi>Lt.length?Fo("FieldMismatch","TooManyFields","Too many fields: expected "+Lt.length+" fields but parsed "+xi,zt+Qr):xiSe.preview?Xe.abort():(Yi.data=Yi.data[0],We(Yi,ei))))}),this.parse=function(Cn,zn,Co){var ro=Se.quoteChar||'"',ro=(Se.newline||(Se.newline=this.guessLineEndings(Cn,ro)),yt=!1,Se.delimiter?Re(Se.delimiter)&&(Se.delimiter=Se.delimiter(Cn),Yi.meta.delimiter=Se.delimiter):((ro=((pr,Qr,Ee,xi,bi)=>{var Dt,_t,Zt,Ji;bi=bi||[","," ","|",";",d.RECORD_SEP,d.UNIT_SEP];for(var sn=0;sn=Co.length/2?`\r `:"\r"}}function $(Se){return Se.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(Se){var ke=(Se=Se||{}).delimiter,Xe=Se.newline,yt=Se.comments,We=Se.step,Et=Se.preview,we=Se.fastMode,Qt=null,Xi=!1,ei=Se.quoteChar==null?'"':Se.quoteChar,li=ei;if(Se.escapeChar!==void 0&&(li=Se.escapeChar),(typeof ke!="string"||-1=Et)return po(!0);break}Co.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:zn.length,index:zt}),_t++}}else if(yt&&ro.length===0&&wt.substring(zt,zt+Fo)===yt){if(bi===-1)return po();zt=bi+vn,bi=wt.indexOf(Xe,zt),xi=wt.indexOf(ke,zt)}else if(xi!==-1&&(xi=Et)return po(!0)}return Ci();function Ji(go){zn.push(go),pr=zt}function sn(go){var Ar=0;return Ar=go!==-1&&(go=wt.substring(_t+1,go))&&go.trim()===""?go.length:Ar}function Ci(go){return Yi||(go===void 0&&(go=wt.substring(zt)),ro.push(go),zt=fn,Ji(ro),Cn&&Pn()),po()}function Un(go){zt=go,Ji(ro),ro=[],bi=wt.indexOf(Xe,zt)}function po(go){if(Se.header&&!Lt&&zn.length&&!Xi){var Ar=zn[0],Ur=Object.create(null),$l=new Set(Ar);let vu=!1;for(let ua=0;uayt.charCodeAt(0)!==65279?yt:yt.slice(1))(Se),Xe=new(ke.download?v:O)(ke)):Se.readable===!0&&Re(Se.read)&&Re(Se.on)?Xe=new N(ke):(n.File&&Se instanceof File||Se instanceof Object)&&(Xe=new w(ke)),Xe.stream(Se);(Xe=(()=>{var yt;return!!d.WORKERS_SUPPORTED&&(yt=(()=>{var We=n.URL||n.webkitURL||null,Et=t.toString();return d.BLOB_URL||(d.BLOB_URL=We.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",Et,")();"],{type:"text/javascript"})))})(),(yt=new n.Worker(yt)).onmessage=W,yt.id=s++,r[yt.id]=yt)})()).userStep=ke.step,Xe.userChunk=ke.chunk,Xe.userComplete=ke.complete,Xe.userError=ke.error,ke.step=Re(ke.step),ke.chunk=Re(ke.chunk),ke.complete=Re(ke.complete),ke.error=Re(ke.error),delete ke.worker,Xe.postMessage({input:Se,config:ke,workerId:Xe.id})},d.unparse=function(Se,ke){var Xe=!1,yt=!0,We=",",Et=`\r `,we='"',Qt=we+we,Xi=!1,ei=null,li=!1,zt=((()=>{if(typeof ke=="object"){if(typeof ke.delimiter!="string"||d.BAD_DELIMITERS.filter(function(Lt){return ke.delimiter.indexOf(Lt)!==-1}).length||(We=ke.delimiter),typeof ke.quotes!="boolean"&&typeof ke.quotes!="function"&&!Array.isArray(ke.quotes)||(Xe=ke.quotes),typeof ke.skipEmptyLines!="boolean"&&typeof ke.skipEmptyLines!="string"||(Xi=ke.skipEmptyLines),typeof ke.newline=="string"&&(Et=ke.newline),typeof ke.quoteChar=="string"&&(we=ke.quoteChar),typeof ke.header=="boolean"&&(yt=ke.header),Array.isArray(ke.columns)){if(ke.columns.length===0)throw new Error("Option columns is empty");ei=ke.columns}ke.escapeChar!==void 0&&(Qt=ke.escapeChar+we),ke.escapeFormulae instanceof RegExp?li=ke.escapeFormulae:typeof ke.escapeFormulae=="boolean"&&ke.escapeFormulae&&(li=/^[=+\-@\t\r].*$/)}})(),new RegExp($(we),"g"));if(typeof Se=="string"&&(Se=JSON.parse(Se)),Array.isArray(Se)){if(!Se.length||Array.isArray(Se[0]))return Bi(null,Se,Xi);if(typeof Se[0]=="object")return Bi(ei||Object.keys(Se[0]),Se,Xi)}else if(typeof Se=="object")return typeof Se.data=="string"&&(Se.data=JSON.parse(Se.data)),Array.isArray(Se.data)&&(Se.fields||(Se.fields=Se.meta&&Se.meta.fields||ei),Se.fields||(Se.fields=Array.isArray(Se.data[0])?Se.fields:typeof Se.data[0]=="object"?Object.keys(Se.data[0]):[]),Array.isArray(Se.data[0])||typeof Se.data[0]=="object"||(Se.data=[Se.data])),Bi(Se.fields||[],Se.data||[],Xi);throw new Error("Unable to serialize unrecognized input");function Bi(Lt,Yi,fn){var tn="",vn=(typeof Lt=="string"&&(Lt=JSON.parse(Lt)),typeof Yi=="string"&&(Yi=JSON.parse(Yi)),Array.isArray(Lt)&&0{for(var Cn=0;Cn{"use strict";(function(){var t,n="4.17.21",e=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",r="Invalid `variable` option passed into `_.template`",s="__lodash_hash_undefined__",d=500,m="__lodash_placeholder__",v=1,w=2,O=4,N=1,V=2,$=1,q=2,W=4,te=8,fe=16,xe=32,Fe=64,Re=128,Se=256,ke=512,Xe=30,yt="...",We=800,Et=16,we=1,Qt=2,Xi=3,ei=1/0,li=9007199254740991,zt=17976931348623157e292,Bi=NaN,wt=4294967295,Lt=wt-1,Yi=wt>>>1,fn=[["ary",Re],["bind",$],["bindKey",q],["curry",te],["curryRight",fe],["flip",ke],["partial",xe],["partialRight",Fe],["rearg",Se]],tn="[object Arguments]",vn="[object Array]",Fo="[object AsyncFunction]",Cn="[object Boolean]",zn="[object Date]",Co="[object DOMException]",ro="[object Error]",pr="[object Function]",Qr="[object GeneratorFunction]",Ee="[object Map]",xi="[object Number]",bi="[object Null]",Dt="[object Object]",_t="[object Promise]",Zt="[object Proxy]",Ji="[object RegExp]",sn="[object Set]",Ci="[object String]",Un="[object Symbol]",po="[object Undefined]",Pn="[object WeakMap]",go="[object WeakSet]",Ar="[object ArrayBuffer]",Ur="[object DataView]",$l="[object Float32Array]",vu="[object Float64Array]",ua="[object Int8Array]",Sl="[object Int16Array]",La="[object Int32Array]",iu="[object Uint8Array]",Ku="[object Uint8ClampedArray]",dd="[object Uint16Array]",_m="[object Uint32Array]",qa=/\b__p \+= '';/g,Yc=/\b(__p \+=) '' \+/g,Ry=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mf=/&(?:amp|lt|gt|quot|#39);/g,nu=/[&<>"']/g,fg=RegExp(mf.source),Gx=RegExp(nu.source),SS=/<%-([\s\S]+?)%>/g,Pi=/<%([\s\S]+?)%>/g,gg=/<%=([\s\S]+?)%>/g,sD=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vb=/^\w*$/,At=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ge=/[\\^$.*+?()[\]{}|]/g,Ie=RegExp(ge.source),$e=/^\s+/,ht=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,qt=/,? & /,It=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Wt=/[()=,{}\[\]\/\s]/,$i=/\\(\\)?/g,Ti=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qn=/\w*$/,So=/^[-+]0x[0-9a-f]+$/i,No=/^0b[01]+$/i,Or=/^\[object .+?Constructor\]$/,fr=/^0o[0-7]+$/i,Hr=/^(?:0|[1-9]\d*)$/,pa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Er=/($^)/,Ll=/['\n\r\u2028\u2029\\]/g,Xl="\\ud800-\\udfff",Tc="\\u0300-\\u036f",oa="\\ufe20-\\ufe2f",Ss="\\u20d0-\\u20ff",ml=Tc+oa+Ss,fl="\\u2700-\\u27bf",xa="a-z\\xdf-\\xf6\\xf8-\\xff",Ld="\\xac\\xb1\\xd7\\xf7",Wu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Dh="\\u2000-\\u206f",v_=" \\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",ou="A-Z\\xc0-\\xd6\\xd8-\\xde",Fy="\\ufe0e\\ufe0f",aD=Ld+Wu+Dh+v_,_g="['\u2019]",bb="["+Xl+"]",Cb="["+aD+"]",T0="["+ml+"]",b_="\\d+",$x="["+fl+"]",TS="["+xa+"]",ff="[^"+Xl+aD+b_+fl+xa+ou+"]",qx="\\ud83c[\\udffb-\\udfff]",IS="(?:"+T0+"|"+qx+")",Xp="[^"+Xl+"]",Ah="(?:\\ud83c[\\udde6-\\uddff]){2}",gf="[\\ud800-\\udbff][\\udc00-\\udfff]",Yu="["+ou+"]",bu="\\u200d",I0="(?:"+TS+"|"+ff+")",lD="(?:"+Yu+"|"+ff+")",xb="(?:"+_g+"(?:d|ll|m|re|s|t|ve))?",C_="(?:"+_g+"(?:D|LL|M|RE|S|T|VE))?",wb=IS+"?",Sb="["+Fy+"]?",Tb="(?:"+bu+"(?:"+[Xp,Ah,gf].join("|")+")"+Sb+wb+")*",kh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",cD="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kx=Sb+wb+Tb,Ib="(?:"+[$x,Ah,gf].join("|")+")"+Kx,ES="(?:"+[Xp+T0+"?",T0,Ah,gf,bb].join("|")+")",dD=RegExp(_g,"g"),DS=RegExp(T0,"g"),jr=RegExp(qx+"(?="+qx+")|"+ES+Kx,"g"),Eb=RegExp([Yu+"?"+TS+"+"+xb+"(?="+[Cb,Yu,"$"].join("|")+")",lD+"+"+C_+"(?="+[Cb,Yu+I0,"$"].join("|")+")",Yu+"?"+I0+"+"+xb,Yu+"+"+C_,cD,kh,b_,Ib].join("|"),"g"),xM=RegExp("["+bu+Xl+ml+Fy+"]"),wM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,AS=["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"],E0=-1,Tl={};Tl[$l]=Tl[vu]=Tl[ua]=Tl[Sl]=Tl[La]=Tl[iu]=Tl[Ku]=Tl[dd]=Tl[_m]=!0,Tl[tn]=Tl[vn]=Tl[Ar]=Tl[Cn]=Tl[Ur]=Tl[zn]=Tl[ro]=Tl[pr]=Tl[Ee]=Tl[xi]=Tl[Dt]=Tl[Ji]=Tl[sn]=Tl[Ci]=Tl[Pn]=!1;var Il={};Il[tn]=Il[vn]=Il[Ar]=Il[Ur]=Il[Cn]=Il[zn]=Il[$l]=Il[vu]=Il[ua]=Il[Sl]=Il[La]=Il[Ee]=Il[xi]=Il[Dt]=Il[Ji]=Il[sn]=Il[Ci]=Il[Un]=Il[iu]=Il[Ku]=Il[dd]=Il[_m]=!0,Il[ro]=Il[pr]=Il[Pn]=!1;var kS={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},SM={"&":"&","<":"<",">":">",'"':""","'":"'"},Py={"&":"&","<":"<",">":">",""":'"',"'":"'"},TM={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},uD=parseFloat,Db=parseInt,Wx=typeof global=="object"&&global&&global.Object===Object&&global,_f=typeof self=="object"&&self&&self.Object===Object&&self,Qc=Wx||_f||Function("return this")(),Ab=typeof YN=="object"&&YN&&!YN.nodeType&&YN,Nd=Ab&&typeof f8=="object"&&f8&&!f8.nodeType&&f8,D0=Nd&&Nd.exports===Ab,xp=D0&&Wx.process,Jp=(function(){try{var mi=Nd&&Nd.require&&Nd.require("util").types;return mi||xp&&xp.binding&&xp.binding("util")}catch{}})(),Yx=Jp&&Jp.isArrayBuffer,MS=Jp&&Jp.isDate,Ts=Jp&&Jp.isMap,OS=Jp&&Jp.isRegExp,pD=Jp&&Jp.isSet,Qx=Jp&&Jp.isTypedArray;function eo(mi,dn,Wi){switch(Wi.length){case 0:return mi.call(dn);case 1:return mi.call(dn,Wi[0]);case 2:return mi.call(dn,Wi[0],Wi[1]);case 3:return mi.call(dn,Wi[0],Wi[1],Wi[2])}return mi.apply(dn,Wi)}function hD(mi,dn,Wi,ar){for(var Fs=-1,Ka=mi==null?0:mi.length;++Fs-1}function fs(mi,dn,Wi){for(var ar=-1,Fs=mi==null?0:mi.length;++ar-1;);return Wi}function xo(mi,dn){for(var Wi=mi.length;Wi--&&yg(dn,mi[Wi],0)>-1;);return Wi}function Ly(mi,dn){for(var Wi=mi.length,ar=0;Wi--;)mi[Wi]===dn&&++ar;return ar}var Lb=Rb(kS),Do=Rb(SM);function fD(mi){return"\\"+TM[mi]}function Jx(mi,dn){return mi==null?t:mi[dn]}function bg(mi){return xM.test(mi)}function gD(mi){return wM.test(mi)}function PS(mi){for(var dn,Wi=[];!(dn=mi.next()).done;)Wi.push(dn.value);return Wi}function ql(mi){var dn=-1,Wi=Array(mi.size);return mi.forEach(function(ar,Fs){Wi[++dn]=[Fs,ar]}),Wi}function LS(mi,dn){return function(Wi){return mi(dn(Wi))}}function Qu(mi,dn){for(var Wi=-1,ar=mi.length,Fs=0,Ka=[];++Wi-1}function s1(I,L){var Y=this.__data__,ye=E_(Y,I);return ye<0?(++this.size,Y.push([I,L])):Y[ye][1]=L,this}Sp.prototype.clear=Hy,Sp.prototype.delete=RM,Sp.prototype.get=Ph,Sp.prototype.has=qS,Sp.prototype.set=s1;function ym(I){var L=-1,Y=I==null?0:I.length;for(this.clear();++L=L?I:L)),I}function Hd(I,L,Y,ye,ze,ut){var Vt,ni=L&v,wi=L&w,xn=L&O;if(Y&&(Vt=ze?Y(I,ye,ze,ut):Y(I)),Vt!==t)return Vt;if(!md(I))return I;var kn=Ks(I);if(kn){if(Vt=u3(I),!ni)return pd(I,Vt)}else{var Wn=Du(I),Uo=Wn==pr||Wn==Qr;if(_c(I))return LD(I,ni);if(Wn==Dt||Wn==tn||Uo&&!ze){if(Vt=wi||Uo?{}:Ya(I),!ni)return wi?z0(I,DD(Vt,I)):Xy(I,WS(Vt,I))}else{if(!Il[Wn])return ze?I:{};Vt=S1(I,Wn,ni)}}ut||(ut=new vm);var Sr=ut.get(I);if(Sr)return Sr;ut.set(I,Vt),k1(I)?I.forEach(function(Gr){Vt.add(Hd(Gr,L,Y,Gr,I,ut))}):D8(I)&&I.forEach(function(Gr,aa){Vt.set(aa,Hd(Gr,L,Y,aa,I,ut))});var is=xn?wi?yT:nC:wi?Am:ep,ha=kn?t:is(I);return Ic(ha||I,function(Gr,aa){ha&&(aa=Gr,Gr=I[aa]),Gy(Vt,aa,Hd(Gr,L,Y,aa,I,ut))}),Vt}function AD(I){var L=ep(I);return function(Y){return u1(Y,I,L)}}function u1(I,L,Y){var ye=Y.length;if(I==null)return!ye;for(I=El(I);ye--;){var ze=Y[ye],ut=L[ze],Vt=I[ze];if(Vt===t&&!(ze in I)||!ut(Vt))return!1}return!0}function YS(I,L,Y){if(typeof I!="function")throw new Mh(o);return Ff(function(){I.apply(t,Y)},L)}function $y(I,L,Y,ye){var ze=-1,ut=jn,Vt=!0,ni=I.length,wi=[],xn=L.length;if(!ni)return wi;Y&&(L=sr(L,Jl(Y))),ye?(ut=fs,Vt=!1):L.length>=e&&(ut=gn,Vt=!1,L=new I_(L));e:for(;++zeze?0:ze+Y),ye=ye===t||ye>ze?ze:sa(ye),ye<0&&(ye+=ze),ye=Y>ye?0:eO(ye);Y0&&Y(ni)?L>1?ru(ni,L-1,Y,ye,ze):ud(ze,ni):ye||(ze[ze.length]=ni)}return ze}var QS=v1(),NM=v1(!0);function Nh(I,L){return I&&QS(I,L,ep)}function h1(I,L){return I&&NM(I,L,ep)}function Bh(I,L){return Cu(L,function(Y){return $0(I[Y])})}function Ef(I,L){L=Mf(L,I);for(var Y=0,ye=L.length;I!=null&&YL}function ZS(I,L){return I!=null&&Wa.call(I,L)}function m1(I,L){return I!=null&&L in El(I)}function XS(I,L,Y){return I>=Ud(L,Y)&&I=120&&kn.length>=120)?new I_(Vt&&kn):t}kn=I[0];var Wn=-1,Uo=ni[0];e:for(;++Wn-1;)ni!==I&&wp.call(ni,wi,1),wp.call(I,wi,1);return I}function B0(I,L){for(var Y=I?L.length:0,ye=Y-1;Y--;){var ze=L[Y];if(Y==ye||ze!==ut){var ut=ze;Sm(ze)?wp.call(I,ze,1):V0(I,ze)}}return I}function g1(I,L){return I+Gb(US()*(L-I+1))}function zM(I,L,Y,ye){for(var ze=-1,ut=zd(n1((L-I)/(Y||1)),0),Vt=Wi(ut);ut--;)Vt[ye?ut:++ze]=I,I+=Y;return Vt}function Af(I,L){var Y="";if(!I||L<1||L>li)return Y;do L%2&&(Y+=I),L=Gb(L/2),L&&(I+=I);while(L);return Y}function Zs(I,L){return Ag(qM(I,L,tp),I+"")}function Wy(I){return FM(ET(I))}function Yy(I,L){var Y=ET(I);return Og(Y,Lh(L,0,Y.length))}function kf(I,L,Y,ye){if(!md(I))return I;L=Mf(L,I);for(var ze=-1,ut=L.length,Vt=ut-1,ni=I;ni!=null&&++zeze?0:ze+L),Y=Y>ze?ze:Y,Y<0&&(Y+=ze),ze=L>Y?0:Y-L>>>0,L>>>=0;for(var ut=Wi(ze);++ye>>1,Vt=I[ut];Vt!==null&&!sh(Vt)&&(Y?Vt<=L:Vt=e){var xn=L?null:ev(I);if(xn)return Bd(xn);Vt=!1,ze=gn,wi=new I_}else wi=L?[]:ni;e:for(;++ye=ye?I:qs(I,L,Y)}var pT=zS||function(I){return Qc.clearTimeout(I)};function LD(I,L){if(L)return I.slice();var Y=I.length,ye=jb?jb(Y):new I.constructor(Y);return I.copy(ye),ye}function ND(I){var L=new I.constructor(I.byteLength);return new w_(L).set(new w_(I)),L}function UM(I,L){var Y=L?ND(I.buffer):I.buffer;return new I.constructor(Y,I.byteOffset,I.byteLength)}function HM(I){var L=new I.constructor(I.source,qn.exec(I));return L.lastIndex=I.lastIndex,L}function Eu(I){return T_?El(T_.call(I)):{}}function O_(I,L){var Y=L?ND(I.buffer):I.buffer;return new I.constructor(Y,I.byteOffset,I.length)}function Zy(I,L){if(I!==L){var Y=I!==t,ye=I===null,ze=I===I,ut=sh(I),Vt=L!==t,ni=L===null,wi=L===L,xn=sh(L);if(!ni&&!xn&&!ut&&I>L||ut&&Vt&&wi&&!ni&&!xn||ye&&Vt&&wi||!Y&&wi||!ze)return 1;if(!ye&&!ut&&!xn&&I=ni)return wi;var xn=Y[ye];return wi*(xn=="desc"?-1:1)}}return I.index-L.index}function Mr(I,L,Y,ye){for(var ze=-1,ut=I.length,Vt=Y.length,ni=-1,wi=L.length,xn=zd(ut-Vt,0),kn=Wi(wi+xn),Wn=!ye;++ni1?Y[ze-1]:t,Vt=ze>2?Y[2]:t;for(ut=I.length>3&&typeof ut=="function"?(ze--,ut):t,Vt&&jd(Y[0],Y[1],Vt)&&(ut=ze<3?t:ut,ze=1),L=El(L);++ye-1?ze[ut?L[Vt]:Vt]:t}}function xm(I){return ih(function(L){var Y=L.length,ye=Y,ze=Fh.prototype.thru;for(I&&L.reverse();ye--;){var ut=L[ye];if(typeof ut!="function")throw new Mh(o);if(ze&&!Vt&&x1(ut)=="wrapper")var Vt=new Fh([],!0)}for(ye=Vt?ye:Y;++ye1&&Za.reverse(),kn&&wini))return!1;var xn=ut.get(I),kn=ut.get(L);if(xn&&kn)return xn==L&&kn==I;var Wn=-1,Uo=!0,Sr=Y&V?new I_:t;for(ut.set(I,L),ut.set(L,I);++Wn1?"& ":"")+L[ye],L=L.join(Y>2?", ":" "),I.replace(at,`{ /* [wrapped with `+L+`] */ `)}function h3(I){return Ks(I)||aC(I)||!!(kr&&I&&I[kr])}function Sm(I,L){var Y=typeof I;return L=L??li,!!L&&(Y=="number"||Y!="symbol"&&Hr.test(I))&&I>-1&&I%1==0&&I0){if(++L>=We)return arguments[0]}else L=0;return I.apply(t,arguments)}}function Og(I,L){var Y=-1,ye=I.length,ze=ye-1;for(L=L===t?ye:L;++Y1?I[L-1]:t;return Y=typeof Y=="function"?(I.pop(),Y):t,us(I,Y)});function Va(I){var L=rt(I);return L.__chain__=!0,L}function lc(I,L){return L(I),I}function Vc(I,L){return L(I)}var zh=ih(function(I){var L=I.length,Y=L?I[0]:0,ye=this.__wrapped__,ze=function(ut){return D_(ut,I)};return L>1||this.__actions__.length||!(ye instanceof wa)||!Sm(Y)?this.thru(ze):(ye=ye.slice(Y,+Y+(L?1:0)),ye.__actions__.push({func:Vc,args:[ze],thisArg:t}),new Fh(ye,this.__chain__).thru(function(ut){return L&&!ut.length&&ut.push(t),ut}))});function Uh(){return Va(this)}function oh(){return new Fh(this.value(),this.__chain__)}function rh(){this.__values__===t&&(this.__values__=IT(this.value()));var I=this.__index__>=this.__values__.length,L=I?t:this.__values__[this.__index__++];return{done:I,value:L}}function Xu(){return this}function Im(I){for(var L,Y=this;Y instanceof Tf;){var ye=l(Y);ye.__index__=0,ye.__values__=t,L?ze.__wrapped__=ye:L=ye;var ze=ye;Y=Y.__wrapped__}return ze.__wrapped__=I,L}function Lf(){var I=this.__wrapped__;if(I instanceof wa){var L=I;return this.__actions__.length&&(L=new wa(this)),L=L.reverse(),L.__actions__.push({func:Vc,args:[ii],thisArg:t}),new Fh(L,this.__chain__)}return this.thru(ii)}function Dl(){return PD(this.__wrapped__,this.__actions__)}var Bl=Xb(function(I,L,Y){Wa.call(I,Y)?++I[Y]:bm(I,Y,1)});function Qa(I,L,Y){var ye=Ks(I)?Zx:kD;return Y&&jd(I,L,Y)&&(L=t),ye(I,Wr(L,3))}function Dc(I,L){var Y=Ks(I)?Cu:LM;return Y(I,Wr(L,3))}var Xc=mT(oe),ec=mT(le);function au(I,L){return ru(Hh(I,L),1)}function Rg(I,L){return ru(Hh(I,L),ei)}function B_(I,L,Y){return Y=Y===t?1:sa(Y),ru(Hh(I,L),Y)}function Em(I,L){var Y=Ks(I)?Ic:If;return Y(I,Wr(L,3))}function V_(I,L){var Y=Ks(I)?yf:p1;return Y(I,Wr(L,3))}var G0=Xb(function(I,L,Y){Wa.call(I,Y)?I[Y].push(L):bm(I,Y,[L])});function Fg(I,L,Y,ye){I=jh(I)?I:ET(I),Y=Y&&!ye?sa(Y):0;var ze=I.length;return Y<0&&(Y=zd(ze+Y,0)),YD(I)?Y<=ze&&I.indexOf(L,Y)>-1:!!ze&&yg(I,L,Y)>-1}var sC=Zs(function(I,L,Y){var ye=-1,ze=typeof L=="function",ut=jh(I)?Wi(I.length):[];return If(I,function(Vt){ut[++ye]=ze?eo(L,Vt,Y):Ig(Vt,L,Y)}),ut}),z_=Xb(function(I,L,Y){bm(I,Y,L)});function Hh(I,L){var Y=Ks(I)?sr:Tp;return Y(I,Wr(L,3))}function U_(I,L,Y,ye){return I==null?[]:(Ks(L)||(L=L==null?[]:[L]),Y=ye?t:Y,Ks(Y)||(Y=Y==null?[]:[Y]),sT(I,L,Y))}var xT=Xb(function(I,L,Y){I[Y?0:1].push(L)},function(){return[[],[]]});function Ju(I,L,Y){var ye=Ks(I)?x_:wu,ze=arguments.length<3;return ye(I,Wr(L,4),Y,ze,If)}function wT(I,L,Y){var ye=Ks(I)?gs:wu,ze=arguments.length<3;return ye(I,Wr(L,4),Y,ze,p1)}function aX(I,L){var Y=Ks(I)?Cu:LM;return Y(I,ST(Wr(L,3)))}function lX(I){var L=Ks(I)?FM:Wy;return L(I)}function WM(I,L,Y){(Y?jd(I,L,Y):L===t)?L=1:L=sa(L);var ye=Ks(I)?l3:Yy;return ye(I,L)}function cX(I){var L=Ks(I)?ED:Yb;return L(I)}function g8(I){if(I==null)return 0;if(jh(I))return YD(I)?Cg(I):I.length;var L=Du(I);return L==Ee||L==sn?I.size:nT(I).length}function YM(I,L,Y){var ye=Ks(I)?kb:kt;return Y&&jd(I,L,Y)&&(L=t),ye(I,Wr(L,3))}var dX=Zs(function(I,L){if(I==null)return[];var Y=L.length;return Y>1&&jd(I,L[0],L[1])?L=[]:Y>2&&jd(L[0],L[1],L[2])&&(L=[L[0]]),sT(I,ru(L,1),[])}),$D=XN||function(){return Qc.Date.now()};function uX(I,L){if(typeof L!="function")throw new Mh(o);return I=sa(I),function(){if(--I<1)return L.apply(this,arguments)}}function QM(I,L,Y){return L=Y?t:L,L=I&&L==null?I.length:L,wm(I,Re,t,t,t,t,L)}function H_(I,L){var Y;if(typeof L!="function")throw new Mh(o);return I=sa(I),function(){return--I>0&&(Y=L.apply(this,arguments)),I<=1&&(L=t),Y}}var j_=Zs(function(I,L,Y){var ye=$;if(Y.length){var ze=Qu(Y,N_(j_));ye|=xe}return wm(I,ye,L,Y,ze)}),f3=Zs(function(I,L,Y){var ye=$|q;if(Y.length){var ze=Qu(Y,N_(f3));ye|=xe}return wm(L,ye,I,Y,ze)});function g3(I,L,Y){L=Y?t:L;var ye=wm(I,te,t,t,t,t,t,L);return ye.placeholder=g3.placeholder,ye}function qD(I,L,Y){L=Y?t:L;var ye=wm(I,fe,t,t,t,t,t,L);return ye.placeholder=qD.placeholder,ye}function ZM(I,L,Y){var ye,ze,ut,Vt,ni,wi,xn=0,kn=!1,Wn=!1,Uo=!0;if(typeof I!="function")throw new Mh(o);L=Dm(L)||0,md(Y)&&(kn=!!Y.leading,Wn="maxWait"in Y,ut=Wn?zd(Dm(Y.maxWait)||0,L):ut,Uo="trailing"in Y?!!Y.trailing:Uo);function Sr(Jc){var Nf=ye,Kh=ze;return ye=ze=t,xn=Jc,Vt=I.apply(Kh,Nf),Vt}function is(Jc){return xn=Jc,ni=Ff(aa,L),kn?Sr(Jc):Vt}function ha(Jc){var Nf=Jc-wi,Kh=Jc-xn,mO=L-Nf;return Wn?Ud(mO,ut-Kh):mO}function Gr(Jc){var Nf=Jc-wi,Kh=Jc-xn;return wi===t||Nf>=L||Nf<0||Wn&&Kh>=ut}function aa(){var Jc=$D();if(Gr(Jc))return Za(Jc);ni=Ff(aa,ha(Jc))}function Za(Jc){return ni=t,Uo&&ye?Sr(Jc):(ye=ze=t,Vt)}function Ep(){ni!==t&&pT(ni),xn=0,ye=wi=ze=ni=t}function $h(){return ni===t?Vt:Za($D())}function qh(){var Jc=$D(),Nf=Gr(Jc);if(ye=arguments,ze=this,wi=Jc,Nf){if(ni===t)return is(wi);if(Wn)return pT(ni),ni=Ff(aa,L),Sr(wi)}return ni===t&&(ni=Ff(aa,L)),Vt}return qh.cancel=Ep,qh.flush=$h,qh}var KD=Zs(function(I,L){return YS(I,1,L)}),XM=Zs(function(I,L,Y){return YS(I,Dm(L)||0,Y)});function _8(I){return wm(I,ke)}function A1(I,L){if(typeof I!="function"||L!=null&&typeof L!="function")throw new Mh(o);var Y=function(){var ye=arguments,ze=L?L.apply(this,ye):ye[0],ut=Y.cache;if(ut.has(ze))return ut.get(ze);var Vt=I.apply(this,ye);return Y.cache=ut.set(ze,Vt)||ut,Vt};return Y.cache=new(A1.Cache||ym),Y}A1.Cache=ym;function ST(I){if(typeof I!="function")throw new Mh(o);return function(){var L=arguments;switch(L.length){case 0:return!I.call(this);case 1:return!I.call(this,L[0]);case 2:return!I.call(this,L[0],L[1]);case 3:return!I.call(this,L[0],L[1],L[2])}return!I.apply(this,L)}}function _3(I){return H_(2,I)}var y8=y1(function(I,L){L=L.length==1&&Ks(L[0])?sr(L[0],Jl(Wr())):sr(ru(L,1),Jl(Wr()));var Y=L.length;return Zs(function(ye){for(var ze=-1,ut=Ud(ye.length,Y);++ze=L}),aC=yn((function(){return arguments})())?yn:function(I){return Id(I)&&Wa.call(I,"callee")&&!i1.call(I,"callee")},Ks=Wi.isArray,I8=Yx?Jl(Yx):MD;function jh(I){return I!=null&&dC(I.length)&&!$0(I)}function hd(I){return Id(I)&&jh(I)}function lC(I){return I===!0||I===!1||Id(I)&&Tu(I)==Cn}var _c=JN||uO,E8=MS?Jl(MS):k_;function WD(I){return Id(I)&&I.nodeType===1&&!rv(I)}function yX(I){if(I==null)return!0;if(jh(I)&&(Ks(I)||typeof I=="string"||typeof I.splice=="function"||_c(I)||sv(I)||aC(I)))return!I.length;var L=Du(I);if(L==Ee||L==sn)return!I.size;if(gl(I))return!nT(I).length;for(var Y in I)if(Wa.call(I,Y))return!1;return!0}function vX(I,L){return Cm(I,L)}function bX(I,L,Y){Y=typeof Y=="function"?Y:t;var ye=Y?Y(I,L):t;return ye===t?Cm(I,L,t,Y):!!ye}function v3(I){if(!Id(I))return!1;var L=Tu(I);return L==ro||L==Co||typeof I.message=="string"&&typeof I.name=="string"&&!rv(I)}function TT(I){return typeof I=="number"&&AM(I)}function $0(I){if(!md(I))return!1;var L=Tu(I);return L==pr||L==Qr||L==Fo||L==Zt}function cC(I){return typeof I=="number"&&I==sa(I)}function dC(I){return typeof I=="number"&&I>-1&&I%1==0&&I<=li}function md(I){var L=typeof I;return I!=null&&(L=="object"||L=="function")}function Id(I){return I!=null&&typeof I=="object"}var D8=Ts?Jl(Ts):_o;function CX(I,L){return I===L||f1(I,L,vT(L))}function xX(I,L,Y){return Y=typeof Y=="function"?Y:t,f1(I,L,vT(L),Y)}function wX(I){return C3(I)&&I!=+I}function SX(I){if(I1(I))throw new Fs(i);return OD(I)}function b3(I){return I===null}function TX(I){return I==null}function C3(I){return typeof I=="number"||Id(I)&&Tu(I)==xi}function rv(I){if(!Id(I)||Tu(I)!=Dt)return!1;var L=M0(I);if(L===null)return!0;var Y=Wa.call(L,"constructor")&&L.constructor;return typeof Y=="function"&&Y instanceof Y&&zb.call(Y)==Oh}var x3=OS?Jl(OS):eT;function fd(I){return cC(I)&&I>=-li&&I<=li}var k1=pD?Jl(pD):tT;function YD(I){return typeof I=="string"||!Ks(I)&&Id(I)&&Tu(I)==Ci}function sh(I){return typeof I=="symbol"||Id(I)&&Tu(I)==Un}var sv=Qx?Jl(Qx):iT;function QD(I){return I===t}function A8(I){return Id(I)&&Du(I)==Pn}function k8(I){return Id(I)&&Tu(I)==go}var ZD=H0(RD),w3=H0(function(I,L){return I<=L});function IT(I){if(!I)return[];if(jh(I))return YD(I)?bf(I):pd(I);if(wg&&I[wg])return PS(I[wg]());var L=Du(I),Y=L==Ee?ql:L==sn?Bd:ET;return Y(I)}function av(I){if(!I)return I===0?I:0;if(I=Dm(I),I===ei||I===-ei){var L=I<0?-1:1;return L*zt}return I===I?I:0}function sa(I){var L=av(I),Y=L%1;return L===L?Y?L-Y:L:0}function eO(I){return I?Lh(sa(I),0,wt):0}function Dm(I){if(typeof I=="number")return I;if(sh(I))return Bi;if(md(I)){var L=typeof I.valueOf=="function"?I.valueOf():I;I=md(L)?L+"":L}if(typeof I!="string")return I===0?I:+I;I=Bc(I);var Y=No.test(I);return Y||fr.test(I)?Db(I.slice(2),Y?2:8):So.test(I)?Bi:+I}function S3(I){return Zu(I,Am(I))}function lv(I){return I?Lh(sa(I),-li,li):I===0?I:0}function Kl(I){return I==null?"":th(I)}var Gh=R_(function(I,L){if(gl(L)||jh(L)){Zu(L,ep(L),I);return}for(var Y in L)Wa.call(L,Y)&&Gy(I,Y,L[Y])}),T3=R_(function(I,L){Zu(L,Am(L),I)}),XD=R_(function(I,L,Y,ye){Zu(L,Am(L),I,ye)}),M8=R_(function(I,L,Y,ye){Zu(L,ep(L),I,ye)}),tO=ih(D_);function IX(I,L){var Y=Uy(I);return L==null?Y:WS(Y,L)}var EX=Zs(function(I,L){I=El(I);var Y=-1,ye=L.length,ze=ye>2?L[2]:t;for(ze&&jd(L[0],L[1],ze)&&(ye=1);++Y1),ut}),Zu(I,yT(I),Y),ye&&(Y=Hd(Y,v|w|O,_T));for(var ze=L.length;ze--;)V0(Y,L[ze]);return Y});function V8(I,L){return eA(I,ST(Wr(L)))}var M3=ih(function(I,L){return I==null?{}:aT(I,L)});function eA(I,L){if(I==null)return{};var Y=sr(yT(I),function(ye){return[ye]});return L=Wr(L),N0(I,Y,function(ye,ze){return L(ye,ze[0])})}function z8(I,L,Y){L=Mf(L,I);var ye=-1,ze=L.length;for(ze||(ze=1,I=t);++yeL){var ye=I;I=L,L=ye}if(Y||I%1||L%1){var ze=US();return Ud(I+ze*(L-I+uD("1e-"+((ze+"").length-1))),L)}return g1(I,L)}var uC=Of(function(I,L,Y){return L=L.toLowerCase(),I+(Y?DT(L):L)});function DT(I){return sO(Kl(I).toLowerCase())}function AT(I){return I=Kl(I),I&&I.replace(pa,Lb).replace(DS,"")}function oO(I,L,Y){I=Kl(I),L=th(L);var ye=I.length;Y=Y===t?ye:Lh(sa(Y),0,ye);var ze=Y;return Y-=L.length,Y>=0&&I.slice(Y,ze)==L}function tA(I){return I=Kl(I),I&&Gx.test(I)?I.replace(nu,Do):I}function j8(I){return I=Kl(I),I&&Ie.test(I)?I.replace(ge,"\\$&"):I}var G8=Of(function(I,L,Y){return I+(Y?"-":"")+L.toLowerCase()}),$8=Of(function(I,L,Y){return I+(Y?" ":"")+L.toLowerCase()}),q8=F_("toLowerCase");function LX(I,L,Y){I=Kl(I),L=sa(L);var ye=L?Cg(I):0;if(!L||ye>=L)return I;var ze=(L-ye)/2;return eC(Gb(ze),Y)+I+eC(n1(ze),Y)}function NX(I,L,Y){I=Kl(I),L=sa(L);var ye=L?Cg(I):0;return L&&ye>>0,Y?(I=Kl(I),I&&(typeof L=="string"||L!=null&&!x3(L))&&(L=th(L),!L&&bg(I))?Vh(bf(I),0,Y):I.split(L,Y)):[]}var Y8=Of(function(I,L,Y){return I+(Y?" ":"")+sO(L)});function Q8(I,L,Y){return I=Kl(I),Y=Y==null?0:Lh(sa(Y),0,I.length),L=th(L),I.slice(Y,Y+L.length)==L}function Z8(I,L,Y){var ye=rt.templateSettings;Y&&jd(I,L,Y)&&(L=t),I=Kl(I),L=XD({},L,ye,tC);var ze=XD({},L.imports,ye.imports,tC),ut=ep(ze),Vt=Qo(ze,ut),ni,wi,xn=0,kn=L.interpolate||Er,Wn="__p += '",Uo=eh((L.escape||Er).source+"|"+kn.source+"|"+(kn===gg?Ti:Er).source+"|"+(L.evaluate||Er).source+"|$","g"),Sr="//# sourceURL="+(Wa.call(L,"sourceURL")?(L.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++E0+"]")+` `;I.replace(Uo,function(Gr,aa,Za,Ep,$h,qh){return Za||(Za=Ep),Wn+=I.slice(xn,qh).replace(Ll,fD),aa&&(ni=!0,Wn+=`' + __e(`+aa+`) + '`),$h&&(wi=!0,Wn+=`'; `+$h+`; __p += '`),Za&&(Wn+=`' + ((__t = (`+Za+`)) == null ? '' : __t) + '`),xn=qh+Gr.length,Gr}),Wn+=`'; `;var is=Wa.call(L,"variable")&&L.variable;if(!is)Wn=`with (obj) { `+Wn+` } `;else if(Wt.test(is))throw new Fs(r);Wn=(wi?Wn.replace(qa,""):Wn).replace(Yc,"$1").replace(Ry,"$1;"),Wn="function("+(is||"obj")+`) { `+(is?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(ni?", __e = _.escape":"")+(wi?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Wn+`return __p }`;var ha=oH(function(){return Ka(ut,Sr+"return "+Wn).apply(t,Vt)});if(ha.source=Wn,v3(ha))throw ha;return ha}function X8(I){return Kl(I).toLowerCase()}function J8(I){return Kl(I).toUpperCase()}function VX(I,L,Y){if(I=Kl(I),I&&(Y||L===t))return Bc(I);if(!I||!(L=th(L)))return I;var ye=bf(I),ze=bf(L),ut=Pb(ye,ze),Vt=xo(ye,ze)+1;return Vh(ye,ut,Vt).join("")}function eH(I,L,Y){if(I=Kl(I),I&&(Y||L===t))return I.slice(0,e1(I)+1);if(!I||!(L=th(L)))return I;var ye=bf(I),ze=xo(ye,bf(L))+1;return Vh(ye,0,ze).join("")}function tH(I,L,Y){if(I=Kl(I),I&&(Y||L===t))return I.replace($e,"");if(!I||!(L=th(L)))return I;var ye=bf(I),ze=Pb(ye,bf(L));return Vh(ye,ze).join("")}function M1(I,L){var Y=Xe,ye=yt;if(md(L)){var ze="separator"in L?L.separator:ze;Y="length"in L?sa(L.length):Y,ye="omission"in L?th(L.omission):ye}I=Kl(I);var ut=I.length;if(bg(I)){var Vt=bf(I);ut=Vt.length}if(Y>=ut)return I;var ni=Y-Cg(ye);if(ni<1)return ye;var wi=Vt?Vh(Vt,0,ni).join(""):I.slice(0,ni);if(ze===t)return wi+ye;if(Vt&&(ni+=wi.length-ni),x3(ze)){if(I.slice(ni).search(ze)){var xn,kn=wi;for(ze.global||(ze=eh(ze.source,Kl(qn.exec(ze))+"g")),ze.lastIndex=0;xn=ze.exec(kn);)var Wn=xn.index;wi=wi.slice(0,Wn===t?ni:Wn)}}else if(I.indexOf(th(ze),ni)!=ni){var Uo=wi.lastIndexOf(ze);Uo>-1&&(wi=wi.slice(0,Uo))}return wi+ye}function iH(I){return I=Kl(I),I&&fg.test(I)?I.replace(mf,Nb):I}var nH=Of(function(I,L,Y){return I+(Y?" ":"")+L.toUpperCase()}),sO=F_("toUpperCase");function iA(I,L,Y){return I=Kl(I),L=Y?t:L,L===t?gD(I)?Bb(I):xu(I):I.match(L)||[]}var oH=Zs(function(I,L){try{return eo(I,t,L)}catch(Y){return v3(Y)?Y:new Fs(Y)}}),rH=ih(function(I,L){return Ic(L,function(Y){Y=Pf(Y),bm(I,Y,j_(I[Y],I))}),I});function nA(I){var L=I==null?0:I.length,Y=Wr();return I=L?sr(I,function(ye){if(typeof ye[1]!="function")throw new Mh(o);return[Y(ye[0]),ye[1]]}):[],Zs(function(ye){for(var ze=-1;++zeli)return[];var Y=wt,ye=Ud(I,wt);L=Wr(L),I-=wt;for(var ze=FS(ye,L);++Y0||L<0)?new wa(Y):(I<0?Y=Y.takeRight(-I):I&&(Y=Y.drop(I)),L!==t&&(L=sa(L),Y=L<0?Y.dropRight(-L):Y.take(L-I)),Y)},wa.prototype.takeRightWhile=function(I){return this.reverse().takeWhile(I).reverse()},wa.prototype.toArray=function(){return this.take(wt)},Nh(wa.prototype,function(I,L){var Y=/^(?:filter|find|map|reject)|While$/.test(L),ye=/^(?:head|last)$/.test(L),ze=rt[ye?"take"+(L=="last"?"Right":""):L],ut=ye||/^find/.test(L);ze&&(rt.prototype[L]=function(){var Vt=this.__wrapped__,ni=ye?[1]:arguments,wi=Vt instanceof wa,xn=ni[0],kn=wi||Ks(Vt),Wn=function(aa){var Za=ze.apply(rt,ud([aa],ni));return ye&&Uo?Za[0]:Za};kn&&Y&&typeof xn=="function"&&xn.length!=1&&(wi=kn=!1);var Uo=this.__chain__,Sr=!!this.__actions__.length,is=ut&&!Uo,ha=wi&&!Sr;if(!ut&&kn){Vt=ha?Vt:new wa(this);var Gr=I.apply(Vt,ni);return Gr.__actions__.push({func:Vc,args:[Wn],thisArg:t}),new Fh(Gr,Uo)}return is&&ha?I.apply(this,ni):(Gr=this.thru(Wn),is?ye?Gr.value()[0]:Gr.value():Gr)})}),Ic(["pop","push","shift","sort","splice","unshift"],function(I){var L=t1[I],Y=/^(?:push|sort|unshift)$/.test(I)?"tap":"thru",ye=/^(?:pop|shift)$/.test(I);rt.prototype[I]=function(){var ze=arguments;if(ye&&!this.__chain__){var ut=this.value();return L.apply(Ks(ut)?ut:[],ze)}return this[Y](function(Vt){return L.apply(Ks(Vt)?Vt:[],ze)})}}),Nh(wa.prototype,function(I,L){var Y=rt[L];if(Y){var ye=Y.name+"";Wa.call(F0,ye)||(F0[ye]=[]),F0[ye].push({name:L,func:Y})}}),F0[P_(t,q).name]=[{name:"wrapper",func:t}],wa.prototype.clone=i3,wa.prototype.reverse=n3,wa.prototype.value=bD,rt.prototype.at=zh,rt.prototype.chain=Uh,rt.prototype.commit=oh,rt.prototype.next=rh,rt.prototype.plant=Im,rt.prototype.reverse=Lf,rt.prototype.toJSON=rt.prototype.valueOf=rt.prototype.value=Dl,rt.prototype.first=rt.prototype.head,wg&&(rt.prototype[wg]=Xu),rt},xf=EM();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Qc._=xf,define(function(){return xf})):Nd?((Nd.exports=xf)._=xf,Ab._=xf):Qc._=xf}).call(YN)});var FJ;function HH(){return FJ}function mC(t){let n=FJ;return FJ=t,n}var q0e=Symbol("NotFound");function TO(t){return t===q0e||t?.name==="\u0275NotFound"}function KH(t,n){return Object.is(t,n)}var Rm=null,jH=!1,PJ=1,p8e=null,op=Symbol("SIGNAL");function Os(t){let n=Rm;return Rm=t,n}function WH(){return Rm}var dA={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function VT(t){if(jH)throw new Error("");if(Rm===null)return;Rm.consumerOnSignalRead(t);let n=Rm.producersTail;if(n!==void 0&&n.producer===t)return;let e,i=Rm.recomputing;if(i&&(e=n!==void 0?n.nextProducer:Rm.producers,e!==void 0&&e.producer===t)){Rm.producersTail=e,e.lastReadVersion=t.version;return}let o=t.consumersTail;if(o!==void 0&&o.consumer===Rm&&(!i||m8e(o,Rm)))return;let r=IO(Rm),s={producer:t,consumer:Rm,nextProducer:e,prevConsumer:o,lastReadVersion:t.version,nextConsumer:void 0};Rm.producersTail=s,n!==void 0?n.nextProducer=s:Rm.producers=s,r&&Q0e(t,s)}function K0e(){PJ++}function YH(t){if(!(IO(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===PJ)){if(!t.producerMustRecompute(t)&&!pA(t)){qH(t);return}t.producerRecomputeValue(t),qH(t)}}function LJ(t){if(t.consumers===void 0)return;let n=jH;jH=!0;try{for(let e=t.consumers;e!==void 0;e=e.nextConsumer){let i=e.consumer;i.dirty||h8e(i)}}finally{jH=n}}function NJ(){return Rm?.consumerAllowSignalWrites!==!1}function h8e(t){t.dirty=!0,LJ(t),t.consumerMarkedDirty?.(t)}function qH(t){t.dirty=!1,t.lastCleanEpoch=PJ}function zT(t){return t&&W0e(t),Os(t)}function W0e(t){t.producersTail=void 0,t.recomputing=!0}function uA(t,n){Os(n),t&&Y0e(t)}function Y0e(t){t.recomputing=!1;let n=t.producersTail,e=n!==void 0?n.nextProducer:t.producers;if(e!==void 0){if(IO(t))do e=BJ(e);while(e!==void 0);n!==void 0?n.nextProducer=void 0:t.producers=void 0}}function pA(t){for(let n=t.producers;n!==void 0;n=n.nextProducer){let e=n.producer,i=n.lastReadVersion;if(i!==e.version||(YH(e),i!==e.version))return!0}return!1}function UT(t){if(IO(t)){let n=t.producers;for(;n!==void 0;)n=BJ(n)}t.producers=void 0,t.producersTail=void 0,t.consumers=void 0,t.consumersTail=void 0}function Q0e(t,n){let e=t.consumersTail,i=IO(t);if(e!==void 0?(n.nextConsumer=e.nextConsumer,e.nextConsumer=n):(n.nextConsumer=void 0,t.consumers=n),n.prevConsumer=e,t.consumersTail=n,!i)for(let o=t.producers;o!==void 0;o=o.nextProducer)Q0e(o.producer,o)}function BJ(t){let n=t.producer,e=t.nextProducer,i=t.nextConsumer,o=t.prevConsumer;if(t.nextConsumer=void 0,t.prevConsumer=void 0,i!==void 0?i.prevConsumer=o:n.consumersTail=o,o!==void 0)o.nextConsumer=i;else if(n.consumers=i,!IO(n)){let r=n.producers;for(;r!==void 0;)r=BJ(r)}return e}function IO(t){return t.consumerIsAlwaysLive||t.consumers!==void 0}function QH(t){p8e?.(t)}function m8e(t,n){let e=n.producersTail;if(e!==void 0){let i=n.producers;do{if(i===t)return!0;if(i===e)break;i=i.nextProducer}while(i!==void 0)}return!1}function fB(t,n){let e=Object.create(f8e);e.computation=t,n!==void 0&&(e.equal=n);let i=()=>{if(YH(e),VT(e),e.value===mB)throw e.error;return e.value};return i[op]=e,QH(e),i}var GH=Symbol("UNSET"),$H=Symbol("COMPUTING"),mB=Symbol("ERRORED"),f8e=mt(be({},dA),{value:GH,dirty:!0,error:null,equal:KH,kind:"computed",producerMustRecompute(t){return t.value===GH||t.value===$H},producerRecomputeValue(t){if(t.value===$H)throw new Error("");let n=t.value;t.value=$H;let e=zT(t),i,o=!1;try{i=t.computation(),Os(null),o=n!==GH&&n!==mB&&i!==mB&&t.equal(n,i)}catch(r){i=mB,t.error=r}finally{uA(t,e)}if(o){t.value=n;return}t.value=i,t.version++}});function g8e(){throw new Error}var Z0e=g8e;function X0e(t){Z0e(t)}function VJ(t){Z0e=t}var _8e=null;function zJ(t,n){let e=Object.create(gB);e.value=t,n!==void 0&&(e.equal=n);let i=()=>J0e(e);return i[op]=e,QH(e),[i,s=>hA(e,s),s=>UJ(e,s)]}function J0e(t){return VT(t),t.value}function hA(t,n){NJ()||X0e(t),t.equal(t.value,n)||(t.value=n,y8e(t))}function UJ(t,n){NJ()||X0e(t),hA(t,n(t.value))}var gB=mt(be({},dA),{equal:KH,value:void 0,kind:"signal"});function y8e(t){t.version++,K0e(),LJ(t),_8e?.(t)}function ys(t){return typeof t=="function"}function EO(t){let e=t(i=>{Error.call(i),i.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var ZH=EO(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription: ${e.map((i,o)=>`${o+1}) ${i.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=e});function P1(t,n){if(t){let e=t.indexOf(n);0<=e&&t.splice(e,1)}}var Xr=class t{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let r of e)r.remove(this);else e.remove(this);let{initialTeardown:i}=this;if(ys(i))try{i()}catch(r){n=r instanceof ZH?r.errors:[r]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let r of o)try{eye(r)}catch(s){n=n??[],s instanceof ZH?n=[...n,...s.errors]:n.push(s)}}if(n)throw new ZH(n)}}add(n){var e;if(n&&n!==this)if(this.closed)eye(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(n)}}_hasParent(n){let{_parentage:e}=this;return e===n||Array.isArray(e)&&e.includes(n)}_addParent(n){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(n),e):e?[e,n]:n}_removeParent(n){let{_parentage:e}=this;e===n?this._parentage=null:Array.isArray(e)&&P1(e,n)}remove(n){let{_finalizers:e}=this;e&&P1(e,n),n instanceof t&&n._removeParent(this)}};Xr.EMPTY=(()=>{let t=new Xr;return t.closed=!0,t})();var HJ=Xr.EMPTY;function XH(t){return t instanceof Xr||t&&"closed"in t&&ys(t.remove)&&ys(t.add)&&ys(t.unsubscribe)}function eye(t){ys(t)?t():t.unsubscribe()}var pv={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var DO={setTimeout(t,n,...e){let{delegate:i}=DO;return i?.setTimeout?i.setTimeout(t,n,...e):setTimeout(t,n,...e)},clearTimeout(t){let{delegate:n}=DO;return(n?.clearTimeout||clearTimeout)(t)},delegate:void 0};function JH(t){DO.setTimeout(()=>{let{onUnhandledError:n}=pv;if(n)n(t);else throw t})}function L1(){}var tye=jJ("C",void 0,void 0);function iye(t){return jJ("E",void 0,t)}function nye(t){return jJ("N",t,void 0)}function jJ(t,n,e){return{kind:t,value:n,error:e}}var mA=null;function AO(t){if(pv.useDeprecatedSynchronousErrorHandling){let n=!mA;if(n&&(mA={errorThrown:!1,error:null}),t(),n){let{errorThrown:e,error:i}=mA;if(mA=null,e)throw i}}else t()}function oye(t){pv.useDeprecatedSynchronousErrorHandling&&mA&&(mA.errorThrown=!0,mA.error=t)}var fA=class extends Xr{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,XH(n)&&n.add(this)):this.destination=C8e}static create(n,e,i){return new hv(n,e,i)}next(n){this.isStopped?$J(nye(n),this):this._next(n)}error(n){this.isStopped?$J(iye(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?$J(tye,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},v8e=Function.prototype.bind;function GJ(t,n){return v8e.call(t,n)}var qJ=class{constructor(n){this.partialObserver=n}next(n){let{partialObserver:e}=this;if(e.next)try{e.next(n)}catch(i){e7(i)}}error(n){let{partialObserver:e}=this;if(e.error)try{e.error(n)}catch(i){e7(i)}else e7(n)}complete(){let{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(e){e7(e)}}},hv=class extends fA{constructor(n,e,i){super();let o;if(ys(n)||!n)o={next:n??void 0,error:e??void 0,complete:i??void 0};else{let r;this&&pv.useDeprecatedNextContext?(r=Object.create(n),r.unsubscribe=()=>this.unsubscribe(),o={next:n.next&&GJ(n.next,r),error:n.error&&GJ(n.error,r),complete:n.complete&&GJ(n.complete,r)}):o=n}this.destination=new qJ(o)}};function e7(t){pv.useDeprecatedSynchronousErrorHandling?oye(t):JH(t)}function b8e(t){throw t}function $J(t,n){let{onStoppedNotification:e}=pv;e&&DO.setTimeout(()=>e(t,n))}var C8e={closed:!0,next:L1,error:b8e,complete:L1};var kO=typeof Symbol=="function"&&Symbol.observable||"@@observable";function zf(t){return t}function KJ(...t){return WJ(t)}function WJ(t){return t.length===0?zf:t.length===1?t[0]:function(e){return t.reduce((i,o)=>o(i),e)}}var Cr=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){let i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,o){let r=w8e(e)?e:new hv(e,i,o);return AO(()=>{let{operator:s,source:d}=this;r.add(s?s.call(r,d):d?this._subscribe(r):this._trySubscribe(r))}),r}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return i=rye(i),new i((o,r)=>{let s=new hv({next:d=>{try{e(d)}catch(m){r(m),s.unsubscribe()}},error:r,complete:o});this.subscribe(s)})}_subscribe(e){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(e)}[kO](){return this}pipe(...e){return WJ(e)(this)}toPromise(e){return e=rye(e),new e((i,o)=>{let r;this.subscribe(s=>r=s,s=>o(s),()=>i(r))})}}return t.create=n=>new t(n),t})();function rye(t){var n;return(n=t??pv.Promise)!==null&&n!==void 0?n:Promise}function x8e(t){return t&&ys(t.next)&&ys(t.error)&&ys(t.complete)}function w8e(t){return t&&t instanceof fA||x8e(t)&&XH(t)}function YJ(t){return ys(t?.lift)}function Es(t){return n=>{if(YJ(n))return n.lift(function(e){try{return t(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function ls(t,n,e,i,o){return new QJ(t,n,e,i,o)}var QJ=class extends fA{constructor(n,e,i,o,r,s){super(n),this.onFinalize=r,this.shouldUnsubscribe=s,this._next=e?function(d){try{e(d)}catch(m){n.error(m)}}:super._next,this._error=o?function(d){try{o(d)}catch(m){n.error(m)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(d){n.error(d)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((n=this.onFinalize)===null||n===void 0||n.call(this))}}};function MO(){return Es((t,n)=>{let e=null;t._refCount++;let i=ls(n,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){e=null;return}let o=t._connection,r=e;e=null,o&&(!r||o===r)&&o.unsubscribe(),n.unsubscribe()});t.subscribe(i),i.closed||(e=t.connect())})}var OO=class extends Cr{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,YJ(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){let n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:n}=this;this._subject=this._connection=null,n?.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new Xr;let e=this.getSubject();n.add(this.source.subscribe(ls(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),n.closed&&(this._connection=null,n=Xr.EMPTY)}return n}refCount(){return MO()(this)}};var RO={schedule(t){let n=requestAnimationFrame,e=cancelAnimationFrame,{delegate:i}=RO;i&&(n=i.requestAnimationFrame,e=i.cancelAnimationFrame);let o=n(r=>{e=void 0,t(r)});return new Xr(()=>e?.(o))},requestAnimationFrame(...t){let{delegate:n}=RO;return(n?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:n}=RO;return(n?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var sye=EO(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var hi=(()=>{class t extends Cr{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new t7(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new sye}next(e){AO(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(e)}})}error(e){AO(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){AO(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:i,isStopped:o,observers:r}=this;return i||o?HJ:(this.currentObservers=null,r.push(e),new Xr(()=>{this.currentObservers=null,P1(r,e)}))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:o,isStopped:r}=this;i?e.error(o):r&&e.complete()}asObservable(){let e=new Cr;return e.source=this,e}}return t.create=(n,e)=>new t7(n,e),t})(),t7=class extends hi{constructor(n,e){super(),this.destination=n,this.source=e}next(n){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0||i.call(e,n)}error(n){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0||i.call(e,n)}complete(){var n,e;(e=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||e===void 0||e.call(n)}_subscribe(n){var e,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(n))!==null&&i!==void 0?i:HJ}};var Gs=class extends hi{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){let e=super._subscribe(n);return!e.closed&&n.next(this._value),e}getValue(){let{hasError:n,thrownError:e,_value:i}=this;if(n)throw e;return this._throwIfClosed(),i}next(n){super.next(this._value=n)}};var _B={now(){return(_B.delegate||Date).now()},delegate:void 0};var pi=class extends hi{constructor(n=1/0,e=1/0,i=_B){super(),this._bufferSize=n,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,e)}next(n){let{isStopped:e,_buffer:i,_infiniteTimeWindow:o,_timestampProvider:r,_windowTime:s}=this;e||(i.push(n),!o&&i.push(r.now()+s)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(n),{_infiniteTimeWindow:i,_buffer:o}=this,r=o.slice();for(let s=0;s0?super.requestAsyncId(n,e,i):(n.actions.push(this),n._scheduled||(n._scheduled=RO.requestAnimationFrame(()=>n.flush(void 0))))}recycleAsyncId(n,e,i=0){var o;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(n,e,i);let{actions:r}=n;e!=null&&e===n._scheduled&&((o=r[r.length-1])===null||o===void 0?void 0:o.id)!==e&&(RO.cancelAnimationFrame(e),n._scheduled=void 0)}};var o7=class extends LO{flush(n){this._active=!0;let e;n?e=n.id:(e=this._scheduled,this._scheduled=void 0);let{actions:i}=this,o;n=n||i.shift();do if(o=n.execute(n.state,n.delay))break;while((n=i[0])&&n.id===e&&i.shift());if(this._active=!1,o){for(;(n=i[0])&&n.id===e&&i.shift();)n.unsubscribe();throw o}}};var r7=new o7(n7);var cu=new Cr(t=>t.complete());function NO(t){return t&&ys(t.schedule)}function ZJ(t){return t[t.length-1]}function s7(t){return ys(ZJ(t))?t.pop():void 0}function fC(t){return NO(ZJ(t))?t.pop():void 0}function lye(t,n){return typeof ZJ(t)=="number"?t.pop():n}function dye(t,n,e,i){function o(r){return r instanceof e?r:new e(function(s){s(r)})}return new(e||(e=Promise))(function(r,s){function d(w){try{v(i.next(w))}catch(O){s(O)}}function m(w){try{v(i.throw(w))}catch(O){s(O)}}function v(w){w.done?r(w.value):o(w.value).then(d,m)}v((i=i.apply(t,n||[])).next())})}function cye(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],i=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function gA(t){return this instanceof gA?(this.v=t,this):new gA(t)}function uye(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(t,n||[]),o,r=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),d("next"),d("throw"),d("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(V){return function($){return Promise.resolve($).then(V,O)}}function d(V,$){i[V]&&(o[V]=function(q){return new Promise(function(W,te){r.push([V,q,W,te])>1||m(V,q)})},$&&(o[V]=$(o[V])))}function m(V,$){try{v(i[V]($))}catch(q){N(r[0][3],q)}}function v(V){V.value instanceof gA?Promise.resolve(V.value.v).then(w,O):N(r[0][2],V)}function w(V){m("next",V)}function O(V){m("throw",V)}function N(V,$){V($),r.shift(),r.length&&m(r[0][0],r[0][1])}}function pye(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],e;return n?n.call(t):(t=typeof cye=="function"?cye(t):t[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(r){e[r]=t[r]&&function(s){return new Promise(function(d,m){s=t[r](s),o(d,m,s.done,s.value)})}}function o(r,s,d,m){Promise.resolve(m).then(function(v){r({value:v,done:d})},s)}}var BO=t=>t&&typeof t.length=="number"&&typeof t!="function";function a7(t){return ys(t?.then)}function l7(t){return ys(t[kO])}function c7(t){return Symbol.asyncIterator&&ys(t?.[Symbol.asyncIterator])}function d7(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function S8e(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var u7=S8e();function p7(t){return ys(t?.[u7])}function h7(t){return uye(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:i,done:o}=yield gA(e.read());if(o)return yield gA(void 0);yield yield gA(i)}}finally{e.releaseLock()}})}function m7(t){return ys(t?.getReader)}function Al(t){if(t instanceof Cr)return t;if(t!=null){if(l7(t))return T8e(t);if(BO(t))return I8e(t);if(a7(t))return E8e(t);if(c7(t))return hye(t);if(p7(t))return D8e(t);if(m7(t))return A8e(t)}throw d7(t)}function T8e(t){return new Cr(n=>{let e=t[kO]();if(ys(e.subscribe))return e.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function I8e(t){return new Cr(n=>{for(let e=0;e{t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,JH)})}function D8e(t){return new Cr(n=>{for(let e of t)if(n.next(e),n.closed)return;n.complete()})}function hye(t){return new Cr(n=>{k8e(t,n).catch(e=>n.error(e))})}function A8e(t){return hye(h7(t))}function k8e(t,n){var e,i,o,r;return dye(this,void 0,void 0,function*(){try{for(e=pye(t);i=yield e.next(),!i.done;){let s=i.value;if(n.next(s),n.closed)return}}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=e.return)&&(yield r.call(e))}finally{if(o)throw o.error}}n.complete()})}function Bg(t,n,e,i=0,o=!1){let r=n.schedule(function(){e(),o?t.add(this.schedule(null,i)):this.unsubscribe()},i);if(t.add(r),!o)return r}function VO(t,n=0){return Es((e,i)=>{e.subscribe(ls(i,o=>Bg(i,t,()=>i.next(o),n),()=>Bg(i,t,()=>i.complete(),n),o=>Bg(i,t,()=>i.error(o),n)))})}function zO(t,n=0){return Es((e,i)=>{i.add(t.schedule(()=>e.subscribe(i),n))})}function mye(t,n){return Al(t).pipe(zO(n),VO(n))}function fye(t,n){return Al(t).pipe(zO(n),VO(n))}function gye(t,n){return new Cr(e=>{let i=0;return n.schedule(function(){i===t.length?e.complete():(e.next(t[i++]),e.closed||this.schedule())})})}function _ye(t,n){return new Cr(e=>{let i;return Bg(e,n,()=>{i=t[u7](),Bg(e,n,()=>{let o,r;try{({value:o,done:r}=i.next())}catch(s){e.error(s);return}r?e.complete():e.next(o)},0,!0)}),()=>ys(i?.return)&&i.return()})}function f7(t,n){if(!t)throw new Error("Iterable cannot be null");return new Cr(e=>{Bg(e,n,()=>{let i=t[Symbol.asyncIterator]();Bg(e,n,()=>{i.next().then(o=>{o.done?e.complete():e.next(o.value)})},0,!0)})})}function yye(t,n){return f7(h7(t),n)}function vye(t,n){if(t!=null){if(l7(t))return mye(t,n);if(BO(t))return gye(t,n);if(a7(t))return fye(t,n);if(c7(t))return f7(t,n);if(p7(t))return _ye(t,n);if(m7(t))return yye(t,n)}throw d7(t)}function nr(t,n){return n?vye(t,n):Al(t)}function ci(...t){let n=fC(t);return nr(t,n)}function HT(t,n){let e=ys(t)?t:()=>t,i=o=>o.error(e());return new Cr(n?o=>n.schedule(i,0,o):i)}function UO(t){return!!t&&(t instanceof Cr||ys(t.lift)&&ys(t.subscribe))}var mv=EO(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function Wl(t,n){let e=typeof n=="object";return new Promise((i,o)=>{let r=new hv({next:s=>{i(s),r.unsubscribe()},error:o,complete:()=>{e?i(n.defaultValue):o(new mv)}});t.subscribe(r)})}function bye(t){return t instanceof Date&&!isNaN(t)}function vt(t,n){return Es((e,i)=>{let o=0;e.subscribe(ls(i,r=>{i.next(t.call(n,r,o++))}))})}var{isArray:M8e}=Array;function O8e(t,n){return M8e(n)?t(...n):t(n)}function jT(t){return vt(n=>O8e(t,n))}function g7(t,n,e,i){if(e)if(NO(e))i=e;else return function(...o){return g7(t,n,i).apply(this,o).pipe(jT(e))};return i?function(...o){return g7(t,n).apply(this,o).pipe(zO(i),VO(i))}:function(...o){let r=new Uf,s=!0;return new Cr(d=>{let m=r.subscribe(d);if(s){s=!1;let v=!1,w=!1;n.apply(this,[...o,(...O)=>{if(t){let N=O.shift();if(N!=null){r.error(N);return}}r.next(1n[i]),keys:e}}}return{args:t,keys:null}}function N8e(t){return t&&typeof t=="object"&&F8e(t)===P8e}function y7(t,n){return t.reduce((e,i,o)=>(e[i]=n[o],e),{})}function yc(...t){let n=fC(t),e=s7(t),{args:i,keys:o}=_7(t);if(i.length===0)return nr([],n);let r=new Cr(B8e(i,n,o?s=>y7(o,s):zf));return e?r.pipe(jT(e)):r}function B8e(t,n,e=zf){return i=>{Cye(n,()=>{let{length:o}=t,r=new Array(o),s=o,d=o;for(let m=0;m{let v=nr(t[m],n),w=!1;v.subscribe(ls(i,O=>{r[m]=O,w||(w=!0,d--),d||i.next(e(r.slice()))},()=>{--s||i.complete()}))},i)},i)}}function Cye(t,n,e){t?Bg(e,t,n):n()}function xye(t,n,e,i,o,r,s,d){let m=[],v=0,w=0,O=!1,N=()=>{O&&!m.length&&!v&&n.complete()},V=q=>v{r&&n.next(q),v++;let W=!1;Al(e(q,w++)).subscribe(ls(n,te=>{o?.(te),r?V(te):n.next(te)},()=>{W=!0},void 0,()=>{if(W)try{for(v--;m.length&&v$(te)):$(te)}N()}catch(te){n.error(te)}}))};return t.subscribe(ls(n,V,()=>{O=!0,N()})),()=>{d?.()}}function Yl(t,n,e=1/0){return ys(n)?Yl((i,o)=>vt((r,s)=>n(i,r,o,s))(Al(t(i,o))),e):(typeof n=="number"&&(e=n),Es((i,o)=>xye(i,o,t,e)))}function gC(t=1/0){return Yl(zf,t)}function wye(){return gC(1)}function _C(...t){return wye()(nr(t,fC(t)))}function fv(t){return new Cr(n=>{Al(t()).subscribe(n)})}function tc(...t){let n=s7(t),{args:e,keys:i}=_7(t),o=new Cr(r=>{let{length:s}=e;if(!s){r.complete();return}let d=new Array(s),m=s,v=s;for(let w=0;w{O||(O=!0,v--),d[w]=N},()=>m--,void 0,()=>{(!m||!O)&&(v||r.next(i?y7(i,d):d),r.complete())}))}});return n?o.pipe(jT(n)):o}var V8e=["addListener","removeListener"],z8e=["addEventListener","removeEventListener"],U8e=["on","off"];function Wh(t,n,e,i){if(ys(e)&&(i=e,e=void 0),i)return Wh(t,n,e).pipe(jT(i));let[o,r]=G8e(t)?z8e.map(s=>d=>t[s](n,d,e)):H8e(t)?V8e.map(Sye(t,n)):j8e(t)?U8e.map(Sye(t,n)):[];if(!o&&BO(t))return Yl(s=>Wh(s,n,e))(Al(t));if(!o)throw new TypeError("Invalid event target");return new Cr(s=>{let d=(...m)=>s.next(1r(d)})}function Sye(t,n){return e=>i=>t[e](n,i)}function H8e(t){return ys(t.addListener)&&ys(t.removeListener)}function j8e(t){return ys(t.on)&&ys(t.off)}function G8e(t){return ys(t.addEventListener)&&ys(t.removeEventListener)}function B1(t=0,n,e=aye){let i=-1;return n!=null&&(NO(n)?e=n:i=n),new Cr(o=>{let r=bye(t)?+t-e.now():t;r<0&&(r=0);let s=0;return e.schedule(function(){o.closed||(o.next(s++),0<=i?this.schedule(void 0,i):o.complete())},r)})}function GT(t=0,n=N1){return t<0&&(t=0),B1(t,t,n)}function ku(...t){let n=fC(t),e=lye(t,1/0),i=t;return i.length?i.length===1?Al(i[0]):gC(e)(nr(i,n)):cu}var vc=new Cr(L1);var{isArray:$8e}=Array;function Tye(t){return t.length===1&&$8e(t[0])?t[0]:t}function wn(t,n){return Es((e,i)=>{let o=0;e.subscribe(ls(i,r=>t.call(n,r,o++)&&i.next(r)))})}function vB(...t){return t=Tye(t),t.length===1?Al(t[0]):new Cr(q8e(t))}function q8e(t){return n=>{let e=[];for(let i=0;e&&!n.closed&&i{if(e){for(let r=0;r{let i=!1,o=null,r=null,s=!1,d=()=>{if(r?.unsubscribe(),r=null,i){i=!1;let v=o;o=null,e.next(v)}s&&e.complete()},m=()=>{r=null,s&&e.complete()};n.subscribe(ls(e,v=>{i=!0,o=v,r||Al(t(v)).subscribe(r=ls(e,d,m))},()=>{s=!0,(!i||!r||r.closed)&&e.complete()}))})}function v7(t,n=N1){return Iye(()=>B1(t,n))}function JJ(t,n=null){return n=n??t,Es((e,i)=>{let o=[],r=0;e.subscribe(ls(i,s=>{let d=null;r++%n===0&&o.push([]);for(let m of o)m.push(s),t<=m.length&&(d=d??[],d.push(m));if(d)for(let m of d)P1(o,m),i.next(m)},()=>{for(let s of o)i.next(s);i.complete()},void 0,()=>{o=null}))})}function Gd(t){return Es((n,e)=>{let i=null,o=!1,r;i=n.subscribe(ls(e,void 0,void 0,s=>{r=Al(t(s,Gd(t)(n))),i?(i.unsubscribe(),i=null,r.subscribe(e)):o=!0})),o&&(i.unsubscribe(),i=null,r.subscribe(e))})}function Eye(t,n,e,i,o){return(r,s)=>{let d=e,m=n,v=0;r.subscribe(ls(s,w=>{let O=v++;m=d?t(m,w,O):(d=!0,w),i&&s.next(m)},o&&(()=>{d&&s.next(m),s.complete()})))}}function lh(t,n){return ys(n)?Yl(t,n,1):Yl(t,1)}function id(t,n=N1){return Es((e,i)=>{let o=null,r=null,s=null,d=()=>{if(o){o.unsubscribe(),o=null;let v=r;r=null,i.next(v)}};function m(){let v=s+t,w=n.now();if(w{r=v,s=n.now(),o||(o=n.schedule(m,t),i.add(o))},()=>{d(),i.complete()},void 0,()=>{r=o=null}))})}function q_(t){return Es((n,e)=>{let i=!1;n.subscribe(ls(e,o=>{i=!0,e.next(o)},()=>{i||e.next(t),e.complete()}))})}function Sn(t){return t<=0?()=>cu:Es((n,e)=>{let i=0;n.subscribe(ls(e,o=>{++i<=t&&(e.next(o),t<=i&&e.complete())}))})}function Dye(){return Es((t,n)=>{t.subscribe(ls(n,L1))})}function Aye(t){return vt(()=>t)}function eee(t,n){return n?e=>_C(n.pipe(Sn(1),Dye()),e.pipe(eee(t))):Yl((e,i)=>Al(t(e,i)).pipe(Sn(1),Aye(e)))}function bB(t,n=N1){let e=B1(t,n);return eee(()=>e)}function rp(t,n=zf){return t=t??K8e,Es((e,i)=>{let o,r=!0;e.subscribe(ls(i,s=>{let d=n(s);(r||!t(o,d))&&(r=!1,o=d,i.next(s))}))})}function K8e(t,n){return t===n}function b7(t=W8e){return Es((n,e)=>{let i=!1;n.subscribe(ls(e,o=>{i=!0,e.next(o)},()=>i?e.complete():e.error(t())))})}function W8e(){return new mv}function yC(t){return Es((n,e)=>{try{n.subscribe(e)}finally{e.add(t)}})}function Vg(t,n){let e=arguments.length>=2;return i=>i.pipe(t?wn((o,r)=>t(o,r,i)):zf,Sn(1),e?q_(n):b7(()=>new mv))}function HO(t){return t<=0?()=>cu:Es((n,e)=>{let i=[];n.subscribe(ls(e,o=>{i.push(o),t{for(let o of i)e.next(o);e.complete()},void 0,()=>{i=null}))})}function tee(t,n){let e=arguments.length>=2;return i=>i.pipe(t?wn((o,r)=>t(o,r,i)):zf,HO(1),e?q_(n):b7(()=>new mv))}function C7(){return Es((t,n)=>{let e,i=!1;t.subscribe(ls(n,o=>{let r=e;e=o,i&&n.next([r,o]),i=!0}))})}function iee(t,n){return Es(Eye(t,n,arguments.length>=2,!0))}function CB(t={}){let{connector:n=()=>new hi,resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:o=!0}=t;return r=>{let s,d,m,v=0,w=!1,O=!1,N=()=>{d?.unsubscribe(),d=void 0},V=()=>{N(),s=m=void 0,w=O=!1},$=()=>{let q=s;V(),q?.unsubscribe()};return Es((q,W)=>{v++,!O&&!w&&N();let te=m=m??n();W.add(()=>{v--,v===0&&!O&&!w&&(d=nee($,o))}),te.subscribe(W),!s&&v>0&&(s=new hv({next:fe=>te.next(fe),error:fe=>{O=!0,N(),d=nee(V,e,fe),te.error(fe)},complete:()=>{w=!0,N(),d=nee(V,i),te.complete()}}),Al(q).subscribe(s))})(r)}}function nee(t,n,...e){if(n===!0){t();return}if(n===!1)return;let i=new hv({next:()=>{i.unsubscribe(),t()}});return Al(n(...e)).subscribe(i)}function du(t,n,e){let i,o=!1;return t&&typeof t=="object"?{bufferSize:i=1/0,windowTime:n=1/0,refCount:o=!1,scheduler:e}=t:i=t??1/0,CB({connector:()=>new pi(i,n,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function xB(t){return wn((n,e)=>t<=e)}function rl(...t){let n=fC(t);return Es((e,i)=>{(n?_C(t,e,n):_C(t,e)).subscribe(i)})}function Mn(t,n){return Es((e,i)=>{let o=null,r=0,s=!1,d=()=>s&&!o&&i.complete();e.subscribe(ls(i,m=>{o?.unsubscribe();let v=0,w=r++;Al(t(m,w)).subscribe(o=ls(i,O=>i.next(n?n(m,O,w,v++):O),()=>{o=null,d()}))},()=>{s=!0,d()}))})}function cs(t){return Es((n,e)=>{Al(t).subscribe(ls(e,()=>e.complete(),L1)),!e.closed&&n.subscribe(e)})}function wB(t,n=!1){return Es((e,i)=>{let o=0;e.subscribe(ls(i,r=>{let s=t(r,o++);(s||n)&&i.next(r),!s&&i.complete()}))})}function Vo(t,n,e){let i=ys(t)||n||e?{next:t,error:n,complete:e}:t;return i?Es((o,r)=>{var s;(s=i.subscribe)===null||s===void 0||s.call(i);let d=!0;o.subscribe(ls(r,m=>{var v;(v=i.next)===null||v===void 0||v.call(i,m),r.next(m)},()=>{var m;d=!1,(m=i.complete)===null||m===void 0||m.call(i),r.complete()},m=>{var v;d=!1,(v=i.error)===null||v===void 0||v.call(i,m),r.error(m)},()=>{var m,v;d&&((m=i.unsubscribe)===null||m===void 0||m.call(i)),(v=i.finalize)===null||v===void 0||v.call(i)}))}):zf}function kye(t){let n=Os(null);try{return t()}finally{Os(n)}}var Mye=mt(be({},dA),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,hasRun:!1,kind:"effect"});function Oye(t){if(t.dirty=!1,t.hasRun&&!pA(t))return;t.hasRun=!0;let n=zT(t);try{t.cleanup(),t.fn()}finally{uA(t,n)}}var T7="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",mn=class extends Error{code;constructor(n,e){super(vC(n,e)),this.code=n}};function Y8e(t){return`NG0${Math.abs(t)}`}function vC(t,n){return`${Y8e(t)}${n?": "+n:""}`}var sp=globalThis;function cc(t){for(let n in t)if(t[n]===cc)return n;throw Error("")}function Pye(t,n){for(let e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function z1(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(z1).join(", ")}]`;if(t==null)return""+t;let n=t.overriddenName||t.name;if(n)return`${n}`;let e=t.toString();if(e==null)return""+e;let i=e.indexOf(` `);return i>=0?e.slice(0,i):e}function I7(t,n){return t?n?`${t} ${n}`:t:n||""}var Q8e=cc({__forward_ref__:cc});function Ko(t){return t.__forward_ref__=Ko,t.toString=function(){return z1(this())},t}function kp(t){return fee(t)?t():t}function fee(t){return typeof t=="function"&&t.hasOwnProperty(Q8e)&&t.__forward_ref__===Ko}function Lye(t,n,e){t!=n&&Nye(e,t,n,"==")}function Nye(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(i==null?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}function lt(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function _i(t){return{providers:t.providers||[],imports:t.imports||[]}}function DB(t){return Z8e(t,E7)}function gee(t){return DB(t)!==null}function Z8e(t,n){return t.hasOwnProperty(n)&&t[n]||null}function X8e(t){let n=t?.[E7]??null;return n||null}function ree(t){return t&&t.hasOwnProperty(w7)?t[w7]:null}var E7=cc({\u0275prov:cc}),w7=cc({\u0275inj:cc}),fi=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(n,e){this._desc=n,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=lt({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function _ee(t){return t&&!!t.\u0275providers}var yee=cc({\u0275cmp:cc}),vee=cc({\u0275dir:cc}),bee=cc({\u0275pipe:cc}),Cee=cc({\u0275mod:cc}),TB=cc({\u0275fac:cc}),CA=cc({__NG_ELEMENT_ID__:cc}),Rye=cc({__NG_ENV_ID__:cc});function KT(t){return typeof t=="string"?t:t==null?"":String(t)}function Bye(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():KT(t)}var Vye=cc({ngErrorCode:cc}),J8e=cc({ngErrorMessage:cc}),eHe=cc({ngTokenPath:cc});function xee(t,n){return zye("",-200,n)}function D7(t,n){throw new mn(-201,!1)}function zye(t,n,e){let i=new mn(n,t);return i[Vye]=n,i[J8e]=t,e&&(i[eHe]=e),i}function tHe(t){return t[Vye]}var see;function Uye(){return see}function Hf(t){let n=see;return see=t,n}function wee(t,n,e){let i=DB(t);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(e&8)return null;if(n!==void 0)return n;D7(t,"Injector")}var iHe={},_A=iHe,aee="__NG_DI_FLAG__",lee=class{injector;constructor(n){this.injector=n}retrieve(n,e){let i=yA(e)||0;try{return this.injector.get(n,i&8?null:_A,i)}catch(o){if(TO(o))return o;throw o}}};function nHe(t,n=0){let e=HH();if(e===void 0)throw new mn(-203,!1);if(e===null)return wee(t,void 0,n);{let i=oHe(n),o=e.retrieve(t,i);if(TO(o)){if(i.optional)return null;throw o}return o}}function di(t,n=0){return(Uye()||nHe)(kp(t),n)}function re(t,n){return di(t,yA(n))}function yA(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function oHe(t){return{optional:!!(t&8),host:!!(t&1),self:!!(t&2),skipSelf:!!(t&4)}}function cee(t){let n=[];for(let e=0;eArray.isArray(e)?A7(e,n):n(e))}function Tee(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function AB(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function Gye(t,n){let e=[];for(let i=0;in;){let r=o-2;t[o]=t[r],o--}t[n]=e,t[n+1]=i}}function kB(t,n,e){let i=GO(t,n);return i>=0?t[i|1]=e:(i=~i,$ye(t,i,n,e)),i}function k7(t,n){let e=GO(t,n);if(e>=0)return t[e|1]}function GO(t,n){return sHe(t,n,1)}function sHe(t,n,e){let i=0,o=t.length>>e;for(;o!==i;){let r=i+(o-i>>1),s=t[r<n?o=r:i=r+1}return~(o<{e.push(s)};return A7(n,s=>{let d=s;S7(d,r,[],i)&&(o||=[],o.push(d))}),o!==void 0&&Wye(o,r),e}function Wye(t,n){for(let e=0;e{n(r,i)})}}function S7(t,n,e,i){if(t=kp(t),!t)return!1;let o=null,r=ree(t),s=!r&&bC(t);if(!r&&!s){let m=t.ngModule;if(r=ree(m),r)o=m;else return!1}else{if(s&&!s.standalone)return!1;o=t}let d=i.has(o);if(s){if(d)return!1;if(i.add(o),s.dependencies){let m=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let v of m)S7(v,n,e,i)}}else if(r){if(r.imports!=null&&!d){i.add(o);let v;try{A7(r.imports,w=>{S7(w,n,e,i)&&(v||=[],v.push(w))})}finally{}v!==void 0&&Wye(v,n)}if(!d){let v=$T(o)||(()=>new o);n({provide:o,useFactory:v,deps:Yh},o),n({provide:Eee,useValue:o,multi:!0},o),n({provide:U1,useValue:()=>di(o),multi:!0},o)}let m=r.providers;if(m!=null&&!d){let v=t;kee(m,w=>{n(w,v)})}}else return!1;return o!==t&&t.providers!==void 0}function kee(t,n){for(let e of t)_ee(e)&&(e=e.\u0275providers),Array.isArray(e)?kee(e,n):n(e)}var aHe=cc({provide:String,useValue:cc});function Yye(t){return t!==null&&typeof t=="object"&&aHe in t}function lHe(t){return!!(t&&t.useExisting)}function cHe(t){return!!(t&&t.useFactory)}function vA(t){return typeof t=="function"}function Qye(t){return!!t.useClass}var MB=new fi(""),x7={},Fye={},oee;function $O(){return oee===void 0&&(oee=new IB),oee}var Uc=class{},bA=class extends Uc{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(n,e,i,o){super(),this.parent=e,this.source=i,this.scopes=o,uee(n,s=>this.processProvider(s)),this.records.set(Iee,jO(void 0,this)),o.has("environment")&&this.records.set(Uc,jO(void 0,this));let r=this.records.get(MB);r!=null&&typeof r.value=="string"&&this.scopes.add(r.value),this.injectorDefTypes=new Set(this.get(Eee,Yh,{self:!0}))}retrieve(n,e){let i=yA(e)||0;try{return this.get(n,_A,i)}catch(o){if(TO(o))return o;throw o}}destroy(){SB(this),this._destroyed=!0;let n=Os(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of e)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Os(n)}}onDestroy(n){return SB(this),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){SB(this);let e=mC(this),i=Hf(void 0),o;try{return n()}finally{mC(e),Hf(i)}}get(n,e=_A,i){if(SB(this),n.hasOwnProperty(Rye))return n[Rye](this);let o=yA(i),r,s=mC(this),d=Hf(void 0);try{if(!(o&4)){let v=this.records.get(n);if(v===void 0){let w=mHe(n)&&DB(n);w&&this.injectableDefInScope(w)?v=jO(dee(n),x7):v=null,this.records.set(n,v)}if(v!=null)return this.hydrate(n,v,o)}let m=o&2?$O():this.parent;return e=o&8&&e===_A?null:e,m.get(n,e)}catch(m){let v=tHe(m);throw v===-200||v===-201?new mn(v,null):m}finally{Hf(d),mC(s)}}resolveInjectorInitializers(){let n=Os(null),e=mC(this),i=Hf(void 0),o;try{let r=this.get(U1,Yh,{self:!0});for(let s of r)s()}finally{mC(e),Hf(i),Os(n)}}toString(){let n=[],e=this.records;for(let i of e.keys())n.push(z1(i));return`R3Injector[${n.join(", ")}]`}processProvider(n){n=kp(n);let e=vA(n)?n:kp(n&&n.provide),i=uHe(n);if(!vA(n)&&n.multi===!0){let o=this.records.get(e);o||(o=jO(void 0,x7,!0),o.factory=()=>cee(o.multi),this.records.set(e,o)),e=n,o.multi.push(n)}this.records.set(e,i)}hydrate(n,e,i){let o=Os(null);try{if(e.value===Fye)throw xee(z1(n));return e.value===x7&&(e.value=Fye,e.value=e.factory(void 0,i)),typeof e.value=="object"&&e.value&&hHe(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{Os(o)}}injectableDefInScope(n){if(!n.providedIn)return!1;let e=kp(n.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(n){let e=this._onDestroyHooks.indexOf(n);e!==-1&&this._onDestroyHooks.splice(e,1)}};function dee(t){let n=DB(t),e=n!==null?n.factory:$T(t);if(e!==null)return e;if(t instanceof fi)throw new mn(204,!1);if(t instanceof Function)return dHe(t);throw new mn(204,!1)}function dHe(t){if(t.length>0)throw new mn(204,!1);let e=X8e(t);return e!==null?()=>e.factory(t):()=>new t}function uHe(t){if(Yye(t))return jO(void 0,t.useValue);{let n=Mee(t);return jO(n,x7)}}function Mee(t,n,e){let i;if(vA(t)){let o=kp(t);return $T(o)||dee(o)}else if(Yye(t))i=()=>kp(t.useValue);else if(cHe(t))i=()=>t.useFactory(...cee(t.deps||[]));else if(lHe(t))i=(o,r)=>di(kp(t.useExisting),r!==void 0&&r&8?8:void 0);else{let o=kp(t&&(t.useClass||t.provide));if(pHe(t))i=()=>new o(...cee(t.deps));else return $T(o)||dee(o)}return i}function SB(t){if(t.destroyed)throw new mn(205,!1)}function jO(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function pHe(t){return!!t.deps}function hHe(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function mHe(t){return typeof t=="function"||typeof t=="object"&&t.ngMetadataName==="InjectionToken"}function uee(t,n){for(let e of t)Array.isArray(e)?uee(e,n):e&&_ee(e)?uee(e.\u0275providers,n):n(e)}function dh(t,n){let e;t instanceof bA?(SB(t),e=t):e=new lee(t);let i,o=mC(e),r=Hf(void 0);try{return n()}finally{mC(o),Hf(r)}}function Oee(){return Uye()!==void 0||HH()!=null}var _v=0,os=1,Ds=2,Mp=3,W0=4,Fm=5,xA=6,qO=7,Mu=8,KO=9,CC=10,ic=11,WO=12,Ree=13,wA=14,Pm=15,WT=16,SA=17,xC=18,OB=19,Fee=20,V1=21,O7=22,j1=23,K_=24,TA=25,Qh=26,Ac=27,Zye=1,Pee=6,YT=7,RB=8,IA=9,ap=10;function wC(t){return Array.isArray(t)&&typeof t[Zye]=="object"}function yv(t){return Array.isArray(t)&&t[Zye]===!0}function Lee(t){return(t.flags&4)!==0}function G1(t){return t.componentOffset>-1}function YO(t){return(t.flags&1)===1}function vv(t){return!!t.template}function QO(t){return(t[Ds]&512)!==0}function EA(t){return(t[Ds]&256)===256}var Nee="svg",Xye="math";function W_(t){for(;Array.isArray(t);)t=t[_v];return t}function Bee(t,n){return W_(n[t])}function Y0(t,n){return W_(n[t.index])}function FB(t,n){return t.data[n]}function PB(t,n){return t[n]}function Vee(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}function Q0(t,n){let e=n[t];return wC(e)?e:e[_v]}function Jye(t){return(t[Ds]&4)===4}function R7(t){return(t[Ds]&128)===128}function eve(t){return yv(t[Mp])}function zg(t,n){return n==null?null:t[n]}function zee(t){t[SA]=0}function Uee(t){t[Ds]&1024||(t[Ds]|=1024,R7(t)&&QT(t))}function tve(t,n){for(;t>0;)n=n[wA],t--;return n}function LB(t){return!!(t[Ds]&9216||t[K_]?.dirty)}function F7(t){t[CC].changeDetectionScheduler?.notify(8),t[Ds]&64&&(t[Ds]|=1024),LB(t)&&QT(t)}function QT(t){t[CC].changeDetectionScheduler?.notify(0);let n=qT(t);for(;n!==null&&!(n[Ds]&8192||(n[Ds]|=8192,!R7(n)));)n=qT(n)}function Hee(t,n){if(EA(t))throw new mn(911,!1);t[V1]===null&&(t[V1]=[]),t[V1].push(n)}function ive(t,n){if(t[V1]===null)return;let e=t[V1].indexOf(n);e!==-1&&t[V1].splice(e,1)}function qT(t){let n=t[Mp];return yv(n)?n[Mp]:n}function jee(t){return t[qO]??=[]}function Gee(t){return t.cleanup??=[]}function nve(t,n,e,i){let o=jee(n);o.push(e),t.firstCreatePass&&Gee(t).push(i,o.length-1)}var fa={lFrame:mve(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var pee=!1;function ove(){return fa.lFrame.elementDepthCount}function rve(){fa.lFrame.elementDepthCount++}function $ee(){fa.lFrame.elementDepthCount--}function P7(){return fa.bindingsEnabled}function qee(){return fa.skipHydrationRootTNode!==null}function Kee(t){return fa.skipHydrationRootTNode===t}function Wee(){fa.skipHydrationRootTNode=null}function Tr(){return fa.lFrame.lView}function kc(){return fa.lFrame.tView}function se(t){return fa.lFrame.contextLView=t,t[Mu]}function ae(t){return fa.lFrame.contextLView=null,t}function lp(){let t=Yee();for(;t!==null&&t.type===64;)t=t.parent;return t}function Yee(){return fa.lFrame.currentTNode}function ZO(){let t=fa.lFrame,n=t.currentTNode;return t.isParent?n:n.parent}function $1(t,n){let e=fa.lFrame;e.currentTNode=t,e.isParent=n}function Qee(){return fa.lFrame.isParent}function Zee(){fa.lFrame.isParent=!1}function sve(){return fa.lFrame.contextLView}function Xee(){return pee}function XO(t){let n=pee;return pee=t,n}function Ug(){let t=fa.lFrame,n=t.bindingRootIndex;return n===-1&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function ave(){return fa.lFrame.bindingIndex}function lve(t){return fa.lFrame.bindingIndex=t}function q1(){return fa.lFrame.bindingIndex++}function L7(t){let n=fa.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function cve(){return fa.lFrame.inI18n}function Jee(t){fa.lFrame.inI18n=t}function dve(t,n){let e=fa.lFrame;e.bindingIndex=e.bindingRootIndex=t,N7(n)}function uve(){return fa.lFrame.currentDirectiveIndex}function N7(t){fa.lFrame.currentDirectiveIndex=t}function pve(t){let n=fa.lFrame.currentDirectiveIndex;return n===-1?null:t[n]}function B7(){return fa.lFrame.currentQueryIndex}function NB(t){fa.lFrame.currentQueryIndex=t}function fHe(t){let n=t[os];return n.type===2?n.declTNode:n.type===1?t[Fm]:null}function ete(t,n,e){if(e&4){let o=n,r=t;for(;o=o.parent,o===null&&!(e&1);)if(o=fHe(r),o===null||(r=r[wA],o.type&10))break;if(o===null)return!1;n=o,t=r}let i=fa.lFrame=hve();return i.currentTNode=n,i.lView=t,!0}function V7(t){let n=hve(),e=t[os];fa.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function hve(){let t=fa.lFrame,n=t===null?null:t.child;return n===null?mve(t):n}function mve(t){let n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return t!==null&&(t.child=n),n}function fve(){let t=fa.lFrame;return fa.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var tte=fve;function z7(){let t=fve();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function gve(t){return(fa.lFrame.contextLView=tve(t,fa.lFrame.contextLView))[Mu]}function SC(){return fa.lFrame.selectedIndex}function ZT(t){fa.lFrame.selectedIndex=t}function JO(){let t=fa.lFrame;return FB(t.tView,t.selectedIndex)}function si(){fa.lFrame.currentNamespace=Nee}function K1(){gHe()}function gHe(){fa.lFrame.currentNamespace=null}function _ve(){return fa.lFrame.currentNamespace}var yve=!0;function BB(){return yve}function eR(t){yve=t}function hee(t,n=null,e=null,i){let o=ite(t,n,e,i);return o.resolveInjectorInitializers(),o}function ite(t,n=null,e=null,i,o=new Set){let r=[e||Yh,Kye(t)];return i=i||(typeof t=="object"?void 0:z1(t)),new bA(r,n||$O(),i||null,o)}var Oo=class t{static THROW_IF_NOT_FOUND=_A;static NULL=new IB;static create(n,e){if(Array.isArray(n))return hee({name:""},e,n,"");{let i=n.name??"";return hee({name:i},n.parent,n.providers,i)}}static \u0275prov=lt({token:t,providedIn:"any",factory:()=>di(Iee)});static __NG_ELEMENT_ID__=-1},Ao=new fi(""),jf=(()=>{class t{static __NG_ELEMENT_ID__=_He;static __NG_ENV_ID__=e=>e}return t})(),EB=class extends jf{_lView;constructor(n){super(),this._lView=n}get destroyed(){return EA(this._lView)}onDestroy(n){let e=this._lView;return Hee(e,n),()=>ive(e,n)}};function _He(){return new EB(Tr())}var ch=class{_console=console;handleError(n){this._console.error("ERROR",n)}},Gf=new fi("",{providedIn:"root",factory:()=>{let t=re(Uc),n;return e=>{t.destroyed&&!n?setTimeout(()=>{throw e}):(n??=t.get(ch),n.handleError(e))}}}),vve={provide:U1,useValue:()=>void re(ch),multi:!0};function TC(t){return typeof t=="function"&&t[op]!==void 0}function Zn(t,n){let[e,i,o]=zJ(t,n?.equal),r=e,s=r[op];return r.set=i,r.update=o,r.asReadonly=U7.bind(r),r}function U7(){let t=this[op];if(t.readonlyFn===void 0){let n=()=>this();n[op]=t,t.readonlyFn=n}return t.readonlyFn}function nte(t){return TC(t)&&typeof t.set=="function"}var K0=class{},VB=new fi("",{providedIn:"root",factory:()=>!1});var ote=new fi(""),rte=new fi("");var DA=(()=>{class t{view;node;constructor(e,i){this.view=e,this.node=i}static __NG_ELEMENT_ID__=yHe}return t})();function yHe(){return new DA(Tr(),lp())}var IC=(()=>{class t{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Gs(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Cr(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=lt({token:t,providedIn:"root",factory:()=>new t})}return t})(),tR=(()=>{class t{internalPendingTasks=re(IC);scheduler=re(K0);errorHandler=re(Gf);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let i=this.add();e().catch(this.errorHandler).finally(i)}static \u0275prov=lt({token:t,providedIn:"root",factory:()=>new t})}return t})();function AA(...t){}var zB=(()=>{class t{static \u0275prov=lt({token:t,providedIn:"root",factory:()=>new mee})}return t})(),mee=class{dirtyEffectCount=0;queues=new Map;add(n){this.enqueue(n),this.schedule(n)}schedule(n){n.dirty&&this.dirtyEffectCount++}remove(n){let e=n.zone,i=this.queues.get(e);i.has(n)&&(i.delete(n),n.dirty&&this.dirtyEffectCount--)}enqueue(n){let e=n.zone;this.queues.has(e)||this.queues.set(e,new Set);let i=this.queues.get(e);i.has(n)||i.add(n)}flush(){for(;this.dirtyEffectCount>0;){let n=!1;for(let[e,i]of this.queues)e===null?n||=this.flushQueue(i):n||=e.run(()=>this.flushQueue(i));n||(this.dirtyEffectCount=0)}}flushQueue(n){let e=!1;for(let i of n)i.dirty&&(this.dirtyEffectCount--,e=!0,i.run());return e}};function mR(t){return{toString:t}.toString()}var H7="__parameters__";function SHe(t){return function(...e){if(t){let i=t(...e);for(let o in i)this[o]=i[o]}}}function nbe(t,n,e){return mR(()=>{let i=SHe(n);function o(...r){if(this instanceof o)return i.apply(this,r),this;let s=new o(...r);return d.annotation=s,d;function d(m,v,w){let O=m.hasOwnProperty(H7)?m[H7]:Object.defineProperty(m,H7,{value:[]})[H7];for(;O.length<=w;)O.push(null);return(O[w]=O[w]||[]).push(s),m}}return o.prototype.ngMetadataName=t,o.annotationCls=o,o})}var RA=See(nbe("Optional"),8);var XB=See(nbe("SkipSelf"),4);function obe(t){let n=sp.ng;if(n&&n.\u0275compilerFacade)return n.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}function THe(t){return typeof t=="function"}var t9=class{previousValue;currentValue;firstChange;constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}};function rbe(t,n,e,i){n!==null?n.applyValueToInputSignal(n,i):t[e]=i}var Ot=(()=>{let t=()=>sbe;return t.ngInherit=!0,t})();function sbe(t){return t.type.prototype.ngOnChanges&&(t.setInput=EHe),IHe}function IHe(){let t=lbe(this),n=t?.current;if(n){let e=t.previous;if(e===gv)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function EHe(t,n,e,i,o){let r=this.declaredInputs[i],s=lbe(t)||DHe(t,{previous:gv,current:null}),d=s.current||(s.current={}),m=s.previous,v=m[r];d[r]=new t9(v&&v.currentValue,e,m===gv),rbe(t,n,o,e)}var abe="__ngSimpleChanges__";function lbe(t){return t[abe]||null}function DHe(t,n){return t[abe]=n}var bve=[];var Hc=function(t,n=null,e){for(let i=0;i=i)break}else n[m]<0&&(t[SA]+=65536),(d>14>16&&(t[Ds]&3)===n&&(t[Ds]+=16384,Cve(d,r)):Cve(d,r)}var nR=-1,MA=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(n,e,i,o){this.factory=n,this.name=o,this.canSeeViewProviders=e,this.injectImpl=i}};function MHe(t){return(t.flags&8)!==0}function OHe(t){return(t.flags&16)!==0}function RHe(t,n,e){let i=0;for(;in){s=r-1;break}}}for(;r>16}function n9(t,n){let e=PHe(t),i=n;for(;e>0;)i=i[wA],e--;return i}var yte=!0;function o9(t){let n=yte;return yte=t,n}var LHe=256,hbe=LHe-1,mbe=5,NHe=0,EC={};function BHe(t,n,e){let i;typeof e=="string"?i=e.charCodeAt(0)||0:e.hasOwnProperty(CA)&&(i=e[CA]),i==null&&(i=e[CA]=NHe++);let o=i&hbe,r=1<>mbe)]|=r}function r9(t,n){let e=fbe(t,n);if(e!==-1)return e;let i=n[os];i.firstCreatePass&&(t.injectorIndex=n.length,ate(i.data,t),ate(n,null),ate(i.blueprint,null));let o=cie(t,n),r=t.injectorIndex;if(pbe(o)){let s=i9(o),d=n9(o,n),m=d[os].data;for(let v=0;v<8;v++)n[r+v]=d[s+v]|m[s+v]}return n[r+8]=o,r}function ate(t,n){t.push(0,0,0,0,0,0,0,0,n)}function fbe(t,n){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||n[t.injectorIndex+8]===null?-1:t.injectorIndex}function cie(t,n){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let e=0,i=null,o=n;for(;o!==null;){if(i=bbe(o),i===null)return nR;if(e++,o=o[wA],i.injectorIndex!==-1)return i.injectorIndex|e<<16}return nR}function vte(t,n,e){BHe(t,n,e)}function VHe(t,n){if(n==="class")return t.classes;if(n==="style")return t.styles;let e=t.attrs;if(e){let i=e.length,o=0;for(;o>20,O=i?d:d+w,N=o?d+w:v;for(let V=O;V=m&&$.type===e)return V}if(o){let V=s[m];if(V&&vv(V)&&V.type===e)return m}return null}function $B(t,n,e,i,o){let r=t[e],s=n.data;if(r instanceof MA){let d=r;if(d.resolving){let V=Bye(s[e]);throw xee(V)}let m=o9(d.canSeeViewProviders);d.resolving=!0;let v=s[e].type||s[e],w,O=d.injectImpl?Hf(d.injectImpl):null,N=ete(t,i,0);try{r=t[e]=d.factory(void 0,o,s,t,i),n.firstCreatePass&&e>=i.directiveStart&&AHe(e,s[e],n)}finally{O!==null&&Hf(O),o9(m),d.resolving=!1,tte()}}return r}function UHe(t){if(typeof t=="string")return t.charCodeAt(0)||0;let n=t.hasOwnProperty(CA)?t[CA]:void 0;return typeof n=="number"?n>=0?n&hbe:HHe:n}function wve(t,n,e){let i=1<>mbe)]&i)}function Sve(t,n){return!(t&2)&&!(t&1&&n)}var kA=class{_tNode;_lView;constructor(n,e){this._tNode=n,this._lView=e}get(n,e,i){return ybe(this._tNode,this._lView,n,yA(i),e)}};function HHe(){return new kA(lp(),Tr())}function Rt(t){return mR(()=>{let n=t.prototype.constructor,e=n[TB]||bte(n),i=Object.prototype,o=Object.getPrototypeOf(t.prototype).constructor;for(;o&&o!==i;){let r=o[TB]||bte(o);if(r&&r!==e)return r;o=Object.getPrototypeOf(o)}return r=>new r})}function bte(t){return fee(t)?()=>{let n=bte(kp(t));return n&&n()}:$T(t)}function jHe(t,n,e,i,o){let r=t,s=n;for(;r!==null&&s!==null&&s[Ds]&2048&&!QO(s);){let d=vbe(r,s,e,i|2,EC);if(d!==EC)return d;let m=r.parent;if(!m){let v=s[Fee];if(v){let w=v.get(e,EC,i);if(w!==EC)return w}m=bbe(s),s=s[wA]}r=m}return o}function bbe(t){let n=t[os],e=n.type;return e===2?n.declTNode:e===1?t[Fm]:null}function JB(t){return VHe(lp(),t)}function GHe(){return fR(lp(),Tr())}function fR(t,n){return new Bn(Y0(t,n))}var Bn=(()=>{class t{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=GHe}return t})();function Cbe(t){return t instanceof Bn?t.nativeElement:t}function $He(){return this._results[Symbol.iterator]()}var Hg=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new hi}constructor(n=!1){this._emitDistinctChangesOnly=n}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){this.dirty=!1;let i=jye(n);(this._changesDetected=!Hye(this._results,i,e))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(n){this._onDirty=n}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=$He};function xbe(t){return(t.flags&128)===128}var die=(function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t})(die||{}),wbe=new Map,qHe=0;function KHe(){return qHe++}function WHe(t){wbe.set(t[OB],t)}function Cte(t){wbe.delete(t[OB])}var Tve="__ngContext__";function rR(t,n){wC(n)?(t[Tve]=n[OB],WHe(n)):t[Tve]=n}function Sbe(t){return Ibe(t[WO])}function Tbe(t){return Ibe(t[W0])}function Ibe(t){for(;t!==null&&!yv(t);)t=t[W0];return t}var xte;function uie(t){xte=t}function v9(){if(xte!==void 0)return xte;if(typeof document<"u")return document;throw new mn(210,!1)}var eI=new fi("",{providedIn:"root",factory:()=>YHe}),YHe="ng",b9=new fi(""),Zh=new fi("",{providedIn:"platform",factory:()=>"unknown"});var tI=new fi(""),gR=new fi("",{providedIn:"root",factory:()=>v9().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var QHe="h",ZHe="b";var Ebe="r";var Dbe="di";var Abe=!1,kbe=new fi("",{providedIn:"root",factory:()=>Abe});var C9=new fi("");var XHe=(t,n,e,i)=>{};function JHe(t,n,e,i){XHe(t,n,e,i)}function x9(t){return(t.flags&32)===32}var e7e=()=>null;function Mbe(t,n,e=!1){return e7e(t,n,e)}function Obe(t,n){let e=t.contentQueries;if(e!==null){let i=Os(null);try{for(let o=0;ot,createScript:t=>t,createScriptURL:t=>t})}catch{}return j7}function w9(t){return t7e()?.createHTML(t)||t}var G7;function Rbe(){if(G7===void 0&&(G7=null,sp.trustedTypes))try{G7=sp.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return G7}function Ive(t){return Rbe()?.createHTML(t)||t}function Eve(t){return Rbe()?.createScriptURL(t)||t}var Q1=class{changingThisBreaksApplicationSecurity;constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${T7})`}},Ste=class extends Q1{getTypeName(){return"HTML"}},Tte=class extends Q1{getTypeName(){return"Style"}},Ite=class extends Q1{getTypeName(){return"Script"}},Ete=class extends Q1{getTypeName(){return"URL"}},Dte=class extends Q1{getTypeName(){return"ResourceURL"}};function jg(t){return t instanceof Q1?t.changingThisBreaksApplicationSecurity:t}function DC(t,n){let e=Fbe(t);if(e!=null&&e!==n){if(e==="ResourceURL"&&n==="URL")return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${T7})`)}return e===n}function Fbe(t){return t instanceof Q1&&t.getTypeName()||null}function hie(t){return new Ste(t)}function mie(t){return new Tte(t)}function fie(t){return new Ite(t)}function gie(t){return new Ete(t)}function _ie(t){return new Dte(t)}function Pbe(t){let n=new kte(t);return i7e()?new Ate(n):n}var Ate=class{inertDocumentHelper;constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{let e=new window.DOMParser().parseFromString(w9(n),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(n):(e.firstChild?.remove(),e)}catch{return null}}},kte=class{defaultDoc;inertDocument;constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){let e=this.inertDocument.createElement("template");return e.innerHTML=w9(n),e}};function i7e(){try{return!!new window.DOMParser().parseFromString(w9(""),"text/html")}catch{return!1}}var n7e=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function _R(t){return t=String(t),t.match(n7e)?t:"unsafe:"+t}function Z1(t){let n={};for(let e of t.split(","))n[e]=!0;return n}function eV(...t){let n={};for(let e of t)for(let i in e)e.hasOwnProperty(i)&&(n[i]=!0);return n}var Lbe=Z1("area,br,col,hr,img,wbr"),Nbe=Z1("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Bbe=Z1("rp,rt"),o7e=eV(Bbe,Nbe),r7e=eV(Nbe,Z1("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),s7e=eV(Bbe,Z1("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Mte=eV(Lbe,r7e,s7e,o7e),yie=Z1("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),a7e=Z1("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),l7e=Z1("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),Vbe=eV(yie,a7e,l7e),c7e=Z1("script,style,template"),Ote=class{sanitizedSomething=!1;buf=[];sanitizeChildren(n){let e=n.firstChild,i=!0,o=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild){o.push(e),e=p7e(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=u7e(e);if(r){e=r;break}e=o.pop()}}return this.buf.join("")}startElement(n){let e=Dve(n).toLowerCase();if(!Mte.hasOwnProperty(e))return this.sanitizedSomething=!0,!c7e.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let i=n.attributes;for(let o=0;o"),!0}endElement(n){let e=Dve(n).toLowerCase();Mte.hasOwnProperty(e)&&!Lbe.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(Ave(n))}};function d7e(t,n){return(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function u7e(t){let n=t.nextSibling;if(n&&t!==n.previousSibling)throw zbe(n);return n}function p7e(t){let n=t.firstChild;if(n&&d7e(t,n))throw zbe(n);return n}function Dve(t){let n=t.nodeName;return typeof n=="string"?n:"FORM"}function zbe(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var h7e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,m7e=/([^\#-~ |!])/g;function Ave(t){return t.replace(/&/g,"&").replace(h7e,function(n){let e=n.charCodeAt(0),i=n.charCodeAt(1);return"&#"+((e-55296)*1024+(i-56320)+65536)+";"}).replace(m7e,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}var $7;function S9(t,n){let e=null;try{$7=$7||Pbe(t);let i=n?String(n):"";e=$7.getInertBodyElement(i);let o=5,r=i;do{if(o===0)throw new Error("Failed to sanitize html because the input is unstable");o--,i=r,r=e.innerHTML,e=$7.getInertBodyElement(i)}while(i!==r);let d=new Ote().sanitizeChildren(Rte(e)||e);return w9(d)}finally{if(e){let i=Rte(e)||e;for(;i.firstChild;)i.firstChild.remove()}}}function Rte(t){return"content"in t&&f7e(t)?t.content:null}function f7e(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var uh=(function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t})(uh||{});function yR(t){let n=bie();return n?Ive(n.sanitize(uh.HTML,t)||""):DC(t,"HTML")?Ive(jg(t)):S9(v9(),KT(t))}function dc(t){let n=bie();return n?n.sanitize(uh.URL,t)||"":DC(t,"URL")?jg(t):_R(KT(t))}function Ube(t){let n=bie();if(n)return Eve(n.sanitize(uh.RESOURCE_URL,t)||"");if(DC(t,"ResourceURL"))return Eve(jg(t));throw new mn(904,!1)}function g7e(t,n){return n==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||n==="href"&&(t==="base"||t==="link")?Ube:dc}function vie(t,n,e){return g7e(n,e)(t)}function bie(){let t=Tr();return t&&t[CC].sanitizer}var _7e=/^>|^->||--!>|)/g,v7e="\u200B$1\u200B";function b7e(t){return t.replace(_7e,n=>n.replace(y7e,v7e))}function T9(t){return t.ownerDocument.defaultView}function Cie(t){return t.ownerDocument}function Hbe(t){return t instanceof Function?t():t}function C7e(t,n,e){let i=t.length;for(;;){let o=t.indexOf(n,e);if(o===-1)return o;if(o===0||t.charCodeAt(o-1)<=32){let r=n.length;if(o+r===i||t.charCodeAt(o+r)<=32)return o}e=o+1}}var jbe="ng-template";function x7e(t,n,e,i){let o=0;if(i){for(;o-1){let r;for(;++or?O="":O=o[w+1].toLowerCase(),i&2&&v!==O){if(bv(i))return!1;s=!0}}}}return bv(i)||s}function bv(t){return(t&1)===0}function T7e(t,n,e,i){if(n===null)return-1;let o=0;if(i||!e){let r=!1;for(;o-1)for(e++;e0?'="'+d+'"':"")+"]"}else i&8?o+="."+s:i&4&&(o+=" "+s);else o!==""&&!bv(s)&&(n+=kve(r,o),o=""),i=s,r=r||!bv(i);e++}return o!==""&&(n+=kve(r,o)),n}function M7e(t){return t.map(k7e).join(",")}function O7e(t){let n=[],e=[],i=1,o=2;for(;i{Wbe(n,m,d)}):t===3&&Ove(r,()=>{n.destroyNode(m)}),s!=null&&K7e(n,t,s,e,o)}}function z7e(t,n){Xbe(t,n),n[_v]=null,n[Fm]=null}function U7e(t,n,e,i,o,r){i[_v]=o,i[Fm]=n,A9(t,i,e,1,o,r)}function Xbe(t,n){n[CC].changeDetectionScheduler?.notify(9),A9(t,n,n[ic],2,null,null)}function H7e(t){let n=t[WO];if(!n)return lte(t[os],t);for(;n;){let e=null;if(wC(n))e=n[WO];else{let i=n[ap];i&&(e=i)}if(!e){for(;n&&!n[W0]&&n!==t;)wC(n)&<e(n[os],n),n=n[Mp];n===null&&(n=t),wC(n)&<e(n[os],n),e=n&&n[W0]}n=e}}function Die(t,n){let e=t[IA],i=e.indexOf(n);e.splice(i,1)}function D9(t,n){if(EA(n))return;let e=n[ic];e.destroyNode&&A9(t,n,e,3,null,null),H7e(n)}function lte(t,n){if(EA(n))return;let e=Os(null);try{n[Ds]&=-129,n[Ds]|=256,n[K_]&&UT(n[K_]),$7e(t,n),G7e(t,n),n[os].type===1&&n[ic].destroy();let i=n[WT];if(i!==null&&yv(n[Mp])){i!==n[Mp]&&Die(i,n);let o=n[xC];o!==null&&o.detachView(t)}Cte(n)}finally{Os(e)}}function Ove(t,n){if(t&&t[Qh]&&t[Qh].leave)if(t[Qh].skipLeaveAnimations)t[Qh].skipLeaveAnimations=!1;else{let e=t[Qh].leave,i=[];for(let o=0;o{t[Qh]&&t[Qh].running&&(t[Qh].running=void 0),E9.delete(t),n()});return}n()}function G7e(t,n){let e=t.cleanup,i=n[qO];if(e!==null)for(let s=0;s=0?i[d]():i[-d].unsubscribe(),s+=2}else{let d=i[e[s+1]];e[s].call(d)}i!==null&&(n[qO]=null);let o=n[V1];if(o!==null){n[V1]=null;for(let s=0;sAc&&Zbe(t,n,Ac,!1),Hc(s?2:0,o,e),e(i,o)}finally{ZT(r),Hc(s?3:1,o,e)}}function k9(t,n,e){J7e(t,n,e),(e.flags&64)===64&&e9e(t,n,e)}function iV(t,n,e=Y0){let i=n.localNames;if(i!==null){let o=n.index+1;for(let r=0;rnull;function X7e(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function lCe(t,n,e,i,o,r){let s=n[os];if(M9(t,s,n,e,i)){G1(t)&&dCe(n,t.index);return}t.type&3&&(e=X7e(e)),cCe(t,n,e,i,o,r)}function cCe(t,n,e,i,o,r){if(t.type&3){let s=Y0(t,n);i=r!=null?r(i,t.value||"",e):i,o.setProperty(s,e,i)}else t.type&12}function dCe(t,n){let e=Q0(n,t);e[Ds]&16||(e[Ds]|=64)}function J7e(t,n,e){let i=e.directiveStart,o=e.directiveEnd;G1(e)&&B7e(n,e,t.data[i+e.componentOffset]),t.firstCreatePass||r9(e,n);let r=e.initialInputs;for(let s=i;s{QT(t.lView)},consumerOnSignalRead(){this.lView[K_]=this}});function p9e(t){let n=t[K_]??Object.create(h9e);return n.lView=t,n}var h9e=mt(be({},dA),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let n=qT(t.lView);for(;n&&!fCe(n[os]);)n=qT(n);n&&Uee(n)},consumerOnSignalRead(){this.lView[K_]=this}});function fCe(t){return t.type!==2}function gCe(t){if(t[j1]===null)return;let n=!0;for(;n;){let e=!1;for(let i of t[j1])i.dirty&&(e=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));n=e&&!!(t[Ds]&8192)}}var m9e=100;function _Ce(t,n=0){let i=t[CC].rendererFactory,o=!1;o||i.begin?.();try{f9e(t,n)}finally{o||i.end?.()}}function f9e(t,n){let e=Xee();try{XO(!0),Bte(t,n);let i=0;for(;LB(t);){if(i===m9e)throw new mn(103,!1);i++,Bte(t,1)}}finally{XO(e)}}function g9e(t,n,e,i){if(EA(n))return;let o=n[Ds],r=!1,s=!1;V7(n);let d=!0,m=null,v=null;r||(fCe(t)?(v=l9e(n),m=zT(v)):WH()===null?(d=!1,v=p9e(n),m=zT(v)):n[K_]&&(UT(n[K_]),n[K_]=null));try{zee(n),lve(t.bindingStartIndex),e!==null&&aCe(t,n,e,2,i),_9e(n);let w=(o&3)===3;if(!r)if(w){let V=t.preOrderCheckHooks;V!==null&&Y7(n,V,null)}else{let V=t.preOrderHooks;V!==null&&Q7(n,V,0,null),ste(n,0)}if(s||y9e(n),gCe(n),yCe(n,0),t.contentQueries!==null&&Obe(t,n),!r)if(w){let V=t.contentCheckHooks;V!==null&&Y7(n,V)}else{let V=t.contentHooks;V!==null&&Q7(n,V,1),ste(n,1)}b9e(t,n);let O=t.components;O!==null&&bCe(n,O,0);let N=t.viewQuery;if(N!==null&&wte(2,N,i),!r)if(w){let V=t.viewCheckHooks;V!==null&&Y7(n,V)}else{let V=t.viewHooks;V!==null&&Q7(n,V,2),ste(n,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),n[O7]){for(let V of n[O7])V();n[O7]=null}r||(hCe(n),n[Ds]&=-73)}catch(w){throw r||QT(n),w}finally{v!==null&&(uA(v,m),d&&d9e(v)),z7()}}function _9e(t){let n=t[Qh];if(n?.enter){for(let e of n.enter)e();n.enter=void 0}}function yCe(t,n){for(let e=Sbe(t);e!==null;e=Tbe(e))for(let i=ap;i0&&(t[e-1][W0]=i[W0]);let r=AB(t,ap+n);z7e(i[os],i);let s=r[xC];s!==null&&s.detachView(r[os]),i[Mp]=null,i[W0]=null,i[Ds]&=-129}return i}function C9e(t,n,e,i){let o=ap+i,r=e.length;i>0&&(e[o-1][W0]=n),i-1&&(KB(n,i),AB(e,i))}this._attachedToViewContainer=!1}D9(this._lView[os],this._lView)}onDestroy(n){Hee(this._lView,n)}markForCheck(){Pie(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Ds]&=-129}reattach(){F7(this._lView),this._lView[Ds]|=128}detectChanges(){this._lView[Ds]|=1024,_Ce(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new mn(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let n=QO(this._lView),e=this._lView[WT];e!==null&&!n&&Die(e,this._lView),Xbe(this._lView[os],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new mn(902,!1);this._appRef=n;let e=QO(this._lView),i=this._lView[WT];i!==null&&!e&&SCe(i,this._lView),F7(this._lView)}};var jc=(()=>{class t{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=x9e;constructor(e,i,o){this._declarationLView=e,this._declarationTContainer=i,this.elementRef=o}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,i){return this.createEmbeddedViewImpl(e,i)}createEmbeddedViewImpl(e,i,o){let r=nV(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:i,dehydratedView:o});return new XT(r)}}return t})();function x9e(){return O9(lp(),Tr())}function O9(t,n){return t.type&4?new jc(n,t,fR(t,n)):null}function TCe(t,n,e){let i=n.insertBeforeIndex,o=Array.isArray(i)?i[0]:i;return o===null?iCe(t,n,e):W_(e[o])}function ICe(t,n,e,i,o){let r=n.insertBeforeIndex;if(Array.isArray(r)){let s=i,d=null;if(n.type&3||(d=s,s=o),s!==null&&n.componentOffset===-1)for(let m=1;m1)for(let e=t.length-2;e>=0;e--){let i=t[e];DCe(i)||T9e(i,n)&&I9e(i)===null&&E9e(i,n.index)}}function DCe(t){return!(t.type&64)}function T9e(t,n){return DCe(n)||t.index>n.index}function I9e(t){let n=t.insertBeforeIndex;return Array.isArray(n)?n[0]:n}function E9e(t,n){let e=t.insertBeforeIndex;Array.isArray(e)?e[0]=n:(oCe(TCe,ICe),t.insertBeforeIndex=n)}function D9e(t,n,e){let i=t.data[n];i===null?t.data[n]=e:i.value=e}function A9e(t,n){let e=t.insertBeforeIndex;e===null?(oCe(TCe,ICe),e=t.insertBeforeIndex=[null,n]):(Lye(Array.isArray(e),!0,"Expecting array here"),e.push(n))}function k9e(t,n,e){let i=Lie(t,e,64,null,null);return ECe(n,i),i}function M9e(t,n){let e=n[t.currentCaseLViewIndex];return e===null?e:e<0?~e:e}function O9e(t,n,e){return t|n<<17|e<<1}function R9e(t){return t===-1}function ACe(t,n,e){t.index=0;let i=M9e(n,e);i!==null?t.removes=n.remove[i]:t.removes=Yh}function Vte(t){if(t.index0)return t.lView[n];{t.stack.push(t.index,t.removes);let e=~n,i=t.lView[os].data[e];return ACe(t,i,t.lView),Vte(t)}}else return t.stack.length===0?null:(t.removes=t.stack.pop(),t.index=t.stack.pop(),Vte(t))}function F9e(){let t={stack:[],index:-1};function n(e,i){for(t.lView=i;t.stack.length;)t.stack.pop();return ACe(t,e.value,i),Vte.bind(null,t)}return n}var Nsi=new RegExp(`^(\\d+)*(${ZHe}|${QHe})*(.*)`);var P9e=()=>{};function L9e(t,n,e,i){P9e(t,n,e,i)}function N9e(t){let n=t[Pee]??[],i=t[Mp][ic],o=[];for(let r of n)r.data[Dbe]!==void 0?o.push(r):B9e(r,i);t[Pee]=o}function B9e(t,n){let e=0,i=t.firstChild;if(i){let o=t.data[Ebe];for(;enull,z9e=()=>null;function s9(t,n){return V9e(t,n)}function kCe(t,n,e){return z9e(t,n,e)}var MCe=class{},R9=class{},zte=class{resolveComponentFactory(n){throw new mn(917,!1)}},rV=class{static NULL=new zte},bc=class{},Ps=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>U9e()}return t})();function U9e(){let t=Tr(),n=lp(),e=Q0(n.index,t);return(wC(e)?e:t)[ic]}var OCe=(()=>{class t{static \u0275prov=lt({token:t,providedIn:"root",factory:()=>null})}return t})();var X7={},Ute=class{injector;parentInjector;constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){let o=this.injector.get(n,X7,i);return o!==X7||e===X7?o:this.parentInjector.get(n,e,i)}};function a9(t,n,e){let i=e?t.styles:null,o=e?t.classes:null,r=0;if(n!==null)for(let s=0;s0&&(e.directiveToIndex=new Map);for(let N=0;N0;){let e=t[--n];if(typeof e=="number"&&e<0)return e}return 0}function Y9e(t,n,e){if(e){if(n.exportAs)for(let i=0;ii(W_(q[t.index])):t.index;BCe($,n,e,r,d,V,!1)}}return v}function X9e(t){return t.startsWith("animation")||t.startsWith("transition")}function J9e(t,n,e,i){let o=t.cleanup;if(o!=null)for(let r=0;rm?d[m]:null}typeof s=="string"&&(r+=2)}return null}function BCe(t,n,e,i,o,r,s){let d=n.firstCreatePass?Gee(n):null,m=jee(e),v=m.length;m.push(o,r),d&&d.push(i,t,v,(v+1)*(s?-1:1))}function Nve(t,n,e,i,o,r){let s=n[e],d=n[os],v=d.data[e].outputs[i],O=s[v].subscribe(r);BCe(t.index,d,n,o,r,O,!0)}var Hte=Symbol("BINDING");var l9=class extends rV{ngModule;constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){let e=bC(n);return new JT(e,this.ngModule)}};function eje(t){return Object.keys(t).map(n=>{let[e,i,o]=t[n],r={propName:e,templateName:n,isSignal:(i&I9.SignalBased)!==0};return o&&(r.transform=o),r})}function tje(t){return Object.keys(t).map(n=>({propName:t[n],templateName:n}))}function ije(t,n,e){let i=n instanceof Uc?n:n?.injector;return i&&t.getStandaloneInjector!==null&&(i=t.getStandaloneInjector(i)||i),i?new Ute(e,i):e}function nje(t){let n=t.get(bc,null);if(n===null)throw new mn(407,!1);let e=t.get(OCe,null),i=t.get(K0,null);return{rendererFactory:n,sanitizer:e,changeDetectionScheduler:i,ngReflect:!1}}function oje(t,n){let e=VCe(t);return wie(n,e,e==="svg"?Nee:e==="math"?Xye:null)}function VCe(t){return(t.selectors[0][0]||"div").toLowerCase()}var JT=class extends R9{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=eje(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=tje(this.componentDef.outputs),this.cachedOutputs}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=M7e(n.selectors),this.ngContentSelectors=n.ngContentSelectors??[],this.isBoundToModule=!!e}create(n,e,i,o,r,s){Hc(22);let d=Os(null);try{let m=this.componentDef,v=rje(i,m,s,r),w=ije(m,o||this.ngModule,n),O=nje(w),N=O.rendererFactory.createRenderer(null,m),V=i?Y7e(N,i,m.encapsulation,w):oje(m,N),$=s?.some(Bve)||r?.some(te=>typeof te!="function"&&te.bindings.some(Bve)),q=Tie(null,v,null,512|Qbe(m),null,null,O,N,w,null,Mbe(V,w,!0));q[Ac]=V,V7(q);let W=null;try{let te=Nie(Ac,q,2,"#host",()=>v.directiveRegistry,!0,0);V&&(Ybe(N,V,te),rR(V,q)),k9(v,q,te),pie(v,te,q),Bie(v,te),e!==void 0&&aje(te,this.ngContentSelectors,e),W=Q0(te.index,q),q[Mu]=W[Mu],Fie(v,q,null)}catch(te){throw W!==null&&Cte(W),Cte(q),te}finally{Hc(23),z7()}return new c9(this.componentType,q,!!$)}finally{Os(d)}}};function rje(t,n,e,i){let o=t?["ng-version","20.3.1"]:O7e(n.selectors[0]),r=null,s=null,d=0;if(e)for(let w of e)d+=w[Hte].requiredVars,w.create&&(w.targetIdx=0,(r??=[]).push(w)),w.update&&(w.targetIdx=0,(s??=[]).push(w));if(i)for(let w=0;w{if(e&1&&t)for(let i of t)i.create();if(e&2&&n)for(let i of n)i.update()}}function Bve(t){let n=t[Hte].kind;return n==="input"||n==="twoWay"}var c9=class extends MCe{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(n,e,i){super(),this._rootLView=e,this._hasInputBindings=i,this._tNode=FB(e[os],Ac),this.location=fR(this._tNode,e),this.instance=Q0(this._tNode.index,e)[Mu],this.hostView=this.changeDetectorRef=new XT(e,void 0),this.componentType=n}setInput(n,e){this._hasInputBindings;let i=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(n)&&Object.is(this.previousInputValues.get(n),e))return;let o=this._rootLView,r=M9(i,o[os],o,n,e);this.previousInputValues.set(n,e);let s=Q0(i.index,o);Pie(s,1)}get injector(){return new kA(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(n){this.hostView.onDestroy(n)}};function aje(t,n,e){let i=t.projection=[];for(let o=0;o{class t{static __NG_ELEMENT_ID__=lje}return t})();function lje(){let t=lp();return UCe(t,Tr())}var cje=nc,zCe=class extends cje{_lContainer;_hostTNode;_hostLView;constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return fR(this._hostTNode,this._hostLView)}get injector(){return new kA(this._hostTNode,this._hostLView)}get parentInjector(){let n=cie(this._hostTNode,this._hostLView);if(pbe(n)){let e=n9(n,this._hostLView),i=i9(n),o=e[os].data[i+8];return new kA(o,e)}else return new kA(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){let e=Vve(this._lContainer);return e!==null&&e[n]||null}get length(){return this._lContainer.length-ap}createEmbeddedView(n,e,i){let o,r;typeof i=="number"?o=i:i!=null&&(o=i.index,r=i.injector);let s=s9(this._lContainer,n.ssrId),d=n.createEmbeddedViewImpl(e||{},r,s);return this.insertImpl(d,o,aR(this._hostTNode,s)),d}createComponent(n,e,i,o,r,s,d){let m=n&&!THe(n),v;if(m)v=e;else{let W=e||{};v=W.index,i=W.injector,o=W.projectableNodes,r=W.environmentInjector||W.ngModuleRef,s=W.directives,d=W.bindings}let w=m?n:new JT(bC(n)),O=i||this.parentInjector;if(!r&&w.ngModule==null){let te=(m?O:this.parentInjector).get(Uc,null);te&&(r=te)}let N=bC(w.componentType??{}),V=s9(this._lContainer,N?.id??null),$=V?.firstChild??null,q=w.create(O,o,$,r,s,d);return this.insertImpl(q.hostView,v,aR(this._hostTNode,V)),q}insert(n,e){return this.insertImpl(n,e,!0)}insertImpl(n,e,i){let o=n._lView;if(eve(o)){let d=this.indexOf(n);if(d!==-1)this.detach(d);else{let m=o[Mp],v=new zCe(m,m[Fm],m[Mp]);v.detach(v.indexOf(n))}}let r=this._adjustIndex(e),s=this._lContainer;return oV(s,o,r,i),n.attachToViewContainerRef(),Tee(cte(s),r,n),n}move(n,e){return this.insert(n,e)}indexOf(n){let e=Vve(this._lContainer);return e!==null?e.indexOf(n):-1}remove(n){let e=this._adjustIndex(n,-1),i=KB(this._lContainer,e);i&&(AB(cte(this._lContainer),e),D9(i[os],i))}detach(n){let e=this._adjustIndex(n,-1),i=KB(this._lContainer,e);return i&&AB(cte(this._lContainer),e)!=null?new XT(i):null}_adjustIndex(n,e=0){return n??this.length+e}};function Vve(t){return t[RB]}function cte(t){return t[RB]||(t[RB]=[])}function UCe(t,n){let e,i=n[t.index];return yv(i)?e=i:(e=CCe(i,n,null,t),n[t.index]=e,Iie(n,e)),uje(e,n,t,i),new zCe(e,t,n)}function dje(t,n){let e=t[ic],i=e.createComment(""),o=Y0(n,t),r=e.parentNode(o);return sR(e,r,i,e.nextSibling(o),!1),i}var uje=mje,pje=()=>!1;function hje(t,n,e){return pje(t,n,e)}function mje(t,n,e,i){if(t[YT])return;let o;e.type&8?o=W_(i):o=dje(n,e),t[YT]=o}var jte=class t{queryList;matches=null;constructor(n){this.queryList=n}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},Gte=class t{queries;constructor(n=[]){this.queries=n}createEmbeddedView(n){let e=n.queries;if(e!==null){let i=n.contentQueries!==null?n.contentQueries[0]:e.length,o=[];for(let r=0;r0)i.push(s[d/2]);else{let v=r[d+1],w=n[-m];for(let O=ap;On.trim())}function qCe(t,n,e){t.queries===null&&(t.queries=new $te),t.queries.track(new qte(n,e))}function bje(t,n){let e=t.contentQueries||(t.contentQueries=[]),i=e.length?e[e.length-1]:-1;n!==i&&e.push(t.queries.length-1,n)}function Uie(t,n){return t.queries.getByIndex(n)}function KCe(t,n){let e=t[os],i=Uie(e,n);return i.crossesNgTemplate?Kte(e,t,n,[]):HCe(e,t,i,n)}function Hie(t,n,e){let i,o=fB(()=>{i._dirtyCounter();let r=Cje(i,t);if(n&&r===void 0)throw new mn(-951,!1);return r});return i=o[op],i._dirtyCounter=Zn(0),i._flatValue=void 0,o}function jie(t){return Hie(!0,!1,t)}function Gie(t){return Hie(!0,!0,t)}function WCe(t){return Hie(!1,!1,t)}function YCe(t,n){let e=t[op];e._lView=Tr(),e._queryIndex=n,e._queryList=zie(e._lView,n),e._queryList.onDirty(()=>e._dirtyCounter.update(i=>i+1))}function Cje(t,n){let e=t._lView,i=t._queryIndex;if(e===void 0||i===void 0||e[Ds]&4)return n?void 0:Yh;let o=zie(e,i),r=KCe(e,i);return o.reset(r,Cbe),n?o.first:o._changesDetected||t._flatValue===void 0?t._flatValue=o.toArray():t._flatValue}function QCe(t){let n=[],e=new Map;function i(o){let r=e.get(o);if(!r){let s=t(o);e.set(o,r=s.then(d=>wje(o,d)))}return r}return u9.forEach((o,r)=>{let s=[];o.templateUrl&&s.push(i(o.templateUrl).then(v=>{o.template=v}));let d=typeof o.styles=="string"?[o.styles]:o.styles||[];if(o.styles=d,o.styleUrl&&o.styleUrls?.length)throw new Error("@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");if(o.styleUrls?.length){let v=o.styles.length,w=o.styleUrls;o.styleUrls.forEach((O,N)=>{d.push(""),s.push(i(O).then(V=>{d[v+N]=V,w.splice(w.indexOf(O),1),w.length==0&&(o.styleUrls=void 0)}))})}else o.styleUrl&&s.push(i(o.styleUrl).then(v=>{d.push(v),o.styleUrl=void 0}));let m=Promise.all(s).then(()=>Sje(r));n.push(m)}),ZCe(),Promise.all(n).then(()=>{})}var u9=new Map,xje=new Set;function ZCe(){let t=u9;return u9=new Map,t}function XCe(){return u9.size===0}function wje(t,n){return typeof n=="string"?n:n.status!==void 0&&n.status!==200?Promise.reject(new mn(918,!1)):n.text()}function Sje(t){xje.delete(t)}var zve=new Set;function wv(t){zve.has(t)||(zve.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var xv=class{},P9=class{};function $ie(t,n){return new dR(t,n??null,[])}var dR=class extends xv{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new l9(this);constructor(n,e,i,o=!0){super(),this.ngModuleType=n,this._parent=e;let r=Dee(n);this._bootstrapComponents=Hbe(r.bootstrap),this._r3Injector=ite(n,e,[{provide:xv,useValue:this},{provide:rV,useValue:this.componentFactoryResolver},...i],z1(n),new Set(["environment"])),o&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}},WB=class extends P9{moduleType;constructor(n){super(),this.moduleType=n}create(n){return new dR(this.moduleType,n,[])}};function JCe(t,n,e){return new dR(t,n,e,!1)}var p9=class extends xv{injector;componentFactoryResolver=new l9(this);instance=null;constructor(n){super();let e=new bA([...n.providers,{provide:xv,useValue:this},{provide:rV,useValue:this.componentFactoryResolver}],n.parent||$O(),n.debugName,new Set(["environment"]));this.injector=e,n.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}};function bR(t,n,e=null){return new p9({providers:t,parent:n,debugName:e,runEnvironmentInitializers:!0}).injector}var Tje=(()=>{class t{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let i=Aee(!1,e.type),o=i.length>0?bR([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,o)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=lt({token:t,providedIn:"environment",factory:()=>new t(di(Uc))})}return t})();function ne(t){return mR(()=>{let n=exe(t),e=mt(be({},n),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===die.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&t.dependencies||null,getStandaloneInjector:n.standalone?o=>o.get(Tje).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||Y1.Emulated,styles:t.styles||Yh,_:null,schemas:t.schemas||null,tView:null,id:""});n.standalone&&wv("NgStandalone"),txe(e);let i=t.dependencies;return e.directiveDefs=Uve(i,Ije),e.pipeDefs=Uve(i,qye),e.id=Aje(e),e})}function Ije(t){return bC(t)||M7(t)}function yi(t){return mR(()=>({type:t.type,bootstrap:t.bootstrap||Yh,declarations:t.declarations||Yh,imports:t.imports||Yh,exports:t.exports||Yh,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function Eje(t,n){if(t==null)return gv;let e={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i],r,s,d,m;Array.isArray(o)?(d=o[0],r=o[1],s=o[2]??r,m=o[3]||null):(r=o,s=o,d=I9.None,m=null),e[r]=[i,d,m],n[r]=s}return e}function Dje(t){if(t==null)return gv;let n={};for(let e in t)t.hasOwnProperty(e)&&(n[t[e]]=e);return n}function rn(t){return mR(()=>{let n=exe(t);return txe(n),n})}function Dd(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone??!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function exe(t){let n={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:n,inputConfig:t.inputs||gv,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||Yh,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:Eje(t.inputs,n),outputs:Dje(t.outputs),debugInfo:null}}function txe(t){t.features?.forEach(n=>n(t))}function Uve(t,n){return t?()=>{let e=typeof t=="function"?t():t,i=[];for(let o of e){let r=n(o);r!==null&&i.push(r)}return i}:null}function Aje(t){let n=0,e=typeof t.consts=="function"?"":t.consts,i=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,e,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let r of i.join("|"))n=Math.imul(31,n)+r.charCodeAt(0)<<0;return n+=2147483648,"c"+n}function kje(t){return Object.getPrototypeOf(t.prototype).constructor}function ft(t){let n=kje(t.type),e=!0,i=[t];for(;n;){let o;if(vv(t))o=n.\u0275cmp||n.\u0275dir;else{if(n.\u0275cmp)throw new mn(903,!1);o=n.\u0275dir}if(o){if(e){i.push(o);let s=t;s.inputs=dte(t.inputs),s.declaredInputs=dte(t.declaredInputs),s.outputs=dte(t.outputs);let d=o.hostBindings;d&&Pje(t,d);let m=o.viewQuery,v=o.contentQueries;if(m&&Rje(t,m),v&&Fje(t,v),Mje(t,o),Pye(t.outputs,o.outputs),vv(o)&&o.data.animation){let w=t.data;w.animation=(w.animation||[]).concat(o.data.animation)}}let r=o.features;if(r)for(let s=0;s=0;i--){let o=t[i];o.hostVars=n+=o.hostVars,o.hostAttrs=oR(o.hostAttrs,e=oR(e,o.hostAttrs))}}function dte(t){return t===gv?{}:t===Yh?[]:t}function Rje(t,n){let e=t.viewQuery;e?t.viewQuery=(i,o)=>{n(i,o),e(i,o)}:t.viewQuery=n}function Fje(t,n){let e=t.contentQueries;e?t.contentQueries=(i,o,r)=>{n(i,o,r),e(i,o,r)}:t.contentQueries=n}function Pje(t,n){let e=t.hostBindings;e?t.hostBindings=(i,o)=>{n(i,o),e(i,o)}:t.hostBindings=n}function X1(t){let n=e=>{let i=Array.isArray(t);e.hostDirectives===null?(e.resolveHostDirectives=Lje,e.hostDirectives=i?t.map(Wte):[t]):i?e.hostDirectives.unshift(...t.map(Wte)):e.hostDirectives.unshift(t)};return n.ngInherit=!0,n}function Lje(t){let n=[],e=!1,i=null,o=null;for(let r=0;rnull),s=i;if(n&&typeof n=="object"){let m=n;o=m.next?.bind(m),r=m.error?.bind(m),s=m.complete?.bind(m)}this.__isAsync&&(r=this.wrapInTimeout(r),o&&(o=this.wrapInTimeout(o)),s&&(s=this.wrapInTimeout(s)));let d=super.subscribe({next:o,error:r,complete:s});return n instanceof Xr&&n.add(d),d}wrapInTimeout(n){return e=>{let i=this.pendingTasks?.add();setTimeout(()=>{try{n(e)}finally{i!==void 0&&this.pendingTasks?.remove(i)}})}}},ve=Yte;function rxe(t){let n,e;function i(){t=AA;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),n!==void 0&&clearTimeout(n)}catch{}}return n=setTimeout(()=>{t(),i()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{t(),i()})),()=>i()}function Gve(t){return queueMicrotask(()=>t()),()=>{t=AA}}var qie="isAngularZone",h9=qie+"_ID",Uje=0,_n=class t{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ve(!1);onMicrotaskEmpty=new ve(!1);onStable=new ve(!1);onError=new ve(!1);constructor(n){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:r=oxe}=n;if(typeof Zone>"u")throw new mn(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!o&&i,s.shouldCoalesceRunChangeDetection=o,s.callbackScheduled=!1,s.scheduleInRootZone=r,Gje(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(qie)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new mn(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new mn(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,o){let r=this._inner,s=r.scheduleEventTask("NgZoneEvent: "+o,n,Hje,AA,AA);try{return r.runTask(s,e,i)}finally{r.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}},Hje={};function Kie(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function jje(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function n(){rxe(()=>{t.callbackScheduled=!1,Qte(t),t.isCheckStableRunning=!0,Kie(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{n()}):t._outer.run(()=>{n()}),Qte(t)}function Gje(t){let n=()=>{jje(t)},e=Uje++;t._inner=t._inner.fork({name:"angular",properties:{[qie]:!0,[h9]:e,[h9+e]:!0},onInvokeTask:(i,o,r,s,d,m)=>{if($je(m))return i.invokeTask(r,s,d,m);try{return $ve(t),i.invokeTask(r,s,d,m)}finally{(t.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&n(),qve(t)}},onInvoke:(i,o,r,s,d,m,v)=>{try{return $ve(t),i.invoke(r,s,d,m,v)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!qje(m)&&n(),qve(t)}},onHasTask:(i,o,r,s)=>{i.hasTask(r,s),o===r&&(s.change=="microTask"?(t._hasPendingMicrotasks=s.microTask,Qte(t),Kie(t)):s.change=="macroTask"&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(i,o,r,s)=>(i.handleError(r,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}function Qte(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function $ve(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function qve(t){t._nesting--,Kie(t)}var YB=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ve;onMicrotaskEmpty=new ve;onStable=new ve;onError=new ve;run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,o){return n.apply(e,i)}};function $je(t){return sxe(t,"__ignore_ng_zone__")}function qje(t){return sxe(t,"__scheduler_tick__")}function sxe(t,n){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[n]===!0}function axe(t="zone.js",n){return t==="noop"?new YB:t==="zone.js"?new _n(n):t}var N9=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=lt({token:t,providedIn:"root",factory:()=>new t})}return t})(),Wie=[0,1,2,3],Yie=(()=>{class t{ngZone=re(_n);scheduler=re(K0);errorHandler=re(ch,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){re(iI,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Hc(16),this.executing=!0;for(let i of Wie)for(let o of this.sequences)if(!(o.erroredOrDestroyed||!o.hooks[i]))try{o.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let r=o.hooks[i];return r(o.pipelinedValue)},o.snapshot))}catch(r){o.erroredOrDestroyed=!0,this.errorHandler?.handleError(r)}this.executing=!1;for(let i of this.sequences)i.afterRun(),i.once&&(this.sequences.delete(i),i.destroy());for(let i of this.deferredRegistrations)this.sequences.add(i);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&Hc(17)}register(e){let{view:i}=e;i!==void 0?((i[TA]??=[]).push(e),QT(i),i[Ds]|=8192):this.executing?this.deferredRegistrations.add(e):this.addSequence(e)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,i){return i?i.run(L9.AFTER_NEXT_RENDER,e):e()}static \u0275prov=lt({token:t,providedIn:"root",factory:()=>new t})}return t})(),QB=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(n,e,i,o,r,s=null){this.impl=n,this.hooks=e,this.view=i,this.once=o,this.snapshot=s,this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let n=this.view?.[TA];n&&(this.view[TA]=n.filter(e=>e!==this))}};function Ou(t,n){let e=n?.injector??re(Oo);return wv("NgAfterNextRender"),Wje(t,e,n,!0)}function Kje(t){return t instanceof Function?[void 0,void 0,t,void 0]:[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function Wje(t,n,e,i){let o=n.get(N9);o.impl??=n.get(Yie);let r=n.get(iI,null,{optional:!0}),s=e?.manualCleanup!==!0?n.get(jf):null,d=n.get(DA,null,{optional:!0}),m=new QB(o.impl,Kje(t),d?.view,i,s,r?.snapshot(null));return o.impl.register(m),m}var B9=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();var V9=new fi(""),xR=new fi(""),lV=(()=>{class t{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;constructor(e,i,o){this._ngZone=e,this.registry=i,Oee()&&(this._destroyRef=re(jf,{optional:!0})??void 0),Qie||(lxe(o),o.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this._taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){let e=this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),i=this._ngZone.runOutsideAngular(()=>this._ngZone.onStable.subscribe({next:()=>{_n.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}}));this._destroyRef?.onDestroy(()=>{e.unsubscribe(),i.unsubscribe()})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb()}});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>i.updateCb&&i.updateCb(e)?(clearTimeout(i.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,o){let r=-1;i&&i>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==r),e()},i)),this._callbacks.push({doneCb:e,timeoutId:r,updateCb:o})}whenStable(e,i,o){if(o&&!this._taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,o),this._runCallbacksIfReady()}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,o){return[]}static \u0275fac=function(i){return new(i||t)(di(_n),di(cV),di(xR))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),cV=(()=>{class t{_applications=new Map;registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return Qie?.findTestabilityInTree(this,e,i)??null}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function lxe(t){Qie=t}var Qie;function J1(t){return!!t&&typeof t.then=="function"}function z9(t){return!!t&&typeof t.subscribe=="function"}var Zie=new fi("");function nI(t){return H1([{provide:Zie,multi:!0,useValue:t}])}var Xie=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,i)=>{this.resolve=e,this.reject=i});appInits=re(Zie,{optional:!0})??[];injector=re(Oo);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let o of this.appInits){let r=dh(this.injector,o);if(J1(r))e.push(r);else if(z9(r)){let s=new Promise((d,m)=>{r.subscribe({complete:d,error:m})});e.push(s)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{i()}).catch(o=>{this.reject(o)}),e.length===0&&i(),this.initialized=!0}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),U9=new fi("");function cxe(){VJ(()=>{let t="";throw new mn(600,t)})}function dxe(t){return t.isBoundToModule}var Yje=10;function Jie(t,n){return Array.isArray(n)?n.reduce(Jie,t):be(be({},t),n)}var Rp=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=re(Gf);afterRenderManager=re(N9);zonelessEnabled=re(VB);rootEffectScheduler=re(zB);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new hi;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=re(IC);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(vt(e=>!e))}constructor(){re(iI,{optional:!0})}whenStable(){let e;return new Promise(i=>{e=this.isStable.subscribe({next:o=>{o&&i()}})}).finally(()=>{e.unsubscribe()})}_injector=re(Uc);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,i){return this.bootstrapImpl(e,i)}bootstrapImpl(e,i,o=Oo.NULL){return this._injector.get(_n).run(()=>{Hc(10);let s=e instanceof R9;if(!this._injector.get(Xie).done){let $="";throw new mn(405,$)}let m;s?m=e:m=this._injector.get(rV).resolveComponentFactory(e),this.componentTypes.push(m.componentType);let v=dxe(m)?void 0:this._injector.get(xv),w=i||m.selector,O=m.create(o,[],w,v),N=O.location.nativeElement,V=O.injector.get(V9,null);return V?.registerApplication(N),O.onDestroy(()=>{this.detachView(O.hostView),HB(this.components,O),V?.unregisterApplication(N)}),this._loadComponent(O),Hc(11,O),O})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Hc(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(L9.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new mn(101,!1);let e=Os(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Os(e),this.afterTick.next(),Hc(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(bc,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++LB(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){let i=e;HB(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(o){this.internalErrorHandler(o)}this.components.push(e),this._injector.get(U9,[]).forEach(o=>o(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>HB(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new mn(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function HB(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}var ute="aria";function Cc(t,n){let e=Tr(),i=q1();if(Lm(e,i,n)){let o=kc(),r=JO();if(M9(r,o,e,t,n))G1(r)&&dCe(e,r.index);else{let d=Y0(r,e),m=Qje(t);uCe(e[ic],d,null,r.value,m,n,null)}}return Cc}function Qje(t){return t.charAt(ute.length)!=="-"?ute+"-"+t.slice(ute.length).toLowerCase():t}function Ge(t,n,e,i){let o=Tr(),r=q1();if(Lm(o,r,n)){let s=kc(),d=JO();i9e(d,o,t,n,e,i)}return Ge}var Gsi=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var Zte=class{destroy(n){}updateValue(n,e){}swap(n,e){let i=Math.min(n,e),o=Math.max(n,e),r=this.detach(o);if(o-i>1){let s=this.detach(i);this.attach(i,r),this.attach(o,s)}else this.attach(i,r)}move(n,e){this.attach(e,this.detach(n,!0))}};function pte(t,n,e,i,o){return t===e&&Object.is(n,i)?1:Object.is(o(t,n),o(e,i))?-1:0}function Zje(t,n,e){let i,o,r=0,s=t.length-1,d=void 0;if(Array.isArray(n)){let m=n.length-1;for(;r<=s&&r<=m;){let v=t.at(r),w=n[r],O=pte(r,v,r,w,e);if(O!==0){O<0&&t.updateValue(r,w),r++;continue}let N=t.at(s),V=n[m],$=pte(s,N,m,V,e);if($!==0){$<0&&t.updateValue(s,V),s--,m--;continue}let q=e(r,v),W=e(s,N),te=e(r,w);if(Object.is(te,W)){let fe=e(m,V);Object.is(fe,q)?(t.swap(r,s),t.updateValue(s,V),m--,s--):t.move(s,r),t.updateValue(r,w),r++;continue}if(i??=new m9,o??=Wve(t,r,s,e),Xte(t,i,r,te))t.updateValue(r,w),r++,s++;else if(o.has(te))i.set(q,t.detach(r)),s--;else{let fe=t.create(r,n[r]);t.attach(r,fe),r++,s++}}for(;r<=m;)Kve(t,i,e,r,n[r]),r++}else if(n!=null){let m=n[Symbol.iterator](),v=m.next();for(;!v.done&&r<=s;){let w=t.at(r),O=v.value,N=pte(r,w,r,O,e);if(N!==0)N<0&&t.updateValue(r,O),r++,v=m.next();else{i??=new m9,o??=Wve(t,r,s,e);let V=e(r,O);if(Xte(t,i,r,V))t.updateValue(r,O),r++,s++,v=m.next();else if(!o.has(V))t.attach(r,t.create(r,O)),r++,s++,v=m.next();else{let $=e(r,w);i.set($,t.detach(r)),s--}}}for(;!v.done;)Kve(t,i,e,t.length,v.value),v=m.next()}for(;r<=s;)t.destroy(t.detach(s--));i?.forEach(m=>{t.destroy(m)})}function Xte(t,n,e,i){return n!==void 0&&n.has(i)?(t.attach(e,n.get(i)),n.delete(i),!0):!1}function Kve(t,n,e,i,o){if(Xte(t,n,i,e(i,o)))t.updateValue(i,o);else{let r=t.create(i,o);t.attach(i,r)}}function Wve(t,n,e,i){let o=new Set;for(let r=n;r<=e;r++)o.add(i(r,t.at(r)));return o}var m9=class{kvMap=new Map;_vMap=void 0;has(n){return this.kvMap.has(n)}delete(n){if(!this.has(n))return!1;let e=this.kvMap.get(n);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(n,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(n),!0}get(n){return this.kvMap.get(n)}set(n,e){if(this.kvMap.has(n)){let i=this.kvMap.get(n);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(i);)i=o.get(i);o.set(i,e)}else this.kvMap.set(n,e)}forEach(n){for(let[e,i]of this.kvMap)if(n(i,e),this._vMap!==void 0){let o=this._vMap;for(;o.has(i);)i=o.get(i),n(i,e)}}};function qe(t,n,e,i,o,r,s,d){wv("NgControlFlow");let m=Tr(),v=kc(),w=zg(v.consts,r);return uR(m,v,t,n,e,i,o,w,256,s,d),ene}function ene(t,n,e,i,o,r,s,d){wv("NgControlFlow");let m=Tr(),v=kc(),w=zg(v.consts,r);return uR(m,v,t,n,e,i,o,w,512,s,d),ene}function Ke(t,n){wv("NgControlFlow");let e=Tr(),i=q1(),o=e[i]!==$f?e[i]:-1,r=o!==-1?f9(e,Ac+o):void 0,s=0;if(Lm(e,i,t)){let d=Os(null);try{if(r!==void 0&&wCe(r,s),t!==-1){let m=Ac+t,v=f9(e,m),w=iie(e[os],m),O=kCe(v,w,e),N=nV(e,w,n,{dehydratedView:O});oV(v,N,s,aR(w,O))}}finally{Os(d)}}else if(r!==void 0){let d=xCe(r,s);d!==void 0&&(d[Mu]=n)}}var Jte=class{lContainer;$implicit;$index;constructor(n,e,i){this.lContainer=n,this.$implicit=e,this.$index=i}get $count(){return this.lContainer.length-ap}};function dV(t){return t}function jo(t,n){return n}var eie=class{hasEmptyBlock;trackByFn;liveCollection;constructor(n,e,i){this.hasEmptyBlock=n,this.trackByFn=e,this.liveCollection=i}};function lo(t,n,e,i,o,r,s,d,m,v,w,O,N){wv("NgControlFlow");let V=Tr(),$=kc(),q=m!==void 0,W=Tr(),te=d?s.bind(W[Pm][Mu]):s,fe=new eie(q,te);W[Ac+t]=fe,uR(V,$,t+1,n,e,i,o,zg($.consts,r),256),q&&uR(V,$,t+2,m,v,w,O,zg($.consts,N),512)}var tie=class extends Zte{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(n,e,i){super(),this.lContainer=n,this.hostLView=e,this.templateTNode=i}get length(){return this.lContainer.length-ap}at(n){return this.getLView(n)[Mu].$implicit}attach(n,e){let i=e[xA];this.needsIndexUpdate||=n!==this.length,oV(this.lContainer,e,n,aR(this.templateTNode,i))}detach(n,e){return this.needsIndexUpdate||=n!==this.length-1,e&&Xje(this.lContainer,n),Jje(this.lContainer,n)}create(n,e){let i=s9(this.lContainer,this.templateTNode.tView.ssrId),o=nV(this.hostLView,this.templateTNode,new Jte(this.lContainer,e,n),{dehydratedView:i});return this.operationsCounter?.recordCreate(),o}destroy(n){D9(n[os],n),this.operationsCounter?.recordDestroy()}updateValue(n,e){this.getLView(n)[Mu].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let n=0;n(eR(!0),wie(n[ic],i,_ve()));function Di(t,n,e){let i=Tr(),o=i[os],r=t+Ac,s=o.firstCreatePass?Nie(r,i,8,"ng-container",Mie,P7(),n,e):o.data[r];if(Oie(s,i,t,"ng-container",tGe),YO(s)){let d=i[os];k9(d,i,s),pie(d,s,i)}return e!=null&&iV(i,s),Di}function Ai(){let t=kc(),n=lp(),e=Rie(n);return t.firstCreatePass&&Bie(t,e),Ai}function ui(t,n,e){return Di(t,n,e),Ai(),ui}var tGe=(t,n,e,i,o)=>(eR(!0),qbe(n[ic],""));function tt(){return Tr()}function Rr(t,n,e){let i=Tr(),o=q1();if(Lm(i,o,n)){let r=kc(),s=JO();cCe(s,i,t,n,i[ic],e)}return Rr}var q7=void 0;function iGe(t){let n=Math.floor(Math.abs(t)),e=t.toString().replace(/^[^.]*\.?/,"").length;return n===1&&e===0?1:5}var nGe=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],q7,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],q7,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",q7,"{1} 'at' {0}",q7],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",iGe],jB={};function tne(t,n,e){typeof n!="string"&&(e=n,n=t[nd.LocaleId]),n=n.toLowerCase().replace(/_/g,"-"),jB[n]=t,e&&(jB[n][nd.ExtraData]=e)}function Nm(t){let n=oGe(t),e=Yve(n);if(e)return e;let i=n.split("-")[0];if(e=Yve(i),e)return e;if(i==="en")return nGe;throw new mn(701,!1)}function ine(t){return Nm(t)[nd.PluralCase]}function Yve(t){return t in jB||(jB[t]=sp.ng&&sp.ng.common&&sp.ng.common.locales&&sp.ng.common.locales[t]),jB[t]}var nd=(function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t})(nd||{});function oGe(t){return t.toLowerCase().replace(/_/g,"-")}var uV="en-US",rGe="USD",sGe={marker:"element"},aGe={marker:"ICU"},W1=(function(t){return t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT",t})(W1||{}),lGe=uV;function pxe(t){typeof t=="string"&&(lGe=t.toLowerCase().replace(/_/g,"-"))}function cGe(t,n,e){let i=t[ic];switch(e){case Node.COMMENT_NODE:return qbe(i,n);case Node.TEXT_NODE:return $be(i,n);case Node.ELEMENT_NODE:return wie(i,n,null)}}var dGe=(t,n,e,i)=>(eR(!0),cGe(t,e,i));function uGe(t,n,e,i){let o=t[ic];for(let r=0;r>>W1.SHIFT,O=t[w],N=!1;O===null&&(O=t[w]=dGe(t,w,d,m?Node.COMMENT_NODE:Node.TEXT_NODE),N=BB()),v&&e!==null&&N&&sR(o,e,O,i,!1)}}var g9=/�(\d+):?\d*�/gi;var pGe=/�(\d+)�/,hxe=/^\s*(�\d+:?\d*�)\s*,\s*(select|plural)\s*,/,GB="\uFFFD",hGe=/�\/?\*(\d+:\d+)�/gi,mGe=/�(\/?[#*]\d+):?\d*�/gi,fGe=/\uE500/g;function gGe(t){return t.replace(fGe," ")}function _Ge(t,n,e,i,o,r){let s=ZO(),d=[],m=[],v=[[]],w=[[]];o=vGe(o,r);let O=gGe(o).split(mGe);for(let N=0;N`}}let $=[];w.push($),d=CGe($,n,m,e,i,o,r.cases[O],N.join(""),V)|d}d&&SGe(i,d,s),t.push({kind:3,index:s,cases:w,currentCaseLViewIndex:m.currentCaseLViewIndex})}function bGe(t){let n=[],e=[],i=1,o=0;t=t.replace(hxe,function(s,d,m){return m==="select"?i=0:i=1,o=parseInt(d.slice(1),10),""});let r=oie(t);for(let s=0;se.length&&e.push(m)}return{type:i,mainBinding:o,cases:n,values:e}}function oie(t){if(!t)return[];let n=0,e=[],i=[],o=/[{}]/g;o.lastIndex=0;let r;for(;r=o.exec(t);){let d=r.index;if(r[0]=="}"){if(e.pop(),e.length==0){let m=t.substring(n,d);hxe.test(m)?i.push(bGe(m)):i.push(m),n=d+1}}else{if(e.length==0){let m=t.substring(n,d);i.push(m),n=d+1}e.push("{")}}let s=t.substring(n);return i.push(s),i}function CGe(t,n,e,i,o,r,s,d,m){let v=[],w=[],O=[];e.cases.push(s),e.create.push(v),e.remove.push(w),e.update.push(O);let V=Pbe(v9()).getInertBodyElement(d),$=Rte(V)||V;return $?_xe(t,n,e,i,o,v,w,O,$,r,m,0):0}function _xe(t,n,e,i,o,r,s,d,m,v,w,O){let N=0,V=m.firstChild;for(;V;){let $=tV(n,i,1,null);switch(V.nodeType){case Node.ELEMENT_NODE:let q=V,W=q.tagName.toLowerCase();if(Mte.hasOwnProperty(W)){hte(r,sGe,W,v,$),n.data[$]=W;let Fe=q.attributes;for(let Se=0;Se>17&32767}function DGe(t){return(t&2)==2}function AGe(t,n){return t&131071|n<<17}function rie(t){return t|2}function pR(t){return(t&131068)>>2}function mte(t,n){return t&-131069|n<<2}function kGe(t){return(t&1)===1}function sie(t){return t|1}function MGe(t,n,e,i,o,r){let s=r?n.classBindings:n.styleBindings,d=OA(s),m=pR(s);t[i]=e;let v=!1,w;if(Array.isArray(e)){let O=e;w=O[1],(w===null||GO(O,w)>0)&&(v=!0)}else w=e;if(o)if(m!==0){let N=OA(t[d+1]);t[i+1]=K7(N,d),N!==0&&(t[N+1]=mte(t[N+1],i)),t[d+1]=AGe(t[d+1],i)}else t[i+1]=K7(d,0),d!==0&&(t[d+1]=mte(t[d+1],i)),d=i;else t[i+1]=K7(m,0),d===0?d=i:t[m+1]=mte(t[m+1],i),m=i;v&&(t[i+1]=rie(t[i+1])),Xve(t,w,i,!0),Xve(t,w,i,!1),OGe(n,w,t,i,r),s=K7(d,m),r?n.classBindings=s:n.styleBindings=s}function OGe(t,n,e,i,o){let r=o?t.residualClasses:t.residualStyles;r!=null&&typeof n=="string"&&GO(r,n)>=0&&(e[i+1]=sie(e[i+1]))}function Xve(t,n,e,i){let o=t[e+1],r=n===null,s=i?OA(o):pR(o),d=!1;for(;s!==0&&(d===!1||r);){let m=t[s],v=t[s+1];RGe(m,n)&&(d=!0,t[s+1]=i?sie(v):rie(v)),s=i?OA(v):pR(v)}d&&(t[e+1]=i?rie(o):sie(o))}function RGe(t,n){return t===null||n==null||(Array.isArray(t)?t[1]:t)===n?!0:Array.isArray(t)&&typeof n=="string"?GO(t,n)>=0:!1}var Op={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Cxe(t){return t.substring(Op.key,Op.keyEnd)}function FGe(t){return t.substring(Op.value,Op.valueEnd)}function PGe(t){return Sxe(t),xxe(t,hR(t,0,Op.textEnd))}function xxe(t,n){let e=Op.textEnd;return e===n?-1:(n=Op.keyEnd=NGe(t,Op.key=n,e),hR(t,n,e))}function LGe(t){return Sxe(t),wxe(t,hR(t,0,Op.textEnd))}function wxe(t,n){let e=Op.textEnd,i=Op.key=hR(t,n,e);return e===i?-1:(i=Op.keyEnd=BGe(t,i,e),i=Jve(t,i,e,58),i=Op.value=hR(t,i,e),i=Op.valueEnd=VGe(t,i,e),Jve(t,i,e,59))}function Sxe(t){Op.key=0,Op.keyEnd=0,Op.value=0,Op.valueEnd=0,Op.textEnd=t.length}function hR(t,n,e){for(;n32;)n++;return n}function BGe(t,n,e){let i;for(;n=65&&(i&-33)<=90||i>=48&&i<=57);)n++;return n}function Jve(t,n,e,i){return n=hR(t,n,e),n32&&(d=s),r=o,o=i,i=m&-33}return d}function ebe(t,n,e,i){let o=-1,r=e;for(;r=0;e=wxe(n,e))Axe(t,Cxe(n),FGe(n))}function Oe(t){Ixe(KGe,UGe,t,!0)}function UGe(t,n){for(let e=PGe(n);e>=0;e=xxe(n,e))kB(t,Cxe(n),!0)}function Txe(t,n,e,i){let o=Tr(),r=kc(),s=L7(2);if(r.firstUpdatePass&&Dxe(r,t,s,i),n!==$f&&Lm(o,s,n)){let d=r.data[SC()];kxe(r,d,o,o[ic],t,o[s+1]=YGe(n,e),i,s)}}function Ixe(t,n,e,i){let o=kc(),r=L7(2);o.firstUpdatePass&&Dxe(o,null,r,i);let s=Tr();if(e!==$f&&Lm(s,r,e)){let d=o.data[SC()];if(Mxe(d,i)&&!Exe(o,r)){let m=i?d.classesWithoutHost:d.stylesWithoutHost;m!==null&&(e=I7(m,e||"")),nie(o,d,s,e,i)}else WGe(o,d,s,s[ic],s[r+1],s[r+1]=qGe(t,n,e),i,r)}}function Exe(t,n){return n>=t.expandoStartIndex}function Dxe(t,n,e,i){let o=t.data;if(o[e+1]===null){let r=o[SC()],s=Exe(t,e);Mxe(r,i)&&n===null&&!s&&(n=!1),n=HGe(o,r,n,i),MGe(o,r,n,e,s,i)}}function HGe(t,n,e,i){let o=pve(t),r=i?n.residualClasses:n.residualStyles;if(o===null)(i?n.classBindings:n.styleBindings)===0&&(e=fte(null,t,n,e,i),e=ZB(e,n.attrs,i),r=null);else{let s=n.directiveStylingLast;if(s===-1||t[s]!==o)if(e=fte(o,t,n,e,i),r===null){let m=jGe(t,n,i);m!==void 0&&Array.isArray(m)&&(m=fte(null,t,n,m[1],i),m=ZB(m,n.attrs,i),GGe(t,n,i,m))}else r=$Ge(t,n,i)}return r!==void 0&&(i?n.residualClasses=r:n.residualStyles=r),e}function jGe(t,n,e){let i=e?n.classBindings:n.styleBindings;if(pR(i)!==0)return t[OA(i)]}function GGe(t,n,e,i){let o=e?n.classBindings:n.styleBindings;t[OA(o)]=i}function $Ge(t,n,e){let i,o=n.directiveEnd;for(let r=1+n.directiveStylingLast;r0;){let m=t[o],v=Array.isArray(m),w=v?m[1]:m,O=w===null,N=e[o+1];N===$f&&(N=O?Yh:void 0);let V=O?k7(N,i):w===i?N:void 0;if(v&&!_9(V)&&(V=k7(m,i)),_9(V)&&(d=V,s))return d;let $=t[o+1];o=s?OA($):pR($)}if(n!==null){let m=r?n.residualClasses:n.residualStyles;m!=null&&(d=k7(m,i))}return d}function _9(t){return t!==void 0}function YGe(t,n){return t==null||t===""||(typeof n=="string"?t=t+n:typeof t=="object"&&(t=z1(jg(t)))),t}function Mxe(t,n){return(t.flags&(n?8:16))!==0}function Q(t,n=""){let e=Tr(),i=kc(),o=t+Ac,r=i.firstCreatePass?vR(i,o,1,n,null):i.data[o],s=QGe(i,e,r,n,t);e[o]=s,BB()&&Aie(i,e,s,r),$1(r,!1)}var QGe=(t,n,e,i,o)=>(eR(!0),$be(n[ic],i));function Oxe(t,n,e,i=""){return Lm(t,q1(),e)?n+KT(e)+i:$f}function Rxe(t,n,e,i,o,r=""){let s=ave(),d=lR(t,s,e,o);return L7(2),d?n+KT(e)+i+KT(o)+r:$f}function dt(t){return Qi("",t),dt}function Qi(t,n,e){let i=Tr(),o=Oxe(i,t,n,e);return o!==$f&&Fxe(i,SC(),o),Qi}function _d(t,n,e,i,o){let r=Tr(),s=Rxe(r,t,n,e,i,o);return s!==$f&&Fxe(r,SC(),s),_d}function Fxe(t,n,e){let i=Bee(n,t);R7e(t[ic],i,e)}function ph(t,n,e){nte(n)&&(n=n());let i=Tr(),o=q1();if(Lm(i,o,n)){let r=kc(),s=JO();lCe(s,i,t,n,i[ic],e)}return ph}function Xh(t,n){let e=nte(t);return e&&t.set(n),e}function hh(t,n){let e=Tr(),i=kc(),o=lp();return bxe(i,e,e[ic],o,t,n),hh}function wR(t,n,e=""){return Oxe(Tr(),t,n,e)}function nne(t,n,e,i,o=""){return Rxe(Tr(),t,n,e,i,o)}function ZGe(t,n,e){let i=kc();if(i.firstCreatePass){let o=vv(t);aie(e,i.data,i.blueprint,o,!0),aie(n,i.data,i.blueprint,o,!1)}}function aie(t,n,e,i,o){if(t=kp(t),Array.isArray(t))for(let r=0;r>20;if(vA(t)||!t.multi){let V=new MA(v,o,_e,null),$=_te(m,n,o?w:w+N,O);$===-1?(vte(r9(d,s),r,m),gte(r,t,n.length),n.push(m),d.directiveStart++,d.directiveEnd++,o&&(d.providerIndexes+=1048576),e.push(V),s.push(V)):(e[$]=V,s[$]=V)}else{let V=_te(m,n,w+N,O),$=_te(m,n,w,w+N),q=V>=0&&e[V],W=$>=0&&e[$];if(o&&!W||!o&&!q){vte(r9(d,s),r,m);let te=e$e(o?JGe:XGe,e.length,o,i,v,t);!o&&W&&(e[$].providerFactory=te),gte(r,t,n.length,0),n.push(m),d.directiveStart++,d.directiveEnd++,o&&(d.providerIndexes+=1048576),e.push(te),s.push(te)}else{let te=Pxe(e[o?$:V],v,!o&&i);gte(r,t,V>-1?V:$,te)}!o&&i&&W&&e[$].componentProviders++}}}function gte(t,n,e,i){let o=vA(n),r=Qye(n);if(o||r){let m=(r?kp(n.useClass):n).prototype.ngOnDestroy;if(m){let v=t.destroyHooks||(t.destroyHooks=[]);if(!o&&n.multi){let w=v.indexOf(e);w===-1?v.push(e,[i,m]):v[w+1].push(i,m)}else v.push(e,m)}}}function Pxe(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function _te(t,n,e,i){for(let o=e;o{e.providersResolver=(i,o)=>ZGe(i,o?o(t):t,n)}}function uo(t,n,e){let i=Ug()+t,o=Tr();return o[i]===$f?AC(o,i,e?n.call(e):n()):aV(o,i)}function ki(t,n,e,i){return Lxe(Tr(),Ug(),t,n,e,i)}function Eo(t,n,e,i,o){return Nxe(Tr(),Ug(),t,n,e,i,o)}function $d(t,n,e,i,o,r){return Bxe(Tr(),Ug(),t,n,e,i,o,r)}function Sv(t,n,e,i,o,r,s){return t$e(Tr(),Ug(),t,n,e,i,o,r,s)}function FA(t,n,e,i,o,r,s,d){let m=Ug()+t,v=Tr(),w=cR(v,m,e,i,o,r);return Lm(v,m+4,s)||w?AC(v,m+5,d?n.call(d,e,i,o,r,s):n(e,i,o,r,s)):aV(v,m+5)}function SR(t,n,e,i,o,r,s,d,m){let v=Ug()+t,w=Tr(),O=cR(w,v,e,i,o,r);return lR(w,v+4,s,d)||O?AC(w,v+6,m?n.call(m,e,i,o,r,s,d):n(e,i,o,r,s,d)):aV(w,v+6)}function one(t,n,e,i,o,r,s,d,m,v){let w=Ug()+t,O=Tr(),N=cR(O,w,e,i,o,r);return LCe(O,w+4,s,d,m)||N?AC(O,w+7,v?n.call(v,e,i,o,r,s,d,m):n(e,i,o,r,s,d,m)):aV(O,w+7)}function rne(t,n,e,i,o,r,s,d,m,v,w){let O=Ug()+t,N=Tr(),V=cR(N,O,e,i,o,r);return cR(N,O+4,s,d,m,v)||V?AC(N,O+8,w?n.call(w,e,i,o,r,s,d,m,v):n(e,i,o,r,s,d,m,v)):aV(N,O+8)}function G9(t,n,e,i){return i$e(Tr(),Ug(),t,n,e,i)}function pV(t,n){let e=t[n];return e===$f?void 0:e}function Lxe(t,n,e,i,o,r){let s=n+e;return Lm(t,s,o)?AC(t,s+1,r?i.call(r,o):i(o)):pV(t,s+1)}function Nxe(t,n,e,i,o,r,s){let d=n+e;return lR(t,d,o,r)?AC(t,d+2,s?i.call(s,o,r):i(o,r)):pV(t,d+2)}function Bxe(t,n,e,i,o,r,s,d){let m=n+e;return LCe(t,m,o,r,s)?AC(t,m+3,d?i.call(d,o,r,s):i(o,r,s)):pV(t,m+3)}function t$e(t,n,e,i,o,r,s,d,m){let v=n+e;return cR(t,v,o,r,s,d)?AC(t,v+4,m?i.call(m,o,r,s,d):i(o,r,s,d)):pV(t,v+4)}function i$e(t,n,e,i,o,r){let s=n+e,d=!1;for(let m=0;m=0;e--){let i=n[e];if(t===i.name)return i}}function Nr(t,n,e){let i=t+Ac,o=Tr(),r=PB(o,i);return ane(o,i)?Lxe(o,Ug(),n,r.transform,e,r):r.transform(e)}function Ls(t,n,e,i){let o=t+Ac,r=Tr(),s=PB(r,o);return ane(r,o)?Nxe(r,Ug(),n,s.transform,e,i,s):s.transform(e,i)}function sne(t,n,e,i,o){let r=t+Ac,s=Tr(),d=PB(s,r);return ane(s,r)?Bxe(s,Ug(),n,d.transform,e,i,o,d):d.transform(e,i,o)}function ane(t,n){return t[os].data[n].pure}function Pt(t,n){return O9(t,n)}var W7=null;function Vxe(t){W7!==null&&(t.defaultEncapsulation!==W7.defaultEncapsulation||t.preserveWhitespaces!==W7.preserveWhitespaces)||(W7=t)}var y9=class{ngModuleFactory;componentFactories;constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}},lne=(()=>{class t{compileModuleSync(e){return new WB(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let i=this.compileModuleSync(e),o=Dee(e),r=Hbe(o.declarations).reduce((s,d)=>{let m=bC(d);return m&&s.push(new JT(m)),s},[]);return new y9(i,r)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),zxe=new fi("");var o$e=(()=>{class t{zone=re(_n);changeDetectionScheduler=re(K0);applicationRef=re(Rp);applicationErrorHandler=re(Gf);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{try{this.applicationRef.dirtyFlags|=1,this.applicationRef._tick()}catch(e){this.applicationErrorHandler(e)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Uxe({ngZoneFactory:t,ignoreChangesOutsideZone:n,scheduleInRootZone:e}){return t??=()=>new _n(mt(be({},cne()),{scheduleInRootZone:e})),[{provide:_n,useFactory:t},{provide:U1,multi:!0,useFactory:()=>{let i=re(o$e,{optional:!0});return()=>i.initialize()}},{provide:U1,multi:!0,useFactory:()=>{let i=re(r$e);return()=>{i.initialize()}}},n===!0?{provide:ote,useValue:!0}:[],{provide:rte,useValue:e??oxe},{provide:Gf,useFactory:()=>{let i=re(_n),o=re(Uc),r;return s=>{i.runOutsideAngular(()=>{o.destroyed&&!r?setTimeout(()=>{throw s}):(r??=o.get(ch),r.handleError(s))})}}}]}function cne(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var r$e=(()=>{class t{subscription=new Xr;initialized=!1;zone=re(_n);pendingTasks=re(IC);initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{_n.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{_n.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Hxe=(()=>{class t{applicationErrorHandler=re(Gf);appRef=re(Rp);taskService=re(IC);ngZone=re(_n);zonelessEnabled=re(VB);tracing=re(iI,{optional:!0});disableScheduling=re(ote,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Xr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(h9):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(re(rte,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof YB||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let i=!1;switch(e){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,i=!0;break}case 12:{this.appRef.dirtyFlags|=16,i=!0;break}case 13:{this.appRef.dirtyFlags|=2,i=!0;break}case 11:{i=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(i))return;let o=this.useMicrotaskScheduler?Gve:rxe;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>o(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>o(()=>this.tick()))}shouldScheduleTick(e){return!(this.disableScheduling&&!e||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(h9+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){this.taskService.remove(e),this.applicationErrorHandler(i)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Gve(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function s$e(){return typeof $localize<"u"&&$localize.locale||uV}var cp=new fi("",{providedIn:"root",factory:()=>re(cp,{optional:!0,skipSelf:!0})||s$e()}),dne=new fi("",{providedIn:"root",factory:()=>rGe});var hV=class{destroyed=!1;listeners=null;errorHandler=re(ch,{optional:!0});destroyRef=re(jf);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(n){if(this.destroyed)throw new mn(953,!1);return(this.listeners??=[]).push(n),{unsubscribe:()=>{let e=this.listeners?.indexOf(n);e!==void 0&&e!==-1&&this.listeners?.splice(e,1)}}}emit(n){if(this.destroyed){console.warn(vC(953,!1));return}if(this.listeners===null)return;let e=Os(null);try{for(let i of this.listeners)try{i(n)}catch(o){this.errorHandler?.handleError(o)}}finally{Os(e)}}};function Ad(t){return kye(t)}function bo(t,n){return fB(t,n?.equal)}var une=class{[op];constructor(n){this[op]=n}destroy(){this[op].destroy()}};function od(t,n){let e=n?.injector??re(Oo),i=n?.manualCleanup!==!0?e.get(jf):null,o,r=e.get(DA,null,{optional:!0}),s=e.get(K0);return r!==null?(o=c$e(r.view,s,t),i instanceof EB&&i._lView===r.view&&(i=null)):o=d$e(t,e.get(zB),s),o.injector=e,i!==null&&(o.onDestroyFn=i.onDestroy(()=>o.destroy())),new une(o)}var jxe=mt(be({},Mye),{cleanupFns:void 0,zone:null,onDestroyFn:AA,run(){let t=XO(!1);try{Oye(this)}finally{XO(t)}},cleanup(){if(!this.cleanupFns?.length)return;let t=Os(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],Os(t)}}}),a$e=mt(be({},jxe),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){UT(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),l$e=mt(be({},jxe),{consumerMarkedDirty(){this.view[Ds]|=8192,QT(this.view),this.notifier.notify(13)},destroy(){UT(this),this.onDestroyFn(),this.cleanup(),this.view[j1]?.delete(this)}});function c$e(t,n,e){let i=Object.create(l$e);return i.view=t,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=n,i.fn=Gxe(i,e),t[j1]??=new Set,t[j1].add(i),i.consumerMarkedDirty(i),i}function d$e(t,n,e){let i=Object.create(a$e);return i.fn=Gxe(i,t),i.scheduler=n,i.notifier=e,i.zone=typeof Zone<"u"?Zone.current:null,i.scheduler.add(i),i.notifier.notify(12),i}function Gxe(t,n){return()=>{n(e=>(t.cleanupFns??=[]).push(e))}}var K9=Symbol("InputSignalNode#UNSET"),i1e=mt(be({},gB),{transformFn:void 0,applyValueToInputSignal(t,n){hA(t,n)}});function n1e(t,n){let e=Object.create(i1e);e.value=t,e.transformFn=n?.transform;function i(){if(VT(e),e.value===K9){let o=null;throw new mn(-950,o)}return e.value}return i[op]=e,i}var Bm=class{attributeName;constructor(n){this.attributeName=n}__NG_ELEMENT_ID__=()=>JB(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},g$e=new fi("");g$e.__NG_ELEMENT_ID__=t=>{let n=lp();if(n===null)throw new mn(204,!1);if(n.type&2)return n.value;if(t&8)return null;throw new mn(204,!1)};function o1e(t){return new hV}function $xe(t,n){return n1e(t,n)}function _$e(t){return n1e(K9,t)}var mo=($xe.required=_$e,$xe);function qxe(t,n){return jie(n)}function y$e(t,n){return Gie(n)}var PA=(qxe.required=y$e,qxe);function Kxe(t,n){return jie(n)}function v$e(t,n){return Gie(n)}var ew=(Kxe.required=v$e,Kxe);function W9(t,n){return WCe(n)}function r1e(t,n){let e=Object.create(i1e),i=new hV;e.value=t;function o(){return VT(e),Wxe(e.value),e.value}return o[op]=e,o.asReadonly=U7.bind(o),o.set=r=>{e.equal(e.value,r)||(hA(e,r),i.emit(r))},o.update=r=>{Wxe(e.value),o.set(r(e.value))},o.subscribe=i.subscribe.bind(i),o.destroyRef=i.destroyRef,o}function Wxe(t){if(t===K9)throw new mn(952,!1)}function Yxe(t,n){return r1e(t,n)}function b$e(t){return r1e(K9,t)}var X0=(Yxe.required=b$e,Yxe);function C$e(t,n,e){let i=new WB(e);return Promise.resolve(i)}function Qxe(t){for(let n=t.length-1;n>=0;n--)if(t[n]!==void 0)return t[n]}var $9=new fi(""),x$e=new fi("");function mV(t){return!t.moduleRef}function w$e(t){let n=mV(t)?t.r3Injector:t.moduleRef.injector,e=n.get(_n);return e.run(()=>{mV(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let i=n.get(Gf),o;if(e.runOutsideAngular(()=>{o=e.onError.subscribe({next:i})}),mV(t)){let r=()=>n.destroy(),s=t.platformInjector.get($9);s.add(r),n.onDestroy(()=>{o.unsubscribe(),s.delete(r)})}else{let r=()=>t.moduleRef.destroy(),s=t.platformInjector.get($9);s.add(r),t.moduleRef.onDestroy(()=>{HB(t.allPlatformModules,t.moduleRef),o.unsubscribe(),s.delete(r)})}return T$e(i,e,()=>{let r=n.get(IC),s=r.add(),d=n.get(Xie);return d.runInitializers(),d.donePromise.then(()=>{let m=n.get(cp,uV);if(pxe(m||uV),!n.get(x$e,!0))return mV(t)?n.get(Rp):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(mV(t)){let w=n.get(Rp);return t.rootComponent!==void 0&&w.bootstrap(t.rootComponent),w}else return s1e?.(t.moduleRef,t.allPlatformModules),t.moduleRef}).finally(()=>void r.remove(s))})})}var s1e;function Zxe(){s1e=S$e}function S$e(t,n){let e=t.injector.get(Rp);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(i=>e.bootstrap(i));else if(t.instance.ngDoBootstrap)t.instance.ngDoBootstrap(e);else throw new mn(-403,!1);n.push(t)}function T$e(t,n,e){try{let i=e();return J1(i)?i.catch(o=>{throw n.runOutsideAngular(()=>t(o)),o}):i}catch(i){throw n.runOutsideAngular(()=>t(i)),i}}var a1e=(()=>{class t{_injector;_modules=[];_destroyListeners=[];_destroyed=!1;constructor(e){this._injector=e}bootstrapModuleFactory(e,i){let o=i?.scheduleInRootZone,r=()=>axe(i?.ngZone,mt(be({},cne({eventCoalescing:i?.ngZoneEventCoalescing,runCoalescing:i?.ngZoneRunCoalescing})),{scheduleInRootZone:o})),s=i?.ignoreChangesOutsideZone,d=[Uxe({ngZoneFactory:r,ignoreChangesOutsideZone:s}),{provide:K0,useExisting:Hxe},vve],m=JCe(e.moduleType,this.injector,d);return Zxe(),w$e({moduleRef:m,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(e,i=[]){let o=Jie({},i);return Zxe(),C$e(this.injector,o,e).then(r=>this.bootstrapModuleFactory(r,o))}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new mn(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());let e=this._injector.get($9,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static \u0275fac=function(i){return new(i||t)(di(Oo))};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})(),xne=null;function I$e(t){if(Sne())throw new mn(400,!1);cxe(),xne=t;let n=t.get(a1e);return A$e(t),n}function wne(t,n,e=[]){let i=`Platform: ${n}`,o=new fi(i);return(r=[])=>{let s=Sne();if(!s){let d=[...e,...r,{provide:o,useValue:!0}];s=t?.(d)??I$e(E$e(d,i))}return D$e(o)}}function E$e(t=[],n){return Oo.create({name:n,providers:[{provide:MB,useValue:"platform"},{provide:$9,useValue:new Set([()=>xne=null])},...t]})}function D$e(t){let n=Sne();if(!n)throw new mn(401,!1);return n}function Sne(){return xne?.get(a1e)??null}function A$e(t){let n=t.get(b9,null);dh(t,()=>{n?.forEach(e=>e())})}function l1e(){return!1}var Gi=(()=>{class t{static __NG_ELEMENT_ID__=k$e}return t})();function k$e(t){return M$e(lp(),Tr(),(t&16)===16)}function M$e(t,n,e){if(G1(t)&&!e){let i=Q0(t.index,n);return new XT(i,i)}else if(t.type&175){let i=n[Pm];return new XT(i,n)}return null}var hne=class{constructor(){}supports(n){return Vie(n)}create(n){return new mne(n)}},O$e=(t,n)=>n,mne=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(n){this._trackByFn=n||O$e}forEachItem(n){let e;for(e=this._itHead;e!==null;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,o=0,r=null;for(;e||i;){let s=!i||e&&e.currentIndex{s=this._trackByFn(o,d),e===null||!Object.is(e.trackById,s)?(e=this._mismatch(e,d,s,o),i=!0):(i&&(e=this._verifyReinsertion(e,d,s,o)),Object.is(e.item,d)||this._addIdentityChange(e,d)),e=e._next,o++}),this.length=o;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;n!==null;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;n!==null;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;n!==null;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,o){let r;return n===null?r=this._itTail:(r=n._prev,this._remove(n)),n=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null),n!==null?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,r,o)):(n=this._linkedRecords===null?null:this._linkedRecords.get(i,o),n!==null?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,r,o)):n=this._addAfter(new fne(e,i),r,o)),n}_verifyReinsertion(n,e,i,o){let r=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null);return r!==null?n=this._reinsertAfter(r,n._prev,o):n.currentIndex!=o&&(n.currentIndex=o,this._addToMoves(n,o)),n}_truncate(n){for(;n!==null;){let e=n._next;this._addToRemovals(this._unlink(n)),n=e}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(n);let o=n._prevRemoved,r=n._nextRemoved;return o===null?this._removalsHead=r:o._nextRemoved=r,r===null?this._removalsTail=o:r._prevRemoved=o,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail===null?this._additionsTail=this._additionsHead=n:this._additionsTail=this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){let o=e===null?this._itHead:e._next;return n._next=o,n._prev=e,o===null?this._itTail=n:o._prev=n,e===null?this._itHead=n:e._next=n,this._linkedRecords===null&&(this._linkedRecords=new q9),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){this._linkedRecords!==null&&this._linkedRecords.remove(n);let e=n._prev,i=n._next;return e===null?this._itHead=i:e._next=i,i===null?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=n:this._movesTail=this._movesTail._nextMoved=n),n}_addToRemovals(n){return this._unlinkedRecords===null&&(this._unlinkedRecords=new q9),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=n:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=n,n}},fne=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(n,e){this.item=n,this.trackById=e}},gne=class{_head=null;_tail=null;add(n){this._head===null?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;i!==null;i=i._nextDup)if((e===null||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){let e=n._prevDup,i=n._nextDup;return e===null?this._head=i:e._nextDup=i,i===null?this._tail=e:i._prevDup=e,this._head===null}},q9=class{map=new Map;put(n){let e=n.trackById,i=this.map.get(e);i||(i=new gne,this.map.set(e,i)),i.add(n)}get(n,e){let i=n,o=this.map.get(i);return o?o.get(n,e):null}remove(n){let e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Xxe(t,n,e){let i=t.previousIndex;if(i===null)return i;let o=0;return e&&i{if(e&&e.key===o)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{let r=this._getOrCreateRecordForKey(o,i);e=this._insertBeforeOrAppend(e,r)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;i!==null;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){let i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){let o=this._records.get(n);this._maybeAddToChanges(o,e);let r=o._prev,s=o._next;return r&&(r._next=s),s&&(s._prev=r),o._next=null,o._prev=null,o}let i=new vne(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;n!==null;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;n!==null;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;n!=null;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){this._additionsHead===null?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){this._changesHead===null?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}},vne=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(n){this.key=n}};function Jxe(){return new Y9([new hne])}var Y9=(()=>{class t{factories;static \u0275prov=lt({token:t,providedIn:"root",factory:Jxe});constructor(e){this.factories=e}static create(e,i){if(i!=null){let o=i.factories.slice();e=e.concat(o)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let i=re(t,{optional:!0,skipSelf:!0});return t.create(e,i||Jxe())}}}find(e){let i=this.factories.find(o=>o.supports(e));if(i!=null)return i;throw new mn(901,!1)}}return t})();function e1e(){return new Tne([new _ne])}var Tne=(()=>{class t{static \u0275prov=lt({token:t,providedIn:"root",factory:e1e});factories;constructor(e){this.factories=e}static create(e,i){if(i){let o=i.factories.slice();e=e.concat(o)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let i=re(t,{optional:!0,skipSelf:!0});return t.create(e,i||e1e())}}}find(e){let i=this.factories.find(o=>o.supports(e));if(i)return i;throw new mn(901,!1)}}return t})();var c1e=wne(null,"core",[]),d1e=(()=>{class t{constructor(e){}static \u0275fac=function(i){return new(i||t)(di(Rp))};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();function je(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function ln(t,n=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):n}var pne=Symbol("NOT_SET"),u1e=new Set,R$e=mt(be({},gB),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:pne,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(VT(v),v.value),v.signal[op]=v,v.registerCleanupFn=w=>(v.cleanup??=new Set).add(w),this.nodes[d]=v,this.hooks[d]=w=>v.phaseFn(w)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let n of this.nodes)if(n)try{for(let e of n.cleanup??u1e)e()}finally{UT(n)}}};function p1e(t,n){let e=n?.injector??re(Oo),i=e.get(K0),o=e.get(N9),r=e.get(iI,null,{optional:!0});o.impl??=e.get(Yie);let s=t;typeof s=="function"&&(s={mixedReadWrite:t});let d=e.get(DA,null,{optional:!0}),m=new bne(o.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],d?.view,i,e,r?.snapshot(null));return o.impl.register(m),m}function TR(t,n){let e=bC(t),i=n.elementInjector||$O();return new JT(e).create(i,n.projectableNodes,n.hostElement,n.environmentInjector,n.directives,n.bindings)}function Q9(t){let n=bC(t);if(!n)return null;let e=new JT(n);return{get selector(){return e.selector},get type(){return e.componentType},get inputs(){return e.inputs},get outputs(){return e.outputs},get ngContentSelectors(){return e.ngContentSelectors},get isStandalone(){return n.standalone},get isSignal(){return n.signals}}}var f1e=null;function Q_(){return f1e}function Ine(t){f1e??=t}var fV=class{},gV=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:()=>re(g1e),providedIn:"platform"})}return t})(),Ene=new fi(""),g1e=(()=>{class t extends gV{_location;_history;_doc=re(Ao);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Q_().getBaseHref(this._doc)}onPopState(e){let i=Q_().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){let i=Q_().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,o){this._history.pushState(e,i,o)}replaceState(e,i,o){this._history.replaceState(e,i,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function Z9(t,n){return t?n?t.endsWith("/")?n.startsWith("/")?t+n.slice(1):t+n:n.startsWith("/")?t+n:`${t}/${n}`:t:n}function h1e(t){let n=t.search(/#|\?|$/);return t[n-1]==="/"?t.slice(0,n-1)+t.slice(n):t}function Tv(t){return t&&t[0]!=="?"?`?${t}`:t}var Iv=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:()=>re(J9),providedIn:"root"})}return t})(),X9=new fi(""),J9=(()=>{class t extends Iv{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,i){super(),this._platformLocation=e,this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??re(Ao).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Z9(this._baseHref,e)}path(e=!1){let i=this._platformLocation.pathname+Tv(this._platformLocation.search),o=this._platformLocation.hash;return o&&e?`${i}${o}`:i}pushState(e,i,o,r){let s=this.prepareExternalUrl(o+Tv(r));this._platformLocation.pushState(e,i,s)}replaceState(e,i,o,r){let s=this.prepareExternalUrl(o+Tv(r));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(i){return new(i||t)(di(gV),di(X9,8))};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Vm=(()=>{class t{_subject=new hi;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let i=this._locationStrategy.getBaseHref();this._basePath=L$e(h1e(m1e(i))),this._locationStrategy.onPopState(o=>{this._subject.next({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Tv(i))}normalize(e){return t.stripTrailingSlash(P$e(this._basePath,m1e(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",o=null){this._locationStrategy.pushState(o,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Tv(i)),o)}replaceState(e,i="",o=null){this._locationStrategy.replaceState(o,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Tv(i)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{let i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(o=>o(e,i))}subscribe(e,i,o){return this._subject.subscribe({next:e,error:i??void 0,complete:o??void 0})}static normalizeQueryParams=Tv;static joinWithSlash=Z9;static stripTrailingSlash=h1e;static \u0275fac=function(i){return new(i||t)(di(Iv))};static \u0275prov=lt({token:t,factory:()=>F$e(),providedIn:"root"})}return t})();function F$e(){return new Vm(di(Iv))}function P$e(t,n){if(!t||!n.startsWith(t))return n;let e=n.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:n}function m1e(t){return t.replace(/\/index.html$/,"")}function L$e(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var Lne=(()=>{class t extends Iv{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,i){super(),this._platformLocation=e,i!=null&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash??"#";return i.length>0?i.substring(1):i}prepareExternalUrl(e){let i=Z9(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,o,r){let s=this.prepareExternalUrl(o+Tv(r))||this._platformLocation.pathname;this._platformLocation.pushState(e,i,s)}replaceState(e,i,o,r){let s=this.prepareExternalUrl(o+Tv(r))||this._platformLocation.pathname;this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(i){return new(i||t)(di(gV),di(X9,8))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),S1e={ADP:[void 0,void 0,0],AFN:[void 0,"\u060B",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058F",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20BC"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09F3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xA5","\xA5"],COP:[void 0,"$",2],CRC:[void 0,"\u20A1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010D",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xA3"],ESP:[void 0,"\u20A7",0],EUR:["\u20AC"],FJD:[void 0,"$"],FKP:[void 0,"\xA3"],GBP:["\xA3"],GEL:[void 0,"\u20BE"],GHS:[void 0,"GH\u20B5"],GIP:[void 0,"\xA3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20AA"],INR:["\u20B9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xA5",void 0,0],KHR:[void 0,"\u17DB"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20A9",0],KRW:["\u20A9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20B8"],LAK:[void 0,"\u20AD",0],LBP:[void 0,"L\xA3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20AE",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20A6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20B1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20B2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20BD"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xA3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xA3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xA3",0],THB:[void 0,"\u0E3F"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20BA"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20B4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20AB",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202FCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xA4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]},CV=(function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t})(CV||{}),LA=(function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t})(LA||{}),zm=(function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t})(zm||{}),Mc=(function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t})(Mc||{}),Gg=(function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t})(Gg||{}),Ru={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function T1e(t){return Nm(t)[nd.LocaleId]}function I1e(t,n,e){let i=Nm(t),o=[i[nd.DayPeriodsFormat],i[nd.DayPeriodsStandalone]],r=J0(o,n);return J0(r,e)}function E1e(t,n,e){let i=Nm(t),o=[i[nd.DaysFormat],i[nd.DaysStandalone]],r=J0(o,n);return J0(r,e)}function D1e(t,n,e){let i=Nm(t),o=[i[nd.MonthsFormat],i[nd.MonthsStandalone]],r=J0(o,n);return J0(r,e)}function A1e(t,n){let i=Nm(t)[nd.Eras];return J0(i,n)}function _V(t,n){let e=Nm(t);return J0(e[nd.DateFormat],n)}function yV(t,n){let e=Nm(t);return J0(e[nd.TimeFormat],n)}function vV(t,n){let i=Nm(t)[nd.DateTimeFormat];return J0(i,n)}function Z_(t,n){let e=Nm(t),i=e[nd.NumberSymbols][n];if(typeof i>"u"){if(n===Ru.CurrencyDecimal)return e[nd.NumberSymbols][Ru.Decimal];if(n===Ru.CurrencyGroup)return e[nd.NumberSymbols][Ru.Group]}return i}function cj(t,n){return Nm(t)[nd.NumberFormats][n]}function N$e(t){return Nm(t)[nd.Currencies]}var k1e=ine;function M1e(t){if(!t[nd.ExtraData])throw new mn(2303,!1)}function O1e(t){let n=Nm(t);return M1e(n),(n[nd.ExtraData][2]||[]).map(i=>typeof i=="string"?Dne(i):[Dne(i[0]),Dne(i[1])])}function R1e(t,n,e){let i=Nm(t);M1e(i);let o=[i[nd.ExtraData][0],i[nd.ExtraData][1]],r=J0(o,n)||[];return J0(r,e)||[]}function J0(t,n){for(let e=n;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new mn(2304,!1)}function Dne(t){let[n,e]=t.split(":");return{hours:+n,minutes:+e}}function F1e(t,n,e="en"){let i=N$e(e)[t]||S1e[t]||[],o=i[1];return n==="narrow"&&typeof o=="string"?o:i[0]||t}var B$e=2;function P1e(t){let n,e=S1e[t];return e&&(n=e[2]),typeof n=="number"?n:B$e}var V$e=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ej={},z$e=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function L1e(t,n,e,i){let o=Y$e(t);n=tw(e,n)||n;let s=[],d;for(;n;)if(d=z$e.exec(n),d){s=s.concat(d.slice(1));let w=s.pop();if(!w)break;n=w}else{s.push(n);break}let m=o.getTimezoneOffset();i&&(m=B1e(i,m),o=W$e(o,i));let v="";return s.forEach(w=>{let O=q$e(w);v+=O?O(o,e,m):w==="''"?"'":w.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),v}function rj(t,n,e){let i=new Date(0);return i.setFullYear(t,n,e),i.setHours(0,0,0),i}function tw(t,n){let e=T1e(t);if(ej[e]??={},ej[e][n])return ej[e][n];let i="";switch(n){case"shortDate":i=_V(t,Gg.Short);break;case"mediumDate":i=_V(t,Gg.Medium);break;case"longDate":i=_V(t,Gg.Long);break;case"fullDate":i=_V(t,Gg.Full);break;case"shortTime":i=yV(t,Gg.Short);break;case"mediumTime":i=yV(t,Gg.Medium);break;case"longTime":i=yV(t,Gg.Long);break;case"fullTime":i=yV(t,Gg.Full);break;case"short":let o=tw(t,"shortTime"),r=tw(t,"shortDate");i=tj(vV(t,Gg.Short),[o,r]);break;case"medium":let s=tw(t,"mediumTime"),d=tw(t,"mediumDate");i=tj(vV(t,Gg.Medium),[s,d]);break;case"long":let m=tw(t,"longTime"),v=tw(t,"longDate");i=tj(vV(t,Gg.Long),[m,v]);break;case"full":let w=tw(t,"fullTime"),O=tw(t,"fullDate");i=tj(vV(t,Gg.Full),[w,O]);break}return i&&(ej[e][n]=i),i}function tj(t,n){return n&&(t=t.replace(/\{([^}]+)}/g,function(e,i){return n!=null&&i in n?n[i]:e})),t}function Ev(t,n,e="-",i,o){let r="";(t<0||o&&t<=0)&&(o?t=-t+1:(t=-t,r=e));let s=String(t);for(;s.length0||d>-e)&&(d+=e),t===3)d===0&&e===-12&&(d=12);else if(t===6)return U$e(d,n);let m=Z_(s,Ru.MinusSign);return Ev(d,n,m,i,o)}}function H$e(t,n){switch(t){case 0:return n.getFullYear();case 1:return n.getMonth();case 2:return n.getDate();case 3:return n.getHours();case 4:return n.getMinutes();case 5:return n.getSeconds();case 6:return n.getMilliseconds();case 7:return n.getDay();default:throw new mn(2301,!1)}}function rd(t,n,e=zm.Format,i=!1){return function(o,r){return j$e(o,r,t,n,e,i)}}function j$e(t,n,e,i,o,r){switch(e){case 2:return D1e(n,o,i)[t.getMonth()];case 1:return E1e(n,o,i)[t.getDay()];case 0:let s=t.getHours(),d=t.getMinutes();if(r){let v=O1e(n),w=R1e(n,o,i),O=v.findIndex(N=>{if(Array.isArray(N)){let[V,$]=N,q=s>=V.hours&&d>=V.minutes,W=s<$.hours||s===$.hours&&d<$.minutes;if(V.hours<$.hours){if(q&&W)return!0}else if(q||W)return!0}else if(N.hours===s&&N.minutes===d)return!0;return!1});if(O!==-1)return w[O]}return I1e(n,o,i)[s<12?0:1];case 3:return A1e(n,i)[t.getFullYear()<=0?0:1];default:let m=e;throw new mn(2302,!1)}}function ij(t){return function(n,e,i){let o=-1*i,r=Z_(e,Ru.MinusSign),s=o>0?Math.floor(o/60):Math.ceil(o/60);switch(t){case 0:return(o>=0?"+":"")+Ev(s,2,r)+Ev(Math.abs(o%60),2,r);case 1:return"GMT"+(o>=0?"+":"")+Ev(s,1,r);case 2:return"GMT"+(o>=0?"+":"")+Ev(s,2,r)+":"+Ev(Math.abs(o%60),2,r);case 3:return i===0?"Z":(o>=0?"+":"")+Ev(s,2,r)+":"+Ev(Math.abs(o%60),2,r);default:throw new mn(2310,!1)}}}var G$e=0,oj=4;function $$e(t){let n=rj(t,G$e,1).getDay();return rj(t,0,1+(n<=oj?oj:oj+7)-n)}function N1e(t){let n=t.getDay(),e=n===0?-3:oj-n;return rj(t.getFullYear(),t.getMonth(),t.getDate()+e)}function Ane(t,n=!1){return function(e,i){let o;if(n){let r=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();o=1+Math.floor((s+r)/7)}else{let r=N1e(e),s=$$e(r.getFullYear()),d=r.getTime()-s.getTime();o=1+Math.round(d/6048e5)}return Ev(o,t,Z_(i,Ru.MinusSign))}}function nj(t,n=!1){return function(e,i){let r=N1e(e).getFullYear();return Ev(r,t,Z_(i,Ru.MinusSign),n)}}var kne={};function q$e(t){if(kne[t])return kne[t];let n;switch(t){case"G":case"GG":case"GGG":n=rd(3,Mc.Abbreviated);break;case"GGGG":n=rd(3,Mc.Wide);break;case"GGGGG":n=rd(3,Mc.Narrow);break;case"y":n=dp(0,1,0,!1,!0);break;case"yy":n=dp(0,2,0,!0,!0);break;case"yyy":n=dp(0,3,0,!1,!0);break;case"yyyy":n=dp(0,4,0,!1,!0);break;case"Y":n=nj(1);break;case"YY":n=nj(2,!0);break;case"YYY":n=nj(3);break;case"YYYY":n=nj(4);break;case"M":case"L":n=dp(1,1,1);break;case"MM":case"LL":n=dp(1,2,1);break;case"MMM":n=rd(2,Mc.Abbreviated);break;case"MMMM":n=rd(2,Mc.Wide);break;case"MMMMM":n=rd(2,Mc.Narrow);break;case"LLL":n=rd(2,Mc.Abbreviated,zm.Standalone);break;case"LLLL":n=rd(2,Mc.Wide,zm.Standalone);break;case"LLLLL":n=rd(2,Mc.Narrow,zm.Standalone);break;case"w":n=Ane(1);break;case"ww":n=Ane(2);break;case"W":n=Ane(1,!0);break;case"d":n=dp(2,1);break;case"dd":n=dp(2,2);break;case"c":case"cc":n=dp(7,1);break;case"ccc":n=rd(1,Mc.Abbreviated,zm.Standalone);break;case"cccc":n=rd(1,Mc.Wide,zm.Standalone);break;case"ccccc":n=rd(1,Mc.Narrow,zm.Standalone);break;case"cccccc":n=rd(1,Mc.Short,zm.Standalone);break;case"E":case"EE":case"EEE":n=rd(1,Mc.Abbreviated);break;case"EEEE":n=rd(1,Mc.Wide);break;case"EEEEE":n=rd(1,Mc.Narrow);break;case"EEEEEE":n=rd(1,Mc.Short);break;case"a":case"aa":case"aaa":n=rd(0,Mc.Abbreviated);break;case"aaaa":n=rd(0,Mc.Wide);break;case"aaaaa":n=rd(0,Mc.Narrow);break;case"b":case"bb":case"bbb":n=rd(0,Mc.Abbreviated,zm.Standalone,!0);break;case"bbbb":n=rd(0,Mc.Wide,zm.Standalone,!0);break;case"bbbbb":n=rd(0,Mc.Narrow,zm.Standalone,!0);break;case"B":case"BB":case"BBB":n=rd(0,Mc.Abbreviated,zm.Format,!0);break;case"BBBB":n=rd(0,Mc.Wide,zm.Format,!0);break;case"BBBBB":n=rd(0,Mc.Narrow,zm.Format,!0);break;case"h":n=dp(3,1,-12);break;case"hh":n=dp(3,2,-12);break;case"H":n=dp(3,1);break;case"HH":n=dp(3,2);break;case"m":n=dp(4,1);break;case"mm":n=dp(4,2);break;case"s":n=dp(5,1);break;case"ss":n=dp(5,2);break;case"S":n=dp(6,1);break;case"SS":n=dp(6,2);break;case"SSS":n=dp(6,3);break;case"Z":case"ZZ":case"ZZZ":n=ij(0);break;case"ZZZZZ":n=ij(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=ij(1);break;case"OOOO":case"ZZZZ":case"zzzz":n=ij(2);break;default:return null}return kne[t]=n,n}function B1e(t,n){t=t.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?n:e}function K$e(t,n){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+n),t}function W$e(t,n,e){let o=t.getTimezoneOffset(),r=B1e(n,o);return K$e(t,-1*(r-o))}function Y$e(t){if(_1e(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[o,r=1,s=1]=t.split("-").map(d=>+d);return rj(o,r-1,s)}let e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let i;if(i=t.match(V$e))return Q$e(i)}let n=new Date(t);if(!_1e(n))throw new mn(2311,!1);return n}function Q$e(t){let n=new Date(0),e=0,i=0,o=t[8]?n.setUTCFullYear:n.setFullYear,r=t[8]?n.setUTCHours:n.setHours;t[9]&&(e=Number(t[9]+t[10]),i=Number(t[9]+t[11])),o.call(n,Number(t[1]),Number(t[2])-1,Number(t[3]));let s=Number(t[4]||0)-e,d=Number(t[5]||0)-i,m=Number(t[6]||0),v=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return r.call(n,s,d,m,v),n}function _1e(t){return t instanceof Date&&!isNaN(t.valueOf())}var Z$e=/^(\d+)?\.((\d+)(-(\d+))?)?$/,y1e=22,sj=".",bV="0",X$e=";",J$e=",",Mne="#",v1e="\xA4",eqe="%";function Nne(t,n,e,i,o,r,s=!1){let d="",m=!1;if(!isFinite(t))d=Z_(e,Ru.Infinity);else{let v=iqe(t);s&&(v=tqe(v));let w=n.minInt,O=n.minFrac,N=n.maxFrac;if(r){let fe=r.match(Z$e);if(fe===null)throw new mn(2306,!1);let xe=fe[1],Fe=fe[3],Re=fe[5];xe!=null&&(w=One(xe)),Fe!=null&&(O=One(Fe)),Re!=null?N=One(Re):Fe!=null&&O>N&&(N=O)}nqe(v,O,N);let V=v.digits,$=v.integerLen,q=v.exponent,W=[];for(m=V.every(fe=>!fe);$0?W=V.splice($,V.length):(W=V,V=[0]);let te=[];for(V.length>=n.lgSize&&te.unshift(V.splice(-n.lgSize,V.length).join(""));V.length>n.gSize;)te.unshift(V.splice(-n.gSize,V.length).join(""));V.length&&te.unshift(V.join("")),d=te.join(Z_(e,i)),W.length&&(d+=Z_(e,o)+W.join("")),q&&(d+=Z_(e,Ru.Exponential)+"+"+q)}return t<0&&!m?d=n.negPre+d+n.negSuf:d=n.posPre+d+n.posSuf,d}function V1e(t,n,e,i,o){let r=cj(n,CV.Currency),s=Bne(r,Z_(n,Ru.MinusSign));return s.minFrac=P1e(i),s.maxFrac=s.minFrac,Nne(t,s,n,Ru.CurrencyGroup,Ru.CurrencyDecimal,o).replace(v1e,e).replace(v1e,"").trim()}function z1e(t,n,e){let i=cj(n,CV.Percent),o=Bne(i,Z_(n,Ru.MinusSign));return Nne(t,o,n,Ru.Group,Ru.Decimal,e,!0).replace(new RegExp(eqe,"g"),Z_(n,Ru.PercentSign))}function U1e(t,n,e){let i=cj(n,CV.Decimal),o=Bne(i,Z_(n,Ru.MinusSign));return Nne(t,o,n,Ru.Group,Ru.Decimal,e)}function Bne(t,n="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(X$e),o=i[0],r=i[1],s=o.indexOf(sj)!==-1?o.split(sj):[o.substring(0,o.lastIndexOf(bV)+1),o.substring(o.lastIndexOf(bV)+1)],d=s[0],m=s[1]||"";e.posPre=d.substring(0,d.indexOf(Mne));for(let w=0;w-1&&(n=n.replace(sj,"")),(r=n.search(/e/i))>0?(o<0&&(o=r),o+=+n.slice(r+1),n=n.substring(0,r)):o<0&&(o=n.length),r=0;n.charAt(r)===bV;r++);if(r===(d=n.length))i=[0],o=1;else{for(d--;n.charAt(d)===bV;)d--;for(o-=r,i=[],s=0;r<=d;r++,s++)i[s]=Number(n.charAt(r))}return o>y1e&&(i=i.splice(0,y1e-1),e=o-1,o=1),{digits:i,exponent:e,integerLen:o}}function nqe(t,n,e){if(n>e)throw new mn(2307,!1);let i=t.digits,o=i.length-t.integerLen,r=Math.min(Math.max(n,o),e),s=r+t.integerLen,d=i[s];if(s>0){i.splice(Math.max(t.integerLen,s));for(let O=s;O=5)if(s-1<0){for(let O=0;O>s;O--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[s-1]++;for(;o=v?$.pop():m=!1),N>=10?1:0},0);w&&(i.unshift(w),t.integerLen++)}function One(t){let n=parseInt(t);if(isNaN(n))throw new mn(2305,!1);return n}var Vne=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:function(i){let o=null;return i?o=new i:o=(r=>new H1e(r))(di(cp)),o},providedIn:"root"})}return t})();function oqe(t,n,e,i){let o=`=${t}`;if(n.indexOf(o)>-1||(o=e.getPluralCategory(t,i),n.indexOf(o)>-1))return o;if(n.indexOf("other")>-1)return"other";throw new mn(2308,!1)}var H1e=(()=>{class t extends Vne{locale;constructor(e){super(),this.locale=e}getPluralCategory(e,i){switch(k1e(i||this.locale)(e)){case LA.Zero:return"zero";case LA.One:return"one";case LA.Two:return"two";case LA.Few:return"few";case LA.Many:return"many";default:return"other"}}static \u0275fac=function(i){return new(i||t)(di(cp))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),Rne=/\s+/,b1e=[],Ns=(()=>{class t{_ngEl;_renderer;initialClasses=b1e;rawClass;stateMap=new Map;constructor(e,i){this._ngEl=e,this._renderer=i}set klass(e){this.initialClasses=e!=null?e.trim().split(Rne):b1e}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(Rne):e}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let i of e)this._updateState(i,!0);else if(e!=null)for(let i of Object.keys(e))this._updateState(i,!!e[i]);this._applyStateDiff()}_updateState(e,i){let o=this.stateMap.get(e);o!==void 0?(o.enabled!==i&&(o.changed=!0,o.enabled=i),o.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let i=e[0],o=e[1];o.changed?(this._toggleClass(i,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),o.touched=!1}}_toggleClass(e,i){e=e.trim(),e.length>0&&e.split(Rne).forEach(o=>{i?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}static \u0275fac=function(i){return new(i||t)(_e(Bn),_e(Ps))};static \u0275dir=rn({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})(),zne=(()=>{class t{_viewContainerRef;ngComponentOutlet=null;ngComponentOutletInputs;ngComponentOutletInjector;ngComponentOutletEnvironmentInjector;ngComponentOutletContent;ngComponentOutletNgModule;ngComponentOutletNgModuleFactory;_componentRef;_moduleRef;_inputsUsed=new Map;get componentInstance(){return this._componentRef?.instance??null}constructor(e){this._viewContainerRef=e}_needToReCreateNgModuleInstance(e){return e.ngComponentOutletNgModule!==void 0||e.ngComponentOutletNgModuleFactory!==void 0}_needToReCreateComponentInstance(e){return e.ngComponentOutlet!==void 0||e.ngComponentOutletContent!==void 0||e.ngComponentOutletInjector!==void 0||e.ngComponentOutletEnvironmentInjector!==void 0||this._needToReCreateNgModuleInstance(e)}ngOnChanges(e){if(this._needToReCreateComponentInstance(e)&&(this._viewContainerRef.clear(),this._inputsUsed.clear(),this._componentRef=void 0,this.ngComponentOutlet)){let i=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;this._needToReCreateNgModuleInstance(e)&&(this._moduleRef?.destroy(),this.ngComponentOutletNgModule?this._moduleRef=$ie(this.ngComponentOutletNgModule,C1e(i)):this.ngComponentOutletNgModuleFactory?this._moduleRef=this.ngComponentOutletNgModuleFactory.create(C1e(i)):this._moduleRef=void 0),this._componentRef=this._viewContainerRef.createComponent(this.ngComponentOutlet,{injector:i,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent,environmentInjector:this.ngComponentOutletEnvironmentInjector})}}ngDoCheck(){if(this._componentRef){if(this.ngComponentOutletInputs)for(let e of Object.keys(this.ngComponentOutletInputs))this._inputsUsed.set(e,!0);this._applyInputStateDiff(this._componentRef)}}ngOnDestroy(){this._moduleRef?.destroy()}_applyInputStateDiff(e){for(let[i,o]of this._inputsUsed)o?(e.setInput(i,this.ngComponentOutletInputs[i]),this._inputsUsed.set(i,!1)):(e.setInput(i,void 0),this._inputsUsed.delete(i))}static \u0275fac=function(i){return new(i||t)(_e(nc))};static \u0275dir=rn({type:t,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInputs:"ngComponentOutletInputs",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletEnvironmentInjector:"ngComponentOutletEnvironmentInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},exportAs:["ngComponentOutlet"],features:[Ot]})}return t})();function C1e(t){return t.get(xv).injector}var aj=class{$implicit;ngForOf;index;count;constructor(n,e,i,o){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=o}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Gc=(()=>{class t{_viewContainer;_template;_differs;set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(e,i,o){this._viewContainer=e,this._template=i,this._differs=o}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let i=this._viewContainer;e.forEachOperation((o,r,s)=>{if(o.previousIndex==null)i.createEmbeddedView(this._template,new aj(o.item,this._ngForOf,-1,-1),s===null?void 0:s);else if(s==null)i.remove(r===null?void 0:r);else if(r!==null){let d=i.get(r);i.move(d,s),x1e(d,o)}});for(let o=0,r=i.length;o{let r=i.get(o.currentIndex);x1e(r,o)})}static ngTemplateContextGuard(e,i){return!0}static \u0275fac=function(i){return new(i||t)(_e(nc),_e(jc),_e(Y9))};static \u0275dir=rn({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return t})();function x1e(t,n){t.context.$implicit=n.item}var Fr=(()=>{class t{_viewContainer;_context=new lj;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(e,i){this._viewContainer=e,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){w1e(e,!1),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){w1e(e,!1),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(e,i){return!0}static \u0275fac=function(i){return new(i||t)(_e(nc),_e(jc))};static \u0275dir=rn({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return t})(),lj=class{$implicit=null;ngIf=null};function w1e(t,n){if(t&&!t.createEmbeddedView)throw new mn(2020,!1)}var vs=(()=>{class t{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(e,i,o){this._ngEl=e,this._differs=i,this._renderer=o}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){let[o,r]=e.split("."),s=o.indexOf("-")===-1?void 0:Cv.DashCase;i!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,r?`${i}${r}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,o,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}static \u0275fac=function(i){return new(i||t)(_e(Bn),_e(Tne),_e(Ps))};static \u0275dir=rn({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})(),Lo=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,i,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,o):!1,get:(e,i,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,o)}})}static \u0275fac=function(i){return new(i||t)(_e(nc))};static \u0275dir=rn({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Ot]})}return t})();function IR(t,n){return new mn(2100,!1)}var Fne=class{createSubscription(n,e,i){return Ad(()=>n.subscribe({next:e,error:i}))}dispose(n){Ad(()=>n.unsubscribe())}},Pne=class{createSubscription(n,e,i){return n.then(o=>e?.(o),o=>i?.(o)),{unsubscribe:()=>{e=null,i=null}}}dispose(n){n.unsubscribe()}},rqe=new Pne,sqe=new Fne,qd=(()=>{class t{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=re(Gf);constructor(e){this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i),i=>this.applicationErrorHandler(i))}_selectStrategy(e){if(J1(e))return rqe;if(z9(e))return sqe;throw IR(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(i){return new(i||t)(_e(Gi,16))};static \u0275pipe=Dd({name:"async",type:t,pure:!1})}return t})();var aqe="mediumDate",j1e=new fi(""),G1e=new fi(""),qf=(()=>{class t{locale;defaultTimezone;defaultOptions;constructor(e,i,o){this.locale=e,this.defaultTimezone=i,this.defaultOptions=o}transform(e,i,o,r){if(e==null||e===""||e!==e)return null;try{let s=i??this.defaultOptions?.dateFormat??aqe,d=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return L1e(e,s,r||this.locale,d)}catch(s){throw IR(t,s.message)}}static \u0275fac=function(i){return new(i||t)(_e(cp,16),_e(j1e,24),_e(G1e,24))};static \u0275pipe=Dd({name:"date",type:t,pure:!0})}return t})(),lqe=/#/g,NA=(()=>{class t{_localization;constructor(e){this._localization=e}transform(e,i,o){if(e==null)return"";if(typeof i!="object"||i===null)throw IR(t,i);let r=oqe(e,Object.keys(i),this._localization,o);return i[r].replace(lqe,e.toString())}static \u0275fac=function(i){return new(i||t)(_e(Vne,16))};static \u0275pipe=Dd({name:"i18nPlural",type:t,pure:!0})}return t})();var Ta=(()=>{class t{_locale;constructor(e){this._locale=e}transform(e,i,o){if(!Hne(e))return null;o||=this._locale;try{let r=jne(e);return U1e(r,o,i)}catch(r){throw IR(t,r.message)}}static \u0275fac=function(i){return new(i||t)(_e(cp,16))};static \u0275pipe=Dd({name:"number",type:t,pure:!0})}return t})(),iw=(()=>{class t{_locale;constructor(e){this._locale=e}transform(e,i,o){if(!Hne(e))return null;o||=this._locale;try{let r=jne(e);return z1e(r,o,i)}catch(r){throw IR(t,r.message)}}static \u0275fac=function(i){return new(i||t)(_e(cp,16))};static \u0275pipe=Dd({name:"percent",type:t,pure:!0})}return t})(),Une=(()=>{class t{_locale;_defaultCurrencyCode;constructor(e,i="USD"){this._locale=e,this._defaultCurrencyCode=i}transform(e,i=this._defaultCurrencyCode,o="symbol",r,s){if(!Hne(e))return null;s||=this._locale,typeof o=="boolean"&&(o=o?"symbol":"code");let d=i||this._defaultCurrencyCode;o!=="code"&&(o==="symbol"||o==="symbol-narrow"?d=F1e(d,o==="symbol"?"wide":"narrow",s):d=o);try{let m=jne(e);return V1e(m,s,d,i,r)}catch(m){throw IR(t,m.message)}}static \u0275fac=function(i){return new(i||t)(_e(cp,16),_e(dne,16))};static \u0275pipe=Dd({name:"currency",type:t,pure:!0})}return t})();function Hne(t){return!(t==null||t===""||t!==t)}function jne(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new mn(2309,!1);return t}var On=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();function xV(t,n){n=encodeURIComponent(n);for(let e of t.split(";")){let i=e.indexOf("="),[o,r]=i==-1?[e,""]:[e.slice(0,i),e.slice(i+1)];if(o.trim()===n)return decodeURIComponent(r)}return null}var BA=class{};function $1e(t,n,e){return tne(t,n,e)}var $ne="browser",uqe="server";function ps(t){return t===$ne}function q1e(t){return t===uqe}var K1e=(()=>{class t{static \u0275prov=lt({token:t,providedIn:"root",factory:()=>new Gne(re(Ao),window)})}return t})(),Gne=class{document;window;offset=()=>[0,0];constructor(n,e){this.document=n,this.window=e}setOffset(n){Array.isArray(n)?this.offset=()=>n:this.offset=n}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(n,e){this.window.scrollTo(mt(be({},e),{left:n[0],top:n[1]}))}scrollToAnchor(n,e){let i=pqe(this.document,n);i&&(this.scrollToElement(i,e),i.focus())}setHistoryScrollRestoration(n){try{this.window.history.scrollRestoration=n}catch{console.warn(vC(2400,!1))}}scrollToElement(n,e){let i=n.getBoundingClientRect(),o=i.left+this.window.pageXOffset,r=i.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(mt(be({},e),{left:o-s[0],top:r-s[1]}))}};function pqe(t,n){let e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),o=i.currentNode;for(;o;){let r=o.shadowRoot;if(r){let s=r.getElementById(n)||r.querySelector(`[name="${n}"]`);if(s)return s}o=i.nextNode()}}return null}var uj=new fi(""),Qne=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,i){this._zone=i,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,o,r){return this._findPluginFor(i).addEventListener(e,i,o,r)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;if(i=this._plugins.find(r=>r.supports(e)),!i)throw new mn(5101,!1);return this._eventNameToPlugin.set(e,i),i}static \u0275fac=function(i){return new(i||t)(di(uj),di(_n))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),wV=class{_doc;constructor(n){this._doc=n}manager},qne="ng-app-id";function W1e(t){for(let n of t)n.remove()}function Y1e(t,n){let e=n.createElement("style");return e.textContent=t,e}function hqe(t,n,e,i){let o=t.head?.querySelectorAll(`style[${qne}="${n}"],link[${qne}="${n}"]`);if(o)for(let r of o)r.removeAttribute(qne),r instanceof HTMLLinkElement?i.set(r.href.slice(r.href.lastIndexOf("/")+1),{usage:0,elements:[r]}):r.textContent&&e.set(r.textContent,{usage:0,elements:[r]})}function Wne(t,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var Zne=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,i,o,r={}){this.doc=e,this.appId=i,this.nonce=o,hqe(e,i,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,i){for(let o of e)this.addUsage(o,this.inline,Y1e);i?.forEach(o=>this.addUsage(o,this.external,Wne))}removeStyles(e,i){for(let o of e)this.removeUsage(o,this.inline);i?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,i,o){let r=i.get(e);r?r.usage++:i.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,o(e,this.doc)))})}removeUsage(e,i){let o=i.get(e);o&&(o.usage--,o.usage<=0&&(W1e(o.elements),i.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])W1e(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[i,{elements:o}]of this.inline)o.push(this.addElement(e,Y1e(i,this.doc)));for(let[i,{elements:o}]of this.external)o.push(this.addElement(e,Wne(i,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,i){return this.nonce&&i.setAttribute("nonce",this.nonce),e.appendChild(i)}static \u0275fac=function(i){return new(i||t)(di(Ao),di(eI),di(gR,8),di(Zh))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),Kne={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Xne=/%COMP%/g;var Z1e="%COMP%",mqe=`_nghost-${Z1e}`,fqe=`_ngcontent-${Z1e}`,gqe=!0,_qe=new fi("",{providedIn:"root",factory:()=>gqe});function yqe(t){return fqe.replace(Xne,t)}function vqe(t){return mqe.replace(Xne,t)}function X1e(t,n){return n.map(e=>e.replace(Xne,t))}var IV=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,i,o,r,s,d,m,v=null,w=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=o,this.removeStylesOnCompDestroy=r,this.doc=s,this.platformId=d,this.ngZone=m,this.nonce=v,this.tracingService=w,this.platformIsServer=!1,this.defaultRenderer=new SV(e,s,m,this.platformIsServer,this.tracingService)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,i);return o instanceof dj?o.applyToHost(e):o instanceof TV&&o.applyStyles(),o}getOrCreateRenderer(e,i){let o=this.rendererByCompId,r=o.get(i.id);if(!r){let s=this.doc,d=this.ngZone,m=this.eventManager,v=this.sharedStylesHost,w=this.removeStylesOnCompDestroy,O=this.platformIsServer,N=this.tracingService;switch(i.encapsulation){case Y1.Emulated:r=new dj(m,v,i,this.appId,w,s,d,O,N);break;case Y1.ShadowDom:return new Yne(m,v,e,i,s,d,this.nonce,O,N);default:r=new TV(m,v,i,w,s,d,O,N);break}o.set(i.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(i){return new(i||t)(di(Qne),di(Zne),di(eI),di(_qe),di(Ao),di(Zh),di(_n),di(gR),di(iI,8))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),SV=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,i,o,r){this.eventManager=n,this.doc=e,this.ngZone=i,this.platformIsServer=o,this.tracingService=r}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(Kne[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(Q1e(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(Q1e(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){e.remove()}selectRootElement(n,e){let i=typeof n=="string"?this.doc.querySelector(n):n;if(!i)throw new mn(-5104,!1);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,o){if(o){e=o+":"+e;let r=Kne[o];r?n.setAttributeNS(r,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){let o=Kne[i];o?n.removeAttributeNS(o,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,o){o&(Cv.DashCase|Cv.Important)?n.style.setProperty(e,i,o&Cv.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&Cv.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n!=null&&(n[e]=i)}setValue(n,e){n.nodeValue=e}listen(n,e,i,o){if(typeof n=="string"&&(n=Q_().getGlobalEventTarget(this.doc,n),!n))throw new mn(5102,!1);let r=this.decoratePreventDefault(i);return this.tracingService?.wrapEventListener&&(r=this.tracingService.wrapEventListener(n,e,r)),this.eventManager.addEventListener(n,e,r,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function Q1e(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var Yne=class extends SV{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,i,o,r,s,d,m,v){super(n,r,s,m,v),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let w=o.styles;w=X1e(o.id,w);for(let N of w){let V=document.createElement("style");d&&V.setAttribute("nonce",d),V.textContent=N,this.shadowRoot.appendChild(V)}let O=o.getExternalStyles?.();if(O)for(let N of O){let V=Wne(N,r);d&&V.setAttribute("nonce",d),this.shadowRoot.appendChild(V)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,i){return super.insertBefore(this.nodeOrShadowRoot(n),e,i)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},TV=class extends SV{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,i,o,r,s,d,m,v){super(n,r,s,d,m),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let w=i.styles;this.styles=v?X1e(v,w):w,this.styleUrls=i.getExternalStyles?.(v)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&E9.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},dj=class extends TV{contentAttr;hostAttr;constructor(n,e,i,o,r,s,d,m,v){let w=o+"-"+i.id;super(n,e,i,r,s,d,m,v,w),this.contentAttr=yqe(w),this.hostAttr=vqe(w)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}};var pj=class t extends fV{supportsDOMEvents=!0;static makeCurrent(){Ine(new t)}onAndCancel(n,e,i,o){return n.addEventListener(e,i,o),()=>{n.removeEventListener(e,i,o)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=bqe();return e==null?null:Cqe(e)}resetBaseElement(){EV=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return xV(document.cookie,n)}},EV=null;function bqe(){return EV=EV||document.head.querySelector("base"),EV?EV.getAttribute("href"):null}function Cqe(t){return new URL(t,document.baseURI).pathname}var hj=class{addToWindow(n){sp.getAngularTestability=(i,o=!0)=>{let r=n.findTestabilityInTree(i,o);if(r==null)throw new mn(5103,!1);return r},sp.getAllAngularTestabilities=()=>n.getAllTestabilities(),sp.getAllAngularRootElements=()=>n.getAllRootElements();let e=i=>{let o=sp.getAllAngularTestabilities(),r=o.length,s=function(){r--,r==0&&i()};o.forEach(d=>{d.whenStable(s)})};sp.frameworkStabilizers||(sp.frameworkStabilizers=[]),sp.frameworkStabilizers.push(e)}findTestabilityInTree(n,e,i){if(e==null)return null;let o=n.getTestability(e);return o??(i?Q_().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},xqe=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),ewe=(()=>{class t extends wV{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,o,r){return e.addEventListener(i,o,r),()=>this.removeEventListener(e,i,o,r)}removeEventListener(e,i,o,r){return e.removeEventListener(i,o,r)}static \u0275fac=function(i){return new(i||t)(di(Ao))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),J1e=["alt","control","meta","shift"],wqe={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Sqe={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},twe=(()=>{class t extends wV{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,i,o,r){let s=t.parseEventName(i),d=t.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Q_().onAndCancel(e,s.domEventName,d,r))}static parseEventName(e){let i=e.toLowerCase().split("."),o=i.shift();if(i.length===0||!(o==="keydown"||o==="keyup"))return null;let r=t._normalizeKey(i.pop()),s="",d=i.indexOf("code");if(d>-1&&(i.splice(d,1),s="code."),J1e.forEach(v=>{let w=i.indexOf(v);w>-1&&(i.splice(w,1),s+=v+".")}),s+=r,i.length!=0||r.length===0)return null;let m={};return m.domEventName=o,m.fullKey=s,m}static matchEventFullKeyCode(e,i){let o=wqe[e.key]||e.key,r="";return i.indexOf("code.")>-1&&(o=e.code,r="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),J1e.forEach(s=>{if(s!==o){let d=Sqe[s];d(e)&&(r+=s+".")}}),r+=o,r===i)}static eventCallback(e,i,o){return r=>{t.matchEventFullKeyCode(r,e)&&o.runGuarded(()=>i(r))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(i){return new(i||t)(di(Ao))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();function Tqe(){pj.makeCurrent()}function Iqe(){return new ch}function Eqe(){return uie(document),document}var Dqe=[{provide:Zh,useValue:$ne},{provide:b9,useValue:Tqe,multi:!0},{provide:Ao,useFactory:Eqe}],Jne=wne(c1e,"browser",Dqe);var Aqe=[{provide:xR,useClass:hj},{provide:V9,useClass:lV,deps:[_n,cV,xR]},{provide:lV,useClass:lV,deps:[_n,cV,xR]}],kqe=[{provide:MB,useValue:"root"},{provide:ch,useFactory:Iqe},{provide:uj,useClass:ewe,multi:!0,deps:[Ao]},{provide:uj,useClass:twe,multi:!0,deps:[Ao]},IV,Zne,Qne,{provide:bc,useExisting:IV},{provide:BA,useClass:xqe},[]],DV=(()=>{class t{constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[...kqe,...Aqe],imports:[On,d1e]})}return t})();var AR=class{},AV=class{},rI=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(n){n?typeof n=="string"?this.lazyInit=()=>{this.headers=new Map,n.split(` `).forEach(e=>{let i=e.indexOf(":");if(i>0){let o=e.slice(0,i),r=e.slice(i+1).trim();this.addHeaderEntry(o,r)}})}:typeof Headers<"u"&&n instanceof Headers?(this.headers=new Map,n.forEach((e,i)=>{this.addHeaderEntry(i,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(n).forEach(([e,i])=>{this.setHeaderEntries(e,i)})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();let e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){let e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(n.name,e);let o=(n.op==="a"?this.headers.get(e):void 0)||[];o.push(...i),this.headers.set(e,o);break;case"d":let r=n.value;if(!r)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=this.headers.get(e);if(!s)return;s=s.filter(d=>r.indexOf(d)===-1),s.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}break}}addHeaderEntry(n,e){let i=n.toLowerCase();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(e):this.headers.set(i,[e])}setHeaderEntries(n,e){let i=(Array.isArray(e)?e:[e]).map(r=>r.toString()),o=n.toLowerCase();this.headers.set(o,i),this.maybeSetNormalizedName(n,o)}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}};var fj=class{encodeKey(n){return iwe(n)}encodeValue(n){return iwe(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}};function Mqe(t,n){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let r=o.indexOf("="),[s,d]=r==-1?[n.decodeKey(o),""]:[n.decodeKey(o.slice(0,r)),n.decodeValue(o.slice(r+1))],m=e.get(s)||[];m.push(d),e.set(s,m)}),e}var Oqe=/%(\d[a-f0-9])/gi,Rqe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function iwe(t){return encodeURIComponent(t).replace(Oqe,(n,e)=>Rqe[e]??n)}function mj(t){return`${t}`}var Pr=class t{map;encoder;updates=null;cloneFrom=null;constructor(n={}){if(this.encoder=n.encoder||new fj,n.fromString){if(n.fromObject)throw new mn(2805,!1);this.map=Mqe(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{let i=n.fromObject[e],o=Array.isArray(i)?i.map(mj):[mj(i)];this.map.set(e,o)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();let e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){let e=[];return Object.keys(n).forEach(i=>{let o=n[i];Array.isArray(o)?o.forEach(r=>{e.push({param:i,value:r,op:"a"})}):e.push({param:i,value:o,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{let e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>n!=="").join("&")}clone(n){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":let e=(n.op==="a"?this.map.get(n.param):void 0)||[];e.push(mj(n.value)),this.map.set(n.param,e);break;case"d":if(n.value!==void 0){let i=this.map.get(n.param)||[],o=i.indexOf(mj(n.value));o!==-1&&i.splice(o,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}else{this.map.delete(n.param);break}}}),this.cloneFrom=this.updates=null)}};var gj=class{map=new Map;set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}};function Fqe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function nwe(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function owe(t){return typeof Blob<"u"&&t instanceof Blob}function rwe(t){return typeof FormData<"u"&&t instanceof FormData}function Pqe(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var swe="Content-Type",awe="Accept",cwe="X-Request-URL",dwe="text/plain",uwe="application/json",Lqe=`${uwe}, ${dwe}, */*`,ER=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(n,e,i,o){this.url=e,this.method=n.toUpperCase();let r;if(Fqe(this.method)||o?(this.body=i!==void 0?i:null,r=o):r=i,r){if(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,this.keepalive=!!r.keepalive,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params),r.priority&&(this.priority=r.priority),r.cache&&(this.cache=r.cache),r.credentials&&(this.credentials=r.credentials),typeof r.timeout=="number"){if(r.timeout<1||!Number.isInteger(r.timeout))throw new mn(2822,"");this.timeout=r.timeout}r.mode&&(this.mode=r.mode),r.redirect&&(this.redirect=r.redirect),r.integrity&&(this.integrity=r.integrity),r.referrer&&(this.referrer=r.referrer),this.transferCache=r.transferCache}if(this.headers??=new rI,this.context??=new gj,!this.params)this.params=new Pr,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let d=e.indexOf("?"),m=d===-1?"?":dRe.set(Se,n.setHeaders[Se]),fe)),n.setParams&&(xe=Object.keys(n.setParams).reduce((Re,Se)=>Re.set(Se,n.setParams[Se]),xe)),new t(e,i,q,{params:xe,headers:fe,context:Fe,reportProgress:te,responseType:o,withCredentials:W,transferCache:V,keepalive:r,cache:d,priority:s,timeout:$,mode:m,redirect:v,credentials:w,referrer:O,integrity:N})}},Dv=(function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t})(Dv||{}),kR=class{headers;status;statusText;url;ok;type;redirected;constructor(n,e=200,i="OK"){this.headers=n.headers||new rI,this.status=n.status!==void 0?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.redirected=n.redirected,this.ok=this.status>=200&&this.status<300}},_j=class t extends kR{constructor(n={}){super(n)}type=Dv.ResponseHeader;clone(n={}){return new t({headers:n.headers||this.headers,status:n.status!==void 0?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}},kV=class t extends kR{body;constructor(n={}){super(n),this.body=n.body!==void 0?n.body:null}type=Dv.Response;clone(n={}){return new t({body:n.body!==void 0?n.body:this.body,headers:n.headers||this.headers,status:n.status!==void 0?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0,redirected:n.redirected??this.redirected})}},DR=class extends kR{name="HttpErrorResponse";message;error;ok=!1;constructor(n){super(n,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${n.url||"(unknown url)"}`:this.message=`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}},Nqe=200,Bqe=204;function eoe(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer}}var Ia=(()=>{class t{handler;constructor(e){this.handler=e}request(e,i,o={}){let r;if(e instanceof ER)r=e;else{let m;o.headers instanceof rI?m=o.headers:m=new rI(o.headers);let v;o.params&&(o.params instanceof Pr?v=o.params:v=new Pr({fromObject:o.params})),r=new ER(e,i,o.body!==void 0?o.body:null,{headers:m,context:o.context,params:v,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let s=ci(r).pipe(lh(m=>this.handler.handle(m)));if(e instanceof ER||o.observe==="events")return s;let d=s.pipe(wn(m=>m instanceof kV));switch(o.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return d.pipe(vt(m=>{if(m.body!==null&&!(m.body instanceof ArrayBuffer))throw new mn(2806,!1);return m.body}));case"blob":return d.pipe(vt(m=>{if(m.body!==null&&!(m.body instanceof Blob))throw new mn(2807,!1);return m.body}));case"text":return d.pipe(vt(m=>{if(m.body!==null&&typeof m.body!="string")throw new mn(2808,!1);return m.body}));case"json":default:return d.pipe(vt(m=>m.body))}case"response":return d;default:throw new mn(2809,!1)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:new Pr().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,o={}){return this.request("PATCH",e,eoe(o,i))}post(e,i,o={}){return this.request("POST",e,eoe(o,i))}put(e,i,o={}){return this.request("PUT",e,eoe(o,i))}static \u0275fac=function(i){return new(i||t)(di(AR))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Vqe=new fi("");function pwe(t,n){return n(t)}function zqe(t,n){return(e,i)=>n.intercept(e,{handle:o=>t(o,i)})}function Uqe(t,n,e){return(i,o)=>dh(e,()=>n(i,r=>t(r,o)))}var vj=new fi(""),ioe=new fi(""),hwe=new fi(""),noe=new fi("",{providedIn:"root",factory:()=>!0});function Hqe(){let t=null;return(n,e)=>{t===null&&(t=(re(vj,{optional:!0})??[]).reduceRight(zqe,pwe));let i=re(tR);if(re(noe)){let r=i.add();return t(n,e).pipe(yC(r))}else return t(n,e)}}var yj=(()=>{class t extends AR{backend;injector;chain=null;pendingTasks=re(tR);contributeToStability=re(noe);constructor(e,i){super(),this.backend=e,this.injector=i}handle(e){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(ioe),...this.injector.get(hwe,[])]));this.chain=i.reduceRight((o,r)=>Uqe(o,r,this.injector),pwe)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(yC(i))}else return this.chain(e,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||t)(di(AV),di(Uc))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var jqe=/^\)\]\}',?\n/,Gqe=RegExp(`^${cwe}:`,"m");function $qe(t){return"responseURL"in t&&t.responseURL?t.responseURL:Gqe.test(t.getAllResponseHeaders())?t.getResponseHeader(cwe):null}var toe=(()=>{class t{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new mn(-2800,!1);let i=this.xhrFactory;return ci(null).pipe(Mn(()=>new Cr(r=>{let s=i.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((W,te)=>s.setRequestHeader(W,te.join(","))),e.headers.has(awe)||s.setRequestHeader(awe,Lqe),!e.headers.has(swe)){let W=e.detectContentTypeHeader();W!==null&&s.setRequestHeader(swe,W)}if(e.timeout&&(s.timeout=e.timeout),e.responseType){let W=e.responseType.toLowerCase();s.responseType=W!=="json"?W:"text"}let d=e.serializeBody(),m=null,v=()=>{if(m!==null)return m;let W=s.statusText||"OK",te=new rI(s.getAllResponseHeaders()),fe=$qe(s)||e.url;return m=new _j({headers:te,status:s.status,statusText:W,url:fe}),m},w=()=>{let{headers:W,status:te,statusText:fe,url:xe}=v(),Fe=null;te!==Bqe&&(Fe=typeof s.response>"u"?s.responseText:s.response),te===0&&(te=Fe?Nqe:0);let Re=te>=200&&te<300;if(e.responseType==="json"&&typeof Fe=="string"){let Se=Fe;Fe=Fe.replace(jqe,"");try{Fe=Fe!==""?JSON.parse(Fe):null}catch(ke){Fe=Se,Re&&(Re=!1,Fe={error:ke,text:Fe})}}Re?(r.next(new kV({body:Fe,headers:W,status:te,statusText:fe,url:xe||void 0})),r.complete()):r.error(new DR({error:Fe,headers:W,status:te,statusText:fe,url:xe||void 0}))},O=W=>{let{url:te}=v(),fe=new DR({error:W,status:s.status||0,statusText:s.statusText||"Unknown Error",url:te||void 0});r.error(fe)},N=O;e.timeout&&(N=W=>{let{url:te}=v(),fe=new DR({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:te||void 0});r.error(fe)});let V=!1,$=W=>{V||(r.next(v()),V=!0);let te={type:Dv.DownloadProgress,loaded:W.loaded};W.lengthComputable&&(te.total=W.total),e.responseType==="text"&&s.responseText&&(te.partialText=s.responseText),r.next(te)},q=W=>{let te={type:Dv.UploadProgress,loaded:W.loaded};W.lengthComputable&&(te.total=W.total),r.next(te)};return s.addEventListener("load",w),s.addEventListener("error",O),s.addEventListener("timeout",N),s.addEventListener("abort",O),e.reportProgress&&(s.addEventListener("progress",$),d!==null&&s.upload&&s.upload.addEventListener("progress",q)),s.send(d),r.next({type:Dv.Sent}),()=>{s.removeEventListener("error",O),s.removeEventListener("abort",O),s.removeEventListener("load",w),s.removeEventListener("timeout",N),e.reportProgress&&(s.removeEventListener("progress",$),d!==null&&s.upload&&s.upload.removeEventListener("progress",q)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||t)(di(BA))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),mwe=new fi(""),qqe="XSRF-TOKEN",Kqe=new fi("",{providedIn:"root",factory:()=>qqe}),Wqe="X-XSRF-TOKEN",Yqe=new fi("",{providedIn:"root",factory:()=>Wqe}),MV=class{},Qqe=(()=>{class t{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,i){this.doc=e,this.cookieName=i}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=xV(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(i){return new(i||t)(di(Ao),di(Kqe))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();function Zqe(t,n){let e=t.url.toLowerCase();if(!re(mwe)||t.method==="GET"||t.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return n(t);let i=re(MV).getToken(),o=re(Yqe);return i!=null&&!t.headers.has(o)&&(t=t.clone({headers:t.headers.set(o,i)})),n(t)}var ooe=(function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t})(ooe||{});function Xqe(t,n){return{\u0275kind:t,\u0275providers:n}}function roe(...t){let n=[Ia,toe,yj,{provide:AR,useExisting:yj},{provide:AV,useFactory:()=>re(Vqe,{optional:!0})??re(toe)},{provide:ioe,useValue:Zqe,multi:!0},{provide:mwe,useValue:!0},{provide:MV,useClass:Qqe}];for(let e of t)n.push(...e.\u0275providers);return H1(n)}var lwe=new fi("");function soe(){return Xqe(ooe.LegacyInterceptors,[{provide:lwe,useFactory:Hqe},{provide:ioe,useExisting:lwe,multi:!0}])}var bj=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(i){return new(i||t)(di(Ao))};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var VA=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:function(i){let o=null;return i?o=new(i||t):o=di(Jqe),o},providedIn:"root"})}return t})(),Jqe=(()=>{class t extends VA{_doc;constructor(e){super(),this._doc=e}sanitize(e,i){if(i==null)return null;switch(e){case uh.NONE:return i;case uh.HTML:return DC(i,"HTML")?jg(i):S9(this._doc,String(i)).toString();case uh.STYLE:return DC(i,"Style")?jg(i):i;case uh.SCRIPT:if(DC(i,"Script"))return jg(i);throw new mn(5200,!1);case uh.URL:return DC(i,"URL")?jg(i):_R(String(i));case uh.RESOURCE_URL:if(DC(i,"ResourceURL"))return jg(i);throw new mn(5201,!1);default:throw new mn(5202,!1)}}bypassSecurityTrustHtml(e){return hie(e)}bypassSecurityTrustStyle(e){return mie(e)}bypassSecurityTrustScript(e){return fie(e)}bypassSecurityTrustUrl(e){return gie(e)}bypassSecurityTrustResourceUrl(e){return _ie(e)}static \u0275fac=function(i){return new(i||t)(di(Ao))};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ya="primary",$V=Symbol("RouteTitle"),uoe=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function HA(t){return new uoe(t)}function xwe(t,n,e){let i=e.path.split("/");if(i.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||i.lengthi[r]===o)}else return t===n}function Swe(t){return t.length>0?t[t.length-1]:null}function nw(t){return UO(t)?t:J1(t)?nr(Promise.resolve(t)):ci(t)}var tKe={exact:Iwe,subset:Ewe},Twe={exact:iKe,subset:nKe,ignored:()=>!0};function fwe(t,n,e){return tKe[e.paths](t.root,n.root,e.matrixParams)&&Twe[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function iKe(t,n){return kC(t,n)}function Iwe(t,n,e){if(!zA(t.segments,n.segments)||!wj(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let i in n.children)if(!t.children[i]||!Iwe(t.children[i],n.children[i],e))return!1;return!0}function nKe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>wwe(t[e],n[e]))}function Ewe(t,n,e){return Dwe(t,n,n.segments,e)}function Dwe(t,n,e,i){if(t.segments.length>e.length){let o=t.segments.slice(0,e.length);return!(!zA(o,e)||n.hasChildren()||!wj(o,e,i))}else if(t.segments.length===e.length){if(!zA(t.segments,e)||!wj(t.segments,e,i))return!1;for(let o in n.children)if(!t.children[o]||!Ewe(t.children[o],n.children[o],i))return!1;return!0}else{let o=e.slice(0,t.segments.length),r=e.slice(t.segments.length);return!zA(t.segments,o)||!wj(t.segments,o,i)||!t.children[ya]?!1:Dwe(t.children[ya],n,r,i)}}function wj(t,n,e){return n.every((i,o)=>Twe[e](t[o].parameters,i.parameters))}var OC=class{root;queryParams;fragment;_queryParamMap;constructor(n=new oc([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap??=HA(this.queryParams),this._queryParamMap}toString(){return sKe.serialize(this)}},oc=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Sj(this)}},sI=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=HA(this.parameters),this._parameterMap}toString(){return kwe(this)}};function oKe(t,n){return zA(t,n)&&t.every((e,i)=>kC(e.parameters,n[i].parameters))}function zA(t,n){return t.length!==n.length?!1:t.every((e,i)=>e.path===n[i].path)}function rKe(t,n){let e=[];return Object.entries(t.children).forEach(([i,o])=>{i===ya&&(e=e.concat(n(o,i)))}),Object.entries(t.children).forEach(([i,o])=>{i!==ya&&(e=e.concat(n(o,i)))}),e}var jA=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:()=>new aI,providedIn:"root"})}return t})(),aI=class{parse(n){let e=new moe(n);return new OC(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${RV(n.root,!0)}`,i=cKe(n.queryParams),o=typeof n.fragment=="string"?`#${aKe(n.fragment)}`:"";return`${e}${i}${o}`}},sKe=new aI;function Sj(t){return t.segments.map(n=>kwe(n)).join("/")}function RV(t,n){if(!t.hasChildren())return Sj(t);if(n){let e=t.children[ya]?RV(t.children[ya],!1):"",i=[];return Object.entries(t.children).forEach(([o,r])=>{o!==ya&&i.push(`${o}:${RV(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}else{let e=rKe(t,(i,o)=>o===ya?[RV(t.children[ya],!1)]:[`${o}:${RV(i,!1)}`]);return Object.keys(t.children).length===1&&t.children[ya]!=null?`${Sj(t)}/${e[0]}`:`${Sj(t)}/(${e.join("//")})`}}function Awe(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Cj(t){return Awe(t).replace(/%3B/gi,";")}function aKe(t){return encodeURI(t)}function hoe(t){return Awe(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Tj(t){return decodeURIComponent(t)}function gwe(t){return Tj(t.replace(/\+/g,"%20"))}function kwe(t){return`${hoe(t.path)}${lKe(t.parameters)}`}function lKe(t){return Object.entries(t).map(([n,e])=>`;${hoe(n)}=${hoe(e)}`).join("")}function cKe(t){let n=Object.entries(t).map(([e,i])=>Array.isArray(i)?i.map(o=>`${Cj(e)}=${Cj(o)}`).join("&"):`${Cj(e)}=${Cj(i)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var dKe=/^[^\/()?;#]+/;function aoe(t){let n=t.match(dKe);return n?n[0]:""}var uKe=/^[^\/()?;=#]+/;function pKe(t){let n=t.match(uKe);return n?n[0]:""}var hKe=/^[^=?&#]+/;function mKe(t){let n=t.match(hKe);return n?n[0]:""}var fKe=/^[^&#]+/;function gKe(t){let n=t.match(fKe);return n?n[0]:""}var moe=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new oc([],{}):new oc([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[ya]=new oc(n,e)),i}parseSegment(){let n=aoe(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new mn(4009,!1);return this.capture(n),new sI(Tj(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=pKe(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let o=aoe(this.remaining);o&&(i=o,this.capture(i))}n[Tj(e)]=Tj(i)}parseQueryParam(n){let e=mKe(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let s=gKe(this.remaining);s&&(i=s,this.capture(i))}let o=gwe(e),r=gwe(i);if(n.hasOwnProperty(o)){let s=n[o];Array.isArray(s)||(s=[s],n[o]=s),s.push(r)}else n[o]=r}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=aoe(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new mn(4010,!1);let r;i.indexOf(":")>-1?(r=i.slice(0,i.indexOf(":")),this.capture(r),this.capture(":")):n&&(r=ya);let s=this.parseChildren();e[r]=Object.keys(s).length===1?s[ya]:new oc([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new mn(4011,!1)}};function Mwe(t){return t.segments.length>0?new oc([],{[ya]:t}):t}function Owe(t){let n={};for(let[i,o]of Object.entries(t.children)){let r=Owe(o);if(i===ya&&r.segments.length===0&&r.hasChildren())for(let[s,d]of Object.entries(r.children))n[s]=d;else(r.segments.length>0||r.hasChildren())&&(n[i]=r)}let e=new oc(t.segments,n);return _Ke(e)}function _Ke(t){if(t.numberOfChildren===1&&t.children[ya]){let n=t.children[ya];return new oc(t.segments.concat(n.segments),n.children)}return t}function lI(t){return t instanceof OC}function Rwe(t,n,e=null,i=null){let o=Fwe(t);return Pwe(o,n,e,i)}function Fwe(t){let n;function e(r){let s={};for(let m of r.children){let v=e(m);s[m.outlet]=v}let d=new oc(r.url,s);return r===t&&(n=d),d}let i=e(t.root),o=Mwe(i);return n??o}function Pwe(t,n,e,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return loe(o,o,o,e,i);let r=yKe(n);if(r.toRoot())return loe(o,o,new oc([],{}),e,i);let s=vKe(r,o,t),d=s.processChildren?PV(s.segmentGroup,s.index,r.commands):Nwe(s.segmentGroup,s.index,r.commands);return loe(o,s.segmentGroup,d,e,i)}function Ij(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function NV(t){return typeof t=="object"&&t!=null&&t.outlets}function loe(t,n,e,i,o){let r={};i&&Object.entries(i).forEach(([m,v])=>{r[m]=Array.isArray(v)?v.map(w=>`${w}`):`${v}`});let s;t===n?s=e:s=Lwe(t,n,e);let d=Mwe(Owe(s));return new OC(d,r,o)}function Lwe(t,n,e){let i={};return Object.entries(t.children).forEach(([o,r])=>{r===n?i[o]=e:i[o]=Lwe(r,n,e)}),new oc(t.segments,i)}var Ej=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&Ij(i[0]))throw new mn(4003,!1);let o=i.find(NV);if(o&&o!==Swe(i))throw new mn(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function yKe(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new Ej(!0,0,t);let n=0,e=!1,i=t.reduce((o,r,s)=>{if(typeof r=="object"&&r!=null){if(r.outlets){let d={};return Object.entries(r.outlets).forEach(([m,v])=>{d[m]=typeof v=="string"?v.split("/"):v}),[...o,{outlets:d}]}if(r.segmentPath)return[...o,r.segmentPath]}return typeof r!="string"?[...o,r]:s===0?(r.split("/").forEach((d,m)=>{m==0&&d==="."||(m==0&&d===""?e=!0:d===".."?n++:d!=""&&o.push(d))}),o):[...o,r]},[]);return new Ej(e,n,i)}var RR=class{segmentGroup;processChildren;index;constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}};function vKe(t,n,e){if(t.isAbsolute)return new RR(n,!0,0);if(!e)return new RR(n,!1,NaN);if(e.parent===null)return new RR(e,!0,0);let i=Ij(t.commands[0])?0:1,o=e.segments.length-1+i;return bKe(e,o,t.numberOfDoubleDots)}function bKe(t,n,e){let i=t,o=n,r=e;for(;r>o;){if(r-=o,i=i.parent,!i)throw new mn(4005,!1);o=i.segments.length}return new RR(i,!1,o-r)}function CKe(t){return NV(t[0])?t[0].outlets:{[ya]:t}}function Nwe(t,n,e){if(t??=new oc([],{}),t.segments.length===0&&t.hasChildren())return PV(t,n,e);let i=xKe(t,n,e),o=e.slice(i.commandIndex);if(i.match&&i.pathIndexr!==ya)&&t.children[ya]&&t.numberOfChildren===1&&t.children[ya].segments.length===0){let r=PV(t.children[ya],n,e);return new oc(t.segments,r.children)}return Object.entries(i).forEach(([r,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(o[r]=Nwe(t.children[r],n,s))}),Object.entries(t.children).forEach(([r,s])=>{i[r]===void 0&&(o[r]=s)}),new oc(t.segments,o)}}function xKe(t,n,e){let i=0,o=n,r={match:!1,pathIndex:0,commandIndex:0};for(;o=e.length)return r;let s=t.segments[o],d=e[i];if(NV(d))break;let m=`${d}`,v=i0&&m===void 0)break;if(m&&v&&typeof v=="object"&&v.outlets===void 0){if(!ywe(m,v,s))return r;i+=2}else{if(!ywe(m,{},s))return r;i++}o++}return{match:!0,pathIndex:o,commandIndex:i}}function foe(t,n,e){let i=t.segments.slice(0,n),o=0;for(;o{typeof i=="string"&&(i=[i]),i!==null&&(n[e]=foe(new oc([],{}),0,i))}),n}function _we(t){let n={};return Object.entries(t).forEach(([e,i])=>n[e]=`${i}`),n}function ywe(t,n,e){return t==e.path&&kC(n,e.parameters)}var FR="imperative",Fp=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(Fp||{}),J_=class{id;url;constructor(n,e){this.id=n,this.url=e}},cI=class extends J_{type=Fp.NavigationStart;navigationTrigger;restoredState;constructor(n,e,i="imperative",o=null){super(n,e),this.navigationTrigger=i,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},e0=class extends J_{urlAfterRedirects;type=Fp.NavigationEnd;constructor(n,e,i){super(n,e),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Kf=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(Kf||{}),LR=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(LR||{}),MC=class extends J_{reason;code;type=Fp.NavigationCancel;constructor(n,e,i,o){super(n,e),this.reason=i,this.code=o}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},RC=class extends J_{reason;code;type=Fp.NavigationSkipped;constructor(n,e,i,o){super(n,e),this.reason=i,this.code=o}},NR=class extends J_{error;target;type=Fp.NavigationError;constructor(n,e,i,o){super(n,e),this.error=i,this.target=o}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},BV=class extends J_{urlAfterRedirects;state;type=Fp.RoutesRecognized;constructor(n,e,i,o){super(n,e),this.urlAfterRedirects=i,this.state=o}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Dj=class extends J_{urlAfterRedirects;state;type=Fp.GuardsCheckStart;constructor(n,e,i,o){super(n,e),this.urlAfterRedirects=i,this.state=o}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Aj=class extends J_{urlAfterRedirects;state;shouldActivate;type=Fp.GuardsCheckEnd;constructor(n,e,i,o,r){super(n,e),this.urlAfterRedirects=i,this.state=o,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},kj=class extends J_{urlAfterRedirects;state;type=Fp.ResolveStart;constructor(n,e,i,o){super(n,e),this.urlAfterRedirects=i,this.state=o}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Mj=class extends J_{urlAfterRedirects;state;type=Fp.ResolveEnd;constructor(n,e,i,o){super(n,e),this.urlAfterRedirects=i,this.state=o}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Oj=class{route;type=Fp.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Rj=class{route;type=Fp.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Fj=class{snapshot;type=Fp.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Pj=class{snapshot;type=Fp.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Lj=class{snapshot;type=Fp.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},BR=class{snapshot;type=Fp.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},VR=class{routerEvent;position;anchor;type=Fp.Scroll;constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i}toString(){let n=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${n}')`}},VV=class{},zR=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function SKe(t){return!(t instanceof VV)&&!(t instanceof zR)}function TKe(t,n){return t.providers&&!t._injector&&(t._injector=bR(t.providers,n,`Route: ${t.path}`)),t._injector??n}function Av(t){return t.outlet||ya}function IKe(t,n){let e=t.filter(i=>Av(i)===n);return e.push(...t.filter(i=>Av(i)!==n)),e}function jR(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var Nj=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return jR(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new GA(this.rootInjector)}},GA=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,i){let o=this.getOrCreateContext(e);o.outlet=i,this.contexts.set(e,o)}onChildOutletDestroyed(e){let i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new Nj(this.rootInjector),this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(i){return new(i||t)(di(Uc))};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Bj=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=goe(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){let e=goe(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=_oe(n,this._root);return e.length<2?[]:e[e.length-2].children.map(o=>o.value).filter(o=>o!==n)}pathFromRoot(n){return _oe(n,this._root).map(e=>e.value)}};function goe(t,n){if(t===n.value)return n;for(let e of n.children){let i=goe(t,e);if(i)return i}return null}function _oe(t,n){if(t===n.value)return[n];for(let e of n.children){let i=_oe(t,e);if(i.length)return i.unshift(n),i}return[]}var X_=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function OR(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var zV=class extends Bj{snapshot;constructor(n,e){super(n),this.snapshot=e,Toe(this,n)}toString(){return this.snapshot.toString()}};function Bwe(t){let n=EKe(t),e=new Gs([new sI("",{})]),i=new Gs({}),o=new Gs({}),r=new Gs({}),s=new Gs(""),d=new vl(e,i,r,s,o,ya,t,n.root);return d.snapshot=n.root,new zV(new X_(d,[]),n)}function EKe(t){let n={},e={},i={},r=new UA([],n,i,"",e,ya,t,null,{});return new UV("",new X_(r,[]))}var vl=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,i,o,r,s,d,m){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=i,this.fragmentSubject=o,this.dataSubject=r,this.outlet=s,this.component=d,this._futureSnapshot=m,this.title=this.dataSubject?.pipe(vt(v=>v[$V]))??ci(void 0),this.url=n,this.params=e,this.queryParams=i,this.fragment=o,this.data=r}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(vt(n=>HA(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(vt(n=>HA(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Vj(t,n,e="emptyOnly"){let i,{routeConfig:o}=t;return n!==null&&(e==="always"||o?.path===""||!n.component&&!n.routeConfig?.loadComponent)?i={params:be(be({},n.params),t.params),data:be(be({},n.data),t.data),resolve:be(be(be(be({},t.data),n.data),o?.data),t._resolvedData)}:i={params:be({},t.params),data:be({},t.data),resolve:be(be({},t.data),t._resolvedData??{})},o&&zwe(o)&&(i.resolve[$V]=o.title),i}var UA=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[$V]}constructor(n,e,i,o,r,s,d,m,v){this.url=n,this.params=e,this.queryParams=i,this.fragment=o,this.data=r,this.outlet=s,this.component=d,this.routeConfig=m,this._resolve=v}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=HA(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=HA(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(i=>i.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},UV=class extends Bj{url;constructor(n,e){super(e),this.url=n,Toe(this,e)}toString(){return Vwe(this._root)}};function Toe(t,n){n.value._routerState=t,n.children.forEach(e=>Toe(t,e))}function Vwe(t){let n=t.children.length>0?` { ${t.children.map(Vwe).join(", ")} } `:"";return`${t.value}${n}`}function coe(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,kC(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),kC(n.params,e.params)||t.paramsSubject.next(e.params),eKe(n.url,e.url)||t.urlSubject.next(e.url),kC(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function yoe(t,n){let e=kC(t.params,n.params)&&oKe(t.url,n.url),i=!t.parent!=!n.parent;return e&&!i&&(!t.parent||yoe(t.parent,n.parent))}function zwe(t){return typeof t.title=="string"||t.title===null}var Uwe=new fi(""),qV=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=ya;activateEvents=new ve;deactivateEvents=new ve;attachEvents=new ve;detachEvents=new ve;routerOutletData=mo(void 0);parentContexts=re(GA);location=re(nc);changeDetector=re(Gi);inputBinder=re(KV,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:i,previousValue:o}=e.name;if(i)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new mn(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new mn(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new mn(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new mn(4013,!1);this._activatedRoute=e;let o=this.location,s=e.snapshot.component,d=this.parentContexts.getOrCreateContext(this.name).children,m=new voe(e,d,o.injector,this.routerOutletData);this.activated=o.createComponent(s,{index:o.length,injector:m,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ot]})}return t})(),voe=class{route;childContexts;parent;outletData;constructor(n,e,i,o){this.route=n,this.childContexts=e,this.parent=i,this.outletData=o}get(n,e){return n===vl?this.route:n===GA?this.childContexts:n===Uwe?this.outletData:this.parent.get(n,e)}},KV=new fi(""),Ioe=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:i}=e,o=yc([i.queryParams,i.params,i.data]).pipe(Mn(([r,s,d],m)=>(d=be(be(be({},r),s),d),m===0?ci(d):Promise.resolve(d)))).subscribe(r=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(e);return}let s=Q9(i.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:d}of s.inputs)e.activatedComponentRef.setInput(d,r[d])});this.outletDataSubscriptions.set(e,o)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),Eoe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(i,o){i&1&&ce(0,"router-outlet")},dependencies:[qV],encapsulation:2})}return t})();function Doe(t){let n=t.children&&t.children.map(Doe),e=n?mt(be({},t),{children:n}):be({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==ya&&(e.component=Eoe),e}function DKe(t,n,e){let i=HV(t,n._root,e?e._root:void 0);return new zV(i,n)}function HV(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let i=e.value;i._futureSnapshot=n.value;let o=AKe(t,n,e);return new X_(i,o)}else{if(t.shouldAttach(n.value)){let r=t.retrieve(n.value);if(r!==null){let s=r.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(d=>HV(t,d)),s}}let i=kKe(n.value),o=n.children.map(r=>HV(t,r));return new X_(i,o)}}function AKe(t,n,e){return n.children.map(i=>{for(let o of e.children)if(t.shouldReuseRoute(i.value,o.value.snapshot))return HV(t,i,o);return HV(t,i)})}function kKe(t){return new vl(new Gs(t.url),new Gs(t.params),new Gs(t.queryParams),new Gs(t.fragment),new Gs(t.data),t.outlet,t.component,t)}var UR=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},Hwe="ngNavigationCancelingError";function zj(t,n){let{redirectTo:e,navigationBehaviorOptions:i}=lI(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,o=jwe(!1,Kf.Redirect);return o.url=e,o.navigationBehaviorOptions=i,o}function jwe(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[Hwe]=!0,e.cancellationCode=n,e}function MKe(t){return Gwe(t)&&lI(t.url)}function Gwe(t){return!!t&&t[Hwe]}var OKe=(t,n,e,i)=>vt(o=>(new boe(n,o.targetRouterState,o.currentRouterState,e,i).activate(t),o)),boe=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,i,o,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=o,this.inputBindingEnabled=r}activate(n){let e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),coe(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){let o=OR(e);n.children.forEach(r=>{let s=r.value.outlet;this.deactivateRoutes(r,o[s],i),delete o[s]}),Object.values(o).forEach(r=>{this.deactivateRouteAndItsChildren(r,i)})}deactivateRoutes(n,e,i){let o=n.value,r=e?e.value:null;if(o===r)if(o.component){let s=i.getContext(o.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else r&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let i=e.getContext(n.value.outlet),o=i&&n.value.component?i.children:e,r=OR(n);for(let s of Object.values(r))this.deactivateRouteAndItsChildren(s,o);if(i&&i.outlet){let s=i.outlet.detach(),d=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:d})}}deactivateRouteAndOutlet(n,e){let i=e.getContext(n.value.outlet),o=i&&n.value.component?i.children:e,r=OR(n);for(let s of Object.values(r))this.deactivateRouteAndItsChildren(s,o);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(n,e,i){let o=OR(e);n.children.forEach(r=>{this.activateRoutes(r,o[r.value.outlet],i),this.forwardEvent(new BR(r.value.snapshot))}),n.children.length&&this.forwardEvent(new Pj(n.value.snapshot))}activateRoutes(n,e,i){let o=n.value,r=e?e.value:null;if(coe(o),o===r)if(o.component){let s=i.getOrCreateContext(o.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(o.component){let s=i.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let d=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),s.children.onOutletReAttached(d.contexts),s.attachRef=d.componentRef,s.route=d.route.value,s.outlet&&s.outlet.attach(d.componentRef,d.route.value),coe(d.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=o,s.outlet&&s.outlet.activateWith(o,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,i)}},Uj=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},PR=class{component;route;constructor(n,e){this.component=n,this.route=e}};function RKe(t,n,e){let i=t._root,o=n?n._root:null;return FV(i,o,e,[i.value])}function FKe(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function GR(t,n){let e=Symbol(),i=n.get(t,e);return i===e?typeof t=="function"&&!gee(t)?t:n.get(t):i}function FV(t,n,e,i,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=OR(n);return t.children.forEach(s=>{PKe(s,r[s.value.outlet],e,i.concat([s.value]),o),delete r[s.value.outlet]}),Object.entries(r).forEach(([s,d])=>LV(d,e.getContext(s),o)),o}function PKe(t,n,e,i,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=t.value,s=n?n.value:null,d=e?e.getContext(t.value.outlet):null;if(s&&r.routeConfig===s.routeConfig){let m=LKe(s,r,r.routeConfig.runGuardsAndResolvers);m?o.canActivateChecks.push(new Uj(i)):(r.data=s.data,r._resolvedData=s._resolvedData),r.component?FV(t,n,d?d.children:null,i,o):FV(t,n,e,i,o),m&&d&&d.outlet&&d.outlet.isActivated&&o.canDeactivateChecks.push(new PR(d.outlet.component,s))}else s&&LV(n,d,o),o.canActivateChecks.push(new Uj(i)),r.component?FV(t,null,d?d.children:null,i,o):FV(t,null,e,i,o);return o}function LKe(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!zA(t.url,n.url);case"pathParamsOrQueryParamsChange":return!zA(t.url,n.url)||!kC(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!yoe(t,n)||!kC(t.queryParams,n.queryParams);case"paramsChange":default:return!yoe(t,n)}}function LV(t,n,e){let i=OR(t),o=t.value;Object.entries(i).forEach(([r,s])=>{o.component?n?LV(s,n.children.getContext(r),e):LV(s,null,e):LV(s,n,e)}),o.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new PR(n.outlet.component,o)):e.canDeactivateChecks.push(new PR(null,o)):e.canDeactivateChecks.push(new PR(null,o))}function WV(t){return typeof t=="function"}function NKe(t){return typeof t=="boolean"}function BKe(t){return t&&WV(t.canLoad)}function VKe(t){return t&&WV(t.canActivate)}function zKe(t){return t&&WV(t.canActivateChild)}function UKe(t){return t&&WV(t.canDeactivate)}function HKe(t){return t&&WV(t.canMatch)}function $we(t){return t instanceof mv||t?.name==="EmptyError"}var xj=Symbol("INITIAL_VALUE");function HR(){return Mn(t=>yc(t.map(n=>n.pipe(Sn(1),rl(xj)))).pipe(vt(n=>{for(let e of n)if(e!==!0){if(e===xj)return xj;if(e===!1||jKe(e))return e}return!0}),wn(n=>n!==xj),Sn(1)))}function jKe(t){return lI(t)||t instanceof UR}function GKe(t,n){return Yl(e=>{let{targetSnapshot:i,currentSnapshot:o,guards:{canActivateChecks:r,canDeactivateChecks:s}}=e;return s.length===0&&r.length===0?ci(mt(be({},e),{guardsResult:!0})):$Ke(s,i,o,t).pipe(Yl(d=>d&&NKe(d)?qKe(i,r,t,n):ci(d)),vt(d=>mt(be({},e),{guardsResult:d})))})}function $Ke(t,n,e,i){return nr(t).pipe(Yl(o=>ZKe(o.component,o.route,e,n,i)),Vg(o=>o!==!0,!0))}function qKe(t,n,e,i){return nr(n).pipe(lh(o=>_C(WKe(o.route.parent,i),KKe(o.route,i),QKe(t,o.path,e),YKe(t,o.route,e))),Vg(o=>o!==!0,!0))}function KKe(t,n){return t!==null&&n&&n(new Lj(t)),ci(!0)}function WKe(t,n){return t!==null&&n&&n(new Fj(t)),ci(!0)}function YKe(t,n,e){let i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||i.length===0)return ci(!0);let o=i.map(r=>fv(()=>{let s=jR(n)??e,d=GR(r,s),m=VKe(d)?d.canActivate(n,t):dh(s,()=>d(n,t));return nw(m).pipe(Vg())}));return ci(o).pipe(HR())}function QKe(t,n,e){let i=n[n.length-1],r=n.slice(0,n.length-1).reverse().map(s=>FKe(s)).filter(s=>s!==null).map(s=>fv(()=>{let d=s.guards.map(m=>{let v=jR(s.node)??e,w=GR(m,v),O=zKe(w)?w.canActivateChild(i,t):dh(v,()=>w(i,t));return nw(O).pipe(Vg())});return ci(d).pipe(HR())}));return ci(r).pipe(HR())}function ZKe(t,n,e,i,o){let r=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!r||r.length===0)return ci(!0);let s=r.map(d=>{let m=jR(n)??o,v=GR(d,m),w=UKe(v)?v.canDeactivate(t,n,e,i):dh(m,()=>v(t,n,e,i));return nw(w).pipe(Vg())});return ci(s).pipe(HR())}function XKe(t,n,e,i){let o=n.canLoad;if(o===void 0||o.length===0)return ci(!0);let r=o.map(s=>{let d=GR(s,t),m=BKe(d)?d.canLoad(n,e):dh(t,()=>d(n,e));return nw(m)});return ci(r).pipe(HR(),qwe(i))}function qwe(t){return KJ(Vo(n=>{if(typeof n!="boolean")throw zj(t,n)}),vt(n=>n===!0))}function JKe(t,n,e,i){let o=n.canMatch;if(!o||o.length===0)return ci(!0);let r=o.map(s=>{let d=GR(s,t),m=HKe(d)?d.canMatch(n,e):dh(t,()=>d(n,e));return nw(m)});return ci(r).pipe(HR(),qwe(i))}var jV=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},GV=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function MR(t){return HT(new jV(t))}function eWe(t){return HT(new mn(4e3,!1))}function tWe(t){return HT(jwe(!1,Kf.GuardRejected))}var Coe=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let i=[],o=e.root;for(;;){if(i=i.concat(o.segments),o.numberOfChildren===0)return ci(i);if(o.numberOfChildren>1||!o.children[ya])return eWe(`${n.redirectTo}`);o=o.children[ya]}}applyRedirectCommands(n,e,i,o,r){return iWe(e,o,r).pipe(vt(s=>{if(s instanceof OC)throw new GV(s);let d=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,i);if(s[0]==="/")throw new GV(d);return d}))}applyRedirectCreateUrlTree(n,e,i,o){let r=this.createSegmentGroup(n,e.root,i,o);return new OC(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let i={};return Object.entries(n).forEach(([o,r])=>{if(typeof r=="string"&&r[0]===":"){let d=r.substring(1);i[o]=e[d]}else i[o]=r}),i}createSegmentGroup(n,e,i,o){let r=this.createSegments(n,e.segments,i,o),s={};return Object.entries(e.children).forEach(([d,m])=>{s[d]=this.createSegmentGroup(n,m,i,o)}),new oc(r,s)}createSegments(n,e,i,o){return e.map(r=>r.path[0]===":"?this.findPosParam(n,r,o):this.findOrReturn(r,i))}findPosParam(n,e,i){let o=i[e.path.substring(1)];if(!o)throw new mn(4001,!1);return o}findOrReturn(n,e){let i=0;for(let o of e){if(o.path===n.path)return e.splice(i),o;i++}return n}};function iWe(t,n,e){if(typeof t=="string")return ci(t);let i=t,{queryParams:o,fragment:r,routeConfig:s,url:d,outlet:m,params:v,data:w,title:O}=n;return nw(dh(e,()=>i({params:v,data:w,queryParams:o,fragment:r,routeConfig:s,url:d,outlet:m,title:O})))}var xoe={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function nWe(t,n,e,i,o){let r=Kwe(t,n,e);return r.matched?(i=TKe(n,i),JKe(i,n,e,o).pipe(vt(s=>s===!0?r:be({},xoe)))):ci(r)}function Kwe(t,n,e){if(n.path==="**")return oWe(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?be({},xoe):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let o=(n.matcher||xwe)(e,t,n);if(!o)return be({},xoe);let r={};Object.entries(o.posParams??{}).forEach(([d,m])=>{r[d]=m.path});let s=o.consumed.length>0?be(be({},r),o.consumed[o.consumed.length-1].parameters):r;return{matched:!0,consumedSegments:o.consumed,remainingSegments:e.slice(o.consumed.length),parameters:s,positionalParamSegments:o.posParams??{}}}function oWe(t){return{matched:!0,parameters:t.length>0?Swe(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function vwe(t,n,e,i){return e.length>0&&aWe(t,e,i)?{segmentGroup:new oc(n,sWe(i,new oc(e,t.children))),slicedSegments:[]}:e.length===0&&lWe(t,e,i)?{segmentGroup:new oc(t.segments,rWe(t,e,i,t.children)),slicedSegments:e}:{segmentGroup:new oc(t.segments,t.children),slicedSegments:e}}function rWe(t,n,e,i){let o={};for(let r of e)if(jj(t,n,r)&&!i[Av(r)]){let s=new oc([],{});o[Av(r)]=s}return be(be({},i),o)}function sWe(t,n){let e={};e[ya]=n;for(let i of t)if(i.path===""&&Av(i)!==ya){let o=new oc([],{});e[Av(i)]=o}return e}function aWe(t,n,e){return e.some(i=>jj(t,n,i)&&Av(i)!==ya)}function lWe(t,n,e){return e.some(i=>jj(t,n,i))}function jj(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function cWe(t,n,e){return n.length===0&&!t.children[e]}var woe=class{};function dWe(t,n,e,i,o,r,s="emptyOnly"){return new Soe(t,n,e,i,o,s,r).recognize()}var uWe=31,Soe=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,i,o,r,s,d){this.injector=n,this.configLoader=e,this.rootComponentType=i,this.config=o,this.urlTree=r,this.paramsInheritanceStrategy=s,this.urlSerializer=d,this.applyRedirects=new Coe(this.urlSerializer,this.urlTree)}noMatchError(n){return new mn(4002,`'${n.segmentGroup}'`)}recognize(){let n=vwe(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(vt(({children:e,rootSnapshot:i})=>{let o=new X_(i,e),r=new UV("",o),s=Rwe(i,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,r.url=this.urlSerializer.serialize(s),{state:r,tree:s}}))}match(n){let e=new UA([],Object.freeze({}),Object.freeze(be({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),ya,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,ya,e).pipe(vt(i=>({children:i,rootSnapshot:e})),Gd(i=>{if(i instanceof GV)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof jV?this.noMatchError(i):i}))}processSegmentGroup(n,e,i,o,r){return i.segments.length===0&&i.hasChildren()?this.processChildren(n,e,i,r):this.processSegment(n,e,i,i.segments,o,!0,r).pipe(vt(s=>s instanceof X_?[s]:[]))}processChildren(n,e,i,o){let r=[];for(let s of Object.keys(i.children))s==="primary"?r.unshift(s):r.push(s);return nr(r).pipe(lh(s=>{let d=i.children[s],m=IKe(e,s);return this.processSegmentGroup(n,m,d,s,o)}),iee((s,d)=>(s.push(...d),s)),q_(null),tee(),Yl(s=>{if(s===null)return MR(i);let d=Wwe(s);return pWe(d),ci(d)}))}processSegment(n,e,i,o,r,s,d){return nr(e).pipe(lh(m=>this.processSegmentAgainstRoute(m._injector??n,e,m,i,o,r,s,d).pipe(Gd(v=>{if(v instanceof jV)return ci(null);throw v}))),Vg(m=>!!m),Gd(m=>{if($we(m))return cWe(i,o,r)?ci(new woe):MR(i);throw m}))}processSegmentAgainstRoute(n,e,i,o,r,s,d,m){return Av(i)!==s&&(s===ya||!jj(o,r,i))?MR(o):i.redirectTo===void 0?this.matchSegmentAgainstRoute(n,o,i,r,s,m):this.allowRedirects&&d?this.expandSegmentAgainstRouteUsingRedirect(n,o,e,i,r,s,m):MR(o)}expandSegmentAgainstRouteUsingRedirect(n,e,i,o,r,s,d){let{matched:m,parameters:v,consumedSegments:w,positionalParamSegments:O,remainingSegments:N}=Kwe(e,o,r);if(!m)return MR(e);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>uWe&&(this.allowRedirects=!1));let V=new UA(r,v,Object.freeze(be({},this.urlTree.queryParams)),this.urlTree.fragment,bwe(o),Av(o),o.component??o._loadedComponent??null,o,Cwe(o)),$=Vj(V,d,this.paramsInheritanceStrategy);return V.params=Object.freeze($.params),V.data=Object.freeze($.data),this.applyRedirects.applyRedirectCommands(w,o.redirectTo,O,V,n).pipe(Mn(W=>this.applyRedirects.lineralizeSegments(o,W)),Yl(W=>this.processSegment(n,i,e,W.concat(N),s,!1,d)))}matchSegmentAgainstRoute(n,e,i,o,r,s){let d=nWe(e,i,o,n,this.urlSerializer);return i.path==="**"&&(e.children={}),d.pipe(Mn(m=>m.matched?(n=i._injector??n,this.getChildConfig(n,i,o).pipe(Mn(({routes:v})=>{let w=i._loadedInjector??n,{parameters:O,consumedSegments:N,remainingSegments:V}=m,$=new UA(N,O,Object.freeze(be({},this.urlTree.queryParams)),this.urlTree.fragment,bwe(i),Av(i),i.component??i._loadedComponent??null,i,Cwe(i)),q=Vj($,s,this.paramsInheritanceStrategy);$.params=Object.freeze(q.params),$.data=Object.freeze(q.data);let{segmentGroup:W,slicedSegments:te}=vwe(e,N,V,v);if(te.length===0&&W.hasChildren())return this.processChildren(w,v,W,$).pipe(vt(xe=>new X_($,xe)));if(v.length===0&&te.length===0)return ci(new X_($,[]));let fe=Av(i)===r;return this.processSegment(w,v,W,te,fe?ya:r,!0,$).pipe(vt(xe=>new X_($,xe instanceof X_?[xe]:[])))}))):MR(e)))}getChildConfig(n,e,i){return e.children?ci({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?ci({routes:e._loadedRoutes,injector:e._loadedInjector}):XKe(n,e,i,this.urlSerializer).pipe(Yl(o=>o?this.configLoader.loadChildren(n,e).pipe(Vo(r=>{e._loadedRoutes=r.routes,e._loadedInjector=r.injector})):tWe(e))):ci({routes:[],injector:n})}};function pWe(t){t.sort((n,e)=>n.value.outlet===ya?-1:e.value.outlet===ya?1:n.value.outlet.localeCompare(e.value.outlet))}function hWe(t){let n=t.value.routeConfig;return n&&n.path===""}function Wwe(t){let n=[],e=new Set;for(let i of t){if(!hWe(i)){n.push(i);continue}let o=n.find(r=>i.value.routeConfig===r.value.routeConfig);o!==void 0?(o.children.push(...i.children),e.add(o)):n.push(i)}for(let i of e){let o=Wwe(i.children);n.push(new X_(i.value,o))}return n.filter(i=>!e.has(i))}function bwe(t){return t.data||{}}function Cwe(t){return t.resolve||{}}function mWe(t,n,e,i,o,r){return Yl(s=>dWe(t,n,e,i,s.extractedUrl,o,r).pipe(vt(({state:d,tree:m})=>mt(be({},s),{targetSnapshot:d,urlAfterRedirects:m}))))}function fWe(t,n){return Yl(e=>{let{targetSnapshot:i,guards:{canActivateChecks:o}}=e;if(!o.length)return ci(e);let r=new Set(o.map(m=>m.route)),s=new Set;for(let m of r)if(!s.has(m))for(let v of Ywe(m))s.add(v);let d=0;return nr(s).pipe(lh(m=>r.has(m)?gWe(m,i,t,n):(m.data=Vj(m,m.parent,t).resolve,ci(void 0))),Vo(()=>d++),HO(1),Yl(m=>d===s.size?ci(e):cu))})}function Ywe(t){let n=t.children.map(e=>Ywe(e)).flat();return[t,...n]}function gWe(t,n,e,i){let o=t.routeConfig,r=t._resolve;return o?.title!==void 0&&!zwe(o)&&(r[$V]=o.title),fv(()=>(t.data=Vj(t,t.parent,e).resolve,_We(r,t,n,i).pipe(vt(s=>(t._resolvedData=s,t.data=be(be({},t.data),s),null)))))}function _We(t,n,e,i){let o=poe(t);if(o.length===0)return ci({});let r={};return nr(o).pipe(Yl(s=>yWe(t[s],n,e,i).pipe(Vg(),Vo(d=>{if(d instanceof UR)throw zj(new aI,d);r[s]=d}))),HO(1),vt(()=>r),Gd(s=>$we(s)?cu:HT(s)))}function yWe(t,n,e,i){let o=jR(n)??i,r=GR(t,o),s=r.resolve?r.resolve(n,e):dh(o,()=>r(n,e));return nw(s)}function doe(t){return Mn(n=>{let e=t(n);return e?nr(e).pipe(vt(()=>n)):ci(n)})}var Aoe=(()=>{class t{buildTitle(e){let i,o=e.root;for(;o!==void 0;)i=this.getResolvedTitleForRoute(o)??i,o=o.children.find(r=>r.outlet===ya);return i}getResolvedTitleForRoute(e){return e.data[$V]}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:()=>re(Qwe),providedIn:"root"})}return t})(),Qwe=(()=>{class t extends Aoe{title;constructor(e){super(),this.title=e}updateTitle(e){let i=this.buildTitle(e);i!==void 0&&this.title.setTitle(i)}static \u0275fac=function(i){return new(i||t)(di(bj))};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),dI=new fi("",{providedIn:"root",factory:()=>({})}),$R=new fi(""),Gj=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=re(lne);loadComponent(e,i){if(this.componentLoaders.get(i))return this.componentLoaders.get(i);if(i._loadedComponent)return ci(i._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(i);let o=nw(dh(e,()=>i.loadComponent())).pipe(vt(Xwe),Mn(Jwe),Vo(s=>{this.onLoadEndListener&&this.onLoadEndListener(i),i._loadedComponent=s}),yC(()=>{this.componentLoaders.delete(i)})),r=new OO(o,()=>new hi).pipe(MO());return this.componentLoaders.set(i,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return ci({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let r=Zwe(i,this.compiler,e,this.onLoadEndListener).pipe(yC(()=>{this.childrenLoaders.delete(i)})),s=new OO(r,()=>new hi).pipe(MO());return this.childrenLoaders.set(i,s),s}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Zwe(t,n,e,i){return nw(dh(e,()=>t.loadChildren())).pipe(vt(Xwe),Mn(Jwe),Yl(o=>o instanceof P9||Array.isArray(o)?ci(o):nr(n.compileModuleAsync(o))),vt(o=>{i&&i(t);let r,s,d=!1;return Array.isArray(o)?(s=o,d=!0):(r=o.create(e).injector,s=r.get($R,[],{optional:!0,self:!0}).flat()),{routes:s.map(Doe),injector:r}}))}function vWe(t){return t&&typeof t=="object"&&"default"in t}function Xwe(t){return vWe(t)?t.default:t}function Jwe(t){return ci(t)}var $j=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:()=>re(bWe),providedIn:"root"})}return t})(),bWe=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),koe=new fi(""),Moe=new fi("");function eSe(t,n,e){let i=t.get(Moe),o=t.get(Ao);if(!o.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(v=>setTimeout(v));let r,s=new Promise(v=>{r=v}),d=o.startViewTransition(()=>(r(),CWe(t)));d.ready.catch(v=>{});let{onViewTransitionCreated:m}=i;return m&&dh(t,()=>m({transition:d,from:n,to:e})),s}function CWe(t){return new Promise(n=>{Ou({read:()=>setTimeout(n)},{injector:t})})}var Ooe=new fi(""),qj=(()=>{class t{currentNavigation=Zn(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new hi;transitionAbortWithErrorSubject=new hi;configLoader=re(Gj);environmentInjector=re(Uc);destroyRef=re(jf);urlSerializer=re(jA);rootContexts=re(GA);location=re(Vm);inputBindingEnabled=re(KV,{optional:!0})!==null;titleStrategy=re(Aoe);options=re(dI,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=re($j);createViewTransition=re(koe,{optional:!0});navigationErrorHandler=re(Ooe,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>ci(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=o=>this.events.next(new Oj(o)),i=o=>this.events.next(new Rj(o));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let i=++this.navigationId;Ad(()=>{this.transitions?.next(mt(be({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:i}))})}setupNavigations(e){return this.transitions=new Gs(null),this.transitions.pipe(wn(i=>i!==null),Mn(i=>{let o=!1;return ci(i).pipe(Mn(r=>{if(this.navigationId>i.id)return this.cancelNavigationTransition(i,"",Kf.SupersededByNewNavigation),cu;this.currentTransition=i,this.currentNavigation.set({id:r.id,initialUrl:r.rawUrl,extractedUrl:r.extractedUrl,targetBrowserUrl:typeof r.extras.browserUrl=="string"?this.urlSerializer.parse(r.extras.browserUrl):r.extras.browserUrl,trigger:r.source,extras:r.extras,previousNavigation:this.lastSuccessfulNavigation?mt(be({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>r.abortController.abort()});let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=r.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&d!=="reload")return this.events.next(new RC(r.id,this.urlSerializer.serialize(r.rawUrl),"",LR.IgnoredSameUrlNavigation)),r.resolve(!1),cu;if(this.urlHandlingStrategy.shouldProcessUrl(r.rawUrl))return ci(r).pipe(Mn(m=>(this.events.next(new cI(m.id,this.urlSerializer.serialize(m.extractedUrl),m.source,m.restoredState)),m.id!==this.navigationId?cu:Promise.resolve(m))),mWe(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),Vo(m=>{i.targetSnapshot=m.targetSnapshot,i.urlAfterRedirects=m.urlAfterRedirects,this.currentNavigation.update(w=>(w.finalUrl=m.urlAfterRedirects,w));let v=new BV(m.id,this.urlSerializer.serialize(m.extractedUrl),this.urlSerializer.serialize(m.urlAfterRedirects),m.targetSnapshot);this.events.next(v)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(r.currentRawUrl)){let{id:m,extractedUrl:v,source:w,restoredState:O,extras:N}=r,V=new cI(m,this.urlSerializer.serialize(v),w,O);this.events.next(V);let $=Bwe(this.rootComponentType).snapshot;return this.currentTransition=i=mt(be({},r),{targetSnapshot:$,urlAfterRedirects:v,extras:mt(be({},N),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(q=>(q.finalUrl=v,q)),ci(i)}else return this.events.next(new RC(r.id,this.urlSerializer.serialize(r.extractedUrl),"",LR.IgnoredByUrlHandlingStrategy)),r.resolve(!1),cu}),Vo(r=>{let s=new Dj(r.id,this.urlSerializer.serialize(r.extractedUrl),this.urlSerializer.serialize(r.urlAfterRedirects),r.targetSnapshot);this.events.next(s)}),vt(r=>(this.currentTransition=i=mt(be({},r),{guards:RKe(r.targetSnapshot,r.currentSnapshot,this.rootContexts)}),i)),GKe(this.environmentInjector,r=>this.events.next(r)),Vo(r=>{if(i.guardsResult=r.guardsResult,r.guardsResult&&typeof r.guardsResult!="boolean")throw zj(this.urlSerializer,r.guardsResult);let s=new Aj(r.id,this.urlSerializer.serialize(r.extractedUrl),this.urlSerializer.serialize(r.urlAfterRedirects),r.targetSnapshot,!!r.guardsResult);this.events.next(s)}),wn(r=>r.guardsResult?!0:(this.cancelNavigationTransition(r,"",Kf.GuardRejected),!1)),doe(r=>{if(r.guards.canActivateChecks.length!==0)return ci(r).pipe(Vo(s=>{let d=new kj(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(d)}),Mn(s=>{let d=!1;return ci(s).pipe(fWe(this.paramsInheritanceStrategy,this.environmentInjector),Vo({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(s,"",Kf.NoDataFromResolver)}}))}),Vo(s=>{let d=new Mj(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(d)}))}),doe(r=>{let s=d=>{let m=[];if(d.routeConfig?.loadComponent){let v=jR(d)??this.environmentInjector;m.push(this.configLoader.loadComponent(v,d.routeConfig).pipe(Vo(w=>{d.component=w}),vt(()=>{})))}for(let v of d.children)m.push(...s(v));return m};return yc(s(r.targetSnapshot.root)).pipe(q_(null),Sn(1))}),doe(()=>this.afterPreactivation()),Mn(()=>{let{currentSnapshot:r,targetSnapshot:s}=i,d=this.createViewTransition?.(this.environmentInjector,r.root,s.root);return d?nr(d).pipe(vt(()=>i)):ci(i)}),vt(r=>{let s=DKe(e.routeReuseStrategy,r.targetSnapshot,r.currentRouterState);return this.currentTransition=i=mt(be({},r),{targetRouterState:s}),this.currentNavigation.update(d=>(d.targetRouterState=s,d)),i}),Vo(()=>{this.events.next(new VV)}),OKe(this.rootContexts,e.routeReuseStrategy,r=>this.events.next(r),this.inputBindingEnabled),Sn(1),cs(new Cr(r=>{let s=i.abortController.signal,d=()=>r.next();return s.addEventListener("abort",d),()=>s.removeEventListener("abort",d)}).pipe(wn(()=>!o&&!i.targetRouterState),Vo(()=>{this.cancelNavigationTransition(i,i.abortController.signal.reason+"",Kf.Aborted)}))),Vo({next:r=>{o=!0,this.lastSuccessfulNavigation=Ad(this.currentNavigation),this.events.next(new e0(r.id,this.urlSerializer.serialize(r.extractedUrl),this.urlSerializer.serialize(r.urlAfterRedirects))),this.titleStrategy?.updateTitle(r.targetRouterState.snapshot),r.resolve(!0)},complete:()=>{o=!0}}),cs(this.transitionAbortWithErrorSubject.pipe(Vo(r=>{throw r}))),yC(()=>{o||this.cancelNavigationTransition(i,"",Kf.SupersededByNewNavigation),this.currentTransition?.id===i.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Gd(r=>{if(this.destroyed)return i.resolve(!1),cu;if(o=!0,Gwe(r))this.events.next(new MC(i.id,this.urlSerializer.serialize(i.extractedUrl),r.message,r.cancellationCode)),MKe(r)?this.events.next(new zR(r.url,r.navigationBehaviorOptions)):i.resolve(!1);else{let s=new NR(i.id,this.urlSerializer.serialize(i.extractedUrl),r,i.targetSnapshot??void 0);try{let d=dh(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(d instanceof UR){let{message:m,cancellationCode:v}=zj(this.urlSerializer,d);this.events.next(new MC(i.id,this.urlSerializer.serialize(i.extractedUrl),m,v)),this.events.next(new zR(d.redirectTo,d.navigationBehaviorOptions))}else throw this.events.next(s),r}catch(d){this.options.resolveNavigationPromiseOnError?i.resolve(!1):i.reject(d)}}return cu}))}))}cancelNavigationTransition(e,i,o){let r=new MC(e.id,this.urlSerializer.serialize(e.extractedUrl),i,o);this.events.next(r),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),i=Ad(this.currentNavigation),o=i?.targetBrowserUrl??i?.extractedUrl;return e.toString()!==o?.toString()&&!i?.extras.skipLocationChange}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function xWe(t){return t!==FR}var tSe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:()=>re(wWe),providedIn:"root"})}return t})(),Hj=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},wWe=(()=>{class t extends Hj{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),iSe=(()=>{class t{urlSerializer=re(jA);options=re(dI,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=re(Vm);urlHandlingStrategy=re($j);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new OC;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:i,targetBrowserUrl:o}){let r=e!==void 0?this.urlHandlingStrategy.merge(e,i):i,s=o??r;return s instanceof OC?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:i,initialUrl:o}){i&&e?(this.currentUrlTree=i,this.rawUrlTree=this.urlHandlingStrategy.merge(i,o),this.routerState=e):this.rawUrlTree=o}routerState=Bwe(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:()=>re(SWe),providedIn:"root"})}return t})(),SWe=(()=>{class t extends iSe{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(i=>{i.type==="popstate"&&setTimeout(()=>{e(i.url,i.state,"popstate")})})}handleRouterEvent(e,i){e instanceof cI?this.updateStateMemento():e instanceof RC?this.commitTransition(i):e instanceof BV?this.urlUpdateStrategy==="eager"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(i),i)):e instanceof VV?(this.commitTransition(i),this.urlUpdateStrategy==="deferred"&&!i.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(i),i)):e instanceof MC&&e.code!==Kf.SupersededByNewNavigation&&e.code!==Kf.Redirect?this.restoreHistory(i):e instanceof NR?this.restoreHistory(i,!0):e instanceof e0&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:i,id:o}){let{replaceUrl:r,state:s}=i;if(this.location.isCurrentPathEqualTo(e)||r){let d=this.browserPageId,m=be(be({},s),this.generateNgRouterState(o,d));this.location.replaceState(e,"",m)}else{let d=be(be({},s),this.generateNgRouterState(o,this.browserPageId+1));this.location.go(e,"",d)}}restoreHistory(e,i=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,r=this.currentPageId-o;r!==0?this.location.historyGo(r):this.getCurrentUrlTree()===e.finalUrl&&r===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Kj(t,n){t.events.pipe(wn(e=>e instanceof e0||e instanceof MC||e instanceof NR||e instanceof RC),vt(e=>e instanceof e0||e instanceof RC?0:(e instanceof MC?e.code===Kf.Redirect||e.code===Kf.SupersededByNewNavigation:!1)?2:1),wn(e=>e!==2),Sn(1)).subscribe(()=>{n()})}var TWe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},IWe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},dl=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=re(B9);stateManager=re(iSe);options=re(dI,{optional:!0})||{};pendingTasks=re(IC);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=re(qj);urlSerializer=re(jA);location=re(Vm);urlHandlingStrategy=re($j);injector=re(Uc);_events=new hi;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=re(tSe);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=re($R,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!re(KV,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new Xr;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(i=>{try{let o=this.navigationTransitions.currentTransition,r=Ad(this.navigationTransitions.currentNavigation);if(o!==null&&r!==null){if(this.stateManager.handleRouterEvent(i,r),i instanceof MC&&i.code!==Kf.Redirect&&i.code!==Kf.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof e0)this.navigated=!0;else if(i instanceof zR){let s=i.navigationBehaviorOptions,d=this.urlHandlingStrategy.merge(i.url,o.currentRawUrl),m=be({browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||xWe(o.source)},s);this.scheduleNavigation(d,FR,null,m,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}SKe(i)&&this._events.next(i)}catch(o){this.navigationTransitions.transitionAbortWithErrorSubject.next(o)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),FR,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,i,o)=>{this.navigateToSyncWithBrowser(e,o,i)})}navigateToSyncWithBrowser(e,i,o){let r={replaceUrl:!0},s=o?.navigationId?o:null;if(o){let m=be({},o);delete m.navigationId,delete m.\u0275routerPageId,Object.keys(m).length!==0&&(r.state=m)}let d=this.parseUrl(e);this.scheduleNavigation(d,i,s,r).catch(m=>{this.disposed||this.injector.get(Gf)(m)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return Ad(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Doe),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,i={}){let{relativeTo:o,queryParams:r,fragment:s,queryParamsHandling:d,preserveFragment:m}=i,v=m?this.currentUrlTree.fragment:s,w=null;switch(d??this.options.defaultQueryParamsHandling){case"merge":w=be(be({},this.currentUrlTree.queryParams),r);break;case"preserve":w=this.currentUrlTree.queryParams;break;default:w=r||null}w!==null&&(w=this.removeEmptyProps(w));let O;try{let N=o?o.snapshot:this.routerState.snapshot.root;O=Fwe(N)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),O=this.currentUrlTree.root}return Pwe(O,e,w,v??null)}navigateByUrl(e,i={skipLocationChange:!1}){let o=lI(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(r,FR,null,i)}navigate(e,i={skipLocationChange:!1}){return EWe(e),this.navigateByUrl(this.createUrlTree(e,i),i)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,i){let o;if(i===!0?o=be({},TWe):i===!1?o=be({},IWe):o=i,lI(e))return fwe(this.currentUrlTree,e,o);let r=this.parseUrl(e);return fwe(this.currentUrlTree,r,o)}removeEmptyProps(e){return Object.entries(e).reduce((i,[o,r])=>(r!=null&&(i[o]=r),i),{})}scheduleNavigation(e,i,o,r,s){if(this.disposed)return Promise.resolve(!1);let d,m,v;s?(d=s.resolve,m=s.reject,v=s.promise):v=new Promise((O,N)=>{d=O,m=N});let w=this.pendingTasks.add();return Kj(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(w))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:r,resolve:d,reject:m,promise:v,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),v.catch(O=>Promise.reject(O))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function EWe(t){for(let n=0;n{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=Zn(null);get href(){return Ad(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new hi;applicationErrorHandler=re(Gf);options=re(dI,{optional:!0});constructor(e,i,o,r,s,d){this.router=e,this.route=i,this.tabIndexAttribute=o,this.renderer=r,this.el=s,this.locationStrategy=d,this.reactiveHref.set(re(new Bm("href"),{optional:!0}));let m=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=m==="a"||m==="area"||!!(typeof customElements=="object"&&customElements.get(m)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,i=o=>o==="merge"||o==="preserve";e||=i(this.queryParamsHandling),e||=!this.queryParamsHandling&&!i(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(o=>{o instanceof e0&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(lI(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,i,o,r,s){let d=this.urlTree;if(d===null||this.isAnchorElement&&(e!==0||i||o||r||s||typeof this.target=="string"&&this.target!="_self"))return!0;let m={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(d,m)?.catch(v=>{this.applicationErrorHandler(v)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,i){let o=this.renderer,r=this.el.nativeElement;i!==null?o.setAttribute(r,e,i):o.removeAttribute(r,e)}get urlTree(){return this.routerLinkInput===null?null:lI(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(i){return new(i||t)(_e(dl),_e(vl),JB("tabindex"),_e(Ps),_e(Bn),_e(Iv))};static \u0275dir=rn({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(i,o){i&1&&ie("click",function(s){return o.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),i&2&&Ge("href",o.reactiveHref(),vie)("target",o.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",je],skipLocationChange:[2,"skipLocationChange","skipLocationChange",je],replaceUrl:[2,"replaceUrl","replaceUrl",je],routerLink:"routerLink"},features:[Ot]})}return t})(),Foe=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new ve;constructor(e,i,o,r,s){this.router=e,this.element=i,this.renderer=o,this.cdr=r,this.link=s,this.routerEventsSubscription=e.events.subscribe(d=>{d instanceof e0&&this.update()})}ngAfterContentInit(){ci(this.links.changes,ci(null)).pipe(gC()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=nr(e).pipe(gC()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(e){let i=Array.isArray(e)?e:e.split(" ");this.classes=i.filter(o=>!!o)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(i=>{e?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let i=DWe(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return o=>{let r=o.urlTree;return r?e.isActive(r,i):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(i){return new(i||t)(_e(dl),_e(Bn),_e(Ps),_e(Gi),_e(Bs,8))};static \u0275dir=rn({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(i,o,r){if(i&1&&xt(r,Bs,5),i&2){let s;Le(s=Ne())&&(o.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Ot]})}return t})();function DWe(t){return!!t.paths}var YV=class{};var nSe=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,i,o,r){this.router=e,this.injector=i,this.preloadingStrategy=o,this.loader=r}setUpPreloading(){this.subscription=this.router.events.pipe(wn(e=>e instanceof e0),lh(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){let o=[];for(let r of i){r.providers&&!r._injector&&(r._injector=bR(r.providers,e,`Route: ${r.path}`));let s=r._injector??e,d=r._loadedInjector??s;(r.loadChildren&&!r._loadedRoutes&&r.canLoad===void 0||r.loadComponent&&!r._loadedComponent)&&o.push(this.preloadConfig(s,r)),(r.children||r._loadedRoutes)&&o.push(this.processRoutes(d,r.children??r._loadedRoutes))}return nr(o).pipe(gC())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let o;i.loadChildren&&i.canLoad===void 0?o=this.loader.loadChildren(e,i):o=ci(null);let r=o.pipe(Yl(s=>s===null?ci(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));if(i.loadComponent&&!i._loadedComponent){let s=this.loader.loadComponent(e,i);return nr([r,s]).pipe(gC())}else return r})}static \u0275fac=function(i){return new(i||t)(di(dl),di(Uc),di(YV),di(Gj))};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),oSe=new fi(""),AWe=(()=>{class t{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=FR;restoredId=0;store={};constructor(e,i,o,r,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=o,this.zone=r,this.options=s,s.scrollPositionRestoration||="disabled",s.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof cI?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof e0?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof RC&&e.code===LR.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof VR&&(e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>bt(this,null,function*(){yield new Promise(o=>{setTimeout(o),typeof requestAnimationFrame<"u"&&requestAnimationFrame(o)}),this.zone.run(()=>{this.transitions.events.next(new VR(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,i))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(i){sV()};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();function kWe(t){return t.routerState.root}function QV(t,n){return{\u0275kind:t,\u0275providers:n}}function MWe(){let t=re(Oo);return n=>{let e=t.get(Rp);if(n!==e.components[0])return;let i=t.get(dl),o=t.get(rSe);t.get(Poe)===1&&i.initialNavigation(),t.get(lSe,null,{optional:!0})?.setUpPreloading(),t.get(oSe,null,{optional:!0})?.init(),i.resetRootComponentType(e.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var rSe=new fi("",{factory:()=>new hi}),Poe=new fi("",{providedIn:"root",factory:()=>1});function sSe(){let t=[{provide:C9,useValue:!0},{provide:Poe,useValue:0},nI(()=>{let n=re(Oo);return n.get(Ene,Promise.resolve()).then(()=>new Promise(i=>{let o=n.get(dl),r=n.get(rSe);Kj(o,()=>{i(!0)}),n.get(qj).afterPreactivation=()=>(i(!0),r.closed?ci(void 0):r),o.initialNavigation()}))})];return QV(2,t)}function aSe(){let t=[nI(()=>{re(dl).setUpLocationChangeListener()}),{provide:Poe,useValue:2}];return QV(3,t)}var lSe=new fi("");function cSe(t){return QV(0,[{provide:lSe,useExisting:nSe},{provide:YV,useExisting:t}])}function dSe(){return QV(8,[Ioe,{provide:KV,useExisting:Ioe}])}function uSe(t){wv("NgRouterViewTransitions");let n=[{provide:koe,useValue:eSe},{provide:Moe,useValue:be({skipNextTransition:!!t?.skipInitialTransition},t)}];return QV(9,n)}var pSe=[Vm,{provide:jA,useClass:aI},dl,GA,{provide:vl,useFactory:kWe,deps:[dl]},Gj,[]],Pp=(()=>{class t{constructor(){}static forRoot(e,i){return{ngModule:t,providers:[pSe,[],{provide:$R,multi:!0,useValue:e},[],i?.errorHandler?{provide:Ooe,useValue:i.errorHandler}:[],{provide:dI,useValue:i||{}},i?.useHash?RWe():FWe(),OWe(),i?.preloadingStrategy?cSe(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?PWe(i):[],i?.bindToComponentInputs?dSe().\u0275providers:[],i?.enableViewTransitions?uSe().\u0275providers:[],LWe()]}}static forChild(e){return{ngModule:t,providers:[{provide:$R,multi:!0,useValue:e}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();function OWe(){return{provide:oSe,useFactory:()=>{let t=re(K1e),n=re(_n),e=re(dI),i=re(qj),o=re(jA);return e.scrollOffset&&t.setOffset(e.scrollOffset),new AWe(o,i,t,n,e)}}}function RWe(){return{provide:Iv,useClass:Lne}}function FWe(){return{provide:Iv,useClass:J9}}function PWe(t){return[t.initialNavigation==="disabled"?aSe().\u0275providers:[],t.initialNavigation==="enabledBlocking"?sSe().\u0275providers:[]]}var Roe=new fi("");function LWe(){return[{provide:Roe,useFactory:MWe},{provide:U9,multi:!0,useExisting:Roe}]}var Loe={privacy:{enabled:!0,link:"https://www.bindoc.de/datenschutz"},documentation:{enabled:!0,link:"https://bindoc.atlassian.net/wiki/spaces/HP/overview"},siteNotice:{enabled:!0,link:"https://www.bindoc.de/impressum"},status:{enabled:!1,link:"https://status.bindoc.de/"}};var hSe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-user-cookie-reset-link"]],decls:3,vars:0,consts:[["href","#CCM.openWidget"],[1,"mat-caption"]],template:function(i,o){i&1&&(Go(0,"a",0)(1,"span",1),Q(2,"Cookie Einstellungen"),Ho()())},styles:["a[_ngcontent-%COMP%]{vertical-align:middle;text-decoration:none;color:#0000008a;cursor:pointer}a[_ngcontent-%COMP%]:hover{color:#000}"]})}}return t})();function NWe(t,n){if(t&1&&(k(0,"li",6)(1,"a",8)(2,"span",5),Q(3,"Datenschutz"),D()()()),t&2){let e=P();T(),E("href",e.options.privacy.link,dc)}}function BWe(t,n){if(t&1&&(k(0,"li",6)(1,"a",8)(2,"span",5),Q(3,"Dokumentation"),D()()()),t&2){let e=P();T(),E("href",e.options.documentation.link,dc)}}function VWe(t,n){if(t&1&&(k(0,"li")(1,"a",8)(2,"span",5),Q(3,"Impressum"),D()()()),t&2){let e=P();T(),E("href",e.options.siteNotice.link,dc)}}function zWe(t,n){if(t&1&&(k(0,"li",6)(1,"a",8)(2,"span",5),Q(3,"Status"),D()()()),t&2){let e=P();T(),E("href",e.options.status.link,dc)}}var Noe=(()=>{class t{constructor(){this.options=Loe}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-footer"]],inputs:{options:"options"},decls:20,vars:4,consts:[[1,"flex","flex-row","justify-center"],[1,""],[1,"flex","flex-wrap","items-center","justify-center"],["href","https://www.bindoc.de","target","_blank","rel","noopener"],["alt","BinDoc GmbH","height","40px","src","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNjEuODYgMzYxLjg2Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzQ1MmE3MTt9LmNscy0ye2ZpbGw6I2Y1OGIyNTt9LmNscy0ze2ZpbGw6IzNmOTg0Njt9LmNscy00e2ZpbGw6I2E2MjE2Yjt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPkFzIGZhdmljb24gZm9yIGJyb3dzZXINPC90aXRsZT48ZyBpZD0ibG9nbyI+PGNpcmNsZSBjbGFzcz0iY2xzLTEiIGN4PSIyOC4xOCIgY3k9IjEyNi45MSIgcj0iMjcuMjciLz48Y2lyY2xlIGNsYXNzPSJjbHMtMiIgY3g9Ijg4Ljc5IiBjeT0iMTI2LjkxIiByPSIyNy4yNyIvPjxjaXJjbGUgY2xhc3M9ImNscy0zIiBjeD0iMTUwLjMxIiBjeT0iMTI2LjkxIiByPSIyNy4yNyIvPjxjaXJjbGUgY2xhc3M9ImNscy00IiBjeD0iMjExLjE2IiBjeT0iMTI2LjkxIiByPSIyNy4yNyIvPjxjaXJjbGUgY2xhc3M9ImNscy0xIiBjeD0iMjcxLjM0IiBjeT0iMTI2LjkxIiByPSIyNy4yNyIvPjxjaXJjbGUgY2xhc3M9ImNscy0yIiBjeD0iMzMzLjY4IiBjeT0iMTI2LjkxIiByPSIyNy4yNyIvPjxwYXRoIGNsYXNzPSJjbHMtMiIgZD0iTTMzMy42OCwxMjQuNGEyLjUxLDIuNTEsMCwwLDAtMi41MiwyLjUxVjI0My4zOUgyMDEuNTJhMi41MiwyLjUyLDAsMCwwLTIuNTIsMi41MnYxNi4zaDVWMjQ4LjQzSDMzMy42OGEyLjUxLDIuNTEsMCwwLDAsMi41MS0yLjUydi0xMTlBMi41MSwyLjUxLDAsMCwwLDMzMy42OCwxMjQuNFoiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0yNzEuMzQsMTE0LjMyYTIuNTEsMi41MSwwLDAsMC0yLjUxLDIuNTJWMjMxLjdIMTkwLjI2YTIuNTEsMi41MSwwLDAsMC0yLjUyLDIuNTF2MjhoNVYyMzYuNzNoNzguNTZhMi41MiwyLjUyLDAsMCwwLDIuNTItMi41MlYxMTYuODRBMi41MiwyLjUyLDAsMCwwLDI3MS4zNCwxMTQuMzJaIi8+PHBhdGggY2xhc3M9ImNscy00IiBkPSJNMTgwLjgyLDI2Mi4yMVYyMjUuOTRoMzAuMzRhMi41MiwyLjUyLDAsMCwwLDIuNTItMi41MlYxMDUuODdhMi41MiwyLjUyLDAsMCwwLTUsMHYxMTVIMTc4LjMxYTIuNTIsMi41MiwwLDAsMC0yLjUyLDIuNTJ2MzguNzlaIi8+PHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTUwLjMxLDIyNS45NEgxNjIuNHYzNi4yN2g1VjIyMy40MmEyLjUyLDIuNTIsMCwwLDAtMi41Mi0yLjUySDE1Mi44M3YtMTE1YTIuNTIsMi41MiwwLDAsMC01LDBWMjIzLjQyQTIuNTIsMi41MiwwLDAsMCwxNTAuMzEsMjI1Ljk0WiIvPjxwYXRoIGNsYXNzPSJjbHMtMiIgZD0iTTg4Ljc5LDIzNi43M2g2Mi44MnYyNS40OGg1di0yOGEyLjUxLDIuNTEsMCwwLDAtMi41Mi0yLjUxSDkxLjMxVjExNi44NGEyLjUyLDIuNTIsMCwxLDAtNSwwVjIzNC4yMUEyLjUyLDIuNTIsMCwwLDAsODguNzksMjM2LjczWiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTE0MC42MywyNjIuMjFoNVYyNDQuMjlhMi41MiwyLjUyLDAsMCwwLTIuNTItMi41MkgzMC43VjEyNi45MWEyLjUyLDIuNTIsMCwwLDAtNSwwVjI0NC4yOWEyLjUyLDIuNTIsMCwwLDAsMi41MiwyLjUySDE0MC42M1oiLz48L2c+PC9zdmc+"],[1,"mat-caption"],[1,"hidden","sm:block"],["rel","nofollow noopener","target","_blank","href","https://bindocwebassets.z1.web.core.windows.net/legal/licenses-combined.min.html"],["target","_blank","rel","noopener",3,"href"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"ul",2)(3,"li")(4,"a",3),ce(5,"img",4),D()(),k(6,"li")(7,"a",3)(8,"span",5),Q(9,"BinDoc GmbH"),D()()(),qe(10,NWe,4,1,"li",6),qe(11,BWe,4,1,"li",6),qe(12,VWe,4,1,"li"),qe(13,zWe,4,1,"li",6),k(14,"li")(15,"a",7)(16,"span",5),Q(17,"Drittanbieter Lizenzen"),D()()(),k(18,"li"),ce(19,"bd-user-cookie-reset-link"),D()()()()),i&2&&(T(10),Ke(o.options.privacy.enabled?10:-1),T(),Ke(o.options.documentation.enabled?11:-1),T(),Ke(o.options.siteNotice.enabled?12:-1),T(),Ke(o.options.status.enabled?13:-1))},dependencies:[hSe],styles:["span.mat-caption[_ngcontent-%COMP%]{padding:0 12px}li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{vertical-align:middle;text-decoration:none;color:#0000008a}li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover{color:#000}li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{filter:grayscale(100%);width:40px;height:40px;display:inline-block}li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]:hover{filter:none}"]})}}return t})();var mSe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["app-root"]],standalone:!1,decls:2,vars:0,template:function(i,o){i&1&&ce(0,"router-outlet")(1,"bd-footer")},dependencies:[qV,Noe],encapsulation:2})}}return t})();var fSe=[{path:"**",redirectTo:""}];var ZV=class{constructor(n,e){this.key=n,this.value=e}};var qR=class{constructor(n=10){this.limit=n,this.size=0,this.map={},this.head=null,this.tail=null}setHead(n){n.next=this.head,n.prev=null,this.head!==null&&(this.head.prev=n),this.head=n,this.tail===null&&(this.tail=n),this.size++,this.map[n.key]=n}set(n,e){let i=new ZV(n,e);this.map[n]?(this.map[n].value=i.value,this.remove(i.key)):this.size>=this.limit&&(delete this.map[this.tail.key],this.size--,this.tail=this.tail.prev,this.tail.next=null),this.setHead(i)}get(n){let e=null;if(this.map[n]){e=this.map[n].value;let i=new ZV(n,e);this.remove(n),this.setHead(i)}return e}remove(n){let e=this.map[n];e.prev!==null?e.prev.next=e.next:this.head=e.next,e.next!==null?e.next.prev=e.prev:this.tail=e.prev,delete this.map[n],this.size--}};var Boe=(()=>{class t{transform(e,i){let o=i.length>0?parseInt(i[0],10):20,r=i.length>1?i[1]:"...";return e.length>o?e.substring(0,o)+r:e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=Dd({name:"truncate",type:t,pure:!0})}}return t})();var Lp=(()=>{class t{constructor(e,i){this.el=e,this.renderer=i}ngOnChanges(){for(;this.testId.includes(" ");)this.testId=this.testId.replace(" ","_");this.renderer.setAttribute(this.el.nativeElement,"data-test",this.testId)}static{this.\u0275fac=function(i){return new(i||t)(_e(Bn),_e(Ps))}}static{this.\u0275dir=rn({type:t,selectors:[["","data-test",""]],inputs:{testId:[0,"data-test","testId"]},features:[Ot]})}}return t})();var Wj=(()=>{class t{constructor(e,i){this.document=e,this.rendererFactory=i,this._scriptsLoaded={}}removeJsScript(e){this._scriptsLoaded[e]&&(delete this._scriptsLoaded[e],this.document.getElementById(e).remove())}loadJsScript(e,i=[],o=this.document.body){let r=new hi;if(this._scriptsLoaded[e.id])return ci(this.document.getElementById(e.id));let s=this._renderer().createElement("script");return s.id=e.id,s.type="text/javascript",s.src=e.src,i.forEach(d=>s.setAttribute(d[0],d[1])),s.onload=()=>{r.next(s)},this._scriptsLoaded[e.id]=!0,this._renderer().appendChild(o,s),r}_renderer(){return this.rendererFactory.createRenderer(null,null)}static{this.\u0275fac=function(i){return new(i||t)(di(Ao),di(bc))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var kd=(()=>{class t{static title(e){return{primaryKeyword:`${e}`}}constructor(e,i,o){this._router=e,this._titleService=i,this._brand=o,this._maxTitleLength=60,this._brand=this._brand?this._brand:"BinDoc"}init(){this._router.events.pipe(wn(e=>e instanceof BR),wn(e=>e.snapshot.children.length===0)).subscribe(e=>this.updateTitle(this._pageTitleFromRoute(e)))}pageTitleText(e){return e?(e.length>this._maxTitleLength&&(e=e.slice(0,this._maxTitleLength-3).concat("...")),`${e} | ${this._brand}`):this._brand}updateTitle(e){this._titleService.setTitle(e)}_pageTitleFromRoute(e){if(e.snapshot.data&&e.snapshot.data.pageTitle){let i=e.snapshot.data.pageTitle.primaryKeyword;return this.pageTitleText(i)}else return this._brand}static{this.\u0275fac=function(i){return new(i||t)(di(dl),di(bj),di("BD_PAGE_TITLE_BRAND",8))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var rc={position:"center",modal:!0,width:"75%",closable:!0,closeOnEscape:!0,maximizable:!0,breakpoints:{"640px":"100%","768px":"90%","1024px":"85%","1280px":"80%"}};var UG={};Ng(UG,{addClientCapabilitiesToClaims:()=>YYe,blockAPICallsBeforeInitialize:()=>VG,blockAcquireTokenInPopups:()=>oTe,blockNonBrowserEnvironment:()=>BG,blockRedirectInIframe:()=>nTe,blockReloadInHiddenIframes:()=>iTe,clearHash:()=>r5,createGuid:()=>fse,getCurrentUri:()=>eg,getHomepage:()=>mse,invoke:()=>Yd,invokeAsync:()=>Zi,isInIframe:()=>s5,isInPopup:()=>tTe,preconnect:()=>l5,preflightCheck:()=>a5,redirectPreflightCheck:()=>zG,replaceHash:()=>hse});var cn={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},kv={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,GONE:410,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},ey={GET:"GET",POST:"POST"},t0=[cn.OPENID_SCOPE,cn.PROFILE_SCOPE,cn.OFFLINE_ACCESS_SCOPE],Voe=[...t0,cn.EMAIL_SCOPE],Fu={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},Yj={ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},Mv={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},WR={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},Pu={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"};var XV={CODE:"code",IDTOKEN_TOKEN:"id_token token",IDTOKEN_TOKEN_REFRESHTOKEN:"id_token token refresh_token"},FC={QUERY:"query",FRAGMENT:"fragment"},zoe={QUERY:"query",FRAGMENT:"fragment",FORM_POST:"form_post"},JV={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},YR={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},ow={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},Lu={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"};var e4="appmetadata",gSe="client_info",$A="1",QR={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Wf={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},Np={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},va={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},rw={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Qj={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Zj={username:"username",password:"password"},qA={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},Xj={CONFIGURED_NO_AUTO_DETECTION:"2",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},PC={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},Jj={Jwt:"JWT",Jwk:"JWK",Pop:"pop"};var t4=300;var uI={};Ng(uI,{postRequestFailed:()=>n4,unexpectedError:()=>i4});var i4="unexpected_error",n4="post_request_failed";var eG={[i4]:"Unexpected error in authentication.",[n4]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."},_Se={unexpectedError:{code:i4,desc:eG[i4]},postRequestFailed:{code:n4,desc:eG[n4]}},Rs=class t extends Error{constructor(n,e,i){let o=e?`${n}: ${e}`:n;super(o),Object.setPrototypeOf(this,t.prototype),this.errorCode=n||cn.EMPTY_STRING,this.errorMessage=e||cn.EMPTY_STRING,this.subError=i||cn.EMPTY_STRING,this.name="AuthError"}setCorrelationId(n){this.correlationId=n}};function ZR(t,n){return new Rs(t,n?`${eG[t]} ${n}`:eG[t])}var Bp={};Ng(Bp,{authTimeNotFound:()=>sw,authorizationCodeMissingFromServerResponse:()=>ak,bindingKeyNotRemoved:()=>m4,cannotAppendScopeSet:()=>ok,cannotRemoveEmptyScope:()=>nk,clientInfoDecodingError:()=>pI,clientInfoEmptyError:()=>KA,deviceCodeExpired:()=>a4,deviceCodePollingCancelled:()=>s4,deviceCodeUnknownError:()=>l4,emptyInputScopeSet:()=>fI,endSessionEndpointNotSupported:()=>lk,endpointResolutionError:()=>Yf,hashNotDeserialized:()=>ZA,invalidAssertion:()=>u4,invalidCacheEnvironment:()=>lw,invalidCacheRecord:()=>rk,invalidClientCredential:()=>p4,invalidState:()=>Ov,keyIdMissing:()=>ck,maxAgeTranspired:()=>ek,methodNotImplemented:()=>ca,missingTenantIdError:()=>_4,multipleMatchingAccounts:()=>r4,multipleMatchingAppMetadata:()=>tk,multipleMatchingTokens:()=>o4,nestedAppAuthBridgeDisabled:()=>y4,networkError:()=>YA,noAccountFound:()=>c4,noAccountInSilentRequest:()=>aw,noCryptoObject:()=>gI,noNetworkConnectivity:()=>f4,nonceMismatch:()=>JA,nullOrEmptyToken:()=>WA,openIdConfigError:()=>QA,requestCannotBeMade:()=>ik,stateMismatch:()=>XA,stateNotFound:()=>mI,tokenClaimsCnfRequiredForSignedJwt:()=>sk,tokenParsingError:()=>hI,tokenRefreshRequired:()=>cw,unexpectedCredentialType:()=>d4,userCanceled:()=>g4,userTimeoutReached:()=>h4});var pI="client_info_decoding_error",KA="client_info_empty_error",hI="token_parsing_error",WA="null_or_empty_token",Yf="endpoints_resolution_error",YA="network_error",QA="openid_config_error",ZA="hash_not_deserialized",Ov="invalid_state",XA="state_mismatch",mI="state_not_found",JA="nonce_mismatch",sw="auth_time_not_found",ek="max_age_transpired",o4="multiple_matching_tokens",r4="multiple_matching_accounts",tk="multiple_matching_appMetadata",ik="request_cannot_be_made",nk="cannot_remove_empty_scope",ok="cannot_append_scopeset",fI="empty_input_scopeset",s4="device_code_polling_cancelled",a4="device_code_expired",l4="device_code_unknown_error",aw="no_account_in_silent_request",rk="invalid_cache_record",lw="invalid_cache_environment",c4="no_account_found",gI="no_crypto_object",d4="unexpected_credential_type",u4="invalid_assertion",p4="invalid_client_credential",cw="token_refresh_required",h4="user_timeout_reached",sk="token_claims_cnf_required_for_signedjwt",ak="authorization_code_missing_from_server_response",m4="binding_key_not_removed",lk="end_session_endpoint_not_supported",ck="key_id_missing",f4="no_network_connectivity",g4="user_canceled",_4="missing_tenant_id_error",ca="method_not_implemented",y4="nested_app_auth_bridge_disabled";var ea={[pI]:"The client info could not be parsed/decoded correctly",[KA]:"The client info was empty",[hI]:"Token cannot be parsed",[WA]:"The token is null or empty",[Yf]:"Endpoints cannot be resolved",[YA]:"Network request failed",[QA]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[ZA]:"The hash parameters could not be deserialized",[Ov]:"State was not the expected format",[XA]:"State mismatch error",[mI]:"State not found",[JA]:"Nonce mismatch error",[sw]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[ek]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[o4]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[r4]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[tk]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[ik]:"Token request cannot be made without authorization code or refresh token.",[nk]:"Cannot remove null or empty scope from ScopeSet",[ok]:"Cannot append ScopeSet",[fI]:"Empty input ScopeSet cannot be processed",[s4]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[a4]:"Device code is expired.",[l4]:"Device code stopped polling for unknown reasons.",[aw]:"Please pass an account object, silent flow is not supported without account information",[rk]:"Cache record object was null or undefined.",[lw]:"Invalid environment when attempting to create cache entry",[c4]:"No account found in cache for given key.",[gI]:"No crypto object detected.",[d4]:"Unexpected credential type.",[u4]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[p4]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[cw]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[h4]:"User defined timeout for device code polling reached",[sk]:"Cannot generate a POP jwt if the token_claims are not populated",[ak]:"Server response does not contain an authorization code to proceed",[m4]:"Could not remove the credential's binding key from storage.",[lk]:"The provided authority does not support logout",[ck]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[f4]:"No network connectivity. Check your internet connection.",[g4]:"User cancelled the flow.",[_4]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[ca]:"This method has not been implemented",[y4]:"The nested app auth bridge is disabled"},ySe={clientInfoDecodingError:{code:pI,desc:ea[pI]},clientInfoEmptyError:{code:KA,desc:ea[KA]},tokenParsingError:{code:hI,desc:ea[hI]},nullOrEmptyToken:{code:WA,desc:ea[WA]},endpointResolutionError:{code:Yf,desc:ea[Yf]},networkError:{code:YA,desc:ea[YA]},unableToGetOpenidConfigError:{code:QA,desc:ea[QA]},hashNotDeserialized:{code:ZA,desc:ea[ZA]},invalidStateError:{code:Ov,desc:ea[Ov]},stateMismatchError:{code:XA,desc:ea[XA]},stateNotFoundError:{code:mI,desc:ea[mI]},nonceMismatchError:{code:JA,desc:ea[JA]},authTimeNotFoundError:{code:sw,desc:ea[sw]},maxAgeTranspired:{code:ek,desc:ea[ek]},multipleMatchingTokens:{code:o4,desc:ea[o4]},multipleMatchingAccounts:{code:r4,desc:ea[r4]},multipleMatchingAppMetadata:{code:tk,desc:ea[tk]},tokenRequestCannotBeMade:{code:ik,desc:ea[ik]},removeEmptyScopeError:{code:nk,desc:ea[nk]},appendScopeSetError:{code:ok,desc:ea[ok]},emptyInputScopeSetError:{code:fI,desc:ea[fI]},DeviceCodePollingCancelled:{code:s4,desc:ea[s4]},DeviceCodeExpired:{code:a4,desc:ea[a4]},DeviceCodeUnknownError:{code:l4,desc:ea[l4]},NoAccountInSilentRequest:{code:aw,desc:ea[aw]},invalidCacheRecord:{code:rk,desc:ea[rk]},invalidCacheEnvironment:{code:lw,desc:ea[lw]},noAccountFound:{code:c4,desc:ea[c4]},noCryptoObj:{code:gI,desc:ea[gI]},unexpectedCredentialType:{code:d4,desc:ea[d4]},invalidAssertion:{code:u4,desc:ea[u4]},invalidClientCredential:{code:p4,desc:ea[p4]},tokenRefreshRequired:{code:cw,desc:ea[cw]},userTimeoutReached:{code:h4,desc:ea[h4]},tokenClaimsRequired:{code:sk,desc:ea[sk]},noAuthorizationCodeFromServer:{code:ak,desc:ea[ak]},bindingKeyNotRemovedError:{code:m4,desc:ea[m4]},logoutNotSupported:{code:lk,desc:ea[lk]},keyIdMissing:{code:ck,desc:ea[ck]},noNetworkConnectivity:{code:f4,desc:ea[f4]},userCanceledError:{code:g4,desc:ea[g4]},missingTenantIdError:{code:_4,desc:ea[_4]},nestedAppAuthBridgeDisabled:{code:y4,desc:ea[y4]}},v4=class t extends Rs{constructor(n,e){super(n,e?`${ea[n]}: ${e}`:ea[n]),this.name="ClientAuthError",Object.setPrototypeOf(this,t.prototype)}};function Dn(t,n){return new v4(t,n)}var _I={createNewGuid:()=>{throw Dn(ca)},base64Decode:()=>{throw Dn(ca)},base64Encode:()=>{throw Dn(ca)},base64UrlEncode:()=>{throw Dn(ca)},encodeKid:()=>{throw Dn(ca)},getPublicKeyThumbprint(){return bt(this,null,function*(){throw Dn(ca)})},removeTokenBindingKey(){return bt(this,null,function*(){throw Dn(ca)})},clearKeystore(){return bt(this,null,function*(){throw Dn(ca)})},signJwt(){return bt(this,null,function*(){throw Dn(ca)})},hashString(){return bt(this,null,function*(){throw Dn(ca)})}};var Oc=(function(t){return t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose",t[t.Trace=4]="Trace",t})(Oc||{}),Qf=class t{constructor(n,e,i){this.level=Oc.Info;let o=()=>{},r=n||t.createDefaultLoggerOptions();this.localCallback=r.loggerCallback||o,this.piiLoggingEnabled=r.piiLoggingEnabled||!1,this.level=typeof r.logLevel=="number"?r.logLevel:Oc.Info,this.correlationId=r.correlationId||cn.EMPTY_STRING,this.packageName=e||cn.EMPTY_STRING,this.packageVersion=i||cn.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Oc.Info}}clone(n,e,i){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:i||this.correlationId},n,e)}logMessage(n,e){if(e.logLevel>this.level||!this.piiLoggingEnabled&&e.containsPii)return;let r=`${`[${new Date().toUTCString()}] : [${e.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Oc[e.logLevel]} - ${n}`;this.executeCallback(e.logLevel,r,e.containsPii||!1)}executeCallback(n,e,i){this.localCallback&&this.localCallback(n,e,i)}error(n,e){this.logMessage(n,{logLevel:Oc.Error,containsPii:!1,correlationId:e||cn.EMPTY_STRING})}errorPii(n,e){this.logMessage(n,{logLevel:Oc.Error,containsPii:!0,correlationId:e||cn.EMPTY_STRING})}warning(n,e){this.logMessage(n,{logLevel:Oc.Warning,containsPii:!1,correlationId:e||cn.EMPTY_STRING})}warningPii(n,e){this.logMessage(n,{logLevel:Oc.Warning,containsPii:!0,correlationId:e||cn.EMPTY_STRING})}info(n,e){this.logMessage(n,{logLevel:Oc.Info,containsPii:!1,correlationId:e||cn.EMPTY_STRING})}infoPii(n,e){this.logMessage(n,{logLevel:Oc.Info,containsPii:!0,correlationId:e||cn.EMPTY_STRING})}verbose(n,e){this.logMessage(n,{logLevel:Oc.Verbose,containsPii:!1,correlationId:e||cn.EMPTY_STRING})}verbosePii(n,e){this.logMessage(n,{logLevel:Oc.Verbose,containsPii:!0,correlationId:e||cn.EMPTY_STRING})}trace(n,e){this.logMessage(n,{logLevel:Oc.Trace,containsPii:!1,correlationId:e||cn.EMPTY_STRING})}tracePii(n,e){this.logMessage(n,{logLevel:Oc.Trace,containsPii:!0,correlationId:e||cn.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}};var tG="@azure/msal-common",XR="15.12.0";var yI={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};var Zf={};Ng(Zf,{authorityMismatch:()=>E4,authorityUriInsecure:()=>uk,cannotAllowPlatformBroker:()=>I4,cannotSetOIDCOptions:()=>T4,claimsRequestParsingError:()=>b4,emptyInputScopesError:()=>hk,invalidAuthenticationHeader:()=>S4,invalidAuthorityMetadata:()=>_k,invalidAuthorizePostBodyParameters:()=>A4,invalidClaims:()=>vI,invalidCloudDiscoveryMetadata:()=>bI,invalidCodeChallengeMethod:()=>C4,invalidRequestMethodForEAR:()=>D4,logoutRequestEmpty:()=>fk,missingNonceAuthenticationHeader:()=>w4,missingSshJwk:()=>dw,missingSshKid:()=>x4,pkceParamsMissing:()=>gk,redirectUriEmpty:()=>dk,tokenRequestEmpty:()=>mk,untrustedAuthority:()=>yk,urlEmptyError:()=>pk,urlParseError:()=>LC});var dk="redirect_uri_empty",b4="claims_request_parsing_error",uk="authority_uri_insecure",LC="url_parse_error",pk="empty_url_error",hk="empty_input_scopes_error",vI="invalid_claims",mk="token_request_empty",fk="logout_request_empty",C4="invalid_code_challenge_method",gk="pkce_params_missing",bI="invalid_cloud_discovery_metadata",_k="invalid_authority_metadata",yk="untrusted_authority",dw="missing_ssh_jwk",x4="missing_ssh_kid",w4="missing_nonce_authentication_header",S4="invalid_authentication_header",T4="cannot_set_OIDCOptions",I4="cannot_allow_platform_broker",E4="authority_mismatch",D4="invalid_request_method_for_EAR",A4="invalid_authorize_post_body_parameters";var Md={[dk]:"A redirect URI is required for all calls, and none has been set.",[b4]:"Could not parse the given claims request object.",[uk]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[LC]:"URL could not be parsed into appropriate segments.",[pk]:"URL was empty or null.",[hk]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[vI]:"Given claims parameter must be a stringified JSON object.",[mk]:"Token request was empty and not found in cache.",[fk]:"The logout request was null or undefined.",[C4]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[gk]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[bI]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[_k]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[yk]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[dw]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[x4]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[w4]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[S4]:"Invalid authentication header provided",[T4]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[I4]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[E4]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",[A4]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[D4]:"Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST."},vSe={redirectUriNotSet:{code:dk,desc:Md[dk]},claimsRequestParsingError:{code:b4,desc:Md[b4]},authorityUriInsecure:{code:uk,desc:Md[uk]},urlParseError:{code:LC,desc:Md[LC]},urlEmptyError:{code:pk,desc:Md[pk]},emptyScopesError:{code:hk,desc:Md[hk]},invalidClaimsRequest:{code:vI,desc:Md[vI]},tokenRequestEmptyError:{code:mk,desc:Md[mk]},logoutRequestEmptyError:{code:fk,desc:Md[fk]},invalidCodeChallengeMethod:{code:C4,desc:Md[C4]},invalidCodeChallengeParams:{code:gk,desc:Md[gk]},invalidCloudDiscoveryMetadata:{code:bI,desc:Md[bI]},invalidAuthorityMetadata:{code:_k,desc:Md[_k]},untrustedAuthority:{code:yk,desc:Md[yk]},missingSshJwk:{code:dw,desc:Md[dw]},missingSshKid:{code:x4,desc:Md[x4]},missingNonceAuthenticationHeader:{code:w4,desc:Md[w4]},invalidAuthenticationHeader:{code:S4,desc:Md[S4]},cannotSetOIDCOptions:{code:T4,desc:Md[T4]},cannotAllowPlatformBroker:{code:I4,desc:Md[I4]},authorityMismatch:{code:E4,desc:Md[E4]},invalidAuthorizePostBodyParameters:{code:A4,desc:Md[A4]},invalidRequestMethodForEAR:{code:D4,desc:Md[D4]}},k4=class t extends Rs{constructor(n){super(n,Md[n]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,t.prototype)}};function Ja(t){return new k4(t)}var $c=class{static isEmptyObj(n){if(n)try{let e=JSON.parse(n);return Object.keys(e).length===0}catch{}return!0}static startsWith(n,e){return n.indexOf(e)===0}static endsWith(n,e){return n.length>=e.length&&n.lastIndexOf(e)===n.length-e.length}static queryStringToObject(n){let e={},i=n.split("&"),o=r=>decodeURIComponent(r.replace(/\+/g," "));return i.forEach(r=>{if(r.trim()){let[s,d]=r.split(/=(.+)/g,2);s&&d&&(e[o(s)]=o(d))}}),e}static trimArrayEntries(n){return n.map(e=>e.trim())}static removeEmptyStringsFromArray(n){return n.filter(e=>!!e)}static jsonParseHelper(n){try{return JSON.parse(n)}catch{return null}}static matchPattern(n,e){return new RegExp(n.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(e)}};var Wd=class t{constructor(n){let e=n?$c.trimArrayEntries([...n]):[],i=e?$c.removeEmptyStringsFromArray(e):[];if(!i||!i.length)throw Ja(hk);this.scopes=new Set,i.forEach(o=>this.scopes.add(o))}static fromString(n){let i=(n||cn.EMPTY_STRING).split(" ");return new t(i)}static createSearchScopes(n){let e=n&&n.length>0?n:[...t0],i=new t(e);return i.containsOnlyOIDCScopes()?i.removeScope(cn.OFFLINE_ACCESS_SCOPE):i.removeOIDCScopes(),i}containsScope(n){let e=this.printScopesLowerCase().split(" "),i=new t(e);return n?i.scopes.has(n.toLowerCase()):!1}containsScopeSet(n){return!n||n.scopes.size<=0?!1:this.scopes.size>=n.scopes.size&&n.asArray().every(e=>this.containsScope(e))}containsOnlyOIDCScopes(){let n=0;return Voe.forEach(e=>{this.containsScope(e)&&(n+=1)}),this.scopes.size===n}appendScope(n){n&&this.scopes.add(n.trim())}appendScopes(n){try{n.forEach(e=>this.appendScope(e))}catch{throw Dn(ok)}}removeScope(n){if(!n)throw Dn(nk);this.scopes.delete(n.trim())}removeOIDCScopes(){Voe.forEach(n=>{this.scopes.delete(n)})}unionScopeSets(n){if(!n)throw Dn(fI);let e=new Set;return n.scopes.forEach(i=>e.add(i.toLowerCase())),this.scopes.forEach(i=>e.add(i.toLowerCase())),e}intersectingScopeSets(n){if(!n)throw Dn(fI);n.containsOnlyOIDCScopes()||n.removeOIDCScopes();let e=this.unionScopeSets(n),i=n.getScopeCount(),o=this.getScopeCount();return e.sizen.push(e)),n}printScopes(){return this.scopes?this.asArray().join(" "):cn.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}};function Uoe(t,n){return!!t&&!!n&&t===n.split(".")[1]}function JR(t,n,e,i){if(i){let{oid:o,sub:r,tid:s,name:d,tfp:m,acr:v,preferred_username:w,upn:O,login_hint:N}=i,V=s||m||v||"";return{tenantId:V,localAccountId:o||r||"",name:d,username:w||O||"",loginHint:N,isHomeTenant:Uoe(V,t)}}else return{tenantId:e,localAccountId:n,username:"",isHomeTenant:Uoe(e,t)}}function vk(t,n,e,i){let o=t;if(n){let r=n,{isHomeTenant:d}=r,m=Vf(r,["isHomeTenant"]);o=be(be({},t),m)}if(e){let s=JR(t.homeAccountId,t.localAccountId,t.tenantId,e),{isHomeTenant:d}=s,m=Vf(s,["isHomeTenant"]);return o=mt(be(be({},o),m),{idTokenClaims:e,idToken:i}),o}return o}var eF={};Ng(eF,{checkMaxAge:()=>M4,extractTokenClaims:()=>uw,getJWSPayload:()=>bSe});function uw(t,n){let e=bSe(t);try{let i=n(e);return JSON.parse(i)}catch{throw Dn(hI)}}function bSe(t){if(!t)throw Dn(WA);let e=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);if(!e||e.length<4)throw Dn(hI);return e[2]}function M4(t,n){if(n===0||Date.now()-3e5>t+n)throw Dn(ek)}var BC={};Ng(BC,{getDeserializedResponse:()=>Hoe,mapToQueryString:()=>NC,normalizeUrlForComparison:()=>HWe,stripLeadingHashOrQuery:()=>xSe});function CSe(t){if(!t)return t;let n=t.toLowerCase();return $c.endsWith(n,"?")?n=n.slice(0,-1):$c.endsWith(n,"?/")&&(n=n.slice(0,-2)),$c.endsWith(n,"/")||(n+="/"),n}function xSe(t){return t.startsWith("#/")?t.substring(2):t.startsWith("#")||t.startsWith("?")?t.substring(1):t}function Hoe(t){if(!t||t.indexOf("=")<0)return null;try{let n=xSe(t),e=Object.fromEntries(new URLSearchParams(n));if(e.code||e.ear_jwe||e.error||e.error_description||e.state)return e}catch{throw Dn(ZA)}return null}function NC(t,n=!0,e){let i=new Array;return t.forEach((o,r)=>{!n&&e&&r in e?i.push(`${r}=${o}`):i.push(`${r}=${encodeURIComponent(o)}`)}),i.join("&")}function HWe(t){if(!t)return t;let n=t.split("#")[0];try{let e=new URL(n),i=e.origin+e.pathname+e.search;return CSe(i)}catch{return CSe(n)}}var da=class t{get urlString(){return this._urlString}constructor(n){if(this._urlString=n,!this._urlString)throw Ja(pk);n.includes("#")||(this._urlString=t.canonicalizeUri(n))}static canonicalizeUri(n){if(n){let e=n.toLowerCase();return $c.endsWith(e,"?")?e=e.slice(0,-1):$c.endsWith(e,"?/")&&(e=e.slice(0,-2)),$c.endsWith(e,"/")||(e+="/"),e}return n}validateAsUri(){let n;try{n=this.getUrlComponents()}catch{throw Ja(LC)}if(!n.HostNameAndPort||!n.PathSegments)throw Ja(LC);if(!n.Protocol||n.Protocol.toLowerCase()!=="https:")throw Ja(uk)}static appendQueryString(n,e){return e?n.indexOf("?")<0?`${n}?${e}`:`${n}&${e}`:n}static removeHashFromUrl(n){return t.canonicalizeUri(n.split("#")[0])}replaceTenantPath(n){let e=this.getUrlComponents(),i=e.PathSegments;return n&&i.length!==0&&(i[0]===Mv.COMMON||i[0]===Mv.ORGANIZATIONS)&&(i[0]=n),t.constructAuthorityUriFromObject(e)}getUrlComponents(){let n=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),e=this.urlString.match(n);if(!e)throw Ja(LC);let i={Protocol:e[1],HostNameAndPort:e[4],AbsolutePath:e[5],QueryString:e[7]},o=i.AbsolutePath.split("/");return o=o.filter(r=>r&&r.length>0),i.PathSegments=o,i.QueryString&&i.QueryString.endsWith("/")&&(i.QueryString=i.QueryString.substring(0,i.QueryString.length-1)),i}static getDomainFromUrl(n){let e=RegExp("^([^:/?#]+://)?([^/?#]*)"),i=n.match(e);if(!i)throw Ja(LC);return i[2]}static getAbsoluteUrl(n,e){if(n[0]===cn.FORWARD_SLASH){let o=new t(e).getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+n}return n}static constructAuthorityUriFromObject(n){return new t(n.Protocol+"//"+n.HostNameAndPort+"/"+n.PathSegments.join("/"))}static hashContainsKnownProperties(n){return!!Hoe(n)}};var SSe={endpointMetadata:{"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},instanceDiscoveryMetadata:{metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},joe=SSe.endpointMetadata,Goe=SSe.instanceDiscoveryMetadata,$oe=new Set;Goe.metadata.forEach(t=>{t.aliases.forEach(n=>{$oe.add(n)})});function TSe(t,n){let e,i=t.canonicalAuthority;if(i){let o=new da(i).getUrlComponents().HostNameAndPort;e=wSe(o,t.cloudDiscoveryMetadata?.metadata,Wf.CONFIG,n)||wSe(o,Goe.metadata,Wf.HARDCODED_VALUES,n)||t.knownAuthorities}return e||[]}function wSe(t,n,e,i){if(i?.trace(`getAliasesFromMetadata called with source: ${e}`),t&&n){let o=O4(n,t);if(o)return i?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${e}, returning aliases`),o.aliases;i?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${e}`)}return null}function ISe(t){return O4(Goe.metadata,t)}function O4(t,n){for(let e=0;eR4,cacheQuotaExceeded:()=>iG});var iG="cache_quota_exceeded",R4="cache_error_unknown";var qoe={[iG]:"Exceeded cache storage capacity.",[R4]:"Unexpected error occurred when using cache storage."},CI=class t extends Rs{constructor(n,e){let i=e||(qoe[n]?qoe[n]:qoe[R4]);super(`${n}: ${i}`),Object.setPrototypeOf(this,t.prototype),this.name="CacheError",this.errorCode=n,this.errorMessage=i}};function tF(t){return t instanceof Error?t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED"||t.message.includes("exceeded the quota")?new CI(iG):new CI(t.name,t.message):new CI(R4)}var bk=class{constructor(n,e,i,o,r){this.clientId=n,this.cryptoImpl=e,this.commonLogger=i.clone(tG,XR),this.staticAuthorityOptions=r,this.performanceClient=o}getAllAccounts(n,e){return this.buildTenantProfiles(this.getAccountsFilteredBy(n,e),e,n)}getAccountInfoFilteredBy(n,e){if(Object.keys(n).length===0||Object.values(n).every(o=>!o))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null"),null;let i=this.getAllAccounts(n,e);return i.length>1?i.sort(r=>r.idTokenClaims?-1:1)[0]:i.length===1?i[0]:null}getBaseAccountInfo(n,e){let i=this.getAccountsFilteredBy(n,e);return i.length>0?i[0].getAccountInfo():null}buildTenantProfiles(n,e,i){return n.flatMap(o=>this.getTenantProfilesFromAccountEntity(o,e,i?.tenantId,i))}getTenantedAccountInfoByFilter(n,e,i,o,r){let s=null,d;if(r&&!this.tenantProfileMatchesFilter(i,r))return null;let m=this.getIdToken(n,o,e,i.tenantId);return m&&(d=uw(m.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(d,r))?null:(s=vk(n,i,d,m?.secret),s)}getTenantProfilesFromAccountEntity(n,e,i,o){let r=n.getAccountInfo(),s=r.tenantProfiles||new Map,d=this.getTokenKeys();if(i){let v=s.get(i);if(v)s=new Map([[i,v]]);else return[]}let m=[];return s.forEach(v=>{let w=this.getTenantedAccountInfoByFilter(r,d,v,e,o);w&&m.push(w)}),m}tenantProfileMatchesFilter(n,e){return!(e.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(n,e.localAccountId)||e.name&&n.name!==e.name||e.isHomeTenant!==void 0&&n.isHomeTenant!==e.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(n,e){return!(e&&(e.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(n,e.localAccountId)||e.loginHint&&!this.matchLoginHintFromTokenClaims(n,e.loginHint)||e.username&&!this.matchUsername(n.preferred_username,e.username)||e.name&&!this.matchName(n,e.name)||e.sid&&!this.matchSid(n,e.sid)))}saveCacheRecord(n,e,i){return bt(this,null,function*(){if(!n)throw Dn(rk);try{n.account&&(yield this.setAccount(n.account,e)),n.idToken&&i?.idToken!==!1&&(yield this.setIdTokenCredential(n.idToken,e)),n.accessToken&&i?.accessToken!==!1&&(yield this.saveAccessToken(n.accessToken,e)),n.refreshToken&&i?.refreshToken!==!1&&(yield this.setRefreshTokenCredential(n.refreshToken,e)),n.appMetadata&&this.setAppMetadata(n.appMetadata,e)}catch(o){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),o instanceof Rs?o:tF(o)}})}saveAccessToken(n,e){return bt(this,null,function*(){let i={clientId:n.clientId,credentialType:n.credentialType,environment:n.environment,homeAccountId:n.homeAccountId,realm:n.realm,tokenType:n.tokenType,requestedClaimsHash:n.requestedClaimsHash},o=this.getTokenKeys(),r=Wd.fromString(n.target);o.accessToken.forEach(s=>{if(!this.accessTokenKeyMatchesFilter(s,i,!1))return;let d=this.getAccessTokenCredential(s,e);d&&this.credentialMatchesFilter(d,i)&&Wd.fromString(d.target).intersectingScopeSets(r)&&this.removeAccessToken(s,e)}),yield this.setAccessTokenCredential(n,e)})}getAccountsFilteredBy(n,e){let i=this.getAccountKeys(),o=[];return i.forEach(r=>{let s=this.getAccount(r,e);if(!s||n.homeAccountId&&!this.matchHomeAccountId(s,n.homeAccountId)||n.username&&!this.matchUsername(s.username,n.username)||n.environment&&!this.matchEnvironment(s,n.environment)||n.realm&&!this.matchRealm(s,n.realm)||n.nativeAccountId&&!this.matchNativeAccountId(s,n.nativeAccountId)||n.authorityType&&!this.matchAuthorityType(s,n.authorityType))return;let d={localAccountId:n?.localAccountId,name:n?.name},m=s.tenantProfiles?.filter(v=>this.tenantProfileMatchesFilter(v,d));m&&m.length===0||o.push(s)}),o}credentialMatchesFilter(n,e){return!(e.clientId&&!this.matchClientId(n,e.clientId)||e.userAssertionHash&&!this.matchUserAssertionHash(n,e.userAssertionHash)||typeof e.homeAccountId=="string"&&!this.matchHomeAccountId(n,e.homeAccountId)||e.environment&&!this.matchEnvironment(n,e.environment)||e.realm&&!this.matchRealm(n,e.realm)||e.credentialType&&!this.matchCredentialType(n,e.credentialType)||e.familyId&&!this.matchFamilyId(n,e.familyId)||e.target&&!this.matchTarget(n,e.target)||(e.requestedClaimsHash||n.requestedClaimsHash)&&n.requestedClaimsHash!==e.requestedClaimsHash||n.credentialType===Lu.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(e.tokenType&&!this.matchTokenType(n,e.tokenType)||e.tokenType===va.SSH&&e.keyId&&!this.matchKeyId(n,e.keyId)))}getAppMetadataFilteredBy(n){let e=this.getKeys(),i={};return e.forEach(o=>{if(!this.isAppMetadata(o))return;let r=this.getAppMetadata(o);r&&(n.environment&&!this.matchEnvironment(r,n.environment)||n.clientId&&!this.matchClientId(r,n.clientId)||(i[o]=r))}),i}getAuthorityMetadataByAlias(n){let e=this.getAuthorityMetadataKeys(),i=null;return e.forEach(o=>{if(!this.isAuthorityMetadata(o)||o.indexOf(this.clientId)===-1)return;let r=this.getAuthorityMetadata(o);r&&r.aliases.indexOf(n)!==-1&&(i=r)}),i}removeAllAccounts(n){this.getAllAccounts({},n).forEach(i=>{this.removeAccount(i,n)})}removeAccount(n,e){this.removeAccountContext(n,e);let i=this.getAccountKeys(),o=r=>r.includes(n.homeAccountId)&&r.includes(n.environment);i.filter(o).forEach(r=>{this.removeItem(r,e),this.performanceClient.incrementFields({accountsRemoved:1},e)})}removeAccountContext(n,e){let i=this.getTokenKeys(),o=r=>r.includes(n.homeAccountId)&&r.includes(n.environment);i.idToken.filter(o).forEach(r=>{this.removeIdToken(r,e)}),i.accessToken.filter(o).forEach(r=>{this.removeAccessToken(r,e)}),i.refreshToken.filter(o).forEach(r=>{this.removeRefreshToken(r,e)})}removeAccessToken(n,e){let i=this.getAccessTokenCredential(n,e);if(this.removeItem(n,e),this.performanceClient.incrementFields({accessTokensRemoved:1},e),!i||i.credentialType.toLowerCase()!==Lu.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||i.tokenType!==va.POP)return;let o=i.keyId;o&&this.cryptoImpl.removeTokenBindingKey(o).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${o}`,e),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},e)})}removeAppMetadata(n){return this.getKeys().forEach(i=>{this.isAppMetadata(i)&&this.removeItem(i,n)}),!0}getIdToken(n,e,i,o,r){this.commonLogger.trace("CacheManager - getIdToken called");let s={homeAccountId:n.homeAccountId,environment:n.environment,credentialType:Lu.ID_TOKEN,clientId:this.clientId,realm:o},d=this.getIdTokensByFilter(s,e,i),m=d.size;if(m<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(m>1){let v=d;if(!o){let w=new Map;d.forEach((N,V)=>{N.realm===n.tenantId&&w.set(V,N)});let O=w.size;if(O<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),d.values().next().value;if(O===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),w.values().next().value;v=w}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),v.forEach((w,O)=>{this.removeIdToken(O,e)}),r&&e&&r.addFields({multiMatchedID:d.size},e),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),d.values().next().value}getIdTokensByFilter(n,e,i){let o=i&&i.idToken||this.getTokenKeys().idToken,r=new Map;return o.forEach(s=>{if(!this.idTokenKeyMatchesFilter(s,be({clientId:this.clientId},n)))return;let d=this.getIdTokenCredential(s,e);d&&this.credentialMatchesFilter(d,n)&&r.set(s,d)}),r}idTokenKeyMatchesFilter(n,e){let i=n.toLowerCase();return!(e.clientId&&i.indexOf(e.clientId.toLowerCase())===-1||e.homeAccountId&&i.indexOf(e.homeAccountId.toLowerCase())===-1)}removeIdToken(n,e){this.removeItem(n,e)}removeRefreshToken(n,e){this.removeItem(n,e)}getAccessToken(n,e,i,o){let r=e.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",r);let s=Wd.createSearchScopes(e.scopes),d=e.authenticationScheme||va.BEARER,m=d&&d.toLowerCase()!==va.BEARER.toLowerCase()?Lu.ACCESS_TOKEN_WITH_AUTH_SCHEME:Lu.ACCESS_TOKEN,v={homeAccountId:n.homeAccountId,environment:n.environment,credentialType:m,clientId:this.clientId,realm:o||n.tenantId,target:s,tokenType:d,keyId:e.sshKid,requestedClaimsHash:e.requestedClaimsHash},w=i&&i.accessToken||this.getTokenKeys().accessToken,O=[];w.forEach(V=>{if(this.accessTokenKeyMatchesFilter(V,v,!0)){let $=this.getAccessTokenCredential(V,r);$&&this.credentialMatchesFilter($,v)&&O.push($)}});let N=O.length;return N<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):N>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",r),O.forEach(V=>{this.removeAccessToken(this.generateCredentialKey(V),r)}),this.performanceClient.addFields({multiMatchedAT:O.length},r),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",r),O[0])}accessTokenKeyMatchesFilter(n,e,i){let o=n.toLowerCase();if(e.clientId&&o.indexOf(e.clientId.toLowerCase())===-1||e.homeAccountId&&o.indexOf(e.homeAccountId.toLowerCase())===-1||e.realm&&o.indexOf(e.realm.toLowerCase())===-1||e.requestedClaimsHash&&o.indexOf(e.requestedClaimsHash.toLowerCase())===-1)return!1;if(e.target){let r=e.target.asArray();for(let s=0;s{if(!this.accessTokenKeyMatchesFilter(r,n,!0))return;let s=this.getAccessTokenCredential(r,e);s&&this.credentialMatchesFilter(s,n)&&o.push(s)}),o}getRefreshToken(n,e,i,o,r){this.commonLogger.trace("CacheManager - getRefreshToken called");let s=e?$A:void 0,d={homeAccountId:n.homeAccountId,environment:n.environment,credentialType:Lu.REFRESH_TOKEN,clientId:this.clientId,familyId:s},m=o&&o.refreshToken||this.getTokenKeys().refreshToken,v=[];m.forEach(O=>{if(this.refreshTokenKeyMatchesFilter(O,d)){let N=this.getRefreshTokenCredential(O,i);N&&this.credentialMatchesFilter(N,d)&&v.push(N)}});let w=v.length;return w<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(w>1&&r&&i&&r.addFields({multiMatchedRT:w},i),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),v[0])}refreshTokenKeyMatchesFilter(n,e){let i=n.toLowerCase();return!(e.familyId&&i.indexOf(e.familyId.toLowerCase())===-1||!e.familyId&&e.clientId&&i.indexOf(e.clientId.toLowerCase())===-1||e.homeAccountId&&i.indexOf(e.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(n){let e={environment:n,clientId:this.clientId},i=this.getAppMetadataFilteredBy(e),o=Object.keys(i).map(s=>i[s]),r=o.length;if(r<1)return null;if(r>1)throw Dn(tk);return o[0]}isAppMetadataFOCI(n){let e=this.readAppMetadataFromCache(n);return!!(e&&e.familyId===$A)}matchHomeAccountId(n,e){return typeof n.homeAccountId=="string"&&e===n.homeAccountId}matchLocalAccountIdFromTokenClaims(n,e){let i=n.oid||n.sub;return e===i}matchLocalAccountIdFromTenantProfile(n,e){return n.localAccountId===e}matchName(n,e){return e.toLowerCase()===n.name?.toLowerCase()}matchUsername(n,e){return!!(n&&typeof n=="string"&&e?.toLowerCase()===n.toLowerCase())}matchUserAssertionHash(n,e){return!!(n.userAssertionHash&&e===n.userAssertionHash)}matchEnvironment(n,e){if(this.staticAuthorityOptions){let o=TSe(this.staticAuthorityOptions,this.commonLogger);if(o.includes(e)&&o.includes(n.environment))return!0}let i=this.getAuthorityMetadataByAlias(e);return!!(i&&i.aliases.indexOf(n.environment)>-1)}matchCredentialType(n,e){return n.credentialType&&e.toLowerCase()===n.credentialType.toLowerCase()}matchClientId(n,e){return!!(n.clientId&&e===n.clientId)}matchFamilyId(n,e){return!!(n.familyId&&e===n.familyId)}matchRealm(n,e){return n.realm?.toLowerCase()===e.toLowerCase()}matchNativeAccountId(n,e){return!!(n.nativeAccountId&&e===n.nativeAccountId)}matchLoginHintFromTokenClaims(n,e){return n.login_hint===e||n.preferred_username===e||n.upn===e}matchSid(n,e){return n.sid===e}matchAuthorityType(n,e){return!!(n.authorityType&&e.toLowerCase()===n.authorityType.toLowerCase())}matchTarget(n,e){return n.credentialType!==Lu.ACCESS_TOKEN&&n.credentialType!==Lu.ACCESS_TOKEN_WITH_AUTH_SCHEME||!n.target?!1:Wd.fromString(n.target).containsScopeSet(e)}matchTokenType(n,e){return!!(n.tokenType&&n.tokenType===e)}matchKeyId(n,e){return!!(n.keyId&&n.keyId===e)}isAppMetadata(n){return n.indexOf(e4)!==-1}isAuthorityMetadata(n){return n.indexOf(QR.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(n){return`${QR.CACHE_KEY}-${this.clientId}-${n}`}static toObject(n,e){for(let i in e)n[i]=e[i];return n}},P4=class extends bk{setAccount(){return bt(this,null,function*(){throw Dn(ca)})}getAccount(){throw Dn(ca)}setIdTokenCredential(){return bt(this,null,function*(){throw Dn(ca)})}getIdTokenCredential(){throw Dn(ca)}setAccessTokenCredential(){return bt(this,null,function*(){throw Dn(ca)})}getAccessTokenCredential(){throw Dn(ca)}setRefreshTokenCredential(){return bt(this,null,function*(){throw Dn(ca)})}getRefreshTokenCredential(){throw Dn(ca)}setAppMetadata(){throw Dn(ca)}getAppMetadata(){throw Dn(ca)}setServerTelemetry(){throw Dn(ca)}getServerTelemetry(){throw Dn(ca)}setAuthorityMetadata(){throw Dn(ca)}getAuthorityMetadata(){throw Dn(ca)}getAuthorityMetadataKeys(){throw Dn(ca)}setThrottlingCache(){throw Dn(ca)}getThrottlingCache(){throw Dn(ca)}removeItem(){throw Dn(ca)}getKeys(){throw Dn(ca)}getAccountKeys(){throw Dn(ca)}getTokenKeys(){throw Dn(ca)}generateCredentialKey(){throw Dn(ca)}generateAccountKey(){throw Dn(ca)}};var yd={AAD:"AAD",OIDC:"OIDC",EAR:"EAR"};var ct={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",NetworkClientSendPostRequestAsync:"networkClientSendPostRequestAsync",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",InitializeCache:"initializeCache",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",GetAuthCodeUrl:"getAuthCodeUrl",GetStandardParams:"getStandardParams",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",HandleResponseEar:"handleResponseEar",HandleResponsePlatformBroker:"handleResponsePlatformBroker",HandleResponseCode:"handleResponseCode",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",ImportExistingCache:"importExistingCache",SetUserData:"setUserData",LocalStorageUpdated:"localStorageUpdated",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues",GenerateHKDF:"generateHKDF",GenerateBaseKey:"generateBaseKey",Base64Decode:"base64Decode",UrlEncodeArr:"urlEncodeArr",Encrypt:"encrypt",Decrypt:"decrypt",GenerateEarKey:"generateEarKey",DecryptEarResponse:"decryptEarResponse"},Ygi=new Map([[ct.AcquireTokenByCode,"ATByCode"],[ct.AcquireTokenByRefreshToken,"ATByRT"],[ct.AcquireTokenSilent,"ATS"],[ct.AcquireTokenSilentAsync,"ATSAsync"],[ct.AcquireTokenPopup,"ATPopup"],[ct.AcquireTokenRedirect,"ATRedirect"],[ct.CryptoOptsGetPublicKeyThumbprint,"CryptoGetPKThumb"],[ct.CryptoOptsSignJwt,"CryptoSignJwt"],[ct.SilentCacheClientAcquireToken,"SltCacheClientAT"],[ct.SilentIframeClientAcquireToken,"SltIframeClientAT"],[ct.SilentRefreshClientAcquireToken,"SltRClientAT"],[ct.SsoSilent,"SsoSlt"],[ct.StandardInteractionClientGetDiscoveredAuthority,"StdIntClientGetDiscAuth"],[ct.FetchAccountIdWithNativeBroker,"FetchAccIdWithNtvBroker"],[ct.NativeInteractionClientAcquireToken,"NtvIntClientAT"],[ct.BaseClientCreateTokenRequestHeaders,"BaseClientCreateTReqHead"],[ct.NetworkClientSendPostRequestAsync,"NetClientSendPost"],[ct.RefreshTokenClientExecutePostToTokenEndpoint,"RTClientExecPost"],[ct.AuthorizationCodeClientExecutePostToTokenEndpoint,"AuthCodeClientExecPost"],[ct.BrokerHandhshake,"BrokerHandshake"],[ct.AcquireTokenByRefreshTokenInBroker,"ATByRTInBroker"],[ct.AcquireTokenByBroker,"ATByBroker"],[ct.RefreshTokenClientExecuteTokenRequest,"RTClientExecTReq"],[ct.RefreshTokenClientAcquireToken,"RTClientAT"],[ct.RefreshTokenClientAcquireTokenWithCachedRefreshToken,"RTClientATWithCachedRT"],[ct.RefreshTokenClientAcquireTokenByRefreshToken,"RTClientATByRT"],[ct.RefreshTokenClientCreateTokenRequestBody,"RTClientCreateTReqBody"],[ct.AcquireTokenFromCache,"ATFromCache"],[ct.SilentFlowClientAcquireCachedToken,"SltFlowClientATCached"],[ct.SilentFlowClientGenerateResultFromCacheRecord,"SltFlowClientGenResFromCache"],[ct.AcquireTokenBySilentIframe,"ATBySltIframe"],[ct.InitializeBaseRequest,"InitBaseReq"],[ct.InitializeSilentRequest,"InitSltReq"],[ct.InitializeClientApplication,"InitClientApplication"],[ct.InitializeCache,"InitCache"],[ct.ImportExistingCache,"importCache"],[ct.SetUserData,"setUserData"],[ct.LocalStorageUpdated,"localStorageUpdated"],[ct.SilentIframeClientTokenHelper,"SIClientTHelper"],[ct.SilentHandlerInitiateAuthRequest,"SHandlerInitAuthReq"],[ct.SilentHandlerMonitorIframeForHash,"SltHandlerMonitorIframeForHash"],[ct.SilentHandlerLoadFrame,"SHandlerLoadFrame"],[ct.SilentHandlerLoadFrameSync,"SHandlerLoadFrameSync"],[ct.StandardInteractionClientCreateAuthCodeClient,"StdIntClientCreateAuthCodeClient"],[ct.StandardInteractionClientGetClientConfiguration,"StdIntClientGetClientConf"],[ct.StandardInteractionClientInitializeAuthorizationRequest,"StdIntClientInitAuthReq"],[ct.GetAuthCodeUrl,"GetAuthCodeUrl"],[ct.HandleCodeResponseFromServer,"HandleCodeResFromServer"],[ct.HandleCodeResponse,"HandleCodeResp"],[ct.HandleResponseEar,"HandleRespEar"],[ct.HandleResponseCode,"HandleRespCode"],[ct.HandleResponsePlatformBroker,"HandleRespPlatBroker"],[ct.UpdateTokenEndpointAuthority,"UpdTEndpointAuth"],[ct.AuthClientAcquireToken,"AuthClientAT"],[ct.AuthClientExecuteTokenRequest,"AuthClientExecTReq"],[ct.AuthClientCreateTokenRequestBody,"AuthClientCreateTReqBody"],[ct.PopTokenGenerateCnf,"PopTGenCnf"],[ct.PopTokenGenerateKid,"PopTGenKid"],[ct.HandleServerTokenResponse,"HandleServerTRes"],[ct.DeserializeResponse,"DeserializeRes"],[ct.AuthorityFactoryCreateDiscoveredInstance,"AuthFactCreateDiscInst"],[ct.AuthorityResolveEndpointsAsync,"AuthResolveEndpointsAsync"],[ct.AuthorityResolveEndpointsFromLocalSources,"AuthResolveEndpointsFromLocal"],[ct.AuthorityGetCloudDiscoveryMetadataFromNetwork,"AuthGetCDMetaFromNet"],[ct.AuthorityUpdateCloudDiscoveryMetadata,"AuthUpdCDMeta"],[ct.AuthorityGetEndpointMetadataFromNetwork,"AuthUpdCDMetaFromNet"],[ct.AuthorityUpdateEndpointMetadata,"AuthUpdEndpointMeta"],[ct.AuthorityUpdateMetadataWithRegionalInformation,"AuthUpdMetaWithRegInfo"],[ct.RegionDiscoveryDetectRegion,"RegDiscDetectReg"],[ct.RegionDiscoveryGetRegionFromIMDS,"RegDiscGetRegFromIMDS"],[ct.RegionDiscoveryGetCurrentVersion,"RegDiscGetCurrentVer"],[ct.AcquireTokenByCodeAsync,"ATByCodeAsync"],[ct.GetEndpointMetadataFromNetwork,"GetEndpointMetaFromNet"],[ct.GetCloudDiscoveryMetadataFromNetworkMeasurement,"GetCDMetaFromNet"],[ct.HandleRedirectPromiseMeasurement,"HandleRedirectPromise"],[ct.HandleNativeRedirectPromiseMeasurement,"HandleNtvRedirectPromise"],[ct.UpdateCloudDiscoveryMetadataMeasurement,"UpdateCDMeta"],[ct.UsernamePasswordClientAcquireToken,"UserPassClientAT"],[ct.NativeMessageHandlerHandshake,"NtvMsgHandlerHandshake"],[ct.NativeGenerateAuthResult,"NtvGenAuthRes"],[ct.RemoveHiddenIframe,"RemoveHiddenIframe"],[ct.ClearTokensAndKeysWithClaims,"ClearTAndKeysWithClaims"],[ct.CacheManagerGetRefreshToken,"CacheManagerGetRT"],[ct.GeneratePkceCodes,"GenPkceCodes"],[ct.GenerateCodeVerifier,"GenCodeVerifier"],[ct.GenerateCodeChallengeFromVerifier,"GenCodeChallengeFromVerifier"],[ct.Sha256Digest,"Sha256Digest"],[ct.GetRandomValues,"GetRandomValues"],[ct.GenerateHKDF,"genHKDF"],[ct.GenerateBaseKey,"genBaseKey"],[ct.Base64Decode,"b64Decode"],[ct.UrlEncodeArr,"urlEncArr"],[ct.Encrypt,"encrypt"],[ct.Decrypt,"decrypt"],[ct.GenerateEarKey,"genEarKey"],[ct.DecryptEarResponse,"decryptEarResp"]]),Koe={NotStarted:0,InProgress:1,Completed:2};var nG=class{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}},pw=class{generateId(){return"callback-id"}startMeasurement(n,e){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:Koe.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:n,startTimeMs:Date.now(),correlationId:e||""},measurement:new nG}}startPerformanceMeasurement(){return new nG}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}};var oG={tokenRenewalOffsetSeconds:t4,preventCorsPreflight:!1},jWe={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Oc.Info,correlationId:cn.EMPTY_STRING},GWe={claimsBasedCachingEnabled:!1},$We={sendGetRequestAsync(){return bt(this,null,function*(){throw Dn(ca)})},sendPostRequestAsync(){return bt(this,null,function*(){throw Dn(ca)})}},qWe={sku:cn.SKU,version:XR,cpu:cn.EMPTY_STRING,os:cn.EMPTY_STRING},KWe={clientSecret:cn.EMPTY_STRING,clientAssertion:void 0},WWe={azureCloudInstance:yI.None,tenant:`${cn.DEFAULT_COMMON_TENANT}`},YWe={application:{appName:"",appVersion:""}};function ESe({authOptions:t,systemOptions:n,loggerOptions:e,cacheOptions:i,storageInterface:o,networkInterface:r,cryptoInterface:s,clientCredentials:d,libraryInfo:m,telemetry:v,serverTelemetryManager:w,persistencePlugin:O,serializableCache:N}){let V=be(be({},jWe),e);return{authOptions:QWe(t),systemOptions:be(be({},oG),n),loggerOptions:V,cacheOptions:be(be({},GWe),i),storageInterface:o||new P4(t.clientId,_I,new Qf(V),new pw),networkInterface:r||$We,cryptoInterface:s||_I,clientCredentials:d||KWe,libraryInfo:be(be({},qWe),m),telemetry:be(be({},YWe),v),serverTelemetryManager:w||null,persistencePlugin:O||null,serializableCache:N||null}}function QWe(t){return be({clientCapabilities:[],azureCloudOptions:WWe,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1},t)}function rG(t){return t.authOptions.authority.options.protocolMode===yd.OIDC}var Um={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};function iF(t,n){if(!t)throw Dn(KA);try{let e=n(t);return JSON.parse(e)}catch{throw Dn(pI)}}function VC(t){if(!t)throw Dn(pI);let n=t.split(ow.CLIENT_INFO_SEPARATOR,2);return{uid:n[0],utid:n.length<2?cn.EMPTY_STRING:n[1]}}var up={};Ng(up,{addApplicationTelemetry:()=>B4,addAuthorizationCode:()=>Bre,addBrokerParameters:()=>gw,addCcsOid:()=>mw,addCcsUpn:()=>xI,addClaims:()=>Tk,addClientAssertion:()=>U4,addClientAssertionType:()=>H4,addClientCapabilitiesToClaims:()=>DSe,addClientId:()=>wk,addClientInfo:()=>Ek,addClientSecret:()=>z4,addCodeChallengeParams:()=>uYe,addCodeVerifier:()=>zre,addCorrelationId:()=>Ik,addDeviceCode:()=>pYe,addDomainHint:()=>Pre,addEARParameters:()=>_Ye,addExtraQueryParameters:()=>fw,addGrantType:()=>j4,addIdTokenHint:()=>Fre,addInstanceAware:()=>G4,addLibraryInfo:()=>N4,addLoginHint:()=>oF,addLogoutHint:()=>Ure,addNativeBroker:()=>dYe,addNonce:()=>Nre,addOboAssertion:()=>hYe,addPassword:()=>gYe,addPopToken:()=>$4,addPostBodyParameters:()=>yYe,addPostLogoutRedirectUri:()=>Rre,addPrompt:()=>Lre,addRedirectUri:()=>Sk,addRefreshToken:()=>Vre,addRequestTokenUse:()=>mYe,addResponseMode:()=>Ore,addResponseType:()=>cYe,addScopes:()=>xk,addServerTelemetry:()=>K4,addSid:()=>uG,addSshJwk:()=>q4,addState:()=>V4,addThrottling:()=>W4,addUsername:()=>fYe,instrumentBrokerParams:()=>Ck});var hw={};Ng(hw,{ACCESS_TOKEN:()=>JWe,BROKER_CLIENT_ID:()=>L4,BROKER_REDIRECT_URI:()=>dG,CCS_HEADER:()=>aYe,CLAIMS:()=>Zoe,CLIENT_ASSERTION:()=>Cre,CLIENT_ASSERTION_TYPE:()=>xre,CLIENT_ID:()=>zC,CLIENT_INFO:()=>oYe,CLIENT_REQUEST_ID:()=>are,CLIENT_SECRET:()=>bre,CODE:()=>nre,CODE_CHALLENGE:()=>ore,CODE_CHALLENGE_METHOD:()=>rre,CODE_VERIFIER:()=>sre,DEVICE_CODE:()=>vre,DOMAIN_HINT:()=>Are,EAR_JWE_CRYPTO:()=>Mre,EAR_JWK:()=>kre,ERROR:()=>ZWe,ERROR_DESCRIPTION:()=>XWe,EXPIRES_IN:()=>tYe,FOCI:()=>sYe,GRANT_TYPE:()=>Qoe,ID_TOKEN:()=>eYe,ID_TOKEN_HINT:()=>yre,INSTANCE_AWARE:()=>nF,LOGIN_HINT:()=>Dre,LOGOUT_HINT:()=>Ire,NATIVE_BROKER:()=>Tre,NONCE:()=>tre,OBO_ASSERTION:()=>wre,ON_BEHALF_OF:()=>rYe,POST_LOGOUT_URI:()=>_re,PROMPT:()=>ire,REDIRECT_URI:()=>sG,REFRESH_TOKEN:()=>Joe,REFRESH_TOKEN_EXPIRES_IN:()=>iYe,REQUESTED_TOKEN_USE:()=>Sre,REQ_CNF:()=>lG,RESPONSE_MODE:()=>Yoe,RESPONSE_TYPE:()=>Woe,RETURN_SPA_CODE:()=>cG,SCOPE:()=>Xoe,SESSION_STATE:()=>nYe,SID:()=>Ere,STATE:()=>ere,TOKEN_TYPE:()=>aG,X_APP_NAME:()=>fre,X_APP_VER:()=>gre,X_CLIENT_CPU:()=>ure,X_CLIENT_CURR_TELEM:()=>pre,X_CLIENT_EXTRA_SKU:()=>lYe,X_CLIENT_LAST_TELEM:()=>hre,X_CLIENT_OS:()=>dre,X_CLIENT_SKU:()=>lre,X_CLIENT_VER:()=>cre,X_MS_LIB_CAPABILITY:()=>mre});var zC="client_id",sG="redirect_uri",Woe="response_type",Yoe="response_mode",Qoe="grant_type",Zoe="claims",Xoe="scope",ZWe="error",XWe="error_description",JWe="access_token",eYe="id_token",Joe="refresh_token",tYe="expires_in",iYe="refresh_token_expires_in",ere="state",tre="nonce",ire="prompt",nYe="session_state",oYe="client_info",nre="code",ore="code_challenge",rre="code_challenge_method",sre="code_verifier",are="client-request-id",lre="x-client-SKU",cre="x-client-VER",dre="x-client-OS",ure="x-client-CPU",pre="x-client-current-telemetry",hre="x-client-last-telemetry",mre="x-ms-lib-capability",fre="x-app-name",gre="x-app-ver",_re="post_logout_redirect_uri",yre="id_token_hint",vre="device_code",bre="client_secret",Cre="client_assertion",xre="client_assertion_type",aG="token_type",lG="req_cnf",wre="assertion",Sre="requested_token_use",rYe="on_behalf_of",sYe="foci",aYe="X-AnchorMailbox",cG="return_spa_code",Tre="nativebroker",Ire="logout_hint",Ere="sid",Dre="login_hint",Are="domain_hint",lYe="x-client-xtra-sku",L4="brk_client_id",dG="brk_redirect_uri",nF="instance_aware",kre="ear_jwk",Mre="ear_jwe_crypto";function Ck(t,n,e){if(!n)return;let i=t.get(zC);i&&t.has(L4)&&e?.addFields({embeddedClientId:i,embeddedRedirectUri:t.get(sG)},n)}function cYe(t,n){t.set(Woe,n)}function Ore(t,n){t.set(Yoe,n||zoe.QUERY)}function dYe(t){t.set(Tre,"1")}function xk(t,n,e=!0,i=t0){e&&!i.includes("openid")&&!n.includes("openid")&&i.push("openid");let o=e?[...n||[],...i]:n||[],r=new Wd(o);t.set(Xoe,r.printScopes())}function wk(t,n){t.set(zC,n)}function Sk(t,n){t.set(sG,n)}function Rre(t,n){t.set(_re,n)}function Fre(t,n){t.set(yre,n)}function Pre(t,n){t.set(Are,n)}function oF(t,n){t.set(Dre,n)}function xI(t,n){t.set(Fu.CCS_HEADER,`UPN:${n}`)}function mw(t,n){t.set(Fu.CCS_HEADER,`Oid:${n.uid}@${n.utid}`)}function uG(t,n){t.set("sid",n)}function Tk(t,n,e){let i=DSe(n,e);try{JSON.parse(i)}catch{throw Ja(vI)}t.set(Zoe,i)}function Ik(t,n){t.set(are,n)}function N4(t,n){t.set(lre,n.sku),t.set(cre,n.version),n.os&&t.set(dre,n.os),n.cpu&&t.set(ure,n.cpu)}function B4(t,n){n?.appName&&t.set(fre,n.appName),n?.appVersion&&t.set(gre,n.appVersion)}function Lre(t,n){t.set(ire,n)}function V4(t,n){n&&t.set(ere,n)}function Nre(t,n){t.set(tre,n)}function uYe(t,n,e){if(n&&e)t.set(ore,n),t.set(rre,e);else throw Ja(gk)}function Bre(t,n){t.set(nre,n)}function pYe(t,n){t.set(vre,n)}function Vre(t,n){t.set(Joe,n)}function zre(t,n){t.set(sre,n)}function z4(t,n){t.set(bre,n)}function U4(t,n){n&&t.set(Cre,n)}function H4(t,n){n&&t.set(xre,n)}function hYe(t,n){t.set(wre,n)}function mYe(t,n){t.set(Sre,n)}function j4(t,n){t.set(Qoe,n)}function Ek(t){t.set(gSe,"1")}function G4(t){t.has(nF)||t.set(nF,"true")}function fw(t,n){Object.entries(n).forEach(([e,i])=>{!t.has(e)&&i&&t.set(e,i)})}function DSe(t,n){let e;if(!t)e={};else try{e=JSON.parse(t)}catch{throw Ja(vI)}return n&&n.length>0&&(e.hasOwnProperty(WR.ACCESS_TOKEN)||(e[WR.ACCESS_TOKEN]={}),e[WR.ACCESS_TOKEN][WR.XMS_CC]={values:n}),JSON.stringify(e)}function fYe(t,n){t.set(Zj.username,n)}function gYe(t,n){t.set(Zj.password,n)}function $4(t,n){n&&(t.set(aG,va.POP),t.set(lG,n))}function q4(t,n){n&&(t.set(aG,va.SSH),t.set(lG,n))}function K4(t,n){t.set(pre,n.generateCurrentRequestHeaderValue()),t.set(hre,n.generateLastRequestHeaderValue())}function W4(t){t.set(mre,rw.X_MS_LIB_CAPABILITY_VALUE)}function Ure(t,n){t.set(Ire,n)}function gw(t,n,e){t.has(L4)||t.set(L4,n),t.has(dG)||t.set(dG,e)}function _Ye(t,n){t.set(kre,encodeURIComponent(n)),t.set(Mre,"eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}function yYe(t,n){Object.entries(n).forEach(([e,i])=>{i&&t.set(e,i)})}var gG={};Ng(gG,{createDiscoveredInstance:()=>Kre});var Xf={Default:0,Adfs:1,Dsts:2,Ciam:3};function ASe(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("jwks_uri")}function kSe(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}function MSe(t){return t.hasOwnProperty("error")&&t.hasOwnProperty("error_description")}var Yd=(t,n,e,i,o)=>(...r)=>{e.trace(`Executing function ${n}`);let s=i?.startMeasurement(n,o);if(o){let d=n+"CallCount";i?.incrementFields({[d]:1},o)}try{let d=t(...r);return s?.end({success:!0}),e.trace(`Returning result from ${n}`),d}catch(d){e.trace(`Error occurred in ${n}`);try{e.trace(JSON.stringify(d))}catch{e.trace("Unable to print error message.")}throw s?.end({success:!1},d),d}},Zi=(t,n,e,i,o)=>(...r)=>{e.trace(`Executing function ${n}`);let s=i?.startMeasurement(n,o);if(o){let d=n+"CallCount";i?.incrementFields({[d]:1},o)}return i?.setPreQueueTime(n,o),t(...r).then(d=>(e.trace(`Returning result from ${n}`),s?.end({success:!0}),d)).catch(d=>{e.trace(`Error occurred in ${n}`);try{e.trace(JSON.stringify(d))}catch{e.trace("Unable to print error message.")}throw s?.end({success:!1},d),d})};var OSe=(()=>{class t{constructor(e,i,o,r){this.networkInterface=e,this.logger=i,this.performanceClient=o,this.correlationId=r}detectRegion(e,i){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.RegionDiscoveryDetectRegion,this.correlationId);let o=e;if(o)i.region_source=qA.ENVIRONMENT_VARIABLE;else{let r=t.IMDS_OPTIONS;try{let s=yield Zi(this.getRegionFromIMDS.bind(this),ct.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(cn.IMDS_VERSION,r);if(s.status===kv.SUCCESS&&(o=s.body,i.region_source=qA.IMDS),s.status===kv.BAD_REQUEST){let d=yield Zi(this.getCurrentVersion.bind(this),ct.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(r);if(!d)return i.region_source=qA.FAILED_AUTO_DETECTION,null;let m=yield Zi(this.getRegionFromIMDS.bind(this),ct.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(d,r);m.status===kv.SUCCESS&&(o=m.body,i.region_source=qA.IMDS)}}catch{return i.region_source=qA.FAILED_AUTO_DETECTION,null}}return o||(i.region_source=qA.FAILED_AUTO_DETECTION),o||null})}getRegionFromIMDS(e,i){return bt(this,null,function*(){return this.performanceClient?.addQueueMeasurement(ct.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${cn.IMDS_ENDPOINT}?api-version=${e}&format=text`,i,cn.IMDS_TIMEOUT)})}getCurrentVersion(e){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.RegionDiscoveryGetCurrentVersion,this.correlationId);try{let i=yield this.networkInterface.sendGetRequestAsync(`${cn.IMDS_ENDPOINT}?format=json`,e);return i.status===kv.BAD_REQUEST&&i.body&&i.body["newest-versions"]&&i.body["newest-versions"].length>0?i.body["newest-versions"][0]:null}catch{return null}})}}return t.IMDS_OPTIONS={headers:{Metadata:"true"}},t})();var uu={};Ng(uu,{createAccessTokenEntity:()=>Gre,createIdTokenEntity:()=>jre,createRefreshTokenEntity:()=>$re,generateAppMetadataKey:()=>EYe,generateAuthorityMetadataExpiresAt:()=>hG,isAccessTokenEntity:()=>xYe,isAppMetadataEntity:()=>DYe,isAuthorityMetadataEntity:()=>AYe,isAuthorityMetadataExpired:()=>mG,isCredentialEntity:()=>pG,isIdTokenEntity:()=>wYe,isRefreshTokenEntity:()=>SYe,isServerTelemetryEntity:()=>TYe,isThrottlingEntity:()=>IYe,updateAuthorityEndpointMetadata:()=>sF,updateCloudDiscoveryMetadata:()=>Q4});var Vp={};Ng(Vp,{delay:()=>CYe,isCacheExpired:()=>bYe,isTokenExpired:()=>rF,nowSeconds:()=>i0,toDateFromSeconds:()=>Y4,toSecondsFromDate:()=>vYe,wasClockTurnedBack:()=>Hre});function i0(){return Math.round(new Date().getTime()/1e3)}function vYe(t){return t.getTime()/1e3}function Y4(t){return t?new Date(Number(t)*1e3):new Date}function rF(t,n){let e=Number(t)||0;return i0()+n>e}function bYe(t,n){let e=Number(t)+n*24*60*60*1e3;return Date.now()>e}function Hre(t){return Number(t)>i0()}function CYe(t,n){return new Promise(e=>setTimeout(()=>e(n),t))}function jre(t,n,e,i,o){return{credentialType:Lu.ID_TOKEN,homeAccountId:t,environment:n,clientId:i,secret:e,realm:o,lastUpdatedAt:Date.now().toString()}}function Gre(t,n,e,i,o,r,s,d,m,v,w,O,N,V,$){let q={homeAccountId:t,credentialType:Lu.ACCESS_TOKEN,secret:e,cachedAt:i0().toString(),expiresOn:s.toString(),extendedExpiresOn:d.toString(),environment:n,clientId:i,realm:o,target:r,tokenType:w||va.BEARER,lastUpdatedAt:Date.now().toString()};if(O&&(q.userAssertionHash=O),v&&(q.refreshOn=v.toString()),V&&(q.requestedClaims=V,q.requestedClaimsHash=$),q.tokenType?.toLowerCase()!==va.BEARER.toLowerCase())switch(q.credentialType=Lu.ACCESS_TOKEN_WITH_AUTH_SCHEME,q.tokenType){case va.POP:let W=uw(e,m);if(!W?.cnf?.kid)throw Dn(sk);q.keyId=W.cnf.kid;break;case va.SSH:q.keyId=N}return q}function $re(t,n,e,i,o,r,s){let d={credentialType:Lu.REFRESH_TOKEN,homeAccountId:t,environment:n,clientId:i,secret:e,lastUpdatedAt:Date.now().toString()};return r&&(d.userAssertionHash=r),o&&(d.familyId=o),s&&(d.expiresOn=s.toString()),d}function pG(t){return t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")}function xYe(t){return t?pG(t)&&t.hasOwnProperty("realm")&&t.hasOwnProperty("target")&&(t.credentialType===Lu.ACCESS_TOKEN||t.credentialType===Lu.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function wYe(t){return t?pG(t)&&t.hasOwnProperty("realm")&&t.credentialType===Lu.ID_TOKEN:!1}function SYe(t){return t?pG(t)&&t.credentialType===Lu.REFRESH_TOKEN:!1}function TYe(t,n){let e=t.indexOf(Np.CACHE_KEY)===0,i=!0;return n&&(i=n.hasOwnProperty("failedRequests")&&n.hasOwnProperty("errors")&&n.hasOwnProperty("cacheHits")),e&&i}function IYe(t,n){let e=!1;t&&(e=t.indexOf(rw.THROTTLING_PREFIX)===0);let i=!0;return n&&(i=n.hasOwnProperty("throttleTime")),e&&i}function EYe({environment:t,clientId:n}){return[e4,t,n].join(ow.CACHE_KEY_SEPARATOR).toLowerCase()}function DYe(t,n){return n?t.indexOf(e4)===0&&n.hasOwnProperty("clientId")&&n.hasOwnProperty("environment"):!1}function AYe(t,n){return n?t.indexOf(QR.CACHE_KEY)===0&&n.hasOwnProperty("aliases")&&n.hasOwnProperty("preferred_cache")&&n.hasOwnProperty("preferred_network")&&n.hasOwnProperty("canonical_authority")&&n.hasOwnProperty("authorization_endpoint")&&n.hasOwnProperty("token_endpoint")&&n.hasOwnProperty("issuer")&&n.hasOwnProperty("aliasesFromNetwork")&&n.hasOwnProperty("endpointsFromNetwork")&&n.hasOwnProperty("expiresAt")&&n.hasOwnProperty("jwks_uri"):!1}function hG(){return i0()+QR.REFRESH_TIME_SECONDS}function sF(t,n,e){t.authorization_endpoint=n.authorization_endpoint,t.token_endpoint=n.token_endpoint,t.end_session_endpoint=n.end_session_endpoint,t.issuer=n.issuer,t.endpointsFromNetwork=e,t.jwks_uri=n.jwks_uri}function Q4(t,n,e){t.aliases=n.aliases,t.preferred_cache=n.preferred_cache,t.preferred_network=n.preferred_network,t.aliasesFromNetwork=e}function mG(t){return t.expiresAt<=i0()}var ty=class t{constructor(n,e,i,o,r,s,d,m){this.canonicalAuthority=n,this._canonicalAuthority.validateAsUri(),this.networkInterface=e,this.cacheManager=i,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=r,this.performanceClient=d,this.correlationId=s,this.managedIdentity=m||!1,this.regionDiscovery=new OSe(e,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(n){if(n.HostNameAndPort.endsWith(cn.CIAM_AUTH_URL))return Xf.Ciam;let e=n.PathSegments;if(e.length)switch(e[0].toLowerCase()){case cn.ADFS:return Xf.Adfs;case cn.DSTS:return Xf.Dsts}return Xf.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(n){this._canonicalAuthority=new da(n),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw Dn(Yf)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Dn(Yf)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Dn(Yf)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Dn(lk);return this.replacePath(this.metadata.end_session_endpoint)}else throw Dn(Yf)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Dn(Yf)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Dn(Yf)}canReplaceTenant(n){return n.PathSegments.length===1&&!t.reservedTenantDomains.has(n.PathSegments[0])&&this.getAuthorityType(n)===Xf.Default&&this.protocolMode!==yd.OIDC}replaceTenant(n){return n.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(n){let e=n,o=new da(this.metadata.canonical_authority).getUrlComponents(),r=o.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((d,m)=>{let v=r[m];if(m===0&&this.canReplaceTenant(o)){let w=new da(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];v!==w&&(this.logger.verbose(`Replacing tenant domain name ${v} with id ${w}`),v=w)}d!==v&&(e=e.replace(`/${v}/`,`/${d}/`))}),this.replaceTenant(e)}get defaultOpenIdConfigurationEndpoint(){let n=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Xf.Adfs||this.protocolMode===yd.OIDC&&!this.isAliasOfKnownMicrosoftAuthority(n)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}resolveEndpointsAsync(){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.AuthorityResolveEndpointsAsync,this.correlationId);let n=this.getCurrentMetadataEntity(),e=yield Zi(this.updateCloudDiscoveryMetadata.bind(this),ct.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(n);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,n.preferred_network);let i=yield Zi(this.updateEndpointMetadata.bind(this),ct.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(n);this.updateCachedMetadata(n,e,{source:i}),this.performanceClient?.addFields({cloudDiscoverySource:e,authorityEndpointSource:i},this.correlationId)})}getCurrentMetadataEntity(){let n=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return n||(n={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:hG(),jwks_uri:""}),n}updateCachedMetadata(n,e,i){e!==Wf.CACHE&&i?.source!==Wf.CACHE&&(n.expiresAt=hG(),n.canonical_authority=this.canonicalAuthority);let o=this.cacheManager.generateAuthorityMetadataCacheKey(n.preferred_cache);this.cacheManager.setAuthorityMetadata(o,n),this.metadata=n}updateEndpointMetadata(n){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.AuthorityUpdateEndpointMetadata,this.correlationId);let e=this.updateEndpointMetadataFromLocalSources(n);if(e){if(e.source===Wf.HARDCODED_VALUES&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&e.metadata){let o=yield Zi(this.updateMetadataWithRegionalInformation.bind(this),ct.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(e.metadata);sF(n,o,!1),n.canonical_authority=this.canonicalAuthority}return e.source}let i=yield Zi(this.getEndpointMetadataFromNetwork.bind(this),ct.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(i)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(i=yield Zi(this.updateMetadataWithRegionalInformation.bind(this),ct.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(i)),sF(n,i,!0),Wf.NETWORK;throw Dn(QA,this.defaultOpenIdConfigurationEndpoint)})}updateEndpointMetadataFromLocalSources(n){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");let e=this.getEndpointMetadataFromConfig();if(e)return this.logger.verbose("Found endpoint metadata in authority configuration"),sF(n,e,!1),{source:Wf.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{let o=this.getEndpointMetadataFromHardcodedValues();if(o)return sF(n,o,!1),{source:Wf.HARDCODED_VALUES,metadata:o};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}let i=mG(n);return this.isAuthoritySameType(n)&&n.endpointsFromNetwork&&!i?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Wf.CACHE}):(i&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(n){return new da(n.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Ja(_k)}return null}getEndpointMetadataFromNetwork(){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);let n={},e=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${e}`);try{let i=yield this.networkInterface.sendGetRequestAsync(e,n);return ASe(i.body)?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(i){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${i}`),null}})}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in joe?joe[this.hostnameAndPort]:null}updateMetadataWithRegionalInformation(n){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);let e=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(e){if(e!==cn.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=Xj.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=e,t.replaceWithRegionalInformation(n,e);let i=yield Zi(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),ct.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(i)return this.regionDiscoveryMetadata.region_outcome=Xj.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=i,t.replaceWithRegionalInformation(n,i);this.regionDiscoveryMetadata.region_outcome=Xj.AUTO_DETECTION_REQUESTED_FAILED}return n})}updateCloudDiscoveryMetadata(n){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);let e=this.updateCloudDiscoveryMetadataFromLocalSources(n);if(e)return e;let i=yield Zi(this.getCloudDiscoveryMetadataFromNetwork.bind(this),ct.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(i)return Q4(n,i,!0),Wf.NETWORK;throw Ja(yk)})}updateCloudDiscoveryMetadataFromLocalSources(n){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||cn.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||cn.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${n.canonical_authority||cn.NOT_APPLICABLE}`);let e=this.getCloudDiscoveryMetadataFromConfig();if(e)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Q4(n,e,!1),Wf.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{let o=ISe(this.hostnameAndPort);if(o)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Q4(n,o,!1),Wf.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}let i=mG(n);return this.isAuthoritySameType(n)&&n.aliasesFromNetwork&&!i?(this.logger.verbose("Found cloud discovery metadata in the cache."),Wf.CACHE):(i&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Xf.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");let n=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),e=O4(n.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Ja(bI)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}getCloudDiscoveryMetadataFromNetwork(){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);let n=`${cn.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,e={},i=null;try{let o=yield this.networkInterface.sendGetRequestAsync(n,e),r,s;if(kSe(o.body))r=o.body,s=r.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${r.tenant_discovery_endpoint}`);else if(MSe(o.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),r=o.body,r.error===cn.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${r.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${r.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),s=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),i=O4(s,this.hostnameAndPort)}catch(o){if(o instanceof Rs)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata. Error: ${o.errorCode} Error Description: ${o.errorMessage}`);else{let r=o;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata. Error: ${r.name} Error Description: ${r.message}`)}return null}return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),i})}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&da.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(n,e){let i;if(e&&e.azureCloudInstance!==yI.None){let o=e.tenant?e.tenant:cn.DEFAULT_COMMON_TENANT;i=`${e.azureCloudInstance}/${o}/`}return i||n}static createCloudDiscoveryMetadataFromHost(n){return{preferred_network:n,preferred_cache:n,aliases:[n]}}getPreferredCache(){if(this.managedIdentity)return cn.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Dn(Yf)}isAlias(n){return this.metadata.aliases.indexOf(n)>-1}isAliasOfKnownMicrosoftAuthority(n){return $oe.has(n)}static isPublicCloudAuthority(n){return cn.KNOWN_PUBLIC_CLOUDS.indexOf(n)>=0}static buildRegionalAuthorityString(n,e,i){let o=new da(n);o.validateAsUri();let r=o.getUrlComponents(),s=`${e}.${r.HostNameAndPort}`;this.isPublicCloudAuthority(r.HostNameAndPort)&&(s=`${e}.${cn.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);let d=da.constructAuthorityUriFromObject(mt(be({},o.getUrlComponents()),{HostNameAndPort:s})).urlString;return i?`${d}?${i}`:d}static replaceWithRegionalInformation(n,e){let i=be({},n);return i.authorization_endpoint=t.buildRegionalAuthorityString(i.authorization_endpoint,e),i.token_endpoint=t.buildRegionalAuthorityString(i.token_endpoint,e),i.end_session_endpoint&&(i.end_session_endpoint=t.buildRegionalAuthorityString(i.end_session_endpoint,e)),i}static transformCIAMAuthority(n){let e=n,o=new da(n).getUrlComponents();if(o.PathSegments.length===0&&o.HostNameAndPort.endsWith(cn.CIAM_AUTH_URL)){let r=o.HostNameAndPort.split(".")[0];e=`${e}${r}${cn.AAD_TENANT_DOMAIN_SUFFIX}`}return e}};ty.reservedTenantDomains=new Set(["{tenant}","{tenantid}",Mv.COMMON,Mv.CONSUMERS,Mv.ORGANIZATIONS]);function RSe(t){let i=new da(t).getUrlComponents().PathSegments.slice(-1)[0]?.toLowerCase();switch(i){case Mv.COMMON:case Mv.ORGANIZATIONS:case Mv.CONSUMERS:return;default:return i}}function fG(t){return t.endsWith(cn.FORWARD_SLASH)?t:`${t}${cn.FORWARD_SLASH}`}function qre(t){let n=t.cloudDiscoveryMetadata,e;if(n)try{e=JSON.parse(n)}catch{throw Ja(bI)}return{canonicalAuthority:t.authority?fG(t.authority):void 0,knownAuthorities:t.knownAuthorities,cloudDiscoveryMetadata:e}}function Kre(t,n,e,i,o,r,s){return bt(this,null,function*(){s?.addQueueMeasurement(ct.AuthorityFactoryCreateDiscoveredInstance,r);let d=ty.transformCIAMAuthority(fG(t)),m=new ty(d,n,e,i,o,r,s);try{return yield Zi(m.resolveEndpointsAsync.bind(m),ct.AuthorityResolveEndpointsAsync,o,s,r)(),m}catch{throw Dn(Yf)}})}var $g=class t extends Rs{constructor(n,e,i,o,r){super(n,e,i),this.name="ServerError",this.errorNo=o,this.status=r,Object.setPrototypeOf(this,t.prototype)}};function _w(t,n,e){return{clientId:t,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:e,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid,embeddedClientId:n.embeddedClientId||n.tokenBodyParameters?.clientId}}var yw=class t{static generateThrottlingStorageKey(n){return`${rw.THROTTLING_PREFIX}.${JSON.stringify(n)}`}static preProcess(n,e,i){let o=t.generateThrottlingStorageKey(e),r=n.getThrottlingCache(o);if(r){if(r.throttleTime=500&&n.status<600}static checkResponseForRetryAfter(n){return n.headers?n.headers.hasOwnProperty(Fu.RETRY_AFTER)&&(n.status<200||n.status>=300):!1}static calculateThrottleTime(n){let e=n<=0?0:n,i=Date.now()/1e3;return Math.floor(Math.min(i+(e||rw.DEFAULT_THROTTLE_TIME_SECONDS),i+rw.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(n,e,i,o){let r=_w(e,i,o),s=this.generateThrottlingStorageKey(r);n.removeItem(s,i.correlationId)}};var aF=class t extends Rs{constructor(n,e,i){super(n.errorCode,n.errorMessage,n.subError),Object.setPrototypeOf(this,t.prototype),this.name="NetworkError",this.error=n,this.httpStatus=e,this.responseHeaders=i}};function Dk(t,n,e,i){return t.errorMessage=`${t.errorMessage}, additionalErrorInfo: error.name:${i?.name}, error.message:${i?.message}`,new aF(t,n,e)}var wI=class{constructor(n,e){this.config=ESe(n),this.logger=new Qf(this.config.loggerOptions,tG,XR),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=e}createTokenRequestHeaders(n){let e={};if(e[Fu.CONTENT_TYPE]=cn.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case Um.HOME_ACCOUNT_ID:try{let i=VC(n.credential);e[Fu.CCS_HEADER]=`Oid:${i.uid}@${i.utid}`}catch(i){this.logger.verbose("Could not parse home account ID for CCS Header: "+i)}break;case Um.UPN:e[Fu.CCS_HEADER]=`UPN: ${n.credential}`;break}return e}executePostToTokenEndpoint(n,e,i,o,r,s){return bt(this,null,function*(){s&&this.performanceClient?.addQueueMeasurement(s,r);let d=yield this.sendPostRequest(o,n,{body:e,headers:i},r);return this.config.serverTelemetryManager&&d.status<500&&d.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),d})}sendPostRequest(n,e,i,o){return bt(this,null,function*(){yw.preProcess(this.cacheManager,n,o);let r;try{r=yield Zi(this.networkClient.sendPostRequestAsync.bind(this.networkClient),ct.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,o)(e,i);let s=r.headers||{};this.performanceClient?.addFields({refreshTokenSize:r.body.refresh_token?.length||0,httpVerToken:s[Fu.X_MS_HTTP_VERSION]||"",requestId:s[Fu.X_MS_REQUEST_ID]||""},o)}catch(s){if(s instanceof aF){let d=s.responseHeaders;throw d&&this.performanceClient?.addFields({httpVerToken:d[Fu.X_MS_HTTP_VERSION]||"",requestId:d[Fu.X_MS_REQUEST_ID]||"",contentTypeHeader:d[Fu.CONTENT_TYPE]||void 0,contentLengthHeader:d[Fu.CONTENT_LENGTH]||void 0,httpStatus:s.httpStatus},o),s.error}throw s instanceof Rs?s:Dn(YA)}return yw.postProcess(this.cacheManager,n,r,o),r})}updateAuthority(n,e){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.UpdateTokenEndpointAuthority,e);let i=`https://${n}/${this.authority.tenant}/`,o=yield Kre(i,this.networkClient,this.cacheManager,this.authority.options,this.logger,e,this.performanceClient);this.authority=o})}createTokenQueryParameters(n){let e=new Map;return n.embeddedClientId&&gw(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri),n.tokenQueryParameters&&fw(e,n.tokenQueryParameters),Ik(e,n.correlationId),Ck(e,n.correlationId,this.performanceClient),NC(e)}};function _G(t){return t&&(t.tid||t.tfp||t.acr)||null}var em=class t{getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,loginHint:this.loginHint,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(n=>[n.tenantId,n]))}}isSingleTenant(){return!this.tenantProfiles}static createAccount(n,e,i){let o=new t;e.authorityType===Xf.Adfs?o.authorityType=YR.ADFS_ACCOUNT_TYPE:e.protocolMode===yd.OIDC?o.authorityType=YR.GENERIC_ACCOUNT_TYPE:o.authorityType=YR.MSSTS_ACCOUNT_TYPE;let r;n.clientInfo&&i&&(r=iF(n.clientInfo,i)),o.clientInfo=n.clientInfo,o.homeAccountId=n.homeAccountId,o.nativeAccountId=n.nativeAccountId;let s=n.environment||e&&e.getPreferredCache();if(!s)throw Dn(lw);o.environment=s,o.realm=r?.utid||_G(n.idTokenClaims)||"",o.localAccountId=r?.uid||n.idTokenClaims?.oid||n.idTokenClaims?.sub||"";let d=n.idTokenClaims?.preferred_username||n.idTokenClaims?.upn,m=n.idTokenClaims?.emails?n.idTokenClaims.emails[0]:null;if(o.username=d||m||"",o.loginHint=n.idTokenClaims?.login_hint,o.name=n.idTokenClaims?.name||"",o.cloudGraphHostName=n.cloudGraphHostName,o.msGraphHost=n.msGraphHost,n.tenantProfiles)o.tenantProfiles=n.tenantProfiles;else{let v=JR(n.homeAccountId,o.localAccountId,o.realm,n.idTokenClaims);o.tenantProfiles=[v]}return o}static createFromAccountInfo(n,e,i){let o=new t;return o.authorityType=n.authorityType||YR.GENERIC_ACCOUNT_TYPE,o.homeAccountId=n.homeAccountId,o.localAccountId=n.localAccountId,o.nativeAccountId=n.nativeAccountId,o.realm=n.tenantId,o.environment=n.environment,o.username=n.username,o.name=n.name,o.loginHint=n.loginHint,o.cloudGraphHostName=e,o.msGraphHost=i,o.tenantProfiles=Array.from(n.tenantProfiles?.values()||[]),o}static generateHomeAccountId(n,e,i,o,r){if(!(e===Xf.Adfs||e===Xf.Dsts)){if(n)try{let s=iF(n,o.base64Decode);if(s.uid&&s.utid)return`${s.uid}.${s.utid}`}catch{}i.warning("No client info in response")}return r?.sub||""}static isAccountEntity(n){return n?n.hasOwnProperty("homeAccountId")&&n.hasOwnProperty("environment")&&n.hasOwnProperty("realm")&&n.hasOwnProperty("localAccountId")&&n.hasOwnProperty("username")&&n.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(n,e,i){if(!n||!e)return!1;let o=!0;if(i){let r=n.idTokenClaims||{},s=e.idTokenClaims||{};o=r.iat===s.iat&&r.nonce===s.nonce}return n.homeAccountId===e.homeAccountId&&n.localAccountId===e.localAccountId&&n.username===e.username&&n.tenantId===e.tenantId&&n.loginHint===e.loginHint&&n.environment===e.environment&&n.nativeAccountId===e.nativeAccountId&&o}};var UC={};Ng(UC,{badToken:()=>TI,consentRequired:()=>Yre,interactionRequired:()=>Wre,loginRequired:()=>Qre,nativeAccountUnavailable:()=>Z4,noTokensFound:()=>SI,refreshTokenExpired:()=>X4,uxNotAllowed:()=>yG});var SI="no_tokens_found",Z4="native_account_unavailable",X4="refresh_token_expired",yG="ux_not_allowed",Wre="interaction_required",Yre="consent_required",Qre="login_required",TI="bad_token";var FSe=[Wre,Yre,Qre,TI,yG],kYe=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],vG={[SI]:"No refresh token found in the cache. Please sign-in.",[Z4]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[X4]:"Refresh token has expired.",[TI]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[yG]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."},PSe={noTokensFoundError:{code:SI,desc:vG[SI]},native_account_unavailable:{code:Z4,desc:vG[Z4]},bad_token:{code:TI,desc:vG[TI]}},mh=class t extends Rs{constructor(n,e,i,o,r,s,d,m){super(n,e,i),Object.setPrototypeOf(this,t.prototype),this.timestamp=o||cn.EMPTY_STRING,this.traceId=r||cn.EMPTY_STRING,this.correlationId=s||cn.EMPTY_STRING,this.claims=d||cn.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=m}};function bG(t,n,e){let i=!!t&&FSe.indexOf(t)>-1,o=!!e&&kYe.indexOf(e)>-1,r=!!n&&FSe.some(s=>n.indexOf(s)>-1);return i||r||o}function Ak(t){return new mh(t,vG[t])}var Rv=class t{static setRequestState(n,e,i){let o=t.generateLibraryState(n,i);return e?`${o}${cn.RESOURCE_DELIM}${e}`:o}static generateLibraryState(n,e){if(!n)throw Dn(gI);let i={id:n.createNewGuid()};e&&(i.meta=e);let o=JSON.stringify(i);return n.base64Encode(o)}static parseRequestState(n,e){if(!n)throw Dn(gI);if(!e)throw Dn(Ov);try{let i=e.split(cn.RESOURCE_DELIM),o=i[0],r=i.length>1?i.slice(1).join(cn.RESOURCE_DELIM):cn.EMPTY_STRING,s=n.base64Decode(o),d=JSON.parse(s);return{userRequestState:r||cn.EMPTY_STRING,libraryState:d}}catch{throw Dn(Ov)}}};var MYe={SW:"sw"},qg=class{constructor(n,e){this.cryptoUtils=n,this.performanceClient=e}generateCnf(n,e){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.PopTokenGenerateCnf,n.correlationId);let i=yield Zi(this.generateKid.bind(this),ct.PopTokenGenerateCnf,e,this.performanceClient,n.correlationId)(n),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(i));return{kid:i.kid,reqCnfString:o}})}generateKid(n){return bt(this,null,function*(){return this.performanceClient?.addQueueMeasurement(ct.PopTokenGenerateKid,n.correlationId),{kid:yield this.cryptoUtils.getPublicKeyThumbprint(n),xms_ksl:MYe.SW}})}signPopToken(n,e,i){return bt(this,null,function*(){return this.signPayload(n,e,i)})}signPayload(n,e,i,o){return bt(this,null,function*(){let{resourceRequestMethod:r,resourceRequestUri:s,shrClaims:d,shrNonce:m,shrOptions:v}=i,O=(s?new da(s):void 0)?.getUrlComponents();return this.cryptoUtils.signJwt(be({at:n,ts:i0(),m:r?.toUpperCase(),u:O?.HostNameAndPort,nonce:m||this.cryptoUtils.createNewGuid(),p:O?.AbsolutePath,q:O?.QueryString?[[],O.QueryString]:void 0,client_claims:d||void 0},o),e,v,i.correlationId)})}};var CG=class{constructor(n,e){this.cache=n,this.hasChanged=e}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}};var Fv=class t{constructor(n,e,i,o,r,s,d){this.clientId=n,this.cacheStorage=e,this.cryptoObj=i,this.logger=o,this.serializableCache=r,this.persistencePlugin=s,this.performanceClient=d}validateTokenResponse(n,e){if(n.error||n.error_description||n.suberror){let i=`Error(s): ${n.error_codes||cn.NOT_AVAILABLE} - Timestamp: ${n.timestamp||cn.NOT_AVAILABLE} - Description: ${n.error_description||cn.NOT_AVAILABLE} - Correlation ID: ${n.correlation_id||cn.NOT_AVAILABLE} - Trace ID: ${n.trace_id||cn.NOT_AVAILABLE}`,o=n.error_codes?.length?n.error_codes[0]:void 0,r=new $g(n.error,i,n.suberror,o,n.status);if(e&&n.status&&n.status>=kv.SERVER_ERROR_RANGE_START&&n.status<=kv.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed. ${r}`);return}else if(e&&n.status&&n.status>=kv.CLIENT_ERROR_RANGE_START&&n.status<=kv.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token. ${r}`);return}throw bG(n.error,n.error_description,n.suberror)?new mh(n.error,n.error_description,n.suberror,n.timestamp||cn.EMPTY_STRING,n.trace_id||cn.EMPTY_STRING,n.correlation_id||cn.EMPTY_STRING,n.claims||cn.EMPTY_STRING,o):r}}handleServerTokenResponse(n,e,i,o,r,s,d,m,v){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.HandleServerTokenResponse,n.correlation_id);let w;if(n.id_token){if(w=uw(n.id_token||cn.EMPTY_STRING,this.cryptoObj.base64Decode),r&&r.nonce&&w.nonce!==r.nonce)throw Dn(JA);if(o.maxAge||o.maxAge===0){let $=w.auth_time;if(!$)throw Dn(sw);M4($,o.maxAge)}}this.homeAccountIdentifier=em.generateHomeAccountId(n.client_info||cn.EMPTY_STRING,e.authorityType,this.logger,this.cryptoObj,w);let O;r&&r.state&&(O=Rv.parseRequestState(this.cryptoObj,r.state)),n.key_id=n.key_id||o.sshKid||void 0;let N=this.generateCacheRecord(n,e,i,o,w,s,r),V;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),V=new CG(this.serializableCache,!0),yield this.persistencePlugin.beforeCacheAccess(V)),d&&!m&&N.account){let $=this.cacheStorage.generateAccountKey(N.account.getAccountInfo());if(!this.cacheStorage.getAccount($,o.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),yield t.generateAuthenticationResult(this.cryptoObj,e,N,!1,o,w,O,void 0,v)}yield this.cacheStorage.saveCacheRecord(N,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&V&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),yield this.persistencePlugin.afterCacheAccess(V))}return t.generateAuthenticationResult(this.cryptoObj,e,N,!1,o,w,O,n,v)})}generateCacheRecord(n,e,i,o,r,s,d){let m=e.getPreferredCache();if(!m)throw Dn(lw);let v=_G(r),w,O;n.id_token&&r&&(w=jre(this.homeAccountIdentifier,m,n.id_token,this.clientId,v||""),O=lF(this.cacheStorage,e,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,r,n.client_info,m,v,d,void 0,this.logger));let N=null;if(n.access_token){let q=n.scope?Wd.fromString(n.scope):new Wd(o.scopes||[]),W=(typeof n.expires_in=="string"?parseInt(n.expires_in,10):n.expires_in)||0,te=(typeof n.ext_expires_in=="string"?parseInt(n.ext_expires_in,10):n.ext_expires_in)||0,fe=(typeof n.refresh_in=="string"?parseInt(n.refresh_in,10):n.refresh_in)||void 0,xe=i+W,Fe=xe+te,Re=fe&&fe>0?i+fe:void 0;N=Gre(this.homeAccountIdentifier,m,n.access_token,this.clientId,v||e.tenant||"",q.printScopes(),xe,Fe,this.cryptoObj.base64Decode,Re,n.token_type,s,n.key_id,o.claims,o.requestedClaimsHash)}let V=null;if(n.refresh_token){let q;if(n.refresh_token_expires_in){let W=typeof n.refresh_token_expires_in=="string"?parseInt(n.refresh_token_expires_in,10):n.refresh_token_expires_in;q=i+W}V=$re(this.homeAccountIdentifier,m,n.refresh_token,this.clientId,n.foci,s,q)}let $=null;return n.foci&&($={clientId:this.clientId,environment:m,familyId:n.foci}),{account:O,idToken:w,accessToken:N,refreshToken:V,appMetadata:$}}static generateAuthenticationResult(n,e,i,o,r,s,d,m,v){return bt(this,null,function*(){let w=cn.EMPTY_STRING,O=[],N=null,V,$,q=cn.EMPTY_STRING;if(i.accessToken){if(i.accessToken.tokenType===va.POP&&!r.popKid){let xe=new qg(n),{secret:Fe,keyId:Re}=i.accessToken;if(!Re)throw Dn(ck);w=yield xe.signPopToken(Fe,Re,r)}else w=i.accessToken.secret;O=Wd.fromString(i.accessToken.target).asArray(),N=Y4(i.accessToken.expiresOn),V=Y4(i.accessToken.extendedExpiresOn),i.accessToken.refreshOn&&($=Y4(i.accessToken.refreshOn))}i.appMetadata&&(q=i.appMetadata.familyId===$A?$A:"");let W=s?.oid||s?.sub||"",te=s?.tid||"";m?.spa_accountid&&i.account&&(i.account.nativeAccountId=m?.spa_accountid);let fe=i.account?vk(i.account.getAccountInfo(),void 0,s,i.idToken?.secret):null;return{authority:e.canonicalAuthority,uniqueId:W,tenantId:te,scopes:O,account:fe,idToken:i?.idToken?.secret||"",idTokenClaims:s||{},accessToken:w,fromCache:o,expiresOn:N,extExpiresOn:V,refreshOn:$,correlationId:r.correlationId,requestId:v||cn.EMPTY_STRING,familyId:q,tokenType:i.accessToken?.tokenType||cn.EMPTY_STRING,state:d?d.userRequestState:cn.EMPTY_STRING,cloudGraphHostName:i.account?.cloudGraphHostName||cn.EMPTY_STRING,msGraphHost:i.account?.msGraphHost||cn.EMPTY_STRING,code:m?.spa_code,fromNativeBroker:!1}})}};function lF(t,n,e,i,o,r,s,d,m,v,w,O){O?.verbose("setCachedAccount called");let V=t.getAccountKeys().find(fe=>fe.startsWith(e)),$=null;V&&($=t.getAccount(V,o));let q=$||em.createAccount({homeAccountId:e,idTokenClaims:r,clientInfo:s,environment:d,cloudGraphHostName:v?.cloud_graph_host_name,msGraphHost:v?.msgraph_host,nativeAccountId:w},n,i),W=q.tenantProfiles||[],te=m||q.realm;if(te&&!W.find(fe=>fe.tenantId===te)){let fe=JR(e,q.localAccountId,te,r);W.push(fe)}return q.tenantProfiles=W,q}function xG(t,n,e){return bt(this,null,function*(){return typeof t=="string"?t:t({clientId:n,tokenEndpoint:e})})}var kk=class extends wI{constructor(n,e){super(n,e),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}acquireToken(n,e){return bt(this,null,function*(){if(this.performanceClient?.addQueueMeasurement(ct.AuthClientAcquireToken,n.correlationId),!n.code)throw Dn(ik);let i=i0(),o=yield Zi(this.executeTokenRequest.bind(this),ct.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,n.correlationId)(this.authority,n),r=o.headers?.[Fu.X_MS_REQUEST_ID],s=new Fv(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return s.validateTokenResponse(o.body),Zi(s.handleServerTokenResponse.bind(s),ct.HandleServerTokenResponse,this.logger,this.performanceClient,n.correlationId)(o.body,this.authority,i,n,e,void 0,void 0,void 0,r)})}getLogoutUri(n){if(!n)throw Ja(fk);let e=this.createLogoutUrlQueryString(n);return da.appendQueryString(this.authority.endSessionEndpoint,e)}executeTokenRequest(n,e){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.AuthClientExecuteTokenRequest,e.correlationId);let i=this.createTokenQueryParameters(e),o=da.appendQueryString(n.tokenEndpoint,i),r=yield Zi(this.createTokenRequestBody.bind(this),ct.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),s;if(e.clientInfo)try{let v=iF(e.clientInfo,this.cryptoUtils.base64Decode);s={credential:`${v.uid}${ow.CLIENT_INFO_SEPARATOR}${v.utid}`,type:Um.HOME_ACCOUNT_ID}}catch(v){this.logger.verbose("Could not parse client info for CCS Header: "+v)}let d=this.createTokenRequestHeaders(s||e.ccsCredential),m=_w(this.config.authOptions.clientId,e);return Zi(this.executePostToTokenEndpoint.bind(this),ct.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(o,r,d,m,e.correlationId,ct.AuthorizationCodeClientExecutePostToTokenEndpoint)})}createTokenRequestBody(n){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.AuthClientCreateTokenRequestBody,n.correlationId);let e=new Map;if(wk(e,n.embeddedClientId||n.tokenBodyParameters?.[zC]||this.config.authOptions.clientId),this.includeRedirectUri)Sk(e,n.redirectUri);else if(!n.redirectUri)throw Ja(dk);if(xk(e,n.scopes,!0,this.oidcDefaultScopes),Bre(e,n.code),N4(e,this.config.libraryInfo),B4(e,this.config.telemetry.application),W4(e),this.serverTelemetryManager&&!rG(this.config)&&K4(e,this.serverTelemetryManager),n.codeVerifier&&zre(e,n.codeVerifier),this.config.clientCredentials.clientSecret&&z4(e,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let o=this.config.clientCredentials.clientAssertion;U4(e,yield xG(o.assertion,this.config.authOptions.clientId,n.resourceRequestUri)),H4(e,o.assertionType)}if(j4(e,JV.AUTHORIZATION_CODE_GRANT),Ek(e),n.authenticationScheme===va.POP){let o=new qg(this.cryptoUtils,this.performanceClient),r;n.popKid?r=this.cryptoUtils.encodeKid(n.popKid):r=(yield Zi(o.generateCnf.bind(o),ct.PopTokenGenerateCnf,this.logger,this.performanceClient,n.correlationId)(n,this.logger)).reqCnfString,$4(e,r)}else if(n.authenticationScheme===va.SSH)if(n.sshJwk)q4(e,n.sshJwk);else throw Ja(dw);(!$c.isEmptyObj(n.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Tk(e,n.claims,this.config.authOptions.clientCapabilities);let i;if(n.clientInfo)try{let o=iF(n.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${o.uid}${ow.CLIENT_INFO_SEPARATOR}${o.utid}`,type:Um.HOME_ACCOUNT_ID}}catch(o){this.logger.verbose("Could not parse client info for CCS Header: "+o)}else i=n.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&i)switch(i.type){case Um.HOME_ACCOUNT_ID:try{let o=VC(i.credential);mw(e,o)}catch(o){this.logger.verbose("Could not parse home account ID for CCS Header: "+o)}break;case Um.UPN:xI(e,i.credential);break}return n.embeddedClientId&&gw(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri),n.tokenBodyParameters&&fw(e,n.tokenBodyParameters),n.enableSpaAuthorizationCode&&(!n.tokenBodyParameters||!n.tokenBodyParameters[cG])&&fw(e,{[cG]:"1"}),Ck(e,n.correlationId,this.performanceClient),NC(e)})}createLogoutUrlQueryString(n){let e=new Map;return n.postLogoutRedirectUri&&Rre(e,n.postLogoutRedirectUri),n.correlationId&&Ik(e,n.correlationId),n.idTokenHint&&Fre(e,n.idTokenHint),n.state&&V4(e,n.state),n.logoutHint&&Ure(e,n.logoutHint),n.extraQueryParameters&&fw(e,n.extraQueryParameters),this.config.authOptions.instanceAware&&G4(e),NC(e,this.config.authOptions.encodeExtraQueryParams,n.extraQueryParameters)}};var OYe=300,J4=class extends wI{constructor(n,e){super(n,e)}acquireToken(n){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.RefreshTokenClientAcquireToken,n.correlationId);let e=i0(),i=yield Zi(this.executeTokenRequest.bind(this),ct.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,n.correlationId)(n,this.authority),o=i.headers?.[Fu.X_MS_REQUEST_ID],r=new Fv(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return r.validateTokenResponse(i.body),Zi(r.handleServerTokenResponse.bind(r),ct.HandleServerTokenResponse,this.logger,this.performanceClient,n.correlationId)(i.body,this.authority,e,n,void 0,void 0,!0,n.forceCache,o)})}acquireTokenByRefreshToken(n){return bt(this,null,function*(){if(!n)throw Ja(mk);if(this.performanceClient?.addQueueMeasurement(ct.RefreshTokenClientAcquireTokenByRefreshToken,n.correlationId),!n.account)throw Dn(aw);if(this.cacheManager.isAppMetadataFOCI(n.account.environment))try{return yield Zi(this.acquireTokenWithCachedRefreshToken.bind(this),ct.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,n.correlationId)(n,!0)}catch(i){let o=i instanceof mh&&i.errorCode===SI,r=i instanceof $g&&i.errorCode===Qj.INVALID_GRANT_ERROR&&i.subError===Qj.CLIENT_MISMATCH_ERROR;if(o||r)return Zi(this.acquireTokenWithCachedRefreshToken.bind(this),ct.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,n.correlationId)(n,!1);throw i}return Zi(this.acquireTokenWithCachedRefreshToken.bind(this),ct.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,n.correlationId)(n,!1)})}acquireTokenWithCachedRefreshToken(n,e){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.RefreshTokenClientAcquireTokenWithCachedRefreshToken,n.correlationId);let i=Yd(this.cacheManager.getRefreshToken.bind(this.cacheManager),ct.CacheManagerGetRefreshToken,this.logger,this.performanceClient,n.correlationId)(n.account,e,n.correlationId,void 0,this.performanceClient);if(!i)throw Ak(SI);if(i.expiresOn&&rF(i.expiresOn,n.refreshTokenExpirationOffsetSeconds||OYe))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},n.correlationId),Ak(X4);let o=mt(be({},n),{refreshToken:i.secret,authenticationScheme:n.authenticationScheme||va.BEARER,ccsCredential:{credential:n.account.homeAccountId,type:Um.HOME_ACCOUNT_ID}});try{return yield Zi(this.acquireToken.bind(this),ct.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,n.correlationId)(o)}catch(r){if(r instanceof mh&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},n.correlationId),r.subError===TI)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");let s=this.cacheManager.generateCredentialKey(i);this.cacheManager.removeRefreshToken(s,n.correlationId)}throw r}})}executeTokenRequest(n,e){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.RefreshTokenClientExecuteTokenRequest,n.correlationId);let i=this.createTokenQueryParameters(n),o=da.appendQueryString(e.tokenEndpoint,i),r=yield Zi(this.createTokenRequestBody.bind(this),ct.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,n.correlationId)(n),s=this.createTokenRequestHeaders(n.ccsCredential),d=_w(this.config.authOptions.clientId,n);return Zi(this.executePostToTokenEndpoint.bind(this),ct.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,n.correlationId)(o,r,s,d,n.correlationId,ct.RefreshTokenClientExecutePostToTokenEndpoint)})}createTokenRequestBody(n){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.RefreshTokenClientCreateTokenRequestBody,n.correlationId);let e=new Map;if(wk(e,n.embeddedClientId||n.tokenBodyParameters?.[zC]||this.config.authOptions.clientId),n.redirectUri&&Sk(e,n.redirectUri),xk(e,n.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),j4(e,JV.REFRESH_TOKEN_GRANT),Ek(e),N4(e,this.config.libraryInfo),B4(e,this.config.telemetry.application),W4(e),this.serverTelemetryManager&&!rG(this.config)&&K4(e,this.serverTelemetryManager),Vre(e,n.refreshToken),this.config.clientCredentials.clientSecret&&z4(e,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let i=this.config.clientCredentials.clientAssertion;U4(e,yield xG(i.assertion,this.config.authOptions.clientId,n.resourceRequestUri)),H4(e,i.assertionType)}if(n.authenticationScheme===va.POP){let i=new qg(this.cryptoUtils,this.performanceClient),o;n.popKid?o=this.cryptoUtils.encodeKid(n.popKid):o=(yield Zi(i.generateCnf.bind(i),ct.PopTokenGenerateCnf,this.logger,this.performanceClient,n.correlationId)(n,this.logger)).reqCnfString,$4(e,o)}else if(n.authenticationScheme===va.SSH)if(n.sshJwk)q4(e,n.sshJwk);else throw Ja(dw);if((!$c.isEmptyObj(n.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Tk(e,n.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&n.ccsCredential)switch(n.ccsCredential.type){case Um.HOME_ACCOUNT_ID:try{let i=VC(n.ccsCredential.credential);mw(e,i)}catch(i){this.logger.verbose("Could not parse home account ID for CCS Header: "+i)}break;case Um.UPN:xI(e,n.ccsCredential.credential);break}return n.embeddedClientId&&gw(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri),n.tokenBodyParameters&&fw(e,n.tokenBodyParameters),Ck(e,n.correlationId,this.performanceClient),NC(e)})}};var e5=class extends wI{constructor(n,e){super(n,e)}acquireCachedToken(n){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.SilentFlowClientAcquireCachedToken,n.correlationId);let e=PC.NOT_APPLICABLE;if(n.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!$c.isEmptyObj(n.claims))throw this.setCacheOutcome(PC.FORCE_REFRESH_OR_CLAIMS,n.correlationId),Dn(cw);if(!n.account)throw Dn(aw);let i=n.account.tenantId||RSe(n.authority),o=this.cacheManager.getTokenKeys(),r=this.cacheManager.getAccessToken(n.account,n,o,i);if(r){if(Hre(r.cachedAt)||rF(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(PC.CACHED_ACCESS_TOKEN_EXPIRED,n.correlationId),Dn(cw);r.refreshOn&&rF(r.refreshOn,0)&&(e=PC.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(PC.NO_CACHED_ACCESS_TOKEN,n.correlationId),Dn(cw);let s=n.authority||this.authority.getPreferredCache(),d={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(n.account),n.correlationId),accessToken:r,idToken:this.cacheManager.getIdToken(n.account,n.correlationId,o,i,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(s)};return this.setCacheOutcome(e,n.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[yield Zi(this.generateResultFromCacheRecord.bind(this),ct.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,n.correlationId)(d,n),e]})}setCacheOutcome(n,e){this.serverTelemetryManager?.setCacheOutcome(n),this.performanceClient?.addFields({cacheOutcome:n},e),n!==PC.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${n}`)}generateResultFromCacheRecord(n,e){return bt(this,null,function*(){this.performanceClient?.addQueueMeasurement(ct.SilentFlowClientGenerateResultFromCacheRecord,e.correlationId);let i;if(n.idToken&&(i=uw(n.idToken.secret,this.config.cryptoInterface.base64Decode)),e.maxAge||e.maxAge===0){let o=i?.auth_time;if(!o)throw Dn(sw);M4(o,e.maxAge)}return Fv.generateAuthenticationResult(this.cryptoUtils,this.authority,n,!0,e,i)})}};var Zre={sendGetRequestAsync:()=>Promise.reject(Dn(ca)),sendPostRequestAsync:()=>Promise.reject(Dn(ca))};var HC={};Ng(HC,{getAuthorizationCodePayload:()=>PYe,getAuthorizeUrl:()=>FYe,getStandardAuthorizeRequestParameters:()=>RYe,validateAuthorizationResponse:()=>LSe});function RYe(t,n,e,i){let o=n.correlationId,r=new Map;wk(r,n.embeddedClientId||n.extraQueryParameters?.[zC]||t.clientId);let s=[...n.scopes||[],...n.extraScopesToConsent||[]];if(xk(r,s,!0,t.authority.options.OIDCOptions?.defaultScopes),Sk(r,n.redirectUri),Ik(r,o),Ore(r,n.responseMode),Ek(r),n.prompt&&(Lre(r,n.prompt),i?.addFields({prompt:n.prompt},o)),n.domainHint&&(Pre(r,n.domainHint),i?.addFields({domainHintFromRequest:!0},o)),n.prompt!==Pu.SELECT_ACCOUNT)if(n.sid&&n.prompt===Pu.NONE)e.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),uG(r,n.sid),i?.addFields({sidFromRequest:!0},o);else if(n.account){let d=NYe(n.account),m=BYe(n.account);if(m&&n.domainHint&&(e.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),m=null),m){e.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),oF(r,m),i?.addFields({loginHintFromClaim:!0},o);try{let v=VC(n.account.homeAccountId);mw(r,v)}catch{e.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(d&&n.prompt===Pu.NONE){e.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),uG(r,d),i?.addFields({sidFromClaim:!0},o);try{let v=VC(n.account.homeAccountId);mw(r,v)}catch{e.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(n.loginHint)e.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),oF(r,n.loginHint),xI(r,n.loginHint),i?.addFields({loginHintFromRequest:!0},o);else if(n.account.username){e.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),oF(r,n.account.username),i?.addFields({loginHintFromUpn:!0},o);try{let v=VC(n.account.homeAccountId);mw(r,v)}catch{e.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else n.loginHint&&(e.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),oF(r,n.loginHint),xI(r,n.loginHint),i?.addFields({loginHintFromRequest:!0},o));else e.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");return n.nonce&&Nre(r,n.nonce),n.state&&V4(r,n.state),(n.claims||t.clientCapabilities&&t.clientCapabilities.length>0)&&Tk(r,n.claims,t.clientCapabilities),n.embeddedClientId&&gw(r,t.clientId,t.redirectUri),t.instanceAware&&(!n.extraQueryParameters||!Object.keys(n.extraQueryParameters).includes(nF))&&G4(r),r}function FYe(t,n,e,i){let o=NC(n,e,i);return da.appendQueryString(t.authorizationEndpoint,o)}function PYe(t,n){if(LSe(t,n),!t.code)throw Dn(ak);return t}function LSe(t,n){if(!t.state||!n)throw t.state?Dn(mI,"Cached State"):Dn(mI,"Server State");let e,i;try{e=decodeURIComponent(t.state)}catch{throw Dn(Ov,t.state)}try{i=decodeURIComponent(n)}catch{throw Dn(Ov,t.state)}if(e!==i)throw Dn(XA);if(t.error||t.error_description||t.suberror){let o=LYe(t);throw bG(t.error,t.error_description,t.suberror)?new mh(t.error||"",t.error_description,t.suberror,t.timestamp||"",t.trace_id||"",t.correlation_id||"",t.claims||"",o):new $g(t.error||"",t.error_description,t.suberror,o)}}function LYe(t){let n="code=",e=t.error_uri?.lastIndexOf(n);return e&&e>=0?t.error_uri?.substring(e+n.length):void 0}function NYe(t){return t.idTokenClaims?.sid||null}function BYe(t){return t.loginHint||t.idTokenClaims?.login_hint||null}var NSe=",",BSe="|";function VYe(t){let{skus:n,libraryName:e,libraryVersion:i,extensionName:o,extensionVersion:r}=t,s=new Map([[0,[e,i]],[2,[o,r]]]),d=[];if(n?.length){if(d=n.split(NSe),d.length<4)return n}else d=Array.from({length:4},()=>BSe);return s.forEach((m,v)=>{m.length===2&&m[0]?.length&&m[1]?.length&&zYe({skuArr:d,index:v,skuName:m[0],skuVersion:m[1]})}),d.join(NSe)}function zYe(t){let{skuArr:n,index:e,skuName:i,skuVersion:o}=t;e>=n.length||(n[e]=[i,o].join(BSe))}var Mk=class t{constructor(n,e){this.cacheOutcome=PC.NOT_APPLICABLE,this.cacheManager=e,this.apiId=n.apiId,this.correlationId=n.correlationId,this.wrapperSKU=n.wrapperSKU||cn.EMPTY_STRING,this.wrapperVer=n.wrapperVer||cn.EMPTY_STRING,this.telemetryCacheKey=Np.CACHE_KEY+ow.CACHE_KEY_SEPARATOR+n.clientId}generateCurrentRequestHeaderValue(){let n=`${this.apiId}${Np.VALUE_SEPARATOR}${this.cacheOutcome}`,e=[this.wrapperSKU,this.wrapperVer],i=this.getNativeBrokerErrorCode();i?.length&&e.push(`broker_error=${i}`);let o=e.join(Np.VALUE_SEPARATOR),r=this.getRegionDiscoveryFields(),s=[n,r].join(Np.VALUE_SEPARATOR);return[Np.SCHEMA_VERSION,s,o].join(Np.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){let n=this.getLastRequests(),e=t.maxErrorsToSend(n),i=n.failedRequests.slice(0,2*e).join(Np.VALUE_SEPARATOR),o=n.errors.slice(0,e).join(Np.VALUE_SEPARATOR),r=n.errors.length,s=e=Np.MAX_CACHED_ERRORS&&(e.failedRequests.shift(),e.failedRequests.shift(),e.errors.shift()),e.failedRequests.push(this.apiId,this.correlationId),n instanceof Error&&n&&n.toString()?n instanceof Rs?n.subError?e.errors.push(n.subError):n.errorCode?e.errors.push(n.errorCode):e.errors.push(n.toString()):e.errors.push(n.toString()):e.errors.push(Np.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId)}incrementCacheHits(){let n=this.getLastRequests();return n.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,n,this.correlationId),n.cacheHits}getLastRequests(){let n={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||n}clearTelemetryCache(){let n=this.getLastRequests(),e=t.maxErrorsToSend(n),i=n.errors.length;if(e===i)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{let o={failedRequests:n.failedRequests.slice(e*2),errors:n.errors.slice(e),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o,this.correlationId)}}static maxErrorsToSend(n){let e,i=0,o=0,r=n.errors.length;for(e=0;eString.fromCodePoint(e)).join("");return btoa(n)}function Hm(t){return new TextDecoder().decode(WC(t))}function WC(t){let n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw fo(RF)}let e=atob(n);return Uint8Array.from(e,i=>i.codePointAt(0)||0)}var HYe="RSASSA-PKCS1-v1_5",NF="AES-GCM",$Se="HKDF",rse="SHA-256",jYe=2048,GYe=new Uint8Array([1,0,1]),jSe="0123456789abcdef",GSe=new Uint32Array(1),sse="raw",qSe="encrypt",ase="decrypt",$Ye="deriveKey",qYe="crypto_subtle_undefined",lse={name:HYe,hash:rse,modulusLength:jYe,publicExponent:GYe};function KSe(t){if(!window)throw fo($C);if(!window.crypto)throw fo(Rk);if(!t&&!window.crypto.subtle)throw fo(Rk,qYe)}function cse(t,n,e){return bt(this,null,function*(){n?.addQueueMeasurement(ct.Sha256Digest,e);let o=new TextEncoder().encode(t);return window.crypto.subtle.digest(rse,o)})}function WSe(t){return window.crypto.getRandomValues(t)}function ose(){return window.crypto.getRandomValues(GSe),GSe[0]}function zp(){let t=Date.now(),n=ose()*1024+(ose()&1023),e=new Uint8Array(16),i=Math.trunc(n/2**30),o=n&2**30-1,r=ose();e[0]=t/2**40,e[1]=t/2**32,e[2]=t/2**24,e[3]=t/2**16,e[4]=t/2**8,e[5]=t,e[6]=112|i>>>8,e[7]=i,e[8]=128|o>>>24,e[9]=o>>>16,e[10]=o>>>8,e[11]=o,e[12]=r>>>24,e[13]=r>>>16,e[14]=r>>>8,e[15]=r;let s="";for(let d=0;d>>4),s+=jSe.charAt(e[d]&15),(d===3||d===5||d===7||d===9)&&(s+="-");return s}function YSe(t,n){return bt(this,null,function*(){return window.crypto.subtle.generateKey(lse,t,n)})}function FG(t){return bt(this,null,function*(){return window.crypto.subtle.exportKey(ise,t)})}function QSe(t,n,e){return bt(this,null,function*(){return window.crypto.subtle.importKey(ise,t,lse,n,e)})}function ZSe(t,n){return bt(this,null,function*(){return window.crypto.subtle.sign(lse,t,n)})}function BF(){return bt(this,null,function*(){let t=yield dse(),e={alg:"dir",kty:"oct",k:iy(new Uint8Array(t))};return kI(JSON.stringify(e))})}function KYe(t){return bt(this,null,function*(){let n=Hm(t),i=JSON.parse(n).k,o=WC(i);return window.crypto.subtle.importKey(sse,o,NF,!1,[ase])})}function XSe(t,n){return bt(this,null,function*(){let e=n.split(".");if(e.length!==5)throw fo(PF,"jwe_length");let i=yield KYe(t).catch(()=>{throw fo(PF,"import_key")});try{let o=new TextEncoder().encode(e[0]),r=WC(e[2]),s=WC(e[3]),d=WC(e[4]),m=d.byteLength*8,v=new Uint8Array(s.length+d.length);v.set(s),v.set(d,s.length);let w=yield window.crypto.subtle.decrypt({name:NF,iv:r,tagLength:m,additionalData:o},i,v);return new TextDecoder().decode(w)}catch{throw fo(PF,"decrypt")}})}function dse(){return bt(this,null,function*(){let t=yield window.crypto.subtle.generateKey({name:NF,length:256},!0,[qSe,ase]);return window.crypto.subtle.exportKey(sse,t)})}function use(t){return bt(this,null,function*(){return window.crypto.subtle.importKey(sse,t,$Se,!1,[$Ye])})}function JSe(t,n,e){return bt(this,null,function*(){return window.crypto.subtle.deriveKey({name:$Se,salt:n,hash:rse,info:new TextEncoder().encode(e)},t,{name:NF,length:256},!1,[qSe,ase])})}function eTe(t,n,e){return bt(this,null,function*(){let i=new TextEncoder().encode(n),o=window.crypto.getRandomValues(new Uint8Array(16)),r=yield JSe(t,o,e),s=yield window.crypto.subtle.encrypt({name:NF,iv:new Uint8Array(12)},r,i);return{data:iy(new Uint8Array(s)),nonce:iy(o)}})}function pse(t,n,e,i){return bt(this,null,function*(){let o=WC(i),r=yield JSe(t,WC(n),e),s=yield window.crypto.subtle.decrypt({name:NF,iv:new Uint8Array(12)},r,o);return new TextDecoder().decode(s)})}function PG(t){return bt(this,null,function*(){let n=yield cse(t),e=new Uint8Array(n);return iy(e)})}var MI="storage_not_supported",LG="stubbed_public_client_application_called",VF="in_mem_redirect_unavailable";var NG={[MI]:"Given storage configuration option was not supported.",[LG]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[VF]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."},WYe={storageNotSupportedError:{code:MI,desc:NG[MI]},stubPcaInstanceCalled:{code:LG,desc:NG[LG]},inMemRedirectUnavailable:{code:VF,desc:NG[VF]}},Nk=class t extends Rs{constructor(n,e){super(n,e),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,t.prototype)}};function zF(t){return new Nk(t,NG[t])}function r5(t){t.location.hash="",typeof t.history.replaceState=="function"&&t.history.replaceState(null,"",`${t.location.origin}${t.location.pathname}${t.location.search}`)}function hse(t){let n=t.split("#");n.shift(),window.location.hash=n.length>0?n.join("#"):""}function s5(){return window.parent!==window}function tTe(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${Qd.POPUP_NAME_PREFIX}.`)===0}function eg(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function mse(){let n=new da(window.location.href).getUrlComponents();return`${n.Protocol}//${n.HostNameAndPort}/`}function iTe(){if(da.hashContainsKnownProperties(window.location.hash)&&s5())throw fo(yF)}function nTe(t){if(s5()&&!t)throw fo(_F)}function oTe(){if(tTe())throw fo(vF)}function BG(){if(typeof window>"u")throw fo($C)}function VG(t){if(!t)throw fo(KC)}function a5(t){BG(),iTe(),oTe(),VG(t)}function zG(t,n){if(a5(t),nTe(n.system.allowRedirectInIframe),n.cache.cacheLocation===sd.MemoryStorage&&!n.cache.storeAuthStateInCookie)throw zF(VF)}function l5(t){let n=document.createElement("link");n.rel="preconnect",n.href=new URL(t).origin,n.crossOrigin="anonymous",document.head.appendChild(n),window.setTimeout(()=>{try{document.head.removeChild(n)}catch{}},1e4)}function fse(){return zp()}var YYe=up.addClientCapabilitiesToClaims;var c5=class t{navigateInternal(n,e){return t.defaultNavigateWindow(n,e)}navigateExternal(n,e){return t.defaultNavigateWindow(n,e)}static defaultNavigateWindow(n,e){return e.noHistory?window.location.replace(n):window.location.assign(n),new Promise((i,o)=>{setTimeout(()=>{o(fo(Pk,"failed_to_redirect"))},e.timeout)})}};var HG=class{sendGetRequestAsync(n,e){return bt(this,null,function*(){let i,o={},r=0,s=rTe(e);try{i=yield fetch(n,{method:ese.GET,headers:s})}catch(d){throw Dk(fo(window.navigator.onLine?SF:vw),void 0,void 0,d)}o=sTe(i.headers);try{return r=i.status,{headers:o,body:yield i.json(),status:r}}catch(d){throw Dk(fo(Fk),r,o,d)}})}sendPostRequestAsync(n,e){return bt(this,null,function*(){let i=e&&e.body||"",o=rTe(e),r,s=0,d={};try{r=yield fetch(n,{method:ese.POST,headers:o,body:i})}catch(m){throw Dk(fo(window.navigator.onLine?wF:vw),void 0,void 0,m)}d=sTe(r.headers);try{return s=r.status,{headers:d,body:yield r.json(),status:s}}catch(m){throw Dk(fo(Fk),s,d,m)}})}};function rTe(t){try{let n=new Headers;if(!(t&&t.headers))return n;let e=t.headers;return Object.entries(e).forEach(([i,o])=>{n.append(i,o)}),n}catch(n){throw Dk(fo(MG),void 0,void 0,n)}}function sTe(t){try{let n={};return t.forEach((e,i)=>{n[i]=e}),n}catch{throw fo(OG)}}var QYe=6e4,jG=1e4,ZYe=3e4,gse=2e3;function aTe({auth:t,cache:n,system:e,telemetry:i},o){let r={clientId:cn.EMPTY_STRING,authority:`${cn.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:cn.EMPTY_STRING,authorityMetadata:cn.EMPTY_STRING,redirectUri:typeof window<"u"?eg():"",postLogoutRedirectUri:cn.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:yd.AAD,OIDCOptions:{serverResponseType:FC.FRAGMENT,defaultScopes:[cn.OPENID_SCOPE,cn.PROFILE_SCOPE,cn.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:yI.None,tenant:cn.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},s={cacheLocation:sd.SessionStorage,cacheRetentionDays:5,temporaryCacheLocation:sd.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(n&&n.cacheLocation===sd.LocalStorage),claimsBasedCachingEnabled:!1},d={loggerCallback:()=>{},logLevel:Oc.Info,piiLoggingEnabled:!1},m=mt(be({},oG),{loggerOptions:d,networkClient:o?new HG:Zre,navigationClient:new c5,loadFrameTimeout:0,windowHashTimeout:e?.loadFrameTimeout||QYe,iframeHashTimeout:e?.loadFrameTimeout||jG,navigateFrameWait:0,redirectNavigationTimeout:ZYe,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:e?.nativeBrokerHandshakeTimeout||gse,pollIntervalMilliseconds:Qd.DEFAULT_POLL_INTERVAL_MS}),v=mt(be(be({},m),e),{loggerOptions:e?.loggerOptions||d}),w={application:{appName:cn.EMPTY_STRING,appVersion:cn.EMPTY_STRING},client:new pw};if(t?.protocolMode!==yd.OIDC&&t?.OIDCOptions&&new Qf(v.loggerOptions).warning(JSON.stringify(Ja(Zf.cannotSetOIDCOptions))),t?.protocolMode&&t.protocolMode===yd.OIDC&&v?.allowPlatformBroker)throw Ja(Zf.cannotAllowPlatformBroker);return{auth:mt(be(be({},r),t),{OIDCOptions:be(be({},r.OIDCOptions),t?.OIDCOptions)}),cache:be(be({},s),n),system:v,telemetry:be(be({},w),i)}}var lTe="@azure/msal-browser",n0="4.23.0";var Nu="msal",GG="browser";var uTe=`${Nu}.${GG}.log.level`,pTe=`${Nu}.${GG}.log.pii`,zCi=`${Nu}.${GG}.performance.enabled`,hTe=`${Nu}.${GG}.platform.auth.dom`,_se=`${Nu}.version`,cTe="account.keys",dTe="token.keys";function o0(t=1){return t<1?`${Nu}.${cTe}`:`${Nu}.${t}.${cTe}`}function YC(t,n=1){return n<1?`${Nu}.${dTe}.${t}`:`${Nu}.${n}.${dTe}.${t}`}var $G=class t{static loggerCallback(n,e){switch(n){case Oc.Error:console.error(e);return;case Oc.Info:console.info(e);return;case Oc.Verbose:console.debug(e);return;case Oc.Warning:console.warn(e);return;default:console.log(e);return}}constructor(n){this.browserEnvironment=typeof window<"u",this.config=aTe(n,this.browserEnvironment);let e;try{e=window[sd.SessionStorage]}catch{}let i=e?.getItem(uTe),o=e?.getItem(pTe)?.toLowerCase(),r=o==="true"?!0:o==="false"?!1:void 0,s=be({},this.config.system.loggerOptions),d=i&&Object.keys(Oc).includes(i)?Oc[i]:void 0;d&&(s.loggerCallback=t.loggerCallback,s.logLevel=d),r!==void 0&&(s.piiLoggingEnabled=r),this.logger=new Qf(s,lTe,n0),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}};var qG=(()=>{class t extends $G{getModuleName(){return t.MODULE_NAME}getId(){return t.ID}initialize(){return bt(this,null,function*(){return this.available=typeof window<"u",this.available})}}return t.MODULE_NAME="",t.ID="StandardOperatingContext",t})();var KG=class{constructor(){this.dbName=RG,this.version=VSe,this.tableName=zSe,this.dbOpen=!1}open(){return bt(this,null,function*(){return new Promise((n,e)=>{let i=window.indexedDB.open(this.dbName,this.version);i.addEventListener("upgradeneeded",o=>{o.target.result.createObjectStore(this.tableName)}),i.addEventListener("success",o=>{let r=o;this.db=r.target.result,this.dbOpen=!0,n()}),i.addEventListener("error",()=>e(fo(DI)))})})}closeConnection(){let n=this.db;n&&this.dbOpen&&(n.close(),this.dbOpen=!1)}validateDbIsOpen(){return bt(this,null,function*(){if(!this.dbOpen)return this.open()})}getItem(n){return bt(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((e,i)=>{if(!this.db)return i(fo(qC));let s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(n);s.addEventListener("success",d=>{let m=d;this.closeConnection(),e(m.target.result)}),s.addEventListener("error",d=>{this.closeConnection(),i(d)})})})}setItem(n,e){return bt(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((i,o)=>{if(!this.db)return o(fo(qC));let d=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(e,n);d.addEventListener("success",()=>{this.closeConnection(),i()}),d.addEventListener("error",m=>{this.closeConnection(),o(m)})})})}removeItem(n){return bt(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((e,i)=>{if(!this.db)return i(fo(qC));let s=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(n);s.addEventListener("success",()=>{this.closeConnection(),e()}),s.addEventListener("error",d=>{this.closeConnection(),i(d)})})})}getKeys(){return bt(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((n,e)=>{if(!this.db)return e(fo(qC));let r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();r.addEventListener("success",s=>{let d=s;this.closeConnection(),n(d.target.result)}),r.addEventListener("error",s=>{this.closeConnection(),e(s)})})})}containsKey(n){return bt(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((e,i)=>{if(!this.db)return i(fo(qC));let s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(n);s.addEventListener("success",d=>{let m=d;this.closeConnection(),e(m.target.result===1)}),s.addEventListener("error",d=>{this.closeConnection(),i(d)})})})}deleteDatabase(){return bt(this,null,function*(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((n,e)=>{let i=window.indexedDB.deleteDatabase(RG),o=setTimeout(()=>e(!1),200);i.addEventListener("success",()=>(clearTimeout(o),n(!0))),i.addEventListener("blocked",()=>(clearTimeout(o),n(!0))),i.addEventListener("error",()=>(clearTimeout(o),e(!1)))})})}};var Cw=class{constructor(){this.cache=new Map}initialize(){return bt(this,null,function*(){})}getItem(n){return this.cache.get(n)||null}getUserData(n){return this.getItem(n)}setItem(n,e){this.cache.set(n,e)}setUserData(n,e){return bt(this,null,function*(){this.setItem(n,e)})}removeItem(n){this.cache.delete(n)}getKeys(){let n=[];return this.cache.forEach((e,i)=>{n.push(i)}),n}containsKey(n){return this.cache.has(n)}clear(){this.cache.clear()}decryptData(){return Promise.resolve(null)}};var WG=class{constructor(n){this.inMemoryCache=new Cw,this.indexedDBCache=new KG,this.logger=n}handleDatabaseAccessError(n){if(n instanceof Lk&&n.errorCode===DI)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw n}getItem(n){return bt(this,null,function*(){let e=this.inMemoryCache.getItem(n);if(!e)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),yield this.indexedDBCache.getItem(n)}catch(i){this.handleDatabaseAccessError(i)}return e})}setItem(n,e){return bt(this,null,function*(){this.inMemoryCache.setItem(n,e);try{yield this.indexedDBCache.setItem(n,e)}catch(i){this.handleDatabaseAccessError(i)}})}removeItem(n){return bt(this,null,function*(){this.inMemoryCache.removeItem(n);try{yield this.indexedDBCache.removeItem(n)}catch(e){this.handleDatabaseAccessError(e)}})}getKeys(){return bt(this,null,function*(){let n=this.inMemoryCache.getKeys();if(n.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),yield this.indexedDBCache.getKeys()}catch(e){this.handleDatabaseAccessError(e)}return n})}containsKey(n){return bt(this,null,function*(){let e=this.inMemoryCache.containsKey(n);if(!e)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),yield this.indexedDBCache.containsKey(n)}catch(i){this.handleDatabaseAccessError(i)}return e})}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}clearPersistent(){return bt(this,null,function*(){try{this.logger.verbose("Deleting persistent keystore");let n=yield this.indexedDBCache.deleteDatabase();return n&&this.logger.verbose("Persistent keystore deleted"),n}catch(n){return this.handleDatabaseAccessError(n),!1}})}};var UF=(()=>{class t{constructor(e,i,o){this.logger=e,KSe(o??!1),this.cache=new WG(this.logger),this.performanceClient=i}createNewGuid(){return zp()}base64Encode(e){return kI(e)}base64Decode(e){return Hm(e)}base64UrlEncode(e){return o5(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}getPublicKeyThumbprint(e){return bt(this,null,function*(){let i=this.performanceClient?.startMeasurement(ct.CryptoOptsGetPublicKeyThumbprint,e.correlationId),o=yield YSe(t.EXTRACTABLE,t.POP_KEY_USAGES),r=yield FG(o.publicKey),s={e:r.e,kty:r.kty,n:r.n},d=mTe(s),m=yield this.hashString(d),v=yield FG(o.privateKey),w=yield QSe(v,!1,["sign"]);return yield this.cache.setItem(m,{privateKey:w,publicKey:o.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),i&&i.end({success:!0}),m})}removeTokenBindingKey(e){return bt(this,null,function*(){if(yield this.cache.removeItem(e),yield this.cache.containsKey(e))throw Dn(Bp.bindingKeyNotRemoved)})}clearKeystore(){return bt(this,null,function*(){this.cache.clearInMemory();try{return yield this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}})}signJwt(e,i,o,r){return bt(this,null,function*(){let s=this.performanceClient?.startMeasurement(ct.CryptoOptsSignJwt,r),d=yield this.cache.getItem(i);if(!d)throw fo(EI);let m=yield FG(d.publicKey),v=mTe(m),w=o5(JSON.stringify({kid:i})),O=t5.getShrHeaderString(mt(be({},o?.header),{alg:m.alg,kid:w})),N=o5(O);e.cnf={jwk:JSON.parse(v)};let V=o5(JSON.stringify(e)),$=`${N}.${V}`,W=new TextEncoder().encode($),te=yield ZSe(d.privateKey,W),fe=iy(new Uint8Array(te)),xe=`${$}.${fe}`;return s&&s.end({success:!0}),xe})}hashString(e){return bt(this,null,function*(){return PG(e)})}}return t.POP_KEY_USAGES=["sign","verify"],t.EXTRACTABLE=!0,t})();function mTe(t){return JSON.stringify(t,Object.keys(t).sort())}var XYe=1440*60*1e3,YG={Lax:"Lax",None:"None"},HF=class{initialize(){return Promise.resolve()}getItem(n){let e=`${encodeURIComponent(n)}`,i=document.cookie.split(";");for(let o=0;o{let o=decodeURIComponent(i).trim().split("=");e.push(o[0])}),e}containsKey(n){return this.getKeys().includes(n)}decryptData(){return Promise.resolve(null)}};function JYe(t){let n=new Date;return new Date(n.getTime()+t*XYe).toUTCString()}function Bk(t,n){let e=t.getItem(o0(n));return e?JSON.parse(e):[]}function Vk(t,n,e){let i=n.getItem(YC(t,e));if(i){let o=JSON.parse(i);if(o&&o.hasOwnProperty("idToken")&&o.hasOwnProperty("accessToken")&&o.hasOwnProperty("refreshToken"))return o}return{idToken:[],accessToken:[],refreshToken:[]}}function d5(t){return t.hasOwnProperty("id")&&t.hasOwnProperty("nonce")&&t.hasOwnProperty("data")}var fTe="msal.cache.encryption",eQe="msal.broadcast.cache",QG=class{constructor(n,e,i){if(!window.localStorage)throw zF(MI);this.memoryStorage=new Cw,this.initialized=!1,this.clientId=n,this.logger=e,this.performanceClient=i,this.broadcast=new BroadcastChannel(eQe)}initialize(n){return bt(this,null,function*(){let e=new HF,i=e.getItem(fTe),o={key:"",id:""};if(i)try{o=JSON.parse(i)}catch{}if(o.key&&o.id){let r=Yd(WC,ct.Base64Decode,this.logger,this.performanceClient,n)(o.key);this.encryptionCookie={id:o.id,key:yield Zi(use,ct.GenerateHKDF,this.logger,this.performanceClient,n)(r)}}else{let r=zp(),s=yield Zi(dse,ct.GenerateBaseKey,this.logger,this.performanceClient,n)(),d=Yd(iy,ct.UrlEncodeArr,this.logger,this.performanceClient,n)(new Uint8Array(s));this.encryptionCookie={id:r,key:yield Zi(use,ct.GenerateHKDF,this.logger,this.performanceClient,n)(s)};let m={id:r,key:d};e.setItem(fTe,JSON.stringify(m),0,!0,YG.None)}yield Zi(this.importExistingCache.bind(this),ct.ImportExistingCache,this.logger,this.performanceClient,n)(n),this.broadcast.addEventListener("message",this.updateCache.bind(this)),this.initialized=!0})}getItem(n){return window.localStorage.getItem(n)}getUserData(n){if(!this.initialized)throw fo(KC);return this.memoryStorage.getItem(n)}decryptData(n,e,i){return bt(this,null,function*(){if(!this.initialized||!this.encryptionCookie)throw fo(KC);if(e.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},i),null;let o=yield Zi(pse,ct.Decrypt,this.logger,this.performanceClient,i)(this.encryptionCookie.key,e.nonce,this.getContext(n),e.data);if(!o)return null;try{return JSON.parse(o)}catch{return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},i),null}})}setItem(n,e){window.localStorage.setItem(n,e)}setUserData(n,e,i,o){return bt(this,null,function*(){if(!this.initialized||!this.encryptionCookie)throw fo(KC);let{data:r,nonce:s}=yield Zi(eTe,ct.Encrypt,this.logger,this.performanceClient,i)(this.encryptionCookie.key,e,this.getContext(n)),d={id:this.encryptionCookie.id,nonce:s,data:r,lastUpdatedAt:o};this.memoryStorage.setItem(n,e),this.setItem(n,JSON.stringify(d)),this.broadcast.postMessage({key:n,value:e,context:this.getContext(n)})})}removeItem(n){this.memoryStorage.containsKey(n)&&(this.memoryStorage.removeItem(n),this.broadcast.postMessage({key:n,value:null,context:this.getContext(n)})),window.localStorage.removeItem(n)}getKeys(){return Object.keys(window.localStorage)}containsKey(n){return window.localStorage.hasOwnProperty(n)}clear(){this.memoryStorage.clear(),Bk(this).forEach(i=>this.removeItem(i));let e=Vk(this.clientId,this);e.idToken.forEach(i=>this.removeItem(i)),e.accessToken.forEach(i=>this.removeItem(i)),e.refreshToken.forEach(i=>this.removeItem(i)),this.getKeys().forEach(i=>{(i.startsWith(Nu)||i.indexOf(this.clientId)!==-1)&&this.removeItem(i)})}importExistingCache(n){return bt(this,null,function*(){if(!this.encryptionCookie)return;let e=Bk(this);e=yield this.importArray(e,n),e.length?this.setItem(o0(),JSON.stringify(e)):this.removeItem(o0());let i=Vk(this.clientId,this);i.idToken=yield this.importArray(i.idToken,n),i.accessToken=yield this.importArray(i.accessToken,n),i.refreshToken=yield this.importArray(i.refreshToken,n),i.idToken.length||i.accessToken.length||i.refreshToken.length?this.setItem(YC(this.clientId),JSON.stringify(i)):this.removeItem(YC(this.clientId))})}getItemFromEncryptedCache(n,e){return bt(this,null,function*(){if(!this.encryptionCookie)return null;let i=this.getItem(n);if(!i)return null;let o;try{o=JSON.parse(i)}catch{return null}return d5(o)?o.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},e),null):Zi(pse,ct.Decrypt,this.logger,this.performanceClient,e)(this.encryptionCookie.key,o.nonce,this.getContext(n),o.data):(this.performanceClient.incrementFields({unencryptedCacheCount:1},e),o)})}importArray(n,e){return bt(this,null,function*(){let i=[],o=[];return n.forEach(r=>{let s=this.getItemFromEncryptedCache(r,e).then(d=>{d?(this.memoryStorage.setItem(r,d),i.push(r)):this.removeItem(r)});o.push(s)}),yield Promise.all(o),i})}getContext(n){let e="";return n.includes(this.clientId)&&(e=this.clientId),e}updateCache(n){this.logger.trace("Updating internal cache from broadcast event");let e=this.performanceClient.startMeasurement(ct.LocalStorageUpdated);e.add({isBackground:!0});let{key:i,value:o,context:r}=n.data;if(!i){this.logger.error("Broadcast event missing key"),e.end({success:!1,errorCode:"noKey"});return}if(r&&r!==this.clientId){this.logger.trace(`Ignoring broadcast event from clientId: ${r}`),e.end({success:!1,errorCode:"contextMismatch"});return}o?(this.memoryStorage.setItem(i,o),this.logger.verbose("Updated item in internal cache")):(this.memoryStorage.removeItem(i),this.logger.verbose("Removed item from internal cache")),e.end({success:!0})}};var ZG=class{constructor(){if(!window.sessionStorage)throw zF(MI)}initialize(){return bt(this,null,function*(){})}getItem(n){return window.sessionStorage.getItem(n)}getUserData(n){return this.getItem(n)}setItem(n,e){window.sessionStorage.setItem(n,e)}setUserData(n,e){return bt(this,null,function*(){this.setItem(n,e)})}removeItem(n){window.sessionStorage.removeItem(n)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(n){return window.sessionStorage.hasOwnProperty(n)}decryptData(){return Promise.resolve(null)}};var Wo={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache",BROKER_CONNECTION_ESTABLISHED:"msal:brokerConnectionEstablished"};function yse(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}var jF=class t extends bk{constructor(n,e,i,o,r,s,d){super(n,i,o,r,d),this.cacheConfig=e,this.logger=o,this.internalStorage=new Cw,this.browserStorage=_Te(n,e.cacheLocation,o,r),this.temporaryCacheStorage=_Te(n,e.temporaryCacheLocation,o,r),this.cookieStorage=new HF,this.eventHandler=s}initialize(n){return bt(this,null,function*(){this.performanceClient.addFields({cacheLocation:this.cacheConfig.cacheLocation,cacheRetentionDays:this.cacheConfig.cacheRetentionDays},n),yield this.browserStorage.initialize(n),yield this.migrateExistingCache(n),this.trackVersionChanges(n)})}migrateExistingCache(n){return bt(this,null,function*(){let e=Bk(this.browserStorage,0),i=Vk(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:e.length,oldAccessCount:i.accessToken.length,oldIdCount:i.idToken.length,oldRefreshCount:i.refreshToken.length},n);let o=Bk(this.browserStorage,1),r=Vk(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:o.length,currAccessCount:r.accessToken.length,currIdCount:r.idToken.length,currRefreshCount:r.refreshToken.length},n),yield Promise.all([this.updateV0ToCurrent(1,e,o,n),this.updateV0ToCurrent(1,i.idToken,r.idToken,n),this.updateV0ToCurrent(1,i.accessToken,r.accessToken,n),this.updateV0ToCurrent(1,i.refreshToken,r.refreshToken,n)]),e.length>0?this.browserStorage.setItem(o0(0),JSON.stringify(e)):this.browserStorage.removeItem(o0(0)),o.length>0?this.browserStorage.setItem(o0(1),JSON.stringify(o)):this.browserStorage.removeItem(o0(1)),this.setTokenKeys(i,n,0),this.setTokenKeys(r,n,1)})}updateV0ToCurrent(n,e,i,o){return bt(this,null,function*(){let r=[];for(let s of[...e]){let d=this.browserStorage.getItem(s),m=this.validateAndParseJson(d||"");if(!m){yse(e,s);continue}m.lastUpdatedAt||(m.lastUpdatedAt=Date.now().toString(),this.setItem(s,JSON.stringify(m),o));let v=d5(m)?yield this.browserStorage.decryptData(s,m,o):m,w;if(v&&(uu.isAccessTokenEntity(v)||uu.isRefreshTokenEntity(v))&&(w=v.expiresOn),!v||Vp.isCacheExpired(m.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||w&&Vp.isTokenExpired(w,t4)){this.browserStorage.removeItem(s),yse(e,s),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},o);continue}if(this.cacheConfig.cacheLocation!==sd.LocalStorage||d5(m)){let O=`${Nu}.${n}${"-"}${s}`,N=this.browserStorage.getItem(O);if(N){let V=this.validateAndParseJson(N);if(Number(m.lastUpdatedAt)>Number(V.lastUpdatedAt)){r.push(this.setUserData(O,JSON.stringify(v),o,m.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},o)}));continue}}else{r.push(this.setUserData(O,JSON.stringify(v),o,m.lastUpdatedAt).then(()=>{i.push(O),this.performanceClient.incrementFields({upgradedCacheCount:1},o)}));continue}}}return Promise.all(r)})}trackVersionChanges(n){let e=this.browserStorage.getItem(_se);e&&(this.logger.info(`MSAL.js was last initialized by version: ${e}`),this.performanceClient.addFields({previousLibraryVersion:e},n)),e!==n0&&this.setItem(_se,n0,n)}validateAndParseJson(n){if(!n)return null;try{let e=JSON.parse(n);return e&&typeof e=="object"?e:null}catch{return null}}setItem(n,e,i){let o=0,r=[],s=20;for(let d=0;d<=s;d++)try{this.browserStorage.setItem(n,e),d>0&&(d<=o?this.removeAccessTokenKeys(r.slice(0,d),i,0):(this.removeAccessTokenKeys(r.slice(0,o),i,0),this.removeAccessTokenKeys(r.slice(o,d),i)));break}catch(m){let v=tF(m);if(v.errorCode===F4.cacheQuotaExceeded&&d0&&(m<=r?this.removeAccessTokenKeys(s.slice(0,m),i,0):(this.removeAccessTokenKeys(s.slice(0,r),i,0),this.removeAccessTokenKeys(s.slice(r,m),i)));break}catch(v){let w=tF(v);if(w.errorCode===F4.cacheQuotaExceeded&&m-1){if(i.splice(o,1),i.length===0){this.removeItem(o0());return}else this.setItem(o0(),JSON.stringify(i),e);this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}removeAccount(n,e){let i=this.getActiveAccount(e);i?.homeAccountId===n.homeAccountId&&i?.environment===n.environment&&this.setActiveAccount(null,e),super.removeAccount(n,e),this.removeAccountKeyFromMap(this.generateAccountKey(n),e),this.browserStorage.getKeys().forEach(o=>{o.includes(n.homeAccountId)&&o.includes(n.environment)&&this.browserStorage.removeItem(o)}),this.cacheConfig.cacheLocation===sd.LocalStorage&&this.eventHandler.emitEvent(Wo.ACCOUNT_REMOVED,void 0,n)}removeIdToken(n,e){super.removeIdToken(n,e);let i=this.getTokenKeys(),o=i.idToken.indexOf(n);o>-1&&(this.logger.info("idToken removed from tokenKeys map"),i.idToken.splice(o,1),this.setTokenKeys(i,e))}removeAccessToken(n,e,i=!0){super.removeAccessToken(n,e),i&&this.removeAccessTokenKeys([n],e)}removeAccessTokenKeys(n,e,i=1){this.logger.trace("removeAccessTokenKey called");let o=this.getTokenKeys(i),r=0;if(n.forEach(s=>{let d=o.accessToken.indexOf(s);d>-1&&(o.accessToken.splice(d,1),r++)}),r>0){this.logger.info(`removed ${r} accessToken keys from tokenKeys map`),this.setTokenKeys(o,e,i);return}}removeRefreshToken(n,e){super.removeRefreshToken(n,e);let i=this.getTokenKeys(),o=i.refreshToken.indexOf(n);o>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),i.refreshToken.splice(o,1),this.setTokenKeys(i,e))}getTokenKeys(n=1){return Vk(this.clientId,this.browserStorage,n)}setTokenKeys(n,e,i=1){if(n.idToken.length===0&&n.accessToken.length===0&&n.refreshToken.length===0){this.removeItem(YC(this.clientId,i));return}else this.setItem(YC(this.clientId,i),JSON.stringify(n),e)}getIdTokenCredential(n,e){let i=this.browserStorage.getUserData(n);if(!i)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(n,e),null;let o=this.validateAndParseJson(i);return!o||!uu.isIdTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),o)}setIdTokenCredential(n,e){return bt(this,null,function*(){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");let i=this.generateCredentialKey(n),o=Date.now().toString();n.lastUpdatedAt=o,yield this.setUserData(i,JSON.stringify(n),e,o);let r=this.getTokenKeys();r.idToken.indexOf(i)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(i),this.setTokenKeys(r,e))})}getAccessTokenCredential(n,e){let i=this.browserStorage.getUserData(n);if(!i)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([n],e),null;let o=this.validateAndParseJson(i);return!o||!uu.isAccessTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),o)}setAccessTokenCredential(n,e){return bt(this,null,function*(){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");let i=this.generateCredentialKey(n),o=Date.now().toString();n.lastUpdatedAt=o,yield this.setUserData(i,JSON.stringify(n),e,o);let r=this.getTokenKeys(),s=r.accessToken.indexOf(i);s!==-1&&r.accessToken.splice(s,1),this.logger.trace(`access token ${s===-1?"added to":"updated in"} map`),r.accessToken.push(i),this.setTokenKeys(r,e)})}getRefreshTokenCredential(n,e){let i=this.browserStorage.getUserData(n);if(!i)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(n,e),null;let o=this.validateAndParseJson(i);return!o||!uu.isRefreshTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),o)}setRefreshTokenCredential(n,e){return bt(this,null,function*(){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");let i=this.generateCredentialKey(n),o=Date.now().toString();n.lastUpdatedAt=o,yield this.setUserData(i,JSON.stringify(n),e,o);let r=this.getTokenKeys();r.refreshToken.indexOf(i)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(i),this.setTokenKeys(r,e))})}getAppMetadata(n){let e=this.browserStorage.getItem(n);if(!e)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;let i=this.validateAndParseJson(e);return!i||!uu.isAppMetadataEntity(n,i)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),i)}setAppMetadata(n,e){this.logger.trace("BrowserCacheManager.setAppMetadata called");let i=uu.generateAppMetadataKey(n);this.setItem(i,JSON.stringify(n),e)}getServerTelemetry(n){let e=this.browserStorage.getItem(n);if(!e)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;let i=this.validateAndParseJson(e);return!i||!uu.isServerTelemetryEntity(n,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),i)}setServerTelemetry(n,e,i){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(n,JSON.stringify(e),i)}getAuthorityMetadata(n){let e=this.internalStorage.getItem(n);if(!e)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;let i=this.validateAndParseJson(e);return i&&uu.isAuthorityMetadataEntity(n,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),i):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(n,e){this.internalStorage.setItem(n5.WRAPPER_SKU,n),this.internalStorage.setItem(n5.WRAPPER_VER,e)}getWrapperMetadata(){let n=this.internalStorage.getItem(n5.WRAPPER_SKU)||cn.EMPTY_STRING,e=this.internalStorage.getItem(n5.WRAPPER_VER)||cn.EMPTY_STRING;return[n,e]}setAuthorityMetadata(n,e){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(n,JSON.stringify(e))}getActiveAccount(n){let e=this.generateCacheKey(Yj.ACTIVE_ACCOUNT_FILTERS),i=this.browserStorage.getItem(e);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;let o=this.validateAndParseJson(i);return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,tenantId:o.tenantId},n)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(n,e){let i=this.generateCacheKey(Yj.ACTIVE_ACCOUNT_FILTERS);if(n){this.logger.verbose("setActiveAccount: Active account set");let o={homeAccountId:n.homeAccountId,localAccountId:n.localAccountId,tenantId:n.tenantId,lastUpdatedAt:Vp.nowSeconds().toString()};this.setItem(i,JSON.stringify(o),e)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(i);this.eventHandler.emitEvent(Wo.ACTIVE_ACCOUNT_CHANGED)}getThrottlingCache(n){let e=this.browserStorage.getItem(n);if(!e)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;let i=this.validateAndParseJson(e);return!i||!uu.isThrottlingEntity(n,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),i)}setThrottlingCache(n,e,i){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(n,JSON.stringify(e),i)}getTemporaryCache(n,e){let i=e?this.generateCacheKey(n):n;if(this.cacheConfig.storeAuthStateInCookie){let r=this.cookieStorage.getItem(i);if(r)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),r}let o=this.temporaryCacheStorage.getItem(i);if(!o){if(this.cacheConfig.cacheLocation===sd.LocalStorage){let r=this.browserStorage.getItem(i);if(r)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),r}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(n,e,i){let o=i?this.generateCacheKey(n):n;this.temporaryCacheStorage.setItem(o,e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,e,void 0,this.cacheConfig.secureCookies))}removeItem(n){this.browserStorage.removeItem(n)}removeTemporaryItem(n){this.temporaryCacheStorage.removeItem(n),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(n))}getKeys(){return this.browserStorage.getKeys()}clear(n){this.removeAllAccounts(n),this.removeAppMetadata(n),this.temporaryCacheStorage.getKeys().forEach(e=>{(e.indexOf(Nu)!==-1||e.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{(e.indexOf(Nu)!==-1||e.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(n){this.performanceClient.addQueueMeasurement(ct.ClearTokensAndKeysWithClaims,n);let e=this.getTokenKeys(),i=0;e.accessToken.forEach(o=>{let r=this.getAccessTokenCredential(o,n);r?.requestedClaimsHash&&o.includes(r.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(o,n),i++)}),i>0&&this.logger.warning(`${i} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(n){return $c.startsWith(n,Nu)?n:`${Nu}.${this.clientId}.${n}`}generateCredentialKey(n){let e=n.credentialType===Lu.REFRESH_TOKEN&&n.familyId||n.clientId,i=n.tokenType&&n.tokenType.toLowerCase()!==va.BEARER.toLowerCase()?n.tokenType.toLowerCase():"";return[`${Nu}.${1}`,n.homeAccountId,n.environment,n.credentialType,e,n.realm||"",n.target||"",n.requestedClaimsHash||"",i].join("-").toLowerCase()}generateAccountKey(n){let e=n.homeAccountId.split(".")[1];return[`${Nu}.${1}`,n.homeAccountId,n.environment,e||n.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(Zd.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(Zd.VERIFIER)),this.removeTemporaryItem(this.generateCacheKey(Zd.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(Zd.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(Zd.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(n,e){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");let i=kI(JSON.stringify(n));if(this.setTemporaryCache(Zd.REQUEST_PARAMS,i,!0),e){let o=kI(e);this.setTemporaryCache(Zd.VERIFIER,o,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");let n=this.getTemporaryCache(Zd.REQUEST_PARAMS,!0);if(!n)throw fo(CF);let e=this.getTemporaryCache(Zd.VERIFIER,!0),i,o="";try{i=JSON.parse(Hm(n)),e&&(o=Hm(e))}catch(r){throw this.logger.errorPii(`Attempted to parse: ${n}`),this.logger.error(`Parsing cached token request threw with error: ${r}`),fo(xF)}return[i,o]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");let n=this.getTemporaryCache(Zd.NATIVE_REQUEST,!0);if(!n)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;let e=this.validateAndParseJson(n);return e||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(n){let e=this.getInteractionInProgress()?.clientId;return n?e===this.clientId:!!e}getInteractionInProgress(){let n=`${Nu}.${Zd.INTERACTION_STATUS_KEY}`,e=this.getTemporaryCache(n,!1);try{return e?JSON.parse(e):null}catch{return this.logger.error("Cannot parse interaction status. Removing temporary cache items and clearing url hash. Retrying interaction should fix the error"),this.removeTemporaryItem(n),this.resetRequestCache(),r5(window),null}}setInteractionInProgress(n,e=Lv.SIGNIN){let i=`${Nu}.${Zd.INTERACTION_STATUS_KEY}`;if(n){if(this.getInteractionInProgress())throw fo(hF);this.setTemporaryCache(i,JSON.stringify({clientId:this.clientId,type:e}),!1)}else!n&&this.getInteractionInProgress()?.clientId===this.clientId&&this.removeTemporaryItem(i)}hydrateCache(n,e){return bt(this,null,function*(){let i=uu.createIdTokenEntity(n.account?.homeAccountId,n.account?.environment,n.idToken,this.clientId,n.tenantId),o;e.claims&&(o=yield this.cryptoImpl.hashString(e.claims));let r=uu.createAccessTokenEntity(n.account?.homeAccountId,n.account.environment,n.accessToken,this.clientId,n.tenantId,n.scopes.join(" "),n.expiresOn?Vp.toSecondsFromDate(n.expiresOn):0,n.extExpiresOn?Vp.toSecondsFromDate(n.extExpiresOn):0,Hm,void 0,n.tokenType,void 0,e.sshKid,e.claims,o),s={idToken:i,accessToken:r};return this.saveCacheRecord(s,n.correlationId)})}saveCacheRecord(n,e,i){return bt(this,null,function*(){try{yield RJ(t.prototype,this,"saveCacheRecord").call(this,n,e,i)}catch(o){if(o instanceof CI&&this.performanceClient&&e)try{let r=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:r.refreshToken.length,cacheIdCount:r.idToken.length,cacheAtCount:r.accessToken.length},e)}catch{}throw o}})}};function _Te(t,n,e,i){try{switch(n){case sd.LocalStorage:return new QG(t,e,i);case sd.SessionStorage:return new ZG;case sd.MemoryStorage:default:break}}catch(o){e.error(o)}return new Cw}var yTe=(t,n,e,i)=>{let o={cacheLocation:sd.MemoryStorage,cacheRetentionDays:5,temporaryCacheLocation:sd.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new jF(t,o,_I,n,e,i)};function vTe(t,n,e,i,o){return t.verbose("getAllAccounts called"),e?n.getAllAccounts(o||{},i):[]}function bTe(t,n,e,i){let o=e.getAccountInfoFilteredBy(t,i);return o?(n.verbose("getAccount: Account matching provided filter found, returning"),o):(n.verbose("getAccount: No matching account found, returning null"),null)}function CTe(t,n,e,i){if(n.trace("getAccountByUsername called"),!t)return n.warning("getAccountByUsername: No username provided"),null;let o=e.getAccountInfoFilteredBy({username:t},i);return o?(n.verbose("getAccountByUsername: Account matching username found, returning"),n.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${t}`),o):(n.verbose("getAccountByUsername: No matching account found, returning null"),null)}function xTe(t,n,e,i){if(n.trace("getAccountByHomeId called"),!t)return n.warning("getAccountByHomeId: No homeAccountId provided"),null;let o=e.getAccountInfoFilteredBy({homeAccountId:t},i);return o?(n.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),n.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${t}`),o):(n.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function wTe(t,n,e,i){if(n.trace("getAccountByLocalId called"),!t)return n.warning("getAccountByLocalId: No localAccountId provided"),null;let o=e.getAccountInfoFilteredBy({localAccountId:t},i);return o?(n.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),n.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${t}`),o):(n.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function STe(t,n,e){n.setActiveAccount(t,e)}function TTe(t,n){return t.getActiveAccount(n)}var tQe="msal.broadcast.event",XG=class{constructor(n){this.eventCallbacks=new Map,this.logger=n||new Qf({}),typeof BroadcastChannel<"u"&&(this.broadcastChannel=new BroadcastChannel(tQe)),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(n,e,i){if(typeof window<"u"){let o=i||fse();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[n,e||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(n){this.eventCallbacks.delete(n),this.logger.verbose(`Event callback ${n} removed.`)}emitEvent(n,e,i,o){let r={eventType:n,interactionType:e||null,payload:i||null,error:o||null,timestamp:Date.now()};switch(n){case Wo.ACCOUNT_ADDED:case Wo.ACCOUNT_REMOVED:case Wo.ACTIVE_ACCOUNT_CHANGED:this.broadcastChannel?.postMessage(r);break;default:this.invokeCallbacks(r);break}}invokeCallbacks(n){this.eventCallbacks.forEach(([e,i],o)=>{(i.length===0||i.includes(n.eventType))&&(this.logger.verbose(`Emitting event to callback ${o}: ${n.eventType}`),e.apply(null,[n]))})}invokeCrossTabCallbacks(n){let e=n.data;this.invokeCallbacks(e)}subscribeCrossTab(){this.broadcastChannel?.addEventListener("message",this.invokeCrossTabCallbacks)}unsubscribeCrossTab(){this.broadcastChannel?.removeEventListener("message",this.invokeCrossTabCallbacks)}};var GF=class{constructor(n,e,i,o,r,s,d,m,v){this.config=n,this.browserStorage=e,this.browserCrypto=i,this.networkClient=this.config.system.networkClient,this.eventHandler=r,this.navigationClient=s,this.platformAuthProvider=m,this.correlationId=v||zp(),this.logger=o.clone(Qd.MSAL_SKU,n0,this.correlationId),this.performanceClient=d}clearCacheOnLogout(n,e){return bt(this,null,function*(){if(e)try{this.browserStorage.removeAccount(e,n),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),this.browserStorage.clear(n),yield this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}})}getRedirectUri(n){this.logger.verbose("getRedirectUri called");let e=n||this.config.auth.redirectUri;return da.getAbsoluteUrl(e,eg())}initializeServerTelemetryManager(n,e){this.logger.verbose("initializeServerTelemetryManager called");let i={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:n,forceRefresh:e||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new Mk(i,this.browserStorage)}getDiscoveredAuthority(n){return bt(this,null,function*(){let{account:e}=n,i=n.requestExtraQueryParameters&&n.requestExtraQueryParameters.hasOwnProperty("instance_aware")?n.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(ct.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);let o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},r=n.requestAuthority||this.config.auth.authority,s=i?.length?i==="true":this.config.auth.instanceAware,d=e&&s?this.config.auth.authority.replace(da.getDomainFromUrl(r),e.environment):r,m=ty.generateAuthority(d,n.requestAzureCloudOptions||this.config.auth.azureCloudOptions),v=yield Zi(gG.createDiscoveredInstance,ct.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(m,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(e&&!v.isAlias(e.environment))throw Ja(Zf.authorityMismatch);return v})}};function u5(t,n,e,i){return bt(this,null,function*(){e.addQueueMeasurement(ct.InitializeBaseRequest,t.correlationId);let o=t.authority||n.auth.authority,r=[...t&&t.scopes||[]],s=mt(be({},t),{correlationId:t.correlationId,authority:o,scopes:r});if(!s.authenticationScheme)s.authenticationScheme=va.BEARER,i.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(s.authenticationScheme===va.SSH){if(!t.sshJwk)throw Ja(Zf.missingSshJwk);if(!t.sshKid)throw Ja(Zf.missingSshKid)}i.verbose(`Authentication Scheme set to "${s.authenticationScheme}" as configured in Auth request`)}return n.cache.claimsBasedCachingEnabled&&t.claims&&!$c.isEmptyObj(t.claims)&&(s.requestedClaimsHash=yield PG(t.claims)),s})}function ITe(t,n,e,i,o){return bt(this,null,function*(){i.addQueueMeasurement(ct.InitializeSilentRequest,t.correlationId);let r=yield Zi(u5,ct.InitializeBaseRequest,o,i,t.correlationId)(t,e,i,o);return mt(be(be({},t),r),{account:n,forceRefresh:t.forceRefresh||!1})})}function JG(t,n){let e,i=t.httpMethod;if(n===yd.EAR){if(e=i||ey.POST,e!==ey.POST)throw Ja(Zf.invalidRequestMethodForEAR)}else e=i||ey.GET;if(t.authorizePostBodyParameters&&e!==ey.POST)throw Ja(Zf.invalidAuthorizePostBodyParameters);return e}var Kg=class extends GF{initializeLogoutRequest(n){this.logger.verbose("initializeLogoutRequest called",n?.correlationId);let e=be({correlationId:this.correlationId||zp()},n);if(n)if(n.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(n.account){let i=this.getLogoutHintFromIdTokenClaims(n.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),e.logoutHint=i)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!n||n.postLogoutRedirectUri!==null?n&&n.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",e.correlationId),e.postLogoutRedirectUri=da.getAbsoluteUrl(n.postLogoutRedirectUri,eg())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",e.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",e.correlationId),e.postLogoutRedirectUri=da.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,eg())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",e.correlationId),e.postLogoutRedirectUri=da.getAbsoluteUrl(eg(),eg())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",e.correlationId),e}getLogoutHintFromIdTokenClaims(n){let e=n.idTokenClaims;if(e){if(e.login_hint)return e.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}createAuthCodeClient(n){return bt(this,null,function*(){this.performanceClient.addQueueMeasurement(ct.StandardInteractionClientCreateAuthCodeClient,this.correlationId);let e=yield Zi(this.getClientConfiguration.bind(this),ct.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(n);return new kk(e,this.performanceClient)})}getClientConfiguration(n){return bt(this,null,function*(){let{serverTelemetryManager:e,requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:s}=n;this.performanceClient.addQueueMeasurement(ct.StandardInteractionClientGetClientConfiguration,this.correlationId);let d=yield Zi(this.getDiscoveredAuthority.bind(this),ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:s}),m=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:d,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:m.loggerCallback,piiLoggingEnabled:m.piiLoggingEnabled,logLevel:m.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:e,libraryInfo:{sku:Qd.MSAL_SKU,version:n0,cpu:cn.EMPTY_STRING,os:cn.EMPTY_STRING},telemetry:this.config.telemetry}})}initializeAuthorizationRequest(n,e){return bt(this,null,function*(){this.performanceClient.addQueueMeasurement(ct.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);let i=this.getRedirectUri(n.redirectUri),o={interactionType:e},r=Rv.setRequestState(this.browserCrypto,n&&n.state||cn.EMPTY_STRING,o),s=yield Zi(u5,ct.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)(mt(be({},n),{correlationId:this.correlationId}),this.config,this.performanceClient,this.logger),d=mt(be({},s),{redirectUri:i,state:r,nonce:n.nonce||zp(),responseMode:this.config.auth.OIDCOptions.serverResponseType}),m=mt(be({},d),{httpMethod:JG(d,this.config.auth.protocolMode)});if(n.loginHint||n.sid)return m;let v=n.account||this.browserStorage.getActiveAccount(this.correlationId);return v&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${v.homeAccountId}`,this.correlationId),m.account=v),m})}};function ETe(t,n){if(!n)return null;try{return Rv.parseRequestState(t,n).libraryState.meta}catch{throw Dn(Bp.invalidState)}}function Uk(t,n,e){let i=BC.getDeserializedResponse(t);if(!i)throw BC.stripLeadingHashOrQuery(t)?(e.error(`A ${n} is present in the iframe but it does not contain known properties. It's likely that the ${n} has been replaced by code running on the redirectUri page.`),e.errorPii(`The ${n} detected is: ${t}`),fo(dF)):(e.error(`The request has returned to the redirectUri but a ${n} is not present. It's likely that the ${n} has been removed or the page has been redirected by code running on the redirectUri page.`),fo(cF));return i}function DTe(t,n,e){if(!t.state)throw fo(II);let i=ETe(n,t.state);if(!i)throw fo(uF);if(i.interactionType!==e)throw fo(pF)}var $F=class{constructor(n,e,i,o,r){this.authModule=n,this.browserStorage=e,this.authCodeRequest=i,this.logger=o,this.performanceClient=r}handleCodeResponse(n,e){return bt(this,null,function*(){this.performanceClient.addQueueMeasurement(ct.HandleCodeResponse,e.correlationId);let i;try{i=HC.getAuthorizationCodePayload(n,e.state)}catch(o){throw o instanceof $g&&o.subError===Pv?fo(Pv):o}return Zi(this.handleCodeResponseFromServer.bind(this),ct.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)(i,e)})}handleCodeResponseFromServer(n,e,i=!0){return bt(this,null,function*(){if(this.performanceClient.addQueueMeasurement(ct.HandleCodeResponseFromServer,e.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=n.code,n.cloud_instance_host_name&&(yield Zi(this.authModule.updateAuthority.bind(this.authModule),ct.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,e.correlationId)(n.cloud_instance_host_name,e.correlationId)),i&&(n.nonce=e.nonce||void 0),n.state=e.state,n.client_info)this.authCodeRequest.clientInfo=n.client_info;else{let r=this.createCcsCredentials(e);r&&(this.authCodeRequest.ccsCredential=r)}return yield Zi(this.authModule.acquireToken.bind(this.authModule),ct.AuthClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(this.authCodeRequest,n)})}createCcsCredentials(n){return n.account?{credential:n.account.homeAccountId,type:Um.HOME_ACCOUNT_ID}:n.loginHint?{credential:n.loginHint,type:Um.UPN}:null}};var ATe="ContentError",e$="user_switch";var kTe="USER_INTERACTION_REQUIRED",MTe="USER_CANCEL",OTe="NO_NETWORK",RTe="DISABLED",FTe="ACCOUNT_UNAVAILABLE",PTe="UX_NOT_ALLOWED";var iQe=-2147186943,nQe={[e$]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."},ny=class t extends Rs{constructor(n,e,i){super(n,e),Object.setPrototypeOf(this,t.prototype),this.name="NativeAuthError",this.ext=i}};function OI(t){if(t.ext&&t.ext.status&&t.ext.status===RTe||t.ext&&t.ext.error&&t.ext.error===iQe)return!0;switch(t.errorCode){case ATe:return!0;default:return!1}}function Hk(t,n,e){if(e&&e.status)switch(e.status){case FTe:return Ak(UC.nativeAccountUnavailable);case kTe:return new mh(t,n);case MTe:return fo(Pv);case OTe:return fo(vw);case PTe:return Ak(UC.uxNotAllowed)}return new ny(t,nQe[t]||n,e)}var qF=class extends Kg{acquireToken(n){return bt(this,null,function*(){this.performanceClient.addQueueMeasurement(ct.SilentCacheClientAcquireToken,n.correlationId);let e=this.initializeServerTelemetryManager(bl.acquireTokenSilent_silentFlow),i=yield Zi(this.getClientConfiguration.bind(this),ct.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,account:n.account}),o=new e5(i,this.performanceClient);this.logger.verbose("Silent auth client created");try{let s=(yield Zi(o.acquireCachedToken.bind(o),ct.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,n.correlationId)(n))[0];return this.performanceClient.addFields({fromCache:!0},n.correlationId),s}catch(r){throw r instanceof Lk&&r.errorCode===EI&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),r}})}logout(n){this.logger.verbose("logoutRedirect called");let e=this.initializeLogoutRequest(n);return this.clearCacheOnLogout(e.correlationId,e?.account)}};var RI=class extends GF{constructor(n,e,i,o,r,s,d,m,v,w,O,N){super(n,e,i,o,r,s,m,v,N),this.apiId=d,this.accountId=w,this.platformAuthProvider=v,this.nativeStorageManager=O,this.silentCacheClient=new qF(n,this.nativeStorageManager,i,o,r,s,m,v,N);let V=this.platformAuthProvider.getExtensionName();this.skus=Mk.makeExtraSkuString({libraryName:Qd.MSAL_SKU,libraryVersion:n0,extensionName:V,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(n){n.extraParameters=mt(be({},n.extraParameters),{[hw.X_CLIENT_EXTRA_SKU]:this.skus})}acquireToken(n,e){return bt(this,null,function*(){this.performanceClient.addQueueMeasurement(ct.NativeInteractionClientAcquireToken,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");let i=this.performanceClient.startMeasurement(ct.NativeInteractionClientAcquireToken,this.correlationId),o=Vp.nowSeconds(),r=this.initializeServerTelemetryManager(this.apiId);try{let s=yield this.initializeNativeRequest(n);try{let m=yield this.acquireTokensFromCache(this.accountId,s);return i.end({success:!0,isNativeBroker:!1,fromCache:!0}),m}catch(m){if(e===fh.AccessToken)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),i.end({success:!1,brokerErrorCode:"cache_request_failed"}),m;this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}let d=yield this.platformAuthProvider.sendMessage(s);return yield this.handleNativeResponse(d,s,o).then(m=>(i.end({success:!0,isNativeBroker:!0,requestId:m.requestId}),r.clearNativeBrokerErrorCode(),m)).catch(m=>{throw i.end({success:!1,errorCode:m.errorCode,subErrorCode:m.subError}),m})}catch(s){throw s instanceof ny&&r.setNativeBrokerErrorCode(s.errorCode),i.end({success:!1}),s}})}createSilentCacheRequest(n,e){return{authority:n.authority,correlationId:this.correlationId,scopes:Wd.fromString(n.scope).asArray(),account:e,forceRefresh:!1}}acquireTokensFromCache(n,e){return bt(this,null,function*(){if(!n)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Dn(Bp.noAccountFound);let i=this.browserStorage.getBaseAccountInfo({nativeAccountId:n},this.correlationId);if(!i)throw Dn(Bp.noAccountFound);try{let o=this.createSilentCacheRequest(e,i),r=yield this.silentCacheClient.acquireToken(o),s=mt(be({},i),{idTokenClaims:r?.idTokenClaims,idToken:r?.idToken});return mt(be({},r),{account:s})}catch(o){throw o}})}acquireTokenRedirect(n,e){return bt(this,null,function*(){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");let i=Vf(n,[]);delete i.onRedirectNavigate;let o=yield this.initializeNativeRequest(i);try{yield this.platformAuthProvider.sendMessage(o)}catch(d){if(d instanceof ny&&(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(d.errorCode),OI(d)))throw d}this.browserStorage.setTemporaryCache(Zd.NATIVE_REQUEST,JSON.stringify(o),!0);let r={apiId:bl.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},s=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(n.redirectUri);e.end({success:!0}),yield this.navigationClient.navigateExternal(s,r)})}handleRedirectPromise(n,e){return bt(this,null,function*(){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;let i=this.browserStorage.getCachedNativeRequest();if(!i)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),n&&e&&n?.addFields({errorCode:"no_cached_request"},e),null;let d=i,{prompt:o}=d,r=Vf(d,["prompt"]);o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Zd.NATIVE_REQUEST));let s=Vp.nowSeconds();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");let m=yield this.platformAuthProvider.sendMessage(r),v=yield this.handleNativeResponse(m,r,s);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),n&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),v}catch(m){throw m}})}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}handleNativeResponse(n,e,i){return bt(this,null,function*(){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");let o=eF.extractTokenClaims(n.id_token,Hm),r=this.createHomeAccountIdentifier(n,o),s=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:e.accountId},this.correlationId)?.homeAccountId;if(e.extraParameters?.child_client_id&&n.account.id!==e.accountId)this.logger.info("handleNativeServerResponse: Double broker flow detected, ignoring accountId mismatch");else if(r!==s&&n.account.id!==e.accountId)throw Hk(e$);let d=yield this.getDiscoveredAuthority({requestAuthority:e.authority}),m=lF(this.browserStorage,d,r,Hm,this.correlationId,o,n.client_info,void 0,o.tid,void 0,n.account.id,this.logger);n.expires_in=Number(n.expires_in);let v=yield this.generateAuthenticationResult(n,e,o,m,d.canonicalAuthority,i);return yield this.cacheAccount(m,this.correlationId),yield this.cacheNativeTokens(n,e,r,o,n.access_token,v.tenantId,i),v})}createHomeAccountIdentifier(n,e){return em.generateHomeAccountId(n.client_info||cn.EMPTY_STRING,Xf.Default,this.logger,this.browserCrypto,e)}generateScopes(n,e){return e?Wd.fromString(e):Wd.fromString(n)}generatePopAccessToken(n,e){return bt(this,null,function*(){if(e.tokenType===va.POP&&e.signPopToken){if(n.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),n.shr;let i=new qg(this.browserCrypto),o={resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,shrNonce:e.shrNonce};if(!e.keyId)throw Dn(Bp.keyIdMissing);return i.signPopToken(n.access_token,e.keyId,o)}else return n.access_token})}generateAuthenticationResult(n,e,i,o,r,s){return bt(this,null,function*(){let d=this.addTelemetryFromNativeResponse(n.properties.MATS),m=this.generateScopes(e.scope,n.scope),v=n.account.properties||{},w=v.UID||i.oid||i.sub||cn.EMPTY_STRING,O=v.TenantId||i.tid||cn.EMPTY_STRING,N=vk(o.getAccountInfo(),void 0,i,n.id_token);N.nativeAccountId!==n.account.id&&(N.nativeAccountId=n.account.id);let V=yield this.generatePopAccessToken(n,e),$=e.tokenType===va.POP?va.POP:va.BEARER;return{authority:r,uniqueId:w,tenantId:O,scopes:m.asArray(),account:N,idToken:n.id_token,idTokenClaims:i,accessToken:V,fromCache:d?this.isResponseFromCache(d):!1,expiresOn:Vp.toDateFromSeconds(s+n.expires_in),tokenType:$,correlationId:this.correlationId,state:n.state,fromNativeBroker:!0}})}cacheAccount(n,e){return bt(this,null,function*(){yield this.browserStorage.setAccount(n,this.correlationId),this.browserStorage.removeAccountContext(n.getAccountInfo(),e)})}cacheNativeTokens(n,e,i,o,r,s,d){let m=uu.createIdTokenEntity(i,e.authority,n.id_token||"",e.clientId,o.tid||""),v=e.tokenType===va.POP?cn.SHR_NONCE_VALIDITY:(typeof n.expires_in=="string"?parseInt(n.expires_in,10):n.expires_in)||0,w=d+v,O=this.generateScopes(n.scope,e.scope),N=uu.createAccessTokenEntity(i,e.authority,r,e.clientId,o.tid||s,O.printScopes(),w,0,Hm,void 0,e.tokenType,void 0,e.keyId),V={idToken:m,accessToken:N};return this.nativeStorageManager.saveCacheRecord(V,this.correlationId,e.storeInCache)}getExpiresInValue(n,e){return n===va.POP?cn.SHR_NONCE_VALIDITY:(typeof e=="string"?parseInt(e,10):e)||0}addTelemetryFromNativeResponse(n){let e=this.getMATSFromResponse(n);return e?(this.performanceClient.addFields({extensionId:this.platformAuthProvider.getExtensionId(),extensionVersion:this.platformAuthProvider.getExtensionVersion(),matsBrokerVersion:e.broker_version,matsAccountJoinOnStart:e.account_join_on_start,matsAccountJoinOnEnd:e.account_join_on_end,matsDeviceJoin:e.device_join,matsPromptBehavior:e.prompt_behavior,matsApiErrorCode:e.api_error_code,matsUiVisible:e.ui_visible,matsSilentCode:e.silent_code,matsSilentBiSubCode:e.silent_bi_sub_code,matsSilentMessage:e.silent_message,matsSilentStatus:e.silent_status,matsHttpStatus:e.http_status,matsHttpEventCount:e.http_event_count},this.correlationId),e):null}getMATSFromResponse(n){if(n)try{return JSON.parse(n)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(n){return typeof n.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!n.is_cached}initializeNativeRequest(n){return bt(this,null,function*(){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");let e=yield this.getCanonicalAuthority(n),d=n,{scopes:i}=d,o=Vf(d,["scopes"]),r=new Wd(i||[]);r.appendScopes(t0);let s=mt(be({},o),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:e.urlString,scope:r.printScopes(),redirectUri:this.getRedirectUri(n.redirectUri),prompt:this.getPrompt(n.prompt),correlationId:this.correlationId,tokenType:n.authenticationScheme,windowTitleSubstring:document.title,extraParameters:be(be({},n.extraQueryParameters),n.tokenQueryParameters),extendedExpiryToken:!1,keyId:n.popKid});if(s.signPopToken&&n.popKid)throw fo(FF);if(this.handleExtraBrokerParams(s),s.extraParameters=s.extraParameters||{},s.extraParameters.telemetry=Jf.MATS_TELEMETRY,n.authenticationScheme===va.POP){let m={resourceRequestUri:n.resourceRequestUri,resourceRequestMethod:n.resourceRequestMethod,shrClaims:n.shrClaims,shrNonce:n.shrNonce},v=new qg(this.browserCrypto),w;if(s.keyId)w=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:s.keyId})),s.signPopToken=!1;else{let O=yield Zi(v.generateCnf.bind(v),ct.PopTokenGenerateCnf,this.logger,this.performanceClient,this.correlationId)(m,this.logger);w=O.reqCnfString,s.keyId=O.kid,s.signPopToken=!0}s.reqCnf=w}return this.addRequestSKUs(s),s})}getCanonicalAuthority(n){return bt(this,null,function*(){let e=n.authority||this.config.auth.authority;n.account&&(yield this.getDiscoveredAuthority({requestAuthority:e,requestAzureCloudOptions:n.azureCloudOptions,account:n.account}));let i=new da(e);return i.validateAsUri(),i})}getPrompt(n){switch(this.apiId){case bl.ssoSilent:case bl.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Pu.NONE}if(!n){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(n){case Pu.NONE:case Pu.CONSENT:case Pu.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),n;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${n} is not compatible with native flow`),fo(OF)}}handleExtraBrokerParams(n){let e=n.extraParameters&&n.extraParameters.hasOwnProperty(hw.BROKER_CLIENT_ID)&&n.extraParameters.hasOwnProperty(hw.BROKER_REDIRECT_URI)&&n.extraParameters.hasOwnProperty(hw.CLIENT_ID);if(!n.embeddedClientId&&!e)return;let i="",o=n.redirectUri;n.embeddedClientId?(n.redirectUri=this.config.auth.redirectUri,i=n.embeddedClientId):n.extraParameters&&(n.redirectUri=n.extraParameters[hw.BROKER_REDIRECT_URI],i=n.extraParameters[hw.CLIENT_ID]),n.extraParameters={child_client_id:i,child_redirect_uri:o},this.performanceClient?.addFields({embeddedClientId:i,embeddedRedirectUri:o},this.correlationId)}};function bse(t,n,e,i,o){return bt(this,null,function*(){let r=HC.getStandardAuthorizeRequestParameters(mt(be({},t.auth),{authority:n}),e,i,o);if(up.addLibraryInfo(r,{sku:Qd.MSAL_SKU,version:n0,os:"",cpu:""}),t.auth.protocolMode!==yd.OIDC&&up.addApplicationTelemetry(r,t.telemetry.application),e.platformBroker&&(up.addNativeBroker(r),o.addFields({isPlatformAuthorizeRequest:!0},e.correlationId),e.authenticationScheme===va.POP)){let s=new UF(i,o),d=new qg(s),m;e.popKid?m=s.encodeKid(e.popKid):m=(yield Zi(d.generateCnf.bind(d),ct.PopTokenGenerateCnf,i,o,e.correlationId)(e,i)).reqCnfString,up.addPopToken(r,m)}return up.instrumentBrokerParams(r,e.correlationId,o),r})}function KF(t,n,e,i,o){return bt(this,null,function*(){if(!e.codeChallenge)throw Ja(Zf.pkceParamsMissing);let r=yield Zi(bse,ct.GetStandardParams,i,o,e.correlationId)(t,n,e,i,o);return up.addResponseType(r,XV.CODE),up.addCodeChallengeParams(r,e.codeChallenge,cn.S256_CODE_CHALLENGE_METHOD),up.addExtraQueryParameters(r,e.extraQueryParameters||{}),HC.getAuthorizeUrl(n,r,t.auth.encodeExtraQueryParams,e.extraQueryParameters)})}function WF(t,n,e,i,o,r){return bt(this,null,function*(){if(!i.earJwk)throw fo(i5);let s=yield bse(n,e,i,o,r);up.addResponseType(s,XV.IDTOKEN_TOKEN_REFRESHTOKEN),up.addEARParameters(s,i.earJwk);let d=new Map;up.addExtraQueryParameters(d,i.extraQueryParameters||{});let m=HC.getAuthorizeUrl(e,d,n.auth.encodeExtraQueryParams,i.extraQueryParameters);return LTe(t,m,s)})}function YF(t,n,e,i,o,r){return bt(this,null,function*(){let s=yield bse(n,e,i,o,r);up.addResponseType(s,XV.CODE),up.addCodeChallengeParams(s,i.codeChallenge,i.codeChallengeMethod||cn.S256_CODE_CHALLENGE_METHOD),up.addPostBodyParameters(s,i.authorizePostBodyParameters||{});let d=new Map;up.addExtraQueryParameters(d,i.extraQueryParameters||{});let m=HC.getAuthorizeUrl(e,d,n.auth.encodeExtraQueryParams,i.extraQueryParameters);return LTe(t,m,s)})}function LTe(t,n,e){let i=t.createElement("form");return i.method="post",i.action=n,e.forEach((o,r)=>{let s=t.createElement("input");s.hidden=!0,s.name=r,s.value=o,i.appendChild(s)}),t.body.appendChild(i),i}function NTe(t,n,e,i,o,r,s,d,m,v){return bt(this,null,function*(){if(d.verbose("Account id found, calling WAM for token"),!v)throw fo(AI);let w=new UF(d,m),O=new RI(i,o,w,d,s,i.system.navigationClient,e,m,v,n,r,t.correlationId),{userRequestState:N}=Rv.parseRequestState(w,t.state);return Zi(O.acquireToken.bind(O),ct.NativeInteractionClientAcquireToken,d,m,t.correlationId)(mt(be({},t),{state:N,prompt:void 0}))})}function jk(t,n,e,i,o,r,s,d,m,v,w,O){return bt(this,null,function*(){if(yw.removeThrottle(s,o.auth.clientId,t),n.accountId)return Zi(NTe,ct.HandleResponsePlatformBroker,v,w,t.correlationId)(t,n.accountId,i,o,s,d,m,v,w,O);let N=mt(be({},t),{code:n.code||"",codeVerifier:e}),V=new $F(r,s,N,v,w);return yield Zi(V.handleCodeResponse.bind(V),ct.HandleCodeResponse,v,w,t.correlationId)(n,t)})}function QF(t,n,e,i,o,r,s,d,m,v,w){return bt(this,null,function*(){if(yw.removeThrottle(r,i.auth.clientId,t),HC.validateAuthorizationResponse(n,t.state),!n.ear_jwe)throw fo(TG);if(!t.earJwk)throw fo(i5);let O=JSON.parse(yield Zi(XSe,ct.DecryptEarResponse,m,v,t.correlationId)(t.earJwk,n.ear_jwe));if(O.accountId)return Zi(NTe,ct.HandleResponsePlatformBroker,m,v,t.correlationId)(t,O.accountId,e,i,r,s,d,m,v,w);let N=new Fv(i.auth.clientId,r,new UF(m,v),m,null,null,v);N.validateTokenResponse(O);let V={code:"",state:t.state,nonce:t.nonce,client_info:O.client_info,cloud_graph_host_name:O.cloud_graph_host_name,cloud_instance_host_name:O.cloud_instance_host_name,cloud_instance_name:O.cloud_instance_name,msgraph_host:O.msgraph_host};return yield Zi(N.handleServerTokenResponse.bind(N),ct.HandleServerTokenResponse,m,v,t.correlationId)(O,o,Vp.nowSeconds(),t,V,void 0,void 0,void 0,void 0)})}var oQe=32;function FI(t,n,e){return bt(this,null,function*(){t.addQueueMeasurement(ct.GeneratePkceCodes,e);let i=Yd(rQe,ct.GenerateCodeVerifier,n,t,e)(t,n,e),o=yield Zi(sQe,ct.GenerateCodeChallengeFromVerifier,n,t,e)(i,t,n,e);return{verifier:i,challenge:o}})}function rQe(t,n,e){try{let i=new Uint8Array(oQe);return Yd(WSe,ct.GetRandomValues,n,t,e)(i),iy(i)}catch{throw fo(Ok)}}function sQe(t,n,e,i){return bt(this,null,function*(){n.addQueueMeasurement(ct.GenerateCodeChallengeFromVerifier,i);try{let o=yield Zi(cse,ct.Sha256Digest,e,n,i)(t,n,i);return iy(new Uint8Array(o))}catch{throw fo(Ok)}})}var t$=class t{constructor(n,e,i,o){this.logger=n,this.handshakeTimeoutMs=e,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=i,this.handshakeEvent=i.startMeasurement(ct.NativeMessageHandlerHandshake),this.platformAuthType=Jf.PLATFORM_EXTENSION_PROVIDER}sendMessage(n){return bt(this,null,function*(){this.logger.trace(this.platformAuthType+" - sendMessage called.");let e={method:LF.GetToken,request:n},i={channel:Jf.CHANNEL_ID,extensionId:this.extensionId,responseId:zp(),body:e};this.logger.trace(this.platformAuthType+" - Sending request to browser extension"),this.logger.tracePii(this.platformAuthType+` - Sending request to browser extension: ${JSON.stringify(i)}`),this.messageChannel.port1.postMessage(i);let o=yield new Promise((s,d)=>{this.resolvers.set(i.responseId,{resolve:s,reject:d})});return this.validatePlatformBrokerResponse(o)})}static createProvider(n,e,i){return bt(this,null,function*(){n.trace("PlatformAuthExtensionHandler - createProvider called.");try{let o=new t(n,e,i,Jf.PREFERRED_EXTENSION_ID);return yield o.sendHandshakeRequest(),o}catch{let r=new t(n,e,i);return yield r.sendHandshakeRequest(),r}})}sendHandshakeRequest(){return bt(this,null,function*(){this.logger.trace(this.platformAuthType+" - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);let n={channel:Jf.CHANNEL_ID,extensionId:this.extensionId,responseId:zp(),body:{method:LF.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(n,window.origin,[this.messageChannel.port2]),new Promise((e,i)=>{this.handshakeResolvers.set(n.responseId,{resolve:e,reject:i}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),i(fo(kF)),this.handshakeResolvers.delete(n.responseId)},this.handshakeTimeoutMs)})})}onWindowMessage(n){if(this.logger.trace(this.platformAuthType+" - onWindowMessage called"),n.source!==window)return;let e=n.data;if(!(!e.channel||e.channel!==Jf.CHANNEL_ID)&&!(e.extensionId&&e.extensionId!==this.extensionId)&&e.body.method===LF.HandshakeRequest){let i=this.handshakeResolvers.get(e.responseId);if(!i){this.logger.trace(this.platformAuthType+`.onWindowMessage - resolver can't be found for request ${e.responseId}`);return}this.logger.verbose(e.extensionId?`Extension with id: ${e.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),i.reject(fo(MF))}}onChannelMessage(n){this.logger.trace(this.platformAuthType+" - onChannelMessage called.");let e=n.data,i=this.resolvers.get(e.responseId),o=this.handshakeResolvers.get(e.responseId);try{let r=e.body.method;if(r===LF.Response){if(!i)return;let s=e.body.response;if(this.logger.trace(this.platformAuthType+" - Received response from browser extension"),this.logger.tracePii(this.platformAuthType+` - Received response from browser extension: ${JSON.stringify(s)}`),s.status!=="Success")i.reject(Hk(s.code,s.description,s.ext));else if(s.result)s.result.code&&s.result.description?i.reject(Hk(s.result.code,s.result.description,s.result.ext)):i.resolve(s.result);else throw ZR(uI.unexpectedError,"Event does not contain result.");this.resolvers.delete(e.responseId)}else if(r===LF.HandshakeResponse){if(!o){this.logger.trace(this.platformAuthType+`.onChannelMessage - resolver can't be found for request ${e.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=e.extensionId,this.extensionVersion=e.body.version,this.logger.verbose(this.platformAuthType+` - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(e.responseId)}}catch(r){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${r}`),this.logger.errorPii(`Unable to parse ${n}`),i?i.reject(r):o&&o.reject(r)}}validatePlatformBrokerResponse(n){if(n.hasOwnProperty("access_token")&&n.hasOwnProperty("id_token")&&n.hasOwnProperty("client_info")&&n.hasOwnProperty("account")&&n.hasOwnProperty("scope")&&n.hasOwnProperty("expires_in"))return n;throw ZR(uI.unexpectedError,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===Jf.PREFERRED_EXTENSION_ID?"chrome":this.getExtensionId()?.length?"unknown":void 0}};var i$=class t{constructor(n,e,i){this.logger=n,this.performanceClient=e,this.correlationId=i,this.platformAuthType=Jf.PLATFORM_DOM_PROVIDER}static createProvider(n,e,i){return bt(this,null,function*(){if(n.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication&&(yield window.navigator.platformAuthentication.getSupportedContracts(Jf.MICROSOFT_ENTRA_BROKERID))?.includes(Jf.PLATFORM_DOM_APIS))return n.trace("Platform auth api available in DOM"),new t(n,e,i)})}getExtensionId(){return Jf.MICROSOFT_ENTRA_BROKERID}getExtensionVersion(){return""}getExtensionName(){return Jf.DOM_API_NAME}sendMessage(n){return bt(this,null,function*(){this.logger.trace(this.platformAuthType+" - Sending request to browser DOM API");try{let e=this.initializePlatformDOMRequest(n),i=yield window.navigator.platformAuthentication.executeGetToken(e);return this.validatePlatformBrokerResponse(i)}catch(e){throw this.logger.error(this.platformAuthType+" - executeGetToken DOM API error"),e}})}initializePlatformDOMRequest(n){this.logger.trace(this.platformAuthType+" - initializeNativeDOMRequest called");let q=n,{accountId:e,clientId:i,authority:o,scope:r,redirectUri:s,correlationId:d,state:m,storeInCache:v,embeddedClientId:w,extraParameters:O}=q,N=Vf(q,["accountId","clientId","authority","scope","redirectUri","correlationId","state","storeInCache","embeddedClientId","extraParameters"]),V=this.getDOMExtraParams(N);return{accountId:e,brokerId:this.getExtensionId(),authority:o,clientId:i,correlationId:d||this.correlationId,extraParameters:be(be({},O),V),isSecurityTokenService:!1,redirectUri:s,scope:r,state:m,storeInCache:v,embeddedClientId:w}}validatePlatformBrokerResponse(n){if(n.hasOwnProperty("isSuccess")){if(n.hasOwnProperty("accessToken")&&n.hasOwnProperty("idToken")&&n.hasOwnProperty("clientInfo")&&n.hasOwnProperty("account")&&n.hasOwnProperty("scopes")&&n.hasOwnProperty("expiresIn"))return this.logger.trace(this.platformAuthType+" - platform broker returned successful and valid response"),this.convertToPlatformBrokerResponse(n);if(n.hasOwnProperty("error")){let e=n;if(e.isSuccess===!1&&e.error&&e.error.code)throw this.logger.trace(this.platformAuthType+" - platform broker returned error response"),Hk(e.error.code,e.error.description,{error:parseInt(e.error.errorCode),protocol_error:e.error.protocolError,status:e.error.status,properties:e.error.properties})}}throw ZR(uI.unexpectedError,"Response missing expected properties.")}convertToPlatformBrokerResponse(n){return this.logger.trace(this.platformAuthType+" - convertToNativeResponse called"),{access_token:n.accessToken,id_token:n.idToken,client_info:n.clientInfo,account:n.account,expires_in:n.expiresIn,scope:n.scopes,state:n.state||"",properties:n.properties||{},extendedLifetimeToken:n.extendedLifetimeToken??!1,shr:n.proofOfPossessionPayload}}getDOMExtraParams(n){let e=Object.entries(n).reduce((o,[r,s])=>(o[r]=String(s),o),{});return be({},e)}};function BTe(t,n,e,i){return bt(this,null,function*(){t.trace("getPlatformAuthProvider called",e);let o=aQe();t.trace("Has client allowed platform auth via DOM API: "+o);let r;try{o&&(r=yield i$.createProvider(t,n,e)),r||(t.trace("Platform auth via DOM API not available, checking for extension"),r=yield t$.createProvider(t,i||gse,n))}catch(s){t.trace("Platform auth not available",s)}return r})}function aQe(){let t;try{return t=window[sd.SessionStorage],t?.getItem(hTe)==="true"}catch{return!1}}function xw(t,n,e,i){if(n.trace("isPlatformAuthAllowed called"),!t.system.allowPlatformBroker)return n.trace("isPlatformAuthAllowed: allowPlatformBroker is not enabled, returning false"),!1;if(!e)return n.trace("isPlatformAuthAllowed: Platform auth provider is not initialized, returning false"),!1;if(i)switch(i){case va.BEARER:case va.POP:return n.trace("isPlatformAuthAllowed: authenticationScheme is supported, returning true"),!0;default:return n.trace("isPlatformAuthAllowed: authenticationScheme is not supported, returning false"),!1}return!0}var n$=class extends Kg{constructor(n,e,i,o,r,s,d,m,v,w){super(n,e,i,o,r,s,d,v,w),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=m,this.eventHandler=r}acquireToken(n,e){let i;try{if(i={popupName:this.generatePopupName(n.scopes||t0,n.authority||this.config.auth.authority),popupWindowAttributes:n.popupWindowAttributes||{},popupWindowParent:n.popupWindowParent??window},this.performanceClient.addFields({isAsyncPopup:this.config.system.asyncPopups},this.correlationId),this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(n,i,e);{let r=mt(be({},n),{httpMethod:JG(n,this.config.auth.protocolMode)});return this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),i.popup=this.openSizedPopup("about:blank",i),this.acquireTokenPopupAsync(r,i,e)}}catch(o){return Promise.reject(o)}}logout(n){try{this.logger.verbose("logoutPopup called");let e=this.initializeLogoutRequest(n),i={popupName:this.generateLogoutPopupName(e),popupWindowAttributes:n?.popupWindowAttributes||{},popupWindowParent:n?.popupWindowParent??window},o=n&&n.authority,r=n&&n.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(e,i,o,r)):(this.logger.verbose("asyncPopup set to false, opening popup"),i.popup=this.openSizedPopup("about:blank",i),this.logoutPopupAsync(e,i,o,r))}catch(e){return Promise.reject(e)}}acquireTokenPopupAsync(n,e,i){return bt(this,null,function*(){this.logger.verbose("acquireTokenPopupAsync called");let o=yield Zi(this.initializeAuthorizationRequest.bind(this),ct.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(n,lr.Popup);e.popup&&l5(o.authority);let r=xw(this.config,this.logger,this.platformAuthProvider,n.authenticationScheme);return o.platformBroker=r,this.config.auth.protocolMode===yd.EAR?this.executeEarFlow(o,e):this.executeCodeFlow(o,e,i)})}executeCodeFlow(n,e,i){return bt(this,null,function*(){let o=n.correlationId,r=this.initializeServerTelemetryManager(bl.acquireTokenPopup),s=i||(yield Zi(FI,ct.GeneratePkceCodes,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o)),d=mt(be({},n),{codeChallenge:s.challenge});try{let m=yield Zi(this.createAuthCodeClient.bind(this),ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,o)({serverTelemetryManager:r,requestAuthority:d.authority,requestAzureCloudOptions:d.azureCloudOptions,requestExtraQueryParameters:d.extraQueryParameters,account:d.account});if(d.httpMethod===ey.POST)return yield this.executeCodeFlowWithPost(d,e,m,s.verifier);{let v=yield Zi(KF,ct.GetAuthCodeUrl,this.logger,this.performanceClient,o)(this.config,m.authority,d,this.logger,this.performanceClient),w=this.initiateAuthRequest(v,e);this.eventHandler.emitEvent(Wo.POPUP_OPENED,lr.Popup,{popupWindow:w},null);let O=yield this.monitorPopupForHash(w,e.popupWindowParent),N=Yd(Uk,ct.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(O,this.config.auth.OIDCOptions.serverResponseType,this.logger);return yield Zi(jk,ct.HandleResponseCode,this.logger,this.performanceClient,o)(n,N,s.verifier,bl.acquireTokenPopup,this.config,m,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(m){throw e.popup?.close(),m instanceof Rs&&(m.setCorrelationId(this.correlationId),r.cacheFailedRequest(m)),m}})}executeEarFlow(n,e){return bt(this,null,function*(){let i=n.correlationId,o=yield Zi(this.getDiscoveredAuthority.bind(this),ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,i)({requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),r=yield Zi(BF,ct.GenerateEarKey,this.logger,this.performanceClient,i)(),s=mt(be({},n),{earJwk:r}),d=e.popup||this.openPopup("about:blank",e);(yield WF(d.document,this.config,o,s,this.logger,this.performanceClient)).submit();let v=yield Zi(this.monitorPopupForHash.bind(this),ct.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,i)(d,e.popupWindowParent),w=Yd(Uk,ct.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(v,this.config.auth.OIDCOptions.serverResponseType,this.logger);return Zi(QF,ct.HandleResponseEar,this.logger,this.performanceClient,i)(s,w,bl.acquireTokenPopup,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}executeCodeFlowWithPost(n,e,i,o){return bt(this,null,function*(){let r=n.correlationId,s=yield Zi(this.getDiscoveredAuthority.bind(this),ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,r)({requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),d=e.popup||this.openPopup("about:blank",e);(yield YF(d.document,this.config,s,n,this.logger,this.performanceClient)).submit();let v=yield Zi(this.monitorPopupForHash.bind(this),ct.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,r)(d,e.popupWindowParent),w=Yd(Uk,ct.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(v,this.config.auth.OIDCOptions.serverResponseType,this.logger);return Zi(jk,ct.HandleResponseCode,this.logger,this.performanceClient,r)(n,w,o,bl.acquireTokenPopup,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}logoutPopupAsync(n,e,i,o){return bt(this,null,function*(){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(Wo.LOGOUT_START,lr.Popup,n);let r=this.initializeServerTelemetryManager(bl.logoutPopup);try{yield this.clearCacheOnLogout(this.correlationId,n.account);let s=yield Zi(this.createAuthCodeClient.bind(this),ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:i,account:n.account||void 0});try{s.authority.endSessionEndpoint}catch{if(n.account?.homeAccountId&&n.postLogoutRedirectUri&&s.authority.protocolMode===yd.OIDC){if(this.eventHandler.emitEvent(Wo.LOGOUT_SUCCESS,lr.Popup,n),o){let v={apiId:bl.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},w=da.getAbsoluteUrl(o,eg());yield this.navigationClient.navigateInternal(w,v)}e.popup?.close();return}}let d=s.getLogoutUri(n);this.eventHandler.emitEvent(Wo.LOGOUT_SUCCESS,lr.Popup,n);let m=this.openPopup(d,e);if(this.eventHandler.emitEvent(Wo.POPUP_OPENED,lr.Popup,{popupWindow:m},null),yield this.monitorPopupForHash(m,e.popupWindowParent).catch(()=>{}),o){let v={apiId:bl.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},w=da.getAbsoluteUrl(o,eg());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${w}`),yield this.navigationClient.navigateInternal(w,v)}else this.logger.verbose("No main window navigation requested")}catch(s){throw e.popup?.close(),s instanceof Rs&&(s.setCorrelationId(this.correlationId),r.cacheFailedRequest(s)),this.eventHandler.emitEvent(Wo.LOGOUT_FAILURE,lr.Popup,null,s),this.eventHandler.emitEvent(Wo.LOGOUT_END,lr.Popup),s}this.eventHandler.emitEvent(Wo.LOGOUT_END,lr.Popup)})}initiateAuthRequest(n,e){if(n)return this.logger.infoPii(`Navigate to: ${n}`),this.openPopup(n,e);throw this.logger.error("Navigate url is empty"),fo(jC)}monitorPopupForHash(n,e){return new Promise((i,o)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");let r=setInterval(()=>{if(n.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(r),o(fo(Pv));return}let s="";try{s=n.location.href}catch{}if(!s||s==="about:blank")return;clearInterval(r);let d="",m=this.config.auth.OIDCOptions.serverResponseType;n&&(m===FC.QUERY?d=n.location.search:d=n.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),i(d)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(n,e)})}openPopup(n,e){try{let i;if(e.popup?(i=e.popup,this.logger.verbosePii(`Navigating popup window to: ${n}`),i.location.assign(n)):typeof e.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${n}`),i=this.openSizedPopup(n,e)),!i)throw fo(fF);return i.focus&&i.focus(),this.currentWindow=i,e.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),i}catch(i){throw this.logger.error("error opening popup "+i.message),fo(mF)}}openSizedPopup(n,{popupName:e,popupWindowAttributes:i,popupWindowParent:o}){let r=o.screenLeft?o.screenLeft:o.screenX,s=o.screenTop?o.screenTop:o.screenY,d=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,m=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,v=i.popupSize?.width,w=i.popupSize?.height,O=i.popupPosition?.top,N=i.popupPosition?.left;return(!v||v<0||v>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),v=Qd.POPUP_WIDTH),(!w||w<0||w>m)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),w=Qd.POPUP_HEIGHT),(!O||O<0||O>m)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),O=Math.max(0,m/2-Qd.POPUP_HEIGHT/2+s)),(!N||N<0||N>d)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),N=Math.max(0,d/2-Qd.POPUP_WIDTH/2+r)),o.open(n,e,`width=${v}, height=${w}, top=${O}, left=${N}, scrollbars=yes`)}unloadWindow(n){this.currentWindow&&this.currentWindow.close(),n.preventDefault()}cleanPopup(n,e){n.close(),e.removeEventListener("beforeunload",this.unloadWindow)}generatePopupName(n,e){return`${Qd.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${n.join("-")}.${e}.${this.correlationId}`}generateLogoutPopupName(n){let e=n.account&&n.account.homeAccountId;return`${Qd.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e}.${this.correlationId}`}};function lQe(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;let t=window.performance.getEntriesByType("navigation");return(t.length?t[0]:void 0)?.type}var o$=class extends Kg{constructor(n,e,i,o,r,s,d,m,v,w){super(n,e,i,o,r,s,d,v,w),this.nativeStorage=m}acquireToken(n){return bt(this,null,function*(){let e=yield Zi(this.initializeAuthorizationRequest.bind(this),ct.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(n,lr.Redirect);e.platformBroker=xw(this.config,this.logger,this.platformAuthProvider,n.authenticationScheme);let i=r=>{r.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.resetRequestCache(),this.eventHandler.emitEvent(Wo.RESTORE_FROM_BFCACHE,lr.Redirect))},o=this.getRedirectStartPage(n.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${o}`),this.browserStorage.setTemporaryCache(Zd.ORIGIN_URI,o,!0),window.addEventListener("pageshow",i);try{this.config.auth.protocolMode===yd.EAR?yield this.executeEarFlow(e):yield this.executeCodeFlow(e,n.onRedirectNavigate)}catch(r){throw r instanceof Rs&&r.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),r}})}executeCodeFlow(n,e){return bt(this,null,function*(){let i=n.correlationId,o=this.initializeServerTelemetryManager(bl.acquireTokenRedirect),r=yield Zi(FI,ct.GeneratePkceCodes,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),s=mt(be({},n),{codeChallenge:r.challenge});this.browserStorage.cacheAuthorizeRequest(s,r.verifier);try{if(s.httpMethod===ey.POST)return yield this.executeCodeFlowWithPost(s);{let d=yield Zi(this.createAuthCodeClient.bind(this),ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:s.authority,requestAzureCloudOptions:s.azureCloudOptions,requestExtraQueryParameters:s.extraQueryParameters,account:s.account}),m=yield Zi(KF,ct.GetAuthCodeUrl,this.logger,this.performanceClient,n.correlationId)(this.config,d.authority,s,this.logger,this.performanceClient);return yield this.initiateAuthRequest(m,e)}}catch(d){throw d instanceof Rs&&(d.setCorrelationId(this.correlationId),o.cacheFailedRequest(d)),d}})}executeEarFlow(n){return bt(this,null,function*(){let e=n.correlationId,i=yield Zi(this.getDiscoveredAuthority.bind(this),ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e)({requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),o=yield Zi(BF,ct.GenerateEarKey,this.logger,this.performanceClient,e)(),r=mt(be({},n),{earJwk:o});return this.browserStorage.cacheAuthorizeRequest(r),(yield WF(document,this.config,i,r,this.logger,this.performanceClient)).submit(),new Promise((d,m)=>{setTimeout(()=>{m(fo(Pk,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})})}executeCodeFlowWithPost(n){return bt(this,null,function*(){let e=n.correlationId,i=yield Zi(this.getDiscoveredAuthority.bind(this),ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e)({requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account});return this.browserStorage.cacheAuthorizeRequest(n),(yield YF(document,this.config,i,n,this.logger,this.performanceClient)).submit(),new Promise((r,s)=>{setTimeout(()=>{s(fo(Pk,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})})}handleRedirectPromise(n="",e,i,o){return bt(this,null,function*(){let r=this.initializeServerTelemetryManager(bl.handleRedirectPromise);try{let[s,d]=this.getRedirectResponse(n||"");if(!s)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.resetRequestCache(),lQe()!=="back_forward"?o.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;let m=this.browserStorage.getTemporaryCache(Zd.ORIGIN_URI,!0)||cn.EMPTY_STRING,v=BC.normalizeUrlForComparison(m),w=BC.normalizeUrlForComparison(window.location.href);if(v===w&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),m.indexOf("#")>-1&&hse(m),yield this.handleResponse(s,e,i,r);if(this.config.auth.navigateToLoginRequestUrl){if(!s5()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Zd.URL_HASH,d,!0);let O={apiId:bl.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},N=!0;if(!m||m==="null"){let V=mse();this.browserStorage.setTemporaryCache(Zd.ORIGIN_URI,V,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),N=yield this.navigationClient.navigateInternal(V,O)}else this.logger.verbose(`Navigating to loginRequestUrl: ${m}`),N=yield this.navigationClient.navigateInternal(m,O);if(!N)return yield this.handleResponse(s,e,i,r)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),yield this.handleResponse(s,e,i,r);return null}catch(s){throw s instanceof Rs&&(s.setCorrelationId(this.correlationId),r.cacheFailedRequest(s)),s}})}getRedirectResponse(n){this.logger.verbose("getRedirectResponseHash called");let e=n;e||(this.config.auth.OIDCOptions.serverResponseType===FC.QUERY?e=window.location.search:e=window.location.hash);let i=BC.getDeserializedResponse(e);if(i){try{DTe(i,this.browserCrypto,lr.Redirect)}catch(r){return r instanceof Rs&&this.logger.error(`Interaction type validation failed due to ${r.errorCode}: ${r.errorMessage}`),[null,""]}return r5(window),this.logger.verbose("Hash contains known properties, returning response hash"),[i,e]}let o=this.browserStorage.getTemporaryCache(Zd.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Zd.URL_HASH)),o&&(i=BC.getDeserializedResponse(o),i)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[i,o]):[null,""]}handleResponse(n,e,i,o){return bt(this,null,function*(){if(!n.state)throw fo(II);if(n.ear_jwe){let d=yield Zi(this.getDiscoveredAuthority.bind(this),ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e.correlationId)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return Zi(QF,ct.HandleResponseEar,this.logger,this.performanceClient,e.correlationId)(e,n,bl.acquireTokenRedirect,this.config,d,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}let s=yield Zi(this.createAuthCodeClient.bind(this),ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:e.authority});return Zi(jk,ct.HandleResponseCode,this.logger,this.performanceClient,e.correlationId)(e,n,i,bl.acquireTokenRedirect,this.config,s,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}initiateAuthRequest(n,e){return bt(this,null,function*(){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),n){this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${n}`);let i={apiId:bl.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},o=e||this.config.auth.onRedirectNavigate;if(typeof o=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),o(n)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),yield this.navigationClient.navigateExternal(n,i);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),yield this.navigationClient.navigateExternal(n,i);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),fo(jC)})}logout(n){return bt(this,null,function*(){this.logger.verbose("logoutRedirect called");let e=this.initializeLogoutRequest(n),i=this.initializeServerTelemetryManager(bl.logout);try{this.eventHandler.emitEvent(Wo.LOGOUT_START,lr.Redirect,n),yield this.clearCacheOnLogout(this.correlationId,e.account);let o={apiId:bl.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},r=yield Zi(this.createAuthCodeClient.bind(this),ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:n&&n.authority,requestExtraQueryParameters:n?.extraQueryParameters,account:n&&n.account||void 0});if(r.authority.protocolMode===yd.OIDC)try{r.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId){this.eventHandler.emitEvent(Wo.LOGOUT_SUCCESS,lr.Redirect,e);return}}let s=r.getLogoutUri(e);if(this.eventHandler.emitEvent(Wo.LOGOUT_SUCCESS,lr.Redirect,e),n&&typeof n.onRedirectNavigate=="function")if(n.onRedirectNavigate(s)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Lv.SIGNOUT),yield this.navigationClient.navigateExternal(s,o);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Lv.SIGNOUT),yield this.navigationClient.navigateExternal(s,o);return}}catch(o){throw o instanceof Rs&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),this.eventHandler.emitEvent(Wo.LOGOUT_FAILURE,lr.Redirect,null,o),this.eventHandler.emitEvent(Wo.LOGOUT_END,lr.Redirect),o}this.eventHandler.emitEvent(Wo.LOGOUT_END,lr.Redirect)})}getRedirectStartPage(n){let e=n||window.location.href;return da.getAbsoluteUrl(e,eg())}};function VTe(t,n,e,i,o){return bt(this,null,function*(){if(n.addQueueMeasurement(ct.SilentHandlerInitiateAuthRequest,i),!t)throw e.info("Navigate url is empty"),fo(jC);return o?Zi(cQe,ct.SilentHandlerLoadFrame,e,n,i)(t,o,n,i):Yd(dQe,ct.SilentHandlerLoadFrameSync,e,n,i)(t)})}function zTe(t,n,e,i,o){return bt(this,null,function*(){let r=r$();if(!r.contentDocument)throw"No document associated with iframe!";return(yield YF(r.contentDocument,t,n,e,i,o)).submit(),r})}function UTe(t,n,e,i,o){return bt(this,null,function*(){let r=r$();if(!r.contentDocument)throw"No document associated with iframe!";return(yield WF(r.contentDocument,t,n,e,i,o)).submit(),r})}function Cse(t,n,e,i,o,r,s){return bt(this,null,function*(){return i.addQueueMeasurement(ct.SilentHandlerMonitorIframeForHash,r),new Promise((d,m)=>{n{window.clearInterval(w),m(fo(gF))},n),w=window.setInterval(()=>{let O="",N=t.contentWindow;try{O=N?N.location.href:""}catch{}if(!O||O==="about:blank")return;let V="";N&&(s===FC.QUERY?V=N.location.search:V=N.location.hash),window.clearTimeout(v),window.clearInterval(w),d(V)},e)}).finally(()=>{Yd(uQe,ct.RemoveHiddenIframe,o,i,r)(t)})})}function cQe(t,n,e,i){return e.addQueueMeasurement(ct.SilentHandlerLoadFrame,i),new Promise((o,r)=>{let s=r$();window.setTimeout(()=>{if(!s){r("Unable to load iframe");return}s.src=t,o(s)},n)})}function dQe(t){let n=r$();return n.src=t,n}function r$(){let t=document.createElement("iframe");return t.className="msalSilentIframe",t.style.visibility="hidden",t.style.position="absolute",t.style.width=t.style.height="0",t.style.border="0",t.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(t),t}function uQe(t){document.body===t.parentNode&&document.body.removeChild(t)}var s$=class extends Kg{constructor(n,e,i,o,r,s,d,m,v,w,O){super(n,e,i,o,r,s,m,w,O),this.apiId=d,this.nativeStorage=v}acquireToken(n){return bt(this,null,function*(){this.performanceClient.addQueueMeasurement(ct.SilentIframeClientAcquireToken,n.correlationId),!n.loginHint&&!n.sid&&(!n.account||!n.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");let e=be({},n);e.prompt?e.prompt!==Pu.NONE&&e.prompt!==Pu.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${e.prompt} with ${Pu.NONE}`),e.prompt=Pu.NONE):e.prompt=Pu.NONE;let i=yield Zi(this.initializeAuthorizationRequest.bind(this),ct.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,n.correlationId)(e,lr.Silent);return i.platformBroker=xw(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme),l5(i.authority),this.config.auth.protocolMode===yd.EAR?this.executeEarFlow(i):this.executeCodeFlow(i)})}executeCodeFlow(n){return bt(this,null,function*(){let e,i=this.initializeServerTelemetryManager(this.apiId);try{return e=yield Zi(this.createAuthCodeClient.bind(this),ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,n.correlationId)({serverTelemetryManager:i,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),yield Zi(this.silentTokenHelper.bind(this),ct.SilentIframeClientTokenHelper,this.logger,this.performanceClient,n.correlationId)(e,n)}catch(o){if(o instanceof Rs&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),!e||!(o instanceof Rs)||o.errorCode!==Qd.INVALID_GRANT_ERROR)throw o;return this.performanceClient.addFields({retryError:o.errorCode},this.correlationId),yield Zi(this.silentTokenHelper.bind(this),ct.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(e,n)}})}executeEarFlow(n){return bt(this,null,function*(){let e=n.correlationId,i=yield Zi(this.getDiscoveredAuthority.bind(this),ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e)({requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),o=yield Zi(BF,ct.GenerateEarKey,this.logger,this.performanceClient,e)(),r=mt(be({},n),{earJwk:o}),s=yield Zi(UTe,ct.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,e)(this.config,i,r,this.logger,this.performanceClient),d=this.config.auth.OIDCOptions.serverResponseType,m=yield Zi(Cse,ct.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,e)(s,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,e,d),v=Yd(Uk,ct.DeserializeResponse,this.logger,this.performanceClient,e)(m,d,this.logger);return Zi(QF,ct.HandleResponseEar,this.logger,this.performanceClient,e)(r,v,this.apiId,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}logout(){return Promise.reject(fo(GC))}silentTokenHelper(n,e){return bt(this,null,function*(){let i=e.correlationId;this.performanceClient.addQueueMeasurement(ct.SilentIframeClientTokenHelper,i);let o=yield Zi(FI,ct.GeneratePkceCodes,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),r=mt(be({},e),{codeChallenge:o.challenge}),s;if(e.httpMethod===ey.POST)s=yield Zi(zTe,ct.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,i)(this.config,n.authority,r,this.logger,this.performanceClient);else{let w=yield Zi(KF,ct.GetAuthCodeUrl,this.logger,this.performanceClient,i)(this.config,n.authority,r,this.logger,this.performanceClient);s=yield Zi(VTe,ct.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,i)(w,this.performanceClient,this.logger,i,this.config.system.navigateFrameWait)}let d=this.config.auth.OIDCOptions.serverResponseType,m=yield Zi(Cse,ct.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,i)(s,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,i,d),v=Yd(Uk,ct.DeserializeResponse,this.logger,this.performanceClient,i)(m,d,this.logger);return Zi(jk,ct.HandleResponseCode,this.logger,this.performanceClient,i)(e,v,o.verifier,this.apiId,this.config,n,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}};var a$=class extends Kg{acquireToken(n){return bt(this,null,function*(){this.performanceClient.addQueueMeasurement(ct.SilentRefreshClientAcquireToken,n.correlationId);let e=yield Zi(u5,ct.InitializeBaseRequest,this.logger,this.performanceClient,n.correlationId)(n,this.config,this.performanceClient,this.logger),i=be(be({},n),e);n.redirectUri&&(i.redirectUri=this.getRedirectUri(n.redirectUri));let o=this.initializeServerTelemetryManager(bl.acquireTokenSilent_silentFlow),r=yield this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:i.authority,azureCloudOptions:i.azureCloudOptions,account:i.account});return Zi(r.acquireTokenByRefreshToken.bind(r),ct.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,n.correlationId)(i).catch(s=>{throw s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s),s})})}logout(){return Promise.reject(fo(GC))}createRefreshTokenClient(n){return bt(this,null,function*(){let e=yield Zi(this.getClientConfiguration.bind(this),ct.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n.serverTelemetryManager,requestAuthority:n.authorityUrl,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account});return new J4(e,this.performanceClient)})}};var l$=class{constructor(n,e,i,o){this.isBrowserEnvironment=typeof window<"u",this.config=n,this.storage=e,this.logger=i,this.cryptoObj=o}loadExternalTokens(n,e,i){return bt(this,null,function*(){if(!this.isBrowserEnvironment)throw fo($C);let o=n.correlationId||zp(),r=e.id_token?eF.extractTokenClaims(e.id_token,Hm):void 0,s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},d=n.authority?new ty(ty.generateAuthority(n.authority,n.azureCloudOptions),this.config.system.networkClient,this.storage,s,this.logger,n.correlationId||zp()):void 0,m=yield this.loadAccount(n,i.clientInfo||e.client_info||"",o,r,d),v=yield this.loadIdToken(e,m.homeAccountId,m.environment,m.realm,o),w=yield this.loadAccessToken(n,e,m.homeAccountId,m.environment,m.realm,i,o),O=yield this.loadRefreshToken(e,m.homeAccountId,m.environment,o);return this.generateAuthenticationResult(n,{account:m,idToken:v,accessToken:w,refreshToken:O},r,d)})}loadAccount(n,e,i,o,r){return bt(this,null,function*(){if(this.logger.verbose("TokenCache - loading account"),n.account){let v=em.createFromAccountInfo(n.account);return yield this.storage.setAccount(v,i),v}else if(!r||!e&&!o)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),fo(TF);let s=em.generateHomeAccountId(e,r.authorityType,this.logger,this.cryptoObj,o),d=o?.tid,m=lF(this.storage,r,s,Hm,i,o,e,r.hostnameAndPort,d,void 0,void 0,this.logger);return yield this.storage.setAccount(m,i),m})}loadIdToken(n,e,i,o,r){return bt(this,null,function*(){if(!n.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");let s=uu.createIdTokenEntity(e,i,n.id_token,this.config.auth.clientId,o);return yield this.storage.setIdTokenCredential(s,r),s})}loadAccessToken(n,e,i,o,r,s,d){return bt(this,null,function*(){if(e.access_token)if(e.expires_in){if(!e.scope&&(!n.scopes||!n.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");let m=e.scope?Wd.fromString(e.scope):new Wd(n.scopes),v=s.expiresOn||e.expires_in+Vp.nowSeconds(),w=s.extendedExpiresOn||(e.ext_expires_in||e.expires_in)+Vp.nowSeconds(),O=uu.createAccessTokenEntity(i,o,e.access_token,this.config.auth.clientId,r,m.printScopes(),v,w,Hm);return yield this.storage.setAccessTokenCredential(O,d),O})}loadRefreshToken(n,e,i,o){return bt(this,null,function*(){if(!n.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");let r=uu.createRefreshTokenEntity(e,i,n.refresh_token,this.config.auth.clientId,n.foci,void 0,n.refresh_token_expires_in);return yield this.storage.setRefreshTokenCredential(r,o),r})}generateAuthenticationResult(n,e,i,o){let r="",s=[],d=null,m;e?.accessToken&&(r=e.accessToken.secret,s=Wd.fromString(e.accessToken.target).asArray(),d=Vp.toDateFromSeconds(e.accessToken.expiresOn),m=Vp.toDateFromSeconds(e.accessToken.extendedExpiresOn));let v=e.account;return{authority:o?o.canonicalAuthority:"",uniqueId:e.account.localAccountId,tenantId:e.account.realm,scopes:s,account:v.getAccountInfo(),idToken:e.idToken?.secret||"",idTokenClaims:i||{},accessToken:r,fromCache:!0,expiresOn:d,correlationId:n.correlationId||"",requestId:"",extExpiresOn:m,familyId:e.refreshToken?.familyId||"",tokenType:e?.accessToken?.tokenType||"",state:n.state||"",cloudGraphHostName:v.cloudGraphHostName||"",msGraphHost:v.msGraphHost||"",fromNativeBroker:!1}}};var c$=class extends kk{constructor(n){super(n),this.includeRedirectUri=!1}};var d$=class extends Kg{constructor(n,e,i,o,r,s,d,m,v,w){super(n,e,i,o,r,s,m,v,w),this.apiId=d}acquireToken(n){return bt(this,null,function*(){if(!n.code)throw fo(IF);let e=yield Zi(this.initializeAuthorizationRequest.bind(this),ct.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,n.correlationId)(n,lr.Silent),i=this.initializeServerTelemetryManager(this.apiId);try{let o=mt(be({},e),{code:n.code}),r=yield Zi(this.getClientConfiguration.bind(this),ct.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,n.correlationId)({serverTelemetryManager:i,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),s=new c$(r);this.logger.verbose("Auth code client created");let d=new $F(s,this.browserStorage,o,this.logger,this.performanceClient);return yield Zi(d.handleCodeResponseFromServer.bind(d),ct.HandleCodeResponseFromServer,this.logger,this.performanceClient,n.correlationId)({code:n.code,msgraph_host:n.msGraphHost,cloud_graph_host_name:n.cloudGraphHostName,cloud_instance_host_name:n.cloudInstanceHostName},e,!1)}catch(o){throw o instanceof Rs&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),o}})}logout(){return Promise.reject(fo(GC))}};function HTe(t,n,e){let i=window.msal?.clientIds||[],o=i.length,r=i.filter(s=>s===t).length;r>1&&e.warning("There is already an instance of MSAL.js in the window with the same client id."),n.add({msalInstanceCount:o,sameClientIdInstanceCount:r})}function QC(t){let n=t?.idTokenClaims;if(n?.tfp||n?.acr)return"B2C";if(n?.tid){if(n?.tid==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function u$(t,n){try{a5(t)}catch(e){throw n.end({success:!1},e),e}}var ZF=class t{constructor(n){this.operatingContext=n,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=n.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new UF(this.logger,this.performanceClient):_I,this.eventHandler=new XG(this.logger),this.browserStorage=this.isBrowserEnvironment?new jF(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,qre(this.config.auth)):yTe(this.config.auth.clientId,this.logger,this.performanceClient,this.eventHandler);let e={cacheLocation:sd.MemoryStorage,cacheRetentionDays:5,temporaryCacheLocation:sd.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new jF(this.config.auth.clientId,e,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new l$(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}static createController(n,e){return bt(this,null,function*(){let i=new t(n);return yield i.initialize(e),i})}trackPageVisibility(n){n&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},n))}initialize(n,e){return bt(this,null,function*(){if(this.logger.trace("initialize called"),this.initialized){this.logger.info("initialize has already been called, exiting early.");return}if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,this.eventHandler.emitEvent(Wo.INITIALIZE_END);return}let i=n?.correlationId||this.getRequestCorrelationId(),o=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(ct.InitializeClientApplication,i);if(this.eventHandler.emitEvent(Wo.INITIALIZE_START),!e)try{this.logMultipleInstances(r)}catch{}if(yield Zi(this.browserStorage.initialize.bind(this.browserStorage),ct.InitializeCache,this.logger,this.performanceClient,i)(i),o)try{this.platformAuthProvider=yield BTe(this.logger,this.performanceClient,i,this.config.system.nativeBrokerHandshakeTimeout)}catch(s){this.logger.verbose(s)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),Yd(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),ct.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,i)(i)),this.config.system.asyncPopups&&(yield this.preGeneratePkceCodes(i)),this.initialized=!0,this.eventHandler.emitEvent(Wo.INITIALIZE_END),r.end({allowPlatformBroker:o,success:!0})})}handleRedirectPromise(n){return bt(this,null,function*(){if(this.logger.verbose("handleRedirectPromise called"),VG(this.initialized),this.isBrowserEnvironment){let e=n||"",i=this.redirectResponse.get(e);return typeof i>"u"?(i=this.handleRedirectPromiseInternal(n),this.redirectResponse.set(e,i),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),i}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null})}handleRedirectPromiseInternal(n){return bt(this,null,function*(){if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;if(this.browserStorage.getInteractionInProgress()?.type===Lv.SIGNOUT)return this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out"),this.browserStorage.setInteractionInProgress(!1),Promise.resolve(null);let i=this.getAllAccounts(),o=this.browserStorage.getCachedNativeRequest(),r=o&&this.platformAuthProvider&&!n,s;this.eventHandler.emitEvent(Wo.HANDLE_REDIRECT_START,lr.Redirect);let d;try{if(r&&this.platformAuthProvider){s=this.performanceClient.startMeasurement(ct.AcquireTokenRedirect,o?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s.add({isPlatformBrokerRequest:!0});let m=new RI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bl.handleRedirectPromise,this.performanceClient,this.platformAuthProvider,o.accountId,this.nativeInternalStorage,o.correlationId);d=Zi(m.handleRedirectPromise.bind(m),ct.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,s.event.correlationId)(this.performanceClient,s.event.correlationId)}else{let[m,v]=this.browserStorage.getCachedRequest(),w=m.correlationId;s=this.performanceClient.startMeasurement(ct.AcquireTokenRedirect,w),this.logger.trace("handleRedirectPromise - acquiring token from web flow");let O=this.createRedirectClient(w);d=Zi(O.handleRedirectPromise.bind(O),ct.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,s.event.correlationId)(n,m,v,s)}}catch(m){throw this.browserStorage.resetRequestCache(),m}return d.then(m=>(m?(this.browserStorage.resetRequestCache(),i.length{this.browserStorage.resetRequestCache();let v=m;throw i.length>0?this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_FAILURE,lr.Redirect,null,v):this.eventHandler.emitEvent(Wo.LOGIN_FAILURE,lr.Redirect,null,v),this.eventHandler.emitEvent(Wo.HANDLE_REDIRECT_END,lr.Redirect),s.end({success:!1},v),m})})}acquireTokenRedirect(n){return bt(this,null,function*(){let e=this.getRequestCorrelationId(n);this.logger.verbose("acquireTokenRedirect called",e);let i=this.performanceClient.startMeasurement(ct.AcquireTokenPreRedirect,e);i.add({accountType:QC(n.account),scenarioId:n.scenarioId});let o=n.onRedirectNavigate;if(o)n.onRedirectNavigate=s=>{let d=typeof o=="function"?o(s):void 0;return i.add({navigateCallbackResult:d!==!1}),i.event=i.end({success:!0})||i.event,d};else{let s=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=d=>{let m=typeof s=="function"?s(d):void 0;return i.add({navigateCallbackResult:m!==!1}),i.event=i.end({success:!0})||i.event,m}}let r=this.getAllAccounts().length>0;try{zG(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Lv.SIGNIN),r?this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_START,lr.Redirect,n):this.eventHandler.emitEvent(Wo.LOGIN_START,lr.Redirect,n);let s;return this.platformAuthProvider&&this.canUsePlatformBroker(n)?s=new RI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bl.acquireTokenRedirect,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(n),this.nativeInternalStorage,e).acquireTokenRedirect(n,i).catch(m=>{if(i.add({brokerErrorName:m.name,brokerErrorCode:m.errorCode}),m instanceof ny&&OI(m))return this.platformAuthProvider=void 0,this.createRedirectClient(e).acquireToken(n);if(m instanceof mh)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(e).acquireToken(n);throw m}):s=this.createRedirectClient(e).acquireToken(n),yield s}catch(s){throw this.browserStorage.resetRequestCache(),i.event.status===2?this.performanceClient.startMeasurement(ct.AcquireTokenRedirect,e).end({success:!1},s):i.end({success:!1},s),r?this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_FAILURE,lr.Redirect,null,s):this.eventHandler.emitEvent(Wo.LOGIN_FAILURE,lr.Redirect,null,s),s}})}acquireTokenPopup(n){let e=this.getRequestCorrelationId(n),i=this.performanceClient.startMeasurement(ct.AcquireTokenPopup,e);i.add({scenarioId:n.scenarioId,accountType:QC(n.account)});try{this.logger.verbose("acquireTokenPopup called",e),u$(this.initialized,i),this.browserStorage.setInteractionInProgress(!0,Lv.SIGNIN)}catch(d){return Promise.reject(d)}let o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_START,lr.Popup,n):this.eventHandler.emitEvent(Wo.LOGIN_START,lr.Popup,n);let r,s=this.getPreGeneratedPkceCodes(e);return this.canUsePlatformBroker(n)?(i.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative(mt(be({},n),{correlationId:e}),bl.acquireTokenPopup).then(d=>(i.end({success:!0,accountType:QC(d.account)}),d)).catch(d=>{if(i.add({brokerErrorName:d.name,brokerErrorCode:d.errorCode}),d instanceof ny&&OI(d))return this.platformAuthProvider=void 0,this.createPopupClient(e).acquireToken(n,s);if(d instanceof mh)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(e).acquireToken(n,s);throw d})):r=this.createPopupClient(e).acquireToken(n,s),r.then(d=>(o.length(o.length>0?this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_FAILURE,lr.Popup,null,d):this.eventHandler.emitEvent(Wo.LOGIN_FAILURE,lr.Popup,null,d),i.end({success:!1},d),Promise.reject(d))).finally(()=>bt(this,null,function*(){this.browserStorage.setInteractionInProgress(!1),this.config.system.asyncPopups&&(yield this.preGeneratePkceCodes(e))}))}trackPageVisibilityWithMeasurement(){let n=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;n&&(this.logger.info("Perf: Visibility change detected in ",n.event.name),n.increment({visibilityChangeCount:1}))}ssoSilent(n){return bt(this,null,function*(){let e=this.getRequestCorrelationId(n),i=mt(be({},n),{prompt:n.prompt,correlationId:e});this.ssoSilentMeasurement=this.performanceClient.startMeasurement(ct.SsoSilent,e),this.ssoSilentMeasurement?.add({scenarioId:n.scenarioId,accountType:QC(n.account)}),u$(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",e),this.eventHandler.emitEvent(Wo.SSO_SILENT_START,lr.Silent,i);let o;return this.canUsePlatformBroker(i)?(this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative(i,bl.ssoSilent).catch(r=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:r.name,brokerErrorCode:r.errorCode}),r instanceof ny&&OI(r))return this.platformAuthProvider=void 0,this.createSilentIframeClient(i.correlationId).acquireToken(i);throw r})):o=this.createSilentIframeClient(i.correlationId).acquireToken(i),o.then(r=>(this.eventHandler.emitEvent(Wo.SSO_SILENT_SUCCESS,lr.Silent,r),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:r.accessToken.length,idTokenSize:r.idToken.length,accountType:QC(r.account)}),r)).catch(r=>{throw this.eventHandler.emitEvent(Wo.SSO_SILENT_FAILURE,lr.Silent,null,r),this.ssoSilentMeasurement?.end({success:!1},r),r}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})})}acquireTokenByCode(n){return bt(this,null,function*(){let e=this.getRequestCorrelationId(n);this.logger.trace("acquireTokenByCode called",e);let i=this.performanceClient.startMeasurement(ct.AcquireTokenByCode,e);u$(this.initialized,i),this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_BY_CODE_START,lr.Silent,n),i.add({scenarioId:n.scenarioId});try{if(n.code&&n.nativeAccountId)throw fo(DF);if(n.code){let o=n.code,r=this.hybridAuthCodeResponses.get(o);return r?(this.logger.verbose("Existing acquireTokenByCode request found",e),i.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",e),r=this.acquireTokenByCodeAsync(mt(be({},n),{correlationId:e})).then(s=>(this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_BY_CODE_SUCCESS,lr.Silent,s),this.hybridAuthCodeResponses.delete(o),i.end({success:!0,accessTokenSize:s.accessToken.length,idTokenSize:s.idToken.length,accountType:QC(s.account)}),s)).catch(s=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_BY_CODE_FAILURE,lr.Silent,null,s),i.end({success:!1},s),s}),this.hybridAuthCodeResponses.set(o,r)),yield r}else if(n.nativeAccountId)if(this.canUsePlatformBroker(n,n.nativeAccountId)){i.add({isPlatformBrokerRequest:!0});let o=yield this.acquireTokenNative(mt(be({},n),{correlationId:e}),bl.acquireTokenByCode,n.nativeAccountId).catch(r=>{throw r instanceof ny&&OI(r)&&(this.platformAuthProvider=void 0),i.add({brokerErrorName:r.name,brokerErrorCode:r.errorCode}),r});return i.end({accountType:QC(o.account),success:!0}),o}else throw fo(AF);else throw fo(EF)}catch(o){throw this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_BY_CODE_FAILURE,lr.Silent,null,o),i.end({success:!1},o),o}})}acquireTokenByCodeAsync(n){return bt(this,null,function*(){return this.logger.trace("acquireTokenByCodeAsync called",n.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(ct.AcquireTokenByCodeAsync,n.correlationId),this.acquireTokenByCodeAsyncMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),yield this.createSilentAuthCodeClient(n.correlationId).acquireToken(n).then(o=>(this.acquireTokenByCodeAsyncMeasurement?.end({success:!0,fromCache:o.fromCache}),o)).catch(o=>{throw this.acquireTokenByCodeAsyncMeasurement?.end({success:!1},o),o}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})})}acquireTokenFromCache(n,e){return bt(this,null,function*(){switch(this.performanceClient.addQueueMeasurement(ct.AcquireTokenFromCache,n.correlationId),e){case fh.Default:case fh.AccessToken:case fh.AccessTokenAndRefreshToken:let i=this.createSilentCacheClient(n.correlationId);return Zi(i.acquireToken.bind(i),ct.SilentCacheClientAcquireToken,this.logger,this.performanceClient,n.correlationId)(n);default:throw Dn(Bp.tokenRefreshRequired)}})}acquireTokenByRefreshToken(n,e){return bt(this,null,function*(){switch(this.performanceClient.addQueueMeasurement(ct.AcquireTokenByRefreshToken,n.correlationId),e){case fh.Default:case fh.AccessTokenAndRefreshToken:case fh.RefreshToken:case fh.RefreshTokenAndNetwork:let i=this.createSilentRefreshClient(n.correlationId);return Zi(i.acquireToken.bind(i),ct.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,n.correlationId)(n);default:throw Dn(Bp.tokenRefreshRequired)}})}acquireTokenBySilentIframe(n){return bt(this,null,function*(){this.performanceClient.addQueueMeasurement(ct.AcquireTokenBySilentIframe,n.correlationId);let e=this.createSilentIframeClient(n.correlationId);return Zi(e.acquireToken.bind(e),ct.SilentIframeClientAcquireToken,this.logger,this.performanceClient,n.correlationId)(n)})}logout(n){return bt(this,null,function*(){let e=this.getRequestCorrelationId(n);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",e),this.logoutRedirect(be({correlationId:e},n))})}logoutRedirect(n){return bt(this,null,function*(){let e=this.getRequestCorrelationId(n);return zG(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Lv.SIGNOUT),this.createRedirectClient(e).logout(n)})}logoutPopup(n){try{let e=this.getRequestCorrelationId(n);return a5(this.initialized),this.browserStorage.setInteractionInProgress(!0,Lv.SIGNOUT),this.createPopupClient(e).logout(n).finally(()=>{this.browserStorage.setInteractionInProgress(!1)})}catch(e){return Promise.reject(e)}}clearCache(n){return bt(this,null,function*(){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}let e=this.getRequestCorrelationId(n);return this.createSilentCacheClient(e).logout(n)})}getAllAccounts(n){let e=this.getRequestCorrelationId();return vTe(this.logger,this.browserStorage,this.isBrowserEnvironment,e,n)}getAccount(n){let e=this.getRequestCorrelationId();return bTe(n,this.logger,this.browserStorage,e)}getAccountByUsername(n){let e=this.getRequestCorrelationId();return CTe(n,this.logger,this.browserStorage,e)}getAccountByHomeId(n){let e=this.getRequestCorrelationId();return xTe(n,this.logger,this.browserStorage,e)}getAccountByLocalId(n){let e=this.getRequestCorrelationId();return wTe(n,this.logger,this.browserStorage,e)}setActiveAccount(n){let e=this.getRequestCorrelationId();STe(n,this.browserStorage,e)}getActiveAccount(){let n=this.getRequestCorrelationId();return TTe(this.browserStorage,n)}hydrateCache(n,e){return bt(this,null,function*(){this.logger.verbose("hydrateCache called");let i=em.createFromAccountInfo(n.account,n.cloudGraphHostName,n.msGraphHost);return yield this.browserStorage.setAccount(i,n.correlationId),n.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(n,e)):this.browserStorage.hydrateCache(n,e)})}acquireTokenNative(n,e,i,o){return bt(this,null,function*(){if(this.logger.trace("acquireTokenNative called"),!this.platformAuthProvider)throw fo(AI);return new RI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,e,this.performanceClient,this.platformAuthProvider,i||this.getNativeAccountId(n),this.nativeInternalStorage,n.correlationId).acquireToken(n,o)})}canUsePlatformBroker(n,e){if(this.logger.trace("canUsePlatformBroker called"),!this.platformAuthProvider)return this.logger.trace("canUsePlatformBroker: platform broker unavilable, returning false"),!1;if(!xw(this.config,this.logger,this.platformAuthProvider,n.authenticationScheme))return this.logger.trace("canUsePlatformBroker: isBrokerAvailable returned false, returning false"),!1;if(n.prompt)switch(n.prompt){case Pu.NONE:case Pu.CONSENT:case Pu.LOGIN:this.logger.trace("canUsePlatformBroker: prompt is compatible with platform broker flow");break;default:return this.logger.trace(`canUsePlatformBroker: prompt = ${n.prompt} is not compatible with platform broker flow, returning false`),!1}return!e&&!this.getNativeAccountId(n)?(this.logger.trace("canUsePlatformBroker: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(n){let e=n.account||this.getAccount({loginHint:n.loginHint,sid:n.sid})||this.getActiveAccount();return e&&e.nativeAccountId||""}createPopupClient(n){return new n$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,n)}createRedirectClient(n){return new o$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,n)}createSilentIframeClient(n){return new s$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bl.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,n)}createSilentCacheClient(n){return new qF(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,n)}createSilentRefreshClient(n){return new a$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,n)}createSilentAuthCodeClient(n){return new d$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bl.acquireTokenByCode,this.performanceClient,this.platformAuthProvider,n)}addEventCallback(n,e){return this.eventHandler.addEventCallback(n,e)}removeEventCallback(n){this.eventHandler.removeEventCallback(n)}addPerformanceCallback(n){return BG(),this.performanceClient.addPerformanceCallback(n)}removePerformanceCallback(n){return this.performanceClient.removePerformanceCallback(n)}enableAccountStorageEvents(){if(this.config.cache.cacheLocation!==sd.LocalStorage){this.logger.info("Account storage events are only available when cacheLocation is set to localStorage");return}this.eventHandler.subscribeCrossTab()}disableAccountStorageEvents(){if(this.config.cache.cacheLocation!==sd.LocalStorage){this.logger.info("Account storage events are only available when cacheLocation is set to localStorage");return}this.eventHandler.unsubscribeCrossTab()}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(n){this.logger=n}initializeWrapperLibrary(n,e){this.browserStorage.setWrapperMetadata(n,e)}setNavigationClient(n){this.navigationClient=n}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(n){return n?.correlationId?n.correlationId:this.isBrowserEnvironment?zp():cn.EMPTY_STRING}loginRedirect(n){return bt(this,null,function*(){let e=this.getRequestCorrelationId(n);return this.logger.verbose("loginRedirect called",e),this.acquireTokenRedirect(be({correlationId:e},n||tse))})}loginPopup(n){let e=this.getRequestCorrelationId(n);return this.logger.verbose("loginPopup called",e),this.acquireTokenPopup(be({correlationId:e},n||tse))}acquireTokenSilent(n){return bt(this,null,function*(){let e=this.getRequestCorrelationId(n),i=this.performanceClient.startMeasurement(ct.AcquireTokenSilent,e);i.add({cacheLookupPolicy:n.cacheLookupPolicy,scenarioId:n.scenarioId}),u$(this.initialized,i),this.logger.verbose("acquireTokenSilent called",e);let o=n.account||this.getActiveAccount();if(!o)throw fo(bF);return i.add({accountType:QC(o)}),this.acquireTokenSilentDeduped(n,o,e).then(r=>(i.end({success:!0,fromCache:r.fromCache,accessTokenSize:r.accessToken.length,idTokenSize:r.idToken.length}),mt(be({},r),{state:n.state,correlationId:e}))).catch(r=>{throw r instanceof Rs&&r.setCorrelationId(e),i.end({success:!1},r),r})})}acquireTokenSilentDeduped(n,e,i){return bt(this,null,function*(){let o=_w(this.config.auth.clientId,mt(be({},n),{authority:n.authority||this.config.auth.authority,correlationId:i}),e.homeAccountId),r=JSON.stringify(o),s=this.activeSilentTokenRequests.get(r);if(typeof s>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",i),this.performanceClient.addFields({deduped:!1},i);let d=Zi(this.acquireTokenSilentAsync.bind(this),ct.AcquireTokenSilentAsync,this.logger,this.performanceClient,i)(mt(be({},n),{correlationId:i}),e);return this.activeSilentTokenRequests.set(r,d),d.finally(()=>{this.activeSilentTokenRequests.delete(r)})}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",i),this.performanceClient.addFields({deduped:!0},i),s})}acquireTokenSilentAsync(n,e){return bt(this,null,function*(){let i=()=>this.trackPageVisibility(n.correlationId);this.performanceClient.addQueueMeasurement(ct.AcquireTokenSilentAsync,n.correlationId),this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_START,lr.Silent,n),n.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},n.correlationId),document.addEventListener("visibilitychange",i);let o=yield Zi(ITe,ct.InitializeSilentRequest,this.logger,this.performanceClient,n.correlationId)(n,e,this.config,this.performanceClient,this.logger),r=n.cacheLookupPolicy||fh.Default;return this.acquireTokenSilentNoIframe(o,r).catch(d=>bt(this,null,function*(){if(pQe(d,r))if(this.activeIframeRequest)if(r!==fh.Skip){let[v,w]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${w}`,o.correlationId);let O=this.performanceClient.startMeasurement(ct.AwaitConcurrentIframe,o.correlationId);O.add({awaitIframeCorrelationId:w});let N=yield v;if(O.end({success:N}),N)return this.logger.verbose(`Parallel iframe request with correlationId: ${w} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,r);throw this.logger.info(`Iframe request with correlationId: ${w} failed. Interaction is required.`),d}else return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),Zi(this.acquireTokenBySilentIframe.bind(this),ct.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o);else{let v;return this.activeIframeRequest=[new Promise(w=>{v=w}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),Zi(this.acquireTokenBySilentIframe.bind(this),ct.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o).then(w=>(v(!0),w)).catch(w=>{throw v(!1),w}).finally(()=>{this.activeIframeRequest=void 0})}else throw d})).then(d=>(this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_SUCCESS,lr.Silent,d),n.correlationId&&this.performanceClient.addFields({fromCache:d.fromCache},n.correlationId),d)).catch(d=>{throw this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_FAILURE,lr.Silent,null,d),d}).finally(()=>{document.removeEventListener("visibilitychange",i)})})}acquireTokenSilentNoIframe(n,e){return bt(this,null,function*(){return xw(this.config,this.logger,this.platformAuthProvider,n.authenticationScheme)&&n.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.performanceClient.addFields({isPlatformBrokerRequest:!0},n.correlationId),this.acquireTokenNative(n,bl.acquireTokenSilent_silentFlow,n.account.nativeAccountId,e).catch(i=>bt(this,null,function*(){throw this.performanceClient.addFields({brokerErrorName:i.name,brokerErrorCode:i.errorCode},n.correlationId),i instanceof ny&&OI(i)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,Dn(Bp.tokenRefreshRequired)):i}))):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),e===fh.AccessToken&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),Zi(this.acquireTokenFromCache.bind(this),ct.AcquireTokenFromCache,this.logger,this.performanceClient,n.correlationId)(n,e).catch(i=>{if(e===fh.AccessToken)throw i;return this.eventHandler.emitEvent(Wo.ACQUIRE_TOKEN_NETWORK_START,lr.Silent,n),Zi(this.acquireTokenByRefreshToken.bind(this),ct.AcquireTokenByRefreshToken,this.logger,this.performanceClient,n.correlationId)(n,e)}))})}preGeneratePkceCodes(n){return bt(this,null,function*(){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=yield Zi(FI,ct.GeneratePkceCodes,this.logger,this.performanceClient,n)(this.performanceClient,this.logger,n),Promise.resolve()})}getPreGeneratedPkceCodes(n){this.logger.verbose("Attempting to pick up pre-generated PKCE codes");let e=this.pkceCode?be({},this.pkceCode):void 0;return this.pkceCode=void 0,this.logger.verbose(`${e?"Found":"Did not find"} pre-generated PKCE codes`),this.performanceClient.addFields({usePreGeneratedPkce:!!e},n),e}logMultipleInstances(n){let e=this.config.auth.clientId;if(!window)return;window.msal=window.msal||{},window.msal.clientIds=window.msal.clientIds||[],window.msal.clientIds.length>0&&this.logger.verbose("There is already an instance of MSAL.js in the window."),window.msal.clientIds.push(e),HTe(e,n,this.logger)}};function pQe(t,n){let e=!(t instanceof mh&&t.subError!==UC.badToken),i=t.errorCode===Qd.INVALID_GRANT_ERROR||t.errorCode===Bp.tokenRefreshRequired,o=e&&i||t.errorCode===UC.noTokensFound||t.errorCode===UC.refreshTokenExpired,r=USe.includes(n);return o&&r}function jTe(t,n){return bt(this,null,function*(){let e=new qG(t);return yield e.initialize(),ZF.createController(e,n)})}var p5=class t{static createPublicClientApplication(n){return bt(this,null,function*(){let e=yield jTe(n);return new t(n,e)})}constructor(n,e){this.isBroker=!1,this.controller=e||new ZF(new qG(n))}initialize(n){return bt(this,null,function*(){return this.controller.initialize(n,this.isBroker)})}acquireTokenPopup(n){return bt(this,null,function*(){return this.controller.acquireTokenPopup(n)})}acquireTokenRedirect(n){return this.controller.acquireTokenRedirect(n)}acquireTokenSilent(n){return this.controller.acquireTokenSilent(n)}acquireTokenByCode(n){return this.controller.acquireTokenByCode(n)}addEventCallback(n,e){return this.controller.addEventCallback(n,e)}removeEventCallback(n){return this.controller.removeEventCallback(n)}addPerformanceCallback(n){return this.controller.addPerformanceCallback(n)}removePerformanceCallback(n){return this.controller.removePerformanceCallback(n)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(n){return this.controller.getAccount(n)}getAccountByHomeId(n){return this.controller.getAccountByHomeId(n)}getAccountByLocalId(n){return this.controller.getAccountByLocalId(n)}getAccountByUsername(n){return this.controller.getAccountByUsername(n)}getAllAccounts(n){return this.controller.getAllAccounts(n)}handleRedirectPromise(n){return this.controller.handleRedirectPromise(n)}loginPopup(n){return this.controller.loginPopup(n)}loginRedirect(n){return this.controller.loginRedirect(n)}logout(n){return this.controller.logout(n)}logoutRedirect(n){return this.controller.logoutRedirect(n)}logoutPopup(n){return this.controller.logoutPopup(n)}ssoSilent(n){return this.controller.ssoSilent(n)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(n){this.controller.setLogger(n)}setActiveAccount(n){this.controller.setActiveAccount(n)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(n,e){return this.controller.initializeWrapperLibrary(n,e)}setNavigationClient(n){this.controller.setNavigationClient(n)}getConfiguration(){return this.controller.getConfiguration()}hydrateCache(n,e){return bt(this,null,function*(){return this.controller.hydrateCache(n,e)})}clearCache(n){return this.controller.clearCache(n)}};var h5=class{static getInteractionStatusFromEvent(n,e){switch(n.eventType){case Wo.LOGIN_START:return vd.Login;case Wo.SSO_SILENT_START:return vd.SsoSilent;case Wo.ACQUIRE_TOKEN_START:if(n.interactionType===lr.Redirect||n.interactionType===lr.Popup)return vd.AcquireToken;break;case Wo.HANDLE_REDIRECT_START:return vd.HandleRedirect;case Wo.LOGOUT_START:return vd.Logout;case Wo.SSO_SILENT_SUCCESS:case Wo.SSO_SILENT_FAILURE:if(e&&e!==vd.SsoSilent)break;return vd.None;case Wo.LOGOUT_END:if(e&&e!==vd.Logout)break;return vd.None;case Wo.HANDLE_REDIRECT_END:if(e&&e!==vd.HandleRedirect)break;return vd.None;case Wo.LOGIN_SUCCESS:case Wo.LOGIN_FAILURE:case Wo.ACQUIRE_TOKEN_SUCCESS:case Wo.ACQUIRE_TOKEN_FAILURE:case Wo.RESTORE_FROM_BFCACHE:if(n.interactionType===lr.Redirect||n.interactionType===lr.Popup){if(e&&e!==vd.Login&&e!==vd.AcquireToken)break;return vd.None}break}return null}};var p$="@azure/msal-angular",m5="4.0.19",f5=new fi("MSAL_INSTANCE"),h$=new fi("MSAL_GUARD_CONFIG"),m$=new fi("MSAL_INTERCEPTOR_CONFIG"),hQe=new fi("MSAL_BROADCAST_CONFIG"),PI=(()=>{class t{constructor(e,i){this.msalInstance=e,this.msalBroadcastConfig=i,this.msalBroadcastConfig&&this.msalBroadcastConfig.eventsToReplay>0?(this.msalInstance.getLogger().clone(p$,m5).verbose(`BroadcastService - eventsToReplay set on BroadcastConfig, replaying the last ${this.msalBroadcastConfig.eventsToReplay} events`),this._msalSubject=new pi(this.msalBroadcastConfig.eventsToReplay)):this._msalSubject=new hi,this.msalSubject$=this._msalSubject.asObservable(),this._inProgress=new Gs(vd.Startup),this.inProgress$=this._inProgress.asObservable(),this.msalInstance.addEventCallback(o=>{this._msalSubject.next(o);let r=h5.getInteractionStatusFromEvent(o,this._inProgress.value);r!==null&&(this.msalInstance.getLogger().clone(p$,m5).verbose(`BroadcastService - ${o.eventType} results in setting inProgress from ${this._inProgress.value} to ${r}`),this._inProgress.next(r))})}resetInProgressEvent(){this._inProgress.value===vd.Startup&&this._inProgress.next(vd.None)}}return t.\u0275fac=function(e){return new(e||t)(di(f5),di(hQe,8))},t.\u0275prov=lt({token:t,factory:t.\u0275fac}),t})(),Gk=(()=>{class t{constructor(e,i,o){this.instance=e,this.location=i,this.injector=o;let r=this.location.path(!0).split("#").pop();r&&(this.redirectHash=`#${r}`),this.instance.initializeWrapperLibrary(nse.Angular,m5)}initialize(){return nr(this.instance.initialize())}acquireTokenPopup(e){return nr(this.instance.acquireTokenPopup(e))}acquireTokenRedirect(e){return nr(this.instance.acquireTokenRedirect(e))}acquireTokenSilent(e){return nr(this.instance.acquireTokenSilent(e))}handleRedirectObservable(e){return nr(this.instance.initialize().then(()=>this.instance.handleRedirectPromise(e||this.redirectHash)).finally(()=>{this.injector.get(PI).resetInProgressEvent()}))}loginPopup(e){return nr(this.instance.loginPopup(e))}loginRedirect(e){return nr(this.instance.loginRedirect(e))}logout(e){return nr(this.instance.logout(e))}logoutRedirect(e){return nr(this.instance.logoutRedirect(e))}logoutPopup(e){return nr(this.instance.logoutPopup(e))}ssoSilent(e){return nr(this.instance.ssoSilent(e))}getLogger(){return this.logger||(this.logger=this.instance.getLogger().clone(p$,m5)),this.logger}setLogger(e){this.logger=e.clone(p$,m5),this.instance.setLogger(e)}}return t.\u0275fac=function(e){return new(e||t)(di(f5),di(Vm),di(Oo))},t.\u0275prov=lt({token:t,factory:t.\u0275fac}),t})(),Od=(()=>{class t{constructor(e,i,o,r,s){this.msalGuardConfig=e,this.msalBroadcastService=i,this.authService=o,this.location=r,this.router=s,this.msalBroadcastService.inProgress$.subscribe()}parseUrl(e){return this.router.parseUrl(e)}getDestinationUrl(e){this.authService.getLogger().verbose("Guard - getting destination url");let i=document.getElementsByTagName("base"),o=this.location.normalize(i.length?i[0].href:window.location.origin),r=this.location.prepareExternalUrl(e);return r.startsWith("#")?(this.authService.getLogger().verbose("Guard - destination by hash routing"),`${o}/${r}`):`${o}${e}`}loginInteractively(e){let i=typeof this.msalGuardConfig.authRequest=="function"?this.msalGuardConfig.authRequest(this.authService,e):be({},this.msalGuardConfig.authRequest);if(this.msalGuardConfig.interactionType===lr.Popup)return this.authService.getLogger().verbose("Guard - logging in by popup"),this.authService.loginPopup(i).pipe(vt(r=>(this.authService.getLogger().verbose("Guard - login by popup successful, can activate, setting active account"),this.authService.instance.setActiveAccount(r.account),!0)));this.authService.getLogger().verbose("Guard - logging in by redirect");let o=this.getDestinationUrl(e.url);return this.authService.loginRedirect(be({redirectStartPage:o},i)).pipe(vt(()=>!1))}activateHelper(e){if(this.msalGuardConfig.interactionType!==lr.Popup&&this.msalGuardConfig.interactionType!==lr.Redirect)throw new Nk("invalid_interaction_type","Invalid interaction type provided to MSAL Guard. InteractionType.Popup or InteractionType.Redirect must be provided in the MsalGuardConfiguration");if(this.authService.getLogger().verbose("MSAL Guard activated"),typeof window<"u"){if(da.hashContainsKnownProperties(window.location.hash)&&UG.isInIframe()&&!this.authService.instance.getConfiguration().system.allowRedirectInIframe)return this.authService.getLogger().warning("Guard - redirectUri set to page with MSAL Guard. It is recommended to not set redirectUri to a page that requires authentication."),ci(!1)}else return this.authService.getLogger().info("Guard - window is undefined, MSAL does not support server-side token acquisition"),ci(!0);this.msalGuardConfig.loginFailedRoute&&(this.loginFailedRoute=this.parseUrl(this.msalGuardConfig.loginFailedRoute));let i=this.location.path(!0);return this.authService.initialize().pipe(lh(()=>this.authService.handleRedirectObservable()),lh(()=>{if(!this.authService.instance.getAllAccounts().length)return e?(this.authService.getLogger().verbose("Guard - no accounts retrieved, log in required to activate"),this.loginInteractively(e)):(this.authService.getLogger().verbose("Guard - no accounts retrieved, no state, cannot load"),ci(!1));if(this.authService.getLogger().verbose("Guard - at least 1 account exists, can activate or load"),e){let o=this.includesCode(e.url),r=!!e.root&&!!e.root.fragment&&this.includesCode(`#${e.root.fragment}`),s=this.location.prepareExternalUrl(e.url).indexOf("#")===0;if(o&&(r||s))return this.authService.getLogger().info("Guard - Hash contains known code response, stopping navigation."),i.indexOf("#")>-1?ci(this.parseUrl(this.location.path())):ci(this.parseUrl(""))}return ci(!0)}),Gd(o=>(this.authService.getLogger().error("Guard - error while logging in, unable to activate"),this.authService.getLogger().errorPii(`Guard - error: ${o.message}`),this.loginFailedRoute&&e?(this.authService.getLogger().verbose("Guard - loginFailedRoute set, redirecting"),ci(this.loginFailedRoute)):ci(!1))))}includesCode(e){return e.lastIndexOf("/code")>-1&&e.lastIndexOf("/code")===e.length-5||e.indexOf("#code=")>-1||e.indexOf("&code=")>-1}canActivate(e,i){return this.authService.getLogger().verbose("Guard - canActivate"),this.activateHelper(i)}canActivateChild(e,i){return this.authService.getLogger().verbose("Guard - canActivateChild"),this.activateHelper(i)}canMatch(){return this.authService.getLogger().verbose("Guard - canLoad"),this.activateHelper()}}return t.\u0275fac=function(e){return new(e||t)(di(h$),di(PI),di(Gk),di(Vm),di(dl))},t.\u0275prov=lt({token:t,factory:t.\u0275fac}),t})(),GTe=(()=>{class t{constructor(e,i,o,r,s){this.msalInterceptorConfig=e,this.authService=i,this.location=o,this.msalBroadcastService=r,this._document=s}intercept(e,i){if(this.msalInterceptorConfig.interactionType!==lr.Popup&&this.msalInterceptorConfig.interactionType!==lr.Redirect)throw new Nk("invalid_interaction_type","Invalid interaction type provided to MSAL Interceptor. InteractionType.Popup, InteractionType.Redirect must be provided in the msalInterceptorConfiguration");this.authService.getLogger().verbose("MSAL Interceptor activated");let o=this.getScopesForEndpoint(e.url,e.method);if(!o||o.length===0)return this.authService.getLogger().verbose("Interceptor - no scopes for endpoint"),i.handle(e);let r;this.authService.instance.getActiveAccount()?(this.authService.getLogger().verbose("Interceptor - active account selected"),r=this.authService.instance.getActiveAccount()):(this.authService.getLogger().verbose("Interceptor - no active account, fallback to first account"),r=this.authService.instance.getAllAccounts()[0]);let s=typeof this.msalInterceptorConfig.authRequest=="function"?this.msalInterceptorConfig.authRequest(this.authService,e,{account:r}):mt(be({},this.msalInterceptorConfig.authRequest),{account:r});return this.authService.getLogger().info(`Interceptor - ${o.length} scopes found for endpoint`),this.authService.getLogger().infoPii(`Interceptor - [${o}] scopes found for ${e.url}`),this.acquireToken(s,o,r).pipe(Mn(d=>{this.authService.getLogger().verbose("Interceptor - setting authorization headers");let m=e.headers.set("Authorization",`Bearer ${d.accessToken}`),v=e.clone({headers:m});return i.handle(v)}))}acquireToken(e,i,o){return this.authService.acquireTokenSilent(mt(be({},e),{scopes:i,account:o})).pipe(Gd(()=>(this.authService.getLogger().error("Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve."),this.msalBroadcastService.inProgress$.pipe(Sn(1),Mn(r=>r===vd.None?this.acquireTokenInteractively(e,i):this.msalBroadcastService.inProgress$.pipe(wn(s=>s===vd.None),Sn(1),Mn(()=>this.acquireToken(e,i,o))))))),Mn(r=>r.accessToken?ci(r):(this.authService.getLogger().error("Interceptor - acquireTokenSilent resolved with null access token. Known issue with B2C tenants, invoking interaction to resolve."),this.msalBroadcastService.inProgress$.pipe(wn(s=>s===vd.None),Sn(1),Mn(()=>this.acquireTokenInteractively(e,i))))))}acquireTokenInteractively(e,i){if(this.msalInterceptorConfig.interactionType===lr.Popup)return this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by popup"),this.authService.acquireTokenPopup(mt(be({},e),{scopes:i}));this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by redirect");let o=window.location.href;return this.authService.acquireTokenRedirect(mt(be({},e),{scopes:i,redirectStartPage:o})),cu}getScopesForEndpoint(e,i){this.authService.getLogger().verbose("Interceptor - getting scopes for endpoint");let o=this.location.normalize(e),r=Array.from(this.msalInterceptorConfig.protectedResourceMap.keys()),s=this.matchResourcesToEndpoint(r,o);return s.length>0?this.matchScopesToEndpoint(this.msalInterceptorConfig.protectedResourceMap,s,i):null}matchResourcesToEndpoint(e,i){let o=[];return e.forEach(r=>{let s=this.location.normalize(r),d=this.getAbsoluteUrl(s),m=new URL(d),v=this.getAbsoluteUrl(i),w=new URL(v);this.checkUrlComponents(m,w)&&o.push(r)}),o}checkUrlComponents(e,i){let o=["protocol","host","pathname","search","hash"];for(let r of o)if(e[r]){let s=decodeURIComponent(e[r]);if(!$c.matchPattern(s,i[r]))return!1}return!0}getAbsoluteUrl(e){let i=this._document.createElement("a");return i.href=e,i.href}matchScopesToEndpoint(e,i,o){let r=[];return i.forEach(s=>{let d=[],m=e.get(s);if(m===null){r.push(null);return}m.forEach(v=>{if(typeof v=="string")d.push(v);else{let w=o.toLowerCase();v.httpMethod.toLowerCase()===w&&(v.scopes===null?r.push(null):v.scopes.forEach(N=>{d.push(N)}))}}),d.length>0&&r.push(d)}),r.length>0?(r.length>1&&this.authService.getLogger().warning("Interceptor - More than 1 matching scopes for endpoint found."),r[0]):null}}return t.\u0275fac=function(e){return new(e||t)(di(m$),di(Gk),di(Vm),di(PI),di(Ao))},t.\u0275prov=lt({token:t,factory:t.\u0275fac}),t})();var xse=(()=>{class t{static forRoot(e,i,o){return{ngModule:t,providers:[{provide:f5,useValue:e},{provide:h$,useValue:i},{provide:m$,useValue:o},Gk]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=yi({type:t}),t.\u0275inj=_i({providers:[Od,PI],imports:[On]}),t})();var XF=class{constructor(n=""){this.q=n}toHttpParams(){let n=new Pr;return n=n.append("q",this.q),n}};var f$=new fi("BD_FRONTEND_APP_CONFIG"),qr=(()=>{class t{static{this.envStoragePrefix="bd.config"}constructor(e){this._appConfig=e,this.store()}store(){if(this._storeValues(this._appConfig.apiEndpoints),this._storeValues(this._appConfig.variables),this._appConfig.helpResources&&this._appConfig.helpResources.length>0){let e=`${t.envStoragePrefix}.BD_HELP_RESOURCE_URLS`;sessionStorage.setItem(e,JSON.stringify(this._appConfig.helpResources))}}_storeValues(e={}){Object.keys(e).forEach(o=>{let r=`${t.envStoragePrefix}.${o}`,s=e[o];s.toString().match('[\\[\\{][\\\\\\"].*([\\"\\\\]|\\w)[\\]\\}]')&&(s=JSON.parse(s)),sessionStorage.setItem(r,JSON.stringify(s))})}load(e,i=!1){let o=`${t.envStoragePrefix}.${e}`,r=sessionStorage.getItem(o),s=null;if(!r&&!i)throw new Error(`${e} is missing in storage.`);try{s=JSON.parse(r)}catch{s=r}return s}static{this.\u0275fac=function(i){return new(i||t)(di(f$))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var fQe=["*"],gQe=t=>({chip__stacked:t}),_Qe=(t,n)=>({color:t,backgroundColor:n}),$Te=(()=>{class t{constructor(){this.stacked=!1,this.fontColor="rgba(0,0,0,0.87)",this.color="#e0e0e0"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-chip-dummy"]],inputs:{stacked:"stacked",fontColor:"fontColor",color:"color"},ngContentSelectors:fQe,decls:2,vars:7,consts:[[1,"chip","mat-body-1",3,"ngClass","ngStyle"]],template:function(i,o){i&1&&(Nn(),k(0,"div",0),pn(1),D()),i&2&&E("ngClass",ki(2,gQe,o.stacked))("ngStyle",Eo(4,_Qe,o.fontColor,o.color))},dependencies:[Ns,vs],styles:[".chip[_ngcontent-%COMP%]{display:inline-block;padding:7px 12px;border-radius:24px;align-items:center;cursor:default;font-size:13px;line-height:18px;margin:0 8px 3px 0}.chip.chip__stacked[_ngcontent-%COMP%]{display:block;margin:0 0 8px;max-width:200px}"]})}}return t})();var dr=class{constructor(){this._subs=[]}unsubscribeAll(){this._subs.forEach(n=>n.unsubscribe()),this._subs=[]}};var g5=class t{static loadFrontendConfig(n,e){let i=t.frontendConfigUrl(e.configRequestMethod,e.configRequestUrl);return fetch(i,{method:e.configRequestMethod,mode:"cors",body:e.configRequestMethod==="GET"?null:JSON.stringify(n),headers:new Headers({"content-type":"application/json"})}).then(o=>o.json())}static frontendConfigUrl(n,e){let i=t.extractHostname(window.location.origin,!0);return n==="GET"?e:`${window.location.protocol}//frontend-config-api.${i}${e}`}static extractHostname(n,e=!1){let i;if(n.indexOf("://")>-1?i=n.split("/")[2]:i=n.split("/")[0],i=i.split(":")[0],i=i.split("?")[0],e){let o=i.split(".");i=o[o.length-2]+"."+o[o.length-1]}return i}};var _5=class{_attachedHost;attach(n){return this._attachedHost=n,n.attach(this)}detach(){let n=this._attachedHost;n!=null&&(this._attachedHost=null,n.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},tg=class extends _5{component;viewContainerRef;injector;projectableNodes;constructor(n,e,i,o){super(),this.component=n,this.viewContainerRef=e,this.injector=i,this.projectableNodes=o}},Nv=class extends _5{templateRef;viewContainerRef;context;injector;constructor(n,e,i,o){super(),this.templateRef=n,this.viewContainerRef=e,this.context=i,this.injector=o}get origin(){return this.templateRef.elementRef}attach(n,e=this.context){return this.context=e,super.attach(n)}detach(){return this.context=void 0,super.detach()}},wse=class extends _5{element;constructor(n){super(),this.element=n instanceof Bn?n.nativeElement:n}},JF=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(n){if(n instanceof tg)return this._attachedPortal=n,this.attachComponentPortal(n);if(n instanceof Nv)return this._attachedPortal=n,this.attachTemplatePortal(n);if(this.attachDomPortal&&n instanceof wse)return this._attachedPortal=n,this.attachDomPortal(n)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(n){this._disposeFn=n}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},y5=class extends JF{outletElement;_appRef;_defaultInjector;constructor(n,e,i){super(),this.outletElement=n,this._appRef=e,this._defaultInjector=i}attachComponentPortal(n){let e;if(n.viewContainerRef){let i=n.injector||n.viewContainerRef.injector,o=i.get(xv,null,{optional:!0})||void 0;e=n.viewContainerRef.createComponent(n.component,{index:n.viewContainerRef.length,injector:i,ngModuleRef:o,projectableNodes:n.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let i=this._appRef,o=n.injector||this._defaultInjector||Oo.NULL,r=o.get(Uc,i.injector);e=TR(n.component,{elementInjector:o,environmentInjector:r,projectableNodes:n.projectableNodes||void 0}),i.attachView(e.hostView),this.setDisposeFn(()=>{i.viewCount>0&&i.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=n,e}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(o=>this.outletElement.appendChild(o)),i.detectChanges(),this.setDisposeFn(()=>{let o=e.indexOf(i);o!==-1&&e.remove(o)}),this._attachedPortal=n,i}attachDomPortal=n=>{let e=n.element;e.parentNode;let i=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(i,e),this.outletElement.appendChild(e),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}};var r0=(()=>{class t extends JF{_moduleRef=re(xv,{optional:!0});_document=re(Ao);_viewContainerRef=re(nc);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new ve;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let i=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,o=i.createComponent(e.component,{index:i.length,injector:e.injector||i.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return i!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=e,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(e){e.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}attachDomPortal=e=>{let i=e.element;i.parentNode;let o=this._document.createComment("dom-portal");e.setAttachedHost(this),i.parentNode.insertBefore(o,i),this._getRootNode().appendChild(i),this._attachedPortal=e,super.setDisposeFn(()=>{o.parentNode&&o.parentNode.replaceChild(i,o)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ft]})}return t})();var Wg=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();function ww(t){return t.buttons===0||t.detail===0}function Sw(t){let n=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!n&&n.identifier===-1&&(n.radiusX==null||n.radiusX===1)&&(n.radiusY==null||n.radiusY===1)}var Tse;function KTe(){if(Tse==null){let t=typeof document<"u"?document.head:null;Tse=!!(t&&(t.createShadowRoot||t.attachShadow))}return Tse}function $k(t){if(KTe()){let n=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&n instanceof ShadowRoot)return n}return null}function LI(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}function pp(t){return t.composedPath?t.composedPath()[0]:t.target}var Ise;try{Ise=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Ise=!1}var ba=(()=>{class t{_platformId=re(Zh);isBrowser=this._platformId?ps(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Ise)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var v5;function WTe(){if(v5==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>v5=!0}))}finally{v5=v5||!1}return v5}function NI(t){return WTe()?t:!!t.capture}function jm(t,n=0){return YTe(t)?Number(t):arguments.length===2?n:0}function YTe(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function Rd(t){return t instanceof Bn?t.nativeElement:t}var QTe=new fi("cdk-input-modality-detector-options"),ZTe={ignoreKeys:[18,17,224,91,16]},XTe=650,Ese={passive:!0,capture:!0},JTe=(()=>{class t{_platform=re(ba);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Gs(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(i=>i===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=pp(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs{if(Sw(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=pp(e)};constructor(){let e=re(_n),i=re(Ao),o=re(QTe,{optional:!0});if(this._options=be(be({},ZTe),o),this.modalityDetected=this._modality.pipe(xB(1)),this.modalityChanged=this.modalityDetected.pipe(rp()),this._platform.isBrowser){let r=re(bc).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[r.listen(i,"keydown",this._onKeydown,Ese),r.listen(i,"mousedown",this._onMousedown,Ese),r.listen(i,"touchstart",this._onTouchstart,Ese)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),b5=(function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t})(b5||{}),eIe=new fi("cdk-focus-monitor-default-options"),g$=NI({passive:!0,capture:!0}),gh=(()=>{class t{_ngZone=re(_n);_platform=re(ba);_inputModalityDetector=re(JTe);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=re(Ao);_stopInputModalityDetector=new hi;constructor(){let e=re(eIe,{optional:!0});this._detectionMode=e?.detectionMode||b5.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let i=pp(e);for(let o=i;o;o=o.parentElement)e.type==="focus"?this._onFocus(e,o):this._onBlur(e,o)};monitor(e,i=!1){let o=Rd(e);if(!this._platform.isBrowser||o.nodeType!==1)return ci();let r=$k(o)||this._document,s=this._elementInfo.get(o);if(s)return i&&(s.checkChildren=!0),s.subject;let d={checkChildren:i,subject:new hi,rootNode:r};return this._elementInfo.set(o,d),this._registerGlobalListeners(d),d.subject}stopMonitoring(e){let i=Rd(e),o=this._elementInfo.get(i);o&&(o.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(o))}focusVia(e,i,o){let r=Rd(e),s=this._document.activeElement;r===s?this._getClosestElementsInfo(r).forEach(([d,m])=>this._originChanged(d,i,m)):(this._setOrigin(i),typeof r.focus=="function"&&r.focus(o))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===b5.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused",i==="touch"),e.classList.toggle("cdk-keyboard-focused",i==="keyboard"),e.classList.toggle("cdk-mouse-focused",i==="mouse"),e.classList.toggle("cdk-program-focused",i==="program")}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&i,this._detectionMode===b5.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?XTe:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(e,i){let o=this._elementInfo.get(i),r=pp(e);!o||!o.checkChildren&&i!==r||this._originChanged(i,this._getFocusOrigin(r),o)}_onBlur(e,i){let o=this._elementInfo.get(i);!o||o.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(o,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let i=e.rootNode,o=this._rootNodeFocusListenerCount.get(i)||0;o||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,g$),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,g$)}),this._rootNodeFocusListenerCount.set(i,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(cs(this._stopInputModalityDetector)).subscribe(r=>{this._setOrigin(r,!0)}))}_removeGlobalListeners(e){let i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){let o=this._rootNodeFocusListenerCount.get(i);o>1?this._rootNodeFocusListenerCount.set(i,o-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,g$),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,g$),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,o){this._setClasses(e,i),this._emitOrigin(o,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){let i=[];return this._elementInfo.forEach((o,r)=>{(r===e||o.checkChildren&&r.contains(e))&&i.push([r,o])}),i}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:i,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!i||i===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let r=e.labels;if(r){for(let s=0;s{class t{_appRef;_injector=re(Oo);_environmentInjector=re(Uc);load(e){let i=this._appRef=this._appRef||this._injector.get(Rp),o=_$.get(i);o||(o={loaders:new Set,refs:[]},_$.set(i,o),i.onDestroy(()=>{_$.get(i)?.refs.forEach(r=>r.destroy()),_$.delete(i)})),o.loaders.has(e)||(o.loaders.add(e),o.refs.push(TR(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var BI=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(i,o){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0} `],encapsulation:2,changeDetection:0})}return t})();function VI(t){return Array.isArray(t)?t:[t]}var tIe=new Set,qk,y$=(()=>{class t{_platform=re(ba);_nonce=re(gR,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):bQe}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&vQe(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function vQe(t,n){if(!tIe.has(t))try{qk||(qk=document.createElement("style"),n&&qk.setAttribute("nonce",n),qk.setAttribute("type","text/css"),document.head.appendChild(qk)),qk.sheet&&(qk.sheet.insertRule(`@media ${t} {body{ }}`,0),tIe.add(t))}catch(e){console.error(e)}}function bQe(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}var s0=(()=>{class t{_mediaMatcher=re(y$);_zone=re(_n);_queries=new Map;_destroySubject=new hi;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return iIe(VI(e)).some(o=>this._registerQuery(o).mql.matches)}observe(e){let o=iIe(VI(e)).map(s=>this._registerQuery(s).observable),r=yc(o);return r=_C(r.pipe(Sn(1)),r.pipe(xB(1),id(0))),r.pipe(vt(s=>{let d={matches:!1,breakpoints:{}};return s.forEach(({matches:m,query:v})=>{d.matches=d.matches||m,d.breakpoints[v]=m}),d}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let i=this._mediaMatcher.matchMedia(e),r={observable:new Cr(s=>{let d=m=>this._zone.run(()=>s.next(m));return i.addListener(d),()=>{i.removeListener(d)}}).pipe(rl(i),vt(({matches:s})=>({query:e,matches:s})),cs(this._destroySubject)),mql:i};return this._queries.set(e,r),r}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function iIe(t){return t.map(n=>n.split(",")).reduce((n,e)=>n.concat(e)).map(n=>n.trim())}function CQe(t){if(t.type==="characterData"&&t.target instanceof Comment)return!0;if(t.type==="childList"){for(let n=0;n{class t{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),oIe=(()=>{class t{_mutationObserverFactory=re(nIe);_observedElements=new Map;_ngZone=re(_n);constructor(){}ngOnDestroy(){this._observedElements.forEach((e,i)=>this._cleanupObserver(i))}observe(e){let i=Rd(e);return new Cr(o=>{let s=this._observeElement(i).pipe(vt(d=>d.filter(m=>!CQe(m))),wn(d=>!!d.length)).subscribe(d=>{this._ngZone.run(()=>{o.next(d)})});return()=>{s.unsubscribe(),this._unobserveElement(i)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let i=new hi,o=this._mutationObserverFactory.create(r=>i.next(r));o&&o.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:o,stream:i,count:1})}return this._observedElements.get(e).stream})}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:i,stream:o}=this._observedElements.get(e);i&&i.disconnect(),o.complete(),this._observedElements.delete(e)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rIe=(()=>{class t{_contentObserver=re(oIe);_elementRef=re(Bn);event=new ve;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled?this._unsubscribe():this._subscribe()}_disabled=!1;get debounce(){return this._debounce}set debounce(e){this._debounce=jm(e),this._subscribe()}_debounce;_currentSubscription=null;constructor(){}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?e.pipe(id(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",je],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return t})(),eP=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[nIe]})}return t})();var kse=(()=>{class t{_platform=re(ba);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return wQe(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let i=xQe(MQe(e));if(i&&(sIe(i)===-1||!this.isVisible(i)))return!1;let o=e.nodeName.toLowerCase(),r=sIe(e);return e.hasAttribute("contenteditable")?r!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!AQe(e)?!1:o==="audio"?e.hasAttribute("controls")?r!==-1:!1:o==="video"?r===-1?!1:r!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,i){return kQe(e)&&!this.isDisabled(e)&&(i?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function xQe(t){try{return t.frameElement}catch{return null}}function wQe(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function SQe(t){let n=t.nodeName.toLowerCase();return n==="input"||n==="select"||n==="button"||n==="textarea"}function TQe(t){return EQe(t)&&t.type=="hidden"}function IQe(t){return DQe(t)&&t.hasAttribute("href")}function EQe(t){return t.nodeName.toLowerCase()=="input"}function DQe(t){return t.nodeName.toLowerCase()=="a"}function cIe(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let n=t.getAttribute("tabindex");return!!(n&&!isNaN(parseInt(n,10)))}function sIe(t){if(!cIe(t))return null;let n=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(n)?-1:n}function AQe(t){let n=t.nodeName.toLowerCase(),e=n==="input"&&t.type;return e==="text"||e==="password"||n==="select"||n==="textarea"}function kQe(t){return TQe(t)?!1:SQe(t)||IQe(t)||t.hasAttribute("contenteditable")||cIe(t)}function MQe(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Ase=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(n){this._enabled=n,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_enabled=!0;constructor(n,e,i,o,r=!1,s){this._element=n,this._checker=e,this._ngZone=i,this._document=o,this._injector=s,r||this.attachAnchors()}destroy(){let n=this._startAnchor,e=this._endAnchor;n&&(n.removeEventListener("focus",this.startAnchorListener),n.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(n)))})}focusFirstTabbableElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(n)))})}focusLastTabbableElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(n)))})}_getRegionBoundary(n){let e=this._element.querySelectorAll(`[cdk-focus-region-${n}], [cdkFocusRegion${n}], [cdk-focus-${n}]`);return n=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(n){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let i=this._getFirstTabbableElement(e);return i?.focus(n),!!i}return e.focus(n),!0}return this.focusFirstTabbableElement(n)}focusFirstTabbableElement(n){let e=this._getRegionBoundary("start");return e&&e.focus(n),!!e}focusLastTabbableElement(n){let e=this._getRegionBoundary("end");return e&&e.focus(n),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(n){if(this._checker.isFocusable(n)&&this._checker.isTabbable(n))return n;let e=n.children;for(let i=0;i=0;i--){let o=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(o)return o}return null}_createAnchor(){let n=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,n),n.classList.add("cdk-visually-hidden"),n.classList.add("cdk-focus-trap-anchor"),n.setAttribute("aria-hidden","true"),n}_toggleAnchorTabIndex(n,e){n?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(n){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_executeOnStable(n){this._injector?Ou(n,{injector:this._injector}):setTimeout(n)}},Mse=(()=>{class t{_checker=re(kse);_ngZone=re(_n);_document=re(Ao);_injector=re(Oo);constructor(){re(kl).load(BI)}create(e,i=!1){return new Ase(e,this._checker,this._ngZone,this._document,i,this._injector)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var dIe=new fi("liveAnnouncerElement",{providedIn:"root",factory:uIe});function uIe(){return null}var pIe=new fi("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),OQe=0,Ose=(()=>{class t{_ngZone=re(_n);_defaultOptions=re(pIe,{optional:!0});_liveElement;_document=re(Ao);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=re(dIe,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...i){let o=this._defaultOptions,r,s;return i.length===1&&typeof i[0]=="number"?s=i[0]:[r,s]=i,this.clear(),clearTimeout(this._previousTimeout),r||(r=o&&o.politeness?o.politeness:"polite"),s==null&&o&&(s=o.duration),this._liveElement.setAttribute("aria-live",r),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(d=>this._currentResolve=d)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,typeof s=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",i=this._document.getElementsByClassName(e),o=this._document.createElement("div");for(let r=0;r .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{class t{_platform=re(ba);_hasCheckedHighContrastMode;_document=re(Ao);_breakpointSubscription;constructor(){this._breakpointSubscription=re(s0).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return zI.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let i=this._document.defaultView||window,o=i&&i.getComputedStyle?i.getComputedStyle(e):null,r=(o&&o.backgroundColor||"").replace(/ /g,"");switch(e.remove(),r){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return zI.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return zI.BLACK_ON_WHITE}return zI.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Dse,aIe,lIe),this._hasCheckedHighContrastMode=!0;let i=this.getHighContrastMode();i===zI.BLACK_ON_WHITE?e.add(Dse,aIe):i===zI.WHITE_ON_BLACK&&e.add(Dse,lIe)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),C5=(()=>{class t{constructor(){re(v$)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[eP]})}return t})();function pu(t,...n){return n.length?n.some(e=>t[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}function Rse(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function Bu(t){return t==null?"":typeof t=="string"?t:`${t}px`}var RQe=new fi("cdk-dir-doc",{providedIn:"root",factory:FQe});function FQe(){return re(Ao)}var PQe=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function hIe(t){let n=t?.toLowerCase()||"";return n==="auto"&&typeof navigator<"u"&&navigator?.language?PQe.test(navigator.language)?"rtl":"ltr":n==="rtl"?"rtl":"ltr"}var ad=(()=>{class t{get value(){return this.valueSignal()}valueSignal=Zn("ltr");change=new ve;constructor(){let e=re(RQe,{optional:!0});if(e){let i=e.body?e.body.dir:null,o=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(hIe(i||o||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Bv=(function(t){return t[t.NORMAL=0]="NORMAL",t[t.NEGATED=1]="NEGATED",t[t.INVERTED=2]="INVERTED",t})(Bv||{}),b$,Kk;function C$(){if(Kk==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Kk=!1,Kk;if("scrollBehavior"in document.documentElement.style)Kk=!0;else{let t=Element.prototype.scrollTo;t?Kk=!/\{\s*\[native code\]\s*\}/.test(t.toString()):Kk=!1}}return Kk}function tP(){if(typeof document!="object"||!document)return Bv.NORMAL;if(b$==null){let t=document.createElement("div"),n=t.style;t.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";let e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",t.appendChild(e),document.body.appendChild(t),b$=Bv.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,b$=t.scrollLeft===0?Bv.NEGATED:Bv.INVERTED),t.remove()}return b$}var UI=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();var LQe=20,ZC=(()=>{class t{_ngZone=re(_n);_platform=re(ba);_renderer=re(bc).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new hi;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=LQe){return this._platform.isBrowser?new Cr(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let o=e>0?this._scrolled.pipe(v7(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):ci()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){let o=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(wn(r=>!r||o.indexOf(r)>-1))}getAncestorScrollContainers(e){let i=[];return this.scrollContainers.forEach((o,r)=>{this._scrollableContainsElement(r,e)&&i.push(r)}),i}_scrollableContainsElement(e,i){let o=Rd(i),r=e.getElementRef().nativeElement;do if(o==r)return!0;while(o=o.parentElement);return!1}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Fse=(()=>{class t{elementRef=re(Bn);scrollDispatcher=re(ZC);ngZone=re(_n);dir=re(ad,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new hi;_renderer=re(Ps);_cleanupScroll;_elementScrolled=new hi;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let i=this.elementRef.nativeElement,o=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=o?e.end:e.start),e.right==null&&(e.right=o?e.start:e.end),e.bottom!=null&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),o&&tP()!=Bv.NORMAL?(e.left!=null&&(e.right=i.scrollWidth-i.clientWidth-e.left),tP()==Bv.INVERTED?e.left=e.right:tP()==Bv.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let i=this.elementRef.nativeElement;C$()?i.scrollTo(e):(e.top!=null&&(i.scrollTop=e.top),e.left!=null&&(i.scrollLeft=e.left))}measureScrollOffset(e){let i="left",o="right",r=this.elementRef.nativeElement;if(e=="top")return r.scrollTop;if(e=="bottom")return r.scrollHeight-r.clientHeight-r.scrollTop;let s=this.dir&&this.dir.value=="rtl";return e=="start"?e=s?o:i:e=="end"&&(e=s?i:o),s&&tP()==Bv.INVERTED?e==i?r.scrollWidth-r.clientWidth-r.scrollLeft:r.scrollLeft:s&&tP()==Bv.NEGATED?e==i?r.scrollLeft+r.scrollWidth-r.clientWidth:-r.scrollLeft:e==i?r.scrollLeft:r.scrollWidth-r.clientWidth-r.scrollLeft}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return t})(),NQe=20,zv=(()=>{class t{_platform=re(ba);_listeners;_viewportSize;_change=new hi;_document=re(Ao);constructor(){let e=re(_n),i=re(bc).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let o=r=>this._change.next(r);this._listeners=[i.listen("window","resize",o),i.listen("window","orientationchange",o)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:i,height:o}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+o,right:e.left+i,height:o,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,i=this._getWindow(),o=e.documentElement,r=o.getBoundingClientRect(),s=-r.top||e.body.scrollTop||i.scrollY||o.scrollTop||0,d=-r.left||e.body.scrollLeft||i.scrollX||o.scrollLeft||0;return{top:s,left:d}}change(e=NQe){return e>0?this._change.pipe(v7(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Vv=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})(),Pse=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[UI,Vv,UI,Vv]})}return t})();var Lse={},ul=(()=>{class t{_appId=re(eI);getId(e){return this._appId!=="ng"&&(e+=this._appId),Lse.hasOwnProperty(e)||(Lse[e]=0),`${e}${Lse[e]++}`}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var mIe=C$();function oP(t){return new x$(t.get(zv),t.get(Ao))}var x$=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(n,e){this._viewportRuler=n,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let n=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=n.style.left||"",this._previousHTMLStyles.top=n.style.top||"",n.style.left=Bu(-this._previousScrollPosition.left),n.style.top=Bu(-this._previousScrollPosition.top),n.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let n=this._document.documentElement,e=this._document.body,i=n.style,o=e.style,r=i.scrollBehavior||"",s=o.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,n.classList.remove("cdk-global-scrollblock"),mIe&&(i.scrollBehavior=o.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),mIe&&(i.scrollBehavior=r,o.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}};function CIe(t,n){return new w$(t.get(ZC),t.get(_n),t.get(zv),n)}var w$=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(n,e,i,o){this._scrollDispatcher=n,this._ngZone=e,this._viewportRuler=i,this._config=o}attach(n){this._overlayRef,this._overlayRef=n}enable(){if(this._scrollSubscription)return;let n=this._scrollDispatcher.scrolled(0).pipe(wn(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=n.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=n.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var x5=class{enable(){}disable(){}attach(){}};function Nse(t,n){return n.some(e=>{let i=t.bottome.bottom,r=t.righte.right;return i||o||r||s})}function fIe(t,n){return n.some(e=>{let i=t.tope.bottom,r=t.lefte.right;return i||o||r||s})}function a0(t,n){return new S$(t.get(ZC),t.get(zv),t.get(_n),n)}var S$=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(n,e,i,o){this._scrollDispatcher=n,this._viewportRuler=e,this._ngZone=i,this._config=o}attach(n){this._overlayRef,this._overlayRef=n}enable(){if(!this._scrollSubscription){let n=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(n).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:o}=this._viewportRuler.getViewportSize();Nse(e,[{width:i,height:o,bottom:o,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},xIe=(()=>{class t{_injector=re(Oo);constructor(){}noop=()=>new x5;close=e=>CIe(this._injector,e);block=()=>oP(this._injector);reposition=e=>a0(this._injector,e);static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Tw=class{positionStrategy;scrollStrategy=new x5;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(n){if(n){let e=Object.keys(n);for(let i of e)n[i]!==void 0&&(this[i]=n[i])}}};var T$=class{connectionPair;scrollableViewProperties;constructor(n,e){this.connectionPair=n,this.scrollableViewProperties=e}};var wIe=(()=>{class t{_attachedOverlays=[];_document=re(Ao);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),SIe=(()=>{class t extends wIe{_ngZone=re(_n);_renderer=re(bc).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let i=this._attachedOverlays;for(let o=i.length-1;o>-1;o--)if(i[o]._keydownEvents.observers.length>0){this._ngZone.run(()=>i[o]._keydownEvents.next(e));break}};static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),TIe=(()=>{class t extends wIe{_platform=re(ba);_ngZone=re(_n);_renderer=re(bc).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(e){if(super.add(e),!this._isAttached){let i=this._document.body,o={capture:!0},r=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[r.listen(i,"pointerdown",this._pointerDownListener,o),r.listen(i,"click",this._clickListener,o),r.listen(i,"auxclick",this._clickListener,o),r.listen(i,"contextmenu",this._clickListener,o)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=pp(e)};_clickListener=e=>{let i=pp(e),o=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:i;this._pointerDownEventTarget=null;let r=this._attachedOverlays.slice();for(let s=r.length-1;s>-1;s--){let d=r[s];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(gIe(d.overlayElement,i)||gIe(d.overlayElement,o))break;let m=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>m.next(e)):m.next(e)}};static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function gIe(t,n){let e=typeof ShadowRoot<"u"&&ShadowRoot,i=n;for(;i;){if(i===t)return!0;i=e&&i instanceof ShadowRoot?i.host:i.parentNode}return!1}var IIe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(i,o){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll} `],encapsulation:2,changeDetection:0})}return t})(),D$=(()=>{class t{_platform=re(ba);_containerElement;_document=re(Ao);_styleLoader=re(kl);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||Rse()){let o=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let r=0;r{let n=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(n,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),n.style.pointerEvents="none",n.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},iP=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new hi;_attachments=new hi;_detachments=new hi;_positionStrategy;_scrollStrategy;_locationChanges=Xr.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_previousHostParent;_keydownEvents=new hi;_outsidePointerEvents=new hi;_afterNextRenderRef;constructor(n,e,i,o,r,s,d,m,v,w=!1,O,N){this._portalOutlet=n,this._host=e,this._pane=i,this._config=o,this._ngZone=r,this._keyboardDispatcher=s,this._document=d,this._location=m,this._outsideClickDispatcher=v,this._animationsDisabled=w,this._injector=O,this._renderer=N,o.scrollStrategy&&(this._scrollStrategy=o.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=o.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(n){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(n);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Ou(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let n=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),n}dispose(){let n=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,n&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(n){n!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=n,this.hasAttached()&&(n.attach(this),this.updatePosition()))}updateSize(n){this._config=be(be({},this._config),n),this._updateElementSize()}setDirection(n){this._config=mt(be({},this._config),{direction:n}),this._updateElementDirection()}addPanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!0)}removePanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!1)}getDirection(){let n=this._config.direction;return n?typeof n=="string"?n:n.value:"ltr"}updateScrollStrategy(n){n!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=n,this.hasAttached()&&(n.attach(this),n.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let n=this._pane.style;n.width=Bu(this._config.width),n.height=Bu(this._config.height),n.minWidth=Bu(this._config.minWidth),n.minHeight=Bu(this._config.minHeight),n.maxWidth=Bu(this._config.maxWidth),n.maxHeight=Bu(this._config.maxHeight)}_togglePointerEvents(n){this._pane.style.pointerEvents=n?"":"none"}_attachBackdrop(){let n="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Bse(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(n))}):this._backdropRef.element.classList.add(n)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(n,e,i){let o=VI(e||[]).filter(r=>!!r);o.length&&(i?n.classList.add(...o):n.classList.remove(...o))}_detachContentWhenEmpty(){let n=!1;try{this._detachContentAfterRenderRef=Ou(()=>{n=!0,this._detachContent()},{injector:this._injector})}catch(e){if(n)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let n=this._scrollStrategy;n?.disable(),n?.detach?.()}},_Ie="cdk-overlay-connected-position-bounding-box",VQe=/([A-Za-z%]+)$/;function Yk(t,n){return new I$(n,t.get(zv),t.get(Ao),t.get(ba),t.get(D$))}var I$=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new hi;_resizeSubscription=Xr.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(n,e,i,o,r){this._viewportRuler=e,this._document=i,this._platform=o,this._overlayContainer=r,this.setOrigin(n)}attach(n){this._overlayRef&&this._overlayRef,this._validatePositions(),n.hostElement.classList.add(_Ie),this._overlayRef=n,this._boundingBox=n.hostElement,this._pane=n.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let n=this._originRect,e=this._overlayRect,i=this._viewportRect,o=this._containerRect,r=[],s;for(let d of this._preferredPositions){let m=this._getOriginPoint(n,o,d),v=this._getOverlayPoint(m,e,d),w=this._getOverlayFit(v,e,i,d);if(w.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(d,m);return}if(this._canFitWithFlexibleDimensions(w,v,i)){r.push({position:d,origin:m,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(m,d)});continue}(!s||s.overlayFit.visibleAream&&(m=w,d=v)}this._isPushed=!1,this._applyPosition(d.position,d.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Wk(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(_Ie),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let n=this._lastPosition;if(n){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,n);this._applyPosition(n,e)}else this.apply()}withScrollableContainers(n){return this._scrollables=n,this}withPositions(n){return this._preferredPositions=n,n.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(n){return this._viewportMargin=n,this}withFlexibleDimensions(n=!0){return this._hasFlexibleDimensions=n,this}withGrowAfterOpen(n=!0){return this._growAfterOpen=n,this}withPush(n=!0){return this._canPush=n,this}withLockedPosition(n=!0){return this._positionLocked=n,this}setOrigin(n){return this._origin=n,this}withDefaultOffsetX(n){return this._offsetX=n,this}withDefaultOffsetY(n){return this._offsetY=n,this}withTransformOriginOn(n){return this._transformOriginSelector=n,this}_getOriginPoint(n,e,i){let o;if(i.originX=="center")o=n.left+n.width/2;else{let s=this._isRtl()?n.right:n.left,d=this._isRtl()?n.left:n.right;o=i.originX=="start"?s:d}e.left<0&&(o-=e.left);let r;return i.originY=="center"?r=n.top+n.height/2:r=i.originY=="top"?n.top:n.bottom,e.top<0&&(r-=e.top),{x:o,y:r}}_getOverlayPoint(n,e,i){let o;i.overlayX=="center"?o=-e.width/2:i.overlayX==="start"?o=this._isRtl()?-e.width:0:o=this._isRtl()?0:-e.width;let r;return i.overlayY=="center"?r=-e.height/2:r=i.overlayY=="top"?0:-e.height,{x:n.x+o,y:n.y+r}}_getOverlayFit(n,e,i,o){let r=vIe(e),{x:s,y:d}=n,m=this._getOffset(o,"x"),v=this._getOffset(o,"y");m&&(s+=m),v&&(d+=v);let w=0-s,O=s+r.width-i.width,N=0-d,V=d+r.height-i.height,$=this._subtractOverflows(r.width,w,O),q=this._subtractOverflows(r.height,N,V),W=$*q;return{visibleArea:W,isCompletelyWithinViewport:r.width*r.height===W,fitsInViewportVertically:q===r.height,fitsInViewportHorizontally:$==r.width}}_canFitWithFlexibleDimensions(n,e,i){if(this._hasFlexibleDimensions){let o=i.bottom-e.y,r=i.right-e.x,s=yIe(this._overlayRef.getConfig().minHeight),d=yIe(this._overlayRef.getConfig().minWidth),m=n.fitsInViewportVertically||s!=null&&s<=o,v=n.fitsInViewportHorizontally||d!=null&&d<=r;return m&&v}return!1}_pushOverlayOnScreen(n,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:n.x+this._previousPushAmount.x,y:n.y+this._previousPushAmount.y};let o=vIe(e),r=this._viewportRect,s=Math.max(n.x+o.width-r.width,0),d=Math.max(n.y+o.height-r.height,0),m=Math.max(r.top-i.top-n.y,0),v=Math.max(r.left-i.left-n.x,0),w=0,O=0;return o.width<=r.width?w=v||-s:w=n.x$&&!this._isInitialRender&&!this._growAfterOpen&&(s=n.y-$/2)}let m=e.overlayX==="start"&&!o||e.overlayX==="end"&&o,v=e.overlayX==="end"&&!o||e.overlayX==="start"&&o,w,O,N;if(v)N=i.width-n.x+this._viewportMargin*2,w=n.x-this._viewportMargin;else if(m)O=n.x,w=i.right-n.x;else{let V=Math.min(i.right-n.x+i.left,n.x),$=this._lastBoundingBoxSize.width;w=V*2,O=n.x-V,w>$&&!this._isInitialRender&&!this._growAfterOpen&&(O=n.x-$/2)}return{top:s,left:O,bottom:d,right:N,width:w,height:r}}_setBoundingBoxStyles(n,e){let i=this._calculateBoundingBoxRect(n,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));let o={};if(this._hasExactPosition())o.top=o.left="0",o.bottom=o.right=o.maxHeight=o.maxWidth="",o.width=o.height="100%";else{let r=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;o.height=Bu(i.height),o.top=Bu(i.top),o.bottom=Bu(i.bottom),o.width=Bu(i.width),o.left=Bu(i.left),o.right=Bu(i.right),e.overlayX==="center"?o.alignItems="center":o.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?o.justifyContent="center":o.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",r&&(o.maxHeight=Bu(r)),s&&(o.maxWidth=Bu(s))}this._lastBoundingBoxSize=i,Wk(this._boundingBox.style,o)}_resetBoundingBoxStyles(){Wk(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Wk(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(n,e){let i={},o=this._hasExactPosition(),r=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(o){let w=this._viewportRuler.getViewportScrollPosition();Wk(i,this._getExactOverlayY(e,n,w)),Wk(i,this._getExactOverlayX(e,n,w))}else i.position="static";let d="",m=this._getOffset(e,"x"),v=this._getOffset(e,"y");m&&(d+=`translateX(${m}px) `),v&&(d+=`translateY(${v}px)`),i.transform=d.trim(),s.maxHeight&&(o?i.maxHeight=Bu(s.maxHeight):r&&(i.maxHeight="")),s.maxWidth&&(o?i.maxWidth=Bu(s.maxWidth):r&&(i.maxWidth="")),Wk(this._pane.style,i)}_getExactOverlayY(n,e,i){let o={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,n);if(this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,i)),n.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;o.bottom=`${s-(r.y+this._overlayRect.height)}px`}else o.top=Bu(r.y);return o}_getExactOverlayX(n,e,i){let o={left:"",right:""},r=this._getOverlayPoint(e,this._overlayRect,n);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,i));let s;if(this._isRtl()?s=n.overlayX==="end"?"left":"right":s=n.overlayX==="end"?"right":"left",s==="right"){let d=this._document.documentElement.clientWidth;o.right=`${d-(r.x+this._overlayRect.width)}px`}else o.left=Bu(r.x);return o}_getScrollVisibility(){let n=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(o=>o.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:fIe(n,i),isOriginOutsideView:Nse(n,i),isOverlayClipped:fIe(e,i),isOverlayOutsideView:Nse(e,i)}}_subtractOverflows(n,...e){return e.reduce((i,o)=>i-Math.max(o,0),n)}_getNarrowedViewportRect(){let n=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+n-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:n-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(n,e){return e==="x"?n.offsetX==null?this._offsetX:n.offsetX:n.offsetY==null?this._offsetY:n.offsetY}_validatePositions(){}_addPanelClasses(n){this._pane&&VI(n).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(n=>{this._pane.classList.remove(n)}),this._appliedPanelClasses=[])}_getOriginRect(){let n=this._origin;if(n instanceof Bn)return n.nativeElement.getBoundingClientRect();if(n instanceof Element)return n.getBoundingClientRect();let e=n.width||0,i=n.height||0;return{top:n.y,bottom:n.y+i,left:n.x,right:n.x+e,height:i,width:e}}};function Wk(t,n){for(let e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}function yIe(t){if(typeof t!="number"&&t!=null){let[n,e]=t.split(VQe);return!e||e==="px"?parseFloat(n):null}return t||null}function vIe(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function zQe(t,n){return t===n?!0:t.isOriginClipped===n.isOriginClipped&&t.isOriginOutsideView===n.isOriginOutsideView&&t.isOverlayClipped===n.isOverlayClipped&&t.isOverlayOutsideView===n.isOverlayOutsideView}var bIe="cdk-global-overlay-wrapper";function rP(t){return new E$}var E$=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(n){let e=n.getConfig();this._overlayRef=n,this._width&&!e.width&&n.updateSize({width:this._width}),this._height&&!e.height&&n.updateSize({height:this._height}),n.hostElement.classList.add(bIe),this._isDisposed=!1}top(n=""){return this._bottomOffset="",this._topOffset=n,this._alignItems="flex-start",this}left(n=""){return this._xOffset=n,this._xPosition="left",this}bottom(n=""){return this._topOffset="",this._bottomOffset=n,this._alignItems="flex-end",this}right(n=""){return this._xOffset=n,this._xPosition="right",this}start(n=""){return this._xOffset=n,this._xPosition="start",this}end(n=""){return this._xOffset=n,this._xPosition="end",this}width(n=""){return this._overlayRef?this._overlayRef.updateSize({width:n}):this._width=n,this}height(n=""){return this._overlayRef?this._overlayRef.updateSize({height:n}):this._height=n,this}centerHorizontally(n=""){return this.left(n),this._xPosition="center",this}centerVertically(n=""){return this.top(n),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let n=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:o,height:r,maxWidth:s,maxHeight:d}=i,m=(o==="100%"||o==="100vw")&&(!s||s==="100%"||s==="100vw"),v=(r==="100%"||r==="100vh")&&(!d||d==="100%"||d==="100vh"),w=this._xPosition,O=this._xOffset,N=this._overlayRef.getConfig().direction==="rtl",V="",$="",q="";m?q="flex-start":w==="center"?(q="center",N?$=O:V=O):N?w==="left"||w==="end"?(q="flex-end",V=O):(w==="right"||w==="start")&&(q="flex-start",$=O):w==="left"||w==="start"?(q="flex-start",V=O):(w==="right"||w==="end")&&(q="flex-end",$=O),n.position=this._cssPosition,n.marginLeft=m?"0":V,n.marginTop=v?"0":this._topOffset,n.marginBottom=this._bottomOffset,n.marginRight=m?"0":$,e.justifyContent=q,e.alignItems=v?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let n=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(bIe),i.justifyContent=i.alignItems=n.marginTop=n.marginBottom=n.marginLeft=n.marginRight=n.position="",this._overlayRef=null,this._isDisposed=!0}},EIe=(()=>{class t{_injector=re(Oo);constructor(){}global(){return rP()}flexibleConnectedTo(e){return Yk(this._injector,e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ew(t,n){t.get(kl).load(IIe);let e=t.get(D$),i=t.get(Ao),o=t.get(ul),r=t.get(Rp),s=t.get(ad),d=i.createElement("div"),m=i.createElement("div");m.id=o.getId("cdk-overlay-"),m.classList.add("cdk-overlay-pane"),d.appendChild(m),e.getContainerElement().appendChild(d);let v=new y5(m,r,t),w=new Tw(n),O=t.get(Ps,null,{optional:!0})||t.get(bc).createRenderer(null,null);return w.direction=w.direction||s.value,new iP(v,d,m,w,t.get(_n),t.get(SIe),i,t.get(Vm),t.get(TIe),n?.disableAnimations??t.get(tI,null,{optional:!0})==="NoopAnimations",t.get(Uc),O)}var DIe=(()=>{class t{scrollStrategies=re(xIe);_positionBuilder=re(EIe);_injector=re(Oo);constructor(){}create(e){return Ew(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),UQe=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],AIe=new fi("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Oo);return()=>a0(t)}}),nP=(()=>{class t{elementRef=re(Bn);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return t})(),A$=(()=>{class t{_dir=re(ad,{optional:!0});_injector=re(Oo);_overlayRef;_templatePortal;_backdropSubscription=Xr.EMPTY;_attachSubscription=Xr.EMPTY;_detachSubscription=Xr.EMPTY;_positionSubscription=Xr.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=re(AIe);_disposeOnNavigation=!1;_ngZone=re(_n);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(e){this._disposeOnNavigation=e}backdropClick=new ve;positionChange=new ve;attach=new ve;detach=new ve;overlayKeydown=new ve;overlayOutsideClick=new ve;constructor(){let e=re(jc),i=re(nc);this._templatePortal=new Nv(e,i),this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=UQe);let e=this._overlayRef=Ew(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),i.keyCode===27&&!this.disableClose&&!pu(i)&&(i.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{let o=this._getOriginElement(),r=pp(i);(!o||o!==r&&!o.contains(r))&&this.overlayOutsideClick.next(i)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new Tw({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(i.width=this.width),(this.height||this.height===0)&&(i.height=this.height),(this.minWidth||this.minWidth===0)&&(i.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){let i=this.positions.map(o=>({originX:o.originX,originY:o.originY,overlayX:o.overlayX,overlayY:o.overlayY,offsetX:o.offsetX||this.offsetX,offsetY:o.offsetY||this.offsetY,panelClass:o.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let e=Yk(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof nP?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof nP?this.origin.elementRef.nativeElement:this.origin instanceof Bn?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(wB(()=>this.positionChange.observers.length>0)).subscribe(e=>{this._ngZone.run(()=>this.positionChange.emit(e)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",je],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",je],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",je],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",je],push:[2,"cdkConnectedOverlayPush","push",je],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",je]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[Ot]})}return t})();function HQe(t){let n=re(Oo);return()=>a0(n)}var jQe={provide:AIe,useFactory:HQe},Uv=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[DIe,jQe],imports:[UI,Wg,Pse,Pse]})}return t})();function GQe(t,n){}var HI=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext};var zse=(()=>{class t extends JF{_elementRef=re(Bn);_focusTrapFactory=re(Mse);_config;_interactivityChecker=re(kse);_ngZone=re(_n);_focusMonitor=re(gh);_renderer=re(Ps);_changeDetectorRef=re(Gi);_injector=re(Oo);_platform=re(ba);_document=re(Ao);_portalOutlet;_focusTrapped=new hi;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=re(HI,{optional:!0})||new HI,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let i=this._ariaLabelledByQueue.indexOf(e);i>-1&&(this._ariaLabelledByQueue.splice(i,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}attachDomPortal=e=>{this._portalOutlet.hasAttached();let i=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),i};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{r(),s(),e.removeAttribute("tabindex")},r=this._renderer.listen(e,"blur",o),s=this._renderer.listen(e,"mousedown",o)})),e.focus(i)}_focusByCssSelector(e,i){let o=this._elementRef.nativeElement.querySelector(e);o&&this._forceFocus(o,i)}_trapFocus(e){this._isDestroyed||Ou(()=>{let i=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||i.focus(e);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,i=null;if(typeof e=="string"?i=this._document.querySelector(e):typeof e=="boolean"?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&typeof i.focus=="function"){let o=LI(),r=this._elementRef.nativeElement;(!o||o===this._document.body||o===r||r.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,i=LI();return e===i||e.contains(i)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=LI()))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(i,o){if(i&1&&Ri(r0,7),i&2){let r;Le(r=Ne())&&(o._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(i,o){i&2&&Ge("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},features:[ft],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,o){i&1&&ee(0,GQe,0,0,"ng-template",0)},dependencies:[r0],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit} `],encapsulation:2})}return t})(),w5=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new hi;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(n,e){this.overlayRef=n,this.config=e,this.disableClose=e.disableClose,this.backdropClick=n.backdropClick(),this.keydownEvents=n.keydownEvents(),this.outsidePointerEvents=n.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{i.keyCode===27&&!this.disableClose&&!pu(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=n.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(n,e){if(this._canClose(n)){let i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(n),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(n="",e=""){return this.overlayRef.updateSize({width:n,height:e}),this}addPanelClass(n){return this.overlayRef.addPanelClass(n),this}removePanelClass(n){return this.overlayRef.removePanelClass(n),this}_canClose(n){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(n,e,this.componentInstance))}},$Qe=new fi("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=re(Oo);return()=>oP(t)}}),qQe=new fi("DialogData"),KQe=new fi("DefaultDialogConfig");function WQe(t){let n=Zn(t),e=new ve;return{valueSignal:n,get value(){return n()},change:e,ngOnDestroy(){e.complete()}}}var Use=(()=>{class t{_injector=re(Oo);_defaultOptions=re(KQe,{optional:!0});_parentDialog=re(t,{optional:!0,skipSelf:!0});_overlayContainer=re(D$);_idGenerator=re(ul);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new hi;_afterOpenedAtThisLevel=new hi;_ariaHiddenElements=new Map;_scrollStrategy=re($Qe);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=fv(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(rl(void 0)));constructor(){}open(e,i){let o=this._defaultOptions||new HI;i=be(be({},o),i),i.id=i.id||this._idGenerator.getId("cdk-dialog-"),i.id&&this.getDialogById(i.id);let r=this._getOverlayConfig(i),s=Ew(this._injector,r),d=new w5(s,i),m=this._attachContainer(s,d,i);if(d.containerInstance=m,!this.openDialogs.length){let v=this._overlayContainer.getContainerElement();m._focusTrapped?m._focusTrapped.pipe(Sn(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(v)}):this._hideNonDialogContentFromAssistiveTechnology(v)}return this._attachDialogContent(e,d,m,i),this.openDialogs.push(d),d.closed.subscribe(()=>this._removeOpenDialog(d,!0)),this.afterOpened.next(d),d}closeAll(){Vse(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){Vse(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),Vse(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let i=new Tw({positionStrategy:e.positionStrategy||rP().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation,disableAnimations:e.disableAnimations});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,o){let r=o.injector||o.viewContainerRef?.injector,s=[{provide:HI,useValue:o},{provide:w5,useValue:i},{provide:iP,useValue:e}],d;o.container?typeof o.container=="function"?d=o.container:(d=o.container.type,s.push(...o.container.providers(o))):d=zse;let m=new tg(d,o.viewContainerRef,Oo.create({parent:r||this._injector,providers:s}));return e.attach(m).instance}_attachDialogContent(e,i,o,r){if(e instanceof jc){let s=this._createInjector(r,i,o,void 0),d={$implicit:r.data,dialogRef:i};r.templateContext&&(d=be(be({},d),typeof r.templateContext=="function"?r.templateContext():r.templateContext)),o.attachTemplatePortal(new Nv(e,null,d,s))}else{let s=this._createInjector(r,i,o,this._injector),d=o.attachComponentPortal(new tg(e,r.viewContainerRef,s));i.componentRef=d,i.componentInstance=d.instance}}_createInjector(e,i,o,r){let s=e.injector||e.viewContainerRef?.injector,d=[{provide:qQe,useValue:e.data},{provide:w5,useValue:i}];return e.providers&&(typeof e.providers=="function"?d.push(...e.providers(i,e,o)):d.push(...e.providers)),e.direction&&(!s||!s.get(ad,null,{optional:!0}))&&d.push({provide:ad,useValue:WQe(e.direction)}),Oo.create({parent:s||r,providers:d})}_removeOpenDialog(e,i){let o=this.openDialogs.indexOf(e);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((r,s)=>{r?s.setAttribute("aria-hidden",r):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let i=e.parentElement.children;for(let o=i.length-1;o>-1;o--){let r=i[o];r!==e&&r.nodeName!=="SCRIPT"&&r.nodeName!=="STYLE"&&!r.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Vse(t,n){let e=t.length;for(;e--;)n(t[e])}var kIe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[Use],imports:[Uv,Wg,C5,Wg]})}return t})();function _h(t){return t!=null&&`${t}`!="false"}var tm={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var YQe=new fi("MATERIAL_ANIMATIONS");var MIe=null;function T5(){return re(YQe,{optional:!0})?.animationsDisabled||re(tI,{optional:!0})==="NoopAnimations"?"di-disabled":(MIe??=re(y$).matchMedia("(prefers-reduced-motion)").matches,MIe?"reduced-motion":"enabled")}function Cl(){return T5()!=="enabled"}var QQe=200,k$=class{_letterKeyStream=new hi;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new hi;selectedItem=this._selectedItem;constructor(n,e){let i=typeof e?.debounceInterval=="number"?e.debounceInterval:QQe;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(n),this._setupKeyHandler(i)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(n){this._selectedItemIndex=n}setItems(n){this._items=n}handleKey(n){let e=n.keyCode;n.key&&n.key.length===1?this._letterKeyStream.next(n.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(n){this._letterKeyStream.pipe(Vo(e=>this._pressedLetters.push(e)),id(n),wn(()=>this._pressedLetters.length>0),vt(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let i=1;in.disabled;constructor(n,e){this._items=n,n instanceof Hg?this._itemChangesSubscription=n.changes.subscribe(i=>this._itemsChanged(i.toArray())):TC(n)&&(this._effectRef=od(()=>this._itemsChanged(n()),{injector:e}))}tabOut=new hi;change=new hi;skipPredicate(n){return this._skipPredicateFn=n,this}withWrap(n=!0){return this._wrap=n,this}withVerticalOrientation(n=!0){return this._vertical=n,this}withHorizontalOrientation(n){return this._horizontal=n,this}withAllowedModifierKeys(n){return this._allowedModifierKeys=n,this}withTypeAhead(n=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new k$(e,{debounceInterval:typeof n=="number"?n:void 0,skipPredicate:i=>this._skipPredicateFn(i)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(i=>{this.setActiveItem(i)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(n=!0){return this._homeAndEnd=n,this}withPageUpDown(n=!0,e=10){return this._pageUpAndDown={enabled:n,delta:e},this}setActiveItem(n){let e=this._activeItem();this.updateActiveItem(n),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(n){let e=n.keyCode,o=["altKey","ctrlKey","metaKey","shiftKey"].every(r=>!n[r]||this._allowedModifierKeys.indexOf(r)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&o){this.setNextItemActive();break}else return;case 38:if(this._vertical&&o){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&o){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&o){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&o){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&o){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&o){let r=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(r>0?r:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&o){let r=this._activeItemIndex()+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(r-1&&i!==this._activeItemIndex()&&(this._activeItemIndex.set(i),this._typeahead?.setCurrentSelectedItemIndex(i))}}};var I5=class extends sP{setActiveItem(n){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(n),this.activeItem&&this.activeItem.setActiveStyles()}};var e2=class extends sP{_origin="program";setFocusOrigin(n){return this._origin=n,this}setActiveItem(n){super.setActiveItem(n),this.activeItem&&this.activeItem.focus(this._origin)}};var FIe=" ";function Gse(t,n,e){let i=O$(t,n);e=e.trim(),!i.some(o=>o.trim()===e)&&(i.push(e),t.setAttribute(n,i.join(FIe)))}function R$(t,n,e){let i=O$(t,n);e=e.trim();let o=i.filter(r=>r!==e);o.length?t.setAttribute(n,o.join(FIe)):t.removeAttribute(n)}function O$(t,n){return t.getAttribute(n)?.match(/\S+/g)??[]}var PIe="cdk-describedby-message",M$="cdk-describedby-host",jse=0,LIe=(()=>{class t{_platform=re(ba);_document=re(Ao);_messageRegistry=new Map;_messagesContainer=null;_id=`${jse++}`;constructor(){re(kl).load(BI),this._id=re(eI)+"-"+jse++}describe(e,i,o){if(!this._canBeDescribed(e,i))return;let r=Hse(i,o);typeof i!="string"?(RIe(i,this._id),this._messageRegistry.set(r,{messageElement:i,referenceCount:0})):this._messageRegistry.has(r)||this._createMessageElement(i,o),this._isElementDescribedByMessage(e,r)||this._addMessageReference(e,r)}removeDescription(e,i,o){if(!i||!this._isElementNode(e))return;let r=Hse(i,o);if(this._isElementDescribedByMessage(e,r)&&this._removeMessageReference(e,r),typeof i=="string"){let s=this._messageRegistry.get(r);s&&s.referenceCount===0&&this._deleteMessageElement(r)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${M$}="${this._id}"]`);for(let i=0;io.indexOf(PIe)!=0);e.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(e,i){let o=this._messageRegistry.get(i);Gse(e,"aria-describedby",o.messageElement.id),e.setAttribute(M$,this._id),o.referenceCount++}_removeMessageReference(e,i){let o=this._messageRegistry.get(i);o.referenceCount--,R$(e,"aria-describedby",o.messageElement.id),e.removeAttribute(M$)}_isElementDescribedByMessage(e,i){let o=O$(e,"aria-describedby"),r=this._messageRegistry.get(i),s=r&&r.messageElement.id;return!!s&&o.indexOf(s)!=-1}_canBeDescribed(e,i){if(!this._isElementNode(e))return!1;if(i&&typeof i=="object")return!0;let o=i==null?"":`${i}`.trim(),r=e.getAttribute("aria-label");return o?!r||r.trim()!==o:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Hse(t,n){return typeof t=="string"?`${n||""}/${t}`:t}function RIe(t,n){t.id||(t.id=`${PIe}-${n}-${jse++}`)}var Br=(()=>{class t{constructor(){re(v$)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[UI,UI]})}return t})();function ZQe(t,n){}var t2=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;enterAnimationDuration;exitAnimationDuration},$se="mdc-dialog--open",NIe="mdc-dialog--opening",BIe="mdc-dialog--closing",XQe=150,JQe=75,UIe=(()=>{class t extends zse{_animationStateChanged=new ve;_animationsEnabled=!Cl();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?zIe(this._config.enterAnimationDuration)??XQe:0;_exitAnimationDuration=this._animationsEnabled?zIe(this._config.exitAnimationDuration)??JQe:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(VIe,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(NIe,$se)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add($se),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove($se),this._animationsEnabled?(this._hostElement.style.setProperty(VIe,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(BIe)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(NIe,BIe)}_waitForAnimationToComplete(e,i){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let i=super.attachComponentPortal(e);return i.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),i}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(i,o){i&2&&(Rr("id",o._config.id),Ge("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),Vn("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},features:[ft],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1),ee(2,ZQe,0,0,"ng-template",2),D()())},dependencies:[r0],styles:[`.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mat-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mat-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mat-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mat-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mat-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mat-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mat-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mat-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;box-sizing:border-box;min-height:52px;margin:0;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents} `],encapsulation:2})}return t})(),VIe="--mat-dialog-transition-duration";function zIe(t){return t==null?null:typeof t=="number"?t:t.endsWith("ms")?jm(t.substring(0,t.length-2)):t.endsWith("s")?jm(t.substring(0,t.length-1))*1e3:t==="0"?0:null}var E5=(function(t){return t[t.OPEN=0]="OPEN",t[t.CLOSING=1]="CLOSING",t[t.CLOSED=2]="CLOSED",t})(E5||{}),oy=class{_ref;_config;_containerInstance;componentInstance;componentRef;disableClose;id;_afterOpened=new hi;_beforeClosed=new hi;_result;_closeFallbackTimeout;_state=E5.OPEN;_closeInteractionType;constructor(n,e,i){this._ref=n,this._config=e,this._containerInstance=i,this.disableClose=e.disableClose,this.id=n.id,n.addPanelClass("mat-mdc-dialog-panel"),i._animationStateChanged.pipe(wn(o=>o.state==="opened"),Sn(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(wn(o=>o.state==="closed"),Sn(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),n.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),ku(this.backdropClick(),this.keydownEvents().pipe(wn(o=>o.keyCode===27&&!this.disableClose&&!pu(o)))).subscribe(o=>{this.disableClose||(o.preventDefault(),qse(this,o.type==="keydown"?"keyboard":"mouse"))})}close(n){let e=this._config.closePredicate;e&&!e(n,this._config,this.componentInstance)||(this._result=n,this._containerInstance._animationStateChanged.pipe(wn(i=>i.state==="closing"),Sn(1)).subscribe(i=>{this._beforeClosed.next(n),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),i.totalTime+100)}),this._state=E5.CLOSING,this._containerInstance._startExitAnimation())}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(n){let e=this._ref.config.positionStrategy;return n&&(n.left||n.right)?n.left?e.left(n.left):e.right(n.right):e.centerHorizontally(),n&&(n.top||n.bottom)?n.top?e.top(n.top):e.bottom(n.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(n="",e=""){return this._ref.updateSize(n,e),this}addPanelClass(n){return this._ref.addPanelClass(n),this}removePanelClass(n){return this._ref.removePanelClass(n),this}getState(){return this._state}_finishDialogClose(){this._state=E5.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function qse(t,n,e){return t._closeInteractionType=n,t.close(e)}var XC=new fi("MatMdcDialogData"),HIe=new fi("mat-mdc-dialog-default-options"),jIe=new fi("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Oo);return()=>oP(t)}}),Yg=(()=>{class t{_defaultOptions=re(HIe,{optional:!0});_scrollStrategy=re(jIe);_parentDialog=re(t,{optional:!0,skipSelf:!0});_idGenerator=re(ul);_injector=re(Oo);_dialog=re(Use);_animationsDisabled=Cl();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new hi;_afterOpenedAtThisLevel=new hi;dialogConfigClass=t2;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=fv(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(rl(void 0)));constructor(){this._dialogRefConstructor=oy,this._dialogContainerType=UIe,this._dialogDataToken=XC}open(e,i){let o;i=be(be({},this._defaultOptions||new t2),i),i.id=i.id||this._idGenerator.getId("mat-mdc-dialog-"),i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();let r=this._dialog.open(e,mt(be({},i),{positionStrategy:rP(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||i.enterAnimationDuration?.toLocaleString()==="0"||i.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:HI,useValue:i}]},templateContext:()=>({dialogRef:o}),providers:(s,d,m)=>(o=new this._dialogRefConstructor(s,i,m),o.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:m},{provide:this._dialogDataToken,useValue:d.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=r.componentRef,o.componentInstance=r.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(o);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Dw=(()=>{class t{dialogRef=re(oy,{optional:!0});_elementRef=re(Bn);_dialog=re(Yg);ariaLabel;type="button";dialogResult;_matDialogClose;constructor(){}ngOnInit(){this.dialogRef||(this.dialogRef=$Ie(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let i=e._matDialogClose||e._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(e){qse(this.dialogRef,e.screenX===0&&e.screenY===0?"keyboard":"mouse",this.dialogResult)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(i,o){i&1&&ie("click",function(s){return o._onButtonClick(s)}),i&2&&Ge("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[Ot]})}return t})(),GIe=(()=>{class t{_dialogRef=re(oy,{optional:!0});_elementRef=re(Bn);_dialog=re(Yg);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=$Ie(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t})}return t})(),Aw=(()=>{class t extends GIe{id=re(ul).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(i,o){i&2&&Rr("id",o.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[ft]})}return t})(),Hv=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[X1([Fse])]})}return t})(),jv=(()=>{class t extends GIe{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(i,o){i&2&&Vn("mat-mdc-dialog-actions-align-start",o.align==="start")("mat-mdc-dialog-actions-align-center",o.align==="center")("mat-mdc-dialog-actions-align-end",o.align==="end")},inputs:{align:"align"},features:[ft]})}return t})();function $Ie(t,n){let e=t.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?n.find(i=>i.id===e.id):null}var Kse=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[Yg],imports:[kIe,Uv,Wg,Br,Br]})}return t})();var F$=class{static getResponsiveConfig(){let n=new t2;return n.maxHeight="80vh",n.width=n.maxWidth="100%",n.height=n.maxHeight="100%",n.panelClass=["mat-dialog-container-fullscreen"],n}};var kw=(()=>{class t{constructor(e){this._breakpointObserver=e,this._destroyed=new hi}config(){return this._breakpointObserver.isMatched([tm.XSmall])?F$.getResponsiveConfig():{width:"80vw",maxHeight:"80vh"}}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(i){return new(i||t)(di(s0))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var P$=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=_i({providers:[kw]})}}return t})();var L$=class{constructor(n,e,i){this.dialogTitle=n,this.dialogMessage=e,this.dialogSubmitButtonText=i}};var aP,qIe=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Wse(){if(aP)return aP;if(typeof document!="object"||!document)return aP=new Set(qIe),aP;let t=document.createElement("input");return aP=new Set(qIe.filter(n=>(t.setAttribute("type",n),t.type===n))),aP}var ig=(function(t){return t[t.FADING_IN=0]="FADING_IN",t[t.VISIBLE=1]="VISIBLE",t[t.FADING_OUT=2]="FADING_OUT",t[t.HIDDEN=3]="HIDDEN",t})(ig||{}),Yse=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=ig.HIDDEN;constructor(n,e,i,o=!1){this._renderer=n,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=o}fadeOut(){this._renderer.fadeOutRipple(this)}},KIe=NI({passive:!0,capture:!0}),Qse=class{_events=new Map;addHandler(n,e,i,o){let r=this._events.get(e);if(r){let s=r.get(i);s?s.add(o):r.set(i,new Set([o]))}else this._events.set(e,new Map([[i,new Set([o])]])),n.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,KIe)})}removeHandler(n,e,i){let o=this._events.get(n);if(!o)return;let r=o.get(e);r&&(r.delete(i),r.size===0&&o.delete(e),o.size===0&&(this._events.delete(n),document.removeEventListener(n,this._delegateEventHandler,KIe)))}_delegateEventHandler=n=>{let e=pp(n);e&&this._events.get(n.type)?.forEach((i,o)=>{(o===e||o.contains(e))&&i.forEach(r=>r.handleEvent(n))})}},D5={enterDuration:225,exitDuration:150},eZe=800,WIe=NI({passive:!0,capture:!0}),YIe=["mousedown","touchstart"],QIe=["mouseup","mouseleave","touchend","touchcancel"],tZe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(i,o){},styles:[`.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none} `],encapsulation:2,changeDetection:0})}return t})(),i2=class t{_target;_ngZone;_platform;_containerElement;_triggerElement;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect;static _eventManager=new Qse;constructor(n,e,i,o,r){this._target=n,this._ngZone=e,this._platform=o,o.isBrowser&&(this._containerElement=Rd(i)),r&&r.get(kl).load(tZe)}fadeInRipple(n,e,i={}){let o=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),r=be(be({},D5),i.animation);i.centered&&(n=o.left+o.width/2,e=o.top+o.height/2);let s=i.radius||iZe(n,e,o),d=n-o.left,m=e-o.top,v=r.enterDuration,w=document.createElement("div");w.classList.add("mat-ripple-element"),w.style.left=`${d-s}px`,w.style.top=`${m-s}px`,w.style.height=`${s*2}px`,w.style.width=`${s*2}px`,i.color!=null&&(w.style.backgroundColor=i.color),w.style.transitionDuration=`${v}ms`,this._containerElement.appendChild(w);let O=window.getComputedStyle(w),N=O.transitionProperty,V=O.transitionDuration,$=N==="none"||V==="0s"||V==="0s, 0s"||o.width===0&&o.height===0,q=new Yse(this,w,i,$);w.style.transform="scale3d(1, 1, 1)",q.state=ig.FADING_IN,i.persistent||(this._mostRecentTransientRipple=q);let W=null;return!$&&(v||r.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let te=()=>{W&&(W.fallbackTimer=null),clearTimeout(xe),this._finishRippleTransition(q)},fe=()=>this._destroyRipple(q),xe=setTimeout(fe,v+100);w.addEventListener("transitionend",te),w.addEventListener("transitioncancel",fe),W={onTransitionEnd:te,onTransitionCancel:fe,fallbackTimer:xe}}),this._activeRipples.set(q,W),($||!v)&&this._finishRippleTransition(q),q}fadeOutRipple(n){if(n.state===ig.FADING_OUT||n.state===ig.HIDDEN)return;let e=n.element,i=be(be({},D5),n.config.animation);e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",n.state=ig.FADING_OUT,(n._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(n)}fadeOutAll(){this._getActiveRipples().forEach(n=>n.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(n=>{n.config.persistent||n.fadeOut()})}setupTriggerEvents(n){let e=Rd(n);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,YIe.forEach(i=>{t._eventManager.addHandler(this._ngZone,i,e,this)}))}handleEvent(n){n.type==="mousedown"?this._onMousedown(n):n.type==="touchstart"?this._onTouchStart(n):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{QIe.forEach(e=>{this._triggerElement.addEventListener(e,this,WIe)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(n){n.state===ig.FADING_IN?this._startFadeOutTransition(n):n.state===ig.FADING_OUT&&this._destroyRipple(n)}_startFadeOutTransition(n){let e=n===this._mostRecentTransientRipple,{persistent:i}=n.config;n.state=ig.VISIBLE,!i&&(!e||!this._isPointerDown)&&n.fadeOut()}_destroyRipple(n){let e=this._activeRipples.get(n)??null;this._activeRipples.delete(n),this._activeRipples.size||(this._containerRect=null),n===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),n.state=ig.HIDDEN,e!==null&&(n.element.removeEventListener("transitionend",e.onTransitionEnd),n.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),n.element.remove()}_onMousedown(n){let e=ww(n),i=this._lastTouchStartEvent&&Date.now(){let e=n.state===ig.VISIBLE||n.config.terminateOnPointerUp&&n.state===ig.FADING_IN;!n.config.persistent&&e&&n.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let n=this._triggerElement;n&&(YIe.forEach(e=>t._eventManager.removeHandler(e,n,this)),this._pointerUpEventsRegistered&&(QIe.forEach(e=>n.removeEventListener(e,this,WIe)),this._pointerUpEventsRegistered=!1))}};function iZe(t,n,e){let i=Math.max(Math.abs(t-e.left),Math.abs(t-e.right)),o=Math.max(Math.abs(n-e.top),Math.abs(n-e.bottom));return Math.sqrt(i*i+o*o)}var n2=new fi("mat-ripple-global-options"),im=(()=>{class t{_elementRef=re(Bn);_animationsDisabled=Cl();color;unbounded;centered;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=re(_n),i=re(ba),o=re(n2,{optional:!0}),r=re(Oo);this._globalOptions=o||{},this._rippleRenderer=new i2(this,e,this._elementRef,i,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:be(be(be({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,o){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,i,be(be({},this.rippleConfig),o)):this._rippleRenderer.fadeInRipple(0,0,be(be({},this.rippleConfig),e))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(i,o){i&2&&Vn("mat-ripple-unbounded",o.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return t})();var nZe={capture:!0},oZe=["focus","mousedown","mouseenter","touchstart"],Zse="mat-ripple-loader-uninitialized",Xse="mat-ripple-loader-class-name",ZIe="mat-ripple-loader-centered",N$="mat-ripple-loader-disabled",XIe=(()=>{class t{_document=re(Ao);_animationsDisabled=Cl();_globalRippleOptions=re(n2,{optional:!0});_platform=re(ba);_ngZone=re(_n);_injector=re(Oo);_eventCleanups;_hosts=new Map;constructor(){let e=re(bc).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>oZe.map(i=>e.listen(this._document,i,this._onInteraction,nZe)))}ngOnDestroy(){let e=this._hosts.keys();for(let i of e)this.destroyRipple(i);this._eventCleanups.forEach(i=>i())}configureRipple(e,i){e.setAttribute(Zse,this._globalRippleOptions?.namespace??""),(i.className||!e.hasAttribute(Xse))&&e.setAttribute(Xse,i.className||""),i.centered&&e.setAttribute(ZIe,""),i.disabled&&e.setAttribute(N$,"")}setDisabled(e,i){let o=this._hosts.get(e);o?(o.target.rippleDisabled=i,!i&&!o.hasSetUpEvents&&(o.hasSetUpEvents=!0,o.renderer.setupTriggerEvents(e))):i?e.setAttribute(N$,""):e.removeAttribute(N$)}_onInteraction=e=>{let i=pp(e);if(i instanceof HTMLElement){let o=i.closest(`[${Zse}="${this._globalRippleOptions?.namespace??""}"]`);o&&this._createRipple(o)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let i=this._document.createElement("span");i.classList.add("mat-ripple",e.getAttribute(Xse)),e.append(i);let o=this._globalRippleOptions,r=this._animationsDisabled?0:o?.animation?.enterDuration??D5.enterDuration,s=this._animationsDisabled?0:o?.animation?.exitDuration??D5.exitDuration,d={rippleDisabled:this._animationsDisabled||o?.disabled||e.hasAttribute(N$),rippleConfig:{centered:e.hasAttribute(ZIe),terminateOnPointerUp:o?.terminateOnPointerUp,animation:{enterDuration:r,exitDuration:s}}},m=new i2(d,this._ngZone,i,this._platform,this._injector),v=!d.rippleDisabled;v&&m.setupTriggerEvents(e),this._hosts.set(e,{target:d,renderer:m,hasSetUpEvents:v}),e.removeAttribute(Zse)}destroyRipple(e){let i=this._hosts.get(e);i&&(i.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hp=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["structural-styles"]],decls:0,vars:0,template:function(i,o){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}} `],encapsulation:2,changeDetection:0})}return t})();var rZe=["mat-icon-button",""],sZe=["*"],aZe=new fi("MAT_BUTTON_CONFIG");function JIe(t){return t==null?void 0:ln(t)}var Jse=(()=>{class t{_elementRef=re(Bn);_ngZone=re(_n);_animationsDisabled=Cl();_config=re(aZe,{optional:!0});_focusMonitor=re(gh);_cleanupClick;_renderer=re(Ps);_rippleLoader=re(XIe);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(e){this.tabIndex=e}constructor(){re(kl).load(hp);let e=this._elementRef.nativeElement;this._isAnchor=e.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(e,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",i){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,i):this._elementRef.nativeElement.focus(i)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(i,o){i&2&&(Ge("disabled",o._getDisabledAttribute())("aria-disabled",o._getAriaDisabled())("tabindex",o._getTabIndex()),Oe(o.color?"mat-"+o.color:""),Vn("mat-mdc-button-disabled",o.disabled)("mat-mdc-button-disabled-interactive",o.disabledInteractive)("mat-unthemed",!o.color)("_mat-animation-noopable",o._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",je],disabled:[2,"disabled","disabled",je],ariaDisabled:[2,"aria-disabled","ariaDisabled",je],disabledInteractive:[2,"disabledInteractive","disabledInteractive",je],tabIndex:[2,"tabIndex","tabIndex",JIe],_tabindex:[2,"tabindex","_tabindex",JIe]}})}return t})(),xl=(()=>{class t extends Jse{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[ft],attrs:rZe,ngContentSelectors:sZe,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(i,o){i&1&&(Nn(),to(0,"span",0),pn(1),to(2,"span",1)(3,"span",2))},styles:[`.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%));flex-shrink:0;text-align:center;width:var(--mat-icon-button-state-layer-size, 40px);height:var(--mat-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mat-icon-button-state-layer-size, 40px) - var(--mat-icon-button-icon-size, 24px)) / 2);font-size:var(--mat-icon-button-icon-size, 24px);color:var(--mat-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-icon-button:focus>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-icon-button-touch-target-size, 48px);display:var(--mat-icon-button-touch-target-display, block);left:50%;width:var(--mat-icon-button-touch-target-size, 48px);transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mat-icon-button-icon-size, 24px);height:var(--mat-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%))}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1} `,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}} `],encapsulation:2,changeDetection:0})}return t})();var Qg=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,Br]})}return t})();var lZe=["matButton",""],cZe=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],dZe=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var eEe=new Map([["text",["mat-mdc-button"]],["filled",["mdc-button--unelevated","mat-mdc-unelevated-button"]],["elevated",["mdc-button--raised","mat-mdc-raised-button"]],["outlined",["mdc-button--outlined","mat-mdc-outlined-button"]],["tonal",["mat-tonal-button"]]]),yo=(()=>{class t extends Jse{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=uZe(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let i=this._elementRef.nativeElement.classList,o=this._appearance?eEe.get(this._appearance):null,r=eEe.get(e);o&&i.remove(...o),i.add(...r),this._appearance=e}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["button","matButton",""],["a","matButton",""],["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""],["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostAttrs:[1,"mdc-button"],inputs:{appearance:[0,"matButton","appearance"]},exportAs:["matButton","matAnchor"],features:[ft],attrs:lZe,ngContentSelectors:dZe,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(i,o){i&1&&(Nn(cZe),to(0,"span",0),pn(1),Go(2,"span",1),pn(3,1),Ho(),pn(4,2),to(5,"span",2)(6,"span",3)),i&2&&Vn("mdc-button__ripple",!o._isFab)("mdc-fab__ripple",o._isFab)},styles:[`.mat-mdc-button-base{text-decoration:none}.mat-mdc-button-base .mat-icon{min-height:fit-content;flex-shrink:0}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-button-text-horizontal-padding, 12px);height:var(--mat-button-text-container-height, 40px);font-family:var(--mat-button-text-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-text-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-text-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-text-label-text-transform);font-weight:var(--mat-button-text-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mat-button-text-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mat-button-text-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-text-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-button-text-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-button-text-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-text-touch-target-size, 48px);display:var(--mat-button-text-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-filled-container-height, 40px);font-family:var(--mat-button-filled-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-filled-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-filled-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-filled-label-text-transform);font-weight:var(--mat-button-filled-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-filled-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-button-filled-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-filled-touch-target-size, 48px);display:var(--mat-button-filled-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mat-button-filled-label-text-color, var(--mat-sys-on-primary));background-color:var(--mat-button-filled-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mat-button-filled-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mat-button-protected-container-elevation-shadow, var(--mat-sys-level1));height:var(--mat-button-protected-container-height, 40px);font-family:var(--mat-button-protected-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-protected-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-protected-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-protected-label-text-transform);font-weight:var(--mat-button-protected-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-protected-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-button-protected-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-protected-touch-target-size, 48px);display:var(--mat-button-protected-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-raised-button:not(:disabled){color:var(--mat-button-protected-label-text-color, var(--mat-sys-primary));background-color:var(--mat-button-protected-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mat-button-protected-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mat-button-protected-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mat-button-protected-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mat-button-protected-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-protected-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-protected-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mat-button-protected-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-outlined-container-height, 40px);font-family:var(--mat-button-outlined-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-outlined-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-outlined-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-outlined-label-text-transform);font-weight:var(--mat-button-outlined-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mat-button-outlined-container-shape, var(--mat-sys-corner-full));border-width:var(--mat-button-outlined-outline-width, 1px);padding:0 var(--mat-button-outlined-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-button-outlined-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-outlined-touch-target-size, 48px);display:var(--mat-button-outlined-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-outlined-button:not(:disabled){color:var(--mat-button-outlined-label-text-color, var(--mat-sys-primary));border-color:var(--mat-button-outlined-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mat-button-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-tonal-container-height, 40px);font-family:var(--mat-button-tonal-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-tonal-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-tonal-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-tonal-label-text-transform);font-weight:var(--mat-button-tonal-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-tonal-horizontal-padding, 24px)}.mat-tonal-button:not(:disabled){color:var(--mat-button-tonal-label-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-tonal-container-color, var(--mat-sys-secondary-container))}.mat-tonal-button,.mat-tonal-button .mdc-button__ripple{border-radius:var(--mat-button-tonal-container-shape, var(--mat-sys-corner-full))}.mat-tonal-button[disabled],.mat-tonal-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-tonal-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-tonal-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-tonal-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}[dir=rtl] .mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}.mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}[dir=rtl] .mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}.mat-tonal-button .mat-ripple-element{background-color:var(--mat-button-tonal-ripple-color, color-mix(in srgb, var(--mat-sys-on-secondary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-tonal-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-tonal-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-tonal-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-tonal-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-tonal-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-tonal-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-tonal-touch-target-size, 48px);display:var(--mat-button-tonal-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button,.mat-tonal-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon,.mat-tonal-button .mdc-button__label,.mat-tonal-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator,.mat-tonal-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-button:focus>.mat-focus-indicator::before,.mat-mdc-unelevated-button:focus>.mat-focus-indicator::before,.mat-mdc-raised-button:focus>.mat-focus-indicator::before,.mat-mdc-outlined-button:focus>.mat-focus-indicator::before,.mat-tonal-button:focus>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable,.mat-tonal-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon,.mat-tonal-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-tonal-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)} `,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}} `],encapsulation:2,changeDetection:0})}return t})();function uZe(t){return t.hasAttribute("mat-raised-button")?"elevated":t.hasAttribute("mat-stroked-button")?"outlined":t.hasAttribute("mat-flat-button")?"filled":t.hasAttribute("mat-button")?"text":null}var Tn=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,Qg,Br]})}return t})();var tEe=(()=>{class t{constructor(e){this.data=e}static{this.\u0275fac=function(i){return new(i||t)(_e(XC))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:9,vars:5,consts:[["mat-dialog-title",""],[3,"align"],["mat-button","",3,"mat-dialog-close"],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(i,o){i&1&&(k(0,"h1",0),Q(1),D(),k(2,"mat-dialog-content"),Q(3),D(),k(4,"mat-dialog-actions",1)(5,"button",2),Q(6,"Abbrechen"),D(),k(7,"button",3),Q(8),D()()),i&2&&(T(),Qi(" ",o.data.dialogTitle," "),T(2),Qi(" ",o.data.dialogMessage," "),T(),E("align","end"),T(3),E("mat-dialog-close",!0),T(),Qi(" ",o.data.dialogSubmitButtonText," "))},dependencies:[Aw,Hv,jv,Tn,yo,Dw],styles:["*[_ngcontent-%COMP%]{font-family:Roboto,sans-serif}"]})}}return t})();var iEe=(()=>{class t{constructor(e){this.dialog=e}get(e="Objekt l\xF6schen",i="Best\xE4tigen um das Objekt endg\xFCltig zu l\xF6schen.",o="L\xF6schen"){let r={data:new L$(e,i,o)},s=this.dialog.open(tEe,r);return Wl(s.afterClosed())}static{this.\u0275fac=function(i){return new(i||t)(di(Yg))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var pZe=["*"],A5=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-flat-error"]],ngContentSelectors:pZe,decls:2,vars:0,consts:[[1,"bd-error","bd-warn-text","bd-flat-error"]],template:function(i,o){i&1&&(Nn(),Go(0,"span",0),pn(1),Ho())},styles:[".bd-error[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-size:1em;font-weight:500}"]})}}return t})();var nEe={type:"relative",labelClass:"mat-subheading",rateClass:"mat-headline",hideLabels:!1,format:"1.0-1",valueJudgementPositive:"good"};var hZe=t=>({inactive:t});function mZe(t,n){if(t&1&&(k(0,"div",1),Q(1),D()),t&2){let e=P(2);E("ngClass",e.config.labelClass),T(),_d(" ",e.base.displayName," - ",e.comparator.displayName," ")}}function fZe(t,n){t&1&&(k(0,"span",3),Q(1,"n/a"),D())}function gZe(t,n){if(t&1&&(k(0,"span",4),Q(1,"~"),D(),k(2,"span",5),Q(3,"-"),D(),k(4,"span",6),Q(5,"+"),D(),k(6,"span"),Q(7),Xn(8,"percent"),D()),t&2){let e=P(3);T(7),Qi(" ",Ls(8,1,e.growthRate,e.config.format)," ")}}function _Ze(t,n){if(t&1&&(k(0,"span",4),Q(1,"~"),D(),k(2,"span",5),Q(3,"-"),D(),k(4,"span",6),Q(5,"+"),D(),k(6,"span"),Q(7),Xn(8,"number"),D()),t&2){let e=P(3);T(7),Qi(" ",Ls(8,1,e.growthRate,e.config.format)," ")}}function yZe(t,n){if(t&1&&qe(0,gZe,9,4)(1,_Ze,9,4),t&2){let e=P(2);Ke(e.config.type==="relative"?0:1)}}function vZe(t,n){if(t&1&&(k(0,"div",0),qe(1,mZe,2,3,"div",1),k(2,"div",2),qe(3,fZe,2,0,"span",3),qe(4,yZe,2,1),D()()),t&2){let e=P();E("ngClass",ki(5,hZe,!e.base.value||!e.comparator.value)),T(),Ke(e.config.hideLabels?-1:1),T(),E("ngClass",e.growthRateClasses),T(),Ke(!e.growthRate&&e.growthRate!==0?3:-1),T(),Ke(e.growthRate!==null?4:-1)}}var oEe=(()=>{class t{constructor(){this.config=nEe,this.growthRate=null,this.growthRateClasses=[]}ngOnChanges(e){(e.comparator||e.base)&&this.comparator&&this.base&&this.setGrowthRate()}setGrowthRate(){let e;this.config.type==="relative"?e=this._getGrowthRateRelative():e=this._getGrowthRateAbsolute(),this.growthRate=e,this.setGrowthRateClasses()}_getGrowthRateAbsolute(){let e=null;return this.comparator?.value&&this.base?.value&&(this.comparator.value===this.base.value?e=0:e=this.comparator.value-this.base.value),e}_getGrowthRateRelative(){let e=null;return this.comparator?.value&&this.base?.value&&(this.comparator.value===this.base.value?e=0:e=(this.comparator.value-this.base.value)/this.base.value),e}setGrowthRateClasses(){let e=[this.config.rateClass];this.growthRate&&(this.growthRate>0?this.config.thresholdZero&&this.growthRate>this.config.thresholdZero.positiveToZero?(e.push("positive"),this.config.valueJudgementPositive==="good"||!this.config.valueJudgementPositive?e.push("good"):e.push("bad")):e.push("threshold"):this.growthRate<0&&(this.config.thresholdZero&&this.growthRate1?n[1].length:0}function tae(t,n){return 100/(n-t)}function eae(t,n,e){return n*100/(t[e+1]-t[e])}function wZe(t,n){return eae(t,t[0]<0?n+Math.abs(t[0]):n-t[0],0)}function SZe(t,n){return n*(t[1]-t[0])/100+t[0]}function k5(t,n){for(var e=1;t>=n[e];)e+=1;return e}function TZe(t,n,e){if(e>=t.slice(-1)[0])return 100;var i=k5(e,t),o=t[i-1],r=t[i],s=n[i-1],d=n[i];return s+wZe([o,r],e)/tae(s,d)}function IZe(t,n,e){if(e>=100)return t.slice(-1)[0];var i=k5(e,n),o=t[i-1],r=t[i],s=n[i-1],d=n[i];return SZe([o,r],(e-s)*tae(s,d))}function EZe(t,n,e,i){if(i===100)return i;var o=k5(i,t),r=t[o-1],s=t[o];return e?i-r>(s-r)/2?s:r:n[o-1]?t[o-1]+bZe(i-t[o-1],n[o-1]):i}var rOi=(function(){function t(n,e,i){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[i||!1],this.xNumSteps=[!1],this.snap=e;var o,r=[];for(Object.keys(n).forEach(function(s){r.push([CZe(n[s]),s])}),r.sort(function(s,d){return s[0][0]-d[0][0]}),o=0;othis.xPct[o+1];)o++;else n===this.xPct[this.xPct.length-1]&&(o=this.xPct.length-2);!i&&n===this.xPct[o+1]&&o++,e===null&&(e=[]);var r,s=1,d=e[o],m=0,v=0,w=0,O=0;for(i?r=(n-this.xPct[o])/(this.xPct[o+1]-this.xPct[o]):r=(this.xPct[o+1]-n)/(this.xPct[o+1]-this.xPct[o]);d>0;)m=this.xPct[o+1+O]-this.xPct[o+O],e[o+O]*s+100-r*100>100?(v=m*r,s=(d-100*r)/e[o+O],r=1):(v=e[o+O]*m/100*s,s=0),i?(w=w-v,this.xPct.length+O>=1&&O--):(w=w+v,this.xPct.length-O>=1&&O++),d=e[o+O]*s;return n+w},t.prototype.toStepping=function(n){return n=TZe(this.xVal,this.xPct,n),n},t.prototype.fromStepping=function(n){return IZe(this.xVal,this.xPct,n)},t.prototype.getStep=function(n){return n=EZe(this.xPct,this.xSteps,this.snap,n),n},t.prototype.getDefaultStep=function(n,e,i){var o=k5(n,this.xPct);return(n===100||e&&n===this.xPct[o-1])&&(o=Math.max(o-1,1)),(this.xVal[o]-this.xVal[o-1])/i},t.prototype.getNearbySteps=function(n){var e=k5(n,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},t.prototype.countStepDecimals=function(){var n=this.xNumSteps.map(xZe);return Math.max.apply(null,n)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},t.prototype.convert=function(n){return this.getStep(this.toStepping(n))},t.prototype.handleEntryPoint=function(n,e){var i;if(n==="min"?i=0:n==="max"?i=100:i=parseFloat(n),!rEe(i)||!rEe(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(i),this.xVal.push(e[0]);var o=Number(e[1]);i?this.xSteps.push(isNaN(o)?!1:o):isNaN(o)||(this.xSteps[0]=o),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(n,e){if(e){if(this.xVal[n]===this.xVal[n+1]){this.xSteps[n]=this.xHighestCompleteStep[n]=this.xVal[n];return}this.xSteps[n]=eae([this.xVal[n],this.xVal[n+1]],e,0)/tae(this.xPct[n],this.xPct[n+1]);var i=(this.xVal[n+1]-this.xVal[n])/this.xNumSteps[n],o=Math.ceil(Number(i.toFixed(3))-1),r=this.xVal[n]+this.xNumSteps[n]*o;this.xHighestCompleteStep[n]=r}},t})();var pEe=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||t)(_e(Ps),_e(Bn))};static \u0275dir=rn({type:t})}return t})(),hEe=(()=>{class t extends pEe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,features:[ft]})}return t})(),Ea=new fi("");var DZe={provide:Ea,useExisting:Ko(()=>Ml),multi:!0};function AZe(){let t=Q_()?Q_().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var kZe=new fi(""),Ml=(()=>{class t extends pEe{_compositionMode;_composing=!1;constructor(e,i,o){super(e,i),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!AZe())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||t)(_e(Ps),_e(Bn),_e(kZe,8))};static \u0275dir=rn({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,o){i&1&&ie("input",function(s){return o._handleInput(s.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(s){return o._compositionEnd(s.target.value)})},standalone:!1,features:[jt([DZe]),ft]})}return t})();function nae(t){return t==null||oae(t)===0}function oae(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var $v=new fi(""),N5=new fi(""),MZe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ys=class{static min(n){return mEe(n)}static max(n){return OZe(n)}static required(n){return fEe(n)}static requiredTrue(n){return RZe(n)}static email(n){return FZe(n)}static minLength(n){return PZe(n)}static maxLength(n){return LZe(n)}static pattern(n){return NZe(n)}static nullValidator(n){return V$()}static compose(n){return CEe(n)}static composeAsync(n){return xEe(n)}};function mEe(t){return n=>{if(n.value==null||t==null)return null;let e=parseFloat(n.value);return!isNaN(e)&&e{if(n.value==null||t==null)return null;let e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}function fEe(t){return nae(t.value)?{required:!0}:null}function RZe(t){return t.value===!0?null:{required:!0}}function FZe(t){return nae(t.value)||MZe.test(t.value)?null:{email:!0}}function PZe(t){return n=>{let e=n.value?.length??oae(n.value);return e===null||e===0?null:e{let e=n.value?.length??oae(n.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function NZe(t){if(!t)return V$;let n,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if(nae(i.value))return null;let o=i.value;return n.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}function V$(t){return null}function gEe(t){return t!=null}function _Ee(t){return J1(t)?nr(t):t}function yEe(t){let n={};return t.forEach(e=>{n=e!=null?be(be({},n),e):n}),Object.keys(n).length===0?null:n}function vEe(t,n){return n.map(e=>e(t))}function BZe(t){return!t.validate}function bEe(t){return t.map(n=>BZe(n)?n:e=>n.validate(e))}function CEe(t){if(!t)return null;let n=t.filter(gEe);return n.length==0?null:function(e){return yEe(vEe(e,n))}}function rae(t){return t!=null?CEe(bEe(t)):null}function xEe(t){if(!t)return null;let n=t.filter(gEe);return n.length==0?null:function(e){let i=vEe(e,n).map(_Ee);return tc(i).pipe(vt(yEe))}}function sae(t){return t!=null?xEe(bEe(t)):null}function sEe(t,n){return t===null?[n]:Array.isArray(t)?[...t,n]:[t,n]}function wEe(t){return t._rawValidators}function SEe(t){return t._rawAsyncValidators}function iae(t){return t?Array.isArray(t)?t:[t]:[]}function z$(t,n){return Array.isArray(t)?t.includes(n):t===n}function aEe(t,n){let e=iae(n);return iae(t).forEach(o=>{z$(e,o)||e.push(o)}),e}function lEe(t,n){return iae(n).filter(e=>!z$(t,e))}var U$=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=rae(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=sae(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,e){return this.control?this.control.hasError(n,e):!1}getError(n,e){return this.control?this.control.getError(n,e):null}},Gv=class extends U${name;get formDirective(){return null}get path(){return null}},Vu=class extends U${_parent=null;name=null;valueAccessor=null},H$=class{_cd;constructor(n){this._cd=n}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},VZe={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},MOi=mt(be({},VZe),{"[class.ng-submitted]":"isSubmitted"}),no=(()=>{class t extends H${constructor(e){super(e)}static \u0275fac=function(i){return new(i||t)(_e(Vu,2))};static \u0275dir=rn({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,o){i&2&&Vn("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[ft]})}return t})(),Gm=(()=>{class t extends H${constructor(e){super(e)}static \u0275fac=function(i){return new(i||t)(_e(Gv,10))};static \u0275dir=rn({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,o){i&2&&Vn("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[ft]})}return t})();var M5="VALID",B$="INVALID",lP="PENDING",O5="DISABLED",GI=class{},j$=class extends GI{value;source;constructor(n,e){super(),this.value=n,this.source=e}},F5=class extends GI{pristine;source;constructor(n,e){super(),this.pristine=n,this.source=e}},P5=class extends GI{touched;source;constructor(n,e){super(),this.touched=n,this.source=e}},cP=class extends GI{status;source;constructor(n,e){super(),this.status=n,this.source=e}},G$=class extends GI{source;constructor(n){super(),this.source=n}},$$=class extends GI{source;constructor(n){super(),this.source=n}};function TEe(t){return(Q$(t)?t.validators:t)||null}function zZe(t){return Array.isArray(t)?rae(t):t||null}function IEe(t,n){return(Q$(n)?n.asyncValidators:t)||null}function UZe(t){return Array.isArray(t)?sae(t):t||null}function Q$(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function HZe(t,n,e){let i=t.controls;if(!(n?Object.keys(i):i).length)throw new mn(1e3,"");if(!i[e])throw new mn(1001,"")}function jZe(t,n,e){t._forEachChild((i,o)=>{if(e[o]===void 0)throw new mn(1002,"")})}var q$=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(n,e){this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get status(){return Ad(this.statusReactive)}set status(n){Ad(()=>this.statusReactive.set(n))}_status=bo(()=>this.statusReactive());statusReactive=Zn(void 0);get valid(){return this.status===M5}get invalid(){return this.status===B$}get pending(){return this.status==lP}get disabled(){return this.status===O5}get enabled(){return this.status!==O5}errors;get pristine(){return Ad(this.pristineReactive)}set pristine(n){Ad(()=>this.pristineReactive.set(n))}_pristine=bo(()=>this.pristineReactive());pristineReactive=Zn(!0);get dirty(){return!this.pristine}get touched(){return Ad(this.touchedReactive)}set touched(n){Ad(()=>this.touchedReactive.set(n))}_touched=bo(()=>this.touchedReactive());touchedReactive=Zn(!1);get untouched(){return!this.touched}_events=new hi;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(aEe(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(aEe(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(lEe(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(lEe(n,this._rawAsyncValidators))}hasValidator(n){return z$(this._rawValidators,n)}hasAsyncValidator(n){return z$(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){let e=this.touched===!1;this.touched=!0;let i=n.sourceControl??this;this._parent&&!n.onlySelf&&this._parent.markAsTouched(mt(be({},n),{sourceControl:i})),e&&n.emitEvent!==!1&&this._events.next(new P5(!0,i))}markAllAsDirty(n={}){this.markAsDirty({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(n))}markAllAsTouched(n={}){this.markAsTouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(n))}markAsUntouched(n={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=n.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:i})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n,i),e&&n.emitEvent!==!1&&this._events.next(new P5(!1,i))}markAsDirty(n={}){let e=this.pristine===!0;this.pristine=!1;let i=n.sourceControl??this;this._parent&&!n.onlySelf&&this._parent.markAsDirty(mt(be({},n),{sourceControl:i})),e&&n.emitEvent!==!1&&this._events.next(new F5(!1,i))}markAsPristine(n={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=n.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:n.emitEvent})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n,i),e&&n.emitEvent!==!1&&this._events.next(new F5(!0,i))}markAsPending(n={}){this.status=lP;let e=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new cP(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.markAsPending(mt(be({},n),{sourceControl:e}))}disable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=O5,this.errors=null,this._forEachChild(o=>{o.disable(mt(be({},n),{onlySelf:!0}))}),this._updateValue();let i=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new j$(this.value,i)),this._events.next(new cP(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(mt(be({},n),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=M5,this._forEachChild(i=>{i.enable(mt(be({},n),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors(mt(be({},n),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n,e){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===M5||this.status===lP)&&this._runAsyncValidator(i,n.emitEvent)}let e=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new j$(this.value,e)),this._events.next(new cP(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(mt(be({},n),{sourceControl:e}))}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?O5:M5}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n,e){if(this.asyncValidator){this.status=lP,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:n!==!1};let i=_Ee(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:n})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let n=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,n}return!1}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(n){let e=n;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,o)=>i&&i._find(o),this)}getError(n,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n,e,i){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),(n||i)&&this._events.next(new cP(this.status,e)),this._parent&&this._parent._updateControlsErrors(n,e,i)}_initObservables(){this.valueChanges=new ve,this.statusChanges=new ve}_calculateStatus(){return this._allControlsDisabled()?O5:this.errors?B$:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(lP)?lP:this._anyControlsHaveStatus(B$)?B$:M5}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n,e){let i=!this._anyControlsDirty(),o=this.pristine!==i;this.pristine=i,this._parent&&!n.onlySelf&&this._parent._updatePristine(n,e),o&&this._events.next(new F5(this.pristine,e))}_updateTouched(n={},e){this.touched=this._anyControlsTouched(),this._events.next(new P5(this.touched,e)),this._parent&&!n.onlySelf&&this._parent._updateTouched(n,e)}_onDisabledChange=[];_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){Q$(n)&&n.updateOn!=null&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){let e=this._parent&&this._parent.dirty;return!n&&!!e&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=zZe(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=UZe(this._rawAsyncValidators)}},hu=class extends q${constructor(n,e,i){super(TEe(e),IEe(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){jZe(this,!0,n),Object.keys(n).forEach(i=>{HZe(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){n!=null&&(Object.keys(n).forEach(i=>{let o=this.controls[i];o&&o.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,o)=>{i.reset(n?n[o]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){let n={};return this._reduceChildren(n,(e,i,o)=>((i.enabled||this.disabled)&&(e[o]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((o,r)=>{i=e(i,o,r)}),i}_allControlsDisabled(){for(let n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}};var dP=new fi("",{providedIn:"root",factory:()=>Z$}),Z$="always";function EEe(t,n){return[...n.path,t]}function L5(t,n,e=Z$){aae(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&n.valueAccessor.setDisabledState?.(t.disabled),$Ze(t,n),KZe(t,n),qZe(t,n),GZe(t,n)}function K$(t,n,e=!0){let i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),Y$(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function W$(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function GZe(t,n){if(n.valueAccessor.setDisabledState){let e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function aae(t,n){let e=wEe(t);n.validator!==null?t.setValidators(sEe(e,n.validator)):typeof e=="function"&&t.setValidators([e]);let i=SEe(t);n.asyncValidator!==null?t.setAsyncValidators(sEe(i,n.asyncValidator)):typeof i=="function"&&t.setAsyncValidators([i]);let o=()=>t.updateValueAndValidity();W$(n._rawValidators,o),W$(n._rawAsyncValidators,o)}function Y$(t,n){let e=!1;if(t!==null){if(n.validator!==null){let o=wEe(t);if(Array.isArray(o)&&o.length>0){let r=o.filter(s=>s!==n.validator);r.length!==o.length&&(e=!0,t.setValidators(r))}}if(n.asyncValidator!==null){let o=SEe(t);if(Array.isArray(o)&&o.length>0){let r=o.filter(s=>s!==n.asyncValidator);r.length!==o.length&&(e=!0,t.setAsyncValidators(r))}}}let i=()=>{};return W$(n._rawValidators,i),W$(n._rawAsyncValidators,i),e}function $Ze(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&DEe(t,n)})}function qZe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&DEe(t,n),t.updateOn!=="submit"&&t.markAsTouched()})}function DEe(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function KZe(t,n){let e=(i,o)=>{n.valueAccessor.writeValue(i),o&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function AEe(t,n){t==null,aae(t,n)}function WZe(t,n){return Y$(t,n)}function lae(t,n){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(n,e.currentValue)}function YZe(t){return Object.getPrototypeOf(t.constructor)===hEe}function kEe(t,n){t._syncPendingControls(),n.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function cae(t,n){if(!n)return null;Array.isArray(n);let e,i,o;return n.forEach(r=>{r.constructor===Ml?e=r:YZe(r)?i=r:o=r}),o||i||e||null}function QZe(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}var ZZe={provide:Gv,useExisting:Ko(()=>B5)},R5=Promise.resolve(),B5=(()=>{class t extends Gv{callSetDisabledState;get submitted(){return Ad(this.submittedReactive)}_submitted=bo(()=>this.submittedReactive());submittedReactive=Zn(!1);_directives=new Set;form;ngSubmit=new ve;options;constructor(e,i,o){super(),this.callSetDisabledState=o,this.form=new hu({},rae(e),sae(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){R5.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),L5(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){R5.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){R5.then(()=>{let i=this._findContainer(e.path),o=new hu({});AEe(o,e),i.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){R5.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){R5.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),kEe(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new G$(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1),this.form._events.next(new $$(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||t)(_e($v,10),_e(N5,10),_e(dP,8))};static \u0275dir=rn({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,o){i&1&&ie("submit",function(s){return o.onSubmit(s)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[jt([ZZe]),ft]})}return t})();function cEe(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}function dEe(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var yr=class extends q${defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(n=null,e,i){super(TEe(e),IEe(i,e)),this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Q$(e)&&(e.nonNullable||e.initialValueIsDefault)&&(dEe(n)?this.defaultValue=n.value:this.defaultValue=n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){cEe(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){cEe(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(n){dEe(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},MEe=yr,XZe=t=>t instanceof yr;var JZe={provide:Vu,useExisting:Ko(()=>Lr)},uEe=Promise.resolve(),Lr=(()=>{class t extends Vu{_changeDetectorRef;callSetDisabledState;control=new yr;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new ve;constructor(e,i,o,r,s,d){super(),this._changeDetectorRef=s,this.callSetDisabledState=d,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=cae(this,r)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),lae(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){L5(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){uEe.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,o=i!==0&&je(i);uEe.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?EEe(e,this._parent):[e]}static \u0275fac=function(i){return new(i||t)(_e(Gv,9),_e($v,10),_e(N5,10),_e(Ea,10),_e(Gi,8),_e(dP,8))};static \u0275dir=rn({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[jt([JZe]),ft,Ot]})}return t})();var $m=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),eXe={provide:Ea,useExisting:Ko(()=>Mw),multi:!0},Mw=(()=>{class t extends hEe{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,o){i&1&&ie("input",function(s){return o.onChange(s.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[jt([eXe]),ft]})}return t})();var dae=new fi(""),tXe={provide:Vu,useExisting:Ko(()=>zl)},zl=(()=>{class t extends Vu{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new ve;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,o,r,s){super(),this._ngModelWarningConfig=r,this.callSetDisabledState=s,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=cae(this,o)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&K$(i,this,!1),L5(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}lae(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&K$(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||t)(_e($v,10),_e(N5,10),_e(Ea,10),_e(dae,8),_e(dP,8))};static \u0275dir=rn({type:t,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[jt([tXe]),ft,Ot]})}return t})(),iXe={provide:Gv,useExisting:Ko(()=>zu)},zu=(()=>{class t extends Gv{callSetDisabledState;get submitted(){return Ad(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=bo(()=>this._submittedReactive());_submittedReactive=Zn(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new ve;constructor(e,i,o){super(),this.callSetDisabledState=o,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Y$(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return L5(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){K$(e.control||null,e,!1),QZe(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),kEe(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new G$(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1),i?.emitEvent!==!1&&this.form._events.next(new $$(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,o=this.form.get(e.path);i!==o&&(K$(i||null,e),XZe(o)&&(L5(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);AEe(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&WZe(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){aae(this.form,this),this._oldForm&&Y$(this._oldForm,this)}static \u0275fac=function(i){return new(i||t)(_e($v,10),_e(N5,10),_e(dP,8))};static \u0275dir=rn({type:t,selectors:[["","formGroup",""]],hostBindings:function(i,o){i&1&&ie("submit",function(s){return o.onSubmit(s)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[jt([iXe]),ft,Ot]})}return t})();var nXe={provide:Vu,useExisting:Ko(()=>l0)},l0=(()=>{class t extends Vu{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new ve;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,o,r,s){super(),this._ngModelWarningConfig=s,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=cae(this,r)}ngOnChanges(e){this._added||this._setUpControl(),lae(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return EEe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||t)(_e(Gv,13),_e($v,10),_e(N5,10),_e(Ea,10),_e(dae,8))};static \u0275dir=rn({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[jt([nXe]),ft,Ot]})}return t})();function oXe(t){return typeof t=="number"?t:parseFloat(t)}var OEe=(()=>{class t{_validator=V$;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):V$,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,features:[Ot]})}return t})();var rXe={provide:$v,useExisting:Ko(()=>uae),multi:!0},uae=(()=>{class t extends OEe{min;inputName="min";normalizeInput=e=>oXe(e);createValidator=e=>mEe(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,o){i&2&&Ge("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[jt([rXe]),ft]})}return t})(),sXe={provide:$v,useExisting:Ko(()=>qv),multi:!0};var qv=(()=>{class t extends OEe{required;inputName="required";normalizeInput=je;createValidator=e=>fEe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,o){i&2&&Ge("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[jt([sXe]),ft]})}return t})();var REe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();var hr=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:dP,useValue:e.callSetDisabledState??Z$}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[REe]})}return t})(),xr=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:dae,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:dP,useValue:e.callSetDisabledState??Z$}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[REe]})}return t})();var aXe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms} `],encapsulation:2,changeDetection:0})}return t})(),lXe={passive:!0},FEe=(()=>{class t{_platform=re(ba);_ngZone=re(_n);_renderer=re(bc).createRenderer(null,null);_styleLoader=re(kl);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return cu;this._styleLoader.load(aXe);let i=Rd(e),o=this._monitoredElements.get(i);if(o)return o.subject;let r=new hi,s="cdk-text-field-autofilled",d=v=>{v.animationName==="cdk-text-field-autofill-start"&&!i.classList.contains(s)?(i.classList.add(s),this._ngZone.run(()=>r.next({target:v.target,isAutofilled:!0}))):v.animationName==="cdk-text-field-autofill-end"&&i.classList.contains(s)&&(i.classList.remove(s),this._ngZone.run(()=>r.next({target:v.target,isAutofilled:!1})))},m=this._ngZone.runOutsideAngular(()=>(i.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(i,"animationstart",d,lXe)));return this._monitoredElements.set(i,{subject:r,unlisten:m}),r}stopMonitoring(e){let i=Rd(e),o=this._monitoredElements.get(i);o&&(o.unlisten(),o.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var PEe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();var LEe=new fi("MAT_INPUT_VALUE_ACCESSOR");var pae=class{_box;_destroyed=new hi;_resizeSubject=new hi;_resizeObserver;_elementObservables=new Map;constructor(n){this._box=n,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(n){return this._elementObservables.has(n)||this._elementObservables.set(n,new Cr(e=>{let i=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(n,{box:this._box}),()=>{this._resizeObserver?.unobserve(n),i.unsubscribe(),this._elementObservables.delete(n)}}).pipe(wn(e=>e.some(i=>i.target===n)),du({bufferSize:1,refCount:!0}),cs(this._destroyed))),this._elementObservables.get(n)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},NEe=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=re(_n);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,i){let o=i?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new pae(o)),this._observers.get(o).observe(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var cXe=["notch"],dXe=["matFormFieldNotchedOutline",""],uXe=["*"],BEe=["iconPrefixContainer"],VEe=["textPrefixContainer"],zEe=["iconSuffixContainer"],UEe=["textSuffixContainer"],pXe=["textField"],hXe=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],mXe=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function fXe(t,n){t&1&&ce(0,"span",20)}function gXe(t,n){if(t&1&&(k(0,"label",19),pn(1,1),qe(2,fXe,1,0,"span",20),D()),t&2){let e=P(2);E("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Ge("for",e._control.disableAutomaticLabeling?null:e._control.id),T(2),Ke(!e.hideRequiredMarker&&e._control.required?2:-1)}}function _Xe(t,n){if(t&1&&qe(0,gXe,3,5,"label",19),t&2){let e=P();Ke(e._hasFloatingLabel()?0:-1)}}function yXe(t,n){t&1&&ce(0,"div",7)}function vXe(t,n){}function bXe(t,n){if(t&1&&ee(0,vXe,0,0,"ng-template",13),t&2){P(2);let e=ti(1);E("ngTemplateOutlet",e)}}function CXe(t,n){if(t&1&&(k(0,"div",9),qe(1,bXe,1,1,null,13),D()),t&2){let e=P();E("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),T(),Ke(e._forceDisplayInfixLabel()?-1:1)}}function xXe(t,n){t&1&&(k(0,"div",10,2),pn(2,2),D())}function wXe(t,n){t&1&&(k(0,"div",11,3),pn(2,3),D())}function SXe(t,n){}function TXe(t,n){if(t&1&&ee(0,SXe,0,0,"ng-template",13),t&2){P();let e=ti(1);E("ngTemplateOutlet",e)}}function IXe(t,n){t&1&&(k(0,"div",14,4),pn(2,4),D())}function EXe(t,n){t&1&&(k(0,"div",15,5),pn(2,5),D())}function DXe(t,n){t&1&&ce(0,"div",16)}function AXe(t,n){t&1&&pn(0,6)}function kXe(t,n){if(t&1&&(k(0,"mat-hint",21),Q(1),D()),t&2){let e=P(2);E("id",e._hintLabelId),T(),dt(e.hintLabel)}}function MXe(t,n){if(t&1&&(qe(0,kXe,2,2,"mat-hint",21),pn(1,7),ce(2,"div",22),pn(3,8)),t&2){let e=P();Ke(e.hintLabel?0:-1)}}var Ol=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["mat-label"]]})}return t})(),hae=new fi("MatError"),J$=(()=>{class t{id=re(ul).getId("mat-mdc-error-");constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(i,o){i&2&&Rr("id",o.id)},inputs:{id:"id"},features:[jt([{provide:hae,useExisting:t}])]})}return t})(),mu=(()=>{class t{align="start";id=re(ul).getId("mat-mdc-hint-");static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(i,o){i&2&&(Rr("id",o.id),Ge("align",null),Vn("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),WEe=new fi("MatPrefix");var mae=new fi("MatSuffix"),mp=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[jt([{provide:mae,useExisting:t}])]})}return t})(),YEe=new fi("FloatingLabelParent"),HEe=(()=>{class t{_elementRef=re(Bn);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=re(NEe);_ngZone=re(_n);_parent=re(YEe);_resizeSubscription=new Xr;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return OXe(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(i,o){i&2&&Vn("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function OXe(t){let n=t;if(n.offsetParent!==null)return n.scrollWidth;let e=n.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let i=e.scrollWidth;return e.remove(),i}var jEe="mdc-line-ripple--active",X$="mdc-line-ripple--deactivating",GEe=(()=>{class t{_elementRef=re(Bn);_cleanupTransitionEnd;constructor(){let e=re(_n),i=re(Ps);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=i.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(X$),e.add(jEe)}deactivate(){this._elementRef.nativeElement.classList.add(X$)}_handleTransitionEnd=e=>{let i=this._elementRef.nativeElement.classList,o=i.contains(X$);e.propertyName==="opacity"&&o&&i.remove(jEe,X$)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),$Ee=(()=>{class t{_elementRef=re(Bn);_ngZone=re(_n);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,i=e.querySelector(".mdc-floating-label");i?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(i.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>i.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let i=this._notch.nativeElement;!this.open||!e?i.style.width="":i.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(i,o){if(i&1&&Ri(cXe,5),i&2){let r;Le(r=Ne())&&(o._notch=r.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(i,o){i&2&&Vn("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:dXe,ngContentSelectors:uXe,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(i,o){i&1&&(Nn(),to(0,"div",1),Go(1,"div",2,0),pn(3),Ho(),to(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),uP=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t})}return t})();var pP=new fi("MatFormField"),QEe=new fi("MAT_FORM_FIELD_DEFAULT_OPTIONS"),qEe="fill",RXe="auto",KEe="fixed",FXe="translateY(-50%)",rs=(()=>{class t{_elementRef=re(Bn);_changeDetectorRef=re(Gi);_platform=re(ba);_idGenerator=re(ul);_ngZone=re(_n);_defaults=re(QEe,{optional:!0});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=PA("iconPrefixContainer");_textPrefixContainerSignal=PA("textPrefixContainer");_iconSuffixContainerSignal=PA("iconSuffixContainer");_textSuffixContainerSignal=PA("textSuffixContainer");_prefixSuffixContainers=bo(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=ew(Ol);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=_h(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||RXe}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let i=e||this._defaults?.appearance||qEe;this._appearanceSignal.set(i)}_appearanceSignal=Zn(qEe);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||KEe}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||KEe}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new hi;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=Cl();constructor(){let e=this._defaults,i=re(ad);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),od(()=>this._currentDirection=i.valueSignal()),this._syncOutlineLabelOffset()}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=bo(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let i=this._control,o="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(o+e.controlType),i.controlType&&this._elementRef.nativeElement.classList.add(o+i.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=i.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=i.stateChanges.pipe(rl([void 0,void 0]),vt(()=>[i.errorState,i.userAriaDescribedBy]),C7(),wn(([[r,s],[d,m]])=>r!==d||s!==m)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),i.ngControl&&i.ngControl.valueChanges&&(this._valueChanges=i.ngControl.valueChanges.pipe(cs(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),ku(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e)}_syncOutlineLabelOffset(){p1e({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset())});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"})}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())})}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=bo(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let i=this._control?this._control.ngControl:null;return i&&i[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(d=>d.align==="start"):null,s=this._hintChildren?this._hintChildren.find(d=>d.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),s&&e.push(s.id)}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let i=this._control.describedByIds,o;if(i){let r=this._describedByIds||e;o=e.concat(i.filter(s=>s&&!r.includes(s)))}else o=e;this._control.setDescribedByIds(o),this._describedByIds=e}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,i=this._textPrefixContainer?.nativeElement,o=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,s=e?.getBoundingClientRect().width??0,d=i?.getBoundingClientRect().width??0,m=o?.getBoundingClientRect().width??0,v=r?.getBoundingClientRect().width??0,w=this._currentDirection==="rtl"?"-1":"1",O=`${s+d}px`,V=`calc(${w} * (${O} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,$=`var(--mat-mdc-form-field-label-transform, ${FXe} translateX(${V}))`,q=s+d+m+v;return[$,q]}_writeOutlinedLabelStyles(e){if(e!==null){let[i,o]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=i),o!==null&&this._notchedOutline?._setMaxWidth(o)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-form-field"]],contentQueries:function(i,o,r){if(i&1&&(Y_(r,o._labelChild,Ol,5),xt(r,uP,5),xt(r,WEe,5),xt(r,mae,5),xt(r,hae,5),xt(r,mu,5)),i&2){Z0();let s;Le(s=Ne())&&(o._formFieldControl=s.first),Le(s=Ne())&&(o._prefixChildren=s),Le(s=Ne())&&(o._suffixChildren=s),Le(s=Ne())&&(o._errorChildren=s),Le(s=Ne())&&(o._hintChildren=s)}},viewQuery:function(i,o){if(i&1&&(oI(o._iconPrefixContainerSignal,BEe,5),oI(o._textPrefixContainerSignal,VEe,5),oI(o._iconSuffixContainerSignal,zEe,5),oI(o._textSuffixContainerSignal,UEe,5),Ri(pXe,5),Ri(BEe,5),Ri(VEe,5),Ri(zEe,5),Ri(UEe,5),Ri(HEe,5),Ri($Ee,5),Ri(GEe,5)),i&2){Z0(4);let r;Le(r=Ne())&&(o._textField=r.first),Le(r=Ne())&&(o._iconPrefixContainer=r.first),Le(r=Ne())&&(o._textPrefixContainer=r.first),Le(r=Ne())&&(o._iconSuffixContainer=r.first),Le(r=Ne())&&(o._textSuffixContainer=r.first),Le(r=Ne())&&(o._floatingLabel=r.first),Le(r=Ne())&&(o._notchedOutline=r.first),Le(r=Ne())&&(o._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(i,o){i&2&&Vn("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[jt([{provide:pP,useExisting:t},{provide:YEe,useExisting:t}])],ngContentSelectors:mXe,decls:19,vars:25,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["aria-atomic","true","aria-live","polite"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(i,o){if(i&1){let r=tt();Nn(hXe),ee(0,_Xe,1,1,"ng-template",null,0,Pt),k(2,"div",6,1),ie("click",function(d){return se(r),ae(o._control.onContainerClick(d))}),qe(4,yXe,1,0,"div",7),k(5,"div",8),qe(6,CXe,2,2,"div",9),qe(7,xXe,3,0,"div",10),qe(8,wXe,3,0,"div",11),k(9,"div",12),qe(10,TXe,1,1,null,13),pn(11),D(),qe(12,IXe,3,0,"div",14),qe(13,EXe,3,0,"div",15),D(),qe(14,DXe,1,0,"div",16),D(),k(15,"div",17)(16,"div",18),qe(17,AXe,1,0)(18,MXe,4,1),D()()}if(i&2){let r;T(2),Vn("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),T(2),Ke(!o._hasOutline()&&!o._control.disabled?4:-1),T(2),Ke(o._hasOutline()?6:-1),T(),Ke(o._hasIconPrefix?7:-1),T(),Ke(o._hasTextPrefix?8:-1),T(2),Ke(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),T(2),Ke(o._hasTextSuffix?12:-1),T(),Ke(o._hasIconSuffix?13:-1),T(),Ke(o._hasOutline()?-1:14),T(),Vn("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic");let s=o._getSubscriptMessageType();T(),Vn("mat-mdc-form-field-error-wrapper",s==="error")("mat-mdc-form-field-hint-wrapper",s==="hint"),T(),Ke((r=s)==="error"?17:r==="hint"?18:-1)}},dependencies:[HEe,$Ee,Lo,GEe,mu],styles:[`.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator,.mdc-text-field__input::-webkit-search-cancel-button{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-filled-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-filled-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-outlined-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-outlined-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-filled-error-caret-color, var(--mat-sys-error))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-outlined-error-caret-color, var(--mat-sys-error))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-filled-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-outlined-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mat-form-field-filled-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mat-form-field-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-filled-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-filled-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-filled-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-filled-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mat-form-field-filled-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-filled-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-filled-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-filled-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-outlined-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-outlined-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-outlined-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-outlined-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mat-form-field-outlined-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-outlined-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-outlined-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-outlined-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline));border-width:var(--mat-form-field-outlined-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mat-form-field-outlined-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{max-width:min(100%,calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mat-form-field-filled-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mat-form-field-filled-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}@keyframes _mat-form-field-subscript-animation{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px;opacity:1;transform:translateY(0);animation:_mat-form-field-subscript-animation 0ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-error-wrapper{animation-duration:300ms}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)} `],encapsulation:2,changeDetection:0})}return t})();var o2=(()=>{class t{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hP=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(n,e,i,o,r){this._defaultMatcher=n,this.ngControl=e,this._parentFormGroup=i,this._parentForm=o,this._stateChanges=r}updateErrorState(){let n=this.errorState,e=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,o=this.ngControl?this.ngControl.control:null,r=i?.isErrorState(o,e)??!1;r!==n&&(this.errorState=r,this._stateChanges.next())}};var Ra=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,eP,rs,Br]})}return t})();var PXe=["button","checkbox","file","hidden","image","radio","range","reset","submit"],LXe=new fi("MAT_INPUT_CONFIG"),Fa=(()=>{class t{_elementRef=re(Bn);_platform=re(ba);ngControl=re(Vu,{optional:!0,self:!0});_autofillMonitor=re(FEe);_ngZone=re(_n);_formField=re(pP,{optional:!0});_renderer=re(Ps);_uid=re(ul).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=re(LXe,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new hi;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=_h(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Ys.required)??!1}set required(e){this._required=_h(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Wse().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=_h(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>Wse().has(e));constructor(){let e=re(B5,{optional:!0}),i=re(zu,{optional:!0}),o=re(o2),r=re(LEe,{optional:!0,self:!0}),s=this._elementRef.nativeElement,d=s.nodeName.toLowerCase();r?TC(r.value)?this._signalBasedValueAccessor=r:this._inputValueAccessor=r:this._inputValueAccessor=s,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(s,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new hP(o,this.ngControl,i,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=d==="select",this._isTextarea=d==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=s.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&od(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let i=this._elementRef.nativeElement;i.type==="number"?(i.type="text",i.setSelectionRange(0,0),i.type="number"):i.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){PXe.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let i=this._elementRef.nativeElement;e.length?i.setAttribute("aria-describedby",e.join(" ")):i.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let i=e.target;!i.value&&i.selectionStart===0&&i.selectionEnd===0&&(i.setSelectionRange(1,1),i.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(i,o){i&1&&ie("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),i&2&&(Rr("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),Ge("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),Vn("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",je]},exportAs:["matInput"],features:[jt([{provide:uP,useExisting:t}]),Ot]})}return t})(),pl=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,Ra,Ra,PEe,Br]})}return t})();var BXe=["knob"],VXe=["valueIndicatorContainer"];function zXe(t,n){if(t&1&&(k(0,"div",2,1)(2,"div",5)(3,"span",6),Q(4),D()()()),t&2){let e=P();T(4),dt(e.valueIndicatorText)}}var UXe=["trackActive"],HXe=["*"];function jXe(t,n){if(t&1&&ce(0,"div"),t&2){let e=n.$implicit,i=n.$index,o=P(3);Oe(e===0?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),Ir("transform",o._calcTickMarkTransform(i))}}function GXe(t,n){if(t&1&&lo(0,jXe,1,4,"div",8,dV),t&2){let e=P(2);co(e._tickMarks)}}function $Xe(t,n){if(t&1&&(k(0,"div",6,1),qe(2,GXe,2,0),D()),t&2){let e=P();T(2),Ke(e._cachedWidth?2:-1)}}function qXe(t,n){if(t&1&&ce(0,"mat-slider-visual-thumb",7),t&2){let e=P();E("discrete",e.discrete)("thumbPosition",1)("valueIndicatorText",e.startValueIndicatorText)}}var ta=(function(t){return t[t.START=1]="START",t[t.END=2]="END",t})(ta||{}),mP=(function(t){return t[t.ACTIVE=0]="ACTIVE",t[t.INACTIVE=1]="INACTIVE",t})(mP||{}),fae=new fi("_MatSlider"),ZEe=new fi("_MatSliderThumb"),KXe=new fi("_MatSliderRangeThumb"),XEe=new fi("_MatSliderVisualThumb");var WXe=(()=>{class t{_cdr=re(Gi);_ngZone=re(_n);_slider=re(fae);_renderer=re(Ps);_listenerCleanups;discrete;thumbPosition;valueIndicatorText;_ripple;_knob;_valueIndicatorContainer;_sliderInput;_sliderInputEl;_hoverRippleRef;_focusRippleRef;_activeRippleRef;_isHovered=!1;_isActive=!1;_isValueIndicatorVisible=!1;_hostElement=re(Bn).nativeElement;_platform=re(ba);constructor(){}ngAfterViewInit(){let e=this._slider._getInput(this.thumbPosition);e&&(this._ripple.radius=24,this._sliderInput=e,this._sliderInputEl=this._sliderInput._hostElement,this._ngZone.runOutsideAngular(()=>{let i=this._sliderInputEl,o=this._renderer;this._listenerCleanups=[o.listen(i,"pointermove",this._onPointerMove),o.listen(i,"pointerdown",this._onDragStart),o.listen(i,"pointerup",this._onDragEnd),o.listen(i,"pointerleave",this._onMouseLeave),o.listen(i,"focus",this._onFocus),o.listen(i,"blur",this._onBlur)]}))}ngOnDestroy(){this._listenerCleanups?.forEach(e=>e())}_onPointerMove=e=>{if(this._sliderInput._isFocused)return;let i=this._hostElement.getBoundingClientRect(),o=this._slider._isCursorOnSliderThumb(e,i);this._isHovered=o,o?this._showHoverRipple():this._hideRipple(this._hoverRippleRef)};_onMouseLeave=()=>{this._isHovered=!1,this._hideRipple(this._hoverRippleRef)};_onFocus=()=>{this._hideRipple(this._hoverRippleRef),this._showFocusRipple(),this._hostElement.classList.add("mdc-slider__thumb--focused")};_onBlur=()=>{this._isActive||this._hideRipple(this._focusRippleRef),this._isHovered&&this._showHoverRipple(),this._hostElement.classList.remove("mdc-slider__thumb--focused")};_onDragStart=e=>{e.button===0&&(this._isActive=!0,this._showActiveRipple())};_onDragEnd=()=>{this._isActive=!1,this._hideRipple(this._activeRippleRef),this._sliderInput._isFocused||this._hideRipple(this._focusRippleRef),this._platform.SAFARI&&this._showHoverRipple()};_showHoverRipple(){this._isShowingRipple(this._hoverRippleRef)||(this._hoverRippleRef=this._showRipple({enterDuration:0,exitDuration:0}),this._hoverRippleRef?.element.classList.add("mat-mdc-slider-hover-ripple"))}_showFocusRipple(){this._isShowingRipple(this._focusRippleRef)||(this._focusRippleRef=this._showRipple({enterDuration:0,exitDuration:0},!0),this._focusRippleRef?.element.classList.add("mat-mdc-slider-focus-ripple"))}_showActiveRipple(){this._isShowingRipple(this._activeRippleRef)||(this._activeRippleRef=this._showRipple({enterDuration:225,exitDuration:400}),this._activeRippleRef?.element.classList.add("mat-mdc-slider-active-ripple"))}_isShowingRipple(e){return e?.state===ig.FADING_IN||e?.state===ig.VISIBLE}_showRipple(e,i){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(this.thumbPosition===ta.START?ta.END:ta.START)._showValueIndicator(),!(this._slider._globalRippleOptions?.disabled&&!i)))return this._ripple.launch({animation:this._slider._noopAnimations?{enterDuration:0,exitDuration:0}:e,centered:!0,persistent:!0})}_hideRipple(e){if(e?.fadeOut(),this._isShowingAnyRipple())return;this._slider._isRange||this._hideValueIndicator();let i=this._getSibling();i._isShowingAnyRipple()||(this._hideValueIndicator(),i._hideValueIndicator())}_showValueIndicator(){this._hostElement.classList.add("mdc-slider__thumb--with-indicator")}_hideValueIndicator(){this._hostElement.classList.remove("mdc-slider__thumb--with-indicator")}_getSibling(){return this._slider._getThumb(this.thumbPosition===ta.START?ta.END:ta.START)}_getValueIndicatorContainer(){return this._valueIndicatorContainer?.nativeElement}_getKnob(){return this._knob.nativeElement}_isShowingAnyRipple(){return this._isShowingRipple(this._hoverRippleRef)||this._isShowingRipple(this._focusRippleRef)||this._isShowingRipple(this._activeRippleRef)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(i,o){if(i&1&&(Ri(im,5),Ri(BXe,5),Ri(VXe,5)),i&2){let r;Le(r=Ne())&&(o._ripple=r.first),Le(r=Ne())&&(o._knob=r.first),Le(r=Ne())&&(o._valueIndicatorContainer=r.first)}},hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},features:[jt([{provide:XEe,useExisting:t}])],decls:4,vars:2,consts:[["knob",""],["valueIndicatorContainer",""],[1,"mdc-slider__value-indicator-container"],[1,"mdc-slider__thumb-knob"],["matRipple","",1,"mat-focus-indicator",3,"matRippleDisabled"],[1,"mdc-slider__value-indicator"],[1,"mdc-slider__value-indicator-text"]],template:function(i,o){i&1&&(qe(0,zXe,5,1,"div",2),ce(1,"div",3,0)(3,"div",4)),i&2&&(Ke(o.discrete?0:-1),T(3),E("matRippleDisabled",!0))},dependencies:[im],styles:[`.mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px} `],encapsulation:2,changeDetection:0})}return t})(),eq=(()=>{class t{_ngZone=re(_n);_cdr=re(Gi);_elementRef=re(Bn);_dir=re(ad,{optional:!0});_globalRippleOptions=re(n2,{optional:!0});_trackActive;_thumbs;_input;_inputs;get disabled(){return this._disabled}set disabled(e){this._disabled=e;let i=this._getInput(ta.END),o=this._getInput(ta.START);i&&(i.disabled=this._disabled),o&&(o.disabled=this._disabled)}_disabled=!1;get discrete(){return this._discrete}set discrete(e){this._discrete=e,this._updateValueIndicatorUIs()}_discrete=!1;get showTickMarks(){return this._showTickMarks}set showTickMarks(e){this._showTickMarks=e,this._hasViewInitialized&&(this._updateTickMarkUI(),this._updateTickMarkTrackUI())}_showTickMarks=!1;get min(){return this._min}set min(e){let i=e==null||isNaN(e)?this._min:e;this._min!==i&&this._updateMin(i)}_min=0;color;disableRipple=!1;_updateMin(e){let i=this._min;this._min=e,this._isRange?this._updateMinRange({old:i,new:e}):this._updateMinNonRange(e),this._onMinMaxOrStepChange()}_updateMinRange(e){let i=this._getInput(ta.END),o=this._getInput(ta.START),r=i.value,s=o.value;o.min=e.new,i.min=Math.max(e.new,o.value),o.max=Math.min(i.max,i.value),o._updateWidthInactive(),i._updateWidthInactive(),e.newe.old?this._onTranslateXChangeBySideEffect(o,i):this._onTranslateXChangeBySideEffect(i,o),r!==i.value&&this._onValueChange(i),s!==o.value&&this._onValueChange(o)}_updateMaxNonRange(e){let i=this._getInput(ta.END);if(i){let o=i.value;i.max=e,i._updateThumbUIByValue(),this._updateTrackUI(i),o!==i.value&&this._onValueChange(i)}}get step(){return this._step}set step(e){let i=isNaN(e)?this._step:e;this._step!==i&&this._updateStep(i)}_step=1;_updateStep(e){this._step=e,this._isRange?this._updateStepRange():this._updateStepNonRange(),this._onMinMaxOrStepChange()}_updateStepRange(){let e=this._getInput(ta.END),i=this._getInput(ta.START),o=e.value,r=i.value,s=i.value;e.min=this._min,i.max=this._max,e.step=this._step,i.step=this._step,this._platform.SAFARI&&(e.value=e.value,i.value=i.value),e.min=Math.max(this._min,i.value),i.max=Math.min(this._max,e.value),i._updateWidthInactive(),e._updateWidthInactive(),e.value`${e}`;_tickMarks;_noopAnimations=Cl();_dirChangeSubscription;_resizeObserver;_cachedWidth;_cachedLeft;_rippleRadius=24;startValueIndicatorText="";endValueIndicatorText="";_endThumbTransform;_startThumbTransform;_isRange=!1;_isRtl=!1;_hasViewInitialized=!1;_tickMarkTrackWidth=0;_hasAnimation=!1;_resizeTimer=null;_platform=re(ba);constructor(){re(kl).load(hp),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>this._onDirChange()),this._isRtl=this._dir.value==="rtl")}_knobRadius=8;_inputPadding;ngAfterViewInit(){this._platform.isBrowser&&this._updateDimensions();let e=this._getInput(ta.END),i=this._getInput(ta.START);this._isRange=!!e&&!!i,this._cdr.detectChanges();let o=this._getThumb(ta.END);this._rippleRadius=o._ripple.radius,this._inputPadding=this._rippleRadius-this._knobRadius,this._isRange?this._initUIRange(e,i):this._initUINonRange(e),this._updateTrackUI(e),this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._observeHostResize(),this._cdr.detectChanges()}_initUINonRange(e){e.initProps(),e.initUI(),this._updateValueIndicatorUI(e),this._hasViewInitialized=!0,e._updateThumbUIByValue()}_initUIRange(e,i){e.initProps(),e.initUI(),i.initProps(),i.initUI(),e._updateMinMax(),i._updateMinMax(),e._updateStaticStyles(),i._updateStaticStyles(),this._updateValueIndicatorUIs(),this._hasViewInitialized=!0,e._updateThumbUIByValue(),i._updateThumbUIByValue()}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._resizeObserver?.disconnect(),this._resizeObserver=null}_onDirChange(){this._isRtl=this._dir?.value==="rtl",this._isRange?this._onDirChangeRange():this._onDirChangeNonRange(),this._updateTickMarkUI()}_onDirChangeRange(){let e=this._getInput(ta.END),i=this._getInput(ta.START);e._setIsLeftThumb(),i._setIsLeftThumb(),e.translateX=e._calcTranslateXByValue(),i.translateX=i._calcTranslateXByValue(),e._updateStaticStyles(),i._updateStaticStyles(),e._updateWidthInactive(),i._updateWidthInactive(),e._updateThumbUIByValue(),i._updateThumbUIByValue()}_onDirChangeNonRange(){this._getInput(ta.END)._updateThumbUIByValue()}_observeHostResize(){typeof ResizeObserver>"u"||!ResizeObserver||this._ngZone.runOutsideAngular(()=>{this._resizeObserver=new ResizeObserver(()=>{this._isActive()||(this._resizeTimer&&clearTimeout(this._resizeTimer),this._onResize())}),this._resizeObserver.observe(this._elementRef.nativeElement)})}_isActive(){return this._getThumb(ta.START)._isActive||this._getThumb(ta.END)._isActive}_getValue(e=ta.END){let i=this._getInput(e);return i?i.value:this.min}_skipUpdate(){return!!(this._getInput(ta.START)?._skipUIUpdate||this._getInput(ta.END)?._skipUIUpdate)}_updateDimensions(){this._cachedWidth=this._elementRef.nativeElement.offsetWidth,this._cachedLeft=this._elementRef.nativeElement.getBoundingClientRect().left}_setTrackActiveStyles(e){let i=this._trackActive.nativeElement.style;i.left=e.left,i.right=e.right,i.transformOrigin=e.transformOrigin,i.transform=e.transform}_calcTickMarkTransform(e){let i=e*(this._tickMarkTrackWidth/(this._tickMarks.length-1));return`translateX(${this._isRtl?this._cachedWidth-6-i:i}px`}_onTranslateXChange(e){this._hasViewInitialized&&(this._updateThumbUI(e),this._updateTrackUI(e),this._updateOverlappingThumbUI(e))}_onTranslateXChangeBySideEffect(e,i){this._hasViewInitialized&&(e._updateThumbUIByValue(),i._updateThumbUIByValue())}_onValueChange(e){this._hasViewInitialized&&(this._updateValueIndicatorUI(e),this._updateTickMarkUI(),this._cdr.detectChanges())}_onMinMaxOrStepChange(){this._hasViewInitialized&&(this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.markForCheck())}_onResize(){if(this._hasViewInitialized){if(this._updateDimensions(),this._isRange){let e=this._getInput(ta.END),i=this._getInput(ta.START);e._updateThumbUIByValue(),i._updateThumbUIByValue(),e._updateStaticStyles(),i._updateStaticStyles(),e._updateMinMax(),i._updateMinMax(),e._updateWidthInactive(),i._updateWidthInactive()}else{let e=this._getInput(ta.END);e&&e._updateThumbUIByValue()}this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.detectChanges()}}_thumbsOverlap=!1;_areThumbsOverlapping(){let e=this._getInput(ta.START),i=this._getInput(ta.END);return!e||!i?!1:i.translateX-e.translateX<20}_updateOverlappingThumbClassNames(e){let i=e.getSibling(),o=this._getThumb(e.thumbPosition);this._getThumb(i.thumbPosition)._hostElement.classList.remove("mdc-slider__thumb--top"),o._hostElement.classList.toggle("mdc-slider__thumb--top",this._thumbsOverlap)}_updateOverlappingThumbUI(e){!this._isRange||this._skipUpdate()||this._thumbsOverlap!==this._areThumbsOverlapping()&&(this._thumbsOverlap=!this._thumbsOverlap,this._updateOverlappingThumbClassNames(e))}_updateThumbUI(e){if(this._skipUpdate())return;let i=this._getThumb(e.thumbPosition===ta.END?ta.END:ta.START);i._hostElement.style.transform=`translateX(${e.translateX}px)`}_updateValueIndicatorUI(e){if(this._skipUpdate())return;let i=this.displayWith(e.value);if(this._hasViewInitialized?e._valuetext.set(i):e._hostElement.setAttribute("aria-valuetext",i),this.discrete){e.thumbPosition===ta.START?this.startValueIndicatorText=i:this.endValueIndicatorText=i;let o=this._getThumb(e.thumbPosition);i.length<3?o._hostElement.classList.add("mdc-slider__thumb--short-value"):o._hostElement.classList.remove("mdc-slider__thumb--short-value")}}_updateValueIndicatorUIs(){let e=this._getInput(ta.END),i=this._getInput(ta.START);e&&this._updateValueIndicatorUI(e),i&&this._updateValueIndicatorUI(i)}_updateTickMarkTrackUI(){if(!this.showTickMarks||this._skipUpdate())return;let e=this._step&&this._step>0?this._step:1,o=(Math.floor(this.max/e)*e-this.min)/(this.max-this.min);this._tickMarkTrackWidth=(this._cachedWidth-6)*o}_updateTrackUI(e){this._skipUpdate()||(this._isRange?this._updateTrackUIRange(e):this._updateTrackUINonRange(e))}_updateTrackUIRange(e){let i=e.getSibling();if(!i||!this._cachedWidth)return;let o=Math.abs(i.translateX-e.translateX)/this._cachedWidth;e._isLeftThumb&&this._cachedWidth?this._setTrackActiveStyles({left:"auto",right:`${this._cachedWidth-i.translateX}px`,transformOrigin:"right",transform:`scaleX(${o})`}):this._setTrackActiveStyles({left:`${i.translateX}px`,right:"auto",transformOrigin:"left",transform:`scaleX(${o})`})}_updateTrackUINonRange(e){this._isRtl?this._setTrackActiveStyles({left:"auto",right:"0px",transformOrigin:"right",transform:`scaleX(${1-e.fillPercentage})`}):this._setTrackActiveStyles({left:"0px",right:"auto",transformOrigin:"left",transform:`scaleX(${e.fillPercentage})`})}_updateTickMarkUI(){if(!this.showTickMarks||this.step===void 0||this.min===void 0||this.max===void 0)return;let e=this.step>0?this.step:1;this._isRange?this._updateTickMarkUIRange(e):this._updateTickMarkUINonRange(e)}_updateTickMarkUINonRange(e){let i=this._getValue(),o=Math.max(Math.round((i-this.min)/e),0)+1,r=Math.max(Math.round((this.max-i)/e),0)-1;this._isRtl?o++:r++,this._tickMarks=Array(o).fill(mP.ACTIVE).concat(Array(r).fill(mP.INACTIVE))}_updateTickMarkUIRange(e){let i=this._getValue(),o=this._getValue(ta.START),r=Math.max(Math.round((o-this.min)/e),0),s=Math.max(Math.round((i-o)/e)+1,0),d=Math.max(Math.round((this.max-i)/e),0);this._tickMarks=Array(r).fill(mP.INACTIVE).concat(Array(s).fill(mP.ACTIVE),Array(d).fill(mP.INACTIVE))}_getInput(e){if(e===ta.END&&this._input)return this._input;if(this._inputs?.length)return e===ta.START?this._inputs.first:this._inputs.last}_getThumb(e){return e===ta.END?this._thumbs?.last:this._thumbs?.first}_setTransition(e){this._hasAnimation=!this._platform.IOS&&e&&!this._noopAnimations,this._elementRef.nativeElement.classList.toggle("mat-mdc-slider-with-animation",this._hasAnimation)}_isCursorOnSliderThumb(e,i){let o=i.width/2,r=i.x+o,s=i.y+o,d=e.clientX-r,m=e.clientY-s;return Math.pow(d,2)+Math.pow(m,2)V5),multi:!0};var V5=(()=>{class t{_ngZone=re(_n);_elementRef=re(Bn);_cdr=re(Gi);_slider=re(fae);_platform=re(ba);_listenerCleanups;get value(){return ln(this._hostElement.value,0)}set value(e){e===null&&(e=this._getDefaultValue()),e=isNaN(e)?0:e;let i=e+"";if(!this._hasSetInitialValue){this._initialValue=i;return}this._isActive||this._setValue(i)}_setValue(e){this._hostElement.value=e,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges(),this._slider._cdr.markForCheck()}valueChange=new ve;dragStart=new ve;dragEnd=new ve;get translateX(){return this._slider.min>=this._slider.max?(this._translateX=this._tickMarkOffset,this._translateX):(this._translateX===void 0&&(this._translateX=this._calcTranslateXByValue()),this._translateX)}set translateX(e){this._translateX=e}_translateX;thumbPosition=ta.END;get min(){return ln(this._hostElement.min,0)}set min(e){this._hostElement.min=e+"",this._cdr.detectChanges()}get max(){return ln(this._hostElement.max,0)}set max(e){this._hostElement.max=e+"",this._cdr.detectChanges()}get step(){return ln(this._hostElement.step,0)}set step(e){this._hostElement.step=e+"",this._cdr.detectChanges()}get disabled(){return je(this._hostElement.disabled)}set disabled(e){this._hostElement.disabled=e,this._cdr.detectChanges(),this._slider.disabled!==this.disabled&&(this._slider.disabled=this.disabled)}get percentage(){return this._slider.min>=this._slider.max?this._slider._isRtl?1:0:(this.value-this._slider.min)/(this._slider.max-this._slider.min)}get fillPercentage(){return this._slider._cachedWidth?this._translateX===0?0:this.translateX/this._slider._cachedWidth:this._slider._isRtl?1:0}_hostElement=this._elementRef.nativeElement;_valuetext=Zn("");_knobRadius=8;_tickMarkOffset=3;_isActive=!1;_isFocused=!1;_setIsFocused(e){this._isFocused=e}_hasSetInitialValue=!1;_initialValue;_formControl;_destroyed=new hi;_skipUIUpdate=!1;_onChangeFn;_onTouchedFn=()=>{};_isControlInitialized=!1;constructor(){let e=re(Ps);this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[e.listen(this._hostElement,"pointerdown",this._onPointerDown.bind(this)),e.listen(this._hostElement,"pointermove",this._onPointerMove.bind(this)),e.listen(this._hostElement,"pointerup",this._onPointerUp.bind(this))]})}ngOnDestroy(){this._listenerCleanups.forEach(e=>e()),this._destroyed.next(),this._destroyed.complete(),this.dragStart.complete(),this.dragEnd.complete()}initProps(){this._updateWidthInactive(),this.disabled!==this._slider.disabled&&(this._slider.disabled=!0),this.step=this._slider.step,this.min=this._slider.min,this.max=this._slider.max,this._initValue()}initUI(){this._updateThumbUIByValue()}_initValue(){this._hasSetInitialValue=!0,this._initialValue===void 0?this.value=this._getDefaultValue():(this._hostElement.value=this._initialValue,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges())}_getDefaultValue(){return this.min}_onBlur(){this._setIsFocused(!1),this._onTouchedFn()}_onFocus(){this._slider._setTransition(!1),this._slider._updateTrackUI(this),this._setIsFocused(!0)}_onChange(){this.valueChange.emit(this.value),this._isActive&&this._updateThumbUIByValue({withAnimation:!0})}_onInput(){this._onChangeFn?.(this.value),(this._slider.step||!this._isActive)&&this._updateThumbUIByValue({withAnimation:!0}),this._slider._onValueChange(this)}_onNgControlValueChange(){(!this._isActive||!this._isFocused)&&(this._slider._onValueChange(this),this._updateThumbUIByValue()),this._slider.disabled=this._formControl.disabled}_onPointerDown(e){if(!(this.disabled||e.button!==0)){if(this._platform.IOS){let i=this._slider._isCursorOnSliderThumb(e,this._slider._getThumb(this.thumbPosition)._hostElement.getBoundingClientRect());this._isActive=i,this._updateWidthActive(),this._slider._updateDimensions();return}this._isActive=!0,this._setIsFocused(!0),this._updateWidthActive(),this._slider._updateDimensions(),this._slider.step||this._updateThumbUIByPointerEvent(e,{withAnimation:!0}),this.disabled||(this._handleValueCorrection(e),this.dragStart.emit({source:this,parent:this._slider,value:this.value}))}}_handleValueCorrection(e){this._skipUIUpdate=!0,setTimeout(()=>{this._skipUIUpdate=!1,this._fixValue(e)},0)}_fixValue(e){let i=e.clientX-this._slider._cachedLeft,o=this._slider._cachedWidth,r=this._slider.step===0?1:this._slider.step,s=Math.floor((this._slider.max-this._slider.min)/r),d=this._slider._isRtl?1-i/o:i/o,v=Math.round(d*s)/s*(this._slider.max-this._slider.min)+this._slider.min,w=Math.round(v/r)*r,O=this.value;if(w===O){this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation});return}this.value=w,this.valueChange.emit(this.value),this._onChangeFn?.(this.value),this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation})}_onPointerMove(e){!this._slider.step&&this._isActive&&this._updateThumbUIByPointerEvent(e)}_onPointerUp(){this._isActive&&(this._isActive=!1,this._platform.SAFARI&&this._setIsFocused(!1),this.dragEnd.emit({source:this,parent:this._slider,value:this.value}),setTimeout(()=>this._updateWidthInactive(),this._platform.IOS?10:0))}_clamp(e){let i=this._tickMarkOffset,o=this._slider._cachedWidth-this._tickMarkOffset;return Math.max(Math.min(e,o),i)}_calcTranslateXByValue(){return this._slider._isRtl?(1-this.percentage)*(this._slider._cachedWidth-this._tickMarkOffset*2)+this._tickMarkOffset:this.percentage*(this._slider._cachedWidth-this._tickMarkOffset*2)+this._tickMarkOffset}_calcTranslateXByPointerEvent(e){return e.clientX-this._slider._cachedLeft}_updateWidthActive(){}_updateWidthInactive(){this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`,this._hostElement.style.width=`calc(100% + ${this._slider._inputPadding-this._tickMarkOffset*2}px)`,this._hostElement.style.left=`-${this._slider._rippleRadius-this._tickMarkOffset}px`}_updateThumbUIByValue(e){this.translateX=this._clamp(this._calcTranslateXByValue()),this._updateThumbUI(e)}_updateThumbUIByPointerEvent(e,i){this.translateX=this._clamp(this._calcTranslateXByPointerEvent(e)),this._updateThumbUI(i)}_updateThumbUI(e){this._slider._setTransition(!!e?.withAnimation),this._slider._onTranslateXChange(this)}writeValue(e){(this._isControlInitialized||e!==null)&&(this.value=e)}registerOnChange(e){this._onChangeFn=e,this._isControlInitialized=!0}registerOnTouched(e){this._onTouchedFn=e}setDisabledState(e){this.disabled=e}focus(){this._hostElement.focus()}blur(){this._hostElement.blur()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["input","matSliderThumb",""]],hostAttrs:["type","range",1,"mdc-slider__input"],hostVars:1,hostBindings:function(i,o){i&1&&ie("change",function(){return o._onChange()})("input",function(){return o._onInput()})("blur",function(){return o._onBlur()})("focus",function(){return o._onFocus()}),i&2&&Ge("aria-valuetext",o._valuetext())},inputs:{value:[2,"value","value",ln]},outputs:{valueChange:"valueChange",dragStart:"dragStart",dragEnd:"dragEnd"},exportAs:["matSliderThumb"],features:[jt([YXe,{provide:ZEe,useExisting:t}])]})}return t})();var tq=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,Qg]})}return t})();var iq=(()=>{class t{_animationsDisabled=Cl();state="unchecked";disabled=!1;appearance="full";constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(i,o){i&2&&Vn("mat-pseudo-checkbox-indeterminate",o.state==="indeterminate")("mat-pseudo-checkbox-checked",o.state==="checked")("mat-pseudo-checkbox-disabled",o.disabled)("mat-pseudo-checkbox-minimal",o.appearance==="minimal")("mat-pseudo-checkbox-full",o.appearance==="full")("_mat-animation-noopable",o._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(i,o){},styles:[`.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-minimal-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-pseudo-checkbox-full-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-pseudo-checkbox-full-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-pseudo-checkbox-full-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-full-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-pseudo-checkbox-full-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-full-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px} `],encapsulation:2,changeDetection:0})}return t})();var QXe=["text"],ZXe=[[["mat-icon"]],"*"],XXe=["mat-icon","*"];function JXe(t,n){if(t&1&&ce(0,"mat-pseudo-checkbox",1),t&2){let e=P();E("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function eJe(t,n){if(t&1&&ce(0,"mat-pseudo-checkbox",3),t&2){let e=P();E("disabled",e.disabled)}}function tJe(t,n){if(t&1&&(k(0,"span",4),Q(1),D()),t&2){let e=P();T(),Qi("(",e.group.label,")")}}var oq=new fi("MAT_OPTION_PARENT_COMPONENT"),rq=new fi("MatOptgroup");var nq=class{source;isUserInput;constructor(n,e=!1){this.source=n,this.isUserInput=e}},bh=(()=>{class t{_element=re(Bn);_changeDetectorRef=re(Gi);_parent=re(oq,{optional:!0});group=re(rq,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=re(ul).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=Zn(!1);get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new ve;_text;_stateChanges=new hi;constructor(){let e=re(kl);e.load(hp),e.load(BI),this._signalDisableRipple=!!this._parent&&TC(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,i){let o=this._getHostElement();typeof o.focus=="function"&&o.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!pu(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new nq(this,e))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-option"]],viewQuery:function(i,o){if(i&1&&Ri(QXe,7),i&2){let r;Le(r=Ne())&&(o._text=r.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(i,o){i&1&&ie("click",function(){return o._selectViaInteraction()})("keydown",function(s){return o._handleKeydown(s)}),i&2&&(Rr("id",o.id),Ge("aria-selected",o.selected)("aria-disabled",o.disabled.toString()),Vn("mdc-list-item--selected",o.selected)("mat-mdc-option-multiple",o.multiple)("mat-mdc-option-active",o.active)("mdc-list-item--disabled",o.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",je]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:XXe,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(i,o){i&1&&(Nn(ZXe),qe(0,JXe,1,2,"mat-pseudo-checkbox",1),pn(1),k(2,"span",2,0),pn(4,1),D(),qe(5,eJe,1,1,"mat-pseudo-checkbox",3),qe(6,tJe,2,1,"span",4),ce(7,"div",5)),i&2&&(Ke(o.multiple?0:-1),T(5),Ke(!o.multiple&&o.selected&&!o.hideSingleSelectionIndicator?5:-1),T(),Ke(o.group&&o.group._inert?6:-1),T(),E("matRippleTrigger",o._getHostElement())("matRippleDisabled",o.disabled||o.disableRipple))},dependencies:[iq,im],styles:[`.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mat-list-list-item-selected-container-color: var(--mat-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:""} `],encapsulation:2,changeDetection:0})}return t})();function gae(t,n,e){if(e.length){let i=n.toArray(),o=e.toArray(),r=0;for(let s=0;se+i?Math.max(0,t-i+n):e}var sq=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br]})}return t})();var ry=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Qg,Br,sq,bh]})}return t})();function iJe(t,n){t&1&&to(0,"div",2)}var nJe=new fi("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");var tDe=(()=>{class t{_elementRef=re(Bn);_ngZone=re(_n);_changeDetectorRef=re(Gi);_renderer=re(Ps);_cleanupTransitionEnd;constructor(){let e=T5(),i=re(nJe,{optional:!0});this._isNoopAnimation=e==="di-disabled",e==="reduced-motion"&&this._elementRef.nativeElement.classList.add("mat-progress-bar-reduced-motion"),i&&(i.color&&(this.color=this._defaultColor=i.color),this.mode=i.mode||this.mode)}_isNoopAnimation;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";get value(){return this._value}set value(e){this._value=eDe(e||0),this._changeDetectorRef.markForCheck()}_value=0;get bufferValue(){return this._bufferValue||0}set bufferValue(e){this._bufferValue=eDe(e||0),this._changeDetectorRef.markForCheck()}_bufferValue=0;animationEnd=new ve;get mode(){return this._mode}set mode(e){this._mode=e,this._changeDetectorRef.markForCheck()}_mode="determinate";ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._cleanupTransitionEnd=this._renderer.listen(this._elementRef.nativeElement,"transitionend",this._transitionendHandler)})}ngOnDestroy(){this._cleanupTransitionEnd?.()}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${this.mode==="buffer"?this.bufferValue:100}%`}_isIndeterminate(){return this.mode==="indeterminate"||this.mode==="query"}_transitionendHandler=e=>{this.animationEnd.observers.length===0||!e.target||!e.target.classList.contains("mdc-linear-progress__primary-bar")||(this.mode==="determinate"||this.mode==="buffer")&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))};static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(i,o){i&2&&(Ge("aria-valuenow",o._isIndeterminate()?null:o.value)("mode",o.mode),Oe("mat-"+o.color),Vn("_mat-animation-noopable",o._isNoopAnimation)("mdc-linear-progress--animation-ready",!o._isNoopAnimation)("mdc-linear-progress--indeterminate",o._isIndeterminate()))},inputs:{color:"color",value:[2,"value","value",ln],bufferValue:[2,"bufferValue","bufferValue",ln],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],decls:7,vars:5,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(i,o){i&1&&(Go(0,"div",0),to(1,"div",1),qe(2,iJe,1,0,"div",2),Ho(),Go(3,"div",3),to(4,"span",4),Ho(),Go(5,"div",5),to(6,"span",4),Ho()),i&2&&(T(),Ir("flex-basis",o._getBufferBarFlexBasis()),T(),Ke(o.mode==="buffer"?2:-1),T(),Ir("transform",o._getPrimaryBarTransform()))},styles:[`.mat-mdc-progress-bar{--mat-progress-bar-animation-multiplier: 1;display:block;text-align:start}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}.mat-progress-bar-reduced-motion{--mat-progress-bar-animation-multiplier: 2}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:max(var(--mat-progress-bar-track-height, 4px),var(--mat-progress-bar-active-indicator-height, 4px))}@media(forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:var(--mat-progress-bar-active-indicator-height, 4px)}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}[dir=rtl] .mdc-linear-progress__bar{right:0;transform-origin:center right}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid;border-color:var(--mat-progress-bar-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-progress-bar-active-indicator-height, 4px)}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden;height:var(--mat-progress-bar-track-height, 4px);border-radius:var(--mat-progress-bar-track-shape, var(--mat-sys-corner-none))}.mdc-linear-progress__buffer-dots{background-image:radial-gradient(circle, var(--mat-progress-bar-track-color, var(--mat-sys-surface-variant)) calc(var(--mat-progress-bar-track-height, 4px) / 2), transparent 0);background-repeat:repeat-x;background-size:calc(calc(var(--mat-progress-bar-track-height, 4px) / 2)*5);background-position:left;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering calc(250ms*var(--mat-progress-bar-animation-multiplier)) infinite linear}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}[dir=rtl] .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse calc(250ms*var(--mat-progress-bar-animation-multiplier)) infinite linear;transform:rotate(0)}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);background-color:var(--mat-progress-bar-track-color, var(--mat-sys-surface-variant))}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mat-progress-bar-track-height, 4px) * -2.5))}}@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(-83.67142%)}100%{transform:translateX(-200.611057%)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(-37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(-84.386165%)}100%{transform:translateX(-160.277782%)}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}} `],encapsulation:2,changeDetection:0})}return t})();function eDe(t,n=0,e=100){return Math.max(n,Math.min(e,t))}var iDe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br]})}return t})();var rJe=["mat-internal-form-field",""],sJe=["*"],fP=(()=>{class t{labelPosition;static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(i,o){i&2&&Vn("mdc-form-field--align-end",o.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:rJe,ngContentSelectors:sJe,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},styles:[`.mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0} `],encapsulation:2,changeDetection:0})}return t})();var r2=new fi("MAT_DATE_LOCALE",{providedIn:"root",factory:aJe});function aJe(){return re(cp)}var gP="Method not implemented",$I=class{locale;_localeChanges=new hi;localeChanges=this._localeChanges;setTime(n,e,i,o){throw new Error(gP)}getHours(n){throw new Error(gP)}getMinutes(n){throw new Error(gP)}getSeconds(n){throw new Error(gP)}parseTime(n,e){throw new Error(gP)}addSeconds(n,e){throw new Error(gP)}getValidDateOrNull(n){return this.isDateInstance(n)&&this.isValid(n)?n:null}deserialize(n){return n==null||this.isDateInstance(n)&&this.isValid(n)?n:this.invalid()}setLocale(n){this.locale=n,this._localeChanges.next()}compareDate(n,e){return this.getYear(n)-this.getYear(e)||this.getMonth(n)-this.getMonth(e)||this.getDate(n)-this.getDate(e)}compareTime(n,e){return this.getHours(n)-this.getHours(e)||this.getMinutes(n)-this.getMinutes(e)||this.getSeconds(n)-this.getSeconds(e)}sameDate(n,e){if(n&&e){let i=this.isValid(n),o=this.isValid(e);return i&&o?!this.compareDate(n,e):i==o}return n==e}sameTime(n,e){if(n&&e){let i=this.isValid(n),o=this.isValid(e);return i&&o?!this.compareTime(n,e):i==o}return n==e}clampDate(n,e,i){return e&&this.compareDate(n,e)<0?e:i&&this.compareDate(n,i)>0?i:n}},z5=new fi("mat-date-formats");var lJe=t=>({backgroundColor:t});function cJe(t,n){if(t&1&&to(0,"div",1),t&2){let e=P();$r(ki(2,lJe,e.colorString||"#ffffff"))}}function dJe(t,n){t&1&&(Go(0,"div",1),to(1,"div",2),Ho())}var lq=(()=>{class t{constructor(){this.colorString="#FFFFFF"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-color-select-example"]],inputs:{colorString:"colorString"},decls:2,vars:2,consts:[[1,"color-example",3,"style"],[1,"color-example"],[1,"color-example-empty"]],template:function(i,o){i&1&&(qe(0,cJe,1,4,"div",0),qe(1,dJe,2,0,"div",1)),i&2&&(Ke(o.colorString?0:-1),T(),Ke(o.colorString?-1:1))},styles:[".color-example[_ngcontent-%COMP%]{width:24px;height:24px;border:1px solid black}.color-example-empty[_ngcontent-%COMP%]{border-bottom:1px solid red;width:34px;transform:rotate(45deg);transform-origin:top left}"]})}}return t})();var cq;function uJe(){if(cq===void 0&&(cq=null,typeof window<"u")){let t=window;t.trustedTypes!==void 0&&(cq=t.trustedTypes.createPolicy("angular#components",{createHTML:n=>n}))}return cq}function U5(t){return uJe()?.createHTML(t)||t}function nDe(t){return Error(`Unable to find icon with the name "${t}"`)}function pJe(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function oDe(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function rDe(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}var Fw=class{url;svgText;options;svgElement;constructor(n,e,i){this.url=n,this.svgText=e,this.options=i}},aDe=(()=>{class t{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(e,i,o,r){this._httpClient=e,this._sanitizer=i,this._errorHandler=r,this._document=o}addSvgIcon(e,i,o){return this.addSvgIconInNamespace("",e,i,o)}addSvgIconLiteral(e,i,o){return this.addSvgIconLiteralInNamespace("",e,i,o)}addSvgIconInNamespace(e,i,o,r){return this._addSvgIconConfig(e,i,new Fw(o,null,r))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,o,r){let s=this._sanitizer.sanitize(uh.HTML,o);if(!s)throw rDe(o);let d=U5(s);return this._addSvgIconConfig(e,i,new Fw("",d,r))}addSvgIconSet(e,i){return this.addSvgIconSetInNamespace("",e,i)}addSvgIconSetLiteral(e,i){return this.addSvgIconSetLiteralInNamespace("",e,i)}addSvgIconSetInNamespace(e,i,o){return this._addSvgIconSetConfig(e,new Fw(i,null,o))}addSvgIconSetLiteralInNamespace(e,i,o){let r=this._sanitizer.sanitize(uh.HTML,i);if(!r)throw rDe(i);let s=U5(r);return this._addSvgIconSetConfig(e,new Fw("",s,o))}registerFontClassAlias(e,i=e){return this._fontCssClassesByAlias.set(e,i),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let i=this._sanitizer.sanitize(uh.RESOURCE_URL,e);if(!i)throw oDe(e);let o=this._cachedIconsByUrl.get(i);return o?ci(dq(o)):this._loadSvgIconFromConfig(new Fw(e,null)).pipe(Vo(r=>this._cachedIconsByUrl.set(i,r)),vt(r=>dq(r)))}getNamedSvgIcon(e,i=""){let o=sDe(i,e),r=this._svgIconConfigs.get(o);if(r)return this._getSvgFromConfig(r);if(r=this._getIconConfigFromResolvers(i,e),r)return this._svgIconConfigs.set(o,r),this._getSvgFromConfig(r);let s=this._iconSetConfigs.get(i);return s?this._getSvgFromIconSetConfigs(e,s):HT(nDe(o))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ci(dq(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(vt(i=>dq(i)))}_getSvgFromIconSetConfigs(e,i){let o=this._extractIconWithNameFromAnySet(e,i);if(o)return ci(o);let r=i.filter(s=>!s.svgText).map(s=>this._loadSvgIconSetFromConfig(s).pipe(Gd(d=>{let v=`Loading icon set URL: ${this._sanitizer.sanitize(uh.RESOURCE_URL,s.url)} failed: ${d.message}`;return this._errorHandler.handleError(new Error(v)),ci(null)})));return tc(r).pipe(vt(()=>{let s=this._extractIconWithNameFromAnySet(e,i);if(!s)throw nDe(e);return s}))}_extractIconWithNameFromAnySet(e,i){for(let o=i.length-1;o>=0;o--){let r=i[o];if(r.svgText&&r.svgText.toString().indexOf(e)>-1){let s=this._svgElementFromConfig(r),d=this._extractSvgIconFromSet(s,e,r.options);if(d)return d}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(Vo(i=>e.svgText=i),vt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ci(null):this._fetchIcon(e).pipe(Vo(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,o){let r=e.querySelector(`[id="${i}"]`);if(!r)return null;let s=r.cloneNode(!0);if(s.removeAttribute("id"),s.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(s,o);if(s.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(s),o);let d=this._svgElementFromString(U5(""));return d.appendChild(s),this._setSvgAttributes(d,o)}_svgElementFromString(e){let i=this._document.createElement("DIV");i.innerHTML=e;let o=i.querySelector("svg");if(!o)throw Error(" tag not found");return o}_toSvgElement(e){let i=this._svgElementFromString(U5("")),o=e.attributes;for(let r=0;rU5(v)),yC(()=>this._inProgressUrlFetches.delete(s)),CB());return this._inProgressUrlFetches.set(s,m),m}_addSvgIconConfig(e,i,o){return this._svgIconConfigs.set(sDe(e,i),o),this}_addSvgIconSetConfig(e,i){let o=this._iconSetConfigs.get(e);return o?o.push(i):this._iconSetConfigs.set(e,[i]),this}_svgElementFromConfig(e){if(!e.svgElement){let i=this._svgElementFromString(e.svgText);this._setSvgAttributes(i,e.options),e.svgElement=i}return e.svgElement}_getIconConfigFromResolvers(e,i){for(let o=0;on?n.pathname+n.search:""}}var lDe=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],yJe=lDe.map(t=>`[${t}]`).join(", "),vJe=/^url\(['"]?#(.*?)['"]?\)$/,mr=(()=>{class t{_elementRef=re(Bn);_iconRegistry=re(aDe);_location=re(gJe);_errorHandler=re(ch);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let i=this._cleanupFontValue(e);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let i=this._cleanupFontValue(e);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName;_svgNamespace;_previousPath;_elementsWithExternalReferences;_currentIconFetch=Xr.EMPTY;constructor(){let e=re(new Bm("aria-hidden"),{optional:!0}),i=re(fJe,{optional:!0});i&&(i.color&&(this.color=this._defaultColor=i.color),i.fontSet&&(this.fontSet=i.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let i=e.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){let o=e.childNodes[i];(o.nodeType!==1||o.nodeName.toLowerCase()==="svg")&&o.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,i=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(o=>o.length>0);this._previousFontSetClass.forEach(o=>e.classList.remove(o)),i.forEach(o=>e.classList.add(o)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&!i.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e=="string"?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let i=this._elementsWithExternalReferences;i&&i.forEach((o,r)=>{o.forEach(s=>{r.setAttribute(s.name,`url('${e}#${s.value}')`)})})}_cacheChildrenWithExternalReferences(e){let i=e.querySelectorAll(yJe),o=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let r=0;r{let d=i[r],m=d.getAttribute(s),v=m?m.match(vJe):null;if(v){let w=o.get(d);w||(w=[],o.set(d,w)),w.push({name:s,value:v[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[i,o]=this._splitIconName(e);i&&(this._svgNamespace=i),o&&(this._svgName=o),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(o,i).pipe(Sn(1)).subscribe(r=>this._setSvgElement(r),r=>{let s=`Error retrieving icon ${i}:${o}! ${r.message}`;this._errorHandler.handleError(new Error(s))})}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(i,o){i&2&&(Ge("data-mat-icon-type",o._usingFontIcon()?"font":"svg")("data-mat-icon-name",o._svgName||o.fontIcon)("data-mat-icon-namespace",o._svgNamespace||o.fontSet)("fontIcon",o._usingFontIcon()?o.fontIcon:null),Oe(o.color?"mat-"+o.color:""),Vn("mat-icon-inline",o.inline)("mat-icon-no-color",o.color!=="primary"&&o.color!=="accent"&&o.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",je],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:mJe,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},styles:[`mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto} `],encapsulation:2,changeDetection:0})}return t})(),$o=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,Br]})}return t})();var bJe=["tooltip"],yae=20;var vae=new fi("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Oo);return()=>a0(t,{scrollThrottle:yae})}});function uDe(t){let n=re(Oo);return()=>a0(n,{scrollThrottle:yae})}var bae={provide:vae,deps:[],useFactory:uDe};function pDe(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var hDe=new fi("mat-tooltip-default-options",{providedIn:"root",factory:pDe});var cDe="tooltip-panel",dDe=NI({passive:!0}),CJe=8,xJe=8,wJe=24,SJe=200,Up=(()=>{class t{_elementRef=re(Bn);_ngZone=re(_n);_platform=re(ba);_ariaDescriber=re(LIe);_focusMonitor=re(gh);_dir=re(ad);_injector=re(Oo);_viewContainerRef=re(nc);_animationsDisabled=Cl();_defaultOptions=re(hDe,{optional:!0});_overlayRef;_tooltipInstance;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=mDe;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending;_dirSubscribed=!1;get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=_h(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let i=_h(e);this._disabled!==i&&(this._disabled=i,i?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=jm(e)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=jm(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(e){let i=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(i)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_passiveListeners=[];_touchstartTimeout=null;_destroyed=new hi;_isDestroyed=!1;constructor(){let e=this._defaultOptions;e&&(this._showDelay=e.showDelay,this._hideDelay=e.hideDelay,e.position&&(this.position=e.position),e.positionAtOrigin&&(this.positionAtOrigin=e.positionAtOrigin),e.touchGestures&&(this.touchGestures=e.touchGestures),e.tooltipClass&&(this.tooltipClass=e.tooltipClass)),this._viewportMargin=CJe}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(cs(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([i,o])=>{e.removeEventListener(i,o,dDe)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,i){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let o=this._createOverlay(i);this._detach(),this._portal=this._portal||new tg(this._tooltipComponent,this._viewContainerRef);let r=this._tooltipInstance=o.attach(this._portal).instance;r._triggerElement=this._elementRef.nativeElement,r._mouseLeaveHideDelay=this._hideDelay,r.afterHidden().pipe(cs(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),r.show(e)}hide(e=this.hideDelay){let i=this._tooltipInstance;i&&(i.isVisible()?i.hide(e):(i._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&s._origin instanceof Bn)return this._overlayRef;this._detach()}let i=this._injector.get(ZC).getAncestorScrollContainers(this._elementRef),o=`${this._cssClassPrefix}-${cDe}`,r=Yk(this._injector,this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(i);return r.positionChanges.pipe(cs(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=Ew(this._injector,{direction:this._dir,positionStrategy:r,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,o]:o,scrollStrategy:this._injector.get(vae)(),disableAnimations:this._animationsDisabled}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(cs(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(cs(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(cs(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&s.keyCode===27&&!pu(s)&&(s.preventDefault(),s.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=!0,this._dir.change.pipe(cs(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let i=e.getConfig().positionStrategy,o=this._getOrigin(),r=this._getOverlayPosition();i.withPositions([this._addOffset(be(be({},o.main),r.main)),this._addOffset(be(be({},o.fallback),r.fallback))])}_addOffset(e){let i=xJe,o=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-i:e.originY==="bottom"?e.offsetY=i:e.originX==="start"?e.offsetX=o?-i:i:e.originX==="end"&&(e.offsetX=o?i:-i),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",i=this.position,o;i=="above"||i=="below"?o={originX:"center",originY:i=="above"?"top":"bottom"}:i=="before"||i=="left"&&e||i=="right"&&!e?o={originX:"start",originY:"center"}:(i=="after"||i=="right"&&e||i=="left"&&!e)&&(o={originX:"end",originY:"center"});let{x:r,y:s}=this._invertPosition(o.originX,o.originY);return{main:o,fallback:{originX:r,originY:s}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",i=this.position,o;i=="above"?o={overlayX:"center",overlayY:"bottom"}:i=="below"?o={overlayX:"center",overlayY:"top"}:i=="before"||i=="left"&&e||i=="right"&&!e?o={overlayX:"end",overlayY:"center"}:(i=="after"||i=="right"&&e||i=="left"&&!e)&&(o={overlayX:"start",overlayY:"center"});let{x:r,y:s}=this._invertPosition(o.overlayX,o.overlayY);return{main:o,fallback:{overlayX:r,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),Ou(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,i){return this.position==="above"||this.position==="below"?i==="top"?i="bottom":i==="bottom"&&(i="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:i}}_updateCurrentPositionClass(e){let{overlayY:i,originX:o,originY:r}=e,s;if(i==="center"?this._dir&&this._dir.value==="rtl"?s=o==="end"?"left":"right":s=o==="start"?"left":"right":s=i==="bottom"&&r==="top"?"above":"below",s!==this._currentPosition){let d=this._overlayRef;if(d){let m=`${this._cssClassPrefix}-${cDe}-`;d.removePanelClass(m+this._currentPosition),d.addPanelClass(m+s)}this._currentPosition=s}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let i;e.x!==void 0&&e.y!==void 0&&(i=e),this.show(void 0,i)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{let i=e.targetTouches?.[0],o=i?{x:i.clientX,y:i.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let r=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,o)},this._defaultOptions?.touchLongPressShowDelay??r)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let e=[];if(this._platformSupportsMouseEvents())e.push(["mouseleave",i=>{let o=i.relatedTarget;(!o||!this._overlayRef?.overlayElement.contains(o))&&this.hide()}],["wheel",i=>this._wheelListener(i)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let i=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};e.push(["touchend",i],["touchcancel",i])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([i,o])=>{this._elementRef.nativeElement.addEventListener(i,o,dDe)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){let i=this._injector.get(Ao).elementFromPoint(e.clientX,e.clientY),o=this._elementRef.nativeElement;i!==o&&!o.contains(i)&&this.hide()}}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let i=this._elementRef.nativeElement,o=i.style;(e==="on"||i.nodeName!=="INPUT"&&i.nodeName!=="TEXTAREA")&&(o.userSelect=o.msUserSelect=o.webkitUserSelect=o.MozUserSelect="none"),(e==="on"||!i.draggable)&&(o.webkitUserDrag="none"),o.touchAction="none",o.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._isDestroyed||Ou({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(i,o){i&2&&Vn("mat-mdc-tooltip-disabled",o.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return t})(),mDe=(()=>{class t{_changeDetectorRef=re(Gi);_elementRef=re(Bn);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=Cl();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new hi;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";constructor(){}show(e){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>wJe&&e.width>=SJe}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let i=this._tooltip.nativeElement,o=this._showAnimation,r=this._hideAnimation;if(i.classList.remove(e?r:o),i.classList.add(e?o:r),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let s=getComputedStyle(i);(s.getPropertyValue("animation-duration")==="0s"||s.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(i.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-tooltip-component"]],viewQuery:function(i,o){if(i&1&&Ri(bJe,7),i&2){let r;Le(r=Ne())&&(o._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(i,o){i&1&&ie("mouseleave",function(s){return o._handleMouseLeave(s)})},decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",1,0),ie("animationend",function(d){return se(r),ae(o._handleAnimationEnd(d))}),k(2,"div",2),Q(3),D()()}i&2&&(Vn("mdc-tooltip--multiline",o._isMultiline),E("ngClass",o.tooltipClass),T(3),dt(o.message))},dependencies:[Ns],styles:[`.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mat-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mat-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mat-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mat-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mat-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mat-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel{line-height:normal}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards} `],encapsulation:2,changeDetection:0})}return t})();var Hp=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[bae],imports:[C5,Uv,Br,Br,Vv]})}return t})();var fDe=()=>({});function TJe(t,n){if(t&1&&(k(0,"a",0),Q(1),D()),t&2){let e=P(2);E("matTooltip",!e.authenticated&&e.config.notAuthenticatedStrategy==="disable"?"Nur f\xFCr angemeldete Nutzer":"")("disabled",!e.authenticated)("routerLink",e.link.path)("queryParams",e.link.queryParams?e.link.queryParams:uo(5,fDe)),T(),Qi(" ",e.link.text," ")}}function IJe(t,n){if(t&1&&(k(0,"div",1)(1,"a",2)(2,"mat-icon"),Q(3),D()()()),t&2){let e=P(2);E("matTooltipDisabled",e.authenticated||e.config.notAuthenticatedStrategy!=="disable"&&!e.authenticated)("matTooltip","Nur f\xFCr angemeldete Nutzer"),T(),E("disabled",!e.authenticated)("routerLink",e.link.path)("queryParams",e.link.queryParams?e.link.queryParams:uo(6,fDe)),T(2),dt(e.link.icon)}}function EJe(t,n){if(t&1&&(qe(0,TJe,2,6,"a",0),qe(1,IJe,4,7,"div",1)),t&2){let e=P();Ke(e.link.type==="text"?0:-1),T(),Ke(e.link.type==="icon"?1:-1)}}var JC=(()=>{class t{constructor(){this.config={notAuthenticatedStrategy:"hide"}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-conditional-authenticated-link"]],inputs:{link:"link",authenticated:"authenticated",config:"config"},decls:1,vars:1,consts:[["mat-button","","color","accent",3,"matTooltip","disabled","routerLink","queryParams"],[3,"matTooltipDisabled","matTooltip"],["mat-icon-button","","color","accent",3,"disabled","routerLink","queryParams"]],template:function(i,o){i&1&&qe(0,EJe,2,2),i&2&&Ke(o.authenticated||!o.authenticated&&o.config.notAuthenticatedStrategy==="disable"?0:-1)},dependencies:[Tn,yo,xl,Hp,Up,Bs,$o,mr],encapsulation:2})}}return t})();var DJe=["*"],uq=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-link-external"]],inputs:{link:"link"},ngContentSelectors:DJe,decls:2,vars:1,consts:[["target","_blank","rel","noopener",3,"href"]],template:function(i,o){i&1&&(Nn(),Go(0,"a",0),pn(1),Ho()),i&2&&Rr("href",o.link,dc)},encapsulation:2})}}return t})();var AJe=["*"],pq=(()=>{class t{constructor(){this.link=[]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-link-internal"]],inputs:{link:"link"},ngContentSelectors:AJe,decls:2,vars:1,consts:[[3,"routerLink"]],template:function(i,o){i&1&&(Nn(),k(0,"a",0),pn(1),D()),i&2&&E("routerLink",o.link)},dependencies:[Bs],encapsulation:2})}}return t})();var hq={target:"_self"};var kJe={type:"loader-circle",width:"100px"},gDe=kJe;var Gt=(function(t){return t[t.INIT=0]="INIT",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.ERROR=3]="ERROR",t})(Gt||{}),mq=class{constructor(){this.state$=new hi}destroy(){this.state$.unsubscribe()}},fq=class extends mq{constructor(){super()}connect(n){this.state$.next(Gt.LOADING),n.then(()=>this.state$.next(Gt.SUCCESS)).catch(()=>this.state$.next(Gt.ERROR))}},gq=class extends mq{constructor(){super()}connect(n){this._loadSubscription=n.pipe(rl(Gt.INIT),Gd(e=>(this.state$.next(Gt.ERROR),e)),wB(e=>!(e instanceof Error))).subscribe(e=>this.state$.next(e))}destroy(){super.destroy(),this._loadSubscription&&this._loadSubscription.unsubscribe()}};var MJe=["determinateSpinner"];function OJe(t,n){if(t&1&&(si(),k(0,"svg",11),ce(1,"circle",12),D()),t&2){let e=P();Ge("viewBox",e._viewBox()),T(),Ir("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Ge("r",e._circleRadius())}}var RJe=new fi("mat-progress-spinner-default-options",{providedIn:"root",factory:FJe});function FJe(){return{diameter:_De}}var _De=100,PJe=10,_q=(()=>{class t{_elementRef=re(Bn);_noopAnimations;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";_determinateCircle;constructor(){let e=re(RJe),i=T5(),o=this._elementRef.nativeElement;this._noopAnimations=i==="di-disabled"&&!!e&&!e._forceAnimations,this.mode=o.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&i==="reduced-motion"&&o.classList.add("mat-progress-spinner-reduced-motion"),e&&(e.color&&(this.color=this._defaultColor=e.color),e.diameter&&(this.diameter=e.diameter),e.strokeWidth&&(this.strokeWidth=e.strokeWidth))}mode;get value(){return this.mode==="determinate"?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,e||0))}_value=0;get diameter(){return this._diameter}set diameter(e){this._diameter=e||0}_diameter=_De;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0}_strokeWidth;_circleRadius(){return(this.diameter-PJe)/2}_viewBox(){let e=this._circleRadius()*2+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(i,o){if(i&1&&Ri(MJe,5),i&2){let r;Le(r=Ne())&&(o._determinateCircle=r.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(i,o){i&2&&(Ge("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",o.mode==="determinate"?o.value:null)("mode",o.mode),Oe("mat-"+o.color),Ir("width",o.diameter,"px")("height",o.diameter,"px")("--mat-progress-spinner-size",o.diameter+"px")("--mat-progress-spinner-active-indicator-width",o.diameter+"px"),Vn("_mat-animation-noopable",o._noopAnimations)("mdc-circular-progress--indeterminate",o.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",ln],diameter:[2,"diameter","diameter",ln],strokeWidth:[2,"strokeWidth","strokeWidth",ln]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(i,o){if(i&1&&(ee(0,OJe,2,8,"ng-template",null,0,Pt),k(2,"div",2,1),si(),k(4,"svg",3),ce(5,"circle",4),D()(),K1(),k(6,"div",5)(7,"div",6)(8,"div",7),ui(9,8),D(),k(10,"div",9),ui(11,8),D(),k(12,"div",10),ui(13,8),D()()()),i&2){let r=ti(1);T(4),Ge("viewBox",o._viewBox()),T(),Ir("stroke-dasharray",o._strokeCircumference(),"px")("stroke-dashoffset",o._strokeDashOffset(),"px")("stroke-width",o._circleStrokeWidth(),"%"),Ge("r",o._circleRadius()),T(4),E("ngTemplateOutlet",r),T(2),E("ngTemplateOutlet",r),T(2),E("ngTemplateOutlet",r)}},dependencies:[Lo],styles:[`.mat-mdc-progress-spinner{--mat-progress-spinner-animation-multiplier: 1;display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mat-progress-spinner-active-indicator-width, 4px)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}}.mat-progress-spinner-reduced-motion{--mat-progress-spinner-animation-multiplier: 1.25}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate calc(1568.2352941176ms*var(--mat-progress-spinner-animation-multiplier)) linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mat-progress-spinner-active-indicator-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate calc(5332ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}} `],encapsulation:2,changeDetection:0})}return t})();var yDe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br]})}return t})();var Cae=t=>({$implicit:t});function NJe(t,n){t&1&&ui(0)}function BJe(t,n){if(t&1&&ee(0,NJe,1,0,"ng-container",1),t&2){let e=P(2);E("ngTemplateOutlet",e.customLoadingTemplate)}}function VJe(t,n){t&1&&(k(0,"div",0)(1,"div",2),ce(2,"mat-spinner",3),D()())}function zJe(t,n){if(t&1&&qe(0,BJe,1,1,"ng-container")(1,VJe,3,0,"div",0),t&2){let e=P();Ke(e.customLoadingTemplate?0:1)}}function UJe(t,n){t&1&&ui(0)}function HJe(t,n){if(t&1&&ee(0,UJe,1,0,"ng-container",4),t&2){let e=P();E("ngTemplateOutlet",e.initTemplate)("ngTemplateOutletContext",ki(2,Cae,e.initTemplateContext))}}function jJe(t,n){t&1&&ui(0)}function GJe(t,n){if(t&1&&ee(0,jJe,1,0,"ng-container",4),t&2){let e=P();E("ngTemplateOutlet",e.successTemplate)("ngTemplateOutletContext",ki(2,Cae,e.successTemplateContext))}}function $Je(t,n){t&1&&ui(0)}function qJe(t,n){if(t&1&&ee(0,$Je,1,0,"ng-container",4),t&2){let e=P();E("ngTemplateOutlet",e.errorTemplate)("ngTemplateOutletContext",ki(2,Cae,e.errorTemplateContext))}}var Kn=(()=>{class t{constructor(e){this._cdr=e,this.customLoadingTemplate=null,this.errorTemplate=null,this.successTemplate=null,this.initTemplate=null,this.options=gDe,this.BdLoaderState=Gt,this.currentState=Gt.INIT}ngOnChanges(e){e.loadItem&&e.loadItem.currentValue&&this._onLoadItemChange(e.loadItem.currentValue)}ngOnDestroy(){this._loader&&this._loader.destroy()}_onLoadItemChange(e){this._loader&&(this._loader.destroy(),this._loader=null),this._isPromise(e)?this._setPromiseLoader(e):this._setSubjectLoader(e)}_setPromiseLoader(e){this._loader=new fq,this._subscribeLoaderState(this._loader),this._loader.connect(e)}_setSubjectLoader(e){this._loader=new gq,this._subscribeLoaderState(this._loader),this._loader.connect(e)}_subscribeLoaderState(e){this._stateSubscription&&this._stateSubscription.unsubscribe(),this._stateSubscription=e.state$.subscribe(i=>{this.currentState=i,this._cdr.detectChanges()})}_isPromise(e){return!!e.then&&typeof e.then=="function"}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-loader"]],inputs:{customLoadingTemplate:"customLoadingTemplate",errorTemplate:"errorTemplate",successTemplate:"successTemplate",initTemplate:"initTemplate",errorTemplateContext:"errorTemplateContext",successTemplateContext:"successTemplateContext",initTemplateContext:"initTemplateContext",loadItem:"loadItem",options:"options"},features:[Ot],decls:5,vars:1,consts:[[1,"flex","flex-row","items-center","justify-center"],[4,"ngTemplateOutlet"],[1,"basis-24","m-6"],["strokeWidth","3"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){if(i&1&&(k(0,"div"),qe(1,zJe,2,1)(2,HJe,1,4,"ng-container")(3,GJe,1,4,"ng-container")(4,qJe,1,4,"ng-container"),D()),i&2){let r;T(),Ke((r=o.currentState)===o.BdLoaderState.LOADING?1:r===o.BdLoaderState.INIT?2:r===o.BdLoaderState.SUCCESS?3:r===o.BdLoaderState.ERROR?4:-1)}},dependencies:[Lo,yDe,_q],encapsulation:2,changeDetection:0})}}return t})();var Rl=(()=>{class t{constructor(){this.icon="visibility_off",this.message=""}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-message-empty"]],inputs:{icon:"icon",message:"message"},decls:8,vars:2,consts:[[1,"message__empty"],[1,"flex","flex-row","gap-2","items-center","justify-center"],[1,"flex-none"],[1,"mat-caption"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),Q(4),D()(),k(5,"div",2)(6,"span",3),Q(7),D()()()()),i&2&&(T(4),dt(o.icon),T(3),dt(o.message))},dependencies:[$o,mr],styles:[".message__empty[_ngcontent-%COMP%]{color:#0000008a}.mat-caption[_ngcontent-%COMP%]{line-height:28px}"]})}}return t})();var xae=(()=>{class t{_listeners=[];notify(e,i){for(let o of this._listeners)o(e,i)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(i=>e!==i)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var nm=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new hi;constructor(n=!1,e,i=!0,o){this._multiple=n,this._emitChanges=i,this.compareWith=o,e&&e.length&&(n?e.forEach(r=>this._markSelected(r)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...n){this._verifyValueAssignment(n),n.forEach(i=>this._markSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...n){this._verifyValueAssignment(n),n.forEach(i=>this._unmarkSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...n){this._verifyValueAssignment(n);let e=this.selected,i=new Set(n.map(r=>this._getConcreteValue(r)));n.forEach(r=>this._markSelected(r)),e.filter(r=>!i.has(this._getConcreteValue(r,i))).forEach(r=>this._unmarkSelected(r));let o=this._hasQueuedChanges();return this._emitChangeEvent(),o}toggle(n){return this.isSelected(n)?this.deselect(n):this.select(n)}clear(n=!0){this._unmarkAll();let e=this._hasQueuedChanges();return n&&this._emitChangeEvent(),e}isSelected(n){return this._selection.has(this._getConcreteValue(n))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(n){this._multiple&&this.selected&&this._selected.sort(n)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(n){n=this._getConcreteValue(n),this.isSelected(n)||(this._multiple||this._unmarkAll(),this.isSelected(n)||this._selection.add(n),this._emitChanges&&this._selectedToEmit.push(n))}_unmarkSelected(n){n=this._getConcreteValue(n),this.isSelected(n)&&(this._selection.delete(n),this._emitChanges&&this._deselectedToEmit.push(n))}_unmarkAll(){this.isEmpty()||this._selection.forEach(n=>this._unmarkSelected(n))}_verifyValueAssignment(n){n.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(n,e){if(this.compareWith){e=e??this._selection;for(let i of e)if(this.compareWith(n,i))return i;return n}else return n}};var KJe=["trigger"],WJe=["panel"],YJe=[[["mat-select-trigger"]],"*"],QJe=["mat-select-trigger","*"];function ZJe(t,n){if(t&1&&(k(0,"span",4),Q(1),D()),t&2){let e=P();T(),dt(e.placeholder)}}function XJe(t,n){t&1&&pn(0)}function JJe(t,n){if(t&1&&(k(0,"span",11),Q(1),D()),t&2){let e=P(2);T(),dt(e.triggerValue)}}function eet(t,n){if(t&1&&(k(0,"span",5),qe(1,XJe,1,0)(2,JJe,2,1,"span",11),D()),t&2){let e=P();T(),Ke(e.customTrigger?1:2)}}function tet(t,n){if(t&1){let e=tt();k(0,"div",12,1),ie("keydown",function(o){se(e);let r=P();return ae(r._handleKeydown(o))}),pn(2,1),D()}if(t&2){let e=P();Oe(wR("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme())),Vn("mat-select-panel-animations-enabled",!e._animationsDisabled),E("ngClass",e.panelClass),Ge("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var wae=new fi("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Oo);return()=>a0(t)}});function vDe(t){let n=re(Oo);return()=>a0(n)}var bDe=new fi("MAT_SELECT_CONFIG"),CDe={provide:wae,deps:[],useFactory:vDe},Sae=new fi("MatSelectTrigger"),yq=class{source;value;constructor(n,e){this.source=n,this.value=e}},c0=(()=>{class t{_viewportRuler=re(zv);_changeDetectorRef=re(Gi);_elementRef=re(Bn);_dir=re(ad,{optional:!0});_idGenerator=re(ul);_renderer=re(Ps);_parentFormField=re(pP,{optional:!0});ngControl=re(Vu,{self:!0,optional:!0});_liveAnnouncer=re(Ose);_defaultOptions=re(bDe,{optional:!0});_animationsDisabled=Cl();_initialized=new hi;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let i=this.options.toArray()[e];if(i){let o=this.panel.nativeElement,r=gae(e,this.options,this.optionGroups),s=i._getHostElement();e===0&&r===1?o.scrollTop=0:o.scrollTop=_ae(s.offsetTop,s.offsetHeight,o.scrollTop,o.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new yq(this,e)}_scrollStrategyFactory=re(wae);_panelOpen=!1;_compareWith=(e,i)=>e===i;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new hi;_errorStateTracker;stateChanges=new hi;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=Zn(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(Ys.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=fv(()=>{let e=this.options;return e?e.changes.pipe(rl(e),Mn(()=>ku(...e.map(i=>i.onSelectionChange)))):this._initialized.pipe(Mn(()=>this.optionSelectionChanges))});openedChange=new ve;_openedStream=this.openedChange.pipe(wn(e=>e),vt(()=>{}));_closedStream=this.openedChange.pipe(wn(e=>!e),vt(()=>{}));selectionChange=new ve;valueChange=new ve;constructor(){let e=re(o2),i=re(B5,{optional:!0}),o=re(zu,{optional:!0}),r=re(new Bm("tabindex"),{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new hP(e,this.ngControl,o,i,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=r==null?0:parseInt(r)||0,this.id=this.id}ngOnInit(){this._selectionModel=new nm(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(cs(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(cs(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(rl(null),cs(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){let o=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?o.setAttribute("aria-labelledby",e):o.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(this._previousControl!==void 0&&i.disabled!==null&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._overlayDir.positionChange.pipe(Sn(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}_trackedModal=null;_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let i=`${this.id}-panel`;this._trackedModal&&R$(this._trackedModal,"aria-owns",i),Gse(e,"aria-owns",i),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;R$(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{i(),clearTimeout(o),this._cleanupDetach=void 0};let e=this.panel.nativeElement,i=this._renderer.listen(e,"animationend",r=>{r.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),o=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let i=e.keyCode,o=i===40||i===38||i===37||i===39,r=i===13||i===32,s=this._keyManager;if(!s.isTyping()&&r&&!pu(e)||(this.multiple||e.altKey)&&o)e.preventDefault(),this.open();else if(!this.multiple){let d=this.selected;s.onKeydown(e);let m=this.selected;m&&d!==m&&this._liveAnnouncer.announce(m.viewValue,1e4)}}_handleOpenKeydown(e){let i=this._keyManager,o=e.keyCode,r=o===40||o===38,s=i.isTyping();if(r&&e.altKey)e.preventDefault(),this.close();else if(!s&&(o===13||o===32)&&i.activeItem&&!pu(e))e.preventDefault(),i.activeItem._selectViaInteraction();else if(!s&&this._multiple&&o===65&&e.ctrlKey){e.preventDefault();let d=this.options.some(m=>!m.disabled&&!m.selected);this.options.forEach(m=>{m.disabled||(d?m.select():m.deselect())})}else{let d=i.activeItemIndex;i.onKeydown(e),this._multiple&&r&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==d&&i.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!pu(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{let i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let i=this.options.find(o=>{if(this._selectionModel.isSelected(o))return!1;try{return(o.value!=null||this.canSelectNullableOptions)&&this._compareWith(o.value,e)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof nP?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new I5(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=ku(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(cs(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),ku(...this.options.map(i=>i._stateChanges)).pipe(cs(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,i){let o=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(o!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())),o!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((i,o)=>this.sortComparator?this.sortComparator(i,o,e):e.indexOf(i)-e.indexOf(o)),this.stateChanges.next()}}_propagateChanges(e){let i;this.multiple?i=this.selected.map(o=>o.value):i=this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let i=0;i0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,i=e?e+" ":"";return this.ariaLabelledby?i+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-select"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Sae,5),xt(r,bh,5),xt(r,rq,5)),i&2){let s;Le(s=Ne())&&(o.customTrigger=s.first),Le(s=Ne())&&(o.options=s),Le(s=Ne())&&(o.optionGroups=s)}},viewQuery:function(i,o){if(i&1&&(Ri(KJe,5),Ri(WJe,5),Ri(A$,5)),i&2){let r;Le(r=Ne())&&(o.trigger=r.first),Le(r=Ne())&&(o.panel=r.first),Le(r=Ne())&&(o._overlayDir=r.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(i,o){i&1&&ie("keydown",function(s){return o._handleKeydown(s)})("focus",function(){return o._onFocus()})("blur",function(){return o._onBlur()}),i&2&&(Ge("id",o.id)("tabindex",o.disabled?-1:o.tabIndex)("aria-controls",o.panelOpen?o.id+"-panel":null)("aria-expanded",o.panelOpen)("aria-label",o.ariaLabel||null)("aria-required",o.required.toString())("aria-disabled",o.disabled.toString())("aria-invalid",o.errorState)("aria-activedescendant",o._getAriaActiveDescendant()),Vn("mat-mdc-select-disabled",o.disabled)("mat-mdc-select-invalid",o.errorState)("mat-mdc-select-required",o.required)("mat-mdc-select-empty",o.empty)("mat-mdc-select-multiple",o.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",je],disableRipple:[2,"disableRipple","disableRipple",je],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:ln(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",je],placeholder:"placeholder",required:[2,"required","required",je],multiple:[2,"multiple","multiple",je],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",je],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",ln],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",je]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[jt([{provide:uP,useExisting:t},{provide:oq,useExisting:t}]),Ot],ngContentSelectors:QJe,decls:11,vars:9,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(i,o){if(i&1){let r=tt();Nn(YJe),k(0,"div",2,0),ie("click",function(){return se(r),ae(o.open())}),k(3,"div",3),qe(4,ZJe,2,1,"span",4)(5,eet,3,1,"span",5),D(),k(6,"div",6)(7,"div",7),si(),k(8,"svg",8),ce(9,"path",9),D()()()(),ee(10,tet,3,10,"ng-template",10),ie("detach",function(){return se(r),ae(o.close())})("backdropClick",function(){return se(r),ae(o.close())})("overlayKeydown",function(d){return se(r),ae(o._handleOverlayKeydown(d))})}if(i&2){let r=ti(1);T(3),Ge("id",o._valueId),T(),Ke(o.empty?4:5),T(6),E("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",o._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",o._scrollStrategy)("cdkConnectedOverlayOrigin",o._preferredOverlayOrigin||r)("cdkConnectedOverlayPositions",o._positions)("cdkConnectedOverlayWidth",o._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)}},dependencies:[nP,A$,Ns],styles:[`@keyframes _mat-select-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{from{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-select-panel-animations-enabled{animation:_mat-select-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit 100ms linear}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field:not(.mat-form-field-animations-enabled) .mat-mdc-select-placeholder,._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))} `],encapsulation:2,changeDetection:0})}return t})(),Tae=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["mat-select-trigger"]],features:[jt([{provide:Sae,useExisting:t}])]})}return t})(),Kv=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[CDe],imports:[Uv,ry,Br,Vv,Ra,ry,Br]})}return t})();function iet(t,n){if(t&1&&(k(0,"mat-option",17),Q(1),D()),t&2){let e=n.$implicit;E("value",e),T(),Qi(" ",e," ")}}function net(t,n){if(t&1){let e=tt();k(0,"mat-form-field",14)(1,"mat-select",16,0),ie("selectionChange",function(o){se(e);let r=P(2);return ae(r._changePageSize(o.value))}),lo(3,iet,2,2,"mat-option",17,jo),D(),k(5,"div",18),ie("click",function(){se(e);let o=ti(2);return ae(o.open())}),D()()}if(t&2){let e=P(2);E("appearance",e._formFieldAppearance)("color",e.color),T(),E("value",e.pageSize)("disabled",e.disabled),Cc("aria-labelledby",e._pageSizeLabelId),E("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),T(2),co(e._displayedPageSizeOptions)}}function oet(t,n){if(t&1&&(k(0,"div",15),Q(1),D()),t&2){let e=P(2);T(),dt(e.pageSize)}}function ret(t,n){if(t&1&&(k(0,"div",3)(1,"div",13),Q(2),D(),qe(3,net,6,7,"mat-form-field",14),qe(4,oet,2,1,"div",15),D()),t&2){let e=P();T(),Ge("id",e._pageSizeLabelId),T(),Qi(" ",e._intl.itemsPerPageLabel," "),T(),Ke(e._displayedPageSizeOptions.length>1?3:-1),T(),Ke(e._displayedPageSizeOptions.length<=1?4:-1)}}function set(t,n){if(t&1){let e=tt();k(0,"button",19),ie("click",function(){se(e);let o=P();return ae(o._buttonClicked(0,o._previousButtonsDisabled()))}),si(),k(1,"svg",8),ce(2,"path",20),D()()}if(t&2){let e=P();E("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("disabled",e._previousButtonsDisabled())("tabindex",e._previousButtonsDisabled()?-1:null),Ge("aria-label",e._intl.firstPageLabel)}}function aet(t,n){if(t&1){let e=tt();k(0,"button",21),ie("click",function(){se(e);let o=P();return ae(o._buttonClicked(o.getNumberOfPages()-1,o._nextButtonsDisabled()))}),si(),k(1,"svg",8),ce(2,"path",22),D()()}if(t&2){let e=P();E("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("disabled",e._nextButtonsDisabled())("tabindex",e._nextButtonsDisabled()?-1:null),Ge("aria-label",e._intl.lastPageLabel)}}var ex=(()=>{class t{changes=new hi;itemsPerPageLabel="Items per page:";nextPageLabel="Next page";previousPageLabel="Previous page";firstPageLabel="First page";lastPageLabel="Last page";getRangeLabel=(e,i,o)=>{if(o==0||i==0)return`0 of ${o}`;o=Math.max(o,0);let r=e*i,s=r{class t{_intl=re(ex);_changeDetectorRef=re(Gi);_formFieldAppearance;_pageSizeLabelId=re(ul).getId("mat-paginator-page-size-label-");_intlChanges;_isInitialized=!1;_initializedStream=new pi(1);color;get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(e||0,0),this._changeDetectorRef.markForCheck()}_pageIndex=0;get length(){return this._length}set length(e){this._length=e||0,this._changeDetectorRef.markForCheck()}_length=0;get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(e||0,0),this._updateDisplayedPageSizeOptions()}_pageSize;get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(i=>ln(i,0)),this._updateDisplayedPageSizeOptions()}_pageSizeOptions=[];hidePageSize=!1;showFirstLastButtons=!1;selectConfig={};disabled=!1;page=new ve;_displayedPageSizeOptions;initialized=this._initializedStream;constructor(){let e=this._intl,i=re(s2,{optional:!0});if(this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){let{pageSize:o,pageSizeOptions:r,hidePageSize:s,showFirstLastButtons:d}=i;o!=null&&(this._pageSize=o),r!=null&&(this._pageSizeOptions=r),s!=null&&(this.hidePageSize=s),d!=null&&(this.showFirstLastButtons=d)}this._formFieldAppearance=i?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){this.hasNextPage()&&this._navigate(this.pageIndex+1)}previousPage(){this.hasPreviousPage()&&this._navigate(this.pageIndex-1)}firstPage(){this.hasPreviousPage()&&this._navigate(0)}lastPage(){this.hasNextPage()&&this._navigate(this.getNumberOfPages()-1)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let e=this.getNumberOfPages()-1;return this.pageIndexe-i),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}_navigate(e){let i=this.pageIndex;e!==i&&(this.pageIndex=e,this._emitPageEvent(i))}_buttonClicked(e,i){i||this._navigate(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",ln],length:[2,"length","length",ln],pageSize:[2,"pageSize","pageSize",ln],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",je],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",je],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",je]},outputs:{page:"page"},exportAs:["matPaginator"],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(i,o){i&1&&(k(0,"div",1)(1,"div",2),qe(2,ret,5,4,"div",3),k(3,"div",4)(4,"div",5),Q(5),D(),qe(6,set,3,5,"button",6),k(7,"button",7),ie("click",function(){return o._buttonClicked(o.pageIndex-1,o._previousButtonsDisabled())}),si(),k(8,"svg",8),ce(9,"path",9),D()(),K1(),k(10,"button",10),ie("click",function(){return o._buttonClicked(o.pageIndex+1,o._nextButtonsDisabled())}),si(),k(11,"svg",8),ce(12,"path",11),D()(),qe(13,aet,3,5,"button",12),D()()()),i&2&&(T(2),Ke(o.hidePageSize?-1:2),T(3),Qi(" ",o._intl.getRangeLabel(o.pageIndex,o.pageSize,o.length)," "),T(),Ke(o.showFirstLastButtons?6:-1),T(),E("matTooltip",o._intl.previousPageLabel)("matTooltipDisabled",o._previousButtonsDisabled())("disabled",o._previousButtonsDisabled())("tabindex",o._previousButtonsDisabled()?-1:null),Ge("aria-label",o._intl.previousPageLabel),T(3),E("matTooltip",o._intl.nextPageLabel)("matTooltipDisabled",o._nextButtonsDisabled())("disabled",o._nextButtonsDisabled())("tabindex",o._nextButtonsDisabled()?-1:null),Ge("aria-label",o._intl.nextPageLabel),T(3),Ke(o.showFirstLastButtons?13:-1))},dependencies:[rs,c0,bh,xl,Up],styles:[`.mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height: var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding: var(--mat-paginator-form-field-container-vertical-padding, 8px)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:var(--mat-paginator-page-size-select-width, 84px)}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors: active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display, block);position:absolute;top:50%;left:50%;width:var(--mat-paginator-page-size-select-width, 84px);height:var(--mat-paginator-page-size-select-touch-target-height, 48px);background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer} `],encapsulation:2,changeDetection:0})}return t})(),tx=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[det],imports:[Tn,Kv,Hp,Wv]})}return t})();var H5=(()=>{class t extends ex{constructor(){super(...arguments),this.itemsPerPageLabel="Elemente pro Seite",this.nextPageLabel="N\xE4chste Seite",this.previousPageLabel="Vorherige Seite",this.getRangeLabel=this.buildRangeLabel}buildRangeLabel(e,i,o){return`${e*i+1} - ${e*i+i} von ${o}`}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})()}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Pw=class{static responseToPage(n,e){return mt(be({},n),{content:e(n.content)})}},sy=class t{static toHttpParams(n){let e=new Pr;return e=e.set("size",n.rows.toString()),e=e.set("page",n.page.toString()),e}static from(n){return new t(n.rows,Math.ceil(n.first/n.rows))}constructor(n,e){this.pageSize=n,this.pageIndex=e,this.totalRecords=0,this.page=e,this.rows=this.pageSize,this.first=this.pageSize*this.pageIndex}};var bq=class t{static{this.DEFAULT=new t(20,0)}constructor(n,e){this.size=n,this.page=e}static of(n){return new t(n.pageSize,n.pageIndex)}toHttpParams(){let n=new Pr;return n=n.set("size",this.size.toString()),n=n.set("page",this.page.toString()),n}};var pet=Math.pow(10,8)*24*60*60*1e3,P3i=-pet,Cq=6048e5,xDe=864e5,j5=6e4,G5=36e5,wDe=1e3;var het=3600;var SDe=het*24,L3i=SDe*7,met=SDe*365.2425,fet=met/12,N3i=fet*3,Iae=Symbol.for("constructDateFrom");function Vs(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&Iae in t?t[Iae](n):t instanceof Date?new t.constructor(n):new Date(n)}function Xo(t,n){return Vs(n||t,t)}function d0(t,n,e){let i=Xo(t,e?.in);return isNaN(n)?Vs(e?.in||t,NaN):(n&&i.setDate(i.getDate()+n),i)}function Yv(t,n,e){let i=Xo(t,e?.in);if(isNaN(n))return Vs(e?.in||t,NaN);if(!n)return i;let o=i.getDate(),r=Vs(e?.in||t,i.getTime());r.setMonth(i.getMonth()+n+1,0);let s=r.getDate();return o>=s?r:(i.setFullYear(r.getFullYear(),r.getMonth(),o),i)}function TDe(t,n,e){return Vs(e?.in||t,+Xo(t)+n)}var get={};function ay(){return get}function om(t,n){let e=ay(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,o=Xo(t,n?.in),r=o.getDay(),s=(r=r.getTime()?i+1:e.getTime()>=d.getTime()?i:i-1}function a2(t){let n=Xo(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function wq(t,...n){let e=Vs.bind(null,t||n.find(i=>typeof i=="object"));return n.map(e)}function ly(t,n){let e=Xo(t,n?.in);return e.setHours(0,0,0,0),e}function IDe(t,n,e){let[i,o]=wq(e?.in,t,n),r=ly(i),s=ly(o),d=+r-a2(r),m=+s-a2(s);return Math.round((d-m)/xDe)}function EDe(t,n){let e=xq(t,n),i=Vs(n?.in||t,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),Qv(i)}function $5(t,n,e){return Yv(t,n*3,e)}function Sq(t,n,e){return TDe(t,n*1e3,e)}function q5(t,n,e){return d0(t,n*7,e)}function l2(t,n,e){return Yv(t,n*12,e)}function Eae(t,n,e){let[i,o]=wq(e?.in,t,n);return+ly(i)==+ly(o)}function Tq(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Iq(t){return!(!Tq(t)&&typeof t!="number"||isNaN(+Xo(t)))}function DDe(t,n){let e=Xo(t,n?.in);return e.setHours(23,59,59,999),e}function _P(t,n){let e=Xo(t,n?.in),i=e.getMonth(),o=i-i%3;return e.setMonth(o,1),e.setHours(0,0,0,0),e}function yP(t,n){let e=Xo(t,n?.in);return e.setDate(1),e.setHours(0,0,0,0),e}function ADe(t,n){let e=Xo(t,n?.in),i=e.getFullYear();return e.setFullYear(i+1,0,0),e.setHours(23,59,59,999),e}function c2(t,n){let e=Xo(t,n?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}var _et={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},kDe=(t,n,e)=>{let i,o=_et[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function KI(t){return(n={})=>{let e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}var yet={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vet={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},bet={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},MDe={date:KI({formats:yet,defaultWidth:"full"}),time:KI({formats:vet,defaultWidth:"full"}),dateTime:KI({formats:bet,defaultWidth:"full"})};var Cet={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ODe=(t,n,e,i)=>Cet[t];function cy(t){return(n,e)=>{let i=e?.context?String(e.context):"standalone",o;if(i==="formatting"&&t.formattingValues){let s=t.defaultFormattingWidth||t.defaultWidth,d=e?.width?String(e.width):s;o=t.formattingValues[d]||t.formattingValues[s]}else{let s=t.defaultWidth,d=e?.width?String(e.width):t.defaultWidth;o=t.values[d]||t.values[s]}let r=t.argumentCallback?t.argumentCallback(n):n;return o[r]}}var xet={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wet={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Tet={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Iet={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Eet={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Det={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Aet=(t,n)=>{let e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},RDe={ordinalNumber:Aet,era:cy({values:xet,defaultWidth:"wide"}),quarter:cy({values:wet,defaultWidth:"wide",argumentCallback:t=>t-1}),month:cy({values:Tet,defaultWidth:"wide"}),day:cy({values:Iet,defaultWidth:"wide"}),dayPeriod:cy({values:Eet,defaultWidth:"wide",formattingValues:Det,defaultFormattingWidth:"wide"})};function dy(t){return(n,e={})=>{let i=e.width,o=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],r=n.match(o);if(!r)return null;let s=r[0],d=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],m=Array.isArray(d)?Met(d,O=>O.test(s)):ket(d,O=>O.test(s)),v;v=t.valueCallback?t.valueCallback(m):m,v=e.valueCallback?e.valueCallback(v):v;let w=n.slice(s.length);return{value:v,rest:w}}}function ket(t,n){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function Met(t,n){for(let e=0;e{let i=n.match(t.matchPattern);if(!i)return null;let o=i[0],r=n.match(t.parsePattern);if(!r)return null;let s=t.valueCallback?t.valueCallback(r[0]):r[0];s=e.valueCallback?e.valueCallback(s):s;let d=n.slice(o.length);return{value:s,rest:d}}}var Oet=/^(\d+)(th|st|nd|rd)?/i,Ret=/\d+/i,Fet={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Pet={any:[/^b/i,/^(a|c)/i]},Let={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Net={any:[/1/i,/2/i,/3/i,/4/i]},Bet={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Vet={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},zet={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Uet={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Het={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},jet={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},FDe={ordinalNumber:Eq({matchPattern:Oet,parsePattern:Ret,valueCallback:t=>parseInt(t,10)}),era:dy({matchPatterns:Fet,defaultMatchWidth:"wide",parsePatterns:Pet,defaultParseWidth:"any"}),quarter:dy({matchPatterns:Let,defaultMatchWidth:"wide",parsePatterns:Net,defaultParseWidth:"any",valueCallback:t=>t+1}),month:dy({matchPatterns:Bet,defaultMatchWidth:"wide",parsePatterns:Vet,defaultParseWidth:"any"}),day:dy({matchPatterns:zet,defaultMatchWidth:"wide",parsePatterns:Uet,defaultParseWidth:"any"}),dayPeriod:dy({matchPatterns:Het,defaultMatchWidth:"any",parsePatterns:jet,defaultParseWidth:"any"})};var K5={code:"en-US",formatDistance:kDe,formatLong:MDe,formatRelative:ODe,localize:RDe,match:FDe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function PDe(t,n){let e=Xo(t,n?.in);return IDe(e,c2(e))+1}function Dq(t,n){let e=Xo(t,n?.in),i=+Qv(e)-+EDe(e);return Math.round(i/Cq)+1}function vP(t,n){let e=Xo(t,n?.in),i=e.getFullYear(),o=ay(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=Vs(n?.in||t,0);s.setFullYear(i+1,0,r),s.setHours(0,0,0,0);let d=om(s,n),m=Vs(n?.in||t,0);m.setFullYear(i,0,r),m.setHours(0,0,0,0);let v=om(m,n);return+e>=+d?i+1:+e>=+v?i:i-1}function LDe(t,n){let e=ay(),i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,o=vP(t,n),r=Vs(n?.in||t,0);return r.setFullYear(o,0,i),r.setHours(0,0,0,0),om(r,n)}function Aq(t,n){let e=Xo(t,n?.in),i=+om(e,n)-+LDe(e,n);return Math.round(i/Cq)+1}function Pa(t,n){let e=t<0?"-":"",i=Math.abs(t).toString().padStart(n,"0");return e+i}var Lw={y(t,n){let e=t.getFullYear(),i=e>0?e:1-e;return Pa(n==="yy"?i%100:i,n.length)},M(t,n){let e=t.getMonth();return n==="M"?String(e+1):Pa(e+1,2)},d(t,n){return Pa(t.getDate(),n.length)},a(t,n){let e=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(t,n){return Pa(t.getHours()%12||12,n.length)},H(t,n){return Pa(t.getHours(),n.length)},m(t,n){return Pa(t.getMinutes(),n.length)},s(t,n){return Pa(t.getSeconds(),n.length)},S(t,n){let e=n.length,i=t.getMilliseconds(),o=Math.trunc(i*Math.pow(10,e-3));return Pa(o,n.length)}};var bP={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Dae={G:function(t,n,e){let i=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(t,n,e){if(n==="yo"){let i=t.getFullYear(),o=i>0?i:1-i;return e.ordinalNumber(o,{unit:"year"})}return Lw.y(t,n)},Y:function(t,n,e,i){let o=vP(t,i),r=o>0?o:1-o;if(n==="YY"){let s=r%100;return Pa(s,2)}return n==="Yo"?e.ordinalNumber(r,{unit:"year"}):Pa(r,n.length)},R:function(t,n){let e=xq(t);return Pa(e,n.length)},u:function(t,n){let e=t.getFullYear();return Pa(e,n.length)},Q:function(t,n,e){let i=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return Pa(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,e){let i=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return Pa(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,e){let i=t.getMonth();switch(n){case"M":case"MM":return Lw.M(t,n);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,e){let i=t.getMonth();switch(n){case"L":return String(i+1);case"LL":return Pa(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,e,i){let o=Aq(t,i);return n==="wo"?e.ordinalNumber(o,{unit:"week"}):Pa(o,n.length)},I:function(t,n,e){let i=Dq(t);return n==="Io"?e.ordinalNumber(i,{unit:"week"}):Pa(i,n.length)},d:function(t,n,e){return n==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):Lw.d(t,n)},D:function(t,n,e){let i=PDe(t);return n==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):Pa(i,n.length)},E:function(t,n,e){let i=t.getDay();switch(n){case"E":case"EE":case"EEE":return e.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(i,{width:"short",context:"formatting"});case"EEEE":default:return e.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,e,i){let o=t.getDay(),r=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(r);case"ee":return Pa(r,2);case"eo":return e.ordinalNumber(r,{unit:"day"});case"eee":return e.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(o,{width:"short",context:"formatting"});case"eeee":default:return e.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,e,i){let o=t.getDay(),r=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(r);case"cc":return Pa(r,n.length);case"co":return e.ordinalNumber(r,{unit:"day"});case"ccc":return e.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(o,{width:"narrow",context:"standalone"});case"cccccc":return e.day(o,{width:"short",context:"standalone"});case"cccc":default:return e.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,e){let i=t.getDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return Pa(o,n.length);case"io":return e.ordinalNumber(o,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,e){let o=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,e){let i=t.getHours(),o;switch(i===12?o=bP.noon:i===0?o=bP.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,e){let i=t.getHours(),o;switch(i>=17?o=bP.evening:i>=12?o=bP.afternoon:i>=4?o=bP.morning:o=bP.night,n){case"B":case"BB":case"BBB":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,e){if(n==="ho"){let i=t.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return Lw.h(t,n)},H:function(t,n,e){return n==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):Lw.H(t,n)},K:function(t,n,e){let i=t.getHours()%12;return n==="Ko"?e.ordinalNumber(i,{unit:"hour"}):Pa(i,n.length)},k:function(t,n,e){let i=t.getHours();return i===0&&(i=24),n==="ko"?e.ordinalNumber(i,{unit:"hour"}):Pa(i,n.length)},m:function(t,n,e){return n==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):Lw.m(t,n)},s:function(t,n,e){return n==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):Lw.s(t,n)},S:function(t,n){return Lw.S(t,n)},X:function(t,n,e){let i=t.getTimezoneOffset();if(i===0)return"Z";switch(n){case"X":return BDe(i);case"XXXX":case"XX":return d2(i);case"XXXXX":case"XXX":default:return d2(i,":")}},x:function(t,n,e){let i=t.getTimezoneOffset();switch(n){case"x":return BDe(i);case"xxxx":case"xx":return d2(i);case"xxxxx":case"xxx":default:return d2(i,":")}},O:function(t,n,e){let i=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+NDe(i,":");case"OOOO":default:return"GMT"+d2(i,":")}},z:function(t,n,e){let i=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+NDe(i,":");case"zzzz":default:return"GMT"+d2(i,":")}},t:function(t,n,e){let i=Math.trunc(+t/1e3);return Pa(i,n.length)},T:function(t,n,e){return Pa(+t,n.length)}};function NDe(t,n=""){let e=t>0?"-":"+",i=Math.abs(t),o=Math.trunc(i/60),r=i%60;return r===0?e+String(o):e+String(o)+n+Pa(r,2)}function BDe(t,n){return t%60===0?(t>0?"-":"+")+Pa(Math.abs(t)/60,2):d2(t,n)}function d2(t,n=""){let e=t>0?"-":"+",i=Math.abs(t),o=Pa(Math.trunc(i/60),2),r=Pa(i%60,2);return e+o+n+r}var VDe=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},zDe=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Get=(t,n)=>{let e=t.match(/(P+)(p+)?/)||[],i=e[1],o=e[2];if(!o)return VDe(t,n);let r;switch(i){case"P":r=n.dateTime({width:"short"});break;case"PP":r=n.dateTime({width:"medium"});break;case"PPP":r=n.dateTime({width:"long"});break;case"PPPP":default:r=n.dateTime({width:"full"});break}return r.replace("{{date}}",VDe(i,n)).replace("{{time}}",zDe(o,n))},W5={p:zDe,P:Get};var $et=/^D+$/,qet=/^Y+$/,Ket=["D","DD","YY","YYYY"];function kq(t){return $et.test(t)}function Mq(t){return qet.test(t)}function Y5(t,n,e){let i=Wet(t,n,e);if(console.warn(i),Ket.includes(t))throw new RangeError(i)}function Wet(t,n,e){let i=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Yet=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Qet=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Zet=/^'([^]*?)'?$/,Xet=/''/g,Jet=/[a-zA-Z]/;function UDe(t,n,e){let i=ay(),o=e?.locale??i.locale??K5,r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,d=Xo(t,e?.in);if(!Iq(d))throw new RangeError("Invalid time value");let m=n.match(Qet).map(w=>{let O=w[0];if(O==="p"||O==="P"){let N=W5[O];return N(w,o.formatLong)}return w}).join("").match(Yet).map(w=>{if(w==="''")return{isToken:!1,value:"'"};let O=w[0];if(O==="'")return{isToken:!1,value:ett(w)};if(Dae[O])return{isToken:!0,value:w};if(O.match(Jet))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(m=o.localize.preprocessor(d,m));let v={firstWeekContainsDate:r,weekStartsOn:s,locale:o};return m.map(w=>{if(!w.isToken)return w.value;let O=w.value;(!e?.useAdditionalWeekYearTokens&&Mq(O)||!e?.useAdditionalDayOfYearTokens&&kq(O))&&Y5(O,n,String(t));let N=Dae[O[0]];return N(d,O,o.localize,v)}).join("")}function ett(t){let n=t.match(Zet);return n?n[1].replace(Xet,"'"):t}function Q5(t,n){let e=Xo(t,n?.in);if(isNaN(+e))throw new RangeError("Invalid time value");let i=n?.format??"extended",o=n?.representation??"complete",r="",s="",d=i==="extended"?"-":"",m=i==="extended"?":":"";if(o!=="time"){let v=Pa(e.getDate(),2),w=Pa(e.getMonth()+1,2);r=`${Pa(e.getFullYear(),4)}${d}${w}${d}${v}`}if(o!=="date"){let v=e.getTimezoneOffset();if(v!==0){let q=Math.abs(v),W=Pa(Math.trunc(q/60),2),te=Pa(q%60,2);s=`${v<0?"+":"-"}${W}:${te}`}else s="Z";let w=Pa(e.getHours(),2),O=Pa(e.getMinutes(),2),N=Pa(e.getSeconds(),2),V=r===""?"":"T",$=[w,O,N].join(m);r=`${r}${V}${$}${s}`}return r}function HDe(t,n){return Xo(t,n?.in).getDate()}function jDe(t,n){return Xo(t,n?.in).getDay()}function Oq(t,n){let e=Xo(t,n?.in),i=e.getFullYear(),o=e.getMonth(),r=Vs(e,0);return r.setFullYear(i,o+1,0),r.setHours(0,0,0,0),r.getDate()}function GDe(){return Object.assign({},ay())}function $De(t,n){return Xo(t,n?.in).getHours()}function qDe(t,n){let e=Xo(t,n?.in).getDay();return e===0?7:e}function KDe(t,n){return Xo(t,n?.in).getMinutes()}function Rq(t,n){return Xo(t,n?.in).getMonth()}function WDe(t){return Xo(t).getSeconds()}function Fq(t,n){return Xo(t,n?.in).getFullYear()}function YDe(t,n){let e=ttt(n)?new n(0):Vs(n,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e}function ttt(t){return typeof t=="function"&&t.prototype?.constructor===t}var itt=10,Pq=class{subPriority=0;validate(n,e){return!0}},Lq=class extends Pq{constructor(n,e,i,o,r){super(),this.value=n,this.validateValue=e,this.setValue=i,this.priority=o,r&&(this.subPriority=r)}validate(n,e){return this.validateValue(n,this.value,e)}set(n,e,i){return this.setValue(n,e,this.value,i)}},Nq=class extends Pq{priority=itt;subPriority=-1;constructor(n,e){super(),this.context=n||(i=>Vs(e,i))}set(n,e){return e.timestampIsSet?n:Vs(n,YDe(n,this.context))}};var Dr=class{run(n,e,i,o){let r=this.parse(n,e,i,o);return r?{setter:new Lq(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(n,e,i){return!0}};var Bq=class extends Dr{priority=140;parse(n,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"})||i.era(n,{width:"narrow"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})||i.era(n,{width:"abbreviated"})||i.era(n,{width:"narrow"})}}set(n,e,i){return e.era=i,n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}incompatibleTokens=["R","u","t","T"]};var Fl={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},uy={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function xc(t,n){return t&&{value:n(t.value),rest:t.rest}}function wl(t,n){let e=n.match(t);return e?{value:parseInt(e[0],10),rest:n.slice(e[0].length)}:null}function py(t,n){let e=n.match(t);if(!e)return null;if(e[0]==="Z")return{value:0,rest:n.slice(1)};let i=e[1]==="+"?1:-1,o=e[2]?parseInt(e[2],10):0,r=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:i*(o*G5+r*j5+s*wDe),rest:n.slice(e[0].length)}}function Vq(t){return wl(Fl.anyDigitsSigned,t)}function Ca(t,n){switch(t){case 1:return wl(Fl.singleDigit,n);case 2:return wl(Fl.twoDigits,n);case 3:return wl(Fl.threeDigits,n);case 4:return wl(Fl.fourDigits,n);default:return wl(new RegExp("^\\d{1,"+t+"}"),n)}}function CP(t,n){switch(t){case 1:return wl(Fl.singleDigitSigned,n);case 2:return wl(Fl.twoDigitsSigned,n);case 3:return wl(Fl.threeDigitsSigned,n);case 4:return wl(Fl.fourDigitsSigned,n);default:return wl(new RegExp("^-?\\d{1,"+t+"}"),n)}}function xP(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function zq(t,n){let e=n>0,i=e?n:1-n,o;if(i<=50)o=t||100;else{let r=i+50,s=Math.trunc(r/100)*100,d=t>=r%100;o=t+s-(d?100:0)}return e?o:1-o}function Uq(t){return t%400===0||t%4===0&&t%100!==0}var Hq=class extends Dr{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(n,e,i){let o=r=>({year:r,isTwoDigitYear:e==="yy"});switch(e){case"y":return xc(Ca(4,n),o);case"yo":return xc(i.ordinalNumber(n,{unit:"year"}),o);default:return xc(Ca(e.length,n),o)}}validate(n,e){return e.isTwoDigitYear||e.year>0}set(n,e,i){let o=n.getFullYear();if(i.isTwoDigitYear){let s=zq(i.year,o);return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}let r=!("era"in e)||e.era===1?i.year:1-i.year;return n.setFullYear(r,0,1),n.setHours(0,0,0,0),n}};var jq=class extends Dr{priority=130;parse(n,e,i){let o=r=>({year:r,isTwoDigitYear:e==="YY"});switch(e){case"Y":return xc(Ca(4,n),o);case"Yo":return xc(i.ordinalNumber(n,{unit:"year"}),o);default:return xc(Ca(e.length,n),o)}}validate(n,e){return e.isTwoDigitYear||e.year>0}set(n,e,i,o){let r=vP(n,o);if(i.isTwoDigitYear){let d=zq(i.year,r);return n.setFullYear(d,0,o.firstWeekContainsDate),n.setHours(0,0,0,0),om(n,o)}let s=!("era"in e)||e.era===1?i.year:1-i.year;return n.setFullYear(s,0,o.firstWeekContainsDate),n.setHours(0,0,0,0),om(n,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]};var Gq=class extends Dr{priority=130;parse(n,e){return e==="R"?CP(4,n):CP(e.length,n)}set(n,e,i){let o=Vs(n,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Qv(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]};var $q=class extends Dr{priority=130;parse(n,e){return e==="u"?CP(4,n):CP(e.length,n)}set(n,e,i){return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]};var qq=class extends Dr{priority=120;parse(n,e,i){switch(e){case"Q":case"QQ":return Ca(e.length,n);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"})||i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})||i.quarter(n,{width:"abbreviated",context:"formatting"})||i.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,e){return e>=1&&e<=4}set(n,e,i){return n.setMonth((i-1)*3,1),n.setHours(0,0,0,0),n}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]};var Kq=class extends Dr{priority=120;parse(n,e,i){switch(e){case"q":case"qq":return Ca(e.length,n);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"})||i.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})||i.quarter(n,{width:"abbreviated",context:"standalone"})||i.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,e){return e>=1&&e<=4}set(n,e,i){return n.setMonth((i-1)*3,1),n.setHours(0,0,0,0),n}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]};var Wq=class extends Dr{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(n,e,i){let o=r=>r-1;switch(e){case"M":return xc(wl(Fl.month,n),o);case"MM":return xc(Ca(2,n),o);case"Mo":return xc(i.ordinalNumber(n,{unit:"month"}),o);case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"})||i.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})||i.month(n,{width:"abbreviated",context:"formatting"})||i.month(n,{width:"narrow",context:"formatting"})}}validate(n,e){return e>=0&&e<=11}set(n,e,i){return n.setMonth(i,1),n.setHours(0,0,0,0),n}};var Yq=class extends Dr{priority=110;parse(n,e,i){let o=r=>r-1;switch(e){case"L":return xc(wl(Fl.month,n),o);case"LL":return xc(Ca(2,n),o);case"Lo":return xc(i.ordinalNumber(n,{unit:"month"}),o);case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"})||i.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})||i.month(n,{width:"abbreviated",context:"standalone"})||i.month(n,{width:"narrow",context:"standalone"})}}validate(n,e){return e>=0&&e<=11}set(n,e,i){return n.setMonth(i,1),n.setHours(0,0,0,0),n}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]};function QDe(t,n,e){let i=Xo(t,e?.in),o=Aq(i,e)-n;return i.setDate(i.getDate()-o*7),Xo(i,e?.in)}var Qq=class extends Dr{priority=100;parse(n,e,i){switch(e){case"w":return wl(Fl.week,n);case"wo":return i.ordinalNumber(n,{unit:"week"});default:return Ca(e.length,n)}}validate(n,e){return e>=1&&e<=53}set(n,e,i,o){return om(QDe(n,i,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]};function ZDe(t,n,e){let i=Xo(t,e?.in),o=Dq(i,e)-n;return i.setDate(i.getDate()-o*7),i}var Zq=class extends Dr{priority=100;parse(n,e,i){switch(e){case"I":return wl(Fl.week,n);case"Io":return i.ordinalNumber(n,{unit:"week"});default:return Ca(e.length,n)}}validate(n,e){return e>=1&&e<=53}set(n,e,i){return Qv(ZDe(n,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]};var ntt=[31,28,31,30,31,30,31,31,30,31,30,31],ott=[31,29,31,30,31,30,31,31,30,31,30,31],Xq=class extends Dr{priority=90;subPriority=1;parse(n,e,i){switch(e){case"d":return wl(Fl.date,n);case"do":return i.ordinalNumber(n,{unit:"date"});default:return Ca(e.length,n)}}validate(n,e){let i=n.getFullYear(),o=Uq(i),r=n.getMonth();return o?e>=1&&e<=ott[r]:e>=1&&e<=ntt[r]}set(n,e,i){return n.setDate(i),n.setHours(0,0,0,0),n}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]};var Jq=class extends Dr{priority=90;subpriority=1;parse(n,e,i){switch(e){case"D":case"DD":return wl(Fl.dayOfYear,n);case"Do":return i.ordinalNumber(n,{unit:"date"});default:return Ca(e.length,n)}}validate(n,e){let i=n.getFullYear();return Uq(i)?e>=1&&e<=366:e>=1&&e<=365}set(n,e,i){return n.setMonth(0,i),n.setHours(0,0,0,0),n}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]};function wP(t,n,e){let i=ay(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Xo(t,e?.in),s=r.getDay(),m=(n%7+7)%7,v=7-o,w=n<0||n>6?n-(s+v)%7:(m+v)%7-(s+v)%7;return d0(r,w,e)}var eK=class extends Dr{priority=90;parse(n,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})||i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"})}}validate(n,e){return e>=0&&e<=6}set(n,e,i,o){return n=wP(n,i,o),n.setHours(0,0,0,0),n}incompatibleTokens=["D","i","e","c","t","T"]};var tK=class extends Dr{priority=90;parse(n,e,i,o){let r=s=>{let d=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+d};switch(e){case"e":case"ee":return xc(Ca(e.length,n),r);case"eo":return xc(i.ordinalNumber(n,{unit:"day"}),r);case"eee":return i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(n,{width:"wide",context:"formatting"})||i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"})}}validate(n,e){return e>=0&&e<=6}set(n,e,i,o){return n=wP(n,i,o),n.setHours(0,0,0,0),n}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]};var iK=class extends Dr{priority=90;parse(n,e,i,o){let r=s=>{let d=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+d};switch(e){case"c":case"cc":return xc(Ca(e.length,n),r);case"co":return xc(i.ordinalNumber(n,{unit:"day"}),r);case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"})||i.day(n,{width:"short",context:"standalone"})||i.day(n,{width:"narrow",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"})||i.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(n,{width:"wide",context:"standalone"})||i.day(n,{width:"abbreviated",context:"standalone"})||i.day(n,{width:"short",context:"standalone"})||i.day(n,{width:"narrow",context:"standalone"})}}validate(n,e){return e>=0&&e<=6}set(n,e,i,o){return n=wP(n,i,o),n.setHours(0,0,0,0),n}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]};function XDe(t,n,e){let i=Xo(t,e?.in),o=qDe(i,e),r=n-o;return d0(i,r,e)}var nK=class extends Dr{priority=90;parse(n,e,i){let o=r=>r===0?7:r;switch(e){case"i":case"ii":return Ca(e.length,n);case"io":return i.ordinalNumber(n,{unit:"day"});case"iii":return xc(i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"}),o);case"iiiii":return xc(i.day(n,{width:"narrow",context:"formatting"}),o);case"iiiiii":return xc(i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"}),o);case"iiii":default:return xc(i.day(n,{width:"wide",context:"formatting"})||i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"}),o)}}validate(n,e){return e>=1&&e<=7}set(n,e,i){return n=XDe(n,i),n.setHours(0,0,0,0),n}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]};var oK=class extends Dr{priority=80;parse(n,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})||i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,e,i){return n.setHours(xP(i),0,0,0),n}incompatibleTokens=["b","B","H","k","t","T"]};var rK=class extends Dr{priority=80;parse(n,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})||i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,e,i){return n.setHours(xP(i),0,0,0),n}incompatibleTokens=["a","B","H","k","t","T"]};var sK=class extends Dr{priority=80;parse(n,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})||i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,e,i){return n.setHours(xP(i),0,0,0),n}incompatibleTokens=["a","b","t","T"]};var aK=class extends Dr{priority=70;parse(n,e,i){switch(e){case"h":return wl(Fl.hour12h,n);case"ho":return i.ordinalNumber(n,{unit:"hour"});default:return Ca(e.length,n)}}validate(n,e){return e>=1&&e<=12}set(n,e,i){let o=n.getHours()>=12;return o&&i<12?n.setHours(i+12,0,0,0):!o&&i===12?n.setHours(0,0,0,0):n.setHours(i,0,0,0),n}incompatibleTokens=["H","K","k","t","T"]};var lK=class extends Dr{priority=70;parse(n,e,i){switch(e){case"H":return wl(Fl.hour23h,n);case"Ho":return i.ordinalNumber(n,{unit:"hour"});default:return Ca(e.length,n)}}validate(n,e){return e>=0&&e<=23}set(n,e,i){return n.setHours(i,0,0,0),n}incompatibleTokens=["a","b","h","K","k","t","T"]};var cK=class extends Dr{priority=70;parse(n,e,i){switch(e){case"K":return wl(Fl.hour11h,n);case"Ko":return i.ordinalNumber(n,{unit:"hour"});default:return Ca(e.length,n)}}validate(n,e){return e>=0&&e<=11}set(n,e,i){return n.getHours()>=12&&i<12?n.setHours(i+12,0,0,0):n.setHours(i,0,0,0),n}incompatibleTokens=["h","H","k","t","T"]};var dK=class extends Dr{priority=70;parse(n,e,i){switch(e){case"k":return wl(Fl.hour24h,n);case"ko":return i.ordinalNumber(n,{unit:"hour"});default:return Ca(e.length,n)}}validate(n,e){return e>=1&&e<=24}set(n,e,i){let o=i<=24?i%24:i;return n.setHours(o,0,0,0),n}incompatibleTokens=["a","b","h","H","K","t","T"]};var uK=class extends Dr{priority=60;parse(n,e,i){switch(e){case"m":return wl(Fl.minute,n);case"mo":return i.ordinalNumber(n,{unit:"minute"});default:return Ca(e.length,n)}}validate(n,e){return e>=0&&e<=59}set(n,e,i){return n.setMinutes(i,0,0),n}incompatibleTokens=["t","T"]};var pK=class extends Dr{priority=50;parse(n,e,i){switch(e){case"s":return wl(Fl.second,n);case"so":return i.ordinalNumber(n,{unit:"second"});default:return Ca(e.length,n)}}validate(n,e){return e>=0&&e<=59}set(n,e,i){return n.setSeconds(i,0),n}incompatibleTokens=["t","T"]};var hK=class extends Dr{priority=30;parse(n,e){let i=o=>Math.trunc(o*Math.pow(10,-e.length+3));return xc(Ca(e.length,n),i)}set(n,e,i){return n.setMilliseconds(i),n}incompatibleTokens=["t","T"]};var mK=class extends Dr{priority=10;parse(n,e){switch(e){case"X":return py(uy.basicOptionalMinutes,n);case"XX":return py(uy.basic,n);case"XXXX":return py(uy.basicOptionalSeconds,n);case"XXXXX":return py(uy.extendedOptionalSeconds,n);case"XXX":default:return py(uy.extended,n)}}set(n,e,i){return e.timestampIsSet?n:Vs(n,n.getTime()-a2(n)-i)}incompatibleTokens=["t","T","x"]};var fK=class extends Dr{priority=10;parse(n,e){switch(e){case"x":return py(uy.basicOptionalMinutes,n);case"xx":return py(uy.basic,n);case"xxxx":return py(uy.basicOptionalSeconds,n);case"xxxxx":return py(uy.extendedOptionalSeconds,n);case"xxx":default:return py(uy.extended,n)}}set(n,e,i){return e.timestampIsSet?n:Vs(n,n.getTime()-a2(n)-i)}incompatibleTokens=["t","T","X"]};var gK=class extends Dr{priority=40;parse(n){return Vq(n)}set(n,e,i){return[Vs(n,i*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var _K=class extends Dr{priority=20;parse(n){return Vq(n)}set(n,e,i){return[Vs(n,i),{timestampIsSet:!0}]}incompatibleTokens="*"};var JDe={G:new Bq,y:new Hq,Y:new jq,R:new Gq,u:new $q,Q:new qq,q:new Kq,M:new Wq,L:new Yq,w:new Qq,I:new Zq,d:new Xq,D:new Jq,E:new eK,e:new tK,c:new iK,i:new nK,a:new oK,b:new rK,B:new sK,h:new aK,H:new lK,K:new cK,k:new dK,m:new uK,s:new pK,S:new hK,X:new mK,x:new fK,t:new gK,T:new _K};var rtt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,stt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,att=/^'([^]*?)'?$/,ltt=/''/g,ctt=/\S/,dtt=/[a-zA-Z]/;function eAe(t,n,e,i){let o=()=>Vs(i?.in||e,NaN),r=GDe(),s=i?.locale??r.locale??K5,d=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,m=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0;if(!n)return t?o():Xo(e,i?.in);let v={firstWeekContainsDate:d,weekStartsOn:m,locale:s},w=[new Nq(i?.in,e)],O=n.match(stt).map(W=>{let te=W[0];if(te in W5){let fe=W5[te];return fe(W,s.formatLong)}return W}).join("").match(rtt),N=[];for(let W of O){!i?.useAdditionalWeekYearTokens&&Mq(W)&&Y5(W,n,t),!i?.useAdditionalDayOfYearTokens&&kq(W)&&Y5(W,n,t);let te=W[0],fe=JDe[te];if(fe){let{incompatibleTokens:xe}=fe;if(Array.isArray(xe)){let Re=N.find(Se=>xe.includes(Se.token)||Se.token===te);if(Re)throw new RangeError(`The format string mustn't contain \`${Re.fullToken}\` and \`${W}\` at the same time`)}else if(fe.incompatibleTokens==="*"&&N.length>0)throw new RangeError(`The format string mustn't contain \`${W}\` and any other token at the same time`);N.push({token:te,fullToken:W});let Fe=fe.run(t,W,s.match,v);if(!Fe)return o();w.push(Fe.setter),t=Fe.rest}else{if(te.match(dtt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+te+"`");if(W==="''"?W="'":te==="'"&&(W=utt(W)),t.indexOf(W)===0)t=t.slice(W.length);else return o()}}if(t.length>0&&ctt.test(t))return o();let V=w.map(W=>W.priority).sort((W,te)=>te-W).filter((W,te,fe)=>fe.indexOf(W)===te).map(W=>w.filter(te=>te.priority===W).sort((te,fe)=>fe.subPriority-te.subPriority)).map(W=>W[0]),$=Xo(e,i?.in);if(isNaN(+$))return o();let q={};for(let W of V){if(!W.validate($,v))return o();let te=W.set($,q,v);Array.isArray(te)?($=te[0],Object.assign(q,te[1])):$=te}return $}function utt(t){return t.match(att)[1].replace(ltt,"'")}function yK(t,n,e){return d0(t,-n,e)}function kae(t,n){let e=()=>Vs(n?.in,NaN),i=n?.additionalDigits??2,o=ftt(t),r;if(o.date){let v=gtt(o.date,i);r=_tt(v.restDateString,v.year)}if(!r||isNaN(+r))return e();let s=+r,d=0,m;if(o.time&&(d=ytt(o.time),isNaN(d)))return e();if(o.timezone){if(m=vtt(o.timezone),isNaN(m))return e()}else{let v=new Date(s+d),w=Xo(0,n?.in);return w.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),w.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),w}return Xo(s+d+m,n?.in)}var vK={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ptt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,htt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,mtt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ftt(t){let n={},e=t.split(vK.dateTimeDelimiter),i;if(e.length>2)return n;if(/:/.test(e[0])?i=e[0]:(n.date=e[0],i=e[1],vK.timeZoneDelimiter.test(n.date)&&(n.date=t.split(vK.timeZoneDelimiter)[0],i=t.substr(n.date.length,t.length))),i){let o=vK.timezone.exec(i);o?(n.time=i.replace(o[1],""),n.timezone=o[1]):n.time=i}return n}function gtt(t,n){let e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),i=t.match(e);if(!i)return{year:NaN,restDateString:""};let o=i[1]?parseInt(i[1]):null,r=i[2]?parseInt(i[2]):null;return{year:r===null?o:r*100,restDateString:t.slice((i[1]||i[2]).length)}}function _tt(t,n){if(n===null)return new Date(NaN);let e=t.match(ptt);if(!e)return new Date(NaN);let i=!!e[4],o=Z5(e[1]),r=Z5(e[2])-1,s=Z5(e[3]),d=Z5(e[4]),m=Z5(e[5])-1;if(i)return Stt(n,d,m)?btt(n,d,m):new Date(NaN);{let v=new Date(0);return!xtt(n,r,s)||!wtt(n,o)?new Date(NaN):(v.setUTCFullYear(n,r,Math.max(o,s)),v)}}function Z5(t){return t?parseInt(t):1}function ytt(t){let n=t.match(htt);if(!n)return NaN;let e=Aae(n[1]),i=Aae(n[2]),o=Aae(n[3]);return Ttt(e,i,o)?e*G5+i*j5+o*1e3:NaN}function Aae(t){return t&&parseFloat(t.replace(",","."))||0}function vtt(t){if(t==="Z")return 0;let n=t.match(mtt);if(!n)return 0;let e=n[1]==="+"?-1:1,i=parseInt(n[2]),o=n[3]&&parseInt(n[3])||0;return Itt(i,o)?e*(i*G5+o*j5):NaN}function btt(t,n,e){let i=new Date(0);i.setUTCFullYear(t,0,4);let o=i.getUTCDay()||7,r=(n-1)*7+e+1-o;return i.setUTCDate(i.getUTCDate()+r),i}var Ctt=[31,null,31,30,31,30,31,31,30,31,30,31];function tAe(t){return t%400===0||t%4===0&&t%100!==0}function xtt(t,n,e){return n>=0&&n<=11&&e>=1&&e<=(Ctt[n]||(tAe(t)?29:28))}function wtt(t,n){return n>=1&&n<=(tAe(t)?366:365)}function Stt(t,n,e){return n>=1&&n<=53&&e>=0&&e<=6}function Ttt(t,n,e){return t===24?n===0&&e===0:e>=0&&e<60&&n>=0&&n<60&&t>=0&&t<25}function Itt(t,n){return n>=0&&n<=59}function iAe(t,n,e){let i=Xo(t,e?.in),o=i.getFullYear(),r=i.getDate(),s=Vs(e?.in||t,0);s.setFullYear(o,n,15),s.setHours(0,0,0,0);let d=Oq(s);return i.setMonth(n,Math.min(r,d)),i}function nAe(t,n,e){let i=Xo(t,e?.in);return isNaN(+i)?Vs(e?.in||t,NaN):(n.year!=null&&i.setFullYear(n.year),n.month!=null&&(i=iAe(i,n.month)),n.date!=null&&i.setDate(n.date),n.hours!=null&&i.setHours(n.hours),n.minutes!=null&&i.setMinutes(n.minutes),n.seconds!=null&&i.setSeconds(n.seconds),n.milliseconds!=null&&i.setMilliseconds(n.milliseconds),i)}function bK(t,n,e){return Yv(t,-n,e)}function CK(t,n,e){let{years:i=0,months:o=0,weeks:r=0,days:s=0,hours:d=0,minutes:m=0,seconds:v=0}=n,w=bK(t,o+i*12,e),O=yK(w,s+r*7,e),N=m+d*60,$=(v+N*60)*1e3;return Vs(e?.in||t,+O-$)}function oAe(t,n,e){return $5(t,-n,e)}function rAe(t,n,e){return Sq(t,-n,e)}function sAe(t,n,e){return q5(t,-n,e)}function aAe(t,n,e){return l2(t,-n,e)}var jp=class t{static equals(n,e){return!n&&!e||!!n&&!!e&&Eae(n.start,e.start)&&Eae(n.end,e.end)}static byUnit(n,e=new Date){let i,o,r,s,d;switch(n){case"previous-month":o=CK(yP(e),{days:1}),i=yP(o);break;case"previous-quarter":o=CK(_P(e),{days:1}),i=_P(o);break;case"previous-half-year":r=Rq(e),s=Fq(e),r>6?(i=new Date(s,0,1),o=new Date(s,5,30)):(i=new Date(s-1,6,1),o=new Date(s-1,11,31));break;case"previous-year":default:d=CK(e,{years:1}),i=c2(d),o=ADe(d);break}return new t(i,o)}static fromObject(n){let e=new Date(n.start),i=new Date(n.end);return new t(e,i)}constructor(n,e){this.start=n,this.end=e,this.error={invalidRange:!1}}isValid(){if(this.start&&this.end){if(this.end.getTime()>=this.start.getTime())return this.error.invalidRange=!1,!0;this.error.invalidRange=!0}return!1}toString(){return`${this.start.toISOString()} - ${this.end.toISOString()}`}clone(){return new t(new Date(this.start.getTime()),new Date(this.end.getTime()))}toCompactDateString(n="de-DE"){if(!this.start||!this.end)return"";let e=new Intl.DateTimeFormat(n,{month:"2-digit",day:"2-digit",year:"numeric"});return this.start.getFullYear()===this.end.getFullYear()&&this.start.getMonth()===0&&this.start.getDate()===1&&this.end.getMonth()===11&&this.end.getDate()===31?this.start.getFullYear().toString():`${e.format(this.start)} - ${e.format(this.end)}`}getYears(){let n=this.start.getFullYear(),e=this.end.getFullYear(),i=[];for(let o=n;o<=e;o++)i.push(o);return i}};var Ch=class{static equals(n,e){return n.start.temporalUnit===e.start.temporalUnit&&n.start.count===e.start.count&&n.duration.temporalUnit===e.duration.temporalUnit&&n.duration.count===e.duration.count}constructor(n,e){this._start=n,this._duration=e,this._startDate=this._getStartDate(),this._endDate=this._getEndDate(this._startDate,this._duration)}toJSON(){return{start:this._start,duration:this._duration}}getTriggerDateNextInterval(){let n=new Date,e=null;switch(this._duration.temporalUnit){case"year":e=c2(l2(n,1));break;case"quarter":e=_P($5(n,1));break;case"month":e=yP(Yv(n,1));break;case"week":e=om(q5(n,1));break;case"day":e=d0(n,1);break}return ly(e)}get startDate(){return this._startDate}get endDate(){return this._endDate}get start(){return this._start}set start(n){this._start=n,this._startDate=this._getStartDate(),this._endDate=this._getEndDate(this._startDate,this._duration)}get duration(){return this._duration}set duration(n){this._duration=n,this._endDate=this._getEndDate(this._startDate,this._duration)}_getStartDate(){let n;switch(this._start.temporalUnit){case"year":n=aAe(new Date,this._start.count),n=c2(n);break;case"quarter":n=oAe(new Date,this._start.count),n=_P(n);break;case"month":n=bK(new Date,this._start.count),n=yP(n);break;case"week":n=sAe(new Date,this._start.count),n=om(n);break;case"day":n=yK(new Date,this._start.count)}return ly(n)}_getEndDate(n,e){let i;switch(e.temporalUnit){case"year":i=l2(n,e.count);break;case"quarter":i=$5(n,e.count);break;case"month":i=Yv(n,e.count);break;case"week":i=q5(n,e.count);break;case"day":i=d0(n,e.count)}return i=ly(i),rAe(i,1)}};var u2=class{static fromObject(n){if(!n)throw new Error("Missing input object.");let e;switch(n.type){case"relative":e=Nw.fromObject(n);break;case"calendric":e=hy.fromObject(n);break;default:throw new Error(`Invalid timeSelection type: ${n.type}`)}return e}},Nw=class t extends u2{static fromObject(n){let e=new Ch(n.intervalRelative.start||n.intervalRelative._start,n.intervalRelative.duration||n.intervalRelative._duration);return new t(e)}constructor(n){super(),this.intervalRelative=n,this.type="relative"}equals(n){return this.type===n.type&&Ch.equals(this.intervalRelative,n.intervalRelative)}clone(){return new t(new Ch(this.intervalRelative.start,this.intervalRelative.duration))}valid(){return!!this.type&&!!this.intervalRelative}toJSON(){return{type:this.type,intervalRelative:this.intervalRelative.toJSON()}}},hy=class t extends u2{static fromObject(n){let e=jp.fromObject(n.interval);return new t(e)}constructor(n){super(),this.interval=n,this.type="calendric"}clone(){return new t(this.interval.clone())}equals(n){return this.type===n.type&&jp.equals(this.interval,n.interval)}valid(){return!!this.type&&!!this.interval&&this.interval.isValid()}toJSON(){return{type:this.type,interval:this.interval}}};var Qs=(function(t){return t[t.State=0]="State",t[t.Transition=1]="Transition",t[t.Sequence=2]="Sequence",t[t.Group=3]="Group",t[t.Animate=4]="Animate",t[t.Keyframes=5]="Keyframes",t[t.Style=6]="Style",t[t.Trigger=7]="Trigger",t[t.Reference=8]="Reference",t[t.AnimateChild=9]="AnimateChild",t[t.AnimateRef=10]="AnimateRef",t[t.Query=11]="Query",t[t.Stagger=12]="Stagger",t})(Qs||{}),my="*";function xh(t,n){return{type:Qs.Trigger,name:t,definitions:n,options:{}}}function uc(t,n=null){return{type:Qs.Animate,styles:n,timings:t}}function lAe(t,n=null){return{type:Qs.Sequence,steps:t,options:n}}function al(t){return{type:Qs.Style,styles:t,offset:null}}function u0(t,n,e){return{type:Qs.State,name:t,styles:n,options:e}}function Rc(t,n,e=null){return{type:Qs.Transition,expr:t,animation:n,options:e}}function nx(t,n=null){return{type:Qs.Reference,animation:t,options:n}}function WI(t,n=null){return{type:Qs.AnimateRef,animation:t,options:n}}var ix=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(n=0,e=0){this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){let e=n=="start"?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},p2=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(n){this.players=n;let e=0,i=0,o=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==r&&this._onFinish()}),s.onDestroy(()=>{++i==r&&this._onDestroy()}),s.onStart(()=>{++o==r&&this._onStart()})}),this.totalTime=this.players.reduce((s,d)=>Math.max(s,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){let e=n*this.totalTime;this.players.forEach(i=>{let o=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(o)})}getPosition(){let n=this.players.reduce((e,i)=>e===null||i.totalTime>e.totalTime?i:e,null);return n!=null?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){let e=n=="start"?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},SP="!";function TP(...t){if(t){let n=[];for(let e=0;ed?s:void 0);n=r.length?n.concat(r.filter(s=>!!s)):n}}return n.join(" ").trim()}}function Fc(t,n){return t?t.classList?t.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(t.className):!1}function ac(t,n){if(t&&n){let e=i=>{Fc(t,i)||(t.classList?t.classList.add(i):t.className+=" "+i)};[n].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(e))}}function Dtt(){return window.innerWidth-document.documentElement.offsetWidth}function cAe(t){typeof t=="string"?ac(document.body,t||"p-overflow-hidden"):(t!=null&&t.variableName&&document.body.style.setProperty(t.variableName,Dtt()+"px"),ac(document.body,t?.className||"p-overflow-hidden"))}function Fd(t,n){if(t&&n){let e=i=>{t.classList?t.classList.remove(i):t.className=t.className.replace(new RegExp("(^|\\b)"+i.split(" ").join("|")+"(\\b|$)","gi")," ")};[n].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(e))}}function dAe(t){typeof t=="string"?Fd(document.body,t||"p-overflow-hidden"):(t!=null&&t.variableName&&document.body.style.removeProperty(t.variableName),Fd(document.body,t?.className||"p-overflow-hidden"))}function X5(t){for(let n of document?.styleSheets)try{for(let e of n?.cssRules)for(let i of e?.style)if(t.test(i))return{name:i,value:e.style.getPropertyValue(i).trim()}}catch{}return null}function uAe(t){let n={width:0,height:0};if(t){let[e,i]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block",n.width=t.offsetWidth,n.height=t.offsetHeight,t.style.display=i,t.style.visibility=e}return n}function YI(){let t=window,n=document,e=n.documentElement,i=n.getElementsByTagName("body")[0],o=t.innerWidth||e.clientWidth||i.clientWidth,r=t.innerHeight||e.clientHeight||i.clientHeight;return{width:o,height:r}}function Rae(t){return t?Math.abs(t.scrollLeft):0}function ez(){let t=document.documentElement;return(window.pageXOffset||Rae(t))-(t.clientLeft||0)}function tz(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}function IP(t){return t?getComputedStyle(t).direction==="rtl":!1}function EP(t,n,e=!0){var i,o,r,s;if(t){let d=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:uAe(t),m=d.height,v=d.width,w=n.offsetHeight,O=n.offsetWidth,N=n.getBoundingClientRect(),V=tz(),$=ez(),q=YI(),W,te,fe="top";N.top+w+m>q.height?(W=N.top+V-m,fe="bottom",W<0&&(W=V)):W=w+N.top+V,N.left+v>q.width?te=Math.max(0,N.left+$+O-v):te=N.left+$,IP(t)?t.style.insetInlineEnd=te+"px":t.style.insetInlineStart=te+"px",t.style.top=W+"px",t.style.transformOrigin=fe,e&&(t.style.marginTop=fe==="bottom"?`calc(${(o=(i=X5(/-anchor-gutter$/))==null?void 0:i.value)!=null?o:"2px"} * -1)`:(s=(r=X5(/-anchor-gutter$/))==null?void 0:r.value)!=null?s:"")}}function DP(t,n){t&&(typeof n=="string"?t.style.cssText=n:Object.entries(n||{}).forEach(([e,i])=>t.style[e]=i))}function qc(t,n){if(t instanceof HTMLElement){let e=t.offsetWidth;if(n){let i=getComputedStyle(t);e+=parseFloat(i.marginLeft)+parseFloat(i.marginRight)}return e}return 0}function xK(t,n,e=!0,i=void 0){var o;if(t){let r=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:uAe(t),s=n.offsetHeight,d=n.getBoundingClientRect(),m=YI(),v,w,O=i??"top";if(!i&&d.top+s+r.height>m.height?(v=-1*r.height,O="bottom",d.top+v<0&&(v=-1*d.top)):v=s,r.width>m.width?w=d.left*-1:d.left+r.width>m.width?w=(d.left+r.width-m.width)*-1:w=0,t.style.top=v+"px",t.style.insetInlineStart=w+"px",t.style.transformOrigin=O,e){let N=(o=X5(/-anchor-gutter$/))==null?void 0:o.value;t.style.marginTop=O==="bottom"?`calc(${N??"2px"} * -1)`:N??""}}}function pAe(t){if(t){let n=t.parentNode;return n&&n instanceof ShadowRoot&&n.host&&(n=n.host),n}return null}function Att(t){return!!(t!==null&&typeof t<"u"&&t.nodeName&&pAe(t))}function AP(t){return typeof Element<"u"?t instanceof Element:t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"}function hAe(t){let n=t;return t&&typeof t=="object"&&(Object.hasOwn(t,"current")?n=t.current:Object.hasOwn(t,"el")&&(Object.hasOwn(t.el,"nativeElement")?n=t.el.nativeElement:n=t.el)),AP(n)?n:void 0}function Fae(t,n){var e,i,o;if(t)switch(t){case"document":return document;case"window":return window;case"body":return document.body;case"@next":return n?.nextElementSibling;case"@prev":return n?.previousElementSibling;case"@first":return n?.firstElementChild;case"@last":return n?.lastElementChild;case"@child":return(e=n?.children)==null?void 0:e[0];case"@parent":return n?.parentElement;case"@grandparent":return(i=n?.parentElement)==null?void 0:i.parentElement;default:{if(typeof t=="string"){let d=t.match(/^@child\[(\d+)]/);return d?((o=n?.children)==null?void 0:o[parseInt(d[1],10)])||null:document.querySelector(t)||null}let r=(d=>typeof d=="function"&&"call"in d&&"apply"in d)(t)?t():t,s=hAe(r);return Att(s)?s:r?.nodeType===9?r:void 0}}}function Zv(t,n){let e=Fae(t,n);if(e)e.appendChild(n);else throw new Error("Cannot append "+n+" to "+t)}var Mae;function mAe(t){if(t){let n=getComputedStyle(t);return t.offsetHeight-t.clientHeight-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)}else{if(Mae!=null)return Mae;let n=document.createElement("div");DP(n,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(n);let e=n.offsetHeight-n.clientHeight;return document.body.removeChild(n),Mae=e,e}}var Oae;function J5(t){if(t){let n=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}else{if(Oae!=null)return Oae;let n=document.createElement("div");DP(n,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(n);let e=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),Oae=e,e}}function fAe(){if(window.getSelection){let t=window.getSelection()||{};t.empty?t.empty():t.removeAllRanges&&t.rangeCount>0&&t.getRangeAt(0).getClientRects().length>0&&t.removeAllRanges()}}function wK(t,n={}){if(AP(t)){let e=(i,o)=>{var r,s;let d=(r=t?.$attrs)!=null&&r[i]?[(s=t?.$attrs)==null?void 0:s[i]]:[];return[o].flat().reduce((m,v)=>{if(v!=null){let w=typeof v;if(w==="string"||w==="number")m.push(v);else if(w==="object"){let O=Array.isArray(v)?e(i,v):Object.entries(v).map(([N,V])=>i==="style"&&(V||V===0)?`${N.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${V}`:V?N:void 0);m=O.length?m.concat(O.filter(N=>!!N)):m}}return m},d)};Object.entries(n).forEach(([i,o])=>{if(o!=null){let r=i.match(/^on(.+)/);r?t.addEventListener(r[1].toLowerCase(),o):i==="p-bind"||i==="pBind"?wK(t,o):(o=i==="class"?[...new Set(e("class",o))].join(" ").trim():i==="style"?e("style",o).join(";").trim():o,(t.$attrs=t.$attrs||{})&&(t.$attrs[i]=o),t.setAttribute(i,o))}})}}function gAe(t,n={},...e){if(t){let i=document.createElement(t);return wK(i,n),i.append(...e),i}}function _Ae(t,n){if(t){t.style.opacity="0";let e=+new Date,i="0",o=function(){i=`${+t.style.opacity+(new Date().getTime()-e)/n}`,t.style.opacity=i,e=+new Date,+i<1&&("requestAnimationFrame"in window?requestAnimationFrame(o):setTimeout(o,16))};o()}}function Xd(t,n){return AP(t)?Array.from(t.querySelectorAll(n)):[]}function zo(t,n){return AP(t)?t.matches(n)?t:t.querySelector(n):null}function ss(t,n){t&&document.activeElement!==t&&t.focus(n)}function p0(t,n){if(AP(t)){let e=t.getAttribute(n);return isNaN(e)?e==="true"||e==="false"?e==="true":e:+e}}function Bw(t,n=""){let e=Xd(t,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, [href]:not([tabindex = "-1"]):not([style*="display:none"]):not([hidden])${n}, input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}`),i=[];for(let o of e)getComputedStyle(o).display!="none"&&getComputedStyle(o).visibility!="hidden"&&i.push(o);return i}function Vw(t,n){let e=Bw(t,n);return e.length>0?e[0]:null}function ox(t){if(t){let n=t.offsetHeight,e=getComputedStyle(t);return n-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),n}return 0}function Pae(t){if(t){let[n,e]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block";let i=t.offsetHeight;return t.style.display=e,t.style.visibility=n,i}return 0}function Lae(t){if(t){let[n,e]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block";let i=t.offsetWidth;return t.style.display=e,t.style.visibility=n,i}return 0}function rx(t){var n;if(t){let e=(n=pAe(t))==null?void 0:n.childNodes,i=0;if(e)for(let o=0;o0?e[e.length-1]:null}function Zg(t){if(t){let n=t.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||Rae(document.documentElement)||Rae(document.body)||0)}}return{top:"auto",left:"auto"}}function qm(t,n){if(t){let e=t.offsetHeight;if(n){let i=getComputedStyle(t);e+=parseFloat(i.marginTop)+parseFloat(i.marginBottom)}return e}return 0}function yAe(){if(window.getSelection)return window.getSelection().toString();if(document.getSelection)return document.getSelection().toString()}function ng(t){if(t){let n=t.offsetWidth,e=getComputedStyle(t);return n-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth),n}return 0}function Nae(t){return!!(t&&t.offsetParent!=null)}function vAe(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window)}function Xg(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function bAe(t,n){var e,i;if(t){let o=t.parentElement,r=Zg(o),s=YI(),d=t.offsetParent?t.offsetWidth:Lae(t),m=t.offsetParent?t.offsetHeight:Pae(t),v=qc((e=o?.children)==null?void 0:e[0]),w=qm((i=o?.children)==null?void 0:i[0]),O="",N="";r.left+v+d>s.width-J5()?r.lefts.height?N=`-${m-w}px`:N="0px",t.style.top=N,t.style.insetInlineStart=O}}function CAe(t){var n;t&&("remove"in Element.prototype?t.remove():(n=t.parentNode)==null||n.removeChild(t))}function xAe(t,n){let e=hAe(t);if(e)e.removeChild(n);else throw new Error("Cannot remove "+n+" from "+t)}function wAe(t,n){let e=getComputedStyle(t).getPropertyValue("borderTopWidth"),i=e?parseFloat(e):0,o=getComputedStyle(t).getPropertyValue("paddingTop"),r=o?parseFloat(o):0,s=t.getBoundingClientRect(),d=n.getBoundingClientRect().top+document.body.scrollTop-(s.top+document.body.scrollTop)-i-r,m=t.scrollTop,v=t.clientHeight,w=qm(n);d<0?t.scrollTop=m+d:d+w>v&&(t.scrollTop=m+d-v+w)}function Xv(t,n="",e){AP(t)&&e!==null&&e!==void 0&&t.setAttribute(n,e)}function SAe(){let t=new Map;return{on(n,e){let i=t.get(n);return i?i.push(e):i=[e],t.set(n,i),this},off(n,e){let i=t.get(n);return i&&i.splice(i.indexOf(e)>>>0,1),this},emit(n,e){let i=t.get(n);i&&i.forEach(o=>{o(e)})},clear(){t.clear()}}}var ktt=Object.defineProperty,TAe=Object.getOwnPropertySymbols,Mtt=Object.prototype.hasOwnProperty,Ott=Object.prototype.propertyIsEnumerable,IAe=(t,n,e)=>n in t?ktt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,Rtt=(t,n)=>{for(var e in n||(n={}))Mtt.call(n,e)&&IAe(t,e,n[e]);if(TAe)for(var e of TAe(n))Ott.call(n,e)&&IAe(t,e,n[e]);return t};function wc(t){return t==null||t===""||Array.isArray(t)&&t.length===0||!(t instanceof Date)&&typeof t=="object"&&Object.keys(t).length===0}function Bae(t,n,e=new WeakSet){if(t===n)return!0;if(!t||!n||typeof t!="object"||typeof n!="object"||e.has(t)||e.has(n))return!1;e.add(t).add(n);let i=Array.isArray(t),o=Array.isArray(n),r,s,d;if(i&&o){if(s=t.length,s!=n.length)return!1;for(r=s;r--!==0;)if(!Bae(t[r],n[r],e))return!1;return!0}if(i!=o)return!1;let m=t instanceof Date,v=n instanceof Date;if(m!=v)return!1;if(m&&v)return t.getTime()==n.getTime();let w=t instanceof RegExp,O=n instanceof RegExp;if(w!=O)return!1;if(w&&O)return t.toString()==n.toString();let N=Object.keys(t);if(s=N.length,s!==Object.keys(n).length)return!1;for(r=s;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,N[r]))return!1;for(r=s;r--!==0;)if(d=N[r],!Bae(t[d],n[d],e))return!1;return!0}function iz(t,n){return Bae(t,n)}function SK(t){return typeof t=="function"&&"call"in t&&"apply"in t}function Kr(t){return!wc(t)}function bs(t,n){if(!t||!n)return null;try{let e=t[n];if(Kr(e))return e}catch{}if(Object.keys(t).length){if(SK(n))return n(t);if(n.indexOf(".")===-1)return t[n];{let e=n.split("."),i=t;for(let o=0,r=e.length;o{let o=i;Jv(n[o])&&o in t&&Jv(t[o])?e[o]=AAe(t[o],n[o]):e[o]=n[o]}),e}function kAe(...t){return t.reduce((n,e,i)=>i===0?e:AAe(n,e),{})}function Pd(t,n){let e=-1;if(n){for(let i=0;iEAe(s)===o)||"";return TK(rm(t[r],e),i.join("."),e)}return}return rm(t,e)}function Vae(t,n=!0){return Array.isArray(t)&&(n||t.length!==0)}function nz(t){return t instanceof Date}function MAe(t){return Kr(t)&&!isNaN(t)}function ZI(t=""){return Kr(t)&&t.length===1&&!!t.match(/\S| /)}function eb(t,n){if(n){let e=n.test(t);return n.lastIndex=0,e}return!1}function h2(t){return t&&t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":").trim()}function Km(t){if(t&&/[\xC0-\xFF\u0100-\u017E]/.test(t)){let n={A:/[\xC0-\xC5\u0100\u0102\u0104]/g,AE:/[\xC6]/g,C:/[\xC7\u0106\u0108\u010A\u010C]/g,D:/[\xD0\u010E\u0110]/g,E:/[\xC8-\xCB\u0112\u0114\u0116\u0118\u011A]/g,G:/[\u011C\u011E\u0120\u0122]/g,H:/[\u0124\u0126]/g,I:/[\xCC-\xCF\u0128\u012A\u012C\u012E\u0130]/g,IJ:/[\u0132]/g,J:/[\u0134]/g,K:/[\u0136]/g,L:/[\u0139\u013B\u013D\u013F\u0141]/g,N:/[\xD1\u0143\u0145\u0147\u014A]/g,O:/[\xD2-\xD6\xD8\u014C\u014E\u0150]/g,OE:/[\u0152]/g,R:/[\u0154\u0156\u0158]/g,S:/[\u015A\u015C\u015E\u0160]/g,T:/[\u0162\u0164\u0166]/g,U:/[\xD9-\xDC\u0168\u016A\u016C\u016E\u0170\u0172]/g,W:/[\u0174]/g,Y:/[\xDD\u0176\u0178]/g,Z:/[\u0179\u017B\u017D]/g,a:/[\xE0-\xE5\u0101\u0103\u0105]/g,ae:/[\xE6]/g,c:/[\xE7\u0107\u0109\u010B\u010D]/g,d:/[\u010F\u0111]/g,e:/[\xE8-\xEB\u0113\u0115\u0117\u0119\u011B]/g,g:/[\u011D\u011F\u0121\u0123]/g,i:/[\xEC-\xEF\u0129\u012B\u012D\u012F\u0131]/g,ij:/[\u0133]/g,j:/[\u0135]/g,k:/[\u0137,\u0138]/g,l:/[\u013A\u013C\u013E\u0140\u0142]/g,n:/[\xF1\u0144\u0146\u0148\u014B]/g,p:/[\xFE]/g,o:/[\xF2-\xF6\xF8\u014D\u014F\u0151]/g,oe:/[\u0153]/g,r:/[\u0155\u0157\u0159]/g,s:/[\u015B\u015D\u015F\u0161]/g,t:/[\u0163\u0165\u0167]/g,u:/[\xF9-\xFC\u0169\u016B\u016D\u016F\u0171\u0173]/g,w:/[\u0175]/g,y:/[\xFD\xFF\u0177]/g,z:/[\u017A\u017C\u017E]/g};for(let e in n)t=t.replace(n[e],e)}return t}function OAe(t,n,e){t&&n!==e&&(e>=t.length&&(e%=t.length,n%=t.length),t.splice(e,0,t.splice(n,1)[0]))}function IK(t){return QI(t)?t.replace(/(_)/g,"-").replace(/[A-Z]/g,(n,e)=>e===0?n:"-"+n.toLowerCase()).toLowerCase():t}var EK={};function Vr(t="pui_id_"){return Object.hasOwn(EK,t)||(EK[t]=0),EK[t]++,`${t}${EK[t]}`}var RAe=["*"];var $p=(()=>{class t{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static IN="in";static LESS_THAN="lt";static LESS_THAN_OR_EQUAL_TO="lte";static GREATER_THAN="gt";static GREATER_THAN_OR_EQUAL_TO="gte";static BETWEEN="between";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static DATE_IS="dateIs";static DATE_IS_NOT="dateIsNot";static DATE_BEFORE="dateBefore";static DATE_AFTER="dateAfter"}return t})(),zae=(()=>{class t{static AND="and";static OR="or"}return t})(),fy=(()=>{class t{filter(e,i,o,r,s){let d=[];if(e)for(let m of e)for(let v of i){let w=bs(m,v);if(this.filters[r](w,o,s)){d.push(m);break}}return d}filters={startsWith:(e,i,o)=>{if(i==null||i.trim()==="")return!0;if(e==null)return!1;let r=Km(i.toString()).toLocaleLowerCase(o);return Km(e.toString()).toLocaleLowerCase(o).slice(0,r.length)===r},contains:(e,i,o)=>{if(i==null||typeof i=="string"&&i.trim()==="")return!0;if(e==null)return!1;let r=Km(i.toString()).toLocaleLowerCase(o);return Km(e.toString()).toLocaleLowerCase(o).indexOf(r)!==-1},notContains:(e,i,o)=>{if(i==null||typeof i=="string"&&i.trim()==="")return!0;if(e==null)return!1;let r=Km(i.toString()).toLocaleLowerCase(o);return Km(e.toString()).toLocaleLowerCase(o).indexOf(r)===-1},endsWith:(e,i,o)=>{if(i==null||i.trim()==="")return!0;if(e==null)return!1;let r=Km(i.toString()).toLocaleLowerCase(o),s=Km(e.toString()).toLocaleLowerCase(o);return s.indexOf(r,s.length-r.length)!==-1},equals:(e,i,o)=>i==null||typeof i=="string"&&i.trim()===""?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()===i.getTime():e==i?!0:Km(e.toString()).toLocaleLowerCase(o)==Km(i.toString()).toLocaleLowerCase(o),notEquals:(e,i,o)=>i==null||typeof i=="string"&&i.trim()===""?!1:e==null?!0:e.getTime&&i.getTime?e.getTime()!==i.getTime():e==i?!1:Km(e.toString()).toLocaleLowerCase(o)!=Km(i.toString()).toLocaleLowerCase(o),in:(e,i)=>{if(i==null||i.length===0)return!0;for(let o=0;oi==null||i[0]==null||i[1]==null?!0:e==null?!1:e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1],lt:(e,i,o)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i,gt:(e,i,o)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()>i.getTime():e>i,gte:(e,i,o)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i,is:(e,i,o)=>this.filters.equals(e,i,o),isNot:(e,i,o)=>this.filters.notEquals(e,i,o),before:(e,i,o)=>this.filters.lt(e,i,o),after:(e,i,o)=>this.filters.gt(e,i,o),dateIs:(e,i)=>i==null?!0:e==null?!1:e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>i==null?!0:e==null?!1:e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>i==null?!0:e==null?!1:e.getTime()i==null?!0:e==null?!1:(e.setHours(0,0,0,0),e.getTime()>i.getTime())};register(e,i){this.filters[e]=i}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Jg=(()=>{class t{clickSource=new hi;clickObservable=this.clickSource.asObservable();add(e){e&&this.clickSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var DK=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["p-header"]],standalone:!1,ngContentSelectors:RAe,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},encapsulation:2})}return t})(),AK=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["p-footer"]],standalone:!1,ngContentSelectors:RAe,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},encapsulation:2})}return t})(),so=(()=>{class t{template;type;name;constructor(e){this.template=e}getType(){return this.name}static \u0275fac=function(i){return new(i||t)(_e(jc))};static \u0275dir=rn({type:t,selectors:[["","pTemplate",""]],inputs:{type:"type",name:[0,"pTemplate","name"]}})}return t})(),In=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[On]})}return t})(),el=(()=>{class t{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static NO_FILTER="noFilter";static LT="lt";static LTE="lte";static GT="gt";static GTE="gte";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static CLEAR="clear";static APPLY="apply";static MATCH_ALL="matchAll";static MATCH_ANY="matchAny";static ADD_RULE="addRule";static REMOVE_RULE="removeRule";static ACCEPT="accept";static REJECT="reject";static CHOOSE="choose";static UPLOAD="upload";static CANCEL="cancel";static PENDING="pending";static FILE_SIZE_TYPES="fileSizeTypes";static DAY_NAMES="dayNames";static DAY_NAMES_SHORT="dayNamesShort";static DAY_NAMES_MIN="dayNamesMin";static MONTH_NAMES="monthNames";static MONTH_NAMES_SHORT="monthNamesShort";static FIRST_DAY_OF_WEEK="firstDayOfWeek";static TODAY="today";static WEEK_HEADER="weekHeader";static WEAK="weak";static MEDIUM="medium";static STRONG="strong";static PASSWORD_PROMPT="passwordPrompt";static EMPTY_MESSAGE="emptyMessage";static EMPTY_FILTER_MESSAGE="emptyFilterMessage";static SHOW_FILTER_MENU="showFilterMenu";static HIDE_FILTER_MENU="hideFilterMenu";static SELECTION_MESSAGE="selectionMessage";static ARIA="aria";static SELECT_COLOR="selectColor";static BROWSE_FILES="browseFiles"}return t})(),FAe=(()=>{class t{dragStartSource=new hi;dragStopSource=new hi;dragStart$=this.dragStartSource.asObservable();dragStop$=this.dragStopSource.asObservable();startDrag(e){this.dragStartSource.next(e)}stopDrag(e){this.dragStopSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Ftt=Object.defineProperty,Ptt=Object.defineProperties,Ltt=Object.getOwnPropertyDescriptors,kK=Object.getOwnPropertySymbols,NAe=Object.prototype.hasOwnProperty,BAe=Object.prototype.propertyIsEnumerable,PAe=(t,n,e)=>n in t?Ftt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,ib=(t,n)=>{for(var e in n||(n={}))NAe.call(n,e)&&PAe(t,e,n[e]);if(kK)for(var e of kK(n))BAe.call(n,e)&&PAe(t,e,n[e]);return t},Uae=(t,n)=>Ptt(t,Ltt(n)),zw=(t,n)=>{var e={};for(var i in t)NAe.call(t,i)&&n.indexOf(i)<0&&(e[i]=t[i]);if(t!=null&&kK)for(var i of kK(t))n.indexOf(i)<0&&BAe.call(t,i)&&(e[i]=t[i]);return e};function OP(...t){return kAe(...t)}var Ntt=SAe(),h0=Ntt,oz=/{([^}]*)}/g,VAe=/(\d+\s+[\+\-\*\/]\s+\d+)/g,zAe=/var\([^)]+\)/g;function LAe(t){return QI(t)?t.replace(/[A-Z]/g,(n,e)=>e===0?n:"."+n.toLowerCase()).toLowerCase():t}function Btt(t){return Jv(t)&&t.hasOwnProperty("$value")&&t.hasOwnProperty("$type")?t.$value:t}function Vtt(t){return t.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function Hae(t="",n=""){return Vtt(`${QI(t,!1)&&QI(n,!1)?`${t}-`:t}${n}`)}function UAe(t="",n=""){return`--${Hae(t,n)}`}function ztt(t=""){let n=(t.match(/{/g)||[]).length,e=(t.match(/}/g)||[]).length;return(n+e)%2!==0}function HAe(t,n="",e="",i=[],o){if(QI(t)){let r=t.trim();if(ztt(r))return;if(eb(r,oz)){let s=r.replaceAll(oz,d=>{let m=d.replace(/{|}/g,"").split(".").filter(v=>!i.some(w=>eb(v,w)));return`var(${UAe(e,IK(m.join("-")))}${Kr(o)?`, ${o}`:""})`});return eb(s.replace(zAe,"0"),VAe)?`calc(${s})`:s}return r}else if(MAe(t))return t}function Utt(t,n,e){QI(n,!1)&&t.push(`${n}:${e};`)}function MP(t,n){return t?`${t}{${n}}`:""}function jAe(t,n){if(t.indexOf("dt(")===-1)return t;function e(s,d){let m=[],v=0,w="",O=null,N=0;for(;v<=s.length;){let V=s[v];if((V==='"'||V==="'"||V==="`")&&s[v-1]!=="\\"&&(O=O===V?null:V),!O&&(V==="("&&N++,V===")"&&N--,(V===","||v===s.length)&&N===0)){let $=w.trim();$.startsWith("dt(")?m.push(jAe($,d)):m.push(i($)),w="",v++;continue}V!==void 0&&(w+=V),v++}return m}function i(s){let d=s[0];if((d==='"'||d==="'"||d==="`")&&s[s.length-1]===d)return s.slice(1,-1);let m=Number(s);return isNaN(m)?s:m}let o=[],r=[];for(let s=0;s0){let d=r.pop();r.length===0&&o.push([d,s])}if(!o.length)return t;for(let s=o.length-1;s>=0;s--){let[d,m]=o[s],v=t.slice(d+3,m),w=e(v,n),O=n(...w);t=t.slice(0,d)+O+t.slice(m+1)}return t}var rz=t=>{var n;let e=Lc.getTheme(),i=jae(e,t,void 0,"variable"),o=(n=i?.match(/--[\w-]+/g))==null?void 0:n[0],r=jae(e,t,void 0,"value");return{name:o,variable:i,value:r}},Uw=(...t)=>jae(Lc.getTheme(),...t),jae=(t={},n,e,i)=>{if(n){let{variable:o,options:r}=Lc.defaults||{},{prefix:s,transform:d}=t?.options||r||{},m=eb(n,oz)?n:`{${n}}`;return i==="value"||wc(i)&&d==="strict"?Lc.getTokenValue(n):HAe(m,void 0,s,[o.excludedKeyRegex],e)}return""};function RP(t,...n){if(t instanceof Array){let e=t.reduce((i,o,r)=>{var s;return i+o+((s=rm(n[r],{dt:Uw}))!=null?s:"")},"");return jAe(e,Uw)}return rm(t,{dt:Uw})}function Htt(t,n={}){let e=Lc.defaults.variable,{prefix:i=e.prefix,selector:o=e.selector,excludedKeyRegex:r=e.excludedKeyRegex}=n,s=[],d=[],m=[{node:t,path:i}];for(;m.length;){let{node:w,path:O}=m.pop();for(let N in w){let V=w[N],$=Btt(V),q=eb(N,r)?Hae(O):Hae(O,IK(N));if(Jv($))m.push({node:$,path:q});else{let W=UAe(q),te=HAe($,q,i,[r]);Utt(d,W,te);let fe=q;i&&fe.startsWith(i+"-")&&(fe=fe.slice(i.length+1)),s.push(fe.replace(/-/g,"."))}}}let v=d.join("");return{value:d,tokens:s,declarations:v,css:MP(o,v)}}var tb={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(t){return{type:"class",selector:t,matched:this.pattern.test(t.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(t){return{type:"attr",selector:`:root${t}`,matched:this.pattern.test(t.trim())}}},media:{pattern:/^@media (.*)$/,resolve(t){return{type:"media",selector:t,matched:this.pattern.test(t.trim())}}},system:{pattern:/^system$/,resolve(t){return{type:"system",selector:"@media (prefers-color-scheme: dark)",matched:this.pattern.test(t.trim())}}},custom:{resolve(t){return{type:"custom",selector:t,matched:!0}}}},resolve(t){let n=Object.keys(this.rules).filter(e=>e!=="custom").map(e=>this.rules[e]);return[t].flat().map(e=>{var i;return(i=n.map(o=>o.resolve(e)).find(o=>o.matched))!=null?i:this.rules.custom.resolve(e)})}},_toVariables(t,n){return Htt(t,{prefix:n?.prefix})},getCommon({name:t="",theme:n={},params:e,set:i,defaults:o}){var r,s,d,m,v,w,O;let{preset:N,options:V}=n,$,q,W,te,fe,xe,Fe;if(Kr(N)&&V.transform!=="strict"){let{primitive:Re,semantic:Se,extend:ke}=N,Xe=Se||{},{colorScheme:yt}=Xe,We=zw(Xe,["colorScheme"]),Et=ke||{},{colorScheme:we}=Et,Qt=zw(Et,["colorScheme"]),Xi=yt||{},{dark:ei}=Xi,li=zw(Xi,["dark"]),zt=we||{},{dark:Bi}=zt,wt=zw(zt,["dark"]),Lt=Kr(Re)?this._toVariables({primitive:Re},V):{},Yi=Kr(We)?this._toVariables({semantic:We},V):{},fn=Kr(li)?this._toVariables({light:li},V):{},tn=Kr(ei)?this._toVariables({dark:ei},V):{},vn=Kr(Qt)?this._toVariables({semantic:Qt},V):{},Fo=Kr(wt)?this._toVariables({light:wt},V):{},Cn=Kr(Bi)?this._toVariables({dark:Bi},V):{},[zn,Co]=[(r=Lt.declarations)!=null?r:"",Lt.tokens],[ro,pr]=[(s=Yi.declarations)!=null?s:"",Yi.tokens||[]],[Qr,Ee]=[(d=fn.declarations)!=null?d:"",fn.tokens||[]],[xi,bi]=[(m=tn.declarations)!=null?m:"",tn.tokens||[]],[Dt,_t]=[(v=vn.declarations)!=null?v:"",vn.tokens||[]],[Zt,Ji]=[(w=Fo.declarations)!=null?w:"",Fo.tokens||[]],[sn,Ci]=[(O=Cn.declarations)!=null?O:"",Cn.tokens||[]];$=this.transformCSS(t,zn,"light","variable",V,i,o),q=Co;let Un=this.transformCSS(t,`${ro}${Qr}`,"light","variable",V,i,o),po=this.transformCSS(t,`${xi}`,"dark","variable",V,i,o);W=`${Un}${po}`,te=[...new Set([...pr,...Ee,...bi])];let Pn=this.transformCSS(t,`${Dt}${Zt}color-scheme:light`,"light","variable",V,i,o),go=this.transformCSS(t,`${sn}color-scheme:dark`,"dark","variable",V,i,o);fe=`${Pn}${go}`,xe=[...new Set([..._t,...Ji,...Ci])],Fe=rm(N.css,{dt:Uw})}return{primitive:{css:$,tokens:q},semantic:{css:W,tokens:te},global:{css:fe,tokens:xe},style:Fe}},getPreset({name:t="",preset:n={},options:e,params:i,set:o,defaults:r,selector:s}){var d,m,v;let w,O,N;if(Kr(n)&&e.transform!=="strict"){let V=t.replace("-directive",""),$=n,{colorScheme:q,extend:W,css:te}=$,fe=zw($,["colorScheme","extend","css"]),xe=W||{},{colorScheme:Fe}=xe,Re=zw(xe,["colorScheme"]),Se=q||{},{dark:ke}=Se,Xe=zw(Se,["dark"]),yt=Fe||{},{dark:We}=yt,Et=zw(yt,["dark"]),we=Kr(fe)?this._toVariables({[V]:ib(ib({},fe),Re)},e):{},Qt=Kr(Xe)?this._toVariables({[V]:ib(ib({},Xe),Et)},e):{},Xi=Kr(ke)?this._toVariables({[V]:ib(ib({},ke),We)},e):{},[ei,li]=[(d=we.declarations)!=null?d:"",we.tokens||[]],[zt,Bi]=[(m=Qt.declarations)!=null?m:"",Qt.tokens||[]],[wt,Lt]=[(v=Xi.declarations)!=null?v:"",Xi.tokens||[]],Yi=this.transformCSS(V,`${ei}${zt}`,"light","variable",e,o,r,s),fn=this.transformCSS(V,wt,"dark","variable",e,o,r,s);w=`${Yi}${fn}`,O=[...new Set([...li,...Bi,...Lt])],N=rm(te,{dt:Uw})}return{css:w,tokens:O,style:N}},getPresetC({name:t="",theme:n={},params:e,set:i,defaults:o}){var r;let{preset:s,options:d}=n,m=(r=s?.components)==null?void 0:r[t];return this.getPreset({name:t,preset:m,options:d,params:e,set:i,defaults:o})},getPresetD({name:t="",theme:n={},params:e,set:i,defaults:o}){var r,s;let d=t.replace("-directive",""),{preset:m,options:v}=n,w=((r=m?.components)==null?void 0:r[d])||((s=m?.directives)==null?void 0:s[d]);return this.getPreset({name:d,preset:w,options:v,params:e,set:i,defaults:o})},applyDarkColorScheme(t){return!(t.darkModeSelector==="none"||t.darkModeSelector===!1)},getColorSchemeOption(t,n){var e;return this.applyDarkColorScheme(t)?this.regex.resolve(t.darkModeSelector===!0?n.options.darkModeSelector:(e=t.darkModeSelector)!=null?e:n.options.darkModeSelector):[]},getLayerOrder(t,n={},e,i){let{cssLayer:o}=n;return o?`@layer ${rm(o.order||o.name||"primeui",e)}`:""},getCommonStyleSheet({name:t="",theme:n={},params:e,props:i={},set:o,defaults:r}){let s=this.getCommon({name:t,theme:n,params:e,set:o,defaults:r}),d=Object.entries(i).reduce((m,[v,w])=>m.push(`${v}="${w}"`)&&m,[]).join(" ");return Object.entries(s||{}).reduce((m,[v,w])=>{if(Jv(w)&&Object.hasOwn(w,"css")){let O=h2(w.css),N=`${v}-variables`;m.push(``)}return m},[]).join("")},getStyleSheet({name:t="",theme:n={},params:e,props:i={},set:o,defaults:r}){var s;let d={name:t,theme:n,params:e,set:o,defaults:r},m=(s=t.includes("-directive")?this.getPresetD(d):this.getPresetC(d))==null?void 0:s.css,v=Object.entries(i).reduce((w,[O,N])=>w.push(`${O}="${N}"`)&&w,[]).join(" ");return m?``:""},createTokens(t={},n,e="",i="",o={}){let r=function(d,m={},v=[]){if(v.includes(this.path))return console.warn(`Circular reference detected at ${this.path}`),{colorScheme:d,path:this.path,paths:m,value:void 0};v.push(this.path),m.name=this.path,m.binding||(m.binding={});let w=this.value;if(typeof this.value=="string"&&oz.test(this.value)){let O=this.value.trim().replace(oz,N=>{var V;let $=N.slice(1,-1),q=this.tokens[$];if(!q)return console.warn(`Token not found for path: ${$}`),"__UNRESOLVED__";let W=q.computed(d,m,v);return Array.isArray(W)&&W.length===2?`light-dark(${W[0].value},${W[1].value})`:(V=W?.value)!=null?V:"__UNRESOLVED__"});w=VAe.test(O.replace(zAe,"0"))?`calc(${O})`:O}return wc(m.binding)&&delete m.binding,v.pop(),{colorScheme:d,path:this.path,paths:m,value:w.includes("__UNRESOLVED__")?void 0:w}},s=(d,m,v)=>{Object.entries(d).forEach(([w,O])=>{let N=eb(w,n.variable.excludedKeyRegex)?m:m?`${m}.${LAe(w)}`:LAe(w),V=v?`${v}.${w}`:w;Jv(O)?s(O,N,V):(o[N]||(o[N]={paths:[],computed:($,q={},W=[])=>{if(o[N].paths.length===1)return o[N].paths[0].computed(o[N].paths[0].scheme,q.binding,W);if($&&$!=="none")for(let te=0;tete.computed(te.scheme,q[te.scheme],W))}}),o[N].paths.push({path:V,value:O,scheme:V.includes("colorScheme.light")?"light":V.includes("colorScheme.dark")?"dark":"none",computed:r,tokens:o}))})};return s(t,e,i),o},getTokenValue(t,n,e){var i;let o=(d=>d.split(".").filter(m=>!eb(m.toLowerCase(),e.variable.excludedKeyRegex)).join("."))(n),r=n.includes("colorScheme.light")?"light":n.includes("colorScheme.dark")?"dark":void 0,s=[(i=t[o])==null?void 0:i.computed(r)].flat().filter(d=>d);return s.length===1?s[0].value:s.reduce((d={},m)=>{let v=m,{colorScheme:w}=v,O=zw(v,["colorScheme"]);return d[w]=O,d},void 0)},getSelectorRule(t,n,e,i){return e==="class"||e==="attr"?MP(Kr(n)?`${t}${n},${t} ${n}`:t,i):MP(t,MP(n??":root",i))},transformCSS(t,n,e,i,o={},r,s,d){if(Kr(n)){let{cssLayer:m}=o;if(i!=="style"){let v=this.getColorSchemeOption(o,s);n=e==="dark"?v.reduce((w,{type:O,selector:N})=>(Kr(N)&&(w+=N.includes("[CSS]")?N.replace("[CSS]",n):this.getSelectorRule(N,d,O,n)),w),""):MP(d??":root",n)}if(m){let v={name:"primeui",order:"primeui"};Jv(m)&&(v.name=rm(m.name,{name:t,type:i})),Kr(v.name)&&(n=MP(`@layer ${v.name}`,n),r?.layerNames(v.name))}return n}return""}},Lc={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(t={}){let{theme:n}=t;n&&(this._theme=Uae(ib({},n),{options:ib(ib({},this.defaults.options),n.options)}),this._tokens=tb.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var t;return((t=this.theme)==null?void 0:t.preset)||{}},get options(){var t;return((t=this.theme)==null?void 0:t.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(t){this.update({theme:t}),h0.emit("theme:change",t)},getPreset(){return this.preset},setPreset(t){this._theme=Uae(ib({},this.theme),{preset:t}),this._tokens=tb.createTokens(t,this.defaults),this.clearLoadedStyleNames(),h0.emit("preset:change",t),h0.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(t){this._theme=Uae(ib({},this.theme),{options:t}),this.clearLoadedStyleNames(),h0.emit("options:change",t),h0.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(t){this._layerNames.add(t)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(t){return this._loadedStyleNames.has(t)},setLoadedStyleName(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(t){return tb.getTokenValue(this.tokens,t,this.defaults)},getCommon(t="",n){return tb.getCommon({name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(t="",n){let e={name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return tb.getPresetC(e)},getDirective(t="",n){let e={name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return tb.getPresetD(e)},getCustomPreset(t="",n,e,i){let o={name:t,preset:n,options:this.options,selector:e,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return tb.getPreset(o)},getLayerOrderCSS(t=""){return tb.getLayerOrder(t,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(t="",n,e="style",i){return tb.transformCSS(t,n,i,e,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(t="",n,e={}){return tb.getCommonStyleSheet({name:t,theme:this.theme,params:n,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(t,n,e={}){return tb.getStyleSheet({name:t,theme:this.theme,params:n,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(t){this._loadingStyles.add(t)},onStyleUpdated(t){this._loadingStyles.add(t)},onStyleLoaded(t,{name:n}){this._loadingStyles.size&&(this._loadingStyles.delete(n),h0.emit(`theme:${n}:load`,t),!this._loadingStyles.size&&h0.emit("theme:load"))}};var GAe=` *, ::before, ::after { box-sizing: border-box; } /* Non vue overlay animations */ .p-connected-overlay { opacity: 0; transform: scaleY(0.8); transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1); } .p-connected-overlay-visible { opacity: 1; transform: scaleY(1); } .p-connected-overlay-hidden { opacity: 0; transform: scaleY(1); transition: opacity 0.1s linear; } /* Vue based overlay animations */ .p-connected-overlay-enter-from { opacity: 0; transform: scaleY(0.8); } .p-connected-overlay-leave-to { opacity: 0; } .p-connected-overlay-enter-active { transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1); } .p-connected-overlay-leave-active { transition: opacity 0.1s linear; } /* Toggleable Content */ .p-toggleable-content-enter-from, .p-toggleable-content-leave-to { max-height: 0; } .p-toggleable-content-enter-to, .p-toggleable-content-leave-from { max-height: 1000px; } .p-toggleable-content-leave-active { overflow: hidden; transition: max-height 0.45s cubic-bezier(0, 1, 0, 1); } .p-toggleable-content-enter-active { overflow: hidden; transition: max-height 1s ease-in-out; } .p-disabled, .p-disabled * { cursor: default; pointer-events: none; user-select: none; } .p-disabled, .p-component:disabled { opacity: dt('disabled.opacity'); } .pi { font-size: dt('icon.size'); } .p-icon { width: dt('icon.size'); height: dt('icon.size'); } .p-overlay-mask { background: dt('mask.background'); color: dt('mask.color'); position: fixed; top: 0; left: 0; width: 100%; height: 100%; } .p-overlay-mask-enter { animation: p-overlay-mask-enter-animation dt('mask.transition.duration') forwards; } .p-overlay-mask-leave { animation: p-overlay-mask-leave-animation dt('mask.transition.duration') forwards; } @keyframes p-overlay-mask-enter-animation { from { background: transparent; } to { background: dt('mask.background'); } } @keyframes p-overlay-mask-leave-animation { from { background: dt('mask.background'); } to { background: transparent; } } `;var jtt=0,$Ae=(()=>{class t{document=re(Ao);use(e,i={}){let o=!1,r=e,s=null,{immediate:d=!0,manual:m=!1,name:v=`style_${++jtt}`,id:w=void 0,media:O=void 0,nonce:N=void 0,first:V=!1,props:$={}}=i;if(this.document){if(s=this.document.querySelector(`style[data-primeng-style-id="${v}"]`)||w&&this.document.getElementById(w)||this.document.createElement("style"),!s.isConnected){r=e;let q=this.document.head;Xv(s,"nonce",N),V&&q.firstChild?q.insertBefore(s,q.firstChild):q.appendChild(s),wK(s,{type:"text/css",media:O,nonce:N,"data-primeng-style-id":v})}return s.textContent!==r&&(s.textContent=r),{id:w,name:v,el:s,css:r}}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var FP={_loadedStyleNames:new Set,getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(t){return this._loadedStyleNames.has(t)},setLoadedStyleName(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames(){this._loadedStyleNames.clear()}},Gtt=` .p-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } .p-hidden-accessible input, .p-hidden-accessible select { transform: scale(0); } .p-overflow-hidden { overflow: hidden; padding-right: dt('scrollbar.width'); } `,io=(()=>{class t{name="base";useStyle=re($Ae);theme=void 0;css=void 0;classes={};inlineStyles={};load=(e,i={},o=r=>r)=>{let r=o(RP`${rm(e,{dt:Uw})}`);return r?this.useStyle.use(h2(r),be({name:this.name},i)):{}};loadCSS=(e={})=>this.load(this.css,e);loadTheme=(e={},i="")=>this.load(this.theme,e,(o="")=>Lc.transformCSS(e.name||this.name,`${o}${RP`${i}`}`));loadGlobalCSS=(e={})=>this.load(Gtt,e);loadGlobalTheme=(e={},i="")=>this.load(GAe,e,(o="")=>Lc.transformCSS(e.name||this.name,`${o}${RP`${i}`}`));getCommonTheme=e=>Lc.getCommon(this.name,e);getComponentTheme=e=>Lc.getComponent(this.name,e);getDirectiveTheme=e=>Lc.getDirective(this.name,e);getPresetTheme=(e,i,o)=>Lc.getCustomPreset(this.name,e,i,o);getLayerOrderThemeCSS=()=>Lc.getLayerOrderCSS(this.name);getStyleSheet=(e="",i={})=>{if(this.css){let o=rm(this.css,{dt:Uw}),r=h2(RP`${o}${e}`),s=Object.entries(i).reduce((d,[m,v])=>d.push(`${m}="${v}"`)&&d,[]).join(" ");return``}return""};getCommonThemeStyleSheet=(e,i={})=>Lc.getCommonStyleSheet(this.name,e,i);getThemeStyleSheet=(e,i={})=>{let o=[Lc.getStyleSheet(this.name,e,i)];if(this.theme){let r=this.name==="base"?"global-style":`${this.name}-style`,s=RP`${rm(this.theme,{dt:Uw})}`,d=h2(Lc.transformCSS(r,s)),m=Object.entries(i).reduce((v,[w,O])=>v.push(`${w}="${O}"`)&&v,[]).join(" ");o.push(``)}return o.join("")};static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $tt=(()=>{class t{theme=Zn(void 0);csp=Zn({nonce:void 0});isThemeChanged=!1;document=re(Ao);baseStyle=re(io);constructor(){od(()=>{h0.on("theme:change",e=>{Ad(()=>{this.isThemeChanged=!0,this.theme.set(e)})})}),od(()=>{let e=this.theme();this.document&&e&&(this.isThemeChanged||this.onThemeChange(e),this.isThemeChanged=!1)})}ngOnDestroy(){Lc.clearLoadedStyleNames(),h0.clear()}onThemeChange(e){Lc.setTheme(e),this.document&&this.loadCommonTheme()}loadCommonTheme(){if(this.theme()!=="none"&&!Lc.isStyleNameLoaded("common")){let{primitive:e,semantic:i,global:o,style:r}=this.baseStyle.getCommonTheme?.()||{},s={nonce:this.csp?.()?.nonce};this.baseStyle.load(e?.css,be({name:"primitive-variables"},s)),this.baseStyle.load(i?.css,be({name:"semantic-variables"},s)),this.baseStyle.load(o?.css,be({name:"global-variables"},s)),this.baseStyle.loadGlobalTheme(be({name:"global-style"},s),r),Lc.setLoadedStyleName("common")}}setThemeConfig(e){let{theme:i,csp:o}=e||{};i&&this.theme.set(i),o&&this.csp.set(o)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),sz=(()=>{class t extends $tt{ripple=Zn(!1);platformId=re(Zh);inputStyle=Zn(null);inputVariant=Zn(null);overlayAppendTo=Zn("self");overlayOptions={};csp=Zn({nonce:void 0});filterMatchModeOptions={text:[$p.STARTS_WITH,$p.CONTAINS,$p.NOT_CONTAINS,$p.ENDS_WITH,$p.EQUALS,$p.NOT_EQUALS],numeric:[$p.EQUALS,$p.NOT_EQUALS,$p.LESS_THAN,$p.LESS_THAN_OR_EQUAL_TO,$p.GREATER_THAN,$p.GREATER_THAN_OR_EQUAL_TO],date:[$p.DATE_IS,$p.DATE_IS_NOT,$p.DATE_BEFORE,$p.DATE_AFTER]};translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",completed:"Completed",upload:"Upload",cancel:"Cancel",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",searchMessage:"Search results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyFilterMessage:"No results found",fileChosenMessage:"Files",noFileChosenMessage:"No file chosen",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left",listLabel:"Option List",selectColor:"Select a color",removeLabel:"Remove",browseFiles:"Browse Files",maximizeLabel:"Maximize"}};zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100};translationSource=new hi;translationObserver=this.translationSource.asObservable();getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=be(be({},this.translation),e),this.translationSource.next(this.translation)}setConfig(e){let{csp:i,ripple:o,inputStyle:r,inputVariant:s,theme:d,overlayOptions:m,translation:v,filterMatchModeOptions:w,overlayAppendTo:O,zIndex:N}=e||{};i&&this.csp.set(i),O&&this.overlayAppendTo.set(O),o&&this.ripple.set(o),r&&this.inputStyle.set(r),s&&this.inputVariant.set(s),m&&(this.overlayOptions=m),v&&this.setTranslation(v),w&&(this.filterMatchModeOptions=w),N&&(this.zIndex=N),d&&this.setThemeConfig({theme:d,csp:i})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),qtt=new fi("PRIME_NG_CONFIG");function qAe(...t){let n=t?.map(i=>({provide:qtt,useValue:i,multi:!1})),e=nI(()=>{let i=re(sz);t?.forEach(o=>i.setConfig(o))});return H1([...n,e])}var KAe=(()=>{class t extends io{name="common";static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),oo=(()=>{class t{document=re(Ao);platformId=re(Zh);el=re(Bn);injector=re(Oo);cd=re(Gi);renderer=re(Ps);config=re(sz);baseComponentStyle=re(KAe);baseStyle=re(io);scopedStyleEl;rootEl;dt;get styleOptions(){return{nonce:this.config?.csp().nonce}}get _name(){return this.constructor.name.replace(/^_/,"").toLowerCase()}get componentStyle(){return this._componentStyle}attrSelector=Vr("pc");themeChangeListeners=[];_getHostInstance(e){if(e)return e?this.hostName?e.name===this.hostName?e:this._getHostInstance(e.parentInstance):e.parentInstance:void 0}_getOptionValue(e,i="",o={}){return TK(e,i,o)}ngOnInit(){this.document&&(this._loadCoreStyles(),this._loadStyles())}ngAfterViewInit(){this.rootEl=this.el?.nativeElement,this.rootEl&&this.rootEl?.setAttribute(this.attrSelector,"")}ngOnChanges(e){if(this.document&&!q1e(this.platformId)){let{dt:i}=e;i&&i.currentValue&&(this._loadScopedThemeStyles(i.currentValue),this._themeChangeListener(()=>this._loadScopedThemeStyles(i.currentValue)))}}ngOnDestroy(){this._unloadScopedThemeStyles(),this.themeChangeListeners.forEach(e=>h0.off("theme:change",e))}_loadStyles(){let e=()=>{FP.isStyleNameLoaded("base")||(this.baseStyle.loadGlobalCSS(this.styleOptions),FP.setLoadedStyleName("base")),this._loadThemeStyles()};e(),this._themeChangeListener(()=>e())}_loadCoreStyles(){!FP.isStyleNameLoaded("base")&&this.componentStyle?.name&&(this.baseComponentStyle.loadCSS(this.styleOptions),this.componentStyle&&this.componentStyle?.loadCSS(this.styleOptions),FP.setLoadedStyleName(this.componentStyle?.name))}_loadThemeStyles(){if(!Lc.isStyleNameLoaded("common")){let{primitive:e,semantic:i,global:o,style:r}=this.componentStyle?.getCommonTheme?.()||{};this.baseStyle.load(e?.css,be({name:"primitive-variables"},this.styleOptions)),this.baseStyle.load(i?.css,be({name:"semantic-variables"},this.styleOptions)),this.baseStyle.load(o?.css,be({name:"global-variables"},this.styleOptions)),this.baseStyle.loadGlobalTheme(be({name:"global-style"},this.styleOptions),r),Lc.setLoadedStyleName("common")}if(!Lc.isStyleNameLoaded(this.componentStyle?.name)&&this.componentStyle?.name){let{css:e,style:i}=this.componentStyle?.getComponentTheme?.()||{};this.componentStyle?.load(e,be({name:`${this.componentStyle?.name}-variables`},this.styleOptions)),this.componentStyle?.loadTheme(be({name:`${this.componentStyle?.name}-style`},this.styleOptions),i),Lc.setLoadedStyleName(this.componentStyle?.name)}if(!Lc.isStyleNameLoaded("layer-order")){let e=this.componentStyle?.getLayerOrderThemeCSS?.();this.baseStyle.load(e,be({name:"layer-order",first:!0},this.styleOptions)),Lc.setLoadedStyleName("layer-order")}this.dt&&(this._loadScopedThemeStyles(this.dt),this._themeChangeListener(()=>this._loadScopedThemeStyles(this.dt)))}_loadScopedThemeStyles(e){let{css:i}=this.componentStyle?.getPresetTheme?.(e,`[${this.attrSelector}]`)||{},o=this.componentStyle?.load(i,be({name:`${this.attrSelector}-${this.componentStyle?.name}`},this.styleOptions));this.scopedStyleEl=o?.el}_unloadScopedThemeStyles(){this.scopedStyleEl?.remove()}_themeChangeListener(e=()=>{}){FP.clearLoadedStyleNames(),h0.on("theme:change",e),this.themeChangeListeners.push(e)}cx(e,i={}){return TP(this._getOptionValue(this.$style?.classes,e,be({instance:this},i)))}sx(e="",i=!0,o={}){if(i)return this._getOptionValue(this.$style?.inlineStyles,e,be({instance:this},o))}get parent(){return this.parentInstance}get $style(){return this.parent?this.parent.componentStyle:this.componentStyle}cn=TP;static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,inputs:{dt:"dt"},features:[jt([KAe,io]),Ot]})}return t})();var tr=(()=>{class t{static zindex=1e3;static calculatedScrollbarWidth=null;static calculatedScrollbarHeight=null;static browser;static addClass(e,i){e&&i&&(e.classList?e.classList.add(i):e.className+=" "+i)}static addMultipleClasses(e,i){if(e&&i)if(e.classList){let o=i.trim().split(" ");for(let r=0;ro.split(" ").forEach(r=>this.removeClass(e,r)))}static hasClass(e,i){return e&&i?e.classList?e.classList.contains(i):new RegExp("(^| )"+i+"( |$)","gi").test(e.className):!1}static siblings(e){return Array.prototype.filter.call(e.parentNode.children,function(i){return i!==e})}static find(e,i){return Array.from(e.querySelectorAll(i))}static findSingle(e,i){return this.isElement(e)?e.querySelector(i):null}static index(e){let i=e.parentNode.childNodes,o=0;for(var r=0;r{if(xe)return getComputedStyle(xe).getPropertyValue("position")==="relative"?xe:r(xe.parentElement)},s=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),d=i.offsetHeight,m=i.getBoundingClientRect(),v=this.getWindowScrollTop(),w=this.getWindowScrollLeft(),O=this.getViewport(),V=r(e)?.getBoundingClientRect()||{top:-1*v,left:-1*w},$,q,W="top";m.top+d+s.height>O.height?($=m.top-V.top-s.height,W="bottom",m.top+$<0&&($=-1*m.top)):($=d+m.top-V.top,W="top");let te=m.left+s.width-O.width,fe=m.left-V.left;if(s.width>O.width?q=(m.left-V.left)*-1:te>0?q=fe-te:q=m.left-V.left,e.style.top=$+"px",e.style.left=q+"px",e.style.transformOrigin=W,o){let xe=X5(/-anchor-gutter$/)?.value;e.style.marginTop=W==="bottom"?`calc(${xe??"2px"} * -1)`:xe??""}}static absolutePosition(e,i,o=!0){let r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),s=r.height,d=r.width,m=i.offsetHeight,v=i.offsetWidth,w=i.getBoundingClientRect(),O=this.getWindowScrollTop(),N=this.getWindowScrollLeft(),V=this.getViewport(),$,q;w.top+m+s>V.height?($=w.top+O-s,e.style.transformOrigin="bottom",$<0&&($=O)):($=m+w.top+O,e.style.transformOrigin="top"),w.left+d>V.width?q=Math.max(0,w.left+N+v-d):q=w.left+N,e.style.top=$+"px",e.style.left=q+"px",o&&(e.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static getParents(e,i=[]){return e.parentNode===null?i:this.getParents(e.parentNode,i.concat([e.parentNode]))}static getScrollableParents(e){let i=[];if(e){let o=this.getParents(e),r=/(auto|scroll)/,s=d=>{let m=window.getComputedStyle(d,null);return r.test(m.getPropertyValue("overflow"))||r.test(m.getPropertyValue("overflowX"))||r.test(m.getPropertyValue("overflowY"))};for(let d of o){let m=d.nodeType===1&&d.dataset.scrollselectors;if(m){let v=m.split(",");for(let w of v){let O=this.findSingle(d,w);O&&s(O)&&i.push(O)}}d.nodeType!==9&&s(d)&&i.push(d)}}return i}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementDimensions(e){let i={};return e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",i}static scrollInView(e,i){let o=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=o?parseFloat(o):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),d=s?parseFloat(s):0,m=e.getBoundingClientRect(),w=i.getBoundingClientRect().top+document.body.scrollTop-(m.top+document.body.scrollTop)-r-d,O=e.scrollTop,N=e.clientHeight,V=this.getOuterHeight(i);w<0?e.scrollTop=O+w:w+V>N&&(e.scrollTop=O+w-N+V)}static fadeIn(e,i){e.style.opacity=0;let o=+new Date,r=0,s=function(){r=+e.style.opacity.replace(",",".")+(new Date().getTime()-o)/i,e.style.opacity=r,o=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(e,i){var o=1,r=50,s=i,d=r/s;let m=setInterval(()=>{o=o-d,o<=0&&(o=0,clearInterval(m)),e.style.opacity=o},r)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,i){var o=Element.prototype,r=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||function(s){return[].indexOf.call(document.querySelectorAll(s),this)!==-1};return r.call(e,i)}static getOuterWidth(e,i){let o=e.offsetWidth;if(i){let r=getComputedStyle(e);o+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return o}static getHorizontalPadding(e){let i=getComputedStyle(e);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(e){let i=getComputedStyle(e);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(e){let i=e.offsetWidth,o=getComputedStyle(e);return i+=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),i}static width(e){let i=e.offsetWidth,o=getComputedStyle(e);return i-=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),i}static getInnerHeight(e){let i=e.offsetHeight,o=getComputedStyle(e);return i+=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom),i}static getOuterHeight(e,i){let o=e.offsetHeight;if(i){let r=getComputedStyle(e);o+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return o}static getHeight(e){let i=e.offsetHeight,o=getComputedStyle(e);return i-=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)+parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),i}static getWidth(e){let i=e.offsetWidth,o=getComputedStyle(e);return i-=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight)+parseFloat(o.borderLeftWidth)+parseFloat(o.borderRightWidth),i}static getViewport(){let e=window,i=document,o=i.documentElement,r=i.getElementsByTagName("body")[0],s=e.innerWidth||o.clientWidth||r.clientWidth,d=e.innerHeight||o.clientHeight||r.clientHeight;return{width:s,height:d}}static getOffset(e){var i=e.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,i){let o=e.parentNode;if(!o)throw"Can't replace element";return o.replaceChild(i,e)}static getUserAgent(){if(navigator&&this.isClient())return navigator.userAgent}static isIE(){var e=window.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return!0;var o=e.indexOf("Trident/");if(o>0){var r=e.indexOf("rv:");return!0}var s=e.indexOf("Edge/");return s>0}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(e,i){if(this.isElement(i))i.appendChild(e);else if(i&&i.el&&i.el.nativeElement)i.el.nativeElement.appendChild(e);else throw"Cannot append "+i+" to "+e}static removeChild(e,i){if(this.isElement(i))i.removeChild(e);else if(i.el&&i.el.nativeElement)i.el.nativeElement.removeChild(e);else throw"Cannot remove "+e+" from "+i}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"}static calculateScrollbarWidth(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}else{if(this.calculatedScrollbarWidth!==null)return this.calculatedScrollbarWidth;let i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);let o=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=o,o}}static calculateScrollbarHeight(){if(this.calculatedScrollbarHeight!==null)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(e,i,o){e[i].apply(e,o)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return!e||e.offsetParent===null}static isVisible(e){return e&&e.offsetParent!=null}static isExist(e){return e!==null&&typeof e<"u"&&e.nodeName&&e.parentNode}static focus(e,i){e&&document.activeElement!==e&&e.focus(i)}static getFocusableSelectorString(e=""){return`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, .p-inputtext:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, .p-button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}`}static getFocusableElements(e,i=""){let o=this.find(e,this.getFocusableSelectorString(i)),r=[];for(let s of o){let d=getComputedStyle(s);this.isVisible(s)&&d.display!="none"&&d.visibility!="hidden"&&r.push(s)}return r}static getFocusableElement(e,i=""){let o=this.findSingle(e,this.getFocusableSelectorString(i));if(o){let r=getComputedStyle(o);if(this.isVisible(o)&&r.display!="none"&&r.visibility!="hidden")return o}return null}static getFirstFocusableElement(e,i=""){let o=this.getFocusableElements(e,i);return o.length>0?o[0]:null}static getLastFocusableElement(e,i){let o=this.getFocusableElements(e,i);return o.length>0?o[o.length-1]:null}static getNextFocusableElement(e,i=!1){let o=t.getFocusableElements(e),r=0;if(o&&o.length>0){let s=o.indexOf(o[0].ownerDocument.activeElement);i?s==-1||s===0?r=o.length-1:r=s-1:s!=-1&&s!==o.length-1&&(r=s+1)}return o[r]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(e,i){if(!e)return null;switch(e){case"document":return document;case"window":return window;case"@next":return i?.nextElementSibling;case"@prev":return i?.previousElementSibling;case"@parent":return i?.parentElement;case"@grandparent":return i?.parentElement.parentElement;default:let o=typeof e;if(o==="string")return document.querySelector(e);if(o==="object"&&e.hasOwnProperty("nativeElement"))return this.isExist(e.nativeElement)?e.nativeElement:void 0;let s=(d=>!!(d&&d.constructor&&d.call&&d.apply))(e)?e():e;return s&&s.nodeType===9||this.isExist(s)?s:null}}static isClient(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}static getAttribute(e,i){if(e){let o=e.getAttribute(i);return isNaN(o)?o==="true"||o==="false"?o==="true":o:+o}}static calculateBodyScrollbarWidth(){return window.innerWidth-document.documentElement.offsetWidth}static blockBodyScroll(e="p-overflow-hidden"){document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,e)}static unblockBodyScroll(e="p-overflow-hidden"){document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,e)}static createElement(e,i={},...o){if(e){let r=document.createElement(e);return this.setAttributes(r,i),r.append(...o),r}}static setAttribute(e,i="",o){this.isElement(e)&&o!==null&&o!==void 0&&e.setAttribute(i,o)}static setAttributes(e,i={}){if(this.isElement(e)){let o=(r,s)=>{let d=e?.$attrs?.[r]?[e?.$attrs?.[r]]:[];return[s].flat().reduce((m,v)=>{if(v!=null){let w=typeof v;if(w==="string"||w==="number")m.push(v);else if(w==="object"){let O=Array.isArray(v)?o(r,v):Object.entries(v).map(([N,V])=>r==="style"&&(V||V===0)?`${N.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${V}`:V?N:void 0);m=O.length?m.concat(O.filter(N=>!!N)):m}}return m},d)};Object.entries(i).forEach(([r,s])=>{if(s!=null){let d=r.match(/^on(.+)/);d?e.addEventListener(d[1].toLowerCase(),s):r==="pBind"?this.setAttributes(e,s):(s=r==="class"?[...new Set(o("class",s))].join(" ").trim():r==="style"?o("style",s).join(";").trim():s,(e.$attrs=e.$attrs||{})&&(e.$attrs[r]=s),e.setAttribute(r,s))}})}}static isFocusableElement(e,i=""){return this.isElement(e)?e.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}`):!1}}return t})();function WAe(){cAe({variableName:rz("scrollbar.width").name})}function PP(){dAe({variableName:rz("scrollbar.width").name})}var m0=class{element;listener;scrollableParents;constructor(n,e=()=>{}){this.element=n,this.listener=e}bindScrollListener(){this.scrollableParents=tr.getScrollableParents(this.element);for(let n=0;n{class t extends oo{autofocus=!1;focused=!1;platformId=re(Zh);document=re(Ao);host=re(Bn);ngAfterContentChecked(){this.autofocus===!1?this.host.nativeElement.removeAttribute("autofocus"):this.host.nativeElement.setAttribute("autofocus",!0),this.focused||this.autoFocus()}ngAfterViewChecked(){this.focused||this.autoFocus()}autoFocus(){ps(this.platformId)&&this.autofocus&&setTimeout(()=>{let e=tr.getFocusableElements(this.host?.nativeElement);e.length===0&&this.host.nativeElement.focus(),e.length>0&&e[0].focus(),this.focused=!0})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","pAutoFocus",""]],inputs:{autofocus:[0,"pAutoFocus","autofocus"]},features:[ft]})}return t})(),YAe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();var MK=(()=>{class t extends oo{modelValue=Zn(void 0);$filled=bo(()=>Kr(this.modelValue()));writeModelValue(e){this.modelValue.set(e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,features:[ft]})}return t})();var Wm=(()=>{class t extends MK{required=mo(void 0,{transform:je});invalid=mo(void 0,{transform:je});disabled=mo(void 0,{transform:je});name=mo();_disabled=Zn(!1);$disabled=bo(()=>this.disabled()||this._disabled());onModelChange=()=>{};onModelTouched=()=>{};writeDisabledState(e){this._disabled.set(e)}writeControlValue(e,i){}writeValue(e){this.writeControlValue(e,this.writeModelValue.bind(this))}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.writeDisabledState(e),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,inputs:{required:[1,"required"],invalid:[1,"invalid"],disabled:[1,"disabled"],name:[1,"name"]},features:[ft]})}return t})();var OK=` .p-progressbar { display: block; position: relative; overflow: hidden; height: dt('progressbar.height'); background: dt('progressbar.background'); border-radius: dt('progressbar.border.radius'); } .p-progressbar-value { margin: 0; background: dt('progressbar.value.background'); } .p-progressbar-label { color: dt('progressbar.label.color'); font-size: dt('progressbar.label.font.size'); font-weight: dt('progressbar.label.font.weight'); } .p-progressbar-determinate .p-progressbar-value { height: 100%; width: 0%; position: absolute; display: none; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: width 1s ease-in-out; } .p-progressbar-determinate .p-progressbar-label { display: inline-flex; } .p-progressbar-indeterminate .p-progressbar-value::before { content: ''; position: absolute; background: inherit; inset-block-start: 0; inset-inline-start: 0; inset-block-end: 0; will-change: inset-inline-start, inset-inline-end; animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; } .p-progressbar-indeterminate .p-progressbar-value::after { content: ''; position: absolute; background: inherit; inset-block-start: 0; inset-inline-start: 0; inset-block-end: 0; will-change: inset-inline-start, inset-inline-end; animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite; animation-delay: 1.15s; } @keyframes p-progressbar-indeterminate-anim { 0% { inset-inline-start: -35%; inset-inline-end: 100%; } 60% { inset-inline-start: 100%; inset-inline-end: -90%; } 100% { inset-inline-start: 100%; inset-inline-end: -90%; } } @-webkit-keyframes p-progressbar-indeterminate-anim { 0% { inset-inline-start: -35%; inset-inline-end: 100%; } 60% { inset-inline-start: 100%; inset-inline-end: -90%; } 100% { inset-inline-start: 100%; inset-inline-end: -90%; } } @keyframes p-progressbar-indeterminate-anim-short { 0% { inset-inline-start: -200%; inset-inline-end: 100%; } 60% { inset-inline-start: 107%; inset-inline-end: -8%; } 100% { inset-inline-start: 107%; inset-inline-end: -8%; } } @-webkit-keyframes p-progressbar-indeterminate-anim-short { 0% { inset-inline-start: -200%; inset-inline-end: 100%; } 60% { inset-inline-start: 107%; inset-inline-end: -8%; } 100% { inset-inline-start: 107%; inset-inline-end: -8%; } } `;var Wtt=["*"],Ytt={root:"p-fluid"},QAe=(()=>{class t extends io{name="fluid";classes=Ytt;theme=OK;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Hw=(()=>{class t extends oo{_componentStyle=re(QAe);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-fluid"]],hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.cx("root"))},features:[jt([QAe]),ft],ngContentSelectors:Wtt,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On],encapsulation:2,changeDetection:0})}return t})();var XI=(()=>{class t extends Wm{pcFluid=re(Hw,{optional:!0,host:!0,skipSelf:!0});fluid=mo(void 0,{transform:je});variant=mo();size=mo();inputSize=mo();pattern=mo();min=mo();max=mo();step=mo();minlength=mo();maxlength=mo();$variant=bo(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());get hasFluid(){return this.fluid()??!!this.pcFluid}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,inputs:{fluid:[1,"fluid"],variant:[1,"variant"],size:[1,"size"],inputSize:[1,"inputSize"],pattern:[1,"pattern"],min:[1,"min"],max:[1,"max"],step:[1,"step"],minlength:[1,"minlength"],maxlength:[1,"maxlength"]},features:[ft]})}return t})();var ZAe=` .p-badge { display: inline-flex; border-radius: dt('badge.border.radius'); align-items: center; justify-content: center; padding: dt('badge.padding'); background: dt('badge.primary.background'); color: dt('badge.primary.color'); font-size: dt('badge.font.size'); font-weight: dt('badge.font.weight'); min-width: dt('badge.min.width'); height: dt('badge.height'); } .p-badge-dot { width: dt('badge.dot.size'); min-width: dt('badge.dot.size'); height: dt('badge.dot.size'); border-radius: 50%; padding: 0; } .p-badge-circle { padding: 0; border-radius: 50%; } .p-badge-secondary { background: dt('badge.secondary.background'); color: dt('badge.secondary.color'); } .p-badge-success { background: dt('badge.success.background'); color: dt('badge.success.color'); } .p-badge-info { background: dt('badge.info.background'); color: dt('badge.info.color'); } .p-badge-warn { background: dt('badge.warn.background'); color: dt('badge.warn.color'); } .p-badge-danger { background: dt('badge.danger.background'); color: dt('badge.danger.color'); } .p-badge-contrast { background: dt('badge.contrast.background'); color: dt('badge.contrast.color'); } .p-badge-sm { font-size: dt('badge.sm.font.size'); min-width: dt('badge.sm.min.width'); height: dt('badge.sm.height'); } .p-badge-lg { font-size: dt('badge.lg.font.size'); min-width: dt('badge.lg.min.width'); height: dt('badge.lg.height'); } .p-badge-xl { font-size: dt('badge.xl.font.size'); min-width: dt('badge.xl.min.width'); height: dt('badge.xl.height'); } `;var Qtt=` ${ZAe} /* For PrimeNG (directive)*/ .p-overlay-badge { position: relative; } .p-overlay-badge > .p-badge { position: absolute; top: 0; inset-inline-end: 0; transform: translate(50%, -50%); transform-origin: 100% 0; margin: 0; } `,Ztt={root:({instance:t})=>["p-badge p-component",{"p-badge-circle":Kr(t.value())&&String(t.value()).length===1,"p-badge-dot":wc(t.value()),"p-badge-sm":t.size()==="small"||t.badgeSize()==="small","p-badge-lg":t.size()==="large"||t.badgeSize()==="large","p-badge-xl":t.size()==="xlarge"||t.badgeSize()==="xlarge","p-badge-info":t.severity()==="info","p-badge-success":t.severity()==="success","p-badge-warn":t.severity()==="warn","p-badge-danger":t.severity()==="danger","p-badge-secondary":t.severity()==="secondary","p-badge-contrast":t.severity()==="contrast"}]},XAe=(()=>{class t extends io{name="badge";theme=Qtt;classes=Ztt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var jw=(()=>{class t extends oo{styleClass=mo();badgeSize=mo();size=mo();severity=mo();value=mo();badgeDisabled=mo(!1,{transform:je});_componentStyle=re(XAe);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-badge"]],hostVars:4,hostBindings:function(i,o){i&2&&(Oe(o.cn(o.cx("root"),o.styleClass())),Ir("display",o.badgeDisabled()?"none":null))},inputs:{styleClass:[1,"styleClass"],badgeSize:[1,"badgeSize"],size:[1,"size"],severity:[1,"severity"],value:[1,"value"],badgeDisabled:[1,"badgeDisabled"]},features:[jt([XAe]),ft],decls:1,vars:1,template:function(i,o){i&1&&Q(0),i&2&&dt(o.value())},dependencies:[On,In],encapsulation:2,changeDetection:0})}return t})(),LP=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[jw,In,In]})}return t})();var Xtt=["*"],Jtt=` .p-icon { display: inline-block; vertical-align: baseline; } .p-icon-spin { -webkit-animation: p-icon-spin 2s infinite linear; animation: p-icon-spin 2s infinite linear; } @-webkit-keyframes p-icon-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } @keyframes p-icon-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } `,eke=(()=>{class t extends io{name="baseicon";css=Jtt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var wr=(()=>{class t extends oo{spin=!1;_componentStyle=re(eke);getClassNames(){return TP("p-icon",{"p-icon-spin":this.spin})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["ng-component"]],hostAttrs:["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.getClassNames())},inputs:{spin:[2,"spin","spin",je]},features:[jt([eke]),ft],ngContentSelectors:Xtt,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},encapsulation:2,changeDetection:0})}return t})();var eit=["data-p-icon","angle-double-down"],tke=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","angle-double-down"]],features:[ft],attrs:eit,decls:1,vars:0,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.70786 6.59831C6.80043 6.63674 6.89974 6.65629 6.99997 6.65581C7.19621 6.64081 7.37877 6.54953 7.50853 6.40153L11.0685 2.8416C11.1364 2.69925 11.1586 2.53932 11.132 2.38384C11.1053 2.22837 11.0311 2.08498 10.9195 1.97343C10.808 1.86188 10.6646 1.78766 10.5091 1.76099C10.3536 1.73431 10.1937 1.75649 10.0513 1.82448L6.99997 4.87585L3.9486 1.82448C3.80625 1.75649 3.64632 1.73431 3.49084 1.76099C3.33536 1.78766 3.19197 1.86188 3.08043 1.97343C2.96888 2.08498 2.89466 2.22837 2.86798 2.38384C2.84131 2.53932 2.86349 2.69925 2.93147 2.8416L6.46089 6.43205C6.53132 6.50336 6.61528 6.55989 6.70786 6.59831ZM6.70786 12.1925C6.80043 12.2309 6.89974 12.2505 6.99997 12.25C7.10241 12.2465 7.20306 12.2222 7.29575 12.1785C7.38845 12.1348 7.47124 12.0726 7.53905 11.9957L11.0685 8.46629C11.1614 8.32292 11.2036 8.15249 11.1881 7.98233C11.1727 7.81216 11.1005 7.6521 10.9833 7.52781C10.866 7.40353 10.7104 7.3222 10.5415 7.29688C10.3725 7.27155 10.1999 7.30369 10.0513 7.38814L6.99997 10.4395L3.9486 7.38814C3.80006 7.30369 3.62747 7.27155 3.45849 7.29688C3.28951 7.3222 3.13393 7.40353 3.01667 7.52781C2.89942 7.6521 2.82729 7.81216 2.81184 7.98233C2.79639 8.15249 2.83852 8.32292 2.93148 8.46629L6.4609 12.0262C6.53133 12.0975 6.61529 12.1541 6.70786 12.1925Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var tit=["data-p-icon","angle-double-left"],RK=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","angle-double-left"]],features:[ft],attrs:tit,decls:1,vars:0,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var iit=["data-p-icon","angle-double-right"],FK=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","angle-double-right"]],features:[ft],attrs:iit,decls:1,vars:0,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7.68757 11.1451C7.7791 11.1831 7.8773 11.2024 7.9764 11.2019C8.07769 11.1985 8.17721 11.1745 8.26886 11.1312C8.36052 11.088 8.44238 11.0265 8.50943 10.9505L12.0294 7.49085C12.1707 7.34942 12.25 7.15771 12.25 6.95782C12.25 6.75794 12.1707 6.56622 12.0294 6.42479L8.50943 2.90479C8.37014 2.82159 8.20774 2.78551 8.04633 2.80192C7.88491 2.81833 7.73309 2.88635 7.6134 2.99588C7.4937 3.10541 7.41252 3.25061 7.38189 3.40994C7.35126 3.56927 7.37282 3.73423 7.44337 3.88033L10.4605 6.89748L7.44337 9.91463C7.30212 10.0561 7.22278 10.2478 7.22278 10.4477C7.22278 10.6475 7.30212 10.8393 7.44337 10.9807C7.51301 11.0512 7.59603 11.1071 7.68757 11.1451ZM1.94207 10.9505C2.07037 11.0968 2.25089 11.1871 2.44493 11.2019C2.63898 11.1871 2.81949 11.0968 2.94779 10.9505L6.46779 7.49085C6.60905 7.34942 6.68839 7.15771 6.68839 6.95782C6.68839 6.75793 6.60905 6.56622 6.46779 6.42479L2.94779 2.90479C2.80704 2.83757 2.6489 2.81563 2.49517 2.84201C2.34143 2.86839 2.19965 2.94178 2.08936 3.05207C1.97906 3.16237 1.90567 3.30415 1.8793 3.45788C1.85292 3.61162 1.87485 3.76975 1.94207 3.9105L4.95922 6.92765L1.94207 9.9448C1.81838 10.0831 1.75 10.2621 1.75 10.4477C1.75 10.6332 1.81838 10.8122 1.94207 10.9505Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var nit=["data-p-icon","angle-double-up"],ike=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","angle-double-up"]],features:[ft],attrs:nit,decls:1,vars:0,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M10.1504 6.67719C10.2417 6.71508 10.3396 6.73436 10.4385 6.73389C10.6338 6.74289 10.8249 6.67441 10.97 6.54334C11.1109 6.4023 11.19 6.21112 11.19 6.01178C11.19 5.81245 11.1109 5.62127 10.97 5.48023L7.45977 1.96998C7.31873 1.82912 7.12755 1.75 6.92821 1.75C6.72888 1.75 6.5377 1.82912 6.39666 1.96998L2.9165 5.45014C2.83353 5.58905 2.79755 5.751 2.81392 5.91196C2.83028 6.07293 2.89811 6.22433 3.00734 6.34369C3.11656 6.46306 3.26137 6.54402 3.42025 6.57456C3.57914 6.60511 3.74364 6.5836 3.88934 6.51325L6.89813 3.50446L9.90691 6.51325C9.97636 6.58357 10.0592 6.6393 10.1504 6.67719ZM9.93702 11.9993C10.065 12.1452 10.245 12.2352 10.4385 12.25C10.632 12.2352 10.812 12.1452 10.9399 11.9993C11.0633 11.8614 11.1315 11.6828 11.1315 11.4978C11.1315 11.3128 11.0633 11.1342 10.9399 10.9963L7.48987 7.48609C7.34883 7.34523 7.15765 7.26611 6.95832 7.26611C6.75899 7.26611 6.5678 7.34523 6.42677 7.48609L2.91652 10.9963C2.84948 11.1367 2.82761 11.2944 2.85391 11.4477C2.88022 11.601 2.9534 11.7424 3.06339 11.8524C3.17338 11.9624 3.31477 12.0356 3.46808 12.0619C3.62139 12.0882 3.77908 12.0663 3.91945 11.9993L6.92823 8.99048L9.93702 11.9993Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var oit=["data-p-icon","angle-down"],PK=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","angle-down"]],features:[ft],attrs:oit,decls:1,vars:0,consts:[["d","M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var rit=["data-p-icon","angle-left"],LK=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","angle-left"]],features:[ft],attrs:rit,decls:1,vars:0,consts:[["d","M8.75 11.185C8.65146 11.1854 8.55381 11.1662 8.4628 11.1284C8.37179 11.0906 8.28924 11.0351 8.22 10.965L4.72 7.46496C4.57955 7.32433 4.50066 7.13371 4.50066 6.93496C4.50066 6.73621 4.57955 6.54558 4.72 6.40496L8.22 2.93496C8.36095 2.84357 8.52851 2.80215 8.69582 2.81733C8.86312 2.83252 9.02048 2.90344 9.14268 3.01872C9.26487 3.134 9.34483 3.28696 9.36973 3.4531C9.39463 3.61924 9.36303 3.78892 9.28 3.93496L6.28 6.93496L9.28 9.93496C9.42045 10.0756 9.49934 10.2662 9.49934 10.465C9.49934 10.6637 9.42045 10.8543 9.28 10.995C9.13526 11.1257 8.9448 11.1939 8.75 11.185Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var sit=["data-p-icon","angle-right"],NP=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","angle-right"]],features:[ft],attrs:sit,decls:1,vars:0,consts:[["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var ait=["data-p-icon","angle-up"],NK=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","angle-up"]],features:[ft],attrs:ait,decls:1,vars:0,consts:[["d","M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var lit=["data-p-icon","arrow-down"],BP=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","arrow-down"]],features:[ft],attrs:lit,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.99994 14C6.91097 14.0004 6.82281 13.983 6.74064 13.9489C6.65843 13.9148 6.58387 13.8646 6.52133 13.8013L1.10198 8.38193C0.982318 8.25351 0.917175 8.08367 0.920272 7.90817C0.923368 7.73267 0.994462 7.56523 1.11858 7.44111C1.24269 7.317 1.41014 7.2459 1.58563 7.2428C1.76113 7.23971 1.93098 7.30485 2.0594 7.42451L6.32263 11.6877V0.677419C6.32263 0.497756 6.394 0.325452 6.52104 0.198411C6.64808 0.0713706 6.82039 0 7.00005 0C7.17971 0 7.35202 0.0713706 7.47906 0.198411C7.6061 0.325452 7.67747 0.497756 7.67747 0.677419V11.6877L11.9407 7.42451C12.0691 7.30485 12.2389 7.23971 12.4144 7.2428C12.5899 7.2459 12.7574 7.317 12.8815 7.44111C13.0056 7.56523 13.0767 7.73267 13.0798 7.90817C13.0829 8.08367 13.0178 8.25351 12.8981 8.38193L7.47875 13.8013C7.41621 13.8646 7.34164 13.9148 7.25944 13.9489C7.17727 13.983 7.08912 14.0004 7.00015 14C7.00012 14 7.00009 14 7.00005 14C7.00001 14 6.99998 14 6.99994 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var cit=["data-p-icon","arrow-up"],VP=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","arrow-up"]],features:[ft],attrs:cit,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.51551 13.799C6.64205 13.9255 6.813 13.9977 6.99193 14C7.17087 13.9977 7.34182 13.9255 7.46835 13.799C7.59489 13.6725 7.66701 13.5015 7.66935 13.3226V2.31233L11.9326 6.57554C11.9951 6.63887 12.0697 6.68907 12.1519 6.72319C12.2341 6.75731 12.3223 6.77467 12.4113 6.77425C12.5003 6.77467 12.5885 6.75731 12.6707 6.72319C12.7529 6.68907 12.8274 6.63887 12.89 6.57554C13.0168 6.44853 13.0881 6.27635 13.0881 6.09683C13.0881 5.91732 13.0168 5.74514 12.89 5.61812L7.48846 0.216594C7.48274 0.210436 7.4769 0.204374 7.47094 0.198411C7.3439 0.0713707 7.1716 0 6.99193 0C6.81227 0 6.63997 0.0713707 6.51293 0.198411C6.50704 0.204296 6.50128 0.210278 6.49563 0.216354L1.09386 5.61812C0.974201 5.74654 0.909057 5.91639 0.912154 6.09189C0.91525 6.26738 0.986345 6.43483 1.11046 6.55894C1.23457 6.68306 1.40202 6.75415 1.57752 6.75725C1.75302 6.76035 1.92286 6.6952 2.05128 6.57554L6.31451 2.31231V13.3226C6.31685 13.5015 6.38898 13.6725 6.51551 13.799Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var dit=["data-p-icon","blank"],BK=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","blank"]],features:[ft],attrs:dit,decls:1,vars:0,consts:[["width","1","height","1","fill","currentColor","fill-opacity","0"]],template:function(i,o){i&1&&(si(),to(0,"rect",0))},encapsulation:2})}return t})();var uit=["data-p-icon","calendar"],nke=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","calendar"]],features:[ft],attrs:uit,decls:1,vars:0,consts:[["d","M10.7838 1.51351H9.83783V0.567568C9.83783 0.417039 9.77804 0.272676 9.6716 0.166237C9.56516 0.0597971 9.42079 0 9.27027 0C9.11974 0 8.97538 0.0597971 8.86894 0.166237C8.7625 0.272676 8.7027 0.417039 8.7027 0.567568V1.51351H5.29729V0.567568C5.29729 0.417039 5.2375 0.272676 5.13106 0.166237C5.02462 0.0597971 4.88025 0 4.72973 0C4.5792 0 4.43484 0.0597971 4.3284 0.166237C4.22196 0.272676 4.16216 0.417039 4.16216 0.567568V1.51351H3.21621C2.66428 1.51351 2.13494 1.73277 1.74467 2.12305C1.35439 2.51333 1.13513 3.04266 1.13513 3.59459V11.9189C1.13513 12.4709 1.35439 13.0002 1.74467 13.3905C2.13494 13.7807 2.66428 14 3.21621 14H10.7838C11.3357 14 11.865 13.7807 12.2553 13.3905C12.6456 13.0002 12.8649 12.4709 12.8649 11.9189V3.59459C12.8649 3.04266 12.6456 2.51333 12.2553 2.12305C11.865 1.73277 11.3357 1.51351 10.7838 1.51351ZM3.21621 2.64865H4.16216V3.59459C4.16216 3.74512 4.22196 3.88949 4.3284 3.99593C4.43484 4.10237 4.5792 4.16216 4.72973 4.16216C4.88025 4.16216 5.02462 4.10237 5.13106 3.99593C5.2375 3.88949 5.29729 3.74512 5.29729 3.59459V2.64865H8.7027V3.59459C8.7027 3.74512 8.7625 3.88949 8.86894 3.99593C8.97538 4.10237 9.11974 4.16216 9.27027 4.16216C9.42079 4.16216 9.56516 4.10237 9.6716 3.99593C9.77804 3.88949 9.83783 3.74512 9.83783 3.59459V2.64865H10.7838C11.0347 2.64865 11.2753 2.74831 11.4527 2.92571C11.6301 3.10311 11.7297 3.34371 11.7297 3.59459V5.67568H2.27027V3.59459C2.27027 3.34371 2.36993 3.10311 2.54733 2.92571C2.72473 2.74831 2.96533 2.64865 3.21621 2.64865ZM10.7838 12.8649H3.21621C2.96533 12.8649 2.72473 12.7652 2.54733 12.5878C2.36993 12.4104 2.27027 12.1698 2.27027 11.9189V6.81081H11.7297V11.9189C11.7297 12.1698 11.6301 12.4104 11.4527 12.5878C11.2753 12.7652 11.0347 12.8649 10.7838 12.8649Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var pit=["data-p-icon","check"],sx=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","check"]],features:[ft],attrs:pit,decls:1,vars:0,consts:[["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var hit=["data-p-icon","chevron-down"],sm=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","chevron-down"]],features:[ft],attrs:hit,decls:1,vars:0,consts:[["d","M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var mit=["data-p-icon","chevron-left"],VK=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","chevron-left"]],features:[ft],attrs:mit,decls:1,vars:0,consts:[["d","M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var fit=["data-p-icon","chevron-right"],Gw=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","chevron-right"]],features:[ft],attrs:fit,decls:1,vars:0,consts:[["d","M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var git=["data-p-icon","chevron-up"],zK=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","chevron-up"]],features:[ft],attrs:git,decls:1,vars:0,consts:[["d","M12.2097 10.4113C12.1057 10.4118 12.0027 10.3915 11.9067 10.3516C11.8107 10.3118 11.7237 10.2532 11.6506 10.1792L6.93602 5.46461L2.22139 10.1476C2.07272 10.244 1.89599 10.2877 1.71953 10.2717C1.54307 10.2556 1.3771 10.1808 1.24822 10.0593C1.11933 9.93766 1.035 9.77633 1.00874 9.6011C0.982477 9.42587 1.0158 9.2469 1.10338 9.09287L6.37701 3.81923C6.52533 3.6711 6.72639 3.58789 6.93602 3.58789C7.14565 3.58789 7.3467 3.6711 7.49502 3.81923L12.7687 9.09287C12.9168 9.24119 13 9.44225 13 9.65187C13 9.8615 12.9168 10.0626 12.7687 10.2109C12.616 10.3487 12.4151 10.4207 12.2097 10.4113Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var _it=["data-p-icon","filter"],oke=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","filter"]],features:[ft],attrs:_it,decls:5,vars:2,consts:[["d","M8.64708 14H5.35296C5.18981 13.9979 5.03395 13.9321 4.91858 13.8167C4.8032 13.7014 4.73745 13.5455 4.73531 13.3824V7L0.329431 0.98C0.259794 0.889466 0.217389 0.780968 0.20718 0.667208C0.19697 0.553448 0.219379 0.439133 0.271783 0.337647C0.324282 0.236453 0.403423 0.151519 0.500663 0.0920138C0.597903 0.0325088 0.709548 0.000692754 0.823548 0H13.1765C13.2905 0.000692754 13.4021 0.0325088 13.4994 0.0920138C13.5966 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7826 0.780968 13.7402 0.889466 13.6706 0.98L9.26472 7V13.3824C9.26259 13.5455 9.19683 13.7014 9.08146 13.8167C8.96609 13.9321 8.81022 13.9979 8.64708 14ZM5.97061 12.7647H8.02943V6.79412C8.02878 6.66289 8.07229 6.53527 8.15296 6.43177L11.9412 1.23529H2.05884L5.86355 6.43177C5.94422 6.53527 5.98773 6.66289 5.98708 6.79412L5.97061 12.7647Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var yit=["data-p-icon","filter-slash"],rke=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","filter-slash"]],features:[ft],attrs:yit,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M13.4994 0.0920138C13.5967 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7827 0.780968 13.7403 0.889466 13.6707 0.98L11.406 4.06823C11.3099 4.19928 11.1656 4.28679 11.005 4.3115C10.8444 4.33621 10.6805 4.2961 10.5495 4.2C10.4184 4.1039 10.3309 3.95967 10.3062 3.79905C10.2815 3.63843 10.3216 3.47458 10.4177 3.34353L11.9412 1.23529H7.41184C7.24803 1.23529 7.09093 1.17022 6.97509 1.05439C6.85926 0.938558 6.79419 0.781457 6.79419 0.617647C6.79419 0.453837 6.85926 0.296736 6.97509 0.180905C7.09093 0.0650733 7.24803 0 7.41184 0H13.1765C13.2905 0.000692754 13.4022 0.0325088 13.4994 0.0920138ZM4.20008 0.181168H4.24126L13.2013 9.03411C13.3169 9.14992 13.3819 9.3069 13.3819 9.47058C13.3819 9.63426 13.3169 9.79124 13.2013 9.90705C13.1445 9.96517 13.0766 10.0112 13.0016 10.0423C12.9266 10.0735 12.846 10.0891 12.7648 10.0882C12.6836 10.0886 12.6032 10.0728 12.5283 10.0417C12.4533 10.0106 12.3853 9.96479 12.3283 9.90705L9.3142 6.92587L9.26479 6.99999V13.3823C9.26265 13.5455 9.19689 13.7014 9.08152 13.8167C8.96615 13.9321 8.81029 13.9979 8.64714 14H5.35302C5.18987 13.9979 5.03401 13.9321 4.91864 13.8167C4.80327 13.7014 4.73751 13.5455 4.73537 13.3823V6.99999L0.329492 1.02117C0.259855 0.930634 0.21745 0.822137 0.207241 0.708376C0.197031 0.594616 0.21944 0.480301 0.271844 0.378815C0.324343 0.277621 0.403484 0.192687 0.500724 0.133182C0.597964 0.073677 0.709609 0.041861 0.823609 0.0411682H3.86243C3.92448 0.0461551 3.9855 0.060022 4.04361 0.0823446C4.10037 0.10735 4.15311 0.140655 4.20008 0.181168ZM8.02949 6.79411C8.02884 6.66289 8.07235 6.53526 8.15302 6.43176L8.42478 6.05293L3.55773 1.23529H2.0589L5.84714 6.43176C5.92781 6.53526 5.97132 6.66289 5.97067 6.79411V12.7647H8.02949V6.79411Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var vit=["data-p-icon","minus"],ske=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","minus"]],features:[ft],attrs:vit,decls:1,vars:0,consts:[["d","M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var bit=["data-p-icon","plus"],UK=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","plus"]],features:[ft],attrs:bit,decls:5,vars:2,consts:[["d","M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var Cit=["data-p-icon","search"],JI=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","search"]],features:[ft],attrs:Cit,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var xit=["data-p-icon","sort-alt"],az=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","sort-alt"]],features:[ft],attrs:xit,decls:8,vars:2,consts:[["d","M5.64515 3.61291C5.47353 3.61291 5.30192 3.54968 5.16644 3.4142L3.38708 1.63484L1.60773 3.4142C1.34579 3.67613 0.912244 3.67613 0.650309 3.4142C0.388374 3.15226 0.388374 2.71871 0.650309 2.45678L2.90837 0.198712C3.17031 -0.0632236 3.60386 -0.0632236 3.86579 0.198712L6.12386 2.45678C6.38579 2.71871 6.38579 3.15226 6.12386 3.4142C5.98837 3.54968 5.81676 3.61291 5.64515 3.61291Z","fill","currentColor"],["d","M3.38714 14C3.01681 14 2.70972 13.6929 2.70972 13.3226V0.677419C2.70972 0.307097 3.01681 0 3.38714 0C3.75746 0 4.06456 0.307097 4.06456 0.677419V13.3226C4.06456 13.6929 3.75746 14 3.38714 14Z","fill","currentColor"],["d","M10.6129 14C10.4413 14 10.2697 13.9368 10.1342 13.8013L7.87611 11.5432C7.61418 11.2813 7.61418 10.8477 7.87611 10.5858C8.13805 10.3239 8.5716 10.3239 8.83353 10.5858L10.6129 12.3652L12.3922 10.5858C12.6542 10.3239 13.0877 10.3239 13.3497 10.5858C13.6116 10.8477 13.6116 11.2813 13.3497 11.5432L11.0916 13.8013C10.9561 13.9368 10.7845 14 10.6129 14Z","fill","currentColor"],["d","M10.6129 14C10.2426 14 9.93552 13.6929 9.93552 13.3226V0.677419C9.93552 0.307097 10.2426 0 10.6129 0C10.9833 0 11.2904 0.307097 11.2904 0.677419V13.3226C11.2904 13.6929 10.9832 14 10.6129 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0)(2,"path",1)(3,"path",2)(4,"path",3),Ho(),Go(5,"defs")(6,"clipPath",4),to(7,"rect",5),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(6),Rr("id",o.pathId))},encapsulation:2})}return t})();var wit=["data-p-icon","sort-amount-down"],lz=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","sort-amount-down"]],features:[ft],attrs:wit,decls:5,vars:2,consts:[["d","M4.93953 10.5858L3.83759 11.6877V0.677419C3.83759 0.307097 3.53049 0 3.16017 0C2.78985 0 2.48275 0.307097 2.48275 0.677419V11.6877L1.38082 10.5858C1.11888 10.3239 0.685331 10.3239 0.423396 10.5858C0.16146 10.8477 0.16146 11.2813 0.423396 11.5432L2.68146 13.8013C2.74469 13.8645 2.81694 13.9097 2.89823 13.9458C2.97952 13.9819 3.06985 14 3.16017 14C3.25049 14 3.33178 13.9819 3.42211 13.9458C3.5034 13.9097 3.57565 13.8645 3.63888 13.8013L5.89694 11.5432C6.15888 11.2813 6.15888 10.8477 5.89694 10.5858C5.63501 10.3239 5.20146 10.3239 4.93953 10.5858ZM13.0957 0H7.22468C6.85436 0 6.54726 0.307097 6.54726 0.677419C6.54726 1.04774 6.85436 1.35484 7.22468 1.35484H13.0957C13.466 1.35484 13.7731 1.04774 13.7731 0.677419C13.7731 0.307097 13.466 0 13.0957 0ZM7.22468 5.41935H9.48275C9.85307 5.41935 10.1602 5.72645 10.1602 6.09677C10.1602 6.4671 9.85307 6.77419 9.48275 6.77419H7.22468C6.85436 6.77419 6.54726 6.4671 6.54726 6.09677C6.54726 5.72645 6.85436 5.41935 7.22468 5.41935ZM7.6763 8.12903H7.22468C6.85436 8.12903 6.54726 8.43613 6.54726 8.80645C6.54726 9.17677 6.85436 9.48387 7.22468 9.48387H7.6763C8.04662 9.48387 8.35372 9.17677 8.35372 8.80645C8.35372 8.43613 8.04662 8.12903 7.6763 8.12903ZM7.22468 2.70968H11.2892C11.6595 2.70968 11.9666 3.01677 11.9666 3.3871C11.9666 3.75742 11.6595 4.06452 11.2892 4.06452H7.22468C6.85436 4.06452 6.54726 3.75742 6.54726 3.3871C6.54726 3.01677 6.85436 2.70968 7.22468 2.70968Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var Sit=["data-p-icon","sort-amount-up-alt"],cz=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","sort-amount-up-alt"]],features:[ft],attrs:Sit,decls:5,vars:2,consts:[["d","M3.63435 0.19871C3.57113 0.135484 3.49887 0.0903226 3.41758 0.0541935C3.255 -0.0180645 3.06532 -0.0180645 2.90274 0.0541935C2.82145 0.0903226 2.74919 0.135484 2.68597 0.19871L0.427901 2.45677C0.165965 2.71871 0.165965 3.15226 0.427901 3.41419C0.689836 3.67613 1.12338 3.67613 1.38532 3.41419L2.48726 2.31226V13.3226C2.48726 13.6929 2.79435 14 3.16467 14C3.535 14 3.84209 13.6929 3.84209 13.3226V2.31226L4.94403 3.41419C5.07951 3.54968 5.25113 3.6129 5.42274 3.6129C5.59435 3.6129 5.76597 3.54968 5.90145 3.41419C6.16338 3.15226 6.16338 2.71871 5.90145 2.45677L3.64338 0.19871H3.63435ZM13.7685 13.3226C13.7685 12.9523 13.4615 12.6452 13.0911 12.6452H7.22016C6.84984 12.6452 6.54274 12.9523 6.54274 13.3226C6.54274 13.6929 6.84984 14 7.22016 14H13.0911C13.4615 14 13.7685 13.6929 13.7685 13.3226ZM7.22016 8.58064C6.84984 8.58064 6.54274 8.27355 6.54274 7.90323C6.54274 7.5329 6.84984 7.22581 7.22016 7.22581H9.47823C9.84855 7.22581 10.1556 7.5329 10.1556 7.90323C10.1556 8.27355 9.84855 8.58064 9.47823 8.58064H7.22016ZM7.22016 5.87097H7.67177C8.0421 5.87097 8.34919 5.56387 8.34919 5.19355C8.34919 4.82323 8.0421 4.51613 7.67177 4.51613H7.22016C6.84984 4.51613 6.54274 4.82323 6.54274 5.19355C6.54274 5.56387 6.84984 5.87097 7.22016 5.87097ZM11.2847 11.2903H7.22016C6.84984 11.2903 6.54274 10.9832 6.54274 10.6129C6.54274 10.2426 6.84984 9.93548 7.22016 9.93548H11.2847C11.655 9.93548 11.9621 10.2426 11.9621 10.6129C11.9621 10.9832 11.655 11.2903 11.2847 11.2903Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var Tit=["data-p-icon","spinner"],og=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","spinner"]],features:[ft],attrs:Tit,decls:5,vars:2,consts:[["d","M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var Iit=["data-p-icon","times"],am=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","times"]],features:[ft],attrs:Iit,decls:1,vars:0,consts:[["d","M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var Eit=["data-p-icon","times-circle"],HK=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","times-circle"]],features:[ft],attrs:Eit,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var Dit=["data-p-icon","trash"],ake=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","trash"]],features:[ft],attrs:Dit,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var Ait=["data-p-icon","upload"],lke=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","upload"]],features:[ft],attrs:Ait,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.58942 9.82197C6.70165 9.93405 6.85328 9.99793 7.012 10C7.17071 9.99793 7.32234 9.93405 7.43458 9.82197C7.54681 9.7099 7.61079 9.55849 7.61286 9.4V2.04798L9.79204 4.22402C9.84752 4.28011 9.91365 4.32457 9.98657 4.35479C10.0595 4.38502 10.1377 4.40039 10.2167 4.40002C10.2956 4.40039 10.3738 4.38502 10.4467 4.35479C10.5197 4.32457 10.5858 4.28011 10.6413 4.22402C10.7538 4.11152 10.817 3.95902 10.817 3.80002C10.817 3.64102 10.7538 3.48852 10.6413 3.37602L7.45127 0.190618C7.44656 0.185584 7.44176 0.180622 7.43687 0.175736C7.32419 0.063214 7.17136 0 7.012 0C6.85264 0 6.69981 0.063214 6.58712 0.175736C6.58181 0.181045 6.5766 0.186443 6.5715 0.191927L3.38282 3.37602C3.27669 3.48976 3.2189 3.6402 3.22165 3.79564C3.2244 3.95108 3.28746 4.09939 3.39755 4.20932C3.50764 4.31925 3.65616 4.38222 3.81182 4.38496C3.96749 4.3877 4.11814 4.33001 4.23204 4.22402L6.41113 2.04807V9.4C6.41321 9.55849 6.47718 9.7099 6.58942 9.82197ZM11.9952 14H2.02883C1.751 13.9887 1.47813 13.9228 1.22584 13.8061C0.973545 13.6894 0.746779 13.5241 0.558517 13.3197C0.370254 13.1154 0.22419 12.876 0.128681 12.6152C0.0331723 12.3545 -0.00990605 12.0775 0.0019109 11.8V9.40005C0.0019109 9.24092 0.065216 9.08831 0.1779 8.97579C0.290584 8.86326 0.443416 8.80005 0.602775 8.80005C0.762134 8.80005 0.914966 8.86326 1.02765 8.97579C1.14033 9.08831 1.20364 9.24092 1.20364 9.40005V11.8C1.18295 12.0376 1.25463 12.274 1.40379 12.4602C1.55296 12.6463 1.76817 12.7681 2.00479 12.8H11.9952C12.2318 12.7681 12.447 12.6463 12.5962 12.4602C12.7453 12.274 12.817 12.0376 12.7963 11.8V9.40005C12.7963 9.24092 12.8596 9.08831 12.9723 8.97579C13.085 8.86326 13.2378 8.80005 13.3972 8.80005C13.5565 8.80005 13.7094 8.86326 13.8221 8.97579C13.9347 9.08831 13.998 9.24092 13.998 9.40005V11.8C14.022 12.3563 13.8251 12.8996 13.45 13.3116C13.0749 13.7236 12.552 13.971 11.9952 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var kit=["data-p-icon","window-maximize"],cke=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","window-maximize"]],features:[ft],attrs:kit,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var Mit=["data-p-icon","window-minimize"],dke=(()=>{class t extends wr{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+Vr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","window-minimize"]],features:[ft],attrs:Mit,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(si(),Go(0,"g"),to(1,"path",0),Ho(),Go(2,"defs")(3,"clipPath",1),to(4,"rect",2),Ho()()),i&2&&(Ge("clip-path",o.pathId),T(3),Rr("id",o.pathId))},encapsulation:2})}return t})();var uke=` .p-ink { display: block; position: absolute; background: dt('ripple.background'); border-radius: 100%; transform: scale(0); pointer-events: none; } .p-ink-active { animation: ripple 0.4s linear; } @keyframes ripple { 100% { opacity: 0; transform: scale(2.5); } } `;var Oit=` ${uke} /* For PrimeNG */ .p-ripple { overflow: hidden; position: relative; } .p-ripple-disabled .p-ink { display: none !important; } @keyframes ripple { 100% { opacity: 0; transform: scale(2.5); } } `,Rit={root:"p-ink"},pke=(()=>{class t extends io{name="ripple";theme=Oit;classes=Rit;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Ul=(()=>{class t extends oo{zone=re(_n);_componentStyle=re(pke);animationListener;mouseDownListener;timeout;constructor(){super(),od(()=>{ps(this.platformId)&&(this.config.ripple()?this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.renderer.listen(this.el.nativeElement,"mousedown",this.onMouseDown.bind(this))}):this.remove())})}ngAfterViewInit(){super.ngAfterViewInit()}onMouseDown(e){let i=this.getInk();if(!i||this.document.defaultView?.getComputedStyle(i,null).display==="none")return;if(Fd(i,"p-ink-active"),!ox(i)&&!ng(i)){let d=Math.max(qc(this.el.nativeElement),qm(this.el.nativeElement));i.style.height=d+"px",i.style.width=d+"px"}let o=Zg(this.el.nativeElement),r=e.pageX-o.left+this.document.body.scrollTop-ng(i)/2,s=e.pageY-o.top+this.document.body.scrollLeft-ox(i)/2;this.renderer.setStyle(i,"top",s+"px"),this.renderer.setStyle(i,"left",r+"px"),ac(i,"p-ink-active"),this.timeout=setTimeout(()=>{let d=this.getInk();d&&Fd(d,"p-ink-active")},401)}getInk(){let e=this.el.nativeElement.children;for(let i=0;i{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();var mke=` .p-button { display: inline-flex; cursor: pointer; user-select: none; align-items: center; justify-content: center; overflow: hidden; position: relative; color: dt('button.primary.color'); background: dt('button.primary.background'); border: 1px solid dt('button.primary.border.color'); padding: dt('button.padding.y') dt('button.padding.x'); font-size: 1rem; font-family: inherit; font-feature-settings: inherit; transition: background dt('button.transition.duration'), color dt('button.transition.duration'), border-color dt('button.transition.duration'), outline-color dt('button.transition.duration'), box-shadow dt('button.transition.duration'); border-radius: dt('button.border.radius'); outline-color: transparent; gap: dt('button.gap'); } .p-button:disabled { cursor: default; } .p-button-icon-right { order: 1; } .p-button-icon-right:dir(rtl) { order: -1; } .p-button:not(.p-button-vertical) .p-button-icon:not(.p-button-icon-right):dir(rtl) { order: 1; } .p-button-icon-bottom { order: 2; } .p-button-icon-only { width: dt('button.icon.only.width'); padding-inline-start: 0; padding-inline-end: 0; gap: 0; } .p-button-icon-only.p-button-rounded { border-radius: 50%; height: dt('button.icon.only.width'); } .p-button-icon-only .p-button-label { visibility: hidden; width: 0; } .p-button-icon-only::after { content: "\0A0"; visibility: hidden; width: 0; } .p-button-sm { font-size: dt('button.sm.font.size'); padding: dt('button.sm.padding.y') dt('button.sm.padding.x'); } .p-button-sm .p-button-icon { font-size: dt('button.sm.font.size'); } .p-button-sm.p-button-icon-only { width: dt('button.sm.icon.only.width'); } .p-button-sm.p-button-icon-only.p-button-rounded { height: dt('button.sm.icon.only.width'); } .p-button-lg { font-size: dt('button.lg.font.size'); padding: dt('button.lg.padding.y') dt('button.lg.padding.x'); } .p-button-lg .p-button-icon { font-size: dt('button.lg.font.size'); } .p-button-lg.p-button-icon-only { width: dt('button.lg.icon.only.width'); } .p-button-lg.p-button-icon-only.p-button-rounded { height: dt('button.lg.icon.only.width'); } .p-button-vertical { flex-direction: column; } .p-button-label { font-weight: dt('button.label.font.weight'); } .p-button-fluid { width: 100%; } .p-button-fluid.p-button-icon-only { width: dt('button.icon.only.width'); } .p-button:not(:disabled):hover { background: dt('button.primary.hover.background'); border: 1px solid dt('button.primary.hover.border.color'); color: dt('button.primary.hover.color'); } .p-button:not(:disabled):active { background: dt('button.primary.active.background'); border: 1px solid dt('button.primary.active.border.color'); color: dt('button.primary.active.color'); } .p-button:focus-visible { box-shadow: dt('button.primary.focus.ring.shadow'); outline: dt('button.focus.ring.width') dt('button.focus.ring.style') dt('button.primary.focus.ring.color'); outline-offset: dt('button.focus.ring.offset'); } .p-button .p-badge { min-width: dt('button.badge.size'); height: dt('button.badge.size'); line-height: dt('button.badge.size'); } .p-button-raised { box-shadow: dt('button.raised.shadow'); } .p-button-rounded { border-radius: dt('button.rounded.border.radius'); } .p-button-secondary { background: dt('button.secondary.background'); border: 1px solid dt('button.secondary.border.color'); color: dt('button.secondary.color'); } .p-button-secondary:not(:disabled):hover { background: dt('button.secondary.hover.background'); border: 1px solid dt('button.secondary.hover.border.color'); color: dt('button.secondary.hover.color'); } .p-button-secondary:not(:disabled):active { background: dt('button.secondary.active.background'); border: 1px solid dt('button.secondary.active.border.color'); color: dt('button.secondary.active.color'); } .p-button-secondary:focus-visible { outline-color: dt('button.secondary.focus.ring.color'); box-shadow: dt('button.secondary.focus.ring.shadow'); } .p-button-success { background: dt('button.success.background'); border: 1px solid dt('button.success.border.color'); color: dt('button.success.color'); } .p-button-success:not(:disabled):hover { background: dt('button.success.hover.background'); border: 1px solid dt('button.success.hover.border.color'); color: dt('button.success.hover.color'); } .p-button-success:not(:disabled):active { background: dt('button.success.active.background'); border: 1px solid dt('button.success.active.border.color'); color: dt('button.success.active.color'); } .p-button-success:focus-visible { outline-color: dt('button.success.focus.ring.color'); box-shadow: dt('button.success.focus.ring.shadow'); } .p-button-info { background: dt('button.info.background'); border: 1px solid dt('button.info.border.color'); color: dt('button.info.color'); } .p-button-info:not(:disabled):hover { background: dt('button.info.hover.background'); border: 1px solid dt('button.info.hover.border.color'); color: dt('button.info.hover.color'); } .p-button-info:not(:disabled):active { background: dt('button.info.active.background'); border: 1px solid dt('button.info.active.border.color'); color: dt('button.info.active.color'); } .p-button-info:focus-visible { outline-color: dt('button.info.focus.ring.color'); box-shadow: dt('button.info.focus.ring.shadow'); } .p-button-warn { background: dt('button.warn.background'); border: 1px solid dt('button.warn.border.color'); color: dt('button.warn.color'); } .p-button-warn:not(:disabled):hover { background: dt('button.warn.hover.background'); border: 1px solid dt('button.warn.hover.border.color'); color: dt('button.warn.hover.color'); } .p-button-warn:not(:disabled):active { background: dt('button.warn.active.background'); border: 1px solid dt('button.warn.active.border.color'); color: dt('button.warn.active.color'); } .p-button-warn:focus-visible { outline-color: dt('button.warn.focus.ring.color'); box-shadow: dt('button.warn.focus.ring.shadow'); } .p-button-help { background: dt('button.help.background'); border: 1px solid dt('button.help.border.color'); color: dt('button.help.color'); } .p-button-help:not(:disabled):hover { background: dt('button.help.hover.background'); border: 1px solid dt('button.help.hover.border.color'); color: dt('button.help.hover.color'); } .p-button-help:not(:disabled):active { background: dt('button.help.active.background'); border: 1px solid dt('button.help.active.border.color'); color: dt('button.help.active.color'); } .p-button-help:focus-visible { outline-color: dt('button.help.focus.ring.color'); box-shadow: dt('button.help.focus.ring.shadow'); } .p-button-danger { background: dt('button.danger.background'); border: 1px solid dt('button.danger.border.color'); color: dt('button.danger.color'); } .p-button-danger:not(:disabled):hover { background: dt('button.danger.hover.background'); border: 1px solid dt('button.danger.hover.border.color'); color: dt('button.danger.hover.color'); } .p-button-danger:not(:disabled):active { background: dt('button.danger.active.background'); border: 1px solid dt('button.danger.active.border.color'); color: dt('button.danger.active.color'); } .p-button-danger:focus-visible { outline-color: dt('button.danger.focus.ring.color'); box-shadow: dt('button.danger.focus.ring.shadow'); } .p-button-contrast { background: dt('button.contrast.background'); border: 1px solid dt('button.contrast.border.color'); color: dt('button.contrast.color'); } .p-button-contrast:not(:disabled):hover { background: dt('button.contrast.hover.background'); border: 1px solid dt('button.contrast.hover.border.color'); color: dt('button.contrast.hover.color'); } .p-button-contrast:not(:disabled):active { background: dt('button.contrast.active.background'); border: 1px solid dt('button.contrast.active.border.color'); color: dt('button.contrast.active.color'); } .p-button-contrast:focus-visible { outline-color: dt('button.contrast.focus.ring.color'); box-shadow: dt('button.contrast.focus.ring.shadow'); } .p-button-outlined { background: transparent; border-color: dt('button.outlined.primary.border.color'); color: dt('button.outlined.primary.color'); } .p-button-outlined:not(:disabled):hover { background: dt('button.outlined.primary.hover.background'); border-color: dt('button.outlined.primary.border.color'); color: dt('button.outlined.primary.color'); } .p-button-outlined:not(:disabled):active { background: dt('button.outlined.primary.active.background'); border-color: dt('button.outlined.primary.border.color'); color: dt('button.outlined.primary.color'); } .p-button-outlined.p-button-secondary { border-color: dt('button.outlined.secondary.border.color'); color: dt('button.outlined.secondary.color'); } .p-button-outlined.p-button-secondary:not(:disabled):hover { background: dt('button.outlined.secondary.hover.background'); border-color: dt('button.outlined.secondary.border.color'); color: dt('button.outlined.secondary.color'); } .p-button-outlined.p-button-secondary:not(:disabled):active { background: dt('button.outlined.secondary.active.background'); border-color: dt('button.outlined.secondary.border.color'); color: dt('button.outlined.secondary.color'); } .p-button-outlined.p-button-success { border-color: dt('button.outlined.success.border.color'); color: dt('button.outlined.success.color'); } .p-button-outlined.p-button-success:not(:disabled):hover { background: dt('button.outlined.success.hover.background'); border-color: dt('button.outlined.success.border.color'); color: dt('button.outlined.success.color'); } .p-button-outlined.p-button-success:not(:disabled):active { background: dt('button.outlined.success.active.background'); border-color: dt('button.outlined.success.border.color'); color: dt('button.outlined.success.color'); } .p-button-outlined.p-button-info { border-color: dt('button.outlined.info.border.color'); color: dt('button.outlined.info.color'); } .p-button-outlined.p-button-info:not(:disabled):hover { background: dt('button.outlined.info.hover.background'); border-color: dt('button.outlined.info.border.color'); color: dt('button.outlined.info.color'); } .p-button-outlined.p-button-info:not(:disabled):active { background: dt('button.outlined.info.active.background'); border-color: dt('button.outlined.info.border.color'); color: dt('button.outlined.info.color'); } .p-button-outlined.p-button-warn { border-color: dt('button.outlined.warn.border.color'); color: dt('button.outlined.warn.color'); } .p-button-outlined.p-button-warn:not(:disabled):hover { background: dt('button.outlined.warn.hover.background'); border-color: dt('button.outlined.warn.border.color'); color: dt('button.outlined.warn.color'); } .p-button-outlined.p-button-warn:not(:disabled):active { background: dt('button.outlined.warn.active.background'); border-color: dt('button.outlined.warn.border.color'); color: dt('button.outlined.warn.color'); } .p-button-outlined.p-button-help { border-color: dt('button.outlined.help.border.color'); color: dt('button.outlined.help.color'); } .p-button-outlined.p-button-help:not(:disabled):hover { background: dt('button.outlined.help.hover.background'); border-color: dt('button.outlined.help.border.color'); color: dt('button.outlined.help.color'); } .p-button-outlined.p-button-help:not(:disabled):active { background: dt('button.outlined.help.active.background'); border-color: dt('button.outlined.help.border.color'); color: dt('button.outlined.help.color'); } .p-button-outlined.p-button-danger { border-color: dt('button.outlined.danger.border.color'); color: dt('button.outlined.danger.color'); } .p-button-outlined.p-button-danger:not(:disabled):hover { background: dt('button.outlined.danger.hover.background'); border-color: dt('button.outlined.danger.border.color'); color: dt('button.outlined.danger.color'); } .p-button-outlined.p-button-danger:not(:disabled):active { background: dt('button.outlined.danger.active.background'); border-color: dt('button.outlined.danger.border.color'); color: dt('button.outlined.danger.color'); } .p-button-outlined.p-button-contrast { border-color: dt('button.outlined.contrast.border.color'); color: dt('button.outlined.contrast.color'); } .p-button-outlined.p-button-contrast:not(:disabled):hover { background: dt('button.outlined.contrast.hover.background'); border-color: dt('button.outlined.contrast.border.color'); color: dt('button.outlined.contrast.color'); } .p-button-outlined.p-button-contrast:not(:disabled):active { background: dt('button.outlined.contrast.active.background'); border-color: dt('button.outlined.contrast.border.color'); color: dt('button.outlined.contrast.color'); } .p-button-outlined.p-button-plain { border-color: dt('button.outlined.plain.border.color'); color: dt('button.outlined.plain.color'); } .p-button-outlined.p-button-plain:not(:disabled):hover { background: dt('button.outlined.plain.hover.background'); border-color: dt('button.outlined.plain.border.color'); color: dt('button.outlined.plain.color'); } .p-button-outlined.p-button-plain:not(:disabled):active { background: dt('button.outlined.plain.active.background'); border-color: dt('button.outlined.plain.border.color'); color: dt('button.outlined.plain.color'); } .p-button-text { background: transparent; border-color: transparent; color: dt('button.text.primary.color'); } .p-button-text:not(:disabled):hover { background: dt('button.text.primary.hover.background'); border-color: transparent; color: dt('button.text.primary.color'); } .p-button-text:not(:disabled):active { background: dt('button.text.primary.active.background'); border-color: transparent; color: dt('button.text.primary.color'); } .p-button-text.p-button-secondary { background: transparent; border-color: transparent; color: dt('button.text.secondary.color'); } .p-button-text.p-button-secondary:not(:disabled):hover { background: dt('button.text.secondary.hover.background'); border-color: transparent; color: dt('button.text.secondary.color'); } .p-button-text.p-button-secondary:not(:disabled):active { background: dt('button.text.secondary.active.background'); border-color: transparent; color: dt('button.text.secondary.color'); } .p-button-text.p-button-success { background: transparent; border-color: transparent; color: dt('button.text.success.color'); } .p-button-text.p-button-success:not(:disabled):hover { background: dt('button.text.success.hover.background'); border-color: transparent; color: dt('button.text.success.color'); } .p-button-text.p-button-success:not(:disabled):active { background: dt('button.text.success.active.background'); border-color: transparent; color: dt('button.text.success.color'); } .p-button-text.p-button-info { background: transparent; border-color: transparent; color: dt('button.text.info.color'); } .p-button-text.p-button-info:not(:disabled):hover { background: dt('button.text.info.hover.background'); border-color: transparent; color: dt('button.text.info.color'); } .p-button-text.p-button-info:not(:disabled):active { background: dt('button.text.info.active.background'); border-color: transparent; color: dt('button.text.info.color'); } .p-button-text.p-button-warn { background: transparent; border-color: transparent; color: dt('button.text.warn.color'); } .p-button-text.p-button-warn:not(:disabled):hover { background: dt('button.text.warn.hover.background'); border-color: transparent; color: dt('button.text.warn.color'); } .p-button-text.p-button-warn:not(:disabled):active { background: dt('button.text.warn.active.background'); border-color: transparent; color: dt('button.text.warn.color'); } .p-button-text.p-button-help { background: transparent; border-color: transparent; color: dt('button.text.help.color'); } .p-button-text.p-button-help:not(:disabled):hover { background: dt('button.text.help.hover.background'); border-color: transparent; color: dt('button.text.help.color'); } .p-button-text.p-button-help:not(:disabled):active { background: dt('button.text.help.active.background'); border-color: transparent; color: dt('button.text.help.color'); } .p-button-text.p-button-danger { background: transparent; border-color: transparent; color: dt('button.text.danger.color'); } .p-button-text.p-button-danger:not(:disabled):hover { background: dt('button.text.danger.hover.background'); border-color: transparent; color: dt('button.text.danger.color'); } .p-button-text.p-button-danger:not(:disabled):active { background: dt('button.text.danger.active.background'); border-color: transparent; color: dt('button.text.danger.color'); } .p-button-text.p-button-contrast { background: transparent; border-color: transparent; color: dt('button.text.contrast.color'); } .p-button-text.p-button-contrast:not(:disabled):hover { background: dt('button.text.contrast.hover.background'); border-color: transparent; color: dt('button.text.contrast.color'); } .p-button-text.p-button-contrast:not(:disabled):active { background: dt('button.text.contrast.active.background'); border-color: transparent; color: dt('button.text.contrast.color'); } .p-button-text.p-button-plain { background: transparent; border-color: transparent; color: dt('button.text.plain.color'); } .p-button-text.p-button-plain:not(:disabled):hover { background: dt('button.text.plain.hover.background'); border-color: transparent; color: dt('button.text.plain.color'); } .p-button-text.p-button-plain:not(:disabled):active { background: dt('button.text.plain.active.background'); border-color: transparent; color: dt('button.text.plain.color'); } .p-button-link { background: transparent; border-color: transparent; color: dt('button.link.color'); } .p-button-link:not(:disabled):hover { background: transparent; border-color: transparent; color: dt('button.link.hover.color'); } .p-button-link:not(:disabled):hover .p-button-label { text-decoration: underline; } .p-button-link:not(:disabled):active { background: transparent; border-color: transparent; color: dt('button.link.active.color'); } `;var Fit=["content"],Pit=["loadingicon"],Lit=["icon"],Nit=["*"],gke=t=>({class:t});function Bit(t,n){t&1&&ui(0)}function Vit(t,n){if(t&1&&ce(0,"span"),t&2){let e=P(3);Oe(e.cx("loadingIcon")),Ge("aria-hidden",!0)("data-pc-section","loadingicon")}}function zit(t,n){if(t&1&&(si(),ce(0,"svg",7)),t&2){let e=P(3);Oe(e.cn(e.cx("loadingIcon"),e.spinnerIconClass())),E("spin",!0),Ge("aria-hidden",!0)("data-pc-section","loadingicon")}}function Uit(t,n){if(t&1&&(Di(0),ee(1,Vit,1,4,"span",3)(2,zit,1,5,"svg",6),Ai()),t&2){let e=P(2);T(),E("ngIf",e.loadingIcon),T(),E("ngIf",!e.loadingIcon)}}function Hit(t,n){}function jit(t,n){if(t&1&&ee(0,Hit,0,0,"ng-template",8),t&2){let e=P(2);E("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Git(t,n){if(t&1&&(Di(0),ee(1,Uit,3,2,"ng-container",2)(2,jit,1,1,null,5),Ai()),t&2){let e=P();T(),E("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),T(),E("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)("ngTemplateOutletContext",ki(3,gke,e.cx("loadingIcon")))}}function $it(t,n){if(t&1&&ce(0,"span"),t&2){let e=P(2);Oe(e.cx("icon")),Ge("data-pc-section","icon")}}function qit(t,n){}function Kit(t,n){if(t&1&&ee(0,qit,0,0,"ng-template",8),t&2){let e=P(2);E("ngIf",!e.icon&&(e.iconTemplate||e._iconTemplate))}}function Wit(t,n){if(t&1&&(Di(0),ee(1,$it,1,3,"span",3)(2,Kit,1,1,null,5),Ai()),t&2){let e=P();T(),E("ngIf",e.icon&&!e.iconTemplate&&!e._iconTemplate),T(),E("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)("ngTemplateOutletContext",ki(3,gke,e.cx("icon")))}}function Yit(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P();Oe(e.cx("label")),Ge("aria-hidden",e.icon&&!e.label)("data-pc-section","label"),T(),dt(e.label)}}function Qit(t,n){if(t&1&&ce(0,"p-badge",9),t&2){let e=P();E("value",e.badge)("severity",e.badgeSeverity)}}var Zit={root:({instance:t})=>["p-button p-component",{"p-button-icon-only":(t.icon||t.buttonProps?.icon||t.iconTemplate||t._iconTemplate||t.loadingIcon||t.loadingIconTemplate||t._loadingIconTemplate)&&!t.label&&!t.buttonProps?.label,"p-button-vertical":(t.iconPos==="top"||t.iconPos==="bottom")&&t.label,"p-button-loading":t.loading||t.buttonProps?.loading,"p-button-link":t.link||t.buttonProps?.link,[`p-button-${t.severity||t.buttonProps?.severity}`]:t.severity||t.buttonProps?.severity,"p-button-raised":t.raised||t.buttonProps?.raised,"p-button-rounded":t.rounded||t.buttonProps?.rounded,"p-button-text":t.text||t.variant==="text"||t.buttonProps?.text||t.buttonProps?.variant==="text","p-button-outlined":t.outlined||t.variant==="outlined"||t.buttonProps?.outlined||t.buttonProps?.variant==="outlined","p-button-sm":t.size==="small"||t.buttonProps?.size==="small","p-button-lg":t.size==="large"||t.buttonProps?.size==="large","p-button-plain":t.plain||t.buttonProps?.plain,"p-button-fluid":t.hasFluid}],loadingIcon:"p-button-loading-icon",icon:({instance:t})=>["p-button-icon",{[`p-button-icon-${t.iconPos||t.buttonProps?.iconPos}`]:t.label||t.buttonProps?.label,"p-button-icon-left":(t.iconPos==="left"||t.buttonProps?.iconPos==="left")&&t.label||t.buttonProps?.label,"p-button-icon-right":(t.iconPos==="right"||t.buttonProps?.iconPos==="right")&&t.label||t.buttonProps?.label},t.icon,t.buttonProps?.icon],spinnerIcon:({instance:t})=>Object.entries(t.iconClass()).filter(([,n])=>!!n).reduce((n,[e])=>n+` ${e}`,"p-button-loading-icon"),label:"p-button-label"},tE=(()=>{class t extends io{name="button";theme=mke;classes=Zit;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var eE={button:"p-button",component:"p-component",iconOnly:"p-button-icon-only",disabled:"p-disabled",loading:"p-button-loading",labelOnly:"p-button-loading-label-only"},fke=(()=>{class t extends oo{_componentStyle=re(tE);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","pButtonLabel",""]],hostVars:2,hostBindings:function(i,o){i&2&&Vn("p-button-label",!0)},features:[jt([tE]),ft]})}return t})(),jK=(()=>{class t extends oo{_componentStyle=re(tE);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","pButtonIcon",""]],hostVars:2,hostBindings:function(i,o){i&2&&Vn("p-button-icon",!0)},features:[jt([tE]),ft]})}return t})(),GK=(()=>{class t extends oo{iconPos="left";loadingIcon;set label(e){this._label=e,this.initialized&&(this.updateLabel(),this.updateIcon(),this.setStyleClass())}set icon(e){this._icon=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}_buttonProps;iconSignal=ew(jK);labelSignal=ew(fke);isIconOnly=bo(()=>!!(!this.labelSignal()&&this.iconSignal()));set buttonProps(e){this._buttonProps=e,e&&typeof e=="object"&&Object.entries(e).forEach(([i,o])=>this[`_${i}`]!==o&&(this[`_${i}`]=o))}_severity;get severity(){return this._severity}set severity(e){this._severity=e,this.initialized&&this.setStyleClass()}raised=!1;rounded=!1;text=!1;outlined=!1;size=null;plain=!1;fluid=mo(void 0,{transform:je});_label;_icon;_loading=!1;initialized;get htmlElement(){return this.el.nativeElement}_internalClasses=Object.values(eE);pcFluid=re(Hw,{optional:!0,host:!0,skipSelf:!0});isTextButton=bo(()=>!!(!this.iconSignal()&&this.labelSignal()&&this.text));get label(){return this._label}get icon(){return this._icon}get buttonProps(){return this._buttonProps}spinnerIcon=` `;_componentStyle=re(tE);ngAfterViewInit(){super.ngAfterViewInit(),ac(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){let e=[eE.button,eE.component];return this.icon&&!this.label&&wc(this.htmlElement.textContent)&&e.push(eE.iconOnly),this.loading&&(e.push(eE.disabled,eE.loading),!this.icon&&this.label&&e.push(eE.labelOnly),this.icon&&!this.label&&!wc(this.htmlElement.textContent)&&e.push(eE.iconOnly)),this.text&&e.push("p-button-text"),this.severity&&e.push(`p-button-${this.severity}`),this.plain&&e.push("p-button-plain"),this.raised&&e.push("p-button-raised"),this.size&&e.push(`p-button-${this.size}`),this.outlined&&e.push("p-button-outlined"),this.rounded&&e.push("p-button-rounded"),this.size==="small"&&e.push("p-button-sm"),this.size==="large"&&e.push("p-button-lg"),this.hasFluid&&e.push("p-button-fluid"),e}get hasFluid(){return this.fluid()??!!this.pcFluid}setStyleClass(){let e=this.getStyleClass();this.removeExistingSeverityClass(),this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...e)}removeExistingSeverityClass(){let e=["success","info","warn","danger","help","primary","secondary","contrast"],i=this.htmlElement.classList.value.split(" ").find(o=>e.some(r=>o===`p-button-${r}`));i&&this.htmlElement.classList.remove(i)}createLabel(){if(!zo(this.htmlElement,".p-button-label")&&this.label){let i=this.document.createElement("span");this.icon&&!this.label&&i.setAttribute("aria-hidden","true"),i.className="p-button-label",i.appendChild(this.document.createTextNode(this.label)),this.htmlElement.appendChild(i)}}createIcon(){if(!zo(this.htmlElement,".p-button-icon")&&(this.icon||this.loading)){let i=this.document.createElement("span");i.className="p-button-icon",i.setAttribute("aria-hidden","true");let o=this.label?"p-button-icon-"+this.iconPos:null;o&&ac(i,o);let r=this.getIconClass();r&&ac(i,r),!this.loadingIcon&&this.loading&&(i.innerHTML=this.spinnerIcon),this.htmlElement.insertBefore(i,this.htmlElement.firstChild)}}updateLabel(){let e=zo(this.htmlElement,".p-button-label");if(!this.label){e&&this.htmlElement.removeChild(e);return}e?e.textContent=this.label:this.createLabel()}updateIcon(){let e=zo(this.htmlElement,".p-button-icon"),i=zo(this.htmlElement,".p-button-label");this.loading&&!this.loadingIcon&&e?e.innerHTML=this.spinnerIcon:e?.innerHTML&&(e.innerHTML=""),e?this.iconPos?e.className="p-button-icon "+(i?"p-button-icon-"+this.iconPos:"")+" "+this.getIconClass():e.className="p-button-icon "+this.getIconClass():this.createIcon()}getIconClass(){return this.loading?"p-button-loading-icon "+(this.loadingIcon?this.loadingIcon:"p-icon"):this.icon||"p-hidden"}ngOnDestroy(){this.initialized=!1,super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","pButton",""]],contentQueries:function(i,o,r){i&1&&(Y_(r,o.iconSignal,jK,5),Y_(r,o.labelSignal,fke,5)),i&2&&Z0(2)},hostVars:4,hostBindings:function(i,o){i&2&&Vn("p-button-icon-only",o.isIconOnly())("p-button-text",o.isTextButton())},inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",loading:"loading",severity:"severity",raised:[2,"raised","raised",je],rounded:[2,"rounded","rounded",je],text:[2,"text","text",je],outlined:[2,"outlined","outlined",je],size:"size",plain:[2,"plain","plain",je],fluid:[1,"fluid"],label:"label",icon:"icon",buttonProps:"buttonProps"},features:[jt([tE]),ft]})}return t})(),ja=(()=>{class t extends oo{type="button";iconPos="left";icon;badge;label;disabled;loading=!1;loadingIcon;raised=!1;rounded=!1;text=!1;plain=!1;severity;outlined=!1;link=!1;tabindex;size;variant;style;styleClass;badgeClass;badgeSeverity="secondary";ariaLabel;buttonProps;autofocus;fluid=mo(void 0,{transform:je});onClick=new ve;onFocus=new ve;onBlur=new ve;contentTemplate;loadingIconTemplate;iconTemplate;templates;pcFluid=re(Hw,{optional:!0,host:!0,skipSelf:!0});get hasFluid(){return this.fluid()??!!this.pcFluid}_componentStyle=re(tE);_contentTemplate;_iconTemplate;_loadingIconTemplate;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;case"icon":this._iconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}spinnerIconClass(){return Object.entries(this.iconClass()).filter(([,e])=>!!e).reduce((e,[i])=>e+` ${i}`,"p-button-loading-icon")}iconClass(){return{[`p-button-loading-icon pi-spin ${this.loadingIcon??""}`]:this.loading,"p-button-icon":!0,"p-button-icon-left":this.iconPos==="left"&&this.label,"p-button-icon-right":this.iconPos==="right"&&this.label,"p-button-icon-top":this.iconPos==="top"&&this.label,"p-button-icon-bottom":this.iconPos==="bottom"&&this.label}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-button"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Fit,5),xt(r,Pit,5),xt(r,Lit,5),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.contentTemplate=s.first),Le(s=Ne())&&(o.loadingIconTemplate=s.first),Le(s=Ne())&&(o.iconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:[2,"disabled","disabled",je],loading:[2,"loading","loading",je],loadingIcon:"loadingIcon",raised:[2,"raised","raised",je],rounded:[2,"rounded","rounded",je],text:[2,"text","text",je],plain:[2,"plain","plain",je],severity:"severity",outlined:[2,"outlined","outlined",je],link:[2,"link","link",je],tabindex:[2,"tabindex","tabindex",ln],size:"size",variant:"variant",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",badgeSeverity:"badgeSeverity",ariaLabel:"ariaLabel",buttonProps:"buttonProps",autofocus:[2,"autofocus","autofocus",je],fluid:[1,"fluid"]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[jt([tE]),ft],ngContentSelectors:Nit,decls:7,vars:15,consts:[["pRipple","",3,"click","focus","blur","ngStyle","disabled","pAutoFocus"],[4,"ngTemplateOutlet"],[4,"ngIf"],[3,"class",4,"ngIf"],[3,"value","severity",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","spinner",3,"class","spin",4,"ngIf"],["data-p-icon","spinner",3,"spin"],[3,"ngIf"],[3,"value","severity"]],template:function(i,o){i&1&&(Nn(),k(0,"button",0),ie("click",function(s){return o.onClick.emit(s)})("focus",function(s){return o.onFocus.emit(s)})("blur",function(s){return o.onBlur.emit(s)}),pn(1),ee(2,Bit,1,0,"ng-container",1)(3,Git,3,5,"ng-container",2)(4,Wit,3,5,"ng-container",2)(5,Yit,2,5,"span",3)(6,Qit,1,2,"p-badge",4),D()),i&2&&(Oe(o.cn(o.cx("root"),o.styleClass,o.buttonProps==null?null:o.buttonProps.styleClass)),E("ngStyle",o.style||(o.buttonProps==null?null:o.buttonProps.style))("disabled",o.disabled||o.loading||(o.buttonProps==null?null:o.buttonProps.disabled))("pAutoFocus",o.autofocus||(o.buttonProps==null?null:o.buttonProps.autofocus)),Ge("type",o.type||(o.buttonProps==null?null:o.buttonProps.type))("aria-label",o.ariaLabel||(o.buttonProps==null?null:o.buttonProps.ariaLabel))("data-pc-name","button")("data-pc-section","root")("tabindex",o.tabindex||(o.buttonProps==null?null:o.buttonProps.tabindex)),T(2),E("ngTemplateOutlet",o.contentTemplate||o._contentTemplate),T(),E("ngIf",o.loading),T(),E("ngIf",!o.loading),T(),E("ngIf",!o.contentTemplate&&!o._contentTemplate&&o.label),T(),E("ngIf",!o.contentTemplate&&!o._contentTemplate&&o.badge))},dependencies:[On,Fr,Lo,vs,Ul,fp,og,LP,jw,In],encapsulation:2,changeDetection:0})}return t})(),$K=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[On,ja,In,In]})}return t})();var _ke=` .p-inputtext { font-family: inherit; font-feature-settings: inherit; font-size: 1rem; color: dt('inputtext.color'); background: dt('inputtext.background'); padding-block: dt('inputtext.padding.y'); padding-inline: dt('inputtext.padding.x'); border: 1px solid dt('inputtext.border.color'); transition: background dt('inputtext.transition.duration'), color dt('inputtext.transition.duration'), border-color dt('inputtext.transition.duration'), outline-color dt('inputtext.transition.duration'), box-shadow dt('inputtext.transition.duration'); appearance: none; border-radius: dt('inputtext.border.radius'); outline-color: transparent; box-shadow: dt('inputtext.shadow'); } .p-inputtext:enabled:hover { border-color: dt('inputtext.hover.border.color'); } .p-inputtext:enabled:focus { border-color: dt('inputtext.focus.border.color'); box-shadow: dt('inputtext.focus.ring.shadow'); outline: dt('inputtext.focus.ring.width') dt('inputtext.focus.ring.style') dt('inputtext.focus.ring.color'); outline-offset: dt('inputtext.focus.ring.offset'); } .p-inputtext.p-invalid { border-color: dt('inputtext.invalid.border.color'); } .p-inputtext.p-variant-filled { background: dt('inputtext.filled.background'); } .p-inputtext.p-variant-filled:enabled:hover { background: dt('inputtext.filled.hover.background'); } .p-inputtext.p-variant-filled:enabled:focus { background: dt('inputtext.filled.focus.background'); } .p-inputtext:disabled { opacity: 1; background: dt('inputtext.disabled.background'); color: dt('inputtext.disabled.color'); } .p-inputtext::placeholder { color: dt('inputtext.placeholder.color'); } .p-inputtext.p-invalid::placeholder { color: dt('inputtext.invalid.placeholder.color'); } .p-inputtext-sm { font-size: dt('inputtext.sm.font.size'); padding-block: dt('inputtext.sm.padding.y'); padding-inline: dt('inputtext.sm.padding.x'); } .p-inputtext-lg { font-size: dt('inputtext.lg.font.size'); padding-block: dt('inputtext.lg.padding.y'); padding-inline: dt('inputtext.lg.padding.x'); } .p-inputtext-fluid { width: 100%; } `;var Jit=` ${_ke} /* For PrimeNG */ .p-inputtext.ng-invalid.ng-dirty { border-color: dt('inputtext.invalid.border.color'); } .p-inputtext.ng-invalid.ng-dirty::placeholder { color: dt('inputtext.invalid.placeholder.color'); } `,ent={root:({instance:t})=>["p-inputtext p-component",{"p-filled":t.$filled(),"p-inputtext-sm":t.pSize==="small","p-inputtext-lg":t.pSize==="large","p-invalid":t.invalid(),"p-variant-filled":t.$variant()==="filled","p-inputtext-fluid":t.hasFluid}]},yke=(()=>{class t extends io{name="inputtext";theme=Jit;classes=ent;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var fu=(()=>{class t extends MK{ngControl=re(Vu,{optional:!0,self:!0});pcFluid=re(Hw,{optional:!0,host:!0,skipSelf:!0});pSize;variant=mo();fluid=mo(void 0,{transform:je});invalid=mo(void 0,{transform:je});$variant=bo(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());_componentStyle=re(yke);ngAfterViewInit(){super.ngAfterViewInit(),this.writeModelValue(this.ngControl?.value??this.el.nativeElement.value),this.cd.detectChanges()}ngDoCheck(){this.writeModelValue(this.ngControl?.value??this.el.nativeElement.value)}onInput(){this.writeModelValue(this.ngControl?.value??this.el.nativeElement.value)}get hasFluid(){return this.fluid()??!!this.pcFluid}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","pInputText",""]],hostVars:2,hostBindings:function(i,o){i&1&&ie("input",function(s){return o.onInput(s)}),i&2&&Oe(o.cx("root"))},inputs:{pSize:"pSize",variant:[1,"variant"],fluid:[1,"fluid"],invalid:[1,"invalid"]},features:[jt([yke]),ft]})}return t})(),qK=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();var Jr=class t{static isArray(n,e=!0){return Array.isArray(n)&&(e||n.length!==0)}static isObject(n,e=!0){return typeof n=="object"&&!Array.isArray(n)&&n!=null&&(e||Object.keys(n).length!==0)}static equals(n,e,i){return i?this.resolveFieldData(n,i)===this.resolveFieldData(e,i):this.equalsByValue(n,e)}static equalsByValue(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){var i=Array.isArray(n),o=Array.isArray(e),r,s,d;if(i&&o){if(s=n.length,s!=e.length)return!1;for(r=s;r--!==0;)if(!this.equalsByValue(n[r],e[r]))return!1;return!0}if(i!=o)return!1;var m=this.isDate(n),v=this.isDate(e);if(m!=v)return!1;if(m&&v)return n.getTime()==e.getTime();var w=n instanceof RegExp,O=e instanceof RegExp;if(w!=O)return!1;if(w&&O)return n.toString()==e.toString();var N=Object.keys(n);if(s=N.length,s!==Object.keys(e).length)return!1;for(r=s;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,N[r]))return!1;for(r=s;r--!==0;)if(d=N[r],!this.equalsByValue(n[d],e[d]))return!1;return!0}return n!==n&&e!==e}static resolveFieldData(n,e){if(n&&e){if(this.isFunction(e))return e(n);if(e.indexOf(".")==-1)return n[e];{let i=e.split("."),o=n;for(let r=0,s=i.length;r=n.length&&(i%=n.length,e%=n.length),n.splice(i,0,n.splice(e,1)[0]))}static insertIntoOrderedArray(n,e,i,o){if(i.length>0){let r=!1;for(let s=0;se){i.splice(s,0,n),r=!0;break}r||i.push(n)}else i.push(n)}static findIndexInList(n,e){let i=-1;if(e){for(let o=0;oe?1:0,r}static sort(n,e,i=1,o,r=1){let s=t.compare(n,e,o,i),d=i;return(t.isEmpty(n)||t.isEmpty(e))&&(d=r===1?i:r),d*s}static merge(n,e){if(!(n==null&&e==null)){{if((n==null||typeof n=="object")&&(e==null||typeof e=="object"))return be(be({},n||{}),e||{});if((n==null||typeof n=="string")&&(e==null||typeof e=="string"))return[n||"",e||""].join(" ")}return e||n}}static isPrintableCharacter(n=""){return this.isNotEmpty(n)&&n.length===1&&n.match(/\S| /)}static getItemValue(n,...e){return this.isFunction(n)?n(...e):n}static findLastIndex(n,e){let i=-1;if(this.isNotEmpty(n))try{i=n.findLastIndex(e)}catch{i=n.lastIndexOf([...n].reverse().find(e))}return i}static findLast(n,e){let i;if(this.isNotEmpty(n))try{i=n.findLast(e)}catch{i=[...n].reverse().find(e)}return i}static deepEquals(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){var i=Array.isArray(n),o=Array.isArray(e),r,s,d;if(i&&o){if(s=n.length,s!=e.length)return!1;for(r=s;r--!==0;)if(!this.deepEquals(n[r],e[r]))return!1;return!0}if(i!=o)return!1;var m=n instanceof Date,v=e instanceof Date;if(m!=v)return!1;if(m&&v)return n.getTime()==e.getTime();var w=n instanceof RegExp,O=e instanceof RegExp;if(w!=O)return!1;if(w&&O)return n.toString()==e.toString();var N=Object.keys(n);if(s=N.length,s!==Object.keys(e).length)return!1;for(r=s;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,N[r]))return!1;for(r=s;r--!==0;)if(d=N[r],!this.deepEquals(n[d],e[d]))return!1;return!0}return n!==n&&e!==e}static minifyCSS(n){return n&&n.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":")}static toFlatCase(n){return this.isString(n)?n.replace(/(-|_)/g,"").toLowerCase():n}static isString(n,e=!0){return typeof n=="string"&&(e||n!=="")}},vke=0;function bke(t="pn_id_"){return vke++,`${t}${vke}`}function tnt(){let t=[],n=(r,s)=>{let d=t.length>0?t[t.length-1]:{key:r,value:s},m=d.value+(d.key===r?0:s)+2;return t.push({key:r,value:m}),m},e=r=>{t=t.filter(s=>s.value!==r)},i=()=>t.length>0?t[t.length-1].value:0,o=r=>r&&parseInt(r.style.zIndex,10)||0;return{get:o,set:(r,s,d)=>{s&&(s.style.zIndex=String(n(r,d)))},clear:r=>{r&&(e(o(r)),r.style.zIndex="")},getCurrent:()=>i(),generateZIndex:n,revertZIndex:e}}var Nc=tnt(),m2=t=>!!t;var Cke=` .p-datepicker { display: inline-flex; max-width: 100%; } .p-datepicker-input { flex: 1 1 auto; width: 1%; } .p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-input { border-start-end-radius: 0; border-end-end-radius: 0; } .p-datepicker-dropdown { cursor: pointer; display: inline-flex; user-select: none; align-items: center; justify-content: center; overflow: hidden; position: relative; width: dt('datepicker.dropdown.width'); border-start-end-radius: dt('datepicker.dropdown.border.radius'); border-end-end-radius: dt('datepicker.dropdown.border.radius'); background: dt('datepicker.dropdown.background'); border: 1px solid dt('datepicker.dropdown.border.color'); border-inline-start: 0 none; color: dt('datepicker.dropdown.color'); transition: background dt('datepicker.transition.duration'), color dt('datepicker.transition.duration'), border-color dt('datepicker.transition.duration'), outline-color dt('datepicker.transition.duration'); outline-color: transparent; } .p-datepicker-dropdown:not(:disabled):hover { background: dt('datepicker.dropdown.hover.background'); border-color: dt('datepicker.dropdown.hover.border.color'); color: dt('datepicker.dropdown.hover.color'); } .p-datepicker-dropdown:not(:disabled):active { background: dt('datepicker.dropdown.active.background'); border-color: dt('datepicker.dropdown.active.border.color'); color: dt('datepicker.dropdown.active.color'); } .p-datepicker-dropdown:focus-visible { box-shadow: dt('datepicker.dropdown.focus.ring.shadow'); outline: dt('datepicker.dropdown.focus.ring.width') dt('datepicker.dropdown.focus.ring.style') dt('datepicker.dropdown.focus.ring.color'); outline-offset: dt('datepicker.dropdown.focus.ring.offset'); } .p-datepicker:has(.p-datepicker-input-icon-container) { position: relative; } .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-input { padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size')); } .p-datepicker-input-icon-container { cursor: pointer; position: absolute; top: 50%; inset-inline-end: dt('form.field.padding.x'); margin-block-start: calc(-1 * (dt('icon.size') / 2)); color: dt('datepicker.input.icon.color'); line-height: 1; } .p-datepicker-fluid { display: flex; } .p-datepicker-fluid .p-datepicker-input { width: 1%; } .p-datepicker .p-datepicker-panel { min-width: 100%; } .p-datepicker-panel { width: auto; padding: dt('datepicker.panel.padding'); background: dt('datepicker.panel.background'); color: dt('datepicker.panel.color'); border: 1px solid dt('datepicker.panel.border.color'); border-radius: dt('datepicker.panel.border.radius'); box-shadow: dt('datepicker.panel.shadow'); } .p-datepicker-panel-inline { display: inline-block; overflow-x: auto; box-shadow: none; } .p-datepicker-header { display: flex; align-items: center; justify-content: space-between; padding: dt('datepicker.header.padding'); background: dt('datepicker.header.background'); color: dt('datepicker.header.color'); border-block-end: 1px solid dt('datepicker.header.border.color'); } .p-datepicker-next-button:dir(rtl) { order: -1; } .p-datepicker-prev-button:dir(rtl) { order: 1; } .p-datepicker-title { display: flex; align-items: center; justify-content: space-between; gap: dt('datepicker.title.gap'); font-weight: dt('datepicker.title.font.weight'); } .p-datepicker-select-year, .p-datepicker-select-month { border: none; background: transparent; margin: 0; cursor: pointer; font-weight: inherit; transition: background dt('datepicker.transition.duration'), color dt('datepicker.transition.duration'), border-color dt('datepicker.transition.duration'), outline-color dt('datepicker.transition.duration'), box-shadow dt('datepicker.transition.duration'); } .p-datepicker-select-month { padding: dt('datepicker.select.month.padding'); color: dt('datepicker.select.month.color'); border-radius: dt('datepicker.select.month.border.radius'); } .p-datepicker-select-year { padding: dt('datepicker.select.year.padding'); color: dt('datepicker.select.year.color'); border-radius: dt('datepicker.select.year.border.radius'); } .p-datepicker-select-month:enabled:hover { background: dt('datepicker.select.month.hover.background'); color: dt('datepicker.select.month.hover.color'); } .p-datepicker-select-year:enabled:hover { background: dt('datepicker.select.year.hover.background'); color: dt('datepicker.select.year.hover.color'); } .p-datepicker-select-month:focus-visible, .p-datepicker-select-year:focus-visible { box-shadow: dt('datepicker.date.focus.ring.shadow'); outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color'); outline-offset: dt('datepicker.date.focus.ring.offset'); } .p-datepicker-calendar-container { display: flex; } .p-datepicker-calendar-container .p-datepicker-calendar { flex: 1 1 auto; border-inline-start: 1px solid dt('datepicker.group.border.color'); padding-inline-end: dt('datepicker.group.gap'); padding-inline-start: dt('datepicker.group.gap'); } .p-datepicker-calendar-container .p-datepicker-calendar:first-child { padding-inline-start: 0; border-inline-start: 0 none; } .p-datepicker-calendar-container .p-datepicker-calendar:last-child { padding-inline-end: 0; } .p-datepicker-day-view { width: 100%; border-collapse: collapse; font-size: 1rem; margin: dt('datepicker.day.view.margin'); } .p-datepicker-weekday-cell { padding: dt('datepicker.week.day.padding'); } .p-datepicker-weekday { font-weight: dt('datepicker.week.day.font.weight'); color: dt('datepicker.week.day.color'); } .p-datepicker-day-cell { padding: dt('datepicker.date.padding'); } .p-datepicker-day { display: flex; justify-content: center; align-items: center; cursor: pointer; margin: 0 auto; overflow: hidden; position: relative; width: dt('datepicker.date.width'); height: dt('datepicker.date.height'); border-radius: dt('datepicker.date.border.radius'); transition: background dt('datepicker.transition.duration'), color dt('datepicker.transition.duration'), border-color dt('datepicker.transition.duration'), box-shadow dt('datepicker.transition.duration'), outline-color dt('datepicker.transition.duration'); border: 1px solid transparent; outline-color: transparent; color: dt('datepicker.date.color'); } .p-datepicker-day:not(.p-datepicker-day-selected):not(.p-disabled):hover { background: dt('datepicker.date.hover.background'); color: dt('datepicker.date.hover.color'); } .p-datepicker-day:focus-visible { box-shadow: dt('datepicker.date.focus.ring.shadow'); outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color'); outline-offset: dt('datepicker.date.focus.ring.offset'); } .p-datepicker-day-selected { background: dt('datepicker.date.selected.background'); color: dt('datepicker.date.selected.color'); } .p-datepicker-day-selected-range { background: dt('datepicker.date.range.selected.background'); color: dt('datepicker.date.range.selected.color'); } .p-datepicker-today > .p-datepicker-day { background: dt('datepicker.today.background'); color: dt('datepicker.today.color'); } .p-datepicker-today > .p-datepicker-day-selected { background: dt('datepicker.date.selected.background'); color: dt('datepicker.date.selected.color'); } .p-datepicker-today > .p-datepicker-day-selected-range { background: dt('datepicker.date.range.selected.background'); color: dt('datepicker.date.range.selected.color'); } .p-datepicker-weeknumber { text-align: center; } .p-datepicker-month-view { margin: dt('datepicker.month.view.margin'); } .p-datepicker-month { width: 33.3%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; position: relative; padding: dt('datepicker.month.padding'); transition: background dt('datepicker.transition.duration'), color dt('datepicker.transition.duration'), border-color dt('datepicker.transition.duration'), box-shadow dt('datepicker.transition.duration'), outline-color dt('datepicker.transition.duration'); border-radius: dt('datepicker.month.border.radius'); outline-color: transparent; color: dt('datepicker.date.color'); } .p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover { color: dt('datepicker.date.hover.color'); background: dt('datepicker.date.hover.background'); } .p-datepicker-month-selected { color: dt('datepicker.date.selected.color'); background: dt('datepicker.date.selected.background'); } .p-datepicker-month:not(.p-disabled):focus-visible { box-shadow: dt('datepicker.date.focus.ring.shadow'); outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color'); outline-offset: dt('datepicker.date.focus.ring.offset'); } .p-datepicker-year-view { margin: dt('datepicker.year.view.margin'); } .p-datepicker-year { width: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; position: relative; padding: dt('datepicker.year.padding'); transition: background dt('datepicker.transition.duration'), color dt('datepicker.transition.duration'), border-color dt('datepicker.transition.duration'), box-shadow dt('datepicker.transition.duration'), outline-color dt('datepicker.transition.duration'); border-radius: dt('datepicker.year.border.radius'); outline-color: transparent; color: dt('datepicker.date.color'); } .p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover { color: dt('datepicker.date.hover.color'); background: dt('datepicker.date.hover.background'); } .p-datepicker-year-selected { color: dt('datepicker.date.selected.color'); background: dt('datepicker.date.selected.background'); } .p-datepicker-year:not(.p-disabled):focus-visible { box-shadow: dt('datepicker.date.focus.ring.shadow'); outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color'); outline-offset: dt('datepicker.date.focus.ring.offset'); } .p-datepicker-buttonbar { display: flex; justify-content: space-between; align-items: center; padding: dt('datepicker.buttonbar.padding'); border-block-start: 1px solid dt('datepicker.buttonbar.border.color'); } .p-datepicker-buttonbar .p-button { width: auto; } .p-datepicker-time-picker { display: flex; justify-content: center; align-items: center; border-block-start: 1px solid dt('datepicker.time.picker.border.color'); padding: 0; gap: dt('datepicker.time.picker.gap'); } .p-datepicker-calendar-container + .p-datepicker-time-picker { padding: dt('datepicker.time.picker.padding'); } .p-datepicker-time-picker > div { display: flex; align-items: center; flex-direction: column; gap: dt('datepicker.time.picker.button.gap'); } .p-datepicker-time-picker span { font-size: 1rem; } .p-datepicker-timeonly .p-datepicker-time-picker { border-block-start: 0 none; } .p-datepicker-time-picker:dir(rtl) { flex-direction: row-reverse; } .p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown { width: dt('datepicker.dropdown.sm.width'); } .p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown .p-icon, .p-datepicker:has(.p-inputtext-sm) .p-datepicker-input-icon { font-size: dt('form.field.sm.font.size'); width: dt('form.field.sm.font.size'); height: dt('form.field.sm.font.size'); } .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown { width: dt('datepicker.dropdown.lg.width'); } .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown .p-icon, .p-datepicker:has(.p-inputtext-lg) .p-datepicker-input-icon { font-size: dt('form.field.lg.font.size'); width: dt('form.field.lg.font.size'); height: dt('form.field.lg.font.size'); } .p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-clear-icon, .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-clear-icon { inset-inline-end: calc(dt('datepicker.dropdown.width') + dt('form.field.padding.x')); } .p-datepicker-clear-icon { position: absolute; top: 50%; margin-top: -0.5rem; cursor: pointer; color: dt('form.field.icon.color'); inset-inline-end: dt('form.field.padding.x'); } `;var int=["date"],nnt=["header"],ont=["footer"],rnt=["disabledDate"],snt=["decade"],ant=["previousicon"],lnt=["nexticon"],cnt=["triggericon"],dnt=["clearicon"],unt=["decrementicon"],pnt=["incrementicon"],hnt=["inputicon"],mnt=["inputfield"],fnt=["contentWrapper"],gnt=[[["p-header"]],[["p-footer"]]],_nt=["p-header","p-footer"],ynt=t=>({clickCallBack:t}),vnt=(t,n)=>({showTransitionParams:t,hideTransitionParams:n}),bnt=t=>({value:"visible",params:t}),xke=t=>({visibility:t}),$ae=t=>({$implicit:t}),Cnt=t=>({date:t}),xnt=(t,n)=>({month:t,index:n}),wnt=t=>({year:t});function Snt(t,n){if(t&1){let e=tt();si(),k(0,"svg",10),ie("click",function(){se(e);let o=P(3);return ae(o.clear())}),D()}if(t&2){let e=P(3);Oe(e.cx("clearIcon"))}}function Tnt(t,n){}function Int(t,n){t&1&&ee(0,Tnt,0,0,"ng-template")}function Ent(t,n){if(t&1){let e=tt();k(0,"span",11),ie("click",function(){se(e);let o=P(3);return ae(o.clear())}),ee(1,Int,1,0,null,12),D()}if(t&2){let e=P(3);Oe(e.cx("clearIcon")),T(),E("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function Dnt(t,n){if(t&1&&(Di(0),ee(1,Snt,1,2,"svg",8)(2,Ent,2,3,"span",9),Ai()),t&2){let e=P(2);T(),E("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),T(),E("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function Ant(t,n){if(t&1&&ce(0,"span",15),t&2){let e=P(3);E("ngClass",e.icon)}}function knt(t,n){t&1&&(si(),ce(0,"svg",17))}function Mnt(t,n){}function Ont(t,n){t&1&&ee(0,Mnt,0,0,"ng-template")}function Rnt(t,n){if(t&1&&(Di(0),ee(1,knt,1,0,"svg",16)(2,Ont,1,0,null,12),Ai()),t&2){let e=P(3);T(),E("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),T(),E("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function Fnt(t,n){if(t&1){let e=tt();k(0,"button",13),ie("click",function(o){se(e),P();let r=ti(1),s=P();return ae(s.onButtonClick(o,r))}),ee(1,Ant,1,1,"span",14)(2,Rnt,3,2,"ng-container",6),D()}if(t&2){let e=P(2);Oe(e.cx("dropdown")),E("disabled",e.$disabled()),Ge("aria-label",e.iconButtonAriaLabel)("aria-expanded",e.overlayVisible??!1)("aria-controls",e.overlayVisible?e.panelId:null),T(),E("ngIf",e.icon),T(),E("ngIf",!e.icon)}}function Pnt(t,n){if(t&1){let e=tt();si(),k(0,"svg",20),ie("click",function(o){se(e);let r=P(3);return ae(r.onButtonClick(o))}),D()}if(t&2){let e=P(3);Oe(e.cx("inputIcon"))}}function Lnt(t,n){t&1&&ui(0)}function Nnt(t,n){if(t&1&&(Di(0),k(1,"span"),ee(2,Pnt,1,2,"svg",18)(3,Lnt,1,0,"ng-container",19),D(),Ai()),t&2){let e=P(2);T(),Oe(e.cx("inputIconContainer")),T(),E("ngIf",!e.inputIconTemplate&&!e._inputIconTemplate),T(),E("ngTemplateOutlet",e.inputIconTemplate||e._inputIconTemplate)("ngTemplateOutletContext",ki(5,ynt,e.onButtonClick.bind(e)))}}function Bnt(t,n){if(t&1){let e=tt();k(0,"input",5,0),ie("focus",function(o){se(e);let r=P();return ae(r.onInputFocus(o))})("keydown",function(o){se(e);let r=P();return ae(r.onInputKeydown(o))})("click",function(){se(e);let o=P();return ae(o.onInputClick())})("blur",function(o){se(e);let r=P();return ae(r.onInputBlur(o))})("input",function(o){se(e);let r=P();return ae(r.onUserInput(o))}),D(),ee(2,Dnt,3,2,"ng-container",6)(3,Fnt,3,8,"button",7)(4,Nnt,4,7,"ng-container",6)}if(t&2){let e=P();Oe(e.cn(e.cx("pcInputText"),e.inputStyleClass)),E("pSize",e.size())("value",e.inputFieldValue)("ngStyle",e.inputStyle)("pAutoFocus",e.autofocus)("variant",e.$variant())("fluid",e.hasFluid)("invalid",e.invalid()),Ge("size",e.inputSize())("id",e.inputId)("name",e.name())("aria-required",e.required())("aria-expanded",e.overlayVisible??!1)("aria-controls",e.overlayVisible?e.panelId:null)("aria-labelledby",e.ariaLabelledBy)("aria-label",e.ariaLabel)("required",e.required()?"":void 0)("readonly",e.readonlyInput?"":void 0)("disabled",e.$disabled()?"":void 0)("placeholder",e.placeholder)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null),T(2),E("ngIf",e.showClear&&!e.$disabled()&&e.value!=null),T(),E("ngIf",e.showIcon&&e.iconDisplay==="button"),T(),E("ngIf",e.iconDisplay==="input"&&e.showIcon)}}function Vnt(t,n){t&1&&ui(0)}function znt(t,n){t&1&&(si(),ce(0,"svg",29))}function Unt(t,n){}function Hnt(t,n){t&1&&ee(0,Unt,0,0,"ng-template")}function jnt(t,n){if(t&1&&(k(0,"span"),ee(1,Hnt,1,0,null,12),D()),t&2){let e=P(5);T(),E("ngTemplateOutlet",e.previousIconTemplate||e._previousIconTemplate)}}function Gnt(t,n){if(t&1&&ee(0,znt,1,0,"svg",28)(1,jnt,2,1,"span",6),t&2){let e=P(4);E("ngIf",!e.previousIconTemplate&&!e._previousIconTemplate),T(),E("ngIf",e.previousIconTemplate||e._previousIconTemplate)}}function $nt(t,n){if(t&1){let e=tt();k(0,"button",30),ie("click",function(o){se(e);let r=P(4);return ae(r.switchToMonthView(o))})("keydown",function(o){se(e);let r=P(4);return ae(r.onContainerButtonKeydown(o))}),Q(1),D()}if(t&2){let e=P().$implicit,i=P(3);Oe(i.cx("selectMonth")),Ge("disabled",i.switchViewButtonDisabled()?"":void 0)("aria-label",i.getTranslation("chooseMonth")),T(),Qi(" ",i.getMonthName(e.month)," ")}}function qnt(t,n){if(t&1){let e=tt();k(0,"button",30),ie("click",function(o){se(e);let r=P(4);return ae(r.switchToYearView(o))})("keydown",function(o){se(e);let r=P(4);return ae(r.onContainerButtonKeydown(o))}),Q(1),D()}if(t&2){let e=P().$implicit,i=P(3);Oe(i.cx("selectYear")),Ge("disabled",i.switchViewButtonDisabled()?"":void 0)("aria-label",i.getTranslation("chooseYear")),T(),Qi(" ",i.getYear(e)," ")}}function Knt(t,n){if(t&1&&(Di(0),Q(1),Ai()),t&2){let e=P(5);T(),_d("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1])}}function Wnt(t,n){t&1&&ui(0)}function Ynt(t,n){if(t&1&&(k(0,"span"),ee(1,Knt,2,2,"ng-container",6)(2,Wnt,1,0,"ng-container",19),D()),t&2){let e=P(4);Oe(e.cx("decade")),T(),E("ngIf",!e.decadeTemplate&&!e._decadeTemplate),T(),E("ngTemplateOutlet",e.decadeTemplate||e._decadeTemplate)("ngTemplateOutletContext",ki(5,$ae,e.yearPickerValues))}}function Qnt(t,n){t&1&&(si(),ce(0,"svg",32))}function Znt(t,n){}function Xnt(t,n){t&1&&ee(0,Znt,0,0,"ng-template")}function Jnt(t,n){if(t&1&&(Di(0),ee(1,Xnt,1,0,null,12),Ai()),t&2){let e=P(5);T(),E("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function eot(t,n){if(t&1&&ee(0,Qnt,1,0,"svg",31)(1,Jnt,2,1,"ng-container",6),t&2){let e=P(4);E("ngIf",!e.nextIconTemplate&&!e._nextIconTemplate),T(),E("ngIf",e.nextIconTemplate||e._nextIconTemplate)}}function tot(t,n){if(t&1&&(k(0,"th")(1,"span"),Q(2),D()()),t&2){let e=P(5);Oe(e.cx("weekHeader")),T(2),dt(e.getTranslation("weekHeader"))}}function iot(t,n){if(t&1&&(k(0,"th",36)(1,"span"),Q(2),D()()),t&2){let e=n.$implicit,i=P(5);Oe(i.cx("weekDayCell")),T(),Oe(i.cx("weekDay")),T(),dt(e)}}function not(t,n){if(t&1&&(k(0,"td")(1,"span"),Q(2),D()()),t&2){let e=P().index,i=P(2).$implicit,o=P(3);Oe(o.cx("weekNumber")),T(),Oe(o.cx("weekLabelContainer")),T(),Qi(" ",i.weekNumbers[e]," ")}}function oot(t,n){if(t&1&&(Di(0),Q(1),Ai()),t&2){let e=P(2).$implicit;T(),dt(e.day)}}function rot(t,n){t&1&&ui(0)}function sot(t,n){if(t&1&&(Di(0),ee(1,rot,1,0,"ng-container",19),Ai()),t&2){let e=P(2).$implicit,i=P(6);T(),E("ngTemplateOutlet",i.dateTemplate||i._dateTemplate)("ngTemplateOutletContext",ki(2,$ae,e))}}function aot(t,n){t&1&&ui(0)}function lot(t,n){if(t&1&&(Di(0),ee(1,aot,1,0,"ng-container",19),Ai()),t&2){let e=P(2).$implicit,i=P(6);T(),E("ngTemplateOutlet",i.disabledDateTemplate||i._disabledDateTemplate)("ngTemplateOutletContext",ki(2,$ae,e))}}function cot(t,n){if(t&1&&(k(0,"div",39),Q(1),D()),t&2){let e=P(2).$implicit;T(),Qi(" ",e.day," ")}}function dot(t,n){if(t&1){let e=tt();Di(0),k(1,"span",37),ie("click",function(o){se(e);let r=P().$implicit,s=P(6);return ae(s.onDateSelect(o,r))})("keydown",function(o){se(e);let r=P().$implicit,s=P(3).index,d=P(3);return ae(d.onDateCellKeydown(o,r,s))}),ee(2,oot,2,1,"ng-container",6)(3,sot,2,4,"ng-container",6)(4,lot,2,4,"ng-container",6),D(),ee(5,cot,2,1,"div",38),Ai()}if(t&2){let e=P().$implicit,i=P(6);T(),E("ngClass",i.dayClass(e)),Ge("data-date",i.formatDateKey(i.formatDateMetaToDate(e))),T(),E("ngIf",!i.dateTemplate&&!i._dateTemplate&&(e.selectable||!i.disabledDateTemplate&&!i._disabledDateTemplate)),T(),E("ngIf",e.selectable||!i.disabledDateTemplate&&!i._disabledDateTemplate),T(),E("ngIf",!e.selectable),T(),E("ngIf",i.isSelected(e))}}function uot(t,n){if(t&1&&(k(0,"td"),ee(1,dot,6,6,"ng-container",6),D()),t&2){let e=n.$implicit,i=P(6);Oe(i.cx("dayCell",ki(4,Cnt,e))),Ge("aria-label",e.day),T(),E("ngIf",e.otherMonth?i.showOtherMonths:!0)}}function pot(t,n){if(t&1&&(k(0,"tr"),ee(1,not,3,5,"td",22)(2,uot,2,6,"td",23),D()),t&2){let e=n.$implicit,i=P(5);T(),E("ngIf",i.showWeek),T(),E("ngForOf",e)}}function hot(t,n){if(t&1&&(k(0,"table",33)(1,"thead")(2,"tr"),ee(3,tot,3,3,"th",22)(4,iot,3,5,"th",34),D()(),k(5,"tbody"),ee(6,pot,3,2,"tr",35),D()()),t&2){let e=P().$implicit,i=P(3);Oe(i.cx("dayView")),T(3),E("ngIf",i.showWeek),T(),E("ngForOf",i.weekDays),T(2),E("ngForOf",e.dates)}}function mot(t,n){if(t&1){let e=tt();k(0,"div")(1,"div")(2,"p-button",24),ie("keydown",function(o){se(e);let r=P(3);return ae(r.onContainerButtonKeydown(o))})("onClick",function(o){se(e);let r=P(3);return ae(r.onPrevButtonClick(o))}),ee(3,Gnt,2,2,"ng-template",null,2,Pt),D(),k(5,"div"),ee(6,$nt,2,5,"button",25)(7,qnt,2,5,"button",25)(8,Ynt,3,7,"span",22),D(),k(9,"p-button",26),ie("keydown",function(o){se(e);let r=P(3);return ae(r.onContainerButtonKeydown(o))})("onClick",function(o){se(e);let r=P(3);return ae(r.onNextButtonClick(o))}),ee(10,eot,2,2,"ng-template",null,2,Pt),D()(),ee(12,hot,7,5,"table",27),D()}if(t&2){let e=n.index,i=P(3);Oe(i.cx("calendar")),T(),Oe(i.cx("header")),T(),E("styleClass",i.cx("pcPrevButton"))("ngStyle",ki(16,xke,e===0?"visible":"hidden")),Cc("ariaLabel",i.prevIconAriaLabel),T(3),Oe(i.cx("title")),T(),E("ngIf",i.currentView==="date"),T(),E("ngIf",i.currentView!=="year"),T(),E("ngIf",i.currentView==="year"),T(),E("styleClass",i.cx("pcNextButton"))("ngStyle",ki(18,xke,e===i.months.length-1?"visible":"hidden")),Cc("ariaLabel",i.nextIconAriaLabel),T(3),E("ngIf",i.currentView==="date")}}function fot(t,n){if(t&1&&(k(0,"div",39),Q(1),D()),t&2){let e=P().$implicit;T(),Qi(" ",e," ")}}function got(t,n){if(t&1){let e=tt();k(0,"span",41),ie("click",function(o){let r=se(e).index,s=P(4);return ae(s.onMonthSelect(o,r))})("keydown",function(o){let r=se(e).index,s=P(4);return ae(s.onMonthCellKeydown(o,r))}),Q(1),ee(2,fot,2,1,"div",38),D()}if(t&2){let e=n.$implicit,i=n.index,o=P(4);Oe(o.cx("month",Eo(4,xnt,e,i))),T(),Qi(" ",e," "),T(),E("ngIf",o.isMonthSelected(i))}}function _ot(t,n){if(t&1&&(k(0,"div"),ee(1,got,3,7,"span",40),D()),t&2){let e=P(3);Oe(e.cx("monthView")),T(),E("ngForOf",e.monthPickerValues())}}function yot(t,n){if(t&1&&(k(0,"div",39),Q(1),D()),t&2){let e=P().$implicit;T(),Qi(" ",e," ")}}function vot(t,n){if(t&1){let e=tt();k(0,"span",41),ie("click",function(o){let r=se(e).$implicit,s=P(4);return ae(s.onYearSelect(o,r))})("keydown",function(o){let r=se(e).$implicit,s=P(4);return ae(s.onYearCellKeydown(o,r))}),Q(1),ee(2,yot,2,1,"div",38),D()}if(t&2){let e=n.$implicit,i=P(4);Oe(i.cx("year",ki(4,wnt,e))),T(),Qi(" ",e," "),T(),E("ngIf",i.isYearSelected(e))}}function bot(t,n){if(t&1&&(k(0,"div"),ee(1,vot,3,6,"span",40),D()),t&2){let e=P(3);Oe(e.cx("yearView")),T(),E("ngForOf",e.yearPickerValues())}}function Cot(t,n){if(t&1&&(Di(0),k(1,"div"),ee(2,mot,13,20,"div",23),D(),ee(3,_ot,2,3,"div",22)(4,bot,2,3,"div",22),Ai()),t&2){let e=P(2);T(),Oe(e.cx("calendarContainer")),T(),E("ngForOf",e.months),T(),E("ngIf",e.currentView==="month"),T(),E("ngIf",e.currentView==="year")}}function xot(t,n){t&1&&(si(),ce(0,"svg",45))}function wot(t,n){}function Sot(t,n){t&1&&ee(0,wot,0,0,"ng-template")}function Tot(t,n){if(t&1&&ee(0,xot,1,0,"svg",44)(1,Sot,1,0,null,12),t&2){let e=P(3);E("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),T(),E("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function Iot(t,n){t&1&&(Di(0),Q(1,"0"),Ai())}function Eot(t,n){t&1&&(si(),ce(0,"svg",47))}function Dot(t,n){}function Aot(t,n){t&1&&ee(0,Dot,0,0,"ng-template")}function kot(t,n){if(t&1&&ee(0,Eot,1,0,"svg",46)(1,Aot,1,0,null,12),t&2){let e=P(3);E("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),T(),E("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function Mot(t,n){t&1&&(si(),ce(0,"svg",45))}function Oot(t,n){}function Rot(t,n){t&1&&ee(0,Oot,0,0,"ng-template")}function Fot(t,n){if(t&1&&ee(0,Mot,1,0,"svg",44)(1,Rot,1,0,null,12),t&2){let e=P(3);E("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),T(),E("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function Pot(t,n){t&1&&(Di(0),Q(1,"0"),Ai())}function Lot(t,n){t&1&&(si(),ce(0,"svg",47))}function Not(t,n){}function Bot(t,n){t&1&&ee(0,Not,0,0,"ng-template")}function Vot(t,n){if(t&1&&ee(0,Lot,1,0,"svg",46)(1,Bot,1,0,null,12),t&2){let e=P(3);E("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),T(),E("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function zot(t,n){if(t&1&&(k(0,"div")(1,"span"),Q(2),D()()),t&2){let e=P(3);Oe(e.cx("separator")),T(2),dt(e.timeSeparator)}}function Uot(t,n){t&1&&(si(),ce(0,"svg",45))}function Hot(t,n){}function jot(t,n){t&1&&ee(0,Hot,0,0,"ng-template")}function Got(t,n){if(t&1&&ee(0,Uot,1,0,"svg",44)(1,jot,1,0,null,12),t&2){let e=P(4);E("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),T(),E("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function $ot(t,n){t&1&&(Di(0),Q(1,"0"),Ai())}function qot(t,n){t&1&&(si(),ce(0,"svg",47))}function Kot(t,n){}function Wot(t,n){t&1&&ee(0,Kot,0,0,"ng-template")}function Yot(t,n){if(t&1&&ee(0,qot,1,0,"svg",46)(1,Wot,1,0,null,12),t&2){let e=P(4);E("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),T(),E("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function Qot(t,n){if(t&1){let e=tt();k(0,"div")(1,"p-button",42),ie("keydown",function(o){se(e);let r=P(3);return ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){se(e);let r=P(3);return ae(r.incrementSecond(o))})("keydown.space",function(o){se(e);let r=P(3);return ae(r.incrementSecond(o))})("mousedown",function(o){se(e);let r=P(3);return ae(r.onTimePickerElementMouseDown(o,2,1))})("mouseup",function(o){se(e);let r=P(3);return ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){se(e);let r=P(3);return ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){se(e);let r=P(3);return ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){se(e);let o=P(3);return ae(o.onTimePickerElementMouseLeave())}),ee(2,Got,2,2,"ng-template",null,2,Pt),D(),k(4,"span"),ee(5,$ot,2,0,"ng-container",6),Q(6),D(),k(7,"p-button",42),ie("keydown",function(o){se(e);let r=P(3);return ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){se(e);let r=P(3);return ae(r.decrementSecond(o))})("keydown.space",function(o){se(e);let r=P(3);return ae(r.decrementSecond(o))})("mousedown",function(o){se(e);let r=P(3);return ae(r.onTimePickerElementMouseDown(o,2,-1))})("mouseup",function(o){se(e);let r=P(3);return ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){se(e);let r=P(3);return ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){se(e);let r=P(3);return ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){se(e);let o=P(3);return ae(o.onTimePickerElementMouseLeave())}),ee(8,Yot,2,2,"ng-template",null,2,Pt),D()()}if(t&2){let e=P(3);Oe(e.cx("secondPicker")),T(),E("styleClass",e.cx("pcIncrementButton")),Ge("aria-label",e.getTranslation("nextSecond")),T(4),E("ngIf",e.currentSecond<10),T(),dt(e.currentSecond),T(),E("styleClass",e.cx("pcDecrementButton")),Ge("aria-label",e.getTranslation("prevSecond"))}}function Zot(t,n){if(t&1&&(k(0,"div")(1,"span"),Q(2),D()()),t&2){let e=P(3);Oe(e.cx("separator")),T(2),dt(e.timeSeparator)}}function Xot(t,n){t&1&&(si(),ce(0,"svg",45))}function Jot(t,n){}function ert(t,n){t&1&&ee(0,Jot,0,0,"ng-template")}function trt(t,n){if(t&1&&ee(0,Xot,1,0,"svg",44)(1,ert,1,0,null,12),t&2){let e=P(4);E("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),T(),E("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function irt(t,n){t&1&&(si(),ce(0,"svg",47))}function nrt(t,n){}function ort(t,n){t&1&&ee(0,nrt,0,0,"ng-template")}function rrt(t,n){if(t&1&&ee(0,irt,1,0,"svg",46)(1,ort,1,0,null,12),t&2){let e=P(4);E("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),T(),E("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function srt(t,n){if(t&1){let e=tt();k(0,"div")(1,"p-button",48),ie("keydown",function(o){se(e);let r=P(3);return ae(r.onContainerButtonKeydown(o))})("onClick",function(o){se(e);let r=P(3);return ae(r.toggleAMPM(o))})("keydown.enter",function(o){se(e);let r=P(3);return ae(r.toggleAMPM(o))}),ee(2,trt,2,2,"ng-template",null,2,Pt),D(),k(4,"span"),Q(5),D(),k(6,"p-button",49),ie("keydown",function(o){se(e);let r=P(3);return ae(r.onContainerButtonKeydown(o))})("click",function(o){se(e);let r=P(3);return ae(r.toggleAMPM(o))})("keydown.enter",function(o){se(e);let r=P(3);return ae(r.toggleAMPM(o))}),ee(7,rrt,2,2,"ng-template",null,2,Pt),D()()}if(t&2){let e=P(3);Oe(e.cx("ampmPicker")),T(),E("styleClass",e.cx("pcIncrementButton")),Ge("aria-label",e.getTranslation("am")),T(4),dt(e.pm?"PM":"AM"),T(),E("styleClass",e.cx("pcDecrementButton")),Ge("aria-label",e.getTranslation("pm"))}}function art(t,n){if(t&1){let e=tt();k(0,"div")(1,"div")(2,"p-button",42),ie("keydown",function(o){se(e);let r=P(2);return ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){se(e);let r=P(2);return ae(r.incrementHour(o))})("keydown.space",function(o){se(e);let r=P(2);return ae(r.incrementHour(o))})("mousedown",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseDown(o,0,1))})("mouseup",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){se(e);let o=P(2);return ae(o.onTimePickerElementMouseLeave())}),ee(3,Tot,2,2,"ng-template",null,2,Pt),D(),k(5,"span"),ee(6,Iot,2,0,"ng-container",6),Q(7),D(),k(8,"p-button",42),ie("keydown",function(o){se(e);let r=P(2);return ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){se(e);let r=P(2);return ae(r.decrementHour(o))})("keydown.space",function(o){se(e);let r=P(2);return ae(r.decrementHour(o))})("mousedown",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseDown(o,0,-1))})("mouseup",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){se(e);let o=P(2);return ae(o.onTimePickerElementMouseLeave())}),ee(9,kot,2,2,"ng-template",null,2,Pt),D()(),k(11,"div",43)(12,"span"),Q(13),D()(),k(14,"div")(15,"p-button",42),ie("keydown",function(o){se(e);let r=P(2);return ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){se(e);let r=P(2);return ae(r.incrementMinute(o))})("keydown.space",function(o){se(e);let r=P(2);return ae(r.incrementMinute(o))})("mousedown",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseDown(o,1,1))})("mouseup",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){se(e);let o=P(2);return ae(o.onTimePickerElementMouseLeave())}),ee(16,Fot,2,2,"ng-template",null,2,Pt),D(),k(18,"span"),ee(19,Pot,2,0,"ng-container",6),Q(20),D(),k(21,"p-button",42),ie("keydown",function(o){se(e);let r=P(2);return ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){se(e);let r=P(2);return ae(r.decrementMinute(o))})("keydown.space",function(o){se(e);let r=P(2);return ae(r.decrementMinute(o))})("mousedown",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseDown(o,1,-1))})("mouseup",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){se(e);let r=P(2);return ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){se(e);let o=P(2);return ae(o.onTimePickerElementMouseLeave())}),ee(22,Vot,2,2,"ng-template",null,2,Pt),D()(),ee(24,zot,3,3,"div",22)(25,Qot,10,8,"div",22)(26,Zot,3,3,"div",22)(27,srt,9,7,"div",22),D()}if(t&2){let e=P(2);Oe(e.cx("timePicker")),T(),Oe(e.cx("hourPicker")),T(),E("styleClass",e.cx("pcIncrementButton")),Ge("aria-label",e.getTranslation("nextHour")),T(4),E("ngIf",e.currentHour<10),T(),dt(e.currentHour),T(),E("styleClass",e.cx("pcDecrementButton")),Ge("aria-label",e.getTranslation("prevHour")),T(5),dt(e.timeSeparator),T(),Oe(e.cx("minutePicker")),T(),E("styleClass",e.cx("pcIncrementButton")),Ge("aria-label",e.getTranslation("nextMinute")),T(4),E("ngIf",e.currentMinute<10),T(),dt(e.currentMinute),T(),E("styleClass",e.cx("pcDecrementButton")),Ge("aria-label",e.getTranslation("prevMinute")),T(3),E("ngIf",e.showSeconds),T(),E("ngIf",e.showSeconds),T(),E("ngIf",e.hourFormat=="12"),T(),E("ngIf",e.hourFormat=="12")}}function lrt(t,n){if(t&1){let e=tt();k(0,"div")(1,"p-button",50),ie("keydown",function(o){se(e);let r=P(2);return ae(r.onContainerButtonKeydown(o))})("onClick",function(o){se(e);let r=P(2);return ae(r.onTodayButtonClick(o))}),D(),k(2,"p-button",50),ie("keydown",function(o){se(e);let r=P(2);return ae(r.onContainerButtonKeydown(o))})("onClick",function(o){se(e);let r=P(2);return ae(r.onClearButtonClick(o))}),D()()}if(t&2){let e=P(2);Oe(e.cx("buttonbar")),T(),E("styleClass",e.cx("pcTodayButton"))("label",e.getTranslation("today"))("ngClass",e.todayButtonStyleClass),T(),E("styleClass",e.cx("pcClearButton"))("label",e.getTranslation("clear"))("ngClass",e.clearButtonStyleClass)}}function crt(t,n){t&1&&ui(0)}function drt(t,n){if(t&1){let e=tt();k(0,"div",21,1),ie("@overlayAnimation.start",function(o){se(e);let r=P();return ae(r.onOverlayAnimationStart(o))})("@overlayAnimation.done",function(o){se(e);let r=P();return ae(r.onOverlayAnimationDone(o))})("click",function(o){se(e);let r=P();return ae(r.onOverlayClick(o))}),pn(2),ee(3,Vnt,1,0,"ng-container",12)(4,Cot,5,5,"ng-container",6)(5,art,28,23,"div",22)(6,lrt,3,8,"div",22),pn(7,1),ee(8,crt,1,0,"ng-container",12),D()}if(t&2){let e=P();Oe(e.cn(e.cx("panel"),e.panelStyleClass)),E("ngStyle",e.panelStyle)("@overlayAnimation",ki(17,bnt,Eo(14,vnt,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.inline===!0),Ge("id",e.panelId)("aria-label",e.getTranslation("chooseDate"))("role",e.inline?null:"dialog")("aria-modal",e.inline?null:"true"),T(3),E("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),T(),E("ngIf",!e.timeOnly),T(),E("ngIf",(e.showTime||e.timeOnly)&&e.currentView==="date"),T(),E("ngIf",e.showButtonBar),T(2),E("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}var urt=` ${Cke} /* For PrimeNG */ .p-datepicker.ng-invalid.ng-dirty .p-inputtext { border-color: dt('inputtext.invalid.border.color'); } `,prt={root:()=>({position:"relative"})},hrt={root:({instance:t})=>["p-datepicker p-component p-inputwrapper",{"p-invalid":t.invalid(),"p-datepicker-fluid":t.hasFluid,"p-inputwrapper-filled":t.$filled(),"p-variant-filled":t.$variant()==="filled","p-inputwrapper-focus":t.focus||t.overlayVisible,"p-focus":t.focus||t.overlayVisible}],pcInputText:"p-datepicker-input",dropdown:"p-datepicker-dropdown",inputIconContainer:"p-datepicker-input-icon-container",inputIcon:"p-datepicker-input-icon",panel:({instance:t})=>["p-datepicker-panel p-component",{"p-datepicker-panel p-component":!0,"p-datepicker-panel-inline":t.inline,"p-disabled":t.$disabled(),"p-datepicker-timeonly":t.timeOnly}],calendarContainer:"p-datepicker-calendar-container",calendar:"p-datepicker-calendar",header:"p-datepicker-header",pcPrevButton:"p-datepicker-prev-button",title:"p-datepicker-title",selectMonth:"p-datepicker-select-month",selectYear:"p-datepicker-select-year",decade:"p-datepicker-decade",pcNextButton:"p-datepicker-next-button",dayView:"p-datepicker-day-view",weekHeader:"p-datepicker-weekheader p-disabled",weekNumber:"p-datepicker-weeknumber",weekLabelContainer:"p-datepicker-weeklabel-container p-disabled",weekDayCell:"p-datepicker-weekday-cell",weekDay:"p-datepicker-weekday",dayCell:({date:t})=>["p-datepicker-day-cell",{"p-datepicker-other-month":t.otherMonth,"p-datepicker-today":t.today}],day:({instance:t,date:n})=>{let e="";if(t.isRangeSelection()&&t.isSelected(n)&&n.selectable){let i=t.value[0],o=t.value[1],r=i&&n.year===i.getFullYear()&&n.month===i.getMonth()&&n.day===i.getDate(),s=o&&n.year===o.getFullYear()&&n.month===o.getMonth()&&n.day===o.getDate();e=r||s?"p-datepicker-day-selected":"p-datepicker-day-selected-range"}return{"p-datepicker-day":!0,"p-datepicker-day-selected":!t.isRangeSelection()&&t.isSelected(n)&&n.selectable,"p-disabled":t.$disabled()||!n.selectable,[e]:!0}},monthView:"p-datepicker-month-view",month:({instance:t,index:n})=>["p-datepicker-month",{"p-datepicker-month-selected":t.isMonthSelected(n),"p-disabled":t.isMonthDisabled(n)}],yearView:"p-datepicker-year-view",year:({instance:t,year:n})=>["p-datepicker-year",{"p-datepicker-year-selected":t.isYearSelected(n),"p-disabled":t.isYearDisabled(n)}],timePicker:"p-datepicker-time-picker",hourPicker:"p-datepicker-hour-picker",pcIncrementButton:"p-datepicker-increment-button",pcDecrementButton:"p-datepicker-decrement-button",separator:"p-datepicker-separator",minutePicker:"p-datepicker-minute-picker",secondPicker:"p-datepicker-second-picker",ampmPicker:"p-datepicker-ampm-picker",buttonbar:"p-datepicker-buttonbar",pcTodayButton:"p-datepicker-today-button",pcClearButton:"p-datepicker-clear-button",clearIcon:"p-datepicker-clear-icon"},wke=(()=>{class t extends io{name="datepicker";theme=urt;classes=hrt;inlineStyles=prt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var mrt={provide:Ea,useExisting:Ko(()=>KK),multi:!0},KK=(()=>{class t extends XI{zone;overlayService;iconDisplay="button";styleClass;inputStyle;inputId;inputStyleClass;placeholder;ariaLabelledBy;ariaLabel;iconAriaLabel;get dateFormat(){return this._dateFormat}set dateFormat(e){this._dateFormat=e,this.initialized&&this.updateInputfield()}multipleSeparator=",";rangeSeparator="-";inline=!1;showOtherMonths=!0;selectOtherMonths;showIcon;icon;readonlyInput;shortYearCutoff="+10";get hourFormat(){return this._hourFormat}set hourFormat(e){this._hourFormat=e,this.initialized&&this.updateInputfield()}timeOnly;stepHour=1;stepMinute=1;stepSecond=1;showSeconds=!1;showOnFocus=!0;showWeek=!1;startWeekFromFirstDayOfYear=!1;showClear=!1;dataType="date";selectionMode="single";maxDateCount;showButtonBar;todayButtonStyleClass;clearButtonStyleClass;autofocus;autoZIndex=!0;baseZIndex=0;panelStyleClass;panelStyle;keepInvalid=!1;hideOnDateTimeSelect=!0;touchUI;timeSeparator=":";focusTrap=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";tabindex;get minDate(){return this._minDate}set minDate(e){this._minDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get showTime(){return this._showTime}set showTime(e){this._showTime=e,this.currentHour===void 0&&this.initTime(this.value||new Date),this.updateInputfield()}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){let i=e||new Date;this.currentMonth=i.getMonth(),this.currentYear=i.getFullYear(),this.initTime(i),this.createMonths(this.currentMonth,this.currentYear)}}appendTo=mo(void 0);onFocus=new ve;onBlur=new ve;onClose=new ve;onSelect=new ve;onClear=new ve;onInput=new ve;onTodayClick=new ve;onClearClick=new ve;onMonthChange=new ve;onYearChange=new ve;onClickOutside=new ve;onShow=new ve;inputfieldViewChild;set content(e){this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):!this.focus&&!this.inline&&this.initFocusableCell())}_componentStyle=re(wke);contentViewChild;value;dates;months;weekDays;currentMonth;currentYear;currentHour;currentMinute;currentSecond;p;pm;mask;maskClickListener;overlay;responsiveStyleElement;overlayVisible;$appendTo=bo(()=>this.appendTo()||this.config.overlayAppendTo());calendarElement;timePickerTimer;documentClickListener;animationEndListener;ticksTo1970;yearOptions;focus;isKeydown;_minDate;_maxDate;_dateFormat;_hourFormat="24";_showTime;_yearRange;preventDocumentListener;dayClass(e){return this._componentStyle.classes.day({instance:this,date:e})}dateTemplate;headerTemplate;footerTemplate;disabledDateTemplate;decadeTemplate;previousIconTemplate;nextIconTemplate;triggerIconTemplate;clearIconTemplate;decrementIconTemplate;incrementIconTemplate;inputIconTemplate;_dateTemplate;_headerTemplate;_footerTemplate;_disabledDateTemplate;_decadeTemplate;_previousIconTemplate;_nextIconTemplate;_triggerIconTemplate;_clearIconTemplate;_decrementIconTemplate;_incrementIconTemplate;_inputIconTemplate;_disabledDates;_disabledDays;selectElement;todayElement;focusElement;scrollHandler;documentResizeListener;navigationState=null;isMonthNavigate;initialized;translationSubscription;_locale;_responsiveOptions;currentView;attributeSelector;panelId;_numberOfMonths=1;_firstDayOfWeek;_view="date";preventFocus;_defaultDate;_focusKey=null;window;get locale(){return this._locale}get iconButtonAriaLabel(){return this.iconAriaLabel?this.iconAriaLabel:this.getTranslation("chooseDate")}get prevIconAriaLabel(){return this.currentView==="year"?this.getTranslation("prevDecade"):this.currentView==="month"?this.getTranslation("prevYear"):this.getTranslation("prevMonth")}get nextIconAriaLabel(){return this.currentView==="year"?this.getTranslation("nextDecade"):this.currentView==="month"?this.getTranslation("nextYear"):this.getTranslation("nextMonth")}constructor(e,i){super(),this.zone=e,this.overlayService=i,this.window=this.document.defaultView}ngOnInit(){super.ngOnInit(),this.attributeSelector=Vr("pn_id_"),this.panelId=this.attributeSelector+"_panel";let e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.yearOptions=[],this.currentView=this.view,this.view==="date"&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=(1969*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays(),this.cd.markForCheck()}),this.initialized=!0}ngAfterViewInit(){super.ngAfterViewInit(),this.inline&&(this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""),!this.$disabled()&&!this.inline&&(this.initFocusableCell(),this.numberOfMonths===1&&this.contentViewChild&&this.contentViewChild.nativeElement&&(this.contentViewChild.nativeElement.style.width=qc(this.el?.nativeElement)+"px")))}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":this._dateTemplate=e.template;break;case"decade":this._decadeTemplate=e.template;break;case"disabledDate":this._disabledDateTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"inputicon":this._inputIconTemplate=e.template;break;case"previousicon":this._previousIconTemplate=e.template;break;case"nexticon":this._nextIconTemplate=e.template;break;case"triggericon":this._triggerIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"decrementicon":this._decrementIconTemplate=e.template;break;case"incrementicon":this._incrementIconTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;default:this._dateTemplate=e.template;break}})}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,i){this.yearOptions=[];for(let o=e;o<=i;o++)this.yearOptions.push(o)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),i=this.getTranslation(el.DAY_NAMES_MIN);for(let o=0;o<7;o++)this.weekDays.push(i[e]),e=e==6?0:++e}monthPickerValues(){let e=[];for(let i=0;i<=11;i++)e.push(this.config.getTranslation("monthNamesShort")[i]);return e}yearPickerValues(){let e=[],i=this.currentYear-this.currentYear%10;for(let o=0;o<10;o++)e.push(i+o);return e}createMonths(e,i){this.months=this.months=[];for(let o=0;o11&&(r=r%12,s=i+Math.floor((e+o)/12)),this.months.push(this.createMonth(r,s))}}getWeekNumber(e){let i=new Date(e.getTime());if(this.startWeekFromFirstDayOfYear){let r=+this.getFirstDateOfWeek();i.setDate(i.getDate()+6+r-i.getDay())}else i.setDate(i.getDate()+4-(i.getDay()||7));let o=i.getTime();return i.setMonth(0),i.setDate(1),Math.floor(Math.round((o-i.getTime())/864e5)/7)+1}createMonth(e,i){let o=[],r=this.getFirstDayOfMonthIndex(e,i),s=this.getDaysCountInMonth(e,i),d=this.getDaysCountInPrevMonth(e,i),m=1,v=new Date,w=[],O=Math.ceil((s+r)/7);for(let N=0;Ns){let q=this.getNextMonthAndYear(e,i);V.push({day:m-s,month:q.month,year:q.year,otherMonth:!0,today:this.isToday(v,m-s,q.month,q.year),selectable:this.isSelectable(m-s,q.month,q.year,!0)})}else V.push({day:m,month:e,year:i,today:this.isToday(v,m,e,i),selectable:this.isSelectable(m,e,i,!1)});m++}this.showWeek&&w.push(this.getWeekNumber(new Date(V[0].year,V[0].month,V[0].day))),o.push(V)}return{month:e,year:i,dates:o,weekNumbers:w}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){if(this.$disabled()){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===0?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}navForward(e){if(this.$disabled()){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===11?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}decrementYear(){this.currentYear--;let e=this.yearOptions;if(this.currentYeare[e.length-1]){let i=e[e.length-1]-e[0];this.populateYearOptions(e[0]+i,e[e.length-1]+i)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,i){if(this.$disabled()||!i.selectable){e.preventDefault();return}this.isMultipleSelection()&&this.isSelected(i)?(this.value=this.value.filter((o,r)=>!this.isDateEquals(o,i)),this.value.length===0&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(i)&&this.selectDate(i),this.hideOnDateTimeSelect&&(this.isSingleSelection()||this.isRangeSelection()&&this.value[1])&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()}shouldSelectDate(e){return this.isMultipleSelection()&&this.maxDateCount!=null?this.maxDateCount>(this.value?this.value.length:0):!0}onMonthSelect(e,i){this.view==="month"?this.onDateSelect(e,{year:this.currentYear,month:i,day:1,selectable:!0}):(this.currentMonth=i,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,i){this.view==="year"?this.onDateSelect(e,{year:i,month:0,day:1,selectable:!0}):(this.currentYear=i,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value){if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let i=0;i11,e>=12?this.currentHour=e==12?12:e-12:this.currentHour=e==0?12:e):this.currentHour=e}setCurrentView(e){this.currentView=e,this.cd.detectChanges(),this.alignOverlay()}selectDate(e){let i=this.formatDateMetaToDate(e);if(this.showTime&&(this.hourFormat=="12"?this.currentHour===12?i.setHours(this.pm?12:0):i.setHours(this.pm?this.currentHour+12:this.currentHour):i.setHours(this.currentHour),i.setMinutes(this.currentMinute),i.setSeconds(this.currentSecond)),this.minDate&&this.minDate>i&&(i=this.minDate,this.setCurrentHourPM(i.getHours()),this.currentMinute=i.getMinutes(),this.currentSecond=i.getSeconds()),this.maxDate&&this.maxDate=o.getTime()?r=i:(o=i,r=null),this.updateModel([o,r])}else this.updateModel([i,null]);this.onSelect.emit(i)}updateModel(e){if(this.value=e,this.dataType=="date")this.writeModelValue(this.value),this.onModelChange(this.value);else if(this.dataType=="string")if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let i=null;Array.isArray(this.value)&&(i=this.value.map(o=>this.formatDateTime(o))),this.writeModelValue(i),this.onModelChange(i)}}getFirstDayOfMonthIndex(e,i){let o=new Date;o.setDate(1),o.setMonth(e),o.setFullYear(i);let r=o.getDay()+this.getSundayIndex();return r>=7?r-7:r}getDaysCountInMonth(e,i){return 32-this.daylightSavingAdjust(new Date(i,e,32)).getDate()}getDaysCountInPrevMonth(e,i){let o=this.getPreviousMonthAndYear(e,i);return this.getDaysCountInMonth(o.month,o.year)}getPreviousMonthAndYear(e,i){let o,r;return e===0?(o=11,r=i-1):(o=e-1,r=i),{month:o,year:r}}getNextMonthAndYear(e,i){let o,r;return e===11?(o=0,r=i+1):(o=e+1,r=i),{month:o,year:r}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(this.value){if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let i=!1;for(let o of this.value)if(i=this.isDateEquals(o,e),i)break;return i}else if(this.isRangeSelection())return this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e)}else return!1}isComparable(){return this.value!=null&&typeof this.value!="string"}isMonthSelected(e){if(!this.isComparable())return!1;if(this.isMultipleSelection())return this.value.some(i=>i.getMonth()===e&&i.getFullYear()===this.currentYear);if(this.isRangeSelection())if(this.value[1]){let i=new Date(this.currentYear,e,1),o=new Date(this.value[0].getFullYear(),this.value[0].getMonth(),1),r=new Date(this.value[1].getFullYear(),this.value[1].getMonth(),1);return i>=o&&i<=r}else return this.value[0]?.getFullYear()===this.currentYear&&this.value[0]?.getMonth()===e;else return this.value.getMonth()===e&&this.value.getFullYear()===this.currentYear}isMonthDisabled(e,i){let o=i??this.currentYear;for(let r=1;rthis.isMonthDisabled(o,e))}isYearSelected(e){if(this.isComparable()){let i=this.isRangeSelection()?this.value[0]:this.value;return this.isMultipleSelection()?!1:i.getFullYear()===e}return!1}isDateEquals(e,i){return e&&nz(e)?e.getDate()===i.day&&e.getMonth()===i.month&&e.getFullYear()===i.year:!1}isDateBetween(e,i,o){let r=!1;if(nz(e)&&nz(i)){let s=this.formatDateMetaToDate(o);return e.getTime()<=s.getTime()&&i.getTime()>=s.getTime()}return r}isSingleSelection(){return this.selectionMode==="single"}isRangeSelection(){return this.selectionMode==="range"}isMultipleSelection(){return this.selectionMode==="multiple"}isToday(e,i,o,r){return e.getDate()===i&&e.getMonth()===o&&e.getFullYear()===r}isSelectable(e,i,o,r){let s=!0,d=!0,m=!0,v=!0;return r&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>o||this.minDate.getFullYear()===o&&this.currentView!="year"&&(this.minDate.getMonth()>i||this.minDate.getMonth()===i&&this.minDate.getDate()>e))&&(s=!1),this.maxDate&&(this.maxDate.getFullYear()1||this.$disabled()}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:if(this.inline||this.trapFocus(e),this.inline){let i=zo(this.el?.nativeElement,".p-datepicker-header"),o=e.target;if(this.timeOnly)return;o==i.children[i?.children?.length-1]&&this.initFocusableCell()}break;case 27:this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break;default:break}}onInputKeydown(e){this.isKeydown=!0,e.keyCode===40&&this.contentViewChild?this.trapFocus(e):e.keyCode===27?this.overlayVisible&&(this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault()):e.keyCode===13?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):e.keyCode===9&&this.contentViewChild&&(Bw(this.contentViewChild.nativeElement).forEach(i=>i.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,i,o){let r=e.currentTarget,s=r.parentElement,d=this.formatDateMetaToDate(i);switch(e.which){case 40:{r.tabIndex="-1";let $=rx(s),q=s.parentElement.nextElementSibling;if(q){let W=q.children[$].children[0];Fc(W,"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(q.children[$].children[0].tabIndex="0",q.children[$].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break}case 38:{r.tabIndex="-1";let $=rx(s),q=s.parentElement.previousElementSibling;if(q){let W=q.children[$].children[0];Fc(W,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(W.tabIndex="0",W.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{r.tabIndex="-1";let $=s.previousElementSibling;if($){let q=$.children[0];Fc(q,"p-disabled")||Fc(q.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,o):(q.tabIndex="0",q.focus())}else this.navigateToMonth(!0,o);e.preventDefault();break}case 39:{r.tabIndex="-1";let $=s.nextElementSibling;if($){let q=$.children[0];Fc(q,"p-disabled")?this.navigateToMonth(!1,o):(q.tabIndex="0",q.focus())}else this.navigateToMonth(!1,o);e.preventDefault();break}case 13:case 32:{this.onDateSelect(e,i),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}case 33:{r.tabIndex="-1";let $=new Date(d.getFullYear(),d.getMonth()-1,d.getDate()),q=this.formatDateKey($);this.navigateToMonth(!0,o,`span[data-date='${q}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 34:{r.tabIndex="-1";let $=new Date(d.getFullYear(),d.getMonth()+1,d.getDate()),q=this.formatDateKey($);this.navigateToMonth(!1,o,`span[data-date='${q}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 36:r.tabIndex="-1";let m=new Date(d.getFullYear(),d.getMonth(),1),v=this.formatDateKey(m),w=zo(r.offsetParent,`span[data-date='${v}']:not(.p-disabled):not(.p-ink)`);w&&(w.tabIndex="0",w.focus()),e.preventDefault();break;case 35:r.tabIndex="-1";let O=new Date(d.getFullYear(),d.getMonth()+1,0),N=this.formatDateKey(O),V=zo(r.offsetParent,`span[data-date='${N}']:not(.p-disabled):not(.p-ink)`);O&&(V.tabIndex="0",V.focus()),e.preventDefault();break;default:break}}onMonthCellKeydown(e,i){let o=e.currentTarget;switch(e.which){case 38:case 40:{o.tabIndex="-1";var r=o.parentElement.children,s=rx(o);let d=r[e.which===40?s+3:s-3];d&&(d.tabIndex="0",d.focus()),e.preventDefault();break}case 37:{o.tabIndex="-1";let d=o.previousElementSibling;d?(d.tabIndex="0",d.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{o.tabIndex="-1";let d=o.nextElementSibling;d?(d.tabIndex="0",d.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onMonthSelect(e,i),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}default:break}}onYearCellKeydown(e,i){let o=e.currentTarget;switch(e.which){case 38:case 40:{o.tabIndex="-1";var r=o.parentElement.children,s=rx(o);let d=r[e.which===40?s+2:s-2];d&&(d.tabIndex="0",d.focus()),e.preventDefault();break}case 37:{o.tabIndex="-1";let d=o.previousElementSibling;d?(d.tabIndex="0",d.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{o.tabIndex="-1";let d=o.nextElementSibling;d?(d.tabIndex="0",d.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onYearSelect(e,i),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.trapFocus(e);break}default:break}}navigateToMonth(e,i,o){if(e)if(this.numberOfMonths===1||i===0)this.navigationState={backward:!0},this._focusKey=o,this.navBackward(event);else{let r=this.contentViewChild.nativeElement.children[i-1];if(o){let s=zo(r,o);s.tabIndex="0",s.focus()}else{let s=Xd(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),d=s[s.length-1];d.tabIndex="0",d.focus()}}else if(this.numberOfMonths===1||i===this.numberOfMonths-1)this.navigationState={backward:!1},this._focusKey=o,this.navForward(event);else{let r=this.contentViewChild.nativeElement.children[i+1];if(o){let s=zo(r,o);s.tabIndex="0",s.focus()}else{let s=zo(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");s.tabIndex="0",s.focus()}}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?zo(this.contentViewChild.nativeElement,".p-datepicker-prev-button").focus():zo(this.contentViewChild.nativeElement,".p-datepicker-next-button").focus();else{if(this.navigationState.backward){let i;this.currentView==="month"?i=Xd(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?i=Xd(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):i=Xd(this.contentViewChild.nativeElement,this._focusKey||".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),i&&i.length>0&&(e=i[i.length-1])}else this.currentView==="month"?e=zo(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?e=zo(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):e=zo(this.contentViewChild.nativeElement,this._focusKey||".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null,this._focusKey=null}else this.initFocusableCell()}initFocusableCell(){let e=this.contentViewChild?.nativeElement,i;if(this.currentView==="month"){let o=Xd(e,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"),r=zo(e,".p-datepicker-month-view .p-datepicker-month.p-highlight");o.forEach(s=>s.tabIndex=-1),i=r||o[0],o.length===0&&Xd(e,'.p-datepicker-month-view .p-datepicker-month.p-disabled[tabindex = "0"]').forEach(d=>d.tabIndex=-1)}else if(this.currentView==="year"){let o=Xd(e,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"),r=zo(e,".p-datepicker-year-view .p-datepicker-year.p-highlight");o.forEach(s=>s.tabIndex=-1),i=r||o[0],o.length===0&&Xd(e,'.p-datepicker-year-view .p-datepicker-year.p-disabled[tabindex = "0"]').forEach(d=>d.tabIndex=-1)}else if(i=zo(e,"span.p-highlight"),!i){let o=zo(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");o?i=o:i=zo(e,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}i&&(i.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{this.$disabled()||i.focus()},1),this.preventFocus=!1)}trapFocus(e){let i=Bw(this.contentViewChild.nativeElement);if(i&&i.length>0)if(!i[0].ownerDocument.activeElement)i[0].focus();else{let o=i.indexOf(i[0].ownerDocument.activeElement);if(e.shiftKey)if(o==-1||o===0)if(this.focusTrap)i[i.length-1].focus();else{if(o===-1)return this.hideOverlay();if(o===0)return}else i[o-1].focus();else if(o==-1)if(this.timeOnly)i[0].focus();else{let r=0;for(let s=0;s=12),!0){case($&&d&&this.minDate.getHours()===12&&this.minDate.getHours()>v):s[0]=11;case($&&this.minDate.getHours()===v&&this.minDate.getMinutes()>i):s[1]=this.minDate.getMinutes();case($&&this.minDate.getHours()===v&&this.minDate.getMinutes()===i&&this.minDate.getSeconds()>o):s[2]=this.minDate.getSeconds();break;case($&&!d&&this.minDate.getHours()-1===v&&this.minDate.getHours()>v):s[0]=11,this.pm=!0;case($&&this.minDate.getHours()===v&&this.minDate.getMinutes()>i):s[1]=this.minDate.getMinutes();case($&&this.minDate.getHours()===v&&this.minDate.getMinutes()===i&&this.minDate.getSeconds()>o):s[2]=this.minDate.getSeconds();break;case($&&d&&this.minDate.getHours()>v&&v!==12):this.setCurrentHourPM(this.minDate.getHours()),s[0]=this.currentHour;case($&&this.minDate.getHours()===v&&this.minDate.getMinutes()>i):s[1]=this.minDate.getMinutes();case($&&this.minDate.getHours()===v&&this.minDate.getMinutes()===i&&this.minDate.getSeconds()>o):s[2]=this.minDate.getSeconds();break;case($&&this.minDate.getHours()>v):s[0]=this.minDate.getHours();case($&&this.minDate.getHours()===v&&this.minDate.getMinutes()>i):s[1]=this.minDate.getMinutes();case($&&this.minDate.getHours()===v&&this.minDate.getMinutes()===i&&this.minDate.getSeconds()>o):s[2]=this.minDate.getSeconds();break;case(q&&this.maxDate.getHours()=24?o-24:o:this.hourFormat=="12"&&(i<12&&o>11&&(r=!this.pm),o=o>=13?o-12:o),this.toggleAMPMIfNotMinDate(r),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(o,this.currentMinute,this.currentSecond,r),e.preventDefault()}toggleAMPMIfNotMinDate(e){let i=this.value,o=i?i.toDateString():null;this.minDate&&o&&this.minDate.toDateString()===o&&this.minDate.getHours()>=12?this.pm=!0:this.pm=e}onTimePickerElementMouseDown(e,i,o){this.$disabled()||(this.repeat(e,null,i,o),e.preventDefault())}onTimePickerElementMouseUp(e){this.$disabled()||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.$disabled()&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,i,o,r){let s=i||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,o,r),this.cd.markForCheck()},s),o){case 0:r===1?this.incrementHour(e):this.decrementHour(e);break;case 1:r===1?this.incrementMinute(e):this.decrementMinute(e);break;case 2:r===1?this.incrementSecond(e):this.decrementSecond(e);break}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let i=(this.currentHour??0)-this.stepHour,o=this.pm;this.hourFormat=="24"?i=i<0?24+i:i:this.hourFormat=="12"&&(this.currentHour===12&&(o=!this.pm),i=i<=0?12+i:i),this.toggleAMPMIfNotMinDate(o),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(i,this.currentMinute,this.currentSecond,o),e.preventDefault()}incrementMinute(e){let i=(this.currentMinute??0)+this.stepMinute;i=i>59?i-60:i,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,i,this.currentSecond,this.pm),e.preventDefault()}decrementMinute(e){let i=(this.currentMinute??0)-this.stepMinute;i=i<0?60+i:i,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,i,this.currentSecond,this.pm),e.preventDefault()}incrementSecond(e){let i=this.currentSecond+this.stepSecond;i=i>59?i-60:i,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,this.currentMinute,i,this.pm),e.preventDefault()}decrementSecond(e){let i=this.currentSecond-this.stepSecond;i=i<0?60+i:i,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,this.currentMinute,i,this.pm),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,this.hourFormat=="12"?this.currentHour===12?e.setHours(this.pm?12:0):e.setHours(this.pm?this.currentHour+12:this.currentHour):e.setHours(this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(this.value[1]?e=[this.value[0],e]:e=[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){let i=!this.pm;this.pm=i,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,this.currentMinute,this.currentSecond,i),this.updateTime(),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let i=e.target.value;try{let o=this.parseValueFromString(i);this.isValidSelection(o)?(this.updateModel(o),this.updateUI()):this.keepInvalid&&this.updateModel(o)}catch{let r=this.keepInvalid?i:null;this.updateModel(r)}this.onInput.emit(e)}isValidSelection(e){if(this.isSingleSelection())return this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1);let i=e.every(o=>this.isSelectable(o.getDate(),o.getMonth(),o.getFullYear(),!1));return i&&this.isRangeSelection()&&(i=e.length===1||e.length>1&&e[1]>=e[0]),i}parseValueFromString(e){if(!e||e.trim().length===0)return null;let i;if(this.isSingleSelection())i=this.parseDateTime(e);else if(this.isMultipleSelection()){let o=e.split(this.multipleSeparator);i=[];for(let r of o)i.push(this.parseDateTime(r.trim()))}else if(this.isRangeSelection()){let o=e.split(" "+this.rangeSeparator+" ");i=[];for(let r=0;r{this.disableModality(),this.overlayVisible=!1}),this.renderer.appendChild(this.document.body,this.mask),WAe())}disableModality(){this.mask&&(ac(this.mask,"p-overlay-mask-leave"),this.animationEndListener||(this.animationEndListener=this.renderer.listen(this.mask,"animationend",this.destroyMask.bind(this))))}destroyMask(){if(!this.mask)return;this.renderer.removeChild(this.document.body,this.mask);let e=this.document.body.children,i;for(let o=0;o{let O=o+1{let V=""+O;if(r(w))for(;V.lengthr(w)?V[O]:N[O],m="",v=!1;if(e)for(o=0;o11&&o!=12&&(o-=12),this.hourFormat=="12"?i+=o===0?12:o<10?"0"+o:o:i+=o<10?"0"+o:o,i+=":",i+=r<10?"0"+r:r,this.showSeconds&&(i+=":",i+=s<10?"0"+s:s),this.hourFormat=="12"&&(i+=e.getHours()>11?" PM":" AM"),i}parseTime(e){let i=e.split(":"),o=this.showSeconds?3:2;if(i.length!==o)throw"Invalid time";let r=parseInt(i[0]),s=parseInt(i[1]),d=this.showSeconds?parseInt(i[2]):null;if(isNaN(r)||isNaN(s)||r>23||s>59||this.hourFormat=="12"&&r>12||this.showSeconds&&(isNaN(d)||d>59))throw"Invalid time";return this.hourFormat=="12"&&(r!==12&&this.pm?r+=12:!this.pm&&r===12&&(r-=12)),{hour:r,minute:s,second:d}}parseDate(e,i){if(i==null||e==null)throw"Invalid arguments";if(e=typeof e=="object"?e.toString():e+"",e==="")return null;let o,r,s,d=0,m=typeof this.shortYearCutoff!="string"?this.shortYearCutoff:new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10),v=-1,w=-1,O=-1,N=-1,V=!1,$,q=xe=>{let Fe=o+1{let Fe=q(xe),Re=xe==="@"?14:xe==="!"?20:xe==="y"&&Fe?4:xe==="o"?3:2,Se=xe==="y"?Re:1,ke=new RegExp("^\\d{"+Se+","+Re+"}"),Xe=e.substring(d).match(ke);if(!Xe)throw"Missing number at position "+d;return d+=Xe[0].length,parseInt(Xe[0],10)},te=(xe,Fe,Re)=>{let Se=-1,ke=q(xe)?Re:Fe,Xe=[];for(let yt=0;yt-(yt[1].length-We[1].length));for(let yt=0;yt{if(e.charAt(d)!==i.charAt(o))throw"Unexpected literal at position "+d;d++};for(this.view==="month"&&(O=1),o=0;o-1){w=1,O=N;do{if(r=this.getDaysCountInMonth(v,w-1),O<=r)break;w++,O-=r}while(!0)}if(this.view==="year"&&(w=w===-1?1:w,O=O===-1?1:O),$=this.daylightSavingAdjust(new Date(v,w-1,O)),$.getFullYear()!==v||$.getMonth()+1!==w||$.getDate()!==O)throw"Invalid date";return $}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}isValidDateForTimeConstraints(e){return this.keepInvalid?!0:(!this.minDate||e>=this.minDate)&&(!this.maxDate||e<=this.maxDate)}onTodayButtonClick(e){let i=new Date,o={day:i.getDate(),month:i.getMonth(),year:i.getFullYear(),otherMonth:i.getMonth()!==this.currentMonth||i.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.createMonths(i.getMonth(),i.getFullYear()),this.onDateSelect(e,o),this.onTodayClick.emit(i)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",Xv(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.body,this.responsiveStyleElement));let e="";if(this.responsiveOptions){let i=[...this.responsiveOptions].filter(o=>!!(o.breakpoint&&o.numMonths)).sort((o,r)=>-1*o.breakpoint.localeCompare(r.breakpoint,void 0,{numeric:!0}));for(let o=0;o{let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(e,"mousedown",i=>{this.isOutsideClicked(i)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(i),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.renderer.listen(this.window,"resize",this.onWindowResize.bind(this)))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new m0(this.el?.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return Fc(e.target,"p-datepicker-prev-button")||Fc(e.target,"p-datepicker-prev-icon")||Fc(e.target,"p-datepicker-next-button")||Fc(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!Xg()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}writeControlValue(e){if(this.value=e,this.value&&typeof this.value=="string")try{this.value=this.parseValueFromString(this.value)}catch{this.keepInvalid&&(this.value=e)}this.updateInputfield(),this.updateUI(),this.cd.markForCheck()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&Nc.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(_e(_n),_e(Jg))};static \u0275cmp=ne({type:t,selectors:[["p-datePicker"],["p-datepicker"],["p-date-picker"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,int,4),xt(r,nnt,4),xt(r,ont,4),xt(r,rnt,4),xt(r,snt,4),xt(r,ant,4),xt(r,lnt,4),xt(r,cnt,4),xt(r,dnt,4),xt(r,unt,4),xt(r,pnt,4),xt(r,hnt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.dateTemplate=s.first),Le(s=Ne())&&(o.headerTemplate=s.first),Le(s=Ne())&&(o.footerTemplate=s.first),Le(s=Ne())&&(o.disabledDateTemplate=s.first),Le(s=Ne())&&(o.decadeTemplate=s.first),Le(s=Ne())&&(o.previousIconTemplate=s.first),Le(s=Ne())&&(o.nextIconTemplate=s.first),Le(s=Ne())&&(o.triggerIconTemplate=s.first),Le(s=Ne())&&(o.clearIconTemplate=s.first),Le(s=Ne())&&(o.decrementIconTemplate=s.first),Le(s=Ne())&&(o.incrementIconTemplate=s.first),Le(s=Ne())&&(o.inputIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(mnt,5),Ri(fnt,5)),i&2){let r;Le(r=Ne())&&(o.inputfieldViewChild=r.first),Le(r=Ne())&&(o.content=r.first)}},hostVars:4,hostBindings:function(i,o){i&2&&($r(o.sx("root")),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{iconDisplay:"iconDisplay",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",iconAriaLabel:"iconAriaLabel",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:[2,"inline","inline",je],showOtherMonths:[2,"showOtherMonths","showOtherMonths",je],selectOtherMonths:[2,"selectOtherMonths","selectOtherMonths",je],showIcon:[2,"showIcon","showIcon",je],icon:"icon",readonlyInput:[2,"readonlyInput","readonlyInput",je],shortYearCutoff:"shortYearCutoff",hourFormat:"hourFormat",timeOnly:[2,"timeOnly","timeOnly",je],stepHour:[2,"stepHour","stepHour",ln],stepMinute:[2,"stepMinute","stepMinute",ln],stepSecond:[2,"stepSecond","stepSecond",ln],showSeconds:[2,"showSeconds","showSeconds",je],showOnFocus:[2,"showOnFocus","showOnFocus",je],showWeek:[2,"showWeek","showWeek",je],startWeekFromFirstDayOfYear:"startWeekFromFirstDayOfYear",showClear:[2,"showClear","showClear",je],dataType:"dataType",selectionMode:"selectionMode",maxDateCount:[2,"maxDateCount","maxDateCount",ln],showButtonBar:[2,"showButtonBar","showButtonBar",je],todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autofocus:[2,"autofocus","autofocus",je],autoZIndex:[2,"autoZIndex","autoZIndex",je],baseZIndex:[2,"baseZIndex","baseZIndex",ln],panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:[2,"keepInvalid","keepInvalid",je],hideOnDateTimeSelect:[2,"hideOnDateTimeSelect","hideOnDateTimeSelect",je],touchUI:[2,"touchUI","touchUI",je],timeSeparator:"timeSeparator",focusTrap:[2,"focusTrap","focusTrap",je],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:[2,"tabindex","tabindex",ln],minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",view:"view",defaultDate:"defaultDate",appendTo:[1,"appendTo"]},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[jt([mrt,wke]),ft],ngContentSelectors:_nt,decls:2,vars:2,consts:[["inputfield",""],["contentWrapper",""],["icon",""],[3,"ngIf"],[3,"ngStyle","class","click",4,"ngIf"],["pInputText","","type","text","role","combobox","aria-autocomplete","none","aria-haspopup","dialog","autocomplete","off",3,"focus","keydown","click","blur","input","pSize","value","ngStyle","pAutoFocus","variant","fluid","invalid"],[4,"ngIf"],["type","button","aria-haspopup","dialog","tabindex","0",3,"class","disabled","click",4,"ngIf"],["data-p-icon","times",3,"class","click",4,"ngIf"],[3,"class","click",4,"ngIf"],["data-p-icon","times",3,"click"],[3,"click"],[4,"ngTemplateOutlet"],["type","button","aria-haspopup","dialog","tabindex","0",3,"click","disabled"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-p-icon","calendar",4,"ngIf"],["data-p-icon","calendar"],["data-p-icon","calendar",3,"class","click",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","calendar",3,"click"],[3,"click","ngStyle"],[3,"class",4,"ngIf"],[3,"class",4,"ngFor","ngForOf"],["rounded","","variant","text","severity","secondary","type","button",3,"keydown","onClick","styleClass","ngStyle","ariaLabel"],["type","button","pRipple","",3,"class","click","keydown",4,"ngIf"],["rounded","","variant","text","severity","secondary",3,"keydown","onClick","styleClass","ngStyle","ariaLabel"],["role","grid",3,"class",4,"ngIf"],["data-p-icon","chevron-left",4,"ngIf"],["data-p-icon","chevron-left"],["type","button","pRipple","",3,"click","keydown"],["data-p-icon","chevron-right",4,"ngIf"],["data-p-icon","chevron-right"],["role","grid"],["scope","col",3,"class",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["scope","col"],["draggable","false","pRipple","",3,"click","keydown","ngClass"],["class","p-hidden-accessible","aria-live","polite",4,"ngIf"],["aria-live","polite",1,"p-hidden-accessible"],["pRipple","",3,"class","click","keydown",4,"ngFor","ngForOf"],["pRipple","",3,"click","keydown"],["rounded","","variant","text","severity","secondary",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave","styleClass"],[1,"p-datepicker-separator"],["data-p-icon","chevron-up",4,"ngIf"],["data-p-icon","chevron-up"],["data-p-icon","chevron-down",4,"ngIf"],["data-p-icon","chevron-down"],["text","","rounded","","severity","secondary",3,"keydown","onClick","keydown.enter","styleClass"],["text","","rounded","","severity","secondary",3,"keydown","click","keydown.enter","styleClass"],["size","small","severity","secondary","variant","text","size","small",3,"keydown","onClick","styleClass","label","ngClass"]],template:function(i,o){i&1&&(Nn(gnt),ee(0,Bnt,5,26,"ng-template",3)(1,drt,9,19,"div",4)),i&2&&(E("ngIf",!o.inline),T(),E("ngIf",o.inline||o.overlayVisible))},dependencies:[On,Ns,Gc,Fr,Lo,vs,ja,Ul,VK,Gw,zK,sm,am,nke,fp,fu,In],encapsulation:2,data:{animation:[xh("overlayAnimation",[u0("visibleTouchUI",al({transform:"translate(-50%,-50%)",opacity:1})),Rc("void => visible",[al({opacity:0,transform:"scaleY(0.8)"}),uc("{{showTransitionParams}}",al({opacity:1,transform:"*"}))]),Rc("visible => void",[uc("{{hideTransitionParams}}",al({opacity:0}))]),Rc("void => visibleTouchUI",[al({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),uc("{{showTransitionParams}}")]),Rc("visibleTouchUI => void",[uc("{{hideTransitionParams}}",al({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0})}return t})(),Ske=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[KK,In,In]})}return t})();var Tke=` .p-floatlabel { display: block; position: relative; } .p-floatlabel label { position: absolute; pointer-events: none; top: 50%; transform: translateY(-50%); transition-property: all; transition-timing-function: ease; line-height: 1; font-weight: dt('floatlabel.font.weight'); inset-inline-start: dt('floatlabel.position.x'); color: dt('floatlabel.color'); transition-duration: dt('floatlabel.transition.duration'); } .p-floatlabel:has(.p-textarea) label { top: dt('floatlabel.position.y'); transform: translateY(0); } .p-floatlabel:has(.p-inputicon:first-child) label { inset-inline-start: calc((dt('form.field.padding.x') * 2) + dt('icon.size')); } .p-floatlabel:has(input:focus) label, .p-floatlabel:has(input.p-filled) label, .p-floatlabel:has(input:-webkit-autofill) label, .p-floatlabel:has(textarea:focus) label, .p-floatlabel:has(textarea.p-filled) label, .p-floatlabel:has(.p-inputwrapper-focus) label, .p-floatlabel:has(.p-inputwrapper-filled) label, .p-floatlabel:has(input[placeholder]) label, .p-floatlabel:has(textarea[placeholder]) label { top: dt('floatlabel.over.active.top'); transform: translateY(0); font-size: dt('floatlabel.active.font.size'); font-weight: dt('floatlabel.active.font.weight'); } .p-floatlabel:has(input.p-filled) label, .p-floatlabel:has(textarea.p-filled) label, .p-floatlabel:has(.p-inputwrapper-filled) label { color: dt('floatlabel.active.color'); } .p-floatlabel:has(input:focus) label, .p-floatlabel:has(input:-webkit-autofill) label, .p-floatlabel:has(textarea:focus) label, .p-floatlabel:has(.p-inputwrapper-focus) label { color: dt('floatlabel.focus.color'); } .p-floatlabel-in .p-inputtext, .p-floatlabel-in .p-textarea, .p-floatlabel-in .p-select-label, .p-floatlabel-in .p-multiselect-label, .p-floatlabel-in .p-autocomplete-input-multiple, .p-floatlabel-in .p-cascadeselect-label, .p-floatlabel-in .p-treeselect-label { padding-block-start: dt('floatlabel.in.input.padding.top'); padding-block-end: dt('floatlabel.in.input.padding.bottom'); } .p-floatlabel-in:has(input:focus) label, .p-floatlabel-in:has(input.p-filled) label, .p-floatlabel-in:has(input:-webkit-autofill) label, .p-floatlabel-in:has(textarea:focus) label, .p-floatlabel-in:has(textarea.p-filled) label, .p-floatlabel-in:has(.p-inputwrapper-focus) label, .p-floatlabel-in:has(.p-inputwrapper-filled) label, .p-floatlabel-in:has(input[placeholder]) label, .p-floatlabel-in:has(textarea[placeholder]) label { top: dt('floatlabel.in.active.top'); } .p-floatlabel-on:has(input:focus) label, .p-floatlabel-on:has(input.p-filled) label, .p-floatlabel-on:has(input:-webkit-autofill) label, .p-floatlabel-on:has(textarea:focus) label, .p-floatlabel-on:has(textarea.p-filled) label, .p-floatlabel-on:has(.p-inputwrapper-focus) label, .p-floatlabel-on:has(.p-inputwrapper-filled) label, .p-floatlabel-on:has(input[placeholder]) label, .p-floatlabel-on:has(textarea[placeholder]) label { top: 0; transform: translateY(-50%); border-radius: dt('floatlabel.on.border.radius'); background: dt('floatlabel.on.active.background'); padding: dt('floatlabel.on.active.padding'); } .p-floatlabel:has([class^='p-'][class$='-fluid']) { width: 100%; } .p-floatlabel:has(.p-invalid) label { color: dt('floatlabel.invalid.color'); } `;var frt=["*"],grt=` ${Tke} /* For PrimeNG */ .p-floatlabel:has(.ng-invalid.ng-dirty) label { color: dt('floatlabel.invalid.color'); } `,_rt={root:({instance:t})=>["p-floatlabel",{"p-floatlabel-over":t.variant==="over","p-floatlabel-on":t.variant==="on","p-floatlabel-in":t.variant==="in"}]},Ike=(()=>{class t extends io{name="floatlabel";theme=grt;classes=_rt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var qae=(()=>{class t extends oo{_componentStyle=re(Ike);variant="over";static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-floatlabel"],["p-floatLabel"],["p-float-label"]],hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.cx("root"))},inputs:{variant:"variant"},features:[jt([Ike]),ft],ngContentSelectors:frt,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On,In],encapsulation:2,changeDetection:0})}return t})(),Eke=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[qae,In,In]})}return t})();function yrt(t,n){if(t&1){let e=tt();k(0,"div",5)(1,"i",6),ie("click",function(o){let r=se(e).clickCallBack;return ae(r(o))}),D(),k(2,"i",7),ie("click",function(){se(e);let o=P();return ae(o.moreOptionsChange.emit())}),D()()}}function vrt(t,n){if(t&1&&(k(0,"small",4),Q(1),D()),t&2){let e=P();T(),dt((e.range.errors==null?null:e.range.errors.invalidDate)??(e.range.errors==null?null:e.range.errors.dateOrder))}}var Dke=(()=>{class t{constructor(){this.interval=new jp,this.intervalChange=new ve,this.moreOptionsChange=new ve,this.range=new yr(null,[Ys.required,brt()]),this.range.valueChanges.pipe(id(500),wn(()=>this.range.valid),vt(e=>new jp(e[0],e[1])),rp((e,i)=>jp.equals(e,i))).subscribe(e=>{this.intervalChange.emit(e.clone())})}ngOnChanges(){this.interval&&this.interval.isValid()&&this.range.patchValue([this.interval.start,this.interval.end])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-interval-calendric-input"]],inputs:{interval:"interval"},outputs:{intervalChange:"intervalChange",moreOptionsChange:"moreOptionsChange"},features:[Ot],decls:6,vars:4,consts:[["variant","in"],["inputId","interval-calendric-input","fluid","","variant","filled","selectionMode","range","showIcon","","iconDisplay","input","appendTo","body","dateFormat","dd.mm.yy",3,"formControl"],["pTemplate","inputicon"],["for","interval-calendric-input"],["id","interval-calendric-input-help"],[1,"flex","flex-row","gap-4"],[1,"pi","pi-calendar",3,"click"],[1,"pi","pi-cog",3,"click"]],template:function(i,o){i&1&&(k(0,"p-floatlabel",0)(1,"p-datePicker",1),ee(2,yrt,3,0,"ng-template",2),D(),k(3,"label",3),Q(4,"Zeitraum"),D(),qe(5,vrt,2,1,"small",4),D()),i&2&&(T(),Oe(o.range.dirty&&o.range.invalid?"ng-invalid ng-dirty":"mb-8"),E("formControl",o.range),T(4),Ke(o.range.errors?5:-1))},dependencies:[xr,no,zl,KK,qae,so],encapsulation:2})}}return t})();function brt(){return t=>{let n=t.value;if(!Array.isArray(n)||n.length!==2)return{invalidFormat:"Array must contain exactly two items"};let[e,i]=n,o=e,r=i;return!(o instanceof Date)||isNaN(o.getTime())||!(r instanceof Date)||isNaN(r.getTime())?{invalidDate:"Bitte Start und End Datum eingeben"}:o>r?{dateOrder:"Start Datum muss vor End Datum sein"}:null}}var Ake=` .p-iftalabel { display: block; position: relative; } .p-iftalabel label { position: absolute; pointer-events: none; top: dt('iftalabel.top'); transition-property: all; transition-timing-function: ease; line-height: 1; font-size: dt('iftalabel.font.size'); font-weight: dt('iftalabel.font.weight'); inset-inline-start: dt('iftalabel.position.x'); color: dt('iftalabel.color'); transition-duration: dt('iftalabel.transition.duration'); } .p-iftalabel .p-inputtext, .p-iftalabel .p-textarea, .p-iftalabel .p-select-label, .p-iftalabel .p-multiselect-label, .p-iftalabel .p-autocomplete-input-multiple, .p-iftalabel .p-cascadeselect-label, .p-iftalabel .p-treeselect-label { padding-block-start: dt('iftalabel.input.padding.top'); padding-block-end: dt('iftalabel.input.padding.bottom'); } .p-iftalabel:has(.p-invalid) label { color: dt('iftalabel.invalid.color'); } .p-iftalabel:has(input:focus) label, .p-iftalabel:has(input:-webkit-autofill) label, .p-iftalabel:has(textarea:focus) label, .p-iftalabel:has(.p-inputwrapper-focus) label { color: dt('iftalabel.focus.color'); } .p-iftalabel .p-inputicon { top: dt('iftalabel.input.padding.top'); transform: translateY(25%); margin-top: 0; } `;var Crt=["*"],xrt=` ${Ake} /* For PrimeNG */ .p-iftalabel:has(.ng-invalid.ng-dirty) label { color: dt('iftalabel.invalid.color'); } `,wrt={root:"p-iftalabel"},kke=(()=>{class t extends io{name="iftalabel";theme=xrt;classes=wrt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var as=(()=>{class t extends oo{_componentStyle=re(kke);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-iftalabel"],["p-iftaLabel"],["p-ifta-label"]],hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.cx("root"))},features:[jt([kke]),ft],ngContentSelectors:Crt,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},encapsulation:2,changeDetection:0})}return t})();var Mke=` .p-iconfield { position: relative; display: block; } .p-inputicon { position: absolute; top: 50%; margin-top: calc(-1 * (dt('icon.size') / 2)); color: dt('iconfield.icon.color'); line-height: 1; z-index: 1; } .p-iconfield .p-inputicon:first-child { inset-inline-start: dt('form.field.padding.x'); } .p-iconfield .p-inputicon:last-child { inset-inline-end: dt('form.field.padding.x'); } .p-iconfield .p-inputtext:not(:first-child), .p-iconfield .p-inputwrapper:not(:first-child) .p-inputtext { padding-inline-start: calc((dt('form.field.padding.x') * 2) + dt('icon.size')); } .p-iconfield .p-inputtext:not(:last-child) { padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size')); } .p-iconfield:has(.p-inputfield-sm) .p-inputicon { font-size: dt('form.field.sm.font.size'); width: dt('form.field.sm.font.size'); height: dt('form.field.sm.font.size'); margin-top: calc(-1 * (dt('form.field.sm.font.size') / 2)); } .p-iconfield:has(.p-inputfield-lg) .p-inputicon { font-size: dt('form.field.lg.font.size'); width: dt('form.field.lg.font.size'); height: dt('form.field.lg.font.size'); margin-top: calc(-1 * (dt('form.field.lg.font.size') / 2)); } `;var Srt=["*"],Trt={root:({instance:t})=>["p-iconfield",{"p-iconfield-left":t.iconPosition=="left","p-iconfield-right":t.iconPosition=="right"}]},Oke=(()=>{class t extends io{name="iconfield";theme=Mke;classes=Trt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var ax=(()=>{class t extends oo{iconPosition="left";styleClass;_componentStyle=re(Oke);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-iconfield"],["p-iconField"],["p-icon-field"]],hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.cn(o.cx("root"),o.styleClass))},inputs:{iconPosition:"iconPosition",styleClass:"styleClass"},features:[jt([Oke]),ft],ngContentSelectors:Srt,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On],encapsulation:2,changeDetection:0})}return t})();var Irt=["*"],Ert={root:"p-inputicon"},Rke=(()=>{class t extends io{name="inputicon";classes=Ert;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),lx=(()=>{class t extends oo{styleClass;_componentStyle=re(Rke);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-inputicon"],["p-inputIcon"]],hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.cn(o.cx("root"),o.styleClass))},inputs:{styleClass:"styleClass"},features:[jt([Rke]),ft],ngContentSelectors:Irt,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On,In],encapsulation:2,changeDetection:0})}return t})();var Fke=["content"],Drt=["overlay"],Art=["*"],krt=(t,n,e,i,o,r,s,d,m,v,w,O,N,V)=>({"p-overlay p-component":!0,"p-overlay-modal p-overlay-mask p-overlay-mask-enter":t,"p-overlay-center":n,"p-overlay-top":e,"p-overlay-top-start":i,"p-overlay-top-end":o,"p-overlay-bottom":r,"p-overlay-bottom-start":s,"p-overlay-bottom-end":d,"p-overlay-left":m,"p-overlay-left-start":v,"p-overlay-left-end":w,"p-overlay-right":O,"p-overlay-right-start":N,"p-overlay-right-end":V}),Mrt=(t,n,e)=>({showTransitionParams:t,hideTransitionParams:n,transform:e}),Ort=t=>({value:"visible",params:t}),Rrt=t=>({mode:t}),Frt=t=>({$implicit:t});function Prt(t,n){t&1&&ui(0)}function Lrt(t,n){if(t&1){let e=tt();k(0,"div",3,1),ie("click",function(o){se(e);let r=P(2);return ae(r.onOverlayContentClick(o))})("@overlayContentAnimation.start",function(o){se(e);let r=P(2);return ae(r.onOverlayContentAnimationStart(o))})("@overlayContentAnimation.done",function(o){se(e);let r=P(2);return ae(r.onOverlayContentAnimationDone(o))}),pn(2),ee(3,Prt,1,0,"ng-container",4),D()}if(t&2){let e=P(2);Oe(e.contentStyleClass),E("ngStyle",e.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",ki(11,Ort,$d(7,Mrt,e.showTransitionOptions,e.hideTransitionOptions,e.transformOptions[e.modal?e.overlayResponsiveDirection:"default"]))),T(3),E("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",ki(15,Frt,ki(13,Rrt,e.overlayMode)))}}function Nrt(t,n){if(t&1){let e=tt();k(0,"div",3,0),ie("click",function(){se(e);let o=P();return ae(o.onOverlayClick())}),ee(2,Lrt,4,17,"div",2),D()}if(t&2){let e=P();Oe(e.styleClass),E("ngStyle",e.style)("ngClass",G9(5,krt,[e.modal,e.modal&&e.overlayResponsiveDirection==="center",e.modal&&e.overlayResponsiveDirection==="top",e.modal&&e.overlayResponsiveDirection==="top-start",e.modal&&e.overlayResponsiveDirection==="top-end",e.modal&&e.overlayResponsiveDirection==="bottom",e.modal&&e.overlayResponsiveDirection==="bottom-start",e.modal&&e.overlayResponsiveDirection==="bottom-end",e.modal&&e.overlayResponsiveDirection==="left",e.modal&&e.overlayResponsiveDirection==="left-start",e.modal&&e.overlayResponsiveDirection==="left-end",e.modal&&e.overlayResponsiveDirection==="right",e.modal&&e.overlayResponsiveDirection==="right-start",e.modal&&e.overlayResponsiveDirection==="right-end"])),T(2),E("ngIf",e.visible)}}var Brt=` .p-overlay { position: absolute; top: 0; } .p-overlay-modal { display: flex; align-items: center; justify-content: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; } .p-overlay-content { transform-origin: inherit; } /* Github Issue #18560 */ .p-component-overlay.p-component { position: relative; } .p-overlay-modal > .p-overlay-content { z-index: 1; width: 90%; } /* Position */ /* top */ .p-overlay-top { align-items: flex-start; } .p-overlay-top-start { align-items: flex-start; justify-content: flex-start; } .p-overlay-top-end { align-items: flex-start; justify-content: flex-end; } /* bottom */ .p-overlay-bottom { align-items: flex-end; } .p-overlay-bottom-start { align-items: flex-end; justify-content: flex-start; } .p-overlay-bottom-end { align-items: flex-end; justify-content: flex-end; } /* left */ .p-overlay-left { justify-content: flex-start; } .p-overlay-left-start { justify-content: flex-start; align-items: flex-start; } .p-overlay-left-end { justify-content: flex-start; align-items: flex-end; } /* right */ .p-overlay-right { justify-content: flex-end; } .p-overlay-right-start { justify-content: flex-end; align-items: flex-start; } .p-overlay-right-end { justify-content: flex-end; align-items: flex-end; } `,Pke=(()=>{class t extends io{name="overlay";theme=Brt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),Vrt=nx([al({transform:"{{transform}}",opacity:0}),uc("{{showTransitionParams}}")]),zrt=nx([uc("{{hideTransitionParams}}",al({transform:"{{transform}}",opacity:0}))]),zP=(()=>{class t extends oo{overlayService;zone;get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(e){this._mode=e}get style(){return Jr.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(e){this._style=e}get styleClass(){return Jr.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(e){this._styleClass=e}get contentStyle(){return Jr.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(e){this._contentStyle=e}get contentStyleClass(){return Jr.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(e){this._contentStyleClass=e}get target(){let e=this._target||this.overlayOptions?.target;return e===void 0?"@prev":e}set target(e){this._target=e}get autoZIndex(){let e=this._autoZIndex||this.overlayOptions?.autoZIndex;return e===void 0?!0:e}set autoZIndex(e){this._autoZIndex=e}get baseZIndex(){let e=this._baseZIndex||this.overlayOptions?.baseZIndex;return e===void 0?0:e}set baseZIndex(e){this._baseZIndex=e}get showTransitionOptions(){let e=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return e===void 0?".12s cubic-bezier(0, 0, 0.2, 1)":e}set showTransitionOptions(e){this._showTransitionOptions=e}get hideTransitionOptions(){let e=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return e===void 0?".1s linear":e}set hideTransitionOptions(e){this._hideTransitionOptions=e}get listener(){return this._listener||this.overlayOptions?.listener}set listener(e){this._listener=e}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(e){this._responsive=e}get options(){return this._options}set options(e){this._options=e}appendTo=mo(void 0);visibleChange=new ve;onBeforeShow=new ve;onShow=new ve;onBeforeHide=new ve;onHide=new ve;onAnimationStart=new ve;onAnimationDone=new ve;overlayViewChild;contentViewChild;contentTemplate;templates;hostAttrSelector=mo();$appendTo=bo(()=>this.appendTo()||this.config.overlayAppendTo());_contentTemplate;_visible=!1;_mode;_style;_styleClass;_contentStyle;_contentStyleClass;_target;_autoZIndex;_baseZIndex;_showTransitionOptions;_hideTransitionOptions;_listener;_responsive;_options;modalVisible=!1;isOverlayClicked=!1;isOverlayContentClicked=!1;scrollHandler;documentClickListener;documentResizeListener;_componentStyle=re(Pke);documentKeyboardListener;window;transformOptions={default:"scaleY(0.8)",center:"scale(0.7)",top:"translate3d(0px, -100%, 0px)","top-start":"translate3d(0px, -100%, 0px)","top-end":"translate3d(0px, -100%, 0px)",bottom:"translate3d(0px, 100%, 0px)","bottom-start":"translate3d(0px, 100%, 0px)","bottom-end":"translate3d(0px, 100%, 0px)",left:"translate3d(-100%, 0px, 0px)","left-start":"translate3d(-100%, 0px, 0px)","left-end":"translate3d(-100%, 0px, 0px)",right:"translate3d(100%, 0px, 0px)","right-start":"translate3d(100%, 0px, 0px)","right-end":"translate3d(100%, 0px, 0px)"};get modal(){if(ps(this.platformId))return this.mode==="modal"||this.overlayResponsiveOptions&&this.document.defaultView?.matchMedia(this.overlayResponsiveOptions.media?.replace("@media","")||`(max-width: ${this.overlayResponsiveOptions.breakpoint})`).matches}get overlayMode(){return this.mode||(this.modal?"modal":"overlay")}get overlayOptions(){return be(be({},this.config?.overlayOptions),this.options)}get overlayResponsiveOptions(){return be(be({},this.overlayOptions?.responsive),this.responsive)}get overlayResponsiveDirection(){return this.overlayResponsiveOptions?.direction||"center"}get overlayEl(){return this.overlayViewChild?.nativeElement}get contentEl(){return this.contentViewChild?.nativeElement}get targetEl(){return Fae(this.target,this.el?.nativeElement)}constructor(e,i){super(),this.overlayService=e,this.zone=i}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}show(e,i=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&ss(this.targetEl),this.modal&&ac(this.document?.body,"p-overflow-hidden")}hide(e,i=!1){if(this.visible)this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&ss(this.targetEl),this.modal&&Fd(this.document?.body,"p-overflow-hidden");else return}alignOverlay(){!this.modal&&tr.alignOverlay(this.overlayEl,this.targetEl,this.$appendTo())}onVisibleChange(e){this._visible=e,this.visibleChange.emit(e)}onOverlayClick(){this.isOverlayClicked=!0}onOverlayContentClick(e){this.overlayService.add({originalEvent:e,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(e){switch(e.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&Nc.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),this.hostAttrSelector()&&this.overlayEl.setAttribute(this.hostAttrSelector(),""),tr.appendOverlay(this.overlayEl,this.$appendTo()==="body"?this.document.body:this.$appendTo(),this.$appendTo()),this.alignOverlay();break;case"void":this.handleEvents("onBeforeHide",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.modal&&ac(this.overlayEl,"p-overlay-mask-leave");break}this.handleEvents("onAnimationStart",e)}onOverlayContentAnimationDone(e){let i=this.overlayEl||e.element.parentElement;switch(e.toState){case"visible":this.visible&&(this.show(i,!0),this.bindListeners());break;case"void":if(!this.visible){this.hide(i,!0),this.modalVisible=!1,this.unbindListeners(),tr.appendOverlay(this.overlayEl,this.targetEl,this.$appendTo()),Nc.clear(i),this.cd.markForCheck();break}}this.handleEvents("onAnimationDone",e)}handleEvents(e,i){this[e].emit(i),this.options&&this.options[e]&&this.options[e](i),this.config?.overlayOptions&&(this.config?.overlayOptions)[e]&&(this.config?.overlayOptions)[e](i)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new m0(this.targetEl,e=>{(this.listener?this.listener(e,{type:"scroll",mode:this.overlayMode,valid:!0}):!0)&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",e=>{let o=!(this.targetEl&&(this.targetEl.isSameNode(e.target)||!this.isOverlayClicked&&this.targetEl.contains(e.target)))&&!this.isOverlayContentClicked;(this.listener?this.listener(e,{type:"outside",mode:this.overlayMode,valid:e.which!==3&&o}):o)&&this.hide(e),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{(this.listener?this.listener(e,{type:"resize",mode:this.overlayMode,valid:!Xg()}):!Xg())&&this.hide(e,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.document.defaultView,"keydown",e=>{if(this.overlayOptions.hideOnEscape===!1||e.code!=="Escape")return;(this.listener?this.listener(e,{type:"keydown",mode:this.overlayMode,valid:!Xg()}):!Xg())&&this.zone.run(()=>{this.hide(e,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&this.$appendTo()!=="self"&&(this.renderer.appendChild(this.el.nativeElement,this.overlayEl),Nc.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(_e(Jg),_e(_n))};static \u0275cmp=ne({type:t,selectors:[["p-overlay"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Fke,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.contentTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(Drt,5),Ri(Fke,5)),i&2){let r;Le(r=Ne())&&(o.overlayViewChild=r.first),Le(r=Ne())&&(o.contentViewChild=r.first)}},inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options",appendTo:[1,"appendTo"],hostAttrSelector:[1,"hostAttrSelector"]},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[jt([Pke]),ft],ngContentSelectors:Art,decls:1,vars:1,consts:[["overlay",""],["content",""],[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"click","ngStyle","ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&(Nn(),ee(0,Nrt,3,20,"div",2)),i&2&&E("ngIf",o.modalVisible)},dependencies:[On,Ns,Fr,Lo,vs,In],encapsulation:2,data:{animation:[xh("overlayContentAnimation",[Rc(":enter",[WI(Vrt)]),Rc(":leave",[WI(zrt)])])]},changeDetection:0})}return t})();var Lke=["content"],Urt=["item"],Hrt=["loader"],jrt=["loadericon"],Grt=["element"],$rt=["*"],Kae=(t,n)=>({$implicit:t,options:n}),qrt=t=>({numCols:t}),Bke=t=>({options:t}),Krt=()=>({styleClass:"p-virtualscroller-loading-icon"}),Wrt=(t,n)=>({rows:t,columns:n});function Yrt(t,n){t&1&&ui(0)}function Qrt(t,n){if(t&1&&(Di(0),ee(1,Yrt,1,0,"ng-container",10),Ai()),t&2){let e=P(2);T(),E("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Eo(2,Kae,e.loadedItems,e.getContentOptions()))}}function Zrt(t,n){t&1&&ui(0)}function Xrt(t,n){if(t&1&&(Di(0),ee(1,Zrt,1,0,"ng-container",10),Ai()),t&2){let e=n.$implicit,i=n.index,o=P(3);T(),E("ngTemplateOutlet",o.itemTemplate||o._itemTemplate)("ngTemplateOutletContext",Eo(2,Kae,e,o.getOptions(i)))}}function Jrt(t,n){if(t&1&&(k(0,"div",null,3),ee(2,Xrt,2,5,"ng-container",11),D()),t&2){let e=P(2);$r(e.contentStyle),Oe(e.cn(e.cx("content"),e.contentStyleClass)),Ge("data-pc-section","content"),T(2),E("ngForOf",e.loadedItems)("ngForTrackBy",e._trackBy)}}function est(t,n){if(t&1&&ce(0,"div",12),t&2){let e=P(2);Oe(e.cx("spacer")),E("ngStyle",e.spacerStyle),Ge("data-pc-section","spacer")}}function tst(t,n){t&1&&ui(0)}function ist(t,n){if(t&1&&(Di(0),ee(1,tst,1,0,"ng-container",10),Ai()),t&2){let e=n.index,i=P(4);T(),E("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",ki(4,Bke,i.getLoaderOptions(e,i.both&&ki(2,qrt,i.numItemsInViewport.cols))))}}function nst(t,n){if(t&1&&(Di(0),ee(1,ist,2,6,"ng-container",13),Ai()),t&2){let e=P(3);T(),E("ngForOf",e.loaderArr)}}function ost(t,n){t&1&&ui(0)}function rst(t,n){if(t&1&&(Di(0),ee(1,ost,1,0,"ng-container",10),Ai()),t&2){let e=P(4);T(),E("ngTemplateOutlet",e.loaderIconTemplate||e._loaderIconTemplate)("ngTemplateOutletContext",ki(3,Bke,uo(2,Krt)))}}function sst(t,n){if(t&1&&(si(),ce(0,"svg",14)),t&2){let e=P(4);Oe(e.cx("loadingIcon")),E("spin",!0),Ge("data-pc-section","loadingIcon")}}function ast(t,n){if(t&1&&ee(0,rst,2,5,"ng-container",6)(1,sst,1,4,"ng-template",null,5,Pt),t&2){let e=ti(2),i=P(3);E("ngIf",i.loaderIconTemplate||i._loaderIconTemplate)("ngIfElse",e)}}function lst(t,n){if(t&1&&(k(0,"div"),ee(1,nst,2,1,"ng-container",6)(2,ast,3,2,"ng-template",null,4,Pt),D()),t&2){let e=ti(3),i=P(2);Oe(i.cx("loader")),Ge("data-pc-section","loader"),T(),E("ngIf",i.loaderTemplate||i._loaderTemplate)("ngIfElse",e)}}function cst(t,n){if(t&1){let e=tt();Di(0),k(1,"div",7,1),ie("scroll",function(o){se(e);let r=P();return ae(r.onContainerScroll(o))}),ee(3,Qrt,2,5,"ng-container",6)(4,Jrt,3,7,"ng-template",null,2,Pt)(6,est,1,4,"div",8)(7,lst,4,5,"div",9),D(),Ai()}if(t&2){let e=ti(5),i=P();T(),Oe(i.cn(i.cx("root"),i.styleClass)),E("ngStyle",i._style),Ge("id",i._id)("tabindex",i.tabindex)("data-pc-name","scroller")("data-pc-section","root"),T(2),E("ngIf",i.contentTemplate||i._contentTemplate)("ngIfElse",e),T(3),E("ngIf",i._showSpacer),T(),E("ngIf",!i.loaderDisabled&&i._showLoader&&i.d_loading)}}function dst(t,n){t&1&&ui(0)}function ust(t,n){if(t&1&&(Di(0),ee(1,dst,1,0,"ng-container",10),Ai()),t&2){let e=P(2);T(),E("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Eo(5,Kae,e.items,Eo(2,Wrt,e._items,e.loadedColumns)))}}function pst(t,n){if(t&1&&(pn(0),ee(1,ust,2,8,"ng-container",15)),t&2){let e=P();T(),E("ngIf",e.contentTemplate||e._contentTemplate)}}var hst=` .p-virtualscroller { position: relative; overflow: auto; contain: strict; transform: translateZ(0); will-change: scroll-position; outline: 0 none; } .p-virtualscroller-content { position: absolute; top: 0; left: 0; min-height: 100%; min-width: 100%; will-change: transform; } .p-virtualscroller-spacer { position: absolute; top: 0; left: 0; height: 1px; width: 1px; transform-origin: 0 0; pointer-events: none; } .p-virtualscroller-loader { position: sticky; top: 0; left: 0; width: 100%; height: 100%; background: dt('virtualscroller.loader.mask.background'); color: dt('virtualscroller.loader.mask.color'); } .p-virtualscroller-loader-mask { display: flex; align-items: center; justify-content: center; } .p-virtualscroller-loading-icon { font-size: dt('virtualscroller.loader.icon.size'); width: dt('virtualscroller.loader.icon.size'); height: dt('virtualscroller.loader.icon.size'); } .p-virtualscroller-horizontal > .p-virtualscroller-content { display: flex; } .p-virtualscroller-inline .p-virtualscroller-content { position: static; } `,mst={root:({instance:t})=>["p-virtualscroller",{"p-virtualscroller-inline":t.inline,"p-virtualscroller-both p-both-scroll":t.both,"p-virtualscroller-horizontal p-horizontal-scroll":t.horizontal}],content:"p-virtualscroller-content",spacer:"p-virtualscroller-spacer",loader:({instance:t})=>["p-virtualscroller-loader",{"p-virtualscroller-loader-mask":!t.loaderTemplate}],loadingIcon:"p-virtualscroller-loading-icon"},Nke=(()=>{class t extends io{name="virtualscroller";theme=hst;classes=mst;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Ym=(()=>{class t extends oo{zone;get id(){return this._id}set id(e){this._id=e}get style(){return this._style}set style(e){this._style=e}get styleClass(){return this._styleClass}set styleClass(e){this._styleClass=e}get tabindex(){return this._tabindex}set tabindex(e){this._tabindex=e}get items(){return this._items}set items(e){this._items=e}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e}get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e}get scrollWidth(){return this._scrollWidth}set scrollWidth(e){this._scrollWidth=e}get orientation(){return this._orientation}set orientation(e){this._orientation=e}get step(){return this._step}set step(e){this._step=e}get delay(){return this._delay}set delay(e){this._delay=e}get resizeDelay(){return this._resizeDelay}set resizeDelay(e){this._resizeDelay=e}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=e}get inline(){return this._inline}set inline(e){this._inline=e}get lazy(){return this._lazy}set lazy(e){this._lazy=e}get disabled(){return this._disabled}set disabled(e){this._disabled=e}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(e){this._loaderDisabled=e}get columns(){return this._columns}set columns(e){this._columns=e}get showSpacer(){return this._showSpacer}set showSpacer(e){this._showSpacer=e}get showLoader(){return this._showLoader}set showLoader(e){this._showLoader=e}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(e){this._numToleratedItems=e}get loading(){return this._loading}set loading(e){this._loading=e}get autoSize(){return this._autoSize}set autoSize(e){this._autoSize=e}get trackBy(){return this._trackBy}set trackBy(e){this._trackBy=e}get options(){return this._options}set options(e){this._options=e,e&&typeof e=="object"&&(Object.entries(e).forEach(([i,o])=>this[`_${i}`]!==o&&(this[`_${i}`]=o)),Object.entries(e).forEach(([i,o])=>this[`${i}`]!==o&&(this[`${i}`]=o)))}onLazyLoad=new ve;onScroll=new ve;onScrollIndexChange=new ve;elementViewChild;contentViewChild;height;_id;_style;_styleClass;_tabindex=0;_items;_itemSize=0;_scrollHeight;_scrollWidth;_orientation="vertical";_step=0;_delay=0;_resizeDelay=10;_appendOnly=!1;_inline=!1;_lazy=!1;_disabled=!1;_loaderDisabled=!1;_columns;_showSpacer=!0;_showLoader=!1;_numToleratedItems;_loading;_autoSize=!1;_trackBy;_options;d_loading=!1;d_numToleratedItems;contentEl;contentTemplate;itemTemplate;loaderTemplate;loaderIconTemplate;templates;_contentTemplate;_itemTemplate;_loaderTemplate;_loaderIconTemplate;first=0;last=0;page=0;isRangeChanged=!1;numItemsInViewport=0;lastScrollPos=0;lazyLoadState={};loaderArr=[];spacerStyle={};contentStyle={};scrollTimeout;resizeTimeout;initialized=!1;windowResizeListener;defaultWidth;defaultHeight;defaultContentWidth;defaultContentHeight;_contentStyleClass;get contentStyleClass(){return this._contentStyleClass}set contentStyleClass(e){this._contentStyleClass=e}get vertical(){return this._orientation==="vertical"}get horizontal(){return this._orientation==="horizontal"}get both(){return this._orientation==="both"}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(e=>this._columns?e:Array.isArray(e)?e.slice(this._appendOnly?0:this.first.cols,this.last.cols):e):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}_componentStyle=re(Nke);constructor(e){super(),this.zone=e}ngOnInit(){super.ngOnInit(),this.setInitialState()}ngOnChanges(e){super.ngOnChanges(e);let i=!1;if(this.scrollHeight=="100%"&&(this.height="100%"),e.loading){let{previousValue:o,currentValue:r}=e.loading;this.lazy&&o!==r&&r!==this.d_loading&&(this.d_loading=r,i=!0)}if(e.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),e.numToleratedItems){let{previousValue:o,currentValue:r}=e.numToleratedItems;o!==r&&r!==this.d_numToleratedItems&&(this.d_numToleratedItems=r)}if(e.options){let{previousValue:o,currentValue:r}=e.options;this.lazy&&o?.loading!==r?.loading&&r?.loading!==this.d_loading&&(this.d_loading=r.loading,i=!0),o?.numToleratedItems!==r?.numToleratedItems&&r?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=r.numToleratedItems)}this.initialized&&!i&&(e.items?.previousValue?.length!==e.items?.currentValue?.length||e.itemSize||e.scrollHeight||e.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"loadericon":this._loaderIconTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}ngAfterViewInit(){super.ngAfterViewInit(),Promise.resolve().then(()=>{this.viewInit()})}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1,super.ngOnDestroy()}viewInit(){ps(this.platformId)&&!this.initialized&&Nae(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=ng(this.elementViewChild?.nativeElement),this.defaultHeight=ox(this.elementViewChild?.nativeElement),this.defaultContentWidth=ng(this.contentEl),this.defaultContentHeight=ox(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSpacerSize(),setTimeout(()=>{this.setSize()},1),this.calculateOptions(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(e){this.contentEl=e||this.contentViewChild?.nativeElement||zo(this.elementViewChild?.nativeElement,".p-virtualscroller-content")}setInitialState(){this.first=this.both?{rows:0,cols:0}:0,this.last=this.both?{rows:0,cols:0}:0,this.numItemsInViewport=this.both?{rows:0,cols:0}:0,this.lastScrollPos=this.both?{top:0,left:0}:0,(this.d_loading===void 0||this.d_loading===!1)&&(this.d_loading=this._loading||!1),this.d_numToleratedItems=this._numToleratedItems,this.loaderArr=this.loaderArr.length>0?this.loaderArr:[]}getElementRef(){return this.elementViewChild}getPageByFirst(e){return Math.floor(((e??this.first)+this.d_numToleratedItems*4)/(this._step||1))}isPageChanged(e){return this._step?this.page!==this.getPageByFirst(e??this.first):!0}scrollTo(e){this.elementViewChild?.nativeElement?.scrollTo(e)}scrollToIndex(e,i="auto"){if(this.both?e.every(r=>r>-1):e>-1){let r=this.first,{scrollTop:s=0,scrollLeft:d=0}=this.elementViewChild?.nativeElement,{numToleratedItems:m}=this.calculateNumItems(),v=this.getContentPosition(),w=this.itemSize,O=(te=0,fe)=>te<=fe?0:te,N=(te,fe,xe)=>te*fe+xe,V=(te=0,fe=0)=>this.scrollTo({left:te,top:fe,behavior:i}),$=this.both?{rows:0,cols:0}:0,q=!1,W=!1;this.both?($={rows:O(e[0],m[0]),cols:O(e[1],m[1])},V(N($.cols,w[1],v.left),N($.rows,w[0],v.top)),W=this.lastScrollPos.top!==s||this.lastScrollPos.left!==d,q=$.rows!==r.rows||$.cols!==r.cols):($=O(e,m),this.horizontal?V(N($,w,v.left),s):V(d,N($,w,v.top)),W=this.lastScrollPos!==(this.horizontal?d:s),q=$!==r),this.isRangeChanged=q,W&&(this.first=$)}}scrollInView(e,i,o="auto"){if(i){let{first:r,viewport:s}=this.getRenderedRange(),d=(w=0,O=0)=>this.scrollTo({left:w,top:O,behavior:o}),m=i==="to-start",v=i==="to-end";if(m){if(this.both)s.first.rows-r.rows>e[0]?d(s.first.cols*this._itemSize[1],(s.first.rows-1)*this._itemSize[0]):s.first.cols-r.cols>e[1]&&d((s.first.cols-1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.first-r>e){let w=(s.first-1)*this._itemSize;this.horizontal?d(w,0):d(0,w)}}else if(v){if(this.both)s.last.rows-r.rows<=e[0]+1?d(s.first.cols*this._itemSize[1],(s.first.rows+1)*this._itemSize[0]):s.last.cols-r.cols<=e[1]+1&&d((s.first.cols+1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.last-r<=e+1){let w=(s.first+1)*this._itemSize;this.horizontal?d(w,0):d(0,w)}}}else this.scrollToIndex(e,o)}getRenderedRange(){let e=(r,s)=>s||r?Math.floor(r/(s||r)):0,i=this.first,o=0;if(this.elementViewChild?.nativeElement){let{scrollTop:r,scrollLeft:s}=this.elementViewChild.nativeElement;if(this.both)i={rows:e(r,this._itemSize[0]),cols:e(s,this._itemSize[1])},o={rows:i.rows+this.numItemsInViewport.rows,cols:i.cols+this.numItemsInViewport.cols};else{let d=this.horizontal?s:r;i=e(d,this._itemSize),o=i+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:i,last:o}}}calculateNumItems(){let e=this.getContentPosition(),i=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-e.left:0)||0,o=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-e.top:0)||0,r=(v,w)=>w||v?Math.ceil(v/(w||v)):0,s=v=>Math.ceil(v/2),d=this.both?{rows:r(o,this._itemSize[0]),cols:r(i,this._itemSize[1])}:r(this.horizontal?i:o,this._itemSize),m=this.d_numToleratedItems||(this.both?[s(d.rows),s(d.cols)]:s(d));return{numItemsInViewport:d,numToleratedItems:m}}calculateOptions(){let{numItemsInViewport:e,numToleratedItems:i}=this.calculateNumItems(),o=(d,m,v,w=!1)=>this.getLast(d+m+(dArray.from({length:e.cols})):Array.from({length:e})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:r.cols}:0:r,last:Math.min(this._step?this._step:this.last,this._items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";let[e,i]=[ng(this.contentEl),ox(this.contentEl)];e!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),i!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");let[o,r]=[ng(this.elementViewChild.nativeElement),ox(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=othis.elementViewChild.nativeElement.style[s]=d;this.both||this.horizontal?(r("height",o),r("width",i)):r("height",o)}}setSpacerSize(){if(this._items){let e=this.getContentPosition(),i=(o,r,s,d=0)=>this.spacerStyle=mt(be({},this.spacerStyle),{[`${o}`]:(r||[]).length*s+d+"px"});this.both?(i("height",this._items,this._itemSize[0],e.y),i("width",this._columns||this._items[1],this._itemSize[1],e.x)):this.horizontal?i("width",this._columns||this._items,this._itemSize,e.x):i("height",this._items,this._itemSize,e.y)}}setContentPosition(e){if(this.contentEl&&!this._appendOnly){let i=e?e.first:this.first,o=(s,d)=>s*d,r=(s=0,d=0)=>this.contentStyle=mt(be({},this.contentStyle),{transform:`translate3d(${s}px, ${d}px, 0)`});if(this.both)r(o(i.cols,this._itemSize[1]),o(i.rows,this._itemSize[0]));else{let s=o(i,this._itemSize);this.horizontal?r(s,0):r(0,s)}}}onScrollPositionChange(e){let i=e.target;if(!i)throw new Error("Event target is null");let o=this.getContentPosition(),r=(W,te)=>W?W>te?W-te:W:0,s=(W,te)=>te||W?Math.floor(W/(te||W)):0,d=(W,te,fe,xe,Fe,Re)=>W<=Fe?Fe:Re?fe-xe-Fe:te+Fe-1,m=(W,te,fe,xe,Fe,Re,Se)=>W<=Re?0:Math.max(0,Se?Wte?fe:W-2*Re),v=(W,te,fe,xe,Fe,Re=!1)=>{let Se=te+xe+2*Fe;return W>=Fe&&(Se+=Fe+1),this.getLast(Se,Re)},w=r(i.scrollTop,o.top),O=r(i.scrollLeft,o.left),N=this.both?{rows:0,cols:0}:0,V=this.last,$=!1,q=this.lastScrollPos;if(this.both){let W=this.lastScrollPos.top<=w,te=this.lastScrollPos.left<=O;if(!this._appendOnly||this._appendOnly&&(W||te)){let fe={rows:s(w,this._itemSize[0]),cols:s(O,this._itemSize[1])},xe={rows:d(fe.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],W),cols:d(fe.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],te)};N={rows:m(fe.rows,xe.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],W),cols:m(fe.cols,xe.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],te)},V={rows:v(fe.rows,N.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:v(fe.cols,N.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},$=N.rows!==this.first.rows||V.rows!==this.last.rows||N.cols!==this.first.cols||V.cols!==this.last.cols||this.isRangeChanged,q={top:w,left:O}}}else{let W=this.horizontal?O:w,te=this.lastScrollPos<=W;if(!this._appendOnly||this._appendOnly&&te){let fe=s(W,this._itemSize),xe=d(fe,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,te);N=m(fe,xe,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,te),V=v(fe,N,this.last,this.numItemsInViewport,this.d_numToleratedItems),$=N!==this.first||V!==this.last||this.isRangeChanged,q=W}}return{first:N,last:V,isRangeChanged:$,scrollPos:q}}onScrollChange(e){let{first:i,last:o,isRangeChanged:r,scrollPos:s}=this.onScrollPositionChange(e);if(r){let d={first:i,last:o};if(this.setContentPosition(d),this.first=i,this.last=o,this.lastScrollPos=s,this.handleEvents("onScrollIndexChange",d),this._lazy&&this.isPageChanged(i)){let m={first:this._step?Math.min(this.getPageByFirst(i)*this._step,this._items.length-this._step):i,last:Math.min(this._step?(this.getPageByFirst(i)+1)*this._step:o,this._items.length)};(this.lazyLoadState.first!==m.first||this.lazyLoadState.last!==m.last)&&this.handleEvents("onLazyLoad",m),this.lazyLoadState=m}}}onContainerScroll(e){if(this.handleEvents("onScroll",{originalEvent:e}),this._delay){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this._showLoader){let{isRangeChanged:i}=this.onScrollPositionChange(e);(i||(this._step?this.isPageChanged():!1))&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(e),this.d_loading&&this._showLoader&&(!this._lazy||this._loading===void 0)&&(this.d_loading=!1,this.page=this.getPageByFirst()),this.cd.detectChanges()},this._delay)}else!this.d_loading&&this.onScrollChange(e)}bindResizeListener(){ps(this.platformId)&&(this.windowResizeListener||this.zone.runOutsideAngular(()=>{let e=this.document.defaultView,i=Xg()?"orientationchange":"resize";this.windowResizeListener=this.renderer.listen(e,i,this.onWindowResize.bind(this))}))}unbindResizeListener(){this.windowResizeListener&&(this.windowResizeListener(),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(Nae(this.elementViewChild?.nativeElement)){let[e,i]=[ng(this.elementViewChild?.nativeElement),ox(this.elementViewChild?.nativeElement)],[o,r]=[e!==this.defaultWidth,i!==this.defaultHeight];(this.both?o||r:this.horizontal?o:this.vertical?r:!1)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=e,this.defaultHeight=i,this.defaultContentWidth=ng(this.contentEl),this.defaultContentHeight=ox(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(e,i){return this.options&&this.options[e]?this.options[e](i):this[e].emit(i)}getContentOptions(){return{contentStyleClass:`p-virtualscroller-content ${this.d_loading?"p-virtualscroller-loading":""}`,items:this.loadedItems,getItemOptions:e=>this.getOptions(e),loading:this.d_loading,getLoaderOptions:(e,i)=>this.getLoaderOptions(e,i),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both,scrollTo:this.scrollTo.bind(this),scrollToIndex:this.scrollToIndex.bind(this),orientation:this._orientation,scrollableElement:this.elementViewChild?.nativeElement}}getOptions(e){let i=(this._items||[]).length,o=this.both?this.first.rows+e:this.first+e;return{index:o,count:i,first:o===0,last:o===i-1,even:o%2===0,odd:o%2!==0}}getLoaderOptions(e,i){let o=this.loaderArr.length;return be({index:e,count:o,first:e===0,last:e===o-1,even:e%2===0,odd:e%2!==0,loading:this.d_loading},i)}static \u0275fac=function(i){return new(i||t)(_e(_n))};static \u0275cmp=ne({type:t,selectors:[["p-scroller"],["p-virtualscroller"],["p-virtual-scroller"],["p-virtualScroller"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Lke,4),xt(r,Urt,4),xt(r,Hrt,4),xt(r,jrt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.contentTemplate=s.first),Le(s=Ne())&&(o.itemTemplate=s.first),Le(s=Ne())&&(o.loaderTemplate=s.first),Le(s=Ne())&&(o.loaderIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(Grt,5),Ri(Lke,5)),i&2){let r;Le(r=Ne())&&(o.elementViewChild=r.first),Le(r=Ne())&&(o.contentViewChild=r.first)}},hostVars:2,hostBindings:function(i,o){i&2&&Ir("height",o.height)},inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[jt([Nke]),ft,Ot],ngContentSelectors:$rt,decls:3,vars:2,consts:[["disabledContainer",""],["element",""],["buildInContent",""],["content",""],["buildInLoader",""],["buildInLoaderIcon",""],[4,"ngIf","ngIfElse"],[3,"scroll","ngStyle"],[3,"class","ngStyle",4,"ngIf"],[3,"class",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle"],[4,"ngFor","ngForOf"],["data-p-icon","spinner",3,"spin"],[4,"ngIf"]],template:function(i,o){if(i&1&&(Nn(),ee(0,cst,8,11,"ng-container",6)(1,pst,2,1,"ng-template",null,0,Pt)),i&2){let r=ti(2);E("ngIf",!o._disabled)("ngIfElse",r)}},dependencies:[On,Gc,Fr,Lo,vs,og,In],encapsulation:2})}return t})(),Wae=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Ym,In,In]})}return t})();var Vke=` .p-tooltip { position: absolute; display: none; max-width: dt('tooltip.max.width'); } .p-tooltip-right, .p-tooltip-left { padding: 0 dt('tooltip.gutter'); } .p-tooltip-top, .p-tooltip-bottom { padding: dt('tooltip.gutter') 0; } .p-tooltip-text { white-space: pre-line; word-break: break-word; background: dt('tooltip.background'); color: dt('tooltip.color'); padding: dt('tooltip.padding'); box-shadow: dt('tooltip.shadow'); border-radius: dt('tooltip.border.radius'); } .p-tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .p-tooltip-right .p-tooltip-arrow { margin-top: calc(-1 * dt('tooltip.gutter')); border-width: dt('tooltip.gutter') dt('tooltip.gutter') dt('tooltip.gutter') 0; border-right-color: dt('tooltip.background'); } .p-tooltip-left .p-tooltip-arrow { margin-top: calc(-1 * dt('tooltip.gutter')); border-width: dt('tooltip.gutter') 0 dt('tooltip.gutter') dt('tooltip.gutter'); border-left-color: dt('tooltip.background'); } .p-tooltip-top .p-tooltip-arrow { margin-left: calc(-1 * dt('tooltip.gutter')); border-width: dt('tooltip.gutter') dt('tooltip.gutter') 0 dt('tooltip.gutter'); border-top-color: dt('tooltip.background'); border-bottom-color: dt('tooltip.background'); } .p-tooltip-bottom .p-tooltip-arrow { margin-left: calc(-1 * dt('tooltip.gutter')); border-width: 0 dt('tooltip.gutter') dt('tooltip.gutter') dt('tooltip.gutter'); border-top-color: dt('tooltip.background'); border-bottom-color: dt('tooltip.background'); } `;var gst={root:"p-tooltip p-component",arrow:"p-tooltip-arrow",text:"p-tooltip-text"},zke=(()=>{class t extends io{name="tooltip";theme=Vke;classes=gst;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var gy=(()=>{class t extends oo{zone;viewContainer;tooltipPosition;tooltipEvent="hover";positionStyle;tooltipStyleClass;tooltipZIndex;escape=!0;showDelay;hideDelay;life;positionTop;positionLeft;autoHide=!0;fitContent=!0;hideOnEscape=!0;content;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.deactivate()}tooltipOptions;appendTo=mo(void 0);$appendTo=bo(()=>this.appendTo()||this.config.overlayAppendTo());_tooltipOptions={tooltipLabel:null,tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",positionStyle:null,tooltipStyleClass:null,tooltipZIndex:"auto",escape:!0,disabled:null,showDelay:null,hideDelay:null,positionTop:null,positionLeft:null,life:null,autoHide:!0,hideOnEscape:!0,id:Vr("pn_id_")+"_tooltip"};_disabled;container;styleClass;tooltipText;showTimeout;hideTimeout;active;mouseEnterListener;mouseLeaveListener;containerMouseleaveListener;clickListener;focusListener;blurListener;documentEscapeListener;scrollHandler;resizeListener;_componentStyle=re(zke);interactionInProgress=!1;constructor(e,i){super(),this.zone=e,this.viewContainer=i}ngAfterViewInit(){super.ngAfterViewInit(),ps(this.platformId)&&this.zone.runOutsideAngular(()=>{let e=this.getOption("tooltipEvent");if((e==="hover"||e==="both")&&(this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener)),e==="focus"||e==="both"){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let i=this.el.nativeElement.querySelector(".p-component");i||(i=this.getTarget(this.el.nativeElement)),i.addEventListener("focus",this.focusListener),i.addEventListener("blur",this.blurListener)}})}ngOnChanges(e){super.ngOnChanges(e),e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.content&&(this.setOption({tooltipLabel:e.content.currentValue}),this.active&&(e.content.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.autoHide&&this.setOption({autoHide:e.autoHide.currentValue}),e.id&&this.setOption({id:e.id.currentValue}),e.tooltipOptions&&(this._tooltipOptions=be(be({},this._tooltipOptions),e.tooltipOptions.currentValue),this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}isAutoHide(){return this.getOption("autoHide")}onMouseEnter(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){this.isAutoHide()?this.deactivate():!(Fc(e.relatedTarget,"p-tooltip")||Fc(e.relatedTarget,"p-tooltip-text")||Fc(e.relatedTarget,"p-tooltip-arrow"))&&this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onInputClick(e){this.deactivate()}activate(){if(!this.interactionInProgress){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}this.getOption("hideOnEscape")&&(this.documentEscapeListener=this.renderer.listen("document","keydown.escape",()=>{this.deactivate(),this.documentEscapeListener()})),this.interactionInProgress=!0}}deactivate(){this.interactionInProgress=!1,this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide(),this.documentEscapeListener&&this.documentEscapeListener()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div"),this.container.setAttribute("id",this.getOption("id")),this.container.setAttribute("role","tooltip");let e=document.createElement("div");e.className="p-tooltip-arrow",e.setAttribute("data-pc-section","arrow"),this.container.appendChild(e),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),this.getOption("appendTo")==="body"?document.body.appendChild(this.container):this.getOption("appendTo")==="target"?Zv(this.container,this.el.nativeElement):Zv(this.getOption("appendTo"),this.container),this.container.style.display="none",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()?this.container.style.pointerEvents="none":(this.container.style.pointerEvents="unset",this.bindContainerMouseleaveListener())}bindContainerMouseleaveListener(){if(!this.containerMouseleaveListener){let e=this.container??this.container.nativeElement;this.containerMouseleaveListener=this.renderer.listen(e,"mouseleave",i=>{this.deactivate()})}}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){if(!this.getOption("tooltipLabel")||this.getOption("disabled"))return;this.create(),this.el.nativeElement.closest("p-dialog")?setTimeout(()=>{this.container&&(this.container.style.display="inline-block"),this.container&&this.align()},100):(this.container.style.display="inline-block",this.align()),_Ae(this.container,250),this.getOption("tooltipZIndex")==="auto"?Nc.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener()}hide(){this.getOption("tooltipZIndex")==="auto"&&Nc.clear(this.container),this.remove()}updateText(){let e=this.getOption("tooltipLabel");if(e instanceof jc){let i=this.viewContainer.createEmbeddedView(e);i.detectChanges(),i.rootNodes.forEach(o=>this.tooltipText.appendChild(o))}else this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(e))):this.tooltipText.innerHTML=e}align(){let e=this.getOption("tooltipPosition"),i={top:[this.alignTop,this.alignBottom,this.alignRight,this.alignLeft],bottom:[this.alignBottom,this.alignTop,this.alignRight,this.alignLeft],left:[this.alignLeft,this.alignRight,this.alignTop,this.alignBottom],right:[this.alignRight,this.alignLeft,this.alignTop,this.alignBottom]};for(let[o,r]of i[e].entries())if(o===0)r.call(this);else if(this.isOutOfBounds())r.call(this);else break}getHostOffset(){if(this.getOption("appendTo")==="body"||this.getOption("appendTo")==="target"){let e=this.el.nativeElement.getBoundingClientRect(),i=e.left+ez(),o=e.top+tz();return{left:i,top:o}}else return{left:0,top:0}}get activeElement(){return this.el.nativeElement.nodeName.startsWith("P-")?zo(this.el.nativeElement,".p-component"):this.el.nativeElement}alignRight(){this.preAlign("right");let e=this.activeElement,i=qc(e),o=(qm(e)-qm(this.container))/2;this.alignTooltip(i,o);let r=this.getArrowElement();r.style.top="50%",r.style.right=null,r.style.bottom=null,r.style.left="0"}alignLeft(){this.preAlign("left");let e=this.getArrowElement(),i=qc(this.container),o=(qm(this.el.nativeElement)-qm(this.container))/2;this.alignTooltip(-i,o),e.style.top="50%",e.style.right="0",e.style.bottom=null,e.style.left=null}alignTop(){this.preAlign("top");let e=this.getArrowElement(),i=this.getHostOffset(),o=qc(this.container),r=(qc(this.el.nativeElement)-qc(this.container))/2,s=qm(this.container);this.alignTooltip(r,-s);let d=i.left-this.getHostOffset().left+o/2;e.style.top=null,e.style.right=null,e.style.bottom="0",e.style.left=d+"px"}getArrowElement(){return zo(this.container,'[data-pc-section="arrow"]')}alignBottom(){this.preAlign("bottom");let e=this.getArrowElement(),i=qc(this.container),o=this.getHostOffset(),r=(qc(this.el.nativeElement)-qc(this.container))/2,s=qm(this.el.nativeElement);this.alignTooltip(r,s);let d=o.left-this.getHostOffset().left+i/2;e.style.top="0",e.style.right=null,e.style.bottom=null,e.style.left=d+"px"}alignTooltip(e,i){let o=this.getHostOffset(),r=o.left+e,s=o.top+i;this.container.style.left=r+this.getOption("positionLeft")+"px",this.container.style.top=s+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions=be(be({},this._tooltipOptions),e)}getOption(e){return this._tooltipOptions[e]}getTarget(e){return Fc(e,"p-inputwrapper")?zo(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let e=this.container.getBoundingClientRect(),i=e.top,o=e.left,r=qc(this.container),s=qm(this.container),d=YI();return o+r>d.width||o<0||i<0||i+s>d.height}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new m0(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){let e=this.getOption("tooltipEvent");if((e==="hover"||e==="both")&&(this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener)),e==="focus"||e==="both"){let i=this.el.nativeElement.querySelector(".p-component");i||(i=this.getTarget(this.el.nativeElement)),i.removeEventListener("focus",this.focusListener),i.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&(this.getOption("appendTo")==="body"?document.body.removeChild(this.container):this.getOption("appendTo")==="target"?this.el.nativeElement.removeChild(this.container):xAe(this.getOption("appendTo"),this.container)),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.unbindContainerMouseleaveListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),super.ngOnDestroy(),this.container&&Nc.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.documentEscapeListener&&this.documentEscapeListener()}static \u0275fac=function(i){return new(i||t)(_e(_n),_e(nc))};static \u0275dir=rn({type:t,selectors:[["","pTooltip",""]],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:[2,"escape","escape",je],showDelay:[2,"showDelay","showDelay",ln],hideDelay:[2,"hideDelay","hideDelay",ln],life:[2,"life","life",ln],positionTop:[2,"positionTop","positionTop",ln],positionLeft:[2,"positionLeft","positionLeft",ln],autoHide:[2,"autoHide","autoHide",je],fitContent:[2,"fitContent","fitContent",je],hideOnEscape:[2,"hideOnEscape","hideOnEscape",je],content:[0,"pTooltip","content"],disabled:[0,"tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions",appendTo:[1,"appendTo"]},features:[jt([zke]),ft,Ot]})}return t})(),dz=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({})}return t})();var Hke=` .p-select { display: inline-flex; cursor: pointer; position: relative; user-select: none; background: dt('select.background'); border: 1px solid dt('select.border.color'); transition: background dt('select.transition.duration'), color dt('select.transition.duration'), border-color dt('select.transition.duration'), outline-color dt('select.transition.duration'), box-shadow dt('select.transition.duration'); border-radius: dt('select.border.radius'); outline-color: transparent; box-shadow: dt('select.shadow'); } .p-select:not(.p-disabled):hover { border-color: dt('select.hover.border.color'); } .p-select:not(.p-disabled).p-focus { border-color: dt('select.focus.border.color'); box-shadow: dt('select.focus.ring.shadow'); outline: dt('select.focus.ring.width') dt('select.focus.ring.style') dt('select.focus.ring.color'); outline-offset: dt('select.focus.ring.offset'); } .p-select.p-variant-filled { background: dt('select.filled.background'); } .p-select.p-variant-filled:not(.p-disabled):hover { background: dt('select.filled.hover.background'); } .p-select.p-variant-filled:not(.p-disabled).p-focus { background: dt('select.filled.focus.background'); } .p-select.p-invalid { border-color: dt('select.invalid.border.color'); } .p-select.p-disabled { opacity: 1; background: dt('select.disabled.background'); } .p-select-clear-icon { position: absolute; top: 50%; margin-top: -0.5rem; color: dt('select.clear.icon.color'); inset-inline-end: dt('select.dropdown.width'); } .p-select-dropdown { display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: transparent; color: dt('select.dropdown.color'); width: dt('select.dropdown.width'); border-start-end-radius: dt('select.border.radius'); border-end-end-radius: dt('select.border.radius'); } .p-select-label { display: block; white-space: nowrap; overflow: hidden; flex: 1 1 auto; width: 1%; padding: dt('select.padding.y') dt('select.padding.x'); text-overflow: ellipsis; cursor: pointer; color: dt('select.color'); background: transparent; border: 0 none; outline: 0 none; font-size: 1rem; } .p-select-label.p-placeholder { color: dt('select.placeholder.color'); } .p-select.p-invalid .p-select-label.p-placeholder { color: dt('select.invalid.placeholder.color'); } .p-select:has(.p-select-clear-icon) .p-select-label { padding-inline-end: calc(1rem + dt('select.padding.x')); } .p-select.p-disabled .p-select-label { color: dt('select.disabled.color'); } .p-select-label-empty { overflow: hidden; opacity: 0; } input.p-select-label { cursor: default; } .p-select-overlay { position: absolute; top: 0; left: 0; background: dt('select.overlay.background'); color: dt('select.overlay.color'); border: 1px solid dt('select.overlay.border.color'); border-radius: dt('select.overlay.border.radius'); box-shadow: dt('select.overlay.shadow'); min-width: 100%; } .p-select-header { padding: dt('select.list.header.padding'); } .p-select-filter { width: 100%; } .p-select-list-container { overflow: auto; } .p-select-option-group { cursor: auto; margin: 0; padding: dt('select.option.group.padding'); background: dt('select.option.group.background'); color: dt('select.option.group.color'); font-weight: dt('select.option.group.font.weight'); } .p-select-list { margin: 0; padding: 0; list-style-type: none; padding: dt('select.list.padding'); gap: dt('select.list.gap'); display: flex; flex-direction: column; } .p-select-option { cursor: pointer; font-weight: normal; white-space: nowrap; position: relative; overflow: hidden; display: flex; align-items: center; padding: dt('select.option.padding'); border: 0 none; color: dt('select.option.color'); background: transparent; transition: background dt('select.transition.duration'), color dt('select.transition.duration'), border-color dt('select.transition.duration'), box-shadow dt('select.transition.duration'), outline-color dt('select.transition.duration'); border-radius: dt('select.option.border.radius'); } .p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus { background: dt('select.option.focus.background'); color: dt('select.option.focus.color'); } .p-select-option.p-select-option-selected { background: dt('select.option.selected.background'); color: dt('select.option.selected.color'); } .p-select-option.p-select-option-selected.p-focus { background: dt('select.option.selected.focus.background'); color: dt('select.option.selected.focus.color'); } .p-select-option-blank-icon { flex-shrink: 0; } .p-select-option-check-icon { position: relative; flex-shrink: 0; margin-inline-start: dt('select.checkmark.gutter.start'); margin-inline-end: dt('select.checkmark.gutter.end'); color: dt('select.checkmark.color'); } .p-select-empty-message { padding: dt('select.empty.message.padding'); } .p-select-fluid { display: flex; width: 100%; } .p-select-sm .p-select-label { font-size: dt('select.sm.font.size'); padding-block: dt('select.sm.padding.y'); padding-inline: dt('select.sm.padding.x'); } .p-select-sm .p-select-dropdown .p-icon { font-size: dt('select.sm.font.size'); width: dt('select.sm.font.size'); height: dt('select.sm.font.size'); } .p-select-lg .p-select-label { font-size: dt('select.lg.font.size'); padding-block: dt('select.lg.padding.y'); padding-inline: dt('select.lg.padding.x'); } .p-select-lg .p-select-dropdown .p-icon { font-size: dt('select.lg.font.size'); width: dt('select.lg.font.size'); height: dt('select.lg.font.size'); } `;var uz=t=>({height:t}),Yae=t=>({$implicit:t});function _st(t,n){if(t&1&&(si(),ce(0,"svg",5)),t&2){let e=P(2);Oe(e.cx("optionCheckIcon"))}}function yst(t,n){if(t&1&&(si(),ce(0,"svg",6)),t&2){let e=P(2);Oe(e.cx("optionBlankIcon"))}}function vst(t,n){if(t&1&&(Di(0),ee(1,_st,1,2,"svg",3)(2,yst,1,2,"svg",4),Ai()),t&2){let e=P();T(),E("ngIf",e.selected),T(),E("ngIf",!e.selected)}}function bst(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P();T(),dt(e.label??"empty")}}function Cst(t,n){t&1&&ui(0)}var xst=["item"],wst=["group"],Sst=["loader"],Tst=["selectedItem"],Ist=["header"],jke=["filter"],Est=["footer"],Dst=["emptyfilter"],Ast=["empty"],kst=["dropdownicon"],Mst=["loadingicon"],Ost=["clearicon"],Rst=["filtericon"],Fst=["onicon"],Pst=["officon"],Lst=["cancelicon"],Nst=["focusInput"],Bst=["editableInput"],Vst=["items"],zst=["scroller"],Ust=["overlay"],Hst=["firstHiddenFocusableEl"],jst=["lastHiddenFocusableEl"],Gke=t=>({class:t}),$ke=t=>({options:t}),qke=(t,n)=>({$implicit:t,options:n}),Gst=()=>({});function $st(t,n){if(t&1&&(Di(0),Q(1),Ai()),t&2){let e=P(2);T(),dt(e.label()==="p-emptylabel"?"\xA0":e.label())}}function qst(t,n){if(t&1&&ui(0,24),t&2){let e=P(2);E("ngTemplateOutlet",e.selectedItemTemplate||e._selectedItemTemplate)("ngTemplateOutletContext",ki(2,Yae,e.selectedOption))}}function Kst(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(3);T(),dt(e.label()==="p-emptylabel"?"\xA0":e.label())}}function Wst(t,n){if(t&1&&ee(0,Kst,2,1,"span",18),t&2){let e=P(2);E("ngIf",e.isSelectedOptionEmpty())}}function Yst(t,n){if(t&1){let e=tt();k(0,"span",22,3),ie("focus",function(o){se(e);let r=P();return ae(r.onInputFocus(o))})("blur",function(o){se(e);let r=P();return ae(r.onInputBlur(o))})("keydown",function(o){se(e);let r=P();return ae(r.onKeyDown(o))}),ee(2,$st,2,1,"ng-container",20)(3,qst,1,4,"ng-container",23)(4,Wst,1,1,"ng-template",null,4,Pt),D()}if(t&2){let e=ti(5),i=P();Oe(i.cx("label")),E("pTooltip",i.tooltip)("tooltipPosition",i.tooltipPosition)("positionStyle",i.tooltipPositionStyle)("tooltipStyleClass",i.tooltipStyleClass)("pAutoFocus",i.autofocus),Ge("aria-disabled",i.$disabled())("id",i.inputId)("aria-label",i.ariaLabel||(i.label()==="p-emptylabel"?void 0:i.label()))("aria-labelledby",i.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",i.overlayVisible??!1)("aria-controls",i.overlayVisible?i.id+"_list":null)("tabindex",i.$disabled()?-1:i.tabindex)("aria-activedescendant",i.focused?i.focusedOptionId:void 0)("aria-required",i.required())("required",i.required()?"":void 0)("disabled",i.$disabled()?"":void 0),T(2),E("ngIf",!i.selectedItemTemplate&&!i._selectedItemTemplate)("ngIfElse",e),T(),E("ngIf",(i.selectedItemTemplate||i._selectedItemTemplate)&&!i.isSelectedOptionEmpty())}}function Qst(t,n){if(t&1){let e=tt();k(0,"input",25,5),ie("input",function(o){se(e);let r=P();return ae(r.onEditableInput(o))})("keydown",function(o){se(e);let r=P();return ae(r.onKeyDown(o))})("focus",function(o){se(e);let r=P();return ae(r.onInputFocus(o))})("blur",function(o){se(e);let r=P();return ae(r.onInputBlur(o))}),D()}if(t&2){let e=P();Oe(e.cx("label")),E("pAutoFocus",e.autofocus),Ge("id",e.inputId)("aria-haspopup","listbox")("placeholder",e.modelValue()===void 0||e.modelValue()===null?e.placeholder():void 0)("aria-label",e.ariaLabel||(e.label()==="p-emptylabel"?void 0:e.label()))("aria-activedescendant",e.focused?e.focusedOptionId:void 0)("name",e.name())("minlength",e.minlength())("min",e.min())("max",e.max())("pattern",e.pattern())("size",e.inputSize())("maxlength",e.maxlength())("required",e.required()?"":void 0)("readonly",e.readonly?"":void 0)("disabled",e.$disabled()?"":void 0)}}function Zst(t,n){if(t&1){let e=tt();si(),k(0,"svg",28),ie("click",function(o){se(e);let r=P(2);return ae(r.clear(o))}),D()}if(t&2){let e=P(2);Oe(e.cx("clearIcon")),Ge("data-pc-section","clearicon")}}function Xst(t,n){}function Jst(t,n){t&1&&ee(0,Xst,0,0,"ng-template")}function eat(t,n){if(t&1){let e=tt();k(0,"span",29),ie("click",function(o){se(e);let r=P(2);return ae(r.clear(o))}),ee(1,Jst,1,0,null,30),D()}if(t&2){let e=P(2);Oe(e.cx("clearIcon")),Ge("data-pc-section","clearicon"),T(),E("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)("ngTemplateOutletContext",ki(5,Gke,e.cx("clearIcon")))}}function tat(t,n){if(t&1&&(Di(0),ee(1,Zst,1,3,"svg",26)(2,eat,2,7,"span",27),Ai()),t&2){let e=P();T(),E("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),T(),E("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function iat(t,n){t&1&&ui(0)}function nat(t,n){if(t&1&&(Di(0),ee(1,iat,1,0,"ng-container",31),Ai()),t&2){let e=P(2);T(),E("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function oat(t,n){if(t&1&&ce(0,"span",33),t&2){let e=P(3);Oe(e.cn(e.cx("loadingIcon"),"pi-spin"+e.loadingIcon))}}function rat(t,n){if(t&1&&ce(0,"span",33),t&2){let e=P(3);Oe(e.cn(e.cx("loadingIcon"),"pi pi-spinner pi-spin"))}}function sat(t,n){if(t&1&&(Di(0),ee(1,oat,1,2,"span",32)(2,rat,1,2,"span",32),Ai()),t&2){let e=P(2);T(),E("ngIf",e.loadingIcon),T(),E("ngIf",!e.loadingIcon)}}function aat(t,n){if(t&1&&(Di(0),ee(1,nat,2,1,"ng-container",18)(2,sat,3,2,"ng-container",18),Ai()),t&2){let e=P();T(),E("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),T(),E("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function lat(t,n){if(t&1&&ce(0,"span"),t&2){let e=P(3);Oe(e.cn(e.cx("dropdownIcon"),e.dropdownIcon))}}function cat(t,n){if(t&1&&(si(),ce(0,"svg",36)),t&2){let e=P(3);Oe(e.cx("dropdownIcon"))}}function dat(t,n){if(t&1&&(Di(0),ee(1,lat,1,2,"span",34)(2,cat,1,2,"svg",35),Ai()),t&2){let e=P(2);T(),E("ngIf",e.dropdownIcon),T(),E("ngIf",!e.dropdownIcon)}}function uat(t,n){}function pat(t,n){t&1&&ee(0,uat,0,0,"ng-template")}function hat(t,n){if(t&1&&(k(0,"span"),ee(1,pat,1,0,null,30),D()),t&2){let e=P(2);Oe(e.cx("dropdownIcon")),T(),E("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)("ngTemplateOutletContext",ki(4,Gke,e.cx("dropdownIcon")))}}function mat(t,n){if(t&1&&ee(0,dat,3,2,"ng-container",18)(1,hat,2,6,"span",34),t&2){let e=P();E("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),T(),E("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function fat(t,n){t&1&&ui(0)}function gat(t,n){t&1&&ui(0)}function _at(t,n){if(t&1&&(Di(0),ee(1,gat,1,0,"ng-container",30),Ai()),t&2){let e=P(3);T(),E("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",ki(2,$ke,e.filterOptions))}}function yat(t,n){t&1&&(si(),ce(0,"svg",42))}function vat(t,n){}function bat(t,n){t&1&&ee(0,vat,0,0,"ng-template")}function Cat(t,n){if(t&1&&(k(0,"span"),ee(1,bat,1,0,null,31),D()),t&2){let e=P(4);T(),E("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function xat(t,n){if(t&1){let e=tt();k(0,"p-iconfield")(1,"input",40,10),ie("input",function(o){se(e);let r=P(3);return ae(r.onFilterInputChange(o))})("keydown",function(o){se(e);let r=P(3);return ae(r.onFilterKeyDown(o))})("blur",function(o){se(e);let r=P(3);return ae(r.onFilterBlur(o))}),D(),k(3,"p-inputicon"),ee(4,yat,1,0,"svg",41)(5,Cat,2,1,"span",18),D()()}if(t&2){let e=P(3);T(),Oe(e.cx("pcFilter")),E("pSize",e.size())("value",e._filterValue()||"")("variant",e.$variant()),Ge("placeholder",e.filterPlaceholder)("aria-owns",e.id+"_list")("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.focusedOptionId),T(3),E("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),T(),E("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function wat(t,n){if(t&1){let e=tt();k(0,"div",29),ie("click",function(o){return se(e),ae(o.stopPropagation())}),ee(1,_at,2,4,"ng-container",20)(2,xat,6,11,"ng-template",null,9,Pt),D()}if(t&2){let e=ti(3),i=P(2);Oe(i.cx("header")),T(),E("ngIf",i.filterTemplate||i._filterTemplate)("ngIfElse",e)}}function Sat(t,n){t&1&&ui(0)}function Tat(t,n){if(t&1&&ee(0,Sat,1,0,"ng-container",30),t&2){let e=n.$implicit,i=n.options;P(2);let o=ti(9);E("ngTemplateOutlet",o)("ngTemplateOutletContext",Eo(2,qke,e,i))}}function Iat(t,n){t&1&&ui(0)}function Eat(t,n){if(t&1&&ee(0,Iat,1,0,"ng-container",30),t&2){let e=n.options,i=P(4);E("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",ki(2,$ke,e))}}function Dat(t,n){t&1&&(Di(0),ee(1,Eat,1,4,"ng-template",null,12,Pt),Ai())}function Aat(t,n){if(t&1){let e=tt();k(0,"p-scroller",43,11),ie("onLazyLoad",function(o){se(e);let r=P(2);return ae(r.onLazyLoad.emit(o))}),ee(2,Tat,1,5,"ng-template",null,2,Pt)(4,Dat,3,0,"ng-container",18),D()}if(t&2){let e=P(2);$r(ki(8,uz,e.scrollHeight)),E("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),T(4),E("ngIf",e.loaderTemplate||e._loaderTemplate)}}function kat(t,n){t&1&&ui(0)}function Mat(t,n){if(t&1&&(Di(0),ee(1,kat,1,0,"ng-container",30),Ai()),t&2){P();let e=ti(9),i=P();T(),E("ngTemplateOutlet",e)("ngTemplateOutletContext",Eo(3,qke,i.visibleOptions(),uo(2,Gst)))}}function Oat(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(2).$implicit,i=P(3);T(),dt(i.getOptionGroupLabel(e.optionGroup))}}function Rat(t,n){t&1&&ui(0)}function Fat(t,n){if(t&1&&(Di(0),k(1,"li",47),ee(2,Oat,2,1,"span",18)(3,Rat,1,0,"ng-container",30),D(),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P().options,s=P(2);T(),Oe(s.cx("optionGroup")),E("ngStyle",ki(7,uz,r.itemSize+"px")),Ge("id",s.id+"_"+s.getOptionIndex(o,r)),T(),E("ngIf",!s.groupTemplate&&!s._groupTemplate),T(),E("ngTemplateOutlet",s.groupTemplate||s._groupTemplate)("ngTemplateOutletContext",ki(9,Yae,i.optionGroup))}}function Pat(t,n){if(t&1){let e=tt();Di(0),k(1,"p-selectItem",48),ie("onClick",function(o){se(e);let r=P().$implicit,s=P(3);return ae(s.onOptionSelect(o,r))})("onMouseEnter",function(o){se(e);let r=P().index,s=P().options,d=P(2);return ae(d.onOptionMouseEnter(o,d.getOptionIndex(r,s)))}),D(),Ai()}if(t&2){let e=P(),i=e.$implicit,o=e.index,r=P().options,s=P(2);T(),E("id",s.id+"_"+s.getOptionIndex(o,r))("option",i)("checkmark",s.checkmark)("selected",s.isSelected(i))("label",s.getOptionLabel(i))("disabled",s.isOptionDisabled(i))("template",s.itemTemplate||s._itemTemplate)("focused",s.focusedOptionIndex()===s.getOptionIndex(o,r)),Cc("ariaPosInset",s.getAriaPosInset(s.getOptionIndex(o,r)))("ariaSetSize",s.ariaSetSize)}}function Lat(t,n){if(t&1&&ee(0,Fat,4,11,"ng-container",18)(1,Pat,2,10,"ng-container",18),t&2){let e=n.$implicit,i=P(3);E("ngIf",i.isOptionGroup(e)),T(),E("ngIf",!i.isOptionGroup(e))}}function Nat(t,n){if(t&1&&Q(0),t&2){let e=P(4);Qi(" ",e.emptyFilterMessageLabel," ")}}function Bat(t,n){t&1&&ui(0,null,14)}function Vat(t,n){if(t&1&&ee(0,Bat,2,0,"ng-container",31),t&2){let e=P(4);E("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e.emptyTemplate||e._emptyTemplate)}}function zat(t,n){if(t&1&&(k(0,"li",47),qe(1,Nat,1,1)(2,Vat,1,1,"ng-container"),D()),t&2){let e=P().options,i=P(2);Oe(i.cx("emptyMessage")),E("ngStyle",ki(4,uz,e.itemSize+"px")),T(),Ke(!i.emptyFilterTemplate&&!i._emptyFilterTemplate&&!i.emptyTemplate?1:2)}}function Uat(t,n){if(t&1&&Q(0),t&2){let e=P(4);Qi(" ",e.emptyFilterMessageLabel||e.emptyMessageLabel," ")}}function Hat(t,n){t&1&&ui(0,null,15)}function jat(t,n){if(t&1&&ee(0,Hat,2,0,"ng-container",31),t&2){let e=P(4);E("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function Gat(t,n){if(t&1&&(k(0,"li",47),qe(1,Uat,1,1)(2,jat,1,1,"ng-container"),D()),t&2){let e=P().options,i=P(2);Oe(i.cx("emptyMessage")),E("ngStyle",ki(4,uz,e.itemSize+"px")),T(),Ke(!i.emptyTemplate&&!i._emptyTemplate?1:2)}}function $at(t,n){if(t&1&&(k(0,"ul",44,13),ee(2,Lat,2,2,"ng-template",45)(3,zat,3,6,"li",46)(4,Gat,3,6,"li",46),D()),t&2){let e=n.$implicit,i=n.options,o=P(2);$r(i.contentStyle),Oe(o.cn(o.cx("list"),i.contentStyleClass)),Ge("id",o.id+"_list")("aria-label",o.listLabel),T(2),E("ngForOf",e),T(),E("ngIf",o.filterValue&&o.isEmpty()),T(),E("ngIf",!o.filterValue&&o.isEmpty())}}function qat(t,n){t&1&&ui(0)}function Kat(t,n){if(t&1){let e=tt();k(0,"div",37)(1,"span",38,6),ie("focus",function(o){se(e);let r=P();return ae(r.onFirstHiddenFocus(o))}),D(),ee(3,fat,1,0,"ng-container",31)(4,wat,4,4,"div",27),k(5,"div"),ee(6,Aat,5,10,"p-scroller",39)(7,Mat,2,6,"ng-container",18)(8,$at,5,9,"ng-template",null,7,Pt),D(),ee(10,qat,1,0,"ng-container",31),k(11,"span",38,8),ie("focus",function(o){se(e);let r=P();return ae(r.onLastHiddenFocus(o))}),D()()}if(t&2){let e=P();Oe(e.cn(e.cx("overlay"),e.panelStyleClass)),E("ngStyle",e.panelStyle),T(),Ge("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),T(2),E("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),T(),E("ngIf",e.filter),T(),Oe(e.cx("listContainer")),Ir("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),T(),E("ngIf",e.virtualScroll),T(),E("ngIf",!e.virtualScroll),T(3),E("ngTemplateOutlet",e.footerTemplate||e._footerTemplate),T(),Ge("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var Wat=` ${Hke} /* For PrimeNG */ .p-select-label.p-placeholder { color: dt('select.placeholder.color'); } .p-select.ng-invalid.ng-dirty { border-color: dt('select.invalid.border.color'); } .p-dropdown.ng-invalid.ng-dirty .p-dropdown-label.p-placeholder, .p-select.ng-invalid.ng-dirty .p-select-label.p-placeholder { color: dt('select.invalid.placeholder.color'); } `,Yat={root:({instance:t})=>["p-select p-component p-inputwrapper",{"p-disabled":t.$disabled(),"p-variant-filled":t.$variant()==="filled","p-focus":t.focused,"p-invalid":t.invalid(),"p-inputwrapper-filled":t.$filled(),"p-inputwrapper-focus":t.focused||t.overlayVisible,"p-select-open":t.overlayVisible,"p-select-fluid":t.hasFluid,"p-select-sm p-inputfield-sm":t.size()==="small","p-select-lg p-inputfield-lg":t.size()==="large"}],label:({instance:t})=>["p-select-label",{"p-placeholder":t.placeholder()&&t.label()===t.placeholder(),"p-select-label-empty":!t.editable&&!t.selectedItemTemplate&&(t.label()===void 0||t.label()===null||t.label()==="p-emptylabel"||t.label().length===0)}],clearIcon:"p-select-clear-icon",dropdown:"p-select-dropdown",loadingIcon:"p-select-loading-icon",dropdownIcon:"p-select-dropdown-icon",overlay:"p-select-overlay p-component-overlay p-component",header:"p-select-header",pcFilter:"p-select-filter",listContainer:"p-select-list-container",list:"p-select-list",optionGroup:"p-select-option-group",optionGroupLabel:"p-select-option-group-label",option:({instance:t})=>["p-select-option",{"p-select-option-selected":t.selected&&!t.checkmark,"p-disabled":t.disabled,"p-focus":t.focused}],optionLabel:"p-select-option-label",optionCheckIcon:"p-select-option-check-icon",optionBlankIcon:"p-select-option-blank-icon",emptyMessage:"p-select-empty-message"},WK=(()=>{class t extends io{name="select";theme=Wat;classes=Yat;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Qat={provide:Ea,useExisting:Ko(()=>Ql),multi:!0},Zat=(()=>{class t extends oo{id;option;selected;focused;label;disabled;visible;itemSize;ariaPosInset;ariaSetSize;template;checkmark;onClick=new ve;onMouseEnter=new ve;_componentStyle=re(WK);onOptionClick(e){this.onClick.emit(e)}onOptionMouseEnter(e){this.onMouseEnter.emit(e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-selectItem"]],inputs:{id:"id",option:"option",selected:[2,"selected","selected",je],focused:[2,"focused","focused",je],label:"label",disabled:[2,"disabled","disabled",je],visible:[2,"visible","visible",je],itemSize:[2,"itemSize","itemSize",ln],ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",template:"template",checkmark:[2,"checkmark","checkmark",je]},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},features:[jt([WK]),ft],decls:4,vars:19,consts:[["role","option","pRipple","",3,"click","mouseenter","id","ngStyle"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","check",3,"class",4,"ngIf"],["data-p-icon","blank",3,"class",4,"ngIf"],["data-p-icon","check"],["data-p-icon","blank"]],template:function(i,o){i&1&&(k(0,"li",0),ie("click",function(s){return o.onOptionClick(s)})("mouseenter",function(s){return o.onOptionMouseEnter(s)}),ee(1,vst,3,2,"ng-container",1)(2,bst,2,1,"span",1)(3,Cst,1,0,"ng-container",2),D()),i&2&&(Oe(o.cx("option")),E("id",o.id)("ngStyle",ki(15,uz,o.itemSize+"px")),Ge("aria-label",o.label)("aria-setsize",o.ariaSetSize)("aria-posinset",o.ariaPosInset)("aria-selected",o.selected)("data-p-focused",o.focused)("data-p-highlight",o.selected)("data-p-disabled",o.disabled),T(),E("ngIf",o.checkmark),T(),E("ngIf",!o.template),T(),E("ngTemplateOutlet",o.template)("ngTemplateOutletContext",ki(17,Yae,o.option)))},dependencies:[On,Fr,Lo,vs,In,Ul,sx,BK],encapsulation:2})}return t})(),Ql=(()=>{class t extends XI{zone;filterService;id;scrollHeight="200px";filter;panelStyle;styleClass;panelStyleClass;readonly;editable;tabindex=0;set placeholder(e){this._placeholder.set(e)}get placeholder(){return this._placeholder.asReadonly()}loadingIcon;filterPlaceholder;filterLocale;inputId;dataKey;filterBy;filterFields;autofocus;resetFilterOnHide=!1;checkmark=!1;dropdownIcon;loading=!1;optionLabel;optionValue;optionDisabled;optionGroupLabel="label";optionGroupChildren="items";group;showClear;emptyFilterMessage="";emptyMessage="";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;overlayOptions;ariaFilterLabel;ariaLabel;ariaLabelledBy;filterMatchMode="contains";tooltip="";tooltipPosition="right";tooltipPositionStyle="absolute";tooltipStyleClass;focusOnHover=!0;selectOnFocus=!1;autoOptionFocus=!1;autofocusFilter=!0;get filterValue(){return this._filterValue()}set filterValue(e){setTimeout(()=>{this._filterValue.set(e)})}get options(){return this._options()}set options(e){iz(e,this._options())||this._options.set(e)}appendTo=mo(void 0);onChange=new ve;onFilter=new ve;onFocus=new ve;onBlur=new ve;onClick=new ve;onShow=new ve;onHide=new ve;onClear=new ve;onLazyLoad=new ve;_componentStyle=re(WK);filterViewChild;focusInputViewChild;editableInputViewChild;itemsViewChild;scroller;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;itemsWrapper;$appendTo=bo(()=>this.appendTo()||this.config.overlayAppendTo());itemTemplate;groupTemplate;loaderTemplate;selectedItemTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;dropdownIconTemplate;loadingIconTemplate;clearIconTemplate;filterIconTemplate;onIconTemplate;offIconTemplate;cancelIconTemplate;templates;_itemTemplate;_selectedItemTemplate;_headerTemplate;_filterTemplate;_footerTemplate;_emptyFilterTemplate;_emptyTemplate;_groupTemplate;_loaderTemplate;_dropdownIconTemplate;_loadingIconTemplate;_clearIconTemplate;_filterIconTemplate;_cancelIconTemplate;_onIconTemplate;_offIconTemplate;filterOptions;_options=Zn(null);_placeholder=Zn(void 0);value;hover;focused;overlayVisible;optionsChanged;panel;dimensionsUpdated;hoveredItem;selectedOptionUpdated;_filterValue=Zn(null);searchValue;searchIndex;searchTimeout;previousSearchChar;currentSearchChar;preventModelTouched;focusedOptionIndex=Zn(-1);labelId;listId;clicked=Zn(!1);get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(el.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(el.EMPTY_FILTER_MESSAGE)}get isVisibleClearIcon(){return this.modelValue()!=null&&this.hasSelectedOption()&&this.showClear&&!this.$disabled()}get listLabel(){return this.config.getTranslation(el.ARIA).listLabel}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}visibleOptions=bo(()=>{let e=this.getAllVisibleAndNonVisibleOptions();if(this._filterValue()){let o=!(this.filterBy||this.optionLabel)&&!this.filterFields&&!this.optionValue?this.options.filter(r=>r.label?r.label.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1:r.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1):this.filterService.filter(e,this.searchFields(),this._filterValue().trim(),this.filterMatchMode,this.filterLocale);if(this.group){let r=this.options||[],s=[];return r.forEach(d=>{let v=this.getOptionGroupChildren(d).filter(w=>o.includes(w));v.length>0&&s.push(mt(be({},d),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...v]}))}),this.flatOptions(s)}return o}return e});label=bo(()=>{let e=this.getAllVisibleAndNonVisibleOptions(),i=e.findIndex(o=>this.isOptionValueEqualsModelValue(o));return i!==-1?this.getOptionLabel(e[i]):this.placeholder()||"p-emptylabel"});selectedOption;constructor(e,i){super(),this.zone=e,this.filterService=i,od(()=>{let o=this.modelValue(),r=this.visibleOptions();if(r&&Kr(r)){let s=this.findSelectedOptionIndex();(s!==-1||o===void 0||typeof o=="string"&&o.length===0||this.isModelValueNotSet()||this.editable)&&(this.selectedOption=r[s])}wc(r)&&(o===void 0||this.isModelValueNotSet())&&Kr(this.selectedOption)&&(this.selectedOption=null),o!==void 0&&this.editable&&this.updateEditableLabel(),this.cd.markForCheck()})}isModelValueNotSet(){return this.modelValue()===null&&!this.isOptionValueEqualsModelValue(this.selectedOption)}getAllVisibleAndNonVisibleOptions(){return this.group?this.flatOptions(this.options):this.options||[]}ngOnInit(){super.ngOnInit(),this.id=this.id||Vr("pn_id_"),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break;case"selectedItem":this._selectedItemTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"filter":this._filterTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"emptyfilter":this._emptyFilterTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"group":this._groupTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"cancelicon":this._cancelIconTemplate=e.template;break;case"onicon":this._onIconTemplate=e.template;break;case"officon":this._offIconTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){let e=zo(this.overlayViewChild?.overlayViewChild?.nativeElement,"li.p-select-option-selected");e&&wAe(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}flatOptions(e){return(e||[]).reduce((i,o,r)=>{i.push({optionGroup:o,group:!0,index:r});let s=this.getOptionGroupChildren(o);return s&&s.forEach(d=>i.push(d)),i},[])}autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()&&(this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex()),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1))}onOptionSelect(e,i,o=!0,r=!1){if(!this.isSelected(i)){let s=this.getOptionValue(i);this.updateModel(s,e),this.focusedOptionIndex.set(this.findSelectedOptionIndex()),r===!1&&this.onChange.emit({originalEvent:e,value:s})}o&&this.hide(!0)}onOptionMouseEnter(e,i){this.focusOnHover&&this.changeFocusedOptionIndex(e,i)}updateModel(e,i){this.value=e,this.onModelChange(e),this.writeModelValue(e),this.selectedOptionUpdated=!0}allowModelChange(){return!!this.modelValue()&&!this.placeholder()&&(this.modelValue()===void 0||this.modelValue()===null)&&!this.editable&&this.options&&this.options.length}isSelected(e){return this.isOptionValueEqualsModelValue(e)}isOptionValueEqualsModelValue(e){return this.isValidOption(e)&&Sc(this.modelValue(),this.getOptionValue(e),this.equalityKey())}ngAfterViewInit(){super.ngAfterViewInit(),this.editable&&this.updateEditableLabel(),this.updatePlaceHolderForFloatingLabel()}updatePlaceHolderForFloatingLabel(){let e=this.el.nativeElement.parentElement,i=e?.classList.contains("p-float-label");if(e&&i&&!this.selectedOption){let o=e.querySelector("label");o&&this._placeholder.set(o.textContent)}}updateEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value=this.getOptionLabel(this.selectedOption)||this.modelValue()||"")}clearEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value="")}getOptionIndex(e,i){return this.virtualScrollerDisabled?e:i&&i.getItemOptions(e).index}getOptionLabel(e){return this.optionLabel!==void 0&&this.optionLabel!==null?bs(e,this.optionLabel):e&&e.label!==void 0?e.label:e}getOptionValue(e){return this.optionValue&&this.optionValue!==null?bs(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}isSelectedOptionEmpty(){return wc(this.selectedOption)}isOptionDisabled(e){return this.getOptionValue(this.modelValue())===this.getOptionValue(e)||this.getOptionLabel(this.modelValue()===this.getOptionLabel(e))&&e.disabled===!1?!1:this.optionDisabled?bs(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}getOptionGroupLabel(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null?bs(e,this.optionGroupLabel):e&&e.label!==void 0?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren!==void 0&&this.optionGroupChildren!==null?bs(e,this.optionGroupChildren):e.items}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(i=>this.isOptionGroup(i)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}resetFilter(){this._filterValue.set(null),this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}onContainerClick(e){this.$disabled()||this.readonly||this.loading||(this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),!(e.target.tagName==="INPUT"||e.target.getAttribute("data-pc-section")==="clearicon"||e.target.closest('[data-pc-section="clearicon"]'))&&((!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.onClick.emit(e),this.clicked.set(!0),this.cd.detectChanges()))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}onEditableInput(e){let i=e.target.value;this.searchValue="",!this.searchOptions(e,i)&&this.focusedOptionIndex.set(-1),this.onModelChange(i),this.updateModel(i||null,e),setTimeout(()=>{this.onChange.emit({originalEvent:e,value:i})},1),!this.overlayVisible&&Kr(i)&&this.show()}show(e){this.overlayVisible=!0,this.focusedOptionIndex.set(this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex()),e&&ss(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}onOverlayAnimationStart(e){if(e.toState==="visible"){if(this.itemsWrapper=zo(this.overlayViewChild?.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-select-list-container"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.options&&this.options.length)if(this.virtualScroll){let i=this.modelValue()?this.focusedOptionIndex():-1;i!==-1&&this.scroller?.scrollToIndex(i)}else{let i=zo(this.itemsWrapper,".p-select-option.p-select-option-selected");i&&i.scrollIntoView({block:"nearest",inline:"nearest"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&!this.editable&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(e)}e.toState==="void"&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(e))}hide(e){this.overlayVisible=!1,this.focusedOptionIndex.set(-1),this.clicked.set(!1),this.searchValue="",this.overlayOptions?.mode==="modal"&&PP(),this.filter&&this.resetFilterOnHide&&this.resetFilter(),e&&(this.focusInputViewChild&&ss(this.focusInputViewChild?.nativeElement),this.editable&&this.editableInputViewChild&&ss(this.editableInputViewChild?.nativeElement)),this.cd.markForCheck()}onInputFocus(e){if(this.$disabled())return;this.focused=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),!this.preventModelTouched&&!this.overlayVisible&&this.onModelTouched(),this.preventModelTouched=!1}onKeyDown(e,i=!1){if(!(this.$disabled()||this.readonly||this.loading)){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Delete":this.onDeleteKey(e);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,i);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!e.metaKey&&ZI(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}this.clicked.set(!1)}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e,!0);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onArrowDownKey(e){if(!this.overlayVisible)this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());else{let i=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,i)}e.preventDefault(),e.stopPropagation()}changeFocusedOptionIndex(e,i){if(this.focusedOptionIndex()!==i&&(this.focusedOptionIndex.set(i),this.scrollInView(),this.selectOnFocus)){let o=this.visibleOptions()[i];this.onOptionSelect(e,o,!1)}}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let o=zo(this.itemsViewChild.nativeElement,`li[id="${i}"]`);o?o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}hasSelectedOption(){return this.modelValue()!==void 0}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}equalityKey(){return this.optionValue?null:this.dataKey}findFirstFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let i=ethis.isValidOption(o)):-1;return i>-1?i+e+1:e}findPrevOptionIndex(e){let i=e>0?Gp(this.visibleOptions().slice(0,e),o=>this.isValidOption(o)):-1;return i>-1?i:e}findLastOptionIndex(){return Gp(this.visibleOptions(),e=>this.isValidOption(e))}findLastFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}isValidOption(e){return e!=null&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionGroup(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null&&e.optionGroup!==void 0&&e.optionGroup!==null&&e.group}onArrowUpKey(e,i=!1){if(e.altKey&&!i){if(this.focusedOptionIndex()!==-1){let o=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,o)}this.overlayVisible&&this.hide()}else{let o=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,o),!this.overlayVisible&&this.show()}e.preventDefault(),e.stopPropagation()}onArrowLeftKey(e,i=!1){i&&this.focusedOptionIndex.set(-1)}onDeleteKey(e){this.showClear&&(this.clear(e),e.preventDefault())}onHomeKey(e,i=!1){if(i){let o=e.currentTarget;e.shiftKey?o.setSelectionRange(0,o.value.length):(o.setSelectionRange(0,0),this.focusedOptionIndex.set(-1))}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onEndKey(e,i=!1){if(i){let o=e.currentTarget;if(e.shiftKey)o.setSelectionRange(0,o.value.length);else{let r=o.value.length;o.setSelectionRange(r,r),this.focusedOptionIndex.set(-1)}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onSpaceKey(e,i=!1){!this.editable&&!i&&this.onEnterKey(e)}onEnterKey(e,i=!1){if(!this.overlayVisible)this.focusedOptionIndex.set(-1),this.onArrowDownKey(e);else{if(this.focusedOptionIndex()!==-1){let o=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,o)}!i&&this.hide()}e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault(),e.stopPropagation()}onTabKey(e,i=!1){if(!i)if(this.overlayVisible&&this.hasFocusableElements())ss(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault();else{if(this.focusedOptionIndex()!==-1&&this.overlayVisible){let o=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,o)}this.overlayVisible&&this.hide(this.filter)}e.stopPropagation()}onFirstHiddenFocus(e){let i=e.relatedTarget===this.focusInputViewChild?.nativeElement?Vw(this.overlayViewChild.el?.nativeElement,":not(.p-hidden-focusable)"):this.focusInputViewChild?.nativeElement;ss(i)}onLastHiddenFocus(e){let i=e.relatedTarget===this.focusInputViewChild?.nativeElement?kP(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;ss(i)}hasFocusableElements(){return Bw(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}onBackspaceKey(e,i=!1){i&&!this.overlayVisible&&this.show()}searchFields(){return this.filterBy?.split(",")||this.filterFields||[this.optionLabel]}searchOptions(e,i){this.searchValue=(this.searchValue||"")+i;let o=-1,r=!1;return o=this.visibleOptions().findIndex(s=>this.isOptionMatched(s)),o!==-1&&(r=!0),o===-1&&this.focusedOptionIndex()===-1&&(o=this.findFirstFocusedOptionIndex()),o!==-1&&setTimeout(()=>{this.changeFocusedOptionIndex(e,o)}),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),r}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}onFilterInputChange(e){let i=e.target.value;this._filterValue.set(i),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0),setTimeout(()=>{this.overlayViewChild.alignOverlay()}),this.cd.markForCheck()}applyFocus(){this.editable?zo(this.el.nativeElement,".p-dropdown-label.p-inputtext").focus():ss(this.focusInputViewChild?.nativeElement)}focus(){this.applyFocus()}clear(e){this.updateModel(null,e),this.clearEditableLabel(),this.onModelTouched(),this.onChange.emit({originalEvent:e,value:this.value}),this.onClear.emit(e),this.resetFilter()}writeControlValue(e,i){this.filter&&this.resetFilter(),this.value=e,this.allowModelChange()&&this.onModelChange(e),i(this.value),this.updateEditableLabel(),this.cd.markForCheck()}static \u0275fac=function(i){return new(i||t)(_e(_n),_e(fy))};static \u0275cmp=ne({type:t,selectors:[["p-select"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,xst,4),xt(r,wst,4),xt(r,Sst,4),xt(r,Tst,4),xt(r,Ist,4),xt(r,jke,4),xt(r,Est,4),xt(r,Dst,4),xt(r,Ast,4),xt(r,kst,4),xt(r,Mst,4),xt(r,Ost,4),xt(r,Rst,4),xt(r,Fst,4),xt(r,Pst,4),xt(r,Lst,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.itemTemplate=s.first),Le(s=Ne())&&(o.groupTemplate=s.first),Le(s=Ne())&&(o.loaderTemplate=s.first),Le(s=Ne())&&(o.selectedItemTemplate=s.first),Le(s=Ne())&&(o.headerTemplate=s.first),Le(s=Ne())&&(o.filterTemplate=s.first),Le(s=Ne())&&(o.footerTemplate=s.first),Le(s=Ne())&&(o.emptyFilterTemplate=s.first),Le(s=Ne())&&(o.emptyTemplate=s.first),Le(s=Ne())&&(o.dropdownIconTemplate=s.first),Le(s=Ne())&&(o.loadingIconTemplate=s.first),Le(s=Ne())&&(o.clearIconTemplate=s.first),Le(s=Ne())&&(o.filterIconTemplate=s.first),Le(s=Ne())&&(o.onIconTemplate=s.first),Le(s=Ne())&&(o.offIconTemplate=s.first),Le(s=Ne())&&(o.cancelIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(jke,5),Ri(Nst,5),Ri(Bst,5),Ri(Vst,5),Ri(zst,5),Ri(Ust,5),Ri(Hst,5),Ri(jst,5)),i&2){let r;Le(r=Ne())&&(o.filterViewChild=r.first),Le(r=Ne())&&(o.focusInputViewChild=r.first),Le(r=Ne())&&(o.editableInputViewChild=r.first),Le(r=Ne())&&(o.itemsViewChild=r.first),Le(r=Ne())&&(o.scroller=r.first),Le(r=Ne())&&(o.overlayViewChild=r.first),Le(r=Ne())&&(o.firstHiddenFocusableElementOnOverlay=r.first),Le(r=Ne())&&(o.lastHiddenFocusableElementOnOverlay=r.first)}},hostVars:3,hostBindings:function(i,o){i&1&&ie("click",function(s){return o.onContainerClick(s)}),i&2&&(Ge("id",o.id),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{id:"id",scrollHeight:"scrollHeight",filter:[2,"filter","filter",je],panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:[2,"readonly","readonly",je],editable:[2,"editable","editable",je],tabindex:[2,"tabindex","tabindex",ln],placeholder:"placeholder",loadingIcon:"loadingIcon",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",inputId:"inputId",dataKey:"dataKey",filterBy:"filterBy",filterFields:"filterFields",autofocus:[2,"autofocus","autofocus",je],resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",je],checkmark:[2,"checkmark","checkmark",je],dropdownIcon:"dropdownIcon",loading:[2,"loading","loading",je],optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",group:[2,"group","group",je],showClear:[2,"showClear","showClear",je],emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",lazy:[2,"lazy","lazy",je],virtualScroll:[2,"virtualScroll","virtualScroll",je],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",ln],virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",focusOnHover:[2,"focusOnHover","focusOnHover",je],selectOnFocus:[2,"selectOnFocus","selectOnFocus",je],autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",je],autofocusFilter:[2,"autofocusFilter","autofocusFilter",je],filterValue:"filterValue",options:"options",appendTo:[1,"appendTo"]},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onShow:"onShow",onHide:"onHide",onClear:"onClear",onLazyLoad:"onLazyLoad"},features:[jt([Qat,WK]),ft],decls:11,vars:14,consts:[["elseBlock",""],["overlay",""],["content",""],["focusInput",""],["defaultPlaceholder",""],["editableInput",""],["firstHiddenFocusableEl",""],["buildInItems",""],["lastHiddenFocusableEl",""],["builtInFilterElement",""],["filter",""],["scroller",""],["loader",""],["items",""],["emptyFilter",""],["empty",""],["role","combobox",3,"class","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus","focus","blur","keydown",4,"ngIf"],["type","text",3,"class","pAutoFocus","input","keydown","focus","blur",4,"ngIf"],[4,"ngIf"],["role","button","aria-label","dropdown trigger","aria-haspopup","listbox"],[4,"ngIf","ngIfElse"],[3,"visibleChange","onAnimationStart","onHide","hostAttrSelector","visible","options","target","appendTo"],["role","combobox",3,"focus","blur","keydown","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text",3,"input","keydown","focus","blur","pAutoFocus"],["data-p-icon","times",3,"class","click",4,"ngIf"],[3,"class","click",4,"ngIf"],["data-p-icon","times",3,"click"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true"],[3,"class",4,"ngIf"],["data-p-icon","chevron-down",3,"class",4,"ngIf"],["data-p-icon","chevron-down"],[3,"ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],["pInputText","","type","text","role","searchbox","autocomplete","off",3,"input","keydown","blur","pSize","value","variant"],["data-p-icon","search",4,"ngIf"],["data-p-icon","search"],[3,"onLazyLoad","items","itemSize","autoSize","lazy","options"],["role","listbox"],["ngFor","",3,"ngForOf"],["role","option",3,"class","ngStyle",4,"ngIf"],["role","option",3,"ngStyle"],[3,"onClick","onMouseEnter","id","option","checkmark","selected","label","disabled","template","focused","ariaPosInset","ariaSetSize"]],template:function(i,o){if(i&1){let r=tt();ee(0,Yst,6,22,"span",16)(1,Qst,2,18,"input",17)(2,tat,3,2,"ng-container",18),k(3,"div",19),ee(4,aat,3,2,"ng-container",20)(5,mat,2,2,"ng-template",null,0,Pt),D(),k(7,"p-overlay",21,1),hh("visibleChange",function(d){return se(r),Xh(o.overlayVisible,d)||(o.overlayVisible=d),ae(d)}),ie("onAnimationStart",function(d){return se(r),ae(o.onOverlayAnimationStart(d))})("onHide",function(){return se(r),ae(o.hide())}),ee(9,Kat,13,18,"ng-template",null,2,Pt),D()}if(i&2){let r=ti(6);E("ngIf",!o.editable),T(),E("ngIf",o.editable),T(),E("ngIf",o.isVisibleClearIcon),T(),Oe(o.cx("dropdown")),Ge("aria-expanded",o.overlayVisible??!1)("data-pc-section","trigger"),T(),E("ngIf",o.loading)("ngIfElse",r),T(3),E("hostAttrSelector",o.attrSelector),ph("visible",o.overlayVisible),E("options",o.overlayOptions)("target","@parent")("appendTo",o.$appendTo())}},dependencies:[On,Gc,Fr,Lo,vs,Zat,zP,gy,fp,am,sm,JI,fu,ax,lx,Ym,In],encapsulation:2,changeDetection:0})}return t})(),Kke=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Ql,In,In]})}return t})();var Wke=(()=>{class t{constructor(){this.relativeInterval=new Ch({temporalUnit:"year",count:1},{temporalUnit:"year",count:1}),this.relativeIntervalChange=new ve,this.durationOptions=[{durationType:"year",displayName:"Jahr(e)"},{durationType:"quarter",displayName:"Quartal(e)"},{durationType:"month",displayName:"Monat(e)"},{durationType:"week",displayName:"Woche(n)"},{durationType:"day",displayName:"Tag(e)"}],this.startCountFormCtrl=new yr,this.durationCountFormCtrl=new yr,this.startCountFormCtrl.valueChanges.subscribe(e=>{this.relativeInterval.start=mt(be({},this.relativeInterval.start),{count:e}),this._update()}),this.durationCountFormCtrl.valueChanges.subscribe(e=>{this.relativeInterval.duration=mt(be({},this.relativeInterval.duration),{count:e}),this._update()})}ngOnInit(){this.startCountFormCtrl.setValue(this.relativeInterval.start.count,{emitEvent:!1}),this.durationCountFormCtrl.setValue(this.relativeInterval.duration.count,{emitEvent:!1})}onTemporalUnitChange(e,i){this.relativeInterval[e]=mt(be({},this.relativeInterval[e]),{temporalUnit:i})}_update(){this.relativeIntervalChange.emit(this.relativeInterval)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-interval-relative-input"]],inputs:{relativeInterval:"relativeInterval"},outputs:{relativeIntervalChange:"relativeIntervalChange"},decls:37,vars:14,consts:[[1,"flex","flex-col","lg:flex-row","gap-0","lg:gap-6","items-center"],[1,"flex-1"],[1,"flex","flex-row","gap-6"],["matInput","","type","number","min","0",3,"formControl"],["inputId","interval-relative-input-start-duration-select","fluid","","variant","filled","optionValue","durationType","optionLabel","displayName",1,"mb-4",3,"onChange","options","ngModel"],["for","interval-relative-input-start-duration-select"],["inputId","interval-relative-input-end-duration-select","fluid","","variant","filled","optionValue","durationType","optionLabel","displayName",1,"mb-4",3,"onChange","options","ngModel"],["for","interval-relative-input-end-duration-select"],[1,"basis-6","invisible","xl:visible"],[1,"basis-48","invisible","xl:visible"],[1,"mat-body-1","label"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"div",2)(3,"div")(4,"mat-form-field")(5,"mat-label"),Q(6,"Start vor"),D(),ce(7,"input",3),D()(),k(8,"div",1)(9,"p-iftalabel")(10,"p-select",4),ie("onChange",function(s){return o.onTemporalUnitChange("start",s.value)}),D(),k(11,"label",5),Q(12,"Zeiteinheit"),D()()()()(),k(13,"div",1)(14,"div",2)(15,"div")(16,"mat-form-field")(17,"mat-label"),Q(18,"f\xFCr Dauer"),D(),ce(19,"input",3),D()(),k(20,"div",1)(21,"p-iftalabel")(22,"p-select",6),ie("onChange",function(s){return o.onTemporalUnitChange("duration",s.value)}),D(),k(23,"label",7),Q(24,"Zeiteinheit"),D()()()()(),k(25,"div",8)(26,"mat-icon"),Q(27,"arrow_forward"),D()(),k(28,"div",9)(29,"span",10),Q(30),Xn(31,"date"),D(),k(32,"span",10),Q(33," - "),D(),k(34,"span",10),Q(35),Xn(36,"date"),D()()()),i&2&&(T(7),E("formControl",o.startCountFormCtrl),T(3),E("options",o.durationOptions)("ngModel",o.relativeInterval.start.temporalUnit),T(9),E("formControl",o.durationCountFormCtrl),T(3),E("options",o.durationOptions)("ngModel",o.relativeInterval.duration.temporalUnit),T(8),dt(Ls(31,8,o.relativeInterval.startDate,"dd.MM.yyyy")),T(5),dt(Ls(36,11,o.relativeInterval.endDate,"dd.MM.yyyy")))},dependencies:[Ra,rs,Ol,pl,Fa,xr,Ml,Mw,no,uae,zl,$o,mr,as,Ql,hr,Lr,qf],styles:[".label[_ngcontent-%COMP%]{line-height:46px} .mat-mdc-form-field-infix{width:50px}"]})}}return t})();var Xat=["*"],Jat={root:"p-inputgroupaddon"},Yke=(()=>{class t extends io{name="inputgroupaddon";classes=Jat;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),iE=(()=>{class t extends oo{style;styleClass;_componentStyle=re(Yke);get hostStyle(){return this.style}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-inputgroup-addon"],["p-inputGroupAddon"]],hostVars:7,hostBindings:function(i,o){i&2&&(Ge("data-pc-name","inputgroupaddon"),$r(o.hostStyle),Oe(o.styleClass),Vn("p-inputgroupaddon",!0))},inputs:{style:"style",styleClass:"styleClass"},features:[jt([Yke]),ft],ngContentSelectors:Xat,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On],encapsulation:2})}return t})();var Qke=` .p-inputgroup, .p-inputgroup .p-iconfield, .p-inputgroup .p-floatlabel, .p-inputgroup .p-iftalabel { display: flex; align-items: stretch; width: 100%; } .p-inputgroup .p-inputtext, .p-inputgroup .p-inputwrapper { flex: 1 1 auto; width: 1%; } .p-inputgroupaddon { display: flex; align-items: center; justify-content: center; padding: dt('inputgroup.addon.padding'); background: dt('inputgroup.addon.background'); color: dt('inputgroup.addon.color'); border-block-start: 1px solid dt('inputgroup.addon.border.color'); border-block-end: 1px solid dt('inputgroup.addon.border.color'); min-width: dt('inputgroup.addon.min.width'); } .p-inputgroupaddon:first-child, .p-inputgroupaddon + .p-inputgroupaddon { border-inline-start: 1px solid dt('inputgroup.addon.border.color'); } .p-inputgroupaddon:last-child { border-inline-end: 1px solid dt('inputgroup.addon.border.color'); } .p-inputgroupaddon:has(.p-button) { padding: 0; overflow: hidden; } .p-inputgroupaddon .p-button { border-radius: 0; } .p-inputgroup > .p-component, .p-inputgroup > .p-inputwrapper > .p-component, .p-inputgroup > .p-iconfield > .p-component, .p-inputgroup > .p-floatlabel > .p-component, .p-inputgroup > .p-floatlabel > .p-inputwrapper > .p-component, .p-inputgroup > .p-iftalabel > .p-component, .p-inputgroup > .p-iftalabel > .p-inputwrapper > .p-component { border-radius: 0; margin: 0; } .p-inputgroupaddon:first-child, .p-inputgroup > .p-component:first-child, .p-inputgroup > .p-inputwrapper:first-child > .p-component, .p-inputgroup > .p-iconfield:first-child > .p-component, .p-inputgroup > .p-floatlabel:first-child > .p-component, .p-inputgroup > .p-floatlabel:first-child > .p-inputwrapper > .p-component, .p-inputgroup > .p-iftalabel:first-child > .p-component, .p-inputgroup > .p-iftalabel:first-child > .p-inputwrapper > .p-component { border-start-start-radius: dt('inputgroup.addon.border.radius'); border-end-start-radius: dt('inputgroup.addon.border.radius'); } .p-inputgroupaddon:last-child, .p-inputgroup > .p-component:last-child, .p-inputgroup > .p-inputwrapper:last-child > .p-component, .p-inputgroup > .p-iconfield:last-child > .p-component, .p-inputgroup > .p-floatlabel:last-child > .p-component, .p-inputgroup > .p-floatlabel:last-child > .p-inputwrapper > .p-component, .p-inputgroup > .p-iftalabel:last-child > .p-component, .p-inputgroup > .p-iftalabel:last-child > .p-inputwrapper > .p-component { border-start-end-radius: dt('inputgroup.addon.border.radius'); border-end-end-radius: dt('inputgroup.addon.border.radius'); } .p-inputgroup .p-component:focus, .p-inputgroup .p-component.p-focus, .p-inputgroup .p-inputwrapper-focus, .p-inputgroup .p-component:focus ~ label, .p-inputgroup .p-component.p-focus ~ label, .p-inputgroup .p-inputwrapper-focus ~ label { z-index: 1; } .p-inputgroup > .p-button:not(.p-button-icon-only) { width: auto; } .p-inputgroup .p-iconfield + .p-iconfield .p-inputtext { border-inline-start: 0; } `;var elt=["*"],tlt=` ${Qke} /*For PrimeNG*/ .p-inputgroup > .p-component, .p-inputgroup > .p-inputwrapper > .p-component, .p-inputgroup:first-child > p-button > .p-button, .p-inputgroup > .p-floatlabel > .p-component, .p-inputgroup > .p-floatlabel > .p-inputwrapper > .p-component, .p-inputgroup > .p-iftalabel > .p-component, .p-inputgroup > .p-iftalabel > .p-inputwrapper > .p-component { border-radius: 0; margin: 0; } .p-inputgroup p-button:first-child, .p-inputgroup p-button:last-child { display: inline-flex; } .p-inputgroup:has(> p-button:first-child) .p-button { border-start-start-radius: dt('inputgroup.addon.border.radius'); border-end-start-radius: dt('inputgroup.addon.border.radius'); } .p-inputgroup:has(> p-button:last-child) .p-button { border-start-end-radius: dt('inputgroup.addon.border.radius'); border-end-end-radius: dt('inputgroup.addon.border.radius'); } .p-inputgroup > p-inputmask > .p-inputtext { width: 100%; } `,ilt={root:({instance:t})=>["p-inputgroup",{"p-inputgroup-fluid":t.fluid}]},Zke=(()=>{class t extends io{name="inputgroup";theme=tlt;classes=ilt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var nE=(()=>{class t extends oo{styleClass;_componentStyle=re(Zke);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-inputgroup"],["p-inputGroup"],["p-input-group"]],hostVars:3,hostBindings:function(i,o){i&2&&(Ge("data-pc-name","inputgroup"),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{styleClass:"styleClass"},features:[jt([Zke]),ft],ngContentSelectors:elt,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On,In],encapsulation:2})}return t})();var nlt=()=>["displayName"],Xke=(()=>{class t{constructor(e,i){this._datePipe=e,this._pluralPipe=i,this.relativeInterval=new Ch({temporalUnit:"year",count:1},{temporalUnit:"year",count:1}),this.relativeIntervalOptions=[this._lastYear(),this._lastHalfYear(),this._lastQuarter(),this._lastMonth()],this.relativeIntervalChange=new ve,this.moreOptionsChange=new ve,this.options=[],this._temporalUnitPluralMapping={year:{"=1":"1 Jahr",other:"# Jahre"},quarter:{"=1":"1 Quartal",other:"# Quartale"},month:{"=1":"1 Monat",other:"# Monate"},week:{"=1":"1 Woche",other:"# Wochen"},day:{"=1":"1 Tag",other:"# Tage"}},this._updateOptions()}ngOnChanges(e){if(e.relativeIntervalOptions&&this._updateOptions(),e.relativeInterval){let i=`${this.relativeInterval.start.temporalUnit}_${this.relativeInterval.start.count}_${this.relativeInterval.duration.temporalUnit}_${this.relativeInterval.duration.count}`;this.initial={interval:this.relativeInterval,displayName:this.displayText(this.relativeInterval),key:i},this.options.some(o=>o.key===i)||this.options.push({interval:this.relativeInterval,displayName:this.displayText(this.relativeInterval),key:i})}}onRelativeIntervalChange(e){this.relativeIntervalChange.emit(e.interval)}displayText(e){return this.compareFn(e,this._lastYear())?"Letztes Jahr":this.compareFn(e,this._lastHalfYear())?"Letztes Halbjahr":this.compareFn(e,this._lastQuarter())?"Letztes Quartal":this.compareFn(e,this._lastMonth())?"Letzter Monat":this._displayTextForCustom(e)}_updateOptions(){this.options=[],this.options=this.relativeIntervalOptions.map(e=>({interval:e,displayName:this.displayText(e),key:`${e.start.temporalUnit}_${e.start.count}_${e.duration.temporalUnit}_${e.duration.count}`})),this.options.reverse()}compareFn(e,i){return!!e&&!!i&&e?.duration?.temporalUnit===i?.duration?.temporalUnit&&e?.duration?.count===i?.duration?.count&&e?.start?.temporalUnit===i?.start?.temporalUnit&&e?.start.count===i?.start?.count}onMoreOptionsChange(e){e.stopPropagation(),this.moreOptionsChange.emit()}_lastYear(){return new Ch({temporalUnit:"year",count:1},{temporalUnit:"year",count:1})}_lastHalfYear(){return new Ch({temporalUnit:"month",count:6},{temporalUnit:"month",count:6})}_lastQuarter(){return new Ch({temporalUnit:"quarter",count:1},{temporalUnit:"quarter",count:1})}_lastMonth(){return new Ch({temporalUnit:"month",count:1},{temporalUnit:"month",count:1})}_displayTextForCustom(e){let i=this._pluralPipe.transform(e.duration.count,this._temporalUnitPluralMapping[e.duration.temporalUnit]),o=this._datePipe.transform(e.startDate,"shortDate"),r=this._datePipe.transform(e.endDate,"shortDate");return`${i} (${o} - ${r})`}static{this.\u0275fac=function(i){return new(i||t)(_e(qf),_e(NA))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-interval-relative-input-inline"]],inputs:{relativeInterval:"relativeInterval",relativeIntervalOptions:"relativeIntervalOptions"},outputs:{relativeIntervalChange:"relativeIntervalChange",moreOptionsChange:"moreOptionsChange"},features:[Ot],decls:7,vars:5,consts:[["inputId","interval-relative-input-inline-select","dataKey","key","optionLabel","displayName","fluid","","variant","filled","placeholder","Zeitraum","filterBy","displayName",3,"onChange","ngModel","options","filter","filterFields"],["for","interval-relative-input-inline-select"],[1,"pi","pi-cog",3,"click"]],template:function(i,o){i&1&&(k(0,"p-inputgroup")(1,"p-iftalabel")(2,"p-select",0),ie("onChange",function(s){return o.onRelativeIntervalChange(s.value)}),D(),k(3,"label",1),Q(4,"Zeitraum"),D()(),k(5,"p-inputgroup-addon")(6,"i",2),ie("click",function(s){return o.onMoreOptionsChange(s)}),D()()()),i&2&&(T(2),E("ngModel",o.initial)("options",o.options)("filter",!0)("filterFields",uo(4,nlt)))},dependencies:[iE,Ql,hr,no,Lr,nE,as],encapsulation:2})}}return t})();var YK=mt(be({},s2),{formFieldAppearance:"fill"});var pz=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=_i({providers:[{provide:s2,useValue:YK},{provide:ex,useClass:H5}]})}}return t})();var hz=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=_i({imports:[pz,pz]})}}return t})();var olt=["switch"],rlt=["*"];function slt(t,n){t&1&&(k(0,"span",11),si(),k(1,"svg",13),ce(2,"path",14),D(),k(3,"svg",15),ce(4,"path",16),D()())}var alt=new fi("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),QK=class{source;checked;constructor(n,e){this.source=n,this.checked=e}},Qae=(()=>{class t{_elementRef=re(Bn);_focusMonitor=re(gh);_changeDetectorRef=re(Gi);defaults=re(alt);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=!1;_createChangeEvent(e){return new QK(this,e)}_labelId;get buttonId(){return`${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus()}_noopAnimations=Cl();_focused;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required;color;disabled=!1;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck()}hideIcon;disabledInteractive;change=new ve;toggleChange=new ve;get inputId(){return`${this.id||this._uniqueId}-input`}constructor(){re(kl).load(hp);let e=re(new Bm("tabindex"),{optional:!0}),i=this.defaults;this.tabIndex=e==null?0:parseInt(e)||0,this.color=i.color||"accent",this.id=this._uniqueId=re(ul).getId("mat-mdc-slide-toggle-"),this.hideIcon=i.hideIcon??!1,this.disabledInteractive=i.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(e){e.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorOnChange=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new QK(this,this.checked))))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(i,o){if(i&1&&Ri(olt,5),i&2){let r;Le(r=Ne())&&(o._switchElement=r.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,o){i&2&&(Rr("id",o.id),Ge("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),Oe(o.color?"mat-"+o.color:""),Vn("mat-mdc-slide-toggle-focused",o._focused)("mat-mdc-slide-toggle-checked",o.checked)("_mat-animation-noopable",o._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",je],color:"color",disabled:[2,"disabled","disabled",je],disableRipple:[2,"disableRipple","disableRipple",je],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:ln(e)],checked:[2,"checked","checked",je],hideIcon:[2,"hideIcon","hideIcon",je],disabledInteractive:[2,"disabledInteractive","disabledInteractive",je]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[jt([{provide:Ea,useExisting:Ko(()=>t),multi:!0},{provide:$v,useExisting:t,multi:!0}]),Ot],ngContentSelectors:rlt,decls:14,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mat-mdc-slide-toggle-touch-target"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(i,o){if(i&1){let r=tt();Nn(),k(0,"div",1)(1,"button",2,0),ie("click",function(){return se(r),ae(o._handleClick())}),ce(3,"div",3)(4,"span",4),k(5,"span",5)(6,"span",6)(7,"span",7),ce(8,"span",8),D(),k(9,"span",9),ce(10,"span",10),D(),qe(11,slt,5,0,"span",11),D()()(),k(12,"label",12),ie("click",function(d){return se(r),ae(d.stopPropagation())}),pn(13),D()()}if(i&2){let r=ti(2);E("labelPosition",o.labelPosition),T(),Vn("mdc-switch--selected",o.checked)("mdc-switch--unselected",!o.checked)("mdc-switch--checked",o.checked)("mdc-switch--disabled",o.disabled)("mat-mdc-slide-toggle-disabled-interactive",o.disabledInteractive),E("tabIndex",o.disabled&&!o.disabledInteractive?-1:o.tabIndex)("disabled",o.disabled&&!o.disabledInteractive),Ge("id",o.buttonId)("name",o.name)("aria-label",o.ariaLabel)("aria-labelledby",o._getAriaLabelledBy())("aria-describedby",o.ariaDescribedby)("aria-required",o.required||null)("aria-checked",o.checked)("aria-disabled",o.disabled&&o.disabledInteractive?"true":null),T(9),E("matRippleTrigger",r)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),T(),Ke(o.hideIcon?-1:11),T(),E("for",o.buttonId),Ge("id",o._labelId)}},dependencies:[im,fP],styles:[`.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mat-slide-toggle-track-width, 52px)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mat-slide-toggle-track-height, 32px);border-radius:var(--mat-slide-toggle-track-shape, var(--mat-sys-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mat-slide-toggle-disabled-track-opacity, 0.12)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-slide-toggle-track-outline-width, 2px);border-color:var(--mat-slide-toggle-track-outline-color, var(--mat-sys-outline))}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-slide-toggle-selected-track-outline-width, 2px);border-color:var(--mat-slide-toggle-selected-track-outline-color, transparent)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-slide-toggle-disabled-unselected-track-outline-width, 2px);border-color:var(--mat-slide-toggle-disabled-unselected-track-outline-color, var(--mat-sys-on-surface))}@media(forced-colors: active){.mdc-switch__track{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mat-slide-toggle-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-slide-toggle-hidden-track-opacity, 0);transition:var(--mat-slide-toggle-hidden-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-slide-toggle-visible-track-opacity, 1);transition:var(--mat-slide-toggle-visible-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-hover-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-focus-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-pressed-track-color, var(--mat-sys-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mat-slide-toggle-disabled-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mat-slide-toggle-selected-track-color, var(--mat-sys-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-slide-toggle-visible-track-opacity, 1);transition:var(--mat-slide-toggle-visible-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-slide-toggle-hidden-track-opacity, 0);transition:var(--mat-slide-toggle-hidden-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-hover-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-focus-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-pressed-track-color, var(--mat-sys-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mat-slide-toggle-disabled-selected-track-color, var(--mat-sys-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mat-slide-toggle-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mat-slide-toggle-handle-width);height:var(--mat-slide-toggle-handle-height);border-radius:var(--mat-slide-toggle-handle-shape, var(--mat-sys-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-slide-toggle-unselected-handle-size, 16px);height:var(--mat-slide-toggle-unselected-handle-size, 16px);margin:var(--mat-slide-toggle-unselected-handle-horizontal-margin, 0 8px)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-slide-toggle-unselected-with-icon-handle-horizontal-margin, 0 4px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-slide-toggle-selected-handle-size, 24px);height:var(--mat-slide-toggle-selected-handle-size, 24px);margin:var(--mat-slide-toggle-selected-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-slide-toggle-selected-with-icon-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-slide-toggle-with-icon-handle-size, 24px);height:var(--mat-slide-toggle-with-icon-handle-size, 24px)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-slide-toggle-pressed-handle-size, 28px);height:var(--mat-slide-toggle-pressed-handle-size, 28px)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-slide-toggle-selected-pressed-handle-horizontal-margin, 0 22px)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-slide-toggle-unselected-pressed-handle-horizontal-margin, 0 2px)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-slide-toggle-disabled-selected-handle-opacity, 1)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-slide-toggle-disabled-unselected-handle-opacity, 0.38)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media(forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-handle-color, var(--mat-sys-on-primary))}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-hover-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-focus-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-pressed-handle-color, var(--mat-sys-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-disabled-selected-handle-color, var(--mat-sys-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-handle-color, var(--mat-sys-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-hover-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-focus-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-pressed-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-disabled-unselected-handle-color, var(--mat-sys-on-surface))}.mdc-switch__handle::before{background:var(--mat-slide-toggle-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mat-slide-toggle-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mat-slide-toggle-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mat-slide-toggle-state-layer-size, 40px);height:var(--mat-slide-toggle-state-layer-size, 40px)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-hover-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-focus-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-pressed-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-hover-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-focus-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-pressed-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1;transform:translateZ(0)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mat-slide-toggle-disabled-unselected-icon-opacity, 0.38)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mat-slide-toggle-disabled-selected-icon-opacity, 0.38)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mat-slide-toggle-unselected-icon-size, 16px);height:var(--mat-slide-toggle-unselected-icon-size, 16px);fill:var(--mat-slide-toggle-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mat-slide-toggle-disabled-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mat-slide-toggle-selected-icon-size, 16px);height:var(--mat-slide-toggle-selected-icon-size, 16px);fill:var(--mat-slide-toggle-selected-icon-color, var(--mat-sys-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mat-slide-toggle-disabled-selected-icon-color, var(--mat-sys-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-slide-toggle-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-slide-toggle-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-slide-toggle-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-slide-toggle-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-slide-toggle-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-slide-toggle-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mat-slide-toggle-disabled-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-slide-toggle-touch-target{position:absolute;top:50%;left:50%;height:var(--mat-slide-toggle-touch-target-size, 48px);width:100%;transform:translate(-50%, -50%);display:var(--mat-slide-toggle-touch-target-display, block)}[dir=rtl] .mat-mdc-slide-toggle-touch-target{left:auto;right:50%;transform:translate(50%, -50%)} `],encapsulation:2,changeDetection:0})}return t})(),Jke=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Qae,Br,Br]})}return t})();var clt=["*",[["mat-toolbar-row"]]],dlt=["*","mat-toolbar-row"],ult=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]})}return t})(),UP=(()=>{class t{_elementRef=re(Bn);_platform=re(ba);_document=re(Ao);color;_toolbarRows;constructor(){}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){this._toolbarRows.length}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-toolbar"]],contentQueries:function(i,o,r){if(i&1&&xt(r,ult,5),i&2){let s;Le(s=Ne())&&(o._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:6,hostBindings:function(i,o){i&2&&(Oe(o.color?"mat-"+o.color:""),Vn("mat-toolbar-multiple-rows",o._toolbarRows.length>0)("mat-toolbar-single-row",o._toolbarRows.length===0))},inputs:{color:"color"},exportAs:["matToolbar"],ngContentSelectors:dlt,decls:2,vars:0,template:function(i,o){i&1&&(Nn(clt),pn(0),pn(1,1))},styles:[`.mat-toolbar{background:var(--mat-toolbar-container-background-color, var(--mat-sys-surface));color:var(--mat-toolbar-container-text-color, var(--mat-sys-on-surface))}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-family:var(--mat-toolbar-title-text-font, var(--mat-sys-title-large-font));font-size:var(--mat-toolbar-title-text-size, var(--mat-sys-title-large-size));line-height:var(--mat-toolbar-title-text-line-height, var(--mat-sys-title-large-line-height));font-weight:var(--mat-toolbar-title-text-weight, var(--mat-sys-title-large-weight));letter-spacing:var(--mat-toolbar-title-text-tracking, var(--mat-sys-title-large-tracking));margin:0}@media(forced-colors: active){.mat-toolbar{outline:solid 1px}}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar .mat-mdc-button-base.mat-mdc-button-base.mat-unthemed{--mat-button-text-label-text-color: var(--mat-toolbar-container-text-color, var(--mat-sys-on-surface));--mat-button-outlined-label-text-color: var(--mat-toolbar-container-text-color, var(--mat-sys-on-surface))}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap;height:var(--mat-toolbar-standard-height, 64px)}@media(max-width: 599px){.mat-toolbar-row,.mat-toolbar-single-row{height:var(--mat-toolbar-mobile-height, 56px)}}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%;min-height:var(--mat-toolbar-standard-height, 64px)}@media(max-width: 599px){.mat-toolbar-multiple-rows{min-height:var(--mat-toolbar-mobile-height, 56px)}} `],encapsulation:2,changeDetection:0})}return t})();var oE=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,Br]})}return t})();var plt=["*"],hlt=(t,n)=>({"bd-primary":t,"bd-primary-text":n}),Ga=(()=>{class t extends dr{constructor(e){super(),this._breakpointObserver=e,this.layout="bar";let i=this._breakpointObserver.observe([tm.Small,tm.XSmall]).pipe(rp((o,r)=>o.matches===r.matches)).subscribe(o=>{this.layout=o.matches?"line":"bar"});this._subs.push(i)}ngOnDestroy(){this.unsubscribeAll()}static{this.\u0275fac=function(i){return new(i||t)(_e(s0))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-toolbar"]],features:[ft],ngContentSelectors:plt,decls:2,vars:4,consts:[[3,"ngClass"]],template:function(i,o){i&1&&(Nn(),k(0,"mat-toolbar",0),pn(1),D()),i&2&&E("ngClass",Eo(1,hlt,o.layout==="bar",o.layout==="line"))},dependencies:[UP,Ns],styles:[".bd-primary-text[_ngcontent-%COMP%]{background-color:var(--app-shell-contrast-color);color:var(--app-shell-color)}.bd-primary[_ngcontent-%COMP%]{color:var(--app-shell-contrast-color);background-color:var(--app-shell-color)}"]})}}return t})();var ZK=class{constructor(n){this._environmentService=n}index(){return`${this._environmentService.load("BD_DISTRICT_URL")}/administrative_districts/`}casesAll(n){return`${this.index()}cases/${n}/all`}byAdministrativeDistrictId(n){return`${this.index()}${n}`}postalCodes(){return`${this.index()}postal-codes`}centerPoints(){return`${this.index()}center-points`}};var Yo=class t{static create(n){let e=typeof n,i=null;if(e==="string")i=t.createFromString(n);else if(e==="number")i=t.createFromNumber(n);else if(!n)i=null;else throw new Error("Invalid administrative district id type.");return i}static createFromNumber(n){let e=n.toString(10);return t.createFromString(e)}static createFromString(n){return n.length===4&&(n=`0${n}`),new t(n)}constructor(n){this.value=n}getNumericValue(){return parseInt(this.value,10)}getStateId(){return parseInt(this.value.substring(0,2),10)}clone(){return new t(this.value)}};var cx=class t{static fromObjectArray(n=[]){let e=i=>t.fromObject(i);return n.map(e)}static fromObject(n={}){return new t(Yo.create(n.id),n.name,n.otherName)}constructor(n,e,i){this.id=n,this.name=e,this.otherName=i}displayName(){return this.otherName??this.name}};var rE="administrative-districts",mlt="administrative-districts",flt="administrative-districts-highlighted",$w={id:mlt,type:"fill",source:rE,"source-layer":"administrative_districts_2020.1",paint:{"fill-outline-color":"rgba(0,0,0,0.3)","fill-color":"rgba(0,0,0,0.1)"}},HP={id:flt,type:"fill",source:rE,"source-layer":"administrative_districts_2020.1",paint:{"fill-outline-color":"#484896","fill-color":"#6e599f","fill-opacity":.75},filter:["in","AGS",""]},XK={type:"vector",url:"mapbox://sseemann.ckgge66kg010g29qvmxl5r90a-8j8hs"};var dx="postal-codes",JK="postal-codes",glt="postal-codes-highlighted",e_={id:JK,type:"fill",source:dx,"source-layer":"postal_codes-2q9j3t",paint:{"fill-outline-color":"rgba(0,0,0,0.3)","fill-color":"rgba(0,0,0,0.1)"}},nb={id:glt,type:"fill",source:dx,"source-layer":"postal_codes-2q9j3t",paint:{"fill-outline-color":"#484896","fill-color":"#6e599f","fill-opacity":.75},filter:["in","plz",""]},eW={type:"vector",url:"mapbox://sseemann.d2edzmbo"};var ux=class t{static fromObjectArray(n=[]){let e=i=>t.fromObject(i);return n.map(e)}static fromObject(n={}){return new t(n.postalCode,n.name,n.otlName,n.type,n.administrativeDistrictId)}constructor(n,e,i,o,r){this.postalCode=n,this.name=e,this.otlName=i,this.type=o,this.administrativeDistrictId=r}getDisplayName(){return`${this.postalCode} - ${this.name} ${this.otlName}`}};var rg=class{static byId(n){let e=jP.filter(i=>i.id===n);return e[0]?e[0]:null}},qw=[{id:8,name:"Baden-W\xFCrttemberg"},{id:9,name:"Bayern"},{id:11,name:"Berlin"},{id:12,name:"Brandenburg"},{id:4,name:"Bremen"},{id:2,name:"Hamburg"},{id:6,name:"Hessen"},{id:13,name:"Mecklenburg-Vorpommern"},{id:3,name:"Niedersachsen"},{id:5,name:"Nordrhein-Westfalen"},{id:7,name:"Rheinland-Pfalz"},{id:10,name:"Saarland"},{id:14,name:"Sachsen"},{id:15,name:"Sachsen-Anhalt"},{id:1,name:"Schleswig-Holstein"},{id:16,name:"Th\xFCringen"}],jP=[{id:-1,name:"Bund"},...qw];var ob=[[15.0169958839,47.3024876979],[5.98865807458,54.983104153]];var sg=63710088e-1,_lt={centimeters:sg*100,centimetres:sg*100,degrees:sg/111325,feet:sg*3.28084,inches:sg*39.37,kilometers:sg/1e3,kilometres:sg/1e3,meters:sg,metres:sg,miles:sg/1609.344,millimeters:sg*1e3,millimetres:sg*1e3,nauticalmiles:sg/1852,radians:1,yards:sg*1.0936},$Qi={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/sg,yards:1.0936133};function wh(t,n,e){e===void 0&&(e={});var i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=n||{},i.geometry=t,i}function Qm(t,n,e){if(e===void 0&&(e={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Zae(t[0])||!Zae(t[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:t};return wh(i,n,e)}function tW(t,n,e){e===void 0&&(e={});for(var i=0,o=t;i{if(r){let m=d._z;return r.maxZoom?r.minZoom?r.minZoom<=m&&mwh(d.geometry,d.properties,{bbox:d.bbox,id:d.id}))}};var nW=Ap(Kw()),t_=class t{static fromBbox(n,e){if(!Array.isArray(n))throw new Error("bbox is not an array");return n.length===6?new t(new nW.LngLatBounds(n.slice(0,4)),e):new t(new nW.LngLatBounds(n),e)}static fromBoundsLike(n,e){return new t(nW.LngLatBounds.convert(n),e)}constructor(n,e){this.bounds=n,this.origin=e}toPointLikeArray(n){return[n.project(this.bounds._sw),n.project(this.bounds._ne)]}};var oW=class{static getDataMaxValue(n,e){let i=0;return n.forEach(o=>{i=i>=e[o]?i:e[o]}),console.log(i),i}static getDataExtremeValues(n,e){let i=null,o=null;return n.forEach(r=>{i!==null?i=i>=e[r]?i:e[r]:i=e[r],o!==null?o=o<=e[r]?o:e[r]:o=e[r]}),{min:o,max:i}}};var r2e=Ap(Kw()),GP=class{constructor(n,e){this._mbxMap=n,this._layerName=e,this._popup=new r2e.Popup({closeButton:!0,closeOnClick:!1})}_removePopup(){this._popup.remove()}};var fz=Ap(Kw());var rW=class{constructor(n,e={closeButton:!1,closeOnClick:!0,mode:"MERGE",contentDivider:'
'}){this._mpxMap=n,this._options=e,this._listener=[],this._subs=[],this._onMouseClick=i=>{this._mpxMap.getCanvas().style.cursor="pointer";let o=this._listener.filter(r=>r.type==="click").map(r=>mt(be({},r),{features:f2.getFeaturesOnPosition(this._mpxMap,i.point,r.layerId,r.bboxSize,r.zoom)})).filter(r=>r.features&&r.features.length>0);this._showContent(o,i.lngLat)},this._onMousemove=i=>{this._mpxMap.getCanvas().style.cursor="pointer";let o=this._listener.filter(r=>r.type==="mousemove").map(r=>mt(be({},r),{features:f2.getFeaturesOnPosition(this._mpxMap,i.point,r.layerId,r.bboxSize,r.zoom)})).filter(r=>r.features&&r.features.length>0);this._showContent(o,i.lngLat)},this._onMouseleave=i=>{this._mpxMap.getCanvas().style.cursor="",this._popupMove.remove()},this._popupClick=new fz.Popup(mt(be({},e),{closeButton:!0,closeOnClick:!0})),this._popupMove=new fz.Popup(e),this._subs.push(Wh(this._mpxMap,"click").pipe(wn(i=>i.target.idle())).subscribe(i=>this._onMouseClick(i))),this._subs.push(Wh(this._mpxMap,"mousemove").pipe(wn(i=>i.target.idle())).subscribe(i=>this._onMousemove(i))),this._subs.push(Wh(this._mpxMap,"mouseleave").subscribe(i=>this._onMouseleave(i))),this._subs.push(Wh(this._mpxMap,"mouseout").subscribe(i=>this._onMouseleave(i)))}registerHandler(n,e,i){let o=be({type:"mousemove",bboxSize:0,popupSortingIndex:1,layerGroupStrategy:"NOOP"},i);this.deregisterHandler(e),i?.layerGroupId&&i?.layerGroupStrategy&&i.layerGroupStrategy==="ONLY_ONE_OF_GROUP"&&(this._listener=this._listener.filter(r=>r.layerGroupId!==i.layerGroupId)),this._listener.push(mt(be({layerGroupId:""},o),{popupHandler:n,layerId:e}))}deregisterHandler(n){this._listener=this._listener.filter(e=>e.layerId!==n)}onDestroy(){this._popupClick.remove(),this._popupMove.remove(),this._subs.forEach(n=>n.unsubscribe())}_showContent(n,e){if(n.some(i=>i.type==="click")){this._popupClick.remove();let i=this._createPopupContent(n.filter(o=>o.type==="click").filter(o=>o.features&&o.features.length>0).sort((o,r)=>r.popupSortingIndex-o.popupSortingIndex).map(o=>o.features.map(r=>o.popupHandler.content(r))));this._popupClick=new fz.Popup(mt(be({},this._options),{closeButton:!0,closeOnClick:!0})).setHTML(i).setLngLat(e).addTo(this._mpxMap)}if(n.some(i=>i.type!=="click")){this._popupMove.remove();let i=this._createPopupContent(n.filter(o=>o.type!=="click").filter(o=>o.features&&o.features.length>0).sort((o,r)=>r.popupSortingIndex-o.popupSortingIndex).map(o=>o.features.map(r=>o.popupHandler.content(r))));this._popupMove=new fz.Popup(this._options).setHTML(i).setLngLat(e).addTo(this._mpxMap)}}_createPopupContent(n){return n.flat().filter((e,i,o)=>o.findIndex(r=>r===e)===i).join(` ${this._options.contentDivider}`)}};var gz=class{static addSaveLayer(n,e,i){return this.hasResource(n,e.id,"layer")?ci(e):(n=n.addLayer(e,i),GT(500).pipe(Sn(10),vt(o=>{let r=n.isStyleLoaded();return console.debug(`checking layer loaded ${o}/10`,e.id,r),r}),Vg(o=>o),vt(()=>e)))}static addSaveSource(n,e,i){return this.hasResource(n,e,"source")?ci(i):(n=n.addSource(e,i),GT(500).pipe(Sn(10),vt(o=>{let r=n.isSourceLoaded(e);return console.debug(`checking source loaded ${o}/10`,e,r),r}),Vg(o=>o),vt(()=>i)))}static hasResource(n,e,i){return i==="layer"?!!n.getLayer(e):!!n.getSource(e)}};var Ww=class{constructor(n,e){this.layerControlId=n,this.config=e,this.visible="visible",this.active=!0,this.legend={showInLegend:!0},this.initDone=!1,this.popupImpl=void 0,this._bounds=new Gs(ob),this._legendRef=new pi(1),this.legendRef=this._legendRef.asObservable(),this.visible=e.visible??this.visible,this.active=e.active??this.active,this.zIndex=e.zIndex,this.displayName=e.displayName,this.legend=be(be({},this.legend),e.legend)}initBounds(){this.bounds=this._bounds.asObservable()}initImage(n){let e=this.image();if(e&&!n.hasImage(e.imageName)){console.debug("loading image",e.imageName);let i=XJ(n.loadImage).bind(n);if("url"in e)return i(e.url).pipe(vt(o=>{if(o[0])throw o[0];return n.addImage(e.imageName,o[1],{sdf:e.url}),n}));if("svg"in e){let o=new Image(20,20),r=e.svg;return o.onload=()=>n.addImage(e.imageName,o),o.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(r)}`,ci(n)}else return ci(n)}else return ci(n)}initSource(n){if(console.debug("init source",this.source()),this.source()){if(!this.source().sourceId)throw new Error("missing source id");return gz.addSaveSource(n,this.source().sourceId,this.source().sourceData)}else return ci(null)}initLayer(n,e){this.mapRef=n,this.popupControlRef=e;let i=ci();return this.layer()&&(console.debug("init layer",this.layer().id),i=ci(this.layer()).pipe(vt(o=>(o?.layout?o.layout.visibility="none":o.layout={visibility:"none"},o)),Mn(o=>gz.addSaveLayer(n,o)))),i.pipe(Vo(()=>this.initDone=!0),Vo(()=>this.afterInit(n,e)))}onRedraw(n){switch(n.action){case"SHOW":{this._show();break}case"UPDATE-DATA":{this._update(n.data);break}case"UPDATE-BY-COMMAND":{let e=n.data;this.updateByCommand(e);break}case"HIDE":{this._hide();break}}}destroyLayer(n){this.popupControlRef.onDestroy(),this.layer()&&(this.hidePopup(this.layer()?.id),console.debug(`removeLayer [${this.layer().id}]`),n.removeLayer(this.layer().id))}destroySource(n){this.source()&&(console.debug(`removeSource [${this.source()?.sourceId}]`),n.removeSource(this.source()?.sourceId)),this.image()&&(console.debug(`removeImage [${this.image()?.imageName}]`),n.removeImage(this.image()?.imageName))}afterInit(n,e){this.initBounds()}hide(){console.debug(`[${this.layer()?.id}] set layout.visibility => none`),this.mapRef.setLayoutProperty(this.layer().id,"visibility","none",{validate:!0})}show(){console.debug(`[${this.layer()?.id}] set layout.visibility => visible`),this.mapRef.setLayoutProperty(this.layer().id,"visibility","visible",{validate:!0})}update(n){console.debug("no update method impl!")}updateByCommand(n){let e=n.options.find(i=>i.key===n.currentOption.key);n.commandFn(this.mapRef,e)}hidePopup(n){this.popupControlRef.deregisterHandler(n),this.popupImpl=void 0,this._popupSubscription&&this._popupSubscription.unsubscribe()}showPopup(n){this.popupImpl=new tle(this.mapRef,n,e=>this.popupContent(e,{})),this.popupControlRef.registerHandler(this.popupImpl,n,this.config.popup)}image(){}popupContent(n,e){if(this.config.popup?.popupType==="customPopupContent")return null;let i=this.config.popup.titleFnc(n,e),o=`
${i}
`;if(this.config.popup.messageFnc){let r=this.config.popup.messageFnc(n,e);r&&(o=`
${i}
${this.config.popup.messagePrefix} ${r}
`)}return o}_show(){this.initDone&&this.layer()&&(this.show(),this.config.popup&&this.showPopup(this.layer().id))}_update(n){this.initDone&&this.layer()&&this.update(n)}_hide(){this.initDone&&this.layer()&&(this.hidePopup(this.layer().id),this.hide())}},tle=class extends GP{constructor(n,e,i){super(n,e),this.contentFn=i}content(n){return this.contentFn({id:n.id,properties:n.properties,geometry:n.geometry?{type:n.geometry.type,bbox:n.geometry.bbox,coordinates:void 0}:void 0,bbox:n.bbox,type:n.type})}};var vo=class{static equals(n,e,i=(o,r)=>o===r){return n===void 0&&e===void 0||n===null&&e===null?!0:typeof n=="boolean"?n===e:n&&e?i(n,e):!1}};var Zm=class t{constructor(n,e,i,o,r,s=void 0,d=(v,w)=>v===w,m=v=>JSON.parse(JSON.stringify(v))){this.tileId=n,this.propertyKey=e,this.value=i,this.overrideValue=o,this.deleteState=r,this.dependencyVirtualClinicId=s,this.equalsFn=d,this._cloneFn=m}clone(){return new t(this.tileId,this.propertyKey,this.value?this._cloneFn(this.value):this.value,this.overrideValue?this._cloneFn(this.overrideValue):this.overrideValue,this.deleteState,this.dependencyVirtualClinicId,this.equalsFn,this._cloneFn)}equals(n){return vo.equals(this.tileId,n.tileId)&&vo.equals(this.propertyKey,n.propertyKey)&&vo.equals(this.value,n.value,(e,i)=>this.equalsFn(e,i))}},Xm=class{static overrideProperty(n,e,i,o){if(!i)return o(n)??null;let r=i.find(s=>vo.equals(e,s.propertyKey)&&vo.equals(n,s.value,(d,m)=>s.equalsFn(d,m)));return r?r.deleteState==="should-be-deleted"?null:o(r.overrideValue):o(n)??null}static overrideProperties(n,e,i,o){return n.map(r=>this.overrideProperty(r,e,i,o)).filter(r=>!!r)}};var g2=["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"];var Yw=class{percentage(n,e,i){return(n-e)/(i-e)}};function qp(t,n){ylt(t)&&(t="100%");let e=vlt(t);return t=n===360?t:Math.min(n,Math.max(0,parseFloat(t))),e&&(t=parseInt(String(t*n),10)/100),Math.abs(t-n)<1e-6?1:(n===360?t=(t<0?t%n+n:t%n)/parseFloat(String(n)):t=t%n/parseFloat(String(n)),t)}function _z(t){return Math.min(1,Math.max(0,t))}function ylt(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function vlt(t){return typeof t=="string"&&t.indexOf("%")!==-1}function sW(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function yz(t){return Number(t)<=1?`${Number(t)*100}%`:t}function sE(t){return t.length===1?"0"+t:String(t)}function s2e(t,n,e){return{r:qp(t,255)*255,g:qp(n,255)*255,b:qp(e,255)*255}}function nle(t,n,e){t=qp(t,255),n=qp(n,255),e=qp(e,255);let i=Math.max(t,n,e),o=Math.min(t,n,e),r=0,s=0,d=(i+o)/2;if(i===o)s=0,r=0;else{let m=i-o;switch(s=d>.5?m/(2-i-o):m/(i+o),i){case t:r=(n-e)/m+(n1&&(e-=1),e<1/6?t+(n-t)*(6*e):e<1/2?n:e<2/3?t+(n-t)*(2/3-e)*6:t}function a2e(t,n,e){let i,o,r;if(t=qp(t,360),n=qp(n,100),e=qp(e,100),n===0)o=e,r=e,i=e;else{let s=e<.5?e*(1+n):e+n-e*n,d=2*e-s;i=ile(d,s,t+1/3),o=ile(d,s,t),r=ile(d,s,t-1/3)}return{r:i*255,g:o*255,b:r*255}}function ole(t,n,e){t=qp(t,255),n=qp(n,255),e=qp(e,255);let i=Math.max(t,n,e),o=Math.min(t,n,e),r=0,s=i,d=i-o,m=i===0?0:d/i;if(i===o)r=0;else{switch(i){case t:r=(n-e)/d+(n>16,g:(t&65280)>>8,b:t&255}}var vz={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function p2e(t){let n={r:0,g:0,b:0},e=1,i=null,o=null,r=null,s=!1,d=!1;return typeof t=="string"&&(t=wlt(t)),typeof t=="object"&&(f0(t.r)&&f0(t.g)&&f0(t.b)?(n=s2e(t.r,t.g,t.b),s=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):f0(t.h)&&f0(t.s)&&f0(t.v)?(i=yz(t.s),o=yz(t.v),n=l2e(t.h,i,o),s=!0,d="hsv"):f0(t.h)&&f0(t.s)&&f0(t.l)?(i=yz(t.s),r=yz(t.l),n=a2e(t.h,i,r),s=!0,d="hsl"):f0(t.c)&&f0(t.m)&&f0(t.y)&&f0(t.k)&&(n=d2e(t.c,t.m,t.y,t.k),s=!0,d="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(e=t.a)),e=sW(e),{ok:s,format:t.format||d,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:e}}var Clt="[-\\+]?\\d+%?",xlt="[-\\+]?\\d*\\.\\d+%?",aE="(?:"+xlt+")|(?:"+Clt+")",lle="[\\s|\\(]+("+aE+")[,|\\s]+("+aE+")[,|\\s]+("+aE+")\\s*\\)?",aW="[\\s|\\(]+("+aE+")[,|\\s]+("+aE+")[,|\\s]+("+aE+")[,|\\s]+("+aE+")\\s*\\)?",_y={CSS_UNIT:new RegExp(aE),rgb:new RegExp("rgb"+lle),rgba:new RegExp("rgba"+aW),hsl:new RegExp("hsl"+lle),hsla:new RegExp("hsla"+aW),hsv:new RegExp("hsv"+lle),hsva:new RegExp("hsva"+aW),cmyk:new RegExp("cmyk"+aW),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function wlt(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;let n=!1;if(vz[t])t=vz[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let e=_y.rgb.exec(t);return e?{r:e[1],g:e[2],b:e[3]}:(e=_y.rgba.exec(t),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=_y.hsl.exec(t),e?{h:e[1],s:e[2],l:e[3]}:(e=_y.hsla.exec(t),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=_y.hsv.exec(t),e?{h:e[1],s:e[2],v:e[3]}:(e=_y.hsva.exec(t),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=_y.cmyk.exec(t),e?{c:e[1],m:e[2],y:e[3],k:e[4]}:(e=_y.hex8.exec(t),e?{r:i_(e[1]),g:i_(e[2]),b:i_(e[3]),a:ale(e[4]),format:n?"name":"hex8"}:(e=_y.hex6.exec(t),e?{r:i_(e[1]),g:i_(e[2]),b:i_(e[3]),format:n?"name":"hex"}:(e=_y.hex4.exec(t),e?{r:i_(e[1]+e[1]),g:i_(e[2]+e[2]),b:i_(e[3]+e[3]),a:ale(e[4]+e[4]),format:n?"name":"hex8"}:(e=_y.hex3.exec(t),e?{r:i_(e[1]+e[1]),g:i_(e[2]+e[2]),b:i_(e[3]+e[3]),format:n?"name":"hex"}:!1))))))))))}function f0(t){return typeof t=="number"?!Number.isNaN(t):_y.CSS_UNIT.test(t)}var Cs=class t{constructor(n="",e={}){if(n instanceof t)return n;typeof n=="number"&&(n=u2e(n)),this.originalInput=n;let i=p2e(n);this.originalInput=n,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=e.format??i.format,this.gradientType=e.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){let n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3}getLuminance(){let n=this.toRgb(),e,i,o,r=n.r/255,s=n.g/255,d=n.b/255;return r<=.03928?e=r/12.92:e=Math.pow((r+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),d<=.03928?o=d/12.92:o=Math.pow((d+.055)/1.055,2.4),.2126*e+.7152*i+.0722*o}getAlpha(){return this.a}setAlpha(n){return this.a=sW(n),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){let{s:n}=this.toHsl();return n===0}toHsv(){let n=ole(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}}toHsvString(){let n=ole(this.r,this.g,this.b),e=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.v*100);return this.a===1?`hsv(${e}, ${i}%, ${o}%)`:`hsva(${e}, ${i}%, ${o}%, ${this.roundA})`}toHsl(){let n=nle(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}}toHslString(){let n=nle(this.r,this.g,this.b),e=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.l*100);return this.a===1?`hsl(${e}, ${i}%, ${o}%)`:`hsla(${e}, ${i}%, ${o}%, ${this.roundA})`}toHex(n=!1){return rle(this.r,this.g,this.b,n)}toHexString(n=!1){return"#"+this.toHex(n)}toHex8(n=!1){return c2e(this.r,this.g,this.b,this.a,n)}toHex8String(n=!1){return"#"+this.toHex8(n)}toHexShortString(n=!1){return this.a===1?this.toHexString(n):this.toHex8String(n)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){let n=Math.round(this.r),e=Math.round(this.g),i=Math.round(this.b);return this.a===1?`rgb(${n}, ${e}, ${i})`:`rgba(${n}, ${e}, ${i}, ${this.roundA})`}toPercentageRgb(){let n=e=>`${Math.round(qp(e,255)*100)}%`;return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}}toPercentageRgbString(){let n=e=>Math.round(qp(e,255)*100);return this.a===1?`rgb(${n(this.r)}%, ${n(this.g)}%, ${n(this.b)}%)`:`rgba(${n(this.r)}%, ${n(this.g)}%, ${n(this.b)}%, ${this.roundA})`}toCmyk(){return be({},sle(this.r,this.g,this.b))}toCmykString(){let{c:n,m:e,y:i,k:o}=sle(this.r,this.g,this.b);return`cmyk(${n}, ${e}, ${i}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;let n="#"+rle(this.r,this.g,this.b,!1);for(let[e,i]of Object.entries(vz))if(n===i)return e;return!1}toString(n){let e=!!n;n=n??this.format;let i=!1,o=this.a<1&&this.a>=0;return!e&&o&&(n.startsWith("hex")||n==="name")?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),n==="cmyk"&&(i=this.toCmykString()),i||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new t(this.toString())}lighten(n=10){let e=this.toHsl();return e.l+=n/100,e.l=_z(e.l),new t(e)}brighten(n=10){let e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(n/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(n/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(n/100)))),new t(e)}darken(n=10){let e=this.toHsl();return e.l-=n/100,e.l=_z(e.l),new t(e)}tint(n=10){return this.mix("white",n)}shade(n=10){return this.mix("black",n)}desaturate(n=10){let e=this.toHsl();return e.s-=n/100,e.s=_z(e.s),new t(e)}saturate(n=10){let e=this.toHsl();return e.s+=n/100,e.s=_z(e.s),new t(e)}greyscale(){return this.desaturate(100)}spin(n){let e=this.toHsl(),i=(e.h+n)%360;return e.h=i<0?360+i:i,new t(e)}mix(n,e=50){let i=this.toRgb(),o=new t(n).toRgb(),r=e/100,s={r:(o.r-i.r)*r+i.r,g:(o.g-i.g)*r+i.g,b:(o.b-i.b)*r+i.b,a:(o.a-i.a)*r+i.a};return new t(s)}analogous(n=6,e=30){let i=this.toHsl(),o=360/e,r=[this];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,r.push(new t(i));return r}complement(){let n=this.toHsl();return n.h=(n.h+180)%360,new t(n)}monochromatic(n=6){let e=this.toHsv(),{h:i}=e,{s:o}=e,{v:r}=e,s=[],d=1/n;for(;n--;)s.push(new t({h:i,s:o,v:r})),r=(r+d)%1;return s}splitcomplement(){let n=this.toHsl(),{h:e}=n;return[this,new t({h:(e+72)%360,s:n.s,l:n.l}),new t({h:(e+216)%360,s:n.s,l:n.l})]}onBackground(n){let e=this.toRgb(),i=new t(n).toRgb(),o=e.a+i.a*(1-e.a);return new t({r:(e.r*e.a+i.r*i.a*(1-e.a))/o,g:(e.g*e.a+i.g*i.a*(1-e.a))/o,b:(e.b*e.a+i.b*i.a*(1-e.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(n){let e=this.toHsl(),{h:i}=e,o=[this],r=360/n;for(let s=1;s0){let r=this.good.toHsl(),s=1-this.good.toHsl().l,d=1-n/i;r.l=r.l+s*d,o=new Cs(r)}else{let r=this.bad.toHsl(),s=this.bad.toHsl().l,d=1-n/e;r.l=r.l+s*d,o=new Cs(r)}return o}};var Qw=class t extends Yw{static fromObject(n){let e=n&&n.color?new Cs(n.color):new Cs("hsl(0, 100%, 50%)");return new t(e)}constructor(n){super(),this.color=n,this.type="lightness"}clone(){return new t(this.color.clone())}toJSON(){return{type:this.type,color:this.color.toHslString()}}getColorForValue(n,e,i){let o;if(n===e)o=new Cs("#ffffff");else if(n===i)o=this.color;else{let r=this.color.toHsl(),s=1-this.color.toHsl().l,d=1-this.percentage(n,e,i);r.l=r.l+s*d,o=new Cs(r)}return o}};var cle={low:new Cs("hsl(0, 100%, 50%)"),high:new Cs("hsl(180, 100%, 50%)")},px=class t extends Yw{static fromObject(n){let e;return n.colorScheme&&(e={low:n.colorScheme.low?new Cs(n.colorScheme.low):cle.low,high:n.colorScheme.high?new Cs(n.colorScheme.high):cle.high}),new t(e)}constructor(n=cle){super(),this.colorScheme=n,this.type="scheme"}clone(){return new t({low:this.colorScheme.low.clone(),high:this.colorScheme.high.clone()})}toJSON(){return{type:this.type,colorScheme:{low:this.colorScheme.low.toHslString(),high:this.colorScheme.high.toHslString()}}}getColorForValue(n,e,i){let o;if(n===e)o=this.colorScheme.low;else if(n===i)o=this.colorScheme.high;else{let r=Math.round(this.percentage(n,e,i)*100);o=this.colorScheme.low.clone().mix(this.colorScheme.high.clone(),r)}return o}};var $P=["#000000","#FFFF00","#1CE6FF","#FF34FF","#FF4A46","#008941","#006FA6","#A30059","#FFDBE5","#7A4900","#0000A6","#63FFAC","#B79762","#004D43","#8FB0FF","#997D87","#5A0007","#809693","#FEFFE6","#1B4400","#4FC601","#3B5DFF","#4A3B53","#FF2F80","#61615A","#BA0900","#6B7900","#00C2A0","#FFAA92","#FF90C9","#B903AA","#D16100","#DDEFFF","#000035","#7B4F4B","#A1C299","#300018","#0AA6D8","#013349","#00846F","#372101","#FFB500","#C2FFED","#A079BF","#CC0744","#C0B9B2","#C2FF99","#001E09","#00489C","#6F0062","#0CBD66","#EEC3FF","#456D75","#B77B68","#7A87A1","#788D66","#885578","#FAD09F","#FF8A9A","#D157A0","#BEC459","#456648","#0086ED","#886F4C","#34362D","#B4A8BD","#00A6AA","#452C2C","#636375","#A3C8C9","#FF913F","#938A81","#575329","#00FECF","#B05B6F","#8CD0FF","#3B9700","#04F757","#C8A1A1","#1E6E00","#7900D7","#A77500","#6367A9","#A05837","#6B002C","#772600","#D790FF","#9B9700","#549E79","#FFF69F","#201625","#72418F","#BC23FF","#99ADC0","#3A2465","#922329","#5B4534","#FDE8DC","#404E55","#0089A3","#CB7E98","#A4E804","#324E72","#6A3A4C","#83AB58","#001C1E","#D1F7CE","#004B28","#C8D0F6","#A3A489","#806C66","#222800","#BF5650","#E83000","#66796D","#DA007C","#FF1A59","#8ADBB4","#1E0200","#5B4E51","#C895C5","#320033","#FF6832","#66E1D3","#CFCDAC","#D0AC94","#7ED379","#012C58"];var Sh=class{};var lW=class{static process(n,e,i="..."){return n.length{class t{static{this.ILLEGAL_CHARACTERS_IN_SHEET_NAME=["[","]","/","\\","<",">","&",":","*"]}static{this.MAX_SHEET_NAME_LENGTH=31}static{this.DEFAULT_SHEET_NAME="Export"}static sanitizeSheetName(e,i=this.MAX_SHEET_NAME_LENGTH){return(!e||e.length===0)&&(e=this.DEFAULT_SHEET_NAME),e=lW.process(e,i),this.ILLEGAL_CHARACTERS_IN_SHEET_NAME.forEach(o=>{e=e.replace(o," ")}),e}}return t})();var Cz={minimumFractionDigits:0,maximumFractionDigits:2},ag=class{static convertAngularFormatString(n){if(!n.match(/[0-9].[0-9]-[0-9]/))throw new Error("Invalid format string.");let e=n.split(".")[1].split("-"),i=parseInt(e[0]),o=parseInt(e[1]);return{minimumFractionDigits:i,maximumFractionDigits:o}}static format(n,e=Cz,i=navigator.languages){let o="";return!isNaN(n)&&n!=null&&(o=new Intl.NumberFormat(i,e).format(n)),o}};var h2e=(()=>{class t{static{this.DEFAULT_LOCALE="de-DE"}static getPreferredLocale(){let e=this.getLocales();return e&&e[0]?e[0]:this.DEFAULT_LOCALE}static getLocales(){let e=navigator.languages===void 0?[navigator.language]:navigator.languages;if(e)return e.map(i=>i.trim())}}return t})();var Ui=class t{static move(n,e,i){if(i>=n.length){let o=i-n.length+1;for(;o--;)n.push(void 0)}return n.splice(i,0,n.splice(e,1)[0]),n}static unique(n,e){return[...new Map(n.map(i=>[e(i),i])).values()]}static equals(n,e,i,o){let r;if(!n&&!e)r=!0;else if(!n||!e)r=!1;else{let s=o?n.slice().sort(o):n.slice().sort(),d=o?e.slice().sort(o):e.slice().sort();r=s.length===d.length&&s.every((m,v)=>{let w;return i?w=i(m,d[v]):w=m===d[v],w})}return r}static average(n){let e=null;return n&&n.length>0&&(e=n.reduce((i,o)=>i+o,0)/n.length),e}static sum(n){let e=null;return n&&n.length>0&&(e=n.reduce((i,o)=>i+o,0)),e}static median(n){return t.quartile(n,.5)}static quartile(n,e){if(n&&n.length>0){n.sort((d,m)=>d-m);let o=(n.length-1)*e,r=Math.floor(o),s=o-r;return n[r+1]!==void 0?n[r]+s*(n[r+1]-n[r]):n[r]}return null}static chunking(n,e){let i=0,o=n.length,r=[];for(i=0;ie[0]&&(n[0]=e[0]),n[1]>e[1]&&(n[1]=e[1]),n[2]this._legendRef.next(this.updateLegendRef(i,{min:null,max:null}))),yc([this.data$,this.colorFactory$]).subscribe(i=>this.updateSource(i[0],void 0,i[1]))}showPopup(n){this._popupSubscription=this.data$.subscribe(e=>{this.popupImpl=new hle(this.mapRef,n,(i,o)=>this.popupContent(i,o),e),this.popupControlRef.registerHandler(this.popupImpl,n)})}updateSource(n,e=oW.getDataExtremeValues(Object.keys(n),n),i){console.debug(this.layerControlId,"updateSource",n),this._legendRef.next(this.updateLegendRef(i,e));let o=Object.keys(n),r,s;o.length>0?(r=this.getFillColorExpression(o,n,e,i),s=this.getFillOpacityExpression(n),this.popupImpl&&(this.popupImpl.data=n)):(r=this.getFillColorFallback(),s=.7),this.mapRef.setPaintProperty(this.layer().id,"fill-color",r),this.mapRef.setPaintProperty(this.layer().id,"fill-opacity",s)}getFillColorExpression(n,e,i,o){let r=this.getFillColorFallback(),s=JSON.parse(JSON.stringify(this.baseFilterExpression()));return n.forEach(function(d){let m=o.getColorForValue(e[d],i.min,i.max)??new Cs(r);s.push(d,m.toHslString())}),s.push(r),s}baseFilterExpression(n){return["match",["get",this.config.geoJsonPropertiesKey]]}getFillColorFallback(){return"rgba(0,0,0,0)"}getFillOpacityExpression(n){let e=JSON.parse(JSON.stringify(this.baseFilterExpression()));return Object.keys(n).forEach(i=>{e.push(i,.7)}),e.push(0),e}updateLegendRef(n,e){return console.debug(this.config.layerId,"updateLegendRef"),new cW(this.layerControlId,this.displayName,n,e.min,e.max)}initBounds(){this.bounds=this.data$.pipe(Vo(()=>this.mapRef.fitBounds(this.defaultBounds)),Mn(n=>Wh(this.mapRef,"idle").pipe(Sn(1),vt(()=>n))),vt(n=>{let e=[];if(Object.keys(n).length>250)return this.defaultBounds;if(Object.keys(n).forEach(i=>{let o=["in",i,["get",this.config.geoJsonPropertiesKey]],r=this.mapRef.querySourceFeatures(this.config.sourceId,{filter:o,sourceLayer:this.layer()["source-layer"]});r.length>0&&r.forEach(s=>{e.push(wh({type:s.geometry.type,bbox:s.geometry.bbox,coordinates:s.geometry.coordinates},s.properties))})}),e.length>0){let i=bd(e);return t_.fromBbox(n_(i),i).bounds}else return this.defaultBounds}),Vo(n=>console.debug(this.config.sourceId,"updateBounds",n)))}},hle=class extends GP{constructor(n,e,i,o={}){super(n,e),this.contentFn=i,this.data=o}content(n){return this.contentFn({type:n.type,bbox:n.bbox,id:n.id,properties:n.properties,geometry:n.geometry?{type:n.geometry?.type,bbox:n.geometry?.bbox,coordinates:void 0}:void 0},this.data)}};var dE=class extends Ww{constructor(n,e){super(n,e),this.config=e,this.data$=new pi(1)}initBounds(){this.bounds=this.data$.asObservable().pipe(Vo(()=>console.debug(this.config.sourceId,"updateBounds")),vt(n=>n.features.length>0?t_.fromBbox(n_(n),n).bounds:ob))}updateData(n){this.data$.next(n)}afterInit(n,e){super.afterInit(n,e),this._legendRef.next(this.updateLegendRef(null)),this.data$.subscribe(i=>this.updateSource(i))}update(n){this.data$.next(n)}updateByCommand(n){super.updateByCommand(n),this.data$.subscribe(i=>this._legendRef.next(this.updateLegendRef(i))).unsubscribe()}updateSource(n){if(console.debug(this.source()?.sourceId,"updateSource"),this.mapRef&&this.source()){let e={type:"FeatureCollection",features:n.features.map(i=>({type:"Feature",id:i.id,properties:i.properties,geometry:i.geometry,bbox:i.bbox}))};this._legendRef.next(this.updateLegendRef(n)),this.mapRef.getSource(this.source().sourceId).setData(e)}}updateLegendRef(n){return new hx(this.layerControlId,this.config.displayName,"public")}};var dW=class{constructor(n){this._ref=n,this.commands=[]}addCommandChange(n,e){n.currentOption=e,this.commands=this.commands.filter(i=>i.commandId!==n.commandId),this.commands.push(n)}};var Jd=class{constructor(n){this.layerControls$=new pi,this._layers={},this._mapRef$=new pi(1),this.mapRef$=this._mapRef$.asObservable(),this._boundsByLayerId$=new pi(1),this._startup=new hi,this.config=be({interactive:!0,global:{exportMenu:!0,styleMenu:!0}},n),yc([this._startup,this._boundsByLayerId$]).pipe(Mn(e=>this._layers[e[1]].primary.bounds.pipe(vt(i=>({bounds:i,mapRef:e[0],boundsByLayerId:e[1]}))))).subscribe(e=>{console.debug("listen to bounds of",e.boundsByLayerId,e.bounds),e.mapRef.fitBounds(e.bounds,{duration:3e3,padding:30})}),this._mapRef$.subscribe(e=>{this._popupControl=new rW(e),e.on("style.load",i=>{GT(500).pipe(vt(()=>e.isStyleLoaded()),Vg(o=>o)).subscribe(()=>this._initLayers(e))}),this._initLayers(e)})}followBoundsOf(n){console.debug("followBoundsOf",n),this._boundsByLayerId$.next(n)}addMapRef(n){this._mapRef$.next(n),this._mapRef$.complete()}registerLayer(n){this._layers[n.layerControlId]={primary:n,other:[]},this._layers[n.layerControlId].primary.zIndex=n.zIndex??Object.keys(this._layers).length,n.active&&this.layerControls$.next({layerControl:n,action:"ACTIVE"})}registerWithinLayer(n,e){e.legend.showInLegend=!1,e.zIndex=e.zIndex??this._layers[n].other.length,this._layers[n].other.push(e),e.active&&this.layerControls$.next({layerControl:e,action:"ACTIVE"})}setActive(n,e,i=e?"visible":"none"){this._layers[n]&&this._layers[n].primary.active!==e&&(this._layers[n].primary.active=e,this._toggleLayer(this._layers[n].primary,i),this.layerControls$.next({layerControl:this._layers[n].primary,action:e?"ACTIVE":"NOT_ACTIVE"}),this._layers[n].other.forEach(o=>{o.active=e,this._toggleLayer(o,i),this.layerControls$.next({layerControl:o,action:e?"ACTIVE":"NOT_ACTIVE"})}))}setVisibility(n,e){this._layers[n]&&this._layers[n].primary.visible!==e&&(this._toggleLayer(this._layers[n].primary,e),this._layers[n].other.forEach(i=>this._toggleLayer(i,e)))}setActionChange(n,e){if(this._layers[n]&&this._layers[n].primary.visible){let i={action:"UPDATE-DATA",layerControl:this._layers[n].primary,data:e.data},o=this._layers[n].primary;o&&o.onRedraw(i),this.layerControls$.next(i),e.commands?.forEach(r=>{let s={action:"UPDATE-BY-COMMAND",data:r,layerControl:this._layers[n].primary},d=this._layers[n].primary;d&&d.onRedraw(s),this.layerControls$.next(s)})}}onDestroy(){return this._mapRef$.asObservable().pipe(vt(n=>{Object.values(this._layers).forEach(e=>{e.other.forEach(i=>i.destroyLayer(n,this._popupControl)),e.primary.destroyLayer(n,this._popupControl)}),Object.values(this._layers).forEach(e=>{e.other.forEach(i=>i.destroySource(n)),e.primary.destroySource(n)})}))}_toggleLayer(n,e){let i;e==="none"?(n.visible="none",i={action:"HIDE",layerControl:n},console.debug(`[${n.layerControlId}] toggle layer to ${n.visible}`,i)):(n.visible="visible",i={action:"SHOW",layerControl:n},console.debug(`[${n.layerControlId}] toggle layer to ${n.visible}`,i)),n.onRedraw(i),this.layerControls$.next(i)}_initLayers(n){console.debug("### init layers ###");let e=Object.values(this._layers).map(r=>[r.primary,...r.other]).flat().sort((r,s)=>r.zIndex-s.zIndex),i=e.map(r=>r.initImage(n)),o=e.map(r=>r.initSource(n));tc([...i,...o]).subscribe(()=>{nr(e).pipe(lh(r=>(console.debug(`start init of [${r.layerControlId}]: ${r.displayName}`),r.initLayer(n,this._popupControl))),JJ(e.length)).subscribe(()=>{console.debug("finished with init"),this._startup.next(n),e.filter(r=>r.active).filter(r=>r.visible==="visible").forEach(r=>{r.onRedraw({layerControl:r,action:"SHOW"})})})})}};var wz=class extends dE{constructor(n,e){super(n,e),this.config=e}updateLegendRef(n){let e,i=this.image();return"url"in i?e=new xz(this.layerControlId,this.config.displayName,i.url):e=new xz(this.layerControlId,this.config.displayName,`data:image/svg+xml;base64,${btoa(i?.svg)}`),this.applyLegendConfig(e,n),e}layer(){return{id:this._layerId(),type:"symbol",source:this.config.sourceId,layout:be({"icon-image":"geo","icon-size":1.5,"icon-ignore-placement":!0,"icon-allow-overlap":!0,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-anchor":"top-left"},this.config.layout),filter:["==",["get","itemActive"],!0],paint:be({"icon-color":["get","colorAsHex"],"icon-halo-blur":5},this.config.paint)}}source(){return{sourceId:this.config.sourceId,sourceData:{type:"geojson",data:bd([])}}}image(){return{imageName:"geo",sdfMode:!0,url:"https://bindocwebassets.z1.web.core.windows.net/img/geo-alt-fill.png"}}applyLegendConfig(n,e){this.config.legend?.action&&(n.legend={action:{title:"Kliniken Ansicht",component:this.config.legend.action.component,data:this.config.legend.action.dataFn(e),commands:[this._textFieldCommand(this.mapRef),this._textSizeCommand(this.mapRef),this._textAnchorCommand(this.mapRef)]}})}_layerId(){return this.config.layerId??this.layerControlId}_textFieldCommand(n){return{commandId:"text-field",displayName:"Anzeige",currentOption:{key:n.getLayoutProperty(this.layer().id,"text-field")?"ja":"nein"},options:[{key:"ja",value:["get","itemName"],displayName:"Text und Symbol anzeigen"},{key:"nein",value:void 0,displayName:"Kein Text, nur Symbol anzeigen"}],commandFn:(e,i)=>e.setLayoutProperty(this._layerId(),"text-field",i.value)}}_textSizeCommand(n){return{commandId:"text-size",displayName:"Text Gr\xF6\xDFe",currentOption:{key:n.getLayoutProperty(this.layer().id,"text-size")?n.getLayoutProperty(this.layer().id,"text-size").toString():"0"},options:[{key:"0",value:0,displayName:"Nicht sichtbar"},{key:"5",value:5,displayName:"Klein"},{key:"10",value:10,displayName:"Normal"},{key:"15",value:15,displayName:"Gro\xDF"},{key:"20",value:20,displayName:"Sehr gro\xDF"}],commandFn:(e,i)=>e.setLayoutProperty(this._layerId(),"text-size",i.value)}}_textAnchorCommand(n){return{commandId:"text-anchor",displayName:"Text Position",currentOption:{key:n.getLayoutProperty(this.layer().id,"text-anchor")&&typeof n.getLayoutProperty(this.layer().id,"text-anchor")=="string"?n.getLayoutProperty(this.layer().id,"text-anchor"):"top-left"},options:[{key:"center",value:"center",displayName:"Text und Symbol mittig"},{key:"left",value:"left",displayName:"Symbol links vom Text"},{key:"right",value:"right",displayName:"Symbol rechts vom Text"},{key:"top",value:"top",displayName:"Text unter Symbol"},{key:"bottom",value:"bottom",displayName:"Text \xFCber Symbol"},{key:"top-left",value:"top-left",displayName:"Symbol oben links vom Text"},{key:"top-right",value:"top-right",displayName:"Symbol oben rechts vom Text"},{key:"bottom-left",value:"bottom-left",displayName:"Symbol unten links vom Text"},{key:"bottom-right",value:"bottom-right",displayName:"Symbol unten rechts vom Text"}],commandFn:(e,i)=>e.setLayoutProperty(this._layerId(),"text-anchor",i.value)}}};var _2=class{static{this.ICONS=new Map([["marker-with-dot",n=>({key:"marker-with-dot",displayName:"Marker mit Loch",value:``})],["marker",n=>({key:"marker",displayName:"Marker",value:``})],["pin",n=>({key:"pin",displayName:"Nadel",value:` `})],["pin-with-circle",n=>({key:"pin-with-circle",displayName:"Pin",value:``})],["flag",n=>({key:"flag",displayName:"Flagge",value:` `})],["flag-filled",n=>({key:"flag-filled",displayName:"Flagge gef\xFCllt",value:` `})]])}static findByIdAndFillWithColor(n,e=new Cs("#000000")){if(this.ICONS.has(n))return this.ICONS.get(n)(e.toHexString())}static findAllAndFillWithColor(n=new Cs("#000000")){return[...this.ICONS.values()].map(e=>e(n.toHexString()))}};var uW=class{constructor(n,e,i,o=!0){this.mapEvent=n,this.map=e,this.controls=i,this.propagate=o}};var pW=class{constructor(n,e=[]){this._map=n,this._markers=e}get markers(){return this._markers}set markers(n){this._reset(),this._markers=n,this._addTo()}_addTo(){this._markers.forEach(n=>n.addTo(this._map))}_reset(){this._markers.forEach(n=>n.remove())}};var lm={container:"map-container",style:"mapbox://styles/mapbox/streets-v12",bounds:ob,preserveDrawingBuffer:!0,cooperativeGestures:!0,locale:{"ScrollZoomBlocker.CtrlMessage":"Nutze ctrl + scroll um in der Karte zu zoomen","ScrollZoomBlocker.CmdMessage":"Nutze \u2318 + scroll um in der Karte zu zoomen","TouchPanBlocker.Message":"Nutze 2 Finger um in der Karte zu zoomen"}},vtn=mt(be({},lm),{center:[8.689091,50.108202],zoom:8}),hW=mt(be({},lm),{center:[8.689091,50.108202],zoom:9,interactive:!1});var m2e={streets:"Stra\xDFen",outdoors:"Outdoor",light:"Hell",dark:"Dunkel",satellite:"Satellit","satellite-streets":"Satellit & Stra\xDFen","navigation-day":"Navigation Hell","navigation-night":"Navigation Dunkel"},mW=class{static fromStyleKey(n){switch(n){case"streets":return"mapbox://styles/mapbox/streets-v12";case"outdoors":return"mapbox://styles/mapbox/outdoors-v12";case"light":return"mapbox://styles/mapbox/light-v11";case"dark":return"mapbox://styles/mapbox/dark-v11";case"satellite":return"mapbox://styles/mapbox/satellite-v9";case"satellite-streets":return"mapbox://styles/mapbox/satellite-streets-v12";case"navigation-day":return"mapbox://styles/mapbox/navigation-day-v1";case"navigation-night":return"mapbox://styles/mapbox/navigation-night-v1";default:return"mapbox://styles/mapbox/streets-v12"}}};var Tlt=20,f2e=(()=>{class t{constructor(){this.cache=new qR(Tlt)}set(e){this.cache.set(e.id.toString(),e)}get(e){let i=this.cache.get(e.value);if(i)return cx.fromObject(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Elt=["mainDiagnosis","secondaryDiagnosis","skCode"],Dlt=["opsCode","mainProcedure"],Alt=["mainDiagnosis","secondaryDiagnosis"],klt=["mainDiagnosis","secondaryDiagnosis"],Mlt=["opcs","mainProcedure"],Olt=["procedure"],KP={secondaryDiagnosis:"Nebendiagnose",mainDiagnosis:"Hauptdiagnose",mainProcedure:"Hauptprozedur",skCode:"Sekund\xE4r-Ziffer",opsCode:"OPS-Ziffer",procedure:"Prozedur",opcs:"OPCS"},Sz={"ICD-10-GM":Elt.map(t=>t),"ICD-10-AT":Alt.map(t=>t),"ICD-10-UK":klt.map(t=>t),OPS:Dlt.map(t=>t),"OPCS-4":Mlt.map(t=>t),"PROCEDURE-AT":Olt.map(t=>t),"G-DRG":[]};var rb={"ICD-10-UK":[{name:"Kategorie (3-Steller)",numberOfDigit:3},{name:"Subkategorie (4-Steller)",numberOfDigit:4},{name:"Subkategorie (5-Steller)",numberOfDigit:5}],"ICD-10-AT":[{name:"Kategorie (3-Steller)",numberOfDigit:3},{name:"Subkategorie (4-Steller)",numberOfDigit:4},{name:"Subkategorie (5-Steller)",numberOfDigit:5}],"ICD-10-GM":[{name:"Kategorie (3-Steller)",numberOfDigit:3},{name:"Subkategorie (4-Steller)",numberOfDigit:4},{name:"Subkategorie (5-Steller)",numberOfDigit:5}],OPS:[{name:"Kapitel (1-Steller)",numberOfDigit:1},{name:"Kategorie (3-Steller)",numberOfDigit:3},{name:"Subkategorie (4-Steller)",numberOfDigit:4},{name:"Subkategorie (5-Steller)",numberOfDigit:5},{name:"Subkategorie (6-Steller)",numberOfDigit:6}],"PROCEDURE-AT":[],"OPCS-4":[],"G-DRG":[]};var zs=class t{static validateCodeName(n,e){let i;switch(e){case"OPS":i=!!n.match(/^[0-9]-\S{2,3}(\.\S{1,2})?$/);break;case"ICD-10-GM":case"ICD-10-AT":i=!!n.match(/^[A-Z]\d{2}(\.\d{1,2})?(\+)?$/);break;case"G-DRG":i=!!n.match(/^[0-9A-Z][0-9][0-9][A-Z]$/);break;default:i=!0}return i}static fromObject(n){return new t(n.name,n.description,n.codingSystem,n.hierarchyElementType,n.year)}constructor(n,e,i,o,r){this.name=n,this.description=e,this.codingSystem=i,this.hierarchyElementType=o,this.year=r}clone(){return new t(this.name,this.description,this.codingSystem,this.hierarchyElementType,this.year)}numberOfDigits(){switch(this.hierarchyElementType){case"chapter":return 1;case"block":return;case"specific":switch(this.codingSystem){case"G-DRG":return 3;case"ICD-10-GM":case"ICD-10-AT":case"ICD-10-UK":return this._cleanName(this.name).length;case"OPS":return this._cleanName(this.name).length;default:return}}}toJSON(){return{name:this.name,codingSystem:this.codingSystem,hierarchyElementType:this.hierarchyElementType,year:this.year}}_cleanName(n){let e=new RegExp("[-+.!*]");return n.match(e)?this._cleanName(n.replace(e,"")):n}},y2=class t{static fromObjArr(n){return n.map(t.fromObj)}static fromObj(n){let e=n.code?zs.fromObject(n.code):null;return new t(e,n.count)}constructor(n,e){this.code=n,this.count=e}};var mx={INLIER:"Normallieger",OUTLIER_LONG_STAY:"Langlieger",OUTLIER_SHORT_STAY:"Kurzlieger",UNKNOWN:"Unbekannt"};var fW=["MEDICAL_SERVICE","NURSING_SERVICE","MEDTECH_SERVICE","DRUGS_OVERHEAD","DRUGS_SINGLE","IMPLANTS","MEDICAL_SUPPLIES_OVERHEAD","MEDICAL_SUPPLIES_SINGLE","MEDICAL_SUPPLIES_EXTERNAL","INFRASTRUCTURE_MEDICAL","INFRASTRUCTURE_NON_MEDICAL"];var mle=2025;var WP=class t{constructor(n){this.data=n,this.departments=Object.keys(this.data),this._calculateDepartmentSums(),this._calculateSectionSums(),this._calculateTopSectionSums(),this._calculateTotal()}isEmpty(){return Object.keys(this.data).length===0}clone(){return new t(JSON.parse(JSON.stringify(this.data)))}_calculateDepartmentSums(){let n={};this.departments.forEach(e=>{let i=Object.keys(this.data[e]),o=0;this.data[e]&&i.forEach(r=>{this.data[e][r]&&(o=o+this.data[e][r])}),n[e]=o}),this.departmentSums=n}_calculateTopSectionSums(){let n=this.sectionSums.MEDICAL_SERVICE+this.sectionSums.MEDTECH_SERVICE+this.sectionSums.NURSING_SERVICE,e=this.sectionSums.DRUGS_OVERHEAD+this.sectionSums.DRUGS_SINGLE,i=this.sectionSums.IMPLANTS,o=this.sectionSums.MEDICAL_SUPPLIES_OVERHEAD+this.sectionSums.MEDICAL_SUPPLIES_SINGLE+this.sectionSums.MEDICAL_SUPPLIES_EXTERNAL,r=this.sectionSums.INFRASTRUCTURE_MEDICAL+this.sectionSums.INFRASTRUCTURE_NON_MEDICAL,s={STAFF:n,DRUGS:e,IMPLANTS:i,MEDICAL_SUPPLIES:o,INFRASTRUCTURE:r};this.topSectionSums=s}_calculateSectionSums(){let n={};fW.forEach(e=>{let i=0;this.departments.forEach(o=>{i=i+this.data[o][e]}),n[e]=i}),this.sectionSums=n}_calculateTotal(){let n=(e,i)=>e+this.departmentSums[i];this.total=this.departments.reduce(n,0)}};var YP=class t extends zs{static fromObject(n){let e=[],i=[],o=null;return n.mainDiagnoses&&(e=n.mainDiagnoses.map(r=>({code:zs.fromObject(r.code),percentage:r.percentage}))),n.procedures&&(i=n.procedures.map(r=>({code:zs.fromObject(r.code),percentage:r.percentage}))),n.costTable&&(o=new WP(n.costTable)),new t(n.name,n.description,n.year,n.mainDepartment,e,i,o)}constructor(n,e,i,o,r,s,d){super(n,e,"G-DRG","specific",i),this.mainDepartment=o,this.mainDiagnoses=r,this.procedures=s,this.costTable=d}clone(){return new t(this.name,this.description,this.year,this.mainDepartment?JSON.parse(JSON.stringify(this.mainDepartment)):void 0,this.mainDiagnoses?[...this.mainDiagnoses.map(n=>({code:n.code.clone(),percentage:n.percentage}))]:void 0,this.procedures?[...this.procedures.map(n=>({code:n.code.clone(),percentage:n.percentage}))]:void 0,this.costTable?this.costTable.clone():void 0)}};var gW=class t extends zs{static fromObject(n){return new t(n.name,n.description,n.year,n.content,n.ansteckend,n.ebmlabor,n.rare,n.age,n.agereject,n.morbodity,n.mortalities,n.paragraph295,n.paragraph301,n.sexcode,n.sexreject)}constructor(n,e,i,o,r,s,d,m,v,w,O,N,V,$,q){super(n,e,"ICD-10-GM","specific",i),this.content=o,this.ansteckend=r,this.ebmlabor=s,this.rare=d,this.age=m,this.agereject=v,this.morbodity=w,this.mortalities=O,this.paragraph295=N,this.paragraph301=V,this.sexcode=$,this.sexreject=q}clone(){return new t(this.name,this.description,this.year,this.content,this.ansteckend,this.ebmlabor,this.rare,this.age?JSON.parse(JSON.stringify(this.age)):void 0,this.agereject?JSON.parse(JSON.stringify(this.agereject)):void 0,this.morbodity?JSON.parse(JSON.stringify(this.morbodity)):void 0,this.mortalities?JSON.parse(JSON.stringify(this.mortalities)):void 0,this.paragraph295?JSON.parse(JSON.stringify(this.paragraph295)):void 0,this.paragraph301?JSON.parse(JSON.stringify(this.paragraph301)):void 0,this.sexcode?JSON.parse(JSON.stringify(this.sexcode)):void 0,this.sexreject?JSON.parse(JSON.stringify(this.sexreject)):void 0)}};var g0=class{static summary(n,e){if(e.length===0)return`Alle ${n} Kapitel`;function i(s){switch(s.hierarchyElementType){case"chapter":return"Kapitel";case"block":return"Gruppe";default:return""}}function o(s){switch(s.hierarchyElementType){case"chapter":return 3;case"block":return 2;default:return 1}}if(e.length===1)return`${i(e[0])} ${e[0].name}`;let r=e.sort((s,d)=>o(d)-o(s))[0];return`${i(r)} ${r.name} + ${e.length-1} weitere`}static fromObject(n){let e;switch(n.hierarchyElementType){case"chapter":case"block":e=cm.fromObject(n);break;case"specific":switch(n.codingSystem){case"G-DRG":{e=YP.fromObject(n);break}case"ICD-10-GM":case"ICD-10-AT":case"ICD-10-UK":e=gW.fromObject(n);break;default:e=zs.fromObject(n)}}return e}};var cm=class t extends zs{static fromObject(n){return new t(n.name,n.description,n.codingSystem,n.hierarchyElementType,n.shortName,n.longName,n.start?g0.fromObject(n.start):void 0,n.end?g0.fromObject(n.end):void 0)}constructor(n,e,i,o,r,s,d,m){super(n,e,i,o),this.shortName=r,this.longName=s,this.chapterStart=d,this.chapterEnd=m}clone(){return new t(this.name,this.description,this.codingSystem,this.hierarchyElementType,this.shortName,this.longName,this.chapterStart?this.chapterStart.clone():void 0,this.chapterEnd?this.chapterEnd.clone():void 0)}};var Hu=(()=>{class t{constructor(e,i,o){this._httpClient=e,this._districtCache=i,this._environmentService=o,this._store=new ZK(this._environmentService)}find(e=new XF){let i=this._store.index();return this._httpClient.get(i,{params:e.toHttpParams()}).pipe(vt(o=>cx.fromObjectArray(o)))}findAll(e){let i=this._store.index();return this._httpClient.post(i,{administrativeDistrictIds:e.map(o=>o.getNumericValue())}).pipe(vt(o=>{let r={};return Object.keys(o).forEach(s=>r[s]=cx.fromObject(o[s])),r}))}byAdministrativeDistrictId(e){let i=this._districtCache.get(e),o;if(i)o=ci(i);else{let r=this._store.byAdministrativeDistrictId(e.value);o=this._httpClient.get(r).pipe(vt(s=>cx.fromObject(s)),vt(s=>(this._districtCache.set(s),s)))}return o}findPostalCodes(e){let i=this._store.postalCodes(),o={administrativeDistrictIds:e.map(r=>r.getNumericValue())};return this._httpClient.post(i,o)}findCenterPoint(e){let i=this._store.centerPoints(),o={administrativeDistrictIds:e.map(r=>r.getNumericValue())};return this._httpClient.post(i,o).pipe(vt(r=>{let s=new Map;return Object.entries(r).forEach(d=>{s.set(Yo.createFromString(d[0]),d[1])}),s}))}cases(e,i,o,r){if(!o.every(m=>m.codingSystem===i))return console.error(`type of some codes did not match ${i}, returning empty array !`),ci([]);let s=this._store.casesAll(i),d={administrativeDistrictIds:e.map(m=>m.getNumericValue()),codes:o,years:r};return this._httpClient.post(s,d).pipe(vt(m=>m.map(v=>({code:zs.fromObject(v.code),administrativeDistrictId:Yo.createFromNumber(v.administrativeDistrictId),year:parseInt(v.year,10),count:v.count,agmId:v.agmId}))))}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(f2e),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var g2e=` .p-chip { display: inline-flex; align-items: center; background: dt('chip.background'); color: dt('chip.color'); border-radius: dt('chip.border.radius'); padding-block: dt('chip.padding.y'); padding-inline: dt('chip.padding.x'); gap: dt('chip.gap'); } .p-chip-icon { color: dt('chip.icon.color'); font-size: dt('chip.icon.font.size'); width: dt('chip.icon.size'); height: dt('chip.icon.size'); } .p-chip-image { border-radius: 50%; width: dt('chip.image.width'); height: dt('chip.image.height'); margin-inline-start: calc(-1 * dt('chip.padding.y')); } .p-chip:has(.p-chip-remove-icon) { padding-inline-end: dt('chip.padding.y'); } .p-chip:has(.p-chip-image) { padding-block-start: calc(dt('chip.padding.y') / 2); padding-block-end: calc(dt('chip.padding.y') / 2); } .p-chip-remove-icon { cursor: pointer; font-size: dt('chip.remove.icon.size'); width: dt('chip.remove.icon.size'); height: dt('chip.remove.icon.size'); color: dt('chip.remove.icon.color'); border-radius: 50%; transition: outline-color dt('chip.transition.duration'), box-shadow dt('chip.transition.duration'); outline-color: transparent; } .p-chip-remove-icon:focus-visible { box-shadow: dt('chip.remove.icon.focus.ring.shadow'); outline: dt('chip.remove.icon.focus.ring.width') dt('chip.remove.icon.focus.ring.style') dt('chip.remove.icon.focus.ring.color'); outline-offset: dt('chip.remove.icon.focus.ring.offset'); } `;var Rlt=["removeicon"],Flt=["*"];function Plt(t,n){if(t&1){let e=tt();k(0,"img",4),ie("error",function(o){se(e);let r=P();return ae(r.imageError(o))}),D()}if(t&2){let e=P();Oe(e.cx("image")),E("src",e.image,dc)("alt",e.alt)}}function Llt(t,n){if(t&1&&ce(0,"span",6),t&2){let e=P(2);Oe(e.icon),E("ngClass",e.cx("icon")),Ge("data-pc-section","icon")}}function Nlt(t,n){if(t&1&&ee(0,Llt,1,4,"span",5),t&2){let e=P();E("ngIf",e.icon)}}function Blt(t,n){if(t&1&&(k(0,"div"),Q(1),D()),t&2){let e=P();Oe(e.cx("label")),Ge("data-pc-section","label"),T(),dt(e.label)}}function Vlt(t,n){if(t&1){let e=tt();k(0,"span",10),ie("click",function(o){se(e);let r=P(3);return ae(r.close(o))})("keydown",function(o){se(e);let r=P(3);return ae(r.onKeydown(o))}),D()}if(t&2){let e=P(3);Oe(e.removeIcon),E("ngClass",e.cx("removeIcon")),Ge("data-pc-section","removeicon")("aria-label",e.removeAriaLabel)}}function zlt(t,n){if(t&1){let e=tt();si(),k(0,"svg",11),ie("click",function(o){se(e);let r=P(3);return ae(r.close(o))})("keydown",function(o){se(e);let r=P(3);return ae(r.onKeydown(o))}),D()}if(t&2){let e=P(3);Oe(e.cx("removeIcon")),Ge("data-pc-section","removeicon")("aria-label",e.removeAriaLabel)}}function Ult(t,n){if(t&1&&(Di(0),ee(1,Vlt,1,5,"span",8)(2,zlt,1,4,"svg",9),Ai()),t&2){let e=P(2);T(),E("ngIf",e.removeIcon),T(),E("ngIf",!e.removeIcon)}}function Hlt(t,n){}function jlt(t,n){t&1&&ee(0,Hlt,0,0,"ng-template")}function Glt(t,n){if(t&1){let e=tt();k(0,"span",12),ie("click",function(o){se(e);let r=P(2);return ae(r.close(o))})("keydown",function(o){se(e);let r=P(2);return ae(r.onKeydown(o))}),ee(1,jlt,1,0,null,13),D()}if(t&2){let e=P(2);Oe(e.cx("removeIcon")),Ge("data-pc-section","removeicon")("aria-label",e.removeAriaLabel),T(),E("ngTemplateOutlet",e.removeIconTemplate||e._removeIconTemplate)}}function $lt(t,n){if(t&1&&(Di(0),ee(1,Ult,3,2,"ng-container",3)(2,Glt,2,5,"span",7),Ai()),t&2){let e=P();T(),E("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),T(),E("ngIf",e.removeIconTemplate||e._removeIconTemplate)}}var qlt={root:()=>["p-chip p-component"],image:"p-chip-image",icon:"p-chip-icon",label:"p-chip-label",removeIcon:"p-chip-remove-icon"},_2e=(()=>{class t extends io{name="chip";theme=g2e;classes=qlt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var QP=(()=>{class t extends oo{label;icon;image;alt;styleClass;removable=!1;removeIcon;onRemove=new ve;onImageError=new ve;visible=!0;get removeAriaLabel(){return this.config.getTranslation(el.ARIA).removeLabel}get chipProps(){return this._chipProps}set chipProps(e){this._chipProps=e,e&&typeof e=="object"&&Object.entries(e).forEach(([i,o])=>this[`_${i}`]!==o&&(this[`_${i}`]=o))}_chipProps;_componentStyle=re(_2e);removeIconTemplate;templates;_removeIconTemplate;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"removeicon":this._removeIconTemplate=e.template;break;default:this._removeIconTemplate=e.template;break}})}ngOnChanges(e){if(super.ngOnChanges(e),e.chipProps&&e.chipProps.currentValue){let{currentValue:i}=e.chipProps;i.label!==void 0&&(this.label=i.label),i.icon!==void 0&&(this.icon=i.icon),i.image!==void 0&&(this.image=i.image),i.alt!==void 0&&(this.alt=i.alt),i.styleClass!==void 0&&(this.styleClass=i.styleClass),i.removable!==void 0&&(this.removable=i.removable),i.removeIcon!==void 0&&(this.removeIcon=i.removeIcon)}}close(e){this.visible=!1,this.onRemove.emit(e)}onKeydown(e){(e.key==="Enter"||e.key==="Backspace")&&this.close(e)}imageError(e){this.onImageError.emit(e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-chip"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Rlt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.removeIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},hostVars:7,hostBindings:function(i,o){i&2&&(Ge("data-pc-name","chip")("aria-label",o.label)("data-pc-section","root"),Oe(o.cn(o.cx("root"),o.styleClass)),Ir("display",!o.visible&&"none"))},inputs:{label:"label",icon:"icon",image:"image",alt:"alt",styleClass:"styleClass",removable:[2,"removable","removable",je],removeIcon:"removeIcon",chipProps:"chipProps"},outputs:{onRemove:"onRemove",onImageError:"onImageError"},features:[jt([_2e]),ft,Ot],ngContentSelectors:Flt,decls:6,vars:4,consts:[["iconTemplate",""],[3,"class","src","alt","error",4,"ngIf","ngIfElse"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"error","src","alt"],[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],["tabindex","0","role","button",3,"class","click","keydown",4,"ngIf"],["tabindex","0","role","button",3,"class","ngClass","click","keydown",4,"ngIf"],["data-p-icon","times-circle","tabindex","0","role","button",3,"class","click","keydown",4,"ngIf"],["tabindex","0","role","button",3,"click","keydown","ngClass"],["data-p-icon","times-circle","tabindex","0","role","button",3,"click","keydown"],["tabindex","0","role","button",3,"click","keydown"],[4,"ngTemplateOutlet"]],template:function(i,o){if(i&1&&(Nn(),pn(0),ee(1,Plt,1,4,"img",1)(2,Nlt,1,1,"ng-template",null,0,Pt)(4,Blt,2,4,"div",2)(5,$lt,3,2,"ng-container",3)),i&2){let r=ti(3);T(),E("ngIf",o.image)("ngIfElse",r),T(3),E("ngIf",o.label),T(),E("ngIf",o.removable)}},dependencies:[On,Ns,Fr,Lo,HK,In],encapsulation:2,changeDetection:0})}return t})();var y2e=` .p-autocomplete { display: inline-flex; } .p-autocomplete-loader { position: absolute; top: 50%; margin-top: -0.5rem; inset-inline-end: dt('autocomplete.padding.x'); } .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader { inset-inline-end: calc(dt('autocomplete.dropdown.width') + dt('autocomplete.padding.x')); } .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input { flex: 1 1 auto; width: 1%; } .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input, .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple { border-start-end-radius: 0; border-end-end-radius: 0; } .p-autocomplete-dropdown { cursor: pointer; display: inline-flex; user-select: none; align-items: center; justify-content: center; overflow: hidden; position: relative; width: dt('autocomplete.dropdown.width'); border-start-end-radius: dt('autocomplete.dropdown.border.radius'); border-end-end-radius: dt('autocomplete.dropdown.border.radius'); background: dt('autocomplete.dropdown.background'); border: 1px solid dt('autocomplete.dropdown.border.color'); border-inline-start: 0 none; color: dt('autocomplete.dropdown.color'); transition: background dt('autocomplete.transition.duration'), color dt('autocomplete.transition.duration'), border-color dt('autocomplete.transition.duration'), outline-color dt('autocomplete.transition.duration'), box-shadow dt('autocomplete.transition.duration'); outline-color: transparent; } .p-autocomplete-dropdown:not(:disabled):hover { background: dt('autocomplete.dropdown.hover.background'); border-color: dt('autocomplete.dropdown.hover.border.color'); color: dt('autocomplete.dropdown.hover.color'); } .p-autocomplete-dropdown:not(:disabled):active { background: dt('autocomplete.dropdown.active.background'); border-color: dt('autocomplete.dropdown.active.border.color'); color: dt('autocomplete.dropdown.active.color'); } .p-autocomplete-dropdown:focus-visible { box-shadow: dt('autocomplete.dropdown.focus.ring.shadow'); outline: dt('autocomplete.dropdown.focus.ring.width') dt('autocomplete.dropdown.focus.ring.style') dt('autocomplete.dropdown.focus.ring.color'); outline-offset: dt('autocomplete.dropdown.focus.ring.offset'); } .p-autocomplete-overlay { position: absolute; top: 0; left: 0; background: dt('autocomplete.overlay.background'); color: dt('autocomplete.overlay.color'); border: 1px solid dt('autocomplete.overlay.border.color'); border-radius: dt('autocomplete.overlay.border.radius'); box-shadow: dt('autocomplete.overlay.shadow'); min-width: 100%; } .p-autocomplete-list-container { overflow: auto; } .p-autocomplete-list { margin: 0; list-style-type: none; display: flex; flex-direction: column; gap: dt('autocomplete.list.gap'); padding: dt('autocomplete.list.padding'); } .p-autocomplete-option { cursor: pointer; white-space: nowrap; position: relative; overflow: hidden; display: flex; align-items: center; padding: dt('autocomplete.option.padding'); border: 0 none; color: dt('autocomplete.option.color'); background: transparent; transition: background dt('autocomplete.transition.duration'), color dt('autocomplete.transition.duration'), border-color dt('autocomplete.transition.duration'); border-radius: dt('autocomplete.option.border.radius'); } .p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus { background: dt('autocomplete.option.focus.background'); color: dt('autocomplete.option.focus.color'); } .p-autocomplete-option-selected { background: dt('autocomplete.option.selected.background'); color: dt('autocomplete.option.selected.color'); } .p-autocomplete-option-selected.p-focus { background: dt('autocomplete.option.selected.focus.background'); color: dt('autocomplete.option.selected.focus.color'); } .p-autocomplete-option-group { margin: 0; padding: dt('autocomplete.option.group.padding'); color: dt('autocomplete.option.group.color'); background: dt('autocomplete.option.group.background'); font-weight: dt('autocomplete.option.group.font.weight'); } .p-autocomplete-input-multiple { margin: 0; list-style-type: none; cursor: text; overflow: hidden; display: flex; align-items: center; flex-wrap: wrap; padding: calc(dt('autocomplete.padding.y') / 2) dt('autocomplete.padding.x'); gap: calc(dt('autocomplete.padding.y') / 2); color: dt('autocomplete.color'); background: dt('autocomplete.background'); border: 1px solid dt('autocomplete.border.color'); border-radius: dt('autocomplete.border.radius'); width: 100%; transition: background dt('autocomplete.transition.duration'), color dt('autocomplete.transition.duration'), border-color dt('autocomplete.transition.duration'), outline-color dt('autocomplete.transition.duration'), box-shadow dt('autocomplete.transition.duration'); outline-color: transparent; box-shadow: dt('autocomplete.shadow'); } .p-autocomplete-input-multiple.p-disabled { opacity: 1; background: dt('inputtext.disabled.background'); color: dt('inputtext.disabled.color'); } .p-autocomplete:not(.p-disabled):hover .p-autocomplete-input-multiple { border-color: dt('autocomplete.hover.border.color'); } .p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple { border-color: dt('autocomplete.focus.border.color'); box-shadow: dt('autocomplete.focus.ring.shadow'); outline: dt('autocomplete.focus.ring.width') dt('autocomplete.focus.ring.style') dt('autocomplete.focus.ring.color'); outline-offset: dt('autocomplete.focus.ring.offset'); } .p-autocomplete.p-invalid .p-autocomplete-input-multiple { border-color: dt('autocomplete.invalid.border.color'); } .p-variant-filled.p-autocomplete-input-multiple { background: dt('autocomplete.filled.background'); } .p-autocomplete:not(.p-disabled):hover .p-variant-filled.p-autocomplete-input-multiple { background: dt('autocomplete.filled.hover.background'); } .p-autocomplete:not(.p-disabled).p-focus .p-variant-filled.p-autocomplete-input-multiple { background: dt('autocomplete.filled.focus.background'); } .p-autocomplete.p-disabled .p-autocomplete-input-multiple { opacity: 1; background: dt('autocomplete.disabled.background'); color: dt('autocomplete.disabled.color'); } .p-autocomplete-chip.p-chip { padding-block-start: calc(dt('autocomplete.padding.y') / 2); padding-block-end: calc(dt('autocomplete.padding.y') / 2); border-radius: dt('autocomplete.chip.border.radius'); } .p-autocomplete-input-multiple:has(.p-autocomplete-chip) { padding-inline-start: calc(dt('autocomplete.padding.y') / 2); padding-inline-end: calc(dt('autocomplete.padding.y') / 2); } .p-autocomplete-chip-item.p-focus .p-autocomplete-chip { background: dt('autocomplete.chip.focus.background'); color: dt('autocomplete.chip.focus.color'); } .p-autocomplete-input-chip { flex: 1 1 auto; display: inline-flex; padding-block-start: calc(dt('autocomplete.padding.y') / 2); padding-block-end: calc(dt('autocomplete.padding.y') / 2); } .p-autocomplete-input-chip input { border: 0 none; outline: 0 none; background: transparent; margin: 0; padding: 0; box-shadow: none; border-radius: 0; width: 100%; font-family: inherit; font-feature-settings: inherit; font-size: 1rem; color: inherit; } .p-autocomplete-input-chip input::placeholder { color: dt('autocomplete.placeholder.color'); } .p-autocomplete.p-invalid .p-autocomplete-input-chip input::placeholder { color: dt('autocomplete.invalid.placeholder.color'); } .p-autocomplete-empty-message { padding: dt('autocomplete.empty.message.padding'); } .p-autocomplete-fluid { display: flex; } .p-autocomplete-fluid:has(.p-autocomplete-dropdown) .p-autocomplete-input { width: 1%; } .p-autocomplete:has(.p-inputtext-sm) .p-autocomplete-dropdown { width: dt('autocomplete.dropdown.sm.width'); } .p-autocomplete:has(.p-inputtext-sm) .p-autocomplete-dropdown .p-icon { font-size: dt('form.field.sm.font.size'); width: dt('form.field.sm.font.size'); height: dt('form.field.sm.font.size'); } .p-autocomplete:has(.p-inputtext-lg) .p-autocomplete-dropdown { width: dt('autocomplete.dropdown.lg.width'); } .p-autocomplete:has(.p-inputtext-lg) .p-autocomplete-dropdown .p-icon { font-size: dt('form.field.lg.font.size'); width: dt('form.field.lg.font.size'); height: dt('form.field.lg.font.size'); } .p-autocomplete-clear-icon { position: absolute; top: 50%; margin-top: -0.5rem; cursor: pointer; color: dt('autocomplete.dropdown.color'); inset-inline-end: dt('autocomplete.padding.x'); } .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-clear-icon { inset-inline-end: calc(dt('autocomplete.padding.x') + dt('autocomplete.dropdown.width')); } `;var Klt=["item"],Wlt=["empty"],Ylt=["header"],Qlt=["footer"],Zlt=["selecteditem"],Xlt=["group"],Jlt=["loader"],ect=["removeicon"],tct=["loadingicon"],ict=["clearicon"],nct=["dropdownicon"],oct=["focusInput"],rct=["multiIn"],sct=["multiContainer"],act=["ddBtn"],lct=["items"],cct=["scroller"],dct=["overlay"],uct=t=>({i:t}),b2e=t=>({$implicit:t}),pct=(t,n,e)=>({removeCallback:t,index:n,class:e}),_W=t=>({height:t}),C2e=(t,n)=>({$implicit:t,options:n}),hct=t=>({options:t}),mct=()=>({}),fct=(t,n,e)=>({option:t,i:n,scrollerOptions:e}),gct=(t,n)=>({$implicit:t,index:n});function _ct(t,n){if(t&1){let e=tt();k(0,"input",17,2),ie("input",function(o){se(e);let r=P();return ae(r.onInput(o))})("keydown",function(o){se(e);let r=P();return ae(r.onKeyDown(o))})("change",function(o){se(e);let r=P();return ae(r.onInputChange(o))})("focus",function(o){se(e);let r=P();return ae(r.onInputFocus(o))})("blur",function(o){se(e);let r=P();return ae(r.onInputBlur(o))})("paste",function(o){se(e);let r=P();return ae(r.onInputPaste(o))})("keyup",function(o){se(e);let r=P();return ae(r.onInputKeyUp(o))}),D()}if(t&2){let e=P();Oe(e.cn(e.cx("pcInputText"),e.inputStyleClass)),E("pAutoFocus",e.autofocus)("ngStyle",e.inputStyle)("variant",e.$variant())("invalid",e.invalid())("pSize",e.size())("fluid",e.hasFluid),Ge("type",e.type)("value",e.inputValue())("id",e.inputId)("autocomplete",e.autocomplete)("placeholder",e.placeholder)("name",e.name())("minlength",e.minlength())("min",e.min())("max",e.max())("pattern",e.pattern())("size",e.inputSize())("maxlength",e.maxlength())("tabindex",e.$disabled()?-1:e.tabindex)("required",e.required()?"":void 0)("readonly",e.readonly?"":void 0)("disabled",e.$disabled()?"":void 0)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-required",e.required())("aria-expanded",e.overlayVisible??!1)("aria-controls",e.overlayVisible?e.id+"_list":null)("aria-activedescendant",e.focused?e.focusedOptionId:void 0)}}function yct(t,n){if(t&1){let e=tt();si(),k(0,"svg",20),ie("click",function(){se(e);let o=P(2);return ae(o.clear())}),D()}if(t&2){let e=P(2);Oe(e.cx("clearIcon")),Ge("aria-hidden",!0)}}function vct(t,n){}function bct(t,n){t&1&&ee(0,vct,0,0,"ng-template")}function Cct(t,n){if(t&1){let e=tt();k(0,"span",21),ie("click",function(){se(e);let o=P(2);return ae(o.clear())}),ee(1,bct,1,0,null,22),D()}if(t&2){let e=P(2);Oe(e.cx("clearIcon")),Ge("aria-hidden",!0),T(),E("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function xct(t,n){if(t&1&&(Di(0),ee(1,yct,1,3,"svg",18)(2,Cct,2,4,"span",19),Ai()),t&2){let e=P();T(),E("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),T(),E("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function wct(t,n){t&1&&ui(0)}function Sct(t,n){if(t&1){let e=tt();k(0,"span",21),ie("click",function(o){se(e);let r=P(2).index,s=P(2);return ae(s.readonly?"":s.removeOption(o,r))}),si(),ce(1,"svg",29),D()}if(t&2){let e=P(4);Oe(e.cx("chipIcon")),T(),Oe(e.cx("chipIcon")),Ge("aria-hidden",!0)}}function Tct(t,n){}function Ict(t,n){t&1&&ee(0,Tct,0,0,"ng-template")}function Ect(t,n){if(t&1&&(k(0,"span"),ee(1,Ict,1,0,null,28),D()),t&2){let e=P(2).index,i=P(2);Ge("aria-hidden",!0),T(),E("ngTemplateOutlet",i.removeIconTemplate||i._removeIconTemplate)("ngTemplateOutletContext",$d(3,pct,i.removeOption.bind(i),e,i.cx("chipIcon")))}}function Dct(t,n){if(t&1&&ee(0,Sct,2,5,"span",19)(1,Ect,2,7,"span",13),t&2){let e=P(3);E("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),T(),E("ngIf",e.removeIconTemplate||e._removeIconTemplate)}}function Act(t,n){if(t&1){let e=tt();k(0,"li",25,4)(2,"p-chip",27),ie("onRemove",function(o){let r=se(e).index,s=P(2);return ae(s.readonly?"":s.removeOption(o,r))}),ee(3,wct,1,0,"ng-container",28)(4,Dct,2,2,"ng-template",null,5,Pt),D()()}if(t&2){let e=n.$implicit,i=n.index,o=P(2);Oe(o.cx("chipItem",ki(13,uct,i))),Ge("id",o.id+"_multiple_option_"+i)("aria-label",o.getOptionLabel(e))("aria-setsize",o.modelValue().length)("aria-posinset",i+1)("aria-selected",!0),T(2),Oe(o.cx("pcChip")),E("label",!o.selectedItemTemplate&&!o._selectedItemTemplate&&o.getOptionLabel(e))("removable",!0),T(),E("ngTemplateOutlet",o.selectedItemTemplate||o._selectedItemTemplate)("ngTemplateOutletContext",ki(15,b2e,e))}}function kct(t,n){if(t&1){let e=tt();k(0,"ul",23,3),ie("focus",function(o){se(e);let r=P();return ae(r.onMultipleContainerFocus(o))})("blur",function(o){se(e);let r=P();return ae(r.onMultipleContainerBlur(o))})("keydown",function(o){se(e);let r=P();return ae(r.onMultipleContainerKeyDown(o))}),ee(2,Act,6,17,"li",24),k(3,"li",25)(4,"input",26,2),ie("input",function(o){se(e);let r=P();return ae(r.onInput(o))})("keydown",function(o){se(e);let r=P();return ae(r.onKeyDown(o))})("change",function(o){se(e);let r=P();return ae(r.onInputChange(o))})("focus",function(o){se(e);let r=P();return ae(r.onInputFocus(o))})("blur",function(o){se(e);let r=P();return ae(r.onInputBlur(o))})("paste",function(o){se(e);let r=P();return ae(r.onInputPaste(o))})("keyup",function(o){se(e);let r=P();return ae(r.onInputKeyUp(o))}),D()()()}if(t&2){let e=P();Oe(e.cx("inputMultiple")),E("tabindex",-1),Ge("aria-orientation","horizontal")("aria-activedescendant",e.focused?e.focusedMultipleOptionId:void 0),T(2),E("ngForOf",e.modelValue()),T(),Oe(e.cx("inputChip")),T(),Oe(e.cx("pcInputText")),E("pAutoFocus",e.autofocus)("ngStyle",e.inputStyle),Ge("type",e.type)("id",e.inputId)("autocomplete",e.autocomplete)("name",e.name())("minlength",e.minlength())("maxlength",e.maxlength())("size",e.size())("min",e.min())("max",e.max())("pattern",e.pattern())("placeholder",e.$filled()?null:e.placeholder)("tabindex",e.$disabled()?-1:e.tabindex)("required",e.required()?"":void 0)("readonly",e.readonly?"":void 0)("disabled",e.$disabled()?"":void 0)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-required",e.required())("aria-expanded",e.overlayVisible??!1)("aria-controls",e.overlayVisible?e.id+"_list":null)("aria-activedescendant",e.focused?e.focusedOptionId:void 0)}}function Mct(t,n){if(t&1&&(si(),ce(0,"svg",32)),t&2){let e=P(2);Oe(e.cx("loader")),E("spin",!0),Ge("aria-hidden",!0)}}function Oct(t,n){}function Rct(t,n){t&1&&ee(0,Oct,0,0,"ng-template")}function Fct(t,n){if(t&1&&(k(0,"span"),ee(1,Rct,1,0,null,22),D()),t&2){let e=P(2);Oe(e.cx("loader")),Ge("aria-hidden",!0),T(),E("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function Pct(t,n){if(t&1&&(Di(0),ee(1,Mct,1,4,"svg",30)(2,Fct,2,4,"span",31),Ai()),t&2){let e=P();T(),E("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),T(),E("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Lct(t,n){if(t&1&&ce(0,"span",35),t&2){let e=P(2);E("ngClass",e.dropdownIcon),Ge("aria-hidden",!0)}}function Nct(t,n){t&1&&(si(),ce(0,"svg",37))}function Bct(t,n){}function Vct(t,n){t&1&&ee(0,Bct,0,0,"ng-template")}function zct(t,n){if(t&1&&(Di(0),ee(1,Nct,1,0,"svg",36)(2,Vct,1,0,null,22),Ai()),t&2){let e=P(2);T(),E("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),T(),E("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function Uct(t,n){if(t&1){let e=tt();k(0,"button",33,6),ie("click",function(o){se(e);let r=P();return ae(r.handleDropdownClick(o))}),ee(2,Lct,1,2,"span",34)(3,zct,3,2,"ng-container",13),D()}if(t&2){let e=P();Oe(e.cx("dropdown")),E("disabled",e.$disabled()),Ge("aria-label",e.dropdownAriaLabel)("tabindex",e.tabindex),T(2),E("ngIf",e.dropdownIcon),T(),E("ngIf",!e.dropdownIcon)}}function Hct(t,n){t&1&&ui(0)}function jct(t,n){t&1&&ui(0)}function Gct(t,n){if(t&1&&ee(0,jct,1,0,"ng-container",28),t&2){let e=n.$implicit,i=n.options;P(2);let o=ti(6);E("ngTemplateOutlet",o)("ngTemplateOutletContext",Eo(2,C2e,e,i))}}function $ct(t,n){t&1&&ui(0)}function qct(t,n){if(t&1&&ee(0,$ct,1,0,"ng-container",28),t&2){let e=n.options,i=P(4);E("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",ki(2,hct,e))}}function Kct(t,n){t&1&&(Di(0),ee(1,qct,1,4,"ng-template",null,9,Pt),Ai())}function Wct(t,n){if(t&1){let e=tt();k(0,"p-scroller",41,8),ie("onLazyLoad",function(o){se(e);let r=P(2);return ae(r.onLazyLoad.emit(o))}),ee(2,Gct,1,5,"ng-template",null,1,Pt)(4,Kct,3,0,"ng-container",13),D()}if(t&2){let e=P(2);$r(ki(8,_W,e.scrollHeight)),E("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),T(4),E("ngIf",e.loaderTemplate||e._loaderTemplate)}}function Yct(t,n){t&1&&ui(0)}function Qct(t,n){if(t&1&&(Di(0),ee(1,Yct,1,0,"ng-container",28),Ai()),t&2){P();let e=ti(6),i=P();T(),E("ngTemplateOutlet",e)("ngTemplateOutletContext",Eo(3,C2e,i.visibleOptions(),uo(2,mct)))}}function Zct(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(2).$implicit,i=P(3);T(),dt(i.getOptionGroupLabel(e.optionGroup))}}function Xct(t,n){t&1&&ui(0)}function Jct(t,n){if(t&1&&(Di(0),k(1,"li",45),ee(2,Zct,2,1,"span",13)(3,Xct,1,0,"ng-container",28),D(),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P().options,s=P(2);T(),Oe(s.cx("optionGroup")),E("ngStyle",ki(7,_W,r.itemSize+"px")),Ge("id",s.id+"_"+s.getOptionIndex(o,r)),T(),E("ngIf",!s.groupTemplate),T(),E("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",ki(9,b2e,i.optionGroup))}}function edt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(2).$implicit,i=P(3);T(),dt(i.getOptionLabel(e))}}function tdt(t,n){t&1&&ui(0)}function idt(t,n){if(t&1){let e=tt();Di(0),k(1,"li",46),ie("click",function(o){se(e);let r=P().$implicit,s=P(3);return ae(s.onOptionSelect(o,r))})("mouseenter",function(o){se(e);let r=P().index,s=P().options,d=P(2);return ae(d.onOptionMouseEnter(o,d.getOptionIndex(r,s)))}),ee(2,edt,2,1,"span",13)(3,tdt,1,0,"ng-container",28),D(),Ai()}if(t&2){let e=P(),i=e.$implicit,o=e.index,r=P().options,s=P(2);T(),Oe(s.cx("option",$d(13,fct,i,o,r))),E("ngStyle",ki(17,_W,r.itemSize+"px")),Ge("id",s.id+"_"+s.getOptionIndex(o,r))("aria-label",s.getOptionLabel(i))("aria-selected",s.isSelected(i))("aria-disabled",s.isOptionDisabled(i))("data-p-focused",s.focusedOptionIndex()===s.getOptionIndex(o,r))("aria-setsize",s.ariaSetSize)("aria-posinset",s.getAriaPosInset(s.getOptionIndex(o,r))),T(),E("ngIf",!s.itemTemplate&&!s._itemTemplate),T(),E("ngTemplateOutlet",s.itemTemplate||s._itemTemplate)("ngTemplateOutletContext",Eo(19,gct,i,r.getOptions?r.getOptions(o):o))}}function ndt(t,n){if(t&1&&ee(0,Jct,4,11,"ng-container",13)(1,idt,4,22,"ng-container",13),t&2){let e=n.$implicit,i=P(3);E("ngIf",i.isOptionGroup(e)),T(),E("ngIf",!i.isOptionGroup(e))}}function odt(t,n){if(t&1&&(Di(0),Q(1),Ai()),t&2){let e=P(4);T(),Qi(" ",e.searchResultMessageText," ")}}function rdt(t,n){t&1&&ui(0,null,11)}function sdt(t,n){if(t&1&&(k(0,"li",45),ee(1,odt,2,1,"ng-container",47)(2,rdt,2,0,"ng-container",22),D()),t&2){let e=P().options,i=P(2);Oe(i.cx("emptyMessage")),E("ngStyle",ki(6,_W,e.itemSize+"px")),T(),E("ngIf",!i.emptyTemplate&&!i._emptyTemplate)("ngIfElse",i.empty),T(),E("ngTemplateOutlet",i.emptyTemplate||i._emptyTemplate)}}function adt(t,n){if(t&1&&(k(0,"ul",42,10),ee(2,ndt,2,2,"ng-template",43)(3,sdt,3,8,"li",44),D()),t&2){let e=n.$implicit,i=n.options,o=P(2);$r(i.contentStyle),Oe(o.cn(o.cx("list"),i.contentStyleClass)),Ge("id",o.id+"_list")("aria-label",o.listLabel),T(2),E("ngForOf",e),T(),E("ngIf",!e||e&&e.length===0&&o.showEmptyMessage)}}function ldt(t,n){t&1&&ui(0)}function cdt(t,n){if(t&1&&(k(0,"div",38),ee(1,Hct,1,0,"ng-container",22),k(2,"div"),ee(3,Wct,5,10,"p-scroller",39)(4,Qct,2,6,"ng-container",13),D(),ee(5,adt,4,8,"ng-template",null,7,Pt)(7,ldt,1,0,"ng-container",22),D(),k(8,"span",40),Q(9),D()),t&2){let e=P();Oe(e.cn(e.cx("overlay"),e.panelStyleClass)),E("ngStyle",e.panelStyle),T(),E("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),T(),Oe(e.cx("listContainer")),Ir("max-height",e.virtualScroll?"auto":e.scrollHeight),T(),E("ngIf",e.virtualScroll),T(),E("ngIf",!e.virtualScroll),T(3),E("ngTemplateOutlet",e.footerTemplate||e._footerTemplate),T(2),Qi(" ",e.selectedMessageText," ")}}var ddt=` ${y2e} /* For PrimeNG */ p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input, p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple, p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input, p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input-multiple p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input, p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple { border-color: dt('autocomplete.invalid.border.color'); } p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus, p-autoComplete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple, p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus, p-auto-complete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple, p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus, p-autocomplete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple { border-color: dt('autocomplete.focus.border.color'); } p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder, p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder, p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder { color: dt('autocomplete.invalid.placeholder.color'); } p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder, p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder, p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder { color: dt('autocomplete.invalid.placeholder.color'); } `,udt={root:{position:"relative"}},pdt={root:({instance:t})=>["p-autocomplete p-component p-inputwrapper",{"p-invalid":t.invalid(),"p-focus":t.focused,"p-inputwrapper-filled":t.$filled(),"p-inputwrapper-focus":t.focused&&!t.$disabled()||t.autofocus||t.overlayVisible,"p-autocomplete-open":t.overlayVisible,"p-autocomplete-clearable":t.showClear&&!t.$disabled(),"p-autocomplete-fluid":t.hasFluid}],pcInputText:"p-autocomplete-input",inputMultiple:({instance:t})=>["p-autocomplete-input-multiple",{"p-disabled":t.$disabled(),"p-variant-filled":t.$variant()==="filled"}],chipItem:({instance:t,i:n})=>["p-autocomplete-chip-item",{"p-focus":t.focusedMultipleOptionIndex()===n}],pcChip:"p-autocomplete-chip",chipIcon:"p-autocomplete-chip-icon",inputChip:"p-autocomplete-input-chip",loader:"p-autocomplete-loader",dropdown:"p-autocomplete-dropdown",overlay:({instance:t})=>["p-autocomplete-overlay p-component-overlay p-component",{"p-input-filled":t.$variant()==="filled","p-ripple-disabled":t.config.ripple()===!1}],listContainer:"p-autocomplete-list-container",list:"p-autocomplete-list",optionGroup:"p-autocomplete-option-group",option:({instance:t,option:n,i:e,scrollerOptions:i})=>({"p-autocomplete-option":!0,"p-autocomplete-option-selected":t.isSelected(n),"p-focus":t.focusedOptionIndex()===t.getOptionIndex(e,i),"p-disabled":t.isOptionDisabled(n)}),emptyMessage:"p-autocomplete-empty-message",clearIcon:"p-autocomplete-clear-icon"},v2e=(()=>{class t extends io{name="autocomplete";theme=ddt;classes=pdt;inlineStyles=udt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var hdt={provide:Ea,useExisting:Ko(()=>Th),multi:!0},Th=(()=>{class t extends XI{overlayService;zone;minLength=1;minQueryLength;delay=300;panelStyle;styleClass;panelStyleClass;inputStyle;inputId;inputStyleClass;placeholder;readonly;scrollHeight="200px";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;autoHighlight;forceSelection;type="text";autoZIndex=!0;baseZIndex=0;ariaLabel;dropdownAriaLabel;ariaLabelledBy;dropdownIcon;unique=!0;group;completeOnFocus=!1;showClear=!1;dropdown;showEmptyMessage=!0;dropdownMode="blank";multiple;tabindex;dataKey;emptyMessage;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";autofocus;autocomplete="off";optionGroupChildren="items";optionGroupLabel="label";overlayOptions;get suggestions(){return this._suggestions()}set suggestions(e){this._suggestions.set(e),this.handleSuggestionsChange()}optionLabel;optionValue;id;searchMessage;emptySelectionMessage;selectionMessage;autoOptionFocus=!1;selectOnFocus;searchLocale;optionDisabled;focusOnHover=!0;typeahead=!0;appendTo=mo(void 0);completeMethod=new ve;onSelect=new ve;onUnselect=new ve;onFocus=new ve;onBlur=new ve;onDropdownClick=new ve;onClear=new ve;onKeyUp=new ve;onShow=new ve;onHide=new ve;onLazyLoad=new ve;inputEL;multiInputEl;multiContainerEL;dropdownButton;itemsViewChild;scroller;overlayViewChild;itemsWrapper;itemTemplate;emptyTemplate;headerTemplate;footerTemplate;selectedItemTemplate;groupTemplate;loaderTemplate;removeIconTemplate;loadingIconTemplate;clearIconTemplate;dropdownIconTemplate;onHostClick(e){this.onContainerClick(e)}primeng=re(sz);value;_suggestions=Zn(null);timeout;overlayVisible;suggestionsUpdated;highlightOption;highlightOptionChanged;focused=!1;loading;scrollHandler;listId;searchTimeout;dirty=!1;_itemTemplate;_groupTemplate;_selectedItemTemplate;_headerTemplate;_emptyTemplate;_footerTemplate;_loaderTemplate;_removeIconTemplate;_loadingIconTemplate;_clearIconTemplate;_dropdownIconTemplate;focusedMultipleOptionIndex=Zn(-1);focusedOptionIndex=Zn(-1);_componentStyle=re(v2e);$appendTo=bo(()=>this.appendTo()||this.config.overlayAppendTo());visibleOptions=bo(()=>this.group?this.flatOptions(this._suggestions()):this._suggestions()||[]);inputValue=bo(()=>{let e=this.modelValue(),i=this.optionValueSelected?(this.suggestions||[]).find(o=>bs(o,this.optionValue)===e):e;if(Kr(e))if(typeof e=="object"||this.optionValueSelected){let o=this.getOptionLabel(i);return o??e}else return e;else return""});get focusedMultipleOptionId(){return this.focusedMultipleOptionIndex()!==-1?`${this.id}_multiple_option_${this.focusedMultipleOptionIndex()}`:null}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}get searchResultMessageText(){return Kr(this.visibleOptions())&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions().length):this.emptySearchMessageText}get searchMessageText(){return this.searchMessage||this.config.translation.searchMessage||""}get emptySearchMessageText(){return this.emptyMessage||this.config.translation.emptySearchMessage||""}get selectionMessageText(){return this.selectionMessage||this.config.translation.selectionMessage||""}get emptySelectionMessageText(){return this.emptySelectionMessage||this.config.translation.emptySelectionMessage||""}get selectedMessageText(){return this.hasSelectedOption()?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue()?.length:"1"):this.emptySelectionMessageText}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}get listLabel(){return this.config.getTranslation(el.ARIA).listLabel}get virtualScrollerDisabled(){return!this.virtualScroll}get optionValueSelected(){return typeof this.modelValue()=="string"&&this.optionValue}chipItemClass(e){return this._componentStyle.classes.chipItem({instance:this,i:e})}constructor(e,i){super(),this.overlayService=e,this.zone=i}ngOnInit(){super.ngOnInit(),this.id=this.id||Vr("pn_id_"),this.cd.detectChanges()}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break;case"group":this._groupTemplate=e.template;break;case"selecteditem":this._selectedItemTemplate=e.template;break;case"selectedItem":this._selectedItemTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"removetokenicon":this._removeIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}ngAfterViewChecked(){this.suggestionsUpdated&&this.overlayViewChild&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1),this.suggestionsUpdated=!1})}handleSuggestionsChange(){if(this.loading){this._suggestions()?.length>0||this.showEmptyMessage||this.emptyTemplate?this.show():this.hide();let e=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(e),this.suggestionsUpdated=!0,this.loading=!1,this.cd.markForCheck()}}flatOptions(e){return(e||[]).reduce((i,o,r)=>{i.push({optionGroup:o,group:!0,index:r});let s=this.getOptionGroupChildren(o);return s&&s.forEach(d=>i.push(d)),i},[])}isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findLastOptionIndex(){return Gp(this.visibleOptions(),e=>this.isValidOption(e))}findFirstFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findLastFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let i=ethis.isValidOption(o)):-1;return i>-1?i+e+1:e}findPrevOptionIndex(e){let i=e>0?Gp(this.visibleOptions().slice(0,e),o=>this.isValidOption(o)):-1;return i>-1?i:e}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionDisabled(e){return this.optionDisabled?bs(e,this.optionDisabled):!1}isSelected(e){return this.multiple?this.unique?this.modelValue()?.find(i=>Sc(i,this.getOptionValue(e),this.equalityKey())):!1:Sc(this.modelValue(),this.getOptionValue(e),this.equalityKey())}isOptionMatched(e,i){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===i.toLocaleLowerCase(this.searchLocale)}isInputClicked(e){return e.target===this.inputEL.nativeElement}isDropdownClicked(e){return this.dropdownButton?.nativeElement?e.target===this.dropdownButton.nativeElement||this.dropdownButton.nativeElement.contains(e.target):!1}equalityKey(){return this.dataKey}onContainerClick(e){this.$disabled()||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||(!this.overlayViewChild||!this.overlayViewChild.overlayViewChild?.nativeElement.contains(e.target))&&ss(this.inputEL.nativeElement)}handleDropdownClick(e){let i;this.overlayVisible?this.hide(!0):(ss(this.inputEL.nativeElement),i=this.inputEL.nativeElement.value,this.dropdownMode==="blank"?this.search(e,"","dropdown"):this.dropdownMode==="current"&&this.search(e,i,"dropdown")),this.onDropdownClick.emit({originalEvent:e,query:i})}onInput(e){if(this.typeahead){let i=this.minQueryLength||this.minLength;this.searchTimeout&&clearTimeout(this.searchTimeout);let o=e.target.value;this.maxlength()!==null&&(o=o.split("").slice(0,this.maxlength()).join("")),!this.multiple&&!this.forceSelection&&this.updateModel(o),o.length===0&&!this.multiple?(this.onClear.emit(),setTimeout(()=>{this.hide()},this.delay/2)):o.length>=i?(this.focusedOptionIndex.set(-1),this.searchTimeout=setTimeout(()=>{this.search(e,o,"input")},this.delay)):this.hide()}}onInputChange(e){if(this.forceSelection){let i=!1;if(this.visibleOptions()){let o=this.visibleOptions().find(r=>this.isOptionMatched(r,this.inputEL.nativeElement.value||""));o!==void 0&&(i=!0,!this.isSelected(o)&&this.onOptionSelect(e,o))}i||(this.inputEL.nativeElement.value="",!this.multiple&&this.updateModel(null))}}onInputFocus(e){if(this.$disabled())return;!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e)}onMultipleContainerFocus(e){this.$disabled()||(this.focused=!0)}onMultipleContainerBlur(e){this.focusedMultipleOptionIndex.set(-1),this.focused=!1}onMultipleContainerKeyDown(e){if(this.$disabled()){e.preventDefault();return}switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e);break;default:break}}onInputBlur(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex.set(-1),this.onModelTouched(),this.onBlur.emit(e)}onInputPaste(e){this.onKeyDown(e)}onInputKeyUp(e){this.onKeyUp.emit(e)}onKeyDown(e){if(this.$disabled()){e.preventDefault();return}switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e);break;case"ShiftLeft":case"ShiftRight":break;default:break}}onArrowDownKey(e){if(!this.overlayVisible)return;let i=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),e.preventDefault(),e.stopPropagation()}onArrowUpKey(e){if(this.overlayVisible)if(e.altKey)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide(),e.preventDefault();else{let i=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),e.preventDefault(),e.stopPropagation()}}onArrowLeftKey(e){let i=e.currentTarget;this.focusedOptionIndex.set(-1),this.multiple&&(wc(i.value)&&this.hasSelectedOption()?(ss(this.multiContainerEL.nativeElement),this.focusedMultipleOptionIndex.set(this.modelValue().length)):e.stopPropagation())}onArrowRightKey(e){this.focusedOptionIndex.set(-1),this.multiple&&e.stopPropagation()}onHomeKey(e){let{currentTarget:i}=e,o=i.value.length;i.setSelectionRange(0,e.shiftKey?o:0),this.focusedOptionIndex.set(-1),e.preventDefault()}onEndKey(e){let{currentTarget:i}=e,o=i.value.length;i.setSelectionRange(e.shiftKey?0:o,o),this.focusedOptionIndex.set(-1),e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onEnterKey(e){if(this.typeahead||this.multiple&&(this.isSelected(e.target.value)||(this.updateModel([...this.modelValue()||[],e.target.value]),this.inputEL.nativeElement.value="")),this.overlayVisible)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.hide();else return;e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()}onTabKey(e){this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide()}onBackspaceKey(e){if(this.multiple){if(Kr(this.modelValue())&&!this.inputEL.nativeElement.value){let i=this.modelValue()[this.modelValue().length-1],o=this.modelValue().slice(0,-1);this.updateModel(o),this.onUnselect.emit({originalEvent:e,value:i})}e.stopPropagation()}!this.multiple&&this.showClear&&this.findSelectedOptionIndex()!=-1&&this.clear()}onArrowLeftKeyOnMultiple(e){let i=this.focusedMultipleOptionIndex()<1?0:this.focusedMultipleOptionIndex()-1;this.focusedMultipleOptionIndex.set(i)}onArrowRightKeyOnMultiple(e){let i=this.focusedMultipleOptionIndex();i++,this.focusedMultipleOptionIndex.set(i),i>this.modelValue().length-1&&(this.focusedMultipleOptionIndex.set(-1),ss(this.inputEL.nativeElement))}onBackspaceKeyOnMultiple(e){this.focusedMultipleOptionIndex()!==-1&&this.removeOption(e,this.focusedMultipleOptionIndex())}onOptionSelect(e,i,o=!0){let r=this.getOptionValue(i);this.multiple?(this.inputEL.nativeElement.value="",this.isSelected(i)||this.updateModel([...this.modelValue()||[],r])):this.updateModel(r),this.onSelect.emit({originalEvent:e,value:i}),o&&this.hide(!0)}onOptionMouseEnter(e,i){this.focusOnHover&&this.changeFocusedOptionIndex(e,i)}search(e,i,o){i!=null&&(o==="input"&&i.trim().length===0||(this.loading=!0,this.completeMethod.emit({originalEvent:e,query:i})))}removeOption(e,i){e.stopPropagation();let o=this.modelValue()[i],r=this.modelValue().filter((s,d)=>d!==i);this.updateModel(r),this.onUnselect.emit({originalEvent:e,value:o}),ss(this.inputEL.nativeElement)}updateModel(e){this.value=e,this.writeModelValue(e),this.onModelChange(e),this.updateInputValue(),this.cd.markForCheck()}updateInputValue(){this.inputEL&&this.inputEL.nativeElement&&(this.multiple?this.inputEL.nativeElement.value="":this.inputEL.nativeElement.value=this.inputValue())}autoUpdateModel(){if((this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption()){let e=this.findFirstFocusedOptionIndex();this.focusedOptionIndex.set(e),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1)}}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let o=zo(this.itemsViewChild.nativeElement,`li[id="${i}"]`);o?o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}changeFocusedOptionIndex(e,i){this.focusedOptionIndex()!==i&&(this.focusedOptionIndex.set(i),this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions()[i],!1))}show(e=!1){this.dirty=!0,this.overlayVisible=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),e&&ss(this.inputEL.nativeElement),e&&ss(this.inputEL.nativeElement),this.onShow.emit(),this.cd.markForCheck()}hide(e=!1){let i=()=>{this.dirty=e,this.overlayVisible=!1,this.focusedOptionIndex.set(-1),e&&ss(this.inputEL.nativeElement),this.onHide.emit(),this.cd.markForCheck()};setTimeout(()=>{i()},0)}clear(){this.updateModel(null),this.inputEL.nativeElement.value="",this.onClear.emit()}hasSelectedOption(){return Kr(this.modelValue())}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(i=>this.isOptionGroup(i)).length:e)+1}getOptionLabel(e){return this.optionLabel?bs(e,this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?bs(e,this.optionValue):e&&e.value!=null?e.value:e}getOptionIndex(e,i){return this.virtualScrollerDisabled?e:i&&i.getItemOptions(e).index}getOptionGroupLabel(e){return this.optionGroupLabel?bs(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?bs(e,this.optionGroupChildren):e.items}onOverlayAnimationStart(e){if(e.toState==="visible"&&(this.itemsWrapper=zo(this.overlayViewChild.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-autocomplete-panel"),this.virtualScroll&&(this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.scroller.viewInit()),this.visibleOptions()&&this.visibleOptions().length))if(this.virtualScroll){let i=this.modelValue()?this.focusedOptionIndex():-1;i!==-1&&this.scroller?.scrollToIndex(i)}else{let i=zo(this.itemsWrapper,".p-autocomplete-item.p-highlight");i&&i.scrollIntoView({block:"nearest",inline:"center"})}}writeControlValue(e,i){this.value=e,i(e),this.updateInputValue(),this.cd.markForCheck()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(_e(Jg),_e(_n))};static \u0275cmp=ne({type:t,selectors:[["p-autoComplete"],["p-autocomplete"],["p-auto-complete"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Klt,5),xt(r,Wlt,5),xt(r,Ylt,5),xt(r,Qlt,5),xt(r,Zlt,5),xt(r,Xlt,5),xt(r,Jlt,5),xt(r,ect,5),xt(r,tct,5),xt(r,ict,5),xt(r,nct,5),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.itemTemplate=s.first),Le(s=Ne())&&(o.emptyTemplate=s.first),Le(s=Ne())&&(o.headerTemplate=s.first),Le(s=Ne())&&(o.footerTemplate=s.first),Le(s=Ne())&&(o.selectedItemTemplate=s.first),Le(s=Ne())&&(o.groupTemplate=s.first),Le(s=Ne())&&(o.loaderTemplate=s.first),Le(s=Ne())&&(o.removeIconTemplate=s.first),Le(s=Ne())&&(o.loadingIconTemplate=s.first),Le(s=Ne())&&(o.clearIconTemplate=s.first),Le(s=Ne())&&(o.dropdownIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(oct,5),Ri(rct,5),Ri(sct,5),Ri(act,5),Ri(lct,5),Ri(cct,5),Ri(dct,5)),i&2){let r;Le(r=Ne())&&(o.inputEL=r.first),Le(r=Ne())&&(o.multiInputEl=r.first),Le(r=Ne())&&(o.multiContainerEL=r.first),Le(r=Ne())&&(o.dropdownButton=r.first),Le(r=Ne())&&(o.itemsViewChild=r.first),Le(r=Ne())&&(o.scroller=r.first),Le(r=Ne())&&(o.overlayViewChild=r.first)}},hostVars:4,hostBindings:function(i,o){i&1&&ie("click",function(s){return o.onHostClick(s)}),i&2&&($r(o.sx("root")),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{minLength:[2,"minLength","minLength",ln],minQueryLength:[2,"minQueryLength","minQueryLength",ln],delay:[2,"delay","delay",ln],panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",inputStyle:"inputStyle",inputId:"inputId",inputStyleClass:"inputStyleClass",placeholder:"placeholder",readonly:[2,"readonly","readonly",je],scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",je],virtualScroll:[2,"virtualScroll","virtualScroll",je],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",ln],virtualScrollOptions:"virtualScrollOptions",autoHighlight:[2,"autoHighlight","autoHighlight",je],forceSelection:[2,"forceSelection","forceSelection",je],type:"type",autoZIndex:[2,"autoZIndex","autoZIndex",je],baseZIndex:[2,"baseZIndex","baseZIndex",ln],ariaLabel:"ariaLabel",dropdownAriaLabel:"dropdownAriaLabel",ariaLabelledBy:"ariaLabelledBy",dropdownIcon:"dropdownIcon",unique:[2,"unique","unique",je],group:[2,"group","group",je],completeOnFocus:[2,"completeOnFocus","completeOnFocus",je],showClear:[2,"showClear","showClear",je],dropdown:[2,"dropdown","dropdown",je],showEmptyMessage:[2,"showEmptyMessage","showEmptyMessage",je],dropdownMode:"dropdownMode",multiple:[2,"multiple","multiple",je],tabindex:[2,"tabindex","tabindex",ln],dataKey:"dataKey",emptyMessage:"emptyMessage",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",autofocus:[2,"autofocus","autofocus",je],autocomplete:"autocomplete",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",overlayOptions:"overlayOptions",suggestions:"suggestions",optionLabel:"optionLabel",optionValue:"optionValue",id:"id",searchMessage:"searchMessage",emptySelectionMessage:"emptySelectionMessage",selectionMessage:"selectionMessage",autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",je],selectOnFocus:[2,"selectOnFocus","selectOnFocus",je],searchLocale:[2,"searchLocale","searchLocale",je],optionDisabled:"optionDisabled",focusOnHover:[2,"focusOnHover","focusOnHover",je],typeahead:[2,"typeahead","typeahead",je],appendTo:[1,"appendTo"]},outputs:{completeMethod:"completeMethod",onSelect:"onSelect",onUnselect:"onUnselect",onFocus:"onFocus",onBlur:"onBlur",onDropdownClick:"onDropdownClick",onClear:"onClear",onKeyUp:"onKeyUp",onShow:"onShow",onHide:"onHide",onLazyLoad:"onLazyLoad"},features:[jt([hdt,v2e]),ft],decls:9,vars:12,consts:[["overlay",""],["content",""],["focusInput",""],["multiContainer",""],["token",""],["removeicon",""],["ddBtn",""],["buildInItems",""],["scroller",""],["loader",""],["items",""],["empty",""],["pInputText","","aria-autocomplete","list","role","combobox",3,"pAutoFocus","class","ngStyle","variant","invalid","pSize","fluid","input","keydown","change","focus","blur","paste","keyup",4,"ngIf"],[4,"ngIf"],["role","listbox",3,"class","tabindex","focus","blur","keydown",4,"ngIf"],["type","button","pRipple","",3,"class","disabled","click",4,"ngIf"],[3,"visibleChange","onAnimationStart","onHide","hostAttrSelector","visible","options","target","appendTo","showTransitionOptions","hideTransitionOptions"],["pInputText","","aria-autocomplete","list","role","combobox",3,"input","keydown","change","focus","blur","paste","keyup","pAutoFocus","ngStyle","variant","invalid","pSize","fluid"],["data-p-icon","times",3,"class","click",4,"ngIf"],[3,"class","click",4,"ngIf"],["data-p-icon","times",3,"click"],[3,"click"],[4,"ngTemplateOutlet"],["role","listbox",3,"focus","blur","keydown","tabindex"],["role","option",3,"class",4,"ngFor","ngForOf"],["role","option"],["role","combobox","aria-autocomplete","list",3,"input","keydown","change","focus","blur","paste","keyup","pAutoFocus","ngStyle"],[3,"onRemove","label","removable"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","times-circle"],["data-p-icon","spinner",3,"class","spin",4,"ngIf"],[3,"class",4,"ngIf"],["data-p-icon","spinner",3,"spin"],["type","button","pRipple","",3,"click","disabled"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-p-icon","chevron-down",4,"ngIf"],["data-p-icon","chevron-down"],[3,"ngStyle"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],["role","status","aria-live","polite",1,"p-hidden-accessible"],[3,"onLazyLoad","items","itemSize","autoSize","lazy","options"],["role","listbox"],["ngFor","",3,"ngForOf"],["role","option",3,"class","ngStyle",4,"ngIf"],["role","option",3,"ngStyle"],["pRipple","","role","option",3,"click","mouseenter","ngStyle"],[4,"ngIf","ngIfElse"]],template:function(i,o){if(i&1){let r=tt();ee(0,_ct,2,30,"input",12)(1,xct,3,2,"ng-container",13)(2,kct,6,33,"ul",14)(3,Pct,3,2,"ng-container",13)(4,Uct,4,7,"button",15),k(5,"p-overlay",16,0),hh("visibleChange",function(d){return se(r),Xh(o.overlayVisible,d)||(o.overlayVisible=d),ae(d)}),ie("onAnimationStart",function(d){return se(r),ae(o.onOverlayAnimationStart(d))})("onHide",function(){return se(r),ae(o.hide())}),ee(7,cdt,10,12,"ng-template",null,1,Pt),D()}i&2&&(E("ngIf",!o.multiple),T(),E("ngIf",o.$filled()&&!o.$disabled()&&o.showClear&&!o.loading),T(),E("ngIf",o.multiple),T(),E("ngIf",o.loading),T(),E("ngIf",o.dropdown),T(),E("hostAttrSelector",o.attrSelector),ph("visible",o.overlayVisible),E("options",o.overlayOptions)("target","@parent")("appendTo",o.$appendTo())("showTransitionOptions",o.showTransitionOptions)("hideTransitionOptions",o.hideTransitionOptions))},dependencies:[On,Ns,Gc,Fr,Lo,vs,zP,fu,Ul,Ym,fp,HK,og,sm,QP,In,am],encapsulation:2,changeDetection:0})}return t})(),x2e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Th,In]})}return t})();var yW=(()=>{class t{constructor(e,i){this._districtService=e,this._cdr=i,this.placeholderText="Landkreis suchen",this.administrativeDistrictSelect=new ve,this.suggestions=[]}onCompleteMethod(e){let i=new XF(e.query);this._districtService.find(i).subscribe(o=>{this.suggestions=o,this._cdr.markForCheck()})}onSelect(e){this.administrativeDistrictSelect.emit(e.value)}static{this.\u0275fac=function(i){return new(i||t)(_e(Hu),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-administrative-district-autocomplete"]],inputs:{placeholderText:"placeholderText"},outputs:{administrativeDistrictSelect:"administrativeDistrictSelect"},decls:4,vars:5,consts:[["inputId","administrative-district-autocomplete","dataKey","id.value","optionLabel","otherName","fluid","","variant","filled",3,"completeMethod","onSelect","suggestions","placeholder","showClear","delay"],["for","administrative-district-autocomplete"]],template:function(i,o){i&1&&(k(0,"p-iftalabel")(1,"p-auto-complete",0),ie("completeMethod",function(s){return o.onCompleteMethod(s)})("onSelect",function(s){return o.onSelect(s)}),D(),k(2,"label",1),Q(3),D()()),i&2&&(T(),E("suggestions",o.suggestions)("placeholder",o.placeholderText)("showClear",!0)("delay",500),T(2),dt(o.placeholderText))},dependencies:[Th,as],encapsulation:2})}}return t})();var fx=(()=>{class t{constructor(e){this._districtService=e}transform(e,...i){return this._districtService.byAdministrativeDistrictId(e).pipe(rl(new cx(e,"wird geladen..","wird geladen..")))}static{this.\u0275fac=function(i){return new(i||t)(_e(Hu,16))}}static{this.\u0275pipe=Dd({name:"administrativeDistrict",type:t,pure:!0})}}return t})();var w2e=(()=>{class t{constructor(){this.remove=new ve}onRemove(){this.remove.emit(!0)}format(e){return e?e.displayName():""}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-maps-administrative-district-ids-list-item"]],inputs:{administrativeDistrictId:"administrativeDistrictId"},outputs:{remove:"remove"},decls:10,vars:5,consts:[[1,"flex","flex-row","gap-6","items-center"],[1,"flex-1"],[1,"mat-body-2"],["mat-icon-button","","color","accent",3,"click"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"span",2),Q(3),Xn(4,"administrativeDistrict"),Xn(5,"async"),D()(),k(6,"div")(7,"button",3),ie("click",function(){return o.onRemove()}),k(8,"mat-icon"),Q(9,"delete_outline"),D()()()()),i&2&&(T(3),dt(o.format(Nr(5,3,Nr(4,1,o.administrativeDistrictId)))))},dependencies:[Tn,xl,$o,mr,qd,fx],encapsulation:2})}}return t})();var fdt=(t,n)=>n.value;function gdt(t,n){if(t&1){let e=tt();k(0,"bd-maps-administrative-district-ids-list-item",4),ie("remove",function(){let o=se(e),r=o.$implicit,s=o.$index,d=P(2);return ae(d.onRemove(r,s))}),D()}if(t&2){let e=n.$implicit;E("administrativeDistrictId",e)}}function _dt(t,n){if(t&1&&lo(0,gdt,1,1,"bd-maps-administrative-district-ids-list-item",3,fdt),t&2){let e=P();co(e.displayAdministrativeDistrictIds)}}function ydt(t,n){t&1&&(k(0,"div",1),ce(1,"bd-message-empty",5),D())}function vdt(t,n){if(t&1){let e=tt();k(0,"mat-paginator",6),ie("page",function(o){se(e);let r=P();return ae(r.onPageEvent(o))}),D()}if(t&2){let e=P();E("hidePageSize",!0)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("length",e.administrativeDistrictIds.length)}}var gx=(()=>{class t{constructor(e){this._cdr=e,this.administrativeDistrictIdsChange=new ve,this.pageIndex=0,this.pageSize=10}ngOnChanges(e){e.administrativeDistrictIds&&this._updateDisplayAdministrativeDistricts()}onPageEvent(e){this.pageIndex=e.pageIndex,this._updateDisplayAdministrativeDistricts()}onRemove(e,i){let o=null;this.administrativeDistrictIds.forEach((r,s)=>{r.value===e.value&&(o=s)}),this.administrativeDistrictIds.splice(o,1),this._updateDisplayAdministrativeDistricts(),this.administrativeDistrictIdsChange.emit(this.administrativeDistrictIds.map(r=>Yo.create(r.value)))}_updateDisplayAdministrativeDistricts(){if(this.administrativeDistrictIds){let e=this.pageIndex*this.pageSize,i=this.pageIndex*this.pageSize+this.pageSize;this.displayAdministrativeDistrictIds=this.administrativeDistrictIds.slice(e,i),this._cdr.markForCheck()}}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-maps-administrative-district-ids-list"]],inputs:{administrativeDistrictIds:"administrativeDistrictIds"},outputs:{administrativeDistrictIdsChange:"administrativeDistrictIdsChange"},features:[Ot],decls:4,vars:2,consts:[[1,"administrative-district-ids-list"],[1,"filter-postal-codes"],[3,"hidePageSize","pageSize","pageIndex","length"],[3,"administrativeDistrictId"],[3,"remove","administrativeDistrictId"],["message","Keine Landkreise ausgew\xE4hlt"],[3,"page","hidePageSize","pageSize","pageIndex","length"]],template:function(i,o){i&1&&(k(0,"div",0),qe(1,_dt,2,0)(2,ydt,2,0,"div",1),D(),qe(3,vdt,1,4,"mat-paginator",2)),i&2&&(T(),Ke(o.administrativeDistrictIds&&o.administrativeDistrictIds.length>0?1:2),T(2),Ke((o.administrativeDistrictIds==null?null:o.administrativeDistrictIds.length)>5?3:-1))},dependencies:[w2e,Rl,tx,Wv],styles:[".administrative-district-ids-list[_ngcontent-%COMP%]{margin:0 24px}"],changeDetection:0})}}return t})();function ZP(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function v2(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function XP(t){return t.type==="Feature"?t.geometry:t}function S2e(t,n){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}function gle(t,n,e,i){i===void 0&&(i={});var o=ZP(t),r=iW(o[0]),s=iW(o[1]),d=iW(e),m=n2e(n,i.units),v=Math.asin(Math.sin(s)*Math.cos(m)+Math.cos(s)*Math.sin(m)*Math.cos(d)),w=r+Math.atan2(Math.sin(d)*Math.sin(m)*Math.cos(s),Math.cos(m)-Math.sin(s)*Math.sin(v)),O=Xae(w),N=Xae(v);return Qm([O,N],i.properties)}function bdt(t,n,e){e===void 0&&(e={});for(var i=e.steps||64,o=e.properties?e.properties:!Array.isArray(t)&&t.type==="Feature"&&t.properties?t.properties:{},r=[],s=0;sr.properties.GEN,messageFnc:(r,s)=>s?s[r.properties.AGS]:null}}},eL=class extends qP{constructor(n,e,i){super(n,e),this.config=e,this._districtService=i}layer(){return mt(be({},$w),{id:this.config.layerId})}source(){return{sourceId:this.config.sourceId,sourceData:be({},XK)}}initBounds(){this.bounds=this.data$.asObservable().pipe(Vo(()=>console.debug(`[${this.layerControlId}] update bounds`)),Mn(n=>{let e=Object.keys(n).map(i=>Yo.createFromString(i));return this._districtService.findCenterPoint(e)}),vt(n=>n.size<3?Array.from(n.values()).map(e=>Tz([e.lon,e.lat],15,{units:"kilometers"})):Array.from(n.values()).map(e=>Qm([e.lon,e.lat]))),vt(n=>{let e=bd(n);return t_.fromBbox(n_(e),e)}),vt(n=>n.bounds))}};var uE=class extends Ww{constructor(n,e){super(n,e),this.config=e,this.selection=new nm(!0,[],!0,this.compareFn),this.possibleSelection$=new pi(1)}afterInit(n,e){super.afterInit(n,e),this._legendRef.next(new hx(this.layerControlId,this.displayName,"circle","#6e599f")),n.addLayer(this.highlightLayer()),this.updateSelection(this.selection.selected),this.selection.changed.subscribe(i=>{this.updateSelection(i.source.selected)}),this.possibleSelection$.subscribe(i=>{n.setFilter(this.config.layerId,this.baseFilterExpression(i)),n.setFilter(this.config.highlightLayerId,this.baseFilterExpression([])),this.selection.setSelection()})}updateSelection(n){console.debug(`[${this.layerControlId}] update source`,JSON.stringify(n)),n.length>0?this.mapRef.setFilter(this.config.highlightLayerId,this.baseFilterExpression(n)):this.mapRef.setFilter(this.config.highlightLayerId,this.baseFilterExpression([]))}onChangedBounds(n){this.mapRef.fitBounds(n.bounds),this.mapRef.setFilter(this.config.highlightLayerId,null)}click(n){f2.getFeaturesOnClickedPosition(n.mapEvent,this.config.layerId,2.5).map(i=>this.propertiesToValueFn(i.properties)).forEach(i=>{this.selection.toggle(i)})}};var tL=class extends uE{constructor(n,e){super(n,e)}highlightLayer(){return mt(be({},HP),{id:this.config.highlightLayerId})}compareFn(n,e){return vo.equals(n,e,()=>n.value===e.value)}baseFilterExpression(n){return["in","AGS",...n.map(e=>e.value)]}propertiesToValueFn(n){return Yo.create(n.AGS)}layer(){return mt(be({},$w),{id:this.config.layerId})}source(){return{sourceId:this.config.sourceId,sourceData:mt(be({},XK),{id:this.config.sourceId})}}};var E2e=Ap(Kw()),D2e=Ap(I2e());var iL=class{constructor(n){this._environmentService=n}token(){return this._environmentService.load("BD_MAP_ACCESS_TOKEN_MAPBOX")}};function Ddt(t,n){t&1&&(k(0,"div",1),ce(1,"mat-progress-bar",3),D())}function Adt(t,n){if(t&1&&(k(0,"div",0),qe(1,Ddt,2,0,"div",1),ce(2,"div",2),D()),t&2){let e=P();T(),Ke(e.isLoading?1:-1),T(),E("id",e.mapOptions.container)}}function kdt(t,n){t&1&&(k(0,"div")(1,"div",4)(2,"div",5)(3,"div",6)(4,"span",7),Q(5,"Die Karten Funktionen werden von Ihrem Browser nicht unters\xFCtzt."),D()()()()())}var Mdt="mapboxEvent_IsIdle",eu=(()=>{class t{constructor(e,i,o){this._environmentService=e,this._cdr=i,this._zone=o,this.mapOptions=lm,this.mapLoaded=new ve,this.mapClick=new ve,this.isLoading=!1,this.mapSupported=!0,this._loading$=new Gs(!0),this.mapSupported=(0,D2e.supported)(),this._loading$.pipe(rp()).subscribe(r=>{this.isLoading=r,this._cdr.markForCheck()})}ngOnInit(){let e=new iL(this._environmentService);this.mapOptions=mt(be({},this.mapOptions),{container:this._randomizeContainerId(this.mapOptions.container),accessToken:e.token()})}ngAfterViewInit(){this.mapSupported&&this._zone.runOutsideAngular(()=>{this.map=new E2e.Map(this.mapOptions),this.map.once("load",()=>{this._onLoad()}),this.map.on("styledataloading",()=>{this._loading$.next(!0)}),this.map.once("idle",()=>{this.mapLoaded.emit(this.map)}),this.map.on("idle",()=>{document.dispatchEvent(new CustomEvent(Mdt,null)),this._loading$.next(!1)})})}ngOnChanges(e){e.mapOptions&&(this.mapOptions.style&&this.map&&this.map.setStyle(this.mapOptions.style),this.mapOptions.zoom&&this.map&&this.map.setZoom(this.mapOptions.zoom),this.mapOptions.center&&this.map&&this.map.setCenter(this.mapOptions.center))}ngOnDestroy(){this.map&&(this.map.remove(),this.map=null)}_onLoad(){this.map.getLayer("country-label")&&this.map.setLayoutProperty("country-label","text-field",["get","name_de"]),this.mapOptions&&this.mapOptions.zoom&&this.map.setZoom(this.mapOptions.zoom),this.mapOptions&&this.mapOptions.center&&this.map.setCenter(this.mapOptions.center),this.controls={idle$:new hi,clickHandlers:[]},this._initClickHandler()}_initClickHandler(){this.map.on("click",e=>this._onClick(e)),this.map.on("touchstart",e=>this._onClick(e)),this.map.on("touchend",e=>this._onClick(e))}_onClick(e){let i=new uW(e,this.map,this.controls),o=!0;this.controls.clickHandlers.every(r=>{let s=r.onClick(i);return o=s.propagate,s.propagate}),o&&this.mapClick.emit(i)}_randomizeContainerId(e){let i=Math.round(Math.random()*1e4);return e+"-"+i.toString()}static{this.\u0275fac=function(i){return new(i||t)(_e(qr),_e(Gi),_e(_n))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-map"]],inputs:{mapOptions:"mapOptions"},outputs:{mapLoaded:"mapLoaded",mapClick:"mapClick"},features:[Ot],decls:2,vars:1,consts:[[1,"bd-map-container"],[1,"idle-overlay"],[1,"map",3,"id"],["mode","query"],[1,"flex","flex-row","items-center","justify-center"],[1,"basis-full"],[1,"bd-container"],[1,"mat-caption"]],template:function(i,o){i&1&&qe(0,Adt,3,2,"div",0)(1,kdt,6,0,"div"),i&2&&Ke(o.mapSupported?0:1)},dependencies:[iDe,tDe],styles:[".bd-map-container[_ngcontent-%COMP%], .idle-overlay[_ngcontent-%COMP%]{height:100%;width:100%}.bd-map-container[_ngcontent-%COMP%]{position:relative}.bd-map-container[_ngcontent-%COMP%] .idle-overlay[_ngcontent-%COMP%]{position:absolute;z-index:3}.map[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:100%}"],changeDetection:0})}}return t})();function Kp(t,n){Odt(t)&&(t="100%");let e=Rdt(t);return t=n===360?t:Math.min(n,Math.max(0,parseFloat(t))),e&&(t=parseInt(String(t*n),10)/100),Math.abs(t-n)<1e-6?1:(n===360?t=(t<0?t%n+n:t%n)/parseFloat(String(n)):t=t%n/parseFloat(String(n)),t)}function Iz(t){return Math.min(1,Math.max(0,t))}function Odt(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Rdt(t){return typeof t=="string"&&t.indexOf("%")!==-1}function vW(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Ez(t){return Number(t)<=1?`${Number(t)*100}%`:t}function pE(t){return t.length===1?"0"+t:String(t)}function A2e(t,n,e){return{r:Kp(t,255)*255,g:Kp(n,255)*255,b:Kp(e,255)*255}}function Cle(t,n,e){t=Kp(t,255),n=Kp(n,255),e=Kp(e,255);let i=Math.max(t,n,e),o=Math.min(t,n,e),r=0,s=0,d=(i+o)/2;if(i===o)s=0,r=0;else{let m=i-o;switch(s=d>.5?m/(2-i-o):m/(i+o),i){case t:r=(n-e)/m+(n1&&(e-=1),e<1/6?t+(n-t)*(6*e):e<1/2?n:e<2/3?t+(n-t)*(2/3-e)*6:t}function k2e(t,n,e){let i,o,r;if(t=Kp(t,360),n=Kp(n,100),e=Kp(e,100),n===0)o=e,r=e,i=e;else{let s=e<.5?e*(1+n):e+n-e*n,d=2*e-s;i=ble(d,s,t+1/3),o=ble(d,s,t),r=ble(d,s,t-1/3)}return{r:i*255,g:o*255,b:r*255}}function xle(t,n,e){t=Kp(t,255),n=Kp(n,255),e=Kp(e,255);let i=Math.max(t,n,e),o=Math.min(t,n,e),r=0,s=i,d=i-o,m=i===0?0:d/i;if(i===o)r=0;else{switch(i){case t:r=(n-e)/d+(n>16,g:(t&65280)>>8,b:t&255}}var Dz={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function P2e(t){let n={r:0,g:0,b:0},e=1,i=null,o=null,r=null,s=!1,d=!1;return typeof t=="string"&&(t=Ndt(t)),typeof t=="object"&&(_0(t.r)&&_0(t.g)&&_0(t.b)?(n=A2e(t.r,t.g,t.b),s=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):_0(t.h)&&_0(t.s)&&_0(t.v)?(i=Ez(t.s),o=Ez(t.v),n=M2e(t.h,i,o),s=!0,d="hsv"):_0(t.h)&&_0(t.s)&&_0(t.l)?(i=Ez(t.s),r=Ez(t.l),n=k2e(t.h,i,r),s=!0,d="hsl"):_0(t.c)&&_0(t.m)&&_0(t.y)&&_0(t.k)&&(n=R2e(t.c,t.m,t.y,t.k),s=!0,d="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(e=t.a)),e=vW(e),{ok:s,format:t.format||d,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:e}}var Pdt="[-\\+]?\\d+%?",Ldt="[-\\+]?\\d*\\.\\d+%?",hE="(?:"+Ldt+")|(?:"+Pdt+")",Ile="[\\s|\\(]+("+hE+")[,|\\s]+("+hE+")[,|\\s]+("+hE+")\\s*\\)?",bW="[\\s|\\(]+("+hE+")[,|\\s]+("+hE+")[,|\\s]+("+hE+")[,|\\s]+("+hE+")\\s*\\)?",yy={CSS_UNIT:new RegExp(hE),rgb:new RegExp("rgb"+Ile),rgba:new RegExp("rgba"+bW),hsl:new RegExp("hsl"+Ile),hsla:new RegExp("hsla"+bW),hsv:new RegExp("hsv"+Ile),hsva:new RegExp("hsva"+bW),cmyk:new RegExp("cmyk"+bW),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Ndt(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;let n=!1;if(Dz[t])t=Dz[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let e=yy.rgb.exec(t);return e?{r:e[1],g:e[2],b:e[3]}:(e=yy.rgba.exec(t),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=yy.hsl.exec(t),e?{h:e[1],s:e[2],l:e[3]}:(e=yy.hsla.exec(t),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=yy.hsv.exec(t),e?{h:e[1],s:e[2],v:e[3]}:(e=yy.hsva.exec(t),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=yy.cmyk.exec(t),e?{c:e[1],m:e[2],y:e[3],k:e[4]}:(e=yy.hex8.exec(t),e?{r:o_(e[1]),g:o_(e[2]),b:o_(e[3]),a:Tle(e[4]),format:n?"name":"hex8"}:(e=yy.hex6.exec(t),e?{r:o_(e[1]),g:o_(e[2]),b:o_(e[3]),format:n?"name":"hex"}:(e=yy.hex4.exec(t),e?{r:o_(e[1]+e[1]),g:o_(e[2]+e[2]),b:o_(e[3]+e[3]),a:Tle(e[4]+e[4]),format:n?"name":"hex8"}:(e=yy.hex3.exec(t),e?{r:o_(e[1]+e[1]),g:o_(e[2]+e[2]),b:o_(e[3]+e[3]),format:n?"name":"hex"}:!1))))))))))}function _0(t){return typeof t=="number"?!Number.isNaN(t):yy.CSS_UNIT.test(t)}var nL=class t{constructor(n="",e={}){if(n instanceof t)return n;typeof n=="number"&&(n=F2e(n)),this.originalInput=n;let i=P2e(n);this.originalInput=n,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=e.format??i.format,this.gradientType=e.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){let n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3}getLuminance(){let n=this.toRgb(),e,i,o,r=n.r/255,s=n.g/255,d=n.b/255;return r<=.03928?e=r/12.92:e=Math.pow((r+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),d<=.03928?o=d/12.92:o=Math.pow((d+.055)/1.055,2.4),.2126*e+.7152*i+.0722*o}getAlpha(){return this.a}setAlpha(n){return this.a=vW(n),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){let{s:n}=this.toHsl();return n===0}toHsv(){let n=xle(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}}toHsvString(){let n=xle(this.r,this.g,this.b),e=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.v*100);return this.a===1?`hsv(${e}, ${i}%, ${o}%)`:`hsva(${e}, ${i}%, ${o}%, ${this.roundA})`}toHsl(){let n=Cle(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}}toHslString(){let n=Cle(this.r,this.g,this.b),e=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.l*100);return this.a===1?`hsl(${e}, ${i}%, ${o}%)`:`hsla(${e}, ${i}%, ${o}%, ${this.roundA})`}toHex(n=!1){return wle(this.r,this.g,this.b,n)}toHexString(n=!1){return"#"+this.toHex(n)}toHex8(n=!1){return O2e(this.r,this.g,this.b,this.a,n)}toHex8String(n=!1){return"#"+this.toHex8(n)}toHexShortString(n=!1){return this.a===1?this.toHexString(n):this.toHex8String(n)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){let n=Math.round(this.r),e=Math.round(this.g),i=Math.round(this.b);return this.a===1?`rgb(${n}, ${e}, ${i})`:`rgba(${n}, ${e}, ${i}, ${this.roundA})`}toPercentageRgb(){let n=e=>`${Math.round(Kp(e,255)*100)}%`;return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}}toPercentageRgbString(){let n=e=>Math.round(Kp(e,255)*100);return this.a===1?`rgb(${n(this.r)}%, ${n(this.g)}%, ${n(this.b)}%)`:`rgba(${n(this.r)}%, ${n(this.g)}%, ${n(this.b)}%, ${this.roundA})`}toCmyk(){return be({},Sle(this.r,this.g,this.b))}toCmykString(){let{c:n,m:e,y:i,k:o}=Sle(this.r,this.g,this.b);return`cmyk(${n}, ${e}, ${i}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;let n="#"+wle(this.r,this.g,this.b,!1);for(let[e,i]of Object.entries(Dz))if(n===i)return e;return!1}toString(n){let e=!!n;n=n??this.format;let i=!1,o=this.a<1&&this.a>=0;return!e&&o&&(n.startsWith("hex")||n==="name")?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),n==="cmyk"&&(i=this.toCmykString()),i||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new t(this.toString())}lighten(n=10){let e=this.toHsl();return e.l+=n/100,e.l=Iz(e.l),new t(e)}brighten(n=10){let e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(n/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(n/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(n/100)))),new t(e)}darken(n=10){let e=this.toHsl();return e.l-=n/100,e.l=Iz(e.l),new t(e)}tint(n=10){return this.mix("white",n)}shade(n=10){return this.mix("black",n)}desaturate(n=10){let e=this.toHsl();return e.s-=n/100,e.s=Iz(e.s),new t(e)}saturate(n=10){let e=this.toHsl();return e.s+=n/100,e.s=Iz(e.s),new t(e)}greyscale(){return this.desaturate(100)}spin(n){let e=this.toHsl(),i=(e.h+n)%360;return e.h=i<0?360+i:i,new t(e)}mix(n,e=50){let i=this.toRgb(),o=new t(n).toRgb(),r=e/100,s={r:(o.r-i.r)*r+i.r,g:(o.g-i.g)*r+i.g,b:(o.b-i.b)*r+i.b,a:(o.a-i.a)*r+i.a};return new t(s)}analogous(n=6,e=30){let i=this.toHsl(),o=360/e,r=[this];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,r.push(new t(i));return r}complement(){let n=this.toHsl();return n.h=(n.h+180)%360,new t(n)}monochromatic(n=6){let e=this.toHsv(),{h:i}=e,{s:o}=e,{v:r}=e,s=[],d=1/n;for(;n--;)s.push(new t({h:i,s:o,v:r})),r=(r+d)%1;return s}splitcomplement(){let n=this.toHsl(),{h:e}=n;return[this,new t({h:(e+72)%360,s:n.s,l:n.l}),new t({h:(e+216)%360,s:n.s,l:n.l})]}onBackground(n){let e=this.toRgb(),i=new t(n).toRgb(),o=e.a+i.a*(1-e.a);return new t({r:(e.r*e.a+i.r*i.a*(1-e.a))/o,g:(e.g*e.a+i.g*i.a*(1-e.a))/o,b:(e.b*e.a+i.b*i.a*(1-e.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(n){let e=this.toHsl(),{h:i}=e,o=[this],r=360/n;for(let s=1;s"u")return null;let i=document.createElement("canvas");i.width=e*2,i.height=e*2;let o=i.getContext("2d");return o?(o.fillStyle=t,o.fillRect(0,0,i.width,i.height),o.fillStyle=n,o.fillRect(0,0,e,e),o.translate(e,e),o.fillRect(0,0,e,e),i.toDataURL()):null}function Hdt(t,n,e){let i=`${t}-${n}-${e}`;if(Ele[i])return Ele[i];let o=Udt(t,n,e);return o?(Ele[i]=o,o):null}var jdt=(()=>{class t{white="transparent";size=8;grey="rgba(0,0,0,.08)";boxShadow;borderRadius;gridStyles;ngOnInit(){let e=Hdt(this.white,this.grey,this.size);this.gridStyles={borderRadius:this.borderRadius,boxShadow:this.boxShadow,background:`url(${e}) center left`}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["color-checkboard"]],inputs:{white:"white",size:"size",grey:"grey",boxShadow:"boxShadow",borderRadius:"borderRadius"},standalone:!1,decls:1,vars:1,consts:[[1,"grid",3,"ngStyle"]],template:function(i,o){i&1&&ce(0,"div",0),i&2&&E("ngStyle",o.gridStyles)},dependencies:[vs],styles:[".grid[_ngcontent-%COMP%]{inset:0;position:absolute}"],changeDetection:0})}return t})(),Gdt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[On]})}return t})();function L2e(t){let n=["r","g","b","a","h","s","l","v"],e=0,i=0;return n.forEach(o=>{t[o]&&(e+=1,isNaN(t[o])||(i+=1),(o==="s"||o==="l")&&/^\d+%$/.test(t[o])&&(i+=1))}),e===i?t:!1}function CW(t,n,e){let i=t.hex?new nL(t.hex):new nL(t);e&&i.setAlpha(1);let o=i.toHsl(),r=i.toHsv(),s=i.toRgb(),d=i.toHex();o.s===0&&(o.h=n||0,r.h=n||0);let m=d==="000000"&&s.a===0;return{hsl:o,hex:m?"transparent":i.toHexString(),rgb:s,hsv:r,oldHue:t.h||n||o.h,source:t.source}}function N2e(t){return new nL(t).isValid}var oL=(function(t){return t.HEX="hex",t.HSL="hsl",t.HSV="hsv",t.RGB="rgb",t})(oL||{}),Dle=(()=>{class t{className;mode=oL.HEX;color={h:250,s:.5,l:.2,a:1};colorChange=new ve;onChange=new ve;onChangeComplete=new ve;onSwatchHover=new ve;oldHue;hsl;hsv;rgb;hex;source;currentColor;changes;disableAlpha;_onChangeCompleteSubscription=new Xr;_onSwatchHoverSubscription=new Xr;ngOnInit(){this.changes=this.onChange.pipe(id(100),Vo(e=>{switch(this.onChangeComplete.emit(e),this.mode){case oL.HEX:this.colorChange.emit(e.color.hex);break;case oL.HSL:this.colorChange.emit(e.color.hsl);break;case oL.HSV:this.colorChange.emit(e.color.hsv);break;case oL.RGB:this.colorChange.emit(e.color.rgb);break;default:let i=`The mode '${this.mode}' is not supported`;if(l1e())throw new Error(i);console.warn(i);break}})).subscribe(),this.setState(CW(this.color,0)),this.currentColor=this.hex}ngOnChanges(){this.setState(CW(this.color,this.oldHue))}ngOnDestroy(){this.changes?.unsubscribe(),this._onChangeCompleteSubscription?.unsubscribe(),this._onSwatchHoverSubscription?.unsubscribe()}setState(e){this.oldHue=e.oldHue,this.hsl=e.hsl,this.hsv=e.hsv,this.rgb=e.rgb,this.hex=e.hex,this.source=e.source,this.afterValidChange()}handleChange(e,i){if(L2e(e)){let r=CW(e,e.h||this.oldHue,this.disableAlpha);this.setState(r),this.onChange.emit({color:r,$event:i}),this.afterValidChange()}}afterValidChange(){}handleSwatchHover(e,i){if(L2e(e)){let r=CW(e,e.h||this.oldHue);this.setState(r),this.onSwatchHover.emit({color:r,$event:i})}}registerOnChange(e){this._onChangeCompleteSubscription.add(this.onChangeComplete.pipe(Vo(i=>e(i.color.hex))).subscribe())}registerOnTouched(e){this._onSwatchHoverSubscription.add(this.onSwatchHover.pipe(Vo(()=>e())).subscribe())}setDisabledState(e){}writeValue(e){this.color=e}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["color-wrap"]],inputs:{className:"className",mode:"mode",color:"color"},outputs:{colorChange:"colorChange",onChange:"onChange",onChangeComplete:"onChangeComplete",onSwatchHover:"onSwatchHover"},standalone:!1,features:[jt([{provide:Ea,useExisting:Ko(()=>t),multi:!0}]),Ot],decls:0,vars:0,template:function(i,o){},encapsulation:2})}return t})();var $dt=0,B2e=(()=>{class t{style;label;value;arrowOffset;dragLabel;dragMax;placeholder="";onChange=new ve;currentValue;blurValue;wrapStyle;inputStyle;labelStyle;focus=!1;mousemove;mouseup;uniqueId=`editableInput-${++$dt}`;ngOnInit(){this.wrapStyle=this.style&&this.style.wrap?this.style.wrap:{},this.inputStyle=this.style&&this.style.input?this.style.input:{},this.labelStyle=this.style&&this.style.label?this.style.label:{},this.dragLabel&&(this.labelStyle.cursor="ew-resize")}handleFocus(e){this.focus=!0}handleFocusOut(e){this.focus=!1,this.currentValue=this.blurValue}handleKeydown(e){let i=String(e.target.value),o=i.indexOf("%")>-1,r=Number(i.replace(/%/g,""));if(isNaN(r))return;let s=this.arrowOffset||1;e.keyCode===38&&(this.label?this.onChange.emit({data:{[this.label]:r+s},$event:e}):this.onChange.emit({data:r+s,$event:e}),o?this.currentValue=`${r+s}%`:this.currentValue=r+s),e.keyCode===40&&(this.label?this.onChange.emit({data:{[this.label]:r-s},$event:e}):this.onChange.emit({data:r-s,$event:e}),o?this.currentValue=`${r-s}%`:this.currentValue=r-s)}handleKeyup(e){e.keyCode===40||e.keyCode===38||`${this.currentValue}`!==e.target.value&&(this.label?this.onChange.emit({data:{[this.label]:e.target.value},$event:e}):this.onChange.emit({data:e.target.value,$event:e}))}ngOnChanges(){this.focus?this.blurValue=String(this.value).toUpperCase():(this.currentValue=String(this.value).toUpperCase(),this.blurValue=String(this.value).toUpperCase())}ngOnDestroy(){this.unsubscribe()}subscribe(){this.mousemove=Wh(document,"mousemove").subscribe(e=>this.handleDrag(e)),this.mouseup=Wh(document,"mouseup").subscribe(()=>this.unsubscribe())}unsubscribe(){this.mousemove?.unsubscribe(),this.mouseup?.unsubscribe()}handleMousedown(e){this.dragLabel&&(e.preventDefault(),this.handleDrag(e),this.subscribe())}handleDrag(e){if(this.dragLabel){let i=Math.round(this.value+e.movementX);i>=0&&i<=this.dragMax&&this.onChange.emit({data:{[this.label]:i},$event:e})}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["color-editable-input"]],inputs:{style:"style",label:"label",value:"value",arrowOffset:"arrowOffset",dragLabel:"dragLabel",dragMax:"dragMax",placeholder:"placeholder"},outputs:{onChange:"onChange"},standalone:!1,features:[Ot],decls:3,vars:6,consts:[[1,"wrap",3,"ngStyle"],["spellCheck","false",3,"keydown","keyup","focus","focusout","ngStyle","value","placeholder"],[3,"id","ngStyle"],[3,"mousedown","id","ngStyle"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"input",1),ie("keydown",function(s){return o.handleKeydown(s)})("keyup",function(s){return o.handleKeyup(s)})("focus",function(s){return o.handleFocus(s)})("focusout",function(s){return o.handleFocusOut(s)}),D(),qe(2,Bdt,2,3,"span",2),D()),i&2&&(E("ngStyle",o.wrapStyle),T(),E("ngStyle",o.inputStyle)("value",o.currentValue)("placeholder",o.placeholder),Ge("aria-labelledby",o.uniqueId),T(),Ke(o.label?2:-1))},dependencies:[vs],styles:["[_nghost-%COMP%]{display:flex}.wrap[_ngcontent-%COMP%]{position:relative}"],changeDetection:0})}return t})(),V2e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[On]})}return t})();var z2e=(()=>{class t{color;style={};focusStyle={};focus;onClick=new ve;onHover=new ve;divStyles={};focusStyles={};inFocus=!1;ngOnInit(){this.divStyles=be({background:this.color},this.style)}currentStyles(){return this.focusStyles=be(be({},this.divStyles),this.focusStyle),this.focus||this.inFocus?this.focusStyles:this.divStyles}handleFocusOut(){this.inFocus=!1}handleFocus(){this.inFocus=!0}handleHover(e,i){this.onHover.emit({hex:e,$event:i})}handleClick(e,i){this.onClick.emit({hex:e,$event:i})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["color-swatch"]],inputs:{color:"color",style:"style",focusStyle:"focusStyle",focus:"focus"},outputs:{onClick:"onClick",onHover:"onHover"},standalone:!1,ngContentSelectors:Vdt,decls:3,vars:3,consts:[["tabindex","0",1,"swatch",3,"click","keydown.enter","focus","blur","mouseover","ngStyle"],["boxShadow","inset 0 0 0 1px rgba(0,0,0,0.1)"]],template:function(i,o){i&1&&(Nn(),k(0,"div",0),ie("click",function(s){return o.handleClick(o.color,s)})("keydown.enter",function(s){return o.handleClick(o.color,s)})("focus",function(){return o.handleFocus()})("blur",function(){return o.handleFocusOut()})("mouseover",function(s){return o.handleHover(o.color,s)}),pn(1),qe(2,zdt,1,0,"color-checkboard",1),D()),i&2&&(E("ngStyle",o.currentStyles()),Ge("title",o.color),T(2),Ke(o.color==="transparent"?2:-1))},dependencies:[vs,jdt],styles:[".swatch[_ngcontent-%COMP%]{outline:none;height:100%;width:100%;cursor:pointer;position:relative}"],changeDetection:0})}return t})(),U2e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[On,Gdt]})}return t})();var Kdt=t=>({input:t});function Wdt(t,n){if(t&1){let e=tt();k(0,"div",3)(1,"color-swatch",7),ie("onClick",function(o){se(e);let r=P();return ae(r.handleBlockChange(o))})("onHover",function(o){se(e);let r=P();return ae(r.onSwatchHover.emit(o))}),D()()}if(t&2){let e=n.$implicit,i=P();T(),$r(i.swatchStyle),E("color",e)("focusStyle",i.focus(e))}}var H2e=(()=>{class t extends Dle{width=276;colors=["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"];triangle="top-left";swatchStyle={width:"30px",height:"30px",borderRadius:"4px",fontSize:"0"};input={borderRadius:"4px",borderBottomLeftRadius:"0",borderTopLeftRadius:"0",border:"1px solid #e6ecf0",boxSizing:"border-box",display:"inline",fontSize:"14px",height:"30px",padding:"0",paddingLeft:"6px",width:"100%",color:"#657786"};disableAlpha=!0;constructor(){super()}focus(e){return{boxShadow:`0 0 4px ${e}`}}handleBlockChange({hex:e,$event:i}){N2e(e)&&this.handleChange({hex:e,source:"hex"},i)}handleValueChange({data:e,$event:i}){this.handleBlockChange({hex:e,$event:i})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["color-twitter"]],inputs:{width:"width",colors:"colors",triangle:"triangle"},standalone:!1,features:[jt([{provide:Ea,useExisting:Ko(()=>t),multi:!0},{provide:Dle,useExisting:Ko(()=>t)}]),ft],decls:11,vars:11,consts:[[1,"triangleShadow"],[1,"triangle"],[1,"twitter-body"],[1,"twitter-swatch"],[1,"twitter-hash"],[1,"twitter-input"],[3,"onChange","value"],[3,"onClick","onHover","color","focusStyle"]],template:function(i,o){i&1&&(k(0,"div"),ce(1,"div",0)(2,"div",1),k(3,"div",2),lo(4,Wdt,2,4,"div",3,jo),k(6,"div",4)(7,"div"),Q(8,"#"),D()(),k(9,"div",5)(10,"color-editable-input",6),ie("onChange",function(s){return o.handleValueChange(s)}),D()()()()),i&2&&(Oe(nne("twitter-picker ",o.triangle,"-triangle ",o.className)),Ir("width",o.width,"px"),T(4),co(o.colors),T(6),$r(ki(9,Kdt,o.input)),E("value",o.hex.replace("#","")))},dependencies:[z2e,B2e],styles:[".twitter-picker[_ngcontent-%COMP%]{background:#fff;border:0px solid rgba(0,0,0,.25);box-shadow:#00000040 0 1px 4px;border-radius:4px;position:relative;box-sizing:border-box}.triangleShadow[_ngcontent-%COMP%]{width:0px;height:0px;border-style:solid;border-width:0px 9px 10px;border-color:transparent transparent rgba(0,0,0,.1);position:absolute}.triangle[_ngcontent-%COMP%]{width:0px;height:0px;border-style:solid;border-width:0px 9px 10px;border-color:transparent transparent rgb(255,255,255);position:absolute}.hide-triangle[_ngcontent-%COMP%] > .triangle[_ngcontent-%COMP%]{display:none}.hide-triangle[_ngcontent-%COMP%] > .triangleShadow[_ngcontent-%COMP%]{display:none}.top-left-triangle[_ngcontent-%COMP%] > .triangle[_ngcontent-%COMP%]{top:-10px;left:12px}.top-left-triangle[_ngcontent-%COMP%] > .triangleShadow[_ngcontent-%COMP%]{top:-11px;left:12px}.top-right-triangle[_ngcontent-%COMP%] > .triangle[_ngcontent-%COMP%]{top:-10px;right:12px}.top-right-triangle[_ngcontent-%COMP%] > .triangleShadow[_ngcontent-%COMP%]{top:-11px;right:12px}.twitter-body[_ngcontent-%COMP%]{padding:15px 9px 9px 15px}.twitter-swatch[_ngcontent-%COMP%]{width:30px;height:30px;display:inline-block;margin:0 6px 0 0}.twitter-hash[_ngcontent-%COMP%]{background:#f0f0f0;height:30px;width:30px;border-radius:4px 0 0 4px;color:#98a1a4;margin-left:-3px;display:inline-block}.twitter-hash[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{position:absolute;align-items:center;justify-content:center;height:30px;width:30px;display:flex}.twitter-input[_ngcontent-%COMP%]{display:inline-block;margin-top:-6px;font-size:10px;height:27px;padding:0;position:relative;top:6px;vertical-align:top;width:108px;margin-left:-4px}"],changeDetection:0})}return t})(),j2e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[On,U2e,V2e]})}return t})();var Qdt=["content"],Zdt=["*"],Xdt=(t,n)=>({showTransitionParams:t,hideTransitionParams:n}),Jdt=(t,n)=>({value:t,params:n}),eut=t=>({closeCallback:t});function tut(t,n){}function iut(t,n){t&1&&ee(0,tut,0,0,"ng-template")}function nut(t,n){if(t&1){let e=tt();k(0,"div",1),ie("click",function(o){se(e);let r=P();return ae(r.onOverlayClick(o))})("@animation.start",function(o){se(e);let r=P();return ae(r.onAnimationStart(o))})("@animation.done",function(o){se(e);let r=P();return ae(r.onAnimationEnd(o))}),k(1,"div",2),ie("click",function(o){se(e);let r=P();return ae(r.onContentClick(o))})("mousedown",function(o){se(e);let r=P();return ae(r.onContentClick(o))}),pn(2),ee(3,iut,1,0,null,3),D()()}if(t&2){let e=P();Oe(e.cn(e.cx("root"),e.styleClass)),E("ngStyle",e.style)("@animation",Eo(14,Jdt,e.overlayVisible?"open":"close",Eo(11,Xdt,e.showTransitionOptions,e.hideTransitionOptions))),Ge("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),T(),Oe(e.cx("content")),T(2),E("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",ki(17,eut,e.onCloseClick.bind(e)))}}var out=` .p-popover { margin-top: dt('popover.gutter'); background: dt('popover.background'); color: dt('popover.color'); border: 1px solid dt('popover.border.color'); border-radius: dt('popover.border.radius'); box-shadow: dt('popover.shadow'); position: absolute } .p-popover-content { padding: dt('popover.content.padding'); } .p-popover-flipped { margin-top: calc(dt('popover.gutter') * -1); margin-bottom: dt('popover.gutter'); } .p-popover-enter-from { opacity: 0; transform: scaleY(0.8); } .p-popover-leave-to { opacity: 0; } .p-popover-enter-active { transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1); } .p-popover-leave-active { transition: opacity 0.1s linear; } .p-popover:after, .p-popover:before { bottom: 100%; left: calc(dt('popover.arrow.offset') + dt('popover.arrow.left')); content: " "; height: 0; width: 0; position: absolute; pointer-events: none; } .p-popover:after { border-width: calc(dt('popover.gutter') - 2px); margin-left: calc(-1 * (dt('popover.gutter') - 2px)); border-style: solid; border-color: transparent; border-bottom-color: dt('popover.background'); } .p-popover:before { border-width: dt('popover.gutter'); margin-left: calc(-1 * dt('popover.gutter')); border-style: solid; border-color: transparent; border-bottom-color: dt('popover.border.color'); } .p-popover-flipped:after, .p-popover-flipped:before { bottom: auto; top: 100%; } .p-popover.p-popover-flipped:after { border-bottom-color: transparent; border-top-color: dt('popover.background'); } .p-popover.p-popover-flipped:before { border-bottom-color: transparent; border-top-color: dt('popover.border.color'); } `,rut={root:"p-popover p-component",content:"p-popover-content"},G2e=(()=>{class t extends io{name="popover";theme=out;classes=rut;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),$2e=(()=>{class t extends oo{ariaLabel;ariaLabelledBy;dismissable=!0;style;styleClass;appendTo="body";autoZIndex=!0;ariaCloseLabel;baseZIndex=0;focusOnShow=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";onShow=new ve;onHide=new ve;container;overlayVisible=!1;render=!1;isOverlayAnimationInProgress=!1;selfClick=!1;documentClickListener;target;willHide;scrollHandler;documentResizeListener;contentTemplate;templates;_contentTemplate;destroyCallback;overlayEventListener;overlaySubscription;_componentStyle=re(G2e);zone=re(_n);overlayService=re(Jg);ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break}})}bindDocumentClickListener(){if(ps(this.platformId)&&!this.documentClickListener){let e=vAe()?"touchstart":"click",i=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(i,e,o=>{this.dismissable&&(!this.container?.contains(o.target)&&this.target!==o.target&&!this.target.contains(o.target)&&!this.selfClick&&this.hide(),this.selfClick=!1,this.cd.markForCheck())})}}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}toggle(e,i){this.isOverlayAnimationInProgress||(this.overlayVisible?(this.hasTargetChanged(e,i)&&(this.destroyCallback=()=>{this.show(null,i||e.currentTarget||e.target)}),this.hide()):this.show(e,i))}show(e,i){i&&e&&e.stopPropagation(),!this.isOverlayAnimationInProgress&&(this.target=i||e.currentTarget||e.target,this.overlayVisible=!0,this.render=!0,this.cd.markForCheck())}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0}onContentClick(e){let i=e.target;this.selfClick=e.offsetX{this.container&&this.container.contains(i.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener),this.onShow.emit(null)),this.isOverlayAnimationInProgress=!0}onAnimationEnd(e){switch(e.toState){case"void":this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null),this.overlaySubscription&&this.overlaySubscription.unsubscribe();break;case"close":this.autoZIndex&&Nc.clear(this.container),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1;break}this.isOverlayAnimationInProgress=!1}focus(){let e=zo(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}hide(){this.overlayVisible=!1,this.cd.markForCheck()}onCloseClick(e){this.hide(),e.preventDefault()}onEscapeKeydown(e){this.hide()}onWindowResize(){this.overlayVisible&&!Xg()&&this.hide()}bindDocumentResizeListener(){if(ps(this.platformId)&&!this.documentResizeListener){let e=this.document.defaultView;this.documentResizeListener=this.renderer.listen(e,"resize",this.onWindowResize.bind(this))}}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){ps(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new m0(this.target,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener())}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&Nc.clear(this.container),this.cd.destroyed||(this.target=null),this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-popover"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Qdt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.contentTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},hostBindings:function(i,o){i&1&&ie("keydown.escape",function(s){return o.onEscapeKeydown(s)},Cie)},inputs:{ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",dismissable:[2,"dismissable","dismissable",je],style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:[2,"autoZIndex","autoZIndex",je],ariaCloseLabel:"ariaCloseLabel",baseZIndex:[2,"baseZIndex","baseZIndex",ln],focusOnShow:[2,"focusOnShow","focusOnShow",je],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide"},features:[jt([G2e]),ft],ngContentSelectors:Zdt,decls:1,vars:1,consts:[["role","dialog",3,"class","ngStyle","click",4,"ngIf"],["role","dialog",3,"click","ngStyle"],[3,"click","mousedown"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&(Nn(),ee(0,nut,4,19,"div",0)),i&2&&E("ngIf",o.render)},dependencies:[On,Fr,Lo,vs,In],encapsulation:2,data:{animation:[xh("animation",[u0("void",al({transform:"scaleY(0.8)",opacity:0})),u0("close",al({opacity:0})),u0("open",al({transform:"translateY(0)",opacity:1})),Rc("void => open",uc("{{showTransitionParams}}")),Rc("open => close",uc("{{hideTransitionParams}}"))])]},changeDetection:0})}return t})();var sut=t=>({"background-color":t}),Az=(()=>{class t extends dr{constructor(){super(),this.placeholder="Farbe",this.colorHexOptions=g2,this.colorChange=new ve,this.colorHex="#FFFFFF",this.colorPickerVisible=!1,this.color$=new hi;let e=this.color$.pipe(id(500)).subscribe(i=>{let o=new Cs(i.color.hex);this._setColor(o),this.colorPickerVisibility(!1)});this._subs.push(e)}ngOnInit(){this.color&&this._setColor(this.color,!1)}ngOnDestroy(){this.unsubscribeAll()}colorPickerVisibility(e){if(e&&!this.color){let i=new Cs(this.colorHexOptions[0]||"#ffffff");this._setColor(i)}this.colorPickerVisible=e}onColorChange(e){this.color$.next(e)}_setColor(e,i=!0){this.color=e,this.colorHex=e.toHexString(),i&&this.colorChange.emit(this.color)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-ui-color-select"]],inputs:{color:"color",placeholder:"placeholder",colorHexOptions:"colorHexOptions"},outputs:{colorChange:"colorChange"},features:[ft],decls:10,vars:8,consts:[["popover",""],[1,"mb-4"],["id","ui-color-select","pInputText","","fluid","","variant","filled","readonly","",1,"mb-4","cursor-pointer",3,"click","ngModel"],["for","ui-color-select"],["type","text",1,"p-colorpicker-preview",3,"click"],["triangle","hide",3,"onChangeComplete","color","colors"]],template:function(i,o){if(i&1){let r=tt();k(0,"p-inputgroup",1)(1,"p-iftalabel")(2,"input",2),ie("click",function(d){se(r);let m=ti(8);return ae(m.toggle(d))}),D(),k(3,"label",3),Q(4),D()(),k(5,"p-inputgroup-addon")(6,"input",4),ie("click",function(d){se(r);let m=ti(8);return ae(m.toggle(d))}),D()()(),k(7,"p-popover",null,0)(9,"color-twitter",5),ie("onChangeComplete",function(d){return se(r),ae(o.onColorChange(d))}),D()()}i&2&&(T(2),E("ngModel",o.colorHex),T(2),dt(o.placeholder),T(2),$r(ki(6,sut,o.colorHex)),T(3),E("color",o.colorHex)("colors",o.colorHexOptions))},dependencies:[Tn,$o,j2e,H2e,nE,as,fu,iE,hr,Ml,no,Lr,$2e],styles:[".p-colorpicker-preview[_ngcontent-%COMP%]{width:2rem;height:2rem;padding:0;border:0 none;border-radius:4px;outline-color:transparent;cursor:pointer}"]})}}return t})();var Ih=class t{static fromObject(n){return new t(n.street,n.postalCode,n.city,n.location,n.note,n.administrativeDistrictId)}constructor(n,e,i,o,r,s){this.street=n,this.postalCode=e,this.city=i,this.location=o,this.note=r,this.administrativeDistrictId=s}isEmpty(){return this.street===void 0&&this.city===void 0&&this.postalCode===void 0}toString(){return this.isEmpty()?"":`${this.street}, ${this.postalCode} ${this.city}`}clone(...n){return new t(this.street,this.postalCode,this.city,this.location,this.note,this.administrativeDistrictId)}};var ga=class t{static fromString(n){let e=n.split("_"),i=e[2]?parseInt(e[2],10):void 0;return new t(e[0],e[1],i)}static fromObj(n={}){return new t(n.ik.toString(),n.sn.toString(),n.year)}constructor(n,e,i){this.ik=n,this.sn=e,this.year=i}toString(){let n=null;return this.ik&&this.sn!==null&&this.sn!==void 0&&(n=`${this.ik}_${this.sn}`,this.year&&(n=`${n}_${this.year}`)),n}clone(){return new t(this.ik,this.sn,this.year)}equals(n){return!!this&&!!n&&this.toString()===n.toString()}equalsByIkAndSn(n){return vo.equals(this.ik,n.ik)&&vo.equals(this.sn,n.sn)}};var _x=(function(t){return t[t.SMALL=1]="SMALL",t[t.MEDIUM=2]="MEDIUM",t[t.LARGE=3]="LARGE",t[t.EXTRA_LARGE=4]="EXTRA_LARGE",t})(_x||{});var Xw=(function(t){return t.PUBLIC="public",t.PRIVATE="private",t.NONPROFIT="nonprofit",t})(Xw||{});var Jw=[2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023],Cd=2023;var xW=class t{static fromObj(n={}){return new t(ga.fromObj(n.id),n.name,n.nameOfOwner,Ih.fromObject(n.address),n.type,n.size,n.beds,n.cmi,n.level)}constructor(n,e,i,o,r,s,d,m,v){this.id=n,this.name=e,this.nameOfOwner=i,this.address=o,this.type=r,this.size=s,this.beds=d,this.cmi=m,this.level=v}};var yx=(function(t){return t.BASIC_REGULAR_PROVIDER="BASIC_REGULAR_PROVIDER",t.SPECIALIZED_HOSPITAL="SPECIALIZED_HOSPITAL",t.FOCUS_PROVIDER="FOCUS_PROVIDER",t.MAXIMUM_PROVIDER="MAXIMUM_PROVIDER",t})(yx||{}),b2={BASIC_REGULAR_PROVIDER:"Grund- & Regelversorger",FOCUS_PROVIDER:"Schwerpunktversorger",SPECIALIZED_HOSPITAL:"Fachkrankenhaus",MAXIMUM_PROVIDER:"Maximalversorger"};var mE=class t{static fromObject(n){let e=Ale.fromObject(n.medical),i=kle.fromObject(n.nursing);return new t(e,i)}constructor(n,e){this.medical=n,this.nursing=e}},Ale=class t{static fromObject(n={}){let e=n.docsWithoutInpatientDocs.medicalSpecialists||{},i=n.docsWithoutInpatientDocs.nonSpecialists||{};return new t(n.total,e,i,n.inpatientDocs)}constructor(n={},e={},i={},o={}){this.total=n,this.medicalSpecialists=e,this.nonSpecialists=i,this.inpatientDocs=o;let r=Object.keys(this.total);r=r.concat(Object.keys(this.medicalSpecialists).filter(s=>r.indexOf(s)===-1)),r=r.concat(Object.keys(this.nonSpecialists).filter(s=>r.indexOf(s)===-1)),r=r.concat(Object.keys(this.inpatientDocs).filter(s=>r.indexOf(s)===-1)),this._normalizedYears=r}chartData(n,e,i){let o=this[n],r=this._normalizedYears.map(d=>o[d]);return{label:e,data:r,lineTension:0,fill:!1,borderWidth:n==="total"?3:1,borderColor:i,backgroundColor:i}}hasData(n){let e=this[n];return Object.keys(e).filter(o=>!!e[o]).length>0}get normalizedYears(){return this._normalizedYears}},kle=class t{static fromObject(n={}){return new t(n.total,n.deliveryNurses,n.enrolledChildrenNurses,n.enrolledNurses,n.geriatricNurses,n.hospitalPorters,n.licensedPracticalNurses,n.scrubNurses)}constructor(n,e={},i={},o={},r={},s={},d={},m={}){this.total=n,this.deliveryNurses=e,this.enrolledChildrenNurses=i,this.enrolledNurses=o,this.geriatricNurses=r,this.hospitalPorters=s,this.licensedPracticalNurses=d,this.scrubNurses=m;let v=Object.keys(this.total);v=v.concat(Object.keys(this.deliveryNurses).filter(w=>v.indexOf(w)===-1)),v=v.concat(Object.keys(this.enrolledChildrenNurses).filter(w=>v.indexOf(w)===-1)),v=v.concat(Object.keys(this.enrolledNurses).filter(w=>v.indexOf(w)===-1)),v=v.concat(Object.keys(this.geriatricNurses).filter(w=>v.indexOf(w)===-1)),v=v.concat(Object.keys(this.hospitalPorters).filter(w=>v.indexOf(w)===-1)),v=v.concat(Object.keys(this.licensedPracticalNurses).filter(w=>v.indexOf(w)===-1)),v=v.concat(Object.keys(this.scrubNurses).filter(w=>v.indexOf(w)===-1)),this._normalizedYears=v}chartData(n,e,i){let o=this[n],r=this._normalizedYears.map(d=>o[d]);return{label:e,data:r,lineTension:0,fill:!1,borderWidth:n==="total"?3:1,borderColor:i,backgroundColor:i}}hasData(n){let e=this[n];return Object.keys(e).filter(o=>!!e[o]).length>0}get normalizedYears(){return this._normalizedYears}};var y0=(function(t){return t.WITH_UNIVERSITIES="WITH_UNIVERSITIES",t.WITHOUT_UNIVERSITIES="WITHOUT_UNIVERSITIES",t.ONLY_UNIVERSITIES="ONLY_UNIVERSITIES",t})(y0||{}),rL={[y0.WITH_UNIVERSITIES]:"Mit Universit\xE4ts-Kliniken",[y0.WITHOUT_UNIVERSITIES]:"Ohne Universit\xE4ts-Kliniken",[y0.ONLY_UNIVERSITIES]:"Nur Universit\xE4ts-Kliniken"};var aut={callback:t=>new Intl.NumberFormat().format(t)},lut={color:"rgba(0,0,0,0.07)",drawOnChartArea:!0,tickLength:4},cut={family:"Roboto"},C2={type:"linear",ticks:aut,grid:lut,scaleLabel:cut};function Oz(t){return t+.5|0}var fE=(t,n,e)=>Math.max(Math.min(t,e),n);function kz(t){return fE(Oz(t*2.55),0,255)}function gE(t){return fE(Oz(t*255),0,255)}function eS(t){return fE(Oz(t/2.55)/100,0,1)}function q2e(t){return fE(Oz(t*100),0,100)}var vy={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ole=[..."0123456789ABCDEF"],dut=t=>Ole[t&15],uut=t=>Ole[(t&240)>>4]+Ole[t&15],wW=t=>(t&240)>>4===(t&15),put=t=>wW(t.r)&&wW(t.g)&&wW(t.b)&&wW(t.a);function hut(t){var n=t.length,e;return t[0]==="#"&&(n===4||n===5?e={r:255&vy[t[1]]*17,g:255&vy[t[2]]*17,b:255&vy[t[3]]*17,a:n===5?vy[t[4]]*17:255}:(n===7||n===9)&&(e={r:vy[t[1]]<<4|vy[t[2]],g:vy[t[3]]<<4|vy[t[4]],b:vy[t[5]]<<4|vy[t[6]],a:n===9?vy[t[7]]<<4|vy[t[8]]:255})),e}var mut=(t,n)=>t<255?n(t):"";function fut(t){var n=put(t)?dut:uut;return t?"#"+n(t.r)+n(t.g)+n(t.b)+mut(t.a,n):void 0}var gut=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Q2e(t,n,e){let i=n*Math.min(e,1-e),o=(r,s=(r+t/30)%12)=>e-i*Math.max(Math.min(s-3,9-s,1),-1);return[o(0),o(8),o(4)]}function _ut(t,n,e){let i=(o,r=(o+t/60)%6)=>e-e*n*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function yut(t,n,e){let i=Q2e(t,1,.5),o;for(n+e>1&&(o=1/(n+e),n*=o,e*=o),o=0;o<3;o++)i[o]*=1-n-e,i[o]+=n;return i}function vut(t,n,e,i,o){return t===o?(n-e)/i+(n.5?w/(2-r-s):w/(r+s),m=vut(e,i,o,w,r),m=m*60+.5),[m|0,v||0,d]}function Fle(t,n,e,i){return(Array.isArray(n)?t(n[0],n[1],n[2]):t(n,e,i)).map(gE)}function Ple(t,n,e){return Fle(Q2e,t,n,e)}function but(t,n,e){return Fle(yut,t,n,e)}function Cut(t,n,e){return Fle(_ut,t,n,e)}function Z2e(t){return(t%360+360)%360}function xut(t){let n=gut.exec(t),e=255,i;if(!n)return;n[5]!==i&&(e=n[6]?kz(+n[5]):gE(+n[5]));let o=Z2e(+n[2]),r=+n[3]/100,s=+n[4]/100;return n[1]==="hwb"?i=but(o,r,s):n[1]==="hsv"?i=Cut(o,r,s):i=Ple(o,r,s),{r:i[0],g:i[1],b:i[2],a:e}}function wut(t,n){var e=Rle(t);e[0]=Z2e(e[0]+n),e=Ple(e),t.r=e[0],t.g=e[1],t.b=e[2]}function Sut(t){if(!t)return;let n=Rle(t),e=n[0],i=q2e(n[1]),o=q2e(n[2]);return t.a<255?`hsla(${e}, ${i}%, ${o}%, ${eS(t.a)})`:`hsl(${e}, ${i}%, ${o}%)`}var K2e={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},W2e={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Tut(){let t={},n=Object.keys(W2e),e=Object.keys(K2e),i,o,r,s,d;for(i=0;i>16&255,r>>8&255,r&255]}return t}var SW;function Iut(t){SW||(SW=Tut(),SW.transparent=[0,0,0,0]);let n=SW[t.toLowerCase()];return n&&{r:n[0],g:n[1],b:n[2],a:n.length===4?n[3]:255}}var Eut=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Dut(t){let n=Eut.exec(t),e=255,i,o,r;if(n){if(n[7]!==i){let s=+n[7];e=n[8]?kz(s):fE(s*255,0,255)}return i=+n[1],o=+n[3],r=+n[5],i=255&(n[2]?kz(i):fE(i,0,255)),o=255&(n[4]?kz(o):fE(o,0,255)),r=255&(n[6]?kz(r):fE(r,0,255)),{r:i,g:o,b:r,a:e}}}function Aut(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${eS(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}var Mle=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,sL=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function kut(t,n,e){let i=sL(eS(t.r)),o=sL(eS(t.g)),r=sL(eS(t.b));return{r:gE(Mle(i+e*(sL(eS(n.r))-i))),g:gE(Mle(o+e*(sL(eS(n.g))-o))),b:gE(Mle(r+e*(sL(eS(n.b))-r))),a:t.a+e*(n.a-t.a)}}function TW(t,n,e){if(t){let i=Rle(t);i[n]=Math.max(0,Math.min(i[n]+i[n]*e,n===0?360:1)),i=Ple(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function X2e(t,n){return t&&Object.assign(n||{},t)}function Y2e(t){var n={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(n={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(n.a=gE(t[3]))):(n=X2e(t,{r:0,g:0,b:0,a:1}),n.a=gE(n.a)),n}function Mut(t){return t.charAt(0)==="r"?Dut(t):xut(t)}var Mz=class t{constructor(n){if(n instanceof t)return n;let e=typeof n,i;e==="object"?i=Y2e(n):e==="string"&&(i=hut(n)||Iut(n)||Mut(n)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var n=X2e(this._rgb);return n&&(n.a=eS(n.a)),n}set rgb(n){this._rgb=Y2e(n)}rgbString(){return this._valid?Aut(this._rgb):void 0}hexString(){return this._valid?fut(this._rgb):void 0}hslString(){return this._valid?Sut(this._rgb):void 0}mix(n,e){if(n){let i=this.rgb,o=n.rgb,r,s=e===r?.5:e,d=2*s-1,m=i.a-o.a,v=((d*m===-1?d:(d+m)/(1+d*m))+1)/2;r=1-v,i.r=255&v*i.r+r*o.r+.5,i.g=255&v*i.g+r*o.g+.5,i.b=255&v*i.b+r*o.b+.5,i.a=s*i.a+(1-s)*o.a,this.rgb=i}return this}interpolate(n,e){return n&&(this._rgb=kut(this._rgb,n._rgb,e)),this}clone(){return new t(this.rgb)}alpha(n){return this._rgb.a=gE(n),this}clearer(n){let e=this._rgb;return e.a*=1-n,this}greyscale(){let n=this._rgb,e=Oz(n.r*.3+n.g*.59+n.b*.11);return n.r=n.g=n.b=e,this}opaquer(n){let e=this._rgb;return e.a*=1+n,this}negate(){let n=this._rgb;return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,this}lighten(n){return TW(this._rgb,2,n),this}darken(n){return TW(this._rgb,2,-n),this}saturate(n){return TW(this._rgb,1,n),this}desaturate(n){return TW(this._rgb,1,-n),this}rotate(n){return wut(this._rgb,n),this}};function Cx(){}var cMe=(()=>{let t=0;return()=>t++})();function tl(t){return t==null}function ld(t){if(Array.isArray&&Array.isArray(t))return!0;let n=Object.prototype.toString.call(t);return n.slice(0,7)==="[object"&&n.slice(-6)==="Array]"}function ll(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function tu(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function r_(t,n){return tu(t)?t:n}function ia(t,n){return typeof t>"u"?n:t}var dMe=(t,n)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/n,Vle=(t,n)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*n:+t;function Kc(t,n,e){if(t&&typeof t.call=="function")return t.apply(e,n)}function pc(t,n,e,i){let o,r,s;if(ld(t))if(r=t.length,i)for(o=r-1;o>=0;o--)n.call(e,t[o],o);else for(o=0;ot,x:t=>t.x,y:t=>t.y};function Fut(t){let n=t.split("."),e=[],i="";for(let o of n)i+=o,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Put(t){let n=Fut(t);return e=>{for(let i of n){if(i==="")break;e=e&&e[i]}return e}}function nS(t,n){return(J2e[n]||(J2e[n]=Put(n)))(t)}function FW(t){return t.charAt(0).toUpperCase()+t.slice(1)}var uL=t=>typeof t<"u",tS=t=>typeof t=="function",zle=(t,n)=>{if(t.size!==n.size)return!1;for(let e of t)if(!n.has(e))return!1;return!0};function pMe(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}var Hl=Math.PI,cd=2*Hl,Lut=cd+Hl,MW=Number.POSITIVE_INFINITY,Nut=Hl/180,gu=Hl/2,x2=Hl/4,eMe=Hl*2/3,iS=Math.log10,sb=Math.sign;function pL(t,n,e){return Math.abs(t-n)o-r).pop(),n}function But(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function T2(t){return!But(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function mMe(t,n){let e=Math.round(t);return e-n<=t&&e+n>=t}function Hle(t,n,e){let i,o,r;for(i=0,o=t.length;im&&v=Math.min(n,e)-i&&t<=Math.max(n,e)+i}function LW(t,n,e){e=e||(s=>t[s]1;)r=o+i>>1,e(r)?o=r:i=r;return{lo:o,hi:i}}var vx=(t,n,e,i)=>LW(t,e,i?o=>{let r=t[o][n];return rt[o][n]LW(t,e,i=>t[i][n]>=e);function _Me(t,n,e){let i=0,o=t.length;for(;ii&&t[o-1]>e;)o--;return i>0||o{let i="_onData"+FW(e),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...r){let s=o.apply(this,r);return t._chartjs.listeners.forEach(d=>{typeof d[i]=="function"&&d[i](...r)}),s}})})}function $le(t,n){let e=t._chartjs;if(!e)return;let i=e.listeners,o=i.indexOf(n);o!==-1&&i.splice(o,1),!(i.length>0)&&(yMe.forEach(r=>{delete t[r]}),delete t._chartjs)}function qle(t){let n=new Set(t);return n.size===t.length?t:Array.from(n)}var Kle=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function Wle(t,n){let e=[],i=!1;return function(...o){e=o,i||(i=!0,Kle.call(window,()=>{i=!1,t.apply(n,e)}))}}function bMe(t,n){let e;return function(...i){return n?(clearTimeout(e),e=setTimeout(t,n,i)):t.apply(this,i),n}}var NW=t=>t==="start"?"left":t==="end"?"right":"center",um=(t,n,e)=>t==="start"?n:t==="end"?e:(n+e)/2,CMe=(t,n,e,i)=>t===(i?"left":"right")?e:t==="center"?(n+e)/2:n;function Yle(t,n,e){let i=n.length,o=0,r=i;if(t._sorted){let{iScale:s,vScale:d,_parsed:m}=t,v=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,w=s.axis,{min:O,max:N,minDefined:V,maxDefined:$}=s.getUserBounds();if(V){if(o=Math.min(vx(m,w,O).lo,e?i:vx(n,w,s.getPixelForValue(O)).lo),v){let q=m.slice(0,o+1).reverse().findIndex(W=>!tl(W[d.axis]));o-=Math.max(0,q)}o=Wp(o,0,i-1)}if($){let q=Math.max(vx(m,s.axis,N,!0).hi+1,e?0:vx(n,w,s.getPixelForValue(N),!0).hi+1);if(v){let W=m.slice(q-1).findIndex(te=>!tl(te[d.axis]));q+=Math.max(0,W)}r=Wp(q,o,i)-o}else r=i-o}return{start:o,count:r}}function Qle(t){let{xScale:n,yScale:e,_scaleRanges:i}=t,o={xmin:n.min,xmax:n.max,ymin:e.min,ymax:e.max};if(!i)return t._scaleRanges=o,!0;let r=i.xmin!==n.min||i.xmax!==n.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,o),r}var IW=t=>t===0||t===1,tMe=(t,n,e)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-n)*cd/e)),iMe=(t,n,e)=>Math.pow(2,-10*t)*Math.sin((t-n)*cd/e)+1,aL={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*gu)+1,easeOutSine:t=>Math.sin(t*gu),easeInOutSine:t=>-.5*(Math.cos(Hl*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>IW(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>IW(t)?t:tMe(t,.075,.3),easeOutElastic:t=>IW(t)?t:iMe(t,.075,.3),easeInOutElastic(t){return IW(t)?t:t<.5?.5*tMe(t*2,.1125,.45):.5+.5*iMe(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let n=1.70158;return(t/=.5)<1?.5*(t*t*(((n*=1.525)+1)*t-n)):.5*((t-=2)*t*(((n*=1.525)+1)*t+n)+2)},easeInBounce:t=>1-aL.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?aL.easeInBounce(t*2)*.5:aL.easeOutBounce(t*2-1)*.5+.5};function Zle(t){if(t&&typeof t=="object"){let n=t.toString();return n==="[object CanvasPattern]"||n==="[object CanvasGradient]"}return!1}function Xle(t){return Zle(t)?t:new Mz(t)}function Lle(t){return Zle(t)?t:new Mz(t).saturate(.5).darken(.1).hexString()}var zut=["x","y","borderWidth","radius","tension"],Uut=["color","borderColor","backgroundColor"];function Hut(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"}),t.set("animations",{colors:{type:"color",properties:Uut},numbers:{type:"number",properties:zut}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}})}function jut(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var nMe=new Map;function Gut(t,n){n=n||{};let e=t+JSON.stringify(n),i=nMe.get(e);return i||(i=new Intl.NumberFormat(t,n),nMe.set(e,i)),i}function mL(t,n,e){return Gut(n,e).format(t)}var xMe={values(t){return ld(t)?t:""+t},numeric(t,n,e){if(t===0)return"0";let i=this.chart.options.locale,o,r=t;if(e.length>1){let v=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(v<1e-4||v>1e15)&&(o="scientific"),r=$ut(t,e)}let s=iS(Math.abs(r)),d=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),m={notation:o,minimumFractionDigits:d,maximumFractionDigits:d};return Object.assign(m,this.options.ticks.format),mL(t,i,m)},logarithmic(t,n,e){if(t===0)return"0";let i=e[n].significand||t/Math.pow(10,Math.floor(iS(t)));return[1,2,3,5,10,15].includes(i)||n>.8*e.length?xMe.numeric.call(this,t,n,e):""}};function $ut(t,n){let e=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;return Math.abs(e)>=1&&t!==Math.floor(t)&&(e=t-Math.floor(t)),e}var Lz={formatters:xMe};function qut(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Lz.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"&&n!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"})}var yE=Object.create(null),BW=Object.create(null);function Rz(t,n){if(!n)return t;let e=n.split(".");for(let i=0,o=e.length;ii.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,o)=>Lle(o.backgroundColor),this.hoverBorderColor=(i,o)=>Lle(o.borderColor),this.hoverColor=(i,o)=>Lle(o.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(n),this.apply(e)}set(n,e){return Nle(this,n,e)}get(n){return Rz(this,n)}describe(n,e){return Nle(BW,n,e)}override(n,e){return Nle(yE,n,e)}route(n,e,i,o){let r=Rz(this,n),s=Rz(this,i),d="_"+e;Object.defineProperties(r,{[d]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){let m=this[d],v=s[o];return ll(m)?Object.assign({},v,m):ia(m,v)},set(m){this[d]=m}}})}apply(n){n.forEach(e=>e(this))}},xd=new Ble({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Hut,jut,qut]);function Kut(t){return!t||tl(t.size)||tl(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Fz(t,n,e,i,o){let r=n[o];return r||(r=n[o]=t.measureText(o).width,e.push(o)),r>i&&(i=r),i}function wMe(t,n,e,i){i=i||{};let o=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==n&&(o=i.data={},r=i.garbageCollect=[],i.font=n),t.save(),t.font=n;let s=0,d=e.length,m,v,w,O,N;for(m=0;me.length){for(m=0;m0&&t.stroke()}}function bx(t,n,e){return e=e||.5,!n||t&&t.x>n.left-e&&t.xn.top-e&&t.y0&&r.strokeColor!=="",m,v;for(t.save(),t.font=o.string,Wut(t,r),m=0;m+t||0;function zW(t,n){let e={},i=ll(n),o=i?Object.keys(n):n,r=ll(t)?i?s=>ia(t[s],t[n[s]]):s=>t[s]:()=>t;for(let s of o)e[s]=ept(r(s));return e}function tce(t){return zW(t,{top:"y",right:"x",bottom:"y",left:"x"})}function CE(t){return zW(t,["topLeft","topRight","bottomLeft","bottomRight"])}function pm(t){let n=tce(t);return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function gp(t,n){t=t||{},n=n||xd.font;let e=ia(t.size,n.size);typeof e=="string"&&(e=parseInt(e,10));let i=ia(t.style,n.style);i&&!(""+i).match(Xut)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);let o={family:ia(t.family,n.family),lineHeight:Jut(ia(t.lineHeight,n.lineHeight),e),size:e,style:i,weight:ia(t.weight,n.weight),string:""};return o.string=Kut(o),o}function gL(t,n,e,i){let o=!0,r,s,d;for(r=0,s=t.length;re&&d===0?0:d+m;return{min:s(i,-Math.abs(r)),max:s(o,r)}}function oS(t,n){return Object.assign(Object.create(t),n)}function UW(t,n=[""],e,i,o=()=>t[0]){let r=e||t;typeof i>"u"&&(i=AMe("_fallback",t));let s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:i,_getTarget:o,override:d=>UW([d,...t],n,r,i)};return new Proxy(s,{deleteProperty(d,m){return delete d[m],delete d._keys,delete t[0][m],!0},get(d,m){return EMe(d,m,()=>lpt(m,n,t,d))},getOwnPropertyDescriptor(d,m){return Reflect.getOwnPropertyDescriptor(d._scopes[0],m)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(d,m){return rMe(d).includes(m)},ownKeys(d){return rMe(d)},set(d,m,v){let w=d._storage||(d._storage=o());return d[m]=w[m]=v,delete d._keys,!0}})}function S2(t,n,e,i){let o={_cacheable:!1,_proxy:t,_context:n,_subProxy:e,_stack:new Set,_descriptors:ice(t,i),setContext:r=>S2(t,r,e,i),override:r=>S2(t.override(r),n,e,i)};return new Proxy(o,{deleteProperty(r,s){return delete r[s],delete t[s],!0},get(r,s,d){return EMe(r,s,()=>ipt(r,s,d))},getOwnPropertyDescriptor(r,s){return r._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(r,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(r,s,d){return t[s]=d,delete r[s],!0}})}function ice(t,n={scriptable:!0,indexable:!0}){let{_scriptable:e=n.scriptable,_indexable:i=n.indexable,_allKeys:o=n.allKeys}=t;return{allKeys:o,scriptable:e,indexable:i,isScriptable:tS(e)?e:()=>e,isIndexable:tS(i)?i:()=>i}}var tpt=(t,n)=>t?t+FW(n):n,nce=(t,n)=>ll(n)&&t!=="adapters"&&(Object.getPrototypeOf(n)===null||n.constructor===Object);function EMe(t,n,e){if(Object.prototype.hasOwnProperty.call(t,n)||n==="constructor")return t[n];let i=e();return t[n]=i,i}function ipt(t,n,e){let{_proxy:i,_context:o,_subProxy:r,_descriptors:s}=t,d=i[n];return tS(d)&&s.isScriptable(n)&&(d=npt(n,d,t,e)),ld(d)&&d.length&&(d=opt(n,d,t,s.isIndexable)),nce(n,d)&&(d=S2(d,o,r&&r[n],s)),d}function npt(t,n,e,i){let{_proxy:o,_context:r,_subProxy:s,_stack:d}=e;if(d.has(t))throw new Error("Recursion detected: "+Array.from(d).join("->")+"->"+t);d.add(t);let m=n(r,s||i);return d.delete(t),nce(t,m)&&(m=oce(o._scopes,o,t,m)),m}function opt(t,n,e,i){let{_proxy:o,_context:r,_subProxy:s,_descriptors:d}=e;if(typeof r.index<"u"&&i(t))return n[r.index%n.length];if(ll(n[0])){let m=n,v=o._scopes.filter(w=>w!==m);n=[];for(let w of m){let O=oce(v,o,t,w);n.push(S2(O,r,s&&s[t],d))}}return n}function DMe(t,n,e){return tS(t)?t(n,e):t}var rpt=(t,n)=>t===!0?n:typeof t=="string"?nS(n,t):void 0;function spt(t,n,e,i,o){for(let r of n){let s=rpt(e,r);if(s){t.add(s);let d=DMe(s._fallback,e,o);if(typeof d<"u"&&d!==e&&d!==i)return d}else if(s===!1&&typeof i<"u"&&e!==i)return null}return!1}function oce(t,n,e,i){let o=n._rootScopes,r=DMe(n._fallback,e,i),s=[...t,...o],d=new Set;d.add(i);let m=oMe(d,s,e,r||e,i);return m===null||typeof r<"u"&&r!==e&&(m=oMe(d,s,r,m,i),m===null)?!1:UW(Array.from(d),[""],o,r,()=>apt(n,e,i))}function oMe(t,n,e,i,o){for(;e;)e=spt(t,n,e,i,o);return e}function apt(t,n,e){let i=t._getTarget();n in i||(i[n]={});let o=i[n];return ld(o)&&ll(e)?e:o||{}}function lpt(t,n,e,i){let o;for(let r of n)if(o=AMe(tpt(r,t),e),typeof o<"u")return nce(t,o)?oce(e,i,t,o):o}function AMe(t,n){for(let e of n){if(!e)continue;let i=e[t];if(typeof i<"u")return i}}function rMe(t){let n=t._keys;return n||(n=t._keys=cpt(t._scopes)),n}function cpt(t){let n=new Set;for(let e of t)for(let i of Object.keys(e).filter(o=>!o.startsWith("_")))n.add(i);return Array.from(n)}function rce(t,n,e,i){let{iScale:o}=t,{key:r="r"}=this._parsing,s=new Array(i),d,m,v,w;for(d=0,m=i;dnt==="x"?"y":"x";function upt(t,n,e,i){let o=t.skip?n:t,r=n,s=e.skip?n:e,d=OW(r,o),m=OW(s,r),v=d/(d+m),w=m/(d+m);v=isNaN(v)?0:v,w=isNaN(w)?0:w;let O=i*v,N=i*w;return{previous:{x:r.x-O*(s.x-o.x),y:r.y-O*(s.y-o.y)},next:{x:r.x+N*(s.x-o.x),y:r.y+N*(s.y-o.y)}}}function ppt(t,n,e){let i=t.length,o,r,s,d,m,v=cL(t,0);for(let w=0;w!v.skip)),n.cubicInterpolationMode==="monotone")mpt(t,o);else{let v=i?t[t.length-1]:t[0];for(r=0,s=t.length;rt.ownerDocument.defaultView.getComputedStyle(t,null);function gpt(t,n){return GW(t).getPropertyValue(n)}var _pt=["top","right","bottom","left"];function w2(t,n,e){let i={};e=e?"-"+e:"";for(let o=0;o<4;o++){let r=_pt[o];i[r]=parseFloat(t[n+"-"+r+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}var ypt=(t,n,e)=>(t>0||n>0)&&(!e||!e.shadowRoot);function vpt(t,n){let e=t.touches,i=e&&e.length?e[0]:t,{offsetX:o,offsetY:r}=i,s=!1,d,m;if(ypt(o,r,t.target))d=o,m=r;else{let v=n.getBoundingClientRect();d=i.clientX-v.left,m=i.clientY-v.top,s=!0}return{x:d,y:m,box:s}}function xE(t,n){if("native"in t)return t;let{canvas:e,currentDevicePixelRatio:i}=n,o=GW(e),r=o.boxSizing==="border-box",s=w2(o,"padding"),d=w2(o,"border","width"),{x:m,y:v,box:w}=vpt(t,e),O=s.left+(w&&d.left),N=s.top+(w&&d.top),{width:V,height:$}=n;return r&&(V-=s.width+d.width,$-=s.height+d.height),{x:Math.round((m-O)/V*e.width/i),y:Math.round((v-N)/$*e.height/i)}}function bpt(t,n,e){let i,o;if(n===void 0||e===void 0){let r=t&&jW(t);if(!r)n=t.clientWidth,e=t.clientHeight;else{let s=r.getBoundingClientRect(),d=GW(r),m=w2(d,"border","width"),v=w2(d,"padding");n=s.width-v.width-m.width,e=s.height-v.height-m.height,i=RW(d.maxWidth,r,"clientWidth"),o=RW(d.maxHeight,r,"clientHeight")}}return{width:n,height:e,maxWidth:i||MW,maxHeight:o||MW}}var DW=t=>Math.round(t*10)/10;function OMe(t,n,e,i){let o=GW(t),r=w2(o,"margin"),s=RW(o.maxWidth,t,"clientWidth")||MW,d=RW(o.maxHeight,t,"clientHeight")||MW,m=bpt(t,n,e),{width:v,height:w}=m;if(o.boxSizing==="content-box"){let N=w2(o,"border","width"),V=w2(o,"padding");v-=V.width+N.width,w-=V.height+N.height}return v=Math.max(0,v-r.width),w=Math.max(0,i?v/i:w-r.height),v=DW(Math.min(v,s,m.maxWidth)),w=DW(Math.min(w,d,m.maxHeight)),v&&!w&&(w=DW(v/2)),(n!==void 0||e!==void 0)&&i&&m.height&&w>m.height&&(w=m.height,v=DW(Math.floor(w*i))),{width:v,height:w}}function sce(t,n,e){let i=n||1,o=Math.floor(t.height*i),r=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let s=t.canvas;return s.style&&(e||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==i||s.height!==o||s.width!==r?(t.currentDevicePixelRatio=i,s.height=o,s.width=r,t.ctx.setTransform(i,0,0,i,0,0),!0):!1}var RMe=(function(){let t=!1;try{let n={get passive(){return t=!0,!1}};HW()&&(window.addEventListener("test",null,n),window.removeEventListener("test",null,n))}catch{}return t})();function ace(t,n){let e=gpt(t,n),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function _E(t,n,e,i){return{x:t.x+e*(n.x-t.x),y:t.y+e*(n.y-t.y)}}function FMe(t,n,e,i){return{x:t.x+e*(n.x-t.x),y:i==="middle"?e<.5?t.y:n.y:i==="after"?e<1?t.y:n.y:e>0?n.y:t.y}}function PMe(t,n,e,i){let o={x:t.cp2x,y:t.cp2y},r={x:n.cp1x,y:n.cp1y},s=_E(t,o,e),d=_E(o,r,e),m=_E(r,n,e),v=_E(s,d,e),w=_E(d,m,e);return _E(v,w,e)}var Cpt=function(t,n){return{x(e){return t+t+n-e},setWidth(e){n=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},xpt=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,n){return t+n},leftForLtr(t,n){return t}}};function I2(t,n,e){return t?Cpt(n,e):xpt()}function lce(t,n){let e,i;(n==="ltr"||n==="rtl")&&(e=t.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",n,"important"),t.prevTextDirection=i)}function cce(t,n){n!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",n[0],n[1]))}function LMe(t){return t==="angle"?{between:hL,compare:Vut,normalize:dm}:{between:xx,compare:(n,e)=>n-e,normalize:n=>n}}function sMe({start:t,end:n,count:e,loop:i,style:o}){return{start:t%e,end:n%e,loop:i&&(n-t+1)%e===0,style:o}}function wpt(t,n,e){let{property:i,start:o,end:r}=e,{between:s,normalize:d}=LMe(i),m=n.length,{start:v,end:w,loop:O}=t,N,V;if(O){for(v+=m,w+=m,N=0,V=m;Nm(o,xe,te)&&d(o,xe)!==0,Re=()=>d(r,te)===0||m(r,xe,te),Se=()=>q||Fe(),ke=()=>!q||Re();for(let Xe=w,yt=w;Xe<=O;++Xe)fe=n[Xe%s],!fe.skip&&(te=v(fe[i]),te!==xe&&(q=m(te,o,r),W===null&&Se()&&(W=d(te,o)===0?Xe:yt),W!==null&&ke()&&($.push(sMe({start:W,end:Xe,loop:N,count:s,style:V})),W=null),yt=Xe,xe=te));return W!==null&&$.push(sMe({start:W,end:O,loop:N,count:s,style:V})),$}function uce(t,n){let e=[],i=t.segments;for(let o=0;oo&&t[r%n].skip;)r--;return r%=n,{start:o,end:r}}function Tpt(t,n,e,i){let o=t.length,r=[],s=n,d=t[n],m;for(m=n+1;m<=e;++m){let v=t[m%o];v.skip||v.stop?d.skip||(i=!1,r.push({start:n%o,end:(m-1)%o,loop:i}),n=s=v.stop?m:null):(s=m,d.skip&&(n=m)),d=v}return s!==null&&r.push({start:n%o,end:s%o,loop:i}),r}function NMe(t,n){let e=t.points,i=t.options.spanGaps,o=e.length;if(!o)return[];let r=!!t._loop,{start:s,end:d}=Spt(e,o,r,i);if(i===!0)return aMe(t,[{start:s,end:d,loop:r}],e,n);let m=dd({chart:n,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Kle.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(n=Date.now()){let e=0;this._charts.forEach((i,o)=>{if(!i.running||!i.items.length)return;let r=i.items,s=r.length-1,d=!1,m;for(;s>=0;--s)m=r[s],m._active?(m._total>i.duration&&(i.duration=m._total),m.tick(n),d=!0):(r[s]=r[r.length-1],r.pop());d&&(o.draw(),this._notify(o,i,n,"progress")),r.length||(i.running=!1,this._notify(o,i,n,"complete"),i.initial=!1),e+=r.length}),this._lastDate=n,e===0&&(this._running=!1)}_getAnims(n){let e=this._charts,i=e.get(n);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(n,i)),i}listen(n,e,i){this._getAnims(n).listeners[e].push(i)}add(n,e){!e||!e.length||this._getAnims(n).items.push(...e)}has(n){return this._getAnims(n).items.length>0}start(n){let e=this._charts.get(n);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,o)=>Math.max(i,o._duration),0),this._refresh())}running(n){if(!this._running)return!1;let e=this._charts.get(n);return!(!e||!e.running||!e.items.length)}stop(n){let e=this._charts.get(n);if(!e||!e.items.length)return;let i=e.items,o=i.length-1;for(;o>=0;--o)i[o].cancel();e.items=[],this._notify(n,e,Date.now(),"complete")}remove(n){return this._charts.delete(n)}},rS=new Sce,BMe="transparent",Apt={boolean(t,n,e){return e>.5?n:t},color(t,n,e){let i=Xle(t||BMe),o=i.valid&&Xle(n||BMe);return o&&o.valid?o.mix(i,e).hexString():n},number(t,n,e){return t+(n-t)*e}},Tce=class{constructor(n,e,i,o){let r=e[i];o=gL([n.to,o,r,n.from]);let s=gL([n.from,r,o]);this._active=!0,this._fn=n.fn||Apt[n.type||typeof s],this._easing=aL[n.easing]||aL.linear,this._start=Math.floor(Date.now()+(n.delay||0)),this._duration=this._total=Math.floor(n.duration),this._loop=!!n.loop,this._target=e,this._prop=i,this._from=s,this._to=o,this._promises=void 0}active(){return this._active}update(n,e,i){if(this._active){this._notify(!1);let o=this._target[this._prop],r=i-this._start,s=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(s,n.duration)),this._total+=r,this._loop=!!n.loop,this._to=gL([n.to,e,o,n.from]),this._from=gL([n.from,o,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(n){let e=n-this._start,i=this._duration,o=this._prop,r=this._from,s=this._loop,d=this._to,m;if(this._active=r!==d&&(s||e1?2-m:m,m=this._easing(Math.min(1,Math.max(0,m))),this._target[o]=this._fn(r,d,m)}wait(){let n=this._promises||(this._promises=[]);return new Promise((e,i)=>{n.push({res:e,rej:i})})}_notify(n){let e=n?"res":"rej",i=this._promises||[];for(let o=0;o{let r=n[o];if(!ll(r))return;let s={};for(let d of e)s[d]=r[d];(ld(r.properties)&&r.properties||[o]).forEach(d=>{(d===o||!i.has(d))&&i.set(d,s)})})}_animateOptions(n,e){let i=e.options,o=Mpt(n,i);if(!o)return[];let r=this._createAnimations(o,i);return i.$shared&&kpt(n.options.$animations,i).then(()=>{n.options=i},()=>{}),r}_createAnimations(n,e){let i=this._properties,o=[],r=n.$animations||(n.$animations={}),s=Object.keys(e),d=Date.now(),m;for(m=s.length-1;m>=0;--m){let v=s[m];if(v.charAt(0)==="$")continue;if(v==="options"){o.push(...this._animateOptions(n,e));continue}let w=e[v],O=r[v],N=i.get(v);if(O)if(N&&O.active()){O.update(N,w,d);continue}else O.cancel();if(!N||!N.duration){n[v]=w;continue}r[v]=O=new Tce(N,n,v,w),o.push(O)}return o}update(n,e){if(this._properties.size===0){Object.assign(n,e);return}let i=this._createAnimations(n,e);if(i.length)return rS.add(this._chart,i),!0}};function kpt(t,n){let e=[],i=Object.keys(n);for(let o=0;o0||!e&&r<0)return o.index}return null}function HMe(t,n){let{chart:e,_cachedMeta:i}=t,o=e._stacks||(e._stacks={}),{iScale:r,vScale:s,index:d}=i,m=r.axis,v=s.axis,w=Ppt(r,s,i),O=n.length,N;for(let V=0;Ve[i].axis===n).shift()}function Bpt(t,n){return oS(t,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function Vpt(t,n,e){return oS(t,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:e,index:n,mode:"default",type:"data"})}function Vz(t,n){let e=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){n=n||t._parsed;for(let o of n){let r=o._stacks;if(!r||r[i]===void 0||r[i][e]===void 0)return;delete r[i][e],r[i]._visualValues!==void 0&&r[i]._visualValues[e]!==void 0&&delete r[i]._visualValues[e]}}}var fce=t=>t==="reset"||t==="none",jMe=(t,n)=>n?t:Object.assign({},t),zpt=(t,n,e)=>t&&!n.hidden&&n._stacked&&{keys:BOe(e,!0),values:null},SE=(()=>{class t{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,i){this.chart=e,this._ctx=e.ctx,this.index=i,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=hce(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Vz(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,i=this._cachedMeta,o=this.getDataset(),r=(N,V,$,q)=>N==="x"?V:N==="r"?q:$,s=i.xAxisID=ia(o.xAxisID,mce(e,"x")),d=i.yAxisID=ia(o.yAxisID,mce(e,"y")),m=i.rAxisID=ia(o.rAxisID,mce(e,"r")),v=i.indexAxis,w=i.iAxisID=r(v,s,d,m),O=i.vAxisID=r(v,d,s,m);i.xScale=this.getScaleForId(s),i.yScale=this.getScaleForId(d),i.rScale=this.getScaleForId(m),i.iScale=this.getScaleForId(w),i.vScale=this.getScaleForId(O)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let i=this._cachedMeta;return e===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){let e=this._cachedMeta;this._data&&$le(this._data,this),e._stacked&&Vz(e)}_dataCheck(){let e=this.getDataset(),i=e.data||(e.data=[]),o=this._data;if(ll(i)){let r=this._cachedMeta;this._data=Fpt(i,r)}else if(o!==i){if(o){$le(o,this);let r=this._cachedMeta;Vz(r),r._parsed=[]}i&&Object.isExtensible(i)&&vMe(i,this),this._syncList=[],this._data=i}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let i=this._cachedMeta,o=this.getDataset(),r=!1;this._dataCheck();let s=i._stacked;i._stacked=hce(i.vScale,i),i.stack!==o.stack&&(r=!0,Vz(i),i.stack=o.stack),this._resyncElements(e),(r||s!==i._stacked)&&(HMe(this,i._parsed),i._stacked=hce(i.vScale,i))}configure(){let e=this.chart.config,i=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),i,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,i){let{_cachedMeta:o,_data:r}=this,{iScale:s,_stacked:d}=o,m=s.axis,v=e===0&&i===r.length?!0:o._sorted,w=e>0&&o._parsed[e-1],O,N,V;if(this._parsing===!1)o._parsed=r,o._sorted=!0,V=r;else{ld(r[e])?V=this.parseArrayData(o,r,e,i):ll(r[e])?V=this.parseObjectData(o,r,e,i):V=this.parsePrimitiveData(o,r,e,i);let $=()=>N[m]===null||w&&N[m]W||N=0;--V)if(!q()){this.updateRangeFromParsed(w,e,$,v);break}}return w}getAllParsedValues(e){let i=this._cachedMeta._parsed,o=[],r,s,d;for(r=0,s=i.length;r=0&&ethis.getContext(o,r,i),W=w.resolveNamedOptions(V,$,q,N);return W.$shared&&(W.$shared=v,s[d]=Object.freeze(jMe(W,v))),W}_resolveAnimations(e,i,o){let r=this.chart,s=this._cachedDataOpts,d=`animation-${i}`,m=s[d];if(m)return m;let v;if(r.options.animation!==!1){let O=this.chart.config,N=O.datasetAnimationScopeKeys(this._type,i),V=O.getOptionScopes(this.getDataset(),N);v=O.createResolver(V,this.getContext(e,o,i))}let w=new JW(r,v&&v.animations);return v&&v._cacheable&&(s[d]=Object.freeze(w)),w}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,i){return!i||fce(e)||this.chart._animationsDisabled}_getSharedOptions(e,i){let o=this.resolveDataElementOptions(e,i),r=this._sharedOptions,s=this.getSharedOptions(o),d=this.includeOptions(i,s)||s!==r;return this.updateSharedOptions(s,i,o),{sharedOptions:s,includeOptions:d}}updateElement(e,i,o,r){fce(r)?Object.assign(e,o):this._resolveAnimations(i,r).update(e,o)}updateSharedOptions(e,i,o){e&&!fce(i)&&this._resolveAnimations(void 0,i).update(e,o)}_setStyle(e,i,o,r){e.active=r;let s=this.getStyle(i,r);this._resolveAnimations(i,o,r).update(e,{options:!r&&this.getSharedOptions(s)||s})}removeHoverStyle(e,i,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,i,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){let i=this._data,o=this._cachedMeta.data;for(let[m,v,w]of this._syncList)this[m](v,w);this._syncList=[];let r=o.length,s=i.length,d=Math.min(s,r);d&&this.parse(0,d),s>r?this._insertElements(r,s-r,e):s{for(w.length+=i,m=w.length-1;m>=d;m--)w[m]=w[m-i]};for(v(s),m=e;mo-r))}return t._cache.$bar}function Hpt(t){let n=t.iScale,e=Upt(n,t.type),i=n._length,o,r,s,d,m=()=>{s===32767||s===-32768||(uL(d)&&(i=Math.min(i,Math.abs(s-d)||i)),d=s)};for(o=0,r=e.length;o0?o[t-1]:null,d=tMath.abs(d)&&(m=d,v=s),n[e.axis]=v,n._custom={barStart:m,barEnd:v,start:o,end:r,min:s,max:d}}function VOe(t,n,e,i){return ld(t)?$pt(t,n,e,i):n[e.axis]=e.parse(t,i),n}function GMe(t,n,e,i){let o=t.iScale,r=t.vScale,s=o.getLabels(),d=o===r,m=[],v,w,O,N;for(v=e,w=e+i;v=e?1:-1)}function Kpt(t){let n,e,i,o,r;return t.horizontal?(n=t.base>t.x,e="left",i="right"):(n=t.base{class t extends SE{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,i,o,r){return GMe(e,i,o,r)}parseArrayData(e,i,o,r){return GMe(e,i,o,r)}parseObjectData(e,i,o,r){let{iScale:s,vScale:d}=e,{xAxisKey:m="x",yAxisKey:v="y"}=this._parsing,w=s.axis==="x"?m:v,O=d.axis==="x"?m:v,N=[],V,$,q,W;for(V=o,$=o+r;V<$;++V)W=i[V],q={},q[s.axis]=s.parse(nS(W,w),V),N.push(VOe(nS(W,O),q,d,V));return N}updateRangeFromParsed(e,i,o,r){super.updateRangeFromParsed(e,i,o,r);let s=o._custom;s&&i===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){let i=this._cachedMeta,{iScale:o,vScale:r}=i,s=this.getParsed(e),d=s._custom,m=gce(d)?"["+d.start+", "+d.end+"]":""+r.getLabelForValue(s[r.axis]);return{label:""+o.getLabelForValue(s[o.axis]),value:m}}initialize(){this.enableOptionSharing=!0,super.initialize();let e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){let i=this._cachedMeta;this.updateElements(i.data,0,i.data.length,e)}updateElements(e,i,o,r){let s=r==="reset",{index:d,_cachedMeta:{vScale:m}}=this,v=m.getBasePixel(),w=m.isHorizontal(),O=this._getRuler(),{sharedOptions:N,includeOptions:V}=this._getSharedOptions(i,r);for(let $=i;$O.controller.options.grouped),s=o.options.stacked,d=[],m=this._cachedMeta.controller.getParsed(i),v=m&&m[o.axis],w=O=>{let N=O._parsed.find($=>$[o.axis]===v),V=N&&N[O.vScale.axis];if(tl(V)||isNaN(V))return!0};for(let O of r)if(!(i!==void 0&&w(O))&&((s===!1||d.indexOf(O.stack)===-1||s===void 0&&O.stack===void 0)&&d.push(O.stack),O.index===e))break;return d.length||d.push(void 0),d}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let e=this.chart.scales,i=this.chart.options.indexAxis;return Object.keys(e).filter(o=>e[o].axis===i).shift()}_getAxis(){let e={},i=this.getFirstScaleIdForIndexAxis();for(let o of this.chart.data.datasets)e[ia(this.chart.options.indexAxis==="x"?o.xAxisID:o.yAxisID,i)]=!0;return Object.keys(e)}_getStackIndex(e,i,o){let r=this._getStacks(e,o),s=i!==void 0?r.indexOf(i):-1;return s===-1?r.length-1:s}_getRuler(){let e=this.options,i=this._cachedMeta,o=i.iScale,r=[],s,d;for(s=0,d=i.data.length;s{class t extends SE{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,i,o,r){let s=super.parsePrimitiveData(e,i,o,r);for(let d=0;d=0;--o)i=Math.max(i,e[o].size(this.resolveDataElementOptions(o))/2);return i>0&&i}getLabelAndValue(e){let i=this._cachedMeta,o=this.chart.data.labels||[],{xScale:r,yScale:s}=i,d=this.getParsed(e),m=r.getLabelForValue(d.x),v=s.getLabelForValue(d.y),w=d._custom;return{label:o[e]||"",value:"("+m+", "+v+(w?", "+w:"")+")"}}update(e){let i=this._cachedMeta.data;this.updateElements(i,0,i.length,e)}updateElements(e,i,o,r){let s=r==="reset",{iScale:d,vScale:m}=this._cachedMeta,{sharedOptions:v,includeOptions:w}=this._getSharedOptions(i,r),O=d.axis,N=m.axis;for(let V=i;VhL(xe,d,m,!0)?1:Math.max(Fe,Fe*e,Re,Re*e),$=(xe,Fe,Re)=>hL(xe,d,m,!0)?-1:Math.min(Fe,Fe*e,Re,Re*e),q=V(0,v,O),W=V(gu,w,N),te=$(Hl,v,O),fe=$(Hl+gu,w,N);i=(q-te)/2,o=(W-fe)/2,r=-(q+te)/2,s=-(W+fe)/2}return{ratioX:i,ratioY:o,offsetX:r,offsetY:s}}var $ce=(()=>{class t extends SE{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let i=e.data;if(i.labels.length&&i.datasets.length){let{labels:{pointStyle:o,color:r}}=e.legend.options;return i.labels.map((s,d)=>{let v=e.getDatasetMeta(0).controller.getStyle(d);return{text:s,fillStyle:v.backgroundColor,strokeStyle:v.borderColor,fontColor:r,lineWidth:v.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(d),index:d}})}return[]}},onClick(e,i,o){o.chart.toggleDataVisibility(i.index),o.chart.update()}}}};constructor(e,i){super(e,i),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,i){let o=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=o;else{let s=v=>+o[v];if(ll(o[e])){let{key:v="value"}=this._parsing;s=w=>+nS(o[w],v)}let d,m;for(d=e,m=e+i;d0&&!isNaN(e)?cd*(Math.abs(e)/i):0}getLabelAndValue(e){let i=this._cachedMeta,o=this.chart,r=o.data.labels||[],s=mL(i._parsed[e],o.options.locale);return{label:r[e]||"",value:s}}getMaxBorderWidth(e){let i=0,o=this.chart,r,s,d,m,v;if(!e){for(r=0,s=o.data.datasets.length;r{class t extends SE{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){let i=this._cachedMeta,{dataset:o,data:r=[],_dataset:s}=i,d=this.chart._animationsDisabled,{start:m,count:v}=Yle(i,r,d);this._drawStart=m,this._drawCount=v,Qle(i)&&(m=0,v=r.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=r;let w=this.resolveDatasetElementOptions(e);this.options.showLine||(w.borderWidth=0),w.segment=this.options.segment,this.updateElement(o,void 0,{animated:!d,options:w},e),this.updateElements(r,m,v,e)}updateElements(e,i,o,r){let s=r==="reset",{iScale:d,vScale:m,_stacked:v,_dataset:w}=this._cachedMeta,{sharedOptions:O,includeOptions:N}=this._getSharedOptions(i,r),V=d.axis,$=m.axis,{spanGaps:q,segment:W}=this.options,te=T2(q)?q:Number.POSITIVE_INFINITY,fe=this.chart._animationsDisabled||s||r==="none",xe=i+o,Fe=e.length,Re=i>0&&this.getParsed(i-1);for(let Se=0;Se=xe){Xe.skip=!0;continue}let yt=this.getParsed(Se),We=tl(yt[$]),Et=Xe[V]=d.getPixelForValue(yt[V],Se),we=Xe[$]=s||We?m.getBasePixel():m.getPixelForValue(v?this.applyStack(m,yt,v):yt[$],Se);Xe.skip=isNaN(Et)||isNaN(we)||We,Xe.stop=Se>0&&Math.abs(yt[V]-Re[V])>te,W&&(Xe.parsed=yt,Xe.raw=w.data[Se]),N&&(Xe.options=O||this.resolveDataElementOptions(Se,ke.active?"active":r)),fe||this.updateElement(ke,Se,Xe,r),Re=yt}}getMaxOverflow(){let e=this._cachedMeta,i=e.dataset,o=i.options&&i.options.borderWidth||0,r=e.data||[];if(!r.length)return o;let s=r[0].size(this.resolveDataElementOptions(0)),d=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(o,s,d)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}return t})(),zOe=(()=>{class t extends SE{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let i=e.data;if(i.labels.length&&i.datasets.length){let{labels:{pointStyle:o,color:r}}=e.legend.options;return i.labels.map((s,d)=>{let v=e.getDatasetMeta(0).controller.getStyle(d);return{text:s,fillStyle:v.backgroundColor,strokeStyle:v.borderColor,fontColor:r,lineWidth:v.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(d),index:d}})}return[]}},onClick(e,i,o){o.chart.toggleDataVisibility(i.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,i){super(e,i),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let i=this._cachedMeta,o=this.chart,r=o.data.labels||[],s=mL(i._parsed[e].r,o.options.locale);return{label:r[e]||"",value:s}}parseObjectData(e,i,o,r){return rce.bind(this)(e,i,o,r)}update(e){let i=this._cachedMeta.data;this._updateRadius(),this.updateElements(i,0,i.length,e)}getMinMax(){let e=this._cachedMeta,i={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,r)=>{let s=this.getParsed(r).r;!isNaN(s)&&this.chart.getDataVisibility(r)&&(si.max&&(i.max=s))}),i}_updateRadius(){let e=this.chart,i=e.chartArea,o=e.options,r=Math.min(i.right-i.left,i.bottom-i.top),s=Math.max(r/2,0),d=Math.max(o.cutoutPercentage?s/100*o.cutoutPercentage:1,0),m=(s-d)/e.getVisibleDatasetCount();this.outerRadius=s-m*this.index,this.innerRadius=this.outerRadius-m}updateElements(e,i,o,r){let s=r==="reset",d=this.chart,v=d.options.animation,w=this._cachedMeta.rScale,O=w.xCenter,N=w.yCenter,V=w.getIndexAngle(0)-.5*Hl,$=V,q,W=360/this.countVisibleElements();for(q=0;q{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&i++}),i}_computeAngle(e,i,o){return this.chart.getDataVisibility(e)?by(this.resolveDataElementOptions(e,i).angle||o):0}}return t})(),tht=(()=>{class t extends $ce{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return t})(),iht=(()=>{class t extends SE{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){let i=this._cachedMeta.vScale,o=this.getParsed(e);return{label:i.getLabels()[e],value:""+i.getLabelForValue(o[i.axis])}}parseObjectData(e,i,o,r){return rce.bind(this)(e,i,o,r)}update(e){let i=this._cachedMeta,o=i.dataset,r=i.data||[],s=i.iScale.getLabels();if(o.points=r,e!=="resize"){let d=this.resolveDatasetElementOptions(e);this.options.showLine||(d.borderWidth=0);let m={_loop:!0,_fullLoop:s.length===r.length,options:d};this.updateElement(o,void 0,m,e)}this.updateElements(r,0,r.length,e)}updateElements(e,i,o,r){let s=this._cachedMeta.rScale,d=r==="reset";for(let m=i;m{class t extends SE{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(e){let i=this._cachedMeta,o=this.chart.data.labels||[],{xScale:r,yScale:s}=i,d=this.getParsed(e),m=r.getLabelForValue(d.x),v=s.getLabelForValue(d.y);return{label:o[e]||"",value:"("+m+", "+v+")"}}update(e){let i=this._cachedMeta,{data:o=[]}=i,r=this.chart._animationsDisabled,{start:s,count:d}=Yle(i,o,r);if(this._drawStart=s,this._drawCount=d,Qle(i)&&(s=0,d=o.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:m,_dataset:v}=i;m._chart=this.chart,m._datasetIndex=this.index,m._decimated=!!v._decimated,m.points=o;let w=this.resolveDatasetElementOptions(e);w.segment=this.options.segment,this.updateElement(m,void 0,{animated:!r,options:w},e)}else this.datasetElementType&&(delete i.dataset,this.datasetElementType=!1);this.updateElements(o,s,d,e)}addElements(){let{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,i,o,r){let s=r==="reset",{iScale:d,vScale:m,_stacked:v,_dataset:w}=this._cachedMeta,O=this.resolveDataElementOptions(i,r),N=this.getSharedOptions(O),V=this.includeOptions(r,N),$=d.axis,q=m.axis,{spanGaps:W,segment:te}=this.options,fe=T2(W)?W:Number.POSITIVE_INFINITY,xe=this.chart._animationsDisabled||s||r==="none",Fe=i>0&&this.getParsed(i-1);for(let Re=i;Re0&&Math.abs(ke[$]-Fe[$])>fe,te&&(Xe.parsed=ke,Xe.raw=w.data[Re]),V&&(Xe.options=N||this.resolveDataElementOptions(Re,Se.active?"active":r)),xe||this.updateElement(Se,Re,Xe,r),Fe=ke}this.updateSharedOptions(N,r,O)}getMaxOverflow(){let e=this._cachedMeta,i=e.data||[];if(!this.options.showLine){let m=0;for(let v=i.length-1;v>=0;--v)m=Math.max(m,i[v].size(this.resolveDataElementOptions(v))/2);return m>0&&m}let o=e.dataset,r=o.options&&o.options.borderWidth||0;if(!i.length)return r;let s=i[0].size(this.resolveDataElementOptions(0)),d=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,d)/2}}return t})(),oht=Object.freeze({__proto__:null,BarController:Zpt,BubbleController:Xpt,DoughnutController:$ce,LineController:eht,PieController:tht,PolarAreaController:zOe,RadarController:iht,ScatterController:nht});function E2(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Ice=class t{static override(n){Object.assign(t.prototype,n)}options;constructor(n){this.options=n||{}}init(){}formats(){return E2()}parse(){return E2()}format(){return E2()}add(){return E2()}diff(){return E2()}startOf(){return E2()}endOf(){return E2()}},rht={_date:Ice};function sht(t,n,e,i){let{controller:o,data:r,_sorted:s}=t,d=o._cachedMeta.iScale,m=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(d&&n===d.axis&&n!=="r"&&s&&r.length){let v=d._reversePixels?gMe:vx;if(i){if(o._sharedOptions){let w=r[0],O=typeof w.getRange=="function"&&w.getRange(n);if(O){let N=v(r,n,e-O),V=v(r,n,e+O);return{lo:N.lo,hi:V.hi}}}}else{let w=v(r,n,e);if(m){let{vScale:O}=o._cachedMeta,{_parsed:N}=t,V=N.slice(0,w.lo+1).reverse().findIndex(q=>!tl(q[O.axis]));w.lo-=Math.max(0,V);let $=N.slice(w.hi).findIndex(q=>!tl(q[O.axis]));w.hi+=Math.max(0,$)}return w}}return{lo:0,hi:r.length-1}}function Yz(t,n,e,i,o){let r=t.getSortedVisibleDatasetMetas(),s=e[n];for(let d=0,m=r.length;d{m[s]&&m[s](n[e],o)&&(r.push({element:m,datasetIndex:v,index:w}),d=d||m.inRange(n.x,n.y,o))}),i&&!d?[]:r}var dht={evaluateInteractionItems:Yz,modes:{index(t,n,e,i){let o=xE(n,t),r=e.axis||"x",s=e.includeInvisible||!1,d=e.intersect?_ce(t,o,r,i,s):yce(t,o,r,!1,i,s),m=[];return d.length?(t.getSortedVisibleDatasetMetas().forEach(v=>{let w=d[0].index,O=v.data[w];O&&!O.skip&&m.push({element:O,datasetIndex:v.index,index:w})}),m):[]},dataset(t,n,e,i){let o=xE(n,t),r=e.axis||"xy",s=e.includeInvisible||!1,d=e.intersect?_ce(t,o,r,i,s):yce(t,o,r,!1,i,s);if(d.length>0){let m=d[0].datasetIndex,v=t.getDatasetMeta(m).data;d=[];for(let w=0;we.pos===n)}function WMe(t,n){return t.filter(e=>UOe.indexOf(e.pos)===-1&&e.box.axis===n)}function Uz(t,n){return t.sort((e,i)=>{let o=n?i:e,r=n?e:i;return o.weight===r.weight?o.index-r.index:o.weight-r.weight})}function uht(t){let n=[],e,i,o,r,s,d;for(e=0,i=(t||[]).length;ev.box.fullSize),!0),i=Uz(zz(n,"left"),!0),o=Uz(zz(n,"right")),r=Uz(zz(n,"top"),!0),s=Uz(zz(n,"bottom")),d=WMe(n,"x"),m=WMe(n,"y");return{fullSize:e,leftAndTop:i.concat(r),rightAndBottom:o.concat(m).concat(s).concat(d),chartArea:zz(n,"chartArea"),vertical:i.concat(o).concat(m),horizontal:r.concat(s).concat(d)}}function YMe(t,n,e,i){return Math.max(t[e],n[e])+Math.max(t[i],n[i])}function HOe(t,n){t.top=Math.max(t.top,n.top),t.left=Math.max(t.left,n.left),t.bottom=Math.max(t.bottom,n.bottom),t.right=Math.max(t.right,n.right)}function fht(t,n,e,i){let{pos:o,box:r}=e,s=t.maxPadding;if(!ll(o)){e.size&&(t[o]-=e.size);let O=i[e.stack]||{size:0,count:1};O.size=Math.max(O.size,e.horizontal?r.height:r.width),e.size=O.size/O.count,t[o]+=e.size}r.getPadding&&HOe(s,r.getPadding());let d=Math.max(0,n.outerWidth-YMe(s,t,"left","right")),m=Math.max(0,n.outerHeight-YMe(s,t,"top","bottom")),v=d!==t.w,w=m!==t.h;return t.w=d,t.h=m,e.horizontal?{same:v,other:w}:{same:w,other:v}}function ght(t){let n=t.maxPadding;function e(i){let o=Math.max(n[i]-t[i],0);return t[i]+=o,o}t.y+=e("top"),t.x+=e("left"),e("right"),e("bottom")}function _ht(t,n){let e=n.maxPadding;function i(o){let r={left:0,top:0,right:0,bottom:0};return o.forEach(s=>{r[s]=Math.max(n[s],e[s])}),r}return i(t?["left","right"]:["top","bottom"])}function Gz(t,n,e,i){let o=[],r,s,d,m,v,w;for(r=0,s=t.length,v=0;r{typeof q.beforeLayout=="function"&&q.beforeLayout()});let w=m.reduce((q,W)=>W.box.options&&W.box.options.display===!1?q:q+1,0)||1,O=Object.freeze({outerWidth:n,outerHeight:e,padding:o,availableWidth:r,availableHeight:s,vBoxMaxWidth:r/2/w,hBoxMaxHeight:s/2}),N=Object.assign({},o);HOe(N,pm(i));let V=Object.assign({maxPadding:N,w:r,h:s,x:o.left,y:o.top},o),$=hht(m.concat(v),O);Gz(d.fullSize,V,O,$),Gz(m,V,O,$),Gz(v,V,O,$)&&Gz(m,V,O,$),ght(V),QMe(d.leftAndTop,V,O,$),V.x+=V.w,V.y+=V.h,QMe(d.rightAndBottom,V,O,$),t.chartArea={left:V.left,top:V.top,right:V.left+V.w,bottom:V.top+V.h,height:V.h,width:V.w},pc(d.chartArea,q=>{let W=q.box;Object.assign(W,t.chartArea),W.update(V.w,V.h,{left:0,top:0,right:0,bottom:0})})}},eY=class{acquireContext(n,e){}releaseContext(n){return!1}addEventListener(n,e,i){}removeEventListener(n,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(n,e,i,o){return e=Math.max(0,e||n.width),i=i||n.height,{width:e,height:Math.max(0,o?Math.floor(e/o):i)}}isAttached(n){return!0}updateConfig(n){}},Ece=class extends eY{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}},ZW="$chartjs",yht={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ZMe=t=>t===null||t==="";function vht(t,n){let e=t.style,i=t.getAttribute("height"),o=t.getAttribute("width");if(t[ZW]={initial:{height:i,width:o,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",ZMe(o)){let r=ace(t,"width");r!==void 0&&(t.width=r)}if(ZMe(i))if(t.style.height==="")t.height=t.width/(n||2);else{let r=ace(t,"height");r!==void 0&&(t.height=r)}return t}var jOe=RMe?{passive:!0}:!1;function bht(t,n,e){t&&t.addEventListener(n,e,jOe)}function Cht(t,n,e){t&&t.canvas&&t.canvas.removeEventListener(n,e,jOe)}function xht(t,n){let e=yht[t.type]||t.type,{x:i,y:o}=xE(t,n);return{type:e,chart:n,native:t,x:i!==void 0?i:null,y:o!==void 0?o:null}}function tY(t,n){for(let e of t)if(e===n||e.contains(n))return!0}function wht(t,n,e){let i=t.canvas,o=new MutationObserver(r=>{let s=!1;for(let d of r)s=s||tY(d.addedNodes,i),s=s&&!tY(d.removedNodes,i);s&&e()});return o.observe(document,{childList:!0,subtree:!0}),o}function Sht(t,n,e){let i=t.canvas,o=new MutationObserver(r=>{let s=!1;for(let d of r)s=s||tY(d.removedNodes,i),s=s&&!tY(d.addedNodes,i);s&&e()});return o.observe(document,{childList:!0,subtree:!0}),o}var qz=new Map,XMe=0;function GOe(){let t=window.devicePixelRatio;t!==XMe&&(XMe=t,qz.forEach((n,e)=>{e.currentDevicePixelRatio!==t&&n()}))}function Tht(t,n){qz.size||window.addEventListener("resize",GOe),qz.set(t,n)}function Iht(t){qz.delete(t),qz.size||window.removeEventListener("resize",GOe)}function Eht(t,n,e){let i=t.canvas,o=i&&jW(i);if(!o)return;let r=Wle((d,m)=>{let v=o.clientWidth;e(d,m),v{let m=d[0],v=m.contentRect.width,w=m.contentRect.height;v===0&&w===0||r(v,w)});return s.observe(o),Tht(t,r),s}function vce(t,n,e){e&&e.disconnect(),n==="resize"&&Iht(t)}function Dht(t,n,e){let i=t.canvas,o=Wle(r=>{t.ctx!==null&&e(xht(r,t))},t);return bht(i,n,o),o}var Dce=class extends eY{acquireContext(n,e){let i=n&&n.getContext&&n.getContext("2d");return i&&i.canvas===n?(vht(n,e),i):null}releaseContext(n){let e=n.canvas;if(!e[ZW])return!1;let i=e[ZW].initial;["height","width"].forEach(r=>{let s=i[r];tl(s)?e.removeAttribute(r):e.setAttribute(r,s)});let o=i.style||{};return Object.keys(o).forEach(r=>{e.style[r]=o[r]}),e.width=e.width,delete e[ZW],!0}addEventListener(n,e,i){this.removeEventListener(n,e);let o=n.$proxies||(n.$proxies={}),s={attach:wht,detach:Sht,resize:Eht}[e]||Dht;o[e]=s(n,e,i)}removeEventListener(n,e){let i=n.$proxies||(n.$proxies={}),o=i[e];if(!o)return;({attach:vce,detach:vce,resize:vce}[e]||Cht)(n,e,o),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,e,i,o){return OMe(n,e,i,o)}isAttached(n){let e=n&&jW(n);return!!(e&&e.isConnected)}};function Aht(t){return!HW()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Ece:Dce}var ab=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(n){let{x:e,y:i}=this.getProps(["x","y"],n);return{x:e,y:i}}hasValue(){return T2(this.x)&&T2(this.y)}getProps(n,e){let i=this.$animations;if(!e||!i)return this;let o={};return n.forEach(r=>{o[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),o}};function kht(t,n){let e=t.options.ticks,i=Mht(t),o=Math.min(e.maxTicksLimit||i,i),r=e.major.enabled?Rht(n):[],s=r.length,d=r[0],m=r[s-1],v=[];if(s>o)return Fht(n,v,r,s/o),v;let w=Oht(r,n,o);if(s>0){let O,N,V=s>1?Math.round((m-d)/(s-1)):null;for(qW(n,v,w,tl(V)?0:d-V,d),O=0,N=s-1;Oo)return m}return Math.max(o,1)}function Rht(t){let n=[],e,i;for(e=0,i=t.length;et==="left"?"right":t==="right"?"left":t,JMe=(t,n,e)=>n==="top"||n==="left"?t[n]+e:t[n]-e,eOe=(t,n)=>Math.min(n||t,t);function tOe(t,n){let e=[],i=t.length/n,o=t.length,r=0;for(;rs+d)))return m}function Bht(t,n){pc(t,e=>{let i=e.gc,o=i.length/2,r;if(o>n){for(r=0;ri?i:e,i=o&&e>i?e:i,{min:r_(e,r_(i,e)),max:r_(i,r_(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let n=this.chart.data;return this.options.labels||(this.isHorizontal()?n.xLabels:n.yLabels)||n.labels||[]}getLabelItems(n=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(n))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Kc(this.options.beforeUpdate,[this])}update(n,e,i){let{beginAtZero:o,grace:r,ticks:s}=this.options,d=s.sampleSize;this.beforeUpdate(),this.maxWidth=n,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=IMe(this,r,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let m=d=r||i<=1||!this.isHorizontal()){this.labelRotation=o;return}let w=this._getLabelSizes(),O=w.widest.width,N=w.highest.height,V=Wp(this.chart.width-O,0,this.maxWidth);d=n.offset?this.maxWidth/i:V/(i-1),O+6>d&&(d=V/(i-(n.offset?.5:1)),m=this.maxHeight-Hz(n.grid)-e.padding-iOe(n.title,this.chart.options.font),v=Math.sqrt(O*O+N*N),s=PW(Math.min(Math.asin(Wp((w.highest.height+6)/d,-1,1)),Math.asin(Wp(m/v,-1,1))-Math.asin(Wp(N/v,-1,1)))),s=Math.max(o,Math.min(r,s))),this.labelRotation=s}afterCalculateLabelRotation(){Kc(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Kc(this.options.beforeFit,[this])}fit(){let n={width:0,height:0},{chart:e,options:{ticks:i,title:o,grid:r}}=this,s=this._isVisible(),d=this.isHorizontal();if(s){let m=iOe(o,e.options.font);if(d?(n.width=this.maxWidth,n.height=Hz(r)+m):(n.height=this.maxHeight,n.width=Hz(r)+m),i.display&&this.ticks.length){let{first:v,last:w,widest:O,highest:N}=this._getLabelSizes(),V=i.padding*2,$=by(this.labelRotation),q=Math.cos($),W=Math.sin($);if(d){let te=i.mirror?0:W*O.width+q*N.height;n.height=Math.min(this.maxHeight,n.height+te+V)}else{let te=i.mirror?0:q*O.width+W*N.height;n.width=Math.min(this.maxWidth,n.width+te+V)}this._calculatePadding(v,w,W,q)}}this._handleMargins(),d?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=n.height):(this.width=n.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(n,e,i,o){let{ticks:{align:r,padding:s},position:d}=this.options,m=this.labelRotation!==0,v=d!=="top"&&this.axis==="x";if(this.isHorizontal()){let w=this.getPixelForTick(0)-this.left,O=this.right-this.getPixelForTick(this.ticks.length-1),N=0,V=0;m?v?(N=o*n.width,V=i*e.height):(N=i*n.height,V=o*e.width):r==="start"?V=e.width:r==="end"?N=n.width:r!=="inner"&&(N=n.width/2,V=e.width/2),this.paddingLeft=Math.max((N-w+s)*this.width/(this.width-w),0),this.paddingRight=Math.max((V-O+s)*this.width/(this.width-O),0)}else{let w=e.height/2,O=n.height/2;r==="start"?(w=0,O=n.height):r==="end"&&(w=e.height,O=0),this.paddingTop=w+s,this.paddingBottom=O+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Kc(this.options.afterFit,[this])}isHorizontal(){let{axis:n,position:e}=this.options;return e==="top"||e==="bottom"||n==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(n){this.beforeTickToLabelConversion(),this.generateTickLabels(n);let e,i;for(e=0,i=n.length;e({width:s[yt]||0,height:d[yt]||0});return{first:Xe(0),last:Xe(e-1),widest:Xe(Se),highest:Xe(ke),widths:s,heights:d}}getLabelForValue(n){return n}getPixelForValue(n,e){return NaN}getValueForPixel(n){}getPixelForTick(n){let e=this.ticks;return n<0||n>e.length-1?null:this.getPixelForValue(e[n].value)}getPixelForDecimal(n){this._reversePixels&&(n=1-n);let e=this._startPixel+n*this._length;return fMe(this._alignToPixels?vE(this.chart,e,0):e)}getDecimalForPixel(n){let e=(n-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:n,max:e}=this;return n<0&&e<0?e:n>0&&e>0?n:0}getContext(n){let e=this.ticks||[];if(n>=0&&nd*o?d/i:m/o:m*o0}_computeGridLineItems(n){let e=this.axis,i=this.chart,o=this.options,{grid:r,position:s,border:d}=o,m=r.offset,v=this.isHorizontal(),O=this.ticks.length+(m?1:0),N=Hz(r),V=[],$=d.setContext(this.getContext()),q=$.display?$.width:0,W=q/2,te=function(li){return vE(i,li,q)},fe,xe,Fe,Re,Se,ke,Xe,yt,We,Et,we,Qt;if(s==="top")fe=te(this.bottom),ke=this.bottom-N,yt=fe-W,Et=te(n.top)+W,Qt=n.bottom;else if(s==="bottom")fe=te(this.top),Et=n.top,Qt=te(n.bottom)-W,ke=fe+W,yt=this.top+N;else if(s==="left")fe=te(this.right),Se=this.right-N,Xe=fe-W,We=te(n.left)+W,we=n.right;else if(s==="right")fe=te(this.left),We=n.left,we=te(n.right)-W,Se=fe+W,Xe=this.left+N;else if(e==="x"){if(s==="center")fe=te((n.top+n.bottom)/2+.5);else if(ll(s)){let li=Object.keys(s)[0],zt=s[li];fe=te(this.chart.scales[li].getPixelForValue(zt))}Et=n.top,Qt=n.bottom,ke=fe+W,yt=ke+N}else if(e==="y"){if(s==="center")fe=te((n.left+n.right)/2);else if(ll(s)){let li=Object.keys(s)[0],zt=s[li];fe=te(this.chart.scales[li].getPixelForValue(zt))}Se=fe-W,Xe=Se-N,We=n.left,we=n.right}let Xi=ia(o.ticks.maxTicksLimit,O),ei=Math.max(1,Math.ceil(O/Xi));for(xe=0;xe0&&(Cn-=vn/2);break}Yi={left:Cn,top:Fo,width:vn+fn.width,height:tn+fn.height,color:ei.backdropColor}}W.push({label:Fe,font:yt,textOffset:we,options:{rotation:q,color:zt,strokeColor:Bi,strokeWidth:wt,textAlign:Lt,textBaseline:Qt,translation:[Re,Se],backdrop:Yi}})}return W}_getXAxisLabelAlignment(){let{position:n,ticks:e}=this.options;if(-by(this.labelRotation))return n==="top"?"left":"right";let o="center";return e.align==="start"?o="left":e.align==="end"?o="right":e.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(n){let{position:e,ticks:{crossAlign:i,mirror:o,padding:r}}=this.options,s=this._getLabelSizes(),d=n+r,m=s.widest.width,v,w;return e==="left"?o?(w=this.right+r,i==="near"?v="left":i==="center"?(v="center",w+=m/2):(v="right",w+=m)):(w=this.right-d,i==="near"?v="right":i==="center"?(v="center",w-=m/2):(v="left",w=this.left)):e==="right"?o?(w=this.left+r,i==="near"?v="right":i==="center"?(v="center",w-=m/2):(v="left",w-=m)):(w=this.left+d,i==="near"?v="left":i==="center"?(v="center",w+=m/2):(v="right",w=this.right)):v="right",{textAlign:v,x:w}}_computeLabelArea(){if(this.options.ticks.mirror)return;let n=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:n.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:n.width}}drawBackground(){let{ctx:n,options:{backgroundColor:e},left:i,top:o,width:r,height:s}=this;e&&(n.save(),n.fillStyle=e,n.fillRect(i,o,r,s),n.restore())}getLineWidthForValue(n){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let o=this.ticks.findIndex(r=>r.value===n);return o>=0?e.setContext(this.getContext(o)).lineWidth:0}drawGrid(n){let e=this.options.grid,i=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(n)),r,s,d=(m,v,w)=>{!w.width||!w.color||(i.save(),i.lineWidth=w.width,i.strokeStyle=w.color,i.setLineDash(w.borderDash||[]),i.lineDashOffset=w.borderDashOffset,i.beginPath(),i.moveTo(m.x,m.y),i.lineTo(v.x,v.y),i.stroke(),i.restore())};if(e.display)for(r=0,s=o.length;r{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:e,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(n){let e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",o=[],r,s;for(r=0,s=e.length;r{let i=e.split("."),o=i.pop(),r=[t].concat(i).join("."),s=n[e].split("."),d=s.pop(),m=s.join(".");xd.route(r,o,m,d)})}function $ht(t){return"id"in t&&"defaults"in t}var Ace=class{constructor(){this.controllers=new yL(SE,"datasets",!0),this.elements=new yL(ab,"elements"),this.plugins=new yL(Object,"plugins"),this.scales=new yL(A2,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...n){this._each("register",n)}remove(...n){this._each("unregister",n)}addControllers(...n){this._each("register",n,this.controllers)}addElements(...n){this._each("register",n,this.elements)}addPlugins(...n){this._each("register",n,this.plugins)}addScales(...n){this._each("register",n,this.scales)}getController(n){return this._get(n,this.controllers,"controller")}getElement(n){return this._get(n,this.elements,"element")}getPlugin(n){return this._get(n,this.plugins,"plugin")}getScale(n){return this._get(n,this.scales,"scale")}removeControllers(...n){this._each("unregister",n,this.controllers)}removeElements(...n){this._each("unregister",n,this.elements)}removePlugins(...n){this._each("unregister",n,this.plugins)}removeScales(...n){this._each("unregister",n,this.scales)}_each(n,e,i){[...e].forEach(o=>{let r=i||this._getRegistryForType(o);i||r.isForType(o)||r===this.plugins&&o.id?this._exec(n,r,o):pc(o,s=>{let d=i||this._getRegistryForType(s);this._exec(n,d,s)})})}_exec(n,e,i){let o=FW(n);Kc(i["before"+o],[],i),e[n](i),Kc(i["after"+o],[],i)}_getRegistryForType(n){for(let e=0;er.filter(d=>!s.some(m=>d.plugin.id===m.plugin.id));this._notify(o(e,i),n,"stop"),this._notify(o(i,e),n,"start")}};function qht(t){let n={},e=[],i=Object.keys(Sx.plugins.items);for(let r=0;r1&&nOe(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function oOe(t,n,e){if(e[n+"AxisID"]===t)return{axis:n}}function Jht(t,n){if(n.data&&n.data.datasets){let e=n.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(e.length)return oOe(t,"x",e[0])||oOe(t,"y",e[0])}return{}}function emt(t,n){let e=yE[t.type]||{scales:{}},i=n.scales||{},o=Mce(t.type,n),r=Object.create(null);return Object.keys(i).forEach(s=>{let d=i[s];if(!ll(d))return console.error(`Invalid scale configuration for scale: ${s}`);if(d._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);let m=Oce(s,d,Jht(s,t),xd.scales[d.type]),v=Zht(m,o),w=e.scales||{};r[s]=dL(Object.create(null),[{axis:m},d,w[m],w[v]])}),t.data.datasets.forEach(s=>{let d=s.type||t.type,m=s.indexAxis||Mce(d,n),w=(yE[d]||{}).scales||{};Object.keys(w).forEach(O=>{let N=Qht(O,m),V=s[N+"AxisID"]||N;r[V]=r[V]||Object.create(null),dL(r[V],[{axis:N},i[V],w[O]])})}),Object.keys(r).forEach(s=>{let d=r[s];dL(d,[xd.scales[d.type],xd.scale])}),r}function $Oe(t){let n=t.options||(t.options={});n.plugins=ia(n.plugins,{}),n.scales=emt(t,n)}function qOe(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function tmt(t){return t=t||{},t.data=qOe(t.data),$Oe(t),t}var rOe=new Map,KOe=new Set;function KW(t,n){let e=rOe.get(t);return e||(e=n(),rOe.set(t,e),KOe.add(e)),e}var jz=(t,n,e)=>{let i=nS(n,e);i!==void 0&&t.add(i)},Rce=class{constructor(n){this._config=tmt(n),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(n){this._config.type=n}get data(){return this._config.data}set data(n){this._config.data=qOe(n)}get options(){return this._config.options}set options(n){this._config.options=n}get plugins(){return this._config.plugins}update(){let n=this._config;this.clearCache(),$Oe(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return KW(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,e){return KW(`${n}.transition.${e}`,()=>[[`datasets.${n}.transitions.${e}`,`transitions.${e}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,e){return KW(`${n}-${e}`,()=>[[`datasets.${n}.elements.${e}`,`datasets.${n}`,`elements.${e}`,""]])}pluginScopeKeys(n){let e=n.id,i=this.type;return KW(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...n.additionalOptionScopes||[]]])}_cachedScopes(n,e){let i=this._scopeCache,o=i.get(n);return(!o||e)&&(o=new Map,i.set(n,o)),o}getOptionScopes(n,e,i){let{options:o,type:r}=this,s=this._cachedScopes(n,i),d=s.get(e);if(d)return d;let m=new Set;e.forEach(w=>{n&&(m.add(n),w.forEach(O=>jz(m,n,O))),w.forEach(O=>jz(m,o,O)),w.forEach(O=>jz(m,yE[r]||{},O)),w.forEach(O=>jz(m,xd,O)),w.forEach(O=>jz(m,BW,O))});let v=Array.from(m);return v.length===0&&v.push(Object.create(null)),KOe.has(e)&&s.set(e,v),v}chartOptionScopes(){let{options:n,type:e}=this;return[n,yE[e]||{},xd.datasets[e]||{},{type:e},xd,BW]}resolveNamedOptions(n,e,i,o=[""]){let r={$shared:!0},{resolver:s,subPrefixes:d}=sOe(this._resolverCache,n,o),m=s;if(nmt(s,e)){r.$shared=!1,i=tS(i)?i():i;let v=this.createResolver(n,i,d);m=S2(s,i,v)}for(let v of e)r[v]=m[v];return r}createResolver(n,e,i=[""],o){let{resolver:r}=sOe(this._resolverCache,n,i);return ll(e)?S2(r,e,void 0,o):r}};function sOe(t,n,e){let i=t.get(n);i||(i=new Map,t.set(n,i));let o=e.join(),r=i.get(o);return r||(r={resolver:UW(n,e),subPrefixes:e.filter(d=>!d.toLowerCase().includes("hover"))},i.set(o,r)),r}var imt=t=>ll(t)&&Object.getOwnPropertyNames(t).some(n=>tS(t[n]));function nmt(t,n){let{isScriptable:e,isIndexable:i}=ice(t);for(let o of n){let r=e(o),s=i(o),d=(s||r)&&t[o];if(r&&(tS(d)||imt(d))||s&&ld(d))return!0}return!1}var omt="4.5.0",rmt=["top","bottom","left","right","chartArea"];function aOe(t,n){return t==="top"||t==="bottom"||rmt.indexOf(t)===-1&&n==="x"}function lOe(t,n){return function(e,i){return e[t]===i[t]?e[n]-i[n]:e[t]-i[t]}}function cOe(t){let n=t.chart,e=n.options.animation;n.notifyPlugins("afterRender"),Kc(e&&e.onComplete,[t],n)}function smt(t){let n=t.chart,e=n.options.animation;Kc(e&&e.onProgress,[t],n)}function WOe(t){return HW()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var XW={},dOe=t=>{let n=WOe(t);return Object.values(XW).filter(e=>e.canvas===n).pop()};function amt(t,n,e){let i=Object.keys(t);for(let o of i){let r=+o;if(r>=n){let s=t[o];delete t[o],(e>0||r>n)&&(t[r+e]=s)}}}function lmt(t,n,e,i){return!e||t.type==="mouseout"?null:i?n:t}var lb=(()=>{class t{static defaults=xd;static instances=XW;static overrides=yE;static registry=Sx;static version=omt;static getChart=dOe;static register(...e){Sx.add(...e),uOe()}static unregister(...e){Sx.remove(...e),uOe()}constructor(e,i){let o=this.config=new Rce(i),r=WOe(e),s=dOe(r);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");let d=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Aht(r)),this.platform.updateConfig(o);let m=this.platform.acquireContext(r,d.aspectRatio),v=m&&m.canvas,w=v&&v.height,O=v&&v.width;if(this.id=cMe(),this.ctx=m,this.canvas=v,this.width=O,this.height=w,this._options=d,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new kce,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=bMe(N=>this.update(N),d.resizeDelay||0),this._dataChanges=[],XW[this.id]=this,!m||!v){console.error("Failed to create chart: can't acquire context from the given item");return}rS.listen(this,"complete",cOe),rS.listen(this,"progress",smt),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:i},width:o,height:r,_aspectRatio:s}=this;return tl(e)?i&&s?s:r?o/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Sx}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():sce(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Jle(this.canvas,this.ctx),this}stop(){return rS.stop(this),this}resize(e,i){rS.running(this)?this._resizeBeforeDraw={width:e,height:i}:this._resize(e,i)}_resize(e,i){let o=this.options,r=this.canvas,s=o.maintainAspectRatio&&this.aspectRatio,d=this.platform.getMaximumSize(r,e,i,s),m=o.devicePixelRatio||this.platform.getDevicePixelRatio(),v=this.width?"resize":"attach";this.width=d.width,this.height=d.height,this._aspectRatio=this.aspectRatio,sce(this,m,!0)&&(this.notifyPlugins("resize",{size:d}),Kc(o.onResize,[this,d],this),this.attached&&this._doResize(v)&&this.render())}ensureScalesHaveIDs(){let i=this.options.scales||{};pc(i,(o,r)=>{o.id=r})}buildOrUpdateScales(){let e=this.options,i=e.scales,o=this.scales,r=Object.keys(o).reduce((d,m)=>(d[m]=!1,d),{}),s=[];i&&(s=s.concat(Object.keys(i).map(d=>{let m=i[d],v=Oce(d,m),w=v==="r",O=v==="x";return{options:m,dposition:w?"chartArea":O?"bottom":"left",dtype:w?"radialLinear":O?"category":"linear"}}))),pc(s,d=>{let m=d.options,v=m.id,w=Oce(v,m),O=ia(m.type,d.dtype);(m.position===void 0||aOe(m.position,w)!==aOe(d.dposition))&&(m.position=d.dposition),r[v]=!0;let N=null;if(v in o&&o[v].type===O)N=o[v];else{let V=Sx.getScale(O);N=new V({id:v,type:O,ctx:this.ctx,chart:this}),o[N.id]=N}N.init(m,e)}),pc(r,(d,m)=>{d||delete o[m]}),pc(o,d=>{Jm.configure(this,d,d.options),Jm.addBox(this,d)})}_updateMetasets(){let e=this._metasets,i=this.data.datasets.length,o=e.length;if(e.sort((r,s)=>r.index-s.index),o>i){for(let r=i;ri.length&&delete this._stacks,e.forEach((o,r)=>{i.filter(s=>s===o._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){let e=[],i=this.data.datasets,o,r;for(this._removeUnreferencedMetasets(),o=0,r=i.length;o{this.getDatasetMeta(i).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let i=this.config;i.update();let o=this._options=i.createResolver(i.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;let s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let d=0;for(let w=0,O=this.data.datasets.length;w{w.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(lOe("z","_idx"));let{_active:m,_lastEvent:v}=this;v?this._eventHandler(v,!0):m.length&&this._updateHoverStyles(m,m,!0),this.render()}_updateScales(){pc(this.scales,e=>{Jm.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,i=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!zle(i,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,i=this._getUniformDataChanges()||[];for(let{method:o,start:r,count:s}of i){let d=o==="_removeElements"?-s:s;amt(e,r,d)}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let i=this.data.datasets.length,o=s=>new Set(e.filter(d=>d[0]===s).map((d,m)=>m+","+d.splice(1).join(","))),r=o(0);for(let s=1;ss.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Jm.update(this,this.width,this.height,e);let i=this.chartArea,o=i.width<=0||i.height<=0;this._layers=[],pc(this.boxes,r=>{o&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,s)=>{r._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let i=0,o=this.data.datasets.length;i=0;--i)this._drawDataset(e[i]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let i=this.ctx,o={meta:e,index:e.index,cancelable:!0},r=pce(this,e);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&Nz(i,r),e.controller.draw(),r&&Bz(i),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return bx(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,i,o,r){let s=dht.modes[i];return typeof s=="function"?s(this,e,o,r):[]}getDatasetMeta(e){let i=this.data.datasets[e],o=this._metasets,r=o.filter(s=>s&&s._dataset===i).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i&&i.order||0,index:e,_dataset:i,_parsed:[],_sorted:!1},o.push(r)),r}getContext(){return this.$context||(this.$context=oS(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let i=this.data.datasets[e];if(!i)return!1;let o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!i.hidden}setDatasetVisibility(e,i){let o=this.getDatasetMeta(e);o.hidden=!i}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,i,o){let r=o?"show":"hide",s=this.getDatasetMeta(e),d=s.controller._resolveAnimations(void 0,r);uL(i)?(s.data[i].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),d.update(s,{visible:o}),this.update(m=>m.datasetIndex===e?r:void 0))}hide(e,i){this._updateVisibility(e,i,!1)}show(e,i){this._updateVisibility(e,i,!0)}_destroyDatasetMeta(e){let i=this._metasets[e];i&&i.controller&&i.controller._destroy(),delete this._metasets[e]}_stop(){let e,i;for(this.stop(),rS.remove(this),e=0,i=this.data.datasets.length;e{i.addEventListener(this,s,d),e[s]=d},r=(s,d,m)=>{s.offsetX=d,s.offsetY=m,this._eventHandler(s)};pc(this.options.events,s=>o(s,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,i=this.platform,o=(v,w)=>{i.addEventListener(this,v,w),e[v]=w},r=(v,w)=>{e[v]&&(i.removeEventListener(this,v,w),delete e[v])},s=(v,w)=>{this.canvas&&this.resize(v,w)},d,m=()=>{r("attach",m),this.attached=!0,this.resize(),o("resize",s),o("detach",d)};d=()=>{this.attached=!1,r("resize",s),this._stop(),this._resize(0,0),o("attach",m)},i.isAttached(this.canvas)?m():d()}unbindEvents(){pc(this._listeners,(e,i)=>{this.platform.removeEventListener(this,i,e)}),this._listeners={},pc(this._responsiveListeners,(e,i)=>{this.platform.removeEventListener(this,i,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,i,o){let r=o?"set":"remove",s,d,m,v;for(i==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+r+"DatasetHoverStyle"]()),m=0,v=e.length;m{let m=this.getDatasetMeta(s);if(!m)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:m.data[d],index:d}});!Pz(o,i)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,i))}notifyPlugins(e,i,o){return this._plugins.notify(this,e,i,o)}isPluginEnabled(e){return this._plugins._cache.filter(i=>i.plugin.id===e).length===1}_updateHoverStyles(e,i,o){let r=this.options.hover,s=(v,w)=>v.filter(O=>!w.some(N=>O.datasetIndex===N.datasetIndex&&O.index===N.index)),d=s(i,e),m=o?e:s(e,i);d.length&&this.updateHoverStyle(d,r.mode,!1),m.length&&r.mode&&this.updateHoverStyle(m,r.mode,!0)}_eventHandler(e,i){let o={event:e,replay:i,cancelable:!0,inChartArea:this.isPointInArea(e)},r=d=>(d.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,r)===!1)return;let s=this._handleEvent(e,i,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,r),(s||o.changed)&&this.render(),this}_handleEvent(e,i,o){let{_active:r=[],options:s}=this,d=i,m=this._getActiveElements(e,r,o,d),v=pMe(e),w=lmt(e,this._lastEvent,o,v);o&&(this._lastEvent=null,Kc(s.onHover,[e,m,this],this),v&&Kc(s.onClick,[e,m,this],this));let O=!Pz(m,r);return(O||i)&&(this._active=m,this._updateHoverStyles(m,r,i)),this._lastEvent=w,O}_getActiveElements(e,i,o,r){if(e.type==="mouseout")return[];if(!o)return i;let s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,r)}}return t})();function uOe(){return pc(lb.instances,t=>t._plugins.invalidate())}function cmt(t,n,e){let{startAngle:i,x:o,y:r,outerRadius:s,innerRadius:d,options:m}=n,{borderWidth:v,borderJoinStyle:w}=m,O=Math.min(v/s,dm(i-e));if(t.beginPath(),t.arc(o,r,s-v/2,i+O/2,e-O/2),d>0){let N=Math.min(v/d,dm(i-e));t.arc(o,r,d+v/2,e-N/2,i+N/2,!0)}else{let N=Math.min(v/2,s*dm(i-e));if(w==="round")t.arc(o,r,N,e-Hl/2,i+Hl/2,!0);else if(w==="bevel"){let V=2*N*N,$=-V*Math.cos(e+Hl/2)+o,q=-V*Math.sin(e+Hl/2)+r,W=V*Math.cos(i+Hl/2)+o,te=V*Math.sin(i+Hl/2)+r;t.lineTo($,q),t.lineTo(W,te)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function dmt(t,n,e){let{startAngle:i,pixelMargin:o,x:r,y:s,outerRadius:d,innerRadius:m}=n,v=o/d;t.beginPath(),t.arc(r,s,d,i-v,e+v),m>o?(v=o/m,t.arc(r,s,m,e+v,i-v,!0)):t.arc(r,s,o,e+gu,i-gu),t.closePath(),t.clip()}function umt(t){return zW(t,["outerStart","outerEnd","innerStart","innerEnd"])}function pmt(t,n,e,i){let o=umt(t.options.borderRadius),r=(e-n)/2,s=Math.min(r,i*n/2),d=m=>{let v=(e-Math.min(r,m))*i/2;return Wp(m,0,Math.min(r,v))};return{outerStart:d(o.outerStart),outerEnd:d(o.outerEnd),innerStart:Wp(o.innerStart,0,s),innerEnd:Wp(o.innerEnd,0,s)}}function _L(t,n,e,i){return{x:e+t*Math.cos(n),y:i+t*Math.sin(n)}}function iY(t,n,e,i,o,r){let{x:s,y:d,startAngle:m,pixelMargin:v,innerRadius:w}=n,O=Math.max(n.outerRadius+i+e-v,0),N=w>0?w+i+e+v:0,V=0,$=o-m;if(i){let ei=w>0?w-i:0,li=O>0?O-i:0,zt=(ei+li)/2,Bi=zt!==0?$*zt/(zt+i):$;V=($-Bi)/2}let q=Math.max(.001,$*O-e/Hl)/O,W=($-q)/2,te=m+W+V,fe=o-W-V,{outerStart:xe,outerEnd:Fe,innerStart:Re,innerEnd:Se}=pmt(n,N,O,fe-te),ke=O-xe,Xe=O-Fe,yt=te+xe/ke,We=fe-Fe/Xe,Et=N+Re,we=N+Se,Qt=te+Re/Et,Xi=fe-Se/we;if(t.beginPath(),r){let ei=(yt+We)/2;if(t.arc(s,d,O,yt,ei),t.arc(s,d,O,ei,We),Fe>0){let wt=_L(Xe,We,s,d);t.arc(wt.x,wt.y,Fe,We,fe+gu)}let li=_L(we,fe,s,d);if(t.lineTo(li.x,li.y),Se>0){let wt=_L(we,Xi,s,d);t.arc(wt.x,wt.y,Se,fe+gu,Xi+Math.PI)}let zt=(fe-Se/N+(te+Re/N))/2;if(t.arc(s,d,N,fe-Se/N,zt,!0),t.arc(s,d,N,zt,te+Re/N,!0),Re>0){let wt=_L(Et,Qt,s,d);t.arc(wt.x,wt.y,Re,Qt+Math.PI,te-gu)}let Bi=_L(ke,te,s,d);if(t.lineTo(Bi.x,Bi.y),xe>0){let wt=_L(ke,yt,s,d);t.arc(wt.x,wt.y,xe,te-gu,yt)}}else{t.moveTo(s,d);let ei=Math.cos(yt)*O+s,li=Math.sin(yt)*O+d;t.lineTo(ei,li);let zt=Math.cos(We)*O+s,Bi=Math.sin(We)*O+d;t.lineTo(zt,Bi)}t.closePath()}function hmt(t,n,e,i,o){let{fullCircles:r,startAngle:s,circumference:d}=n,m=n.endAngle;if(r){iY(t,n,e,i,m,o);for(let v=0;v=Hl&&V===0&&w!=="miter"&&cmt(t,n,q),r||(iY(t,n,e,i,q,o),t.stroke())}var Fce=class extends ab{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:n=>n!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(n){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,e,i){let o=this.getProps(["x","y"],i),{angle:r,distance:s}=Gle(o,{x:n,y:e}),{startAngle:d,endAngle:m,innerRadius:v,outerRadius:w,circumference:O}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),N=(this.options.spacing+this.options.borderWidth)/2,V=ia(O,m-d),$=hL(r,d,m)&&d!==m,q=V>=cd||$,W=xx(s,v+N,w+N);return q&&W}getCenterPoint(n){let{x:e,y:i,startAngle:o,endAngle:r,innerRadius:s,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:m,spacing:v}=this.options,w=(o+r)/2,O=(s+d+v+m)/2;return{x:e+Math.cos(w)*O,y:i+Math.sin(w)*O}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){let{options:e,circumference:i}=this,o=(e.offset||0)/4,r=(e.spacing||0)/2,s=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=i>cd?Math.floor(i/cd):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();let d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*o,Math.sin(d)*o);let m=1-Math.sin(Math.min(Hl,i||0)),v=o*m;n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,hmt(n,this,v,r,s),mmt(n,this,v,r,s),n.restore()}};function YOe(t,n,e=n){t.lineCap=ia(e.borderCapStyle,n.borderCapStyle),t.setLineDash(ia(e.borderDash,n.borderDash)),t.lineDashOffset=ia(e.borderDashOffset,n.borderDashOffset),t.lineJoin=ia(e.borderJoinStyle,n.borderJoinStyle),t.lineWidth=ia(e.borderWidth,n.borderWidth),t.strokeStyle=ia(e.borderColor,n.borderColor)}function fmt(t,n,e){t.lineTo(e.x,e.y)}function gmt(t){return t.stepped?SMe:t.tension||t.cubicInterpolationMode==="monotone"?TMe:fmt}function QOe(t,n,e={}){let i=t.length,{start:o=0,end:r=i-1}=e,{start:s,end:d}=n,m=Math.max(o,s),v=Math.min(r,d),w=od&&r>d;return{count:i,start:m,loop:n.loop,ilen:v(s+(v?d-Fe:Fe))%r,xe=()=>{q!==W&&(t.lineTo(w,W),t.lineTo(w,q),t.lineTo(w,te))};for(m&&(V=o[fe(0)],t.moveTo(V.x,V.y)),N=0;N<=d;++N){if(V=o[fe(N)],V.skip)continue;let Fe=V.x,Re=V.y,Se=Fe|0;Se===$?(ReW&&(W=Re),w=(O*w+Fe)/++O):(xe(),t.lineTo(Fe,Re),$=Se,O=0,q=W=Re),te=Re}xe()}function Pce(t){let n=t.options,e=n.borderDash&&n.borderDash.length;return!t._decimated&&!t._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!e?ymt:_mt}function vmt(t){return t.stepped?FMe:t.tension||t.cubicInterpolationMode==="monotone"?PMe:_E}function bmt(t,n,e,i){let o=n._path;o||(o=n._path=new Path2D,n.path(o,e,i)&&o.closePath()),YOe(t,n.options),t.stroke(o)}function Cmt(t,n,e,i){let{segments:o,options:r}=n,s=Pce(n);for(let d of o)YOe(t,r,d.style),t.beginPath(),s(t,n,d,{start:e,end:e+i-1})&&t.closePath(),t.stroke()}var xmt=typeof Path2D=="function";function wmt(t,n,e,i){xmt&&!n.options.segment?bmt(t,n,e,i):Cmt(t,n,e,i)}var rY=(()=>{class t extends ab{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,i){let o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){let r=o.spanGaps?this._loop:this._fullLoop;MMe(this._points,o,e,r,i),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=NMe(this,this.options.segment))}first(){let e=this.segments,i=this.points;return e.length&&i[e[0].start]}last(){let e=this.segments,i=this.points,o=e.length;return o&&i[e[o-1].end]}interpolate(e,i){let o=this.options,r=e[i],s=this.points,d=uce(this,{property:i,start:r,end:r});if(!d.length)return;let m=[],v=vmt(o),w,O;for(w=0,O=d.length;w{class t extends ab{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,o){let r=this.options,{x:s,y:d}=this.getProps(["x","y"],o);return Math.pow(e-s,2)+Math.pow(i-d,2)t.replace("rgb(","rgba(").replace(")",", 0.5)"));function XOe(t){return Nce[t%Nce.length]}function JOe(t){return hOe[t%hOe.length]}function Mmt(t,n){return t.borderColor=XOe(n),t.backgroundColor=JOe(n),++n}function Omt(t,n){return t.backgroundColor=t.data.map(()=>XOe(n++)),n}function Rmt(t,n){return t.backgroundColor=t.data.map(()=>JOe(n++)),n}function Fmt(t){let n=0;return(e,i)=>{let o=t.getDatasetMeta(i).controller;o instanceof $ce?n=Omt(e,n):o instanceof zOe?n=Rmt(e,n):o&&(n=Mmt(e,n))}}function mOe(t){let n;for(n in t)if(t[n].borderColor||t[n].backgroundColor)return!0;return!1}function Pmt(t){return t&&(t.borderColor||t.backgroundColor)}function Lmt(){return xd.borderColor!=="rgba(0,0,0,0.1)"||xd.backgroundColor!=="rgba(0,0,0,0.1)"}var Nmt={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,n,e){if(!e.enabled)return;let{data:{datasets:i},options:o}=t.config,{elements:r}=o,s=mOe(i)||Pmt(o)||r&&mOe(r)||Lmt();if(!e.forceOverride&&s)return;let d=Fmt(t);i.forEach(d)}};function Bmt(t,n,e,i,o){let r=o.samples||i;if(r>=e)return t.slice(n,n+e);let s=[],d=(e-2)/(r-2),m=0,v=n+e-1,w=n,O,N,V,$,q;for(s[m++]=t[w],O=0;OV&&(V=$,N=t[fe],q=fe);s[m++]=N,w=q}return s[m++]=t[v],s}function Vmt(t,n,e,i){let o=0,r=0,s,d,m,v,w,O,N,V,$,q,W=[],te=n+e-1,fe=t[n].x,Fe=t[te].x-fe;for(s=n;sq&&(q=v,N=s),o=(r*o+d.x)/++r;else{let Se=s-1;if(!tl(O)&&!tl(N)){let ke=Math.min(O,N),Xe=Math.max(O,N);ke!==V&&ke!==Se&&W.push(mt(be({},t[ke]),{x:o})),Xe!==V&&Xe!==Se&&W.push(mt(be({},t[Xe]),{x:o}))}s>0&&Se!==V&&W.push(t[Se]),W.push(d),w=Re,r=0,$=q=v,O=N=V=s}}return W}function eRe(t){if(t._decimated){let n=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:n})}}function fOe(t){t.data.datasets.forEach(n=>{eRe(n)})}function zmt(t,n){let e=n.length,i=0,o,{iScale:r}=t,{min:s,max:d,minDefined:m,maxDefined:v}=r.getUserBounds();return m&&(i=Wp(vx(n,r.axis,s).lo,0,e-1)),v?o=Wp(vx(n,r.axis,d).hi+1,i,e)-i:o=e-i,{start:i,count:o}}var Umt={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,n,e)=>{if(!e.enabled){fOe(t);return}let i=t.width;t.data.datasets.forEach((o,r)=>{let{_data:s,indexAxis:d}=o,m=t.getDatasetMeta(r),v=s||o.data;if(gL([d,t.options.indexAxis])==="y"||!m.controller.supportsDecimation)return;let w=t.scales[m.xAxisID];if(w.type!=="linear"&&w.type!=="time"||t.options.parsing)return;let{start:O,count:N}=zmt(m,v),V=e.threshold||4*i;if(N<=V){eRe(o);return}tl(s)&&(o._data=v,delete o.data,Object.defineProperty(o,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(q){this._data=q}}));let $;switch(e.algorithm){case"lttb":$=Bmt(v,O,N,i,e);break;case"min-max":$=Vmt(v,O,N,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}o._decimated=$})},destroy(t){fOe(t)}};function Hmt(t,n,e){let i=t.segments,o=t.points,r=n.points,s=[];for(let d of i){let{start:m,end:v}=d;v=sY(m,v,o);let w=Bce(e,o[m],o[v],d.loop);if(!n.segments){s.push({source:d,target:w,start:o[m],end:o[v]});continue}let O=uce(n,w);for(let N of O){let V=Bce(e,r[N.start],r[N.end],N.loop),$=dce(d,o,V);for(let q of $)s.push({source:q,target:N,start:{[e]:gOe(w,V,"start",Math.max)},end:{[e]:gOe(w,V,"end",Math.min)}})}}return s}function Bce(t,n,e,i){if(i)return;let o=n[t],r=e[t];return t==="angle"&&(o=dm(o),r=dm(r)),{property:t,start:o,end:r}}function jmt(t,n){let{x:e=null,y:i=null}=t||{},o=n.points,r=[];return n.segments.forEach(({start:s,end:d})=>{d=sY(s,d,o);let m=o[s],v=o[d];i!==null?(r.push({x:m.x,y:i}),r.push({x:v.x,y:i})):e!==null&&(r.push({x:e,y:m.y}),r.push({x:e,y:v.y}))}),r}function sY(t,n,e){for(;n>t;n--){let i=e[n];if(!isNaN(i.x)&&!isNaN(i.y))break}return n}function gOe(t,n,e,i){return t&&n?i(t[e],n[e]):t?t[e]:n?n[e]:0}function tRe(t,n){let e=[],i=!1;return ld(t)?(i=!0,e=t):e=jmt(t,n),e.length?new rY({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function _Oe(t){return t&&t.fill!==!1}function Gmt(t,n,e){let o=t[n].fill,r=[n],s;if(!e)return o;for(;o!==!1&&r.indexOf(o)===-1;){if(!tu(o))return o;if(s=t[o],!s)return!1;if(s.visible)return o;r.push(o),o=s.fill}return!1}function $mt(t,n,e){let i=Ymt(t);if(ll(i))return isNaN(i.value)?!1:i;let o=parseFloat(i);return tu(o)&&Math.floor(o)===o?qmt(i[0],n,o,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function qmt(t,n,e,i){return(t==="-"||t==="+")&&(e=n+e),e===n||e<0||e>=i?!1:e}function Kmt(t,n){let e=null;return t==="start"?e=n.bottom:t==="end"?e=n.top:ll(t)?e=n.getPixelForValue(t.value):n.getBasePixel&&(e=n.getBasePixel()),e}function Wmt(t,n,e){let i;return t==="start"?i=e:t==="end"?i=n.options.reverse?n.min:n.max:ll(t)?i=t.value:i=n.getBaseValue(),i}function Ymt(t){let n=t.options,e=n.fill,i=ia(e&&e.target,e);return i===void 0&&(i=!!n.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Qmt(t){let{scale:n,index:e,line:i}=t,o=[],r=i.segments,s=i.points,d=Zmt(n,e);d.push(tRe({x:null,y:n.bottom},i));for(let m=0;m=0;--s){let d=o[s].$filler;d&&(d.line.updateControlPoints(r,d.axis),i&&d.fill&&xce(t.ctx,d,r))}},beforeDatasetsDraw(t,n,e){if(e.drawTime!=="beforeDatasetsDraw")return;let i=t.getSortedVisibleDatasetMetas();for(let o=i.length-1;o>=0;--o){let r=i[o].$filler;_Oe(r)&&xce(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,n,e){let i=n.meta.$filler;!_Oe(i)||e.drawTime!=="beforeDatasetDraw"||xce(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},COe=(t,n)=>{let{boxHeight:e=n,boxWidth:i=n}=t;return t.usePointStyle&&(e=Math.min(e,n),i=t.pointStyleWidth||Math.min(i,n)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(n,e)}},lft=(t,n)=>t!==null&&n!==null&&t.datasetIndex===n.datasetIndex&&t.index===n.index,oY=class extends ab{constructor(n){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=n.chart,this.options=n.options,this.ctx=n.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(n,e,i){this.maxWidth=n,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let n=this.options.labels||{},e=Kc(n.generateLabels,[this.chart],this)||[];n.filter&&(e=e.filter(i=>n.filter(i,this.chart.data))),n.sort&&(e=e.sort((i,o)=>n.sort(i,o,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:n,ctx:e}=this;if(!n.display){this.width=this.height=0;return}let i=n.labels,o=gp(i.font),r=o.size,s=this._computeTitleHeight(),{boxWidth:d,itemHeight:m}=COe(i,r),v,w;e.font=o.string,this.isHorizontal()?(v=this.maxWidth,w=this._fitRows(s,r,d,m)+10):(w=this.maxHeight,v=this._fitCols(s,o,d,m)+10),this.width=Math.min(v,n.maxWidth||this.maxWidth),this.height=Math.min(w,n.maxHeight||this.maxHeight)}_fitRows(n,e,i,o){let{ctx:r,maxWidth:s,options:{labels:{padding:d}}}=this,m=this.legendHitBoxes=[],v=this.lineWidths=[0],w=o+d,O=n;r.textAlign="left",r.textBaseline="middle";let N=-1,V=-w;return this.legendItems.forEach(($,q)=>{let W=i+e/2+r.measureText($.text).width;(q===0||v[v.length-1]+W+2*d>s)&&(O+=w,v[v.length-(q>0?0:1)]=0,V+=w,N++),m[q]={left:0,top:V,row:N,width:W,height:o},v[v.length-1]+=W+d}),O}_fitCols(n,e,i,o){let{ctx:r,maxHeight:s,options:{labels:{padding:d}}}=this,m=this.legendHitBoxes=[],v=this.columnSizes=[],w=s-n,O=d,N=0,V=0,$=0,q=0;return this.legendItems.forEach((W,te)=>{let{itemWidth:fe,itemHeight:xe}=cft(i,e,r,W,o);te>0&&V+xe+2*d>w&&(O+=N+d,v.push({width:N,height:V}),$+=N+d,q++,N=V=0),m[te]={left:$,top:V,col:q,width:fe,height:xe},N=Math.max(N,fe),V+=xe+d}),O+=N,v.push({width:N,height:V}),O}adjustHitBoxes(){if(!this.options.display)return;let n=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:o},rtl:r}}=this,s=I2(r,this.left,this.width);if(this.isHorizontal()){let d=0,m=um(i,this.left+o,this.right-this.lineWidths[d]);for(let v of e)d!==v.row&&(d=v.row,m=um(i,this.left+o,this.right-this.lineWidths[d])),v.top+=this.top+n+o,v.left=s.leftForLtr(s.x(m),v.width),m+=v.width+o}else{let d=0,m=um(i,this.top+n+o,this.bottom-this.columnSizes[d].height);for(let v of e)v.col!==d&&(d=v.col,m=um(i,this.top+n+o,this.bottom-this.columnSizes[d].height)),v.top=m,v.left+=this.left+o,v.left=s.leftForLtr(s.x(v.left),v.width),m+=v.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let n=this.ctx;Nz(n,this),this._draw(),Bz(n)}}_draw(){let{options:n,columnSizes:e,lineWidths:i,ctx:o}=this,{align:r,labels:s}=n,d=xd.color,m=I2(n.rtl,this.left,this.width),v=gp(s.font),{padding:w}=s,O=v.size,N=O/2,V;this.drawTitle(),o.textAlign=m.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=v.string;let{boxWidth:$,boxHeight:q,itemHeight:W}=COe(s,O),te=function(Se,ke,Xe){if(isNaN($)||$<=0||isNaN(q)||q<0)return;o.save();let yt=ia(Xe.lineWidth,1);if(o.fillStyle=ia(Xe.fillStyle,d),o.lineCap=ia(Xe.lineCap,"butt"),o.lineDashOffset=ia(Xe.lineDashOffset,0),o.lineJoin=ia(Xe.lineJoin,"miter"),o.lineWidth=yt,o.strokeStyle=ia(Xe.strokeStyle,d),o.setLineDash(ia(Xe.lineDash,[])),s.usePointStyle){let We={radius:q*Math.SQRT2/2,pointStyle:Xe.pointStyle,rotation:Xe.rotation,borderWidth:yt},Et=m.xPlus(Se,$/2),we=ke+N;ece(o,We,Et,we,s.pointStyleWidth&&$)}else{let We=ke+Math.max((O-q)/2,0),Et=m.leftForLtr(Se,$),we=CE(Xe.borderRadius);o.beginPath(),Object.values(we).some(Qt=>Qt!==0)?fL(o,{x:Et,y:We,w:$,h:q,radius:we}):o.rect(Et,We,$,q),o.fill(),yt!==0&&o.stroke()}o.restore()},fe=function(Se,ke,Xe){bE(o,Xe.text,Se,ke+W/2,v,{strikethrough:Xe.hidden,textAlign:m.textAlign(Xe.textAlign)})},xe=this.isHorizontal(),Fe=this._computeTitleHeight();xe?V={x:um(r,this.left+w,this.right-i[0]),y:this.top+w+Fe,line:0}:V={x:this.left+w,y:um(r,this.top+Fe+w,this.bottom-e[0].height),line:0},lce(this.ctx,n.textDirection);let Re=W+w;this.legendItems.forEach((Se,ke)=>{o.strokeStyle=Se.fontColor,o.fillStyle=Se.fontColor;let Xe=o.measureText(Se.text).width,yt=m.textAlign(Se.textAlign||(Se.textAlign=s.textAlign)),We=$+N+Xe,Et=V.x,we=V.y;m.setWidth(this.width),xe?ke>0&&Et+We+w>this.right&&(we=V.y+=Re,V.line++,Et=V.x=um(r,this.left+w,this.right-i[V.line])):ke>0&&we+Re>this.bottom&&(Et=V.x=Et+e[V.line].width+w,V.line++,we=V.y=um(r,this.top+Fe+w,this.bottom-e[V.line].height));let Qt=m.x(Et);if(te(Qt,we,Se),Et=CMe(yt,Et+$+N,xe?Et+We:this.right,n.rtl),fe(m.x(Et),we,Se),xe)V.x+=We+w;else if(typeof Se.text!="string"){let Xi=v.lineHeight;V.y+=iRe(Se,Xi)+w}else V.y+=Re}),cce(this.ctx,n.textDirection)}drawTitle(){let n=this.options,e=n.title,i=gp(e.font),o=pm(e.padding);if(!e.display)return;let r=I2(n.rtl,this.left,this.width),s=this.ctx,d=e.position,m=i.size/2,v=o.top+m,w,O=this.left,N=this.width;if(this.isHorizontal())N=Math.max(...this.lineWidths),w=this.top+v,O=um(n.align,O,this.right-N);else{let $=this.columnSizes.reduce((q,W)=>Math.max(q,W.height),0);w=v+um(n.align,this.top,this.bottom-$-n.labels.padding-this._computeTitleHeight())}let V=um(d,O,O+N);s.textAlign=r.textAlign(NW(d)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,bE(s,e.text,V,w,i)}_computeTitleHeight(){let n=this.options.title,e=gp(n.font),i=pm(n.padding);return n.display?e.lineHeight+i.height:0}_getLegendItemAt(n,e){let i,o,r;if(xx(n,this.left,this.right)&&xx(e,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;ir.length>s.length?r:s)),n+e.size/2+i.measureText(o).width}function uft(t,n,e){let i=t;return typeof n.text!="string"&&(i=iRe(n,e)),i}function iRe(t,n){let e=t.text?t.text.length:0;return n*e}function pft(t,n){return!!((t==="mousemove"||t==="mouseout")&&(n.onHover||n.onLeave)||n.onClick&&(t==="click"||t==="mouseup"))}var hft={id:"legend",_element:oY,start(t,n,e){let i=t.legend=new oY({ctx:t.ctx,options:e,chart:t});Jm.configure(t,i,e),Jm.addBox(t,i)},stop(t){Jm.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,n,e){let i=t.legend;Jm.configure(t,i,e),i.options=e},afterUpdate(t){let n=t.legend;n.buildLabels(),n.adjustHitBoxes()},afterEvent(t,n){n.replay||t.legend.handleEvent(n.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,n,e){let i=n.datasetIndex,o=e.chart;o.isDatasetVisible(i)?(o.hide(i),n.hidden=!0):(o.show(i),n.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let n=t.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:o,color:r,useBorderRadius:s,borderRadius:d}}=t.legend.options;return t._getSortedDatasetMetas().map(m=>{let v=m.controller.getStyle(e?0:void 0),w=pm(v.borderWidth);return{text:n[m.index].label,fillStyle:v.backgroundColor,fontColor:r,hidden:!m.visible,lineCap:v.borderCapStyle,lineDash:v.borderDash,lineDashOffset:v.borderDashOffset,lineJoin:v.borderJoinStyle,lineWidth:(w.width+w.height)/4,strokeStyle:v.borderColor,pointStyle:i||v.pointStyle,rotation:v.rotation,textAlign:o||v.textAlign,borderRadius:s&&(d||v.borderRadius),datasetIndex:m.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},Kz=class extends ab{constructor(n){super(),this.chart=n.chart,this.options=n.options,this.ctx=n.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(n,e){let i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=n,this.height=this.bottom=e;let o=ld(i.text)?i.text.length:1;this._padding=pm(i.padding);let r=o*gp(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let n=this.options.position;return n==="top"||n==="bottom"}_drawArgs(n){let{top:e,left:i,bottom:o,right:r,options:s}=this,d=s.align,m=0,v,w,O;return this.isHorizontal()?(w=um(d,i,r),O=e+n,v=r-i):(s.position==="left"?(w=i+n,O=um(d,o,e),m=Hl*-.5):(w=r-n,O=um(d,e,o),m=Hl*.5),v=o-e),{titleX:w,titleY:O,maxWidth:v,rotation:m}}draw(){let n=this.ctx,e=this.options;if(!e.display)return;let i=gp(e.font),r=i.lineHeight/2+this._padding.top,{titleX:s,titleY:d,maxWidth:m,rotation:v}=this._drawArgs(r);bE(n,e.text,0,0,i,{color:e.color,maxWidth:m,rotation:v,textAlign:NW(e.align),textBaseline:"middle",translation:[s,d]})}};function mft(t,n){let e=new Kz({ctx:t.ctx,options:n,chart:t});Jm.configure(t,e,n),Jm.addBox(t,e),t.titleBlock=e}var fft={id:"title",_element:Kz,start(t,n,e){mft(t,e)},stop(t){let n=t.titleBlock;Jm.removeBox(t,n),delete t.titleBlock},beforeUpdate(t,n,e){let i=t.titleBlock;Jm.configure(t,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},WW=new WeakMap,gft={id:"subtitle",start(t,n,e){let i=new Kz({ctx:t.ctx,options:e,chart:t});Jm.configure(t,i,e),Jm.addBox(t,i),WW.set(t,i)},stop(t){Jm.removeBox(t,WW.get(t)),WW.delete(t)},beforeUpdate(t,n,e){let i=WW.get(t);Jm.configure(t,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},$z={average(t){if(!t.length)return!1;let n,e,i=new Set,o=0,r=0;for(n=0,e=t.length;nd+m)/i.size,y:o/r}},nearest(t,n){if(!t.length)return!1;let e=n.x,i=n.y,o=Number.POSITIVE_INFINITY,r,s,d;for(r=0,s=t.length;r-1?t.split(` `):t}function _ft(t,n){let{element:e,datasetIndex:i,index:o}=n,r=t.getDatasetMeta(i).controller,{label:s,value:d}=r.getLabelAndValue(o);return{chart:t,label:s,parsed:r.getParsed(o),raw:t.data.datasets[i].data[o],formattedValue:d,dataset:r.getDataset(),dataIndex:o,datasetIndex:i,element:e}}function xOe(t,n){let e=t.chart.ctx,{body:i,footer:o,title:r}=t,{boxWidth:s,boxHeight:d}=n,m=gp(n.bodyFont),v=gp(n.titleFont),w=gp(n.footerFont),O=r.length,N=o.length,V=i.length,$=pm(n.padding),q=$.height,W=0,te=i.reduce((Fe,Re)=>Fe+Re.before.length+Re.lines.length+Re.after.length,0);if(te+=t.beforeBody.length+t.afterBody.length,O&&(q+=O*v.lineHeight+(O-1)*n.titleSpacing+n.titleMarginBottom),te){let Fe=n.displayColors?Math.max(d,m.lineHeight):m.lineHeight;q+=V*Fe+(te-V)*m.lineHeight+(te-1)*n.bodySpacing}N&&(q+=n.footerMarginTop+N*w.lineHeight+(N-1)*n.footerSpacing);let fe=0,xe=function(Fe){W=Math.max(W,e.measureText(Fe).width+fe)};return e.save(),e.font=v.string,pc(t.title,xe),e.font=m.string,pc(t.beforeBody.concat(t.afterBody),xe),fe=n.displayColors?s+2+n.boxPadding:0,pc(i,Fe=>{pc(Fe.before,xe),pc(Fe.lines,xe),pc(Fe.after,xe)}),fe=0,e.font=w.string,pc(t.footer,xe),e.restore(),W+=$.width,{width:W,height:q}}function yft(t,n){let{y:e,height:i}=n;return et.height-i/2?"bottom":"center"}function vft(t,n,e,i){let{x:o,width:r}=i,s=e.caretSize+e.caretPadding;if(t==="left"&&o+r+s>n.width||t==="right"&&o-r-s<0)return!0}function bft(t,n,e,i){let{x:o,width:r}=e,{width:s,chartArea:{left:d,right:m}}=t,v="center";return i==="center"?v=o<=(d+m)/2?"left":"right":o<=r/2?v="left":o>=s-r/2&&(v="right"),vft(v,t,n,e)&&(v="center"),v}function wOe(t,n,e){let i=e.yAlign||n.yAlign||yft(t,e);return{xAlign:e.xAlign||n.xAlign||bft(t,n,e,i),yAlign:i}}function Cft(t,n){let{x:e,width:i}=t;return n==="right"?e-=i:n==="center"&&(e-=i/2),e}function xft(t,n,e){let{y:i,height:o}=t;return n==="top"?i+=e:n==="bottom"?i-=o+e:i-=o/2,i}function SOe(t,n,e,i){let{caretSize:o,caretPadding:r,cornerRadius:s}=t,{xAlign:d,yAlign:m}=e,v=o+r,{topLeft:w,topRight:O,bottomLeft:N,bottomRight:V}=CE(s),$=Cft(n,d),q=xft(n,m,v);return m==="center"?d==="left"?$+=v:d==="right"&&($-=v):d==="left"?$-=Math.max(w,N)+o:d==="right"&&($+=Math.max(O,V)+o),{x:Wp($,0,i.width-n.width),y:Wp(q,0,i.height-n.height)}}function YW(t,n,e){let i=pm(e.padding);return n==="center"?t.x+t.width/2:n==="right"?t.x+t.width-i.right:t.x+i.left}function TOe(t){return wx([],sS(t))}function wft(t,n,e){return oS(t,{tooltip:n,tooltipItems:e,type:"tooltip"})}function IOe(t,n){let e=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return e?t.override(e):t}var nRe={beforeTitle:Cx,title(t){if(t.length>0){let n=t[0],e=n.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(i>0&&n.dataIndex"u"?nRe[n].call(e,i):o}var EOe=(()=>{class t extends ab{static positioners=$z;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let i=this.chart,o=this.options.setContext(this.getContext()),r=o.enabled&&i.options.animation&&o.animations,s=new JW(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=wft(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,i){let{callbacks:o}=i,r=s_(o,"beforeTitle",this,e),s=s_(o,"title",this,e),d=s_(o,"afterTitle",this,e),m=[];return m=wx(m,sS(r)),m=wx(m,sS(s)),m=wx(m,sS(d)),m}getBeforeBody(e,i){return TOe(s_(i.callbacks,"beforeBody",this,e))}getBody(e,i){let{callbacks:o}=i,r=[];return pc(e,s=>{let d={before:[],lines:[],after:[]},m=IOe(o,s);wx(d.before,sS(s_(m,"beforeLabel",this,s))),wx(d.lines,s_(m,"label",this,s)),wx(d.after,sS(s_(m,"afterLabel",this,s))),r.push(d)}),r}getAfterBody(e,i){return TOe(s_(i.callbacks,"afterBody",this,e))}getFooter(e,i){let{callbacks:o}=i,r=s_(o,"beforeFooter",this,e),s=s_(o,"footer",this,e),d=s_(o,"afterFooter",this,e),m=[];return m=wx(m,sS(r)),m=wx(m,sS(s)),m=wx(m,sS(d)),m}_createItems(e){let i=this._active,o=this.chart.data,r=[],s=[],d=[],m=[],v,w;for(v=0,w=i.length;ve.filter(O,N,V,o))),e.itemSort&&(m=m.sort((O,N)=>e.itemSort(O,N,o))),pc(m,O=>{let N=IOe(e.callbacks,O);r.push(s_(N,"labelColor",this,O)),s.push(s_(N,"labelPointStyle",this,O)),d.push(s_(N,"labelTextColor",this,O))}),this.labelColors=r,this.labelPointStyles=s,this.labelTextColors=d,this.dataPoints=m,m}update(e,i){let o=this.options.setContext(this.getContext()),r=this._active,s,d=[];if(!r.length)this.opacity!==0&&(s={opacity:0});else{let m=$z[o.position].call(this,r,this._eventPosition);d=this._createItems(o),this.title=this.getTitle(d,o),this.beforeBody=this.getBeforeBody(d,o),this.body=this.getBody(d,o),this.afterBody=this.getAfterBody(d,o),this.footer=this.getFooter(d,o);let v=this._size=xOe(this,o),w=Object.assign({},m,v),O=wOe(this.chart,o,w),N=SOe(o,w,O,this.chart);this.xAlign=O.xAlign,this.yAlign=O.yAlign,s={opacity:1,x:N.x,y:N.y,width:v.width,height:v.height,caretX:m.x,caretY:m.y}}this._tooltipItems=d,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(e,i,o,r){let s=this.getCaretPosition(e,o,r);i.lineTo(s.x1,s.y1),i.lineTo(s.x2,s.y2),i.lineTo(s.x3,s.y3)}getCaretPosition(e,i,o){let{xAlign:r,yAlign:s}=this,{caretSize:d,cornerRadius:m}=o,{topLeft:v,topRight:w,bottomLeft:O,bottomRight:N}=CE(m),{x:V,y:$}=e,{width:q,height:W}=i,te,fe,xe,Fe,Re,Se;return s==="center"?(Re=$+W/2,r==="left"?(te=V,fe=te-d,Fe=Re+d,Se=Re-d):(te=V+q,fe=te+d,Fe=Re-d,Se=Re+d),xe=te):(r==="left"?fe=V+Math.max(v,O)+d:r==="right"?fe=V+q-Math.max(w,N)-d:fe=this.caretX,s==="top"?(Fe=$,Re=Fe-d,te=fe-d,xe=fe+d):(Fe=$+W,Re=Fe+d,te=fe+d,xe=fe-d),Se=Fe),{x1:te,x2:fe,x3:xe,y1:Fe,y2:Re,y3:Se}}drawTitle(e,i,o){let r=this.title,s=r.length,d,m,v;if(s){let w=I2(o.rtl,this.x,this.width);for(e.x=YW(this,o.titleAlign,o),i.textAlign=w.textAlign(o.titleAlign),i.textBaseline="middle",d=gp(o.titleFont),m=o.titleSpacing,i.fillStyle=o.titleColor,i.font=d.string,v=0;vxe!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,fL(e,{x:W,y:q,w,h:v,radius:fe}),e.fill(),e.stroke(),e.fillStyle=d.backgroundColor,e.beginPath(),fL(e,{x:te,y:q+1,w:w-2,h:v-2,radius:fe}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(W,q,w,v),e.strokeRect(W,q,w,v),e.fillStyle=d.backgroundColor,e.fillRect(te,q+1,w-2,v-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,i,o){let{body:r}=this,{bodySpacing:s,bodyAlign:d,displayColors:m,boxHeight:v,boxWidth:w,boxPadding:O}=o,N=gp(o.bodyFont),V=N.lineHeight,$=0,q=I2(o.rtl,this.x,this.width),W=function(yt){i.fillText(yt,q.x(e.x+$),e.y+V/2),e.y+=V+s},te=q.textAlign(d),fe,xe,Fe,Re,Se,ke,Xe;for(i.textAlign=d,i.textBaseline="middle",i.font=N.string,e.x=YW(this,te,o),i.fillStyle=o.bodyColor,pc(this.beforeBody,W),$=m&&te!=="right"?d==="center"?w/2+O:w+2+O:0,Re=0,ke=r.length;Re0&&i.stroke()}_updateAnimationTarget(e){let i=this.chart,o=this.$animations,r=o&&o.x,s=o&&o.y;if(r||s){let d=$z[e.position].call(this,this._active,this._eventPosition);if(!d)return;let m=this._size=xOe(this,e),v=Object.assign({},d,this._size),w=wOe(i,e,v),O=SOe(e,v,w,i);(r._to!==O.x||s._to!==O.y)&&(this.xAlign=w.xAlign,this.yAlign=w.yAlign,this.width=m.width,this.height=m.height,this.caretX=d.x,this.caretY=d.y,this._resolveAnimations().update(this,O))}}_willRender(){return!!this.opacity}draw(e){let i=this.options.setContext(this.getContext()),o=this.opacity;if(!o)return;this._updateAnimationTarget(i);let r={width:this.width,height:this.height},s={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;let d=pm(i.padding),m=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;i.enabled&&m&&(e.save(),e.globalAlpha=o,this.drawBackground(s,e,r,i),lce(e,i.textDirection),s.y+=d.top,this.drawTitle(s,e,i),this.drawBody(s,e,i),this.drawFooter(s,e,i),cce(e,i.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,i){let o=this._active,r=e.map(({datasetIndex:m,index:v})=>{let w=this.chart.getDatasetMeta(m);if(!w)throw new Error("Cannot find a dataset at index "+m);return{datasetIndex:m,element:w.data[v],index:v}}),s=!Pz(o,r),d=this._positionChanged(r,i);(s||d)&&(this._active=r,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,i,o=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let r=this.options,s=this._active||[],d=this._getActiveElements(e,s,i,o),m=this._positionChanged(d,e),v=i||!Pz(d,s)||m;return v&&(this._active=d,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,i))),v}_getActiveElements(e,i,o,r){let s=this.options;if(e.type==="mouseout")return[];if(!r)return i.filter(m=>this.chart.data.datasets[m.datasetIndex]&&this.chart.getDatasetMeta(m.datasetIndex).controller.getParsed(m.index)!==void 0);let d=this.chart.getElementsAtEventForMode(e,s.mode,s,o);return s.reverse&&d.reverse(),d}_positionChanged(e,i){let{caretX:o,caretY:r,options:s}=this,d=$z[s.position].call(this,e,i);return d!==!1&&(o!==d.x||r!==d.y)}}return t})(),Sft={id:"tooltip",_element:EOe,positioners:$z,afterInit(t,n,e){e&&(t.tooltip=new EOe({chart:t,options:e}))},beforeUpdate(t,n,e){t.tooltip&&t.tooltip.initialize(e)},reset(t,n,e){t.tooltip&&t.tooltip.initialize(e)},afterDraw(t){let n=t.tooltip;if(n&&n._willRender()){let e={tooltip:n};if(t.notifyPlugins("beforeTooltipDraw",mt(be({},e),{cancelable:!0}))===!1)return;n.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",e)}},afterEvent(t,n){if(t.tooltip){let e=n.replay;t.tooltip.handleEvent(n.event,e,n.inChartArea)&&(n.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,n)=>n.bodyFont.size,boxWidth:(t,n)=>n.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:nRe},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Tft=Object.freeze({__proto__:null,Colors:Nmt,Decimation:Umt,Filler:aft,Legend:hft,SubTitle:gft,Title:fft,Tooltip:Sft}),Ift=(t,n,e,i)=>(typeof n=="string"?(e=t.push(n)-1,i.unshift({index:e,label:n})):isNaN(n)&&(e=null),e);function Eft(t,n,e,i){let o=t.indexOf(n);if(o===-1)return Ift(t,n,e,i);let r=t.lastIndexOf(n);return o!==r?e:o}var Dft=(t,n)=>t===null?null:Wp(Math.round(t),0,n);function DOe(t){let n=this.getLabels();return t>=0&&t{class t extends A2{static id="category";static defaults={ticks:{callback:DOe}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let i=this._addedLabels;if(i.length){let o=this.getLabels();for(let{index:r,label:s}of i)o[r]===s&&o.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,i){if(tl(e))return null;let o=this.getLabels();return i=isFinite(i)&&o[i]===e?i:Eft(o,e,ia(i,e),this._addedLabels),Dft(i,o.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:o,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),i||(r=this.getLabels().length-1)),this.min=o,this.max=r}buildTicks(){let e=this.min,i=this.max,o=this.options.offset,r=[],s=this.getLabels();s=e===0&&i===s.length-1?s:s.slice(e,i+1),this._valueRange=Math.max(s.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let d=e;d<=i;d++)r.push({value:d});return r}getLabelForValue(e){return DOe.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let i=this.ticks;return e<0||e>i.length-1?null:this.getPixelForValue(i[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}return t})();function kft(t,n){let e=[],{bounds:o,step:r,min:s,max:d,precision:m,count:v,maxTicks:w,maxDigits:O,includeBounds:N}=t,V=r||1,$=w-1,{min:q,max:W}=n,te=!tl(s),fe=!tl(d),xe=!tl(v),Fe=(W-q)/(O+1),Re=Ule((W-q)/$/V)*V,Se,ke,Xe,yt;if(Re<1e-14&&!te&&!fe)return[{value:q},{value:W}];yt=Math.ceil(W/Re)-Math.floor(q/Re),yt>$&&(Re=Ule(yt*Re/$/V)*V),tl(m)||(Se=Math.pow(10,m),Re=Math.ceil(Re*Se)/Se),o==="ticks"?(ke=Math.floor(q/Re)*Re,Xe=Math.ceil(W/Re)*Re):(ke=q,Xe=W),te&&fe&&r&&mMe((d-s)/r,Re/1e3)?(yt=Math.round(Math.min((d-s)/Re,w)),Re=(d-s)/yt,ke=s,Xe=d):xe?(ke=te?s:ke,Xe=fe?d:Xe,yt=v-1,Re=(Xe-ke)/yt):(yt=(Xe-ke)/Re,pL(yt,Math.round(yt),Re/1e3)?yt=Math.round(yt):yt=Math.ceil(yt));let We=Math.max(jle(Re),jle(ke));Se=Math.pow(10,tl(m)?We:m),ke=Math.round(ke*Se)/Se,Xe=Math.round(Xe*Se)/Se;let Et=0;for(te&&(N&&ke!==s?(e.push({value:s}),ked)break;e.push({value:we})}return fe&&N&&Xe!==d?e.length&&pL(e[e.length-1].value,d,AOe(d,Fe,t))?e[e.length-1].value=d:e.push({value:d}):(!fe||Xe===d)&&e.push({value:Xe}),e}function AOe(t,n,{horizontal:e,minRotation:i}){let o=by(i),r=(e?Math.sin(o):Math.cos(o))||.001,s=.75*n*(""+t).length;return Math.min(n/r,s)}var vL=class extends A2{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,e){return tl(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){let{beginAtZero:n}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:o,max:r}=this,s=m=>o=e?o:m,d=m=>r=i?r:m;if(n){let m=sb(o),v=sb(r);m<0&&v<0?d(0):m>0&&v>0&&s(0)}if(o===r){let m=r===0?1:Math.abs(r*.05);d(r+m),n||s(o-m)}this.min=o,this.max=r}getTickLimit(){let n=this.options.ticks,{maxTicksLimit:e,stepSize:i}=n,o;return i?(o=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),e=e||11),e&&(o=Math.min(e,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let n=this.options,e=n.ticks,i=this.getTickLimit();i=Math.max(2,i);let o={maxTicks:i,bounds:n.bounds,min:n.min,max:n.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},r=this._range||this,s=kft(o,r);return n.bounds==="ticks"&&Hle(s,this,"value"),n.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){let n=this.ticks,e=this.min,i=this.max;if(super.configure(),this.options.offset&&n.length){let o=(i-e)/Math.max(n.length-1,1)/2;e-=o,i+=o}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(n){return mL(n,this.chart.options.locale,this.options.ticks.format)}},Vce=class extends vL{static id="linear";static defaults={ticks:{callback:Lz.formatters.numeric}};determineDataLimits(){let{min:n,max:e}=this.getMinMax(!0);this.min=tu(n)?n:0,this.max=tu(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let n=this.isHorizontal(),e=n?this.width:this.height,i=by(this.options.ticks.minRotation),o=(n?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/o))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}},Wz=t=>Math.floor(iS(t)),D2=(t,n)=>Math.pow(10,Wz(t)+n);function kOe(t){return t/Math.pow(10,Wz(t))===1}function MOe(t,n,e){let i=Math.pow(10,e),o=Math.floor(t/i);return Math.ceil(n/i)-o}function Mft(t,n){let e=n-t,i=Wz(e);for(;MOe(t,n,i)>10;)i++;for(;MOe(t,n,i)<10;)i--;return Math.min(i,Wz(t))}function Oft(t,{min:n,max:e}){n=r_(t.min,n);let i=[],o=Wz(n),r=Mft(n,e),s=r<0?Math.pow(10,Math.abs(r)):1,d=Math.pow(10,r),m=o>r?Math.pow(10,o):0,v=Math.round((n-m)*s)/s,w=Math.floor((n-m)/d/10)*d*10,O=Math.floor((v-w)/Math.pow(10,r)),N=r_(t.min,Math.round((m+w+O*Math.pow(10,r))*s)/s);for(;N=10?O=O<15?15:20:O++,O>=20&&(r++,O=2,s=r>=0?1:s),N=Math.round((m+w+O*Math.pow(10,r))*s)/s;let V=r_(t.max,N);return i.push({value:V,major:kOe(V),significand:O}),i}var zce=class extends A2{static id="logarithmic";static defaults={ticks:{callback:Lz.formatters.logarithmic,major:{enabled:!0}}};constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,e){let i=vL.prototype.parse.apply(this,[n,e]);if(i===0){this._zero=!0;return}return tu(i)&&i>0?i:null}determineDataLimits(){let{min:n,max:e}=this.getMinMax(!0);this.min=tu(n)?Math.max(0,n):null,this.max=tu(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!tu(this._userMin)&&(this.min=n===D2(this.min,0)?D2(this.min,-1):D2(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:n,maxDefined:e}=this.getUserBounds(),i=this.min,o=this.max,r=d=>i=n?i:d,s=d=>o=e?o:d;i===o&&(i<=0?(r(1),s(10)):(r(D2(i,-1)),s(D2(o,1)))),i<=0&&r(D2(o,-1)),o<=0&&s(D2(i,1)),this.min=i,this.max=o}buildTicks(){let n=this.options,e={min:this._userMin,max:this._userMax},i=Oft(e,this);return n.bounds==="ticks"&&Hle(i,this,"value"),n.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(n){return n===void 0?"0":mL(n,this.chart.options.locale,this.options.ticks.format)}configure(){let n=this.min;super.configure(),this._startValue=iS(n),this._valueRange=iS(this.max)-iS(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(iS(n)-this._startValue)/this._valueRange)}getValueForPixel(n){let e=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+e*this._valueRange)}};function Uce(t){let n=t.ticks;if(n.display&&t.display){let e=pm(n.backdropPadding);return ia(n.font&&n.font.size,xd.font.size)+e.height}return 0}function Rft(t,n,e){return e=ld(e)?e:[e],{w:wMe(t,n.string,e),h:e.length*n.lineHeight}}function OOe(t,n,e,i,o){return t===i||t===o?{start:n-e/2,end:n+e/2}:to?{start:n-e,end:n}:{start:n,end:n+e}}function Fft(t){let n={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},e=Object.assign({},n),i=[],o=[],r=t._pointLabels.length,s=t.options.pointLabels,d=s.centerPointLabels?Hl/r:0;for(let m=0;mn.r&&(d=(i.end-n.r)/r,t.r=Math.max(t.r,n.r+d)),o.startn.b&&(m=(o.end-n.b)/s,t.b=Math.max(t.b,n.b+m))}function Lft(t,n,e){let i=t.drawingArea,{extra:o,additionalAngle:r,padding:s,size:d}=e,m=t.getPointPosition(n,i+o+s,r),v=Math.round(PW(dm(m.angle+gu))),w=Uft(m.y,d.h,v),O=Vft(v),N=zft(m.x,d.w,O);return{visible:!0,x:m.x,y:w,textAlign:O,left:N,top:w,right:N+d.w,bottom:w+d.h}}function Nft(t,n){if(!n)return!0;let{left:e,top:i,right:o,bottom:r}=t;return!(bx({x:e,y:i},n)||bx({x:e,y:r},n)||bx({x:o,y:i},n)||bx({x:o,y:r},n))}function Bft(t,n,e){let i=[],o=t._pointLabels.length,r=t.options,{centerPointLabels:s,display:d}=r.pointLabels,m={extra:Uce(r)/2,additionalAngle:s?Hl/o:0},v;for(let w=0;w270||e<90)&&(t-=n),t}function Hft(t,n,e){let{left:i,top:o,right:r,bottom:s}=e,{backdropColor:d}=n;if(!tl(d)){let m=CE(n.borderRadius),v=pm(n.backdropPadding);t.fillStyle=d;let w=i-v.left,O=o-v.top,N=r-i+v.width,V=s-o+v.height;Object.values(m).some($=>$!==0)?(t.beginPath(),fL(t,{x:w,y:O,w:N,h:V,radius:m}),t.fill()):t.fillRect(w,O,N,V)}}function jft(t,n){let{ctx:e,options:{pointLabels:i}}=t;for(let o=n-1;o>=0;o--){let r=t._pointLabelItems[o];if(!r.visible)continue;let s=i.setContext(t.getPointLabelContext(o));Hft(e,s,r);let d=gp(s.font),{x:m,y:v,textAlign:w}=r;bE(e,t._pointLabels[o],m,v+d.lineHeight/2,d,{color:s.color,textAlign:w,textBaseline:"middle"})}}function oRe(t,n,e,i){let{ctx:o}=t;if(e)o.arc(t.xCenter,t.yCenter,n,0,cd);else{let r=t.getPointPosition(0,n);o.moveTo(r.x,r.y);for(let s=1;s{let o=Kc(this.options.pointLabels.callback,[e,i],this);return o||o===0?o:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){let n=this.options;n.display&&n.pointLabels.display?Fft(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,e,i,o){this.xCenter+=Math.floor((n-e)/2),this.yCenter+=Math.floor((i-o)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,e,i,o))}getIndexAngle(n){let e=cd/(this._pointLabels.length||1),i=this.options.startAngle||0;return dm(n*e+by(i))}getDistanceFromCenterForValue(n){if(tl(n))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*e:(n-this.min)*e}getValueForDistanceFromCenter(n){if(tl(n))return NaN;let e=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(n){let e=this._pointLabels||[];if(n>=0&&n{if(O!==0||O===0&&this.min<0){m=this.getDistanceFromCenterForValue(w.value);let N=this.getContext(O),V=o.setContext(N),$=r.setContext(N);Gft(this,V,m,s,$)}}),i.display){for(n.save(),d=s-1;d>=0;d--){let w=i.setContext(this.getPointLabelContext(d)),{color:O,lineWidth:N}=w;!N||!O||(n.lineWidth=N,n.strokeStyle=O,n.setLineDash(w.borderDash),n.lineDashOffset=w.borderDashOffset,m=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),v=this.getPointPosition(d,m),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(v.x,v.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){let n=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;let o=this.getIndexAngle(0),r,s;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(o),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((d,m)=>{if(m===0&&this.min>=0&&!e.reverse)return;let v=i.setContext(this.getContext(m)),w=gp(v.font);if(r=this.getDistanceFromCenterForValue(this.ticks[m].value),v.showLabelBackdrop){n.font=w.string,s=n.measureText(d.label).width,n.fillStyle=v.backdropColor;let O=pm(v.backdropPadding);n.fillRect(-s/2-O.left,-r-w.size/2-O.top,s+O.width,w.size+O.height)}bE(n,d.label,0,-r,w,{color:v.color,strokeColor:v.textStrokeColor,strokeWidth:v.textStrokeWidth})}),n.restore()}drawTitle(){}},aY={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},a_=Object.keys(aY);function ROe(t,n){return t-n}function FOe(t,n){if(tl(n))return null;let e=t._adapter,{parser:i,round:o,isoWeekday:r}=t._parseOpts,s=n;return typeof i=="function"&&(s=i(s)),tu(s)||(s=typeof i=="string"?e.parse(s,i):e.parse(s)),s===null?null:(o&&(s=o==="week"&&(T2(r)||r===!0)?e.startOf(s,"isoWeek",r):e.startOf(s,o)),+s)}function POe(t,n,e,i){let o=a_.length;for(let r=a_.indexOf(t);r=a_.indexOf(e);r--){let s=a_[r];if(aY[s].common&&t._adapter.diff(o,i,s)>=n-1)return s}return a_[e?a_.indexOf(e):0]}function Kft(t){for(let n=a_.indexOf(t)+1,e=a_.length;n=n?e[i]:e[o];t[r]=!0}}function Wft(t,n,e,i){let o=t._adapter,r=+o.startOf(n[0].value,i),s=n[n.length-1].value,d,m;for(d=r;d<=s;d=+o.add(d,1,i))m=e[d],m>=0&&(n[m].major=!0);return n}function NOe(t,n,e){let i=[],o={},r=n.length,s,d;for(s=0;s{class t extends A2{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,i={}){let o=e.time||(e.time={}),r=this._adapter=new rht._date(e.adapters.date);r.init(i),dL(o.displayFormats,r.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=i.normalized}parse(e,i){return e===void 0?null:FOe(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,i=this._adapter,o=e.time.unit||"day",{min:r,max:s,minDefined:d,maxDefined:m}=this.getUserBounds();function v(w){!d&&!isNaN(w.min)&&(r=Math.min(r,w.min)),!m&&!isNaN(w.max)&&(s=Math.max(s,w.max))}(!d||!m)&&(v(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&v(this.getMinMax(!1))),r=tu(r)&&!isNaN(r)?r:+i.startOf(Date.now(),o),s=tu(s)&&!isNaN(s)?s:+i.endOf(Date.now(),o)+1,this.min=Math.min(r,s-1),this.max=Math.max(r+1,s)}_getLabelBounds(){let e=this.getLabelTimestamps(),i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(i=e[0],o=e[e.length-1]),{min:i,max:o}}buildTicks(){let e=this.options,i=e.time,o=e.ticks,r=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);let s=this.min,d=this.max,m=_Me(r,s,d);return this._unit=i.unit||(o.autoSkip?POe(i.minUnit,this.min,this.max,this._getLabelCapacity(s)):qft(this,m.length,i.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Kft(this._unit),this.initOffsets(r),e.reverse&&m.reverse(),NOe(this,m,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let i=0,o=0,r,s;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?i=1-r:i=(this.getDecimalForValue(e[1])-r)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?o=s:o=(s-this.getDecimalForValue(e[e.length-2]))/2);let d=e.length<3?.5:.25;i=Wp(i,0,d),o=Wp(o,0,d),this._offsets={start:i,end:o,factor:1/(i+1+o)}}_generate(){let e=this._adapter,i=this.min,o=this.max,r=this.options,s=r.time,d=s.unit||POe(s.minUnit,i,o,this._getLabelCapacity(i)),m=ia(r.ticks.stepSize,1),v=d==="week"?s.isoWeekday:!1,w=T2(v)||v===!0,O={},N=i,V,$;if(w&&(N=+e.startOf(N,"isoWeek",v)),N=+e.startOf(N,w?"day":d),e.diff(o,i,d)>1e5*m)throw new Error(i+" and "+o+" are too far apart with stepSize of "+m+" "+d);let q=r.ticks.source==="data"&&this.getDataTimestamps();for(V=N,$=0;V+W)}getLabelForValue(e){let i=this._adapter,o=this.options.time;return o.tooltipFormat?i.format(e,o.tooltipFormat):i.format(e,o.displayFormats.datetime)}format(e,i){let r=this.options.time.displayFormats,s=this._unit,d=i||r[s];return this._adapter.format(e,d)}_tickFormatFunction(e,i,o,r){let s=this.options,d=s.ticks.callback;if(d)return Kc(d,[e,i,o],this);let m=s.time.displayFormats,v=this._unit,w=this._majorUnit,O=v&&m[v],N=w&&m[w],V=o[i],$=w&&N&&V&&V.major;return this._adapter.format(e,r||($?N:O))}generateTickLabels(e){let i,o,r;for(i=0,o=e.length;i0?m:1}getDataTimestamps(){let e=this._cache.data||[],i,o;if(e.length)return e;let r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(i=0,o=r.length;i=t[i].pos&&n<=t[o].pos&&({lo:i,hi:o}=vx(t,"pos",n)),{pos:r,time:d}=t[i],{pos:s,time:m}=t[o]):(n>=t[i].time&&n<=t[o].time&&({lo:i,hi:o}=vx(t,"time",n)),{time:r,pos:d}=t[i],{time:s,pos:m}=t[o]);let v=s-r;return v?d+(m-d)*(n-r)/v:d}var Gce=class extends jce{static id="timeseries";static defaults=jce.defaults;constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let n=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(n);this._minPos=QW(e,this.min),this._tableRange=QW(e,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){let{min:e,max:i}=this,o=[],r=[],s,d,m,v,w;for(s=0,d=n.length;s=e&&v<=i&&o.push(v);if(o.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,d=o.length;so-r)}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;let e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?n=this.normalize(e.concat(i)):n=e.length?e:i,n=this._cache.all=n,n}getDecimalForValue(n){return(QW(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){let e=this._offsets,i=this.getDecimalForPixel(n)/e.factor-e.end;return QW(this._table,i*this._tableRange+this._minPos,!0)}},Yft=Object.freeze({__proto__:null,CategoryScale:Aft,LinearScale:Vce,LogarithmicScale:zce,RadialLinearScale:Hce,TimeScale:jce,TimeSeriesScale:Gce}),rRe=[oht,kmt,Tft,Yft];var _u=mt(be({},lb.defaults.plugins.tooltip),{backgroundColor:"rgb(255,255,255)",titleFont:{family:"Roboto, sans-serif",size:12,style:"normal",lineHeight:lb.defaults.font.lineHeight,weight:lb.defaults.font.weight},bodyFont:{family:"Roboto, sans-serif",size:14,style:lb.defaults.font.style,lineHeight:lb.defaults.font.lineHeight,weight:lb.defaults.font.weight},titleColor:"rgba(0,0,0,0.84)",bodyColor:"rgba(0,0,0,0.84)",titleSpacing:8,padding:12,cornerRadius:2,borderWidth:1,borderColor:"rgba(0,0,1,0.15)",titleMarginBottom:6});var yu=(function(t){return t.ADMIN="ADMIN",t.BUSINESS_CASE="BUSINESS_CASE",t.CLINIC_BROWSER="CLINIC_BROWSER",t.CLINIC_OPERATING_NUMBERS="CLINIC_OPERATING_NUMBERS",t.CODE_BROWSER="CODE_BROWSER",t.COMPETITOR_ANALYSIS="COMPETITOR_ANALYSIS",t.CUBE="CUBE",t.CUBE_BASE="CUBE_BASE",t.CUBE_PREVIEW="CUBE_PREVIEW",t.DRG_BENCHMARKING="DRG_BENCHMARKING",t.HARTMANN_OPPORTUNITY_COSTS="HARTMANN_OPPORTUNITY_COSTS",t.HARTMANN_OPPORTUNITY_COSTS_CH="HARTMANN_OPPORTUNITY_COSTS_CH",t.HARTMANN_VIRTUAL_CLINIC_ANALYSIS="HARTMANN_VIRTUAL_CLINIC_ANALYSIS",t.INTUITIVE_PROFITABILITY_ANALYSIS="INTUITIVE_PROFITABILITY_ANALYSIS",t.INTUITIVE_VIRTUAL_CLINIC_DETAILS_CHANGE="INTUITIVE_VIRTUAL_CLINIC_DETAILS_CHANGE",t.OP_LIVE="OP_LIVE",t.POTENTIAL_ANALYSIS="POTENTIAL_ANALYSIS",t.PROJECTION="PROJECTION",t.REFERRAL_ANALYSIS="REFERRAL_ANALYSIS",t.VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS="VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS",t.VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS_ADVANCED="VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS_ADVANCED",t})(yu||{}),Tln=[yu.ADMIN,yu.BUSINESS_CASE,yu.CLINIC_BROWSER,yu.CLINIC_OPERATING_NUMBERS,yu.CODE_BROWSER,yu.COMPETITOR_ANALYSIS,yu.CUBE,yu.CUBE_BASE,yu.CUBE_PREVIEW,yu.DRG_BENCHMARKING,yu.HARTMANN_OPPORTUNITY_COSTS,yu.HARTMANN_OPPORTUNITY_COSTS_CH,yu.HARTMANN_VIRTUAL_CLINIC_ANALYSIS,yu.INTUITIVE_PROFITABILITY_ANALYSIS,yu.INTUITIVE_VIRTUAL_CLINIC_DETAILS_CHANGE,yu.OP_LIVE,yu.POTENTIAL_ANALYSIS,yu.PROJECTION,yu.REFERRAL_ANALYSIS,yu.VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS,yu.VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS_ADVANCED];var Qz=class t{static includedLower(n){let e=["CREATOR","DELETE","UPDATE","READ"],i=e.indexOf(n);if(i===-1)throw new Error(`Invalid permission type: ${n}`);return e.slice(i)}static includedBetween(n="READ",e="CREATOR"){let i=["READ","UPDATE","DELETE","CREATOR"],o=d=>{let m=i.indexOf(d);return m>-1?m:null},r=o(n)||0,s=o(e)+1||4;return i.slice(r,s)}static includes(n,e){return t.includedLower(n).indexOf(e)>-1}};var Zz={de:{READ:"Schreibgesch\xFCtzt",UPDATE:"Lesen + Bearbeiten",DELETE:"Bearbeiten + L\xF6schen",CREATOR:"Besitzer"},"de-DE":{READ:"Schreibgesch\xFCtzt",UPDATE:"Lesen + Bearbeiten",DELETE:"Bearbeiten + L\xF6schen",CREATOR:"Besitzer"},en:{READ:"Read-only",UPDATE:"Read + Write",DELETE:"Write + Delete",CREATOR:"Owner"}};var TE=class{static merge(n,e){return Object.keys(e).forEach(o=>{if(!n[o])n[o]=e[o];else{let r=e[o].filter(s=>n[o].indexOf(s)===-1);n[o]=n[o].concat(r)}}),n}static flatten(n){let e=Object.keys(n),i=[];return e.forEach(o=>{n[o].forEach(r=>{i.push({resourceName:o,resourceId:r})})}),i}};var ko=(function(t){return t.APP_CONTENT_SNIPPET="app-content-snippet",t.AT_CUBE_DASHBOARD="at-cube-dashboard",t.AT_CODE_SPECTRUM="at-code-spectrum",t.AT_VIRTUAL_CLINIC="at-virtual-clinic",t.CH_VIRTUAL_CLINIC="ch-virtual-clinic",t.VIRTUAL_CLINIC="virtual-clinic",t.MARKET="market",t.CASE_EXPORT_TEMPLATE="case-export-template",t.CODE_SPECTRUM="code-spectrum",t.CLINICS_FILTER="clinics-filter",t.CLINIC_OPERATING_NUMBER_GROUP="clinic-operating-number-group",t.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD="virtual-clinic-analysis-dashboard",t.VIRTUAL_CLINIC_REFERRAL_IMPORT="virtual-clinic-referral-import",t.VIRTUAL_CLINIC_BENCHMARKING_GROUP="virtual-clinic-benchmarking-group",t.SCENARIO_ANALYSIS="scenario",t.SCENARIO_ANALYSIS_OPEN_CLOSE="demand-analysis-open-close-scenario",t.SCENARIO_ANALYSIS_OPEN_CLOSE_INEK_DATASOURCE="bmg-open-close-scenario",t.SCENARIO_VV_ANALYSIS_OPEN_CLOSE_INEK_DATASOURCE="bmg-vorhalteverguetung-calculation",t.SCENARIO_VV_ANALYSIS_OPEN_CLOSE="demand-analysis-vorhalteverguetung-calculation",t.UK_CODE_SPECTRUM="uk-code-spectrum",t.VIRTUAL_CLINIC_CZ="virtual-clinic-cz",t.FILE="file",t})(ko||{}),Xz={[ko.CH_VIRTUAL_CLINIC]:"Virtuelle Klinik CH",[ko.AT_CUBE_DASHBOARD]:"Cube Dashboard AT",[ko.AT_CODE_SPECTRUM]:"Ziffer-Spektra AT",[ko.AT_VIRTUAL_CLINIC]:"Virtuelle Klinik AT",[ko.APP_CONTENT_SNIPPET]:"Content Snippet",[ko.CASE_EXPORT_TEMPLATE]:"Fall Export Vorlage",[ko.CLINIC_OPERATING_NUMBER_GROUP]:"Kennzahlengruppe",[ko.CODE_SPECTRUM]:"Ziffer-Spektra",[ko.CLINICS_FILTER]:"Klinik-Filter",[ko.MARKET]:"M\xE4rkte",[ko.VIRTUAL_CLINIC]:"Virtuelle Klinik",[ko.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]:"Cube Dashboard",[ko.VIRTUAL_CLINIC_BENCHMARKING_GROUP]:"Virtuelle Benchmarking-Gruppe",[ko.VIRTUAL_CLINIC_REFERRAL_IMPORT]:"Einweiser Import",[ko.SCENARIO_ANALYSIS]:"Szenario-Analyse",[ko.SCENARIO_ANALYSIS_OPEN_CLOSE]:"Versorgunganalyse - Simulation",[ko.SCENARIO_ANALYSIS_OPEN_CLOSE_INEK_DATASOURCE]:"Versorgunganalyse - Simulation",[ko.SCENARIO_VV_ANALYSIS_OPEN_CLOSE_INEK_DATASOURCE]:"Versorgunganalyse - Kalkulation",[ko.SCENARIO_VV_ANALYSIS_OPEN_CLOSE]:"Versorgunganalyse - Kalkulation",[ko.UK_CODE_SPECTRUM]:"Code-Spectra UK",[ko.VIRTUAL_CLINIC_CZ]:"Virtuelle Klinik",[ko.FILE]:"Datei"};var Gln={[ko.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]:{children:[ko.CODE_SPECTRUM,ko.VIRTUAL_CLINIC]},[ko.CODE_SPECTRUM]:{parents:[ko.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]},[ko.VIRTUAL_CLINIC]:{parents:[ko.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]},[ko.APP_CONTENT_SNIPPET]:{children:[ko.CODE_SPECTRUM,ko.MARKET,ko.CLINICS_FILTER,ko.VIRTUAL_CLINIC]}};var cb=class{static filter(n,e){e=e.toLowerCase();let i,o=!1;return n.id&&(o=n.id.toLowerCase().indexOf(e)!==-1),n.name&&(i=n.name.toLowerCase().indexOf(e)!==-1),n.labels&&(i=n.labels.some(r=>r.toLowerCase().indexOf(e)!==-1)),i||o}static sort(n,e,i){let o=i.field,r=n[o],s=e[o];return typeof r=="string"?this.sortString(r.toString(),s.toString(),i):r instanceof Date?this.sortDate(new Date(r),new Date(s),i):s?r?r.toString().localeCompare(s.toString()):1:-1}static sortString(n,e,i){return e?n?i.desc?e.localeCompare(n):n.localeCompare(e):1:-1}static sortDate(n,e,i){return e?n?i.desc?e.getTime()-n.getTime():n.getTime()-e.getTime():1:-1}};function sRe(t,n){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;let e=document.implementation.createHTMLDocument(),i=e.createElement("base"),o=e.createElement("a");return e.head.appendChild(i),e.body.appendChild(o),n&&(i.href=n),o.href=t,o.href}var aRe=(()=>{let t=0,n=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${n()}${t}`)})();function db(t){let n=[];for(let e=0,i=t.length;ev0||t.height>v0)&&(t.width>v0&&t.height>v0?t.width>t.height?(t.height*=v0/t.width,t.width=v0):(t.width*=v0/t.height,t.height=v0):t.width>v0?(t.height*=v0/t.width,t.width=v0):(t.width*=v0/t.height,t.height=v0))}function CL(t){return new Promise((n,e)=>{let i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>n(i))})},i.onerror=e,i.crossOrigin="anonymous",i.decoding="async",i.src=t})}function Xft(t){return bt(this,null,function*(){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(n=>`data:image/svg+xml;charset=utf-8,${n}`)})}function dRe(t,n,e){return bt(this,null,function*(){let i="http://www.w3.org/2000/svg",o=document.createElementNS(i,"svg"),r=document.createElementNS(i,"foreignObject");return o.setAttribute("width",`${n}`),o.setAttribute("height",`${e}`),o.setAttribute("viewBox",`0 0 ${n} ${e}`),r.setAttribute("width","100%"),r.setAttribute("height","100%"),r.setAttribute("x","0"),r.setAttribute("y","0"),r.setAttribute("externalResourcesRequired","true"),o.appendChild(r),r.appendChild(t),Xft(o)})}var ef=(t,n)=>{if(t instanceof n)return!0;let e=Object.getPrototypeOf(t);return e===null?!1:e.constructor.name===n.name||ef(e,n)};function Jft(t){let n=t.getPropertyValue("content");return`${t.cssText} content: '${n.replace(/'|"/g,"")}';`}function egt(t,n){return cY(n).map(e=>{let i=t.getPropertyValue(e),o=t.getPropertyPriority(e);return`${e}: ${i}${o?" !important":""};`}).join(" ")}function tgt(t,n,e,i){let o=`.${t}:${n}`,r=e.cssText?Jft(e):egt(e,i);return document.createTextNode(`${o}{${r}}`)}function uRe(t,n,e,i){let o=window.getComputedStyle(t,e),r=o.getPropertyValue("content");if(r===""||r==="none")return;let s=aRe();try{n.className=`${n.className} ${s}`}catch{return}let d=document.createElement("style");d.appendChild(tgt(s,e,o,i)),n.appendChild(d)}function pRe(t,n,e){uRe(t,n,":before",e),uRe(t,n,":after",e)}var hRe="application/font-woff",mRe="image/jpeg",igt={woff:hRe,woff2:hRe,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:mRe,jpeg:mRe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function ngt(t){let n=/\.([^./]*?)$/g.exec(t);return n?n[1]:""}function xL(t){let n=ngt(t).toLowerCase();return igt[n]||""}function ogt(t){return t.split(/,/)[1]}function Jz(t){return t.search(/^(data:)/)!==-1}function Wce(t,n){return`data:${n};base64,${t}`}function Yce(t,n,e){return bt(this,null,function*(){let i=yield fetch(t,n);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);let o=yield i.blob();return new Promise((r,s)=>{let d=new FileReader;d.onerror=s,d.onloadend=()=>{try{r(e({res:i,result:d.result}))}catch(m){s(m)}},d.readAsDataURL(o)})})}var Kce={};function rgt(t,n,e){let i=t.replace(/\?.*/,"");return e&&(i=t),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),n?`[${n}]${i}`:i}function wL(t,n,e){return bt(this,null,function*(){let i=rgt(t,n,e.includeQueryParams);if(Kce[i]!=null)return Kce[i];e.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());let o;try{let r=yield Yce(t,e.fetchRequestInit,({res:s,result:d})=>(n||(n=s.headers.get("Content-Type")||""),ogt(d)));o=Wce(r,n)}catch(r){o=e.imagePlaceholder||"";let s=`Failed to fetch resource: ${t}`;r&&(s=typeof r=="string"?r:r.message),s&&console.warn(s)}return Kce[i]=o,o})}function sgt(t){return bt(this,null,function*(){let n=t.toDataURL();return n==="data:,"?t.cloneNode(!1):CL(n)})}function agt(t,n){return bt(this,null,function*(){if(t.currentSrc){let r=document.createElement("canvas"),s=r.getContext("2d");r.width=t.clientWidth,r.height=t.clientHeight,s?.drawImage(t,0,0,r.width,r.height);let d=r.toDataURL();return CL(d)}let e=t.poster,i=xL(e),o=yield wL(e,i,n);return CL(o)})}function lgt(t,n){return bt(this,null,function*(){var e;try{if(!((e=t?.contentDocument)===null||e===void 0)&&e.body)return yield e6(t.contentDocument.body,n,!0)}catch{}return t.cloneNode(!1)})}function cgt(t,n){return bt(this,null,function*(){return ef(t,HTMLCanvasElement)?sgt(t):ef(t,HTMLVideoElement)?agt(t,n):ef(t,HTMLIFrameElement)?lgt(t,n):t.cloneNode(fRe(t))})}var dgt=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SLOT",fRe=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SVG";function ugt(t,n,e){return bt(this,null,function*(){var i,o;if(fRe(n))return n;let r=[];return dgt(t)&&t.assignedNodes?r=db(t.assignedNodes()):ef(t,HTMLIFrameElement)&&(!((i=t.contentDocument)===null||i===void 0)&&i.body)?r=db(t.contentDocument.body.childNodes):r=db(((o=t.shadowRoot)!==null&&o!==void 0?o:t).childNodes),r.length===0||ef(t,HTMLVideoElement)||(yield r.reduce((s,d)=>s.then(()=>e6(d,e)).then(m=>{m&&n.appendChild(m)}),Promise.resolve())),n})}function pgt(t,n,e){let i=n.style;if(!i)return;let o=window.getComputedStyle(t);o.cssText?(i.cssText=o.cssText,i.transformOrigin=o.transformOrigin):cY(e).forEach(r=>{let s=o.getPropertyValue(r);r==="font-size"&&s.endsWith("px")&&(s=`${Math.floor(parseFloat(s.substring(0,s.length-2)))-.1}px`),ef(t,HTMLIFrameElement)&&r==="display"&&s==="inline"&&(s="block"),r==="d"&&n.getAttribute("d")&&(s=`path(${n.getAttribute("d")})`),i.setProperty(r,s,o.getPropertyPriority(r))})}function hgt(t,n){ef(t,HTMLTextAreaElement)&&(n.innerHTML=t.value),ef(t,HTMLInputElement)&&n.setAttribute("value",t.value)}function mgt(t,n){if(ef(t,HTMLSelectElement)){let e=n,i=Array.from(e.children).find(o=>t.value===o.getAttribute("value"));i&&i.setAttribute("selected","")}}function fgt(t,n,e){return ef(n,Element)&&(pgt(t,n,e),pRe(t,n,e),hgt(t,n),mgt(t,n)),n}function ggt(t,n){return bt(this,null,function*(){let e=t.querySelectorAll?t.querySelectorAll("use"):[];if(e.length===0)return t;let i={};for(let r=0;rcgt(i,n)).then(i=>ugt(t,i,n)).then(i=>fgt(t,i,n)).then(i=>ggt(i,n))})}var gRe=/url\((['"]?)([^'"]+?)\1\)/g,_gt=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,ygt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function vgt(t){let n=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${n})(['"]?\\))`,"g")}function bgt(t){let n=[];return t.replace(gRe,(e,i,o)=>(n.push(o),e)),n.filter(e=>!Jz(e))}function Cgt(t,n,e,i,o){return bt(this,null,function*(){try{let r=e?sRe(n,e):n,s=xL(n),d;if(o){let m=yield o(r);d=Wce(m,s)}else d=yield wL(r,s,i);return t.replace(vgt(n),`$1${d}$3`)}catch{}return t})}function xgt(t,{preferredFontFormat:n}){return n?t.replace(ygt,e=>{for(;;){let[i,,o]=_gt.exec(e)||[];if(!o)return"";if(o===n)return`src: ${i};`}}):t}function Qce(t){return t.search(gRe)!==-1}function dY(t,n,e){return bt(this,null,function*(){if(!Qce(t))return t;let i=xgt(t,e);return bgt(i).reduce((r,s)=>r.then(d=>Cgt(d,s,n,e)),Promise.resolve(i))})}function SL(t,n,e){return bt(this,null,function*(){var i;let o=(i=n.style)===null||i===void 0?void 0:i.getPropertyValue(t);if(o){let r=yield dY(o,null,e);return n.style.setProperty(t,r,n.style.getPropertyPriority(t)),!0}return!1})}function wgt(t,n){return bt(this,null,function*(){(yield SL("background",t,n))||(yield SL("background-image",t,n)),(yield SL("mask",t,n))||(yield SL("-webkit-mask",t,n))||(yield SL("mask-image",t,n))||(yield SL("-webkit-mask-image",t,n))})}function Sgt(t,n){return bt(this,null,function*(){let e=ef(t,HTMLImageElement);if(!(e&&!Jz(t.src))&&!(ef(t,SVGImageElement)&&!Jz(t.href.baseVal)))return;let i=e?t.src:t.href.baseVal,o=yield wL(i,xL(i),n);yield new Promise((r,s)=>{t.onload=r,t.onerror=n.onImageErrorHandler?(...m)=>{try{r(n.onImageErrorHandler(...m))}catch(v){s(v)}}:s;let d=t;d.decode&&(d.decode=r),d.loading==="lazy"&&(d.loading="eager"),e?(t.srcset="",t.src=o):t.href.baseVal=o})})}function Tgt(t,n){return bt(this,null,function*(){let i=db(t.childNodes).map(o=>Zce(o,n));yield Promise.all(i).then(()=>t)})}function Zce(t,n){return bt(this,null,function*(){ef(t,Element)&&(yield wgt(t,n),yield Sgt(t,n),yield Tgt(t,n))})}function _Re(t,n){let{style:e}=t;n.backgroundColor&&(e.backgroundColor=n.backgroundColor),n.width&&(e.width=`${n.width}px`),n.height&&(e.height=`${n.height}px`);let i=n.style;return i!=null&&Object.keys(i).forEach(o=>{e[o]=i[o]}),t}var yRe={};function vRe(t){return bt(this,null,function*(){let n=yRe[t];if(n!=null)return n;let i=yield(yield fetch(t)).text();return n={url:t,cssText:i},yRe[t]=n,n})}function bRe(t,n){return bt(this,null,function*(){let e=t.cssText,i=/url\(["']?([^"')]+)["']?\)/g,r=(e.match(/url\([^)]+\)/g)||[]).map(s=>bt(null,null,function*(){let d=s.replace(i,"$1");return d.startsWith("https://")||(d=new URL(d,t.url).href),Yce(d,n.fetchRequestInit,({result:m})=>(e=e.replace(s,`url(${m})`),[s,m]))}));return Promise.all(r).then(()=>e)})}function CRe(t){if(t==null)return[];let n=[],e=/(\/\*[\s\S]*?\*\/)/gi,i=t.replace(e,""),o=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let m=o.exec(i);if(m===null)break;n.push(m[0])}i=i.replace(o,"");let r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,s="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",d=new RegExp(s,"gi");for(;;){let m=r.exec(i);if(m===null){if(m=d.exec(i),m===null)break;r.lastIndex=d.lastIndex}else d.lastIndex=r.lastIndex;n.push(m[0])}return n}function Igt(t,n){return bt(this,null,function*(){let e=[],i=[];return t.forEach(o=>{if("cssRules"in o)try{db(o.cssRules||[]).forEach((r,s)=>{if(r.type===CSSRule.IMPORT_RULE){let d=s+1,m=r.href,v=vRe(m).then(w=>bRe(w,n)).then(w=>CRe(w).forEach(O=>{try{o.insertRule(O,O.startsWith("@import")?d+=1:o.cssRules.length)}catch(N){console.error("Error inserting rule from remote css",{rule:O,error:N})}})).catch(w=>{console.error("Error loading remote css",w.toString())});i.push(v)}})}catch(r){let s=t.find(d=>d.href==null)||document.styleSheets[0];o.href!=null&&i.push(vRe(o.href).then(d=>bRe(d,n)).then(d=>CRe(d).forEach(m=>{s.insertRule(m,s.cssRules.length)})).catch(d=>{console.error("Error loading remote stylesheet",d)})),console.error("Error inlining remote css file",r)}}),Promise.all(i).then(()=>(t.forEach(o=>{if("cssRules"in o)try{db(o.cssRules||[]).forEach(r=>{e.push(r)})}catch(r){console.error(`Error while reading CSS rules from ${o.href}`,r)}}),e))})}function Egt(t){return t.filter(n=>n.type===CSSRule.FONT_FACE_RULE).filter(n=>Qce(n.style.getPropertyValue("src")))}function Dgt(t,n){return bt(this,null,function*(){if(t.ownerDocument==null)throw new Error("Provided element is not within a Document");let e=db(t.ownerDocument.styleSheets),i=yield Igt(e,n);return Egt(i)})}function xRe(t){return t.trim().replace(/["']/g,"")}function Agt(t){let n=new Set;function e(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(r=>{n.add(xRe(r))}),Array.from(i.children).forEach(r=>{r instanceof HTMLElement&&e(r)})}return e(t),n}function wRe(t,n){return bt(this,null,function*(){let e=yield Dgt(t,n),i=Agt(t);return(yield Promise.all(e.filter(r=>i.has(xRe(r.style.fontFamily))).map(r=>{let s=r.parentStyleSheet?r.parentStyleSheet.href:null;return dY(r.cssText,s,n)}))).join(` `)})}function SRe(t,n){return bt(this,null,function*(){let e=n.fontEmbedCSS!=null?n.fontEmbedCSS:n.skipFonts?null:yield wRe(t,n);if(e){let i=document.createElement("style"),o=document.createTextNode(e);i.appendChild(o),t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)}})}function kgt(e){return bt(this,arguments,function*(t,n={}){let{width:i,height:o}=qce(t,n),r=yield e6(t,n,!0);return yield SRe(r,n),yield Zce(r,n),_Re(r,n),yield dRe(r,i,o)})}function Mgt(e){return bt(this,arguments,function*(t,n={}){let{width:i,height:o}=qce(t,n),r=yield kgt(t,n),s=yield CL(r),d=document.createElement("canvas"),m=d.getContext("2d"),v=n.pixelRatio||lRe(),w=n.canvasWidth||i,O=n.canvasHeight||o;return d.width=w*v,d.height=O*v,n.skipAutoScale||cRe(d),d.style.width=`${w}`,d.style.height=`${O}`,n.backgroundColor&&(m.fillStyle=n.backgroundColor,m.fillRect(0,0,d.width,d.height)),m.drawImage(s,0,0,d.width,d.height),d})}function TRe(e){return bt(this,arguments,function*(t,n={}){return(yield Mgt(t,n)).toDataURL()})}var Ogt={format:"image/png",quality:.92,width:void 0,height:void 0,Canvas:void 0,crossOrigin:void 0},Rgt=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n={}),new Promise(function(e){n=Object.assign({},Ogt,n);var i=n.Canvas?new n.Canvas:window.document.createElement("canvas"),o=n.Image||window.Image,r=t.map(function(d){return new Promise(function(m,v){d.constructor.name!=="Object"&&(d={src:d});var w=new o;w.crossOrigin=n.crossOrigin,w.onerror=function(){return v(new Error("Couldn't load image"))},w.onload=function(){return m(Object.assign({},d,{img:w}))},w.src=d.src})}),s=i.getContext("2d");e(Promise.all(r).then(function(d){var m=function(v){return n[v]||Math.max.apply(Math,d.map(function(w){return w.img[v]}))};return i.width=m("width"),i.height=m("height"),d.forEach(function(v){return s.globalAlpha=v.opacity?v.opacity:1,s.drawImage(v.img,v.x||0,v.y||0)}),n.Canvas&&n.format==="image/jpeg"?new Promise(function(v,w){i.toDataURL(n.format,{quality:n.quality,progressive:!1},function(O,N){if(O){w(O);return}v(N)})}):i.toDataURL(n.format,n.quality)}))})},Xce=Rgt;var Jce="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAD6AAAAAeCAYAAAA49+HuAAAAAXNSR0IArs4c6QAAIABJREFUeF7t3Xd4VNW+PvB3Jp2ShCR0pPfee0Ckd5AmvaiAiARBwaO/c67n3GPDI4qiooJKERGQ3qvSSyjSu0iREiAEEkgh5Pe8i7vHmckkIYF7VXzX8/CAM2uvvfZnrT3+9a6vLSUlJQVqEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJPCXF7ApgP6X3wMCkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkYAQUQNdGkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEjoAC6NoIEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJGAEF0LURJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSMAIpBlAT0lJwZ07d5CcnAwfHx94eXk5yPhZYmIivL29zXds7J+UlGT++Pn5me/Y7t69a/ryb35ujcMx+Bn/22azmT9s/JxjWf2szz2tF8e12+2Oa3gdm6+vr8t801pr9ucYbJzbw270oweN+G/O1Xoe+qT3bA97Llkd79dff8WxY8dQtGhR8+dhNXqwWfvkYY37Rx5n165duHnzJqpVq4agoKA/8lQdczt48CCioqIe+pz53vE9/d9sfPf4O8L37lFo/G10/h1+FJ5JzyABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQwB9PwGMAncHszZu2Y/709Ui4lYLaTUqh/ZPN4e1tx5E9m5G8fz6ypcTiWnA1FKnXCTmCgrFyy2psurgZSXeTUCG4AjrWbodsfgHYvXIzolccQnLiHQQ2LI4aXZ/AnbspWL9iK47uP4cUpKBGw1J4onlD3ElKwMmdq+F15SfY7iYj5bFGKFGtAfLmK+BRbtzrk3D8wCXY7TbY7Dbgbgps3nbkLRCIclULo1ylUihZqhiyZcvm8frIHbvxn7/NQXirihgwrBOyZ8/+0FaIYdHtWyMx+d1lsHkBdi87fHzsCAwJQFBIAPIVDkHDxrVQsmSJP3QQ/ccff8S2bdtQoUIFtGvX7oF8du/ejcOHD+PKlSuIj483Y/n7+yMsLAzlypVD9erVszz+5MmTHWP27t0buXLl8jjW9OnTERMTY75r3749ihQpkuV7ZvbCCRMmmDl27NgRZcuWzezlv0v/L7/80gTQO3XqhDJlymR5DjxwYMOGDfjll18QHR1tDmbgAQx85/LmzYtatWo9lLU4fvw4Nm/ebO5hHS4REBCA3Llzo0WLFggNDc3yM/weF/LQgh07diA2NtYc2MHGAy3oVqpUKVStWhUhISGOqfH9YuP++iMecMH1j4uLQ+HChZEjR45UpEuWLMHp06fN540aNULlypU9sq9du9b8lrDxQIcGDRr8Hsuje0pAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQeSQGPAfTr169jRO/3cOmXOLCoeGCIL/qPaYPS2U8ix57PEXz3GlivPNnujV05W+NQSBEsilqNBFsi+IUNNtS2V0PVS4WQPOc47LF3TNDc5ueF5E5lcORWAnZvOI/kRFYsT4FPgB2te1ZGlcJxKPXLFORMuWnuG2sPQlSpPijdaqjHaskvPfsOTuy/ijrNiiF/sRD42O1ITLyLsz9fxMHtl5EjlzfaPlUb7Tu3cFRqd17FkydPYcYXi1GlRmm0at/EhKEfVmMA/ccftuDdUQtRrFIwajQoAbuXDdev3MCl89G4ePoWcuTywQt/744yZUo/rNs+9HEeRgCdVb/nzJljgswMnebPnx8FCxY0cz1//jwuXLhgArYMCXfr1g05c+bM9HO8++67joBuiRIl0LVr11RjnDhxAt9//73j8w4dOpjg+/9V+6sG0M+ePWvcExISTAA8X758Zv25L3799Vez/gyL85CD1q1bZ6nKNwPuixYtAgPoVmMAm4dpOP93eHg46tWr93+15Fm+Dz2mTJmCGzdupPk8/ILh+hEjRpg+/M35z3/+Y/49cuRI+Pn5Zfn+/1sXTpw40QTQ27Rpg0qVKqW6zddff41Lly6Zz/l7HBERkaoP9xHfJWtty5cvbw6TUJOABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlI4OEIeAygR0buwd+fnonkO8nmLl4+djTrWRM9i21F6LnlSL5XiBew2XHIqxzmBhTBdhwxIXPzcYoNxRIKou6uAsi19SbuJN/5n+42xNXNj3UXYxF14V4F7HvD2FGxXig6145Fpeh58LMns5g5/H1sOBnYCMFt/o3cefO6PDHDhyP6vYXL527i+b93RO36Vc33drsd0dei8Z9/TsOBLZdQsW4+jH1jgKmy7d5YUZjBZ1YUZpDzYTaGQX9YvwnjxyzB451KYeiLPU2InuFJ/tm6cQ++/2ozKtQsiOdG9cxS6PphzjetsR40gM6A+cyZM01YtGnTpqhRo4bHW7HSM6saMzTcq1cvR0D9fp/ROYDOa4YNG5bKlFXSr1696hhSAfSMdR+0Avr27dvxww8/mDB0ly5d8Nhjj6W6Kd+V5cuX4+DBg+Y9HDJkSKbD00uXLsWBAwfM2Kyu3bJlS1MZnO84Q+7z58/HrVu3zPedO3dG6dJ/3EMfOMcFCxbg6NGjZr58Z3hQAkP7/O24ePEijhw5gp9++smEtB/VADqf3VNQfc2aNeDvhdUUQM/4PVYPCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQQGYEPAbQDx8+itG9JuNO4r0Auo+/HV2GNkHbkHUIPL3EUXmWwfFIn1pYFJAHkckH/id+DtgBlLxdBLUPF0LOH67ibtK9cRgujq1XABsux+LS+QSk4F6SnZ+XrRWCHuFxqBA1D37ed00A3cfbjgshDZGj3TsICQlN9Vwj+r2JqF9j8dyrHdDw8domfM4WHx+PyR9+h5WzjiJPoQD885OBKFSoUKrrk5KSwGrvDMcGBgam+p6haQY+OV62bNlw69ZtU5GY1ZYZJg8NDTEBUM7fvTFUu2njNox7cQFa9SqHIRF9XKq4X716DRPemo5zx29g0EtN0TC8fprrZs3j5o2biI2LM/1yZM+O4FzBHiu7uw/E+cbF3cKtuDgkJiUZp5CQXOaZPM3d+foHCaDTgBWPGQIeNGgQgoKCzNDXrl1zVD1nSJiBYa5BTEwMGHjm/IYPH56pSthWAJ3ryDViYJcBc6sxhDx9+nSzBvTgnNwD6FxnBuZ5PcPK9MmVKxeKFi2aam1YoZrz5Xh8Ll7z888/m6reDFnzj7UfrYudK6CXLFkS586dM3845+LFi5vq8J4a159VwtmXpgwi84+Xl5ejO+fOe7Oxyrj7vTnGlStXzPecL+d9P+1BAui8H69nZfu+ffvC29vb/HYwQM0/fBZ+Z1mdPHkSc+fORbFixdC9e/f7mZ7pw3f4s88+M/+uWLEi2rZt6/F95AEE7GuFtq29z4rcXO/s2bObNWcF7tOnT5t3g3PhHNNqPNCA68K9YD2L+zq67xWuE8ePjo5Gnjx5TBjefb1YyZw+1apVQ4sWLTzennM+dOgQatasafY0vadOnWr69u7d2xHipzv3MVtUVJR5LucDOfg+8hCOnDlzOu7D94NrxGfj7ySr1vM9ZT9P7X76c37ffPON+T2tX78+ypYt6xjKMrYqoFvvMdeEvwVW43N+8MEHxobOPEDEPYDOPnxf6Mvvudc5HtfS0/ydTfh7z7XhHuAz892/33flvjesOkpAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAT+4AIeA+gMNkb0exdnjt4AM+Ih+f0w6s2nEBj7E/z3fI6wlMuwIwW3bdmwu0A/HPP1x6KolYi3xcMGG3xsPmjqF44ysflx8+s98Ll2B0i5i7v+dti6l0OUnw/WzDuKhNspSEm5C78AL7TtVxnVStpR8PBEhKZcM2H2aATjZqWnUabFsx6D0i/0fRNXLsRi6KvtEf54HUeIk4HPmVPnY+Hn+xFa0A//nvSsCRM6NwZhjxw5ikVz1qFq9fJo0bZxqnswyLgrch82r4tExeolceLIGeza+DOSE5OR57GcqN2oPJq3boygoNThdQYyd+7Yg/8eNgutelXAkIjeLuFHBh1ncY5f/4QqdYvgtXHPmICue+M8z587j+1b9mLvjuM4c+wafH3tKFYuNxo2q4Z6DWqnG0JnAHPHtt04uPcEju+7gOgrt1CoRC7UCi+LJs0bOIKpae3TBwmgL1682ARku3XrZgLWDN6yEjXDoe6tXr16aNSoEU6dOoU5c+akCpVm9B5ZAfR27dphyZIlZi1feOEFR2X7GTNmmHB548aNsWnTJhNgdQ6gM0jMgLKnxgBqp06dTIDVaqw+vWLFChPyzZs3L86cOeNyKQO//fr1M2Fnq1kBdIbPGVbnHJxb69atUblyZZfPGA7+9ttvTZDWuXFOdLUOVvjll18wa9Ys04XB3o4dO7r0X7ZsGfbv32/ekWeeeSbDdbcuzmoAnfv2008/NcFuVqNnsJthZudK5NY9OCcGzosUKYLVq1dj9+7dqQ4HSG/9Fy5caCqCc5yIiIg0A8Nnz57FzJkzzVDcJxUqVDD//v7773HixAkTBr99+7YjyG/d0/0wA37O5+I+ZUjbuXHfNWzY0ASs3fcKq7szxG1VNre+p82AAQNcAuDjxo0zYf3q1aujefPmGW1/8/x0SGv/vvjii+bZPvzwQ9OFa7Jo0SLzTvA+bGPHjjV/8/2cPXu2CYo7N4a3+R7wXXZu99Of9+AzpdU4HwbgrQB6gwYNsH37dhOsd65Yv3XrVmzYsMHse74/vLd7AH38+PEmNO/euD+4NvytsZqzCa2599yfuVevXqn+/5HhgqiDBCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlI4E8s4DGAzvD0ssWrMWvSRiQnp6Be8xLo2b89/P39sH/VNISdWQhvWwrO56iG3PX7wjdnDkxbNwOHEo6AyfEivkUwoH4fZPPyx47pK5G4/jRsd1KQUiM3qj/TGtmDAvH9Nyuxb/tZ3LlzFxXrFMDAoV3g5WXH8XUzEXBxI7Ilx+LKY21Qpklvl2q9ljUDjRED3sKlM7GI+OeTqBdewxEgZzh04rhvsGHhCZSvlQevjnsawcHBLsvE67ds2ob3X1uA1t3qYNDwzqkC6AkJiZgzfQnmfrENoQUCkHznLkLyZcPN64m4fOYWgkL9MeRvrVG/YZ1U15oA+vZd+Nfzs9G0a1kMG9XbJYzM8OSaVRvx+b9Xm3FeG98LJUqWSLWVGKafNW0hFn4dCZuXHQVL5EQKqxOfjkNIvgAMHNkatevU9BjQ5zNu3bwTU8Yvw+WzschXJCeyB/ngwulY2OzAMy+1QNMWqYP3zpPIagCdAVAGQVndmQFSNgaSWSmcQdYaNWoYD4aSWfm6VKlSjn4MKR87dgyjRo26rwrvHNsKoDNczSAuqxpXqVIFrVq1MpWQP//8cxPwZxCX83IPoLM685QpU0xgnYcVMAzLAC6D4nwWVhtnoJ2BczYrgG5ZMRDOKs7ce7wfG6uU9+nTx8FpBdCtD1iJnFWcWW2ZQVu2p59+2rHfeUjBRx99ZOZKM1ryGWjD4Czb4MGDHWHyjRs3YsuWLeZz54A1A88LFiwwnzNAXKZMmfv+ycpqAN0KRLdp0waVKlUyoe5JkyaZyvN8Fxm05zOz2jSr01v9uGcnTpxovBlKvp/GgwN4gACfi8+XXqMn14j7r1mzZqarFUC3rmMgnFXkuScs5/DwcEeonM/AIDfXh+vOZ+G8ediC1b9Lly7gQQOe9grXkHuFz899yuZe9Z0GrMzOvjyYgCHr9BqD8KtWrXIc7sA9TEM2Vv/mYQvOYWsG5a3gufVvBtCdD2LgIQoM3/MQhOPHj5t9yBD3888/bw4UYMtMfx4CwbXmfTkn54rrPEyB75YVQOdhFHz/duzYAb4nQ4cONfd7//33wd/E/v37O57XPYDO6vF8Jhpwr/F+3Gf0ZONhB9ZhEs4m/I7Px7WnHd9LXmv9brhXqb+fvak+EpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQggT+jgMcAOh+EIc1Z0xciKCgYjZvVRmhoiAn1RV+7igM/zoOffzYUrd4UoWG5TWiPQcRvf5gFf5sfWtZriUL5Ct37/MoVbJu9BimXY1FrSDvkzpvHjHMj5gY2b4rE7bjbaNYq3AQS+XlcbCx+OXkUNy+dRLk6LREYFJSm6+jB7+CXw9Ho9XxjVK1d1oQG7yQl4eSJXzDrkx+REJ+Mdn1qoFuv9h6ri++O3Is3Rn6Dzv3C0Wdwh1T3uX07Ht/PXIYZE7agSPkgtO9ZG5WqlsOVqGtYtWgbItedNuP3H9zFUX3dGoTh0vVrNmD82GVo0rkUIv42wBFeZh8TgN+8He++NA82LxsGvdwU7Tu1SDUHhiBfH/kZfH39EN66HKrXqgRvH2+sXboFy2btRZmqeTBs7FMoUCB/qmsZ4Pzo7enY9eNZ1G1eFI1b1UTu3CHYHXkAS2dGIjiPP9788EVHUNUTdFYD6FZF7qeeespUtt63bx+WL19ubsEAK4PXVrNC2wxss7lfez8vlnMAnWHn7777zlERm5XYWeG6bt26pgI6A6ruAXSGinkdw67OjQFVhoH5vadQMffsE088gZo1azouYwicYXA254C4FUBn+JhjWffiOjGczUCzcxB56dKlOHDggAk5P/fcc44DDLi3GJa/fv16qpC7Vemd796zzz5r1tYKfnOOTZs2vR9OR5+sBtDXrFljqkmPGTPGjDVv3jwTYuahA6xS7twuX75sPudvAJv7tRlN2Aols7I1g8vptalTp5qq5UWLFkWPHj1MVyuAzgA0D0vgfrWa5ck14OEFbOvXrzfBaH7GQwkYULba3LlzzYEKzqFp67AC7hXuQYbZ+W+2devWYefOnWadXnrpJcc4zu8LP+S9wsLCkD9/flNFnfuEhxI4N+5p7m22kSNHuvze8DPnsDXvx3eBVeAZJufe4/Nb680K471793YZ39q/1sEO/DKz/a1gvXXggPtaOQfQeUgA78l3j2vFwyv4G8L3Z9CgQZg2bZrHCug8AILheff2xRdfmDA9DwxgqN/dhJ/zUALLlWH56dOnm358b5zf8Yz2pL6XgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJ/JkF0gygs+rz6hXrwCBiparlHYFJBhUP7d6C7DmDULpidZdnX7x+CQJ8AxBeqyH8fO9VimbQeuf6rUi8EIOGve+F/qzPjx8/hYTbt1GxcgWXCt43YmJw/vQxlChXxQQv02pjhr6L/VsuIkewL/xz2OHlbcOdpBTE3biD3PmC0KFvDTRuWt+l0q7zWJHbd+Gtl75Dh1710W9ox1RVxG/fuo3vZy7H/Gk78MzYZmje8nFH2PTMmbN488VvUapKKJ4d2c0RnrXGp9+KZevw6etr0KRzCUS8MsjlWeiybctOjBszG4m3U9B1SB0MHNI91aNO/2oO1i88jD7DH0d443qOcOSNGzfx0dszsHfTWfQYVg9derRLNf8DBw5i0luLUaJCXgwa9iSCgu+Fqzm3pfNXY/YXW/DZvLFp+rBvVgPomzZtwubNmzF69GhjxhA4K0Q7B3PTWlcGrN977z00aNAADRs2vK/3yzmAzgrGVrV1Bmx5XwZ+GXzmfvIUQHe+CQPxDP4z8BobG2vCxqy6zLlwTmxWqJhVnD1V6ub8+RwtWrRAtWrVzDVWgLdjx44oW7asy3NZoXWGgBkeZvvggw9MMPjxxx9HnTp1XPoz5MywMxsrV1uN8/zkk0/MdQz5M4jO52BwuV+/fvdl6dwpqwF0hoMZ6OdhA2wff/yxsXQO/6Y1Gat6+sCBA5EnT54M5/zOO++YPgwVc/z0mhUQZ0CZhwOwWQF07hVWjndurILOsD+bdXCCVUXd0/7kQQccj+4vv/xyhnvFuYI4A+hW1XJeuGfPHqxdu9YcluDeuJ9ZYZ3ztX4jMxNAHzFiBAICAlyG5Z7hnmMbMGAA8ubN6/I9w98MxrOyOCuQZ7Y/B8tMAJ0HClj3ZPieBzVwD1mHWqQVQHd+F3i4QUxMjNmLBw8eNFXtCxQogL59+5puzqF8HpZgHQxgjWEdQFC8eHGwSruaBCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlI4K8gkGYAneHCFcvWomCBQqhRu5JLAP34wb3wDwhAyXKuYc9Vm1aZarVN6jZxBNAZity1bisSo2LRsFcrhykD2IcPHwdS7qJc+TIuwb/o6Gu4dPYkipau5Kj67L4YvH7kwLdx4qdrCCvkh8Awf3jBhvj4ZFy/nIAbVxNQrmY+DH+ti6kW7On6dat+wKdvLkerJ+tg0AudU1UxvxV3CzOmLMSPyw5g5L+6oGatao55XrxwEf81bDpyF/bD8690R/78+Vxuwedev3YDPnhlGZp1L4shEb1cAp902rY1EhP+vgAxV26h+7B6GDT0XkVmq7HPqyPex+3YZET8vRuKl/jtORhunjdrJWZMWG8C5uO/eilVePL7WUuxfNZP6Ny/Nlp1aOIIt9LuxPFTWLlkM57s0QwFChZIc69nNYC+YMECUwmaAXS2b775BufOnUO5cuXQoUPqavPuE2BIvHTp0vfVl9e6B9APHz6MRYsWOYatWrUqWrZsaf47rQA6r2H1bQbQPTXnwHFGAfTJkyeD4WLnquPpBdCtqu8MwFpVw61gNcO+DP06Nyukz8+GDh3qUrmdoVtWkuY6s7G6OCuop3eYQ1obIKsBdIa0Q0JCHFW0rUA+1557IL1mhb7vpy/HscZm9XOGltNrVqC4YMGC6NOnj+maXgCd348bN85Y9urVC4899pjjv7lW7oFl9ud7y8aK6TRPb684h7g9VS3nOHyPTp06ZSq304aHDFjN+UCHzATQPYWtz5w5g2+//dYMzQC9e7OeixXTWfk9s/05XmYD6HwXeY21l4ODgzFkyBAztbQC6DRauHChsfLUrAA9v8sogM4DACIjI031+aeffjrdvaUvJSABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAo+KwJ87gD7obVw6cxMDRzVHw8drm5AiQ5JHDx/H9I9X4tieK6ga/hheffvpVBXK2fdBA+j/GDYdeQr7YtjY7ihQIL/LnrivAPqWnZjwjwW4GZ2A7s/VxYDBrhXQGaB8Y8wU5Aj0x4jXeiN37jDHPTj+2pUb8PHrS5EzKCemrvh/LtWT2fGjd6Zh27qf0WtYI7Ru39hjqDSjjZzVADqrn7MK+qhRo0zVdquSMatyW1Wx07o3K7SPHz/epeJ4RvN0D6Cb5//oIxMmZ0iYgVmr4rOnALo1X17H+TKgzNApK5xv377djJOZAPpXX30FBsGrVKmCVq3uHbyQXgCd4eKpU6eafqxo7hyMZYV1zsO9WQH13r17o1ChQi5fW5W++aFz5faMHN2/z2oA3b0C+qRJk0wl6vLly6N9+/bpTsM6PGDQoEHInTt3hlO2xvZUwdz94k8//dRUhHdel4wC6Nbe6tq1q9kXXEc27mXniuXu92JgmXspvQC680ECaQXQ3cfl7wIPV4iKijJf9ejRA0WLFjWV0rm32TyNlVHYmtXN+Z6yMdieVuPBAt27dzfV0DPTn+NlNoDOa+bPn49jx46Z6XTu3NkcTMHmKYDOUPysWbPM/wv43rPaOd9jPs/PP/+Ms2fPOiq4c4yMTKzfP+egf4YbUh0kIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACf3KBNAPoDAGvXrHOVPytWKWcSwX0Q7u3IHvOIJSuWN3l8RevX4IA3wCE12roqIDOIGDkD9uQ+GsMGvR2rYB+/PgpJMbHo0Kl8i6VhG/ExOD86WMoUa5KulWbxwx9F2eORSPiX11Qt0F1xxgMof+4bismvLoMNp9kvPDPtniiWXiqpYpVNcalAAAXEklEQVTcvgtvvfQdOvSqj35DO6aqZnz71m18P3M5ln63E2Pe7oGq1as4+sTE3MBrgycjT1F/DB3dFXny5HEZn34rlq3Dp6+vQZPOJRDxyiCXZ6HLpg3bMP5v8+Ht5Y2nX2mGVm2fcBmDYcn3/usb5ArJiRf/0Q+Bgb+FkHn9mpUbMOG1xQjIFoAvl41xCSnz+/Gvf4VtP5zE4L81R7OWjT1Wa85o/2Y1gG5V9LbCsYcOHcLixYvN7RjMZSjUagxfX79+HWXLljUfnT59Gt999x2eeuopFClSJKMpmu89BdD37NmDVatWpaq67imAboXDixcvji5duriE9RkM5xwzE0D/5JNPcPPmTTzxxBOoVauWmWN6AfTjx49j3rx5JrDM0D6bVXnbU8DcuXK2e0CdQdvZs2c73BjEZZjb2fy+UAFkNYDOSvK7d+92VHNnReojR46Yd4CHAXh7ezumwL3BoLkVNl+9ejW4dlYl+IzmymflM7PSe0RERJrdGYBnWJ2tefPmqF793u9XegF0/pZwb7FZlebdK6JnNL+HHUDn/WJjY/Hxxx+bWzdt2hQ1a9Z84AA6f29mzpxpfifuxz6z/TlXK4DeunVrVK5cORXd119/jUuXLsG5mr21btmzZ8fw4cMd13gKoFtrySrt/J3h31bbsGEDtm7dmqkA+pIlS3Dw4EEULlwYPXv2zGip9b0EJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUjgkRBIM4DOarqrljOAXhgVq5RxPGxiQgIO7tqM7IGBKF2xpgvConWLEeDjj0Z1GjkC6AxwRq7fgoRzMQjv39bRnwHpo0eOIyExAZUrV3QJRzNceebkYZQqX9UEctNqowe/g3PHYzD6ze6oXa+qS7djR07hxV6fAsk2dBteCwOe7ZZqmN2Re/HGyG/QuV84+gzukOr727fj8f3MZVgwfQfGjuuGmrV+C7nHx8djdL+PkaeIP174W0+wKrBzY2Xj9Ws2YPzYZWjSuRQi/jYAfn5+ji70XTRvBb4a9yMeKxGGf0wYgLx5XUPsdPjnS5Pg7+eDl/81EIFBgY7r6Tp31nJ8+fY6hObOgc8XjQEDms5t4rszsGnZUTz9clM0a506gM4x7HZ7uhs5qwF0q7JzyZIlTaCbbfLkybh69apZawa9GRhm2JQVnVnVmNWN2awQ6ejRo12CyulN1FMAPa3+7gF0rqVV1bpv376marJzy2wA3Tno3KtXL3OIA1t6AXQr6BoaGopnnnnG9P/www9NhWYG2Blkd2779+/HsmXLUoWFGXr/7LPPTBi5Ro0apnI0P2P19+eeey7d98mTV1YD6EePHsWCBQtM9XdWG+dzMDDNeTGEXqJECXD/nTt3DnFxcWjTpg0qVapkPmM/VhZnsP5+mnVgAftaYWxP1/FQA/blnh8xYoTjfUwvgL53716sXLnSxfmjjz7CrVu3ULFiRbRt+9tvWlpzzWwAne/O5s2bzYEHzkF95/ETExPx/vvvm49YmZ2e/E1lOJ6Nax0Y+NvvBT/LqNq385jOlcbTeq7M9uc4VgX6tNbJUwA9rft7CqBb70zdunXRuHFjl0uzEkC33llP7+D97E31kYAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCfwZBdIMoDMEuXL5OhQsUBBVqv9WoZyhw6M/7YR/tgCUquBaAX35huVIvpOMJvWaIHtAdhM25Z89rIB+8SbC+7kG0A8eOAKbLQUVKpZ3sbt54wbOnT6KEmXTroDOsGXEgLdw6UwsIv75JOqF13AJsTOA/srALxEfn4C+LzZAz36dXO7B67ds2ob3X52PNt3qYuALnVNVCE9ISMTsaUuw+NudGPXGk6hTt6ajz/XrMRg76HOEFfLDiNd6IG/evC7jM0i7c/su/Ov52WjatSyGjeptAtdWY+h20oQZ2LT0FFp1r4TBI3qnuj/n+FrE+7gZnYiX3+iNwoXvBZnZWGH960/mYMHU3agaXgj//f6IVGFyBtznTdmJzoNqoX3nFo7vOe7ly1E4sP8I6jeoZcLJabWsBtA53tKlS3HgwAETQGcQnVW7GZpmKNq5MZDMQCorIp84ccIE0O833GuN8yABdOcq16yKzerYbKZK/aZNpmoy/+2pAjrXlGFfPgMbQ77Tp09HdHS0qUjvHKK2wqxWKNuaO6t3z5kzx9zD+TvLnmHs/v37OyqE82CCKVOmgMF554A/n4Ph8xs3bsAKsrOy/BdffGGC3QzCMxCfmZbVADrvwbAx50oDHo7AgwZYCZ1/Ozc6cY/wHWLYm6HvTp06oUyZ3w6+yGjOM2bMwPnz5023hg0bmrWyGn/L5s+fj1OnTpmPnKtr87+tAHrRokXRo0cPx3Wses+K4HzXKlSogHbt2pnvtmzZgo0bN5p/t2jRAtWqVXOZ3s6dO8EDAlh1ni2zAXTrQAQevsG5MsDvfBAH58X3KCoqyrzTL774oiOobh2u4P6M1t5kQJuNFc55EIR7sxwZfKdFoUKFHF3427927Vrzm25ZZLV/wYIF0adPn1T3f9AAOvc/9zz3PyugW8/IAxFoxmfIly+feZ/cTawK9/yc7yJ/v1j9nGNwD+fIkSOjbajvJSABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAo+EQJoBdIYuVy5fi7xh+VCjbmVHeJkBvsN7t8M/wB9lKtVyQVi7ZS22nYhENi9/NCxZF2e3H0UKUpB0NRZFa5ZH3fZNHP1NBfSjJ+BlB0qVLuUyTkzMdVw6cwpFy1R0BHs9ab/Q901cuRCLoa+2R/jjdRxzZAh4zsylmPfZHnj7JWPUW0+ifsPaLkOYcPEPW/H+/1uI5h1rYPDoLqbqsnPjsy6auwbzp23Gy292R5VqlR2BxsuXLuP14dMQnNcHw17pikKFCrpcawLoO/bgv4fNQqteFTAkorcjRMpQ7r6fDuGbT9cgMDgAz47qaCqCuzfOcea0+Vg95yd06l8HrTs0dVRtvnz5Mj749zSc2h+NAS89jlZt74WmnduB/fsx8V+Lkb9YMJ4Z0REF/2eODLguW7wWq+fvxn++GJWqcrrzGA8SQKfBxIkTwQDwwIEDkStXLjM0P2cldDqwcnxQUJD5nKHtr776yoRphw8fnmF1dud5PkgAneM4B5gZ9mUon5XDuQZW8xRA53cMqDKcyr+dr3Gufs5+VgCd/2Z/PjcNWDGdjT6DBw923I9ODAwzuM+xGdCmza+//moMGT5+/vnnkS1bNnMNK44zaMt9zFA8Q99sVrV0/js8PBz169dPtVfS+uBBAuhcYwblGQZmZXkrpM/3ivuXzxAWFuaY//HjxzFv3jxTzZtVvTPTGLpn8J+ebDQIDg424XHnNSlcuDB69uzpMrQVQOeHNGUgntexyjkb9wP3ozV/fvb555+b/crm5+dn1o79rXuxL4PhbFkNoDtPkuNxPblX6Ga1J598EqVK/fb7+e233+LMmTPmaz4/9w29Of+MKqDzGvpNmjTJhMzZaMG9yvtaHs5B/cz2Zzh/3bp1ZmzuW/6hI8PfvM+DBtCdDwfgs/Md45pYz8P7phVAt+bE9eR+sq5xfu8zsyfVVwISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJPBnFUg3gL5u1QaEhIahRu1KLgH0fVvXIvH6BQTkLY6UlLvw8vJB8p0kxN6MRoqXD7aeP4zaBWrgdlQcElgVOu4WgkKDERgSiLt3U+DlZYfdZsPFS9dQukxRVKpcwcUvOvoaLp07jeIZBNBH9HsTv56+iba9q6FU+cdggw1eDOieu4iF03Yg6uwtlK9VAGPf7OuoHm3dyFRA37AN419bgGYda2LwqCczH0B/YTpC8ntj2NjuKFAgv8szMLy4aeM2jHtxAWo1K4RWnerhTnIyYm/E4vTJi4jccArxt5PRc2gDtGrbLNW9rcGOHj2Gt17+Ftly+KJZp0qo27AG/Px8sW7lZsz/ejuKlQ3D6Nf7myC3e2M4dMKbM7Bn42nUaV4cHXo0QZ48YTh04Cjmfr0edi9vvDUxIt2Q/4ME0DmfCxcumHA3vRs3bow6dep4fFe2b98O3ouhUVZGzp/f1TOjF8wKoD/77LMeLZyvt6pEd+zYEWXLljVfMVzLatcMTVuNc2G499q1a6Zqt3NlbStUzD4MKDPkazUGhRmgZtDVuTFMzhAww+3827kx1Msq4AyYOzeGz2fPnm1C586NgWdWqLbC+6w0z4rNbLw3Q9zOjRXArcrzrP7sPre0fB8kgM4xIyMjTdVsBqg7d+4MPqd74wEFS5YsMeF5BpKHDBmS7p5Ma64MZq9evdoE7p0Dx+zP+zdt2hSVK1dOdbkVQOc6ci7Ohw5wH3br1s2smXPjvVgFfceOHS6BcPZhX1ZFZ9ifbd++fVi+fDkCAwPNwQDOjfPkfmRjYN0KuXM9WQme6+48H+va3Llzo23btuZQAufGsDX3MauAW83f3x8RERHmIIMPPvjAfDx27Ni0GM3e5HpYFePd9x2rq1vvDb/LbP+5c+fi5MmTLvdnQJ7vzdSpU8EK7/ytqFu3bppz5Bc8cIA+5cuXR/v27R19Fy1ahMOHD7tcSy8edsDPuab9+vUz3zuH8hm2p5/V+C42b97c455Jd2L6UgISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJPAnF0gzgM5g5NqVPyIoVy5UqVbOBDNNqDMlBSf2RyJ633LYUlJgxx3Y7DYksyivtx9yeCVhs3cYqheqh58PnMfpc1cQEJAC2OxISkpBUmIy7LYU+PjY4e3ri2Yd6qNsubKOgDuDnTdvxODaxXMoVbGao2q4uzNDmSP7v4UT+6/BP7sP7CylDpsJxMfHJYJFgouUzYUBL7RAnfquldo5Fq/fumUnxr82D2271sGA5zs5qptb90pISMSc6UuweNZOvPRGV9SsXd3R5/r1GLz6zBcIK+yL4a88hTx58rhMkVY/rN+E915aDG9fLwTk9EVy0l3cuplo5mi3A7WbFsHwV/ogNDR1eNwaLC4uDhPfm44NC07BN8COyvUKIHtOPxzYdhaJSSkYOPoJtGzd1OM2pOWyJasx/f0fEXcjEcUrhqJwqVAc2f0roi7Eodfweujeq3Oq53Ye7EED6ByLz8DQKYOlDBgz/Fyw4L2K8efPnzefMwDOzxmetip3/x7vFoPmrM7NEDHn6Fz12nk+7lWtWSGaVZO5D1hBOaPGoCufm41VuTO6hgF3WnFfcV7ugeiM7pfV7x80gM77MiTM9WfYl1W5uc4FChQw1bb5TJcuXTK/LwyHt2zZ0vFbkNU58zqOzfsyVJ7eOrKvFUCvUKEC2rRpYypyx8fHm3myknpGjfeKiooye4Uh54zWMqPx3L/n+FYFch48wMMmWKk9vcZreHAC9wkr0GfUP62xaMFxGM7mfd0PSHC/7n77MwxPM47HcdN6zzJrZfXn+8W9xfEZ0uf8PTX3qvD8bz4vDwvgHzUJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpDAX1EgzQA6w8ubN23DhbOXkS2HH1IA2G12U8GcQW+7Daait80G2Gx23IpLRL6CeRD48zysu+OHWiWaIupMNPx9YpA7fzDsvtnuBZ1TeL0ZgqMgxZZiKpen3OXfgM3LjjtJSfANyIkK1eqkG3icMG4Kju77FXa7DXeS7ppKxDZbCrx9vFC0dB40aVkHNWtXS3Ndjxw+ii8nLsQTrWqjVfvHU/Vj6Hftyo1YvSgSz4zsgPIVyjn68Lt3/+tL5C4QhJ4D2qUKODIovHfPfkx+bxHu3LkLX39v84xe3nYEZPdBwSJhaNa2HsqVL5NuOJRB+f37DmLBrHW4ePo6bl6/V2k7R7Av6jQpg579O6UbeGUgdP7sFdi34xRiribgdmwScgb7omTFfOg/pDPy5Xet0u2O8DAC6NaYrATNCsQMeDNwzsZAOkPb5cqV+1NVGnYPoD+qPx4PI4BOG74PmzZtwi+//GKqzPP94e8Bg8EMeteqVQuFChX6XRidA+jt2rX7Xeagm/4+Au4BdPP/KDUJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpDAX1wgzQA6XRgSjY2NQ3z8bRMW9fX1g4+PN5KT7yIpMRHJd1nN3A4/fz+cPXMdp07+jMLXV+DHu9lRvVgjXD0fA6+YvShWvT7ylqgEbx8fE7ZmwJx/mDj38fUzVYZZAdl8xkLq3t7Ilj2HCSen11iplnNhSDshPt4E4r29vJAte3bkyJE9w0rEDMWyknlAgL/He3FcVtKNi41DWO6wVNXYea2Xl91U7PZUYZgh66ioK/Dz9TXPnpiQcO+ZfXzN/Pz9/dOtPm49O4P1rCJ+9eo1XLsaA19vL4TmCUVYWGiaFeKd3VhtmHO9EnUF8fFJCA0LQu7cue+r0vjDDKA7z4nPxJbVysy/93urAPqDrQDf94yqaT/YHe7/agXQ79/qUeupAPqjtqJ6HglIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISeBgC6QbQM3MDhrUZKmbYmYFyHx8fEwxn0JT//rMGjTNj8Cj2jYyMNJWrq1evjkaNGj2Kj5ilZ2I19+XLl5sK3sOGDcvSGH+Gi+bNm4czZ86gc+fOKFKkyJ9hypmeowLomSZ7ZC6Ij4/HhAkTzPOMGTPmvg4EeWQeXg8iAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISSEPgoQXQJSyBv5pAcnKyCazqcIU/98pbh2dwHbmean8tAb7HbDw4RU0CEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAUABdO0CCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEjACCqBrI0hAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCAEVAAXRtBAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABIyAAujaCBKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCRgBP4/C5zgD79OML0AAAAASUVORK5CYII=";var Fgt=["input"],Pgt=["label"],Lgt=["*"],Ngt=new fi("mat-checkbox-default-options",{providedIn:"root",factory:ERe});function ERe(){return{color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1}}var tf=(function(t){return t[t.Init=0]="Init",t[t.Checked=1]="Checked",t[t.Unchecked=2]="Unchecked",t[t.Indeterminate=3]="Indeterminate",t})(tf||{}),ede=class{source;checked},IRe=ERe(),hm=(()=>{class t{_elementRef=re(Bn);_changeDetectorRef=re(Gi);_ngZone=re(_n);_animationsDisabled=Cl();_options=re(Ngt,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let i=new ede;return i.source=this,i.checked=e,i}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return`${this.id||this._uniqueId}-input`}required;labelPosition="after";name=null;change=new ve;indeterminateChange=new ve;value;disableRipple;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=tf.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){re(kl).load(hp);let e=re(new Bm("tabindex"),{optional:!0});this._options=this._options||IRe,this.color=this._options.color||IRe.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=re(ul).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(e){e.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}_checked=!1;get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}_disabled=!1;get indeterminate(){return this._indeterminate()}set indeterminate(e){let i=e!=this._indeterminate();this._indeterminate.set(e),i&&(e?this._transitionCheckState(tf.Indeterminate):this._transitionCheckState(this.checked?tf.Checked:tf.Unchecked),this.indeterminateChange.emit(e)),this._syncIndeterminate(e)}_indeterminate=Zn(!1);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorChangeFn=e}_transitionCheckState(e){let i=this._currentCheckState,o=this._getAnimationTargetElement();if(!(i===e||!o)&&(this._currentAnimationClass&&o.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(i,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){o.classList.add(this._currentAnimationClass);let r=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{o.classList.remove(r)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(!1),this.indeterminateChange.emit(!1)}),this._checked=!this._checked,this._transitionCheckState(this._checked?tf.Checked:tf.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,i){if(this._animationsDisabled)return"";switch(e){case tf.Init:if(i===tf.Checked)return this._animationClasses.uncheckedToChecked;if(i==tf.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case tf.Unchecked:return i===tf.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case tf.Checked:return i===tf.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case tf.Indeterminate:return i===tf.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let i=this._inputElement;i&&(i.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-checkbox"]],viewQuery:function(i,o){if(i&1&&(Ri(Fgt,5),Ri(Pgt,5)),i&2){let r;Le(r=Ne())&&(o._inputElement=r.first),Le(r=Ne())&&(o._labelElement=r.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(i,o){i&2&&(Rr("id",o.id),Ge("tabindex",null)("aria-label",null)("aria-labelledby",null),Oe(o.color?"mat-"+o.color:"mat-accent"),Vn("_mat-animation-noopable",o._animationsDisabled)("mdc-checkbox--disabled",o.disabled)("mat-mdc-checkbox-disabled",o.disabled)("mat-mdc-checkbox-checked",o.checked)("mat-mdc-checkbox-disabled-interactive",o.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",je],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",je],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",je],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:ln(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",je],checked:[2,"checked","checked",je],disabled:[2,"disabled","disabled",je],indeterminate:[2,"indeterminate","indeterminate",je]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[jt([{provide:Ea,useExisting:Ko(()=>t),multi:!0},{provide:$v,useExisting:t,multi:!0}]),Ot],ngContentSelectors:Lgt,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(i,o){if(i&1){let r=tt();Nn(),k(0,"div",3),ie("click",function(d){return se(r),ae(o._preventBubblingFromLabel(d))}),k(1,"div",4,0)(3,"div",5),ie("click",function(){return se(r),ae(o._onTouchTargetClick())}),D(),k(4,"input",6,1),ie("blur",function(){return se(r),ae(o._onBlur())})("click",function(){return se(r),ae(o._onInputClick())})("change",function(d){return se(r),ae(o._onInteractionEvent(d))}),D(),ce(6,"div",7),k(7,"div",8),si(),k(8,"svg",9),ce(9,"path",10),D(),K1(),ce(10,"div",11),D(),ce(11,"div",12),D(),k(12,"label",13,2),pn(14),D()()}if(i&2){let r=ti(2);E("labelPosition",o.labelPosition),T(4),Vn("mdc-checkbox--selected",o.checked),E("checked",o.checked)("indeterminate",o.indeterminate)("disabled",o.disabled&&!o.disabledInteractive)("id",o.inputId)("required",o.required)("tabIndex",o.disabled&&!o.disabledInteractive?-1:o.tabIndex),Ge("aria-label",o.ariaLabel||null)("aria-labelledby",o.ariaLabelledby)("aria-describedby",o.ariaDescribedby)("aria-checked",o.indeterminate?"mixed":null)("aria-controls",o.ariaControls)("aria-disabled",o.disabled&&o.disabledInteractive?!0:null)("aria-expanded",o.ariaExpanded)("aria-owns",o.ariaOwns)("name",o.name)("value",o.value),T(7),E("matRippleTrigger",r)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),T(),E("for",o.inputId)}},dependencies:[im,fP],styles:[`.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover>.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:hover>.mat-mdc-checkbox-ripple>.mat-ripple-element{background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mat-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active>.mdc-checkbox__native-control+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mat-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active>.mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mat-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mat-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active>.mdc-checkbox__native-control:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mat-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active>.mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control+.mdc-checkbox__ripple{background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1;width:var(--mat-checkbox-state-layer-size, 40px);height:var(--mat-checkbox-state-layer-size, 40px);top:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2);right:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2);left:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}@media(forced-colors: active){.mdc-checkbox--disabled{opacity:.5}}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mat-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));top:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mat-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mat-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox:hover>.mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover>.mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mat-checkbox-unselected-hover-icon-color, var(--mat-sys-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover>.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover>.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-hover-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-hover-icon-color, var(--mat-sys-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mat-checkbox-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-focus-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-focus-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover>.mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mat-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mat-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mat-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mat-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mat-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mat-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mat-mdc-checkbox-touch-target,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__native-control,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__ripple,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mat-mdc-checkbox-ripple::before,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__checkmark,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__mixedmark{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox .mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox .mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:var(--mat-checkbox-touch-target-size, 48px);width:var(--mat-checkbox-touch-target-size, 48px);transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display, block)}.mat-mdc-checkbox .mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-focus-indicator::before{content:""} `],encapsulation:2,changeDetection:0})}return t})(),nf=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[hm,Br,Br]})}return t})();var DRe=(()=>{class t extends oo{pFocusTrapDisabled=!1;platformId=re(Zh);document=re(Ao);firstHiddenFocusableElement;lastHiddenFocusableElement;ngOnInit(){super.ngOnInit(),ps(this.platformId)&&!this.pFocusTrapDisabled&&!this.firstHiddenFocusableElement&&!this.lastHiddenFocusableElement&&this.createHiddenFocusableElements()}ngOnChanges(e){super.ngOnChanges(e),e.pFocusTrapDisabled&&ps(this.platformId)&&(e.pFocusTrapDisabled.currentValue?this.removeHiddenFocusableElements():this.createHiddenFocusableElements())}removeHiddenFocusableElements(){this.firstHiddenFocusableElement&&this.firstHiddenFocusableElement.parentNode&&this.firstHiddenFocusableElement.parentNode.removeChild(this.firstHiddenFocusableElement),this.lastHiddenFocusableElement&&this.lastHiddenFocusableElement.parentNode&&this.lastHiddenFocusableElement.parentNode.removeChild(this.lastHiddenFocusableElement)}getComputedSelector(e){return`:not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])${e??""}`}createHiddenFocusableElements(){let i=o=>gAe("span",{class:"p-hidden-accessible p-hidden-focusable",tabindex:"0",role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:o?.bind(this)});this.firstHiddenFocusableElement=i(this.onFirstHiddenElementFocus),this.lastHiddenFocusableElement=i(this.onLastHiddenElementFocus),this.firstHiddenFocusableElement.setAttribute("data-pc-section","firstfocusableelement"),this.lastHiddenFocusableElement.setAttribute("data-pc-section","lastfocusableelement"),this.el.nativeElement.prepend(this.firstHiddenFocusableElement),this.el.nativeElement.append(this.lastHiddenFocusableElement)}onFirstHiddenElementFocus(e){let{currentTarget:i,relatedTarget:o}=e,r=o===this.lastHiddenFocusableElement||!this.el.nativeElement?.contains(o)?Vw(i.parentElement,":not(.p-hidden-focusable)"):this.lastHiddenFocusableElement;ss(r)}onLastHiddenElementFocus(e){let{currentTarget:i,relatedTarget:o}=e,r=o===this.firstHiddenFocusableElement||!this.el.nativeElement?.contains(o)?kP(i.parentElement,":not(.p-hidden-focusable)"):this.firstHiddenFocusableElement;ss(r)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","pFocusTrap",""]],inputs:{pFocusTrapDisabled:[2,"pFocusTrapDisabled","pFocusTrapDisabled",je]},features:[ft,Ot]})}return t})();var ARe=` .p-dialog { max-height: 90%; transform: scale(1); border-radius: dt('dialog.border.radius'); box-shadow: dt('dialog.shadow'); background: dt('dialog.background'); border: 1px solid dt('dialog.border.color'); color: dt('dialog.color'); } .p-dialog-content { overflow-y: auto; padding: dt('dialog.content.padding'); } .p-dialog-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; padding: dt('dialog.header.padding'); } .p-dialog-title { font-weight: dt('dialog.title.font.weight'); font-size: dt('dialog.title.font.size'); } .p-dialog-footer { flex-shrink: 0; padding: dt('dialog.footer.padding'); display: flex; justify-content: flex-end; gap: dt('dialog.footer.gap'); } .p-dialog-header-actions { display: flex; align-items: center; gap: dt('dialog.header.gap'); } .p-dialog-enter-active { transition: all 150ms cubic-bezier(0, 0, 0.2, 1); } .p-dialog-leave-active { transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); } .p-dialog-enter-from, .p-dialog-leave-to { opacity: 0; transform: scale(0.7); } .p-dialog-top .p-dialog, .p-dialog-bottom .p-dialog, .p-dialog-left .p-dialog, .p-dialog-right .p-dialog, .p-dialog-topleft .p-dialog, .p-dialog-topright .p-dialog, .p-dialog-bottomleft .p-dialog, .p-dialog-bottomright .p-dialog { margin: 0.75rem; transform: translate3d(0px, 0px, 0px); } .p-dialog-top .p-dialog-enter-active, .p-dialog-top .p-dialog-leave-active, .p-dialog-bottom .p-dialog-enter-active, .p-dialog-bottom .p-dialog-leave-active, .p-dialog-left .p-dialog-enter-active, .p-dialog-left .p-dialog-leave-active, .p-dialog-right .p-dialog-enter-active, .p-dialog-right .p-dialog-leave-active, .p-dialog-topleft .p-dialog-enter-active, .p-dialog-topleft .p-dialog-leave-active, .p-dialog-topright .p-dialog-enter-active, .p-dialog-topright .p-dialog-leave-active, .p-dialog-bottomleft .p-dialog-enter-active, .p-dialog-bottomleft .p-dialog-leave-active, .p-dialog-bottomright .p-dialog-enter-active, .p-dialog-bottomright .p-dialog-leave-active { transition: all 0.3s ease-out; } .p-dialog-top .p-dialog-enter-from, .p-dialog-top .p-dialog-leave-to { transform: translate3d(0px, -100%, 0px); } .p-dialog-bottom .p-dialog-enter-from, .p-dialog-bottom .p-dialog-leave-to { transform: translate3d(0px, 100%, 0px); } .p-dialog-left .p-dialog-enter-from, .p-dialog-left .p-dialog-leave-to, .p-dialog-topleft .p-dialog-enter-from, .p-dialog-topleft .p-dialog-leave-to, .p-dialog-bottomleft .p-dialog-enter-from, .p-dialog-bottomleft .p-dialog-leave-to { transform: translate3d(-100%, 0px, 0px); } .p-dialog-right .p-dialog-enter-from, .p-dialog-right .p-dialog-leave-to, .p-dialog-topright .p-dialog-enter-from, .p-dialog-topright .p-dialog-leave-to, .p-dialog-bottomright .p-dialog-enter-from, .p-dialog-bottomright .p-dialog-leave-to { transform: translate3d(100%, 0px, 0px); } .p-dialog-left:dir(rtl) .p-dialog-enter-from, .p-dialog-left:dir(rtl) .p-dialog-leave-to, .p-dialog-topleft:dir(rtl) .p-dialog-enter-from, .p-dialog-topleft:dir(rtl) .p-dialog-leave-to, .p-dialog-bottomleft:dir(rtl) .p-dialog-enter-from, .p-dialog-bottomleft:dir(rtl) .p-dialog-leave-to { transform: translate3d(100%, 0px, 0px); } .p-dialog-right:dir(rtl) .p-dialog-enter-from, .p-dialog-right:dir(rtl) .p-dialog-leave-to, .p-dialog-topright:dir(rtl) .p-dialog-enter-from, .p-dialog-topright:dir(rtl) .p-dialog-leave-to, .p-dialog-bottomright:dir(rtl) .p-dialog-enter-from, .p-dialog-bottomright:dir(rtl) .p-dialog-leave-to { transform: translate3d(-100%, 0px, 0px); } .p-dialog-maximized { width: 100vw !important; height: 100vh !important; top: 0px !important; left: 0px !important; max-height: 100%; height: 100%; border-radius: 0; } .p-dialog-maximized .p-dialog-content { flex-grow: 1; } .p-dialog .p-resizable-handle { position: absolute; font-size: 0.1px; display: block; cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } `;var Bgt={mask:({instance:t})=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:t.position==="left"||t.position==="topleft"||t.position==="bottomleft"?"flex-start":t.position==="right"||t.position==="topright"||t.position==="bottomright"?"flex-end":"center",alignItems:t.position==="top"||t.position==="topleft"||t.position==="topright"?"flex-start":t.position==="bottom"||t.position==="bottomleft"||t.position==="bottomright"?"flex-end":"center",pointerEvents:t.modal?"auto":"none"}),root:{display:"flex",flexDirection:"column",pointerEvents:"auto"}},Vgt={mask:({instance:t})=>{let e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find(i=>i===t.position);return["p-dialog-mask",{"p-overlay-mask p-overlay-mask-enter":t.modal},e?`p-dialog-${e}`:""]},root:({instance:t})=>["p-dialog p-component",{"p-dialog-maximized":t.maximizable&&t.maximized}],header:"p-dialog-header",title:"p-dialog-title",resizeHandle:"p-resizable-handle",headerActions:"p-dialog-header-actions",pcMaximizeButton:"p-dialog-maximize-button",pcCloseButton:"p-dialog-close-button",content:()=>["p-dialog-content"],footer:"p-dialog-footer"},kRe=(()=>{class t extends io{name="dialog";theme=ARe;classes=Vgt;inlineStyles=Bgt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Fdn=nx([al({transform:"{{transform}}",opacity:0}),uc("{{transition}}")]),Pdn=nx([uc("{{transition}}",al({transform:"{{transform}}",opacity:0}))]);var zgt=["mask"],Ugt=["content"],Hgt=["footer"],jgt=["titlebar"],Ggt=(t,n,e)=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex","justify-content":t,"align-items":n,"pointer-events":e}),$gt=t=>({"p-dialog p-component":!0,"p-dialog-maximized":t}),qgt=()=>({display:"flex","flex-direction":"column","pointer-events":"auto"}),Kgt=(t,n)=>({transform:t,transition:n}),Wgt=t=>({value:"visible",params:t});function Ygt(t,n){if(t&1){let e=tt();k(0,"div",15),ie("mousedown",function(o){se(e);let r=P(2);return ae(r.initResize(o))}),D()}t&2&&E("ngClass","p-resizable-handle")}function Qgt(t,n){t&1&&ui(0)}function Zgt(t,n){t&1&&(si(),ce(0,"svg",24))}function Xgt(t,n){}function Jgt(t,n){t&1&&ee(0,Xgt,0,0,"ng-template")}function e_t(t,n){if(t&1&&(Di(0),ee(1,Zgt,1,0,"svg",22)(2,Jgt,1,0,null,23),Ai()),t&2){let e=P(6);T(),E("ngIf",!e.maximizeIconTemplate),T(),E("ngTemplateOutlet",e.maximizeIconTemplate)}}function t_t(t,n){t&1&&(si(),ce(0,"svg",26))}function i_t(t,n){}function n_t(t,n){t&1&&ee(0,i_t,0,0,"ng-template")}function o_t(t,n){if(t&1&&(Di(0),ee(1,t_t,1,0,"svg",25)(2,n_t,1,0,null,23),Ai()),t&2){let e=P(6);T(),E("ngIf",!e.minimizeIconTemplate),T(),E("ngTemplateOutlet",e.minimizeIconTemplate)}}function r_t(t,n){if(t&1&&ee(0,e_t,3,2,"ng-container",12)(1,o_t,3,2,"ng-container",12),t&2){let e=P(5);E("ngIf",!e.maximized),T(),E("ngIf",e.maximized)}}function s_t(t,n){if(t&1){let e=tt();k(0,"p-button",21),ie("onClick",function(){se(e);let o=P(4);return ae(o.maximize())})("keydown.enter",function(){se(e);let o=P(4);return ae(o.maximize())}),ee(1,r_t,2,2,"ng-template",null,4,Pt),D()}if(t&2){let e=P(4);E("styleClass","p-dialog-maximize-button")("tabindex",e.maximizable?"0":"-1")}}function a_t(t,n){t&1&&(si(),ce(0,"svg",29))}function l_t(t,n){}function c_t(t,n){t&1&&ee(0,l_t,0,0,"ng-template")}function d_t(t,n){if(t&1&&ee(0,a_t,1,0,"svg",28)(1,c_t,1,0,null,23),t&2){let e=P(5);E("ngIf",!e.closeIconTemplate),T(),E("ngTemplateOutlet",e.closeIconTemplate)}}function u_t(t,n){if(t&1){let e=tt();k(0,"p-button",27),ie("onClick",function(){se(e);let o=P(4);return ae(o.hide())})("keydown.enter",function(){se(e);let o=P(4);return ae(o.hide())}),ee(1,d_t,2,2,"ng-template",null,4,Pt),D()}if(t&2){let e=P(4);E("styleClass","p-dialog-close-button"),Cc("ariaLabel",e.ddconfig.closeAriaLabel||e.defaultCloseAriaLabel)}}function p_t(t,n){if(t&1&&(Di(0),k(1,"span",17),Q(2),D(),k(3,"div",18),ee(4,s_t,3,2,"p-button",19)(5,u_t,3,2,"p-button",20),D(),Ai()),t&2){let e=P(3);T(),E("ngClass","p-dialog-title")("id",e.ariaLabelledBy),T(),dt(e.ddconfig.header),T(),E("ngClass","p-dialog-header-actions"),T(),E("ngIf",e.ddconfig.maximizable),T(),E("ngIf",e.closable)}}function h_t(t,n){if(t&1){let e=tt();k(0,"div",16,3),ie("mousedown",function(o){se(e);let r=P(2);return ae(r.initDrag(o))}),ee(2,Qgt,1,0,"ng-container",13)(3,p_t,6,6,"ng-container",12),D()}if(t&2){let e=P(2);E("ngClass","p-dialog-header"),T(2),E("ngComponentOutlet",e.headerTemplate),T(),E("ngIf",!e.headerTemplate)}}function m_t(t,n){}function f_t(t,n){t&1&&ee(0,m_t,0,0,"ng-template",30)}function g_t(t,n){t&1&&ui(0)}function __t(t,n){if(t&1&&(Di(0),Q(1),Ai()),t&2){let e=P(3);T(),Qi(" ",e.ddconfig.footer," ")}}function y_t(t,n){t&1&&ui(0)}function v_t(t,n){if(t&1&&(k(0,"div",18,5),ee(2,__t,2,1,"ng-container",12)(3,y_t,1,0,"ng-container",13),D()),t&2){let e=P(2);E("ngClass","p-dialog-footer"),T(2),E("ngIf",!e.footerTemplate),T(),E("ngComponentOutlet",e.footerTemplate)}}function b_t(t,n){if(t&1){let e=tt();k(0,"div",8,1),ie("@animation.start",function(o){se(e);let r=P();return ae(r.onAnimationStart(o))})("@animation.done",function(o){se(e);let r=P();return ae(r.onAnimationEnd(o))}),ee(2,Ygt,1,1,"div",9)(3,h_t,4,3,"div",10),k(4,"div",11,2),ee(6,f_t,1,0,null,12)(7,g_t,1,0,"ng-container",13),D(),ee(8,v_t,4,3,"div",14),D()}if(t&2){let e=P();$r(e.ddconfig.style),Oe(e.ddconfig.styleClass),Ir("width",e.ddconfig.width)("height",e.ddconfig.height),E("ngClass",ki(22,$gt,e.maximizable&&e.maximized))("ngStyle",uo(24,qgt))("@animation",ki(28,Wgt,Eo(25,Kgt,e.transformOptions,e.ddconfig.transitionOptions||"150ms cubic-bezier(0, 0, 0.2, 1)")))("pFocusTrapDisabled",e.ddconfig.focusTrap===!1),Ge("aria-labelledby",e.ariaLabelledBy)("aria-modal",!0)("id",e.dialogId),T(2),E("ngIf",e.ddconfig.resizable),T(),E("ngIf",e.ddconfig.showHeader!==!1),T(),E("ngClass","p-dialog-content")("ngStyle",e.ddconfig.contentStyle),T(2),E("ngIf",!e.contentTemplate),T(),E("ngComponentOutlet",e.contentTemplate),T(),E("ngIf",e.ddconfig.footer||e.footerTemplate)}}var MRe=(()=>{class t{viewContainerRef;constructor(e){this.viewContainerRef=e}static \u0275fac=function(i){return new(i||t)(_e(nc))};static \u0275dir=rn({type:t,selectors:[["","pDynamicDialogContent",""]]})}return t})(),ORe=(()=>{class t extends kRe{name="dialog";static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Us=class{data;inputValues;header;ariaLabelledBy;footer;width;height;closeOnEscape=!1;focusOnShow=!0;focusTrap=!0;baseZIndex;autoZIndex=!1;dismissableMask=!1;rtl=!1;style;contentStyle;styleClass;transitionOptions;closable=!1;showHeader=!1;modal=!1;maskStyleClass;resizable=!1;draggable=!1;keepInViewport=!1;minX;minY;maximizable=!1;maximizeIcon;minimizeIcon;position;closeAriaLabel;appendTo;duplicate=!1;breakpoints;templates},es=class{constructor(){}close(n){this._onClose.next(n),setTimeout(()=>{this._onClose.complete()},1e3)}destroy(){this._onDestroy.next(null)}dragStart(n){this._onDragStart.next(n)}dragEnd(n){this._onDragEnd.next(n)}resizeInit(n){this._onResizeInit.next(n)}resizeEnd(n){this._onResizeEnd.next(n)}maximize(n){this._onMaximize.next(n)}_onClose=new hi;onClose=this._onClose.asObservable();_onDestroy=new hi;onDestroy=this._onDestroy.asObservable();_onDragStart=new hi;onDragStart=this._onDragStart.asObservable();_onDragEnd=new hi;onDragEnd=this._onDragEnd.asObservable();_onResizeInit=new hi;onResizeInit=this._onResizeInit.asObservable();_onResizeEnd=new hi;onResizeEnd=this._onResizeEnd.asObservable();_onMaximize=new hi;onMaximize=this._onMaximize.asObservable();onChildComponentLoaded=new hi},C_t=nx([al({transform:"{{transform}}",opacity:0}),uc("{{transition}}",al({transform:"none",opacity:1}))]),x_t=nx([uc("{{transition}}",al({transform:"{{transform}}",opacity:0}))]),w_t=(()=>{class t extends oo{renderer;ddconfig;dialogRef;zone;parentDialog;visible=!0;componentRef;mask;resizing;dragging;maximized;_style={};originalStyle;lastPageX;lastPageY;ariaLabelledBy;id=Vr("pn_id_");styleElement;insertionPoint;maskViewChild;contentViewChild;footerViewChild;headerViewChild;childComponentType;inputValues;container;wrapper;documentKeydownListener;documentEscapeListener;maskClickListener;transformOptions="scale(0.7)";documentResizeListener;documentResizeEndListener;documentDragListener;documentDragEndListener;_componentStyle=re(ORe);get minX(){return this.ddconfig.minX?this.ddconfig.minX:0}get minY(){return this.ddconfig.minY?this.ddconfig.minY:0}get keepInViewport(){return this.ddconfig.keepInViewport}get maximizable(){return this.ddconfig.maximizable}get maximizeIcon(){return this.ddconfig.maximizeIcon}get minimizeIcon(){return this.ddconfig.minimizeIcon}get closable(){return this.ddconfig.closable}get style(){return this._style}get position(){return this.ddconfig.position}get defaultCloseAriaLabel(){return this.config.getTranslation(el.ARIA).close}set style(e){e&&(this._style=be({},e),this.originalStyle=e)}get parent(){let e=Array.from(this.document.getElementsByClassName("p-dialog"));if(e.length>1)return e.pop()}get parentContent(){let e=Array.from(this.document.getElementsByClassName("p-dialog"));if(e.length>0){let i=e[e.length-1].querySelector(".p-dialog-content");if(i)return Array.isArray(i)?i[0]:i}}get header(){return this.ddconfig.header}get data(){return this.ddconfig.data}get breakpoints(){return this.ddconfig.breakpoints}get footerTemplate(){return this.ddconfig?.templates?.footer}get headerTemplate(){return this.ddconfig?.templates?.header}get contentTemplate(){return this.ddconfig?.templates?.content}get minimizeIconTemplate(){return this.ddconfig?.templates?.minimizeicon}get maximizeIconTemplate(){return this.ddconfig?.templates?.maximizeicon}get closeIconTemplate(){return this.ddconfig?.templates?.closeicon}get maskClass(){let i=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find(o=>o===this.position);return{"p-dialog-mask":!0,"p-overlay-mask p-overlay-mask-enter":this.ddconfig.modal||this.ddconfig.dismissableMask,[`p-dialog-${i}`]:i}}get dialogId(){return this.attrSelector}zIndexForLayering;constructor(e,i,o,r,s){super(),this.renderer=e,this.ddconfig=i,this.dialogRef=o,this.zone=r,this.parentDialog=s}ngOnInit(){super.ngOnInit(),this.breakpoints&&this.createStyle()}createStyle(){if(ps(this.platformId)&&!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",Xv(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement);let e="";for(let i in this.breakpoints)e+=` @media screen and (max-width: ${i}) { .p-dialog[id=${this.dialogId}]:not(.p-dialog-maximized) { width: ${this.breakpoints[i]} !important; } } `;this.renderer.setProperty(this.styleElement,"innerHTML",e),Xv(this.styleElement,"nonce",this.config?.csp()?.nonce)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngAfterViewInit(){super.ngAfterViewInit(),this.loadChildComponent(this.childComponentType),this.ariaLabelledBy=this.getAriaLabelledBy(),this.cd.detectChanges()}getAriaLabelledBy(){let{header:e,showHeader:i}=this.ddconfig;return e===null||i===!1?null:Vr("pn_id_")+"_header"}loadChildComponent(e){let i=this.insertionPoint?.viewContainerRef;i?.clear(),this.componentRef=i?.createComponent(e),this.inputValues&&Object.entries(this.inputValues).forEach(([o,r])=>{this.componentRef.setInput(o,r)}),this.dialogRef.onChildComponentLoaded.next(this.componentRef.instance)}moveOnTop(){this.ddconfig.autoZIndex!==!1?(Nc.set("modal",this.container,(this.ddconfig.baseZIndex||0)+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1)):this.zIndexForLayering=Nc.generateZIndex("modal",(this.ddconfig.baseZIndex||0)+this.config.zIndex.modal)}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.moveOnTop(),this.parent&&this.unbindGlobalListeners(),this.bindGlobalListeners(),this.container?.setAttribute(this.id,""),this.ddconfig.modal!==!1&&this.enableModality(),this.ddconfig.focusOnShow!==!1&&this.focus();break;case"void":this.wrapper&&this.ddconfig.modal!==!1&&ac(this.wrapper,"p-overlay-mask-leave");break}}onAnimationEnd(e){e.toState==="void"&&(this.parentContent&&this.focus(this.parentContent),this.onContainerDestroy(),this.dialogRef.destroy())}onContainerDestroy(){this.unbindGlobalListeners(),this.container&&this.ddconfig.autoZIndex!==!1&&Nc.clear(this.container),this.zIndexForLayering&&Nc.revertZIndex(this.zIndexForLayering),this.ddconfig.modal!==!1&&this.disableModality(),this.container=null}close(){this.visible=!1,this.cd.markForCheck()}hide(){this.dialogRef&&this.dialogRef.close()}enableModality(){this.ddconfig.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.hide()})),this.ddconfig.modal!==!1&&ac(this.document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.ddconfig.dismissableMask&&this.unbindMaskClickListener(),this.ddconfig.modal!==!1&&Fd(this.document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}focus(e=this.contentViewChild.nativeElement){let i=tr.getFocusableElement(e,"[autofocus]");if(i){this.zone.runOutsideAngular(()=>{setTimeout(()=>i.focus(),5)});return}let o=tr.getFocusableElement(e);o?this.zone.runOutsideAngular(()=>{setTimeout(()=>o.focus(),5)}):this.footerViewChild?this.focus(this.footerViewChild.nativeElement):!o&&this.headerViewChild&&this.focus(this.headerViewChild.nativeElement)}maximize(){this.maximized=!this.maximized,this.maximized?ac(this.document.body,"p-overflow-hidden"):Fd(this.document.body,"p-overflow-hidden"),this.dialogRef.maximize({maximized:this.maximized})}initResize(e){this.ddconfig.resizable&&(this.documentResizeListener||this.bindDocumentResizeListeners(),this.resizing=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,ac(this.document.body,"p-unselectable-text"),this.dialogRef.resizeInit(e))}onResize(e){if(this.resizing){let i=e.pageX-this.lastPageX,o=e.pageY-this.lastPageY,r=qc(this.container),s=qm(this.container),d=qm(this.contentViewChild.nativeElement),m=r+i,v=s+o,w=this.container.style.minWidth,O=this.container.style.minHeight,N=this.container.getBoundingClientRect(),V=YI();(!parseInt(this.container.style.top)||!parseInt(this.container.style.left))&&(m+=i,v+=o),(!w||m>parseInt(w))&&N.left+mparseInt(O))&&N.top+v=this.minX&&m+i=this.minY&&v+o{this.documentDragListener=this.renderer.listen(this.document,"mousemove",this.onDrag.bind(this))})}bindDocumentDragEndListener(){ps(this.platformId)&&this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.renderer.listen(this.document,"mouseup",this.endDrag.bind(this))})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(this.documentDragEndListener(),this.documentDragListener=null)}unbindDocumentDragListener(){this.documentDragListener&&(this.documentDragListener(),this.documentDragListener=null)}bindDocumentResizeListeners(){ps(this.platformId)&&this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.renderer.listen(this.document,"mousemove",this.onResize.bind(this)),this.documentResizeEndListener=this.renderer.listen(this.document,"mouseup",this.resizeEnd.bind(this))})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(this.documentResizeListener(),this.documentResizeEndListener(),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindGlobalListeners(){this.ddconfig.closeOnEscape!==!1&&this.bindDocumentEscapeListener(),this.ddconfig.resizable&&this.bindDocumentResizeListeners(),this.ddconfig.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener())}unbindGlobalListeners(){this.unbindDocumentEscapeListener(),this.unbindDocumentResizeListeners(),this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener()}bindDocumentEscapeListener(){let e=this.maskViewChild?this.maskViewChild.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(e,"keydown",i=>{if(i.which==27){let o=Nc.getCurrent();(parseInt(this.container.style.zIndex)==o||this.zIndexForLayering==o)&&this.hide()}})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}ngOnDestroy(){this.onContainerDestroy(),this.componentRef&&this.componentRef.destroy(),this.destroyStyle(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(_e(Ps),_e(Us),_e(es),_e(_n),_e(t,12))};static \u0275cmp=ne({type:t,selectors:[["p-dynamicDialog"],["p-dynamicdialog"],["p-dynamic-dialog"]],viewQuery:function(i,o){if(i&1&&(Ri(MRe,5),Ri(zgt,5),Ri(Ugt,5),Ri(Hgt,5),Ri(jgt,5)),i&2){let r;Le(r=Ne())&&(o.insertionPoint=r.first),Le(r=Ne())&&(o.maskViewChild=r.first),Le(r=Ne())&&(o.contentViewChild=r.first),Le(r=Ne())&&(o.footerViewChild=r.first),Le(r=Ne())&&(o.headerViewChild=r.first)}},features:[jt([ORe]),ft],decls:3,vars:9,consts:[["mask",""],["container",""],["content",""],["titlebar",""],["icon",""],["footer",""],[3,"ngStyle","ngClass"],["role","dialog","pFocusTrap","",3,"ngClass","ngStyle","style","class","pFocusTrapDisabled","width","height",4,"ngIf"],["role","dialog","pFocusTrap","",3,"ngClass","ngStyle","pFocusTrapDisabled"],["style","z-index: 90;",3,"ngClass","mousedown",4,"ngIf"],[3,"ngClass","mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],[4,"ngIf"],[4,"ngComponentOutlet"],[3,"ngClass",4,"ngIf"],[2,"z-index","90",3,"mousedown","ngClass"],[3,"mousedown","ngClass"],[3,"ngClass","id"],[3,"ngClass"],["rounded","","text","",3,"styleClass","tabindex","onClick","keydown.enter",4,"ngIf"],["rounded","","text","","severity","secondary",3,"styleClass","ariaLabel","onClick","keydown.enter",4,"ngIf"],["rounded","","text","",3,"onClick","keydown.enter","styleClass","tabindex"],["data-p-icon","window-maximize",4,"ngIf"],[4,"ngTemplateOutlet"],["data-p-icon","window-maximize"],["data-p-icon","window-minimize",4,"ngIf"],["data-p-icon","window-minimize"],["rounded","","text","","severity","secondary",3,"onClick","keydown.enter","styleClass","ariaLabel"],["data-p-icon","times",4,"ngIf"],["data-p-icon","times"],["pDynamicDialogContent",""]],template:function(i,o){i&1&&(k(0,"div",6,0),ee(2,b_t,9,30,"div",7),D()),i&2&&(Oe(o.ddconfig.maskStyleClass),E("ngStyle",$d(5,Ggt,o.position==="left"||o.position==="topleft"||o.position==="bottomleft"?"flex-start":o.position==="right"||o.position==="topright"||o.position==="bottomright"?"flex-end":"center",o.position==="top"||o.position==="topleft"||o.position==="topright"?"flex-start":o.position==="bottom"||o.position==="bottomleft"||o.position==="bottomright"?"flex-end":"center",o.ddconfig.modal?"auto":"none"))("ngClass",o.maskClass),T(2),E("ngIf",o.visible))},dependencies:[On,Ns,zne,Fr,Lo,vs,In,MRe,cke,dke,am,ja,DRe],encapsulation:2,data:{animation:[xh("animation",[Rc("void => visible",[WI(C_t)]),Rc("visible => void",[WI(x_t)])])]}})}return t})();var tde=class{_parentInjector;_additionalTokens;constructor(n,e){this._parentInjector=n,this._additionalTokens=e}get(n,e,i){let o=this._additionalTokens.get(n);return o||this._parentInjector.get(n,e)}},Mo=(()=>{class t{appRef;injector;document;dialogComponentRefMap=new Map;constructor(e,i,o){this.appRef=e,this.injector=i,this.document=o}open(e,i){if(!this.duplicationPermission(e,i))return null;let o=this.appendDialogComponentToBody(i,e);return this.dialogComponentRefMap.get(o).instance.childComponentType=e,this.dialogComponentRefMap.get(o).instance.inputValues=i.inputValues,o}getInstance(e){return this.dialogComponentRefMap.get(e).instance}appendDialogComponentToBody(e,i){let o=new WeakMap;o.set(Us,e);let r=new es;o.set(es,r);let s=r.onClose.subscribe(()=>{this.dialogComponentRefMap.get(r).instance.close()}),d=r.onDestroy.subscribe(()=>{this.removeDialogComponentFromBody(r),d.unsubscribe(),s.unsubscribe()}),m=TR(w_t,{environmentInjector:this.appRef.injector,elementInjector:new tde(this.injector,o)});this.appRef.attachView(m.hostView);let v=m.hostView.rootNodes[0];return!e.appendTo||e.appendTo==="body"?this.document.body.appendChild(v):Zv(e.appendTo,v),this.dialogComponentRefMap.set(r,m),r}removeDialogComponentFromBody(e){if(!e||!this.dialogComponentRefMap.has(e))return;let i=this.dialogComponentRefMap.get(e);this.appRef.detachView(i.hostView),i.destroy(),i.changeDetectorRef.detectChanges(),this.dialogComponentRefMap.delete(e)}duplicationPermission(e,i){if(i.duplicate)return!0;let o=!0;for(let[r,s]of this.dialogComponentRefMap)if(s.instance.childComponentType===e){o=!1;break}return o}static \u0275fac=function(i){return new(i||t)(di(Rp),di(Oo),di(Ao))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();function S_t(t,n){if(t&1&&(k(0,"div",1),ce(1,"img",9),k(2,"div",2)(3,"div",10)(4,"a",11),Q(5," Als Bild speichern "),D()()()()),t&2){let e=P();T(),E("src",e.dataUrl,dc),T(3),E("href",e.dataUrl,dc)}}var RRe=(()=>{class t{constructor(e,i){this._config=e,this._document=i,this.options=[{displayName:"Oben links",value:"top-left"},{displayName:"Oben rechts",value:"top-right"},{displayName:"Unten links",value:"bottom-left"},{displayName:"Unten rechts",value:"bottom-right"}],this.loading$=new pi(1),this.legendConfig={show:!0,position:"bottom-right"},this._createMapDataUrl()}updateLegendPosition(e){this.legendConfig=mt(be({},this.legendConfig),{position:e.value}),this._createMapDataUrl()}onLegendConfigShowChange(e){this.legendConfig=mt(be({},this.legendConfig),{show:e}),this._createMapDataUrl()}_createMapDataUrl(){this.loading$.next(Gt.LOADING);let e;this._document.getElementById(this._config.data.mapRef.getContainer().id).closest(".map-wrapper")?e=this._document.getElementById(this._config.data.mapRef.getContainer().id).closest(".map-wrapper").querySelector("#map-legend"):e=this._document.getElementById("map-legend");let i=JSON.parse(JSON.stringify(e.style));e.style.background="#fff",e.style.padding="12px";let o=this._config.data.mapRef.getCanvas(),r=e.offsetWidth*window.devicePixelRatio,s=e.offsetHeight*window.devicePixelRatio,d=32,m=32;switch(this.legendConfig.position){case"top-left":{d=32,m=32;break}case"top-right":{d=o.width-r-32,m=32;break}case"bottom-left":{d=32,m=o.height-s-32;break}case"bottom-right":{d=o.width-r-32,m=o.height-s-32;break}}TRe(e).then(v=>this.legendConfig.show?Xce([{src:o.toDataURL()},{src:v,x:d,y:m},{src:Jce,y:o.height,opacity:.7}],{width:o.width,height:o.height+30}):Xce([{src:o.toDataURL()},{src:Jce,y:o.height,opacity:.7}],{width:o.width,height:o.height+30})).then(v=>{this.dataUrl=v,e.style.padding=i.padding,e.style.background=i.background,this.loading$.next(Gt.SUCCESS)}).catch(v=>{console.error(v),this.loading$.next(Gt.ERROR)})}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(Ao))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[["successTpl",""],[1,"flex","flex-col","gap-6"],[1,"flex-1"],[1,"mat-subtitle-1"],[1,"flex","flex-row"],[3,"change","checked"],["inputId","map-global-options-export-position","optionLabel","displayName","optionValue","value","fluid","","variant","filled",3,"onChange","ngModel","disabled","options"],["for","map-global-options-export-position"],[3,"loadItem","successTemplate"],["alt","Export of map",3,"src"],[1,"flex","flex-row-reverse"],["mat-raised-button","","target","_blank","download","Karte als Bild","color","accent",3,"href"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",1)(1,"div",2)(2,"h2",3),Q(3,"Karte als Bild speichern"),D(),k(4,"div",4)(5,"div",2)(6,"mat-checkbox",5),ie("change",function(d){return se(r),ae(o.onLegendConfigShowChange(d.checked))}),Q(7,"Legende "),D()(),k(8,"div",2)(9,"p-iftalabel")(10,"p-select",6),ie("onChange",function(d){return se(r),ae(o.updateLegendPosition(d))}),D(),k(11,"label",7),Q(12,"Position Legende"),D()()()()(),k(13,"div",2),ce(14,"bd-loader",8),ee(15,S_t,6,2,"ng-template",null,0,Pt),D()()}if(i&2){let r=ti(16);T(6),E("checked",o.legendConfig.show),T(4),E("ngModel",o.legendConfig.position)("disabled",!o.legendConfig.show)("options",o.options),T(4),E("loadItem",o.loading$)("successTemplate",r)}},dependencies:[Tn,yo,Kn,nf,hm,as,Ql,hr,no,Lr],encapsulation:2})}}return t})();var T_t=["mat-menu-item",""],I_t=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],E_t=["mat-icon, [matMenuItemIcon]","*"];function D_t(t,n){t&1&&(si(),k(0,"svg",2),ce(1,"polygon",3),D())}var A_t=["*"];function k_t(t,n){if(t&1){let e=tt();Go(0,"div",0),j9("click",function(){se(e);let o=P();return ae(o.closed.emit("click"))})("animationstart",function(o){se(e);let r=P();return ae(r._onAnimationStart(o.animationName))})("animationend",function(o){se(e);let r=P();return ae(r._onAnimationDone(o.animationName))})("animationcancel",function(o){se(e);let r=P();return ae(r._onAnimationDone(o.animationName))}),Go(1,"div",1),pn(2),Ho()()}if(t&2){let e=P();Oe(e._classList),Vn("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating),Rr("id",e.panelId),Ge("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var nde=new fi("MAT_MENU_PANEL"),t6=(()=>{class t{_elementRef=re(Bn);_document=re(Ao);_focusMonitor=re(gh);_parentMenu=re(nde,{optional:!0});_changeDetectorRef=re(Gi);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new hi;_focused=new hi;_highlighted=!1;_triggersSubmenu=!1;constructor(){re(kl).load(hp),this._parentMenu?.addItem?.(this)}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),i=e.querySelectorAll("mat-icon, .material-icons");for(let o=0;o{class t{_elementRef=re(Bn);_changeDetectorRef=re(Gi);_injector=re(Oo);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=Cl();_allItems;_directDescendantItems=new Hg;_classList={};_panelAnimationState="void";_animationDone=new hi;_isAnimating=!1;parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger;hasBackdrop;set panelClass(e){let i=this._previousPanelClass,o=be({},this._classList);i&&i.length&&i.split(" ").forEach(r=>{o[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{o[r]=!0}),this._elementRef.nativeElement.className=""),this._classList=o}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new ve;close=this.closed;panelId=re(ul).getId("mat-menu-panel-");constructor(){let e=re(O_t);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new e2(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(rl(this._directDescendantItems),Mn(e=>ku(...e.map(i=>i._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let i=this._keyManager;if(this._panelAnimationState==="enter"&&i.activeItem?._hasFocus()){let o=e.toArray(),r=Math.max(0,Math.min(o.length-1,i.activeItemIndex||0));o[r]&&!o[r].disabled?i.setActiveItem(r):i.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(rl(this._directDescendantItems),Mn(i=>ku(...i.map(o=>o._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let i=e.keyCode,o=this._keyManager;switch(i){case 27:pu(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(i===38||i===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Ou(()=>{let i=this._resolvePanel();if(!i||!i.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(e).setFirstItemActive(),!o.activeItem&&i&&i.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,i=this.yPosition){this._classList=mt(be({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":i==="above","mat-menu-below":i==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let i=e===uY;(i||e===ide)&&(i&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(i?"void":"enter"),this._isAnimating=!1)}_onAnimationStart(e){(e===ide||e===uY)&&(this._isAnimating=!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let i=this._resolvePanel();i&&(i.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(uY),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?ide:uY)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(rl(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(i=>i._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-menu"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,M_t,5),xt(r,t6,5),xt(r,t6,4)),i&2){let s;Le(s=Ne())&&(o.lazyContent=s.first),Le(s=Ne())&&(o._allItems=s),Le(s=Ne())&&(o.items=s)}},viewQuery:function(i,o){if(i&1&&Ri(jc,5),i&2){let r;Le(r=Ne())&&(o.templateRef=r.first)}},hostVars:3,hostBindings:function(i,o){i&2&&Ge("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",je],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:je(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[jt([{provide:nde,useExisting:t}])],ngContentSelectors:A_t,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(i,o){i&1&&(Nn(),CR(0,k_t,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none} `],encapsulation:2,changeDetection:0})}return t})(),FRe=new fi("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Oo);return()=>a0(t)}});function F_t(t){let n=re(Oo);return()=>a0(n)}var P_t={provide:FRe,deps:[],useFactory:F_t};var TL=new WeakMap,L_t=(()=>{class t{_canHaveBackdrop;_element=re(Bn);_viewContainerRef=re(nc);_menuItemInstance=re(t6,{optional:!0,self:!0});_dir=re(ad,{optional:!0});_focusMonitor=re(gh);_ngZone=re(_n);_injector=re(Oo);_scrollStrategy=re(FRe);_changeDetectorRef=re(Gi);_animationsDisabled=Cl();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=Xr.EMPTY;_menuCloseSubscription=Xr.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(i=>{this._destroyMenu(i),(i==="click"||i==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(i)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal;constructor(e){this._canHaveBackdrop=e;let i=re(nde,{optional:!0});this._parentMaterialMenu=i instanceof IL?i:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&TL.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){let i=this._menu;if(this._menuOpen||!i)return;this._pendingRemoval?.unsubscribe();let o=TL.get(i);TL.set(i,this),o&&o!==this&&o._closeMenu();let r=this._createOverlay(i),s=r.getConfig(),d=s.positionStrategy;this._setPosition(i,d),this._canHaveBackdrop?s.hasBackdrop=i.hasBackdrop==null?!this._triggersSubmenu():i.hasBackdrop:s.hasBackdrop=!1,r.hasAttached()||(r.attach(this._getPortal(i)),i.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),i.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,i.direction=this.dir,e&&i.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),i instanceof IL&&(i._setIsOpen(!0),i._directDescendantItems.changes.pipe(cs(i.close)).subscribe(()=>{d.withLockedPosition(!1).reapplyLastPosition(),d.withLockedPosition(!0)}))}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}_destroyMenu(e){let i=this._overlayRef,o=this._menu;!i||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),o instanceof IL&&this._ownsMenu(o)?(this._pendingRemoval=o._animationDone.pipe(Sn(1)).subscribe(()=>{i.detach(),TL.has(o)||o.lazyContent?.detach()}),o._setIsOpen(!1)):(i.detach(),o?.lazyContent?.detach()),o&&this._ownsMenu(o)&&TL.delete(o),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let i=this._getOverlayConfig(e);this._subscribeToPositions(e,i.positionStrategy),this._overlayRef=Ew(this._injector,i),this._overlayRef.keydownEvents().subscribe(o=>{this._menu instanceof IL&&this._menu._handleKeydown(o)})}return this._overlayRef}_getOverlayConfig(e){return new Tw({positionStrategy:Yk(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,i){e.setPositionClasses&&i.positionChanges.subscribe(o=>{this._ngZone.run(()=>{let r=o.connectionPair.overlayX==="start"?"after":"before",s=o.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(r,s)})})}_setPosition(e,i){let[o,r]=e.xPosition==="before"?["end","start"]:["start","end"],[s,d]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[m,v]=[s,d],[w,O]=[o,r],N=0;if(this._triggersSubmenu()){if(O=o=e.xPosition==="before"?"start":"end",r=w=o==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let V=this._parentMaterialMenu.items.first;this._parentInnerPadding=V?V._getHostElement().offsetTop:0}N=s==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(m=s==="top"?"bottom":"top",v=d==="top"?"bottom":"top");i.withPositions([{originX:o,originY:m,overlayX:w,overlayY:s,offsetY:N},{originX:r,originY:m,overlayX:O,overlayY:s,offsetY:N},{originX:o,originY:v,overlayX:w,overlayY:d,offsetY:-N},{originX:r,originY:v,overlayX:O,overlayY:d,offsetY:-N}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),i=this._overlayRef.detachments(),o=this._parentMaterialMenu?this._parentMaterialMenu.closed:ci(),r=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(wn(s=>this._menuOpen&&s!==this._menuItemInstance)):ci();return ku(e,o,r,i)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Nv(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return TL.get(e)===this}static \u0275fac=function(i){sV()};static \u0275dir=rn({type:t})}return t})(),PRe=(()=>{class t extends L_t{_cleanupTouchstart;_hoverSubscription=Xr.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new ve;onMenuOpen=this.menuOpened;menuClosed=new ve;onMenuClose=this.menuClosed;constructor(){super(!0);let e=re(Ps);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",i=>{Sw(i)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){ww(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let i=e.keyCode;(i===13||i===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(i===39&&this.dir==="ltr"||i===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(i,o){i&1&&ie("click",function(s){return o._handleClick(s)})("mousedown",function(s){return o._handleMousedown(s)})("keydown",function(s){return o._handleKeydown(s)}),i&2&&Ge("aria-haspopup",o.menu?"menu":null)("aria-expanded",o.menuOpen)("aria-controls",o.menuOpen?o.menu==null?null:o.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[ft]})}return t})();var pY=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[P_t],imports:[Qg,Br,Uv,Vv,Br]})}return t})(),LRe={transformMenu:{type:7,name:"transformMenu",definitions:[{type:0,name:"void",styles:{type:6,styles:{opacity:0,transform:"scale(0.8)"},offset:null}},{type:1,expr:"void => enter",animation:{type:4,styles:{type:6,styles:{opacity:1,transform:"scale(1)"},offset:null},timings:"120ms cubic-bezier(0, 0, 0.2, 1)"},options:null},{type:1,expr:"* => void",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"100ms 25ms linear"},options:null}],options:{}},fadeInItems:{type:7,name:"fadeInItems",definitions:[{type:0,name:"showing",styles:{type:6,styles:{opacity:1},offset:null}},{type:1,expr:"void => *",animation:[{type:6,styles:{opacity:0},offset:null},{type:4,styles:null,timings:"400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}},Kun=LRe.fadeInItems,Wun=LRe.transformMenu;var EL=class extends dr{constructor(){super(),this.valid=!0,this.searching=!0,this.selectCtrl=new yr,this.allOptions=new pi(1),this._onDestroy=new hi}init(n){this.placeholderLabel=`${n.selectLabel} suchen`,this.noEntriesFoundLabel=`Keine ${n.selectLabel} gefunden`,this.selectCtrl.valueChanges.pipe(cs(this._onDestroy)).subscribe(()=>{this.onSelectionChange(this.selectCtrl.value)}),n.valid$&&n.valid$.pipe(cs(this._onDestroy)).subscribe(e=>{this.valid=e.isValid,this.errorMessage=e.isValid?null:e.errorMessage??""})}setSelection(n,e){this.selectCtrl.setValue(n,e)}};var B_t=()=>["searchTerm"];function V_t(t,n){if(t&1&&(k(0,"small",2),Q(1),D()),t&2){let e=P();E("id",e.selectConfig.id+"-help"),T(),dt(e.errorMessage)}}var jl=(()=>{class t extends EL{constructor(){super(),this.initialSelection=void 0,this.selectOptions=ci([]),this.selection=new ve,this.optionsChange=new ve,this.overlayOptions={mode:"overlay",appendTo:"body"},this.selectConfig={id:"single-select",selectLabel:"Element",option:{uniqueFnc:e=>"",sortFnc:(e,i)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>""},emitEventOnInitialSelection:!1,resetOption:!1,valid$:new pi(1)},this._initialSelection$=new Uf,this._subs.push(yc([this._initialSelection$.pipe(Sn(1),vt(e=>this.transformToWrapper(e))),this.optionsChange]).subscribe(e=>{this.setSelection(e[0],{emitEvent:this.selectConfig.emitEventOnInitialSelection})}))}ngOnChanges(e){e.config&&(this.selectConfig=mt(be({id:`single-select-${this.config.selectLabel}`,emitEventOnInitialSelection:!1,valid$:new pi(1),resetOption:!1},this.config),{option:be({searchOptionDisplayName:i=>this.config.option.searchOptionDisplayName?this.config.option.searchOptionDisplayName(i):this.config.option.searchOptionAccessor(i)},this.config.option)}),this.init(this.selectConfig)),e.selectOptions&&this._updateSelectOptions(),e.initialSelection&&e.initialSelection.currentValue&&(this.initialSelection instanceof Cr?this._subs.push(this.initialSelection.subscribe(i=>{this._initialSelection$.next(i),this._initialSelection$.complete()})):(this._initialSelection$.next(this.initialSelection),this._initialSelection$.complete()))}ngOnDestroy(){this.unsubscribeAll(),this._onDestroy.next(),this._onDestroy.complete()}onSelectionChange(e){e?this.selection.emit(e.realValue):this.selection.emit(void 0)}transformToWrapper(e){return{realValue:e,dataKey:this.selectConfig.option.uniqueFnc(e),searchTerm:this.selectConfig.option.searchOptionAccessor(e),displayName:this.selectConfig.option.searchOptionDisplayName(e)}}_updateSelectOptions(){this.searching=!0,this._subs.push(this.selectOptions.pipe(vt(e=>e.map(i=>this.transformToWrapper(i)))).subscribe({next:e=>{this.allOptions.next(e.slice().sort((i,o)=>this.selectConfig.option.sortFnc(i.realValue,o.realValue))),this.searching=!1,this.optionsChange.emit(e.map(i=>i.realValue))},error:e=>{console.warn(`Laden von ${this.selectConfig.selectLabel} nicht m\xF6glich`,e)}}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-ui-single-select"]],inputs:{config:"config",initialSelection:"initialSelection",selectOptions:"selectOptions"},outputs:{selection:"selection",optionsChange:"optionsChange"},features:[ft,Ot],decls:6,vars:20,consts:[["fluid","","variant","filled","dataKey","dataKey","optionLabel","displayName","filterBy","searchTerm",3,"inputId","formControl","options","data-test","loading","showClear","filter","filterFields","filterPlaceholder","emptyFilterMessage","emptyMessage","overlayOptions"],[3,"for"],[3,"id"]],template:function(i,o){i&1&&(k(0,"p-iftalabel"),ce(1,"p-select",0),Xn(2,"async"),k(3,"label",1),Q(4),D(),qe(5,V_t,2,2,"small",2),D()),i&2&&(T(),Oe(o.valid?"mb-4":o.errorMessage?"ng-invalid ng-dirty":"mb-4 ng-invalid ng-dirty"),E("inputId",o.selectConfig.id)("formControl",o.selectCtrl)("options",Nr(2,17,o.allOptions))("data-test",o.selectConfig.id)("loading",o.searching)("showClear",o.selectConfig.resetOption)("filter",!0)("filterFields",uo(19,B_t))("filterPlaceholder",o.placeholderLabel)("emptyFilterMessage",o.noEntriesFoundLabel)("emptyMessage",o.noEntriesFoundLabel)("overlayOptions",o.overlayOptions),T(2),E("for",o.selectConfig.id),T(),dt(o.selectConfig==null?null:o.selectConfig.selectLabel),T(),Ke(o.errorMessage?5:-1))},dependencies:[xr,no,zl,as,Ql,Lp,qd],encapsulation:2,changeDetection:0})}}return t})();var z_t=()=>["searchTerm"];function U_t(t,n){if(t&1&&(k(0,"small",2),Q(1),D()),t&2){let e=P();E("id",e.selectConfig.id+"-help"),T(),dt(e.errorMessage)}}var NRe=(()=>{class t extends EL{constructor(){super(),this.initialSelection=void 0,this.selectOptions=ci([]),this.selection=new ve,this.optionsChange=new ve,this.overlayOptions={mode:"overlay",appendTo:"body"},this.selectConfig={id:"single-select-option-group",selectLabel:"Element",option:{uniqueFnc:e=>"",sortFnc:(e,i)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>"",cloneFn:e=>JSON.parse(JSON.stringify(e))},optionGroup:{uniqueFnc:e=>"",sortFnc:(e,i)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>"",cloneFn:e=>JSON.parse(JSON.stringify(e))},emitEventOnInitialSelection:!1,resetOption:!1,valid$:new pi(1)},this._initialSelection$=new Uf,this._subs.push(yc([this._initialSelection$.pipe(Sn(1),vt(e=>this.transformToWrapper(e))),this.optionsChange]).subscribe(e=>{this.setSelection(e[0],{emitEvent:this.selectConfig.emitEventOnInitialSelection})}))}ngOnChanges(e){e.config&&(this.selectConfig=mt(be({id:`single-select-option-group-${this.config.selectLabel}`,emitEventOnInitialSelection:!1,valid$:new pi(1),resetOption:!1},this.config),{option:{uniqueFnc:i=>this.config.option.uniqueFnc(i),searchOptionAccessor:i=>this.config.option.searchOptionAccessor(i),searchOptionDisplayName:i=>this.config.option.searchOptionDisplayName?this.config.option.searchOptionDisplayName(i):this.config.option.searchOptionAccessor(i),cloneFn:i=>JSON.parse(JSON.stringify(i)),sortFnc:(i,o)=>this.config.option.sortFnc(i,o)},optionGroup:{uniqueFnc:i=>this.config.optionGroup.uniqueFnc(i),searchOptionAccessor:i=>this.config.optionGroup.searchOptionAccessor(i),searchOptionDisplayName:i=>this.config.optionGroup.searchOptionDisplayName?this.config.optionGroup.searchOptionDisplayName(i):this.config.optionGroup.searchOptionAccessor(i),cloneFn:i=>JSON.parse(JSON.stringify(i)),sortFnc:(i,o)=>this.config.optionGroup.sortFnc(i,o)}}),this.init(this.selectConfig)),e.selectOptions&&this._updateSelectOptions(),e.initialSelection&&e.initialSelection.currentValue&&(this.initialSelection instanceof Cr?this._subs.push(this.initialSelection.subscribe(i=>{this._initialSelection$.next(i),this._initialSelection$.complete()})):(this._initialSelection$.next(this.initialSelection),this._initialSelection$.complete()))}ngOnDestroy(){this.unsubscribeAll(),this._onDestroy.next(),this._onDestroy.complete()}onSelectionChange(e){e?this.selection.emit(e.realValue):this.selection.emit(void 0)}transformToWrapper(e){return{realValue:e,dataKey:this.selectConfig.option.uniqueFnc(e),searchTerm:this.selectConfig.option.searchOptionAccessor(e),displayName:this.selectConfig.option.searchOptionDisplayName(e)}}_updateSelectOptions(){this.searching=!0,this.selectOptions.pipe(vt(e=>e.map(i=>({realValue:i,dataKey:this.selectConfig.optionGroup.uniqueFnc(i),searchTerm:this.selectConfig.optionGroup.searchOptionAccessor(i),displayName:this.selectConfig.optionGroup.searchOptionDisplayName(i),options:i.options.sort((o,r)=>this.selectConfig.option.sortFnc(o,r)).map(o=>this.transformToWrapper(o))})))).subscribe({next:e=>{this.allOptions.next(e.slice().sort((i,o)=>this.selectConfig.optionGroup.sortFnc(i.realValue,o.realValue))),this.searching=!1,this.optionsChange.emit(e.map(i=>i.realValue))},error:e=>{console.warn(`Laden von ${this.selectConfig.selectLabel} nicht m\xF6glich`,e)}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-ui-single-select-option-group"]],inputs:{config:"config",initialSelection:"initialSelection",selectOptions:"selectOptions"},outputs:{selection:"selection",optionsChange:"optionsChange"},features:[ft,Ot],decls:6,vars:20,consts:[["fluid","","variant","filled","dataKey","dataKey","optionLabel","displayName","optionGroupLabel","displayName","optionGroupChildren","options","filterBy","searchTerm",3,"inputId","data-test","formControl","options","showClear","filterPlaceholder","emptyFilterMessage","emptyMessage","overlayOptions","group","filter","filterFields"],[3,"for"],[3,"id"]],template:function(i,o){i&1&&(k(0,"p-iftalabel"),ce(1,"p-select",0),Xn(2,"async"),k(3,"label",1),Q(4),D(),qe(5,U_t,2,2,"small",2),D()),i&2&&(T(),Oe(o.valid?"mb-4":o.errorMessage?"ng-invalid ng-dirty":"mb-4 ng-invalid ng-dirty"),E("inputId",o.selectConfig.id)("data-test",o.selectConfig.id)("formControl",o.selectCtrl)("options",Nr(2,17,o.allOptions))("showClear",o.selectConfig.resetOption)("filterPlaceholder",o.placeholderLabel)("emptyFilterMessage",o.noEntriesFoundLabel)("emptyMessage",o.noEntriesFoundLabel)("overlayOptions",o.overlayOptions)("group",!0)("filter",!0)("filterFields",uo(19,z_t)),T(2),E("for",o.selectConfig.id),T(),dt(o.selectConfig==null?null:o.selectConfig.selectLabel),T(),Ke(o.errorMessage?5:-1))},dependencies:[xr,no,zl,Lp,as,Ql,qd],encapsulation:2})}}return t})();var BRe=(()=>{class t{constructor(e,i){this.config=e,this._ref=i,this.mapStyleInitialValue={styleKey:"streets",displayName:""},this.mapStyleConfig={id:"map-global-options-style",selectLabel:"Ansicht / Karten-Typ",option:{sortFnc:()=>0,searchOptionAccessor:o=>o.displayName,uniqueFnc:o=>o.styleKey}},this.mapStyleOptions=ci(["streets","outdoors","light","dark","satellite","satellite-streets","navigation-day","navigation-night"].map(o=>o).map(o=>({styleKey:o,displayName:m2e[o]}))),this._assertAndSetStyle("light"),this._assertAndSetStyle("dark"),this._assertAndSetStyle("navigation-day"),this._assertAndSetStyle("navigation-night"),this._assertAndSetStyle("outdoors"),this._assertAndSetStyle("streets"),this._assertAndSetStyle("satellite"),this._assertAndSetStyle("satellite-streets")}updateMapStyle(e){this.config.data.mapboxOptions.style=mW.fromStyleKey(e.styleKey),this._ref.close(this.config.data.mapboxOptions.style)}_assertAndSetStyle(e){typeof this.config.data.mapboxOptions.style=="string"&&this.config.data.mapboxOptions.style.includes(e)&&(this.mapStyleInitialValue={styleKey:e,displayName:""})}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:5,vars:3,consts:[[1,"flex","flex-col"],[1,"flex-1","grow"],[1,"mat-subtitle-1"],[3,"selection","config","initialSelection","selectOptions"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"h2",2),Q(3,"Karte"),D(),k(4,"bd-ui-single-select",3),ie("selection",function(s){return o.updateMapStyle(s)}),D()()()),i&2&&(T(4),E("config",o.mapStyleConfig)("initialSelection",o.mapStyleInitialValue)("selectOptions",o.mapStyleOptions))},dependencies:[jl],encapsulation:2})}}return t})();var ju={position:"center",modal:!0,width:"70%",closable:!0,closeOnEscape:!0,maximizable:!1,breakpoints:{"640px":"100%","768px":"90%","1024px":"85%","1280px":"80%"}};var ode=(()=>{class t{constructor(e){this._dialogService=e,this.mapboxOptionsChange=new ve}openMapOptionsDialog(){this.controller.mapRef$.pipe(vt(e=>mt(be({},ju),{header:"Karte Einstellungen",data:{mapRef:e,mapboxOptions:this.mapboxOptions}})),Mn(e=>this._dialogService.open(BRe,e).onClose),wn(e=>!!e)).subscribe(e=>{this.mapboxOptionsChange.emit(mt(be({},this.mapboxOptions),{style:e}))})}openMapExportDialog(){this.controller.mapRef$.pipe(vt(e=>mt(be({},ju),{header:"Karte als Bild",data:{mapRef:e,mapboxOptions:this.mapboxOptions}})),Mn(e=>this._dialogService.open(RRe,e).onClose)).subscribe()}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-map-global-control"]],inputs:{mapboxOptions:"mapboxOptions",controller:"controller"},outputs:{mapboxOptionsChange:"mapboxOptionsChange"},features:[jt([Mo])],decls:11,vars:3,consts:[["menu","matMenu"],["mat-icon-button","",1,"mapbox-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click","disabled"]],template:function(i,o){if(i&1){let r=tt();k(0,"button",1)(1,"mat-icon"),Q(2,"menu"),D()(),k(3,"mat-menu",null,0)(5,"button",2),ie("click",function(){return se(r),ae(o.openMapOptionsDialog())}),k(6,"span"),Q(7,"Karte"),D()(),k(8,"button",2),ie("click",function(){return se(r),ae(o.openMapExportDialog())}),k(9,"span"),Q(10,"Als Bild speichern"),D()()()}if(i&2){let r=ti(4);E("matMenuTriggerFor",r),T(5),E("disabled",!o.controller.config.global.styleMenu),T(3),E("disabled",!o.controller.config.global.exportMenu)}},dependencies:[$o,mr,Tn,xl,pY,IL,t6,PRe],styles:["[_nghost-%COMP%]{width:40px;min-width:40px;display:block;background:none;top:20px;font:12px/20px Roboto,Helvetica Neue,sans-serif;padding:0;position:absolute;right:20px;z-index:1}.mapbox-button[_ngcontent-%COMP%]{background-color:#fff;border-radius:0}"]})}}return t})();var H_t=t=>({background:t});function j_t(t,n){t&1&&(k(0,"div",3),Q(1,"-"),D())}function G_t(t,n){if(t&1&&(k(0,"div",0)(1,"div"),ce(2,"div",1),D(),k(3,"div")(4,"div",2)(5,"div",3)(6,"span",4),Q(7),Xn(8,"number"),D()(),qe(9,j_t,2,0,"div",3),k(10,"div",5)(11,"span",4),Q(12),Xn(13,"number"),D()()()()()),t&2){let e=n.$implicit;E("ngClass",e.alignment==="row"?"flex-row items-center gap-2":"flex-col"),T(2),E("ngStyle",ki(11,H_t,e.backgroundExpression)),T(5),dt(Ls(8,5,e.from,"1.0-0")),T(2),Ke(e.alignment==="row"?9:-1),T(3),dt(Ls(13,8,e.to,"1.0-0"))}}var VRe=(()=>{class t{constructor(){this.min=0,this.colorFactory=new px,this.ranges=[]}ngOnChanges(e){(e.min||e.max||e.colorFactory)&&this._updateColors(this.min,this.max)}_updateColors(e,i){switch(this.colorFactory.type){case"lightness":case"scheme":case"judgement":{let o=[this.colorFactory.getColorForValue(e,e,i)??new Cs("#ffffff"),this.colorFactory.getColorForValue(e+(i-e)*.25,e,i)??new Cs("#ffffff"),this.colorFactory.getColorForValue(e+(i-e)*.75,e,i)??new Cs("#ffffff"),this.colorFactory.getColorForValue(i,e,i)??new Cs("#ffffff")],r="90deg";this.ranges=[{from:this.min,to:this.max,alignment:"col",backgroundExpression:`linear-gradient( ${r}, ${o[0]} 0%, ${o[1]} 25%, ${o[2]} 75%, ${o[3]} 100% )`}];break}case"custom":{this.ranges=this.colorFactory.ranges.map(o=>({alignment:"row",from:o.from,to:o.to,backgroundExpression:`linear-gradient(90deg, ${o.color.toString()} 0%, ${o.color.toString()} 100%)`}));break}}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-map-feature-heat-map-color-legend"]],inputs:{min:"min",max:"max",colorFactory:"colorFactory"},features:[Ot],decls:2,vars:0,consts:[[1,"flex",3,"ngClass"],[1,"legend-item",3,"ngStyle"],[1,"flex","flex-row"],[1,"flex-1"],[1,"mat-caption"],[1,"flex-1","legend-item-label"]],template:function(i,o){i&1&&lo(0,G_t,14,13,"div",0,jo),i&2&&co(o.ranges)},dependencies:[Ns,vs,Ta],styles:["[_nghost-%COMP%]{width:100%}.legend-item[_ngcontent-%COMP%]{height:12px;width:100%;min-width:24px}.legend-item-label[_ngcontent-%COMP%]{text-align:right}"],changeDetection:0})}}return t})();var zRe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-map-legend-layer-color"]],inputs:{ref:"ref"},decls:3,vars:3,consts:[[1,"flex","flex-row","gap-6"],[3,"colorFactory","max","min"]],template:function(i,o){i&1&&(k(0,"div",0),ce(1,"div")(2,"bd-map-feature-heat-map-color-legend",1),D()),i&2&&(T(2),E("colorFactory",o.ref.colorFactory)("max",o.ref.maxValue)("min",o.ref.minValue))},dependencies:[$o,VRe],encapsulation:2,changeDetection:0})}}return t})();var URe=` .p-skeleton { display: block; overflow: hidden; background: dt('skeleton.background'); border-radius: dt('skeleton.border.radius'); } .p-skeleton::after { content: ''; animation: p-skeleton-animation 1.2s infinite; height: 100%; left: 0; position: absolute; right: 0; top: 0; transform: translateX(-100%); z-index: 1; background: linear-gradient(90deg, rgba(255, 255, 255, 0), dt('skeleton.animation.background'), rgba(255, 255, 255, 0)); } [dir='rtl'] .p-skeleton::after { animation-name: p-skeleton-animation-rtl; } .p-skeleton-circle { border-radius: 50%; } .p-skeleton-animation-none::after { animation: none; } @keyframes p-skeleton-animation { from { transform: translateX(-100%); } to { transform: translateX(100%); } } @keyframes p-skeleton-animation-rtl { from { transform: translateX(100%); } to { transform: translateX(-100%); } } `;var $_t={root:{position:"relative"}},q_t={root:({instance:t})=>["p-skeleton p-component",{"p-skeleton-circle":t.shape==="circle","p-skeleton-animation-none":t.animation==="none"}]},HRe=(()=>{class t extends io{name="skeleton";theme=URe;classes=q_t;inlineStyles=$_t;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var mm=(()=>{class t extends oo{styleClass;shape="rectangle";animation="wave";borderRadius;size;width="100%";height="1rem";_componentStyle=re(HRe);get containerStyle(){let e=this._componentStyle?.inlineStyles.root,i;return this.size?i=mt(be({},e),{width:this.size,height:this.size,borderRadius:this.borderRadius}):i=mt(be({},e),{width:this.width,height:this.height,borderRadius:this.borderRadius}),i}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-skeleton"]],hostVars:7,hostBindings:function(i,o){i&2&&(Ge("aria-hidden",!0)("data-pc-name","skeleton")("data-pc-section","root"),$r(o.containerStyle),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{styleClass:"styleClass",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},features:[jt([HRe]),ft],decls:0,vars:0,template:function(i,o){},dependencies:[On,In],encapsulation:2,changeDetection:0})}return t})(),of=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[mm,In,In]})}return t})();function K_t(t,n){t&1&&ce(0,"p-skeleton")}function W_t(t,n){if(t&1&&(k(0,"mat-icon",4),Q(1),D()),t&2){let e=P(2);E("inline",!0),T(),Qi("",e.layerInfo.visible==="visible"?"visibility":"visibility_off"," ")}}function Y_t(t,n){if(t&1&&ce(0,"img",7),t&2){let e=P(3);E("src",e.ref.icon,dc)("width",16)}}function Q_t(t,n){if(t&1&&(k(0,"mat-icon",4),Q(1),D()),t&2){let e=P(3);Ir("color",e.ref.iconColor),E("inline",!0),T(),Qi("",e.ref.icon," ")}}function Z_t(t,n){if(t&1&&qe(0,Y_t,1,2,"img",7)(1,Q_t,2,4,"mat-icon",8),t&2){let e=P(2);Ke(e.ref.refType==="image-ref"?0:1)}}function X_t(t,n){if(t&1){let e=tt();k(0,"mat-icon",9),ie("click",function(){se(e);let o=P(2);return ae(o.openActionDialog())}),Q(1,"edit "),D()}t&2&&E("inline",!0)}function J_t(t,n){if(t&1&&(k(0,"div",1),ce(1,"bd-map-legend-layer-color",10),D()),t&2){let e=P(2);T(),E("ref",e.layerRefAs(e.ref))}}function e0t(t,n){if(t&1){let e=tt();k(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),ie("click",function(){se(e);let o=P();return ae(o.onToggleChange())}),qe(4,W_t,2,2,"mat-icon",4)(5,Z_t,2,1),k(6,"span",5),Q(7),D()(),qe(8,X_t,2,1,"mat-icon",6),D()(),qe(9,J_t,2,1,"div",1),D()}if(t&2){let e=P();T(4),Ke(e.hover?4:5),T(2),Vn("visibility_off",e.layerInfo.visible==="none"),T(),dt(e.ref.text),T(),Ke(e.hover&&e.ref.legend?8:-1),T(),Ke((e.ref==null?null:e.ref.refType)==="color-factory-ref"?9:-1)}}var jRe=(()=>{class t extends dr{constructor(e,i){super(),this._dialogService=e,this._cdr=i,this.visibleChange=new ve,this.actionChange=new ve,this.hover=!1}ngOnInit(){this.layerInfo.ref.subscribe(e=>{this.ref=e,this._cdr.markForCheck()})}ngOnDestroy(){this.unsubscribeAll()}mouseover(e){this.hover=!0}mouseleave(e){this.hover=!1}layerRefAs(e){return e}onToggleChange(){this.layerInfo.visible=this.layerInfo.visible==="visible"?"none":"visible",this.visibleChange.emit(this.layerInfo.visible)}openActionDialog(){if(this.ref.legend){let e=mt(be({},ju),{header:this.ref.legend.action.title,data:mt(be({},this.ref.legend.action.data),{commands:this.ref.legend.action.commands})}),i=this._dialogService.open(this.ref.legend.action.component,e).onClose.pipe(wn(o=>!!o)).subscribe(o=>{this.actionChange.emit(o)});this._subs.push(i)}}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-map-legend-layer"]],hostBindings:function(i,o){i&1&&ie("mouseenter",function(){return o.mouseover()})("mouseleave",function(){return o.mouseleave()})},inputs:{layerInfo:"layerInfo"},outputs:{visibleChange:"visibleChange",actionChange:"actionChange"},features:[jt([Mo]),ft],decls:2,vars:1,consts:[[1,"flex","flex-col"],[1,"flex-1"],[1,"flex","flex-row","gap-2","items-center"],[1,"flex-1","flex","flex-row","gap-2","items-center","cursor-pointer",3,"click"],[3,"inline"],[1,"flex-1","mat-body"],[1,"cursor-pointer",3,"inline"],["alt","Legend Image",3,"src","width"],[3,"inline","color"],[1,"cursor-pointer",3,"click","inline"],[3,"ref"]],template:function(i,o){i&1&&qe(0,K_t,1,0,"p-skeleton")(1,e0t,10,6,"div",0),i&2&&Ke(o.ref?1:0)},dependencies:[zRe,of,mm,$o,mr],styles:[".visibility_off[_ngcontent-%COMP%]{text-decoration:line-through}"]})}}return t})();var t0t=(t,n)=>n.layerControlId;function i0t(t,n){if(t&1){let e=tt();k(0,"div",1)(1,"bd-map-legend-layer",2),ie("visibleChange",function(o){let r=se(e).$implicit,s=P();return ae(s.onVisibleChange(r.layerControlId,o))})("actionChange",function(o){let r=se(e).$implicit,s=P();return ae(s.onActionChange(r.layerControlId,o))}),D()()}if(t&2){let e=n.$implicit;T(),E("layerInfo",e)}}function n0t(t,n){if(t&1&&(k(0,"div",1),Q(1),D()),t&2){let e=n.$implicit;T(),dt(e)}}var Yp=(()=>{class t extends dr{constructor(){super(...arguments),this.staticInfo=[],this.layerInfos=[]}ngOnInit(){this._subs.push(this.controller.layerControls$.asObservable().pipe(wn(e=>e.action==="ACTIVE"),wn(e=>e.layerControl.legend.showInLegend)).subscribe(e=>{this.layerInfos.some(i=>i.layerControlId===e.layerControl.layerControlId)||(this.layerInfos.push({layerControlId:e.layerControl.layerControlId,visible:e.layerControl.visible,zIndex:e.layerControl.zIndex,ref:e.layerControl.legendRef}),this.layerInfos.sort((i,o)=>o.zIndex-i.zIndex))})),this._subs.push(this.controller.layerControls$.asObservable().pipe(wn(e=>e.action==="NOT_ACTIVE")).subscribe(e=>{this.layerInfos=this.layerInfos.filter(i=>i.layerControlId!==e.layerControl.layerControlId)}))}ngOnDestroy(){this.unsubscribeAll()}onVisibleChange(e,i){this.controller.setVisibility(e,i)}onActionChange(e,i){this.controller.setActionChange(e,i)}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})()}static{this.\u0275cmp=ne({type:t,selectors:[["bd-map-legend"]],inputs:{controller:"controller",staticInfo:"staticInfo"},features:[ft],decls:5,vars:0,consts:[["id","map-legend",1,"flex","flex-col","gap-2"],[1,"flex-1"],[3,"visibleChange","actionChange","layerInfo"]],template:function(i,o){i&1&&(k(0,"div",0),lo(1,i0t,2,1,"div",1,t0t),lo(3,n0t,2,1,"div",1,jo),D()),i&2&&(T(),co(o.layerInfos),T(2),co(o.staticInfo))},dependencies:[jRe],styles:["[_nghost-%COMP%]{width:25%;min-width:260px;display:block;background-color:#fff;border-radius:3px;bottom:20px;box-shadow:0 1px 2px #0000001a;font:12px/20px Roboto,Helvetica Neue,sans-serif;padding:10px;position:absolute;right:20px;z-index:1}"]})}}return t})();var hY=class{constructor(n){this._environmentService=n}index(){return`${this._environmentService.load("BD_DISTRICT_URL")}/postal-codes/`}findOne(n){return`${this.index()}${n}`}postalCodes(){return`${this._environmentService.load("BD_DISTRICT_URL")}/postal-codes/center-points`}};var lg=(()=>{class t{constructor(e,i,o){this._httpClient=e,this._environmentService=i,this._pluralPipe=o,this._cache={},this._store=new hY(this._environmentService)}findOne(e,i){let o=this._store.findOne(e);return this._cache[e]?this._cache[e].pipe(vt(r=>this._resolve(r,i))):(this._cache[e]=this._httpClient.get(o).pipe(vt(r=>r[e]),vt(r=>ux.fromObjectArray(r)),du(1)),this._cache[e].pipe(vt(r=>this._resolve(r,i))))}find(e=null){let i=this._store.index(),o=new Pr;return e&&(o=o.append("q",e)),this._httpClient.get(i,{params:o}).pipe(vt(r=>ux.fromObjectArray(r)))}findAll(e,i,o=!0){if(!e||e.length===0)return ci({});let r=this._store.index(),s={postalCodes:e};return this._httpClient.post(r,s).pipe(vt(d=>{let m={};return Object.keys(d).map(v=>{let w=ux.fromObjectArray(d[v]);o&&(this._cache[v]=ci(w)),m[v]=this._resolve(w,i)}),m}))}findCenterPoint(e){let i=this._store.postalCodes();return this._httpClient.post(i,{postalCodes:e}).pipe(vt(o=>{let r=new Map;return Object.entries(o).forEach(s=>r.set(s[0],s[1])),r}))}administrativeDistrictMapping(){let e=`${this._store.index()}administrative-districts/mappings/`;return this._httpClient.get(e)}_resolve(e,i){switch(i){case"DETAIL":return ux.fromObject(mt(be({},e[0]),{name:e.sort(o=>o.name===o.otlName?-1:1).map(o=>o.otlName.length>0?o.otlName:o.name).join(", ")}));case"SUMMARY":{let o=e[0],r={"=0":"","=1":"(oder ein weiterer Ortsteil)",other:"(oder einer von weiteren # Ortsteilen)"};return ux.fromObject(mt(be({},o),{name:`${o.name} ${this._pluralPipe.transform(e.length-1,r)}`}))}case"RAW":return e;default:return e[e.length-1]}}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr),di(NA))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function o0t(t,n){if(t&1&&Q(0),t&2){let e=n.$implicit,i=P();Qi(" ",i.displayPostalCodeFn(e)," ")}}var mY=(()=>{class t{constructor(e,i){this._postalCodeService=e,this._cdr=i,this.placeholderText="Postleitzahl suchen",this.postalCodeSelect=new ve,this.suggestions=[],this.displayPostalCodeFn=o=>{if(!o)return null;let r=`${o.postalCode}, `;return o.name===o.otlName||o.otlName.length===0?r.concat(o.name):r.concat(`${o.name}, ${o.otlName}`)}}onCompleteMethod(e){this._postalCodeService.find(e.query).pipe(vt(i=>i.slice(0,20)),vt(i=>i.sort((o,r)=>this._sortPostalCodes(o,r,e.query)))).subscribe(i=>{this.suggestions=i,this._cdr.markForCheck()})}onSelect(e){this.postalCodeSelect.emit(e.value)}_sortPostalCodes(e,i,o){return e.name===i.name?e.name===e.otlName?-1:i.name===i.otlName?1:0:i.name.toLowerCase().indexOf(o)-e.name.toLowerCase().indexOf(o)}static{this.\u0275fac=function(i){return new(i||t)(_e(lg),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-postal-code-autocomplete"]],inputs:{placeholderText:"placeholderText"},outputs:{postalCodeSelect:"postalCodeSelect"},decls:5,vars:4,consts:[["item",""],["inputId","postal-code-autocomplete","dataKey","postalCode","optionLabel","postalCode","fluid","","variant","filled",3,"completeMethod","onSelect","suggestions","placeholder","showClear","delay"],["for","postal-code-autocomplete"]],template:function(i,o){if(i&1){let r=tt();k(0,"p-iftalabel")(1,"p-auto-complete",1),ie("completeMethod",function(d){return se(r),ae(o.onCompleteMethod(d))})("onSelect",function(d){return se(r),ae(o.onSelect(d))}),ee(2,o0t,1,1,"ng-template",null,0,Pt),D(),ce(4,"label",2),D()}i&2&&(T(),E("suggestions",o.suggestions)("placeholder",o.placeholderText)("showClear",!0)("delay",500))},dependencies:[Th,as],encapsulation:2})}}return t})();var DL=(()=>{class t{constructor(e){this._postalCodeService=e}transform(e,...i){return this._postalCodeService.findOne(e,i[0]).pipe(rl(new ux(e,"wird geladen..",void 0,void 0,void 0)),vt(o=>o.name))}static{this.\u0275fac=function(i){return new(i||t)(_e(lg,16))}}static{this.\u0275pipe=Dd({name:"postalCode",type:t,pure:!0})}}return t})();var $Re=(()=>{class t{constructor(){this.postalCodeResolveStrategy="FIRST",this.remove=new ve}onRemove(){this.remove.emit(!0)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-maps-postal-codes-list-item"]],inputs:{postalCode:"postalCode",postalCodeResolveStrategy:"postalCodeResolveStrategy"},outputs:{remove:"remove"},decls:13,vars:7,consts:[[1,"flex","flex-row","gap-6","items-center"],[1,"mat-body-2"],[1,"flex-1"],["mat-icon-button","","color","accent",3,"click"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div")(2,"span",1),Q(3),D()(),k(4,"div",2)(5,"span",1),Q(6),Xn(7,"postalCode"),Xn(8,"async"),D()(),k(9,"div")(10,"button",3),ie("click",function(){return o.onRemove()}),k(11,"mat-icon"),Q(12,"delete_outline"),D()()()()),i&2&&(T(3),dt(o.postalCode),T(3),dt(Nr(8,5,Ls(7,2,o.postalCode,o.postalCodeResolveStrategy))))},dependencies:[Tn,xl,$o,mr,qd,DL],encapsulation:2})}}return t})();function r0t(t,n){if(t&1){let e=tt();k(0,"bd-maps-postal-codes-list-item",4),ie("remove",function(){let o=se(e),r=o.$implicit,s=o.$index,d=P(2);return ae(d.onRemove(r,s))}),D()}if(t&2){let e=n.$implicit,i=P(2);E("postalCode",e)("postalCodeResolveStrategy",i.postalCodeResolveStrategy)}}function s0t(t,n){if(t&1&&lo(0,r0t,1,2,"bd-maps-postal-codes-list-item",3,jo),t&2){let e=P();co(e.displayPostalCodes)}}function a0t(t,n){t&1&&(k(0,"div",1),ce(1,"bd-message-empty",5),D())}function l0t(t,n){if(t&1){let e=tt();k(0,"mat-paginator",6),ie("page",function(o){se(e);let r=P();return ae(r.onPageEvent(o))}),D()}if(t&2){let e=P();E("hidePageSize",!0)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("length",e.postalCodes.length)}}var Tx=(()=>{class t{constructor(e){this._cdr=e,this.postalCodeResolveStrategy="FIRST",this.postalCodesChange=new ve,this.pageIndex=0,this.pageSize=10}ngOnChanges(e){e.postalCodes&&this._updateDisplayPostalCodes()}onPageEvent(e){this.pageIndex=e.pageIndex,this._updateDisplayPostalCodes()}onRemove(e,i){let o=this.postalCodes.indexOf(e);this.postalCodes.splice(o,1),this.displayPostalCodes.splice(i,1),this.postalCodesChange.emit(this.postalCodes),this._updateDisplayPostalCodes()}_updateDisplayPostalCodes(){let e=this.pageIndex*this.pageSize,i=this.pageIndex*this.pageSize+this.pageSize;this.displayPostalCodes=this.postalCodes.slice(e,i),this._cdr.markForCheck()}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-maps-postal-codes-list"]],inputs:{postalCodes:"postalCodes",postalCodeResolveStrategy:"postalCodeResolveStrategy"},outputs:{postalCodesChange:"postalCodesChange"},features:[Ot],decls:4,vars:2,consts:[[1,"filter-postal-codes-list"],[1,"filter-postal-codes"],[3,"hidePageSize","pageSize","pageIndex","length"],[3,"postalCode","postalCodeResolveStrategy"],[3,"remove","postalCode","postalCodeResolveStrategy"],["message","Keine Postleitzahl ausgew\xE4hlt"],[3,"page","hidePageSize","pageSize","pageIndex","length"]],template:function(i,o){i&1&&(k(0,"div",0),qe(1,s0t,2,0)(2,a0t,2,0,"div",1),D(),qe(3,l0t,1,4,"mat-paginator",2)),i&2&&(T(),Ke(o.postalCodes&&o.postalCodes.length>0?1:2),T(2),Ke((o.postalCodes==null?null:o.postalCodes.length)>10?3:-1))},dependencies:[$Re,Rl,tx,Wv],styles:[".filter-postal-codes-list[_ngcontent-%COMP%]{margin:0 24px}"]})}}return t})();function fY(t,n,e=0,i=t.length-1,o=c0t){for(;i>e;){if(i-e>600){let m=i-e+1,v=n-e+1,w=Math.log(m),O=.5*Math.exp(2*w/3),N=.5*Math.sqrt(w*O*(m-O)/m)*(v-m/2<0?-1:1),V=Math.max(e,Math.floor(n-v*O/m+N)),$=Math.min(i,Math.floor(n+(m-v)*O/m+N));fY(t,n,V,$,o)}let r=t[n],s=e,d=i;for(i6(t,e,n),o(t[i],r)>0&&i6(t,e,i);s0;)d--}o(t[e],r)===0?i6(t,e,d):(d++,i6(t,d,i)),d<=n&&(e=d+1),n<=d&&(i=d-1)}}function i6(t,n,e){let i=t[n];t[n]=t[e],t[e]=i}function c0t(t,n){return tn?1:0}var r6=class{constructor(n=9){this._maxEntries=Math.max(4,n),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(n){let e=this.data,i=[];if(!_Y(n,e))return i;let o=this.toBBox,r=[];for(;e;){for(let s=0;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(o,r,e)}_split(n,e){let i=n[e],o=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,o);let s=this._chooseSplitIndex(i,r,o),d=kL(i.children.splice(s,i.children.length-s));d.height=i.height,d.leaf=i.leaf,AL(i,this.toBBox),AL(d,this.toBBox),e?n[e-1].children.push(d):this._splitRoot(i,d)}_splitRoot(n,e){this.data=kL([n,e]),this.data.height=n.height+1,this.data.leaf=!1,AL(this.data,this.toBBox)}_chooseSplitIndex(n,e,i){let o,r=1/0,s=1/0;for(let d=e;d<=i-e;d++){let m=n6(n,0,d,this.toBBox),v=n6(n,d,i,this.toBBox),w=m0t(m,v),O=rde(m)+rde(v);w=e;v--){let w=n.children[v];o6(d,n.leaf?r(w):w),m+=gY(d)}return m}_adjustParentBBoxes(n,e,i){for(let o=i;o>=0;o--)o6(e[o],n)}_condense(n){for(let e=n.length-1,i;e>=0;e--)n[e].children.length===0?e>0?(i=n[e-1].children,i.splice(i.indexOf(n[e]),1)):this.clear():AL(n[e],this.toBBox)}};function d0t(t,n,e){if(!e)return n.indexOf(t);for(let i=0;i=t.minX&&n.maxY>=t.minY}function kL(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function qRe(t,n,e,i,o){let r=[n,e];for(;r.length;){if(e=r.pop(),n=r.pop(),e-n<=i)continue;let s=n+Math.ceil((e-n)/i/2)*i;fY(t,s,n,e,o),r.push(n,s,s,e)}}var yY=class{constructor(n=[],e=(i,o)=>io?1:0){if(this.data=n,this.length=this.data.length,this.compare=e,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(n){this.data.push(n),this._up(this.length++)}pop(){if(this.length===0)return;let n=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),n}peek(){return this.data[0]}_up(n){let{data:e,compare:i}=this,o=e[n];for(;n>0;){let r=n-1>>1,s=e[r];if(i(o,s)>=0)break;e[n]=s,n=r}e[n]=o}_down(n){let{data:e,compare:i}=this,o=this.length>>1,r=e[n];for(;n=0)break;e[n]=e[s],n=s}e[n]=r}};var aFe=Ap(JRe(),1);var Pl=11102230246251565e-32,_p=134217729,s6=(3+8*Pl)*Pl;function k2(t,n,e,i,o){let r,s,d,m,v=n[0],w=i[0],O=0,N=0;w>v==w>-v?(r=v,v=n[++O]):(r=w,w=i[++N]);let V=0;if(Ov==w>-v?(s=v+r,d=r-(s-v),v=n[++O]):(s=w+r,d=r-(s-w),w=i[++N]),r=s,d!==0&&(o[V++]=d);Ov==w>-v?(s=r+v,m=s-r,d=r-(s-m)+(v-m),v=n[++O]):(s=r+w,m=s-r,d=r-(s-m)+(w-m),w=i[++N]),r=s,d!==0&&(o[V++]=d);for(;O=Xi||-Qt>=Xi||(O=t-yt,d=t-(yt+O)+(O-o),O=e-We,v=e-(We+O)+(O-o),O=n-Et,m=n-(Et+O)+(O-r),O=i-we,w=i-(we+O)+(O-r),d===0&&m===0&&v===0&&w===0)||(Xi=_0t*s+s6*Math.abs(Qt),Qt+=yt*w+we*d-(Et*v+We*m),Qt>=Xi||-Qt>=Xi))return Qt;Fe=d*we,N=_p*d,V=N-(N-d),$=d-V,N=_p*we,q=N-(N-we),W=we-q,Re=$*W-(Fe-V*q-$*q-V*W),Se=m*We,N=_p*m,V=N-(N-m),$=m-V,N=_p*We,q=N-(N-We),W=We-q,ke=$*W-(Se-V*q-$*q-V*W),te=Re-ke,O=Re-te,cg[0]=Re-(te+O)+(O-ke),fe=Fe+te,O=fe-Fe,xe=Fe-(fe-O)+(te-O),te=xe-Se,O=xe-te,cg[1]=xe-(te+O)+(O-Se),Xe=fe+te,O=Xe-fe,cg[2]=fe-(Xe-O)+(te-O),cg[3]=Xe;let ei=k2(4,ML,4,cg,eFe);Fe=yt*w,N=_p*yt,V=N-(N-yt),$=yt-V,N=_p*w,q=N-(N-w),W=w-q,Re=$*W-(Fe-V*q-$*q-V*W),Se=Et*v,N=_p*Et,V=N-(N-Et),$=Et-V,N=_p*v,q=N-(N-v),W=v-q,ke=$*W-(Se-V*q-$*q-V*W),te=Re-ke,O=Re-te,cg[0]=Re-(te+O)+(O-ke),fe=Fe+te,O=fe-Fe,xe=Fe-(fe-O)+(te-O),te=xe-Se,O=xe-te,cg[1]=xe-(te+O)+(O-Se),Xe=fe+te,O=Xe-fe,cg[2]=fe-(Xe-O)+(te-O),cg[3]=Xe;let li=k2(ei,eFe,4,cg,tFe);Fe=d*w,N=_p*d,V=N-(N-d),$=d-V,N=_p*w,q=N-(N-w),W=w-q,Re=$*W-(Fe-V*q-$*q-V*W),Se=m*v,N=_p*m,V=N-(N-m),$=m-V,N=_p*v,q=N-(N-v),W=v-q,ke=$*W-(Se-V*q-$*q-V*W),te=Re-ke,O=Re-te,cg[0]=Re-(te+O)+(O-ke),fe=Fe+te,O=fe-Fe,xe=Fe-(fe-O)+(te-O),te=xe-Se,O=xe-te,cg[1]=xe-(te+O)+(O-Se),Xe=fe+te,O=Xe-fe,cg[2]=fe-(Xe-O)+(te-O),cg[3]=Xe;let zt=k2(li,tFe,4,cg,iFe);return iFe[zt-1]}function ade(t,n,e,i,o,r){let s=(n-r)*(e-o),d=(t-o)*(i-r),m=s-d,v=Math.abs(s+d);return Math.abs(m)>=f0t*v?m:-y0t(t,n,e,i,o,r,v)}var hfn=(7+56*Pl)*Pl,mfn=(3+28*Pl)*Pl,ffn=(26+288*Pl)*Pl*Pl,gfn=Jn(4),_fn=Jn(4),yfn=Jn(4),vfn=Jn(4),bfn=Jn(4),Cfn=Jn(4),xfn=Jn(4),wfn=Jn(4),Sfn=Jn(4),Tfn=Jn(8),Ifn=Jn(8),Efn=Jn(8),Dfn=Jn(4),Afn=Jn(8),kfn=Jn(8),Mfn=Jn(8),Ofn=Jn(12),Rfn=Jn(192),Ffn=Jn(192);var Nfn=(10+96*Pl)*Pl,Bfn=(4+48*Pl)*Pl,Vfn=(44+576*Pl)*Pl*Pl,zfn=Jn(4),Ufn=Jn(4),Hfn=Jn(4),jfn=Jn(4),Gfn=Jn(4),$fn=Jn(4),qfn=Jn(4),Kfn=Jn(4),Wfn=Jn(8),Yfn=Jn(8),Qfn=Jn(8),Zfn=Jn(8),Xfn=Jn(8),Jfn=Jn(8),egn=Jn(8),tgn=Jn(8),ign=Jn(8),ngn=Jn(4),ogn=Jn(4),rgn=Jn(4),sgn=Jn(8),agn=Jn(16),lgn=Jn(16),cgn=Jn(16),dgn=Jn(32),ugn=Jn(32),pgn=Jn(48),hgn=Jn(64),mgn=Jn(1152),fgn=Jn(1152);var vgn=(16+224*Pl)*Pl,bgn=(5+72*Pl)*Pl,Cgn=(71+1408*Pl)*Pl*Pl,xgn=Jn(4),wgn=Jn(4),Sgn=Jn(4),Tgn=Jn(4),Ign=Jn(4),Egn=Jn(4),Dgn=Jn(4),Agn=Jn(4),kgn=Jn(4),Mgn=Jn(4),Ogn=Jn(24),Rgn=Jn(24),Fgn=Jn(24),Pgn=Jn(24),Lgn=Jn(24),Ngn=Jn(24),Bgn=Jn(24),Vgn=Jn(24),zgn=Jn(24),Ugn=Jn(24),Hgn=Jn(1152),jgn=Jn(1152),Ggn=Jn(1152),$gn=Jn(1152),qgn=Jn(1152),Kgn=Jn(2304),Wgn=Jn(2304),Ygn=Jn(3456),Qgn=Jn(5760),Zgn=Jn(8),Xgn=Jn(8),Jgn=Jn(8),e_n=Jn(16),t_n=Jn(24),i_n=Jn(48),n_n=Jn(48),o_n=Jn(96),r_n=Jn(192),s_n=Jn(384),a_n=Jn(384),l_n=Jn(384),c_n=Jn(768);var d_n=Jn(96),u_n=Jn(96),p_n=Jn(96),h_n=Jn(1152);function ude(t,n,e){n=Math.max(0,n===void 0?2:n),e=e||0;let i=S0t(t),o=new r6(16);o.toBBox=function(N){return{minX:N[0],minY:N[1],maxX:N[0],maxY:N[1]}},o.compareMinX=function(N,V){return N[0]-V[0]},o.compareMinY=function(N,V){return N[1]-V[1]},o.load(t);let r=[],s;for(let N=0;Nr||d.push({node:w,dist:O})}for(;d.length&&!d.peek().node.children;){let v=d.pop(),w=v.node,O=dde(w,n,e),N=dde(w,i,o);if(v.dist=n.minX&&t[0]<=n.maxX&&t[1]>=n.minY&&t[1]<=n.maxY}function rFe(t,n,e){let i=Math.min(t[0],n[0]),o=Math.min(t[1],n[1]),r=Math.max(t[0],n[0]),s=Math.max(t[1],n[1]),d=e.search({minX:i,minY:o,maxX:r,maxY:s});for(let m=0;m0!=OL(t,n,i)>0&&OL(e,i,t)>0!=OL(e,i,n)>0}function lde(t){let n=t.p,e=t.next.p;return t.minX=Math.min(n[0],e[0]),t.minY=Math.min(n[1],e[1]),t.maxX=Math.max(n[0],e[0]),t.maxY=Math.max(n[1],e[1]),t}function S0t(t){let n=t[0],e=t[0],i=t[0],o=t[0];for(let d=0;di[0]&&(i=m),m[1]o[1]&&(o=m)}let r=[n,e,i,o],s=r.slice();for(let d=0;d1?(i=e[0],o=e[1]):d>0&&(i+=r*d,o+=s*d)}return r=t[0]-i,s=t[1]-o,r*r+s*s}function bY(t,n,e,i,o,r,s,d){let m=e-t,v=i-n,w=s-o,O=d-r,N=t-o,V=n-r,$=m*m+v*v,q=m*w+v*O,W=w*w+O*O,te=m*N+v*V,fe=w*N+O*V,xe=$*W-q*q,Fe,Re,Se=xe,ke=xe;xe===0?(Fe=0,Se=1,Re=fe,ke=W):(Fe=q*fe-W*te,Re=$*fe-q*te,Fe<0?(Fe=0,Re=fe,ke=W):Fe>Se&&(Fe=Se,Re=fe+q,ke=W)),Re<0?(Re=0,-te<0?Fe=0:-te>$?Fe=Se:(Fe=-te,Se=$)):Re>ke&&(Re=ke,-te+q<0?Fe=0:-te+q>$?Fe=Se:(Fe=-te+q,Se=$));let Xe=Fe===0?0:Fe/Se,yt=Re===0?0:Re/ke,We=(1-Xe)*t+Xe*e,Et=(1-Xe)*n+Xe*i,we=(1-yt)*o+yt*s,Qt=(1-yt)*r+yt*d,Xi=we-We,ei=Qt-Et;return Xi*Xi+ei*ei}function T0t(t,n){return t[0]===n[0]?t[1]-n[1]:t[0]-n[0]}function I0t(t){t.sort(T0t);let n=[];for(let i=0;i=2&&OL(n[n.length-2],n[n.length-1],t[i])<=0;)n.pop();n.push(t[i])}let e=[];for(let i=t.length-1;i>=0;i--){for(;e.length>=2&&OL(e[e.length-2],e[e.length-1],t[i])<=0;)e.pop();e.push(t[i])}return e.pop(),n.pop(),n.concat(e)}function pde(t,n){n===void 0&&(n={}),n.concavity=n.concavity||1/0;var e=[];if(Zw(t,function(o){e.push([o[0],o[1]])}),!e.length)return null;var i=ude(e,n.concavity);return i.length>3?tW([i]):null}function E0t(t,n){n===void 0&&(n={});var e=0,i=0,o=0;return Zw(t,function(r){e+=r[0],i+=r[1],o++},!0),Qm([e/o,i/o],n.properties)}var hde=E0t;function lFe(t,n){switch(n===void 0&&(n={}),S2e(t)){case"Point":return Qm(ZP(t),n.properties);case"Polygon":var e=[];Zw(t,function(Fe){e.push(Fe)});var i=hde(t,{properties:n.properties}),o=i.geometry.coordinates,r=0,s=0,d=0,m,v,w,O,N,V,$,q,W=e.map(function(Fe){return[Fe[0]-o[0],Fe[1]-o[1]]});for(m=0;mt[1]!=v>t[1]&&t[0]<(m-s)*(t[1]-d)/(v-d)+s;O&&(i=!i)}return i}function D0t(t,n){return n[0]<=t[0]&&n[1]<=t[1]&&n[2]>=t[0]&&n[3]>=t[1]}function A0t(t){if(!t)throw new Error("geojson is required");var n=[];return cE(t,function(e){k0t(e,n)}),bd(n)}function k0t(t,n){var e=[],i=t.geometry;if(i!==null){switch(i.type){case"Polygon":e=v2(i);break;case"LineString":e=[v2(i)]}e.forEach(function(o){var r=M0t(o,t.properties);r.forEach(function(s){s.id=n.length,n.push(s)})})}}function M0t(t,n){var e=[];return t.reduce(function(i,o){var r=mz([i,o],n);return r.bbox=O0t(i,o),e.push(r),o}),e}function O0t(t,n){var e=t[0],i=t[1],o=n[0],r=n[1],s=eo?e:o,v=i>r?i:r;return[s,d,m,v]}var mde=A0t;var UFe=Ap(VFe(),1);function Myt(t,n){var e={},i=[];if(t.type==="LineString"&&(t=wh(t)),n.type==="LineString"&&(n=wh(n)),t.type==="Feature"&&n.type==="Feature"&&t.geometry!==null&&n.geometry!==null&&t.geometry.type==="LineString"&&n.geometry.type==="LineString"&&t.geometry.coordinates.length===2&&n.geometry.coordinates.length===2){var o=zFe(t,n);return o&&i.push(o),bd(i)}var r=(0,UFe.default)();return r.load(mde(n)),ule(mde(t),function(s){ule(r.search(s),function(d){var m=zFe(s,d);if(m){var v=v2(m).join(",");e[v]||(e[v]=!0,i.push(m))}})}),bd(i)}function zFe(t,n){var e=v2(t),i=v2(n);if(e.length!==2)throw new Error(" line1 must only contain 2 coordinates");if(i.length!==2)throw new Error(" line2 must only contain 2 coordinates");var o=e[0][0],r=e[0][1],s=e[1][0],d=e[1][1],m=i[0][0],v=i[0][1],w=i[1][0],O=i[1][1],N=(O-v)*(s-o)-(w-m)*(d-r),V=(w-m)*(r-v)-(O-v)*(o-m),$=(s-o)*(r-v)-(d-r)*(o-m);if(N===0)return null;var q=V/N,W=$/N;if(q>=0&&q<=1&&W>=0&&W<=1){var te=o+q*(s-o),fe=r+q*(d-r);return Qm([te,fe])}return null}var DY=Myt;function AY(t,n){n===void 0&&(n={});var e=XP(t);switch(!n.properties&&t.type==="Feature"&&(n.properties=t.properties),e.type){case"Polygon":return Oyt(e,n);case"MultiPolygon":return Ryt(e,n);default:throw new Error("invalid poly")}}function Oyt(t,n){n===void 0&&(n={});var e=XP(t),i=e.coordinates,o=n.properties?n.properties:t.type==="Feature"?t.properties:{};return HFe(i,o)}function Ryt(t,n){n===void 0&&(n={});var e=XP(t),i=e.coordinates,o=n.properties?n.properties:t.type==="Feature"?t.properties:{},r=[];return i.forEach(function(s){r.push(HFe(s,o))}),bd(r)}function HFe(t,n){return t.length>1?t2e(t,n):mz(t[0],n)}function Fyt(t,n){var e=!0;return cE(t,function(i){cE(n,function(o){if(e===!1)return!1;e=Pyt(i.geometry,o.geometry)})}),e}function Pyt(t,n){switch(t.type){case"Point":switch(n.type){case"Point":return!Vyt(t.coordinates,n.coordinates);case"LineString":return!jFe(n,t);case"Polygon":return!M2(t,n)}break;case"LineString":switch(n.type){case"Point":return!jFe(t,n);case"LineString":return!Lyt(t,n);case"Polygon":return!GFe(n,t)}break;case"Polygon":switch(n.type){case"Point":return!M2(n,t);case"LineString":return!GFe(t,n);case"Polygon":return!Nyt(n,t)}}return!1}function jFe(t,n){for(var e=0;e0}function GFe(t,n){for(var e=0,i=n.coordinates;e0}function Nyt(t,n){for(var e=0,i=t.coordinates[0];e0}function Byt(t,n,e){var i=e[0]-t[0],o=e[1]-t[1],r=n[0]-t[0],s=n[1]-t[1],d=i*s-o*r;return d!==0?!1:Math.abs(r)>=Math.abs(s)?r>0?t[0]<=e[0]&&e[0]<=n[0]:n[0]<=e[0]&&e[0]<=t[0]:s>0?t[1]<=e[1]&&e[1]<=n[1]:n[1]<=e[1]&&e[1]<=t[1]}function Vyt(t,n){return t[0]===n[0]&&t[1]===n[1]}var $Fe=Fyt;function FL(t,n){var e=!1;return cE(t,function(i){cE(n,function(o){if(e===!0)return!0;e=!$Fe(i.geometry,o.geometry)})}),e}var Ex=class extends uE{constructor(n=e_.id,e){super(n,e),this._mostlyInRange$=new Gs(!0),this._bounds$=new pi(1),yc([this._bounds$,this._mostlyInRange$]).pipe(Vo(i=>super.onChangedBounds(i[0])),Mn(i=>vB(Wh(this.mapRef,"idle").pipe(Sn(1),vt(()=>i)),ci(i).pipe(bB(2e3))))).subscribe(i=>{this._updatePossibleSelectionByInput(i[0],i[1])})}highlightLayer(){return mt(be({},nb),{id:this.config.highlightLayerId,source:this.config.sourceId})}updateMostlyInRange(n){this._mostlyInRange$.next(n)}compareFn(n,e){return vo.equals(n,e)}baseFilterExpression(n){return["in","plz",...n]}propertiesToValueFn(n){return n.plz}layer(){return mt(be({},e_),{id:this.config.layerId,source:this.config.sourceId})}source(){return{sourceId:this.config.sourceId,sourceData:be({},eW)}}onChangedBounds(n){super.onChangedBounds(n),this._bounds$.next(n)}_updatePossibleSelectionByInput(n,e){let r=this.mapRef.queryRenderedFeatures(n.toPointLikeArray(this.mapRef),{layers:[this.config.highlightLayerId]}).filter(s=>{let d=s.geometry,m=n.origin.features.map(w=>w.geometry),v=i2e(m);if(e){let w=cFe(d);return FL(w,v)}else return FL(d,v)}).map(s=>s.properties).map(s=>s.plz);this.possibleSelection$.next(r)}};var O2=class{constructor(n=JK,e=dx,i=1){this.layerId=n,this.sourceId=e,this.zIndex=i,this.geoJsonPropertiesKey="plz",this.displayName="Postleitzahlen",this.popup={popupType:"default",messagePrefix:"Anzahl: ",titleFnc:o=>o.properties.note,messageFnc:(o,r)=>r?r[o.properties.plz]:null}}},R2=class extends qP{constructor(n,e,i){super(n,e),this.config=e,this._postalCodeService=i}layer(){return mt(be({},e_),{id:this.config.layerId})}source(){return{sourceId:this.config.sourceId,sourceData:mt(be({},eW),{id:this.config.sourceId})}}initBounds(){this.bounds=this.data$.asObservable().pipe(Vo(()=>console.debug(`[${this.layerControlId}] update bounds`)),Mn(n=>this._postalCodeService.findCenterPoint(Object.keys(n))),vt(n=>Array.from(n.values()).map(e=>Qm([e.lon,e.lat]))),vt(n=>t_.fromBbox(n_(bd(n)),bd(n))),vt(n=>n.bounds))}};var kY=(()=>{class t{constructor(){this.selectedPostalCodes=[],this.selectedPostalCodesChange=new ve,this.mapOptions=lm,this.mapController=new Jd,this._handler=new Ex(nb.id,{layerId:e_.id,highlightLayerId:nb.id,sourceId:dx,displayName:"Auswahl Postleitzahlen"}),this.mapOptions.zoom=5,this._handler.selection.changed.subscribe(e=>this.selectedPostalCodesChange.emit(e.source.selected)),this.mapController.registerLayer(this._handler)}ngOnChanges(e){this._handler.selection.setSelection(...this.selectedPostalCodes)}onMapLoaded(e){this.mapController.addMapRef(e)}onMapClicked(e){this._handler.click(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-maps-postal-codes-map-selection"]],inputs:{selectedPostalCodes:"selectedPostalCodes"},outputs:{selectedPostalCodesChange:"selectedPostalCodesChange"},features:[Ot],decls:3,vars:2,consts:[[1,"map-wrapper"],[3,"mapClick","mapLoaded","mapOptions"],[3,"controller"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"bd-map",1),ie("mapClick",function(s){return o.onMapClicked(s)})("mapLoaded",function(s){return o.onMapLoaded(s)}),D(),ce(2,"bd-map-legend",2),D()),i&2&&(T(),E("mapOptions",o.mapOptions),T(),E("controller",o.mapController))},dependencies:[eu,Yp],styles:[".map-wrapper[_ngcontent-%COMP%]{height:600px;position:relative}"]})}}return t})();var qFe=` .p-checkbox { position: relative; display: inline-flex; user-select: none; vertical-align: bottom; width: dt('checkbox.width'); height: dt('checkbox.height'); } .p-checkbox-input { cursor: pointer; appearance: none; position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 100%; height: 100%; padding: 0; margin: 0; opacity: 0; z-index: 1; outline: 0 none; border: 1px solid transparent; border-radius: dt('checkbox.border.radius'); } .p-checkbox-box { display: flex; justify-content: center; align-items: center; border-radius: dt('checkbox.border.radius'); border: 1px solid dt('checkbox.border.color'); background: dt('checkbox.background'); width: dt('checkbox.width'); height: dt('checkbox.height'); transition: background dt('checkbox.transition.duration'), color dt('checkbox.transition.duration'), border-color dt('checkbox.transition.duration'), box-shadow dt('checkbox.transition.duration'), outline-color dt('checkbox.transition.duration'); outline-color: transparent; box-shadow: dt('checkbox.shadow'); } .p-checkbox-icon { transition-duration: dt('checkbox.transition.duration'); color: dt('checkbox.icon.color'); font-size: dt('checkbox.icon.size'); width: dt('checkbox.icon.size'); height: dt('checkbox.icon.size'); } .p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box { border-color: dt('checkbox.hover.border.color'); } .p-checkbox-checked .p-checkbox-box { border-color: dt('checkbox.checked.border.color'); background: dt('checkbox.checked.background'); } .p-checkbox-checked .p-checkbox-icon { color: dt('checkbox.icon.checked.color'); } .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box { background: dt('checkbox.checked.hover.background'); border-color: dt('checkbox.checked.hover.border.color'); } .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-icon { color: dt('checkbox.icon.checked.hover.color'); } .p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box { border-color: dt('checkbox.focus.border.color'); box-shadow: dt('checkbox.focus.ring.shadow'); outline: dt('checkbox.focus.ring.width') dt('checkbox.focus.ring.style') dt('checkbox.focus.ring.color'); outline-offset: dt('checkbox.focus.ring.offset'); } .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box { border-color: dt('checkbox.checked.focus.border.color'); } .p-checkbox.p-invalid > .p-checkbox-box { border-color: dt('checkbox.invalid.border.color'); } .p-checkbox.p-variant-filled .p-checkbox-box { background: dt('checkbox.filled.background'); } .p-checkbox-checked.p-variant-filled .p-checkbox-box { background: dt('checkbox.checked.background'); } .p-checkbox-checked.p-variant-filled:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box { background: dt('checkbox.checked.hover.background'); } .p-checkbox.p-disabled { opacity: 1; } .p-checkbox.p-disabled .p-checkbox-box { background: dt('checkbox.disabled.background'); border-color: dt('checkbox.checked.disabled.border.color'); } .p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon { color: dt('checkbox.icon.disabled.color'); } .p-checkbox-sm, .p-checkbox-sm .p-checkbox-box { width: dt('checkbox.sm.width'); height: dt('checkbox.sm.height'); } .p-checkbox-sm .p-checkbox-icon { font-size: dt('checkbox.icon.sm.size'); width: dt('checkbox.icon.sm.size'); height: dt('checkbox.icon.sm.size'); } .p-checkbox-lg, .p-checkbox-lg .p-checkbox-box { width: dt('checkbox.lg.width'); height: dt('checkbox.lg.height'); } .p-checkbox-lg .p-checkbox-icon { font-size: dt('checkbox.icon.lg.size'); width: dt('checkbox.icon.lg.size'); height: dt('checkbox.icon.lg.size'); } `;var Uyt=["icon"],Hyt=["input"],jyt=(t,n)=>({checked:t,class:n});function Gyt(t,n){if(t&1&&ce(0,"span",7),t&2){let e=P(3);Oe(e.cx("icon")),E("ngClass",e.checkboxIcon),Ge("data-pc-section","icon")}}function $yt(t,n){if(t&1&&(si(),ce(0,"svg",8)),t&2){let e=P(3);Oe(e.cx("icon")),Ge("data-pc-section","icon")}}function qyt(t,n){if(t&1&&(Di(0),ee(1,Gyt,1,4,"span",5)(2,$yt,1,3,"svg",6),Ai()),t&2){let e=P(2);T(),E("ngIf",e.checkboxIcon),T(),E("ngIf",!e.checkboxIcon)}}function Kyt(t,n){if(t&1&&(si(),ce(0,"svg",9)),t&2){let e=P(2);Oe(e.cx("icon")),Ge("data-pc-section","icon")}}function Wyt(t,n){if(t&1&&(Di(0),ee(1,qyt,3,2,"ng-container",2)(2,Kyt,1,3,"svg",4),Ai()),t&2){let e=P();T(),E("ngIf",e.checked),T(),E("ngIf",e._indeterminate())}}function Yyt(t,n){}function Qyt(t,n){t&1&&ee(0,Yyt,0,0,"ng-template")}var Zyt=` ${qFe} /* For PrimeNG */ p-checkBox.ng-invalid.ng-dirty .p-checkbox-box, p-check-box.ng-invalid.ng-dirty .p-checkbox-box, p-checkbox.ng-invalid.ng-dirty .p-checkbox-box { border-color: dt('checkbox.invalid.border.color'); } `,Xyt={root:({instance:t})=>["p-checkbox p-component",{"p-checkbox-checked p-highlight":t.checked,"p-disabled":t.$disabled(),"p-invalid":t.invalid(),"p-variant-filled":t.$variant()==="filled","p-checkbox-sm p-inputfield-sm":t.size()==="small","p-checkbox-lg p-inputfield-lg":t.size()==="large"}],box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon"},KFe=(()=>{class t extends io{name="checkbox";theme=Zyt;classes=Xyt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Jyt={provide:Ea,useExisting:Ko(()=>dg),multi:!0},dg=(()=>{class t extends Wm{value;binary;ariaLabelledBy;ariaLabel;tabindex;inputId;inputStyle;styleClass;inputClass;indeterminate=!1;formControl;checkboxIcon;readonly;autofocus;trueValue=!0;falseValue=!1;variant=mo();size=mo();onChange=new ve;onFocus=new ve;onBlur=new ve;inputViewChild;get checked(){return this._indeterminate()?!1:this.binary?this.modelValue()===this.trueValue:DAe(this.value,this.modelValue())}_indeterminate=Zn(void 0);checkboxIconTemplate;templates;_checkboxIconTemplate;focused=!1;_componentStyle=re(KFe);$variant=bo(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"icon":this._checkboxIconTemplate=e.template;break;case"checkboxicon":this._checkboxIconTemplate=e.template;break}})}ngOnChanges(e){super.ngOnChanges(e),e.indeterminate&&this._indeterminate.set(e.indeterminate.currentValue)}updateModel(e){let i,o=this.injector.get(Vu,null,{optional:!0,self:!0}),r=o&&!this.formControl?o.value:this.modelValue();this.binary?(i=this._indeterminate()?this.trueValue:this.checked?this.falseValue:this.trueValue,this.writeModelValue(i),this.onModelChange(i)):(this.checked||this._indeterminate()?i=r.filter(s=>!Sc(s,this.value)):i=r?[...r,this.value]:[this.value],this.onModelChange(i),this.writeModelValue(i),this.formControl&&this.formControl.setValue(i)),this._indeterminate()&&this._indeterminate.set(!1),this.onChange.emit({checked:i,originalEvent:e})}handleChange(e){this.readonly||this.updateModel(e)}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeControlValue(e,i){i(e),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-checkbox"],["p-checkBox"],["p-check-box"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Uyt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.checkboxIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&Ri(Hyt,5),i&2){let r;Le(r=Ne())&&(o.inputViewChild=r.first)}},hostVars:5,hostBindings:function(i,o){i&2&&(Ge("data-p-highlight",o.checked)("data-p-checked",o.checked)("data-p-disabled",o.$disabled()),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{value:"value",binary:[2,"binary","binary",je],ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:[2,"tabindex","tabindex",ln],inputId:"inputId",inputStyle:"inputStyle",styleClass:"styleClass",inputClass:"inputClass",indeterminate:[2,"indeterminate","indeterminate",je],formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:[2,"readonly","readonly",je],autofocus:[2,"autofocus","autofocus",je],trueValue:"trueValue",falseValue:"falseValue",variant:[1,"variant"],size:[1,"size"]},outputs:{onChange:"onChange",onFocus:"onFocus",onBlur:"onBlur"},features:[jt([Jyt,KFe]),ft,Ot],decls:5,vars:22,consts:[["input",""],["type","checkbox",3,"focus","blur","change","checked"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","minus",3,"class",4,"ngIf"],[3,"class","ngClass",4,"ngIf"],["data-p-icon","check",3,"class",4,"ngIf"],[3,"ngClass"],["data-p-icon","check"],["data-p-icon","minus"]],template:function(i,o){if(i&1){let r=tt();k(0,"input",1,0),ie("focus",function(d){return se(r),ae(o.onInputFocus(d))})("blur",function(d){return se(r),ae(o.onInputBlur(d))})("change",function(d){return se(r),ae(o.handleChange(d))}),D(),k(2,"div"),ee(3,Wyt,3,2,"ng-container",2)(4,Qyt,1,0,null,3),D()}i&2&&($r(o.inputStyle),Oe(o.cn(o.cx("input"),o.inputClass)),E("checked",o.checked),Ge("id",o.inputId)("value",o.value)("name",o.name())("tabindex",o.tabindex)("required",o.required()?"":void 0)("readonly",o.readonly?"":void 0)("disabled",o.$disabled()?"":void 0)("aria-labelledby",o.ariaLabelledBy)("aria-label",o.ariaLabel),T(2),Oe(o.cx("box")),T(),E("ngIf",!o.checkboxIconTemplate&&!o._checkboxIconTemplate),T(),E("ngTemplateOutlet",o.checkboxIconTemplate||o._checkboxIconTemplate)("ngTemplateOutletContext",Eo(19,jyt,o.checked,o.cx("icon"))))},dependencies:[On,Ns,Fr,Lo,In,sx,ske],encapsulation:2,changeDetection:0})}return t})(),WFe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[dg,In,In]})}return t})();var tvt=["data-p-icon","filter-fill"],YFe=(()=>{class t extends wr{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","data-p-icon","filter-fill"]],features:[ft],attrs:tvt,decls:1,vars:0,consts:[["d","M13.7274 0.33847C13.6228 0.130941 13.4095 0 13.1764 0H0.82351C0.590451 0 0.377157 0.130941 0.272568 0.33847C0.167157 0.545999 0.187746 0.795529 0.325275 0.98247L4.73527 6.99588V13.3824C4.73527 13.7233 5.01198 14 5.35292 14H8.64704C8.98798 14 9.26469 13.7233 9.26469 13.3824V6.99588L13.6747 0.98247C13.8122 0.795529 13.8328 0.545999 13.7274 0.33847Z","fill","currentColor"]],template:function(i,o){i&1&&(si(),to(0,"path",0))},encapsulation:2})}return t})();var QFe=` .p-inputnumber { display: inline-flex; position: relative; } .p-inputnumber-button { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; cursor: pointer; background: dt('inputnumber.button.background'); color: dt('inputnumber.button.color'); width: dt('inputnumber.button.width'); transition: background dt('inputnumber.transition.duration'), color dt('inputnumber.transition.duration'), border-color dt('inputnumber.transition.duration'), outline-color dt('inputnumber.transition.duration'); } .p-inputnumber-button:disabled { cursor: auto; } .p-inputnumber-button:not(:disabled):hover { background: dt('inputnumber.button.hover.background'); color: dt('inputnumber.button.hover.color'); } .p-inputnumber-button:not(:disabled):active { background: dt('inputnumber.button.active.background'); color: dt('inputnumber.button.active.color'); } .p-inputnumber-stacked .p-inputnumber-button { position: relative; flex: 1 1 auto; border: 0 none; } .p-inputnumber-stacked .p-inputnumber-button-group { display: flex; flex-direction: column; position: absolute; inset-block-start: 1px; inset-inline-end: 1px; height: calc(100% - 2px); z-index: 1; } .p-inputnumber-stacked .p-inputnumber-increment-button { padding: 0; border-start-end-radius: calc(dt('inputnumber.button.border.radius') - 1px); } .p-inputnumber-stacked .p-inputnumber-decrement-button { padding: 0; border-end-end-radius: calc(dt('inputnumber.button.border.radius') - 1px); } .p-inputnumber-horizontal .p-inputnumber-button { border: 1px solid dt('inputnumber.button.border.color'); } .p-inputnumber-horizontal .p-inputnumber-button:hover { border-color: dt('inputnumber.button.hover.border.color'); } .p-inputnumber-horizontal .p-inputnumber-button:active { border-color: dt('inputnumber.button.active.border.color'); } .p-inputnumber-horizontal .p-inputnumber-increment-button { order: 3; border-start-end-radius: dt('inputnumber.button.border.radius'); border-end-end-radius: dt('inputnumber.button.border.radius'); border-inline-start: 0 none; } .p-inputnumber-horizontal .p-inputnumber-input { order: 2; border-radius: 0; } .p-inputnumber-horizontal .p-inputnumber-decrement-button { order: 1; border-start-start-radius: dt('inputnumber.button.border.radius'); border-end-start-radius: dt('inputnumber.button.border.radius'); border-inline-end: 0 none; } .p-floatlabel:has(.p-inputnumber-horizontal) label { margin-inline-start: dt('inputnumber.button.width'); } .p-inputnumber-vertical { flex-direction: column; } .p-inputnumber-vertical .p-inputnumber-button { border: 1px solid dt('inputnumber.button.border.color'); padding: dt('inputnumber.button.vertical.padding'); } .p-inputnumber-vertical .p-inputnumber-button:hover { border-color: dt('inputnumber.button.hover.border.color'); } .p-inputnumber-vertical .p-inputnumber-button:active { border-color: dt('inputnumber.button.active.border.color'); } .p-inputnumber-vertical .p-inputnumber-increment-button { order: 1; border-start-start-radius: dt('inputnumber.button.border.radius'); border-start-end-radius: dt('inputnumber.button.border.radius'); width: 100%; border-block-end: 0 none; } .p-inputnumber-vertical .p-inputnumber-input { order: 2; border-radius: 0; text-align: center; } .p-inputnumber-vertical .p-inputnumber-decrement-button { order: 3; border-end-start-radius: dt('inputnumber.button.border.radius'); border-end-end-radius: dt('inputnumber.button.border.radius'); width: 100%; border-block-start: 0 none; } .p-inputnumber-input { flex: 1 1 auto; } .p-inputnumber-fluid { width: 100%; } .p-inputnumber-fluid .p-inputnumber-input { width: 1%; } .p-inputnumber-fluid.p-inputnumber-vertical .p-inputnumber-input { width: 100%; } .p-inputnumber:has(.p-inputtext-sm) .p-inputnumber-button .p-icon { font-size: dt('form.field.sm.font.size'); width: dt('form.field.sm.font.size'); height: dt('form.field.sm.font.size'); } .p-inputnumber:has(.p-inputtext-lg) .p-inputnumber-button .p-icon { font-size: dt('form.field.lg.font.size'); width: dt('form.field.lg.font.size'); height: dt('form.field.lg.font.size'); } .p-inputnumber-clear-icon { position: absolute; top: 50%; margin-top: -0.5rem; cursor: pointer; inset-inline-end: dt('form.field.padding.x'); color: dt('form.field.icon.color'); } .p-inputnumber-stacked .p-inputnumber-clear-icon, .p-inputnumber-horizontal .p-inputnumber-clear-icon { inset-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x')); } `;var ivt=["clearicon"],nvt=["incrementbuttonicon"],ovt=["decrementbuttonicon"],rvt=["input"];function svt(t,n){if(t&1){let e=tt();si(),k(0,"svg",7),ie("click",function(){se(e);let o=P(2);return ae(o.clear())}),D()}if(t&2){let e=P(2);Oe(e.cx("clearIcon")),Ge("data-pc-section","clearIcon")}}function avt(t,n){}function lvt(t,n){t&1&&ee(0,avt,0,0,"ng-template")}function cvt(t,n){if(t&1){let e=tt();k(0,"span",8),ie("click",function(){se(e);let o=P(2);return ae(o.clear())}),ee(1,lvt,1,0,null,9),D()}if(t&2){let e=P(2);Oe(e.cx("clearIcon")),Ge("data-pc-section","clearIcon"),T(),E("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function dvt(t,n){if(t&1&&(Di(0),ee(1,svt,1,3,"svg",5)(2,cvt,2,4,"span",6),Ai()),t&2){let e=P();T(),E("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),T(),E("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function uvt(t,n){if(t&1&&ce(0,"span",12),t&2){let e=P(2);E("ngClass",e.incrementButtonIcon),Ge("data-pc-section","incrementbuttonicon")}}function pvt(t,n){t&1&&(si(),ce(0,"svg",14)),t&2&&Ge("data-pc-section","incrementbuttonicon")}function hvt(t,n){}function mvt(t,n){t&1&&ee(0,hvt,0,0,"ng-template")}function fvt(t,n){if(t&1&&(Di(0),ee(1,pvt,1,1,"svg",13)(2,mvt,1,0,null,9),Ai()),t&2){let e=P(2);T(),E("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),T(),E("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function gvt(t,n){if(t&1&&ce(0,"span",12),t&2){let e=P(2);E("ngClass",e.decrementButtonIcon),Ge("data-pc-section","decrementbuttonicon")}}function _vt(t,n){t&1&&(si(),ce(0,"svg",16)),t&2&&Ge("data-pc-section","decrementbuttonicon")}function yvt(t,n){}function vvt(t,n){t&1&&ee(0,yvt,0,0,"ng-template")}function bvt(t,n){if(t&1&&(Di(0),ee(1,_vt,1,1,"svg",15)(2,vvt,1,0,null,9),Ai()),t&2){let e=P(2);T(),E("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),T(),E("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function Cvt(t,n){if(t&1){let e=tt();k(0,"span")(1,"button",10),ie("mousedown",function(o){se(e);let r=P();return ae(r.onUpButtonMouseDown(o))})("mouseup",function(){se(e);let o=P();return ae(o.onUpButtonMouseUp())})("mouseleave",function(){se(e);let o=P();return ae(o.onUpButtonMouseLeave())})("keydown",function(o){se(e);let r=P();return ae(r.onUpButtonKeyDown(o))})("keyup",function(){se(e);let o=P();return ae(o.onUpButtonKeyUp())}),ee(2,uvt,1,2,"span",11)(3,fvt,3,2,"ng-container",2),D(),k(4,"button",10),ie("mousedown",function(o){se(e);let r=P();return ae(r.onDownButtonMouseDown(o))})("mouseup",function(){se(e);let o=P();return ae(o.onDownButtonMouseUp())})("mouseleave",function(){se(e);let o=P();return ae(o.onDownButtonMouseLeave())})("keydown",function(o){se(e);let r=P();return ae(r.onDownButtonKeyDown(o))})("keyup",function(){se(e);let o=P();return ae(o.onDownButtonKeyUp())}),ee(5,gvt,1,2,"span",11)(6,bvt,3,2,"ng-container",2),D()()}if(t&2){let e=P();Oe(e.cx("buttonGroup")),Ge("data-pc-section","buttonGroup"),T(),Oe(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),Ge("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","incrementbutton"),T(),E("ngIf",e.incrementButtonIcon),T(),E("ngIf",!e.incrementButtonIcon),T(),Oe(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),Ge("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","decrementbutton"),T(),E("ngIf",e.decrementButtonIcon),T(),E("ngIf",!e.decrementButtonIcon)}}function xvt(t,n){if(t&1&&ce(0,"span",12),t&2){let e=P(2);E("ngClass",e.incrementButtonIcon),Ge("data-pc-section","incrementbuttonicon")}}function wvt(t,n){t&1&&(si(),ce(0,"svg",14)),t&2&&Ge("data-pc-section","incrementbuttonicon")}function Svt(t,n){}function Tvt(t,n){t&1&&ee(0,Svt,0,0,"ng-template")}function Ivt(t,n){if(t&1&&(Di(0),ee(1,wvt,1,1,"svg",13)(2,Tvt,1,0,null,9),Ai()),t&2){let e=P(2);T(),E("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),T(),E("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function Evt(t,n){if(t&1){let e=tt();k(0,"button",10),ie("mousedown",function(o){se(e);let r=P();return ae(r.onUpButtonMouseDown(o))})("mouseup",function(){se(e);let o=P();return ae(o.onUpButtonMouseUp())})("mouseleave",function(){se(e);let o=P();return ae(o.onUpButtonMouseLeave())})("keydown",function(o){se(e);let r=P();return ae(r.onUpButtonKeyDown(o))})("keyup",function(){se(e);let o=P();return ae(o.onUpButtonKeyUp())}),ee(1,xvt,1,2,"span",11)(2,Ivt,3,2,"ng-container",2),D()}if(t&2){let e=P();Oe(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),Ge("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","incrementbutton"),T(),E("ngIf",e.incrementButtonIcon),T(),E("ngIf",!e.incrementButtonIcon)}}function Dvt(t,n){if(t&1&&ce(0,"span",12),t&2){let e=P(2);E("ngClass",e.decrementButtonIcon),Ge("data-pc-section","decrementbuttonicon")}}function Avt(t,n){t&1&&(si(),ce(0,"svg",16)),t&2&&Ge("data-pc-section","decrementbuttonicon")}function kvt(t,n){}function Mvt(t,n){t&1&&ee(0,kvt,0,0,"ng-template")}function Ovt(t,n){if(t&1&&(Di(0),ee(1,Avt,1,1,"svg",15)(2,Mvt,1,0,null,9),Ai()),t&2){let e=P(2);T(),E("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),T(),E("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function Rvt(t,n){if(t&1){let e=tt();k(0,"button",10),ie("mousedown",function(o){se(e);let r=P();return ae(r.onDownButtonMouseDown(o))})("mouseup",function(){se(e);let o=P();return ae(o.onDownButtonMouseUp())})("mouseleave",function(){se(e);let o=P();return ae(o.onDownButtonMouseLeave())})("keydown",function(o){se(e);let r=P();return ae(r.onDownButtonKeyDown(o))})("keyup",function(){se(e);let o=P();return ae(o.onDownButtonKeyUp())}),ee(1,Dvt,1,2,"span",11)(2,Ovt,3,2,"ng-container",2),D()}if(t&2){let e=P();Oe(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),Ge("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","decrementbutton"),T(),E("ngIf",e.decrementButtonIcon),T(),E("ngIf",!e.decrementButtonIcon)}}var Fvt=` ${QFe} /* For PrimeNG */ p-inputNumber.ng-invalid.ng-dirty > .p-inputtext, p-input-number.ng-invalid.ng-dirty > .p-inputtext, p-inputnumber.ng-invalid.ng-dirty > .p-inputtext { border-color: dt('inputtext.invalid.border.color'); } p-inputNumber.ng-invalid.ng-dirty > .p-inputtext:enabled:focus, p-input-number.ng-invalid.ng-dirty > .p-inputtext:enabled:focus, p-inputnumber.ng-invalid.ng-dirty > .p-inputtext:enabled:focus { border-color: dt('inputtext.focus.border.color'); } p-inputNumber.ng-invalid.ng-dirty > .p-inputtext::placeholder, p-input-number.ng-invalid.ng-dirty > .p-inputtext::placeholder, p-inputnumber.ng-invalid.ng-dirty > .p-inputtext::placeholder { color: dt('inputtext.invalid.placeholder.color'); } `,Pvt={root:({instance:t})=>["p-inputnumber p-component p-inputwrapper",{"p-inputwrapper-filled":t.$filled()||t.allowEmpty===!1,"p-inputwrapper-focus":t.focused,"p-inputnumber-stacked":t.showButtons&&t.buttonLayout==="stacked","p-inputnumber-horizontal":t.showButtons&&t.buttonLayout==="horizontal","p-inputnumber-vertical":t.showButtons&&t.buttonLayout==="vertical","p-inputnumber-fluid":t.hasFluid,"p-invalid":t.invalid()}],pcInputText:"p-inputnumber-input",buttonGroup:"p-inputnumber-button-group",incrementButton:({instance:t})=>["p-inputnumber-button p-inputnumber-increment-button",{"p-disabled":t.showButtons&&t.max()!=null&&t.maxlength()}],decrementButton:({instance:t})=>["p-inputnumber-button p-inputnumber-decrement-button",{"p-disabled":t.showButtons&&t.min()!=null&&t.minlength()}],clearIcon:"p-inputnumber-clear-icon"},ZFe=(()=>{class t extends io{name="inputnumber";theme=Fvt;classes=Pvt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Lvt={provide:Ea,useExisting:Ko(()=>MY),multi:!0},MY=(()=>{class t extends XI{injector;showButtons=!1;format=!0;buttonLayout="stacked";inputId;styleClass;placeholder;tabindex;title;ariaLabelledBy;ariaDescribedBy;ariaLabel;ariaRequired;autocomplete;incrementButtonClass;decrementButtonClass;incrementButtonIcon;decrementButtonIcon;readonly;allowEmpty=!0;locale;localeMatcher;mode="decimal";currency;currencyDisplay;useGrouping=!0;minFractionDigits;maxFractionDigits;prefix;suffix;inputStyle;inputStyleClass;showClear=!1;autofocus;onInput=new ve;onFocus=new ve;onBlur=new ve;onKeyDown=new ve;onClear=new ve;clearIconTemplate;incrementButtonIconTemplate;decrementButtonIconTemplate;templates;input;_clearIconTemplate;_incrementButtonIconTemplate;_decrementButtonIconTemplate;value;focused;initialized;groupChar="";prefixChar="";suffixChar="";isSpecialChar;timer;lastValue;_numeral;numberFormat;_decimal;_decimalChar;_group;_minusSign;_currency;_prefix;_suffix;_index;_componentStyle=re(ZFe);ngControl=null;constructor(e){super(),this.injector=e}ngOnChanges(e){super.ngOnChanges(e),["locale","localeMatcher","mode","currency","currencyDisplay","useGrouping","minFractionDigits","maxFractionDigits","prefix","suffix"].some(o=>!!e[o])&&this.updateConstructParser()}ngOnInit(){super.ngOnInit(),this.ngControl=this.injector.get(Vu,null,{optional:!0}),this.constructParser(),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"clearicon":this._clearIconTemplate=e.template;break;case"incrementbuttonicon":this._incrementButtonIconTemplate=e.template;break;case"decrementbuttonicon":this._decrementButtonIconTemplate=e.template;break}})}getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits??void 0,maximumFractionDigits:this.maxFractionDigits??void 0}}constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());let e=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),i=new Map(e.map((o,r)=>[o,r]));this._numeral=new RegExp(`[${e.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._decimalChar=this.getDecimalChar(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=o=>i.get(o)}updateConstructParser(){this.initialized&&this.constructParser()}escapeRegExp(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}getDecimalExpression(){let e=this.getDecimalChar();return new RegExp(`[${e}]`,"g")}getDecimalChar(){return new Intl.NumberFormat(this.locale,mt(be({},this.getOptions()),{useGrouping:!1})).format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}getGroupingExpression(){let e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")}getMinusSignExpression(){let e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")}getCurrencyExpression(){if(this.currency){let e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")}getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{let e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")}getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{let e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")}formatValue(e){if(e!=null){if(e==="-")return e;if(this.format){let o=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&e!=this.prefix&&(o=this.prefix+o),this.suffix&&e!=this.suffix&&(o=o+this.suffix),o}return e.toString()}return""}parseValue(e){let i=new RegExp(this._suffix,""),o=new RegExp(this._prefix,""),r=new RegExp(this._currency,""),s=e.replace(i,"").replace(o,"").trim().replace(/\s/g,"").replace(r,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(s){if(s==="-")return s;let d=+s;return isNaN(d)?null:d}return null}repeat(e,i,o){if(this.readonly)return;let r=i||500;this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(e,40,o)},r),this.spin(e,o)}spin(e,i){let o=(this.step()??1)*i,r=this.parseValue(this.input?.nativeElement.value)||0,s=this.validateValue(r+o);this.maxlength()&&this.maxlength()=0;d--)if(this.isNumeralChar(r.charAt(d))){this.input.nativeElement.setSelectionRange(d,d);break}break;case"Tab":case"Enter":s=this.validateValue(this.parseValue(this.input.nativeElement.value)),this.input.nativeElement.value=this.formatValue(s),this.input.nativeElement.setAttribute("aria-valuenow",s),this.updateModel(e,s);break;case"Backspace":{if(e.preventDefault(),i===o){if(i==1&&this.prefix||i==r.length&&this.suffix)break;let d=r.charAt(i-1),{decimalCharIndex:m,decimalCharIndexWithoutPrefix:v}=this.getDecimalCharIndexes(r);if(this.isNumeralChar(d)){let w=this.getDecimalLength(r);if(this._group.test(d))this._group.lastIndex=0,s=r.slice(0,i-2)+r.slice(i-1);else if(this._decimal.test(d))this._decimal.lastIndex=0,w?this.input?.nativeElement.setSelectionRange(i-1,i-1):s=r.slice(0,i-1)+r.slice(i);else if(m>0&&i>m){let O=this.isDecimalMode()&&(this.minFractionDigits||0)0?s:""):s=r.slice(0,i-1)+r.slice(i)}else this.mode==="currency"&&d.search(this._currency)!=-1&&(s=r.slice(1));this.updateValue(e,s,null,"delete-single")}else s=this.deleteRange(r,i,o),this.updateValue(e,s,null,"delete-range");break}case"Delete":if(e.preventDefault(),i===o){if(i==0&&this.prefix||i==r.length-1&&this.suffix)break;let d=r.charAt(i),{decimalCharIndex:m,decimalCharIndexWithoutPrefix:v}=this.getDecimalCharIndexes(r);if(this.isNumeralChar(d)){let w=this.getDecimalLength(r);if(this._group.test(d))this._group.lastIndex=0,s=r.slice(0,i)+r.slice(i+2);else if(this._decimal.test(d))this._decimal.lastIndex=0,w?this.input?.nativeElement.setSelectionRange(i+1,i+1):s=r.slice(0,i)+r.slice(i+1);else if(m>0&&i>m){let O=this.isDecimalMode()&&(this.minFractionDigits||0)0?s:""):s=r.slice(0,i)+r.slice(i+1)}this.updateValue(e,s,null,"delete-back-single")}else s=this.deleteRange(r,i,o),this.updateValue(e,s,null,"delete-range");break;case"Home":this.min()&&(this.updateModel(e,this.min()),e.preventDefault());break;case"End":this.max()&&(this.updateModel(e,this.max()),e.preventDefault());break;default:break}this.onKeyDown.emit(e)}onInputKeyPress(e){if(this.readonly)return;let i=e.which||e.keyCode,o=String.fromCharCode(i),r=this.isDecimalSign(o),s=this.isMinusSign(o);i!=13&&e.preventDefault(),!r&&e.code==="NumpadDecimal"&&(r=!0,o=this._decimalChar,i=o.charCodeAt(0));let{value:d,selectionStart:m,selectionEnd:v}=this.input.nativeElement,w=this.parseValue(d+o),O=w!=null?w.toString():"",N=d.substring(m,v),V=this.parseValue(N),$=V!=null?V.toString():"";if(m!==v&&$.length>0){this.insert(e,o,{isDecimalSign:r,isMinusSign:s});return}this.maxlength()&&O.length>this.maxlength()||(48<=i&&i<=57||s||r)&&this.insert(e,o,{isDecimalSign:r,isMinusSign:s})}onPaste(e){if(!this.$disabled()&&!this.readonly){e.preventDefault();let i=(e.clipboardData||this.document.defaultView.clipboardData).getData("Text");if(this.inputId==="integeronly"&&/[^\d-]/.test(i))return;if(i){this.maxlength()&&(i=i.toString().substring(0,this.maxlength()));let o=this.parseValue(i);o!=null&&this.insert(e,o.toString())}}}allowMinusSign(){return this.min()==null||this.min()<0}isMinusSign(e){return this._minusSign.test(e)||e==="-"?(this._minusSign.lastIndex=0,!0):!1}isDecimalSign(e){return this._decimal.test(e)?(this._decimal.lastIndex=0,!0):!1}isDecimalMode(){return this.mode==="decimal"}getDecimalCharIndexes(e){let i=e.search(this._decimal);this._decimal.lastIndex=0;let r=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:i,decimalCharIndexWithoutPrefix:r}}getCharIndexes(e){let i=e.search(this._decimal);this._decimal.lastIndex=0;let o=e.search(this._minusSign);this._minusSign.lastIndex=0;let r=e.search(this._suffix);this._suffix.lastIndex=0;let s=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:i,minusCharIndex:o,suffixCharIndex:r,currencyCharIndex:s}}insert(e,i,o={isDecimalSign:!1,isMinusSign:!1}){let r=i.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&r!==-1)return;let s=this.input?.nativeElement.selectionStart,d=this.input?.nativeElement.selectionEnd,m=this.input?.nativeElement.value.trim(),{decimalCharIndex:v,minusCharIndex:w,suffixCharIndex:O,currencyCharIndex:N}=this.getCharIndexes(m),V;if(o.isMinusSign)s===0&&(V=m,(w===-1||d!==0)&&(V=this.insertText(m,i,0,d)),this.updateValue(e,V,i,"insert"));else if(o.isDecimalSign)v>0&&s===v?this.updateValue(e,m,i,"insert"):v>s&&v0&&s>v){if(s+i.length-(v+1)<=$){let W=N>=s?N-1:O>=s?O:m.length;V=m.slice(0,s)+i+m.slice(s+i.length,W)+m.slice(W),this.updateValue(e,V,i,q)}}else V=this.insertText(m,i,s,d),this.updateValue(e,V,i,q)}}insertText(e,i,o,r){if((i==="."?i:i.split(".")).length===2){let d=e.slice(o,r).search(this._decimal);return this._decimal.lastIndex=0,d>0?e.slice(0,o)+this.formatValue(i)+e.slice(r):e||this.formatValue(i)}else return r-o===e.length?this.formatValue(i):o===0?i+e.slice(r):r===e.length?e.slice(0,o)+i:e.slice(0,o)+i+e.slice(r)}deleteRange(e,i,o){let r;return o-i===e.length?r="":i===0?r=e.slice(o):o===e.length?r=e.slice(0,i):r=e.slice(0,i)+e.slice(o),r}initCursor(){let e=this.input?.nativeElement.selectionStart,i=this.input?.nativeElement.selectionEnd,o=this.input?.nativeElement.value,r=o.length,s=null,d=(this.prefixChar||"").length;o=o.replace(this._prefix,""),(e===i||e!==0||i=0;)if(m=o.charAt(v),this.isNumeralChar(m)){s=v+d;break}else v--;if(s!==null)this.input?.nativeElement.setSelectionRange(s+1,s+1);else{for(v=e;vthis.max()?this.max():e}updateInput(e,i,o,r){i=i||"";let s=this.input?.nativeElement.value,d=this.formatValue(e),m=s.length;if(d!==r&&(d=this.concatValues(d,r)),m===0){this.input.nativeElement.value=d,this.input.nativeElement.setSelectionRange(0,0);let w=this.initCursor()+i.length;this.input.nativeElement.setSelectionRange(w,w)}else{let v=this.input.nativeElement.selectionStart,w=this.input.nativeElement.selectionEnd;if(this.maxlength()&&d.length>this.maxlength()&&(d=d.slice(0,this.maxlength()),v=Math.min(v,this.maxlength()),w=Math.min(w,this.maxlength())),this.maxlength()&&this.maxlength()ln(e,null)],maxFractionDigits:[2,"maxFractionDigits","maxFractionDigits",e=>ln(e,null)],prefix:"prefix",suffix:"suffix",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",showClear:[2,"showClear","showClear",je],autofocus:[2,"autofocus","autofocus",je]},outputs:{onInput:"onInput",onFocus:"onFocus",onBlur:"onBlur",onKeyDown:"onKeyDown",onClear:"onClear"},features:[jt([Lvt,ZFe]),ft,Ot],decls:6,vars:36,consts:[["input",""],["pInputText","","role","spinbutton","inputmode","decimal",3,"input","keydown","keypress","paste","click","focus","blur","value","ngStyle","variant","invalid","pSize","pAutoFocus","fluid"],[4,"ngIf"],[3,"class",4,"ngIf"],["type","button","tabindex","-1",3,"class","mousedown","mouseup","mouseleave","keydown","keyup",4,"ngIf"],["data-p-icon","times",3,"class","click",4,"ngIf"],[3,"class","click",4,"ngIf"],["data-p-icon","times",3,"click"],[3,"click"],[4,"ngTemplateOutlet"],["type","button","tabindex","-1",3,"mousedown","mouseup","mouseleave","keydown","keyup"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-p-icon","angle-up",4,"ngIf"],["data-p-icon","angle-up"],["data-p-icon","angle-down",4,"ngIf"],["data-p-icon","angle-down"]],template:function(i,o){if(i&1){let r=tt();k(0,"input",1,0),ie("input",function(d){return se(r),ae(o.onUserInput(d))})("keydown",function(d){return se(r),ae(o.onInputKeyDown(d))})("keypress",function(d){return se(r),ae(o.onInputKeyPress(d))})("paste",function(d){return se(r),ae(o.onPaste(d))})("click",function(){return se(r),ae(o.onInputClick())})("focus",function(d){return se(r),ae(o.onInputFocus(d))})("blur",function(d){return se(r),ae(o.onInputBlur(d))}),D(),ee(2,dvt,3,2,"ng-container",2)(3,Cvt,7,17,"span",3)(4,Evt,3,7,"button",4)(5,Rvt,3,7,"button",4)}i&2&&(Oe(o.cn(o.cx("pcInputText"),o.inputStyleClass)),E("value",o.formattedValue())("ngStyle",o.inputStyle)("variant",o.$variant())("invalid",o.invalid())("pSize",o.size())("pAutoFocus",o.autofocus)("fluid",o.hasFluid),Ge("id",o.inputId)("aria-valuemin",o.min())("aria-valuemax",o.max())("aria-valuenow",o.value)("placeholder",o.placeholder)("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy)("aria-describedby",o.ariaDescribedBy)("title",o.title)("size",o.inputSize())("name",o.name())("autocomplete",o.autocomplete)("maxlength",o.maxlength())("minlength",o.minlength())("tabindex",o.tabindex)("aria-required",o.ariaRequired)("min",o.min())("max",o.max())("step",o.step()??1)("required",o.required()?"":void 0)("readonly",o.readonly?"":void 0)("disabled",o.$disabled()?"":void 0)("data-pc-section","input"),T(2),E("ngIf",o.buttonLayout!="vertical"&&o.showClear&&o.value),T(),E("ngIf",o.showButtons&&o.buttonLayout==="stacked"),T(),E("ngIf",o.showButtons&&o.buttonLayout!=="stacked"),T(),E("ngIf",o.showButtons&&o.buttonLayout!=="stacked"))},dependencies:[On,Ns,Fr,Lo,vs,fu,fp,am,NK,PK,In],encapsulation:2,changeDetection:0})}return t})(),XFe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[MY,In,In]})}return t})();var JFe=` .p-paginator { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; background: dt('paginator.background'); color: dt('paginator.color'); padding: dt('paginator.padding'); border-radius: dt('paginator.border.radius'); gap: dt('paginator.gap'); } .p-paginator-content { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: dt('paginator.gap'); } .p-paginator-content-start { margin-inline-end: auto; } .p-paginator-content-end { margin-inline-start: auto; } .p-paginator-page, .p-paginator-next, .p-paginator-last, .p-paginator-first, .p-paginator-prev { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; line-height: 1; user-select: none; overflow: hidden; position: relative; background: dt('paginator.nav.button.background'); border: 0 none; color: dt('paginator.nav.button.color'); min-width: dt('paginator.nav.button.width'); height: dt('paginator.nav.button.height'); transition: background dt('paginator.transition.duration'), color dt('paginator.transition.duration'), outline-color dt('paginator.transition.duration'), box-shadow dt('paginator.transition.duration'); border-radius: dt('paginator.nav.button.border.radius'); padding: 0; margin: 0; } .p-paginator-page:focus-visible, .p-paginator-next:focus-visible, .p-paginator-last:focus-visible, .p-paginator-first:focus-visible, .p-paginator-prev:focus-visible { box-shadow: dt('paginator.nav.button.focus.ring.shadow'); outline: dt('paginator.nav.button.focus.ring.width') dt('paginator.nav.button.focus.ring.style') dt('paginator.nav.button.focus.ring.color'); outline-offset: dt('paginator.nav.button.focus.ring.offset'); } .p-paginator-page:not(.p-disabled):not(.p-paginator-page-selected):hover, .p-paginator-first:not(.p-disabled):hover, .p-paginator-prev:not(.p-disabled):hover, .p-paginator-next:not(.p-disabled):hover, .p-paginator-last:not(.p-disabled):hover { background: dt('paginator.nav.button.hover.background'); color: dt('paginator.nav.button.hover.color'); } .p-paginator-page.p-paginator-page-selected { background: dt('paginator.nav.button.selected.background'); color: dt('paginator.nav.button.selected.color'); } .p-paginator-current { color: dt('paginator.current.page.report.color'); } .p-paginator-pages { display: flex; align-items: center; gap: dt('paginator.gap'); } .p-paginator-jtp-input .p-inputtext { max-width: dt('paginator.jump.to.page.input.max.width'); } .p-paginator-first:dir(rtl), .p-paginator-prev:dir(rtl), .p-paginator-next:dir(rtl), .p-paginator-last:dir(rtl) { transform: rotate(180deg); } `;var Nvt=["dropdownicon"],Bvt=["firstpagelinkicon"],Vvt=["previouspagelinkicon"],zvt=["lastpagelinkicon"],Uvt=["nextpagelinkicon"],OY=t=>({$implicit:t}),Hvt=t=>({pageLink:t});function jvt(t,n){t&1&&ui(0)}function Gvt(t,n){if(t&1&&(k(0,"div"),ee(1,jvt,1,0,"ng-container",9),D()),t&2){let e=P();Oe(e.cx("contentStart")),Ge("data-pc-section","start"),T(),E("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",ki(5,OY,e.paginatorState))}}function $vt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P();Oe(e.cx("current")),T(),dt(e.currentPageReport)}}function qvt(t,n){if(t&1&&(si(),ce(0,"svg",12)),t&2){let e=P(2);Oe(e.cx("firstIcon"))}}function Kvt(t,n){}function Wvt(t,n){t&1&&ee(0,Kvt,0,0,"ng-template")}function Yvt(t,n){if(t&1&&(k(0,"span"),ee(1,Wvt,1,0,null,13),D()),t&2){let e=P(2);Oe(e.cx("firstIcon")),T(),E("ngTemplateOutlet",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function Qvt(t,n){if(t&1){let e=tt();k(0,"button",10),ie("click",function(o){se(e);let r=P();return ae(r.changePageToFirst(o))}),ee(1,qvt,1,2,"svg",11)(2,Yvt,2,3,"span",0),D()}if(t&2){let e=P();Oe(e.cx("first")),Ge("aria-label",e.getAriaLabel("firstPageLabel")),T(),E("ngIf",!e.firstPageLinkIconTemplate&&!e._firstPageLinkIconTemplate),T(),E("ngIf",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function Zvt(t,n){if(t&1&&(si(),ce(0,"svg",14)),t&2){let e=P();Oe(e.cx("prevIcon"))}}function Xvt(t,n){}function Jvt(t,n){t&1&&ee(0,Xvt,0,0,"ng-template")}function ebt(t,n){if(t&1&&(k(0,"span"),ee(1,Jvt,1,0,null,13),D()),t&2){let e=P();Oe(e.cx("prevIcon")),T(),E("ngTemplateOutlet",e.previousPageLinkIconTemplate||e._previousPageLinkIconTemplate)}}function tbt(t,n){if(t&1){let e=tt();k(0,"button",10),ie("click",function(o){let r=se(e).$implicit,s=P(2);return ae(s.onPageLinkClick(o,r-1))}),Q(1),D()}if(t&2){let e=n.$implicit,i=P(2);Oe(i.cx("page",ki(5,Hvt,e))),Ge("aria-label",i.getPageAriaLabel(e))("aria-current",e-1==i.getPage()?"page":void 0),T(),Qi(" ",i.getLocalization(e)," ")}}function ibt(t,n){if(t&1&&(k(0,"span"),ee(1,tbt,2,7,"button",15),D()),t&2){let e=P();Oe(e.cx("pages")),T(),E("ngForOf",e.pageLinks)}}function nbt(t,n){if(t&1&&Q(0),t&2){let e=P(2);dt(e.currentPageReport)}}function obt(t,n){t&1&&ui(0)}function rbt(t,n){if(t&1&&ee(0,obt,1,0,"ng-container",9),t&2){let e=n.$implicit,i=P(3);E("ngTemplateOutlet",i.jumpToPageItemTemplate)("ngTemplateOutletContext",ki(2,OY,e))}}function sbt(t,n){t&1&&(Di(0),ee(1,rbt,1,4,"ng-template",19),Ai())}function abt(t,n){t&1&&ui(0)}function lbt(t,n){if(t&1&&ee(0,abt,1,0,"ng-container",13),t&2){let e=P(3);E("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function cbt(t,n){t&1&&ee(0,lbt,1,1,"ng-template",20)}function dbt(t,n){if(t&1){let e=tt();k(0,"p-select",16),ie("onChange",function(o){se(e);let r=P();return ae(r.onPageDropdownChange(o))}),ee(1,nbt,1,1,"ng-template",17)(2,sbt,2,0,"ng-container",18)(3,cbt,1,0,null,18),D()}if(t&2){let e=P();E("options",e.pageItems)("ngModel",e.getPage())("disabled",e.empty())("styleClass",e.cx("pcJumpToPageDropdown"))("appendTo",e.dropdownAppendTo||e.$appendTo())("scrollHeight",e.dropdownScrollHeight),Ge("aria-label",e.getAriaLabel("jumpToPageDropdownLabel")),T(2),E("ngIf",e.jumpToPageItemTemplate),T(),E("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function ubt(t,n){if(t&1&&(si(),ce(0,"svg",21)),t&2){let e=P();Oe(e.cx("nextIcon"))}}function pbt(t,n){}function hbt(t,n){t&1&&ee(0,pbt,0,0,"ng-template")}function mbt(t,n){if(t&1&&(k(0,"span"),ee(1,hbt,1,0,null,13),D()),t&2){let e=P();Oe(e.cx("nextIcon")),T(),E("ngTemplateOutlet",e.nextPageLinkIconTemplate||e._nextPageLinkIconTemplate)}}function fbt(t,n){if(t&1&&(si(),ce(0,"svg",23)),t&2){let e=P(2);Oe(e.cx("lastIcon"))}}function gbt(t,n){}function _bt(t,n){t&1&&ee(0,gbt,0,0,"ng-template")}function ybt(t,n){if(t&1&&(k(0,"span"),ee(1,_bt,1,0,null,13),D()),t&2){let e=P(2);Oe(e.cx("lastIcon")),T(),E("ngTemplateOutlet",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function vbt(t,n){if(t&1){let e=tt();k(0,"button",2),ie("click",function(o){se(e);let r=P();return ae(r.changePageToLast(o))}),ee(1,fbt,1,2,"svg",22)(2,ybt,2,3,"span",0),D()}if(t&2){let e=P();Oe(e.cx("last")),E("disabled",e.isLastPage()||e.empty()),Ge("aria-label",e.getAriaLabel("lastPageLabel")),T(),E("ngIf",!e.lastPageLinkIconTemplate&&!e._lastPageLinkIconTemplate),T(),E("ngIf",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function bbt(t,n){if(t&1){let e=tt();k(0,"p-inputnumber",24),ie("ngModelChange",function(o){se(e);let r=P();return ae(r.changePage(o-1))}),D()}if(t&2){let e=P();Oe(e.cx("pcJumpToPageInput")),E("ngModel",e.currentPage())("disabled",e.empty())}}function Cbt(t,n){t&1&&ui(0)}function xbt(t,n){if(t&1&&ee(0,Cbt,1,0,"ng-container",9),t&2){let e=n.$implicit,i=P(3);E("ngTemplateOutlet",i.dropdownItemTemplate)("ngTemplateOutletContext",ki(2,OY,e))}}function wbt(t,n){t&1&&(Di(0),ee(1,xbt,1,4,"ng-template",19),Ai())}function Sbt(t,n){t&1&&ui(0)}function Tbt(t,n){if(t&1&&ee(0,Sbt,1,0,"ng-container",13),t&2){let e=P(3);E("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function Ibt(t,n){t&1&&ee(0,Tbt,1,1,"ng-template",20)}function Ebt(t,n){if(t&1){let e=tt();k(0,"p-select",25),hh("ngModelChange",function(o){se(e);let r=P();return Xh(r.rows,o)||(r.rows=o),ae(o)}),ie("onChange",function(o){se(e);let r=P();return ae(r.onRppChange(o))}),ee(1,wbt,2,0,"ng-container",18)(2,Ibt,1,0,null,18),D()}if(t&2){let e=P();E("options",e.rowsPerPageItems),ph("ngModel",e.rows),E("styleClass",e.cx("pcRowPerPageDropdown"))("disabled",e.empty())("appendTo",e.dropdownAppendTo||e.$appendTo())("scrollHeight",e.dropdownScrollHeight),Cc("ariaLabel",e.getAriaLabel("rowsPerPageLabel")),T(),E("ngIf",e.dropdownItemTemplate),T(),E("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function Dbt(t,n){t&1&&ui(0)}function Abt(t,n){if(t&1&&(k(0,"div"),ee(1,Dbt,1,0,"ng-container",9),D()),t&2){let e=P();Oe(e.cx("contentEnd")),Ge("data-pc-section","end"),T(),E("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",ki(5,OY,e.paginatorState))}}var kbt={paginator:({instance:t})=>["p-paginator p-component"],content:"p-paginator-content",contentStart:"p-paginator-content-start",contentEnd:"p-paginator-content-end",first:({instance:t})=>["p-paginator-first",{"p-disabled":t.isFirstPage()||t.empty()}],firstIcon:"p-paginator-first-icon",prev:({instance:t})=>["p-paginator-prev",{"p-disabled":t.isFirstPage()||t.empty()}],prevIcon:"p-paginator-prev-icon",next:({instance:t})=>["p-paginator-next",{"p-disabled":t.isLastPage()||t.empty()}],nextIcon:"p-paginator-next-icon",last:({instance:t})=>["p-paginator-last",{"p-disabled":t.isLastPage()||t.empty()}],lastIcon:"p-paginator-last-icon",pages:"p-paginator-pages",page:({instance:t,pageLink:n})=>["p-paginator-page",{"p-paginator-page-selected":n-1==t.getPage()}],current:"p-paginator-current",pcRowPerPageDropdown:"p-paginator-rpp-dropdown",pcJumpToPageDropdown:"p-paginator-jtp-dropdown",pcJumpToPageInput:"p-paginator-jtp-input"},ePe=(()=>{class t extends io{name="paginator";theme=JFe;classes=kbt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var aS=(()=>{class t extends oo{pageLinkSize=5;styleClass;alwaysShow=!0;dropdownAppendTo;templateLeft;templateRight;dropdownScrollHeight="200px";currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showFirstLastIcon=!0;totalRecords=0;rows=0;rowsPerPageOptions;showJumpToPageDropdown;showJumpToPageInput;jumpToPageItemTemplate;showPageLinks=!0;locale;dropdownItemTemplate;get first(){return this._first}set first(e){this._first=e}appendTo=mo(void 0);onPageChange=new ve;dropdownIconTemplate;firstPageLinkIconTemplate;previousPageLinkIconTemplate;lastPageLinkIconTemplate;nextPageLinkIconTemplate;templates;_dropdownIconTemplate;_firstPageLinkIconTemplate;_previousPageLinkIconTemplate;_lastPageLinkIconTemplate;_nextPageLinkIconTemplate;pageLinks;pageItems;rowsPerPageItems;paginatorState;_first=0;_page=0;_componentStyle=re(ePe);$appendTo=bo(()=>this.appendTo()||this.config.overlayAppendTo());get display(){return this.alwaysShow||this.pageLinks&&this.pageLinks.length>1?null:"none"}constructor(){super()}ngOnInit(){super.ngOnInit(),this.updatePaginatorState()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"firstpagelinkicon":this._firstPageLinkIconTemplate=e.template;break;case"previouspagelinkicon":this._previousPageLinkIconTemplate=e.template;break;case"lastpagelinkicon":this._lastPageLinkIconTemplate=e.template;break;case"nextpagelinkicon":this._nextPageLinkIconTemplate=e.template;break}})}getAriaLabel(e){return this.config.translation.aria?this.config.translation.aria[e]:void 0}getPageAriaLabel(e){return this.config.translation.aria?this.config.translation.aria.pageLabel.replace(/{page}/g,`${e}`):void 0}getLocalization(e){let i=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(i.map((r,s)=>[s,r]));return e>9?String(e).split("").map(s=>o.get(Number(s))).join(""):o.get(e)}ngOnChanges(e){super.ngOnChanges(e),e.totalRecords&&(this.updatePageLinks(),this.updatePaginatorState(),this.updateFirst(),this.updateRowsPerPageOptions()),e.first&&(this._first=e.first.currentValue,this.updatePageLinks(),this.updatePaginatorState()),e.rows&&(this.updatePageLinks(),this.updatePaginatorState()),e.rowsPerPageOptions&&this.updateRowsPerPageOptions(),e.pageLinkSize&&this.updatePageLinks()}updateRowsPerPageOptions(){if(this.rowsPerPageOptions){this.rowsPerPageItems=[];let e=null;for(let i of this.rowsPerPageOptions)typeof i=="object"&&i.showAll?e={label:i.showAll,value:this.totalRecords}:this.rowsPerPageItems.push({label:String(this.getLocalization(i)),value:i});e&&this.rowsPerPageItems.push(e)}}isFirstPage(){return this.getPage()===0}isLastPage(){return this.getPage()===this.getPageCount()-1}getPageCount(){return Math.ceil(this.totalRecords/this.rows)}calculatePageLinkBoundaries(){let e=this.getPageCount(),i=Math.min(this.pageLinkSize,e),o=Math.max(0,Math.ceil(this.getPage()-i/2)),r=Math.min(e-1,o+i-1);var s=this.pageLinkSize-(r-o+1);return o=Math.max(0,o-s),[o,r]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),i=e[0],o=e[1];for(let r=i;r<=o;r++)this.pageLinks.push(r+1);if(this.showJumpToPageDropdown){this.pageItems=[];for(let r=0;r=0&&e0&&this.totalRecords&&this.first>=this.totalRecords&&Promise.resolve(null).then(()=>this.changePage(e-1))}getPage(){return Math.floor(this.first/this.rows)}changePageToFirst(e){this.isFirstPage()||this.changePage(0),e.preventDefault()}changePageToPrev(e){this.changePage(this.getPage()-1),e.preventDefault()}changePageToNext(e){this.changePage(this.getPage()+1),e.preventDefault()}changePageToLast(e){this.isLastPage()||this.changePage(this.getPageCount()-1),e.preventDefault()}onPageLinkClick(e,i){this.changePage(i),e.preventDefault()}onRppChange(e){this.changePage(this.getPage())}onPageDropdownChange(e){this.changePage(e.value)}updatePaginatorState(){this.paginatorState={page:this.getPage(),pageCount:this.getPageCount(),rows:this.rows,first:this.first,totalRecords:this.totalRecords}}empty(){return this.getPageCount()===0}currentPage(){return this.getPageCount()>0?this.getPage()+1:0}get currentPageReport(){return this.currentPageReportTemplate.replace("{currentPage}",String(this.currentPage())).replace("{totalPages}",String(this.getPageCount())).replace("{first}",String(this.totalRecords>0?this._first+1:0)).replace("{last}",String(Math.min(this._first+this.rows,this.totalRecords))).replace("{rows}",String(this.rows)).replace("{totalRecords}",String(this.totalRecords))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["p-paginator"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Nvt,4),xt(r,Bvt,4),xt(r,Vvt,4),xt(r,zvt,4),xt(r,Uvt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.dropdownIconTemplate=s.first),Le(s=Ne())&&(o.firstPageLinkIconTemplate=s.first),Le(s=Ne())&&(o.previousPageLinkIconTemplate=s.first),Le(s=Ne())&&(o.lastPageLinkIconTemplate=s.first),Le(s=Ne())&&(o.nextPageLinkIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},hostVars:6,hostBindings:function(i,o){i&2&&(Ge("data-pc-name","paginator")("data-pc-section","root"),Oe(o.cn(o.cx("paginator"),o.styleClass)),Ir("display",o.display))},inputs:{pageLinkSize:[2,"pageLinkSize","pageLinkSize",ln],styleClass:"styleClass",alwaysShow:[2,"alwaysShow","alwaysShow",je],dropdownAppendTo:"dropdownAppendTo",templateLeft:"templateLeft",templateRight:"templateRight",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",je],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",je],totalRecords:[2,"totalRecords","totalRecords",ln],rows:[2,"rows","rows",ln],rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",je],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",je],jumpToPageItemTemplate:"jumpToPageItemTemplate",showPageLinks:[2,"showPageLinks","showPageLinks",je],locale:"locale",dropdownItemTemplate:"dropdownItemTemplate",first:"first",appendTo:[1,"appendTo"]},outputs:{onPageChange:"onPageChange"},features:[jt([ePe]),ft,Ot],decls:15,vars:21,consts:[[3,"class",4,"ngIf"],["type","button","pRipple","",3,"class","click",4,"ngIf"],["type","button","pRipple","",3,"click","disabled"],["data-p-icon","angle-left",3,"class",4,"ngIf"],[3,"options","ngModel","disabled","styleClass","appendTo","scrollHeight","onChange",4,"ngIf"],["data-p-icon","angle-right",3,"class",4,"ngIf"],["type","button","pRipple","",3,"disabled","class","click",4,"ngIf"],[3,"ngModel","class","disabled","ngModelChange",4,"ngIf"],[3,"options","ngModel","styleClass","disabled","appendTo","scrollHeight","ariaLabel","ngModelChange","onChange",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button","pRipple","",3,"click"],["data-p-icon","angle-double-left",3,"class",4,"ngIf"],["data-p-icon","angle-double-left"],[4,"ngTemplateOutlet"],["data-p-icon","angle-left"],["type","button","pRipple","",3,"class","click",4,"ngFor","ngForOf"],[3,"onChange","options","ngModel","disabled","styleClass","appendTo","scrollHeight"],["pTemplate","selectedItem"],[4,"ngIf"],["pTemplate","item"],["pTemplate","dropdownicon"],["data-p-icon","angle-right"],["data-p-icon","angle-double-right",3,"class",4,"ngIf"],["data-p-icon","angle-double-right"],[3,"ngModelChange","ngModel","disabled"],[3,"ngModelChange","onChange","options","ngModel","styleClass","disabled","appendTo","scrollHeight","ariaLabel"]],template:function(i,o){i&1&&(ee(0,Gvt,2,7,"div",0)(1,$vt,2,3,"span",0)(2,Qvt,3,5,"button",1),k(3,"button",2),ie("click",function(s){return o.changePageToPrev(s)}),ee(4,Zvt,1,2,"svg",3)(5,ebt,2,3,"span",0),D(),ee(6,ibt,2,3,"span",0)(7,dbt,4,9,"p-select",4),k(8,"button",2),ie("click",function(s){return o.changePageToNext(s)}),ee(9,ubt,1,2,"svg",5)(10,mbt,2,3,"span",0),D(),ee(11,vbt,3,6,"button",6)(12,bbt,1,4,"p-inputnumber",7)(13,Ebt,3,9,"p-select",8)(14,Abt,2,7,"div",0)),i&2&&(E("ngIf",o.templateLeft),T(),E("ngIf",o.showCurrentPageReport),T(),E("ngIf",o.showFirstLastIcon),T(),Oe(o.cx("prev")),E("disabled",o.isFirstPage()||o.empty()),Ge("aria-label",o.getAriaLabel("prevPageLabel")),T(),E("ngIf",!o.previousPageLinkIconTemplate&&!o._previousPageLinkIconTemplate),T(),E("ngIf",o.previousPageLinkIconTemplate||o._previousPageLinkIconTemplate),T(),E("ngIf",o.showPageLinks),T(),E("ngIf",o.showJumpToPageDropdown),T(),Oe(o.cx("next")),E("disabled",o.isLastPage()||o.empty()),Ge("aria-label",o.getAriaLabel("nextPageLabel")),T(),E("ngIf",!o.nextPageLinkIconTemplate&&!o._nextPageLinkIconTemplate),T(),E("ngIf",o.nextPageLinkIconTemplate||o._nextPageLinkIconTemplate),T(),E("ngIf",o.showFirstLastIcon),T(),E("ngIf",o.showJumpToPageInput),T(),E("ngIf",o.rowsPerPageOptions),T(),E("ngIf",o.templateRight))},dependencies:[On,Gc,Fr,Lo,Ql,MY,hr,no,Lr,Ul,RK,FK,LK,NP,In,so],encapsulation:2,changeDetection:0})}return t})(),kE=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[aS,In,In]})}return t})();var tPe=` .p-radiobutton { position: relative; display: inline-flex; user-select: none; vertical-align: bottom; width: dt('radiobutton.width'); height: dt('radiobutton.height'); } .p-radiobutton-input { cursor: pointer; appearance: none; position: absolute; top: 0; inset-inline-start: 0; width: 100%; height: 100%; padding: 0; margin: 0; opacity: 0; z-index: 1; outline: 0 none; border: 1px solid transparent; border-radius: 50%; } .p-radiobutton-box { display: flex; justify-content: center; align-items: center; border-radius: 50%; border: 1px solid dt('radiobutton.border.color'); background: dt('radiobutton.background'); width: dt('radiobutton.width'); height: dt('radiobutton.height'); transition: background dt('radiobutton.transition.duration'), color dt('radiobutton.transition.duration'), border-color dt('radiobutton.transition.duration'), box-shadow dt('radiobutton.transition.duration'), outline-color dt('radiobutton.transition.duration'); outline-color: transparent; box-shadow: dt('radiobutton.shadow'); } .p-radiobutton-icon { transition-duration: dt('radiobutton.transition.duration'); background: transparent; font-size: dt('radiobutton.icon.size'); width: dt('radiobutton.icon.size'); height: dt('radiobutton.icon.size'); border-radius: 50%; backface-visibility: hidden; transform: translateZ(0) scale(0.1); } .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box { border-color: dt('radiobutton.hover.border.color'); } .p-radiobutton-checked .p-radiobutton-box { border-color: dt('radiobutton.checked.border.color'); background: dt('radiobutton.checked.background'); } .p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon { background: dt('radiobutton.icon.checked.color'); transform: translateZ(0) scale(1, 1); visibility: visible; } .p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box { border-color: dt('radiobutton.checked.hover.border.color'); background: dt('radiobutton.checked.hover.background'); } .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon { background: dt('radiobutton.icon.checked.hover.color'); } .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box { border-color: dt('radiobutton.focus.border.color'); box-shadow: dt('radiobutton.focus.ring.shadow'); outline: dt('radiobutton.focus.ring.width') dt('radiobutton.focus.ring.style') dt('radiobutton.focus.ring.color'); outline-offset: dt('radiobutton.focus.ring.offset'); } .p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box { border-color: dt('radiobutton.checked.focus.border.color'); } .p-radiobutton.p-invalid > .p-radiobutton-box { border-color: dt('radiobutton.invalid.border.color'); } .p-radiobutton.p-variant-filled .p-radiobutton-box { background: dt('radiobutton.filled.background'); } .p-radiobutton.p-variant-filled.p-radiobutton-checked .p-radiobutton-box { background: dt('radiobutton.checked.background'); } .p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box { background: dt('radiobutton.checked.hover.background'); } .p-radiobutton.p-disabled { opacity: 1; } .p-radiobutton.p-disabled .p-radiobutton-box { background: dt('radiobutton.disabled.background'); border-color: dt('radiobutton.checked.disabled.border.color'); } .p-radiobutton-checked.p-disabled .p-radiobutton-box .p-radiobutton-icon { background: dt('radiobutton.icon.disabled.color'); } .p-radiobutton-sm, .p-radiobutton-sm .p-radiobutton-box { width: dt('radiobutton.sm.width'); height: dt('radiobutton.sm.height'); } .p-radiobutton-sm .p-radiobutton-icon { font-size: dt('radiobutton.icon.sm.size'); width: dt('radiobutton.icon.sm.size'); height: dt('radiobutton.icon.sm.size'); } .p-radiobutton-lg, .p-radiobutton-lg .p-radiobutton-box { width: dt('radiobutton.lg.width'); height: dt('radiobutton.lg.height'); } .p-radiobutton-lg .p-radiobutton-icon { font-size: dt('radiobutton.icon.lg.size'); width: dt('radiobutton.icon.lg.size'); height: dt('radiobutton.icon.lg.size'); } `;var Mbt=["input"],Obt=` ${tPe} /* For PrimeNG */ p-radioButton.ng-invalid.ng-dirty .p-radiobutton-box, p-radio-button.ng-invalid.ng-dirty .p-radiobutton-box, p-radiobutton.ng-invalid.ng-dirty .p-radiobutton-box { border-color: dt('radiobutton.invalid.border.color'); } `,Rbt={root:({instance:t})=>["p-radiobutton p-component",{"p-radiobutton-checked":t.checked,"p-disabled":t.$disabled(),"p-invalid":t.invalid(),"p-variant-filled":t.$variant()==="filled","p-radiobutton-sm p-inputfield-sm":t.size()==="small","p-radiobutton-lg p-inputfield-lg":t.size()==="large"}],box:"p-radiobutton-box",input:"p-radiobutton-input",icon:"p-radiobutton-icon"},iPe=(()=>{class t extends io{name="radiobutton";theme=Obt;classes=Rbt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Fbt={provide:Ea,useExisting:Ko(()=>nPe),multi:!0},Pbt=(()=>{class t{accessors=[];add(e,i){this.accessors.push([e,i])}remove(e){this.accessors=this.accessors.filter(i=>i[1]!==e)}select(e){this.accessors.forEach(i=>{this.isSameGroup(i,e)&&i[1]!==e&&i[1].writeValue(e.value)})}isSameGroup(e,i){return e[0].control?e[0].control.root===i.control.control.root&&e[1].name()===i.name():!1}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),nPe=(()=>{class t extends Wm{value;tabindex;inputId;ariaLabelledBy;ariaLabel;styleClass;autofocus;binary;variant=mo();size=mo();onClick=new ve;onFocus=new ve;onBlur=new ve;inputViewChild;$variant=bo(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());checked;focused;control;_componentStyle=re(iPe);injector=re(Oo);registry=re(Pbt);ngOnInit(){super.ngOnInit(),this.control=this.injector.get(Vu),this.registry.add(this.control,this)}onChange(e){this.$disabled()||this.select(e)}select(e){this.$disabled()||(this.checked=!0,this.writeModelValue(this.checked),this.onModelChange(this.value),this.registry.select(this),this.onClick.emit({originalEvent:e,value:this.value}))}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)}focus(){this.inputViewChild.nativeElement.focus()}writeControlValue(e,i){this.checked=this.binary?!!e:e==this.value,i(this.checked),this.cd.markForCheck()}ngOnDestroy(){this.registry.remove(this),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-radioButton"],["p-radiobutton"],["p-radio-button"]],viewQuery:function(i,o){if(i&1&&Ri(Mbt,5),i&2){let r;Le(r=Ne())&&(o.inputViewChild=r.first)}},hostVars:4,hostBindings:function(i,o){i&2&&(Ge("data-pc-name","radiobutton")("data-pc-section","root"),Oe(o.cx("root")))},inputs:{value:"value",tabindex:[2,"tabindex","tabindex",ln],inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",styleClass:"styleClass",autofocus:[2,"autofocus","autofocus",je],binary:[2,"binary","binary",je],variant:[1,"variant"],size:[1,"size"]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[jt([Fbt,iPe]),ft],decls:4,vars:19,consts:[["input",""],["type","radio",3,"focus","blur","change","checked","pAutoFocus"]],template:function(i,o){if(i&1){let r=tt();k(0,"input",1,0),ie("focus",function(d){return se(r),ae(o.onInputFocus(d))})("blur",function(d){return se(r),ae(o.onInputBlur(d))})("change",function(d){return se(r),ae(o.onChange(d))}),D(),k(2,"div"),ce(3,"div"),D()}i&2&&(Oe(o.cx("input")),E("checked",o.checked)("pAutoFocus",o.autofocus),Ge("id",o.inputId)("name",o.name())("required",o.required()?"":void 0)("disabled",o.$disabled()?"":void 0)("value",o.modelValue())("aria-labelledby",o.ariaLabelledBy)("aria-label",o.ariaLabel)("tabindex",o.tabindex)("aria-checked",o.checked),T(2),Oe(o.cx("box")),Ge("data-pc-section","input"),T(),Oe(o.cx("icon")),Ge("data-pc-section","icon"))},dependencies:[On,fp,In],encapsulation:2,changeDetection:0})}return t})(),oPe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[nPe,In,In]})}return t})();var rPe=` .p-togglebutton { display: inline-flex; cursor: pointer; user-select: none; overflow: hidden; position: relative; color: dt('togglebutton.color'); background: dt('togglebutton.background'); border: 1px solid dt('togglebutton.border.color'); padding: dt('togglebutton.padding'); font-size: 1rem; font-family: inherit; font-feature-settings: inherit; transition: background dt('togglebutton.transition.duration'), color dt('togglebutton.transition.duration'), border-color dt('togglebutton.transition.duration'), outline-color dt('togglebutton.transition.duration'), box-shadow dt('togglebutton.transition.duration'); border-radius: dt('togglebutton.border.radius'); outline-color: transparent; font-weight: dt('togglebutton.font.weight'); } .p-togglebutton-content { display: inline-flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: dt('togglebutton.gap'); padding: dt('togglebutton.content.padding'); background: transparent; border-radius: dt('togglebutton.content.border.radius'); transition: background dt('togglebutton.transition.duration'), color dt('togglebutton.transition.duration'), border-color dt('togglebutton.transition.duration'), outline-color dt('togglebutton.transition.duration'), box-shadow dt('togglebutton.transition.duration'); } .p-togglebutton:not(:disabled):not(.p-togglebutton-checked):hover { background: dt('togglebutton.hover.background'); color: dt('togglebutton.hover.color'); } .p-togglebutton.p-togglebutton-checked { background: dt('togglebutton.checked.background'); border-color: dt('togglebutton.checked.border.color'); color: dt('togglebutton.checked.color'); } .p-togglebutton-checked .p-togglebutton-content { background: dt('togglebutton.content.checked.background'); box-shadow: dt('togglebutton.content.checked.shadow'); } .p-togglebutton:focus-visible { box-shadow: dt('togglebutton.focus.ring.shadow'); outline: dt('togglebutton.focus.ring.width') dt('togglebutton.focus.ring.style') dt('togglebutton.focus.ring.color'); outline-offset: dt('togglebutton.focus.ring.offset'); } .p-togglebutton.p-invalid { border-color: dt('togglebutton.invalid.border.color'); } .p-togglebutton:disabled { opacity: 1; cursor: default; background: dt('togglebutton.disabled.background'); border-color: dt('togglebutton.disabled.border.color'); color: dt('togglebutton.disabled.color'); } .p-togglebutton-label, .p-togglebutton-icon { position: relative; transition: none; } .p-togglebutton-icon { color: dt('togglebutton.icon.color'); } .p-togglebutton:not(:disabled):not(.p-togglebutton-checked):hover .p-togglebutton-icon { color: dt('togglebutton.icon.hover.color'); } .p-togglebutton.p-togglebutton-checked .p-togglebutton-icon { color: dt('togglebutton.icon.checked.color'); } .p-togglebutton:disabled .p-togglebutton-icon { color: dt('togglebutton.icon.disabled.color'); } .p-togglebutton-sm { padding: dt('togglebutton.sm.padding'); font-size: dt('togglebutton.sm.font.size'); } .p-togglebutton-sm .p-togglebutton-content { padding: dt('togglebutton.content.sm.padding'); } .p-togglebutton-lg { padding: dt('togglebutton.lg.padding'); font-size: dt('togglebutton.lg.font.size'); } .p-togglebutton-lg .p-togglebutton-content { padding: dt('togglebutton.content.lg.padding'); } .p-togglebutton-fluid { width: 100%; } `;var Lbt=["icon"],Nbt=["content"],aPe=t=>({$implicit:t});function Bbt(t,n){t&1&&ui(0)}function Vbt(t,n){if(t&1&&ce(0,"span"),t&2){let e=P(3);Oe(e.cn(e.cx("icon"),e.checked?e.onIcon:e.offIcon,e.iconPos==="left"?e.cx("iconLeft"):e.cx("iconRight"))),Ge("data-pc-section","icon")}}function zbt(t,n){if(t&1&&qe(0,Vbt,1,3,"span",1),t&2){let e=P(2);Ke(e.onIcon||e.offIcon?0:-1)}}function Ubt(t,n){t&1&&ui(0)}function Hbt(t,n){if(t&1&&ee(0,Ubt,1,0,"ng-container",0),t&2){let e=P(2);E("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)("ngTemplateOutletContext",ki(2,aPe,e.checked))}}function jbt(t,n){if(t&1&&(qe(0,zbt,1,1)(1,Hbt,1,4,"ng-container"),k(2,"span"),Q(3),D()),t&2){let e=P();Ke(e.iconTemplate?1:0),T(2),Oe(e.cx("label")),Ge("data-pc-section","label"),T(),dt(e.checked?e.hasOnLabel?e.onLabel:"\xA0":e.hasOffLabel?e.offLabel:"\xA0")}}var Gbt=` ${rPe} /* For PrimeNG (iconPos) */ .p-togglebutton-icon-right { order: 1; } .p-togglebutton.ng-invalid.ng-dirty { border-color: dt('togglebutton.invalid.border.color'); } `,$bt={root:({instance:t})=>["p-togglebutton p-component",{"p-togglebutton-checked":t.checked,"p-invalid":t.invalid(),"p-disabled":t.$disabled(),"p-togglebutton-sm p-inputfield-sm":t.size==="small","p-togglebutton-lg p-inputfield-lg":t.size==="large","p-togglebutton-fluid":t.fluid()}],content:"p-togglebutton-content",icon:"p-togglebutton-icon",iconLeft:"p-togglebutton-icon-left",iconRight:"p-togglebutton-icon-right",label:"p-togglebutton-label"},sPe=(()=>{class t extends io{name="togglebutton";theme=Gbt;classes=$bt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var qbt={provide:Ea,useExisting:Ko(()=>Mde),multi:!0},Mde=(()=>{class t extends Wm{onKeyDown(e){switch(e.code){case"Enter":this.toggle(e),e.preventDefault();break;case"Space":this.toggle(e),e.preventDefault();break}}toggle(e){!this.$disabled()&&!(this.allowEmpty===!1&&this.checked)&&(this.checked=!this.checked,this.writeModelValue(this.checked),this.onModelChange(this.checked),this.onModelTouched(),this.onChange.emit({originalEvent:e,checked:this.checked}),this.cd.markForCheck())}onLabel="Yes";offLabel="No";onIcon;offIcon;ariaLabel;ariaLabelledBy;styleClass;inputId;tabindex=0;iconPos="left";autofocus;size;allowEmpty;fluid=mo(void 0,{transform:je});onChange=new ve;iconTemplate;contentTemplate;templates;checked=!1;_componentStyle=re(sPe);onBlur(){this.onModelTouched()}get hasOnLabel(){return this.onLabel&&this.onLabel.length>0}get hasOffLabel(){return this.onLabel&&this.onLabel.length>0}get active(){return this.checked===!0}_iconTemplate;_contentTemplate;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"icon":this._iconTemplate=e.template;break;case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}writeControlValue(e,i){this.checked=e,i(e),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-toggleButton"],["p-togglebutton"],["p-toggle-button"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Lbt,4),xt(r,Nbt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.iconTemplate=s.first),Le(s=Ne())&&(o.contentTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},hostVars:6,hostBindings:function(i,o){i&1&&ie("keydown",function(s){return o.onKeyDown(s)})("click",function(s){return o.toggle(s)}),i&2&&(Ge("aria-labelledby",o.ariaLabelledBy)("aria-pressed",o.checked)("role","button")("tabindex",o.$disabled()?-1:0),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{onLabel:"onLabel",offLabel:"offLabel",onIcon:"onIcon",offIcon:"offIcon",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",styleClass:"styleClass",inputId:"inputId",tabindex:[2,"tabindex","tabindex",ln],iconPos:"iconPos",autofocus:[2,"autofocus","autofocus",je],size:"size",allowEmpty:"allowEmpty",fluid:[1,"fluid"]},outputs:{onChange:"onChange"},features:[jt([qbt,sPe]),X1([Ul]),ft],decls:3,vars:7,consts:[[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"class"]],template:function(i,o){i&1&&(k(0,"span"),ee(1,Bbt,1,0,"ng-container",0),qe(2,jbt,4,5),D()),i&2&&(Oe(o.cx("content")),T(),E("ngTemplateOutlet",o.contentTemplate||o._contentTemplate)("ngTemplateOutletContext",ki(5,aPe,o.checked)),T(),Ke(o.contentTemplate?-1:2))},dependencies:[On,Lo,In],encapsulation:2,changeDetection:0})}return t})();var lPe=` .p-selectbutton { display: inline-flex; user-select: none; vertical-align: bottom; outline-color: transparent; border-radius: dt('selectbutton.border.radius'); } .p-selectbutton .p-togglebutton { border-radius: 0; border-width: 1px 1px 1px 0; } .p-selectbutton .p-togglebutton:focus-visible { position: relative; z-index: 1; } .p-selectbutton .p-togglebutton:first-child { border-inline-start-width: 1px; border-start-start-radius: dt('selectbutton.border.radius'); border-end-start-radius: dt('selectbutton.border.radius'); } .p-selectbutton .p-togglebutton:last-child { border-start-end-radius: dt('selectbutton.border.radius'); border-end-end-radius: dt('selectbutton.border.radius'); } .p-selectbutton.p-invalid { outline: 1px solid dt('selectbutton.invalid.border.color'); outline-offset: 0; } .p-selectbutton-fluid { width: 100%; } .p-selectbutton-fluid .p-togglebutton { flex: 1 1 0; } `;var Kbt=["item"],Wbt=(t,n)=>({$implicit:t,index:n});function Ybt(t,n){return this.getOptionLabel(n)}function Qbt(t,n){t&1&&ui(0)}function Zbt(t,n){if(t&1&&ee(0,Qbt,1,0,"ng-container",3),t&2){let e=P(2),i=e.$implicit,o=e.$index,r=P();E("ngTemplateOutlet",r.itemTemplate||r._itemTemplate)("ngTemplateOutletContext",Eo(2,Wbt,i,o))}}function Xbt(t,n){t&1&&ee(0,Zbt,1,5,"ng-template",null,0,Pt)}function Jbt(t,n){if(t&1){let e=tt();k(0,"p-togglebutton",2),ie("onChange",function(o){let r=se(e),s=r.$implicit,d=r.$index,m=P();return ae(m.onOptionSelect(o,s,d))}),qe(1,Xbt,2,0),D()}if(t&2){let e=n.$implicit,i=P();E("autofocus",i.autofocus)("styleClass",i.styleClass)("ngModel",i.isSelected(e))("onLabel",i.getOptionLabel(e))("offLabel",i.getOptionLabel(e))("disabled",i.$disabled()||i.isOptionDisabled(e))("allowEmpty",i.getAllowEmpty())("size",i.size())("fluid",i.fluid()),T(),Ke(i.itemTemplate||i._itemTemplate?1:-1)}}var eCt=` ${lPe} /* For PrimeNG */ .p-selectbutton.ng-invalid.ng-dirty { outline: 1px solid dt('selectbutton.invalid.border.color'); outline-offset: 0; } `,tCt={root:({instance:t})=>["p-selectbutton p-component",{"p-invalid":t.invalid(),"p-selectbutton-fluid":t.fluid()}]},cPe=(()=>{class t extends io{name="selectbutton";theme=eCt;classes=tCt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var iCt={provide:Ea,useExisting:Ko(()=>dPe),multi:!0},dPe=(()=>{class t extends Wm{options;optionLabel;optionValue;optionDisabled;get unselectable(){return this._unselectable}_unselectable=!1;set unselectable(e){this._unselectable=e,this.allowEmpty=!e}tabindex=0;multiple;allowEmpty=!0;styleClass;ariaLabelledBy;dataKey;autofocus;size=mo();fluid=mo(void 0,{transform:je});onOptionClick=new ve;onChange=new ve;itemTemplate;_itemTemplate;get equalityKey(){return this.optionValue?null:this.dataKey}value;focusedIndex=0;_componentStyle=re(cPe);getAllowEmpty(){return this.multiple?this.allowEmpty||this.value?.length!==1:this.allowEmpty}getOptionLabel(e){return this.optionLabel?bs(e,this.optionLabel):e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?bs(e,this.optionValue):this.optionLabel||e.value===void 0?e:e.value}isOptionDisabled(e){return this.optionDisabled?bs(e,this.optionDisabled):e.disabled!==void 0?e.disabled:!1}onOptionSelect(e,i,o){if(this.$disabled()||this.isOptionDisabled(i))return;let r=this.isSelected(i);if(r&&this.unselectable)return;let s=this.getOptionValue(i),d;if(this.multiple)r?d=this.value.filter(m=>!Sc(m,s,this.equalityKey)):d=this.value?[...this.value,s]:[s];else{if(r&&!this.allowEmpty)return;d=r?null:s}this.focusedIndex=o,this.value=d,this.writeModelValue(this.value),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),this.onOptionClick.emit({originalEvent:e,option:i,index:o})}changeTabIndexes(e,i){let o,r;for(let s=0;s<=this.el.nativeElement.children.length-1;s++)this.el.nativeElement.children[s].getAttribute("tabindex")==="0"&&(o={elem:this.el.nativeElement.children[s],index:s});i==="prev"?o.index===0?r=this.el.nativeElement.children.length-1:r=o.index-1:o.index===this.el.nativeElement.children.length-1?r=0:r=o.index+1,this.focusedIndex=r,this.el.nativeElement.children[r].focus()}onFocus(e,i){this.focusedIndex=i}onBlur(){this.onModelTouched()}removeOption(e){this.value=this.value.filter(i=>!Sc(i,this.getOptionValue(e),this.dataKey))}isSelected(e){let i=!1,o=this.getOptionValue(e);if(this.multiple){if(this.value&&Array.isArray(this.value)){for(let r of this.value)if(Sc(r,o,this.dataKey)){i=!0;break}}}else i=Sc(this.getOptionValue(e),this.value,this.equalityKey);return i}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break}})}writeControlValue(e,i){this.value=e,i(this.value),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-selectButton"],["p-selectbutton"],["p-select-button"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Kbt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.itemTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},hostVars:6,hostBindings:function(i,o){i&2&&(Ge("role","group")("aria-labelledby",o.ariaLabelledBy)("data-pc-section","root")("data-pc-name","selectbutton"),Oe(o.cx("root")))},inputs:{options:"options",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",unselectable:[2,"unselectable","unselectable",je],tabindex:[2,"tabindex","tabindex",ln],multiple:[2,"multiple","multiple",je],allowEmpty:[2,"allowEmpty","allowEmpty",je],styleClass:"styleClass",ariaLabelledBy:"ariaLabelledBy",dataKey:"dataKey",autofocus:[2,"autofocus","autofocus",je],size:[1,"size"],fluid:[1,"fluid"]},outputs:{onOptionClick:"onOptionClick",onChange:"onChange"},features:[jt([iCt,cPe]),ft],decls:2,vars:0,consts:[["content",""],[3,"autofocus","styleClass","ngModel","onLabel","offLabel","disabled","allowEmpty","size","fluid"],[3,"onChange","autofocus","styleClass","ngModel","onLabel","offLabel","disabled","allowEmpty","size","fluid"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&lo(0,Jbt,2,10,"p-togglebutton",1,Ybt,!0),i&2&&co(o.options)},dependencies:[Mde,hr,no,Lr,On,Lo,In],encapsulation:2,changeDetection:0})}return t})(),uPe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[dPe,In,In]})}return t})();var pPe=` .p-datatable { position: relative; } .p-datatable-table { border-spacing: 0; border-collapse: separate; width: 100%; } .p-datatable-scrollable > .p-datatable-table-container { position: relative; } .p-datatable-scrollable-table > .p-datatable-thead { inset-block-start: 0; z-index: 1; } .p-datatable-scrollable-table > .p-datatable-frozen-tbody { position: sticky; z-index: 1; } .p-datatable-scrollable-table > .p-datatable-tfoot { inset-block-end: 0; z-index: 1; } .p-datatable-scrollable .p-datatable-frozen-column { position: sticky; background: dt('datatable.header.cell.background'); } .p-datatable-scrollable th.p-datatable-frozen-column { z-index: 1; } .p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-thead, .p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-thead { background: dt('datatable.header.cell.background'); } .p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-tfoot, .p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot { background: dt('datatable.footer.cell.background'); } .p-datatable-flex-scrollable { display: flex; flex-direction: column; height: 100%; } .p-datatable-flex-scrollable > .p-datatable-table-container { display: flex; flex-direction: column; flex: 1; height: 100%; } .p-datatable-scrollable-table > .p-datatable-tbody > .p-datatable-row-group-header { position: sticky; z-index: 1; } .p-datatable-resizable-table > .p-datatable-thead > tr > th, .p-datatable-resizable-table > .p-datatable-tfoot > tr > td, .p-datatable-resizable-table > .p-datatable-tbody > tr > td { overflow: hidden; white-space: nowrap; } .p-datatable-resizable-table > .p-datatable-thead > tr > th.p-datatable-resizable-column:not(.p-datatable-frozen-column) { background-clip: padding-box; position: relative; } .p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-datatable-resizable-column:last-child .p-datatable-column-resizer { display: none; } .p-datatable-column-resizer { display: block; position: absolute; inset-block-start: 0; inset-inline-end: 0; margin: 0; width: dt('datatable.column.resizer.width'); height: 100%; padding: 0; cursor: col-resize; border: 1px solid transparent; } .p-datatable-column-header-content { display: flex; align-items: center; gap: dt('datatable.header.cell.gap'); } .p-datatable-column-resize-indicator { width: dt('datatable.resize.indicator.width'); position: absolute; z-index: 10; display: none; background: dt('datatable.resize.indicator.color'); } .p-datatable-row-reorder-indicator-up, .p-datatable-row-reorder-indicator-down { position: absolute; display: none; } .p-datatable-reorderable-column, .p-datatable-reorderable-row-handle { cursor: move; } .p-datatable-mask { position: absolute; display: flex; align-items: center; justify-content: center; z-index: 2; } .p-datatable-inline-filter { display: flex; align-items: center; width: 100%; gap: dt('datatable.filter.inline.gap'); } .p-datatable-inline-filter .p-datatable-filter-element-container { flex: 1 1 auto; width: 1%; } .p-datatable-filter-overlay { background: dt('datatable.filter.overlay.select.background'); color: dt('datatable.filter.overlay.select.color'); border: 1px solid dt('datatable.filter.overlay.select.border.color'); border-radius: dt('datatable.filter.overlay.select.border.radius'); box-shadow: dt('datatable.filter.overlay.select.shadow'); min-width: 12.5rem; } .p-datatable-filter-constraint-list { margin: 0; list-style: none; display: flex; flex-direction: column; padding: dt('datatable.filter.constraint.list.padding'); gap: dt('datatable.filter.constraint.list.gap'); } .p-datatable-filter-constraint { padding: dt('datatable.filter.constraint.padding'); color: dt('datatable.filter.constraint.color'); border-radius: dt('datatable.filter.constraint.border.radius'); cursor: pointer; transition: background dt('datatable.transition.duration'), color dt('datatable.transition.duration'), border-color dt('datatable.transition.duration'), box-shadow dt('datatable.transition.duration'); } .p-datatable-filter-constraint-selected { background: dt('datatable.filter.constraint.selected.background'); color: dt('datatable.filter.constraint.selected.color'); } .p-datatable-filter-constraint:not(.p-datatable-filter-constraint-selected):not(.p-disabled):hover { background: dt('datatable.filter.constraint.focus.background'); color: dt('datatable.filter.constraint.focus.color'); } .p-datatable-filter-constraint:focus-visible { outline: 0 none; background: dt('datatable.filter.constraint.focus.background'); color: dt('datatable.filter.constraint.focus.color'); } .p-datatable-filter-constraint-selected:focus-visible { outline: 0 none; background: dt('datatable.filter.constraint.selected.focus.background'); color: dt('datatable.filter.constraint.selected.focus.color'); } .p-datatable-filter-constraint-separator { border-block-start: 1px solid dt('datatable.filter.constraint.separator.border.color'); } .p-datatable-popover-filter { display: inline-flex; margin-inline-start: auto; } .p-datatable-filter-overlay-popover { background: dt('datatable.filter.overlay.popover.background'); color: dt('datatable.filter.overlay.popover.color'); border: 1px solid dt('datatable.filter.overlay.popover.border.color'); border-radius: dt('datatable.filter.overlay.popover.border.radius'); box-shadow: dt('datatable.filter.overlay.popover.shadow'); min-width: 12.5rem; padding: dt('datatable.filter.overlay.popover.padding'); display: flex; flex-direction: column; gap: dt('datatable.filter.overlay.popover.gap'); } .p-datatable-filter-operator-dropdown { width: 100%; } .p-datatable-filter-rule-list, .p-datatable-filter-rule { display: flex; flex-direction: column; gap: dt('datatable.filter.overlay.popover.gap'); } .p-datatable-filter-rule { border-block-end: 1px solid dt('datatable.filter.rule.border.color'); padding-bottom: dt('datatable.filter.overlay.popover.gap'); } .p-datatable-filter-rule:last-child { border-block-end: 0 none; padding-bottom: 0; } .p-datatable-filter-add-rule-button { width: 100%; } .p-datatable-filter-remove-rule-button { width: 100%; } .p-datatable-filter-buttonbar { padding: 0; display: flex; align-items: center; justify-content: space-between; } .p-datatable-virtualscroller-spacer { display: flex; } .p-datatable .p-virtualscroller .p-virtualscroller-loading { transform: none !important; min-height: 0; position: sticky; inset-block-start: 0; inset-inline-start: 0; } .p-datatable-paginator-top { border-color: dt('datatable.paginator.top.border.color'); border-style: solid; border-width: dt('datatable.paginator.top.border.width'); } .p-datatable-paginator-bottom { border-color: dt('datatable.paginator.bottom.border.color'); border-style: solid; border-width: dt('datatable.paginator.bottom.border.width'); } .p-datatable-header { background: dt('datatable.header.background'); color: dt('datatable.header.color'); border-color: dt('datatable.header.border.color'); border-style: solid; border-width: dt('datatable.header.border.width'); padding: dt('datatable.header.padding'); } .p-datatable-footer { background: dt('datatable.footer.background'); color: dt('datatable.footer.color'); border-color: dt('datatable.footer.border.color'); border-style: solid; border-width: dt('datatable.footer.border.width'); padding: dt('datatable.footer.padding'); } .p-datatable-header-cell { padding: dt('datatable.header.cell.padding'); background: dt('datatable.header.cell.background'); border-color: dt('datatable.header.cell.border.color'); border-style: solid; border-width: 0 0 1px 0; color: dt('datatable.header.cell.color'); font-weight: normal; text-align: start; transition: background dt('datatable.transition.duration'), color dt('datatable.transition.duration'), border-color dt('datatable.transition.duration'), outline-color dt('datatable.transition.duration'), box-shadow dt('datatable.transition.duration'); } .p-datatable-column-title { font-weight: dt('datatable.column.title.font.weight'); } .p-datatable-tbody > tr { outline-color: transparent; background: dt('datatable.row.background'); color: dt('datatable.row.color'); transition: background dt('datatable.transition.duration'), color dt('datatable.transition.duration'), border-color dt('datatable.transition.duration'), outline-color dt('datatable.transition.duration'), box-shadow dt('datatable.transition.duration'); } .p-datatable-tbody > tr > td { text-align: start; border-color: dt('datatable.body.cell.border.color'); border-style: solid; border-width: 0 0 1px 0; padding: dt('datatable.body.cell.padding'); } .p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover { background: dt('datatable.row.hover.background'); color: dt('datatable.row.hover.color'); } .p-datatable-tbody > tr.p-datatable-row-selected { background: dt('datatable.row.selected.background'); color: dt('datatable.row.selected.color'); } .p-datatable-tbody > tr:has(+ .p-datatable-row-selected) > td { border-block-end-color: dt('datatable.body.cell.selected.border.color'); } .p-datatable-tbody > tr.p-datatable-row-selected > td { border-block-end-color: dt('datatable.body.cell.selected.border.color'); } .p-datatable-tbody > tr:focus-visible, .p-datatable-tbody > tr.p-datatable-contextmenu-row-selected { box-shadow: dt('datatable.row.focus.ring.shadow'); outline: dt('datatable.row.focus.ring.width') dt('datatable.row.focus.ring.style') dt('datatable.row.focus.ring.color'); outline-offset: dt('datatable.row.focus.ring.offset'); } .p-datatable-tfoot > tr > td { text-align: start; padding: dt('datatable.footer.cell.padding'); border-color: dt('datatable.footer.cell.border.color'); border-style: solid; border-width: 0 0 1px 0; color: dt('datatable.footer.cell.color'); background: dt('datatable.footer.cell.background'); } .p-datatable-column-footer { font-weight: dt('datatable.column.footer.font.weight'); } .p-datatable-sortable-column { cursor: pointer; user-select: none; outline-color: transparent; } .p-datatable-column-title, .p-datatable-sort-icon, .p-datatable-sort-badge { vertical-align: middle; } .p-datatable-sort-icon { color: dt('datatable.sort.icon.color'); font-size: dt('datatable.sort.icon.size'); width: dt('datatable.sort.icon.size'); height: dt('datatable.sort.icon.size'); transition: color dt('datatable.transition.duration'); } .p-datatable-sortable-column:not(.p-datatable-column-sorted):hover { background: dt('datatable.header.cell.hover.background'); color: dt('datatable.header.cell.hover.color'); } .p-datatable-sortable-column:not(.p-datatable-column-sorted):hover .p-datatable-sort-icon { color: dt('datatable.sort.icon.hover.color'); } .p-datatable-column-sorted { background: dt('datatable.header.cell.selected.background'); color: dt('datatable.header.cell.selected.color'); } .p-datatable-column-sorted .p-datatable-sort-icon { color: dt('datatable.header.cell.selected.color'); } .p-datatable-sortable-column:focus-visible { box-shadow: dt('datatable.header.cell.focus.ring.shadow'); outline: dt('datatable.header.cell.focus.ring.width') dt('datatable.header.cell.focus.ring.style') dt('datatable.header.cell.focus.ring.color'); outline-offset: dt('datatable.header.cell.focus.ring.offset'); } .p-datatable-hoverable .p-datatable-selectable-row { cursor: pointer; } .p-datatable-tbody > tr.p-datatable-dragpoint-top > td { box-shadow: inset 0 2px 0 0 dt('datatable.drop.point.color'); } .p-datatable-tbody > tr.p-datatable-dragpoint-bottom > td { box-shadow: inset 0 -2px 0 0 dt('datatable.drop.point.color'); } .p-datatable-loading-icon { font-size: dt('datatable.loading.icon.size'); width: dt('datatable.loading.icon.size'); height: dt('datatable.loading.icon.size'); } .p-datatable-gridlines .p-datatable-header { border-width: 1px 1px 0 1px; } .p-datatable-gridlines .p-datatable-footer { border-width: 0 1px 1px 1px; } .p-datatable-gridlines .p-datatable-paginator-top { border-width: 1px 1px 0 1px; } .p-datatable-gridlines .p-datatable-paginator-bottom { border-width: 0 1px 1px 1px; } .p-datatable-gridlines .p-datatable-thead > tr > th { border-width: 1px 0 1px 1px; } .p-datatable-gridlines .p-datatable-thead > tr > th:last-child { border-width: 1px; } .p-datatable-gridlines .p-datatable-tbody > tr > td { border-width: 1px 0 0 1px; } .p-datatable-gridlines .p-datatable-tbody > tr > td:last-child { border-width: 1px 1px 0 1px; } .p-datatable-gridlines .p-datatable-tbody > tr:last-child > td { border-width: 1px 0 1px 1px; } .p-datatable-gridlines .p-datatable-tbody > tr:last-child > td:last-child { border-width: 1px; } .p-datatable-gridlines .p-datatable-tfoot > tr > td { border-width: 1px 0 1px 1px; } .p-datatable-gridlines .p-datatable-tfoot > tr > td:last-child { border-width: 1px 1px 1px 1px; } .p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td { border-width: 0 0 1px 1px; } .p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td:last-child { border-width: 0 1px 1px 1px; } .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td { border-width: 0 0 1px 1px; } .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td:last-child { border-width: 0 1px 1px 1px; } .p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td { border-width: 0 0 0 1px; } .p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td:last-child { border-width: 0 1px 0 1px; } .p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd { background: dt('datatable.row.striped.background'); } .p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd.p-datatable-row-selected { background: dt('datatable.row.selected.background'); color: dt('datatable.row.selected.color'); } .p-datatable-striped.p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover { background: dt('datatable.row.hover.background'); color: dt('datatable.row.hover.color'); } .p-datatable.p-datatable-sm .p-datatable-header { padding: dt('datatable.header.sm.padding'); } .p-datatable.p-datatable-sm .p-datatable-thead > tr > th { padding: dt('datatable.header.cell.sm.padding'); } .p-datatable.p-datatable-sm .p-datatable-tbody > tr > td { padding: dt('datatable.body.cell.sm.padding'); } .p-datatable.p-datatable-sm .p-datatable-tfoot > tr > td { padding: dt('datatable.footer.cell.sm.padding'); } .p-datatable.p-datatable-sm .p-datatable-footer { padding: dt('datatable.footer.sm.padding'); } .p-datatable.p-datatable-lg .p-datatable-header { padding: dt('datatable.header.lg.padding'); } .p-datatable.p-datatable-lg .p-datatable-thead > tr > th { padding: dt('datatable.header.cell.lg.padding'); } .p-datatable.p-datatable-lg .p-datatable-tbody > tr > td { padding: dt('datatable.body.cell.lg.padding'); } .p-datatable.p-datatable-lg .p-datatable-tfoot > tr > td { padding: dt('datatable.footer.cell.lg.padding'); } .p-datatable.p-datatable-lg .p-datatable-footer { padding: dt('datatable.footer.lg.padding'); } .p-datatable-row-toggle-button { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; position: relative; width: dt('datatable.row.toggle.button.size'); height: dt('datatable.row.toggle.button.size'); color: dt('datatable.row.toggle.button.color'); border: 0 none; background: transparent; cursor: pointer; border-radius: dt('datatable.row.toggle.button.border.radius'); transition: background dt('datatable.transition.duration'), color dt('datatable.transition.duration'), border-color dt('datatable.transition.duration'), outline-color dt('datatable.transition.duration'), box-shadow dt('datatable.transition.duration'); outline-color: transparent; user-select: none; } .p-datatable-row-toggle-button:enabled:hover { color: dt('datatable.row.toggle.button.hover.color'); background: dt('datatable.row.toggle.button.hover.background'); } .p-datatable-tbody > tr.p-datatable-row-selected .p-datatable-row-toggle-button:hover { background: dt('datatable.row.toggle.button.selected.hover.background'); color: dt('datatable.row.toggle.button.selected.hover.color'); } .p-datatable-row-toggle-button:focus-visible { box-shadow: dt('datatable.row.toggle.button.focus.ring.shadow'); outline: dt('datatable.row.toggle.button.focus.ring.width') dt('datatable.row.toggle.button.focus.ring.style') dt('datatable.row.toggle.button.focus.ring.color'); outline-offset: dt('datatable.row.toggle.button.focus.ring.offset'); } .p-datatable-row-toggle-icon:dir(rtl) { transform: rotate(180deg); } `;var nCt=["header"],oCt=["headergrouped"],rCt=["body"],sCt=["loadingbody"],aCt=["caption"],lCt=["footer"],cCt=["footergrouped"],dCt=["summary"],uCt=["colgroup"],pCt=["expandedrow"],hCt=["groupheader"],mCt=["groupfooter"],fCt=["frozenexpandedrow"],gCt=["frozenheader"],_Ct=["frozenbody"],yCt=["frozenfooter"],vCt=["frozencolgroup"],bCt=["emptymessage"],CCt=["paginatorleft"],xCt=["paginatorright"],wCt=["paginatordropdownitem"],SCt=["loadingicon"],TCt=["reorderindicatorupicon"],ICt=["reorderindicatordownicon"],ECt=["sorticon"],DCt=["checkboxicon"],ACt=["headercheckboxicon"],kCt=["paginatordropdownicon"],MCt=["paginatorfirstpagelinkicon"],OCt=["paginatorlastpagelinkicon"],RCt=["paginatorpreviouspagelinkicon"],FCt=["paginatornextpagelinkicon"],PCt=["resizeHelper"],LCt=["reorderIndicatorUp"],NCt=["reorderIndicatorDown"],BCt=["wrapper"],VCt=["table"],zCt=["thead"],UCt=["tfoot"],HCt=["scroller"],jCt=t=>({height:t}),hPe=(t,n)=>({$implicit:t,options:n}),GCt=t=>({columns:t}),PL=t=>({$implicit:t});function $Ct(t,n){if(t&1&&ce(0,"i"),t&2){let e=P(2);Oe(e.cn(e.cx("loadingIcon"),e.loadingIcon))}}function qCt(t,n){if(t&1&&(si(),ce(0,"svg",18)),t&2){let e=P(3);Oe(e.cx("loadingIcon")),E("spin",!0)}}function KCt(t,n){}function WCt(t,n){t&1&&ee(0,KCt,0,0,"ng-template")}function YCt(t,n){if(t&1&&(k(0,"span"),ee(1,WCt,1,0,null,19),D()),t&2){let e=P(3);Oe(e.cx("loadingIcon")),T(),E("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function QCt(t,n){if(t&1&&(Di(0),ee(1,qCt,1,3,"svg",17)(2,YCt,2,3,"span",10),Ai()),t&2){let e=P(2);T(),E("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),T(),E("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function ZCt(t,n){if(t&1&&(k(0,"div"),ee(1,$Ct,1,2,"i",10)(2,QCt,3,2,"ng-container",14),D()),t&2){let e=P();Oe(e.cx("mask")),T(),E("ngIf",e.loadingIcon),T(),E("ngIf",!e.loadingIcon)}}function XCt(t,n){t&1&&ui(0)}function JCt(t,n){if(t&1&&(k(0,"div"),ee(1,XCt,1,0,"ng-container",19),D()),t&2){let e=P();Oe(e.cx("header")),T(),E("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function ext(t,n){t&1&&ui(0)}function txt(t,n){if(t&1&&ee(0,ext,1,0,"ng-container",19),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function ixt(t,n){t&1&&ee(0,txt,1,1,"ng-template",21)}function nxt(t,n){t&1&&ui(0)}function oxt(t,n){if(t&1&&ee(0,nxt,1,0,"ng-container",19),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function rxt(t,n){t&1&&ee(0,oxt,1,1,"ng-template",22)}function sxt(t,n){t&1&&ui(0)}function axt(t,n){if(t&1&&ee(0,sxt,1,0,"ng-container",19),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function lxt(t,n){t&1&&ee(0,axt,1,1,"ng-template",23)}function cxt(t,n){t&1&&ui(0)}function dxt(t,n){if(t&1&&ee(0,cxt,1,0,"ng-container",19),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function uxt(t,n){t&1&&ee(0,dxt,1,1,"ng-template",24)}function pxt(t,n){t&1&&ui(0)}function hxt(t,n){if(t&1&&ee(0,pxt,1,0,"ng-container",19),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function mxt(t,n){t&1&&ee(0,hxt,1,1,"ng-template",25)}function fxt(t,n){if(t&1){let e=tt();k(0,"p-paginator",20),ie("onPageChange",function(o){se(e);let r=P();return ae(r.onPageChange(o))}),ee(1,ixt,1,0,null,14)(2,rxt,1,0,null,14)(3,lxt,1,0,null,14)(4,uxt,1,0,null,14)(5,mxt,1,0,null,14),D()}if(t&2){let e=P();E("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate||e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate||e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate||e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)("styleClass",e.cx("pcPaginator")+" "+e.paginatorStyleClass&&e.paginatorStyleClass)("locale",e.paginatorLocale),T(),E("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),T(),E("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),T(),E("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),T(),E("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),T(),E("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function gxt(t,n){t&1&&ui(0)}function _xt(t,n){if(t&1&&ee(0,gxt,1,0,"ng-container",27),t&2){let e=n.$implicit,i=n.options;P(2);let o=ti(8);E("ngTemplateOutlet",o)("ngTemplateOutletContext",Eo(2,hPe,e,i))}}function yxt(t,n){if(t&1){let e=tt();k(0,"p-scroller",26,2),ie("onLazyLoad",function(o){se(e);let r=P();return ae(r.onLazyItemLoad(o))}),ee(2,_xt,1,5,"ng-template",null,3,Pt),D()}if(t&2){let e=P();$r(ki(15,jCt,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),E("items",e.processedData)("columns",e.columns)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize)("step",e.rows)("delay",e.lazy?e.virtualScrollDelay:0)("inline",!0)("lazy",e.lazy)("loaderDisabled",!0)("showSpacer",!1)("showLoader",e.loadingBodyTemplate||e._loadingBodyTemplate)("options",e.virtualScrollOptions)("autoSize",!0)}}function vxt(t,n){t&1&&ui(0)}function bxt(t,n){if(t&1&&(Di(0),ee(1,vxt,1,0,"ng-container",27),Ai()),t&2){let e=P(),i=ti(8);T(),E("ngTemplateOutlet",i)("ngTemplateOutletContext",Eo(4,hPe,e.processedData,ki(2,GCt,e.columns)))}}function Cxt(t,n){t&1&&ui(0)}function xxt(t,n){t&1&&ui(0)}function wxt(t,n){if(t&1&&ce(0,"tbody",34),t&2){let e=P().options,i=P();Oe(i.cx("tbody")),E("value",i.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",i.frozenBodyTemplate||i._frozenBodyTemplate)("frozen",!0)}}function Sxt(t,n){if(t&1&&ce(0,"tbody",35),t&2){let e=P().options,i=P();$r("height: calc("+e.spacerStyle.height+" - "+e.rows.length*e.itemSize+"px);"),Oe(i.cx("virtualScrollerSpacer"))}}function Txt(t,n){t&1&&ui(0)}function Ixt(t,n){if(t&1&&(k(0,"tfoot",36,6),ee(2,Txt,1,0,"ng-container",27),D()),t&2){let e=P().options,i=P();E("ngClass",i.cx("footer"))("ngStyle",i.sx("tfoot")),T(2),E("ngTemplateOutlet",i.footerGroupedTemplate||i.footerTemplate||i._footerTemplate||i._footerGroupedTemplate)("ngTemplateOutletContext",ki(4,PL,e.columns))}}function Ext(t,n){if(t&1&&(k(0,"table",28,4),ee(2,Cxt,1,0,"ng-container",27),k(3,"thead",29,5),ee(5,xxt,1,0,"ng-container",27),D(),ee(6,wxt,1,7,"tbody",30),ce(7,"tbody",31),ee(8,Sxt,1,4,"tbody",32)(9,Ixt,3,6,"tfoot",33),D()),t&2){let e=n.options,i=P();$r(i.tableStyle),Oe(i.cn(i.cx("table"),i.tableStyleClass)),Ge("id",i.id+"-table"),T(2),E("ngTemplateOutlet",i.colGroupTemplate||i._colGroupTemplate)("ngTemplateOutletContext",ki(23,PL,e.columns)),T(),Oe(i.cx("thead")),E("ngStyle",i.sx("thead")),T(2),E("ngTemplateOutlet",i.headerGroupedTemplate||i.headerTemplate||i._headerTemplate)("ngTemplateOutletContext",ki(25,PL,e.columns)),T(),E("ngIf",i.frozenValue||i.frozenBodyTemplate||i._frozenBodyTemplate),T(),$r(e.contentStyle),Oe(i.cx("tbody",e.contentStyleClass)),E("value",i.dataToRender(e.rows))("pTableBody",e.columns)("pTableBodyTemplate",i.bodyTemplate||i._bodyTemplate)("scrollerOptions",e),T(),E("ngIf",e.spacerStyle),T(),E("ngIf",i.footerGroupedTemplate||i.footerTemplate||i._footerTemplate||i._footerGroupedTemplate)}}function Dxt(t,n){t&1&&ui(0)}function Axt(t,n){if(t&1&&ee(0,Dxt,1,0,"ng-container",19),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function kxt(t,n){t&1&&ee(0,Axt,1,1,"ng-template",21)}function Mxt(t,n){t&1&&ui(0)}function Oxt(t,n){if(t&1&&ee(0,Mxt,1,0,"ng-container",19),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function Rxt(t,n){t&1&&ee(0,Oxt,1,1,"ng-template",22)}function Fxt(t,n){t&1&&ui(0)}function Pxt(t,n){if(t&1&&ee(0,Fxt,1,0,"ng-container",19),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function Lxt(t,n){t&1&&ee(0,Pxt,1,1,"ng-template",23)}function Nxt(t,n){t&1&&ui(0)}function Bxt(t,n){if(t&1&&ee(0,Nxt,1,0,"ng-container",19),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function Vxt(t,n){t&1&&ee(0,Bxt,1,1,"ng-template",24)}function zxt(t,n){t&1&&ui(0)}function Uxt(t,n){if(t&1&&ee(0,zxt,1,0,"ng-container",19),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Hxt(t,n){t&1&&ee(0,Uxt,1,1,"ng-template",25)}function jxt(t,n){if(t&1){let e=tt();k(0,"p-paginator",20),ie("onPageChange",function(o){se(e);let r=P();return ae(r.onPageChange(o))}),ee(1,kxt,1,0,null,14)(2,Rxt,1,0,null,14)(3,Lxt,1,0,null,14)(4,Vxt,1,0,null,14)(5,Hxt,1,0,null,14),D()}if(t&2){let e=P();E("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate||e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate||e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate||e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)("styleClass",e.cx("pcPaginator")+" "+e.paginatorStyleClass&&e.paginatorStyleClass)("locale",e.paginatorLocale),T(),E("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),T(),E("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),T(),E("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),T(),E("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),T(),E("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Gxt(t,n){t&1&&ui(0)}function $xt(t,n){if(t&1&&(k(0,"div",37),ee(1,Gxt,1,0,"ng-container",19),D()),t&2){let e=P();E("ngClass",e.cx("footer")),T(),E("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function qxt(t,n){if(t&1&&ce(0,"div",37,7),t&2){let e=P();Ir("display","none"),E("ngClass",e.cx("columnResizeIndicator"))}}function Kxt(t,n){t&1&&(si(),ce(0,"svg",39))}function Wxt(t,n){}function Yxt(t,n){t&1&&ee(0,Wxt,0,0,"ng-template")}function Qxt(t,n){if(t&1&&(k(0,"span",37,8),ee(2,Kxt,1,0,"svg",38)(3,Yxt,1,0,null,19),D()),t&2){let e=P();Ir("display","none"),E("ngClass",e.cx("rowReorderIndicatorUp")),T(2),E("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),T(),E("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function Zxt(t,n){t&1&&(si(),ce(0,"svg",41))}function Xxt(t,n){}function Jxt(t,n){t&1&&ee(0,Xxt,0,0,"ng-template")}function e1t(t,n){if(t&1&&(k(0,"span",37,9),ee(2,Zxt,1,0,"svg",40)(3,Jxt,1,0,null,19),D()),t&2){let e=P();Ir("display","none"),E("ngClass",e.cx("rowReorderIndicatorDown")),T(2),E("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),T(),E("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var t1t=["pTableBody",""],Ode=(t,n,e,i,o)=>({$implicit:t,rowIndex:n,columns:e,editing:i,frozen:o}),i1t=(t,n,e,i,o,r,s)=>({$implicit:t,rowIndex:n,columns:e,editing:i,frozen:o,rowgroup:r,rowspan:s}),FY=(t,n,e,i,o,r)=>({$implicit:t,rowIndex:n,columns:e,expanded:i,editing:o,frozen:r}),mPe=(t,n,e,i)=>({$implicit:t,rowIndex:n,columns:e,frozen:i}),fPe=(t,n)=>({$implicit:t,frozen:n});function n1t(t,n){t&1&&ui(0)}function o1t(t,n){if(t&1&&(Di(0,3),ee(1,n1t,1,0,"ng-container",4),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P(2);T(),E("ngTemplateOutlet",r.dt.groupHeaderTemplate||r.dt._groupHeaderTemplate)("ngTemplateOutletContext",FA(2,Ode,i,r.getRowIndex(o),r.columns,r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function r1t(t,n){t&1&&ui(0)}function s1t(t,n){if(t&1&&(Di(0),ee(1,r1t,1,0,"ng-container",4),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P(2);T(),E("ngTemplateOutlet",i?r.template:r.dt.loadingBodyTemplate||r.dt._loadingBodyTemplate)("ngTemplateOutletContext",FA(2,Ode,i,r.getRowIndex(o),r.columns,r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function a1t(t,n){t&1&&ui(0)}function l1t(t,n){if(t&1&&(Di(0),ee(1,a1t,1,0,"ng-container",4),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P(2);T(),E("ngTemplateOutlet",i?r.template:r.dt.loadingBodyTemplate||r.dt._loadingBodyTemplate)("ngTemplateOutletContext",one(2,i1t,i,r.getRowIndex(o),r.columns,r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen,r.shouldRenderRowspan(r.value,i,o),r.calculateRowGroupSize(r.value,i,o)))}}function c1t(t,n){t&1&&ui(0)}function d1t(t,n){if(t&1&&(Di(0,3),ee(1,c1t,1,0,"ng-container",4),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P(2);T(),E("ngTemplateOutlet",r.dt.groupFooterTemplate||r.dt._groupFooterTemplate)("ngTemplateOutletContext",FA(2,Ode,i,r.getRowIndex(o),r.columns,r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function u1t(t,n){if(t&1&&ee(0,o1t,2,8,"ng-container",2)(1,s1t,2,8,"ng-container",0)(2,l1t,2,10,"ng-container",0)(3,d1t,2,8,"ng-container",2),t&2){let e=n.$implicit,i=n.index,o=P(2);E("ngIf",(o.dt.groupHeaderTemplate||o.dt._groupHeaderTemplate)&&!o.dt.virtualScroll&&o.dt.rowGroupMode==="subheader"&&o.shouldRenderRowGroupHeader(o.value,e,o.getRowIndex(i))),T(),E("ngIf",o.dt.rowGroupMode!=="rowspan"),T(),E("ngIf",o.dt.rowGroupMode==="rowspan"),T(),E("ngIf",(o.dt.groupFooterTemplate||o.dt._groupFooterTemplate)&&!o.dt.virtualScroll&&o.dt.rowGroupMode==="subheader"&&o.shouldRenderRowGroupFooter(o.value,e,o.getRowIndex(i)))}}function p1t(t,n){if(t&1&&(Di(0),ee(1,u1t,4,4,"ng-template",1),Ai()),t&2){let e=P();T(),E("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function h1t(t,n){t&1&&ui(0)}function m1t(t,n){if(t&1&&(Di(0),ee(1,h1t,1,0,"ng-container",4),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P(2);T(),E("ngTemplateOutlet",r.template)("ngTemplateOutletContext",SR(2,FY,i,r.getRowIndex(o),r.columns,r.dt.isRowExpanded(i),r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function f1t(t,n){t&1&&ui(0)}function g1t(t,n){if(t&1&&(Di(0,3),ee(1,f1t,1,0,"ng-container",4),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P(2);T(),E("ngTemplateOutlet",r.dt.groupHeaderTemplate||r.dt._groupHeaderTemplate)("ngTemplateOutletContext",SR(2,FY,i,r.getRowIndex(o),r.columns,r.dt.isRowExpanded(i),r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function _1t(t,n){t&1&&ui(0)}function y1t(t,n){t&1&&ui(0)}function v1t(t,n){if(t&1&&(Di(0,3),ee(1,y1t,1,0,"ng-container",4),Ai()),t&2){let e=P(2),i=e.$implicit,o=e.index,r=P(2);T(),E("ngTemplateOutlet",r.dt.groupFooterTemplate||r.dt._groupFooterTemplate)("ngTemplateOutletContext",SR(2,FY,i,r.getRowIndex(o),r.columns,r.dt.isRowExpanded(i),r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function b1t(t,n){if(t&1&&(Di(0),ee(1,_1t,1,0,"ng-container",4)(2,v1t,2,9,"ng-container",2),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P(2);T(),E("ngTemplateOutlet",r.dt.expandedRowTemplate||r.dt._expandedRowTemplate)("ngTemplateOutletContext",Sv(3,mPe,i,r.getRowIndex(o),r.columns,r.frozen)),T(),E("ngIf",(r.dt.groupFooterTemplate||r.dt._groupFooterTemplate)&&r.dt.rowGroupMode==="subheader"&&r.shouldRenderRowGroupFooter(r.value,i,r.getRowIndex(o)))}}function C1t(t,n){if(t&1&&ee(0,m1t,2,9,"ng-container",0)(1,g1t,2,9,"ng-container",2)(2,b1t,3,8,"ng-container",0),t&2){let e=n.$implicit,i=n.index,o=P(2);E("ngIf",!(o.dt.groupHeaderTemplate&&o.dt._groupHeaderTemplate)),T(),E("ngIf",(o.dt.groupHeaderTemplate||o.dt._groupHeaderTemplate)&&o.dt.rowGroupMode==="subheader"&&o.shouldRenderRowGroupHeader(o.value,e,o.getRowIndex(i))),T(),E("ngIf",o.dt.isRowExpanded(e))}}function x1t(t,n){if(t&1&&(Di(0),ee(1,C1t,3,3,"ng-template",1),Ai()),t&2){let e=P();T(),E("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function w1t(t,n){t&1&&ui(0)}function S1t(t,n){t&1&&ui(0)}function T1t(t,n){if(t&1&&(Di(0),ee(1,S1t,1,0,"ng-container",4),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P(2);T(),E("ngTemplateOutlet",r.dt.frozenExpandedRowTemplate||r.dt._frozenExpandedRowTemplate)("ngTemplateOutletContext",Sv(2,mPe,i,r.getRowIndex(o),r.columns,r.frozen))}}function I1t(t,n){if(t&1&&ee(0,w1t,1,0,"ng-container",4)(1,T1t,2,7,"ng-container",0),t&2){let e=n.$implicit,i=n.index,o=P(2);E("ngTemplateOutlet",o.template)("ngTemplateOutletContext",SR(3,FY,e,o.getRowIndex(i),o.columns,o.dt.isRowExpanded(e),o.dt.editMode==="row"&&o.dt.isRowEditing(e),o.frozen)),T(),E("ngIf",o.dt.isRowExpanded(e))}}function E1t(t,n){if(t&1&&(Di(0),ee(1,I1t,2,10,"ng-template",1),Ai()),t&2){let e=P();T(),E("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function D1t(t,n){t&1&&ui(0)}function A1t(t,n){if(t&1&&(Di(0),ee(1,D1t,1,0,"ng-container",4),Ai()),t&2){let e=P();T(),E("ngTemplateOutlet",e.dt.loadingBodyTemplate||e.dt._loadingBodyTemplate)("ngTemplateOutletContext",Eo(2,fPe,e.columns,e.frozen))}}function k1t(t,n){t&1&&ui(0)}function M1t(t,n){if(t&1&&(Di(0),ee(1,k1t,1,0,"ng-container",4),Ai()),t&2){let e=P();T(),E("ngTemplateOutlet",e.dt.emptyMessageTemplate||e.dt._emptyMessageTemplate)("ngTemplateOutletContext",Eo(2,fPe,e.columns,e.frozen))}}function O1t(t,n){if(t&1&&(si(),ce(0,"svg",6)),t&2){let e=P(2);Oe(e.cx("sortableColumnIcon"))}}function R1t(t,n){if(t&1&&(si(),ce(0,"svg",7)),t&2){let e=P(2);Oe(e.cx("sortableColumnIcon"))}}function F1t(t,n){if(t&1&&(si(),ce(0,"svg",8)),t&2){let e=P(2);Oe(e.cx("sortableColumnIcon"))}}function P1t(t,n){if(t&1&&(Di(0),ee(1,O1t,1,2,"svg",3)(2,R1t,1,2,"svg",4)(3,F1t,1,2,"svg",5),Ai()),t&2){let e=P();T(),E("ngIf",e.sortOrder===0),T(),E("ngIf",e.sortOrder===1),T(),E("ngIf",e.sortOrder===-1)}}function L1t(t,n){}function N1t(t,n){t&1&&ee(0,L1t,0,0,"ng-template")}function B1t(t,n){if(t&1&&(k(0,"span"),ee(1,N1t,1,0,null,9),D()),t&2){let e=P();Oe(e.cx("sortableColumnIcon")),T(),E("ngTemplateOutlet",e.dt.sortIconTemplate||e.dt._sortIconTemplate)("ngTemplateOutletContext",ki(4,PL,e.sortOrder))}}function V1t(t,n){if(t&1&&ce(0,"p-badge",10),t&2){let e=P();Oe(e.cx("sortableColumnBadge")),E("value",e.getBadgeValue())}}function z1t(t,n){}function U1t(t,n){t&1&&ee(0,z1t,0,0,"ng-template")}function H1t(t,n){if(t&1&&ee(0,U1t,1,0,null,2),t&2){let e=P(),i=P();E("ngTemplateOutlet",e)("ngTemplateOutletContext",ki(2,PL,i.checked))}}function j1t(t,n){t&1&&ee(0,H1t,1,4,"ng-template",1)}function G1t(t,n){}function $1t(t,n){t&1&&ee(0,G1t,0,0,"ng-template")}function q1t(t,n){if(t&1&&ee(0,$1t,1,0,null,2),t&2){let e=P(),i=P();E("ngTemplateOutlet",e)("ngTemplateOutletContext",ki(2,PL,i.checked))}}function K1t(t,n){t&1&&ee(0,q1t,1,4,"ng-template",1)}var W1t=` ${pPe} /* For PrimeNG */ .p-datatable-scrollable-table > .p-datatable-thead { top: 0; z-index: 2; } .p-datatable-scrollable-table > .p-datatable-frozen-tbody { position: sticky; z-index: 2; } .p-datatable-scrollable-table > .p-datatable-frozen-tbody + .p-datatable-frozen-tbody { z-index: 1; } .p-datatable-scrollable > tr:not(:has(.p-datatable-selectable-row)) > .p-datatable-frozen-column { position: sticky; background: dt('datatable.header.cell.background'); } .p-datatable-scrollable th.p-datatable-frozen-column { z-index: 1; position: sticky; background: dt('datatable.header.cell.background'); } .p-datatable-scrollable td.p-datatable-frozen-column { z-index: 1; position: sticky; background: dt('datatable.header.cell.background'); } .p-datatable-mask { position: absolute; display: flex; align-items: center; justify-content: center; z-index: 3; } .p-datatable-filter-overlay { position: absolute; background: dt('datatable.filter.overlay.select.background'); color: dt('datatable.filter.overlay.select.color'); border: 1px solid dt('datatable.filter.overlay.select.border.color'); border-radius: dt('datatable.filter.overlay.select.border.radius'); box-shadow: dt('datatable.filter.overlay.select.shadow'); min-width: 12.5rem; } .p-datatable-filter-rule { border-bottom: 1px solid dt('datatable.filter.rule.border.color'); } .p-datatable-filter-rule:last-child { border-bottom: 0 none; } .p-datatable-filter-add-rule-button, .p-datatable-filter-remove-rule-button { width: 100%; } .p-datatable-filter-remove-button { width: 100%; } .p-datatable-thead > tr > th { padding: dt('datatable.header.cell.padding'); background: dt('datatable.header.cell.background'); border-color: dt('datatable.header.cell.border.color'); border-style: solid; border-width: 0 0 1px 0; color: dt('datatable.header.cell.color'); font-weight: dt('datatable.column.title.font.weight'); text-align: start; transition: background dt('datatable.transition.duration'), color dt('datatable.transition.duration'), border-color dt('datatable.transition.duration'), outline-color dt('datatable.transition.duration'), box-shadow dt('datatable.transition.duration'); } .p-datatable-thead > tr > th p-columnfilter { font-weight: normal; } .p-datatable-thead > tr > th, .p-datatable-sort-icon, .p-datatable-sort-badge { vertical-align: middle; } .p-datatable-thead > tr > th.p-datatable-column-sorted { background: dt('datatable.header.cell.selected.background'); color: dt('datatable.header.cell.selected.color'); } .p-datatable-thead > tr > th.p-datatable-column-sorted .p-datatable-sort-icon { color: dt('datatable.header.cell.selected.color'); } .p-datatable.p-datatable-striped .p-datatable-tbody > tr:nth-child(odd) { background: dt('datatable.row.striped.background'); } .p-datatable.p-datatable-striped .p-datatable-tbody > tr:nth-child(odd).p-datatable-row-selected { background: dt('datatable.row.selected.background'); color: dt('datatable.row.selected.color'); } p-sortIcon, p-sort-icon, p-sorticon { display: inline-flex; align-items: center; gap: dt('datatable.header.cell.gap'); } .p-datatable .p-editable-column.p-cell-editing { padding: 0; } .p-datatable .p-editable-column.p-cell-editing p-celleditor { display: block; width: 100%; } `,Y1t={root:({instance:t})=>["p-datatable p-component",{"p-datatable-hoverable":t.rowHover||t.selectionMode,"p-datatable-resizable":t.resizableColumns,"p-datatable-resizable-fit":t.resizableColumns&&t.columnResizeMode==="fit","p-datatable-scrollable":t.scrollable,"p-datatable-flex-scrollable":t.scrollable&&t.scrollHeight==="flex","p-datatable-striped":t.stripedRows,"p-datatable-gridlines":t.showGridlines,"p-datatable-sm":t.size==="small","p-datatable-lg":t.size==="large"}],mask:"p-datatable-mask p-overlay-mask",loadingIcon:"p-datatable-loading-icon",header:"p-datatable-header",pcPaginator:({instance:t})=>"p-datatable-paginator-"+t.paginatorPosition,tableContainer:"p-datatable-table-container",table:({instance:t})=>["p-datatable-table",{"p-datatable-scrollable-table":t.scrollable,"p-datatable-resizable-table":t.resizableColumns,"p-datatable-resizable-table-fit":t.resizableColumns&&t.columnResizeMode==="fit"}],thead:"p-datatable-thead",columnResizer:"p-datatable-column-resizer",columnHeaderContent:"p-datatable-column-header-content",columnTitle:"p-datatable-column-title",columnFooter:"p-datatable-column-footer",sortIcon:"p-datatable-sort-icon",pcSortBadge:"p-datatable-sort-badge",filter:({instance:t})=>({"p-datatable-filter":!0,"p-datatable-inline-filter":t.display==="row","p-datatable-popover-filter":t.display==="menu"}),filterElementContainer:"p-datatable-filter-element-container",pcColumnFilterButton:"p-datatable-column-filter-button",pcColumnFilterClearButton:"p-datatable-column-filter-clear-button",filterOverlay:({instance:t})=>({"p-datatable-filter-overlay p-component":!0,"p-datatable-filter-overlay-popover":t.display==="menu"}),filterConstraintList:"p-datatable-filter-constraint-list",filterConstraint:"p-datatable-filter-constraint",filterConstraintSeparator:"p-datatable-filter-constraint-separator",filterOperator:"p-datatable-filter-operator",pcFilterOperatorDropdown:"p-datatable-filter-operator-dropdown",filterRuleList:"p-datatable-filter-rule-list",filterRule:"p-datatable-filter-rule",pcFilterConstraintDropdown:"p-datatable-filter-constraint-dropdown",pcFilterRemoveRuleButton:"p-datatable-filter-remove-rule-button",pcFilterAddRuleButton:"p-datatable-filter-add-rule-button",filterButtonbar:"p-datatable-filter-buttonbar",pcFilterClearButton:"p-datatable-filter-clear-button",pcFilterApplyButton:"p-datatable-filter-apply-button",tbody:({instance:t})=>({"p-datatable-tbody":!0,"p-datatable-frozen-tbody":t.frozenValue||t.frozenBodyTemplate,"p-virtualscroller-content":t.virtualScroll}),rowGroupHeader:"p-datatable-row-group-header",rowToggleButton:"p-datatable-row-toggle-button",rowToggleIcon:"p-datatable-row-toggle-icon",rowExpansion:"p-datatable-row-expansion",rowGroupFooter:"p-datatable-row-group-footer",emptyMessage:"p-datatable-empty-message",bodyCell:({instance:t})=>({"p-datatable-frozen-column":t.columnProp("frozen")}),reorderableRowHandle:"p-datatable-reorderable-row-handle",pcRowEditorInit:"p-datatable-row-editor-init",pcRowEditorSave:"p-datatable-row-editor-save",pcRowEditorCancel:"p-datatable-row-editor-cancel",tfoot:"p-datatable-tfoot",footerCell:({instance:t})=>({"p-datatable-frozen-column":t.columnProp("frozen")}),virtualScrollerSpacer:"p-datatable-virtualscroller-spacer",footer:"p-datatable-tfoot",columnResizeIndicator:"p-datatable-column-resize-indicator",rowReorderIndicatorUp:"p-datatable-row-reorder-indicator-up",rowReorderIndicatorDown:"p-datatable-row-reorder-indicator-down",sortableColumn:({instance:t})=>({"p-datatable-sortable-column":t.isEnabled()," p-datatable-column-sorted":t.sorted}),sortableColumnIcon:"p-datatable-sort-icon",sortableColumnBadge:"p-sortable-column-badge",selectableRow:({instance:t})=>({"p-datatable-selectable-row":t.isEnabled(),"p-datatable-row-selected":t.selected}),resizableColumn:"p-datatable-resizable-column",reorderableColumn:"p-datatable-reorderable-column",rowEditorCancel:"p-datatable-row-editor-cancel"},Q1t={tableContainer:({instance:t})=>({"max-height":t.virtualScroll?"":t.scrollHeight,overflow:"auto"}),thead:{position:"sticky"},tfoot:{position:"sticky"}},lS=(()=>{class t extends io{name="datatable";theme=W1t;classes=Y1t;inlineStyles=Q1t;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var LL=(()=>{class t{sortSource=new hi;selectionSource=new hi;contextMenuSource=new hi;valueSource=new hi;columnsSource=new hi;sortSource$=this.sortSource.asObservable();selectionSource$=this.selectionSource.asObservable();contextMenuSource$=this.contextMenuSource.asObservable();valueSource$=this.valueSource.asObservable();columnsSource$=this.columnsSource.asObservable();onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onValueChange(e){this.valueSource.next(e)}onColumnsChange(e){this.columnsSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),hl=(()=>{class t extends oo{frozenColumns;frozenValue;styleClass;tableStyle;tableStyleClass;paginator;pageLinks=5;rowsPerPageOptions;alwaysShowPaginator=!0;paginatorPosition="bottom";paginatorStyleClass;paginatorDropdownAppendTo;paginatorDropdownScrollHeight="200px";currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showJumpToPageDropdown;showJumpToPageInput;showFirstLastIcon=!0;showPageLinks=!0;defaultSortOrder=1;sortMode="single";resetPageOnSort=!0;selectionMode;selectionPageOnly;contextMenuSelection;contextMenuSelectionChange=new ve;contextMenuSelectionMode="separate";dataKey;metaKeySelection=!1;rowSelectable;rowTrackBy=(e,i)=>i;lazy=!1;lazyLoadOnInit=!0;compareSelectionBy="deepEquals";csvSeparator=",";exportFilename="download";filters={};globalFilterFields;filterDelay=300;filterLocale;expandedRowKeys={};editingRowKeys={};rowExpandMode="multiple";scrollable;rowGroupMode;scrollHeight;virtualScroll;virtualScrollItemSize;virtualScrollOptions;virtualScrollDelay=250;frozenWidth;contextMenu;resizableColumns;columnResizeMode="fit";reorderableColumns;loading;loadingIcon;showLoader=!0;rowHover;customSort;showInitialSortBadge=!0;exportFunction;exportHeader;stateKey;stateStorage="session";editMode="cell";groupRowsBy;size;showGridlines;stripedRows;groupRowsByOrder=1;responsiveLayout="scroll";breakpoint="960px";paginatorLocale;get value(){return this._value}set value(e){this._value=e}get columns(){return this._columns}set columns(e){this._columns=e}get first(){return this._first}set first(e){this._first=e}get rows(){return this._rows}set rows(e){this._rows=e}totalRecords=0;get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get selectAll(){return this._selection}set selectAll(e){this._selection=e}selectAllChange=new ve;selectionChange=new ve;onRowSelect=new ve;onRowUnselect=new ve;onPage=new ve;onSort=new ve;onFilter=new ve;onLazyLoad=new ve;onRowExpand=new ve;onRowCollapse=new ve;onContextMenuSelect=new ve;onColResize=new ve;onColReorder=new ve;onRowReorder=new ve;onEditInit=new ve;onEditComplete=new ve;onEditCancel=new ve;onHeaderCheckboxToggle=new ve;sortFunction=new ve;firstChange=new ve;rowsChange=new ve;onStateSave=new ve;onStateRestore=new ve;resizeHelperViewChild;reorderIndicatorUpViewChild;reorderIndicatorDownViewChild;wrapperViewChild;tableViewChild;tableHeaderViewChild;tableFooterViewChild;scroller;_templates;_value=[];_columns;_totalRecords=0;_first=0;_rows;filteredValue;_headerTemplate;headerTemplate;_headerGroupedTemplate;headerGroupedTemplate;_bodyTemplate;bodyTemplate;_loadingBodyTemplate;loadingBodyTemplate;_captionTemplate;captionTemplate;_footerTemplate;footerTemplate;_footerGroupedTemplate;footerGroupedTemplate;_summaryTemplate;summaryTemplate;_colGroupTemplate;colGroupTemplate;_expandedRowTemplate;expandedRowTemplate;_groupHeaderTemplate;groupHeaderTemplate;_groupFooterTemplate;groupFooterTemplate;_frozenExpandedRowTemplate;frozenExpandedRowTemplate;_frozenHeaderTemplate;frozenHeaderTemplate;_frozenBodyTemplate;frozenBodyTemplate;_frozenFooterTemplate;frozenFooterTemplate;_frozenColGroupTemplate;frozenColGroupTemplate;_emptyMessageTemplate;emptyMessageTemplate;_paginatorLeftTemplate;paginatorLeftTemplate;_paginatorRightTemplate;paginatorRightTemplate;_paginatorDropdownItemTemplate;paginatorDropdownItemTemplate;_loadingIconTemplate;loadingIconTemplate;_reorderIndicatorUpIconTemplate;reorderIndicatorUpIconTemplate;_reorderIndicatorDownIconTemplate;reorderIndicatorDownIconTemplate;_sortIconTemplate;sortIconTemplate;_checkboxIconTemplate;checkboxIconTemplate;_headerCheckboxIconTemplate;headerCheckboxIconTemplate;_paginatorDropdownIconTemplate;paginatorDropdownIconTemplate;_paginatorFirstPageLinkIconTemplate;paginatorFirstPageLinkIconTemplate;_paginatorLastPageLinkIconTemplate;paginatorLastPageLinkIconTemplate;_paginatorPreviousPageLinkIconTemplate;paginatorPreviousPageLinkIconTemplate;_paginatorNextPageLinkIconTemplate;paginatorNextPageLinkIconTemplate;selectionKeys={};lastResizerHelperX;reorderIconWidth;reorderIconHeight;draggedColumn;draggedRowIndex;droppedRowIndex;rowDragging;dropPosition;editingCell;editingCellData;editingCellField;editingCellRowIndex;selfClick;documentEditListener;_multiSortMeta;_sortField;_sortOrder=1;preventSelectionSetterPropagation;_selection;_selectAll=null;anchorRowIndex;rangeRowIndex;filterTimeout;initialized;rowTouched;restoringSort;restoringFilter;stateRestored;columnOrderStateRestored;columnWidthsState;tableWidthState;overlaySubscription;resizeColumnElement;columnResizing=!1;rowGroupHeaderStyleObject={};id=bke();styleElement;responsiveStyleElement;overlayService=re(Jg);filterService=re(fy);tableService=re(LL);zone=re(_n);_componentStyle=re(lS);ngOnInit(){super.ngOnInit(),this.lazy&&this.lazyLoadOnInit&&(this.virtualScroll||this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.restoringFilter&&(this.restoringFilter=!1)),this.responsiveLayout==="stack"&&this.createResponsiveStyle(),this.initialized=!0}ngAfterContentInit(){this._templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"headergrouped":this.headerGroupedTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"loadingbody":this.loadingBodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"footergrouped":this.footerGroupedTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"expandedrow":this.expandedRowTemplate=e.template;break;case"groupheader":this.groupHeaderTemplate=e.template;break;case"groupfooter":this.groupFooterTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"frozenexpandedrow":this.frozenExpandedRowTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownicon":this.paginatorDropdownIconTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template;break;case"paginatorfirstpagelinkicon":this.paginatorFirstPageLinkIconTemplate=e.template;break;case"paginatorlastpagelinkicon":this.paginatorLastPageLinkIconTemplate=e.template;break;case"paginatorpreviouspagelinkicon":this.paginatorPreviousPageLinkIconTemplate=e.template;break;case"paginatornextpagelinkicon":this.paginatorNextPageLinkIconTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"reorderindicatorupicon":this.reorderIndicatorUpIconTemplate=e.template;break;case"reorderindicatordownicon":this.reorderIndicatorDownIconTemplate=e.template;break;case"sorticon":this.sortIconTemplate=e.template;break;case"checkboxicon":this.checkboxIconTemplate=e.template;break;case"headercheckboxicon":this.headerCheckboxIconTemplate=e.template;break}})}ngAfterViewInit(){super.ngAfterViewInit(),ps(this.platformId)&&this.isStateful()&&this.resizableColumns&&this.restoreColumnWidths()}ngOnChanges(e){super.ngOnChanges(e),e.totalRecords&&e.totalRecords.firstChange&&(this._totalRecords=e.totalRecords.currentValue),e.value&&(this.isStateful()&&!this.stateRestored&&ps(this.platformId)&&this.restoreState(),this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._totalRecords===0&&this._value?this._value.length:this._totalRecords??0,this.sortMode=="single"&&(this.sortField||this.groupRowsBy)?this.sortSingle():this.sortMode=="multiple"&&(this.multiSortMeta||this.groupRowsBy)?this.sortMultiple():this.hasFilter()&&this._filter()),this.tableService.onValueChange(e.value.currentValue)),e.columns&&(this.isStateful()||(this._columns=e.columns.currentValue,this.tableService.onColumnsChange(e.columns.currentValue)),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&(this.restoreColumnOrder(),this.tableService.onColumnsChange(this._columns))),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.groupRowsBy&&(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle(),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.groupRowsByOrder&&(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle(),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,this.sortMode==="multiple"&&(this.initialized||!this.lazy&&!this.virtualScroll)&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1),e.selectAll&&(this._selectAll=e.selectAll.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()),this.preventSelectionSetterPropagation=!1)}get processedData(){return this.filteredValue||this.value||[]}_initialColWidths;dataToRender(e){let i=e||this.processedData;if(i&&this.paginator){let o=this.lazy?0:this.first;return i.slice(o,o+this.rows)}return i}updateSelectionKeys(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectionKeys[String(Jr.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(Jr.resolveFieldData(this._selection,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.onPage.emit({first:this.first,rows:this.rows}),this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.firstChange.emit(this.first),this.rowsChange.emit(this.rows),this.tableService.onValueChange(this.value),this.isStateful()&&this.saveState(),this.anchorRowIndex=null,this.scrollable&&this.resetScrollTop()}sort(e){let i=e.originalEvent;if(this.sortMode==="single"&&(this._sortOrder=this.sortField===e.field?this.sortOrder*-1:this.defaultSortOrder,this._sortField=e.field,this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop()),this.sortSingle()),this.sortMode==="multiple"){let o=i.metaKey||i.ctrlKey,r=this.getSortMeta(e.field);r?o?r.order=r.order*-1:(this._multiSortMeta=[{field:e.field,order:r.order*-1}],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())):((!o||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first))),this._multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}this.isStateful()&&this.saveState(),this.anchorRowIndex=null}sortSingle(){let e=this.sortField||this.groupRowsBy,i=this.sortField?this.sortOrder:this.groupRowsByOrder;if(this.groupRowsBy&&this.sortField&&this.groupRowsBy!==this.sortField){this._multiSortMeta=[this.getGroupRowsMeta(),{field:this.sortField,order:this.sortOrder}],this.sortMultiple();return}if(e&&i){this.restoringSort&&(this.restoringSort=!1),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,field:e,order:i}):(this.value.sort((r,s)=>{let d=Jr.resolveFieldData(r,e),m=Jr.resolveFieldData(s,e),v=null;return d==null&&m!=null?v=-1:d!=null&&m==null?v=1:d==null&&m==null?v=0:typeof d=="string"&&typeof m=="string"?v=d.localeCompare(m):v=dm?1:0,i*v}),this._value=[...this.value]),this.hasFilter()&&this._filter());let o={field:e,order:i};this.onSort.emit(o),this.tableService.onSort(o)}}sortMultiple(){this.groupRowsBy&&(this._multiSortMeta?this.multiSortMeta[0].field!==this.groupRowsBy&&(this._multiSortMeta=[this.getGroupRowsMeta(),...this._multiSortMeta]):this._multiSortMeta=[this.getGroupRowsMeta()]),this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):(this.value.sort((e,i)=>this.multisortField(e,i,this.multiSortMeta,0)),this._value=[...this.value]),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))}multisortField(e,i,o,r){let s=Jr.resolveFieldData(e,o[r].field),d=Jr.resolveFieldData(i,o[r].field);return Jr.compare(s,d,this.filterLocale)===0?o.length-1>r?this.multisortField(e,i,o,r+1):0:this.compareValuesOnSort(s,d,o[r].order)}compareValuesOnSort(e,i,o){return Jr.sort(e,i,o,this.filterLocale,this.sortOrder)}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let i=0;i$!=N),this.selectionChange.emit(this.selection),w&&delete this.selectionKeys[w]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:s,type:"row"})}else this.isSingleSelectionMode()?(this._selection=s,this.selectionChange.emit(s),w&&(this.selectionKeys={},this.selectionKeys[w]=1)):this.isMultipleSelectionMode()&&(O?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,s],this.selectionChange.emit(this.selection),w&&(this.selectionKeys[w]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:d})}else if(this.selectionMode==="single")m?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:d})):(this._selection=s,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:d}),w&&(this.selectionKeys={},this.selectionKeys[w]=1));else if(this.selectionMode==="multiple")if(m){let O=this.findIndexInSelection(s);this._selection=this.selection.filter((N,V)=>V!=O),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:d}),w&&delete this.selectionKeys[w]}else this._selection=this.selection?[...this.selection,s]:[s],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:d}),w&&(this.selectionKeys[w]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let i=e.rowData,o=e.rowIndex;if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=i,this.contextMenuSelectionChange.emit(i),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,data:i,index:e.rowIndex}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(i);else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let r=this.isSelected(i),s=this.dataKey?String(Jr.resolveFieldData(i,this.dataKey)):null;if(!r){if(!this.isRowSelectable(i,o))return;this.isSingleSelectionMode()?(this.selection=i,this.selectionChange.emit(i),s&&(this.selectionKeys={},this.selectionKeys[s]=1)):this.isMultipleSelectionMode()&&(this._selection=this.selection?[...this.selection,i]:[i],this.selectionChange.emit(this.selection),s&&(this.selectionKeys[s]=1))}this.tableService.onSelectionChange(),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e,data:i,index:e.rowIndex})}}}selectRange(e,i,o){let r,s;this.anchorRowIndex>i?(r=i,s=this.anchorRowIndex):this.anchorRowIndexs?(i=this.anchorRowIndex,o=this.rangeRowIndex):rN!=v);let w=this.dataKey?String(Jr.resolveFieldData(m,this.dataKey)):null;w&&delete this.selectionKeys[w],this.onRowUnselect.emit({originalEvent:e,data:m,type:"row"})}}isSelected(e){return e&&this.selection?this.dataKey?this.selectionKeys[Jr.resolveFieldData(e,this.dataKey)]!==void 0:Array.isArray(this.selection)?this.findIndexInSelection(e)>-1:this.equals(e,this.selection):!1}findIndexInSelection(e){let i=-1;if(this.selection&&this.selection.length){for(let o=0;om!=s),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:i,type:"checkbox"}),r&&delete this.selectionKeys[r]}else{if(!this.isRowSelectable(i,e.rowIndex))return;this._selection=this.selection?[...this.selection,i]:[i],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:i,type:"checkbox"}),r&&(this.selectionKeys[r]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowsWithCheckbox({originalEvent:e},i){if(this._selectAll!==null)this.selectAllChange.emit({originalEvent:e,checked:i});else{let o=this.selectionPageOnly?this.dataToRender(this.processedData):this.processedData,r=this.selectionPageOnly&&this._selection?this._selection.filter(s=>!o.some(d=>this.equals(s,d))):[];i&&(r=this.frozenValue?[...r,...this.frozenValue,...o]:[...r,...o],r=this.rowSelectable?r.filter((s,d)=>this.rowSelectable({data:s,index:d})):r),this._selection=r,this.preventSelectionSetterPropagation=!0,this.updateSelectionKeys(),this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:i}),this.isStateful()&&this.saveState()}}equals(e,i){return this.compareSelectionBy==="equals"?e===i:Jr.equals(e,i,this.dataKey)}filter(e,i,o){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[i]&&delete this.filters[i]:this.filters[i]={value:e,matchMode:o},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay),this.anchorRowIndex=null}filterGlobal(e,i){this.filter(e,"global",i)}isFilterBlank(e){return e!=null?!!(typeof e=="string"&&e.trim().length==0||Array.isArray(e)&&e.length==0):!0}_filter(){if(this.restoringFilter||(this.first=0,this.firstChange.emit(this.first)),this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(!this.hasFilter())this.filteredValue=null,this.paginator&&(this.totalRecords=this._totalRecords===0&&this.value?this.value.length:this._totalRecords);else{let e;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");e=this.globalFilterFields||this.columns}this.filteredValue=[];for(let i=0;ithis.cd.detectChanges()}}clear(){this._sortField=null,this._sortOrder=this.defaultSortOrder,this._multiSortMeta=null,this.tableService.onSort(null),this.clearFilterValues(),this.filteredValue=null,this.first=0,this.firstChange.emit(this.first),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.totalRecords=this._totalRecords===0&&this._value?this._value.length:this._totalRecords??0}clearFilterValues(){for(let[,e]of Object.entries(this.filters))if(Array.isArray(e))for(let i of e)i.value=null;else e&&(e.value=null)}reset(){this.clear()}getExportHeader(e){return e[this.exportHeader]||e.header||e.field}exportCSV(e){let i,o="",r=this.columns;e&&e.selectionOnly?i=this.selection||[]:e&&e.allValues?i=this.value||[]:(i=this.filteredValue||this.value,this.frozenValue&&(i=i?[...this.frozenValue,...i]:this.frozenValue));let s=r.filter(w=>w.exportable!==!1&&w.field);o+=s.map(w=>'"'+this.getExportHeader(w)+'"').join(this.csvSeparator);let d=i.map(w=>s.map(O=>{let N=Jr.resolveFieldData(w,O.field);return N!=null?this.exportFunction?N=this.exportFunction({data:N,field:O.field}):N=String(N).replace(/"/g,'""'):N="",'"'+N+'"'}).join(this.csvSeparator)).join(` `);d.length&&(o+=` `+d);let m=new Blob([new Uint8Array([239,187,191]),o],{type:"text/csv;charset=utf-8;"}),v=this.renderer.createElement("a");v.style.display="none",this.renderer.appendChild(this.document.body,v),v.download!==void 0?(v.setAttribute("href",URL.createObjectURL(m)),v.setAttribute("download",this.exportFilename+".csv"),v.click()):(o="data:text/csv;charset=utf-8,"+o,this.document.defaultView.open(encodeURI(o))),this.renderer.removeChild(this.document.body,v)}onLazyItemLoad(e){this.onLazyLoad.emit(mt(be(be({},this.createLazyLoadMetadata()),e),{rows:e.last-e.first}))}resetScrollTop(){this.virtualScroll?this.scrollToVirtualIndex(0):this.scrollTo({top:0})}scrollToVirtualIndex(e){this.scroller&&this.scroller.scrollToIndex(e)}scrollTo(e){this.virtualScroll?this.scroller?.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}updateEditingCell(e,i,o,r){this.editingCell=e,this.editingCellData=i,this.editingCellField=o,this.editingCellRowIndex=r,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&tr.find(this.editingCell,".ng-invalid.ng-dirty").length===0}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=this.renderer.listen(this.document,"click",e=>{this.editingCell&&!this.selfClick&&this.isEditingCellValid()&&(tr.removeClass(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData,originalEvent:e,index:this.editingCellRowIndex}),this.editingCellField=null,this.editingCellData=null,this.editingCellRowIndex=null,this.unbindDocumentEditListener(),this.cd.markForCheck(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()),this.selfClick=!1}))}unbindDocumentEditListener(){this.documentEditListener&&(this.documentEditListener(),this.documentEditListener=null)}initRowEdit(e){let i=String(Jr.resolveFieldData(e,this.dataKey));this.editingRowKeys[i]=!0}saveRowEdit(e,i){if(tr.find(i,".ng-invalid.ng-dirty").length===0){let o=String(Jr.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[o]}}cancelRowEdit(e){let i=String(Jr.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[i]}toggleRow(e,i){if(!this.dataKey&&!this.groupRowsBy)throw new Error("dataKey or groupRowsBy must be defined to use row expansion");let o=this.groupRowsBy?String(Jr.resolveFieldData(e,this.groupRowsBy)):String(Jr.resolveFieldData(e,this.dataKey));this.expandedRowKeys[o]!=null?(delete this.expandedRowKeys[o],this.onRowCollapse.emit({originalEvent:i,data:e})):(this.rowExpandMode==="single"&&(this.expandedRowKeys={}),this.expandedRowKeys[o]=!0,this.onRowExpand.emit({originalEvent:i,data:e})),i&&i.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return this.groupRowsBy?this.expandedRowKeys[String(Jr.resolveFieldData(e,this.groupRowsBy))]===!0:this.expandedRowKeys[String(Jr.resolveFieldData(e,this.dataKey))]===!0}isRowEditing(e){return this.editingRowKeys[String(Jr.resolveFieldData(e,this.dataKey))]===!0}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}onColumnResizeBegin(e){let i=tr.getOffset(this.el?.nativeElement).left;this.resizeColumnElement=e.target.closest("th"),this.columnResizing=!0,e.type=="touchstart"?this.lastResizerHelperX=e.changedTouches[0].clientX-i+this.el?.nativeElement.scrollLeft:this.lastResizerHelperX=e.pageX-i+this.el?.nativeElement.scrollLeft,this.onColumnResize(e),e.preventDefault()}onColumnResize(e){let i=tr.getOffset(this.el?.nativeElement).left;tr.addClass(this.el?.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.el?.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",e.type=="touchmove"?this.resizeHelperViewChild.nativeElement.style.left=e.changedTouches[0].clientX-i+this.el?.nativeElement.scrollLeft+"px":this.resizeHelperViewChild.nativeElement.style.left=e.pageX-i+this.el?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(){let e=this.resizeHelperViewChild?.nativeElement.offsetLeft-this.lastResizerHelperX,o=this.resizeColumnElement.offsetWidth+e,r=this.resizeColumnElement.style.minWidth.replace(/[^\d.]/g,""),s=r?parseFloat(r):15;if(o>=s){if(this.columnResizeMode==="fit"){let m=this.resizeColumnElement.nextElementSibling.offsetWidth-e;o>15&&m>15&&this.resizeTableCells(o,m)}else if(this.columnResizeMode==="expand"){this._initialColWidths=this._totalTableWidth();let d=this.tableViewChild?.nativeElement.offsetWidth+e;this.setResizeTableWidth(d+"px"),this.resizeTableCells(o,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:e}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",tr.removeClass(this.el?.nativeElement,"p-unselectable-text")}_totalTableWidth(){let e=[],i=tr.findSingle(this.el.nativeElement,".p-datatable-thead");return tr.find(i,"tr > th").forEach(r=>e.push(tr.getOuterWidth(r))),e}onColumnDragStart(e,i){this.reorderIconWidth=tr.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=tr.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=i,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,i){if(this.reorderableColumns&&this.draggedColumn&&i){e.preventDefault();let o=tr.getOffset(this.el?.nativeElement),r=tr.getOffset(i);if(this.draggedColumn!=i){let s=tr.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),d=tr.indexWithinGroup(i,"preorderablecolumn"),m=r.left-o.left,v=o.top-r.top,w=r.left+i.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=r.top-o.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=r.top-o.top+i.offsetHeight+"px",e.pageX>w?(this.reorderIndicatorUpViewChild.nativeElement.style.left=m+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=m+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=m-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=m-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&e.preventDefault()}onColumnDrop(e,i){if(e.preventDefault(),this.draggedColumn){let o=tr.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),r=tr.indexWithinGroup(i,"preorderablecolumn"),s=o!=r;if(s&&(r-o==1&&this.dropPosition===-1||o-r==1&&this.dropPosition===1)&&(s=!1),s&&ro&&this.dropPosition===-1&&(r=r-1),s&&(Jr.reorderArray(this.columns,o,r),this.onColReorder.emit({dragIndex:o,dropIndex:r,columns:this.columns}),this.isStateful()&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.saveState()})})),this.resizableColumns&&this.resizeColumnElement){let d=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();Jr.reorderArray(d,o+1,r+1),this.updateStyleElement(d,o,null,null)}this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}resizeTableCells(e,i){let o=tr.index(this.resizeColumnElement),r=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();this.updateStyleElement(r,o,e,i)}updateStyleElement(e,i,o,r){this.destroyStyleElement(),this.createStyleElement();let s="";e.forEach((d,m)=>{let v=m===i?o:r&&m===i+1?r:d,w=`width: ${v}px !important; max-width: ${v}px !important;`;s+=` #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${m+1}), #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${m+1}), #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${m+1}) { ${w} } `}),this.renderer.setProperty(this.styleElement,"innerHTML",s)}onRowDragStart(e,i){this.rowDragging=!0,this.draggedRowIndex=i,e.dataTransfer.setData("text","b")}onRowDragOver(e,i,o){if(this.rowDragging&&this.draggedRowIndex!==i){let r=tr.getOffset(o).top,s=e.pageY,d=r+tr.getOuterHeight(o)/2,m=o.previousElementSibling;sthis.droppedRowIndex?this.droppedRowIndex:this.droppedRowIndex===0?0:this.droppedRowIndex-1;Jr.reorderArray(this.value,this.draggedRowIndex,o),this.virtualScroll&&(this._value=[...this._value]),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:o})}this.onRowDragLeave(e,i),this.onRowDragEnd(e)}isEmpty(){let e=this.filteredValue||this.value;return e==null||e.length==0}getBlockableElement(){return this.el.nativeElement.children[0]}getStorage(){if(ps(this.platformId))switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}else throw new Error("Browser storage is not available in the server side.")}isStateful(){return this.stateKey!=null}saveState(){let e=this.getStorage(),i={};this.paginator&&(i.first=this.first,i.rows=this.rows),this.sortField&&(i.sortField=this.sortField,i.sortOrder=this.sortOrder),this.multiSortMeta&&(i.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(i.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(i),this.reorderableColumns&&this.saveColumnOrder(i),this.selection&&(i.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(i.expandedRowKeys=this.expandedRowKeys),e.setItem(this.stateKey,JSON.stringify(i)),this.onStateSave.emit(i)}clearState(){let e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)}restoreState(){let i=this.getStorage().getItem(this.stateKey),o=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,r=function(s,d){return typeof d=="string"&&o.test(d)?new Date(d):d};if(i){let s=JSON.parse(i,r);this.paginator&&(this.first!==void 0&&(this.first=s.first,this.firstChange.emit(this.first)),this.rows!==void 0&&(this.rows=s.rows,this.rowsChange.emit(this.rows))),s.sortField&&(this.restoringSort=!0,this._sortField=s.sortField,this._sortOrder=s.sortOrder),s.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=s.multiSortMeta),s.filters&&(this.restoringFilter=!0,this.filters=s.filters),this.resizableColumns&&(this.columnWidthsState=s.columnWidths,this.tableWidthState=s.tableWidth),s.expandedRowKeys&&(this.expandedRowKeys=s.expandedRowKeys),s.selection&&Promise.resolve(null).then(()=>this.selectionChange.emit(s.selection)),this.stateRestored=!0,this.onStateRestore.emit(s)}}saveColumnWidths(e){let i=[],o=[],r=this.el?.nativeElement;r&&(o=tr.find(r,".p-datatable-thead > tr > th")),o.forEach(s=>i.push(tr.getOuterWidth(s))),e.columnWidths=i.join(","),this.columnResizeMode==="expand"&&this.tableViewChild&&(e.tableWidth=tr.getOuterWidth(this.tableViewChild.nativeElement))}setResizeTableWidth(e){this.tableViewChild.nativeElement.style.width=e,this.tableViewChild.nativeElement.style.minWidth=e}restoreColumnWidths(){if(this.columnWidthsState){let e=this.columnWidthsState.split(",");if(this.columnResizeMode==="expand"&&this.tableWidthState&&this.setResizeTableWidth(this.tableWidthState+"px"),Jr.isNotEmpty(e)){this.createStyleElement();let i="";e.forEach((o,r)=>{let s=`width: ${o}px !important; max-width: ${o}px !important`;i+=` #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${r+1}), #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${r+1}), #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${r+1}) { ${s} } `}),this.styleElement.innerHTML=i}}}saveColumnOrder(e){if(this.columns){let i=[];this.columns.map(o=>{i.push(o.field||o.key)}),e.columnOrder=i}}restoreColumnOrder(){let i=this.getStorage().getItem(this.stateKey);if(i){let r=JSON.parse(i).columnOrder;if(r){let s=[];r.map(d=>{let m=this.findColumnByKey(d);m&&s.push(m)}),this.columnOrderStateRestored=!0,this.columns=s}}}findColumnByKey(e){if(this.columns){for(let i of this.columns)if(i.key===e||i.field===e)return i}else return null}createStyleElement(){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",tr.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement),tr.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){if(ps(this.platformId)&&!this.responsiveStyleElement){this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",tr.setAttribute(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.responsiveStyleElement);let e=` @media screen and (max-width: ${this.breakpoint}) { #${this.id}-table > .p-datatable-thead > tr > th, #${this.id}-table > .p-datatable-tfoot > tr > td { display: none !important; } #${this.id}-table > .p-datatable-tbody > tr > td { display: flex; width: 100% !important; align-items: center; justify-content: space-between; } #${this.id}-table > .p-datatable-tbody > tr > td:not(:last-child) { border: 0 none; } #${this.id}.p-datatable-gridlines > .p-datatable-table-container > .p-datatable-table > .p-datatable-tbody > tr > td:last-child { border-top: 0; border-right: 0; border-left: 0; } #${this.id}-table > .p-datatable-tbody > tr > td > .p-datatable-column-title { display: block; } } `;this.renderer.setProperty(this.responsiveStyleElement,"innerHTML",e),tr.setAttribute(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce)}}destroyResponsiveStyle(){this.responsiveStyleElement&&(this.renderer.removeChild(this.document.head,this.responsiveStyleElement),this.responsiveStyleElement=null)}destroyStyleElement(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.initialized=null,this.destroyStyleElement(),this.destroyResponsiveStyle(),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-table"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,nCt,4),xt(r,oCt,4),xt(r,rCt,4),xt(r,sCt,4),xt(r,aCt,4),xt(r,lCt,4),xt(r,cCt,4),xt(r,dCt,4),xt(r,uCt,4),xt(r,pCt,4),xt(r,hCt,4),xt(r,mCt,4),xt(r,fCt,4),xt(r,gCt,4),xt(r,_Ct,4),xt(r,yCt,4),xt(r,vCt,4),xt(r,bCt,4),xt(r,CCt,4),xt(r,xCt,4),xt(r,wCt,4),xt(r,SCt,4),xt(r,TCt,4),xt(r,ICt,4),xt(r,ECt,4),xt(r,DCt,4),xt(r,ACt,4),xt(r,kCt,4),xt(r,MCt,4),xt(r,OCt,4),xt(r,RCt,4),xt(r,FCt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o._headerTemplate=s.first),Le(s=Ne())&&(o._headerGroupedTemplate=s.first),Le(s=Ne())&&(o._bodyTemplate=s.first),Le(s=Ne())&&(o._loadingBodyTemplate=s.first),Le(s=Ne())&&(o._captionTemplate=s.first),Le(s=Ne())&&(o._footerTemplate=s.first),Le(s=Ne())&&(o._footerGroupedTemplate=s.first),Le(s=Ne())&&(o._summaryTemplate=s.first),Le(s=Ne())&&(o._colGroupTemplate=s.first),Le(s=Ne())&&(o._expandedRowTemplate=s.first),Le(s=Ne())&&(o._groupHeaderTemplate=s.first),Le(s=Ne())&&(o._groupFooterTemplate=s.first),Le(s=Ne())&&(o._frozenExpandedRowTemplate=s.first),Le(s=Ne())&&(o._frozenHeaderTemplate=s.first),Le(s=Ne())&&(o._frozenBodyTemplate=s.first),Le(s=Ne())&&(o._frozenFooterTemplate=s.first),Le(s=Ne())&&(o._frozenColGroupTemplate=s.first),Le(s=Ne())&&(o._emptyMessageTemplate=s.first),Le(s=Ne())&&(o._paginatorLeftTemplate=s.first),Le(s=Ne())&&(o._paginatorRightTemplate=s.first),Le(s=Ne())&&(o._paginatorDropdownItemTemplate=s.first),Le(s=Ne())&&(o._loadingIconTemplate=s.first),Le(s=Ne())&&(o._reorderIndicatorUpIconTemplate=s.first),Le(s=Ne())&&(o._reorderIndicatorDownIconTemplate=s.first),Le(s=Ne())&&(o._sortIconTemplate=s.first),Le(s=Ne())&&(o._checkboxIconTemplate=s.first),Le(s=Ne())&&(o._headerCheckboxIconTemplate=s.first),Le(s=Ne())&&(o._paginatorDropdownIconTemplate=s.first),Le(s=Ne())&&(o._paginatorFirstPageLinkIconTemplate=s.first),Le(s=Ne())&&(o._paginatorLastPageLinkIconTemplate=s.first),Le(s=Ne())&&(o._paginatorPreviousPageLinkIconTemplate=s.first),Le(s=Ne())&&(o._paginatorNextPageLinkIconTemplate=s.first),Le(s=Ne())&&(o._templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(PCt,5),Ri(LCt,5),Ri(NCt,5),Ri(BCt,5),Ri(VCt,5),Ri(zCt,5),Ri(UCt,5),Ri(HCt,5)),i&2){let r;Le(r=Ne())&&(o.resizeHelperViewChild=r.first),Le(r=Ne())&&(o.reorderIndicatorUpViewChild=r.first),Le(r=Ne())&&(o.reorderIndicatorDownViewChild=r.first),Le(r=Ne())&&(o.wrapperViewChild=r.first),Le(r=Ne())&&(o.tableViewChild=r.first),Le(r=Ne())&&(o.tableHeaderViewChild=r.first),Le(r=Ne())&&(o.tableFooterViewChild=r.first),Le(r=Ne())&&(o.scroller=r.first)}},hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.cn(o.cx("root"),o.styleClass))},inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:[2,"paginator","paginator",je],pageLinks:[2,"pageLinks","pageLinks",ln],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",je],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",je],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",je],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",je],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",je],showPageLinks:[2,"showPageLinks","showPageLinks",je],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",ln],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",je],selectionMode:"selectionMode",selectionPageOnly:[2,"selectionPageOnly","selectionPageOnly",je],contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",je],rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:[2,"lazy","lazy",je],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",je],compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",ln],filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:[2,"scrollable","scrollable",je],rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",je],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",ln],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",ln],frozenWidth:"frozenWidth",contextMenu:"contextMenu",resizableColumns:[2,"resizableColumns","resizableColumns",je],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",je],loading:[2,"loading","loading",je],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",je],rowHover:[2,"rowHover","rowHover",je],customSort:[2,"customSort","customSort",je],showInitialSortBadge:[2,"showInitialSortBadge","showInitialSortBadge",je],exportFunction:"exportFunction",exportHeader:"exportHeader",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",size:"size",showGridlines:[2,"showGridlines","showGridlines",je],stripedRows:[2,"stripedRows","stripedRows",je],groupRowsByOrder:[2,"groupRowsByOrder","groupRowsByOrder",ln],responsiveLayout:"responsiveLayout",breakpoint:"breakpoint",paginatorLocale:"paginatorLocale",value:"value",columns:"columns",first:"first",rows:"rows",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",selectAll:"selectAll"},outputs:{contextMenuSelectionChange:"contextMenuSelectionChange",selectAllChange:"selectAllChange",selectionChange:"selectionChange",onRowSelect:"onRowSelect",onRowUnselect:"onRowUnselect",onPage:"onPage",onSort:"onSort",onFilter:"onFilter",onLazyLoad:"onLazyLoad",onRowExpand:"onRowExpand",onRowCollapse:"onRowCollapse",onContextMenuSelect:"onContextMenuSelect",onColResize:"onColResize",onColReorder:"onColReorder",onRowReorder:"onRowReorder",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",sortFunction:"sortFunction",firstChange:"firstChange",rowsChange:"rowsChange",onStateSave:"onStateSave",onStateRestore:"onStateRestore"},standalone:!1,features:[jt([LL,lS]),ft,Ot],decls:14,vars:13,consts:[["wrapper",""],["buildInTable",""],["scroller",""],["content",""],["table",""],["thead",""],["tfoot",""],["resizeHelper",""],["reorderIndicatorUp",""],["reorderIndicatorDown",""],[3,"class",4,"ngIf"],[3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","appendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","styleClass","locale","onPageChange",4,"ngIf"],[3,"ngStyle"],[3,"items","columns","style","scrollHeight","itemSize","step","delay","inline","lazy","loaderDisabled","showSpacer","showLoader","options","autoSize","onLazyLoad",4,"ngIf"],[4,"ngIf"],[3,"ngClass",4,"ngIf"],[3,"ngClass","display",4,"ngIf"],["data-p-icon","spinner",3,"spin","class",4,"ngIf"],["data-p-icon","spinner",3,"spin"],[4,"ngTemplateOutlet"],[3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","appendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","styleClass","locale"],["pTemplate","dropdownicon"],["pTemplate","firstpagelinkicon"],["pTemplate","previouspagelinkicon"],["pTemplate","lastpagelinkicon"],["pTemplate","nextpagelinkicon"],[3,"onLazyLoad","items","columns","scrollHeight","itemSize","step","delay","inline","lazy","loaderDisabled","showSpacer","showLoader","options","autoSize"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","table"],["role","rowgroup",3,"ngStyle"],["role","rowgroup",3,"class","value","frozenRows","pTableBody","pTableBodyTemplate","frozen",4,"ngIf"],["role","rowgroup",3,"value","pTableBody","pTableBodyTemplate","scrollerOptions"],["role","rowgroup",3,"style","class",4,"ngIf"],["role","rowgroup",3,"ngClass","ngStyle",4,"ngIf"],["role","rowgroup",3,"value","frozenRows","pTableBody","pTableBodyTemplate","frozen"],["role","rowgroup"],["role","rowgroup",3,"ngClass","ngStyle"],[3,"ngClass"],["data-p-icon","arrow-down",4,"ngIf"],["data-p-icon","arrow-down"],["data-p-icon","arrow-up",4,"ngIf"],["data-p-icon","arrow-up"]],template:function(i,o){i&1&&(ee(0,ZCt,3,4,"div",10)(1,JCt,2,3,"div",10)(2,fxt,6,24,"p-paginator",11),k(3,"div",12,0),ee(5,yxt,4,17,"p-scroller",13)(6,bxt,2,7,"ng-container",14)(7,Ext,10,27,"ng-template",null,1,Pt),D(),ee(9,jxt,6,24,"p-paginator",11)(10,$xt,2,2,"div",15)(11,qxt,2,3,"div",16)(12,Qxt,4,5,"span",16)(13,e1t,4,5,"span",16)),i&2&&(E("ngIf",o.loading&&o.showLoader),T(),E("ngIf",o.captionTemplate||o._captionTemplate),T(),E("ngIf",o.paginator&&(o.paginatorPosition==="top"||o.paginatorPosition=="both")),T(),Oe(o.cx("tableContainer")),E("ngStyle",o.sx("tableContainer")),T(2),E("ngIf",o.virtualScroll),T(),E("ngIf",!o.virtualScroll),T(3),E("ngIf",o.paginator&&(o.paginatorPosition==="bottom"||o.paginatorPosition=="both")),T(),E("ngIf",o.summaryTemplate||o._summaryTemplate),T(),E("ngIf",o.resizableColumns),T(),E("ngIf",o.reorderableColumns),T(),E("ngIf",o.reorderableColumns))},dependencies:()=>[Ns,Fr,Lo,vs,aS,so,Ym,BP,VP,og,Z1t],encapsulation:2})}return t})(),Z1t=(()=>{class t{dt;tableService;cd;el;columns;template;get value(){return this._value}set value(e){this._value=e,this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&this.dt.rowGroupMode==="subheader"&&this.updateFrozenRowGroupHeaderStickyPosition()}frozen;frozenRows;scrollerOptions;subscription;_value;ngAfterViewInit(){this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&this.dt.rowGroupMode==="subheader"&&this.updateFrozenRowGroupHeaderStickyPosition()}constructor(e,i,o,r){this.dt=e,this.tableService=i,this.cd=o,this.el=r,this.subscription=this.dt.tableService.valueSource$.subscribe(()=>{this.dt.virtualScroll&&this.cd.detectChanges()})}shouldRenderRowGroupHeader(e,i,o){let r=Jr.resolveFieldData(i,this.dt.groupRowsBy),s=e[o-this.dt._first-1];if(s){let d=Jr.resolveFieldData(s,this.dt.groupRowsBy);return r!==d}else return!0}shouldRenderRowGroupFooter(e,i,o){let r=Jr.resolveFieldData(i,this.dt.groupRowsBy),s=e[o-this.dt._first+1];if(s){let d=Jr.resolveFieldData(s,this.dt.groupRowsBy);return r!==d}else return!0}shouldRenderRowspan(e,i,o){let r=Jr.resolveFieldData(i,this.dt.groupRowsBy),s=e[o-1];if(s){let d=Jr.resolveFieldData(s,this.dt.groupRowsBy);return r!==d}else return!0}calculateRowGroupSize(e,i,o){let r=Jr.resolveFieldData(i,this.dt.groupRowsBy),s=r,d=0;for(;r===s;){d++;let m=e[++o];if(m)s=Jr.resolveFieldData(m,this.dt.groupRowsBy);else break}return d===1?null:d}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=tr.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=tr.getOuterHeight(this.el.nativeElement.previousElementSibling);this.dt.rowGroupHeaderStyleObject.top=e+"px"}}getScrollerOption(e,i){return this.dt.virtualScroll?(i=i||this.scrollerOptions,i?i[e]:null):null}getRowIndex(e){let i=this.dt.paginator?this.dt.first+e:e,o=this.getScrollerOption("getItemOptions");return o?o(i).index:i}static \u0275fac=function(i){return new(i||t)(_e(hl),_e(LL),_e(Gi),_e(Bn))};static \u0275cmp=ne({type:t,selectors:[["","pTableBody",""]],inputs:{columns:[0,"pTableBody","columns"],template:[0,"pTableBodyTemplate","template"],value:"value",frozen:[2,"frozen","frozen",je],frozenRows:[2,"frozenRows","frozenRows",je],scrollerOptions:"scrollerOptions"},standalone:!1,attrs:t1t,decls:5,vars:5,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&ee(0,p1t,2,2,"ng-container",0)(1,x1t,2,2,"ng-container",0)(2,E1t,2,2,"ng-container",0)(3,A1t,2,5,"ng-container",0)(4,M1t,2,5,"ng-container",0),i&2&&(E("ngIf",!o.dt.expandedRowTemplate&&!o.dt._expandedRowTemplate),T(),E("ngIf",(o.dt.expandedRowTemplate||o.dt._expandedRowTemplate)&&!(o.frozen&&(o.dt.frozenExpandedRowTemplate||o.dt._frozenExpandedRowTemplate))),T(),E("ngIf",(o.dt.frozenExpandedRowTemplate||o.dt._frozenExpandedRowTemplate)&&o.frozen),T(),E("ngIf",o.dt.loading),T(),E("ngIf",o.dt.isEmpty()&&!o.dt.loading))},dependencies:[Gc,Fr,Lo],encapsulation:2})}return t})();var gPe=(()=>{class t{el;zone;get frozen(){return this._frozen}set frozen(e){this._frozen=e,Promise.resolve(null).then(()=>this.updateStickyPosition())}alignFrozen="left";constructor(e,i){this.el=e,this.zone=i}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.recalculateColumns()},1e3)})}recalculateColumns(){let e=tr.siblings(this.el.nativeElement),i=tr.index(this.el.nativeElement),o=(e.length-i+1)*50;setTimeout(()=>{this.updateStickyPosition()},o)}_frozen=!0;updateStickyPosition(){if(this._frozen){if(this.alignFrozen==="right"){let i=0,o=this.el.nativeElement.nextElementSibling;for(;o;)i+=tr.getOuterWidth(o),o=o.nextElementSibling;this.el.nativeElement.style.right=i+"px"}else{let i=0,o=this.el.nativeElement.previousElementSibling;for(;o;)i+=tr.getOuterWidth(o),o=o.previousElementSibling;this.el.nativeElement.style.left=i+"px"}let e=this.el.nativeElement?.parentElement?.nextElementSibling;if(e){let i=tr.index(this.el.nativeElement);e.children&&e.children[i]&&(e.children[i].style.left=this.el.nativeElement.style.left,e.children[i].style.right=this.el.nativeElement.style.right)}}}static \u0275fac=function(i){return new(i||t)(_e(Bn),_e(_n))};static \u0275dir=rn({type:t,selectors:[["","pFrozenColumn",""]],hostVars:4,hostBindings:function(i,o){i&1&&ie("resize",function(s){return o.recalculateColumns(s)},T9),i&2&&Vn("p-datatable-frozen-column",o.frozen)("p-datatable-frozen-column-left",o.alignFrozen==="left")},inputs:{frozen:"frozen",alignFrozen:"alignFrozen"},standalone:!1})}return t})(),ME=(()=>{class t extends oo{dt;#e=re(Bn);field;pSortableColumnDisabled;role=this.#e.nativeElement?.tagName!=="TH"?"columnheader":null;sorted;sortOrder;subscription;_componentStyle=re(lS);constructor(e){super(),this.dt=e,this.isEnabled()&&(this.subscription=this.dt.tableService.sortSource$.subscribe(i=>{this.updateSortState()}))}ngOnInit(){super.ngOnInit(),this.isEnabled()&&this.updateSortState()}updateSortState(){let e=!1,i=0;if(this.dt.sortMode==="single")e=this.dt.isSorted(this.field),i=this.dt.sortOrder;else if(this.dt.sortMode==="multiple"){let o=this.dt.getSortMeta(this.field);e=!!o,i=o?o.order:0}this.sorted=e,this.sortOrder=e?i===1?"ascending":"descending":"none"}onClick(e){this.isEnabled()&&!this.isFilterElement(e.target)&&(this.updateSortState(),this.dt.sort({originalEvent:e,field:this.field}),tr.clearSelection())}onEnterKey(e){this.onClick(e),e.preventDefault()}isEnabled(){return this.pSortableColumnDisabled!==!0}isFilterElement(e){return this.isFilterElementIconOrButton(e)||this.isFilterElementIconOrButton(e?.parentElement?.parentElement)}isFilterElementIconOrButton(e){return tr.hasClass(e,"pi-filter-icon")||tr.hasClass(e,"p-column-filter-menu-button")}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(_e(hl))};static \u0275dir=rn({type:t,selectors:[["","pSortableColumn",""]],hostVars:5,hostBindings:function(i,o){i&1&&ie("click",function(s){return o.onClick(s)})("keydown.space",function(s){return o.onEnterKey(s)})("keydown.enter",function(s){return o.onEnterKey(s)}),i&2&&(Rr("tabIndex",o.isEnabled()?"0":null)("role","columnheader"),Ge("aria-sort",o.sortOrder),Oe(o.cx("sortableColumn")))},inputs:{field:[0,"pSortableColumn","field"],pSortableColumnDisabled:[2,"pSortableColumnDisabled","pSortableColumnDisabled",je]},standalone:!1,features:[jt([lS]),ft]})}return t})(),OE=(()=>{class t extends oo{dt;cd;field;subscription;sortOrder;_componentStyle=re(lS);constructor(e,i){super(),this.dt=e,this.cd=i,this.subscription=this.dt.tableService.sortSource$.subscribe(o=>{this.updateSortState()})}ngOnInit(){super.ngOnInit(),this.updateSortState()}onClick(e){e.preventDefault()}updateSortState(){if(this.dt.sortMode==="single")this.sortOrder=this.dt.isSorted(this.field)?this.dt.sortOrder:0;else if(this.dt.sortMode==="multiple"){let e=this.dt.getSortMeta(this.field);this.sortOrder=e?e.order:0}this.cd.markForCheck()}getMultiSortMetaIndex(){let e=this.dt._multiSortMeta,i=-1;if(e&&this.dt.sortMode==="multiple"&&this.dt.showInitialSortBadge&&e.length>1)for(let o=0;o-1?e:e+1}isMultiSorted(){return this.dt.sortMode==="multiple"&&this.getMultiSortMetaIndex()>-1}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(_e(hl),_e(Gi))};static \u0275cmp=ne({type:t,selectors:[["p-sortIcon"]],inputs:{field:"field"},standalone:!1,features:[jt([lS]),ft],decls:3,vars:3,consts:[[4,"ngIf"],[3,"class",4,"ngIf"],["size","small",3,"class","value",4,"ngIf"],["data-p-icon","sort-alt",3,"class",4,"ngIf"],["data-p-icon","sort-amount-up-alt",3,"class",4,"ngIf"],["data-p-icon","sort-amount-down",3,"class",4,"ngIf"],["data-p-icon","sort-alt"],["data-p-icon","sort-amount-up-alt"],["data-p-icon","sort-amount-down"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["size","small",3,"value"]],template:function(i,o){i&1&&ee(0,P1t,4,3,"ng-container",0)(1,B1t,2,6,"span",1)(2,V1t,1,3,"p-badge",2),i&2&&(E("ngIf",!(o.dt.sortIconTemplate||o.dt._sortIconTemplate)),T(),E("ngIf",o.dt.sortIconTemplate||o.dt._sortIconTemplate),T(),E("ngIf",o.isMultiSorted()))},dependencies:()=>[Fr,Lo,jw,az,cz,lz],encapsulation:2,changeDetection:0})}return t})(),_Pe=(()=>{class t extends oo{dt;tableService;data;index;pSelectableRowDisabled;selected;subscription;_componentStyle=re(lS);constructor(e,i){super(),this.dt=e,this.tableService=i,this.isEnabled()&&(this.subscription=this.dt.tableService.selectionSource$.subscribe(()=>{this.selected=this.dt.isSelected(this.data)}))}setRowTabIndex(){if(this.dt.selectionMode==="single"||this.dt.selectionMode==="multiple")return this.dt.selection?this.dt.anchorRowIndex===this.index?0:-1:0}ngOnInit(){super.ngOnInit(),this.isEnabled()&&(this.selected=this.dt.isSelected(this.data))}onClick(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}onTouchEnd(e){this.isEnabled()&&this.dt.handleRowTouchEnd(e)}onKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;default:if(e.code==="KeyA"&&(e.metaKey||e.ctrlKey)&&this.dt.selectionMode==="multiple"){let i=this.dt.dataToRender(this.dt.processedData);this.dt.selection=[...i],this.dt.selectRange(e,i.length-1,!0),e.preventDefault()}break}}onArrowDownKey(e){if(!this.isEnabled())return;let i=e.currentTarget,o=this.findNextSelectableRow(i);o&&o.focus(),e.preventDefault()}onArrowUpKey(e){if(!this.isEnabled())return;let i=e.currentTarget,o=this.findPrevSelectableRow(i);o&&o.focus(),e.preventDefault()}onEnterKey(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}onEndKey(e){let i=this.findLastSelectableRow();if(i&&this.focusRowChange(this.el.nativeElement,i),e.ctrlKey&&e.shiftKey){let o=this.dt.dataToRender(this.dt.rows),r=tr.getAttribute(i,"index");this.dt.anchorRowIndex=r,this.dt.selection=o.slice(this.index,o.length),this.dt.selectRange(e,this.index)}e.preventDefault()}onHomeKey(e){let i=this.findFirstSelectableRow();if(i&&this.focusRowChange(this.el.nativeElement,i),e.ctrlKey&&e.shiftKey){let o=this.dt.dataToRender(this.dt.rows),r=tr.getAttribute(i,"index");this.dt.anchorRowIndex=this.dt.anchorRowIndex||r,this.dt.selection=o.slice(0,this.index+1),this.dt.selectRange(e,this.index)}e.preventDefault()}onSpaceKey(e){if(!(e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement||e.target instanceof HTMLTextAreaElement)){if(this.onEnterKey(e),e.shiftKey&&this.dt.selection!==null){let o=this.dt.dataToRender(this.dt.rows),r;if(Jr.isNotEmpty(this.dt.selection)&&this.dt.selection.length>0){let s,d;s=Jr.findIndexInList(this.dt.selection[0],o),d=Jr.findIndexInList(this.dt.selection[this.dt.selection.length-1],o),r=this.index<=s?d:s}else r=Jr.findIndexInList(this.dt.selection,o);this.dt.anchorRowIndex=r,this.dt.selection=r!==this.index?o.slice(Math.min(r,this.index),Math.max(r,this.index)+1):[this.data],this.dt.selectRange(e,this.index)}e.preventDefault()}}focusRowChange(e,i){e.tabIndex="-1",i.tabIndex="0",tr.focus(i)}findLastSelectableRow(){let e=tr.find(this.dt.el.nativeElement,".p-datatable-selectable-row");return e?e[e.length-1]:null}findFirstSelectableRow(){return tr.findSingle(this.dt.el.nativeElement,".p-datatable-selectable-row")}findNextSelectableRow(e){let i=e.nextElementSibling;return i?tr.hasClass(i,"p-datatable-selectable-row")?i:this.findNextSelectableRow(i):null}findPrevSelectableRow(e){let i=e.previousElementSibling;return i?tr.hasClass(i,"p-datatable-selectable-row")?i:this.findPrevSelectableRow(i):null}isEnabled(){return this.pSelectableRowDisabled!==!0}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(_e(hl),_e(LL))};static \u0275dir=rn({type:t,selectors:[["","pSelectableRow",""]],hostVars:4,hostBindings:function(i,o){i&1&&ie("click",function(s){return o.onClick(s)})("touchend",function(s){return o.onTouchEnd(s)})("keydown",function(s){return o.onKeyDown(s)}),i&2&&(Rr("tabIndex",o.setRowTabIndex()),Ge("data-p-selectable-row",!0),Oe(o.cx("selectableRow")))},inputs:{data:[0,"pSelectableRow","data"],index:[0,"pSelectableRowIndex","index"],pSelectableRowDisabled:[2,"pSelectableRowDisabled","pSelectableRowDisabled",je]},standalone:!1,features:[jt([lS]),ft]})}return t})();var NL=(()=>{class t{dt;tableService;cd;value;disabled=mo(void 0,{transform:je});required=mo(void 0,{transform:je});index=mo(void 0,{transform:ln});inputId=mo();name=mo();ariaLabel;checked;subscription;constructor(e,i,o){this.dt=e,this.tableService=i,this.cd=o,this.subscription=this.dt.tableService.selectionSource$.subscribe(()=>{this.checked=this.dt.isSelected(this.value),this.ariaLabel=this.ariaLabel||this.dt.config.translation.aria?this.checked?this.dt.config.translation.aria.selectRow:this.dt.config.translation.aria.unselectRow:void 0,this.cd.markForCheck()})}ngOnInit(){this.checked=this.dt.isSelected(this.value)}onClick({originalEvent:e}){this.disabled()||this.dt.toggleRowWithCheckbox({originalEvent:e,rowIndex:this.index()},this.value),tr.clearSelection()}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(_e(hl),_e(LL),_e(Gi))};static \u0275cmp=ne({type:t,selectors:[["p-tableCheckbox"]],inputs:{value:"value",disabled:[1,"disabled"],required:[1,"required"],index:[1,"index"],inputId:[1,"inputId"],name:[1,"name"],ariaLabel:"ariaLabel"},standalone:!1,decls:2,vars:8,consts:[[3,"ngModelChange","onChange","ngModel","binary","required","disabled","inputId","name","ariaLabel"],["pTemplate","icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){if(i&1&&(k(0,"p-checkbox",0),hh("ngModelChange",function(s){return Xh(o.checked,s)||(o.checked=s),s}),ie("onChange",function(s){return o.onClick(s)}),qe(1,j1t,1,0,null,1),D()),i&2){let r;ph("ngModel",o.checked),E("binary",!0)("required",o.required())("disabled",o.disabled())("inputId",o.inputId())("name",o.name()),Cc("ariaLabel",o.ariaLabel),T(),Ke((r=o.dt.checkboxIconTemplate||o.dt._checkboxIconTemplate)?1:-1,r)}},dependencies:[Lo,so,no,qv,Lr,dg],encapsulation:2,changeDetection:0})}return t})(),BL=(()=>{class t{dt;tableService;cd;disabled=mo(void 0,{transform:je});inputId=mo();name=mo();ariaLabel;checked;selectionChangeSubscription;valueChangeSubscription;constructor(e,i,o){this.dt=e,this.tableService=i,this.cd=o,this.valueChangeSubscription=this.dt.tableService.valueSource$.subscribe(()=>{this.checked=this.updateCheckedState(),this.ariaLabel=this.ariaLabel||this.dt.config.translation.aria?this.checked?this.dt.config.translation.aria.selectAll:this.dt.config.translation.aria.unselectAll:void 0}),this.selectionChangeSubscription=this.dt.tableService.selectionSource$.subscribe(()=>{this.checked=this.updateCheckedState()})}ngOnInit(){this.checked=this.updateCheckedState()}onClick(e){this.disabled()||this.dt.value&&this.dt.value.length>0&&this.dt.toggleRowsWithCheckbox(e,this.checked),tr.clearSelection()}isDisabled(){return this.disabled()||!this.dt.value||!this.dt.value.length}ngOnDestroy(){this.selectionChangeSubscription&&this.selectionChangeSubscription.unsubscribe(),this.valueChangeSubscription&&this.valueChangeSubscription.unsubscribe()}updateCheckedState(){if(this.cd.markForCheck(),this.dt._selectAll!==null)return this.dt._selectAll;{let e=this.dt.selectionPageOnly?this.dt.dataToRender(this.dt.processedData):this.dt.processedData,i=this.dt.frozenValue?[...this.dt.frozenValue,...e]:e,o=this.dt.rowSelectable?i.filter((r,s)=>this.dt.rowSelectable({data:r,index:s})):i;return Jr.isNotEmpty(o)&&Jr.isNotEmpty(this.dt.selection)&&o.every(r=>this.dt.selection.some(s=>this.dt.equals(r,s)))}}static \u0275fac=function(i){return new(i||t)(_e(hl),_e(LL),_e(Gi))};static \u0275cmp=ne({type:t,selectors:[["p-tableHeaderCheckbox"]],inputs:{disabled:[1,"disabled"],inputId:[1,"inputId"],name:[1,"name"],ariaLabel:"ariaLabel"},standalone:!1,decls:2,vars:7,consts:[[3,"ngModelChange","onChange","ngModel","binary","disabled","inputId","name","ariaLabel"],["pTemplate","icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){if(i&1&&(k(0,"p-checkbox",0),hh("ngModelChange",function(s){return Xh(o.checked,s)||(o.checked=s),s}),ie("onChange",function(s){return o.onClick(s)}),qe(1,K1t,1,0,null,1),D()),i&2){let r;ph("ngModel",o.checked),E("binary",!0)("disabled",o.isDisabled())("inputId",o.inputId())("name",o.name()),Cc("ariaLabel",o.ariaLabel),T(),Ke((r=o.dt.headerCheckboxIconTemplate||o.dt._headerCheckboxIconTemplate)?1:-1,r)}},dependencies:[Lo,so,no,Lr,dg],encapsulation:2,changeDetection:0})}return t})();var hc=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[lS],imports:[On,kE,qK,Kke,hr,$K,uPe,Ske,XFe,LP,WFe,Wae,BP,VP,og,az,cz,lz,oke,YFe,rke,UK,ake,oPe,In,Wae]})}return t})();var X1t=(t,n)=>n.commandId;function J1t(t,n){if(t&1&&(k(0,"div",13),ce(1,"img",14),k(2,"div"),Q(3),D()()),t&2){let e=n.$implicit,i=P(4);T(),E("src",i.createBase64Image(e.value),dc)("width",16),T(2),dt(e.displayName)}}function ewt(t,n){if(t&1){let e=tt();k(0,"p-iftalabel")(1,"p-select",11),ie("onChange",function(o){se(e);let r=P().$implicit,s=P(2);return ae(s.addCommandChange(r,o.value))}),ee(2,J1t,4,3,"ng-template",null,0,Pt),D(),k(4,"label",12),Q(5),D()()}if(t&2){let e=P().$implicit;T(),E("inputId","map-name-and-location-control-layer-command-"+e.commandId+"-select")("ngModel",e.currentOption)("options",e.options),T(3),E("for","map-name-and-location-control-layer-command-"+e.commandId+"-select"),T(),dt(e.displayName)}}function twt(t,n){if(t&1){let e=tt();k(0,"bd-ui-color-select",15),ie("colorChange",function(o){se(e);let r=P().$implicit,s=P(2);return ae(s.onColorChange(o,r))}),D()}if(t&2){let e=P().$implicit,i=P(2);E("color",i.createTinyColorFromHexColor(e.currentOption.key))("placeholder",e.displayName)}}function iwt(t,n){if(t&1){let e=tt();k(0,"p-iftalabel")(1,"p-select",11),ie("onChange",function(o){se(e);let r=P().$implicit,s=P(2);return ae(s.addCommandChange(r,o.value))}),D(),k(2,"label",12),Q(3),D()()}if(t&2){let e=P().$implicit;T(),E("inputId","map-name-and-location-control-layer-command-"+e.commandId+"-select")("ngModel",e.currentOption)("options",e.options),T(),E("for","map-name-and-location-control-layer-command-"+e.commandId+"-select"),T(),dt(e.displayName)}}function nwt(t,n){if(t&1&&(k(0,"div"),qe(1,ewt,6,5,"p-iftalabel")(2,twt,1,2,"bd-ui-color-select",10)(3,iwt,4,5,"p-iftalabel"),D()),t&2){let e,i=n.$implicit;T(),Ke((e=i.optionsType)==="single-select-with-icon"?1:e==="color-select"?2:3)}}function owt(t,n){if(t&1&&(k(0,"div",2),lo(1,nwt,4,1,"div",null,X1t),D()),t&2){let e=P();T(),co(e.data.commands)}}function rwt(t,n){t&1&&(k(0,"tr")(1,"th",16),ce(2,"p-tableHeaderCheckbox"),D(),k(3,"th"),Q(4,"Name"),D(),k(5,"th"),Q(6,"IK"),D(),k(7,"th"),Q(8,"SN"),D()())}function swt(t,n){if(t&1&&(k(0,"tr")(1,"td"),ce(2,"p-tableCheckbox",17),D(),k(3,"td"),Q(4),D(),k(5,"td"),Q(6),D(),k(7,"td"),Q(8),D()()),t&2){let e=n.$implicit,i=P();T(2),E("value",e),T(2),dt(e.properties.itemName),T(2),Qi(" ",i.AysClinicIdentifier.fromString(e.properties.itemKey).ik," "),T(2),Qi(" ",i.AysClinicIdentifier.fromString(e.properties.itemKey).sn," ")}}var yPe=(()=>{class t extends dW{constructor(e,i){super(i),this.AysClinicIdentifier=ga,this.features=[],this.data=e.data,this.features=e.data.data.features.filter(o=>o.properties.itemActive).slice()}onSelection(e){this.features=e}onColorChange(e,i){i.options=[{key:e.toHex(),value:e.toHexString()}],this.addCommandChange(i,{key:e.toHex(),value:e.toHexString()})}submit(){let e=this.features.map(o=>o.properties.itemKey),i=this.data.data.features.map(o=>(o.properties.itemActive=e.includes(o.properties.itemKey),o));this._ref.close({data:bd(i),commands:this.commands})}createBase64Image(e){return`data:image/svg+xml;base64,${btoa(e)}`}createTinyColorFromHexColor(e){return new Cs(e)}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],features:[ft],decls:12,vars:6,consts:[["item",""],[1,"flex","flex-col","gap-4"],[1,"grid","grid-cols-3","gap-4"],[1,"font-bold","text-base"],["dataKey","properties.itemKey","scrollHeight","250px",3,"selectionChange","selection","value","scrollable","virtualScroll","virtualScrollItemSize"],["pTemplate","header"],["pTemplate","body"],[1,"flex","flex-row-reverse","gap-4"],["type","button","mat-raised-button","","color","accent",3,"click"],["type","button","mat-button","",3,"click"],[3,"color","placeholder"],["variant","filled","fluid","","optionLabel","displayName","dataKey","key",1,"mb-4",3,"onChange","inputId","ngModel","options"],[3,"for"],[1,"flex","items-center","gap-4"],[3,"src","width"],[3,"colorChange","color","placeholder"],[2,"width","4rem"],[3,"value"]],template:function(i,o){i&1&&(k(0,"div",1),qe(1,owt,3,0,"div",2),k(2,"span",3),Q(3,"Darstellung Kliniken auf Karte"),D(),k(4,"p-table",4),ie("selectionChange",function(s){return o.onSelection(s)}),ee(5,rwt,9,0,"ng-template",5)(6,swt,9,4,"ng-template",6),D(),k(7,"div",7)(8,"button",8),ie("click",function(){return o.submit()}),Q(9," \xDCbernehmen "),D(),k(10,"button",9),ie("click",function(){return o._ref.close()}),Q(11," Abbrechen "),D()()()),i&2&&(T(),Ke(o.data.commands?1:-1),T(3),E("selection",o.features)("value",o.data.data.features)("scrollable",!0)("virtualScroll",!0)("virtualScrollItemSize",46))},dependencies:[Tn,yo,hc,hl,so,NL,BL,as,Ql,hr,no,Lr,Az],encapsulation:2})}}return t})();var vPe=Ap(Kw());var bPe=(()=>{class t{constructor(e){this._environmentService=e,this.points=[],this.mapOptions=hW,this._firstLoaded=!1;let i=this._environmentService.load("AYS_MAP_OPTIONS_STYLE_URL")}ngOnChanges(e){e.points&&e.points.currentValue&&this._firstLoaded&&this._updatePoints(e.points.currentValue)}onMapLoad(e){this._map=e,this.markers=new pW(e),this._updatePoints(this.points),this._firstLoaded=!0}_updatePoints(e){this.markers.markers=e.map(i=>{let o=new vPe.Marker;return o.setLngLat(i),o}),this._setViewPort(e)}_setViewPort(e){let i=e.length;if(i>1){let o=e.map(s=>Qm(s)),r=n_(bd(o));this._map.fitBounds([[r[0],r[1]],[r[2],r[3]]],{padding:24})}else i===1&&this._map.jumpTo({center:e[0]})}static{this.\u0275fac=function(i){return new(i||t)(_e(qr))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-static-map"]],inputs:{points:"points",mapOptions:"mapOptions"},features:[Ot],decls:3,vars:1,consts:[[1,"map-container"],[1,"map"],[3,"mapLoaded","mapOptions"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"bd-map",2),ie("mapLoaded",function(s){return o.onMapLoad(s)}),D()()()),i&2&&(T(2),E("mapOptions",o.mapOptions))},dependencies:[eu],styles:[".map-container[_ngcontent-%COMP%]{display:flex;width:100%;height:100%}.map-container[_ngcontent-%COMP%] .map[_ngcontent-%COMP%]{width:100%;height:100%}"]})}}return t})();var PY=(()=>{class t{constructor(){this.selectedAdministrativeDistrictIds=[],this.selectedAdministrativeDistrictsChange=new ve,this.mapOptions=lm,this.mapController=new Jd,this._layer=new tL("selection",{layerId:$w.id,highlightLayerId:HP.id,sourceId:rE,displayName:"Auswahl Landkreise"}),this._layer.selection.changed.subscribe(e=>this.selectedAdministrativeDistrictsChange.emit(e.source.selected)),this.mapController.registerLayer(this._layer)}ngOnChanges(e){e.selectedAdministrativeDistrictIds&&e.selectedAdministrativeDistrictIds.currentValue&&this._layer.selection.setSelection(...this.selectedAdministrativeDistrictIds)}onMapLoaded(e){this.mapController.addMapRef(e)}onMapClicked(e){this._layer.click(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-maps-administrative-district-ids-map-selection"]],inputs:{selectedAdministrativeDistrictIds:"selectedAdministrativeDistrictIds"},outputs:{selectedAdministrativeDistrictsChange:"selectedAdministrativeDistrictsChange"},features:[Ot],decls:3,vars:2,consts:[[1,"map-wrapper"],[3,"mapClick","mapLoaded","mapOptions"],[3,"controller"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"bd-map",1),ie("mapClick",function(s){return o.onMapClicked(s)})("mapLoaded",function(s){return o.onMapLoaded(s)}),D(),ce(2,"bd-map-legend",2),D()),i&2&&(T(),E("mapOptions",o.mapOptions),T(),E("controller",o.mapController))},dependencies:[eu,Yp],styles:[".map-wrapper[_ngcontent-%COMP%]{height:600px;position:relative}"]})}}return t})();var LY=class{constructor(n){this._envService=n}index(){return`${this._envService.load("BD_DISTRICT_URL")}/administrative-regions/`}detail(n){return`${this._envService.load("BD_DISTRICT_URL")}/administrative-regions/${n}`}administrativeDistricts(){return`${this._envService.load("BD_DISTRICT_URL")}/administrative-regions/administrative-districts`}postalCodes(){return`${this._envService.load("BD_DISTRICT_URL")}/administrative-regions/postal-codes`}careServiceAreas(){return`${this._envService.load("BD_DISTRICT_URL")}/administrative-regions/care-service-areas`}};var Rde=(()=>{class t{constructor(e,i){this._httpClient=e,this.store=new LY(i)}search(e=""){let i=this.store.index(),o=new Pr().set("q",e);return this._httpClient.get(i,{params:o})}findAll(e){let i=this.store.index();return this._httpClient.post(i,{administrativeRegionIds:e})}findOne(e){let i=this.store.detail(e);return this._httpClient.get(i)}findItsCareServiceAreas(e){let i=this.store.careServiceAreas();return this._httpClient.post(i,{administrativeRegionIds:e})}findItsAdministrativeDistricts(e){let i=this.store.administrativeDistricts();return this._httpClient.post(i,{administrativeRegionIds:e}).pipe(vt(o=>o.map(r=>Yo.createFromNumber(r))))}findItsPostalCodes(e){let i=this.store.postalCodes();return this._httpClient.post(i,{administrativeRegionIds:e})}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var NY=class{constructor(n){this._envService=n}index(){return`${this._envService.load("BD_DISTRICT_URL")}/care-service-areas/`}details(n){return`${this._envService.load("BD_DISTRICT_URL")}/care-service-areas/${n}`}administrativeRegions(){return`${this._envService.load("BD_DISTRICT_URL")}/care-service-areas/administrative-regions`}administrativeDistricts(){return`${this._envService.load("BD_DISTRICT_URL")}/care-service-areas/administrative-districts`}postalCodes(){return`${this._envService.load("BD_DISTRICT_URL")}/care-service-areas/postal-codes`}};var Fde=(()=>{class t{constructor(e,i){this._httpClient=e,this.store=new NY(i)}search(e=""){let i=this.store.index(),o=new Pr().set("q",e);return this._httpClient.get(i,{params:o})}findAll(e){let i=this.store.index();return this._httpClient.post(i,{careServiceAreaIds:e})}findOne(e){let i=this.store.details(e);return this._httpClient.get(i)}findItsAdministrativeRegions(e){let i=this.store.administrativeRegions();return this._httpClient.post(i,{careServiceAreaIds:e})}findItsAdministrativeDistricts(e){let i=this.store.administrativeDistricts();return this._httpClient.post(i,{careServiceAreaIds:e}).pipe(vt(o=>o.map(r=>Yo.createFromNumber(r))))}findItsPostalCodes(e){let i=this.store.postalCodes();return this._httpClient.post(i,{careServiceAreaIds:e})}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var CPe=` .p-tree { display: block; background: dt('tree.background'); color: dt('tree.color'); padding: dt('tree.padding'); } .p-tree-root-children, .p-tree-node-children { display: flex; list-style-type: none; flex-direction: column; margin: 0; gap: dt('tree.gap'); } .p-tree-root-children { padding: 0; padding-block-start: dt('tree.gap'); } .p-tree-node-children { padding: 0; padding-block-start: dt('tree.gap'); padding-inline-start: dt('tree.indent'); } .p-tree-node { padding: 0; outline: 0 none; } .p-tree-node-content { border-radius: dt('tree.node.border.radius'); padding: dt('tree.node.padding'); display: flex; align-items: center; outline-color: transparent; color: dt('tree.node.color'); gap: dt('tree.node.gap'); transition: background dt('tree.transition.duration'), color dt('tree.transition.duration'), outline-color dt('tree.transition.duration'), box-shadow dt('tree.transition.duration'); } .p-tree-node:focus-visible > .p-tree-node-content { box-shadow: dt('tree.node.focus.ring.shadow'); outline: dt('tree.node.focus.ring.width') dt('tree.node.focus.ring.style') dt('tree.node.focus.ring.color'); outline-offset: dt('tree.node.focus.ring.offset'); } .p-tree-node-content.p-tree-node-selectable:not(.p-tree-node-selected):hover { background: dt('tree.node.hover.background'); color: dt('tree.node.hover.color'); } .p-tree-node-content.p-tree-node-selectable:not(.p-tree-node-selected):hover .p-tree-node-icon { color: dt('tree.node.icon.hover.color'); } .p-tree-node-content.p-tree-node-selected { background: dt('tree.node.selected.background'); color: dt('tree.node.selected.color'); } .p-tree-node-content.p-tree-node-selected .p-tree-node-toggle-button { color: inherit; } .p-tree-node-toggle-button { cursor: pointer; user-select: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; position: relative; flex-shrink: 0; width: dt('tree.node.toggle.button.size'); height: dt('tree.node.toggle.button.size'); color: dt('tree.node.toggle.button.color'); border: 0 none; background: transparent; border-radius: dt('tree.node.toggle.button.border.radius'); transition: background dt('tree.transition.duration'), color dt('tree.transition.duration'), border-color dt('tree.transition.duration'), outline-color dt('tree.transition.duration'), box-shadow dt('tree.transition.duration'); outline-color: transparent; padding: 0; } .p-tree-node-toggle-button:enabled:hover { background: dt('tree.node.toggle.button.hover.background'); color: dt('tree.node.toggle.button.hover.color'); } .p-tree-node-content.p-tree-node-selected .p-tree-node-toggle-button:hover { background: dt('tree.node.toggle.button.selected.hover.background'); color: dt('tree.node.toggle.button.selected.hover.color'); } .p-tree-root { overflow: auto; } .p-tree-node-selectable { cursor: pointer; user-select: none; } .p-tree-node-leaf > .p-tree-node-content .p-tree-node-toggle-button { visibility: hidden; } .p-tree-node-icon { color: dt('tree.node.icon.color'); transition: color dt('tree.transition.duration'); } .p-tree-node-content.p-tree-node-selected .p-tree-node-icon { color: dt('tree.node.icon.selected.color'); } .p-tree-filter { margin: dt('tree.filter.margin'); } .p-tree-filter-input { width: 100%; } .p-tree-loading { position: relative; height: 100%; } .p-tree-loading-icon { font-size: dt('tree.loading.icon.size'); width: dt('tree.loading.icon.size'); height: dt('tree.loading.icon.size'); } .p-tree .p-tree-mask { position: absolute; z-index: 1; display: flex; align-items: center; justify-content: center; } .p-tree-flex-scrollable { display: flex; flex: 1; height: 100%; flex-direction: column; } .p-tree-flex-scrollable .p-tree-root { flex: 1; } `;var wPe=t=>({height:t}),SPe=t=>({param:t}),dwt=(t,n)=>({$implicit:t,loading:n}),uwt=(t,n,e)=>({$implicit:t,partialSelected:n,class:e}),TPe=t=>({$implicit:t});function pwt(t,n){if(t&1){let e=tt();k(0,"li",9),ie("drop",function(o){se(e);let r=P(2);return ae(r.onDropPoint(o,-1))})("dragover",function(o){se(e);let r=P(2);return ae(r.onDropPointDragOver(o))})("dragenter",function(o){se(e);let r=P(2);return ae(r.onDropPointDragEnter(o,-1))})("dragleave",function(o){se(e);let r=P(2);return ae(r.onDropPointDragLeave(o))}),D()}if(t&2){let e=P(2);Oe(e.cx("dropPoint",ki(3,SPe,e.draghoverPrev))),Ge("aria-hidden",!0)}}function hwt(t,n){if(t&1&&(si(),ce(0,"svg",12)),t&2){let e=P(4);Oe(e.cx("nodeToggleIcon"))}}function mwt(t,n){if(t&1&&(si(),ce(0,"svg",13)),t&2){let e=P(4);Oe(e.cx("nodeToggleIcon"))}}function fwt(t,n){if(t&1&&(Di(0),ee(1,hwt,1,2,"svg",10)(2,mwt,1,2,"svg",11),Ai()),t&2){let e=P(3);T(),E("ngIf",!e.node.expanded),T(),E("ngIf",e.node.expanded)}}function gwt(t,n){if(t&1&&(Di(0),si(),ce(1,"svg",14),Ai()),t&2){let e=P(3);T(),Oe(e.cx("nodeToggleIcon"))}}function _wt(t,n){if(t&1&&(Di(0),ee(1,fwt,3,2,"ng-container",5)(2,gwt,2,2,"ng-container",5),Ai()),t&2){let e=P(2);T(),E("ngIf",!e.node.loading),T(),E("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function ywt(t,n){}function vwt(t,n){t&1&&ee(0,ywt,0,0,"ng-template")}function bwt(t,n){if(t&1&&(k(0,"span"),ee(1,vwt,1,0,null,15),D()),t&2){let e=P(2);Oe(e.cx("nodeToggleIcon")),T(),E("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",Eo(4,dwt,e.node.expanded,e.node.loading))}}function Cwt(t,n){}function xwt(t,n){t&1&&ee(0,Cwt,0,0,"ng-template")}function wwt(t,n){if(t&1&&ee(0,xwt,1,0,null,15),t&2){let e=P(4);E("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",$d(2,uwt,e.isSelected(),e.node.partialSelected,e.cx("nodeCheckbox")))}}function Swt(t,n){t&1&&(Di(0),ee(1,wwt,1,6,"ng-template",null,0,Pt),Ai())}function Twt(t,n){if(t&1){let e=tt();k(0,"p-checkbox",16),ie("click",function(o){return se(e),ae(o.preventDefault())}),ee(1,Swt,3,0,"ng-container",5),D()}if(t&2){let e=P(2);E("ngModel",e.isSelected())("styleClass",e.cx("nodeCheckbox"))("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),Ge("data-p-partialchecked",e.node.partialSelected),T(),E("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function Iwt(t,n){if(t&1&&ce(0,"span"),t&2){let e=P(2);Oe(e.getIcon())}}function Ewt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(2);T(),dt(e.node.label)}}function Dwt(t,n){t&1&&ui(0)}function Awt(t,n){if(t&1&&(k(0,"span"),ee(1,Dwt,1,0,"ng-container",15),D()),t&2){let e=P(2);T(),E("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",ki(2,TPe,e.node))}}function kwt(t,n){if(t&1&&ce(0,"p-treeNode",19),t&2){let e=n.$implicit,i=n.first,o=n.last,r=n.index,s=P(3);E("node",e)("parentNode",s.node)("firstChild",i)("lastChild",o)("index",r)("itemSize",s.itemSize)("level",s.level+1)("loadingMode",s.loadingMode)}}function Mwt(t,n){if(t&1&&(k(0,"ul",17),ee(1,kwt,1,8,"p-treeNode",18),D()),t&2){let e=P(2);Oe(e.cx("nodeChildren")),T(),E("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function Owt(t,n){if(t&1){let e=tt();k(0,"li",9),ie("drop",function(o){se(e);let r=P(2);return ae(r.onDropPoint(o,1))})("dragover",function(o){se(e);let r=P(2);return ae(r.onDropPointDragOver(o))})("dragenter",function(o){se(e);let r=P(2);return ae(r.onDropPointDragEnter(o,1))})("dragleave",function(o){se(e);let r=P(2);return ae(r.onDropPointDragLeave(o))}),D()}if(t&2){let e=P(2);Oe(e.cx("dropPoint",ki(3,SPe,e.draghoverNext))),Ge("aria-hidden",!0)}}function Rwt(t,n){if(t&1){let e=tt();ee(0,pwt,1,5,"li",1),k(1,"li",2),ie("keydown",function(o){se(e);let r=P();return ae(r.onKeyDown(o))}),k(2,"div",3),ie("click",function(o){se(e);let r=P();return ae(r.onNodeClick(o))})("contextmenu",function(o){se(e);let r=P();return ae(r.onNodeRightClick(o))})("dblclick",function(o){se(e);let r=P();return ae(r.onNodeDblClick(o))})("touchend",function(){se(e);let o=P();return ae(o.onNodeTouchEnd())})("drop",function(o){se(e);let r=P();return ae(r.onDropNode(o))})("dragover",function(o){se(e);let r=P();return ae(r.onDropNodeDragOver(o))})("dragenter",function(o){se(e);let r=P();return ae(r.onDropNodeDragEnter(o))})("dragleave",function(o){se(e);let r=P();return ae(r.onDropNodeDragLeave(o))})("dragstart",function(o){se(e);let r=P();return ae(r.onDragStart(o))})("dragend",function(o){se(e);let r=P();return ae(r.onDragStop(o))}),k(3,"button",4),ie("click",function(o){se(e);let r=P();return ae(r.toggle(o))}),ee(4,_wt,3,2,"ng-container",5)(5,bwt,2,7,"span",6),D(),ee(6,Twt,2,9,"p-checkbox",7)(7,Iwt,1,2,"span",6),k(8,"span"),ee(9,Ewt,2,1,"span",5)(10,Awt,2,4,"span",5),D()(),ee(11,Mwt,2,4,"ul",8),D(),ee(12,Owt,1,5,"li",1)}if(t&2){let e=P();E("ngIf",e.tree.droppableNodes),T(),$r(e.node.style),Oe(e.cn(e.cx("node"),e.node.styleClass)),E("ngStyle",ki(33,wPe,e.itemSize+"px")),Ge("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),T(),Oe(e.cx("nodeContent")),Ir("padding-left",e.level*e.indentation+"rem"),E("draggable",e.tree.draggableNodes),T(),Oe(e.cx("nodeToggleButton")),Ge("data-pc-section","toggler"),T(),E("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),T(),E("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),T(),E("ngIf",e.tree.selectionMode=="checkbox"),T(),E("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),T(),Oe(e.cx("nodeLabel")),T(),E("ngIf",!e.tree.getTemplateForNode(e.node)),T(),E("ngIf",e.tree.getTemplateForNode(e.node)),T(),E("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),T(),E("ngIf",e.tree.droppableNodes&&e.lastChild)}}var xPe=["filter"],Fwt=["node"],Pwt=["header"],Lwt=["footer"],Nwt=["loader"],Bwt=["empty"],Vwt=["togglericon"],zwt=["checkboxicon"],Uwt=["loadingicon"],Hwt=["filtericon"],jwt=["scroller"],Gwt=["wrapper"],$wt=["content"],qwt=t=>({options:t});function Kwt(t,n){if(t&1&&ce(0,"i"),t&2){let e=P(2);Oe(e.cn(e.cx("loadingIcon"),"pi-spin"+e.loadingIcon))}}function Wwt(t,n){if(t&1&&(si(),ce(0,"svg",12)),t&2){let e=P(3);Oe(e.cx("loadingIcon"))}}function Ywt(t,n){}function Qwt(t,n){t&1&&ee(0,Ywt,0,0,"ng-template")}function Zwt(t,n){if(t&1&&(k(0,"span"),ee(1,Qwt,1,0,null,8),D()),t&2){let e=P(3);Oe(e.cx("loadingIcon")),T(),E("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function Xwt(t,n){if(t&1&&(Di(0),ee(1,Wwt,1,2,"svg",11)(2,Zwt,2,3,"span",7),Ai()),t&2){let e=P(2);T(),E("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),T(),E("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Jwt(t,n){if(t&1&&(k(0,"div"),ee(1,Kwt,1,2,"i",7)(2,Xwt,3,2,"ng-container",10),D()),t&2){let e=P();Oe(e.cx("mask")),T(),E("ngIf",e.loadingIcon),T(),E("ngIf",!e.loadingIcon)}}function eSt(t,n){t&1&&ui(0)}function tSt(t,n){t&1&&ui(0)}function iSt(t,n){if(t&1&&ee(0,tSt,1,0,"ng-container",13),t&2){let e=P();E("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",ki(2,TPe,e.filterOptions))}}function nSt(t,n){if(t&1&&(si(),ce(0,"svg",16)),t&2){let e=P(3);Oe(e.cx("filterIcon"))}}function oSt(t,n){}function rSt(t,n){t&1&&ee(0,oSt,0,0,"ng-template")}function sSt(t,n){if(t&1&&(k(0,"span"),ee(1,rSt,1,0,null,8),D()),t&2){let e=P(3);Oe(e.cx("filterIcon")),T(),E("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function aSt(t,n){if(t&1){let e=tt();k(0,"p-iconfield")(1,"input",14,0),ie("keydown.enter",function(o){return se(e),ae(o.preventDefault())})("input",function(o){se(e);let r=P(2);return ae(r._filter(o.target==null?null:o.target.value))}),D(),k(3,"p-inputicon"),ee(4,nSt,1,2,"svg",15)(5,sSt,2,3,"span",7),D()()}if(t&2){let e=P(2);Oe(e.cx("pcFilterContainer")),T(),Oe(e.cx("pcFilterInput")),E("pAutoFocus",e.filterInputAutoFocus),Ge("placeholder",e.filterPlaceholder),T(3),E("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),T(),E("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function lSt(t,n){if(t&1&&ee(0,aSt,6,8,"p-iconfield",7),t&2){let e=P();E("ngIf",e.filter)}}function cSt(t,n){if(t&1&&ce(0,"p-treeNode",22,3),t&2){let e=n.$implicit,i=n.first,o=n.last,r=n.index,s=P(2).options,d=P(3);E("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",i)("lastChild",o)("index",d.getIndex(s,r))("itemSize",s.itemSize)("indentation",d.indentation)("loadingMode",d.loadingMode)}}function dSt(t,n){if(t&1&&(k(0,"ul",20,2),ee(2,cSt,2,10,"p-treeNode",21),D()),t&2){let e=P(),i=e.$implicit,o=e.options,r=P(3);$r(o.contentStyle),Oe(r.cx("rootChildren")),E("ngClass",o.contentStyleClass),Ge("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledBy),T(2),E("ngForOf",i)("ngForTrackBy",r.trackBy)}}function uSt(t,n){if(t&1&&ee(0,dSt,3,9,"ul",19),t&2){let e=n.$implicit;E("ngIf",e)}}function pSt(t,n){t&1&&ui(0)}function hSt(t,n){if(t&1&&ee(0,pSt,1,0,"ng-container",13),t&2){let e=n.options,i=P(4);E("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",ki(2,qwt,e))}}function mSt(t,n){t&1&&(Di(0),ee(1,hSt,1,4,"ng-template",null,4,Pt),Ai())}function fSt(t,n){if(t&1){let e=tt();k(0,"p-scroller",18,1),ie("onScroll",function(o){se(e);let r=P(2);return ae(r.onScroll.emit(o))})("onScrollIndexChange",function(o){se(e);let r=P(2);return ae(r.onScrollIndexChange.emit(o))})("onLazyLoad",function(o){se(e);let r=P(2);return ae(r.onLazyLoad.emit(o))}),ee(2,uSt,1,1,"ng-template",null,2,Pt)(4,mSt,3,0,"ng-container",10),D()}if(t&2){let e=P(2);$r(ki(10,wPe,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),E("items",e.serializedValue)("tabindex",-1)("styleClass",e.cx("wrapper"))("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize)("lazy",e.lazy)("options",e.virtualScrollOptions),T(4),E("ngIf",e.loaderTemplate||e._loaderTemplate)}}function gSt(t,n){if(t&1&&ce(0,"p-treeNode",26),t&2){let e=n.$implicit,i=n.first,o=n.last,r=n.index,s=P(4);E("node",e)("firstChild",i)("lastChild",o)("index",r)("level",0)("loadingMode",s.loadingMode)}}function _St(t,n){if(t&1&&(k(0,"ul",24,2),ee(2,gSt,1,6,"p-treeNode",25),D()),t&2){let e=P(3);Oe(e.cx("rootChildren")),Ge("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),T(2),E("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function ySt(t,n){if(t&1&&(Di(0),k(1,"div",null,5),ee(3,_St,3,6,"ul",23),D(),Ai()),t&2){let e=P(2);T(),Oe(e.cx("wrapper")),Ir("max-height",e.scrollHeight),T(2),E("ngIf",e.getRootNode())}}function vSt(t,n){if(t&1&&(Di(0),ee(1,fSt,5,12,"p-scroller",17)(2,ySt,4,5,"ng-container",10),Ai()),t&2){let e=P();T(),E("ngIf",e.virtualScroll),T(),E("ngIf",!e.virtualScroll)}}function bSt(t,n){if(t&1&&(Di(0),Q(1),Ai()),t&2){let e=P(2);T(),Qi(" ",e.emptyMessageLabel," ")}}function CSt(t,n){}function xSt(t,n){t&1&&ee(0,CSt,0,0,"ng-template",null,6,Pt)}function wSt(t,n){if(t&1&&(k(0,"div"),ee(1,bSt,2,1,"ng-container",27)(2,xSt,2,0,null,8),D()),t&2){let e=P();Oe(e.cx("emptyMessage")),T(),E("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),T(),E("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function SSt(t,n){t&1&&ui(0)}var TSt={root:({instance:t})=>["p-tree p-component",{"p-tree-selectable":t.selectionMode!=null,"p-tree-loading":t.loading,"p-tree-flex-scrollable":t.scrollHeight==="flex","p-tree-node-dragover":t.dragHover}],mask:"p-tree-mask p-overlay-mask",loadingIcon:"p-tree-loading-icon",pcFilterInput:"p-tree-filter-input",wrapper:"p-tree-root",rootChildren:"p-tree-root-children",node:({instance:t})=>({"p-tree-node":!0,"p-tree-node-leaf":t.isLeaf()}),nodeContent:({instance:t})=>({"p-tree-node-content":!0,"p-tree-node-selectable":t.selectable,"p-tree-node-dragover":t.draghoverNode,"p-tree-node-selected":t.selectionMode==="checkbox"&&t.tree.highlightOnSelect?t.checked:t.selected}),nodeToggleButton:"p-tree-node-toggle-button",nodeToggleIcon:"p-tree-node-toggle-icon",nodeCheckbox:"p-tree-node-checkbox",nodeIcon:"p-tree-node-icon",nodeLabel:"p-tree-node-label",nodeChildren:"p-tree-node-children",emptyMessage:"p-tree-empty-message",dropPoint:({param:t})=>["p-tree-node-droppoint",{"p-tree-node-droppoint-active":t}]},BY=(()=>{class t extends io{name="tree";theme=CPe;classes=TSt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var ISt=(()=>{class t extends oo{static ICON_CLASS="p-tree-node-icon ";rowNode;node;parentNode;root;index;firstChild;lastChild;level;indentation;itemSize;loadingMode;tree=re(Ko(()=>c_));timeout;draghoverPrev;draghoverNext;draghoverNode;_componentStyle=re(BY);get selected(){return this.tree.selectionMode==="single"||this.tree.selectionMode==="multiple"?this.isSelected():void 0}get checked(){return this.tree.selectionMode==="checkbox"?this.isSelected():void 0}get nodeClass(){return this.tree._componentStyle.classes.node({instance:this})}get selectable(){return this.node.selectable===!1?!1:this.tree.selectionMode!=null}ngOnInit(){super.ngOnInit(),this.node.parent=this.parentNode;let i=this.tree.el.nativeElement.closest("p-dialog");this.parentNode&&!i&&(this.setAllNodesTabIndexes(),this.tree.syncNodeOption(this.node,this.tree.value,"parent",this.tree.getNodeWithKey(this.parentNode.key,this.tree.value)))}getIcon(){let e;return this.node.icon?e=this.node.icon:e=this.node.expanded&&this.node.children&&this.node.children?.length?this.node.expandedIcon:this.node.collapsedIcon,t.ICON_CLASS+" "+e+" p-tree-node-icon"}isLeaf(){return this.tree.isNodeLeaf(this.node)}toggle(e){this.node.expanded?this.collapse(e):this.expand(e),e.stopPropagation()}expand(e){this.node.expanded=!0,this.tree.virtualScroll&&(this.tree.updateSerializedValue(),this.focusVirtualNode()),this.tree.onNodeExpand.emit({originalEvent:e,node:this.node})}collapse(e){this.node.expanded=!1,this.tree.virtualScroll&&(this.tree.updateSerializedValue(),this.focusVirtualNode()),this.tree.onNodeCollapse.emit({originalEvent:e,node:this.node})}onNodeClick(e){this.tree.onNodeClick(e,this.node)}onNodeKeydown(e){e.key==="Enter"&&this.tree.onNodeClick(e,this.node)}onNodeTouchEnd(){this.tree.onNodeTouchEnd()}onNodeRightClick(e){this.tree.onNodeRightClick(e,this.node)}onNodeDblClick(e){this.tree.onNodeDblClick(e,this.node)}isSelected(){return this.tree.isSelected(this.node)}isSameNode(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest('[role="treeitem"]')))}onDropPoint(e,i){e.preventDefault();let o=this.tree.dragNode,r=this.tree.dragNodeIndex,s=this.tree.dragNodeScope,d=this.tree.dragNodeTree===this.tree?i===1||r!==this.index-1:!0;if(this.tree.allowDrop(o,this.node,s)&&d){let m=be({},this.createDropPointEventMetadata(i));this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:o,dropNode:this.node,index:this.index,accept:()=>{this.processPointDrop(m)}}):(this.processPointDrop(m),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:o,dropNode:this.node,index:this.index}))}this.draghoverPrev=!1,this.draghoverNext=!1}processPointDrop(e){let i=e.dropNode.parent?e.dropNode.parent.children:this.tree.value;e.dragNodeSubNodes.splice(e.dragNodeIndex,1);let o=this.index;e.position<0?(o=e.dragNodeSubNodes===i?e.dragNodeIndex>e.index?e.index:e.index-1:e.index,i.splice(o,0,e.dragNode)):(o=i.length,i.push(e.dragNode)),this.tree.dragDropService.stopDrag({node:e.dragNode,subNodes:e.dropNode.parent?e.dropNode.parent.children:this.tree.value,index:e.dragNodeIndex})}createDropPointEventMetadata(e){return{dragNode:this.tree.dragNode,dragNodeIndex:this.tree.dragNodeIndex,dragNodeSubNodes:this.tree.dragNodeSubNodes,dropNode:this.node,index:this.index,position:e}}onDropPointDragOver(e){e.dataTransfer.dropEffect="move",e.preventDefault()}onDropPointDragEnter(e,i){this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(i<0?this.draghoverPrev=!0:this.draghoverNext=!0)}onDropPointDragLeave(e){this.draghoverPrev=!1,this.draghoverNext=!1}onDragStart(e){this.tree.draggableNodes&&this.node.draggable!==!1?(e.dataTransfer.setData("text","data"),this.tree.dragDropService.startDrag({tree:this,node:this.node,subNodes:this.node?.parent?this.node.parent.children:this.tree.value,index:this.index,scope:this.tree.draggableScope})):e.preventDefault()}onDragStop(e){this.tree.dragDropService.stopDrag({node:this.node,subNodes:this.node?.parent?this.node.parent.children:this.tree.value,index:this.index})}onDropNodeDragOver(e){e.dataTransfer.dropEffect="move",this.tree.droppableNodes&&(e.preventDefault(),e.stopPropagation())}onDropNode(e){if(this.tree.droppableNodes&&this.node?.droppable!==!1){let i=this.tree.dragNode;if(this.tree.allowDrop(i,this.node,this.tree.dragNodeScope)){let o=be({},this.createDropNodeEventMetadata());this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:this.node,index:this.index,accept:()=>{this.processNodeDrop(o)}}):(this.processNodeDrop(o),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:this.node,index:this.index}))}}e.preventDefault(),e.stopPropagation(),this.draghoverNode=!1}createDropNodeEventMetadata(){return{dragNode:this.tree.dragNode,dragNodeIndex:this.tree.dragNodeIndex,dragNodeSubNodes:this.tree.dragNodeSubNodes,dropNode:this.node}}processNodeDrop(e){let i=e.dragNodeIndex;e.dragNodeSubNodes.splice(i,1),e.dropNode.children?e.dropNode.children.push(e.dragNode):e.dropNode.children=[e.dragNode],this.tree.dragDropService.stopDrag({node:e.dragNode,subNodes:e.dropNode.parent?e.dropNode.parent.children:this.tree.value,index:i})}onDropNodeDragEnter(e){this.tree.droppableNodes&&this.node?.droppable!==!1&&this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(this.draghoverNode=!0)}onDropNodeDragLeave(e){if(this.tree.droppableNodes){let i=e.currentTarget.getBoundingClientRect();(e.x>i.left+i.width||e.x=Math.floor(i.top+i.height)||e.y0)this.focusRowChange(i,o.children[0]);else if(i.parentElement.nextElementSibling)this.focusRowChange(i,i.parentElement.nextElementSibling);else{let r=this.findNextSiblingOfAncestor(i.parentElement);r&&this.focusRowChange(i,r)}e.preventDefault()}onArrowRight(e){!this.node?.expanded&&!this.tree.isNodeLeaf(this.node)&&(this.expand(e),e.currentTarget.tabIndex=-1,setTimeout(()=>{this.onArrowDown(e)},1)),e.preventDefault()}onArrowLeft(e){let i=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target;if(this.level===0&&!this.node?.expanded)return!1;if(this.node?.expanded){this.collapse(e);return}let o=this.getParentNodeElement(i.parentElement);o&&this.focusRowChange(e.currentTarget,o),e.preventDefault()}onEnter(e){this.tree.onNodeClick(e,this.node),this.setTabIndexForSelectionMode(e,this.tree.nodeTouched),e.preventDefault()}setAllNodesTabIndexes(){let e=Xd(this.tree.el.nativeElement,".p-tree-node"),i=[...e].some(o=>o.getAttribute("aria-selected")==="true"||o.getAttribute("aria-checked")==="true");if([...e].forEach(o=>{o.tabIndex=-1}),i){let o=[...e].filter(r=>r.getAttribute("aria-selected")==="true"||r.getAttribute("aria-checked")==="true");o[0].tabIndex=0;return}e.length&&([...e][0].tabIndex=0)}setTabIndexForSelectionMode(e,i){if(this.tree.selectionMode!==null){let o=[...Xd(this.tree.el.nativeElement,'[role="treeitem"]')];e.currentTarget.tabIndex=i===!1?-1:0,o.every(r=>r.tabIndex===-1)&&(o[0].tabIndex=0)}}findNextSiblingOfAncestor(e){let i=this.getParentNodeElement(e);return i?i.nextElementSibling?i.nextElementSibling:this.findNextSiblingOfAncestor(i):null}findLastVisibleDescendant(e){let o=Array.from(e.children).find(r=>Fc(r,"p-tree-node"))?.children[1];if(o&&o.children.length>0){let r=o.children[o.children.length-1];return this.findLastVisibleDescendant(r)}else return e}getParentNodeElement(e){let i=e.parentElement?.parentElement?.parentElement;return i?.tagName==="P-TREENODE"?i:null}focusNode(e){this.tree.droppableNodes?e.children[1].focus():e.children[0].focus()}focusRowChange(e,i,o){e.tabIndex="-1",i.children[0].tabIndex="0",this.focusNode(o||i)}focusVirtualNode(){this.timeout=setTimeout(()=>{let e=zo(this.tree?.contentViewChild.nativeElement,`[data-id="${this.node?.key??this.node?.data}"]`);ss(e)},1)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-treeNode"]],inputs:{rowNode:"rowNode",node:"node",parentNode:"parentNode",root:[2,"root","root",je],index:[2,"index","index",ln],firstChild:[2,"firstChild","firstChild",je],lastChild:[2,"lastChild","lastChild",je],level:[2,"level","level",ln],indentation:[2,"indentation","indentation",ln],itemSize:[2,"itemSize","itemSize",ln],loadingMode:"loadingMode"},features:[jt([BY]),ft],decls:1,vars:1,consts:[["icon",""],[3,"class","drop","dragover","dragenter","dragleave",4,"ngIf"],["role","treeitem",3,"keydown","ngStyle"],[3,"click","contextmenu","dblclick","touchend","drop","dragover","dragenter","dragleave","dragstart","dragend","draggable"],["type","button","pRipple","","tabindex","-1",3,"click"],[4,"ngIf"],[3,"class",4,"ngIf"],[3,"ngModel","styleClass","binary","indeterminate","disabled","variant","tabindex","click",4,"ngIf"],["role","group",3,"class",4,"ngIf"],[3,"drop","dragover","dragenter","dragleave"],["data-p-icon","chevron-right",3,"class",4,"ngIf"],["data-p-icon","chevron-down",3,"class",4,"ngIf"],["data-p-icon","chevron-right"],["data-p-icon","chevron-down"],["data-p-icon","spinner","spin",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"click","ngModel","styleClass","binary","indeterminate","disabled","variant","tabindex"],["role","group"],[3,"node","parentNode","firstChild","lastChild","index","itemSize","level","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","parentNode","firstChild","lastChild","index","itemSize","level","loadingMode"]],template:function(i,o){i&1&&qe(0,Rwt,13,35),i&2&&Ke(o.node?0:-1)},dependencies:[t,On,Gc,Fr,Lo,vs,Ul,dg,hr,no,Lr,Gw,sm,og,In],encapsulation:2})}return t})(),c_=(()=>{class t extends oo{dragDropService;value;selectionMode;loadingMode="mask";selection;styleClass;contextMenu;draggableScope;droppableScope;draggableNodes;droppableNodes;metaKeySelection=!1;propagateSelectionUp=!0;propagateSelectionDown=!0;loading;loadingIcon;emptyMessage="";ariaLabel;togglerAriaLabel;ariaLabelledBy;validateDrop;filter;filterInputAutoFocus=!1;filterBy="label";filterMode="lenient";filterOptions;filterPlaceholder;filteredNodes;filterLocale;scrollHeight;lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;indentation=1.5;_templateMap;trackBy=(e,i)=>i;highlightOnSelect=!1;selectionChange=new ve;onNodeSelect=new ve;onNodeUnselect=new ve;onNodeExpand=new ve;onNodeCollapse=new ve;onNodeContextMenuSelect=new ve;onNodeDoubleClick=new ve;onNodeDrop=new ve;onLazyLoad=new ve;onScroll=new ve;onScrollIndexChange=new ve;onFilter=new ve;filterTemplate;nodeTemplate;headerTemplate;footerTemplate;loaderTemplate;emptyMessageTemplate;togglerIconTemplate;checkboxIconTemplate;loadingIconTemplate;filterIconTemplate;filterViewChild;scroller;wrapperViewChild;contentViewChild;templates;_headerTemplate;_emptyMessageTemplate;_footerTemplate;_loaderTemplate;_togglerIconTemplate;_checkboxIconTemplate;_loadingIconTemplate;_filterIconTemplate;_filterTemplate;ngAfterContentInit(){this.templates.length&&(this._templateMap={}),this.templates.forEach(e=>{switch(e.getType()){case"header":this._headerTemplate=e.template;break;case"empty":this._emptyMessageTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"togglericon":this._togglerIconTemplate=e.template;break;case"checkboxicon":this._checkboxIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"filter":this._filterTemplate=e.template;break;default:this._templateMap[e.name]=e.template;break}})}serializedValue;nodeTouched;dragNodeTree;dragNode;dragNodeSubNodes;dragNodeIndex;dragNodeScope;dragHover;dragStartSubscription;dragStopSubscription;_componentStyle=re(BY);handleDropEvent(e){this.onDrop(e)}handleDragOverEvent(e){this.onDragOver(e)}handleDragEnterEvent(){this.onDragEnter()}handleDragLeaveEvent(e){this.onDragLeave(e)}constructor(e){super(),this.dragDropService=e}ngOnInit(){super.ngOnInit(),this.filterBy&&(this.filterOptions={filter:e=>this._filter(e),reset:()=>this.resetFilter()}),this.droppableNodes&&(this.dragStartSubscription=this.dragDropService.dragStart$.subscribe(e=>{this.dragNodeTree=e.tree,this.dragNode=e.node,this.dragNodeSubNodes=e.subNodes,this.dragNodeIndex=e.index,this.dragNodeScope=e.scope}),this.dragStopSubscription=this.dragDropService.dragStop$.subscribe(e=>{this.dragNodeTree=null,this.dragNode=null,this.dragNodeSubNodes=null,this.dragNodeIndex=null,this.dragNodeScope=null,this.dragHover=!1}))}ngOnChanges(e){super.ngOnChanges(e),e.value&&(this.updateSerializedValue(),this.hasFilterActive()&&this._filter(this.filterViewChild.nativeElement.value))}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(el.EMPTY_MESSAGE)}updateSerializedValue(){this.serializedValue=[],this.serializeNodes(null,this.getRootNode(),0,!0)}serializeNodes(e,i,o,r){if(i&&i.length)for(let s of i){s.parent=e;let d={node:s,parent:e,level:o,visible:r&&(e?e.expanded:!0)};this.serializedValue.push(d),d.visible&&s.expanded&&this.serializeNodes(s,s.children,o+1,d.visible)}}onNodeClick(e,i){let o=e.target;if(!(Fc(o,"p-tree-toggler")||Fc(o,"p-tree-toggler-icon"))){if(this.selectionMode){if(i.selectable===!1){i.style="--p-focus-ring-color: none;";return}else i.style?.includes("--p-focus-ring-color")||(i.style=i.style?`${i.style}--p-focus-ring-color: var(--primary-color)`:"--p-focus-ring-color: var(--primary-color)");if(this.hasFilteredNodes()&&(i=this.getNodeWithKey(i.key,this.filteredNodes),!i))return;let r=this.findIndexInSelection(i),s=r>=0;if(this.isCheckboxSelectionMode())s?(this.propagateSelectionDown?this.propagateDown(i,!1):this.selection=this.selection.filter((d,m)=>m!=r),this.propagateSelectionUp&&i.parent&&this.propagateUp(i.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:i})):(this.propagateSelectionDown?this.propagateDown(i,!0):this.selection=[...this.selection||[],i],this.propagateSelectionUp&&i.parent&&this.propagateUp(i.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:i}));else if(this.nodeTouched?!1:this.metaKeySelection){let m=e.metaKey||e.ctrlKey;s&&m?(this.isSingleSelectionMode()?this.selectionChange.emit(null):(this.selection=this.selection.filter((v,w)=>w!=r),this.selectionChange.emit(this.selection)),this.onNodeUnselect.emit({originalEvent:e,node:i})):(this.isSingleSelectionMode()?this.selectionChange.emit(i):this.isMultipleSelectionMode()&&(this.selection=m?this.selection||[]:[],this.selection=[...this.selection,i],this.selectionChange.emit(this.selection)),this.onNodeSelect.emit({originalEvent:e,node:i}))}else this.isSingleSelectionMode()?s?(this.selection=null,this.onNodeUnselect.emit({originalEvent:e,node:i})):(this.selection=i,setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:i})})):s?(this.selection=this.selection.filter((m,v)=>v!=r),this.onNodeUnselect.emit({originalEvent:e,node:i})):(this.selection=[...this.selection||[],i],setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:i})})),this.selectionChange.emit(this.selection)}this.nodeTouched=!1}}onNodeTouchEnd(){this.nodeTouched=!0}onNodeRightClick(e,i){if(this.contextMenu){let o=e.target;if(o.className&&o.className.indexOf("p-tree-toggler")===0)return;this.findIndexInSelection(i)>=0||(this.isSingleSelectionMode()?this.selectionChange.emit(i):this.selectionChange.emit([i])),this.contextMenu.show(e),this.onNodeContextMenuSelect.emit({originalEvent:e,node:i})}}onNodeDblClick(e,i){this.onNodeDoubleClick.emit({originalEvent:e,node:i})}findIndexInSelection(e){let i=-1;if(this.selectionMode&&this.selection)if(this.isSingleSelectionMode())i=this.selection.key&&this.selection.key===e.key||this.selection==e?0:-1;else for(let o=0;o0}getNodeWithKey(e,i){for(let o of i){if(o.key===e)return o;if(o.children){let r=this.getNodeWithKey(e,o.children);if(r)return r}}}propagateUp(e,i){if(e.children&&e.children.length){let r=0,s=!1;for(let d of e.children)this.isSelected(d)?r++:d.partialSelected&&(s=!0);if(i&&r==e.children.length)this.selection=[...this.selection||[],e],e.partialSelected=!1;else{if(!i){let d=this.findIndexInSelection(e);d>=0&&(this.selection=this.selection.filter((m,v)=>v!=d))}s||r>0&&r!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}this.syncNodeOption(e,this.filteredNodes,"partialSelected")}let o=e.parent;o&&this.propagateUp(o,i)}propagateDown(e,i){let o=this.findIndexInSelection(e);if(i&&o==-1?this.selection=[...this.selection||[],e]:!i&&o>-1&&(this.selection=this.selection.filter((r,s)=>s!=o)),e.partialSelected=!1,this.syncNodeOption(e,this.filteredNodes,"partialSelected"),e.children&&e.children.length)for(let r of e.children)this.propagateDown(r,i)}isSelected(e){return this.findIndexInSelection(e)!=-1}isSingleSelectionMode(){return this.selectionMode&&this.selectionMode=="single"}isMultipleSelectionMode(){return this.selectionMode&&this.selectionMode=="multiple"}isCheckboxSelectionMode(){return this.selectionMode&&this.selectionMode=="checkbox"}isNodeLeaf(e){return e.leaf==!1?!1:!(e.children&&e.children.length)}getRootNode(){return this.filteredNodes?this.filteredNodes:this.value}getTemplateForNode(e){return this._templateMap?e.type?this._templateMap[e.type]:this._templateMap.default:null}onDragOver(e){this.droppableNodes&&(!this.value||this.value.length===0)&&(e.dataTransfer.dropEffect="move",e.preventDefault())}onDrop(e){if(this.droppableNodes&&(!this.value||this.value.length===0)){e.preventDefault();let i=this.dragNode;if(this.allowDrop(i,null,this.dragNodeScope)){let o=this.dragNodeIndex;this.value=this.value||[],this.validateDrop?this.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:null,index:o,accept:()=>{this.processTreeDrop(i,o)}}):(this.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:null,index:o}),this.processTreeDrop(i,o))}}}processTreeDrop(e,i){this.dragNodeSubNodes.splice(i,1),this.value.push(e),this.dragDropService.stopDrag({node:e})}onDragEnter(){this.droppableNodes&&this.allowDrop(this.dragNode,null,this.dragNodeScope)&&(this.dragHover=!0)}onDragLeave(e){if(this.droppableNodes){let i=e.currentTarget.getBoundingClientRect();(e.x>i.left+i.width||e.xi.top+i.height||e.y-1&&(d=!0);return(!d||s&&!this.isNodeLeaf(e))&&(d=this.findFilteredNodes(e,{searchFields:o,filterText:r,isStrictMode:s})||d),d}getIndex(e,i){let o=e.getItemOptions;return o?o(i).index:i}getBlockableElement(){return this.el.nativeElement.children[0]}ngOnDestroy(){this.dragStartSubscription&&this.dragStartSubscription.unsubscribe(),this.dragStopSubscription&&this.dragStopSubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(_e(FAe,8))};static \u0275cmp=ne({type:t,selectors:[["p-tree"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,xPe,4),xt(r,Fwt,4),xt(r,Pwt,4),xt(r,Lwt,4),xt(r,Nwt,4),xt(r,Bwt,4),xt(r,Vwt,4),xt(r,zwt,4),xt(r,Uwt,4),xt(r,Hwt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.filterTemplate=s.first),Le(s=Ne())&&(o.nodeTemplate=s.first),Le(s=Ne())&&(o.headerTemplate=s.first),Le(s=Ne())&&(o.footerTemplate=s.first),Le(s=Ne())&&(o.loaderTemplate=s.first),Le(s=Ne())&&(o.emptyMessageTemplate=s.first),Le(s=Ne())&&(o.togglerIconTemplate=s.first),Le(s=Ne())&&(o.checkboxIconTemplate=s.first),Le(s=Ne())&&(o.loadingIconTemplate=s.first),Le(s=Ne())&&(o.filterIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(xPe,5),Ri(jwt,5),Ri(Gwt,5),Ri($wt,5)),i&2){let r;Le(r=Ne())&&(o.filterViewChild=r.first),Le(r=Ne())&&(o.scroller=r.first),Le(r=Ne())&&(o.wrapperViewChild=r.first),Le(r=Ne())&&(o.contentViewChild=r.first)}},hostVars:2,hostBindings:function(i,o){i&1&&ie("drop",function(s){return o.handleDropEvent(s)})("dragover",function(s){return o.handleDragOverEvent(s)})("dragenter",function(){return o.handleDragEnterEvent()})("dragleave",function(s){return o.handleDragLeaveEvent(s)}),i&2&&Oe(o.cn(o.cx("root"),o.styleClass))},inputs:{value:"value",selectionMode:"selectionMode",loadingMode:"loadingMode",selection:"selection",styleClass:"styleClass",contextMenu:"contextMenu",draggableScope:"draggableScope",droppableScope:"droppableScope",draggableNodes:[2,"draggableNodes","draggableNodes",je],droppableNodes:[2,"droppableNodes","droppableNodes",je],metaKeySelection:[2,"metaKeySelection","metaKeySelection",je],propagateSelectionUp:[2,"propagateSelectionUp","propagateSelectionUp",je],propagateSelectionDown:[2,"propagateSelectionDown","propagateSelectionDown",je],loading:[2,"loading","loading",je],loadingIcon:"loadingIcon",emptyMessage:"emptyMessage",ariaLabel:"ariaLabel",togglerAriaLabel:"togglerAriaLabel",ariaLabelledBy:"ariaLabelledBy",validateDrop:[2,"validateDrop","validateDrop",je],filter:[2,"filter","filter",je],filterInputAutoFocus:[2,"filterInputAutoFocus","filterInputAutoFocus",je],filterBy:"filterBy",filterMode:"filterMode",filterOptions:"filterOptions",filterPlaceholder:"filterPlaceholder",filteredNodes:"filteredNodes",filterLocale:"filterLocale",scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",je],virtualScroll:[2,"virtualScroll","virtualScroll",je],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",ln],virtualScrollOptions:"virtualScrollOptions",indentation:[2,"indentation","indentation",ln],_templateMap:"_templateMap",trackBy:"trackBy",highlightOnSelect:[2,"highlightOnSelect","highlightOnSelect",je]},outputs:{selectionChange:"selectionChange",onNodeSelect:"onNodeSelect",onNodeUnselect:"onNodeUnselect",onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onNodeContextMenuSelect:"onNodeContextMenuSelect",onNodeDoubleClick:"onNodeDoubleClick",onNodeDrop:"onNodeDrop",onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange",onFilter:"onFilter"},features:[jt([BY]),ft,Ot],decls:7,vars:6,consts:[["filter",""],["scroller",""],["content",""],["treeNode",""],["loader",""],["wrapper",""],["emptyFilter",""],[3,"class",4,"ngIf"],[4,"ngTemplateOutlet"],[3,"class"],[4,"ngIf"],["data-p-icon","spinner","spin","",3,"class",4,"ngIf"],["data-p-icon","spinner","spin",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pInputText","","type","search","autocomplete","off",3,"keydown.enter","input","pAutoFocus"],["data-p-icon","search",3,"class",4,"ngIf"],["data-p-icon","search"],[3,"items","tabindex","styleClass","style","scrollHeight","itemSize","lazy","options","onScroll","onScrollIndexChange","onLazyLoad",4,"ngIf"],[3,"onScroll","onScrollIndexChange","onLazyLoad","items","tabindex","styleClass","scrollHeight","itemSize","lazy","options"],["role","tree",3,"class","ngClass","style",4,"ngIf"],["role","tree",3,"ngClass"],[3,"level","rowNode","node","parentNode","firstChild","lastChild","index","itemSize","indentation","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"level","rowNode","node","parentNode","firstChild","lastChild","index","itemSize","indentation","loadingMode"],["role","tree",3,"class",4,"ngIf"],["role","tree"],[3,"node","firstChild","lastChild","index","level","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","firstChild","lastChild","index","level","loadingMode"],[4,"ngIf","ngIfElse"]],template:function(i,o){if(i&1&&(ee(0,Jwt,3,4,"div",7)(1,eSt,1,0,"ng-container",8),qe(2,iSt,1,4,"ng-container")(3,lSt,1,1,"p-iconfield",9),ee(4,vSt,3,2,"ng-container",10)(5,wSt,3,5,"div",7)(6,SSt,1,0,"ng-container",8)),i&2){let r;E("ngIf",o.loading&&o.loadingMode==="mask"),T(),E("ngTemplateOutlet",o.headerTemplate||o._headerTemplate),T(),Ke(o.filterTemplate||o._filterTemplate?2:3),T(2),E("ngIf",(r=o.getRootNode())==null?null:r.length),T(),E("ngIf",!o.loading&&(o.getRootNode()==null||o.getRootNode().length===0)),T(),E("ngTemplateOutlet",o.footerTemplate||o._footerTemplate)}},dependencies:[On,Ns,Gc,Fr,Lo,Ym,In,JI,og,fu,hr,ax,lx,ISt,YAe,fp],encapsulation:2})}return t})(),Cy=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[c_,In,In]})}return t})();function ESt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=n.$implicit;T(),dt(e.label)}}var VY=(()=>{class t{constructor(e,i,o){this.dialogRef=e,this.config=i,this._cdr=o,this.loading=!1,this.loading$=new pi(1),this.nodes=[],this.treeSelection=[],this._selection=new Set,this._possible={},this.loading$.subscribe(s=>this.loading=s===Gt.LOADING),this.loading$.next(Gt.LOADING),this.treeSelection=[];let r=qw.map(s=>s.id);this.config.data.stateOptions$(r).subscribe(s=>{this._possible=s,i.data.selection&&i.data.selection.length>0&&nr(i.data.selection.slice()).pipe(Vo(d=>this._selection.add(d)),Yl(d=>this.config.data.displayName$(d).pipe(vt(m=>this._createItemNode(d,m))))).subscribe(d=>this._selectNode(d.data,d.label)),this.nodes=qw.filter(d=>this._possible[d.id].length>1).map(d=>({data:d.id,key:`state_${d.id}`,label:d.name,type:"state",selectable:!0,leaf:!1,partialSelected:this._partialSelected(d)})),this._cdr.markForCheck(),this.loading$.next(Gt.SUCCESS)})}onSubmit(){this.dialogRef.close({selection:Array.from(this._selection)})}onNodeSelect(e){switch(this.loading$.next(Gt.LOADING),e.node.type){case"state":{this.treeSelection.push(e.node);let i=e.node.data;nr(this._possible[i]).pipe(Yl(o=>this.config.data.displayName$(o).pipe(vt(r=>this._createItemNode(o,r))))).subscribe(o=>{this._selectNode(o.data,o.label),this.loading$.next(Gt.SUCCESS),this._cdr.markForCheck()});break}case"item":{let i=e.node.data;this._selectNode(i,e.node.label),this.loading$.next(Gt.SUCCESS),this._cdr.markForCheck();break}}}onNodeUnselect(e){switch(this.loading$.next(Gt.LOADING),e.node.type){case"state":{this.treeSelection=[...this.treeSelection.filter(o=>o.key!==e.node.key)];let i=e.node.data;this._possible[i].forEach(o=>this._deselectNode(o)),this.loading$.next(Gt.SUCCESS);break}case"item":{let i=e.node.data;this._deselectNode(i),this._cdr.markForCheck(),this.loading$.next(Gt.SUCCESS);break}}}onNodeExpand(e){if(e.node.type,e.node.type==="state"){let i=e.node.data,o=this._possible[i];o&&o.length>0&&(this.loading$.next(Gt.LOADING),e.node.children=[],nr(this._possible[i]).pipe(Yl(r=>this.config.data.displayName$(r).pipe(vt(s=>this._createItemNode(r,s))))).subscribe(r=>{e.node.children.push(r),e.node.children.sort((s,d)=>s.data-d.data),this.loading$.next(Gt.SUCCESS),this._cdr.markForCheck()}))}}_selectNode(e,i){this._selection.add(e),this.treeSelection=[...this.treeSelection.filter(o=>!(o.type==="item"&&o.data===e)),this._createItemNode(e,i)]}_deselectNode(e){this._selection.delete(e),this.treeSelection=this.treeSelection.filter(i=>!(i.type==="item"&&i.data===e))}_createItemNode(e,i){return{data:e,key:`item_${e}`,type:"item",selectable:!0,label:i}}_partialSelected(e){return this._possible[e.id].some(i=>this._selection.has(i))}static{this.\u0275fac=function(i){return new(i||t)(_e(es),_e(Us),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:10,vars:5,consts:[[1,"flex","flex-col"],["selectionMode","checkbox",3,"onNodeSelect","onNodeUnselect","onNodeExpand","value","loading","selection","propagateSelectionDown","propagateSelectionUp"],["pTemplate","default"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-raised-button","","color","accent",3,"click"]],template:function(i,o){i&1&&(k(0,"div")(1,"div",0)(2,"div")(3,"p-tree",1),ie("onNodeSelect",function(s){return o.onNodeSelect(s)})("onNodeUnselect",function(s){return o.onNodeUnselect(s)})("onNodeExpand",function(s){return o.onNodeExpand(s)}),ee(4,ESt,2,1,"ng-template",2),D()()()(),k(5,"div",3)(6,"button",4),ie("click",function(){return o.dialogRef.close()}),Q(7,"Abbrechen"),D(),k(8,"button",5),ie("click",function(){return o.onSubmit()}),Q(9," \xDCbernehmen "),D()()),i&2&&(T(3),E("value",o.nodes)("loading",o.loading)("selection",o.treeSelection)("propagateSelectionDown",!0)("propagateSelectionUp",!1))},dependencies:[Cy,c_,so,In,Tn,yo],encapsulation:2,changeDetection:0})}}return t})();var VL=class extends dr{constructor(){super(),this.valid=!0,this.searching=!0,this.selectCtrl=new yr(this.emptySelection()),this.allOptions=new pi(1),this._onDestroy=new hi}init(n){this.placeholderLabel=`${n.selectLabel} suchen`,this.noEntriesFoundLabel=`Keine ${n.selectLabel} gefunden`,this.selectedItemsLabel=`{0} ${n.selectLabel} ausgew\xE4hlt`,this.selectCtrl.valueChanges.pipe(cs(this._onDestroy),vt(e=>e||this.emptySelection())).subscribe(e=>this.onSelectionChange(e)),n.valid$&&n.valid$.pipe(cs(this._onDestroy)).subscribe(e=>{this.valid=e.isValid,this.errorMessage=e.isValid?null:e.errorMessage??""})}setSelection(n,e){this.selectCtrl.setValue(n,e)}};var IPe=` .p-multiselect { display: inline-flex; cursor: pointer; position: relative; user-select: none; background: dt('multiselect.background'); border: 1px solid dt('multiselect.border.color'); transition: background dt('multiselect.transition.duration'), color dt('multiselect.transition.duration'), border-color dt('multiselect.transition.duration'), outline-color dt('multiselect.transition.duration'), box-shadow dt('multiselect.transition.duration'); border-radius: dt('multiselect.border.radius'); outline-color: transparent; box-shadow: dt('multiselect.shadow'); } .p-multiselect:not(.p-disabled):hover { border-color: dt('multiselect.hover.border.color'); } .p-multiselect:not(.p-disabled).p-focus { border-color: dt('multiselect.focus.border.color'); box-shadow: dt('multiselect.focus.ring.shadow'); outline: dt('multiselect.focus.ring.width') dt('multiselect.focus.ring.style') dt('multiselect.focus.ring.color'); outline-offset: dt('multiselect.focus.ring.offset'); } .p-multiselect.p-variant-filled { background: dt('multiselect.filled.background'); } .p-multiselect.p-variant-filled:not(.p-disabled):hover { background: dt('multiselect.filled.hover.background'); } .p-multiselect.p-variant-filled.p-focus { background: dt('multiselect.filled.focus.background'); } .p-multiselect.p-invalid { border-color: dt('multiselect.invalid.border.color'); } .p-multiselect.p-disabled { opacity: 1; background: dt('multiselect.disabled.background'); } .p-multiselect-dropdown { display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: transparent; color: dt('multiselect.dropdown.color'); width: dt('multiselect.dropdown.width'); border-start-end-radius: dt('multiselect.border.radius'); border-end-end-radius: dt('multiselect.border.radius'); } .p-multiselect-clear-icon { position: absolute; top: 50%; margin-top: -0.5rem; color: dt('multiselect.clear.icon.color'); inset-inline-end: dt('multiselect.dropdown.width'); } .p-multiselect-label-container { overflow: hidden; flex: 1 1 auto; cursor: pointer; } .p-multiselect-label { white-space: nowrap; cursor: pointer; overflow: hidden; text-overflow: ellipsis; padding: dt('multiselect.padding.y') dt('multiselect.padding.x'); color: dt('multiselect.color'); } .p-multiselect-display-chip .p-multiselect-label { display: flex; align-items: center; gap: calc(dt('multiselect.padding.y') / 2); } .p-multiselect-label.p-placeholder { color: dt('multiselect.placeholder.color'); } .p-multiselect.p-invalid .p-multiselect-label.p-placeholder { color: dt('multiselect.invalid.placeholder.color'); } .p-multiselect.p-disabled .p-multiselect-label { color: dt('multiselect.disabled.color'); } .p-multiselect-label-empty { overflow: hidden; visibility: hidden; } .p-multiselect-overlay { position: absolute; top: 0; left: 0; background: dt('multiselect.overlay.background'); color: dt('multiselect.overlay.color'); border: 1px solid dt('multiselect.overlay.border.color'); border-radius: dt('multiselect.overlay.border.radius'); box-shadow: dt('multiselect.overlay.shadow'); min-width: 100%; } .p-multiselect-header { display: flex; align-items: center; padding: dt('multiselect.list.header.padding'); } .p-multiselect-header .p-checkbox { margin-inline-end: dt('multiselect.option.gap'); } .p-multiselect-filter-container { flex: 1 1 auto; } .p-multiselect-filter { width: 100%; } .p-multiselect-list-container { overflow: auto; } .p-multiselect-list { margin: 0; padding: 0; list-style-type: none; padding: dt('multiselect.list.padding'); display: flex; flex-direction: column; gap: dt('multiselect.list.gap'); } .p-multiselect-option { cursor: pointer; font-weight: normal; white-space: nowrap; position: relative; overflow: hidden; display: flex; align-items: center; gap: dt('multiselect.option.gap'); padding: dt('multiselect.option.padding'); border: 0 none; color: dt('multiselect.option.color'); background: transparent; transition: background dt('multiselect.transition.duration'), color dt('multiselect.transition.duration'), border-color dt('multiselect.transition.duration'), box-shadow dt('multiselect.transition.duration'), outline-color dt('multiselect.transition.duration'); border-radius: dt('multiselect.option.border.radius'); } .p-multiselect-option:not(.p-multiselect-option-selected):not(.p-disabled).p-focus { background: dt('multiselect.option.focus.background'); color: dt('multiselect.option.focus.color'); } .p-multiselect-option.p-multiselect-option-selected { background: dt('multiselect.option.selected.background'); color: dt('multiselect.option.selected.color'); } .p-multiselect-option.p-multiselect-option-selected.p-focus { background: dt('multiselect.option.selected.focus.background'); color: dt('multiselect.option.selected.focus.color'); } .p-multiselect-option-group { cursor: auto; margin: 0; padding: dt('multiselect.option.group.padding'); background: dt('multiselect.option.group.background'); color: dt('multiselect.option.group.color'); font-weight: dt('multiselect.option.group.font.weight'); } .p-multiselect-empty-message { padding: dt('multiselect.empty.message.padding'); } .p-multiselect-label .p-chip { padding-block-start: calc(dt('multiselect.padding.y') / 2); padding-block-end: calc(dt('multiselect.padding.y') / 2); border-radius: dt('multiselect.chip.border.radius'); } .p-multiselect-label:has(.p-chip) { padding: calc(dt('multiselect.padding.y') / 2) calc(dt('multiselect.padding.x') / 2); } .p-multiselect-fluid { display: flex; width: 100%; } .p-multiselect-sm .p-multiselect-label { font-size: dt('multiselect.sm.font.size'); padding-block: dt('multiselect.sm.padding.y'); padding-inline: dt('multiselect.sm.padding.x'); } .p-multiselect-sm .p-multiselect-dropdown .p-icon { font-size: dt('multiselect.sm.font.size'); width: dt('multiselect.sm.font.size'); height: dt('multiselect.sm.font.size'); } .p-multiselect-lg .p-multiselect-label { font-size: dt('multiselect.lg.font.size'); padding-block: dt('multiselect.lg.padding.y'); padding-inline: dt('multiselect.lg.padding.x'); } .p-multiselect-lg .p-multiselect-dropdown .p-icon { font-size: dt('multiselect.lg.font.size'); width: dt('multiselect.lg.font.size'); height: dt('multiselect.lg.font.size'); } `;var u6=t=>({height:t}),EPe=t=>({$implicit:t}),DSt=(t,n)=>({checked:t,class:n});function ASt(t,n){}function kSt(t,n){t&1&&ee(0,ASt,0,0,"ng-template")}function MSt(t,n){if(t&1&&ee(0,kSt,1,0,null,4),t&2){let e=n.class,i=P(2);E("ngTemplateOutlet",i.itemCheckboxIconTemplate)("ngTemplateOutletContext",Eo(2,DSt,i.selected,e))}}function OSt(t,n){t&1&&(Di(0),ee(1,MSt,1,5,"ng-template",null,0,Pt),Ai())}function RSt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P();T(),dt(e.label??"empty")}}function FSt(t,n){t&1&&ui(0)}var PSt=["item"],LSt=["group"],NSt=["loader"],BSt=["header"],VSt=["filter"],zSt=["footer"],USt=["emptyfilter"],HSt=["empty"],jSt=["selecteditems"],GSt=["loadingicon"],$St=["filtericon"],qSt=["removetokenicon"],KSt=["chipicon"],WSt=["clearicon"],YSt=["dropdownicon"],QSt=["itemcheckboxicon"],ZSt=["headercheckboxicon"],XSt=["overlay"],JSt=["filterInput"],eTt=["focusInput"],tTt=["items"],iTt=["scroller"],nTt=["lastHiddenFocusableEl"],oTt=["firstHiddenFocusableEl"],rTt=["headerCheckbox"],sTt=[[["p-header"]],[["p-footer"]]],aTt=["p-header","p-footer"],lTt=()=>({class:"p-multiselect-chip-icon"}),cTt=(t,n)=>({$implicit:t,removeChip:n}),DPe=t=>({options:t}),dTt=(t,n,e)=>({checked:t,partialSelected:n,class:e}),APe=(t,n)=>({$implicit:t,options:n}),uTt=()=>({});function pTt(t,n){if(t&1&&(Di(0),Q(1),Ai()),t&2){let e=P(2);T(),dt(e.label()||"empty")}}function hTt(t,n){if(t&1&&Q(0),t&2){let e=P(3);Qi(" ",e.getSelectedItemsLabel()," ")}}function mTt(t,n){t&1&&ui(0)}function fTt(t,n){if(t&1){let e=tt();k(0,"span",26),ie("click",function(o){se(e);let r=P(4).$implicit,s=P(4);return ae(s.removeOption(r,o))}),ee(1,mTt,1,0,"ng-container",27),D()}if(t&2){let e=P(8);Oe(e.cx("chipIcon")),Ge("data-pc-section","clearicon")("aria-hidden",!0),T(),E("ngTemplateOutlet",e.chipIconTemplate||e._chipIconTemplate||e.removeTokenIconTemplate||e._removeTokenIconTemplate)("ngTemplateOutletContext",uo(6,lTt))}}function gTt(t,n){if(t&1&&(Di(0),ee(1,fTt,2,7,"span",25),Ai()),t&2){let e=P(7);T(),E("ngIf",e.chipIconTemplate||e._chipIconTemplate||e.removeTokenIconTemplate||e._removeTokenIconTemplate)}}function _Tt(t,n){if(t&1&&ee(0,gTt,2,1,"ng-container",19),t&2){let e=P(6);E("ngIf",!e.$disabled()&&!e.readonly)}}function yTt(t,n){t&1&&(Di(0),ee(1,_Tt,1,1,"ng-template",null,5,Pt),Ai())}function vTt(t,n){if(t&1){let e=tt();k(0,"div",null,4)(2,"p-chip",24),ie("onRemove",function(o){let r=se(e).$implicit,s=P(4);return ae(s.removeOption(r,o))}),ee(3,yTt,3,0,"ng-container",19),D()()}if(t&2){let e=n.$implicit,i=P(4);Oe(i.cx("chipItem")),T(2),Oe(i.cx("pcChip")),E("label",i.getLabelByValue(e))("removable",!i.$disabled()&&!i.readonly)("removeIcon",i.chipIcon),T(),E("ngIf",i.chipIconTemplate||i._chipIconTemplate||i.removeTokenIconTemplate||i._removeTokenIconTemplate)}}function bTt(t,n){if(t&1&&ee(0,vTt,4,8,"div",23),t&2){let e=P(3);E("ngForOf",e.chipSelectedItems())}}function CTt(t,n){if(t&1&&(Di(0),Q(1),Ai()),t&2){let e=P(3);T(),dt(e.placeholder()||"empty")}}function xTt(t,n){if(t&1&&(Di(0),qe(1,hTt,1,1)(2,bTt,1,1,"div",22),ee(3,CTt,2,1,"ng-container",19),Ai()),t&2){let e=P(2);T(),Ke(e.chipSelectedItems()&&e.chipSelectedItems().length===e.maxSelectedLabels?1:2),T(2),E("ngIf",!e.modelValue()||e.modelValue().length===0)}}function wTt(t,n){if(t&1&&(Di(0),ee(1,pTt,2,1,"ng-container",19)(2,xTt,4,2,"ng-container",19),Ai()),t&2){let e=P();T(),E("ngIf",e.display==="comma"),T(),E("ngIf",e.display==="chip")}}function STt(t,n){t&1&&ui(0)}function TTt(t,n){if(t&1&&(Di(0),Q(1),Ai()),t&2){let e=P(2);T(),dt(e.placeholder()||"empty")}}function ITt(t,n){if(t&1&&(Di(0),ee(1,STt,1,0,"ng-container",27)(2,TTt,2,1,"ng-container",19),Ai()),t&2){let e=P();T(),E("ngTemplateOutlet",e.selectedItemsTemplate||e._selectedItemsTemplate)("ngTemplateOutletContext",Eo(3,cTt,e.selectedOptions,e.removeOption.bind(e))),T(),E("ngIf",!e.modelValue()||e.modelValue().length===0)}}function ETt(t,n){if(t&1){let e=tt();si(),k(0,"svg",29),ie("click",function(o){se(e);let r=P(2);return ae(r.clear(o))}),D()}if(t&2){let e=P(2);Oe(e.cx("clearIcon")),Ge("data-pc-section","clearicon")("aria-hidden",!0)}}function DTt(t,n){}function ATt(t,n){t&1&&ee(0,DTt,0,0,"ng-template")}function kTt(t,n){if(t&1){let e=tt();k(0,"span",26),ie("click",function(o){se(e);let r=P(2);return ae(r.clear(o))}),ee(1,ATt,1,0,null,30),D()}if(t&2){let e=P(2);Oe(e.cx("clearIcon")),Ge("data-pc-section","clearicon")("aria-hidden",!0),T(),E("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function MTt(t,n){if(t&1&&(Di(0),ee(1,ETt,1,4,"svg",28)(2,kTt,2,5,"span",25),Ai()),t&2){let e=P();T(),E("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),T(),E("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function OTt(t,n){t&1&&ui(0)}function RTt(t,n){if(t&1&&(Di(0),ee(1,OTt,1,0,"ng-container",30),Ai()),t&2){let e=P(2);T(),E("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function FTt(t,n){if(t&1&&ce(0,"span"),t&2){let e=P(3);Oe(e.cn(e.cx("loadingIcon"),"pi-spin "+e.loadingIcon)),Ge("aria-hidden",!0)}}function PTt(t,n){if(t&1&&ce(0,"span"),t&2){let e=P(3);Oe(e.cn(e.cx("loadingIcon"),"pi pi-spinner pi-spin")),Ge("aria-hidden",!0)}}function LTt(t,n){if(t&1&&(Di(0),ee(1,FTt,1,3,"span",31)(2,PTt,1,3,"span",31),Ai()),t&2){let e=P(2);T(),E("ngIf",e.loadingIcon),T(),E("ngIf",!e.loadingIcon)}}function NTt(t,n){if(t&1&&(Di(0),ee(1,RTt,2,1,"ng-container",19)(2,LTt,3,2,"ng-container",19),Ai()),t&2){let e=P();T(),E("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),T(),E("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function BTt(t,n){if(t&1&&ce(0,"span",34),t&2){let e=P(3);Oe(e.cx("dropdownIcon")),E("ngClass",e.dropdownIcon),Ge("data-pc-section","triggericon")("aria-hidden",!0)}}function VTt(t,n){if(t&1&&(si(),ce(0,"svg",35)),t&2){let e=P(3);Oe(e.cx("dropdownIcon")),Ge("data-pc-section","triggericon")("aria-hidden",!0)}}function zTt(t,n){if(t&1&&(Di(0),ee(1,BTt,1,5,"span",32)(2,VTt,1,4,"svg",33),Ai()),t&2){let e=P(2);T(),E("ngIf",e.dropdownIcon),T(),E("ngIf",!e.dropdownIcon)}}function UTt(t,n){}function HTt(t,n){t&1&&ee(0,UTt,0,0,"ng-template")}function jTt(t,n){if(t&1&&(k(0,"span"),ee(1,HTt,1,0,null,30),D()),t&2){let e=P(2);Oe(e.cx("dropdownIcon")),Ge("data-pc-section","triggericon")("aria-hidden",!0),T(),E("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function GTt(t,n){if(t&1&&ee(0,zTt,3,2,"ng-container",19)(1,jTt,2,5,"span",31),t&2){let e=P();E("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),T(),E("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function $Tt(t,n){t&1&&ui(0)}function qTt(t,n){t&1&&ui(0)}function KTt(t,n){if(t&1&&(Di(0),ee(1,qTt,1,0,"ng-container",27),Ai()),t&2){let e=P(3);T(),E("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",ki(2,DPe,e.filterOptions))}}function WTt(t,n){if(t&1&&(si(),ce(0,"svg",42)),t&2){let e=P().class;Oe(e),Ge("data-pc-section","icon")}}function YTt(t,n){}function QTt(t,n){t&1&&ee(0,YTt,0,0,"ng-template")}function ZTt(t,n){if(t&1&&ee(0,WTt,1,3,"svg",41)(1,QTt,1,0,null,27),t&2){let e=n.class,i=P(5);E("ngIf",!i.headerCheckboxIconTemplate&&!i._headerCheckboxIconTemplate&&i.allSelected()),T(),E("ngTemplateOutlet",i.headerCheckboxIconTemplate||i._headerCheckboxIconTemplate)("ngTemplateOutletContext",$d(3,dTt,i.allSelected(),i.partialSelected(),e))}}function XTt(t,n){if(t&1){let e=tt();k(0,"p-checkbox",40,10),ie("onChange",function(o){se(e);let r=P(4);return ae(r.onToggleAll(o))}),ee(2,ZTt,2,7,"ng-template",null,11,Pt),D()}if(t&2){let e=P(4);E("ngModel",e.allSelected()),Cc("ariaLabel",e.toggleAllAriaLabel),E("binary",!0)("variant",e.$variant())("disabled",e.$disabled())}}function JTt(t,n){t&1&&(si(),ce(0,"svg",46))}function eIt(t,n){}function tIt(t,n){t&1&&ee(0,eIt,0,0,"ng-template")}function iIt(t,n){if(t&1&&(k(0,"span",47),ee(1,tIt,1,0,null,30),D()),t&2){let e=P(5);T(),E("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function nIt(t,n){if(t&1){let e=tt();k(0,"p-iconfield")(1,"input",43,12),ie("input",function(o){se(e);let r=P(4);return ae(r.onFilterInputChange(o))})("keydown",function(o){se(e);let r=P(4);return ae(r.onFilterKeyDown(o))})("click",function(o){se(e);let r=P(4);return ae(r.onInputClick(o))})("blur",function(o){se(e);let r=P(4);return ae(r.onFilterBlur(o))}),D(),k(3,"p-inputicon"),ee(4,JTt,1,0,"svg",44)(5,iIt,2,1,"span",45),D()()}if(t&2){let e=P(4);Oe(e.cx("pcFilterContainer")),T(),Oe(e.cx("pcFilter")),E("variant",e.$variant())("value",e._filterValue()||""),Ge("autocomplete",e.autocomplete)("aria-owns",e.id+"_list")("aria-activedescendant",e.focusedOptionId)("disabled",e.$disabled()?"":void 0)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel),T(3),E("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),T(),E("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function oIt(t,n){if(t&1&&ee(0,XTt,4,5,"p-checkbox",39)(1,nIt,6,14,"p-iconfield",31),t&2){let e=P(3);E("ngIf",e.showToggleAll&&!e.selectionLimit),T(),E("ngIf",e.filter)}}function rIt(t,n){if(t&1&&(k(0,"div"),pn(1),ee(2,KTt,2,4,"ng-container",20)(3,oIt,2,2,"ng-template",null,9,Pt),D()),t&2){let e=ti(4),i=P(2);Oe(i.cx("header")),T(2),E("ngIf",i.filterTemplate||i._filterTemplate)("ngIfElse",e)}}function sIt(t,n){t&1&&ui(0)}function aIt(t,n){if(t&1&&ee(0,sIt,1,0,"ng-container",27),t&2){let e=n.$implicit,i=n.options;P(2);let o=ti(9);E("ngTemplateOutlet",o)("ngTemplateOutletContext",Eo(2,APe,e,i))}}function lIt(t,n){t&1&&ui(0)}function cIt(t,n){if(t&1&&ee(0,lIt,1,0,"ng-container",27),t&2){let e=n.options,i=P(4);E("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",ki(2,DPe,e))}}function dIt(t,n){t&1&&(Di(0),ee(1,cIt,1,4,"ng-template",null,14,Pt),Ai())}function uIt(t,n){if(t&1){let e=tt();k(0,"p-scroller",48,13),ie("onLazyLoad",function(o){se(e);let r=P(2);return ae(r.onLazyLoad.emit(o))}),ee(2,aIt,1,5,"ng-template",null,3,Pt)(4,dIt,3,0,"ng-container",19),D()}if(t&2){let e=P(2);$r(ki(9,u6,e.scrollHeight)),E("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("tabindex",-1)("lazy",e.lazy)("options",e.virtualScrollOptions),T(4),E("ngIf",e.loaderTemplate||e._loaderTemplate)}}function pIt(t,n){t&1&&ui(0)}function hIt(t,n){if(t&1&&(Di(0),ee(1,pIt,1,0,"ng-container",27),Ai()),t&2){P();let e=ti(9),i=P();T(),E("ngTemplateOutlet",e)("ngTemplateOutletContext",Eo(3,APe,i.visibleOptions(),uo(2,uTt)))}}function mIt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(2).$implicit,i=P(3);T(),dt(i.getOptionGroupLabel(e.optionGroup))}}function fIt(t,n){t&1&&ui(0)}function gIt(t,n){if(t&1&&(Di(0),k(1,"li",52),ee(2,mIt,2,1,"span",19)(3,fIt,1,0,"ng-container",27),D(),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P().options,s=P(2);T(),Oe(s.cx("optionGroup")),E("ngStyle",ki(7,u6,r.itemSize+"px")),Ge("id",s.id+"_"+s.getOptionIndex(o,r)),T(),E("ngIf",!s.groupTemplate),T(),E("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",ki(9,EPe,i.optionGroup))}}function _It(t,n){if(t&1){let e=tt();Di(0),k(1,"p-multiselect-item",53),ie("onClick",function(o){se(e);let r=P().index,s=P().options,d=P(2);return ae(d.onOptionSelect(o,!1,d.getOptionIndex(r,s)))})("onMouseEnter",function(o){se(e);let r=P().index,s=P().options,d=P(2);return ae(d.onOptionMouseEnter(o,d.getOptionIndex(r,s)))}),D(),Ai()}if(t&2){let e=P(),i=e.$implicit,o=e.index,r=P().options,s=P(2);T(),E("id",s.id+"_"+s.getOptionIndex(o,r))("option",i)("selected",s.isSelected(i))("label",s.getOptionLabel(i))("disabled",s.isOptionDisabled(i))("template",s.itemTemplate||s._itemTemplate)("itemCheckboxIconTemplate",s.itemCheckboxIconTemplate||s._itemCheckboxIconTemplate)("itemSize",r.itemSize)("focused",s.focusedOptionIndex()===s.getOptionIndex(o,r)),Cc("ariaPosInset",s.getAriaPosInset(s.getOptionIndex(o,r)))("ariaSetSize",s.ariaSetSize),E("variant",s.$variant())("highlightOnSelect",s.highlightOnSelect)}}function yIt(t,n){if(t&1&&ee(0,gIt,4,11,"ng-container",19)(1,_It,2,13,"ng-container",19),t&2){let e=n.$implicit,i=P(3);E("ngIf",i.isOptionGroup(e)),T(),E("ngIf",!i.isOptionGroup(e))}}function vIt(t,n){if(t&1&&Q(0),t&2){let e=P(4);Qi(" ",e.emptyFilterMessageLabel," ")}}function bIt(t,n){t&1&&ui(0)}function CIt(t,n){if(t&1&&ee(0,bIt,1,0,"ng-container",30),t&2){let e=P(4);E("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e.emptyTemplate||e._emptyFilterTemplate)}}function xIt(t,n){if(t&1&&(k(0,"li",52),qe(1,vIt,1,1)(2,CIt,1,1,"ng-container"),D()),t&2){let e=P().options,i=P(2);Oe(i.cx("emptyMessage")),E("ngStyle",ki(4,u6,e.itemSize+"px")),T(),Ke(!i.emptyFilterTemplate&&!i._emptyFilterTemplate&&!i.emptyTemplate&&!i._emptyTemplate?1:2)}}function wIt(t,n){if(t&1&&Q(0),t&2){let e=P(4);Qi(" ",e.emptyMessageLabel," ")}}function SIt(t,n){t&1&&ui(0)}function TIt(t,n){if(t&1&&ee(0,SIt,1,0,"ng-container",30),t&2){let e=P(4);E("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function IIt(t,n){if(t&1&&(k(0,"li",52),qe(1,wIt,1,1)(2,TIt,1,1,"ng-container"),D()),t&2){let e=P().options,i=P(2);Oe(i.cx("emptyMessage")),E("ngStyle",ki(4,u6,e.itemSize+"px")),T(),Ke(!i.emptyTemplate&&!i._emptyTemplate?1:2)}}function EIt(t,n){if(t&1&&(k(0,"ul",49,15),ee(2,yIt,2,2,"ng-template",50)(3,xIt,3,6,"li",51)(4,IIt,3,6,"li",51),D()),t&2){let e=n.$implicit,i=n.options,o=P(2);$r(i.contentStyle),Oe(o.cn(o.cx("list"),i.contentStyleClass)),Ge("aria-label",o.listLabel),T(2),E("ngForOf",e),T(),E("ngIf",o.hasFilter()&&o.isEmpty()),T(),E("ngIf",!o.hasFilter()&&o.isEmpty())}}function DIt(t,n){t&1&&ui(0)}function AIt(t,n){if(t&1&&(k(0,"div"),pn(1,1),ee(2,DIt,1,0,"ng-container",30),D()),t&2){let e=P(2);T(2),E("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function kIt(t,n){if(t&1){let e=tt();k(0,"div",36)(1,"span",37,6),ie("focus",function(o){se(e);let r=P();return ae(r.onFirstHiddenFocus(o))}),D(),ee(3,$Tt,1,0,"ng-container",30)(4,rIt,5,4,"div",31),k(5,"div"),ee(6,uIt,5,11,"p-scroller",38)(7,hIt,2,6,"ng-container",19)(8,EIt,5,8,"ng-template",null,7,Pt),D(),ee(10,AIt,3,1,"div",19),k(11,"span",37,8),ie("focus",function(o){se(e);let r=P();return ae(r.onLastHiddenFocus(o))}),D()()}if(t&2){let e=P();Oe(e.cn(e.cx("overlay"),e.panelStyleClass)),E("ngStyle",e.panelStyle),Ge("id",e.id+"_list"),T(),Ge("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),T(2),E("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),T(),E("ngIf",e.showHeader),T(),Oe(e.cx("listContainer")),Ir("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),T(),E("ngIf",e.virtualScroll),T(),E("ngIf",!e.virtualScroll),T(3),E("ngIf",e.footerFacet||e.footerTemplate||e._footerTemplate),T(),Ge("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var MIt=` ${IPe} /* For PrimeNG */ .p-multiselect.ng-invalid.ng-dirty { border-color: dt('multiselect.invalid.border.color'); } p-multiSelect.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder, p-multi-select.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder, p-multiselect.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder { color: dt('multiselect.invalid.placeholder.color'); } `,OIt={root:({instance:t})=>({position:t.$appendTo()==="self"?"relative":void 0})},RIt={root:({instance:t})=>["p-multiselect p-component p-inputwrapper",{"p-multiselect p-component p-inputwrapper":!0,"p-multiselect-display-chip":t.display==="chip","p-disabled":t.$disabled(),"p-invalid":t.invalid(),"p-variant-filled":t.$variant(),"p-focus":t.focused,"p-inputwrapper-filled":t.$filled(),"p-inputwrapper-focus":t.focused||t.overlayVisible,"p-multiselect-open":t.overlayVisible,"p-multiselect-fluid":t.hasFluid,"p-multiselect-sm p-inputfield-sm":t.size()==="small","p-multiselect-lg p-inputfield-lg":t.size()==="large"}],labelContainer:"p-multiselect-label-container",label:({instance:t})=>({"p-multiselect-label":!0,"p-placeholder":t.label()===t.placeholder(),"p-multiselect-label-empty":!t.placeholder()&&!t.defaultLabel&&(!t.modelValue()||t.modelValue().length===0)}),chipItem:"p-multiselect-chip-item",pcChip:"p-multiselect-chip",chipIcon:"p-multiselect-chip-icon",dropdown:"p-multiselect-dropdown",loadingIcon:"p-multiselect-loading-icon",dropdownIcon:"p-multiselect-dropdown-icon",overlay:"p-multiselect-overlay p-component-overlay p-component",header:"p-multiselect-header",pcFilterContainer:"p-multiselect-filter-container",pcFilter:"p-multiselect-filter",listContainer:"p-multiselect-list-container",list:"p-multiselect-list",optionGroup:"p-multiselect-option-group",option:({instance:t})=>({"p-multiselect-option":!0,"p-multiselect-option-selected":t.selected&&t.highlightOnSelect,"p-disabled":t.disabled,"p-focus":t.focused}),emptyMessage:"p-multiselect-empty-message",clearIcon:"p-multiselect-clear-icon"},zY=(()=>{class t extends io{name="multiselect";theme=MIt;classes=RIt;inlineStyles=OIt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var FIt={provide:Ea,useExisting:Ko(()=>Dx),multi:!0},PIt=(()=>{class t extends oo{id;option;selected;label;disabled;itemSize;focused;ariaPosInset;ariaSetSize;variant;template;checkIconTemplate;itemCheckboxIconTemplate;highlightOnSelect;onClick=new ve;onMouseEnter=new ve;_componentStyle=re(zY);onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option,selected:this.selected}),e.stopPropagation(),e.preventDefault()}onOptionMouseEnter(e){this.onMouseEnter.emit({originalEvent:e,option:this.option,selected:this.selected})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-multiSelectItem"],["p-multiselect-item"]],inputs:{id:"id",option:"option",selected:[2,"selected","selected",je],label:"label",disabled:[2,"disabled","disabled",je],itemSize:[2,"itemSize","itemSize",ln],focused:[2,"focused","focused",je],ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",variant:"variant",template:"template",checkIconTemplate:"checkIconTemplate",itemCheckboxIconTemplate:"itemCheckboxIconTemplate",highlightOnSelect:[2,"highlightOnSelect","highlightOnSelect",je]},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},features:[jt([zY]),ft],decls:5,vars:25,consts:[["icon",""],["pRipple","","role","option",3,"click","mouseenter","ngStyle","id"],[3,"ngModel","binary","tabindex","variant","ariaLabel"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&(k(0,"li",1),ie("click",function(s){return o.onOptionClick(s)})("mouseenter",function(s){return o.onOptionMouseEnter(s)}),k(1,"p-checkbox",2),ee(2,OSt,3,0,"ng-container",3),D(),ee(3,RSt,2,1,"span",3)(4,FSt,1,0,"ng-container",4),D()),i&2&&(Oe(o.cx("option")),E("ngStyle",ki(21,u6,o.itemSize+"px"))("id",o.id),Ge("aria-label",o.label)("aria-setsize",o.ariaSetSize)("aria-posinset",o.ariaPosInset)("aria-selected",o.selected)("data-p-focused",o.focused)("data-p-highlight",o.selected)("data-p-disabled",o.disabled)("aria-checked",o.selected),T(),E("ngModel",o.selected)("binary",!0)("tabindex",-1)("variant",o.variant),Cc("ariaLabel",o.label),T(),E("ngIf",o.itemCheckboxIconTemplate),T(),E("ngIf",!o.template),T(),E("ngTemplateOutlet",o.template)("ngTemplateOutletContext",ki(23,EPe,o.option)))},dependencies:[On,Fr,Lo,vs,dg,hr,no,Lr,Ul,In],encapsulation:2})}return t})(),Dx=(()=>{class t extends Wm{zone;filterService;overlayService;id;ariaLabel;styleClass;panelStyle;panelStyleClass;inputId;readonly;group;filter=!0;filterPlaceHolder;filterLocale;overlayVisible;tabindex=0;dataKey;ariaLabelledBy;set displaySelectedLabel(e){this._displaySelectedLabel=e}get displaySelectedLabel(){return this._displaySelectedLabel}set maxSelectedLabels(e){this._maxSelectedLabels=e}get maxSelectedLabels(){return this._maxSelectedLabels}selectionLimit;selectedItemsLabel;showToggleAll=!0;emptyFilterMessage="";emptyMessage="";resetFilterOnHide=!1;dropdownIcon;chipIcon;optionLabel;optionValue;optionDisabled;optionGroupLabel="label";optionGroupChildren="items";showHeader=!0;filterBy;scrollHeight="200px";lazy=!1;virtualScroll;loading=!1;virtualScrollItemSize;loadingIcon;virtualScrollOptions;overlayOptions;ariaFilterLabel;filterMatchMode="contains";tooltip="";tooltipPosition="right";tooltipPositionStyle="absolute";tooltipStyleClass;autofocusFilter=!1;display="comma";autocomplete="off";showClear=!1;autofocus;set placeholder(e){this._placeholder.set(e)}get placeholder(){return this._placeholder.asReadonly()}get options(){return this._options()}set options(e){iz(this._options(),e)||this._options.set(e)}get filterValue(){return this._filterValue()}set filterValue(e){this._filterValue.set(e)}get selectAll(){return this._selectAll}set selectAll(e){this._selectAll=e}focusOnHover=!0;filterFields;selectOnFocus=!1;autoOptionFocus=!1;highlightOnSelect=!0;size=mo();variant=mo();fluid=mo(void 0,{transform:je});appendTo=mo(void 0);onChange=new ve;onFilter=new ve;onFocus=new ve;onBlur=new ve;onClick=new ve;onClear=new ve;onPanelShow=new ve;onPanelHide=new ve;onLazyLoad=new ve;onRemove=new ve;onSelectAllChange=new ve;overlayViewChild;filterInputChild;focusInputViewChild;itemsViewChild;scroller;lastHiddenFocusableElementOnOverlay;firstHiddenFocusableElementOnOverlay;headerCheckboxViewChild;footerFacet;headerFacet;_componentStyle=re(zY);searchValue;searchTimeout;_selectAll=null;_placeholder=Zn(void 0);_disableTooltip=!1;value;_filteredOptions;focus;filtered;itemTemplate;groupTemplate;loaderTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;selectedItemsTemplate;loadingIconTemplate;filterIconTemplate;removeTokenIconTemplate;chipIconTemplate;clearIconTemplate;dropdownIconTemplate;itemCheckboxIconTemplate;headerCheckboxIconTemplate;templates;_itemTemplate;_groupTemplate;_loaderTemplate;_headerTemplate;_filterTemplate;_footerTemplate;_emptyFilterTemplate;_emptyTemplate;_selectedItemsTemplate;_loadingIconTemplate;_filterIconTemplate;_removeTokenIconTemplate;_chipIconTemplate;_clearIconTemplate;_dropdownIconTemplate;_itemCheckboxIconTemplate;_headerCheckboxIconTemplate;$variant=bo(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());$appendTo=bo(()=>this.appendTo()||this.config.overlayAppendTo());pcFluid=re(Hw,{optional:!0,host:!0,skipSelf:!0});get hasFluid(){return this.fluid()??!!this.pcFluid}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break;case"group":this._groupTemplate=e.template;break;case"selectedItems":case"selecteditems":this._selectedItemsTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"filter":this._filterTemplate=e.template;break;case"emptyfilter":this._emptyFilterTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"headercheckboxicon":this._headerCheckboxIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"removetokenicon":this._removeTokenIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"itemcheckboxicon":this._itemCheckboxIconTemplate=e.template;break;case"chipicon":this._chipIconTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}headerCheckboxFocus;filterOptions;preventModelTouched;focused=!1;itemsWrapper;_displaySelectedLabel=!0;_maxSelectedLabels=3;modelValue=Zn(null);_filterValue=Zn(null);_options=Zn(null);startRangeIndex=Zn(-1);focusedOptionIndex=Zn(-1);selectedOptions;clickInProgress=!1;get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(el.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(el.EMPTY_FILTER_MESSAGE)}get isVisibleClearIcon(){return this.modelValue()!=null&&this.modelValue()!==""&&Kr(this.modelValue())&&this.showClear&&!this.$disabled()&&!this.readonly&&this.$filled()}get toggleAllAriaLabel(){return this.config.translation.aria?this.config.translation.aria[this.allSelected()?"selectAll":"unselectAll"]:void 0}get listLabel(){return this.config.getTranslation(el.ARIA).listLabel}getAllVisibleAndNonVisibleOptions(){return this.group?this.flatOptions(this.options):this.options||[]}visibleOptions=bo(()=>{let e=this.getAllVisibleAndNonVisibleOptions(),i=Vae(e)&&Jr.isObject(e[0]);if(this._filterValue()){let o;if(i?o=this.filterService.filter(e,this.searchFields(),this._filterValue(),this.filterMatchMode,this.filterLocale):o=e.filter(r=>r.toString().toLocaleLowerCase().includes(this._filterValue().toLocaleLowerCase())),this.group){let r=this.options||[],s=[];return r.forEach(d=>{let v=this.getOptionGroupChildren(d).filter(w=>o.includes(w));v.length>0&&s.push(mt(be({},d),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...v]}))}),this.flatOptions(s)}return o}return e});label=bo(()=>{let e,i=this.modelValue();if(i&&i.length&&this.displaySelectedLabel){if(Kr(this.maxSelectedLabels)&&i.length>this.maxSelectedLabels)return this.getSelectedItemsLabel();e="";for(let o=0;oKr(this.maxSelectedLabels)&&this.modelValue()&&this.modelValue().length>this.maxSelectedLabels?this.modelValue().slice(0,this.maxSelectedLabels):this.modelValue());constructor(e,i,o){super(),this.zone=e,this.filterService=i,this.overlayService=o,od(()=>{let r=this.modelValue(),s=this.getAllVisibleAndNonVisibleOptions();s&&Kr(s)&&(this.optionValue&&this.optionLabel&&r?this.selectedOptions=s.filter(d=>r.includes(d[this.optionLabel])||r.includes(d[this.optionValue])):this.selectedOptions=r,this.cd.markForCheck())})}ngOnInit(){super.ngOnInit(),this.id=this.id||Vr("pn_id_"),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue()&&this.modelValue().length===this.selectionLimit}ngAfterViewInit(){super.ngAfterViewInit(),this.overlayVisible&&this.show()}ngAfterViewChecked(){this.filtered&&(this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild?.alignOverlay()},1)}),this.filtered=!1)}flatOptions(e){return(e||[]).reduce((i,o,r)=>{i.push({optionGroup:o,group:!0,index:r});let s=this.getOptionGroupChildren(o);return s&&s.forEach(d=>i.push(d)),i},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()){this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex());let e=this.getOptionValue(this.visibleOptions()[this.focusedOptionIndex()]);this.onOptionSelect({originalEvent:null,option:[e]})}}updateModel(e,i){this.value=e,this.onModelChange(e),this.writeValue(e)}onInputClick(e){e.stopPropagation(),e.preventDefault(),this.focusedOptionIndex.set(-1)}onOptionSelect(e,i=!1,o=-1){let{originalEvent:r,option:s}=e;if(this.$disabled()||this.isOptionDisabled(s))return;let d=this.isSelected(s),m=null;d?m=this.modelValue().filter(v=>!Sc(v,this.getOptionValue(s),this.equalityKey())):m=[...this.modelValue()||[],this.getOptionValue(s)],this.updateModel(m,r),o!==-1&&this.focusedOptionIndex.set(o),i&&ss(this.focusInputViewChild?.nativeElement),this.onChange.emit({originalEvent:e,value:m,itemValue:s})}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}onOptionSelectRange(e,i=-1,o=-1){if(i===-1&&(i=this.findNearestSelectedOptionIndex(o,!0)),o===-1&&(o=this.findNearestSelectedOptionIndex(i)),i!==-1&&o!==-1){let r=Math.min(i,o),s=Math.max(i,o),d=this.visibleOptions().slice(r,s+1).filter(m=>this.isValidOption(m)).map(m=>this.getOptionValue(m));this.updateModel(d,e)}}searchFields(){return(this.filterBy||this.optionLabel||"label").split(",")}findNearestSelectedOptionIndex(e,i=!1){let o=-1;return this.hasSelectedOption()&&(i?(o=this.findPrevSelectedOptionIndex(e),o=o===-1?this.findNextSelectedOptionIndex(e):o):(o=this.findNextSelectedOptionIndex(e),o=o===-1?this.findPrevSelectedOptionIndex(e):o)),o>-1?o:e}findPrevSelectedOptionIndex(e){let i=this.hasSelectedOption()&&e>0?Gp(this.visibleOptions().slice(0,e),o=>this.isValidSelectedOption(o)):-1;return i>-1?i:-1}findFirstFocusedOptionIndex(){let e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findFirstSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextSelectedOptionIndex(e){let i=this.hasSelectedOption()&&ethis.isValidSelectedOption(o)):-1;return i>-1?i+e+1:-1}equalityKey(){return this.optionValue?null:this.dataKey}hasSelectedOption(){return Kr(this.modelValue())}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}isOptionGroup(e){return(this.group||this.optionGroupLabel)&&e.optionGroup&&e.group}isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionDisabled(e){return this.maxSelectionLimitReached()&&!this.isSelected(e)?!0:this.optionDisabled?bs(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}isSelected(e){let i=this.getOptionValue(e);return(this.modelValue()||[]).some(o=>Sc(o,i,this.equalityKey()))}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}getOptionIndex(e,i){return this.virtualScrollerDisabled?e:i&&i.getItemOptions(e).index}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(i=>this.isOptionGroup(i)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}getLabelByValue(e){let o=(this.group?this.flatOptions(this._options()):this._options()||[]).find(r=>!this.isOptionGroup(r)&&Sc(this.getOptionValue(r),e,this.equalityKey()));return o?this.getOptionLabel(o):null}getSelectedItemsLabel(){let e=/{(.*?)}/,i=this.selectedItemsLabel?this.selectedItemsLabel:this.config.getTranslation(el.SELECTION_MESSAGE);return e.test(i)?i.replace(i.match(e)[0],this.modelValue().length+""):i}getOptionLabel(e){return this.optionLabel?bs(e,this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?bs(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}getOptionGroupLabel(e){return this.optionGroupLabel?bs(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?bs(e,this.optionGroupChildren):e.items}onKeyDown(e){if(this.$disabled()){e.preventDefault();return}let i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey();break;default:if(e.code==="KeyA"&&i){let o=this.visibleOptions().filter(r=>this.isValidOption(r)).map(r=>this.getOptionValue(r));this.updateModel(o,e),e.preventDefault();break}!i&&ZI(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key),e.preventDefault());break}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onArrowLeftKey(e,i=!1){i&&this.focusedOptionIndex.set(-1)}onArrowDownKey(e){let i=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex(),i),this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show(),e.preventDefault(),e.stopPropagation()}onArrowUpKey(e,i=!1){if(e.altKey&&!i)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide(),e.preventDefault();else{let o=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,o,this.startRangeIndex()),this.changeFocusedOptionIndex(e,o),!this.overlayVisible&&this.show(),e.preventDefault()}e.stopPropagation()}onHomeKey(e,i=!1){let{currentTarget:o}=e;if(i){let r=o.value.length;o.setSelectionRange(0,e.shiftKey?r:0),this.focusedOptionIndex.set(-1)}else{let r=e.metaKey||e.ctrlKey,s=this.findFirstOptionIndex();e.shiftKey&&r&&this.onOptionSelectRange(e,s,this.startRangeIndex()),this.changeFocusedOptionIndex(e,s),!this.overlayVisible&&this.show()}e.preventDefault()}onEndKey(e,i=!1){let{currentTarget:o}=e;if(i){let r=o.value.length;o.setSelectionRange(e.shiftKey?0:r,r),this.focusedOptionIndex.set(-1)}else{let r=e.metaKey||e.ctrlKey,s=this.findLastFocusedOptionIndex();e.shiftKey&&r&&this.onOptionSelectRange(e,this.startRangeIndex(),s),this.changeFocusedOptionIndex(e,s),!this.overlayVisible&&this.show()}e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onEnterKey(e){this.overlayVisible?this.focusedOptionIndex()!==-1&&(e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex()):this.onOptionSelect({originalEvent:e,option:this.visibleOptions()[this.focusedOptionIndex()]})):this.onArrowDownKey(e),e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.stopPropagation(),e.preventDefault()}onTabKey(e,i=!1){if(!i)if(this.overlayVisible&&this.hasFocusableElements())ss(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault();else{if(this.focusedOptionIndex()!==-1){let o=this.visibleOptions()[this.focusedOptionIndex()];!this.isSelected(o)&&this.onOptionSelect({originalEvent:e,option:o})}this.overlayVisible&&this.hide(this.filter)}}onShiftKey(){this.startRangeIndex.set(this.focusedOptionIndex())}onContainerClick(e){if(!(this.$disabled()||this.loading||this.readonly||e.target.isSameNode(this.focusInputViewChild?.nativeElement))){if(!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target)){if(this.clickInProgress)return;this.clickInProgress=!0,setTimeout(()=>{this.clickInProgress=!1},150),this.overlayVisible?this.hide(!0):this.show(!0)}this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),this.onClick.emit(e),this.cd.detectChanges()}}onFirstHiddenFocus(e){let i=e.relatedTarget===this.focusInputViewChild?.nativeElement?Vw(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;ss(i)}onInputFocus(e){this.focused=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit({originalEvent:e})}onInputBlur(e){this.focused=!1,this.onBlur.emit({originalEvent:e}),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onFilterInputChange(e){let i=e.target.value;this._filterValue.set(i),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0),setTimeout(()=>{this.overlayViewChild.alignOverlay()})}onLastHiddenFocus(e){let i=e.relatedTarget===this.focusInputViewChild?.nativeElement?kP(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;ss(i)}onOptionMouseEnter(e,i){this.focusOnHover&&this.changeFocusedOptionIndex(e,i)}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onToggleAll(e){if(!(this.$disabled()||this.readonly)){if(this.selectAll!=null)this.onSelectAllChange.emit({originalEvent:e,checked:!this.allSelected()});else{let i=this.getAllVisibleAndNonVisibleOptions().filter(m=>this.isSelected(m)&&(this.optionDisabled?bs(m,this.optionDisabled):m&&m.disabled!==void 0?m.disabled:!1)),o=this.allSelected()?this.visibleOptions().filter(m=>!this.isValidOption(m)&&this.isSelected(m)):this.visibleOptions().filter(m=>this.isSelected(m)||this.isValidOption(m)),s=[...this.filter&&!this.allSelected()?this.getAllVisibleAndNonVisibleOptions().filter(m=>this.isSelected(m)&&this.isValidOption(m)):[],...i,...o].map(m=>this.getOptionValue(m)),d=[...new Set(s)];this.updateModel(d,e),(!d.length||d.length===this.getAllVisibleAndNonVisibleOptions().length)&&this.onSelectAllChange.emit({originalEvent:e,checked:!!d.length})}this.partialSelected()&&(this.selectedOptions=null,this.cd.markForCheck()),this.onChange.emit({originalEvent:e,value:this.value}),tr.focus(this.headerCheckboxViewChild?.inputViewChild?.nativeElement),this.headerCheckboxFocus=!0,e.originalEvent.preventDefault(),e.originalEvent.stopPropagation()}}changeFocusedOptionIndex(e,i){this.focusedOptionIndex()!==i&&(this.focusedOptionIndex.set(i),this.scrollInView())}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let o=zo(this.itemsViewChild.nativeElement,`li[id="${i}"]`);o?o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}allSelected(){return this.selectAll!==null?this.selectAll:Kr(this.visibleOptions())&&this.visibleOptions().every(e=>this.isOptionGroup(e)||this.isOptionDisabled(e)||this.isSelected(e))}partialSelected(){return this.selectedOptions&&this.selectedOptions.length>0&&this.selectedOptions.length!Sc(r,e,this.equalityKey()));this.updateModel(o,i),this.onChange.emit({originalEvent:i,value:o,itemValue:e}),this.onRemove.emit({newValue:o,removed:e}),i&&i.stopPropagation()}findNextOptionIndex(e){let i=ethis.isValidOption(o)):-1;return i>-1?i+e+1:e}findPrevOptionIndex(e){let i=e>0?Gp(this.visibleOptions().slice(0,e),o=>this.isValidOption(o)):-1;return i>-1?i:e}findLastSelectedOptionIndex(){return this.hasSelectedOption()?Gp(this.visibleOptions(),e=>this.isValidSelectedOption(e)):-1}findLastFocusedOptionIndex(){let e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findLastOptionIndex(){return Gp(this.visibleOptions(),e=>this.isValidOption(e))}searchOptions(e,i){this.searchValue=(this.searchValue||"")+i;let o=-1,r=!1;return this.focusedOptionIndex()!==-1?(o=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)),o=o===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)):o+this.focusedOptionIndex()):o=this.visibleOptions().findIndex(s=>this.isOptionMatched(s)),o!==-1&&(r=!0),o===-1&&this.focusedOptionIndex()===-1&&(o=this.findFirstFocusedOptionIndex()),o!==-1&&this.changeFocusedOptionIndex(e,o),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),r}hasFocusableElements(){return Bw(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}hasFilter(){return this._filterValue()&&this._filterValue().trim().length>0}writeControlValue(e,i){this.value=e,i(e),this.cd.markForCheck()}static \u0275fac=function(i){return new(i||t)(_e(_n),_e(fy),_e(Jg))};static \u0275cmp=ne({type:t,selectors:[["p-multiSelect"],["p-multiselect"],["p-multi-select"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,AK,5),xt(r,DK,5),xt(r,PSt,4),xt(r,LSt,4),xt(r,NSt,4),xt(r,BSt,4),xt(r,VSt,4),xt(r,zSt,4),xt(r,USt,4),xt(r,HSt,4),xt(r,jSt,4),xt(r,GSt,4),xt(r,$St,4),xt(r,qSt,4),xt(r,KSt,4),xt(r,WSt,4),xt(r,YSt,4),xt(r,QSt,4),xt(r,ZSt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.footerFacet=s.first),Le(s=Ne())&&(o.headerFacet=s.first),Le(s=Ne())&&(o.itemTemplate=s.first),Le(s=Ne())&&(o.groupTemplate=s.first),Le(s=Ne())&&(o.loaderTemplate=s.first),Le(s=Ne())&&(o.headerTemplate=s.first),Le(s=Ne())&&(o.filterTemplate=s.first),Le(s=Ne())&&(o.footerTemplate=s.first),Le(s=Ne())&&(o.emptyFilterTemplate=s.first),Le(s=Ne())&&(o.emptyTemplate=s.first),Le(s=Ne())&&(o.selectedItemsTemplate=s.first),Le(s=Ne())&&(o.loadingIconTemplate=s.first),Le(s=Ne())&&(o.filterIconTemplate=s.first),Le(s=Ne())&&(o.removeTokenIconTemplate=s.first),Le(s=Ne())&&(o.chipIconTemplate=s.first),Le(s=Ne())&&(o.clearIconTemplate=s.first),Le(s=Ne())&&(o.dropdownIconTemplate=s.first),Le(s=Ne())&&(o.itemCheckboxIconTemplate=s.first),Le(s=Ne())&&(o.headerCheckboxIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(XSt,5),Ri(JSt,5),Ri(eTt,5),Ri(tTt,5),Ri(iTt,5),Ri(nTt,5),Ri(oTt,5),Ri(rTt,5)),i&2){let r;Le(r=Ne())&&(o.overlayViewChild=r.first),Le(r=Ne())&&(o.filterInputChild=r.first),Le(r=Ne())&&(o.focusInputViewChild=r.first),Le(r=Ne())&&(o.itemsViewChild=r.first),Le(r=Ne())&&(o.scroller=r.first),Le(r=Ne())&&(o.lastHiddenFocusableElementOnOverlay=r.first),Le(r=Ne())&&(o.firstHiddenFocusableElementOnOverlay=r.first),Le(r=Ne())&&(o.headerCheckboxViewChild=r.first)}},hostVars:5,hostBindings:function(i,o){i&1&&ie("click",function(s){return o.onContainerClick(s)}),i&2&&(Ge("id",o.id),$r(o.sx("root")),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{id:"id",ariaLabel:"ariaLabel",styleClass:"styleClass",panelStyle:"panelStyle",panelStyleClass:"panelStyleClass",inputId:"inputId",readonly:[2,"readonly","readonly",je],group:[2,"group","group",je],filter:[2,"filter","filter",je],filterPlaceHolder:"filterPlaceHolder",filterLocale:"filterLocale",overlayVisible:[2,"overlayVisible","overlayVisible",je],tabindex:[2,"tabindex","tabindex",ln],dataKey:"dataKey",ariaLabelledBy:"ariaLabelledBy",displaySelectedLabel:"displaySelectedLabel",maxSelectedLabels:"maxSelectedLabels",selectionLimit:[2,"selectionLimit","selectionLimit",ln],selectedItemsLabel:"selectedItemsLabel",showToggleAll:[2,"showToggleAll","showToggleAll",je],emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",je],dropdownIcon:"dropdownIcon",chipIcon:"chipIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",showHeader:[2,"showHeader","showHeader",je],filterBy:"filterBy",scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",je],virtualScroll:[2,"virtualScroll","virtualScroll",je],loading:[2,"loading","loading",je],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",ln],loadingIcon:"loadingIcon",virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:[2,"autofocusFilter","autofocusFilter",je],display:"display",autocomplete:"autocomplete",showClear:[2,"showClear","showClear",je],autofocus:[2,"autofocus","autofocus",je],placeholder:"placeholder",options:"options",filterValue:"filterValue",selectAll:"selectAll",focusOnHover:[2,"focusOnHover","focusOnHover",je],filterFields:"filterFields",selectOnFocus:[2,"selectOnFocus","selectOnFocus",je],autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",je],highlightOnSelect:[2,"highlightOnSelect","highlightOnSelect",je],size:[1,"size"],variant:[1,"variant"],fluid:[1,"fluid"],appendTo:[1,"appendTo"]},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onClear:"onClear",onPanelShow:"onPanelShow",onPanelHide:"onPanelHide",onLazyLoad:"onLazyLoad",onRemove:"onRemove",onSelectAllChange:"onSelectAllChange"},features:[jt([FIt,zY]),ft],ngContentSelectors:aTt,decls:16,vars:40,consts:[["focusInput",""],["elseBlock",""],["overlay",""],["content",""],["token",""],["removeicon",""],["firstHiddenFocusableEl",""],["buildInItems",""],["lastHiddenFocusableEl",""],["builtInFilterElement",""],["headerCheckbox",""],["icon",""],["filterInput",""],["scroller",""],["loader",""],["items",""],[1,"p-hidden-accessible"],["role","combobox",3,"focus","blur","keydown","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus"],[3,"mouseleave","pTooltip","tooltipDisabled","tooltipPosition","positionStyle","tooltipStyleClass"],[4,"ngIf"],[4,"ngIf","ngIfElse"],[3,"visibleChange","onAnimationStart","onHide","hostAttrSelector","visible","options","target","appendTo"],[3,"class"],[3,"class",4,"ngFor","ngForOf"],[3,"onRemove","label","removable","removeIcon"],[3,"class","click",4,"ngIf"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","times",3,"class","click",4,"ngIf"],["data-p-icon","times",3,"click"],[4,"ngTemplateOutlet"],[3,"class",4,"ngIf"],[3,"class","ngClass",4,"ngIf"],["data-p-icon","chevron-down",3,"class",4,"ngIf"],[3,"ngClass"],["data-p-icon","chevron-down"],[3,"ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],[3,"items","style","itemSize","autoSize","tabindex","lazy","options","onLazyLoad",4,"ngIf"],[3,"ngModel","ariaLabel","binary","variant","disabled","onChange",4,"ngIf"],[3,"onChange","ngModel","ariaLabel","binary","variant","disabled"],["data-p-icon","check",3,"class",4,"ngIf"],["data-p-icon","check"],["pInputText","","type","text","role","searchbox",3,"input","keydown","click","blur","variant","value"],["data-p-icon","search",4,"ngIf"],["class","p-multiselect-filter-icon",4,"ngIf"],["data-p-icon","search"],[1,"p-multiselect-filter-icon"],[3,"onLazyLoad","items","itemSize","autoSize","tabindex","lazy","options"],["role","listbox","aria-multiselectable","true"],["ngFor","",3,"ngForOf"],["role","option",3,"class","ngStyle",4,"ngIf"],["role","option",3,"ngStyle"],[3,"onClick","onMouseEnter","id","option","selected","label","disabled","template","itemCheckboxIconTemplate","itemSize","focused","ariaPosInset","ariaSetSize","variant","highlightOnSelect"]],template:function(i,o){if(i&1){let r=tt();Nn(sTt),k(0,"div",16)(1,"input",17,0),ie("focus",function(d){return se(r),ae(o.onInputFocus(d))})("blur",function(d){return se(r),ae(o.onInputBlur(d))})("keydown",function(d){return se(r),ae(o.onKeyDown(d))}),D()(),k(3,"div",18),ie("mouseleave",function(){return se(r),ae(o.labelContainerMouseLeave())}),k(4,"div"),ee(5,wTt,3,2,"ng-container",19)(6,ITt,3,6,"ng-container",19),D()(),ee(7,MTt,3,2,"ng-container",19),k(8,"div"),ee(9,NTt,3,2,"ng-container",20)(10,GTt,2,2,"ng-template",null,1,Pt),D(),k(12,"p-overlay",21,2),hh("visibleChange",function(d){return se(r),Xh(o.overlayVisible,d)||(o.overlayVisible=d),ae(d)}),ie("onAnimationStart",function(d){return se(r),ae(o.onOverlayAnimationStart(d))})("onHide",function(){return se(r),ae(o.hide())}),ee(14,kIt,13,19,"ng-template",null,3,Pt),D()}if(i&2){let r=ti(11);Ge("data-p-hidden-accessible",!0),T(),E("pTooltip",o.tooltip)("tooltipPosition",o.tooltipPosition)("positionStyle",o.tooltipPositionStyle)("tooltipStyleClass",o.tooltipStyleClass)("pAutoFocus",o.autofocus),Ge("aria-disabled",o.$disabled())("id",o.inputId)("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",o.overlayVisible??!1)("aria-controls",o.overlayVisible?o.id+"_list":null)("tabindex",o.$disabled()?-1:o.tabindex)("aria-activedescendant",o.focused?o.focusedOptionId:void 0)("value",o.modelValue())("name",o.name())("required",o.required()?"":void 0)("disabled",o.$disabled()?"":void 0),T(2),Oe(o.cx("labelContainer")),E("pTooltip",o.tooltip)("tooltipDisabled",o._disableTooltip)("tooltipPosition",o.tooltipPosition)("positionStyle",o.tooltipPositionStyle)("tooltipStyleClass",o.tooltipStyleClass),T(),Oe(o.cx("label")),T(),E("ngIf",!o.selectedItemsTemplate&&!o._selectedItemsTemplate),T(),E("ngIf",o.selectedItemsTemplate||o._selectedItemsTemplate),T(),E("ngIf",o.isVisibleClearIcon),T(),Oe(o.cx("dropdown")),T(),E("ngIf",o.loading)("ngIfElse",r),T(3),E("hostAttrSelector",o.attrSelector),ph("visible",o.overlayVisible),E("options",o.overlayOptions)("target","@parent")("appendTo",o.$appendTo())}},dependencies:[On,Ns,Gc,Fr,Lo,vs,PIt,zP,In,gy,Ym,fp,sx,JI,am,sm,ax,lx,fu,QP,dg,hr,no,Lr],encapsulation:2,changeDetection:0})}return t})(),UY=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Dx,In,In]})}return t})();var LIt=()=>["searchTerm"];function NIt(t,n){if(t&1&&(k(0,"small",2),Q(1),D()),t&2){let e=P();E("id",e.selectConfig.id+"-help"),T(),dt(e.errorMessage)}}var _a=(()=>{class t extends VL{constructor(){super(),this.initialSelection=[],this.selectOptions=ci([]),this.selection=new ve,this.optionsChange=new ve,this.overlayOptions={mode:"overlay",appendTo:"body"},this.selectConfig={id:"multi-select-option-group",selectLabel:"Element",option:{uniqueFnc:e=>"",sortFnc:(e,i)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>""},emitEventOnInitialSelection:!1,valid$:new pi(1)},this._initialSelection$=new Uf,this._subs.push(yc([this._initialSelection$.pipe(Sn(1),vt(e=>e.map(i=>this.transformToWrapper(i)))),this.optionsChange]).subscribe(e=>{this.setSelection(e[0],{emitEvent:this.selectConfig.emitEventOnInitialSelection})}))}ngOnChanges(e){e.config&&(this.selectConfig=mt(be({id:`multi-select-option-group-${this.config.selectLabel}`,emitEventOnInitialSelection:!1,valid$:new pi(1)},this.config),{option:be({searchOptionDisplayName:i=>this.config.option.searchOptionAccessor(i)},this.config.option)}),this.init(this.selectConfig)),e.selectOptions&&this._updateSelectOptions(),e.initialSelection&&e.initialSelection.currentValue&&(this.initialSelection instanceof Cr?this._subs.push(this.initialSelection.subscribe(i=>{this._initialSelection$.next(i),this._initialSelection$.complete()})):(this._initialSelection$.next(this.initialSelection),this._initialSelection$.complete()))}ngOnDestroy(){this.unsubscribeAll(),this._onDestroy.next(),this._onDestroy.complete()}emptySelection(){return new Array}onSelectionChange(e){this.selection.emit(e.map(i=>i.realValue))}transformToWrapper(e){return{realValue:e,dataKey:this.selectConfig.option.uniqueFnc(e),searchTerm:this.selectConfig.option.searchOptionAccessor(e),displayName:this.selectConfig.option.searchOptionDisplayName(e)}}_updateSelectOptions(){this.searching=!0,this._subs.push(this.selectOptions.pipe(vt(e=>e.map(i=>this.transformToWrapper(i)))).subscribe({next:e=>{this.allOptions.next(e.slice().sort((i,o)=>this.selectConfig.option.sortFnc(i.realValue,o.realValue))),this.searching=!1,this.optionsChange.emit(e.map(i=>i.realValue))},error:e=>{console.warn(`Laden von ${this.selectConfig.selectLabel} nicht m\xF6glich`,e)}}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-ui-multi-select"]],inputs:{config:"config",initialSelection:"initialSelection",selectOptions:"selectOptions"},outputs:{selection:"selection",optionsChange:"optionsChange"},features:[ft,Ot],decls:6,vars:22,consts:[["fluid","","variant","filled","dataKey","dataKey","optionLabel","displayName","filterBy","searchTerm",3,"inputId","data-test","formControl","options","loading","showClear","filter","filterFields","filterPlaceHolder","emptyFilterMessage","emptyMessage","overlayOptions","maxSelectedLabels","selectedItemsLabel"],[3,"for"],[1,"ng-invalid",3,"id"]],template:function(i,o){i&1&&(k(0,"p-iftalabel"),ce(1,"p-multiSelect",0),Xn(2,"async"),k(3,"label",1),Q(4),D(),qe(5,NIt,2,2,"small",2),D()),i&2&&(T(),Oe(o.valid?"mb-4":o.errorMessage?"ng-invalid ng-dirty":"mb-4 ng-invalid ng-dirty"),E("inputId",o.selectConfig.id)("data-test",o.selectConfig.id)("formControl",o.selectCtrl)("options",Nr(2,19,o.allOptions))("loading",o.searching)("showClear",!0)("filter",!0)("filterFields",uo(21,LIt))("filterPlaceHolder",o.placeholderLabel)("emptyFilterMessage",o.noEntriesFoundLabel)("emptyMessage",o.noEntriesFoundLabel)("overlayOptions",o.overlayOptions)("maxSelectedLabels",3)("selectedItemsLabel",o.selectedItemsLabel),T(2),E("for",o.selectConfig.id),T(),dt(o.selectConfig==null?null:o.selectConfig.selectLabel),T(),Ke(o.errorMessage?5:-1))},dependencies:[as,UY,Dx,xr,no,zl,Lp,qd],encapsulation:2,changeDetection:0})}}return t})();var BIt=()=>["searchTerm"];function VIt(t,n){if(t&1&&(k(0,"small",2),Q(1),D()),t&2){let e=P();E("id",e.selectConfig.id+"-help"),T(),dt(e.errorMessage)}}var HY=(()=>{class t extends VL{constructor(){super(),this.initialSelection=[],this.selectOptions=ci([]),this.selection=new ve,this.optionsChange=new ve,this.overlayOptions={mode:"overlay",appendTo:"body"},this.selectConfig={id:"multi-select-option-group",selectLabel:"Element",option:{uniqueFnc:e=>"",sortFnc:(e,i)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>"",cloneFn:e=>JSON.parse(JSON.stringify(e))},optionGroup:{uniqueFnc:e=>"",sortFnc:(e,i)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>"",cloneFn:e=>JSON.parse(JSON.stringify(e))},emitEventOnInitialSelection:!1,valid$:new pi(1)},this._initialSelection$=new Uf,this._subs.push(yc([this._initialSelection$.pipe(Sn(1),vt(e=>e.map(i=>this.transformToWrapper(i)))),this.optionsChange]).subscribe(e=>this.setSelection(e[0],{emitEvent:this.selectConfig.emitEventOnInitialSelection})))}ngOnChanges(e){e.config&&(this.selectConfig=mt(be({id:`multi-select-option-group-${this.config.selectLabel}`,emitEventOnInitialSelection:!1,valid$:new pi(1)},this.config),{option:be({searchOptionDisplayName:i=>this.config.option.searchOptionAccessor(i),cloneFn:i=>JSON.parse(JSON.stringify(i))},this.config.option),optionGroup:be({searchOptionDisplayName:i=>this.config.optionGroup.searchOptionAccessor(i),cloneFn:i=>JSON.parse(JSON.stringify(i))},this.config.optionGroup)}),this.init(this.selectConfig)),e.selectOptions&&this._updateSelectOptions(),e.initialSelection&&e.initialSelection.currentValue&&(this.initialSelection instanceof Cr?this._subs.push(this.initialSelection.subscribe(i=>{this._initialSelection$.next(i),this._initialSelection$.complete()})):(this._initialSelection$.next(this.initialSelection),this._initialSelection$.complete()))}ngOnDestroy(){this.unsubscribeAll(),this._onDestroy.next(),this._onDestroy.complete()}emptySelection(){return[]}onSelectionChange(e){this.selection.emit(e.map(i=>i.realValue))}transformToWrapper(e){return{realValue:e,dataKey:this.selectConfig.option.uniqueFnc(e),searchTerm:this.selectConfig.option.searchOptionAccessor(e),displayName:this.selectConfig.option.searchOptionDisplayName(e)}}_updateSelectOptions(){this.searching=!0,this._subs.push(this.selectOptions.pipe(vt(e=>e.map(i=>({realValue:i,dataKey:this.selectConfig.optionGroup.uniqueFnc(i),searchTerm:this.selectConfig.optionGroup.searchOptionAccessor(i),displayName:this.selectConfig.optionGroup.searchOptionDisplayName(i),options:i.options.sort((o,r)=>this.selectConfig.option.sortFnc(o,r)).map(o=>this.transformToWrapper(o))})))).subscribe({next:e=>{this.allOptions.next(e.slice().sort((i,o)=>this.selectConfig.optionGroup.sortFnc(i.realValue,o.realValue))),this.searching=!1,this.optionsChange.emit(e.map(i=>i.realValue))},error:e=>{console.warn(`Laden von ${this.selectConfig.selectLabel} nicht m\xF6glich`,e)}}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-ui-multi-select-option-group"]],inputs:{config:"config",initialSelection:"initialSelection",selectOptions:"selectOptions"},outputs:{selection:"selection",optionsChange:"optionsChange"},features:[ft,Ot],decls:6,vars:23,consts:[["fluid","","variant","filled","optionGroupLabel","displayName","optionGroupChildren","options","dataKey","dataKey","optionLabel","displayName","filterBy","searchTerm",3,"inputId","data-test","formControl","options","loading","showClear","filterPlaceHolder","emptyFilterMessage","emptyMessage","overlayOptions","maxSelectedLabels","selectedItemsLabel","group","filter","filterFields"],[3,"for"],[3,"id"]],template:function(i,o){i&1&&(k(0,"p-iftalabel"),ce(1,"p-multiSelect",0),Xn(2,"async"),k(3,"label",1),Q(4),D(),qe(5,VIt,2,2,"small",2),D()),i&2&&(T(),Oe(o.valid?"mb-4":o.errorMessage?"ng-invalid ng-dirty":"mb-4 ng-invalid ng-dirty"),E("inputId",o.selectConfig.id)("data-test",o.selectConfig.id)("formControl",o.selectCtrl)("options",Nr(2,20,o.allOptions))("loading",o.searching)("showClear",!0)("filterPlaceHolder",o.placeholderLabel)("emptyFilterMessage",o.noEntriesFoundLabel)("emptyMessage",o.noEntriesFoundLabel)("overlayOptions",o.overlayOptions)("maxSelectedLabels",3)("selectedItemsLabel",o.selectedItemsLabel)("group",!0)("filter",!0)("filterFields",uo(22,BIt)),T(2),E("for",o.selectConfig.id),T(),dt(o.selectConfig==null?null:o.selectConfig.selectLabel),T(),Ke(o.errorMessage?5:-1))},dependencies:[xr,no,zl,as,Dx,Lp,qd],encapsulation:2,changeDetection:0})}}return t})();var jY=(()=>{class t{constructor(e,i){this._http=e,this._environmentService=i,this.baseUrl=this._environmentService.load("BD_DISTRICT_URL")}findAdministrativeRegionIds(e){let i=`${this.baseUrl}/states/administrative-regions`;return this._http.post(i,{stateIds:e})}findCareServiceAreaIds(e){let i=`${this.baseUrl}/states/care-service-areas`;return this._http.post(i,{stateIds:e})}findAdministrativeDistrictIds(e){let i=`${this.baseUrl}/states/administrative-districts`;return this._http.post(i,{stateIds:e}).pipe(vt(o=>o.map(r=>Yo.createFromNumber(r))))}findPostalCodes(e){let i=`${this.baseUrl}/states/postal-codes`;return this._http.post(i,{stateIds:e})}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var GY=(()=>{class t{constructor(e,i){this._httpClient=e,this._environmentService=i,this._store=new iL(this._environmentService)}isochrone(e,i){let o=Array.isArray(e)?e:"lng"in e?[e.lat,e.lng]:[e.lat,e.lon],r=`https://api.mapbox.com/isochrone/v1/mapbox/driving/${o[0]}%2C${o[1]}?contours_minutes=${i}&polygons=true&denoise=1&generalize=85&access_token=${this._store.token()}`;return this._httpClient.get(r)}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var zL=class extends dE{constructor(n,e,i){super(n,e),this._isochroneService=i,this._bounds$=new pi(1),this.bounds$=this._bounds$.asObservable(),this._coordinates$=new hi,this._drivingTime$=new Gs(10)}updateCoordinates(n){this._coordinates$.next(n)}updateDrivingTime(n){this._drivingTime$.next(n),this._legendRef.next(this.updateLegendRef())}updateLegendRef(){return new hx(this.layerControlId,`${this.config.displayName} ${this._drivingTime$.value} min`,"public")}afterInit(n,e){yc([this._coordinates$,this._drivingTime$]).pipe(vt(i=>({coordinates:i[0],drivingTime:i[1]})),Mn(i=>this._isochroneService.isochrone(i.coordinates,i.drivingTime))).subscribe(i=>{this.updateSource(i),this._bounds$.next(t_.fromBbox(n_(i),i))})}layer(){return{type:"fill",source:this.config.sourceId,id:"ISOCHRONE",paint:{"fill-color":"#3d3d3d","fill-opacity":.35}}}source(){return{sourceId:this.config.sourceId,sourceData:{type:"geojson",data:null}}}};var UL=class extends dE{constructor(n,e){super(n,e),this._bounds$=new pi(1),this.bounds$=this._bounds$.asObservable(),this._coordinates$=new pi(1),this._radiusInKilometer$=new Gs(25)}updateCoordinates(n){this._coordinates$.next(n)}updateRadiusInKilometer(n){this._radiusInKilometer$.next(n),this._legendRef.next(this.updateLegendRef())}updateLegendRef(){return new hx(this.layerControlId,`${this.config.displayName} ${this._radiusInKilometer$.value} km`,"public")}afterInit(n,e){yc([this._coordinates$,this._radiusInKilometer$]).pipe(vt(i=>({coordinates:i[0],radiusInKilometer:i[1]})),vt(i=>{let o={type:"Point",coordinates:i.coordinates},r={units:"kilometers",steps:100,properties:{title:`${i.radiusInKilometer} km`}};return Tz(o,i.radiusInKilometer,r)})).subscribe(i=>{let o=bd([i]);this.updateSource(o),this._bounds$.next(t_.fromBbox(n_(i),o))})}layer(){return{type:"fill",source:this.config.sourceId,id:"ISOCHRONE",paint:{"fill-color":"#3d3d3d","fill-opacity":.35}}}source(){return{sourceId:this.config.sourceId,sourceData:{type:"geojson",data:null}}}};var HIt="sseemann.clfw6i7q40hr52blta8s55b09-7649f",jIt="AYS_CLINIC_SELECTION_LAYER_HANDLER",GIt={type:"vector",url:"mapbox://sseemann.clfw6i7q40hr52blta8s55b09-7649f"},HL=class extends uE{constructor(){super(jIt,{displayName:"Kliniken",layerId:"AYS_CLINIC_SELECTION_LAYER",highlightLayerId:"AYS_CLINIC_SELECTION-HIGHLIGHT_LAYER",sourceId:HIt,zIndex:20})}highlightLayer(){return{type:"circle",id:this.config.highlightLayerId,source:this.config.sourceId,"source-layer":"clinics_2023.2",paint:{"circle-color":"#484896","circle-stroke-color":"#6e599f","circle-opacity":1},filter:["in","clinic_ik",""]}}layer(){return{type:"circle",id:this.config.layerId,source:this.config.sourceId,"source-layer":"clinics_2023.2",paint:{"circle-color":"#A4A0A0","circle-stroke-color":"#A4A0A0","circle-opacity":1}}}source(){return{sourceId:this.config.sourceId,sourceData:mt(be({},GIt),{id:this.config.sourceId})}}compareFn(n,e){return vo.equals(n,e,()=>n.equals(e))}baseFilterExpression(n){return["all",["in","clinic_ik",...n.map(e=>parseInt(e.ik,10))],["in","clinic_sn",...n.map(e=>parseInt(e.sn,10))]]}propertiesToValueFn(n){return new ga(n.clinic_ik.toString(),n.clinic_sn.toString())}onChangedBounds(n){super.onChangedBounds(n);let e=Wh(this.mapRef,"idle").pipe(Sn(1)).subscribe(()=>{let i=this.mapRef.queryRenderedFeatures(n.toPointLikeArray(this.mapRef),{layers:[this.config.highlightLayerId]}),o=n.origin.features.filter(s=>s.geometry.type==="Polygon");o&&o.length>0&&(i=i.filter(s=>o.some(d=>FL(d,s))));let r=i.map(s=>s.properties).map(s=>new ga(s.clinic_ik,s.clinic_sn));this.possibleSelection$.next(r),this.selection.setSelection(...r),e.unsubscribe()})}};var $Y=class t{static fromObjArr(n){return n.map(t.fromObj)}static fromObj(n){let e=mt(be({},n.clinic),{id:ga.fromObj(n.clinic.id),address:Ih.fromObject(n.clinic.address)}),i=mE.fromObject(n.staffings);return new t(e,i)}constructor(n,e){this.clinic=n,this.staffing=e}},qY=class t{static fromObjArr(n){return n.map(t.fromObj)}static fromObj(n){let e=mt(be({},n.clinic),{id:ga.fromObj(n.clinic.id),address:Ih.fromObject(n.clinic.address)}),i=n.caseNumber;return new t(e,i)}constructor(n,e){this.clinic=n,this.caseNumbers=e}},KY=class t{static fromObj(n){return new t(ga.fromObj(n.id),n.name,n.nameOfOwner,n.type,n.size,n.beds,n.cmi,Ih.fromObject(n.address),n.specialtyDepartments,n.caseNumbers,n.staffing,n.medicalCareLevel,n.clinicLevel,n.isInekCalculationLocation,n.bmgCriteriaOverview)}static fromObjArr(n){return n.map(t.fromObj)}constructor(n,e,i,o,r,s,d,m,v,w,O,N,V,$,q){this.id=n,this.name=e,this.nameOfOwner=i,this.type=o,this.size=r,this.beds=s,this.cmi=d,this.address=m,this.specialtyDepartments=v,this.caseNumbers=w,this.staffing=O,this.medicalCareLevel=N,this.clinicLevel=V,this.isInekCalculationLocation=$,this.bmgCriteriaOverview=q}};var cS={field:"modifiedDate",desc:!0};var WY=(()=>{class t{constructor(){this.cache=new Map}get(e){let i=this.cache.get(e);if(!i)return;if(new Date().getTime()>i.expiry){this.cache.delete(e);return}return ci(i.value)}set(e,i,o=6e4*3600){let r=new Date().getTime()+o;return this.cache.set(e,{expiry:r,value:i}),ci(i)}cacheObservable(e,i,o){let r=this.get(e);return r||i.pipe(Vo(s=>{this.set(e,s,o)}))}deleteCacheForKey(e){this.cache.delete(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var MPe={showDeleteButton:!0,showEditButton:!0};var F2=(function(t){return t.NOOP="NOOP",t.EDIT_RESOURCE="EDIT_RESOURCE",t.DELETE_RESOURCE="DELETE_RESOURCE",t})(F2||{});var YY=class{constructor(n){this._environmentService=n}linkAssets(){return this._environmentService.load("BD_HELP_RESOURCE_URLS")}};var QY=(()=>{class t{constructor(e,i){this._httpClient=e,this._environmentService=i,this._store=new YY(this._environmentService);let o=this._store.linkAssets().map(r=>this._httpClient.get(r));this._helpLinks=Wl(tc(o).pipe(vt(r=>r.reduce((s,d)=>s.concat(d))))).then(r=>r.reduce((s,d)=>(s[d.key]=d,s),{}))}findByKey(e){return this._helpLinks.then(i=>i[e])}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var OPe={mode:"button",color:"accent"},d_={mode:"toolbar"};function qIt(t,n){if(t&1&&(k(0,"a",0)(1,"mat-icon"),Q(2,"help_outline"),D()()),t&2){let e=P();E("href",e.link.link,dc)("color",e.color)("ngClass",e.class)("ngStyle",e.styles)("matTooltip",e.link==null?null:e.link.displayName)}}var af=(()=>{class t{constructor(e,i,o){this._helpService=e,this._changeDetection=i,this._breakpointObserver=o,this.options=OPe,this.class={"bd-primary":!1,"bd-primary-text":!1},this._destroyed=new hi}ngOnInit(){this.options?.hexColor?(this.styles={color:this.options?.hexColor},this.color=null):this.color=this.options.color,this._helpService.findByKey(this.key).then(e=>{this.link=e,this._changeDetection.markForCheck()},()=>this.link=void 0),this._breakpointObserver.observe([tm.XSmall,tm.Small]).pipe(cs(this._destroyed)).subscribe(e=>{this.class={"bd-primary":this.options.mode==="toolbar"&&this.options?.hexColor===null,"bd-primary-text":e.matches&&this.options.mode==="toolbar"&&this.options?.hexColor===null}})}ngOnChanges(){this._helpService.findByKey(this.key).then(e=>{this.link=e,this._changeDetection.markForCheck()},()=>this.link=void 0)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(i){return new(i||t)(_e(QY),_e(Gi),_e(s0))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-help-button"]],inputs:{key:"key",options:"options"},features:[Ot],decls:1,vars:1,consts:[["target","_blank","rel","noopener","mat-icon-button","",3,"href","color","ngClass","ngStyle","matTooltip"]],template:function(i,o){i&1&&qe(0,qIt,3,5,"a",0),i&2&&Ke(o.link?0:-1)},dependencies:[Tn,xl,Ns,vs,Hp,Up,$o,mr],encapsulation:2,changeDetection:0})}}return t})();var Gl=(()=>{class t{get vertical(){return this._vertical}set vertical(e){this._vertical=_h(e)}_vertical=!1;get inset(){return this._inset}set inset(e){this._inset=_h(e)}_inset=!1;static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(i,o){i&2&&(Ge("aria-orientation",o.vertical?"vertical":"horizontal"),Vn("mat-divider-vertical",o.vertical)("mat-divider-horizontal",!o.vertical)("mat-divider-inset",o.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(i,o){},styles:[`.mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-top-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-right-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px} `],encapsulation:2,changeDetection:0})}return t})(),il=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,Br]})}return t})();var WIt=["*"],YIt=`.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item{display:flex;position:relative;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer;padding-left:16px;padding-right:16px;background-color:var(--mat-list-list-item-container-color, transparent);border-radius:var(--mat-list-list-item-container-shape, var(--mat-sys-corner-none))}.mdc-list-item.mdc-list-item--selected{background-color:var(--mat-list-list-item-selected-container-color)}.mdc-list-item:focus{outline:0}.mdc-list-item.mdc-list-item--disabled{cursor:auto}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mat-list-list-item-one-line-container-height, 48px)}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mat-list-list-item-two-line-container-height, 64px)}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mat-list-list-item-three-line-container-height, 88px)}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--selected::before,.mdc-list-item.mdc-list-item--selected:focus::before,.mdc-list-item:not(.mdc-list-item--selected):focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;content:"";pointer-events:none}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mat-list-list-item-leading-icon-color, var(--mat-sys-on-surface-variant));width:var(--mat-list-list-item-leading-icon-size, 24px);height:var(--mat-list-list-item-leading-icon-size, 24px);margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mat-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mat-list-list-item-leading-avatar-size, 40px);height:var(--mat-list-list-item-leading-avatar-size, 40px);margin-left:16px;margin-right:16px;border-radius:50%}.mdc-list-item--with-leading-avatar .mdc-list-item__start,[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px;border-radius:50%}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mat-list-list-item-trailing-supporting-text-font, var(--mat-sys-label-small-font));line-height:var(--mat-list-list-item-trailing-supporting-text-line-height, var(--mat-sys-label-small-line-height));font-size:var(--mat-list-list-item-trailing-supporting-text-size, var(--mat-sys-label-small-size));font-weight:var(--mat-list-list-item-trailing-supporting-text-weight, var(--mat-sys-label-small-weight));letter-spacing:var(--mat-list-list-item-trailing-supporting-text-tracking, var(--mat-sys-label-small-tracking))}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mat-list-list-item-trailing-icon-color, var(--mat-sys-on-surface-variant));width:var(--mat-list-list-item-trailing-icon-size, 24px);height:var(--mat-list-list-item-trailing-icon-size, 24px)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mat-list-list-item-hover-trailing-icon-color)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mat-list-list-item-trailing-supporting-text-color, var(--mat-sys-on-surface-variant))}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mat-list-list-item-selected-trailing-icon-color, var(--mat-sys-primary))}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:var(--mat-list-list-item-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-list-list-item-label-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-list-list-item-label-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-list-list-item-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-list-list-item-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-list-list-item-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mat-list-list-item-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mat-list-list-item-focus-label-text-color, var(--mat-sys-on-surface))}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;color:var(--mat-list-list-item-supporting-text-color, var(--mat-sys-on-surface-variant));font-family:var(--mat-list-list-item-supporting-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-list-list-item-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-list-list-item-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-list-list-item-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-list-list-item-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:16px}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:16px;padding-right:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-trailing-icon.mdc-list-item,[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:0;padding-right:0}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:16px;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:0;padding-right:16px}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-webkit-user-select:none;user-select:none;margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;line-height:normal;align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:16px;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:0;padding-right:16px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-icon,.mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-avatar,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-icon,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-avatar{padding-left:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-icon,[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-avatar,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-icon,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-avatar{padding-right:0}.mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-group__subheader{margin:.75rem 16px}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text{opacity:var(--mat-list-list-item-disabled-label-text-opacity, 0.3)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mat-list-list-item-disabled-leading-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-disabled-leading-icon-opacity, 0.38)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mat-list-list-item-disabled-trailing-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-disabled-trailing-icon-opacity, 0.38)}.mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing,[dir=rtl] .mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing{padding-left:0;padding-right:0}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mat-list-list-item-disabled-label-text-color, var(--mat-sys-on-surface))}.mdc-list-item:hover::before{background-color:var(--mat-list-list-item-hover-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mat-list-list-item-disabled-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-disabled-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-list-item:focus::before{background-color:var(--mat-list-list-item-focus-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{opacity:var(--mat-list-list-item-disabled-label-text-opacity, 0.3)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mat-list-list-item-leading-avatar-shape, var(--mat-sys-corner-full));background-color:var(--mat-list-list-item-leading-avatar-color, var(--mat-sys-primary-container))}.mat-mdc-list-item-icon{font-size:var(--mat-list-list-item-leading-icon-size, 24px)}@media(forced-colors: active){a.mdc-list-item--activated::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:"";opacity:0;pointer-events:none;border-radius:inherit}.mat-mdc-list-item>.mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus>.mat-focus-indicator::before{content:""}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:start}mat-action-list button::-moz-focus-inner{border:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-inline-start:var(--mat-list-list-item-leading-icon-start-space, 16px);margin-inline-end:var(--mat-list-list-item-leading-icon-end-space, 16px)}.mat-mdc-nav-list .mat-mdc-list-item{border-radius:var(--mat-list-active-indicator-shape, var(--mat-sys-corner-full));--mat-focus-indicator-border-radius: var(--mat-list-active-indicator-shape, var(--mat-sys-corner-full))}.mat-mdc-nav-list .mat-mdc-list-item.mdc-list-item--activated{background-color:var(--mat-list-active-indicator-color, var(--mat-sys-secondary-container))} `,QIt=["unscopedContent"],ZIt=["text"],XIt=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],JIt=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"];var eEt=new fi("ListOption"),Nde=(()=>{class t{_elementRef=re(Bn);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]})}return t})(),Bde=(()=>{class t{_elementRef=re(Bn);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]})}return t})(),tEt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"]})}return t})(),RPe=(()=>{class t{_listOption=re(eEt,{optional:!0});constructor(){}_isAlignedAtStart(){return!this._listOption||this._listOption?._getTogglePosition()==="after"}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,hostVars:4,hostBindings:function(i,o){i&2&&Vn("mdc-list-item__start",o._isAlignedAtStart())("mdc-list-item__end",!o._isAlignedAtStart())}})}return t})(),iEt=(()=>{class t extends RPe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[ft]})}return t})(),Vde=(()=>{class t extends RPe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[ft]})}return t})(),nEt=new fi("MAT_LIST_CONFIG"),Lde=(()=>{class t{_isNonInteractive=!0;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=_h(e)}_disableRipple=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(_h(e))}_disabled=Zn(!1);_defaultOptions=re(nEt,{optional:!0});static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,hostVars:1,hostBindings:function(i,o){i&2&&Ge("aria-disabled",o.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}})}return t})(),oEt=(()=>{class t{_elementRef=re(Bn);_ngZone=re(_n);_listBase=re(Lde,{optional:!0});_platform=re(ba);_hostElement;_isButtonElement;_noopAnimations=Cl();_avatars;_icons;set lines(e){this._explicitLines=jm(e,null),this._updateItemLines(!1)}_explicitLines=null;get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=_h(e)}_disableRipple=!1;get disabled(){return this._disabled()||!!this._listBase?.disabled}set disabled(e){this._disabled.set(_h(e))}_disabled=Zn(!1);_subscriptions=new Xr;_rippleRenderer=null;_hasUnscopedTextContent=!1;rippleConfig;get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(){re(kl).load(hp);let e=re(n2,{optional:!0});this.rippleConfig=e||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement=this._hostElement.nodeName.toLowerCase()==="button",this._listBase&&!this._listBase._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),this._rippleRenderer!==null&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!!(this._avatars.length||this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new i2(this,this._ngZone,this._hostElement,this._platform,re(Oo)),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(ku(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();let i=this._explicitLines??this._inferLinesFromContent(),o=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",i===2),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",i===3),this._hasUnscopedTextContent){let r=this._titles.length===0&&i===1;o.classList.toggle("mdc-list-item__primary-text",r),o.classList.toggle("mdc-list-item__secondary-text",!r)}else o.classList.remove("mdc-list-item__primary-text"),o.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let e=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(e+=1),e}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(e=>e.nodeType!==e.COMMENT_NODE).some(e=>!!(e.textContent&&e.textContent.trim()))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,contentQueries:function(i,o,r){if(i&1&&(xt(r,iEt,4),xt(r,Vde,4)),i&2){let s;Le(s=Ne())&&(o._avatars=s),Le(s=Ne())&&(o._icons=s)}},hostVars:4,hostBindings:function(i,o){i&2&&(Ge("aria-disabled",o.disabled)("disabled",o._isButtonElement&&o.disabled||null),Vn("mdc-list-item--disabled",o.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}})}return t})();var FPe=(()=>{class t extends Lde{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],features:[jt([{provide:Lde,useExisting:t}]),ft],ngContentSelectors:WIt,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},styles:[YIt],encapsulation:2,changeDetection:0})}return t})(),PPe=(()=>{class t extends oEt{_lines;_titles;_meta;_unscopedContent;_itemText;get activated(){return this._activated}set activated(e){this._activated=_h(e)}_activated=!1;_getAriaCurrent(){return this._hostElement.nodeName==="A"&&this._activated?"page":null}_hasBothLeadingAndTrailing(){return this._meta.length!==0&&(this._avatars.length!==0||this._icons.length!==0)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Bde,5),xt(r,Nde,5),xt(r,tEt,5)),i&2){let s;Le(s=Ne())&&(o._lines=s),Le(s=Ne())&&(o._titles=s),Le(s=Ne())&&(o._meta=s)}},viewQuery:function(i,o){if(i&1&&(Ri(QIt,5),Ri(ZIt,5)),i&2){let r;Le(r=Ne())&&(o._unscopedContent=r.first),Le(r=Ne())&&(o._itemText=r.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:13,hostBindings:function(i,o){i&2&&(Ge("aria-current",o._getAriaCurrent()),Vn("mdc-list-item--activated",o.activated)("mdc-list-item--with-leading-avatar",o._avatars.length!==0)("mdc-list-item--with-leading-icon",o._icons.length!==0)("mdc-list-item--with-trailing-meta",o._meta.length!==0)("mat-mdc-list-item-both-leading-and-trailing",o._hasBothLeadingAndTrailing())("_mat-animation-noopable",o._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],features:[ft],ngContentSelectors:JIt,decls:10,vars:0,consts:[["unscopedContent",""],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mat-focus-indicator"]],template:function(i,o){if(i&1){let r=tt();Nn(XIt),pn(0),k(1,"span",1),pn(2,1),pn(3,2),k(4,"span",2,0),ie("cdkObserveContent",function(){return se(r),ae(o._updateItemLines(!0))}),pn(6,3),D()(),pn(7,4),pn(8,5),ce(9,"div",3)}},dependencies:[rIe],encapsulation:2,changeDetection:0})}return t})();var LPe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[eP,Br,Qg,sq,il]})}return t})();function rEt(t,n){if(t&1&&(k(0,"mat-list-item")(1,"mat-icon",0),Q(2,"calendar_today"),D(),k(3,"div",1),Q(4),Xn(5,"date"),D(),k(6,"div",2),Q(7,"Zeitpunkt der Erstellung"),D()()),t&2){let e=P();T(4),Qi(" ",Ls(5,1,e.data.resource.createdDate,"medium")," ")}}function sEt(t,n){if(t&1&&(k(0,"mat-list-item")(1,"mat-icon",0),Q(2,"help"),D(),k(3,"a",5),Q(4),D()()),t&2){let e=P();T(3),E("href",e.helpLink.link,dc),T(),Qi("Dokumentation ",e.helpLink.displayName)}}function aEt(t,n){if(t&1){let e=tt();k(0,"button",6),ie("click",function(){se(e);let o=P();return ae(o.editResource())}),k(1,"span"),Q(2,"Bearbeiten"),D()()}}function lEt(t,n){if(t&1){let e=tt();k(0,"button",7),ie("click",function(){se(e);let o=P();return ae(o.deleteResource())}),k(1,"span"),Q(2,"L\xF6schen"),D()()}}var NPe=(()=>{class t{constructor(e,i,o,r){this.locale=e,this.data=i,this._dialogRef=o,this._helpService=r,this.permissionDisplayText="",this.showEditButton=!1,this.showDeleteButton=!1,this.permissionDisplayText=Zz[e][this.data.resource.highestPermission],this.showDeleteButton=i.config.showDeleteButton&&Qz.includes(i.resource.highestPermission,"DELETE"),this.showEditButton=i.config.showEditButton&&Qz.includes(i.resource.highestPermission,"UPDATE"),this._helpService.findByKey(i.helpKey).then(s=>this.helpLink=s)}editResource(){this._dialogRef.close(F2.EDIT_RESOURCE)}deleteResource(){this._dialogRef.close(F2.DELETE_RESOURCE)}static{this.\u0275fac=function(i){return new(i||t)(_e(cp),_e(XC),_e(oy),_e(QY))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:20,vars:9,consts:[["matListItemIcon",""],["matListItemTitle",""],["matListItemLine",""],["mat-flat-button","","color","accent","data-test","resource-edit"],["mat-flat-button","","color","accent","data-test","resource-delete"],["matListItemTitle","","target","_blank","rel","noopener",3,"href"],["mat-flat-button","","color","accent","data-test","resource-edit",3,"click"],["mat-flat-button","","color","accent","data-test","resource-delete",3,"click"]],template:function(i,o){i&1&&(k(0,"mat-dialog-content")(1,"mat-list")(2,"mat-list-item")(3,"mat-icon",0),Q(4,"visibility"),D(),k(5,"div",1),Q(6),D()(),qe(7,rEt,8,4,"mat-list-item"),k(8,"mat-list-item")(9,"mat-icon",0),Q(10,"edit_calendar"),D(),k(11,"div",1),Q(12),Xn(13,"date"),D(),k(14,"div",2),Q(15,"Zeitpunkt der letzten \xC4nderung"),D()(),qe(16,sEt,5,2,"mat-list-item"),D()(),k(17,"mat-dialog-actions"),qe(18,aEt,3,0,"button",3),qe(19,lEt,3,0,"button",4),D()),i&2&&(T(6),dt(o.permissionDisplayText),T(),Ke(o.data.resource!=null&&o.data.resource.createdDate?7:-1),T(5),Qi(" ",Ls(13,6,o.data.resource.modifiedDate,"medium")," "),T(4),Ke(o.helpLink?16:-1),T(2),Ke(o.showEditButton?18:-1),T(),Ke(o.showDeleteButton?19:-1))},dependencies:[Hv,LPe,FPe,PPe,Vde,Bde,Nde,$o,mr,jv,Tn,yo,qf],styles:["a[_ngcontent-%COMP%]{text-decoration:none}a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}}return t})();var cEt=["menuButton"],jL=(()=>{class t extends dr{constructor(e,i){super(),this._dialog=e,this._confirmService=i,this.config=MPe,this.editResource=new ve,this.deleteResource=new ve}openMenu(e){let i=this.menuButtonRef.nativeElement.getBoundingClientRect();this._subs.push(this._dialog.open(NPe,{position:{right:`calc(100vw - ${e.x}px)`,top:`${i.bottom}px`},hasBackdrop:!0,data:{resource:this.resource,config:this.config,helpKey:this.helpKey}}).afterClosed().pipe(wn(o=>!!o)).subscribe(o=>{switch(o){case F2.DELETE_RESOURCE:{this._confirmService.get(Xz[this.resource.resourceName],`${Xz[this.resource.resourceName]} entg\xFCltig l\xF6schen ?`).then(r=>{r&&this.deleteResource.emit()});break}case F2.EDIT_RESOURCE:{this.editResource.emit();break}}}))}static{this.\u0275fac=function(i){return new(i||t)(_e(Yg),_e(iEe))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-resources-info-menu"]],viewQuery:function(i,o){if(i&1&&Ri(cEt,5,Bn),i&2){let r;Le(r=Ne())&&(o.menuButtonRef=r.first)}},inputs:{resource:"resource",helpKey:"helpKey",config:"config"},outputs:{editResource:"editResource",deleteResource:"deleteResource"},features:[ft],decls:4,vars:1,consts:[["menuButton",""],["mat-icon-button","","matTooltip","Info","aria-label","resource info menu",3,"click","data-test"]],template:function(i,o){if(i&1){let r=tt();k(0,"button",1,0),ie("click",function(d){return se(r),ae(o.openMenu(d))}),k(2,"mat-icon"),Q(3,"more_vert"),D()()}i&2&&E("data-test","resource-info-"+(o.resource==null?null:o.resource.resourceName))},dependencies:[Tn,xl,Hp,Up,Lp,$o,mr],encapsulation:2,changeDetection:0})}}return t})();var Ax=()=>!1,u_=()=>!0,kx=t=>[`/${t.resourceName}`,t.id],GL={disableFnc:Ax,detailLinkFnc:kx,filterFnc:u_,emptyResourcesText:"Keine Elemente gespeichert"};var dEt=()=>[25,50,100],uEt=()=>["name","labels","modifiedDate"];function pEt(t,n){if(t&1){let e=tt();k(0,"div")(1,"mat-form-field")(2,"input",8),ie("input",function(o){se(e),P();let r=ti(1);return ae(r.filterGlobal(o.target.value,"contains"))}),D()()()}}function hEt(t,n){t&1&&(k(0,"th",11),Q(1,"Labels"),D())}function mEt(t,n){if(t&1&&(k(0,"tr")(1,"th",9),Q(2," Name "),ce(3,"p-sortIcon",10),D(),qe(4,hEt,2,0,"th",11),k(5,"th"),H9(6,1),D(),k(7,"th",12)(8,"span"),H9(9,2),D(),ce(10,"p-sortIcon",13),D(),k(11,"th"),Q(12,"Link"),D()()),t&2){let e=P();T(4),Ke(e.options.showLabelsColumn?4:-1)}}function fEt(t,n){if(t&1&&(k(0,"td"),Q(1),D()),t&2){let e=P().$implicit;T(),Qi(" ",e.labels&&e.labels.length>0?e.labels.join(", "):""," ")}}function gEt(t,n){if(t&1&&(k(0,"tr",14)(1,"td"),Q(2),D(),qe(3,fEt,2,1,"td"),k(4,"td"),Q(5),D(),k(6,"td"),Q(7),Xn(8,"date"),D(),k(9,"td")(10,"a",15)(11,"mat-icon"),Q(12,"open_in_new"),D()()()()),t&2){let e=n.$implicit,i=P();E("pSelectableRow",e)("pSelectableRowDisabled",i.options.disableFnc(e)),T(2),dt(e.name),T(),Ke(i.options.showLabelsColumn?3:-1),T(2),Qi(" ",i.localizedPermissionDisplayNames[e.highestPermission]," "),T(2),dt(Ls(8,8,e.modifiedDate,"short")),T(3),E("routerLink",i.options.detailLinkFnc(e))("disabled",i.options.disableFnc(e))}}function _Et(t,n){if(t&1&&(k(0,"tr")(1,"td",16),Q(2),D()()),t&2){let e=P();T(2),dt(e.options.emptyResourcesText)}}var P2=(()=>{class t{constructor(e,i){this.locale=e,this._router=i,this.options=GL,this.resources=[],this.localizedPermissionDisplayNames=Zz[e]}onRowSelect(e){let i=this.options.detailLinkFnc(e);this._router.navigate(i)}static{this.\u0275fac=function(i){return new(i||t)(_e(cp),_e(dl))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-resources-list"]],inputs:{options:"options",resources:"resources"},decls:6,vars:9,consts:()=>{let e;e=$localize`Suchen`;let i;i=$localize`Berechtigung`;let o;return o=$localize`Letzte Änderung`,[["resourcesTable",""],i,o,["selectionMode","single","dataKey","id","styleClass","p-datatable-sm",3,"selectionChange","value","paginator","rows","sortField","sortOrder","rowsPerPageOptions","globalFilterFields"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["matInput","","placeholder",e,3,"input"],["pSortableColumn","name"],["field","name"],[2,"width","20%"],["pSortableColumn","modifiedDate"],["field","modifiedDate"],[3,"pSelectableRow","pSelectableRowDisabled"],["mat-icon-button","","color","accent",3,"routerLink","disabled"],["colspan","4"]]},template:function(i,o){if(i&1){let r=tt();k(0,"p-table",3,0),ie("selectionChange",function(d){return se(r),ae(o.onRowSelect(d))}),ee(2,pEt,3,0,"ng-template",4)(3,mEt,13,1,"ng-template",5)(4,gEt,13,11,"ng-template",6)(5,_Et,3,1,"ng-template",7),D()}i&2&&E("value",o.resources)("paginator",!0)("rows",25)("sortField","modifiedDate")("sortOrder",-1)("rowsPerPageOptions",uo(7,dEt))("globalFilterFields",uo(8,uEt))},dependencies:[il,tx,hc,hl,so,ME,_Pe,OE,Tn,xl,$o,mr,qK,pl,Fa,rs,Bs,qf],encapsulation:2})}}return t})();function yEt(t,n){t&1&&(k(0,"div",5)(1,"div",6)(2,"div",1),ce(3,"p-skeleton",7),D(),k(4,"div",8)(5,"div"),ce(6,"p-skeleton",2),D(),k(7,"div"),ce(8,"p-skeleton",3),D()()()())}var $L=(()=>{class t{constructor(){this.repetition=[1,2,3,4,5]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-resources-list-loading"]],decls:14,vars:0,consts:[[1,"flex","flex-col","md:flex-row","gap-0","md:gap-6"],[1,"flex-1"],["height","20px","width","100%"],["height","2px","width","100%"],[1,"basis-full","md:basis-1/5"],[1,"resources-list-item"],[1,"flex","flex-row","gap-6"],["height","20px","width","66%"],[1,"basis-full","md:basis-1/6"]],template:function(i,o){i&1&&(k(0,"div")(1,"div",0)(2,"div",1)(3,"div"),ce(4,"p-skeleton",2),D(),k(5,"div"),ce(6,"p-skeleton",3),D()(),k(7,"div",4)(8,"div"),ce(9,"p-skeleton",2),D(),k(10,"div"),ce(11,"p-skeleton",3),D()()(),lo(12,yEt,9,0,"div",5,jo),D()),i&2&&(T(12),co(o.repetition))},dependencies:[of,mm],styles:[".resources-list-item[_ngcontent-%COMP%]{padding:12px 24px}"]})}}return t})();var b0=class{constructor(n,e,i){this._resourceConfigItem=n,this._environmentService=e,this._cache=i}getBaseUrl(){return this._environmentService.load(this._resourceConfigItem.API_TOKENS.BASE)}deleteCacheForKey(n){this._cache.deleteCacheForKey(this.key(n))}key(n){return`${this._resourceConfigItem.API_TOKENS.BASE}__${n}`}};var p6=new fi("RESOURCE_REGISTRATION");var h6=(()=>{class t{constructor(e,i){this._resourceRegistration=e,this.injector=i}of(e){let i=this._resourceRegistration.find(o=>o.resourceName===e);if(i){let o=i.resourceService;return this.injector.get(o)}else throw new Error(`Resource ${e} has no service implemented`)}static{this.\u0275fac=function(i){return new(i||t)(di(p6),di(Oo))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var qL={disableFnc:Ax,detailLinkFnc:kx,filterFnc:u_,emptyResourcesText:"Keine Elemente gefunden",resourceNameTitle:"Element",selectOnInit:"none",resetOption:!0};var KL=class extends dr{constructor(n){super(),this._resourceServices=n,this.formLoading=!1,this.resourceCtrl=new yr(null),this._resourceOptionsLoaded$=new pi(1),this._resourceNameInProgress=!1,this._resourceSelectResolvingInProgress=!1}_onResourceNameChange(n){this.updateResourceNameInProgress(!0),this._resourceService=this._resourceServices.of(n),this.resourceOptions?(this.updateResourceNameInProgress(!1),this._resourceOptionsLoaded$.next(this.resourceOptions)):this._resourceService.findAll(this.config.minPermission,this.config.maxPermission).subscribe(e=>{this.updateResourceNameInProgress(!1),this.updateResourceOptions(e),this._resourceOptionsLoaded$.next(this.resourceOptions)})}_isHtmlElementInSideSheetContainer(n){return n.tagName==="td-side-sheet-container".toUpperCase()?!0:n.parentElement?this._isHtmlElementInSideSheetContainer(n.parentElement):!1}updateResourceOptions(n){this.resourceOptions=n.filter(e=>this.config.filterFnc(e)).map(e=>this.resourceAsInlineOption(e)).sort((e,i)=>cb.sort(e.resource,i.resource,cS))}addOption(n){let e=[...this.resourceOptions.map(i=>mt(be({},i),{resource:i.resource?i.resource?.clone():void 0}))];e.push(n),this.resourceOptions=Ui.unique(e,i=>i.id).sort((i,o)=>cb.sort(i.resource,o.resource,cS))}resourceAsAdminInlineOption(n){return this.resourceAsInlineOption(n,["italic"])}resourceAsInlineOption(n,e=void 0){return{id:n.id,disabled:this.config?n.hasError||this.config.disableFnc(n):n.hasError,resource:n,styleClass:e}}updateResourceNameInProgress(n){this._resourceNameInProgress=n,this.formLoading=this._resourceNameInProgress||this._resourceSelectResolvingInProgress}updateResourceSelectResolvingInProgress(n){this._resourceSelectResolvingInProgress=n,this.formLoading=this._resourceNameInProgress||this._resourceSelectResolvingInProgress}};function bEt(t,n){if(t&1&&(k(0,"div",3)(1,"span"),Q(2),D()()),t&2){let e=n.$implicit;T(),Oe(e.styleClass),T(),dt(e.resource.name)}}var dS=(()=>{class t extends KL{constructor(e,i){super(e),this._cdr=i,this.resourceSelects=[],this.resourceOptions=void 0,this.config=qL,this.resourceSelectChange=new ve,this.overlayOptions={mode:"overlay",appendTo:"body"},this.selectedItemsLabel="{0} ausgew\xE4hlt",this._subs.push(this.resourceCtrl.valueChanges.subscribe(o=>{this._onSelect(o)})),this._subs.push(this._resourceOptionsLoaded$.asObservable().subscribe(()=>this._cdr.markForCheck()))}ngOnChanges(e){e.resourceName&&(this._onResourceNameChange(this.resourceName),this.selectedItemsLabel=`{0} ${Xz[this.resourceName]} ausgew\xE4hlt`),e.resourceSelects&&e.resourceSelects.currentValue&&this._onResourceSelectChange(this.resourceSelects)}ngOnDestroy(){this.unsubscribeAll()}onChange(e){this._onSelect(e.value)}onSelectAllChange(e){this._onSelect(e.checked?this.resourceSelects:[])}onClearChange(){this._onSelect([])}_onSelect(e){this.resourceSelectChange.emit(e)}_onResourceSelectChange(e){this.updateResourceSelectResolvingInProgress(!0);let i=[];for(let o of e)if(o.resource)i.push(Promise.resolve(o));else{let r=this._resourceOptionsLoaded$.pipe(Mn(s=>s.some(d=>d.id===o.id)?ci(s.find(d=>d.id===o.id)):this._resourceService.findById(o.id).pipe(Sn(1),vt(d=>this.resourceAsAdminInlineOption(d)),Vo(d=>this.addOption(d)))));i.push(Wl(r))}Promise.all(i).then(o=>{this.resourceSelects=o.sort((r,s)=>cb.sort(r.resource,s.resource,cS)),this.updateResourceSelectResolvingInProgress(!1),this.resourceCtrl.setValue(this.resourceSelects,{emitEvent:!1})})}static{this.\u0275fac=function(i){return new(i||t)(_e(h6),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-resources-select-inline-multiple"]],inputs:{resourceSelects:"resourceSelects",resourceOptions:"resourceOptions",config:"config",resourceName:"resourceName"},outputs:{resourceSelectChange:"resourceSelectChange"},features:[ft,Ot],decls:6,vars:16,consts:[["item",""],["optionDisabled","disabled","optionLabel","resource.name","dataKey","id","styleClass","w-full mb-4","variant","filled",3,"onChange","onSelectAllChange","onClear","id","data-test","options","inputId","formControl","showToggleAll","showClear","dropdownIcon","placeholder","filterPlaceHolder","emptyFilterMessage","maxSelectedLabels","selectedItemsLabel","overlayOptions"],[3,"for"],[1,"flex","align-items-center","gap-2"]],template:function(i,o){if(i&1){let r=tt();k(0,"p-iftalabel")(1,"p-multiSelect",1),ie("onChange",function(d){return se(r),ae(o.onChange(d))})("onSelectAllChange",function(d){return se(r),ae(o.onSelectAllChange(d))})("onClear",function(){return se(r),ae(o.onClearChange())}),ee(2,bEt,3,3,"ng-template",null,0,Pt),D(),k(4,"label",2),Q(5),D()()}i&2&&(T(),E("id","bd-resource-select-inline-multiple-"+o.config.resourceNameTitle)("data-test","bd-resource-select-inline-multiple-"+o.config.resourceNameTitle)("options",o.resourceOptions)("inputId","bd-resource-select-inline-multiple-"+o.config.resourceNameTitle)("formControl",o.resourceCtrl)("showToggleAll",!0)("showClear",!0)("dropdownIcon",o.formLoading?"pi pi-spinner pi-spin":"pi pi-chevron-down")("placeholder",o.config.resourceNameTitle)("filterPlaceHolder",o.config.resourceNameTitle)("emptyFilterMessage",o.config.emptyResourcesText)("maxSelectedLabels",3)("selectedItemsLabel",o.selectedItemsLabel)("overlayOptions",o.overlayOptions),T(3),E("for","bd-resource-select-inline-multiple-"+o.config.resourceNameTitle),T(),dt(o.config.resourceNameTitle))},dependencies:[UY,Dx,hr,no,xr,zl,Lp,as],encapsulation:2})}}return t})();function CEt(t,n){if(t&1&&(k(0,"div",4)(1,"span"),Q(2),D()()),t&2){let e=P(2);T(),Oe(e.resourceSelect.styleClass),T(),dt(e.resourceSelect.resource.name)}}function xEt(t,n){if(t&1&&qe(0,CEt,3,3,"div",4),t&2){let e=P();Ke(e.resourceSelect&&e.resourceSelect.resource?0:-1)}}function wEt(t,n){if(t&1&&(k(0,"div",4)(1,"span"),Q(2),D()()),t&2){let e=n.$implicit;T(),Oe(e.styleClass),T(),dt(e.resource.name)}}var m6=(()=>{class t extends KL{constructor(e){super(e),this.resourceOptions=void 0,this.config=qL,this.resourceSelectChange=new ve,this.overlayOptions={mode:"overlay",appendTo:"body"},this.resourceCtrl.valueChanges.subscribe(i=>{this._onSelect(i)})}ngOnChanges(e){e.resourceSelect&&e.resourceSelect.currentValue&&this._onResourceSelectChange(this.resourceSelect),e.resourceName&&this._onResourceNameChange(this.resourceName),e.resourceOptions&&(this.resourceOptions=this.resourceOptions.filter(i=>this.config.filterFnc(i.resource)).sort((i,o)=>cb.sort(i.resource,o.resource,cS)))}onChange(e){this._onSelect(e.value)}onClearChange(){this._onSelect(null)}_onSelect(e){this.resourceSelect=e,this.resourceSelectChange.emit(e)}_onResourceSelectChange(e){this.updateResourceSelectResolvingInProgress(!0);let i=null;e.resource?i=Promise.resolve(e):i=Wl(this._resourceOptionsLoaded$.asObservable().pipe(Mn(o=>o.some(r=>r.id===e.id)?ci(o.find(r=>r.id===e.id)):this._resourceService.findById(e.id).pipe(Sn(1),vt(r=>this.resourceAsAdminInlineOption(r)),Vo(r=>this.addOption(r)))))),i.then(o=>{this.updateResourceSelectResolvingInProgress(!1),this.resourceSelect=o,this.resourceCtrl.setValue(o)})}static{this.\u0275fac=function(i){return new(i||t)(_e(h6))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-resources-select-inline-single"]],inputs:{resourceSelect:"resourceSelect",resourceOptions:"resourceOptions",config:"config",resourceName:"resourceName"},outputs:{resourceSelectChange:"resourceSelectChange"},features:[ft,Ot],decls:8,vars:14,consts:[["selectedItem",""],["item",""],["optionDisabled","disabled","optionLabel","resource.name","dataKey","id","styleClass","w-full mb-4","variant","filled",3,"onChange","onClear","id","options","overlayOptions","inputId","formControl","showClear","dropdownIcon","filter","filterPlaceholder","placeholder","emptyMessage","emptyFilterMessage"],[3,"for"],[1,"flex","align-items-center","gap-2"]],template:function(i,o){if(i&1){let r=tt();k(0,"p-iftalabel")(1,"p-select",2),ie("onChange",function(d){return se(r),ae(o.onChange(d))})("onClear",function(){return se(r),ae(o.onClearChange())}),ee(2,xEt,1,1,"ng-template",null,0,Pt)(4,wEt,3,3,"ng-template",null,1,Pt),D(),k(6,"label",3),Q(7),D()()}i&2&&(T(),E("id","bd-resource-select-inline-single-"+o.config.resourceNameTitle)("options",o.resourceOptions)("overlayOptions",o.overlayOptions)("inputId","bd-resource-select-inline-single-"+o.config.resourceNameTitle)("formControl",o.resourceCtrl)("showClear",(o.config==null?null:o.config.resetOption)===!0||!1)("dropdownIcon",o.formLoading?"pi pi-spinner pi-spin":"pi pi-chevron-down")("filter",!0)("filterPlaceholder",o.config.resourceNameTitle)("placeholder",o.config.resourceNameTitle)("emptyMessage",o.config.emptyResourcesText)("emptyFilterMessage",o.config.emptyResourcesText),T(5),E("for","bd-resource-select-inline-single-"+o.config.resourceNameTitle),T(),dt(o.config.resourceNameTitle))},dependencies:[hr,no,xr,zl,as,Ql],encapsulation:2})}}return t})();var na=class{constructor(n){this.id=n}},xy=(function(t){return t.LESS_OR_EQUAL="LESS_OR_EQUAL",t.GREATER_OR_EQUAL="GREATER_OR_EQUAL",t})(xy||{}),WL=(function(t){return t[t.LEGACY=0]="LEGACY",t[t.AS_NULL=1]="AS_NULL",t})(WL||{}),ho=class extends na{constructor(n,e=[],i=[],o=WL.AS_NULL){super(n),this.includes=e,this.excludes=i,this._emptyArrayStrategy=o}toJSON(){return{[this.id]:{includes:this._arrayToJson(this.includes,this._emptyArrayStrategy),excludes:this._arrayToJson(this.excludes,this._emptyArrayStrategy)}}}_arrayToJson(n,e=WL.AS_NULL){return e===WL.LEGACY||n?.length>0?n:null}};var p_=class extends ho{constructor(n,e,i,o,r,s,d,m=[],v=[]){super(n,m,v,WL.LEGACY),this.codeSpectrumIds=e,this.codingSystem=i,this.matching=o,this.codeTypeSpecification=r,this.codeTypeClassification=s,this.grouperVersionYear=d}toJSON(){let n={includes:this._arrayToJson(this.includes,this._emptyArrayStrategy),excludes:this._arrayToJson(this.excludes,this._emptyArrayStrategy)};return this.codeSpectrumIds&&(n.codeSpectrumIds=this.codeSpectrumIds),this.codingSystem&&(n.codingSystem=this.codingSystem),this.matching&&(n.matching=this.matching),this.codeTypeSpecification&&(n.codeTypeSpecification=this.codeTypeSpecification),this.codeTypeClassification&&(n.codeTypeClassification=this.codeTypeClassification),this.grouperVersionYear&&(n.grouperVersionYear=this.grouperVersionYear),{[this.id]:n}}};var C0=class extends p_{constructor(n,e=[],i=[],o,r,s,d,m,v,w){super(n,o,r,s,d,m,v,e,i),this.numberOfDigits=w}toJSON(){let n=super.toJSON();return this.numberOfDigits&&(n[this.id]=Object.assign(n[this.id],{numberOfDigits:this.numberOfDigits})),n}};var ZY=class extends na{constructor(n,e){super(n),this.bool=e}toJSON(){return{[this.id]:{flag:this.bool}}}};var zde="clinicId",RE=class extends ho{constructor(n,e){super(zde,n,e)}};var TEt="additionalGrouperVersionDrgCode",f6=class extends ho{constructor(n,e,i){super(TEt,e,i),this.grouperVersionYear=n}toJSON(){return{[this.id]:{grouperVersionYear:this.grouperVersionYear,includes:this._arrayToJson(this.includes,this._emptyArrayStrategy),excludes:this._arrayToJson(this.excludes,this._emptyArrayStrategy)}}}};var IEt="drivingTime",L2=class extends na{constructor(n,e){super(IEt),this.value=n,this.comparison=e}toJSON(){return{[this.id]:{value:this.value,comparison:this.comparison}}}};var YL=class extends na{constructor(n,e=null){super(n),this.equals=e}toJSON(){return{[this.id]:{equals:this.equals}}}};var QL=class extends na{constructor(n,e){super(n),this.conditions=e}toJSON(){let n=[];return this.conditions.forEach(e=>{n.push(e.toJSON())}),{[this.id]:{conditions:n}}}};var g6="or",FE=class extends QL{constructor(n=[]){super(g6,n)}};var _6="and",Gu=class extends QL{constructor(n=[]){super(_6,n)}};var VPe="dismissalDateTime",y6=class extends na{constructor(n,e,i){super(VPe),this.value=n,this.comparison=e,this.dateTransformFn=i}toJSON(){return{[VPe]:{value:this.dateTransformFn(this.value),comparison:this.comparison}}}};var C2n=Symbol.for("constructDateFrom");function zPe(t,n,e="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:t,timeZoneName:e}).format(n).split(/\s/g).slice(2).join(" ")}var EEt={},v6={};function uS(t,n){try{let i=(EEt[t]||=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).format)(n).split("GMT")[1];return i in v6?v6[i]:UPe(i,i.split(":"))}catch{if(t in v6)return v6[t];let e=t?.match(DEt);return e?UPe(t,e.slice(1)):NaN}}var DEt=/([+-]\d\d):?(\d\d)?/;function UPe(t,n){let e=+(n[0]||0),i=+(n[1]||0),o=+(n[2]||0)/60;return v6[t]=e*60+i>0?e*60+i+o:e*60-i-o}var PE=class t extends Date{constructor(...n){super(),n.length>1&&typeof n[n.length-1]=="string"&&(this.timeZone=n.pop()),this.internal=new Date,isNaN(uS(this.timeZone,this))?this.setTime(NaN):n.length?typeof n[0]=="number"&&(n.length===1||n.length===2&&typeof n[1]!="number")?this.setTime(n[0]):typeof n[0]=="string"?this.setTime(+new Date(n[0])):n[0]instanceof Date?this.setTime(+n[0]):(this.setTime(+new Date(...n)),jPe(this,NaN),Ude(this)):this.setTime(Date.now())}static tz(n,...e){return e.length?new t(...e,n):new t(Date.now(),n)}withTimeZone(n){return new t(+this,n)}getTimezoneOffset(){let n=-uS(this.timeZone,this);return n>0?Math.floor(n):Math.ceil(n)}setTime(n){return Date.prototype.setTime.apply(this,arguments),Ude(this),+this}[Symbol.for("constructDateFrom")](n){return new t(+new Date(n),this.timeZone)}},HPe=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!HPe.test(t))return;let n=t.replace(HPe,"$1UTC");PE.prototype[n]&&(t.startsWith("get")?PE.prototype[t]=function(){return this.internal[n]()}:(PE.prototype[t]=function(){return Date.prototype[n].apply(this.internal,arguments),AEt(this),+this},PE.prototype[n]=function(){return Date.prototype[n].apply(this,arguments),Ude(this),+this}))});function Ude(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(-uS(t.timeZone,t)*60))}function AEt(t){Date.prototype.setFullYear.call(t,t.internal.getUTCFullYear(),t.internal.getUTCMonth(),t.internal.getUTCDate()),Date.prototype.setHours.call(t,t.internal.getUTCHours(),t.internal.getUTCMinutes(),t.internal.getUTCSeconds(),t.internal.getUTCMilliseconds()),jPe(t)}function jPe(t){let n=uS(t.timeZone,t),e=n>0?Math.floor(n):Math.ceil(n),i=new Date(+t);i.setUTCHours(i.getUTCHours()-1);let o=-new Date(+t).getTimezoneOffset(),r=-new Date(+i).getTimezoneOffset(),s=o-r,d=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();s&&d&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+s);let m=o-e;m&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+m);let v=new Date(+t);v.setUTCSeconds(0);let w=o>0?v.getSeconds():(v.getSeconds()-60)%60,O=Math.round(-(uS(t.timeZone,t)*60))%60;(O||w)&&(t.internal.setUTCSeconds(t.internal.getUTCSeconds()+O),Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+O+w));let N=uS(t.timeZone,t),V=N>0?Math.floor(N):Math.ceil(N),q=-new Date(+t).getTimezoneOffset()-V,W=V!==e,te=q-m;if(W&&te){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+te);let fe=uS(t.timeZone,t),xe=fe>0?Math.floor(fe):Math.ceil(fe),Fe=V-xe;Fe&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+Fe),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+Fe))}}var b6=class t extends PE{static tz(n,...e){return e.length?new t(...e,n):new t(Date.now(),n)}toISOString(){let[n,e,i]=this.tzComponents(),o=`${n}${e}:${i}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[n,e,i,o]=this.internal.toUTCString().split(" ");return`${n?.slice(0,-1)} ${i} ${e} ${o}`}toTimeString(){let n=this.internal.toUTCString().split(" ")[4],[e,i,o]=this.tzComponents();return`${n} GMT${e}${i}${o} (${zPe(this.timeZone,this)})`}toLocaleString(n,e){return Date.prototype.toLocaleString.call(this,n,mt(be({},e),{timeZone:e?.timeZone||this.timeZone}))}toLocaleDateString(n,e){return Date.prototype.toLocaleDateString.call(this,n,mt(be({},e),{timeZone:e?.timeZone||this.timeZone}))}toLocaleTimeString(n,e){return Date.prototype.toLocaleTimeString.call(this,n,mt(be({},e),{timeZone:e?.timeZone||this.timeZone}))}tzComponents(){let n=this.getTimezoneOffset(),e=n>0?"-":"+",i=String(Math.floor(Math.abs(n)/60)).padStart(2,"0"),o=String(Math.abs(n)%60).padStart(2,"0");return[e,i,o]}withTimeZone(n){return new t(+this,n)}[Symbol.for("constructDateFrom")](n){return new t(+new Date(n),this.timeZone)}};var kEt="dateInterval",LE=class extends na{constructor(n){super(kEt),this.interval=n}toJSON(){return this._transform().toJSON()}_transform(){return new Gu([new y6(this.interval.start,xy.GREATER_OR_EQUAL,n=>Q5(ly(this._createTimeZoneDate(n)).withTimeZone("Etc/UTC"))),new y6(this.interval.end,xy.LESS_OR_EQUAL,n=>Q5(DDe(this._createTimeZoneDate(n)).withTimeZone("Etc/UTC")))])}_createTimeZoneDate(n){return new b6(n.toISOString(),"Etc/UTC").withTimeZone("Europe/Berlin")}};var Hde="mainDiagnosis",jde="mainDiagnosisLeftAnchored",C6=class extends p_{constructor(n,e,i,o,r,s,d,m){super(Hde,i,o,r,s,d,m,n,e)}},x6=class extends C0{constructor(n,e,i,o,r,s,d,m,v){super(jde,n,e,i,o,r,s,d,m,v)}};var Gde="mainProcedure",$de="mainProcedureLeftAnchored",XY=class extends p_{constructor(n,e,i,o,r,s,d,m){super(Gde,i,o,r,s,d,m,n,e)}},JY=class extends C0{constructor(n,e,i,o,r,s,d,m,v){super($de,n,e,i,o,r,s,d,m,v)}};var qde="opsCode",Kde="opsCodeLeftAnchored",NE=class extends p_{constructor(n,e,i,o,r,s,d,m){super(qde,i,o,r,s,d,m,n,e)}},eQ=class extends C0{constructor(n,e,i,o,r,s,d,m,v){super(Kde,n,e,i,o,r,s,d,m,v)}};var ZL=class extends na{constructor(n,e=null,i=null){super(n),this.from=e,this.to=i}toJSON(){return{[this.id]:{from:this.from,to:this.to}}}};var MEt="relativeInterval",w6=class extends na{constructor(n){super(MEt),this.intervalRelative=n}toJSON(){return this._unitToCondition().toJSON()}isValid(){return!!this.intervalRelative}_unitToCondition(){let n=new jp(this.intervalRelative.startDate,this.intervalRelative.endDate);return new LE(n)}};var Wde="skCode",Yde="skCodeLeftAnchored",tQ=class extends p_{constructor(n,e,i,o,r,s,d,m){super(Wde,i,o,r,s,d,m,n,e)}},iQ=class extends C0{constructor(n,e,i,o,r,s,d,m,v){super(Yde,n,e,i,o,r,s,d,m,v)}};var Qde="secondaryDiagnosis",Zde="secondaryDiagnosisLeftAnchored",S6=class extends p_{constructor(n,e,i,o,r,s,d,m){super(Qde,i,o,r,s,d,m,n,e)}},T6=class extends C0{constructor(n,e,i,o,r,s,d,m,v){super(Zde,n,e,i,o,r,s,d,m,v)}};var GPe="true",BE=class extends na{constructor(){super(GPe)}toJSON(){return{[GPe]:{}}}};var Xde="year",ub=class extends ho{constructor(n,e){super(Xde,n,e)}};var hn=class{constructor(n){this.type=n}equals(n){return!!n&&this.type===n.type}valid(){let n=this.toValue();return n instanceof Array?!!n&&n.length>0:!!n}hasRelativeTimeSelection(){return!1}getChildResources(){return{}}overrideClone(n){return this.clone()}getOverrideProperties(n,e){return[]}};var I6=class{static fromObject(n,e){switch(n.kind){case"AND":return x0.fromObject(n,e);case"OR":return Mx.fromObject(n,e);default:throw new Error(`Missing implementation for FilterConditionCombinations.fromObject for input[${JSON.stringify(n)}]`)}}static fromConditionJson(n,e,i){switch(n){case _6:return x0.fromConditionJson(e,i);case g6:return Mx.fromConditionJson(e,i);default:throw new Error(`Missing implementation for FilterConditionCombinations.fromObject for input[${JSON.stringify(e)}]`)}}},nQ=class{static fromObject(n,e){throw new Error(JSON.stringify([n,e]))}static fromConditionJson(n,e){throw new Error(JSON.stringify([n,e]))}constructor(n){this.expression=n,this.type="combination"}equals(n){return vo.equals(this,n,(e,i)=>e.type===i.type)&&vo.equals(this.kind,n.kind)&&vo.equals(this.expression,n.expression,(e,i)=>e.length===i.length)&&this.expression.every((e,i)=>$a.equals(e,n.expression.at(i)))}valid(){return!!this.kind&&(this.expression.length===0||this.expression.every(n=>n.valid()))}getChildResources(){return this.expression.map(n=>n.getChildResources()).reduce((n,e)=>TE.merge(n,e),{})}getOverrideProperties(n,e){return this.expression.map(i=>i.getOverrideProperties(n,e)).reduce((i,o)=>[...i,...o],[])}hasRelativeTimeSelection(){return this.expression.some(n=>n.hasRelativeTimeSelection())}toJSON(){return{type:this.type,kind:this.kind,expression:this.expression.filter(n=>!!n).map(n=>n.toJSON())}}toText(){return this.expression.filter(n=>!!n).map(n=>n.type==="combination"?`( ${n.toText()} )`:n.toText()).join(` ${this.kindToText()} `)}},x0=class t extends nQ{static fromObject(n,e){return Promise.all(n.expression.map(i=>$a.fromObject(i,e))).then(i=>new t(i))}static fromConditionJson(n,e){return Promise.all(n.conditions.map(i=>$a.fromConditionJson(i,e))).then(i=>new t(i))}constructor(n){super(n),this.kind="AND"}clone(){return new t([...this.expression.map(n=>n.clone())])}overrideClone(n){return new t(this.expression.map(e=>e.overrideClone(n)).filter(e=>!!e))}toCondition(n){return Promise.all(this.expression.filter(e=>e.valid()).map(e=>e.toCondition(n))).then(e=>new Gu(e))}kindToText(){return"und"}},Mx=class t extends nQ{static fromObject(n,e){return Promise.all(n.expression.map(i=>$a.fromObject(i,e))).then(i=>new t(i))}static fromConditionJson(n,e){let i=n.conditions.map(o=>$a.fromConditionJson(o,e));return Promise.all(i).then(o=>new t(o))}constructor(n){super(n),this.kind="OR"}clone(){return new t([...this.expression.map(n=>n.clone())])}overrideClone(n){return new t(this.expression.map(e=>e.overrideClone(n)).filter(e=>!!e))}toCondition(n){return Promise.all(this.expression.filter(e=>e.valid()).map(e=>e.toCondition(n))).then(e=>new FE(e))}kindToText(){return"oder"}};var Jde="administrativeDistrictId",XL={type:"administrativeDistrictIds",category:"person",displayName:{de:"Landkreise"},sortingIndex:4,occurrence:"single",fromObject(t){return Promise.resolve(new lf(t.administrativeDistrictIds.map(n=>Yo.create(n))))},fromCondition(t){return Promise.resolve(new lf(t?.includes?.map(n=>Yo.create(n))))},newInstance(){return Promise.resolve(new lf([]))}},lf=(()=>{class t extends hn{static{this.Specification=XL}constructor(e){super(XL.type),this.administrativeDistrictIds=e}clone(){return new t([...this.administrativeDistrictIds.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ui.equals(this.administrativeDistrictIds,e.administrativeDistrictIds,(i,o)=>i.value===o.value)}validationToText(){return this.administrativeDistrictIds.length===0?"Mindestens einen Landkreis ausw\xE4hlen":""}toCondition(){return Promise.resolve(new N2(this.administrativeDistrictIds))}toJSON(){return{type:this.type,administrativeDistrictIds:this.administrativeDistrictIds.map(e=>e.getNumericValue())}}toText(){return this.administrativeDistrictIds.length===1?"ein Landkreis":`${this.administrativeDistrictIds.length} Landkreise`}toValue(){return this.administrativeDistrictIds}}return t})(),N2=class extends ho{constructor(n,e){super(Jde,n?n.map(i=>i.getNumericValue()):null,e?e.map(i=>i.getNumericValue()):null)}};var tue="administrativeRegion",JL={type:"administrativeRegionIds",category:"person",displayName:{de:"Regierungsbezirke"},sortingIndex:2,occurrence:"single",fromObject(t){return Promise.resolve(new wy(t.administrativeRegionIds))},fromCondition(t){return Promise.resolve(new wy(t.includes))},newInstance(){return Promise.resolve(new wy([]))}},wy=(()=>{class t extends hn{static{this.Specification=JL}constructor(e){super(JL.type),this.administrativeRegionIds=e}clone(){return new t([...this.administrativeRegionIds?this.administrativeRegionIds:[]])}equals(e){return super.equals(e)&&Ui.equals(this.administrativeRegionIds,e.administrativeRegionIds)}validationToText(){return this.administrativeRegionIds.length===0?"Mindestens einen Regierungsbezirk ausw\xE4hlen":""}toCondition(){return Promise.resolve(new eue(this.administrativeRegionIds,[]))}toJSON(){return{type:this.type,administrativeRegionIds:this.administrativeRegionIds}}toText(){switch(this.administrativeRegionIds.length){case 0:return"keine Regierungsbezirke";case 1:return"ein Regierungsbezirk";default:return`${this.administrativeRegionIds.length} Regierungsbezirke`}}toValue(){return this.administrativeRegionIds}}return t})(),eue=class extends ho{constructor(n,e){super(tue,n,e)}};var nue="admissionCause",E6={type:"admissionCauses",category:"case",displayName:{de:"Aufnahmeanlass"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new B2(t.admissionCauses))},fromCondition(t){return Promise.resolve(new B2(t?.includes??[]))},newInstance(){return Promise.resolve(new B2([]))}},B2=(()=>{class t extends hn{static{this.Specification=E6}constructor(e){super(E6.type),this.admissionCauses=e}clone(){return new t([...this.admissionCauses.slice()])}equals(e){return super.equals(e)&&Ui.equals(this.admissionCauses,e.admissionCauses)}validationToText(){return this.admissionCauses.length===0?"Mindestens einen Aufnahmeanlass ausw\xE4hlen":""}toCondition(){return Promise.resolve(new iue(this.admissionCauses,[]))}toJSON(){return{type:this.type,admissionCauses:this.admissionCauses}}toText(){return this.admissionCauses.length===1?"ein Aufnahmeanlass":`${this.admissionCauses.length} Aufnahmeanl\xE4sse`}toValue(){return this.admissionCauses}}return t})(),iue=class extends ho{constructor(n,e){super(nue,n,e)}};var rue="admissionReason",D6={type:"admissionReasons",category:"case",displayName:{de:"Aufnahmegrund"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new VE(t.admissionReasons))},fromCondition(t){return Promise.resolve(new VE(t.includes))},newInstance(){return Promise.resolve(new VE([]))}},VE=(()=>{class t extends hn{static{this.Specification=D6}constructor(e){super(D6.type),this.admissionReasons=e}clone(){return new t([...this.admissionReasons])}equals(e){return super.equals(e)&&Ui.equals(this.admissionReasons,e.admissionReasons)}validationToText(){return this.admissionReasons.length===0?"Mindestens einen Aufnahmegrund ausw\xE4hlen":""}toCondition(){return Promise.resolve(new oue(this.admissionReasons,[]))}toJSON(){return{type:this.type,admissionReasons:this.admissionReasons}}toText(){return this.admissionReasons.length===1?"ein Aufnahmegrund":`${this.admissionReasons.length} Aufnahmegr\xFCnde`}toValue(){return this.admissionReasons}}return t})(),oue=class extends ho{constructor(n,e){super(rue,n,e)}};var aue="agmId",eN={type:"ageGroups",category:"person",displayName:{de:"Altersgruppen"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new Ox(t.agm))},fromCondition(t){return Promise.resolve(new Ox(t.includes))},newInstance(){return Promise.resolve(new Ox([]))}},Ox=(()=>{class t extends hn{static{this.Specification=eN}constructor(e){super(eN.type),this.agm=e}clone(){return new t([...this.agm])}equals(e){return super.equals(e)&&Ui.equals(this.agm,e.agm)}validationToText(){return this.agm.length===0?"Mindestens eine Altersgruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new sue(this.agm,[]))}toJSON(){return{type:this.type,agm:this.agm}}toText(){return this.agm.length===1?"eine Altersgruppe":`${this.agm.length} Altersgruppen`}toValue(){return this.agm}}return t})(),sue=class extends ho{constructor(n,e){super(aue,n,e)}};var V2=class t{static fromObject(n={}){return new t(n.from,n.to)}constructor(n,e){this.from=n,this.to=e}equals(n){return this.to===n.to&&this.from===n.from}clone(){return new t(this.from,this.to)}};var $Pe={E:"Einweisung durch den Arzt",Z:"Einweisung durch den Zahnarzt",N:"Notfall",R:"Aufnahme nach vorausgehender Behandlung in einer Rehabilitationseinrichtung",V:"Verlegung mit Behandlungsdauer im verlegenden Krankenhaus laenger als 24 Stunden",A:"Verlegung mit Behandlungsdauer im verlegenden Krankenhaus bis zu 24 Stunden",G:"Geburt",B:"Begleitperson"};var lue={"0101":"Krankenhausbehandlung, vollstationa\u0308r - Normalfall","0102":"Krankenhausbehandlung, vollstationa\u0308r - Arbeitsunfall / Berufskrankheit (\xA7 11 Abs. 5 SGB V)","0103":"Krankenhausbehandlung, vollstationa\u0308r - Verkehrsunfall / Sportunfall / Sonstiger Unfall (z. B. \xA7 116 SGB X)","0104":"Krankenhausbehandlung, vollstationa\u0308r - Hinweis auf Einwirkung von a\u0308u\xDFerer Gewalt","0106":"Krankenhausbehandlung, vollstationa\u0308r - Kriegsbescha\u0308digten-Leiden / BVG-Leiden","0107":"Krankenhausbehandlung, vollstationa\u0308r - Notfall","0201":"Krankenhausbehandlung vollstationa\u0308r mit vorausgegangener vorstationa\u0308rer Behandlung - Normalfall","0202":"Krankenhausbehandlung vollstationa\u0308r mit vorausgegangener vorstationa\u0308rer Behandlung - Arbeitsunfall / Berufskrankheit (\xA7 11 Abs. 5 SGB V)","0203":"Krankenhausbehandlung vollstationa\u0308r mit vorausgegangener vorstationa\u0308rer Behandlung - Verkehrsunfall / Sportunfall / Sonstiger Unfall (z. B. \xA7 116 SGB X)","0204":"Krankenhausbehandlung vollstationa\u0308r mit vorausgegangener vorstationa\u0308rer Behandlung - Hinweis auf Einwirkung von a\u0308u\xDFerer Gewalt","0206":"Krankenhausbehandlung vollstationa\u0308r mit vorausgegangener vorstationa\u0308rer Behandlung - Kriegsbescha\u0308digten-Leiden / BVG-Leiden","0207":"Krankenhausbehandlung vollstationa\u0308r mit vorausgegangener vorstationa\u0308rer Behandlung - Notfall","0301":"Krankenhausbehandlung, teilstationa\u0308r - Normalfall","0302":"Krankenhausbehandlung, teilstationa\u0308r - Arbeitsunfall / Berufskrankheit (\xA7 11 Abs. 5 SGB V)","0303":"Krankenhausbehandlung, teilstationa\u0308r - Verkehrsunfall / Sportunfall / Sonstiger Unfall (z. B. \xA7 116 SGB X)","0304":"Krankenhausbehandlung, teilstationa\u0308r - Hinweis auf Einwirkung von a\u0308u\xDFerer Gewalt","0306":"Krankenhausbehandlung, teilstationa\u0308r - Kriegsbescha\u0308digten-Leiden / BVG-Leiden","0307":"Krankenhausbehandlung, teilstationa\u0308r - Notfall","0401":"Vorstationa\u0308re Behandlung ohne anschlie\xDFende vollstationa\u0308re Behandlung - Normalfall","0402":"Vorstationa\u0308re Behandlung ohne anschlie\xDFende vollstationa\u0308re Behandlung - Arbeitsunfall / Berufskrankheit (\xA7 11 Abs. 5 SGB V)","0403":"Vorstationa\u0308re Behandlung ohne anschlie\xDFende vollstationa\u0308re Behandlung - Verkehrsunfall / Sportunfall / Sonstiger Unfall (z. B. \xA7 116 SGB X)","0404":"Vorstationa\u0308re Behandlung ohne anschlie\xDFende vollstationa\u0308re Behandlung - Hinweis auf Einwirkung von a\u0308u\xDFerer Gewalt","0406":"Vorstationa\u0308re Behandlung ohne anschlie\xDFende vollstationa\u0308re Behandlung - Kriegsbescha\u0308digten-Leiden / BVG-Leiden","0407":"Vorstationa\u0308re Behandlung ohne anschlie\xDFende vollstationa\u0308re Behandlung - Notfall","0501":"Stationa\u0308re Entbindung - Normalfall","0502":"Stationa\u0308re Entbindung - Arbeitsunfall / Berufskrankheit (\xA7 11 Abs. 5 SGB V)","0503":"Stationa\u0308re Entbindung - Verkehrsunfall / Sportunfall / Sonstiger Unfall (z. B. \xA7 116 SGB X)","0504":"Stationa\u0308re Entbindung - Hinweis auf Einwirkung von a\u0308u\xDFerer Gewalt","0506":"Stationa\u0308re Entbindung - Kriegsbescha\u0308digten-Leiden / BVG-Leiden","0507":"Stationa\u0308re Entbindung - Notfall","0601":"Geburt - Normalfall","0602":"Geburt - Arbeitsunfall / Berufskrankheit (\xA7 11 Abs. 5 SGB V)","0603":"Geburt - Verkehrsunfall / Sportunfall / Sonstiger Unfall (z. B. \xA7 116 SGB X)","0604":"Geburt - Hinweis auf Einwirkung von a\u0308u\xDFerer Gewalt","0606":"Geburt - Kriegsbescha\u0308digten-Leiden / BVG-Leiden","0607":"Geburt - Notfall","0701":"Wiederaufnahme wegen Komplikationen (Fallpauschale) nach KFPV 2003 - Normalfall","0702":"Wiederaufnahme wegen Komplikationen (Fallpauschale) nach KFPV 2003 - Arbeitsunfall / Berufskrankheit (\xA7 11 Abs. 5 SGB V)","0703":"Wiederaufnahme wegen Komplikationen (Fallpauschale) nach KFPV 2003 - Verkehrsunfall / Sportunfall / Sonstiger Unfall (z. B. \xA7 116 SGB X)","0704":"Wiederaufnahme wegen Komplikationen (Fallpauschale) nach KFPV 2003 - Hinweis auf Einwirkung von a\u0308u\xDFerer Gewalt","0706":"Wiederaufnahme wegen Komplikationen (Fallpauschale) nach KFPV 2003 - Kriegsbescha\u0308digten-Leiden / BVG-Leiden","0707":"Wiederaufnahme wegen Komplikationen (Fallpauschale) nach KFPV 2003 - Notfall","0801":"Stationa\u0308re Aufnahme zur Organentnahme - Normalfall","0802":"Stationa\u0308re Aufnahme zur Organentnahme - Arbeitsunfall / Berufskrankheit (\xA7 11 Abs. 5 SGB V)","0803":"Stationa\u0308re Aufnahme zur Organentnahme - Verkehrsunfall / Sportunfall / Sonstiger Unfall (z. B. \xA7 116 SGB X)","0804":"Stationa\u0308re Aufnahme zur Organentnahme - Hinweis auf Einwirkung von a\u0308u\xDFerer Gewalt","0806":"Stationa\u0308re Aufnahme zur Organentnahme - Kriegsbescha\u0308digten-Leiden / BVG-Leiden","0807":"Stationa\u0308re Aufnahme zur Organentnahme - Notfall",1001:"Stationsa\u0308quivalente Behandlung - Normalfall",1002:"Stationsa\u0308quivalente Behandlung - Arbeitsunfall / Berufskrankheit (\xA7 11 Abs. 5 SGB V)",1003:"Stationsa\u0308quivalente Behandlung - Verkehrsunfall / Sportunfall / Sonstiger Unfall (z. B. \xA7 116 SGB X)",1004:"Stationsa\u0308quivalente Behandlung - Hinweis auf Einwirkung von a\u0308u\xDFerer Gewalt",1006:"Stationsa\u0308quivalente Behandlung - Kriegsbescha\u0308digten-Leiden / BVG-Leiden",1007:"Stationsa\u0308quivalente Behandlung - Notfall",1201:"Krankenhausbehandlung nach \xA7115f SGB V (Hybrid-DRG) - Normalfall",1202:"Krankenhausbehandlung nach \xA7115f SGB V (Hybrid-DRG) - Arbeitsunfall / Berufskrankheit (\xA7 11 Abs. 5 SGB V)",1203:"Krankenhausbehandlung nach \xA7115f SGB V (Hybrid-DRG) - Verkehrsunfall / Sportunfall / Sonstiger Unfall (z. B. \xA7 116 SGB X)",1204:"Krankenhausbehandlung nach \xA7115f SGB V (Hybrid-DRG) - Hinweis auf Einwirkung von a\u0308u\xDFerer Gewalt",1206:"Krankenhausbehandlung nach \xA7115f SGB V (Hybrid-DRG) - Kriegsbescha\u0308digten-Leiden / BVG-Leiden",1207:"Krankenhausbehandlung nach \xA7115f SGB V (Hybrid-DRG) - Notfall",1208:"Krankenhausbehandlung nach \xA7115f SGB V (Hybrid-DRG) - Erprobungsleistung nach \xA7137e SGB V"};var oQ={1:"Im Alter von 0 bis unter 1 Jahr",2:"Im Alter von 1 bis unter 5 Jahren",3:"Im Alter von 5 bis unter 10 Jahren",4:"Im Alter von 10 bis unter 15 Jahren",5:"Im Alter von 15 bis unter 20 Jahren",6:"Im Alter von 20 bis unter 25 Jahren",7:"Im Alter von 25 bis unter 30 Jahren",8:"Im Alter von 30 bis unter 35 Jahren",9:"Im Alter von 35 bis unter 40 Jahren",10:"Im Alter von 40 bis unter 45 Jahren",11:"Im Alter von 45 bis unter 50 Jahren",12:"Im Alter von 50 bis unter 55 Jahren",13:"Im Alter von 55 bis unter 60 Jahren",14:"Im Alter von 60 bis unter 65 Jahren",15:"Im Alter von 65 bis unter 70 Jahren",16:"Im Alter von 70 bis unter 75 Jahren",17:"Im Alter von 75 bis unter 80 Jahren",18:"Im Alter von 80 bis unter 85 Jahren",19:"Im Alter von 85 bis unter 90 Jahren",20:"Im Alter von 90 bis unter 95 Jahren",21:"95 Jahre und \xE4lter",22:"Alter unbekannt"};var rQ={"011":"Behandlung regul\xE4r beendet - arbeitsf\xE4hig entlassen","012":"Behandlung regul\xE4r beendet - arbeitsunf\xE4hig entlassen","019":"Behandlung regul\xE4r beendet - keine Angabe","021":"Behandlung regul\xE4r beendet, nachstation\xE4re Behandlung vorgesehen - arbeitsf\xE4hig entlassen","022":"Behandlung regul\xE4r beendet, nachstation\xE4re Behandlung vorgesehen - arbeitsunf\xE4hig entlassen","029":"Behandlung regul\xE4r beendet, nachstation\xE4re Behandlung vorgesehen - keine Angabe","031":"Behandlung aus sonstigen Gr\xFCnden beendet - arbeitsf\xE4hig entlassen","032":"Behandlung aus sonstigen Gr\xFCnden beendet - arbeitsunf\xE4hig entlassen","039":"Behandlung aus sonstigen Gr\xFCnden beendet - keine Angabe","041":"Behandlung gegen \xE4rztlichen Rat beendet - arbeitsf\xE4hig entlassen","042":"Behandlung gegen \xE4rztlichen Rat beendet - arbeitsunf\xE4hig entlassen","049":"Behandlung gegen \xE4rztlichen Rat beendet - keine Angabe","059":"Zust\xE4ndigkeitswechsel des Kostentr\xE4gers (bei tagesbezogenen Entgelten)","069":"Verlegung in ein anderes Krankenhaus","079":"Tod","089":"Verlegung in ein anderes Krankenhaus im Rahmen einer Kooperation","099":"Entlassung in eine Rehabilitationseinrichtung",109:"Entlassung in eine Pflegeeinrichtung",119:"Entlassung in ein Hospiz",139:"externe Verlegung zur psychiatrischen Behandlung",141:"Behandlung aus sonstigen Gr\xFCnden beendet, nachstation\xE4re Behandlung vorgesehen - arbeitsf\xE4hig entlassen",142:"Behandlung aus sonstigen Gr\xFCnden beendet, nachstation\xE4re Behandlung vorgesehen - arbeitsunf\xE4hig entlassen",149:"Behandlung aus sonstigen Gr\xFCnden beendet, nachstation\xE4re Behandlung vorgesehen - keine Angabe",151:"Behandlung gegen \xE4rztlichen Rat beendet, nachstation\xE4re Behandlung vorgesehen - arbeitsf\xE4hig entlassen",152:"Behandlung gegen \xE4rztlichen Rat beendet, nachstation\xE4re Behandlung vorgesehen - arbeitsunf\xE4hig entlassen",159:"Behandlung gegen \xE4rztlichen Rat beendet, nachstation\xE4re Behandlung vorgesehen - keine Angabe",179:"interne Verlegung mit Wechsel zwischen den Entgeltbereichen der DRG-Fallpauschalen, nach der BPflV oder f\xFCr besondere Einrichtungen nach \xA717bAbs.1 Satz15 KHG",229:"Fallabschluss (interne Verlegung) bei Wechsel zwischen voll-,teilstation\xE4rerund stations\xE4quivalenterBehandlung",239:"Beginn eines externen Aufenthalts mit Abwesenheit \xFCber Mitternacht (BPflV-Bereich, f\xFCr verlegende Fachabteilung)",249:"Beendigung eines externen Aufenthalts mit Abwesenheit \xFCber Mitternacht (BPflV-Bereich, f\xFCr Pseudo-Fachabteilung 0003)",259:"Entlassung zum Jahresende bei Aufnahme im Vorjahr (f\xFCr Zwecke der Abrechnung, \xA74 PEPPV)",269:"Beginn eines Zeitraumes ohne direkten Patientenkontakt (stations\xE4quivalente Behandlung)",279:"Beendigung eines Zeitraumes ohne direkten Patientenkontakt (stations\xE4quivalente Behandlung \u2013f\xFCr Pseudofachabteilung 0004)",289:"Behandlung regul\xE4r beendet, beatmet entlassen",299:"Behandlung regul\xE4r beendet, beatmet verlegt"};var A6=class t{static fromObjArr(n){let e=i=>t.fromObj(i);return n.map(e)}static fromObj(n){let e=n.code?zs.fromObject(n.code):null,i=cue.fromObj(n.additionalInformation);return new t(n.caseId,n.internMark,i,n.amount,n.casemix,n.casemixRelevantAmount,e,n.count,n.fabKey,n.specialtyDepartmentId,n.virtualClinicId,n.year,uue.fromObjArray(n.procedures),due.fromObjectArray(n.diagnoses),n.mainDiagnosis?zs.fromObject(n.mainDiagnosis):void 0,n.mainProcedure?zs.fromObject(n.mainProcedure):void 0,pue.fromObjectArray(n.charges),n.chargeRealm)}constructor(n,e,i,o,r,s,d,m,v,w,O,N,V,$,q,W,te=[],fe=null){this.caseId=n,this.internMark=e,this.additionalInformation=i,this.amount=o,this.casemix=r,this.casemixRelevantAmount=s,this.code=d,this.count=m,this.fabKey=v,this.specialtyDepartmentId=w,this.virtualClinicId=O,this.year=N,this.procedures=V,this.diagnoses=$,this.mainDiagnosis=q,this.mainProcedure=W,this.charges=te,this.chargeRealm=fe}},cue=class t{constructor(n,e,i,o,r,s,d){this.administrativeDistrictId=n,this.postalCode=e,this.fabs=i,this.admission=o,this.dismissal=r,this.patientInformation=s,this.caseInformation=d}static fromObj(n){let e=n.administrativeDistrictId?Yo.createFromNumber(n.administrativeDistrictId):null;return new t(e,n.postalCode,n.fabs.map(i=>mt(be({},i),{admissionDate:new Date(i.admissionDate),dismissalDate:new Date(i.dismissalDate)})),mt(be({},n.admission),{date:new Date(n.admission.date)}),mt(be({},n.dismissal),{date:new Date(n.dismissal.date)}),n.patientInformation,n.caseInformation)}},due=class t{static fromObjectArray(n){return n.map(e=>t.fromObject(e))}static fromObject(n){return new t(n.count,n.diagnoseType,n.chargeRealm,n.version,zs.fromObject(n.code),n.localisation,n.diagnosisSecurity,n.skCode?zs.fromObject(n.skCode):void 0,n.skLocalisation,n.skDiagnosisSecurity)}constructor(n,e,i,o,r,s,d,m,v,w){this.count=n,this.diagnoseType=e,this.chargeRealm=i,this.version=o,this.code=r,this.localisation=s,this.diagnosisSecurity=d,this.skCode=m,this.skLocalisation=v,this.skDiagnosisSecurity=w}},uue=class t{static fromObjArray(n){return n.map(e=>t.fromObj(e))}static fromObj(n){return new t(n.count,new Date(n.procedureDate),n.localisation,zs.fromObject(n.code))}constructor(n,e,i,o){this.count=n,this.procedureDate=e,this.localisation=i,this.code=o}},pue=class t{static fromObjectArray(n){return n.map(e=>t.fromObject(e))}static fromObject(n){return new t(n.accountingStart?new Date(n.accountingStart):void 0,n.accountingEnd?new Date(n.accountingEnd):void 0,n.amount,n.chargeRealm,n.count,n.dayOfTreatment,n.daysWithoutCharge,n.type)}constructor(n,e,i,o,r,s,d,m){this.accountingStart=n,this.accountingEnd=e,this.amount=i,this.chargeRealm=o,this.count=r,this.dayOfTreatment=s,this.daysWithoutCharge=d,this.type=m}typeDescription(){switch(this.type.slice(0,2)){case"01":return"Tagesgleicher Pflegesatz f\xFCr Allgemeine Psychiatrie, Kinder- und Jugendpsychiatrie, und Psychosomatik/Psychotherapie";case"02":return"Erm\xE4\xDFigter Abteilungspflegesatz f\xFCr Allgemeine Psychiatrie, Kinder- und Jugendpsychiatrie, und Psychosomatik/Psychotherapie nach \xA7 14 Abs. 2 Satz 3 oder Abs. 7 Satz 2 BPflV";case"40":return"Zuschlag nach \xA7 8 Abs. 3 BPflV bzw. \xA7 8 Abs. 3 KHEntgG (Investitionszuschlag)";case"41":return"Entgelt f\xFCr vorstation\xE4re Behandlung";case"42":return"Entgelt f\xFCr nachstation\xE4re Behandlung";case"43":return"Pflegesatz bei Beurlaubung";case"44":return"Modellvorhaben nach \xA7 24 BPflV bzw. \xA7 26 BPflV";case"45":return"Wahlleistung Unterkunft (nur f\xFCr Knappschaft)";case"46":return"Zuschlag f\xFCr Qualit\xE4tssicherung nach \xA7 7 Absatz 1 Satz 1 Nr. 7 KHEntgG oder \xA7 7 Satz 1 Nr.3 BPflV";case"47":return"Zu-und Abschlag nach \xA7 7 Abs. 1 Satz 1 Nr. 4 KHEntgG bzw. \xA7 7 Satz 1 Nr. 3 und Satz 2 BPflV und sonstiger Zu- und Abschlag";case"48":return"DRG Systemzuschlag";case"49":return"Abrechnungserg\xE4nzungen";case"60":return"Sonderfall";case"61":return"Entgelt f\xFCr integrierte Versorgung nach \xA7 140c SGB V";case"62":return"Abschlag bei Entgelten f\xFCr integrierte Versorgung nach \xA7 140c SGB V";case"63":return"Entgelt f\xFCr Modellvorhaben nach \xA7 63 SGB V";case"65":return"Zusatzentgelt f\xFCr DMP";case"70":return"DRG-Fallpauschale nach \xA7 7 Abs. 1 Satz 1 Nr. 1 KHEntgG";case"71":return"Entgelt bei \xDCberschreiten der oberen GVD nach \xA7 1 Abs. 2 Satz 1 FPV oder tagesbezogene teilstation\xE4re DRG-Fallpauschale ab 2. Tag";case"72":return"Abschlag bei Verlegungen nach \xA7 1 Abs. 1 Satz 3 FPV";case"73":return"Abschlag bei Nichterreichen der unteren GVD nach \xA7 1 Abs. 3 Satz 1 FPV";case"74":return"Entgelt f\xFCr Pflegeerl\xF6s/Tag";case"75":return"Zu- und Abschlag nach \xA7 7 Abs. 1 Satz 1 Nr. 4 KHEntgG";case"76":return"Zusatzentgelt nach \xA7 7 Abs. 1 Satz 1 Nr. 2, 3, 5 oder 6 KHEntgG";case"78":return"Teilstation\xE4re Leistung nach \xA7 6 Abs. 2 FPV";case"80":return"Entgelt f\xFCr neue Untersuchungs- und Behandlungsmethoden nach \xA7 6 Abs. 2 KHEntgG (fallbezogen)";case"81":return"Entgelt bei \xDCberschreiten der oberen GVD f\xFCr fallbezogene Entgelte nach \xA7 6 Abs. 2 KHEntgG";case"82":return"Abschlag bei Verlegung f\xFCr fallbezogene Entgelte nach \xA7 6 Abs. 2 KHEntgG";case"83":return"Abschlag bei Nichterreichen der unteren GVD f\xFCr fallbezogene Entgelte nach \xA7 6 Abs. 2 KHEntgG";case"84":return"Pflegeanteil f\xFCr tages- oder fallbezogenes Entgelt nach \xA7 7 Abs. 1 Satz 1 Nr. 5 KHEntgG";case"85":return"Tagesbezogenes Entgelt nach \xA7 7 Abs. 1 Satz 1 Nr. 5 KHEntgG";case"86":return"Fallbezogenes Entgelt nach \xA7 7 Abs.1 Satz 1 Nr. 5 KHEntgG";case"87":return"Entgelt bei \xDCberschreiten der oberen GVD f\xFCr fallbezogen Entgelt nach \xA7 7 Abs. 1 Satz 1 Nr.5 KHEntgG";case"88":return"Abschlag bei Verlegung f\xFCr fallbezogene Entgelte nach \xA7 7 Abs. 1 Satz 1 Nr. 5 KHEntgG";case"89":return"Abschlag bei Nichterreichen der unteren GVD f\xFCr fallbezogene Entgelte nach \xA7 7 Abs. 1 Satz 1 Nr. 5 KHEntgG";case"90":return"Qualit\xE4tsvertr\xE4ge nach \xA7 110a SGB V";case"91":return"\xDCbergangspflege";default:return""}}};var OEt=["1","1.1","2","2.1","3","3.1","4","4.1","5","5.1","6","6.1","7","7.1","7.2","8","8.1","8.2","8.3","8.4","9","9.1","10","10.1","11","11.1","12","12.1","12.2","12.3","13","13.1","13.2","14","14.1","14.2","14.3","14.4","14.5","15","15.1","16","16.1","16.2","16.3","16.4","16.5","17","17.1","18","18.1","19","19.1","20","20.1","21","21.1","21.2","21.3","21.4","22","22.1","22.2","22.3","23","23.1","23.2","23.3","24","24.1","24.2","25","25.1","26","26.1","26.2","26.3","27","27.1","28","28.1","29","29.1","30","30.1","30.2","30.3","30.4","30.5","30.6","31","31.1","31.2","32","32.1","32.2"],tN=class{constructor(n,e){this.id=n,this.name=e}parent(){if(this.isLeistungsgruppe()){let n=this.id.slice(0,this.id.indexOf("."));return wd.find(e=>e.id===n)}else return}children(){return this.isLeistungsbereich()?wd.filter(n=>n.isLeistungsgruppe()).filter(n=>n.parent()?.id===this.id):[]}isLeistungsbereich(){return!this.id.includes(".")}isLeistungsgruppe(){return this.id.includes(".")}},sQ={1:"Allgemeine Innere Medizin","1.1":"Allgemeine Innere Medizin",2:"Endokrinologie und Diabetologie","2.1":"Komplexe Endokrinologie und Diabetologie",3:"Gastroenterologie","3.1":"Komplexe Gastroenterologie",4:"Nephrologie","4.1":"Komplexe Nephrologie",5:"Pneumologie","5.1":"Komplexe Pneumologie",6:"Rheumatologie","6.1":"Komplexe Rheumatologie",7:"H\xE4matologie und Onkologie","7.1":"Stammzelltransplantation","7.2":"Leuk\xE4mie und Lymphome",8:"Kardiologie","8.1":"EPU/Ablation","8.2":"Interventionelle Kardiologie","8.3":"Kardiale Devices","8.4":"Minimalinvasive Herzklappeninvervention",9:"Allgemeine Chirurgie","9.1":"Allgemeine Chirurgie",10:"Kinder- und Jugendchirurgie","10.1":"Kinder- und Jugendchirurgie",11:"Plastische und Rekonstruktive Chirurgie","11.1":"Plastische und Rekonstruktive Chirurgie",12:"Gef\xE4\xDFmedizin","12.1":"Bauchaortenaneurysma","12.2":"Carotis operativ/ interventionell","12.3":"Komplexe periphere arterielle Gef\xE4\xDFe",13:"Herzchirurgie","13.1":"Herzchirurgie","13.2":"Herzchirurgie - Kinder und Jugendliche",14:"Orthop\xE4die und Unfallchirurgie","14.1":"Endoprothetik H\xFCfte","14.2":"Endoprothetik Knie","14.3":"Revision H\xFCftendoprothese","14.4":"Revision Knieendoprothese","14.5":"Wirbels\xE4uleneingriffe",15:"Thoraxchirurgie","15.1":"Thoraxchirurgie",16:"Viszeralchirurgie","16.1":"Bariatrische Chirurgie","16.2":"Lebereingriffe","16.3":"\xD6sophaguseingriffe","16.4":"Pankreaseingriffe","16.5":"Tiefe Rektumeingriffe",17:"Augenheilkunde","17.1":"Augenheilkunde",18:"Haut- und Geschlechtskrankheiten","18.1":"Haut- und Geschlechtskrankheiten",19:"MKG","19.1":"MKG",20:"Urologie","20.1":"Urologie",21:"Frauenheilkunde und Geburtshilfe","21.1":"Allgemeine Frauenheilkunde","21.2":"Ovarial-CA","21.3":"Senologie","21.4":"Geburten",22:"Neonatologie","22.1":"Perinataler Schwerpunkt","22.2":"Perinatalzentrum Level 1","22.3":"Perinatalzentrum Level 2",23:"Kinder- und Jugendmedizin","23.1":"Allgemeine Kinder- und Jugendmedizin","23.2":"Kinder-H\xE4matologie und -Onkologie - Stammzelltransplantation","23.3":"Kinder-H\xE4matologie und -Onkologie - Leuk\xE4mie und Lymphome",24:"HNO","24.1":"HNO","24.2":"Cochleaimplantate",25:"Neurochirurgie","25.1":"Neurochirurgie",26:"Neurologie","26.1":"Allgemeine Neurologie","26.2":"Stroke Unit","26.3":"Neuro-Fr\xFChreha (NNF, Phase B)",27:"Geriatrie","27.1":"Geriatrie",28:"Intensivmedizin","28.1":"Intensivmedizin",29:"Palliativmedizin","29.1":"Palliativmedizin",30:"Transplantation solider Organe","30.1":"Darmtransplantation","30.2":"Herztransplantation","30.3":"Lebertransplantation","30.4":"Lungentransplantation","30.5":"Nierentransplantation","30.6":"Pankreastransplantation",31:"Psychiatrie und Psychotherapie und Psychosomatische Medizin und Psychotherapie","31.1":"Psychiatrie und Psychotherapie und Psychosomatische Medizin und Psychotherapie - vollstation\xE4r","31.2":"Psychiatrie und Psychotherapie und Psychosomatische Medizin und Psychotherapie - teilstation\xE4r",32:"Kinder- und Jugendpsychiatrie und -psychotherapie","32.1":"Kinder- und Jugendpsychiatrie und -psychotherapie - vollstation\xE4r","32.2":"Kinder- und Jugend-psychiatrie und -psychotherapie - teilstation\xE4r"},wd=OEt.map(t=>new tN(t,sQ[t]));var aQ=class t{static fromObj(n){let e=n.modifiedDate?this.fixUTC(new Date(n.modifiedDate)):null,i=n.createdDate?this.fixUTC(new Date(n.createdDate)):null;return new t(n.id,n.originalFileName,n.errorRecipientEmailAddress,n.recipientEmailAddress,n.fabSelectionStrategy,n.status,n.virtualClinicId,n.blobReference,i,e)}static fixUTC(n){return n.setHours(n.getHours()+2),n}constructor(n,e,i,o,r,s,d,m,v,w){this.id=n,this.name=e,this.errorRecipientEmailAddress=i,this.recipientEmailAddress=o,this.fabSelectionStrategy=r,this.status=s,this.virtualClinicId=d,this.blobReference=m,this.createdDate=v,this.modifiedDate=w}clone(){return new t(this.id,this.name,this.errorRecipientEmailAddress,this.recipientEmailAddress,this.fabSelectionStrategy,this.status,this.virtualClinicId,be({},this.blobReference),this.createdDate,this.modifiedDate)}};var z2=class t{constructor(n,e,i,o,r){this.fabKey=n,this.id=e,this.virtualClinicId=i,this.name=o,this.fabIntern=r}static fromObj(n){return new t(n.fabKey,n.id,n.virtualClinicId,n.name,n.fabIntern)}static fromObjArr(n){return n.map(t.fromObj)}};var iN=class t{static fromObj(n){let e=null,i=null,o;n.createdDate&&(e=new Date(n.createdDate)),n.modifiedDate&&(i=new Date(n.modifiedDate)),n.administrativeDistrictId!==0&&n.address&&n.address.city&&(o=k6.fromObject(n.address));let r=n.clinicInformation?hue.fromObject(n.clinicInformation):void 0;return new t(n.id,n.name,e,i,n.highestPermission,o,r,n.benchmarkable,void 0)}static fromObjArr(n){return n.map(t.fromObj)}constructor(n,e,i,o,r,s,d,m,v,w){this.id=n,this.name=e,this.createdDate=i,this.modifiedDate=o,this.highestPermission=r,this.address=s,this.clinicInformation=d,this.benchmarkable=m,this.hasError=v,this.labels=w,this.resourceName=ko.VIRTUAL_CLINIC}clone(){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.address?.clone(),this.clinicInformation?.clone(),this.benchmarkable,this.hasError,this.labels?[...this.labels]:void 0)}},hue=class t{static fromObject(n){let e;return n&&n.dismissalDateRange&&(e=new jp(new Date(n.dismissalDateRange.from),new Date(n.dismissalDateRange.to))),new t(n.origin,n.costDataExists,n.postalCodeExists,n.referralDataExists,e)}constructor(n,e,i,o,r){this.origin=n,this.costDataExists=e,this.postalCodeExists=i,this.referralDataExists=o,this.dismissalDateRange=r}clone(...n){return new t(JSON.parse(JSON.stringify(this.origin)),this.costDataExists,this.postalCodeExists,this.referralDataExists,this.dismissalDateRange?this.dismissalDateRange.clone():void 0)}toLabels(){let n=[];return this.postalCodeExists&&n.push("PLZ-Analyse"),this.costDataExists&&n.push("Kosten-Daten"),this.referralDataExists&&n.push("Einweiser-Daten"),n}},k6=class t{static fromObject(n){return new t(n.street,n.houseNumber,n.postalCode,n.city,n.country,n.location,n.administrativeDistrictId?Yo.create(n.administrativeDistrictId):null)}constructor(n,e,i,o,r,s,d){this.street=n,this.houseNumber=e,this.postalCode=i,this.city=o,this.country=r,this.location=s,this.administrativeDistrictId=d}isEmpty(){return this.street===void 0&&this.houseNumber===void 0&&this.city===void 0&&this.postalCode===void 0}toString(){return`${this.street} ${this.houseNumber}, ${this.postalCode} ${this.city}`}clone(){return new t(this.street,this.houseNumber,this.postalCode,this.city,this.country,this.location,this.administrativeDistrictId?.clone())}},lQ=class t{static fromObjArr(n){return n.map(t.fromObj)}static fromObj(n){return new t(n.virtualClinicId,n.year,n.beds,n.clinicSize,n.clinicType,n.isUniversity,n.medicalCareLevel)}constructor(n,e,i,o,r,s,d){this.virtualClinicId=n,this.year=e,this.beds=i,this.clinicSize=o,this.clinicType=r,this.isUniversity=s,this.medicalCareLevel=d}},cQ=class t{constructor(n,e,i){this.year=n,this.virtualClinicId=e,this.parts=i}static fromObj(n){return new t(n.year,n.virtualClinicId,n.parts)}static fromObjArr(n){return n.map(t.fromObj)}},M6=class t{static fromObjArr(n){return n.map(t.fromObj)}static fromObj(n){return new t(n.year,n.virtualClinicId,n.specialtyDepartmentId,n.nursing,n.medical)}constructor(n,e,i,o,r){this.year=n,this.virtualClinicId=e,this.specialtyDepartmentId=i,this.nursing=o,this.medical=r}},O6=class t{static fromObjArr(n){return n.map(t.fromObj)}static fromObj(n){return new t(n.year,n.virtualClinicId,n.specialtyDepartmentId,n.cmi,n.caseCount)}constructor(n,e,i,o,r){this.year=n,this.virtualClinicId=e,this.specialtyDepartmentId=i,this.cmi=o,this.caseCount=r}};var mue="artificialRespirationHours",R6={type:"artificialRespirationHours",category:"case",displayName:{de:"K\xFCnstliche Beatmungsstunden"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new nN(V2.fromObject(t.artificialRespirationHours)))},fromCondition(t){return Promise.reject(new Error("Not implemented"))},newInstance(){return Promise.resolve(new nN(new V2(null,null)))}},nN=(()=>{class t extends hn{static{this.Specification=R6}constructor(e){super(R6.type),this.artificialRespirationHours=e}clone(){return new t(this.artificialRespirationHours.clone())}equals(e){return super.equals(e)&&vo.equals(this.artificialRespirationHours,e.artificialRespirationHours,(i,o)=>i.equals(o))}valid(){return this.artificialRespirationHours?Number.isInteger(this.artificialRespirationHours.to)&&Number.isInteger(this.artificialRespirationHours.from)?this.artificialRespirationHours.from{class t extends hn{static{this.Specification=oN}constructor(e){super(oN.type),this.careServiceAreaIds=e}clone(){return new t([...this.careServiceAreaIds?this.careServiceAreaIds:[]])}equals(e){return super.equals(e)&&Ui.equals(this.careServiceAreaIds,e.careServiceAreaIds)}validationToText(){return this.careServiceAreaIds.length===0?"Mindestens ein Versorgungsgebiet ausw\xE4hlen":""}toCondition(){return Promise.resolve(new fue(this.careServiceAreaIds,[]))}toJSON(){return{type:this.type,careServiceAreaIds:this.careServiceAreaIds}}toText(){switch(this.careServiceAreaIds.length){case 0:return"keine Versorgungsgebiete";case 1:return"ein Versorgungsgebiet";default:return`${this.careServiceAreaIds.length} Versorgungsgebiete`}}toValue(){return this.careServiceAreaIds}}return t})(),fue=class extends ho{constructor(n,e){super(gue,n,e)}};var yue="chargeRealm",F6={type:"chargeRealm",category:"case",displayName:{de:"Entgeltbereich"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new U2(t.includes))},fromCondition(t){return Promise.resolve(new U2(t.includes))},newInstance(){return Promise.resolve(new U2([]))}},U2=(()=>{class t extends hn{static{this.Specification=F6}constructor(e){super(F6.type),this.includes=e}clone(){return new t([...this.includes])}equals(e){return super.equals(e)&&Ui.equals(this.includes,e.includes)}validationToText(){return this.includes.length===0?"Mindestens einen Entgeltbereich ausw\xE4hlen":""}toCondition(){return Promise.resolve(new _ue(this.includes,[]))}toJSON(){return{type:this.type,includes:this.includes}}toText(){return this.includes.length===1?"ein Entgeltbereich":`${this.includes.length} Entgeltbereiche`}toValue(){return this.includes}}return t})(),_ue=class extends ho{constructor(n,e){super(yue,n,e)}};var bue="clinicBeds",P6={type:"clinicBeds",category:"clinic",displayName:{de:"Klinik-Betten"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new H2(t.from,t.to))},fromCondition(t){return Promise.resolve(new H2(t.from,t.to))},newInstance(){return Promise.resolve(new H2(null,null))}},H2=(()=>{class t extends hn{static{this.Specification=P6}constructor(e,i){super(P6.type),this.from=e,this.to=i}clone(){return new t(this.from,this.to)}equals(e){return super.equals(e)&&vo.equals(this.from,e.from)&&vo.equals(this.to,e.to)}valid(){return Number.isInteger(this.to)&&Number.isInteger(this.from)?this.from{class t extends hn{static{this.Specification=L6}constructor(e,i){super(L6.type),this.nrwServiceGroupId=e,this.qualification=i}clone(){return new t(this.nrwServiceGroupId,this.qualification)}equals(e){return super.equals(e)&&vo.equals(this.nrwServiceGroupId,e.nrwServiceGroupId)&&vo.equals(this.qualification,e.qualification)}valid(){return!!this.nrwServiceGroupId&&this.qualification!==null}validationToText(){return this.nrwServiceGroupId?this.qualification===null||this.qualification===void 0?"Qualifikation ausw\xE4hlen":"":"Leistungsgruppe ausw\xE4hlen"}toCondition(){return Promise.resolve(new Cue(this.nrwServiceGroupId,this.qualification))}toJSON(){return{type:this.type,nrwServiceGroupId:this.nrwServiceGroupId,qualification:this.qualification}}toText(){return"Qualit\xE4tskriterien - Ger\xE4tevorhaltung"}toValue(){return{nrwServiceGroupId:this.nrwServiceGroupId,qualification:this.qualification}}}return t})(),Cue=class extends na{constructor(n,e){super(xue),this.lgNr=n,this.flag=e}toJSON(){return{[this.id]:{lgNr:this.lgNr,flag:this.flag}}}};var Sue="clinicLevel",N6={type:"clinicLevels",category:"clinic",displayName:{de:"Versorgungslevel"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new G2(t.includes))},fromCondition(t){return Promise.resolve(new G2(t.includes))},newInstance(){return Promise.resolve(new G2([]))}},G2=(()=>{class t extends hn{static{this.Specification=N6}constructor(e){super(N6.type),this.includes=e}clone(){return new t([...this.includes])}equals(e){return super.equals(e)&&Ui.equals(this.includes,e.includes)}validationToText(){return this.includes.length===0?"Mindestens ein Versorgungslevel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new wue(this.includes,[]))}toJSON(){return{type:this.type,includes:this.includes}}toText(){return this.includes.length===1?"ein Versorgungslevel":`${this.includes.length} Versorgungslevel`}toValue(){return{includes:this.includes}}}return t})(),wue=class extends ho{constructor(n,e){super(Sue,n,e)}};var Iue="medicalCareLevel",V6={type:"medicalCareLevels",category:"clinic",displayName:{de:"Versorgungsstufe"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new B6(t.medicalCareLevels))},fromCondition(t){return Promise.resolve(new B6(t.includes))},newInstance(){return Promise.resolve(new B6([]))}},B6=(()=>{class t extends hn{static{this.Specification=V6}constructor(e){super(V6.type),this.medicalCareLevels=e}clone(){return new t([...this.medicalCareLevels])}equals(e){return super.equals(e)&&Ui.equals(this.medicalCareLevels,e.medicalCareLevels)}validationToText(){return this.medicalCareLevels.length===0?"Mindestens eine Versorgungsstufe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Tue(this.medicalCareLevels,[]))}toJSON(){return{type:this.type,medicalCareLevels:this.medicalCareLevels}}toText(){return this.medicalCareLevels.length===1?"eine Versorgungsstufe":`${this.medicalCareLevels.length} Versorgungsstufen`}toValue(){return this.medicalCareLevels}}return t})(),Tue=class extends ho{constructor(n,e){super(Iue,n,e)}};var Due="physicianRequirements",z6={type:"clinicPhysicianRequirements",category:"clinic",displayName:{de:"Qualit\xE4tskriterien - Fach\xE4rtzliche Vorgaben"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new $2(t.nrwServiceGroupId,t.qualification,t.availability))},fromCondition(t){return Promise.resolve(new $2(t.lgNr,t.qualification,t.availability))},newInstance(){return Promise.resolve(new $2(null,null,null))}},$2=(()=>{class t extends hn{static{this.Specification=z6}constructor(e,i,o){super(z6.type),this.nrwServiceGroupId=e,this.qualification=i,this.availability=o}clone(){return new t(this.nrwServiceGroupId,this.qualification,this.availability)}equals(e){return super.equals(e)&&vo.equals(this.nrwServiceGroupId,e.nrwServiceGroupId)&&vo.equals(this.availability,e.availability)&&vo.equals(this.qualification,e.qualification)}valid(){return!!this.nrwServiceGroupId&&this.qualification!==null&&this.availability!==null}validationToText(){return this.nrwServiceGroupId?this.availability===null||this.availability===void 0?"Verf\xFCgbarkeit ausw\xE4hlen":this.qualification===null||this.qualification===void 0?"Qualifikation ausw\xE4hlen":"":"Leistungsgruppe ausw\xE4hlen"}toCondition(){return Promise.resolve(new Eue(this.nrwServiceGroupId,this.qualification,this.availability))}toJSON(){return{type:this.type,nrwServiceGroupId:this.nrwServiceGroupId,availability:this.availability,qualification:this.qualification}}toText(){return"Qualit\xE4tskriterien - Fach\xE4rtzliche Vorgaben"}toValue(){return{nrwServiceGroupId:this.nrwServiceGroupId,qualification:this.qualification,availability:this.availability}}}return t})(),Eue=class extends na{constructor(n,e,i){super(Due),this.lgNr=n,this.qualification=e,this.availability=i}toJSON(){return{[this.id]:{lgNr:this.lgNr,qualification:this.qualification,availability:this.availability}}}};var kue="clinicSize",U6={type:"clinicSizes",category:"clinic",displayName:{de:"Klinik-Gr\xF6\xDFe"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new q2(t.clinicSizes))},fromCondition(t){return Promise.resolve(new q2(t.includes))},newInstance(){return Promise.resolve(new q2([]))}},q2=(()=>{class t extends hn{static{this.Specification=U6}constructor(e){super(U6.type),this.clinicSizes=e}clone(){return new t([...this.clinicSizes])}equals(e){return super.equals(e)&&Ui.equals(this.clinicSizes,e.clinicSizes)}validationToText(){return this.clinicSizes.length===0?"Mindestens eine Klinik-Gr\xF6\xDFe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Aue(this.clinicSizes,[]))}toJSON(){return{type:this.type,clinicSizes:this.clinicSizes}}toText(){return this.clinicSizes.length===1?"eine Klinik-Gr\xF6\xDFe":`${this.clinicSizes.length} Klinik-Gr\xF6\xDFen`}toValue(){return this.clinicSizes}}return t})(),Aue=class extends ho{constructor(n,e){super(kue,n,e)}};var Oue="clinicSn",H6={type:"clinicSn",category:"clinic",displayName:{de:"Klinik-Standort"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new K2(t.excludes))},fromCondition(t){return Promise.resolve(new K2(t.excludes))},newInstance(){return Promise.resolve(new K2([99]))}},K2=(()=>{class t extends hn{static{this.Specification=H6}constructor(e){super(H6.type),this.excludes=e}clone(){return new t([...this.excludes])}equals(e){return super.equals(e)&&Ui.equals(this.excludes,e.excludes)}validationToText(){return this.excludes.length===0?"Mindestens einen Klinik-Standort ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Mue([],this.excludes))}toJSON(){return{type:this.type,excludes:this.excludes}}toText(){return this.excludes.length===1?`ohne Klinik-Standort ${this.excludes[0]}`:`ohne ${this.excludes.length} Klinik-Standorte`}toValue(){return{excludes:this.excludes}}}return t})(),Mue=class extends ho{constructor(n,e){super(Oue,n,e)}};var Fue="clinicType",j6={type:"clinicTypes",category:"clinic",displayName:{de:"Tr\xE4gerart"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new pS(t.clinicTypes))},fromCondition(t){return Promise.resolve(new pS(t.includes))},newInstance(){return Promise.resolve(new pS([]))}},pS=(()=>{class t extends hn{static{this.Specification=j6}constructor(e){super(j6.type),this.clinicTypes=e}clone(){return new t([...this.clinicTypes])}equals(e){return super.equals(e)&&Ui.equals(this.clinicTypes,e.clinicTypes)}validationToText(){return this.clinicTypes.length===0?"Mindestens eine Tr\xE4gerart ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Rue(this.clinicTypes,[]))}toJSON(){return{type:this.type,clinicTypes:this.clinicTypes}}toText(){return this.clinicTypes.length===1?"eine Tr\xE4gerart":`${this.clinicTypes.length} Tr\xE4gerarten`}toValue(){return this.clinicTypes}}return t})(),Rue=class extends ho{constructor(n,e){super(Fue,n,e)}};var Lue="university",G6={type:"universityType",category:"clinic",displayName:{de:"Universit\xE4tskliniken"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new W2(t.universityType))},fromCondition(t){return Promise.resolve(new W2(t.flag))},newInstance(){return Promise.resolve(new W2(y0.WITH_UNIVERSITIES))}},W2=(()=>{class t extends hn{static{this.Specification=G6}constructor(e){super(G6.type),this.universityType=e}equals(e){return super.equals(e)&&vo.equals(this.universityType,e.universityType)}validationToText(){return this.universityType?"":"Art der Universit\xE4tskliniken ausw\xE4hlen"}clone(){return new t(this.universityType)}toCondition(){return Promise.resolve(new Pue(this.universityType))}toJSON(){return{type:this.type,universityType:this.universityType}}toText(){return"Universit\xE4tskliniken"}toValue(){return this.universityType}}return t})(),Pue=class extends na{constructor(n){super(Lue),this.flag=n}toJSON(){return{[this.id]:{flag:this.flag}}}};var zE=class t extends zs{static fromObject(n){return new t(n.name,n.description,n.codingSystem,n.hierarchyElementType,n.year,n.codeSpectrumId,n.weight)}constructor(n,e,i,o,r,s,d){super(n,e,i,o,r),this.codeSpectrumId=s,this.weight=d}clone(){return new t(this.name,this.description,this.codingSystem,this.hierarchyElementType,this.year,this.codeSpectrumId,this.weight)}toJSON(){return mt(be({},super.toJSON()),{codeSpectrumId:this.codeSpectrumId,weight:this.weight})}};var rN=class t{static fromObject(n){let e=n.createdDate?new Date(n.createdDate):null,i=n.modifiedDate?new Date(n.modifiedDate):null;return new t(n.id,n.name,e,i,n.highestPermission)}constructor(n,e,i,o,r){this.id=n,this.name=e,this.createdDate=i,this.modifiedDate=o,this.highestPermission=r,this.resourceName=ko.CODE_SPECTRUM}isValid(){return!!this.name}clone(){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission)}};var uQ=class extends lE{};var Nue="drgCode",sN={type:"drgCode",category:"case",displayName:{de:"DRG-Ziffer"},sortingIndex:10,occurrence:"single",fromObject(t){return Promise.resolve(new hS(t.codes.map(n=>zs.fromObject(n))))},fromCondition(t){return Promise.resolve(new hS(t.includes.map(n=>zs.fromObject(n))))},newInstance(){return Promise.resolve(new hS([]))}},hS=(()=>{class t extends hn{static{this.Specification=sN}constructor(e){super(sN.type),this.codes=e}clone(){return new t([...this.codes.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ui.equals(this.codes,e.codes,(i,o)=>i.name===o.name&&i.codingSystem===o.codingSystem)}validationToText(){return this.codes.length===0?"Mindestens eine DRG-Ziffer ausw\xE4hlen":""}toCondition(){return Promise.resolve(new aN(this.codes,[]))}toJSON(){return{type:this.type,codes:this.codes}}toText(){return"DRG-Ziffer"}toValue(){return this.codes}}return t})(),aN=class extends ho{constructor(n,e){super(Nue,n,e)}};var Y2={type:"codes",category:"case",displayName:{de:"Ziffer-Spektra"},sortingIndex:8,occurrence:"multiple",fromObject(t){let n=t.matching||"exact",e;return t.codeTypeSpecification&&(e=t.codeTypeSpecification),Promise.resolve(new pb(t.codeSpectrumIds||[],t.codingSystem,n,e,t.codeTypeClassification,t.includes,t.grouperVersionYear))},fromCondition(t){let n=[];return t.includes&&(n=t.includes.map(e=>e).map(e=>new zE(e.name,e.description,e.codingSystem,e.hierarchyElementType,e.year,e.codeSpectrumId,e.weight??0))),t.excludes&&(n=t.excludes.map(e=>e).map(e=>new zE(e.name,e.description,e.codingSystem,e.hierarchyElementType,e.year,e.codeSpectrumId,e.weight??0))),Promise.resolve(new pb(t.codeSpectrumIds,t.codingSystem,t.matching,t.codeTypeSpecification,t.codeTypeClassification,!t?.excludes,t.grouperVersionYear,n))},newInstance(){return Promise.resolve(new pb([],"OPS"))}},pb=(()=>{class t extends hn{static{this.Specification=Y2}constructor(e,i,o="exact",r,s,d=!0,m,v=[]){super(Y2.type),this.codeSpectrumIds=e,this.codingSystem=i,this.matching=o,this.codeTypeSpecification=r,this.codeTypeClassification=s,this.includes=d,this.grouperVersionYear=m,this.codes=v}clone(){return new t([...this.codeSpectrumIds],this.codingSystem,this.matching?JSON.parse(JSON.stringify(this.matching)):null,this.codeTypeSpecification?JSON.parse(JSON.stringify(this.codeTypeSpecification)):null,this.codeTypeClassification?JSON.parse(JSON.stringify(this.codeTypeClassification)):null,this.includes,this.grouperVersionYear,this.codes?[...this.codes.map(e=>e.clone())]:null)}equals(e){return super.equals(e)&&Ui.equals(this.codeSpectrumIds,e.codeSpectrumIds)&&vo.equals(this.codingSystem,e.codingSystem)&&vo.equals(this.matching,e.matching)&&vo.equals(this.codeTypeClassification,e.codeTypeClassification,(i,o)=>vo.equals(i?.name,o?.name)&&vo.equals(i?.numberOfDigit,o?.numberOfDigit))&&vo.equals(this.codeTypeSpecification,e.codeTypeSpecification,(i,o)=>JSON.stringify(i)===JSON.stringify(o))&&vo.equals(this.includes,e.includes)&&vo.equals(this.grouperVersionYear,e.grouperVersionYear)}getChildResources(){let e=[];return this.codeSpectrumIds.forEach(i=>{e.indexOf(i)===-1&&e.push(i)}),{[ko.CODE_SPECTRUM]:e}}valid(){return super.valid()&&this.codeSpectrumIds&&this.codeSpectrumIds.length>0}validationToText(){return this.codeSpectrumIds.length===0?"Mindestens ein Ziffer-Spektrum ausw\xE4hlen":""}toText(){return this.codeSpectrumIds.length===1?"ein Ziffer-Spektrum":`${this.codeSpectrumIds.length} Ziffer-Spektra`}toJSON(){return{type:this.type,codeSpectrumIds:this.codeSpectrumIds,codingSystem:this.codingSystem,codeTypeSpecification:this.codeTypeSpecification,codeTypeClassification:this.codeTypeClassification,matching:this.matching,includes:this.includes,grouperVersionYear:this.grouperVersionYear}}toValue(){return this}toCondition(e){if(!e.codeSpectra)throw new Error("Missing dependency resolver: codeSpectra");return e.codeSpectra.resolve({codeSpectrumIds:this.codeSpectrumIds,codingSystem:this.codingSystem}).then(o=>{this.codes=o;let r=null;switch(this.codingSystem){case"ICD-10-UK":case"ICD-10-AT":case"ICD-10-GM":r=this._toIcdCondition();break;case"OPS":r=this._toOpsCondition();break;case"G-DRG":this.grouperVersionYear?r=this.includes?new f6(this.grouperVersionYear,this.codes,null):new f6(this.grouperVersionYear,null,this.codes):r=this.includes?new aN(this.codes,null):new aN(null,this.codes);break;default:throw new Error(`Invalid coding system: ${this.codingSystem}`)}return r})}_toIcdCondition(){let e=this.codeTypeSpecification,i;switch(e){case"secondaryDiagnosis":{i=this._toSecondaryDiagnosisCondition();break}case"skCode":{i=this._toIcdSecondaryCode();break}default:{i=this._toMainDiagnosisCondition();break}}return this.includes?i.includes=this.codes:i.excludes=this.codes,i}_toMainDiagnosisCondition(){return this.matching==="exact"?new C6(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new x6(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}_toSecondaryDiagnosisCondition(){return this.matching==="exact"?new S6(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new T6(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}_toOpsCondition(){let e=this.codeTypeSpecification,i;switch(e){case"mainProcedure":{i=this._toOpsMainProcedure();break}default:{i=this._toOpsCode();break}}return this.includes?i.includes=this.codes:i.excludes=this.codes,i}_toOpsMainProcedure(){return this.matching==="exact"?new XY(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new JY(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}_toIcdSecondaryCode(){return this.matching==="exact"?new tQ(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new iQ(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}_toOpsCode(){return this.matching==="exact"?new NE(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new eQ(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}}return t})();var $6={type:"dismissalDate",category:"case",displayName:{de:"Entlass-Datum"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new lN(u2.fromObject(t.timeSelection)))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new lN(new hy(new jp(new Date,new Date))))}},lN=(()=>{class t extends hn{static{this.Specification=$6}constructor(e){super($6.type),this.timeSelection=e}hasRelativeTimeSelection(){return this.timeSelection.type==="relative"}toCondition(){switch(this.timeSelection.type){case"relative":{let e=this.timeSelection;return Promise.resolve(new w6(e.intervalRelative))}default:{let e=this.timeSelection;return Promise.resolve(new LE(e.interval))}}}toJSON(){return{type:this.type,timeSelection:this.timeSelection.toJSON()}}toText(){return"Entlass-Datum"}toValue(){return this.timeSelection}getOverrideProperties(e,i){return[new Zm(e,"dismissalDate",this.timeSelection,this.timeSelection,"possible",void 0,(o,r)=>o.equals(r),o=>o.clone())]}overrideClone(e){let i=Xm.overrideProperty(this.timeSelection,"dismissalDate",e,o=>o.clone());return i?new t(i):null}equals(e){return super.equals(e)&&this.timeSelection.equals(e.timeSelection)}valid(){return super.valid()&&this.timeSelection.valid()}validationToText(){return this.timeSelection&&this.timeSelection.valid()?"":"Einen g\xFCltigen Zeitraum ausw\xE4hlen"}clone(){return new t(this.timeSelection.clone())}}return t})();var q6={type:"dismissalYear",category:"case",displayName:{de:"Entlass Jahr"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new Ty(t.year))},fromCondition(t){return t.includes&&t.includes.length===1?Promise.resolve(new Ty(t.includes[0])):Promise.reject(new Error("Missing DismissalYear"))},newInstance(){return Promise.resolve(new Ty(new Date().getFullYear()))}},Ty=(()=>{class t extends hn{static{this.Specification=q6}constructor(e){super(q6.type),this.year=e}clone(){return new t(this.year)}equals(e){return super.equals(e)&&vo.equals(this.year,e.year)}validationToText(){return this.year?"":"Entlass-Jahr auw\xE4hlen"}toCondition(){return Promise.resolve(new ub([this.year],[]))}toJSON(){return{type:this.type,year:this.year}}toText(){return"Entlass-Jahr"}toValue(){return this.year}}return t})();var W6={type:"dismissalYears",category:"case",displayName:{de:"Entlass Jahr"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new K6(t.years))},fromCondition(t){return Promise.resolve(new K6(t.includes))},newInstance(){return Promise.resolve(new K6([]))}},K6=(()=>{class t extends hn{static{this.Specification=W6}constructor(e){super(W6.type),this.years=e}clone(){return new t([...this.years])}equals(e){return super.equals(e)&&Ui.equals(this.years,e.years)}validationToText(){return this.years.length===0?"Mindestens ein Entlass-Jahr ausw\xE4hlen":""}toCondition(){return Promise.resolve(new ub(this.years,[]))}toJSON(){return{type:this.type,years:this.years}}toText(){return"Entlass-Jahr"}toValue(){return this.years}}return t})();var Vue="dismissalReason",Y6={type:"dismissionCauses",category:"case",displayName:{de:"Entlassgrund"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new Q2(t.dismissionCauses))},fromCondition(t){return Promise.resolve(new Q2(t.includes))},newInstance(){return Promise.resolve(new Q2([]))}},Q2=(()=>{class t extends hn{static{this.Specification=Y6}constructor(e){super(Y6.type),this.dismissionCauses=e}clone(){return new t([...this.dismissionCauses])}equals(e){return super.equals(e)&&Ui.equals(this.dismissionCauses,e.dismissionCauses)}validationToText(){return this.dismissionCauses.length===0?"Mindestens einen Entlassgrund ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Bue(this.dismissionCauses,[]))}toJSON(){return{type:this.type,dismissionCauses:this.dismissionCauses}}toText(){return this.dismissionCauses.length===1?"einen Entlassgrund":`${this.dismissionCauses.length} Entlassgr\xFCnde`}toValue(){return this.dismissionCauses}}return t})(),Bue=class extends ho{constructor(n,e){super(Vue,n,e)}};var Uue="drgCodeExists",Q6={type:"drgCodeExists",category:"case",displayName:{de:"DRG vorhanden"},sortingIndex:11,occurrence:"multiple",fromObject(t){return Promise.resolve(new Z2(t.isNotNull??t._isNotNull))},fromCondition(t){return Promise.resolve(new Z2(t.isNotNull))},newInstance(){return Promise.resolve(new Z2(!0))}},Z2=(()=>{class t extends hn{static{this.Specification=Q6}constructor(e){super(Q6.type),this._isNotNull=e}toCondition(){return Promise.resolve(new zue(this._isNotNull))}toJSON(){return{type:this.type,isNotNull:this._isNotNull}}toText(){return"DRG vorhanden"}toValue(){return this._isNotNull}equals(e){return super.equals(e)&&this._isNotNull===e._isNotNull}valid(){return this._isNotNull!==null&&this._isNotNull!==void 0}validationToText(){return this.valid()?"":"Ja/Nein ausw\xE4hlen"}clone(){return new t(this._isNotNull)}}return t})(),zue=class extends na{constructor(n){super(Uue),this.isNotNull=n}toJSON(){return{[this.id]:{isNotNull:this.isNotNull}}}};var jue="drgMdc",cN={type:"drgMdc",category:"case",displayName:{de:"DRG-Kapitel"},sortingIndex:10,occurrence:"single",fromObject(t){return Promise.resolve(new UE(t.codes.map(n=>zs.fromObject(n))))},fromCondition(t){return Promise.resolve(new UE(t.includes.map(n=>zs.fromObject(n))))},newInstance(){return Promise.resolve(new UE([]))}},UE=(()=>{class t extends hn{static{this.Specification=cN}constructor(e){super(cN.type),this.codes=e}clone(){return new t([...this.codes.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ui.equals(this.codes,e.codes,(i,o)=>i.name===o.name&&i.codingSystem===o.codingSystem)}validationToText(){return this.codes.length===0?"Mindestens ein DRG-Kapitel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Hue(this.codes,[]))}toJSON(){return{type:this.type,codes:this.codes}}toText(){return"DRG-Kapitel"}toValue(){return this.codes}}return t})(),Hue=class extends ho{constructor(n,e){super(jue,n,e)}};var Z6={type:"drivingTime",category:"case",displayName:{de:"Erreichbarkeit innerhalb Fahrzeit"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new dN(t.includeRanges))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new dN([]))}},dN=(()=>{class t extends hn{static{this.Specification=Z6}constructor(e){super(Z6.type),this.includeRanges=e}toCondition(){return this.includeRanges&&this.includeRanges.length===1?Promise.resolve(this._rangeToCondition(this.includeRanges[0])):this.includeRanges&&this.includeRanges.length>1?Promise.resolve(new FE(this.includeRanges.map(e=>this._rangeToCondition(e)))):Promise.resolve(new BE)}toJSON(){return{type:this.type,includeRanges:this.includeRanges}}toText(){return"Erreichbarkeit innerhalb einer Fahrzeit"}toValue(){return this.includeRanges}equals(e){return super.equals(e)&&Ui.equals(this.includeRanges,e.includeRanges,(i,o)=>vo.equals(i.min,o.min)&&vo.equals(i.max,o.max))}validationToText(){return this.includeRanges.length===0?"Mindestens eine Erreichbarkeit ausw\xE4hlen":""}clone(){return new t(this.includeRanges.map(e=>JSON.parse(JSON.stringify(e))))}_rangeToCondition(e){return e.min!==void 0&&e.max!==void 0?new Gu([new L2(e.min,xy.GREATER_OR_EQUAL),new L2(e.max,xy.LESS_OR_EQUAL)]):e.min!==void 0?new L2(e.min,xy.GREATER_OR_EQUAL):new L2(e.max,xy.LESS_OR_EQUAL)}}return t})();var Gue="fabKey",uN={type:"fabKeys",category:"case",displayName:{de:"\xA7301 Fachabteilungsschl\xFCssel"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new cf(t.fabKeys))},fromCondition(t){return Promise.resolve(new cf(t.includes))},newInstance(){return Promise.resolve(new cf([]))}},cf=(()=>{class t extends hn{static{this.Specification=uN}constructor(e){super(uN.type),this.fabKeys=e}clone(){return new t([...this.fabKeys])}equals(e){return super.equals(e)&&Ui.equals(this.fabKeys,e.fabKeys)}overrideClone(e){let i=this.fabKeys?Xm.overrideProperties(this.fabKeys,"fabKey",e,o=>o):null;return new t(i)}getOverrideProperties(e,i){return this.fabKeys.map(o=>new Zm(e,"fabKey",o,o,"possible",i))}validationToText(){return this.fabKeys.length===0?"Mindestens einen \xA7301 Fachabteilungsschl\xFCssel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new X6(this.fabKeys,[]))}toText(){return this.fabKeys.length===1?"einen \xA7301 Fachabteilungsschl\xFCssel":`${this.fabKeys.length} \xA7301 Fachabteilungsschl\xFCssel`}toJSON(){return{type:this.type,fabKeys:this.fabKeys}}toValue(){return this.fabKeys}}return t})(),X6=class extends ho{constructor(n,e){super(Gue,n,e)}};var que="fullyInpatientCases",J6={type:"fullyInpatientCases",category:"clinic",displayName:{de:"Fallzahl"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new X2(t.from,t.to))},fromCondition(t){return Promise.resolve(new X2(t.from,t.to))},newInstance(){return Promise.resolve(new X2(null,null))}},X2=(()=>{class t extends hn{static{this.Specification=J6}constructor(e,i){super(J6.type),this.from=e,this.to=i}clone(){return new t(this.from,this.to)}equals(e){return super.equals(e)&&vo.equals(this.from,e.from)&&vo.equals(this.to,e.to)}valid(){return Number.isInteger(this.to)&&Number.isInteger(this.from)?this.fromYo.create(n))],[...t.postalCodes]))},fromCondition(t){return Promise.resolve(new J2(t.coordinate,t.value,ga.fromObj(t.clinicId),[...t.administrativeDistricts.map(n=>Yo.create(n))],[...t.postalCodes]))},newInstance(){return Promise.resolve(new J2(null,null,null,[],[]))}},J2=(()=>{class t extends hn{static{this.Specification=eU}constructor(e,i,o,r,s){super(eU.type),this.coordinate=e,this.value=i,this.clinicId=o,this.administrativeDistricts=r,this.postalCodes=s}clone(){return new t(this.coordinate,this.value,this.clinicId?this.clinicId.clone():null,[...this.administrativeDistricts.map(e=>e.clone())],[...this.postalCodes])}equals(e){return super.equals(e)&&vo.equals(this.value,e.value)&&Ui.equals(this.coordinate,e.coordinate)}valid(){return!!this.value&&!!this.clinicId&&!!this.coordinate}validationToText(){return this.valid()?"":"Distanz, Klinik und Landkreise ausw\xE4hlen"}toCondition(e){return Promise.resolve(new Wue(this.toValue()))}toJSON(){return{type:this.type,value:this.value,coordinate:this.coordinate,clinicId:{ik:this.clinicId.ik,sn:this.clinicId.sn},postalCodes:this.postalCodes,administrativeDistricts:this.administrativeDistricts.map(e=>e.getNumericValue())}}toText(){return`${this.value}km Distanz`}toValue(){return new Kue(this.coordinate,this.value,this.clinicId,this.administrativeDistricts,this.postalCodes)}}return t})(),Kue=class{constructor(n,e,i,o,r){this.coordinate=n,this.value=e,this.clinicId=i,this.administrativeDistricts=o,this.postalCodes=r}},Wue=class extends na{constructor(n){super(Yue),this._value=n}toJSON(){return{[this.id]:{value:this._value.value,coordinate:this._value.coordinate,clinicId:this._value.clinicId,postalCodes:this._value.postalCodes,administrativeDistricts:this._value.administrativeDistricts.map(n=>n.getNumericValue())}}}};var Xue="drivingTimeAroundClinicId",tU={type:"drivingTimeAroundClinicId",category:"clinic",displayName:{de:"Fahrzeit"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new eM(t.coordinate,t.value,ga.fromObj(t.clinicId),[...t.administrativeDistricts.map(n=>Yo.create(n))],[...t.postalCodes]))},fromCondition(t){return Promise.resolve(new eM(t.coordinate,t.value,ga.fromObj(t.clinicId),[...t.administrativeDistricts.map(n=>Yo.create(n))],[...t.postalCodes]))},newInstance(){return Promise.resolve(new eM(null,10,null,[],[]))}},eM=(()=>{class t extends hn{static{this.Specification=tU}constructor(e,i,o,r,s){super(tU.type),this.coordinate=e,this.value=i,this.clinicId=o,this.administrativeDistricts=r,this.postalCodes=s}clone(){return new t(this.coordinate,this.value,this.clinicId?this.clinicId.clone():null,[...this.administrativeDistricts.map(e=>e.clone())],[...this.postalCodes])}equals(e){return super.equals(e)&&vo.equals(this.value,e.value)&&Ui.equals(this.coordinate,e.coordinate)}valid(){return!!this.value&&!!this.clinicId&&!!this.coordinate}validationToText(){return this.valid()?"":"Fahrzeit, Klinik und Landkreise ausw\xE4hlen"}toCondition(e){return Promise.resolve(new Zue(this.toValue()))}toJSON(){return{type:this.type,value:this.value,coordinate:this.coordinate,clinicId:{ik:this.clinicId.ik,sn:this.clinicId.sn},postalCodes:this.postalCodes,administrativeDistricts:this.administrativeDistricts.map(e=>e.getNumericValue())}}toText(){return`${this.value} min Fahrzeit`}toValue(){return new Que(this.coordinate,this.value,this.clinicId,this.administrativeDistricts,this.postalCodes)}}return t})(),Que=class{constructor(n,e,i,o,r){this.coordinate=n,this.value=e,this.clinicId=i,this.administrativeDistricts=o,this.postalCodes=r}},Zue=class extends na{constructor(n){super(Xue),this._value=n}toJSON(){return{[this.id]:{value:this._value.value,coordinate:this._value.coordinate,clinicId:this._value.clinicId,postalCodes:this._value.postalCodes,administrativeDistricts:this._value.administrativeDistricts.map(n=>n.getNumericValue())}}}};var epe="icdChapter",pN={type:"icdChapter",category:"case",displayName:{de:"ICD-Kapitel"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new HE(t.chapters.map(n=>cm.fromObject(n))))},fromCondition(t){return Promise.resolve(new HE(t.includes.map(n=>cm.fromObject(n))))},newInstance(){return Promise.resolve(new HE([]))}},HE=(()=>{class t extends hn{static{this.Specification=pN}constructor(e){super(pN.type),this.chapters=e}clone(){return new t([...this.chapters.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ui.equals(this.chapters,e.chapters,(i,o)=>i.name===o.name&&i.codingSystem===o.codingSystem)}validationToText(){return this.chapters.length===0?"Mindestens ein ICD-Kapitel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Jue(this.chapters,[]))}toJSON(){return{type:this.type,chapters:this.chapters}}toText(){return"ICD-Kapitel"}toValue(){return this.chapters}}return t})(),Jue=class extends ho{constructor(n,e){super(epe,n,e)}};var ipe="icdGroup",hN={type:"icdGroup",category:"case",displayName:{de:"ICD-Gruppe"},sortingIndex:9,occurrence:"single",fromObject(t){return Promise.resolve(new jE(t.groups.map(n=>cm.fromObject(n))))},fromCondition(t){return Promise.resolve(new jE(t.includes.map(n=>cm.fromObject(n))))},newInstance(){return Promise.resolve(new jE([]))}},jE=(()=>{class t extends hn{static{this.Specification=hN}constructor(e){super(hN.type),this.groups=e}clone(){return new t([...this.groups.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ui.equals(this.groups,e.groups,(i,o)=>i.name===o.name&&i.codingSystem===o.codingSystem)}validationToText(){return this.groups.length===0?"Mindestens eine ICD-Gruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new tpe(this.groups,[]))}toJSON(){return{type:this.type,groups:this.groups}}toText(){return"ICD-Gruppe"}toValue(){return this.groups}}return t})(),tpe=class extends ho{constructor(n,e){super(ipe,n,e)}};var ope="icdCode",mN={type:"icdCode",category:"case",displayName:{de:"ICD-Ziffer"},sortingIndex:10,occurrence:"single",fromObject(t){return Promise.resolve(new mS(t.codes.map(n=>zs.fromObject(n))))},fromCondition(t){return Promise.resolve(new mS(t.includes.map(n=>zs.fromObject(n))))},newInstance(){return Promise.resolve(new mS([]))}},mS=(()=>{class t extends hn{static{this.Specification=mN}constructor(e){super(mN.type),this.codes=e}clone(){return new t([...this.codes.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ui.equals(this.codes,e.codes,(i,o)=>i.name===o.name&&i.codingSystem===o.codingSystem)}validationToText(){return this.codes.length===0?"Mindestens eine ICD-Ziffer ausw\xE4hlen":""}toCondition(){return Promise.resolve(new npe(this.codes,[]))}toJSON(){return{type:this.type,codes:this.codes}}toText(){return"ICD-Ziffer"}toValue(){return this.codes}}return t})(),npe=class extends ho{constructor(n,e){super(ope,n,e)}};var spe="inekCalculationLocation",iU={type:"inekCalculationLocation",category:"clinic",displayName:{de:"InEK Kalkulationskrankenh\xE4user"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new tM(t.inekCalculationLocation))},fromCondition(t){return Promise.resolve(new tM(t.flag))},newInstance(){return Promise.resolve(new tM(!0))}},tM=(()=>{class t extends hn{static{this.Specification=iU}constructor(e){super(iU.type),this.bool=e}clone(){return new t(this.bool)}equals(e){return super.equals(e)&&vo.equals(this.bool,e.bool)}valid(){return this.bool!==null&&this.bool!==void 0}validationToText(){return this.valid()?"":"Kriterium ausw\xE4hlen"}toCondition(){return Promise.resolve(new rpe(this.bool))}toJSON(){return{type:this.type,inekCalculationLocation:this.bool}}toText(){return this.bool?"mit InEK Kalkulationskrankenh\xE4user":"ohne InEK Kalkulationskrankenh\xE4user"}toValue(){return this.bool}}return t})(),rpe=class extends ZY{constructor(n){super(spe,n),this.flag=n}};var ape="inlierType",oU={type:"inlierType",category:"case",displayName:{de:"Verweildauer"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new nU(t.inlierType))},fromCondition(t){return Promise.resolve(new nU(t.equals))},newInstance(){return Promise.resolve(new nU("INLIER"))}},nU=(()=>{class t extends hn{static{this.Specification=oU}constructor(e){super(oU.type),this.inlierType=e}clone(){return new t(this.inlierType)}equals(e){return super.equals(e)&&vo.equals(this.inlierType,e.inlierType)}validationToText(){return this.valid()?"":"Verweildauer ausw\xE4hlen"}toCondition(){return Promise.resolve(new rU(this.inlierType))}toJSON(){return{type:this.type,inlierType:this.inlierType}}toText(){return"ein Typ der Verweildauer"}toValue(){return this.inlierType}}return t})(),rU=class extends YL{constructor(n){super(ape,n)}};var sU={type:"inlierTypes",category:"case",displayName:{de:"Verweildauer"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new fN(t.inlierTypes))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new fN([]))}},fN=(()=>{class t extends hn{static{this.Specification=sU}constructor(e){super(sU.type),this.inlierTypes=e}clone(){return new t([...this.inlierTypes])}equals(e){return super.equals(e)&&Ui.equals(this.inlierTypes,e.inlierTypes)}validationToText(){return this.valid()?"":"Mindestens eine Verweildauer ausw\xE4hlen"}toCondition(){return Promise.resolve(new FE(this.inlierTypes.map(e=>new rU(e))))}toJSON(){return{type:this.type,inlierTypes:this.inlierTypes}}toText(){return this.inlierTypes.length===1?"ein Typ der Verweildauer":`${this.inlierTypes.length} Typen der Verweildauer`}toValue(){return this.inlierTypes}}return t})();var cpe="insuranceType",aU={type:"insuranceType",category:"person",displayName:{de:"Versicherungsart"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new GE(t.insuranceType))},fromCondition(t){return Promise.resolve(new GE(t.equals))},newInstance(){return Promise.resolve(new GE(null))}},GE=(()=>{class t extends hn{static{this.Specification=aU}constructor(e){super(aU.type),this.insuranceType=e}clone(){return new t(this.insuranceType)}equals(e){return super.equals(e)&&vo.equals(this.insuranceType,e.insuranceType)}validationToText(){return this.valid()?"":"Versicherungsart ausw\xE4hlen"}toCondition(){return Promise.resolve(new lpe(this.insuranceType))}toJSON(){return{type:this.type,insuranceType:this.insuranceType}}toText(){return"Versicherungsart"}toValue(){return this.insuranceType}}return t})(),lpe=class extends YL{constructor(n){super(cpe,n)}};var upe="khtgLeistungsgruppe",lU={type:"khtgLeistungsgruppe",category:"case",displayName:{de:"KHTG Leistungsgruppen"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new gN(t.leistungsgruppen))},fromCondition(t){return Promise.reject(new Error("not yet implemented"))},newInstance(){return Promise.resolve(new gN([]))}},gN=(()=>{class t extends hn{static{this.Specification=lU}constructor(e){super(lU.type),this.leistungsgruppen=e}clone(){return new t([...this.leistungsgruppen])}equals(e){return super.equals(e)&&Ui.equals(this.leistungsgruppen,e.leistungsgruppen)}validationToText(){return this.valid()?"":"Mindestens eine KHTG Leistungsgruppe ausw\xE4hlen"}toCondition(){return Promise.resolve(new dpe(this.leistungsgruppen,[]))}toText(){return this.leistungsgruppen.length===1?"eine KHTG Leistungsgruppe":`${this.leistungsgruppen.length} KHTG Leistungsgruppen`}toJSON(){return{type:this.type,leistungsgruppen:this.leistungsgruppen}}toValue(){return this.leistungsgruppen}}return t})(),dpe=class extends ho{constructor(n,e){super(upe,n,e)}};var ppe="stateId",_N={type:"stateIds",category:"person",displayName:{de:"Bundesl\xE4nder"},sortingIndex:1,occurrence:"single",fromObject(t){return Promise.resolve(new h_(t.stateIds))},fromCondition(t){return Promise.resolve(new h_(t.includes))},newInstance(){return Promise.resolve(new h_([]))}},h_=(()=>{class t extends hn{static{this.Specification=_N}constructor(e){super(_N.type),this.stateIds=e}clone(){return new t([...this.stateIds??[]])}equals(e){return super.equals(e)&&Ui.equals(this.stateIds,e.stateIds)}validationToText(){return this.stateIds.length===0?"Mindestens ein Bundesland ausw\xE4hlen":""}toCondition(){return Promise.resolve(new iM(this.stateIds,[]))}toJSON(){return{type:this.type,stateIds:this.stateIds}}toText(){return this.stateIds.length===1?"ein Bundesland":`${this.stateIds.length} Bundesl\xE4nder`}toValue(){return this.stateIds}}return t})(),iM=class extends ho{constructor(n,e){super(ppe,n,e)}};var hpe="postalCode",yN={type:"postalCodes",category:"person",displayName:{de:"Postleitzahlen"},sortingIndex:5,occurrence:"single",fromObject(t){return Promise.resolve(new df(t.postalCodes))},fromCondition(t){return Promise.resolve(new df(t.includes))},newInstance(){return Promise.resolve(new df([]))}},df=(()=>{class t extends hn{static{this.Specification=yN}constructor(e){super(yN.type),this.postalCodes=e}clone(){return new t([...this.postalCodes])}equals(e){return super.equals(e)&&Ui.equals(this.postalCodes,e.postalCodes)}validationToText(){return this.postalCodes.length===0?"Mindestens eine Postleitzahl ausw\xE4hlen":""}toCondition(){return Promise.resolve(new nM(this.postalCodes,[]))}toJSON(){return{type:this.type,postalCodes:this.postalCodes}}toText(){return this.postalCodes.length===1?"eine Postleitzahl":`${this.postalCodes.length} Postleitzahlen`}toValue(){return this.postalCodes}}return t})(),nM=class extends ho{constructor(n,e){super(hpe,n,e)}};var vN={type:"marketsSelection",category:"person",displayName:{de:"M\xE4rkte"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new $E(t.marketIds,t.stateIds,t.administrativeDistrictIds?t.administrativeDistrictIds.map(n=>Yo.create(n)):[],t.postalCodes))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new $E)}},$E=(()=>{class t extends hn{static{this.Specification=vN}constructor(e=[],i=[],o=[],r=[]){super(vN.type),this.marketIds=e,this.stateIds=i,this.administrativeDistrictIds=o,this.postalCodes=r}clone(){return new t(this.marketIds?[...this.marketIds]:void 0,this.stateIds?[...this.stateIds]:void 0,this.administrativeDistrictIds?[...this.administrativeDistrictIds.map(e=>e.clone())].slice():void 0,this.postalCodes?[...this.postalCodes]:void 0)}equals(e){return super.equals(e)&&Ui.equals(this.marketIds,e.marketIds)&&Ui.equals(this.stateIds,e.stateIds)&&Ui.equals(this.administrativeDistrictIds,e.administrativeDistrictIds,(i,o)=>i.value===o.value)&&Ui.equals(this.postalCodes,e.postalCodes)}getChildResources(){return{[ko.MARKET]:this.marketIds}}validationToText(){return this.marketIds.length===0?"Mindestens einen Markt ausw\xE4hlen":""}toCondition(e){return this.stateIds||this.administrativeDistrictIds||this.postalCodes?Promise.resolve(this._propsToCondition(this.stateIds,this.administrativeDistrictIds,this.postalCodes)):this.marketIds?e.markets.transform(this.marketIds,[{value:"stateId"},{value:"administrativeDistrictId"},{value:"stateId"}]).then(o=>Object.values(o)).then(o=>new Gu(o.map(r=>this._propsToCondition(r.map(s=>s.label).map(s=>parseInt(s,10)),r.map(s=>s.children??[]).flat().map(s=>Yo.create(s.label)),r.map(s=>s.children??[]).flat().map(s=>s.children??[]).flat().map(s=>s.label))))):Promise.resolve(new BE)}toJSON(){return{type:this.type,marketIds:this.marketIds,stateIds:this.stateIds,administrativeDistrictIds:this.administrativeDistrictIds.map(e=>e.getNumericValue()),postalCodes:this.postalCodes}}toText(){let e="";return(this.stateIds?.length>0||this.administrativeDistrictIds?.length>0||this.postalCodes?.length>0)&&(e="und Teile eines Marktes"),this.marketIds.length===1?`ein Markt ${e}`:`${this.marketIds.length} M\xE4rkte ${e}`}toValue(){return{administrativeDistrictIds:this.administrativeDistrictIds,marketIds:this.marketIds,postalCodes:this.postalCodes,stateIds:this.stateIds}}_propsToCondition(e,i,o){let r=[];return e?.length>0&&r.push(new iM(e,[])),i?.length>0&&r.push(new N2(i,[])),o?.length>0&&r.push(new nM(o,[])),r.length===1?r[0]:new Gu(r)}}return t})();var cU={type:"markets",category:"person",displayName:{de:"M\xE4rkte"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new bN(t.marketIds))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new bN([]))}},bN=(()=>{class t extends hn{static{this.Specification=cU}constructor(e){super(cU.type),this.marketIds=e}clone(){return new t([...this.marketIds])}equals(e){return super.equals(e)&&Ui.equals(this.marketIds,e.marketIds)}overrideClone(e){return new t(this.marketIds?Xm.overrideProperties(this.marketIds,"market",e,i=>i):[])}getOverrideProperties(e,i){return this.marketIds.map(o=>new Zm(e,"market",o,o,"possible"))}getChildResources(){return{[ko.MARKET]:this.marketIds}}validationToText(){return this.marketIds.length===0?"Mindestens einen Markt ausw\xE4hlen":""}toCondition(e){if(!e.markets)throw new Error("Missing dependency resolver: markets");return e.markets.transform(this.marketIds,[{value:"stateId"},{value:"administrativeDistrictId"},{value:"postalCode"}]).then(o=>{let r=[],s=Object.values(o).flat().map(v=>parseInt(v.label,10));s.length>0&&r.push(new iM(s,[]));let d=Object.values(o).flat().map(v=>v.children??[]).flat().map(v=>Yo.create(v.label));d.length>0&&r.push(new N2(d,[]));let m=Object.values(o).flat().map(v=>v.children??[]).flat().map(v=>v.children??[]).flat().map(v=>v.label);return m.length>0&&r.push(new nM(m,[])),new Gu(r)})}toJSON(){return{type:this.type,marketIds:this.marketIds}}toText(){return this.marketIds.length===1?"ein Markt":`${this.marketIds.length} M\xE4rkte`}toValue(){return this.marketIds}}return t})();var fpe="marketId",uU={type:"marketIds",category:"person",displayName:{de:"M\xE4rkte"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new dU(t.marketIds))},fromCondition(t){return Promise.resolve(new dU(t.includes))},newInstance(){return Promise.resolve(new dU([]))}},dU=(()=>{class t extends hn{static{this.Specification=uU}constructor(e){super(uU.type),this.marketIds=e}clone(){return new t([...this.marketIds])}equals(e){return super.equals(e)&&Ui.equals(this.marketIds,e.marketIds)}overrideClone(e){return new t(this.marketIds?Xm.overrideProperties(this.marketIds,"market",e,i=>i):[])}getOverrideProperties(e,i){return this.marketIds.map(o=>new Zm(e,"market",o,o,"possible"))}getChildResources(){return{[ko.MARKET]:this.marketIds}}validationToText(){return this.marketIds.length===0?"Mindestens einen Markt ausw\xE4hlen":""}toCondition(){return Promise.resolve(new mpe(this.marketIds,[]))}toJSON(){return{type:this.type,marketIds:this.marketIds}}toText(){return this.marketIds.length===1?"ein Markt":`${this.marketIds.length} M\xE4rkte`}toValue(){return this.marketIds}}return t})(),mpe=class extends ho{constructor(n,e){super(fpe,n,e)}};var _pe="nrwServiceArea",hU={type:"nrwServiceArea",category:"case",displayName:{de:"NRW Leistungsbereiche"},sortingIndex:6,occurrence:"single",fromObject(t){return Promise.resolve(new pU(t.nrwServiceGroupIds))},fromCondition(t){return Promise.resolve(new pU(t.includes))},newInstance(){return Promise.resolve(new pU([]))}},pU=(()=>{class t extends hn{static{this.Specification=hU}constructor(e){super(hU.type),this.nrwServiceGroupIds=e}clone(){return new t([...this.nrwServiceGroupIds])}equals(e){return super.equals(e)&&Ui.equals(this.nrwServiceGroupIds,e.nrwServiceGroupIds)}validationToText(){return this.nrwServiceGroupIds.length===0?"Mindestens einen NRW Leistungsbereich ausw\xE4hlen":""}toCondition(){return Promise.resolve(new gpe(this.nrwServiceGroupIds,[]))}toJSON(){return{type:this.type,nrwServiceGroupIds:this.nrwServiceGroupIds}}toText(){return this.nrwServiceGroupIds.length===1?"ein NRW Leistungsbereich":`${this.nrwServiceGroupIds.length} NRW Leistungsbereiche`}toValue(){return this.nrwServiceGroupIds}}return t})(),gpe=class extends ho{constructor(n,e=[]){super(_pe,n,e)}};var vpe="nrwServiceGroup",mU={type:"nrwServiceGroups",category:"case",displayName:{de:"NRW Leistungsgruppen"},sortingIndex:7,occurrence:"single",fromObject(t){return Promise.resolve(new oM(t.nrwServiceGroupIds))},fromCondition(t){return Promise.resolve(new oM(t.includes))},newInstance(){return Promise.resolve(new oM([]))}},oM=(()=>{class t extends hn{static{this.Specification=mU}constructor(e){super(mU.type),this.nrwServiceGroupIds=e}clone(){return new t([...this.nrwServiceGroupIds])}equals(e){return super.equals(e)&&Ui.equals(this.nrwServiceGroupIds,e.nrwServiceGroupIds)}validationToText(){return this.nrwServiceGroupIds.length===0?"Mindestens eine NRW Leistungsgruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new ype(this.nrwServiceGroupIds,[]))}toJSON(){return{type:this.type,nrwServiceGroupIds:this.nrwServiceGroupIds}}toText(){return this.nrwServiceGroupIds.length===1?"eine NRW Leistungsgruppe":`${this.nrwServiceGroupIds.length} NRW Leistungsgruppen`}toValue(){return this.nrwServiceGroupIds}}return t})(),ype=class extends ho{constructor(n,e=[]){super(vpe,n,e)}};var Cpe="opsChapter",CN={type:"opsChapter",category:"case",displayName:{de:"OPS-Kapitel"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new qE(t.chapters.map(n=>cm.fromObject(n))))},fromCondition(t){return Promise.resolve(new qE(t.includes.map(n=>cm.fromObject(n))))},newInstance(){return Promise.resolve(new qE([]))}},qE=(()=>{class t extends hn{static{this.Specification=CN}constructor(e){super(CN.type),this.chapters=e}clone(){return new t([...this.chapters.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ui.equals(this.chapters,e.chapters,(i,o)=>i.name===o.name&&i.codingSystem===o.codingSystem)}validationToText(){return this.chapters.length===0?"Mindestens ein OPS-Kapitel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new bpe(this.chapters,[]))}toJSON(){return{type:this.type,chapters:this.chapters}}toText(){return"OPS-Kapitel"}toValue(){return this.chapters}}return t})(),bpe=class extends ho{constructor(n,e){super(Cpe,n,e)}};var xN={type:"fourDigitOpsCode",category:"case",displayName:{de:"OPS-Ziffer 4-Steller"},sortingIndex:11,occurrence:"single",fromObject(t){return Promise.resolve(new fS(t.codes.map(n=>zs.fromObject(n))))},fromCondition(t){return Promise.resolve(new fS(t.includes.map(n=>zs.fromObject(n))))},newInstance(){return Promise.resolve(new fS([]))}},fS=(()=>{class t extends hn{static{this.Specification=xN}constructor(e){super(xN.type),this.codes=e}clone(){return new t([...this.codes.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ui.equals(this.codes,e.codes,(i,o)=>i.name===o.name&&i.codingSystem===o.codingSystem)}validationToText(){return this.codes.length===0?"Mindestens eine OPS-Ziffer ausw\xE4hlen":""}toCondition(){return Promise.resolve(new NE(this.codes,[]))}toJSON(){return{type:this.type,codes:this.codes}}toText(){return"OPS-Ziffer 4-Steller"}toValue(){return this.codes}}return t})();var wpe="opsGroup",wN={type:"opsGroup",category:"case",displayName:{de:"OPS-Gruppe"},sortingIndex:9,occurrence:"single",fromObject(t){return Promise.resolve(new KE(t.groups.map(n=>cm.fromObject(n))))},fromCondition(t){return Promise.resolve(new KE(t.includes.map(n=>cm.fromObject(n))))},newInstance(){return Promise.resolve(new KE([]))}},KE=(()=>{class t extends hn{static{this.Specification=wN}constructor(e){super(wN.type),this.groups=e}clone(){return new t([...this.groups.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ui.equals(this.groups,e.groups,(i,o)=>i.name===o.name&&i.codingSystem===o.codingSystem)}validationToText(){return this.groups.length===0?"Mindestens eine OPS-Gruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new xpe(this.groups,[]))}toJSON(){return{type:this.type,groups:this.groups}}toText(){return"OPS-Gruppe"}toValue(){return this.groups}}return t})(),xpe=class extends ho{constructor(n,e){super(wpe,n,e)}};var SN={type:"threeDigitOpsCode",category:"case",displayName:{de:"OPS-Ziffer 3-Steller"},sortingIndex:10,occurrence:"single",fromObject(t){return Promise.resolve(new gS(t.codes.map(n=>zs.fromObject(n))))},fromCondition(t){return Promise.resolve(new gS(t.includes.map(n=>zs.fromObject(n))))},newInstance(){return Promise.resolve(new gS([]))}},gS=(()=>{class t extends hn{static{this.Specification=SN}constructor(e){super(SN.type),this.codes=e}clone(){return new t([...this.codes.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ui.equals(this.codes,e.codes,(i,o)=>i.name===o.name&&i.codingSystem===o.codingSystem)}validationToText(){return this.codes.length===0?"Mindestens eine OPS-Ziffer ausw\xE4hlen":""}toCondition(){return Promise.resolve(new NE(this.codes,[]))}toJSON(){return{type:this.type,codes:this.codes}}toText(){return"OPS-Ziffer 3-Steller"}toValue(){return this.codes}}return t})();var Tpe="specialEquipment",fU={type:"specialEquipment",category:"clinic",displayName:{de:"Klinik-Ausstattung"},occurrence:"single",sortingIndex:8,fromObject(t){return Promise.resolve(new rM(t.includeSpecialEquipmentKeys))},newInstance(){return Promise.resolve(new rM)},fromCondition(t){return Promise.resolve(new rM(t.includes,t.excludes))}},rM=(()=>{class t extends hn{static{this.Specification=fU}constructor(e=[],i=[]){super(fU.type),this.includeKeys=e,this.excludeKeys=i}toCondition(){return Promise.resolve(new Spe(this.includeKeys,this.excludeKeys))}toJSON(){return{type:this.type,includeSpecialEquipmentKeys:this.includeKeys}}toText(){return this.includeKeys.length===1?"ein Ausstattungs-Merkmal":`${this.includeKeys.length} Ausstattungs-Merkmale`}validationToText(){return this.valid()?"":"Ausstattungs-Merkmale ausw\xE4hlen"}toValue(){return this.includeKeys}clone(){return new t([...this.includeKeys],[...this.excludeKeys])}equals(e){return super.equals(e)&&Ui.equals(this.includeKeys,e.includeKeys)&&Ui.equals(this.excludeKeys,e.excludeKeys)}}return t})(),Spe=class extends ho{constructor(n=[],e=[]){super(Tpe,n,e)}};var Epe="specialtyDepartmentId",aM={type:"specialtyDepartmentIds",category:"case",displayName:{de:"Fachabteilung"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new sM(t.specialtyDepartmentIds))},fromCondition(t){return Promise.resolve(new sM(t.includes))},newInstance(){return Promise.resolve(new sM([]))}},sM=(()=>{class t extends hn{static{this.Specification=aM}constructor(e){super(aM.type),this.specialtyDepartmentIds=e}clone(){return new t([...this.specialtyDepartmentIds])}equals(e){return super.equals(e)&&Ui.equals(this.specialtyDepartmentIds,e.specialtyDepartmentIds)}getOverrideProperties(e,i){return this.specialtyDepartmentIds.map(o=>new Zm(e,"specialtyDepartmentId",o,o,"possible",i))}overrideClone(e){let i=Xm.overrideProperties(this.specialtyDepartmentIds,"specialtyDepartmentId",e,o=>o);return new t(i)}validationToText(){return this.specialtyDepartmentIds.length===0?"Mindestens eine Fachabteilung ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Ipe(this.specialtyDepartmentIds))}toJSON(){return{type:this.type,specialtyDepartmentIds:this.specialtyDepartmentIds}}toText(){return this.specialtyDepartmentIds.length===1?"eine Fachabteilung":`${this.specialtyDepartmentIds.length} Fachabteilungen`}toValue(){return this.specialtyDepartmentIds}}return t})(),Ipe=class extends ho{constructor(n=[],e=[]){super(Epe,n,e)}};var Ape="virtualClinicBenchmarkingGroupIds",gU={type:"virtualBenchmarkingGroupIds",category:"clinic",displayName:{de:"Benchmarking Gruppe"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new lM(t.virtualBenchmarkingGroupIds))},fromCondition(t){return Promise.resolve(new lM(t.includes))},newInstance(){return Promise.resolve(new lM([]))}},lM=(()=>{class t extends hn{static{this.Specification=gU}constructor(e){super(gU.type),this.virtualBenchmarkingGroupIds=e}clone(){return new t([...this.virtualBenchmarkingGroupIds])}equals(e){return super.equals(e)&&Ui.equals(this.virtualBenchmarkingGroupIds,e.virtualBenchmarkingGroupIds)}getChildResources(){let e={};return e[ko.VIRTUAL_CLINIC_BENCHMARKING_GROUP]=this.virtualBenchmarkingGroupIds,e}getOverrideProperties(e,i){let o=[];return this.virtualBenchmarkingGroupIds&&this.virtualBenchmarkingGroupIds.length>0&&this.virtualBenchmarkingGroupIds.forEach(r=>{o.push(new Zm(e,"virtualBenchmarkingGroupId",r,r,"possible",void 0))}),o}overrideClone(e){let i=this.virtualBenchmarkingGroupIds?Xm.overrideProperties(this.virtualBenchmarkingGroupIds,"virtualBenchmarkingGroupId",e,o=>o):[];return new t(i)}validationToText(){return this.virtualBenchmarkingGroupIds.length===0?"Mindestens eine Benchmarking Gruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Dpe(this.virtualBenchmarkingGroupIds))}toJSON(){return{type:this.type,virtualBenchmarkingGroupIds:this.virtualBenchmarkingGroupIds}}toText(){return this.virtualBenchmarkingGroupIds.length===1?"eine Benchmarking Gruppe":`${this.virtualBenchmarkingGroupIds.length} Benchmarking Gruppen`}toValue(){return this.virtualBenchmarkingGroupIds}}return t})(),Dpe=class extends ho{constructor(n=[],e=[]){super(Ape,n,e)}};var $a=class t{static EMPTY(){return new x0([])}static equals(n,e){return vo.equals(n,e,()=>{if(n.type!==e.type)return!1;switch(n.type){case"combination":return n.equals(e);default:return n.equals(e)}})}static fromConditionJson(n,e){let i=Object.keys(n);if(i.length===0||i.length>1)throw new Error(`${t.name}.fromObject not possible for input [${JSON.stringify(n)}]`);let o=i[0],r=n[i[0]];switch(o){case g6:case _6:return I6.fromConditionJson(o,r,e);case Qde:case Zde:case Hde:case jde:case Gde:case $de:case qde:case Kde:case Wde:case Yde:return Y2.fromCondition(r);default:{let s=e.find(d=>d.filterConditionId===o);return s?s.filterConditionPluginSpecification.fromCondition(r):Promise.reject(new Error(`No filter plugin found for ${o}, input [${JSON.stringify(n)}]`))}}}static fromObject(n,e){if(!n.type)throw new Error(`${t.name}.fromObject not possible for input [${JSON.stringify(n)}]`);switch(n.type){case"combination":return I6.fromObject(n,e);default:{let i=e.find(o=>o.filterType===n.type);return i?i.filterConditionPluginSpecification.fromObject(n):Promise.reject(new Error(`${t.name}.fromObject not possible for input [${JSON.stringify(n)}]`))}}}static withoutType(n,e){switch(n.type){case"combination":{let i=n;return i.expression=i.expression.map(o=>t.withoutType(o,e)).filter(o=>!!o),i}default:return n.type===e.type?null:n}}static findAll(n,e){switch(e.type){case"combination":return e.expression.map(i=>this.findAll(n,i)).flat();case n.type:return[e];default:return[]}}static and(n,e){return n.type==="combination"&&n.kind==="AND"?(n.expression.push(e),n):e.type==="combination"&&e.kind==="AND"?(e.expression.push(n),e):new x0([n,e])}static or(n,e){return n.type==="combination"&&n.kind==="OR"?(n.expression.push(e),n):e.type==="combination"&&e.kind==="OR"?(e.expression.push(n),e):new Mx([n,e])}static formatter(n){switch(n.type){case"combination":{let e=n.kindToText();return n.expression.map(i=>({kind:e,expressionText:this.formatter(i)}))}default:return n.toText()}}};var Iy=class{constructor(n,e){this.type=n,this.expression=e}getOverrideProperties(n,e){return[...this.expression.getOverrideProperties(n,e)]}toJSON(){return{type:this.type,expression:this.expression.toJSON()}}getChildResources(){return this.expression.getChildResources()}toRequestBody(n){return this.expression.toCondition(n)}equals(n){return vo.equals(this.type,n.type)&&$a.equals(this.expression,n.expression)}};var _U={type:"clinicIds",category:"clinic",displayName:{de:"Kliniken"},sortingIndex:8,occurrence:"single",fromObject(t){let n=null,e=null;return t.includes&&(n=t.includes.map(i=>ga.fromString(i))),t.excludes&&(e=t.excludes.map(i=>ga.fromString(i))),Promise.resolve(new Rx(n,e))},fromCondition(t){let n=null,e=null;return t.includes&&(n=t.includes.map(i=>ga.fromObj(i))),t.excludes&&(e=t.excludes.map(i=>ga.fromObj(i))),Promise.resolve(new Rx(n,e))},newInstance(){return Promise.resolve(new Rx([]))}},Rx=(()=>{class t extends hn{static{this.Specification=_U}constructor(e,i=null){super(_U.type),this.includes=e,this.excludes=i}clone(){return new t(this.includes?[...this.includes.map(e=>e.clone())]:null,this.excludes?[...this.excludes.map(e=>e.clone())]:null)}equals(e){return super.equals(e)&&Ui.equals(this.includes,e.includes,(i,o)=>i.equals(o))&&Ui.equals(this.excludes,e.excludes,(i,o)=>i.equals(o))}valid(){return!0}validationToText(){return this.valid()?"":"Mindestens eine Klinik als Basismenge oder Ausschluss ausw\xE4hlen"}toCondition(e){if(e&&e.clinicIds){let i=this.includes?this.includes.map(r=>e.clinicIds.resolve(r)):[],o=this.excludes?this.excludes.map(r=>e.clinicIds.resolve(r)):[];return Promise.all(i).then(r=>Promise.all(o).then(s=>({includes:r,excludes:s}))).then(r=>new RE(r.includes,r.excludes))}else return Promise.resolve(new RE(this.includes,this.excludes))}toJSON(){return{type:this.type,includes:this.includes?this.includes.map(e=>e.toString()):null,excludes:this.excludes?this.excludes.map(e=>e.toString()):null}}toText(){let e="alle Kliniken werden als Basismenge genutzt";if(this.includes&&this.includes.length>0)switch(this.includes.length){case 0:e="alle Kliniken werden als Basismenge genutzt";break;case 1:e="1 Klinik wird als Basismenge genutzt";break;default:e=`eine von ${this.includes.length} Kliniken`;break}if(this.excludes&&this.excludes.length>0)switch(this.includes.length>0&&(e=e+", aber"),this.excludes.length){case 0:break;case 1:e=e+" 1 Klinik ausgeschlossen";break;default:e=e+` ${this.excludes.length} Kliniken ausgeschlossen`;break}return e}toValue(){return{includes:this.includes,excludes:this.excludes}}}return t})();var cM=class extends lE{constructor(n){super(),this._customClinicIdentifierYear=n}resolve(n){return Promise.resolve(new ga(n.ik,n.sn,this._customClinicIdentifierYear))}};var uf=class t extends Iy{static fromObj(n,e){let i=null,o=null;n.createdDate&&(i=new Date(n.createdDate)),n.modifiedDate&&(o=new Date(n.modifiedDate));let r=Promise.resolve($a.EMPTY());return n.condition&&(r=$a.fromConditionJson(n.condition,e)),r.then(s=>new t(n.id,n.name,i,o,n.highestPermission,s))}static{this.SPECIFICATION=[{specification:h_.Specification,needsAuthentication:!1},{specification:lf.Specification,needsAuthentication:!1},{specification:wy.Specification,needsAuthentication:!1},{specification:Sy.Specification,needsAuthentication:!1},{specification:df.Specification,needsAuthentication:!1},{specification:Rx.Specification,needsAuthentication:!0},{specification:cf.Specification,needsAuthentication:!1},{specification:G2.Specification,needsAuthentication:!1},{specification:pS.Specification,needsAuthentication:!1},{specification:tM.Specification,needsAuthentication:!1},{specification:X2.Specification,needsAuthentication:!1},{specification:H2.Specification,needsAuthentication:!1},{specification:$2.Specification,needsAuthentication:!1},{specification:j2.Specification,needsAuthentication:!1},{specification:pb.Specification,needsAuthentication:!0},{specification:rM.Specification,needsAuthentication:!1}]}constructor(n,e,i,o,r,s=$a.EMPTY()){super("clinics-filter",s),this.id=n,this.name=e,this.createdDate=i,this.modifiedDate=o,this.highestPermission=r,this.resourceName=ko.CLINICS_FILTER}toJSON(){return mt(be({},super.toJSON()),{id:this.id,name:this.name,createdDate:this.createdDate,modifiedDate:this.modifiedDate,highestPermission:this.highestPermission})}clone(){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.expression.clone())}overrideClone(n){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.expression.overrideClone(n))}equals(n){return super.equals(n)&&vo.equals(this.id,n.id)&&vo.equals(this.name,n.name)}toRequestFormat(n){return this.toRequestBody(n).then(e=>({id:this.id,name:this.name,createdDate:this.createdDate,modifiedDate:this.modifiedDate,highestPermission:this.highestPermission,condition:e}))}};var pQ=class{constructor(n,e){this._baseUrl=n,this._resultUrl=e}crud(){return`${this._baseUrl}/`}findById(n){return`${this.crud()}${n}`}result(){return`${this._resultUrl}/`}export(){return`${this._resultUrl}/export`}staffingByClinicsFilter(){return`${this.result()}filter/staffings`}caseNumbersByClinicsFilter(){return`${this.result()}filter/case-numbers`}};var hQ=class{constructor(n){this._baseUrl=n}crud(){return`${this._baseUrl}/`}byId(n){return`${this.crud()}${n}`}codes(n){return`${this.byId(n)}/codes/`}codesByCodingSystem(n,e){return`${this.byId(n)}/codes/${e}`}};var Fx=class extends b0{constructor(n,e,i,o){super(n,e,i),this._http=o,this._api=new hQ(this.getBaseUrl())}findAll(n,e){let i=this._api.crud(),o=new Pr;return n&&(o=o.append("minPermission",n)),e&&(o=o.append("maxPermission",e)),this._http.get(i,{params:o}).pipe(vt(r=>r.map(s=>rN.fromObject(s))))}create(n){let e=this._api.crud();return this._http.post(e,n).pipe(vt(rN.fromObject))}update(n){this.deleteCacheForKey(n.id);let e=this._api.crud();return this._http.put(e,n)}findById(n){let e=this._api.byId(n);return this._cache.cacheObservable(this.key(n),this._http.get(e).pipe(vt(rN.fromObject),du(1)))}findByIds(n){let e=n.map(i=>this.findById(i));return tc(e)}getCodesAll(n,e,i=!0){let o=`${this._api.codesByCodingSystem(n,e)}/all`,r=new Pr().append("sorted",i);return this._http.get(o,{params:r}).pipe(Sn(1),vt(s=>s.map(zE.fromObject)))}addCodes(n,e,i){let o=this._api.codesByCodingSystem(i,e),s=Ui.chunking(n,1e3).map(d=>this._http.post(o,d));return tc(s).pipe(Sn(1))}removeAllCodes(n,e){let i=this._api.codesByCodingSystem(e,n);return this._http.delete(i).pipe(Sn(1))}getCodesPage(n,e,i){let o=this._api.codesByCodingSystem(n,e);return this._http.get(o,{params:sy.toHttpParams(i)}).pipe(Sn(1),vt(r=>(r.content=r.content.map(zE.fromObject),r)))}removeCode(n,e){let i=`${this._api.codesByCodingSystem(n,e.codingSystem)}/${e.name}`;return this._http.delete(i)}editCode(n,e){let i=`${this._api.codesByCodingSystem(n,e.codingSystem)}/${e.name}`;return this._http.put(i,e)}};var dM=(()=>{class t extends uQ{constructor(e){super(),this._codeSpectrumService=e,this._cache={}}resolve(e){let i=e.codeSpectrumIds.map(o=>{let r,s=`${o}_${e.codingSystem}`;return this._cache[s]?r=this._cache[s]:(r=Wl(this._codeSpectrumService.getCodesAll(o,e.codingSystem,!1)),this._cache[s]=r),r});return Promise.all(i).then(o=>o.reduce((r,s)=>r.concat(s),[]).filter((r,s,d)=>d.findIndex(m=>m.name===r.name)===s))}static{this.\u0275fac=function(i){return new(i||t)(di(Fx))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var D4n=new fi("CodeSpectrumFeatureConfig");var TN={codingSystems:["ICD-10-GM","OPS","G-DRG"],codeTypeSpecification:!1,matchingSpecification:!1,codeTypeClassifications:{"ICD-10-GM":rb["ICD-10-GM"][0],OPS:rb.OPS[2],"G-DRG":null},resolveOnSelect:!1,includesExcludesSelection:!1,grouperVersionYear:!1},yU={disableFnc:Ax,detailLinkFnc:kx,filterFnc:u_,emptyResourcesText:"Keine Ziffer-Spektra gefunden",resourceNameTitle:"Ziffer-Spektra",selectOnInit:"first",resetOption:!1};var vU=class{constructor(n,e){this._codeSpectrumSelect=n,this._options=e,this.update$=new hi,this._codeTypeClassificationOptions=[],this._codeSpectrumSelect&&this._initCodeTypeClassification()}updateCodeSpectraSelect(n,e){this._codeSpectrumSelect[n]=e,this._initCodeTypeClassification(),n==="codingSystem"&&this._onCodingSystemChange(),n==="codeSpectra"&&(e&&Array.isArray(e)?this._codeSpectrumSelect.codeSpectrumIds=e.map(i=>i.id):this._codeSpectrumSelect.codeSpectrumIds=[]),this._onSelect()}get codes(){return this._codes}get codeTypeClassificationOptions(){return this._codeTypeClassificationOptions}get codeSpectrumSelect(){return this._codeSpectrumSelect}set codeSpectrumSelect(n){this._codeSpectrumSelect=n,this._initCodingSystem(),n.codeTypeClassification?this._codeTypeClassificationOptions=rb[this._codeSpectrumSelect.codingSystem]:this._initCodeTypeClassification(),(n.codeSpectra&&n.codeSpectra.length>0||n.codeSpectrumIds&&n.codeSpectrumIds.length>0)&&n.codingSystem&&this._onSelect()}set options(n){this._options=n,this._codeSpectrumSelect&&!this._codeSpectrumSelect.codeTypeClassification&&this._initCodeTypeClassification()}get options(){return this._options}_onCodingSystemChange(){this._setCodeTypeSpecification(),this._codeSpectrumSelect.codeTypeClassification=this._resetCodeTypeClassification(),this._codeTypeClassificationOptions=rb[this._codeSpectrumSelect?.codingSystem]}_onSelect(){this.update$.next(this._codeSpectrumSelect)}_initCodingSystem(){!this._codeSpectrumSelect?.codingSystem&&this._options&&(this._codeSpectrumSelect.codingSystem=this._options.codingSystems[0])}_setCodeTypeSpecification(){if(this._codeSpectrumSelect?.codingSystem)switch(this._codeSpectrumSelect.codingSystem){case"ICD-10-GM":case"ICD-10-AT":case"ICD-10-UK":{this._codeSpectrumSelect.codeTypeSpecification="mainDiagnosis";break}default:{this._codeSpectrumSelect.codeTypeSpecification=null;break}}}_resetCodeTypeClassification(){let n;return this._options.codeTypeClassifications==="selectable"?n=TN.codeTypeClassifications[this._codeSpectrumSelect?.codingSystem]??rb[this._codeSpectrumSelect?.codingSystem][0]:this._codeSpectrumSelect?.codingSystem==="G-DRG"?n=null:n=this._options.codeTypeClassifications[this._codeSpectrumSelect.codingSystem],n}_initCodeTypeClassification(){let n;this._codeTypeClassificationOptions=rb[this._codeSpectrumSelect?.codingSystem],this._codeSpectrumSelect.codeTypeClassification||(n=this._resetCodeTypeClassification(),this._codeSpectrumSelect.codeTypeClassification=n)}};var qPe=(()=>{class t{constructor(){this.codeTypeClassificationChange=new ve}onCodeTypeClassificationChange(e){this.codeTypeClassificationChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-spectrum-select-inline-code-type-classifications"]],inputs:{codingSystem:"codingSystem",matchingSpecification:"matchingSpecification",codeTypeClassification:"codeTypeClassification",codeTypeClassificationOptions:"codeTypeClassificationOptions"},outputs:{codeTypeClassificationChange:"codeTypeClassificationChange"},decls:4,vars:3,consts:[["inputId","code-spectrum-select-inline-code-type-classification-select","fluid","","variant","filled","optionLabel","name","dataKey","name",1,"mb-4",3,"onChange","options","ngModel","disabled"],["for","code-spectrum-select-inline-code-type-classification-select"]],template:function(i,o){i&1&&(k(0,"p-iftalabel")(1,"p-select",0),ie("onChange",function(s){return o.onCodeTypeClassificationChange(s.value)}),D(),k(2,"label",1),Q(3,"Hierarchieebene"),D()()),i&2&&(T(),E("options",o.codeTypeClassificationOptions)("ngModel",o.codeTypeClassification)("disabled",o.codingSystem==="G-DRG"||o.matchingSpecification==="exact"))},dependencies:[as,Ql,hr,no,Lr],encapsulation:2})}}return t})();var KPe=(()=>{class t{constructor(){this.matchingSpecificationChange=new ve,this.DISPLAY_NAME={exact:"Exakt",leftAnchored:"Aufl\xF6sen"},this.options=["exact","leftAnchored"].map(e=>({matchingSpecification:e,displayName:this.DISPLAY_NAME[e]}))}ngOnChanges(e){if(e.codeTypeSpecification)if(this.codeTypeSpecification==="skCode"){let i="leftAnchored";this.matchingSpecification=i,this.options=[i].map(o=>({matchingSpecification:o,displayName:this.DISPLAY_NAME[o]})),this.onMatchingSpecificationChange(i)}else this.options=["exact","leftAnchored"].map(i=>({matchingSpecification:i,displayName:this.DISPLAY_NAME[i]}))}onMatchingSpecificationChange(e){this.matchingSpecificationChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-spectrum-select-inline-matching-specification"]],inputs:{matchingSpecification:"matchingSpecification",codeTypeSpecification:"codeTypeSpecification"},outputs:{matchingSpecificationChange:"matchingSpecificationChange"},features:[Ot],decls:4,vars:2,consts:[["inputId","code-spectrum-select-inline-matching-specification","fluid","","variant","filled","optionLabel","displayName","optionValue","matchingSpecification",1,"mb-4",3,"onChange","options","ngModel"],["for","code-spectrum-select-inline-matching-specification"]],template:function(i,o){i&1&&(k(0,"p-iftalabel")(1,"p-select",0),ie("onChange",function(s){return o.onMatchingSpecificationChange(s.value)}),D(),k(2,"label",1),Q(3,"Abgleich"),D()()),i&2&&(T(),E("options",o.options)("ngModel",o.matchingSpecification))},dependencies:[as,Ql,hr,no,Lr],encapsulation:2})}}return t})();var WPe=(()=>{class t{constructor(){this.codeTypeSpecificationChange=new ve,this.config={selectLabel:"Spezifikation",resetOption:!1,option:{sortFnc:(e,i)=>e.displayName.localeCompare(i.displayName),uniqueFnc:e=>e.codeTypeSpecification,searchOptionAccessor:e=>e.displayName}},this.options=vc}ngOnChanges(e){if(e.codeTypeSpecification&&e.codeTypeSpecification.currentValue&&(this.initial={codeTypeSpecification:this.codeTypeSpecification,displayName:KP[this.codeTypeSpecification]}),e.codingSystem){switch(this.codingSystem){case"ICD-10-AT":case"ICD-10-UK":case"ICD-10-GM":{this.options=ci(Sz["ICD-10-GM"].map(i=>({codeTypeSpecification:i,displayName:KP[i]})));break}case"OPS":{this.options=ci(Sz.OPS.map(i=>({codeTypeSpecification:i,displayName:KP[i]})));break}case"G-DRG":{this.options=ci(Sz["G-DRG"].map(i=>({codeTypeSpecification:i,displayName:KP[i]})));break}}this.codeTypeSpecification||this.options.subscribe(i=>{this.initial=i[0],this.onSelectionChanged(i[0])})}}onSelectionChanged(e){this.onCodeTypeSpecificationChange(e.codeTypeSpecification)}onCodeTypeSpecificationChange(e){this.codeTypeSpecificationChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-spectrum-select-inline-code-type-specification"]],inputs:{codeTypeSpecification:"codeTypeSpecification",codingSystem:"codingSystem"},outputs:{codeTypeSpecificationChange:"codeTypeSpecificationChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-single-select",0),ie("selection",function(s){return o.onSelectionChanged(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.initial)},dependencies:[jl],encapsulation:2})}}return t})();var kpe=(()=>{class t{constructor(){this.includesChange=new ve,this.options=[{bool:!0,displayName:"Einschlie\xDFend"},{bool:!1,displayName:"Ausschlie\xDFend"}]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-spectrum-select-inline-includes"]],inputs:{includes:"includes"},outputs:{includesChange:"includesChange"},decls:4,vars:2,consts:[["inputId","code-spectrum-select-inline-includes","fluid","","variant","filled","optionLabel","displayName","optionValue","bool",1,"mb-4",3,"onChange","ngModel","options"],["for","code-spectrum-select-inline-includes"]],template:function(i,o){i&1&&(k(0,"p-iftalabel")(1,"p-select",0),ie("onChange",function(s){return o.includesChange.emit(s.value)}),D(),k(2,"label",1),Q(3,"Einschluss Art"),D()()),i&2&&(T(),E("ngModel",o.includes)("options",o.options))},dependencies:[Ql,hr,no,Lr,as],encapsulation:2,changeDetection:0})}}return t})();var YPe=(()=>{class t{constructor(){this.grouperVersionYearChange=new ve,this.options=[{grouperVersionYear:2024,displayName:"2024"},{grouperVersionYear:-1,displayName:"Grouper-Version des Aufnahme Jahres"}],this.initial=-1}ngOnChanges(e){this.grouperVersionYear&&(this.initial=this.grouperVersionYear)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-spectrum-select-inline-grouper-version"]],inputs:{grouperVersionYear:"grouperVersionYear"},outputs:{grouperVersionYearChange:"grouperVersionYearChange"},features:[Ot],decls:4,vars:2,consts:[["inputId","code-spectrum-grouper-version","fluid","","variant","filled","optionValue","grouperVersionYear","optionLabel","displayName",1,"mb-4",3,"onChange","ngModel","options"],["for","code-spectrum-grouper-version"]],template:function(i,o){i&1&&(k(0,"p-iftalabel")(1,"p-select",0),ie("onChange",function(s){return o.grouperVersionYearChange.emit(s.value)}),D(),k(2,"label",1),Q(3,"Grouper Version"),D()()),i&2&&(T(),E("ngModel",o.initial)("options",o.options))},dependencies:[as,Ql,hr,no,Lr],encapsulation:2})}}return t})();var bU=class{constructor(n){this._environmentService=n}codingSystem(n){return`${this._codingSystemUrl(n)}/`}children(n){return`${`${this._codingSystemUrl(n)}/`}children/`}codeGroup(n){let e=this._environmentService.load("AYS_CODE_URL");return n==="G-DRG"?`${e}/${n}/mdc-groups/`:n==="ICD-10-GM"||n==="ICD-10-AT"?`${e}/${n}/chapters/`:`${e}/${n}/groups/`}codeByCodeName(n,e){return`${this._codingSystemUrl(n)}/${e}`}codeAgeGroupDistribution(n,e){return`${this._codingSystemUrl(n)}/${e}/cases/agm-id/distribution`}codePrevalence(n,e){return`${this._codingSystemUrl(n)}/${e}/cases/prevalence`}treeParent(n,e){return`${this._codingSystemUrl(n)}/tree/${e}`}treeChildren(n){return`${this._codingSystemUrl(n)}/tree/children`}_codingSystemUrl(n){return`${this._environmentService.load("AYS_CODE_URL")}/${n}`}};var IN=class{constructor(n,e){this._locale=n,this.filename=e}static _instanceOfNumberFormatOptions(n){return n?"localeMatcher"in n||"style"in n||"currency"in n||"currencyDisplay"in n||"currencySign"in n||"useGrouping"in n||"minimumIntegerDigits"in n||"minimumFractionDigits"in n||"maximumFractionDigits"in n||"minimumSignificantDigits"in n||"maximumSignificantDigits"in n:!1}static _instanceOfDateTimeFormatOptions(n){return n?"localeMatcher"in n||"weekday"in n||"era"in n||"year"in n||"month"in n||"day"in n||"hour"in n||"minute"in n||"second"in n||"timeZoneName"in n||"formatMatcher"in n||"hour12"in n||"timeZone"in n:!1}};var gLe=Ap(XPe(),1),_Le=Ap(CU(),1);function xU(t){if(!t)throw new Error("`contentType` is required");var n=t.toLowerCase().replace(/.*\//,"");if(!n)throw new Error("Unsupported `contentType`: "+t);return n}function wU(t,n){var e=n.sheetId,i=n.sheetImages;return"sheet".concat(e,"-image").concat(i.indexOf(t)+1,".").concat(xU(t.contentType))}function SU(t,n){var e=n.attribute;return t=t.replace(FEt,"&").replace(PEt,">").replace(LEt,"<"),e&&(t=t.replace(NEt,"'").replace(BEt,""")),t}var FEt=/&/g,PEt=/>/g,LEt=/1&&arguments[1]!==void 0?arguments[1]:{},e=n.removeDiscouragedCharacters,i=e===void 0?!0:e;return t=t.replace(VEt,""),i&&(t=t.replace(zEt,"")),t}function yp(t){return SU(TU(t),{attribute:!0})}function Fpe(t){var n=t.sheets,e=t.stickyRowsCount,i=t.stickyColumnsCount;return''+(e||i?"":"")+""+n.map(function(o){var r=o.id,s=o.name;return'')}).join("")+""}function Ppe(t){var n=t.sheets;return''+n.map(function(e){var i=e.id;return'')}).join("")+'')+'')+""}var JPe='';function Lpe(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=UEt(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UEt(t,n){if(t){if(typeof t=="string")return eLe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?eLe(t,n):void 0}}function eLe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e'+n.map(function(i){var o=i.id;return'')}).join("")+n.map(function(i){var o=i.id,r=i.images;return r?''):""}).join("")+''+HEt(e).map(function(i){var o=i.fileExtension,r=i.contentType;return'')}).join("")+""}function HEt(t){if(!t)return[];var n=[],e=function(V){var $=xU(V.contentType),q=n.find(function(W){return W.fileExtension===$});q||n.push({fileExtension:$,contentType:V.contentType})};if(Array.isArray(t[0]))for(var i=Lpe(t),o;!(o=i()).done;)for(var r=o.value,s=Lpe(r),d;!(d=s()).done;){var m=d.value;e(m)}else for(var v=Lpe(t),w;!(w=v()).done;){var O=w.value;e(O)}return n}function jEt(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=GEt(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GEt(t,n){if(t){if(typeof t=="string")return tLe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?tLe(t,n):void 0}}function tLe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e',i=0,o=function(){var m=s.value,v=i+1,w=function(N){return qEt(N,m.dpi)};e+="",e+="",e+="".concat(m.anchor.column-1,""),e+="".concat(typeof m.offsetX=="number"?w(m.offsetX):0,""),e+="".concat(m.anchor.row-1,""),e+="".concat(typeof m.offsetY=="number"?w(m.offsetY):0,""),e+="",e+=''),e+="",e+="",e+=''),e+="",e+='',e+="",e+="",e+="",e+=''),e+="",e+="",e+="",e+="",e+="",e+='',e+="",e+="",e+="",e+="",e+="",e+="",i++},r=jEt(n),s;!(s=r()).done;)o();return e+="",e}var iLe=96,$Et=96;function qEt(t,n){var e=iLe;return Math.round(t*9525*(iLe/e)*($Et/n))}function Vpe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.images,e=n===void 0?[]:n,i=t.sheetId;return''+e.map(function(o,r){return'')}).join("")+""}function zpe(t){var n=t.id,e=t.images;return''+(e?''):"")+""}function IU(t){return SU(TU(t),{attribute:!1})}function KEt(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=WEt(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WEt(t,n){if(t){if(typeof t=="string")return nLe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?nLe(t,n):void 0}}function nLe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e"),n+=IU(o),n+=""}return n+="",n}var Hpe=100;function jpe(t){var n=t.fontFamily,e=t.fontSize,i=!!(n||e);n===void 0&&(n="Calibri"),e===void 0&&(e=12);var o=[],r={},s=[],d={},m=[],v={},w=[],O={},N=[],V={};m.push({size:e,family:n,custom:i}),v["-:-"]=0,w.push({}),O["-"]=0,N.push({left:{},right:{},top:{},bottom:{}}),V["-:-/-:-/-:-/-:-"]=0,w.push({gray125:!0});function $(q,W){var te=q.align,fe=q.alignVertical,xe=q.textRotation,Fe=q.indent,Re=q.wrap,Se=q.fontFamily,ke=q.fontSize,Xe=q.fontWeight,yt=q.fontStyle,We=q.color,Et=q.backgroundColor,we=q.borderColor,Qt=q.borderStyle,Xi=q.leftBorderColor,ei=q.leftBorderStyle,li=q.rightBorderColor,zt=q.rightBorderStyle,Bi=q.topBorderColor,wt=q.topBorderStyle,Lt=q.bottomBorderColor,Yi=q.bottomBorderStyle,fn=W.format,tn=void 0,vn="".concat(Se||"-",":").concat(ke||"-",":").concat(Xe||"-",":").concat(yt||"-",":").concat(We||"-"),Fo=Et||"-",Cn="".concat(Bi||we||"-",":").concat(wt||Qt||"-")+"/"+"".concat(li||we||"-",":").concat(zt||Qt||"-")+"/"+"".concat(Lt||we||"-",":").concat(Yi||Qt||"-")+"/"+"".concat(Xi||we||"-",":").concat(ei||Qt||"-"),zn="".concat(te||"-","/").concat(fe||"-","/").concat(xe||"-","/").concat(Fe||"-","/").concat(Re||"-","/").concat(fn||"-","/").concat(vn,"/").concat(Fo,"/").concat(Cn),Co=d[zn];if(Co!==void 0)return Co;var ro;fn&&(ro=r[fn],ro===void 0&&(ro=r[fn]=String(Hpe+o.length),o.push(fn)));var pr=i?0:void 0;(Se||ke||Xe||yt||We)&&(pr=v[vn],pr===void 0&&(pr=v[vn]=String(m.length),m.push({custom:!0,size:ke||e,family:Se||n,weight:Xe,style:yt,color:We})));var Qr;Et&&(Qr=O[Fo],Qr===void 0&&(Qr=O[Fo]=String(w.length),w.push({color:Et})));var Ee;return(we||Qt||Xi||ei||li||zt||Bi||wt||Lt||Yi)&&(Ee=V[Cn],Ee===void 0&&(Ee=V[Cn]=String(N.length),N.push({left:{style:ei||Qt,color:Xi||we},right:{style:zt||Qt,color:li||we},top:{style:wt||Qt,color:Bi||we},bottom:{style:Yi||Qt,color:Lt||we}}))),s.push({fontId:pr,fillId:Qr,borderId:Ee,align:te,alignVertical:fe,textRotation:xe,indent:Fe,wrap:Re,formatId:ro}),d[zn]=String(s.length-1)}return $({},{}),{getStyles:function(){return{formats:o,styles:s,fonts:m,fills:w,borders:N}},getStyle:$}}function mQ(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=YEt(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YEt(t,n){if(t){if(typeof t=="string")return oLe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?oLe(t,n):void 0}}function oLe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e';if(s+='',n.length>0){s+='');for(var d=0;d');s+=""}s+='');for(var m=mQ(i),v;!(v=m()).done;){var w=v.value,O=w.size,N=w.family,V=w.color,$=w.weight,q=w.style,W=w.custom;s+="",s+=''),s+=""),s+=''),s+='',W||(s+=''),$==="bold"&&(s+=""),q==="italic"&&(s+=""),s+=""}s+="",s+='');for(var te=mQ(o),fe;!(fe=te()).done;){var xe=fe.value,Fe=xe.color,Re=xe.gray125;s+="",Fe?(s+='',s+=''),s+='',s+=""):Re?s+='':s+='',s+=""}s+="",s+='');for(var Se=mQ(r),ke;!(ke=Se()).done;){var Xe=ke.value,yt=Xe.left,We=Xe.right,Et=Xe.top,we=Xe.bottom,Qt=function(zn,Co){var ro=Co.style,pr=Co.color;pr&&!ro&&(ro="thin");var Qr=!!pr;return"<".concat(zn)+(ro?' style="'.concat(yp(ro),'"'):"")+(Qr?">":"/>")+(pr?''):"")+(Qr?""):"")};s+="",s+=Qt("left",yt),s+=Qt("right",We),s+=Qt("top",Et),s+=Qt("bottom",we),s+="",s+=""}s+="",s+='');for(var Xi=mQ(e),ei;!(ei=Xi()).done;){var li=ei.value,zt=li.fontId,Bi=li.fillId,wt=li.borderId,Lt=li.align,Yi=li.alignVertical,fn=li.textRotation,tn=li.indent,vn=li.wrap,Fo=li.formatId;s+=""+(Lt||Yi||fn||tn||vn?"":"")+""}return s+="",s+="",s}function Gpe(t){if(t[0]!=="#")throw new Error('Color "'.concat(t,'" must start with a "#"'));return"FF".concat(t.slice(1).toUpperCase())}function QEt(t){if(!(t>=-90&&t<=90))throw new Error("Unsupported text rotation angle: ".concat(t,". Values from -90 to 90 are supported."));return t}function ZEt(t){return t<0?90-t:t}function _S(t){return Object.keys(t).map(function(n){return"".concat(n,'="').concat(yp(String(t[n])),'"')}).reduce(function(n,e){return n+" "+e},"")}function WE(t,n){return"".concat(sLe(t)).concat(n)}var rLe=26;function sLe(t){if(typeof t!="number")return"";var n=Math.floor(t/rLe),e=String.fromCharCode(97+t%rLe).toUpperCase();return n===0?e:sLe(n-1)+e}var XEt=25569,JEt=3600*1e3,eDt=24*JEt;function qpe(t){return t.getTime()/eDt+XEt}function tDt(t,n){return rDt(t)||oDt(t,n)||nDt(t,n)||iDt()}function iDt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nDt(t,n){if(t){if(typeof t=="string")return aLe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?aLe(t,n):void 0}}function aLe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e");if(i===Date&&!o)throw new Error('No "format" has been specified for a Date cell');var d=aDt(i,e,r),m=sDt(i);m&&(s.t=m);var v=cDt(i),w=tDt(v,2),O=w[0],N=w[1];return"")+O+d+N+"
"}function sDt(t){switch(t){case String:return"s";case Number:return;case Date:return;case Boolean:return"b";case"Formula":return;default:throw new Error("Unknown schema type: ".concat(t&&t.name||t))}}function aDt(t,n,e){switch(t){case String:if(typeof n!="string")throw new Error("Invalid cell value: ".concat(n,". Expected a string"));return e(n);case Number:if(typeof n!="number")throw new Error("Invalid cell value: ".concat(n,". Expected a number"));return String(n);case Date:if(!(n instanceof Date))throw new Error("Invalid cell value: ".concat(n,". Expected a Date"));return String(qpe(n));case Boolean:if(typeof n!="boolean")throw new Error("Invalid cell value: ".concat(n,". Expected a boolean"));return n?"1":"0";case"Formula":if(typeof n!="string")throw new Error("Invalid cell value: ".concat(n,". Expected a string"));return IU(n);default:throw new Error("Unknown schema type: ".concat(t&&t.name||t))}}var lDt=/";default:return""}}function EU(t){var n=t.align,e=t.alignVertical,i=t.textRotation,o=t.indent,r=t.wrap,s=t.fontFamily,d=t.fontSize,m=t.fontWeight,v=t.fontStyle,w=t.color,O=t.backgroundColor,N=t.borderColor,V=t.borderStyle,$=t.leftBorderColor,q=t.leftBorderStyle,W=t.rightBorderColor,te=t.rightBorderStyle,fe=t.topBorderColor,xe=t.topBorderStyle,Fe=t.bottomBorderColor,Re=t.bottomBorderStyle;if(n||e||i||o||r||s||d||m||v||w||O||N||V||$||q||W||te||fe||xe||Fe||Re)return uDt({align:n,alignVertical:e,textRotation:i,indent:o,wrap:r,fontFamily:s,fontSize:d,fontWeight:m,fontStyle:v,color:w,backgroundColor:O,borderColor:N,borderStyle:V,leftBorderColor:$,leftBorderStyle:q,rightBorderColor:W,rightBorderStyle:te,topBorderColor:fe,topBorderStyle:xe,bottomBorderColor:Fe,bottomBorderStyle:Re})}function uDt(t){var n={};for(var e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function Wpe(t){"@babel/helpers - typeof";return Wpe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wpe(t)}function Ype(t,n,e){var i=e.getStyle,o=e.getSharedString,r=e.customFont,s=e.dateFormat,d=e.usesSchema,m=n+1,v,w=t.map(function(N,V){if(N==null)return"";var $=N.height,q=EU(N),W=N.type,te=N.value,fe=N.format;if(pDt(te)?te=null:W===void 0&&(d||(W=hDt(te)),W===void 0&&(W=String,te=String(te))),fe){if(W!==Date&&W!==Number&&W!==String&&W!=="Formula")throw new Error('`format` can only be used on `Date`, `Number`, `String` or `"Formula"` cells');if(W===String&&fe!=="@")throw new Error('`String` cells only support "@" `format`')}else W===Date&&(fe=s);var xe;return(fe||r||q)&&(xe=i(q||{},{format:fe})),$&&(v===void 0||v<$)&&(v=$),Kpe(m,V,te,W,xe,o)}).join(""),O={r:m};return v&&(O.ht=v,O.customHeight=1),"")+w+""}function pDt(t){return t==null||t===""}function hDt(t){switch(Wpe(t)){case"string":return String;case"number":return Number;case"boolean":return Boolean;default:if(t instanceof Date)return Date}}function DU(t){"@babel/helpers - typeof";return DU=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},DU(t)}function lLe(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,i)}return e}function fQ(t){for(var n=1;n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yDt(t,n){if(t){if(typeof t=="string")return cLe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?cLe(t,n):void 0}}function cLe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e')}function Xpe(t){var n=t.schema,e=t.columns;if(n||e){var i=(n||e).map(Zpe).join("");if(i)return"".concat(i,"")}return""}function Jpe(t,n){var e=n.schema,i=[];if(e)return{data:t,mergedCells:i};for(var o=function(){t=t.slice();for(var $=0;$1||N>1)&&(CDt({data:t,rowIndex:r,columnIndex:d,span:w,rowSpan:N,cloneData:o}),i.push([[r,d],[r+(N?N-1:0),d+(w?w-1:0)]]))}d++}r++}return{data:t,mergedCells:i}}function CDt(t){var n=t.data,e=t.rowIndex,i=t.columnIndex,o=t.span,r=t.rowSpan,s=t.cloneData,d=EU(n[e][i]);d&&(n=s());for(var m=e;m<=e+(r-1);){for(var v=i;v<=i+(o-1);){var w=n[m][v];if(m>e||v>i){if(w!=null)throw new Error("[write-excel-file] When using `span` or `rowSpan` parameters, all hidden overlapped cells should be represented by `null`s or `undefined`s. Cell at row ".concat(e+1," and column ").concat(i+1," is configured with `span` ").concat(o," and `rowSpan` ").concat(r,". Cell at row ").concat(m+1," and column ").concat(v+1," is neither `null` nor `undefined`: ").concat(JSON.stringify(w)));d&&(n[m][v]=d)}v++}m++}}function xDt(t,n){return IDt(t)||TDt(t,n)||SDt(t,n)||wDt()}function wDt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SDt(t,n){if(t){if(typeof t=="string")return dLe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?dLe(t,n):void 0}}function dLe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e')+t.map(function(n){var e=xDt(n,2),i=e[0],o=e[1],r=WE(i[1],i[0]+1)+":"+WE(o[1],o[0]+1);return'')}).join("")+""}function the(t){var n=t.sheetId,e=t.orientation,i="";if(e){var o=.7,r=.7,s=.75,d=.75,m=.3,v=.3;i+=""),r+=""),r+="",r+="",r}function nhe(t){var n=t.images;return n?'':""}var EDt=` {views}{columnsDescription}{data}{mergedCellsDescription}{layout}{drawing}`;function ohe(t,n){var e=n.schema,i=n.columns,o=n.images,r=n.getHeaderStyle,s=n.getStyle,d=n.getSharedString,m=n.customFont,v=n.dateFormat,w=n.orientation,O=n.stickyRowsCount,N=n.stickyColumnsCount,V=n.showGridLines,$=n.rightToLeft,q=n.sheetId;DDt(t,{schema:e});var W=Jpe(t,{schema:e}),te=W.data,fe=W.mergedCells;return EDt.replace("{data}",Qpe(te,{schema:e,getHeaderStyle:r,getStyle:s,getSharedString:d,customFont:m,dateFormat:v})).replace("{views}",ihe({stickyRowsCount:O,stickyColumnsCount:N,showGridLines:V,rightToLeft:$})).replace("{columnsDescription}",Xpe({schema:e,columns:i})).replace("{mergedCellsDescription}",ehe(fe)).replace("{layout}",the({sheetId:q,orientation:w})).replace("{drawing}",nhe({images:o}))}function DDt(t,n){var e=n.schema;if(e){if(!Array.isArray(t))throw new TypeError("Expected an array of objects")}else{if(!Array.isArray(t))throw new TypeError("Expected an array of arrays");if(t.length>0&&!Array.isArray(t[0]))throw new TypeError("Expected an array of arrays")}}function rhe(){var t=[],n={};return{getSharedStrings:function(){return t},getSharedString:function(i){var o=n[i];return o===void 0&&(o=String(t.length),n[i]=o,t.push(i)),o}}}var ADt=/[\[\]\/\\:*?]+/;function she(t){if(!t)throw new Error("Sheet name can't be empty");if(t.length>31)throw new Error('Sheet name "'.concat(t,`" can't be longer than 31 characters`));if(ADt.test(t))throw new Error('Sheet name "'.concat(t,'" contains illegal characters: []/\\:*?'))}function uLe(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=kDt(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kDt(t,n){if(t){if(typeof t=="string")return pLe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?pLe(t,n):void 0}}function pLe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ODt(t,n){if(t){if(typeof t=="string")return fLe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?fLe(t,n):void 0}}function fLe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e1&&arguments[1]!==void 0?arguments[1]:{},e=n.fileName,i=RDt(n,MDt);return PDt(t,i).then(function(o){return e?_Le.default.saveAs(o,e):o})}function PDt(t,n){var e=n.sheet,i=n.sheets,o=n.schema,r=n.columns,s=n.images,d=n.headerStyle,m=n.getHeaderStyle,v=n.fontFamily,w=n.fontSize,O=n.orientation,N=n.stickyRowsCount,V=n.stickyColumnsCount,$=n.showGridLines,q=n.rightToLeft,W=n.dateFormat,te=new gLe.default,fe=hLe({data:t,sheetName:e,sheetNames:i,schema:o,columns:r,images:s,headerStyle:d,getHeaderStyle:m,fontFamily:v,fontSize:w,orientation:O,stickyRowsCount:N,stickyColumnsCount:V,showGridLines:$,rightToLeft:q,dateFormat:W}),xe=fe.sheets,Fe=fe.getSharedStrings,Re=fe.getStyles;te.file("_rels/.rels",JPe),te.file("[Content_Types].xml",Npe({sheets:xe,images:s}));var Se=te.folder("xl");Se.file("_rels/workbook.xml.rels",Ppe({sheets:xe})),Se.file("workbook.xml",Fpe({sheets:xe,stickyRowsCount:N,stickyColumnsCount:V})),Se.file("styles.xml",$pe(Re())),Se.file("sharedStrings.xml",Upe(Fe()));for(var ke=mLe(xe),Xe;!(Xe=ke()).done;){var yt=Xe.value,We=yt.id,Et=yt.data,we=yt.images;if(Se.file("worksheets/sheet".concat(We,".xml"),Et),Se.file("worksheets/_rels/sheet".concat(We,".xml.rels"),zpe({id:We,images:we})),we){Se.file("drawings/drawing".concat(We,".xml"),Bpe({images:we})),Se.file("drawings/_rels/drawing".concat(We,".xml.rels"),Vpe({images:we,sheetId:We}));for(var Qt=mLe(we),Xi;!(Xi=Qt()).done;){var ei=Xi.value;Se.file("media/".concat(wU(ei,{sheetId:We,sheetImages:we})),ei.content)}}}return te.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",compression:"deflate"})}var gQ=class t extends IN{constructor(n,e,i){super(e,`${i}.xlsx`),this._exportData=n,this.defaultDateTimeFormat=Intl.DateTimeFormat(e).format(new Date(1999,11,31)).replace("1999","yyyy").replace("12","mm").replace("31","dd")}process(){return bt(this,null,function*(){let n={},e=yield this._exportData;return(Array.isArray(e)?this._processSheets(e):this._processSheet(e)).then(o=>(n.result=o,n)).catch(o=>(n.errors=[o instanceof Error?o.message:"Unknown error"],n))})}_processSheets(n){return bt(this,null,function*(){let e=n.map(i=>this._sheet(i.data,i.fields));return AU(e,{sheets:Array.isArray(n)?n.map(i=>dle.sanitizeSheetName(i.sheetName)??""):void 0})})}_processSheet(n){return bt(this,null,function*(){let e=this._sheet(n.data,n.fields);return AU(e,{sheet:Array.isArray(n)?void 0:dle.sanitizeSheetName(n.sheetName)??""})})}_sheet(n,e){return[this._header(e),...n.map(i=>this._row(i))]}_row(n){return n.map(e=>this._cell(e))}_header(n){return n.map(e=>({type:String,value:e,fontWeight:"bold"}))}_cell(n){let e={value:n.value};return n.type==="number"?mt(be({},e),{type:Number,format:this._numberFormat(n.value,n.format)}):n.type==="Date"?mt(be({},e),{type:Date,format:typeof n.format=="string"?n.format:this.defaultDateTimeFormat}):n.type==="boolean"?mt(be({},e),{type:Boolean}):mt(be({},e),{type:String})}_numberFormat(n,e){if(!n)return;if(!e)return this._defaultNumberFormat(n);if(typeof e=="string")return e;let i;return t._instanceOfNumberFormatOptions(e)&&(i=this._fractionPattern(e)),this._defaultNumberFormat(n,i)}_defaultNumberFormat(n,e){return Number(n)===n&&n%1===0?e?`0.${e}`:"0":(e=e||this._fractionPattern(Cz),`0.${e}`)}_fractionPattern(n){let e=n.minimumFractionDigits||0,i=n.maximumFractionDigits||e;return"0".repeat(i)}};var yLe=Ap(che());var _Q=class t extends IN{constructor(n,e,i){super(e,`${i}.csv`),this._exportData=n,this._defaultConfig={quotes:!1,quoteChar:'"',delimiter:";",header:!0,newline:`\r `}}process(){return bt(this,null,function*(){let n={},e=yield this._exportData;try{let i=(0,yLe.unparse)({data:this._getData(e.data),fields:e.fields},this._defaultConfig);n.result=new Blob(["\uFEFF"+i],{type:"text/csv;charset=utf-8"})}catch(i){n.errors=[i instanceof Error?i.message:"Unknown error"]}return Promise.resolve(n)})}_getData(n){return n.map(e=>e.map(i=>this._itemToString(i)))}_itemToString(n){if(!n.value)return"";if(n.type==="boolean")return n.value?"ja":"nein";if(n.type==="number"){let e=t._instanceOfNumberFormatOptions(n.format)?n.format:Cz;return ag.format(n.value,e,[this._locale])}if(n.type==="Date"){let e=t._instanceOfDateTimeFormatOptions(n.format)?n.format:void 0;return Intl.DateTimeFormat(this._locale,e).format(n.value)}return n.value.toString()}};var kU=class{constructor(n){this.consent=n}consentForMarketing(){return this.consent.linkedIn&&this.consent.youtube}equals(n){return this.consent.zendesk===n.consent.zendesk&&this.consent.tracking===n.consent.tracking&&this.consent.linkedIn===n.consent.linkedIn&&this.consent.youtube===n.consent.youtube}},vLe=new kU({linkedIn:!1,youtube:!1,tracking:!1,zendesk:!0});var yQ=new fi("Cookie Manager CCM19 DomainId"),bLe="YouTube Video",CLe="LinkedIn",xLe="Microsoft Azure App Insights",wLe="Zendesk";function SLe(t){return t.variables.COOKIE_MANAGER_DOMAIN_ID?{provide:yQ,useValue:t.variables.COOKIE_MANAGER_DOMAIN_ID}:(console.error("No 'COOKIE_MANAGER_DOMAIN_ID' found in app config response"),{provide:yQ,useValue:""})}function TLe(){return window}var ILe=(()=>{class t{constructor(e){this._rendererFactory2=e,this.renderer=this._rendererFactory2.createRenderer(null,null),this.userConsent$=new Gs(vLe),this.renderer.listen("window","ccm19EmbeddingAccepted",i=>this.handleEmbeddingAccepted(i)),this.renderer.listen("window","ccm19WidgetClosed",()=>this.handleWidgetClosed())}ngOnDestroy(){this.renderer.destroy()}handleEmbeddingAccepted(e){this._updateUserConsent(TLe().CCM.acceptedEmbeddings)}handleWidgetClosed(){this._updateUserConsent(TLe().CCM.acceptedEmbeddings)}_updateUserConsent(e){let i=new kU({youtube:!!e.find(o=>o.name===bLe),linkedIn:!!e.find(o=>o.name===CLe),tracking:!!e.find(o=>o.name===xLe),zendesk:!!e.find(o=>o.name===wLe)});this.userConsent$.next(i)}static{this.\u0275fac=function(i){return new(i||t)(di(bc))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var dhe=(()=>{class t{constructor(e,i){this.document=e,this._scriptService=i}init(e){this._scriptService.loadJsScript({id:"CCM19",src:`https://cloud.ccm19.de/app.js?apiKey=5894089525888ce5c262843cf003c6e18a6655024bc18588&domain=${e}`},[["referrerpolicy","origin"]],this.document.head)}static{this.\u0275fac=function(i){return new(i||t)(di(Ao),di(Wj))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var uhe=(()=>{class t{static forRoot(){return{ngModule:t,providers:[nI(()=>((i,o)=>(i.init(o),()=>ci()))(re(dhe),re(yQ))())]}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=_i({providers:[dhe]})}}return t})();var vp=(()=>{class t{constructor(e,i,o){this._msalBroadcastService=e,this._environmentService=i,this._msalService=o,this._destroying$=new hi,this._accountInfo=new pi(1),this._authentication=new Gs(!1),this.msalInitialized=new Uf,this.authentication$=this._authentication.asObservable().pipe(rp()),this.accountInfo$=this._accountInfo.asObservable(),this._init()}static successEvent(e){return e.eventType===Wo.LOGIN_SUCCESS||e.eventType===Wo.ACQUIRE_TOKEN_SUCCESS}ngOnDestroy(){this._destroying$.next(null),this._destroying$.complete()}getPasswordResetPolicy(){return{authority:this._environmentService.load("AUTHENTICATION_PASSWORD_RESET_AUTHORITY")}}setAuthenticationState(e){this._authentication.next(e)}setAccountInfoState(e){this._accountInfo.next(e)}_init(){this._msalBroadcastService.inProgress$.pipe(wn(e=>e===vd.None),cs(this._destroying$)).subscribe(()=>{this.msalInitialized.next(),this.msalInitialized.complete();try{let e=this._msalService.instance.getAllAccounts(),i=this._msalService.instance.getActiveAccount();this._authentication.next(e.length>0),this._accountInfo.next(i??null)}catch{}})}static{this.\u0275fac=function(i){return new(i||t)(di(PI),di(qr),di(Gk))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var phe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:18,vars:0,consts:[["color","warn"],[1,"bd-container-inner","mat-typography"],["href","https://browser-cache-leeren.de/detect.html"],[1,"bd-container-inner"],[1,"mat-body"],["href","https://www.bindoc.de/support"]],template:function(i,o){i&1&&(k(0,"mat-toolbar",0),Q(1,"Login fehlgeschlagen"),D(),k(2,"div",1)(3,"span"),Q(4,"Versuchen Sie bitte folgende Dinge, um das Problem zu l\xF6sen"),D(),k(5,"ul")(6,"li"),Q(7,"Browser Cache leeren - "),k(8,"a",2),Q(9,"Wie leere ich den Cache eines Browsers ?"),D()(),k(10,"li"),Q(11,"Seite neu laden"),D()()(),k(12,"div",3)(13,"span",4),Q(14,"Falls dieser Fehler immer wieder auftritt, wenden Sie sich bitte an unseren "),k(15,"a",5),Q(16,"BinDoc Support"),D(),Q(17,"."),D()())},dependencies:[oE,UP],encapsulation:2})}}return t})();var hhe=(()=>{class t{constructor(e){this._authenticationService=e}static{this.\u0275fac=function(i){return new(i||t)(di(vp))}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=_i({providers:[Gk,Od,PI,{provide:vj,useClass:GTe,multi:!0},roe(soe())],imports:[xse,Pp.forChild([{path:"sys-login-failed",component:phe}]),oE,phe,xse,Pp]})}}return t})();var DLe=` .p-tieredmenu { background: dt('tieredmenu.background'); color: dt('tieredmenu.color'); border: 1px solid dt('tieredmenu.border.color'); border-radius: dt('tieredmenu.border.radius'); min-width: 12.5rem; } .p-tieredmenu-root-list, .p-tieredmenu-submenu { margin: 0; padding: dt('tieredmenu.list.padding'); list-style: none; outline: 0 none; display: flex; flex-direction: column; gap: dt('tieredmenu.list.gap'); } .p-tieredmenu-submenu { position: absolute; min-width: 100%; z-index: 1; background: dt('tieredmenu.background'); color: dt('tieredmenu.color'); border: 1px solid dt('tieredmenu.border.color'); border-radius: dt('tieredmenu.border.radius'); box-shadow: dt('tieredmenu.shadow'); } .p-tieredmenu-item { position: relative; } .p-tieredmenu-item-content { transition: background dt('tieredmenu.transition.duration'), color dt('tieredmenu.transition.duration'); border-radius: dt('tieredmenu.item.border.radius'); color: dt('tieredmenu.item.color'); } .p-tieredmenu-item-link { cursor: pointer; display: flex; align-items: center; text-decoration: none; overflow: hidden; position: relative; color: inherit; padding: dt('tieredmenu.item.padding'); gap: dt('tieredmenu.item.gap'); user-select: none; outline: 0 none; } .p-tieredmenu-item-label { line-height: 1; } .p-tieredmenu-item-icon { color: dt('tieredmenu.item.icon.color'); } .p-tieredmenu-submenu-icon { color: dt('tieredmenu.submenu.icon.color'); margin-left: auto; font-size: dt('tieredmenu.submenu.icon.size'); width: dt('tieredmenu.submenu.icon.size'); height: dt('tieredmenu.submenu.icon.size'); } .p-tieredmenu-submenu-icon:dir(rtl) { margin-left: 0; margin-right: auto; } .p-tieredmenu-item.p-focus > .p-tieredmenu-item-content { color: dt('tieredmenu.item.focus.color'); background: dt('tieredmenu.item.focus.background'); } .p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-item-icon { color: dt('tieredmenu.item.icon.focus.color'); } .p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon { color: dt('tieredmenu.submenu.icon.focus.color'); } .p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover { color: dt('tieredmenu.item.focus.color'); background: dt('tieredmenu.item.focus.background'); } .p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-item-icon { color: dt('tieredmenu.item.icon.focus.color'); } .p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-submenu-icon { color: dt('tieredmenu.submenu.icon.focus.color'); } .p-tieredmenu-item-active > .p-tieredmenu-item-content { color: dt('tieredmenu.item.active.color'); background: dt('tieredmenu.item.active.background'); } .p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-item-icon { color: dt('tieredmenu.item.icon.active.color'); } .p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon { color: dt('tieredmenu.submenu.icon.active.color'); } .p-tieredmenu-separator { border-block-start: 1px solid dt('tieredmenu.separator.border.color'); } .p-tieredmenu-overlay { box-shadow: dt('tieredmenu.shadow'); } .p-tieredmenu-enter-from, .p-tieredmenu-leave-active { opacity: 0; } .p-tieredmenu-enter-active { transition: opacity 250ms; } .p-tieredmenu-mobile .p-tieredmenu-submenu { position: static; box-shadow: none; border: 0 none; padding-inline-start: dt('tieredmenu.submenu.mobile.indent'); padding-inline-end: 0; } .p-tieredmenu-mobile .p-tieredmenu-submenu:dir(rtl) { padding-inline-start: 0; padding-inline-end: dt('tieredmenu.submenu.mobile.indent'); } .p-tieredmenu-mobile .p-tieredmenu-submenu-icon { transition: transform 0.2s; transform: rotate(90deg); } .p-tieredmenu-mobile .p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon { transform: rotate(-90deg); } `;var NDt=["sublist"],BDt=t=>({processedItem:t}),VDt=()=>({exact:!1}),zDt=(t,n)=>({$implicit:t,hasSubmenu:n}),UDt=t=>({display:t});function HDt(t,n){if(t&1&&ce(0,"li",7),t&2){let e=P().$implicit,i=P();$r(i.getItemProp(e,"style")),Oe(i.cn(i.cx("separator"),i.getItemProp(e,"class"),i.getItemProp(e,"styleClass"))),Ge("id",i.getItemId(e))("data-pc-section","separator")}}function jDt(t,n){if(t&1&&ce(0,"span",18),t&2){let e=P(4).$implicit,i=P();Oe(i.cn(i.cx("itemIcon"),i.getItemProp(e,"icon"))),E("ngStyle",i.getItemProp(e,"iconStyle")),Ge("data-pc-section","icon")("tabindex",-1)}}function GDt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(4).$implicit,i=P();Oe(i.cx("itemLabel")),Ge("data-pc-section","label"),T(),Qi(" ",i.getItemLabel(e)," ")}}function $Dt(t,n){if(t&1&&ce(0,"span",19),t&2){let e=P(4).$implicit,i=P();Oe(i.cx("itemLabel")),E("innerHTML",i.getItemLabel(e),yR),Ge("data-pc-section","label")}}function qDt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(4).$implicit,i=P();Oe(i.cn(i.cx("itemBadge"),i.getItemProp(e,"badgeStyleClass"))),T(),dt(i.getItemProp(e,"badge"))}}function KDt(t,n){if(t&1&&(si(),ce(0,"svg",22)),t&2){let e=P(6);Oe(e.cx("submenuIcon")),Ge("data-pc-section","submenuicon")("aria-hidden",!0)}}function WDt(t,n){}function YDt(t,n){t&1&&ee(0,WDt,0,0,"ng-template",23),t&2&&(E("data-pc-section","submenuicon"),Cc("aria-hidden",!0))}function QDt(t,n){if(t&1&&(Di(0),ee(1,KDt,1,4,"svg",20)(2,YDt,1,2,null,21),Ai()),t&2){let e=P(5);T(),E("ngIf",!e.tieredMenu.submenuIconTemplate&&!e.tieredMenu._submenuIconTemplate),T(),E("ngTemplateOutlet",e.tieredMenu.submenuIconTemplate||e.tieredMenu._submenuIconTemplate)}}function ZDt(t,n){if(t&1&&(k(0,"a",14),ee(1,jDt,1,5,"span",15)(2,GDt,2,4,"span",16)(3,$Dt,1,4,"ng-template",null,2,Pt)(5,qDt,2,3,"span",17)(6,QDt,3,2,"ng-container",10),D()),t&2){let e=ti(4),i=P(3).$implicit,o=P();Oe(o.cx("itemLink")),E("target",o.getItemProp(i,"target")),Ge("href",o.getItemProp(i,"url"),dc)("data-automationid",o.getItemProp(i,"automationId"))("data-pc-section","action")("tabindex",-1),T(),E("ngIf",o.getItemProp(i,"icon")),T(),E("ngIf",o.getItemProp(i,"escape"))("ngIfElse",e),T(3),E("ngIf",o.getItemProp(i,"badge")),T(),E("ngIf",o.isItemGroup(i))}}function XDt(t,n){if(t&1&&ce(0,"span",18),t&2){let e=P(4).$implicit,i=P();Oe(i.cn(i.cx("itemIcon"),i.getItemProp(e,"icon"))),E("ngStyle",i.getItemProp(e,"iconStyle")),Ge("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function JDt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(4).$implicit,i=P();Oe(i.cx("itemLabel")),Ge("data-pc-section","label"),T(),Qi(" ",i.getItemLabel(e)," ")}}function eAt(t,n){if(t&1&&ce(0,"span",19),t&2){let e=P(4).$implicit,i=P();Oe(i.cx("itemLabel")),E("innerHTML",i.getItemLabel(e),yR),Ge("data-pc-section","label")}}function tAt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(4).$implicit,i=P();Oe(i.cn(i.cx("itemBadge"),i.getItemProp(e,"badgeStyleClass"))),T(),dt(i.getItemProp(e,"badge"))}}function iAt(t,n){if(t&1&&(si(),ce(0,"svg",22)),t&2){let e=P(6);Oe(e.cx("submenuIcon")),Ge("data-pc-section","submenuicon")("aria-hidden",!0)}}function nAt(t,n){}function oAt(t,n){t&1&&ee(0,nAt,0,0,"ng-template",23),t&2&&(E("data-pc-section","submenuicon"),Cc("aria-hidden",!0))}function rAt(t,n){if(t&1&&(Di(0),ee(1,iAt,1,4,"svg",20)(2,oAt,1,2,null,21),Ai()),t&2){let e=P(5);T(),E("ngIf",!e.tieredMenu.submenuIconTemplate&&!e.tieredMenu._submenuIconTemplate),T(),E("ngTemplateOutlet",e.tieredMenu.submenuIconTemplate||e.tieredMenu._submenuIconTemplate)}}function sAt(t,n){if(t&1&&(k(0,"a",24),ee(1,XDt,1,6,"span",15)(2,JDt,2,4,"span",16)(3,eAt,1,4,"ng-template",null,2,Pt)(5,tAt,2,3,"span",17)(6,rAt,3,2,"ng-container",10),D()),t&2){let e=ti(4),i=P(3).$implicit,o=P();Oe(o.cx("itemLink")),E("routerLink",o.getItemProp(i,"routerLink"))("queryParams",o.getItemProp(i,"queryParams"))("routerLinkActive","p-tieredmenu-item-link-active")("routerLinkActiveOptions",o.getItemProp(i,"routerLinkActiveOptions")||uo(21,VDt))("target",o.getItemProp(i,"target"))("fragment",o.getItemProp(i,"fragment"))("queryParamsHandling",o.getItemProp(i,"queryParamsHandling"))("preserveFragment",o.getItemProp(i,"preserveFragment"))("skipLocationChange",o.getItemProp(i,"skipLocationChange"))("replaceUrl",o.getItemProp(i,"replaceUrl"))("state",o.getItemProp(i,"state")),Ge("data-automationid",o.getItemProp(i,"automationId"))("tabindex",-1)("data-pc-section","action"),T(),E("ngIf",o.getItemProp(i,"icon")),T(),E("ngIf",o.getItemProp(i,"escape"))("ngIfElse",e),T(3),E("ngIf",o.getItemProp(i,"badge")),T(),E("ngIf",o.isItemGroup(i))}}function aAt(t,n){if(t&1&&(Di(0),ee(1,ZDt,7,12,"a",12)(2,sAt,7,22,"a",13),Ai()),t&2){let e=P(2).$implicit,i=P();T(),E("ngIf",!i.getItemProp(e,"routerLink")),T(),E("ngIf",i.getItemProp(e,"routerLink"))}}function lAt(t,n){}function cAt(t,n){t&1&&ee(0,lAt,0,0,"ng-template")}function dAt(t,n){if(t&1&&(Di(0),ee(1,cAt,1,0,null,25),Ai()),t&2){let e=P(2).$implicit,i=P();T(),E("ngTemplateOutlet",i.itemTemplate)("ngTemplateOutletContext",Eo(2,zDt,e.item,i.getItemProp(e,"items")))}}function uAt(t,n){if(t&1){let e=tt();k(0,"p-tieredmenusub",26),ie("itemClick",function(o){se(e);let r=P(3);return ae(r.itemClick.emit(o))})("itemMouseEnter",function(o){se(e);let r=P(3);return ae(r.onItemMouseEnter(o))}),D()}if(t&2){let e=P(2).$implicit,i=P();E("items",e.items)("itemTemplate",i.itemTemplate)("autoDisplay",i.autoDisplay)("menuId",i.menuId)("activeItemPath",i.activeItemPath())("focusedItemId",i.focusedItemId),Cc("ariaLabelledBy",i.getItemId(e)),E("level",i.level+1)("inlineStyles",ki(9,UDt,i.isItemActive(e)?"flex":"none"))}}function pAt(t,n){if(t&1){let e=tt();k(0,"li",8,1)(2,"div",9),ie("click",function(o){se(e);let r=P().$implicit,s=P();return ae(s.onItemClick(o,r))})("mouseenter",function(o){se(e);let r=P().$implicit,s=P();return ae(s.onItemMouseEnter({$event:o,processedItem:r}))}),ee(3,aAt,3,2,"ng-container",10)(4,dAt,2,5,"ng-container",10),D(),ee(5,uAt,1,11,"p-tieredmenusub",11),D()}if(t&2){let e=P(),i=e.$implicit,o=e.index,r=P();Oe(r.cn(r.cx("item",ki(21,BDt,i)),r.getItemProp(i,"styleClass"))),E("ngStyle",r.getItemProp(i,"style"))("tooltipOptions",r.getItemProp(i,"tooltipOptions")),Ge("id",r.getItemId(i))("data-pc-section","menuitem")("data-p-highlight",r.isItemActive(i))("data-p-focused",r.isItemFocused(i))("data-p-disabled",r.isItemDisabled(i))("aria-label",r.getItemLabel(i))("aria-disabled",r.isItemDisabled(i)||void 0)("aria-haspopup",r.isItemGroup(i)&&!r.getItemProp(i,"to")?"menu":void 0)("aria-expanded",r.isItemGroup(i)?r.isItemActive(i):void 0)("aria-setsize",r.getAriaSetSize())("aria-posinset",r.getAriaPosInset(o)),T(2),Oe(r.cx("itemContent")),Ge("data-pc-section","content"),T(),E("ngIf",!r.itemTemplate),T(),E("ngIf",r.itemTemplate),T(),E("ngIf",r.isItemVisible(i)&&r.isItemGroup(i))}}function hAt(t,n){if(t&1&&ee(0,HDt,1,6,"li",5)(1,pAt,6,23,"li",6),t&2){let e=n.$implicit,i=P();E("ngIf",i.isItemVisible(e)&&i.getItemProp(e,"separator")),T(),E("ngIf",i.isItemVisible(e)&&!i.getItemProp(e,"separator"))}}var mAt=["submenuicon"],fAt=["item"],gAt=["rootmenu"],_At=["container"],yAt=(t,n)=>({showTransitionParams:t,hideTransitionParams:n}),vAt=t=>({value:"visible",params:t});function bAt(t,n){if(t&1){let e=tt();k(0,"div",3,0),ie("click",function(o){se(e);let r=P();return ae(r.onOverlayClick(o))})("@overlayAnimation.start",function(o){se(e);let r=P();return ae(r.onOverlayAnimationStart(o))})("@overlayAnimation.done",function(o){se(e);let r=P();return ae(r.onOverlayAnimationEnd(o))}),k(2,"p-tieredMenuSub",4,1),ie("itemClick",function(o){se(e);let r=P();return ae(r.onItemClick(o))})("menuFocus",function(o){se(e);let r=P();return ae(r.onMenuFocus(o))})("menuBlur",function(o){se(e);let r=P();return ae(r.onMenuBlur(o))})("menuKeydown",function(o){se(e);let r=P();return ae(r.onKeyDown(o))})("itemMouseEnter",function(o){se(e);let r=P();return ae(r.onItemMouseEnter(o))}),D()()}if(t&2){let e=P();Oe(e.cn(e.cx("root"),e.styleClass)),E("id",e.id)("ngStyle",e.style)("@overlayAnimation",ki(24,vAt,Eo(21,yAt,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.popup!==!0),Ge("data-pc-section","root")("data-pc-name","tieredmenu"),T(2),E("root",!0)("items",e.processedItems)("itemTemplate",e.itemTemplate||e._itemTemplate)("menuId",e.id)("tabindex",e.disabled?-1:e.tabindex),Cc("ariaLabel",e.ariaLabel)("ariaLabelledBy",e.ariaLabelledBy),E("baseZIndex",e.baseZIndex)("autoZIndex",e.autoZIndex)("autoDisplay",e.autoDisplay)("popup",e.popup)("focusedItemId",e.focused?e.focusedItemId:void 0)("activeItemPath",e.activeItemPath())}}var CAt={submenu:({instance:t,processedItem:n})=>({display:t.isItemActive(n)?"flex":"none"})},xAt={root:({instance:t})=>["p-tieredmenu p-component",{"p-tieredmenu-overlay":t.popup,"p-tieredmenu-mobile":t.queryMatches}],start:"p-tieredmenu-start",rootList:"p-tieredmenu-root-list",item:({instance:t,processedItem:n})=>["p-tieredmenu-item",{"p-tieredmenu-item-active":t.isItemActive(n),"p-focus":t.isItemFocused(n),"p-disabled":t.isItemDisabled(n)}],itemContent:"p-tieredmenu-item-content",itemLink:"p-tieredmenu-item-link",itemIcon:"p-tieredmenu-item-icon",itemLabel:"p-tieredmenu-item-label",itemBadge:"p-menuitem-badge",submenuIcon:"p-tieredmenu-submenu-icon",submenu:"p-tieredmenu-submenu",separator:"p-tieredmenu-separator",end:"p-tieredmenu-end"},mhe=(()=>{class t extends io{name="tieredmenu";theme=DLe;classes=xAt;inlineStyles=CAt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var wAt=(()=>{class t extends oo{el;renderer;tieredMenu;items;itemTemplate;root=!1;autoDisplay;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath=mo([]);tabindex=0;inlineStyles;itemClick=new ve;itemMouseEnter=new ve;menuFocus=new ve;menuBlur=new ve;menuKeydown=new ve;sublistViewChild;_componentStyle=re(mhe);constructor(e,i,o){super(),this.el=e,this.renderer=i,this.tieredMenu=o}positionSubmenu(){if(ps(this.tieredMenu.platformId)){let e=this.sublistViewChild&&this.sublistViewChild.nativeElement;e&&bAe(e,this.level)}}getItemProp(e,i,o=null){return e&&e.item?rm(e.item[i],o):void 0}getItemId(e){return e.item?.id??`${this.menuId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemClass(e){return mt(be({},this.getItemProp(e,"class")),{"p-tieredmenu-item":!0,"p-tieredmenu-item-active":this.isItemActive(e),"p-focus":this.isItemFocused(e),"p-disabled":this.isItemDisabled(e)})}getItemLabel(e){return this.getItemProp(e,"label")}getSeparatorItemClass(e){return mt(be({},this.getItemProp(e,"class")),{"p-tieredmenu-separator":!0})}getAriaSetSize(){return this.items.filter(e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator")).length}getAriaPosInset(e){return e-this.items.slice(0,e).filter(i=>{let o=this.isItemVisible(i),r=o&&this.getItemProp(i,"separator");return!o||r}).length+1}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemActive(e){if(this.activeItemPath())return this.positionSubmenu(),this.activeItemPath().some(i=>i.key===e.key)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return Kr(e.items)}onItemMouseEnter(e){if(this.autoDisplay){let{event:i,processedItem:o}=e;this.itemMouseEnter.emit({originalEvent:i,processedItem:o})}}onItemClick(e,i){this.getItemProp(i,"command",{originalEvent:e,item:i.item}),this.itemClick.emit({originalEvent:e,processedItem:i,isFocus:!0})}static \u0275fac=function(i){return new(i||t)(_e(Bn),_e(Ps),_e(Ko(()=>yS)))};static \u0275cmp=ne({type:t,selectors:[["p-tieredMenuSub"],["p-tieredmenusub"]],viewQuery:function(i,o){if(i&1&&Ri(NDt,7),i&2){let r;Le(r=Ne())&&(o.sublistViewChild=r.first)}},inputs:{items:"items",itemTemplate:"itemTemplate",root:[2,"root","root",je],autoDisplay:[2,"autoDisplay","autoDisplay",je],autoZIndex:[2,"autoZIndex","autoZIndex",je],baseZIndex:[2,"baseZIndex","baseZIndex",ln],popup:[2,"popup","popup",je],menuId:"menuId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",level:[2,"level","level",ln],focusedItemId:"focusedItemId",activeItemPath:[1,"activeItemPath"],tabindex:[2,"tabindex","tabindex",ln],inlineStyles:"inlineStyles"},outputs:{itemClick:"itemClick",itemMouseEnter:"itemMouseEnter",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeydown:"menuKeydown"},features:[ft],decls:3,vars:12,consts:[["sublist",""],["listItem",""],["htmlLabel",""],["role","menu",3,"keydown","focus","blur","id","tabindex"],["ngFor","",3,"ngForOf"],["role","separator",3,"style","class",4,"ngIf"],["role","menuitem","pTooltip","",3,"ngStyle","class","tooltipOptions",4,"ngIf"],["role","separator"],["role","menuitem","pTooltip","",3,"ngStyle","tooltipOptions"],[3,"click","mouseenter"],[4,"ngIf"],[3,"items","itemTemplate","autoDisplay","menuId","activeItemPath","focusedItemId","ariaLabelledBy","level","inlineStyles","itemClick","itemMouseEnter",4,"ngIf"],["pRipple","",3,"target","class",4,"ngIf"],["pRipple","",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","class","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state",4,"ngIf"],["pRipple","",3,"target"],[3,"class","ngStyle",4,"ngIf"],[3,"class",4,"ngIf","ngIfElse"],[3,"class",4,"ngIf"],[3,"ngStyle"],[3,"innerHTML"],["data-p-icon","angle-right",3,"class",4,"ngIf"],[4,"ngTemplateOutlet"],["data-p-icon","angle-right"],[3,"data-pc-section","aria-hidden"],["pRipple","",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"itemClick","itemMouseEnter","items","itemTemplate","autoDisplay","menuId","activeItemPath","focusedItemId","ariaLabelledBy","level","inlineStyles"]],template:function(i,o){if(i&1){let r=tt();k(0,"ul",3,0),ie("keydown",function(d){return se(r),ae(o.menuKeydown.emit(d))})("focus",function(d){return se(r),ae(o.menuFocus.emit(d))})("blur",function(d){return se(r),ae(o.menuBlur.emit(d))}),ee(2,hAt,2,2,"ng-template",4),D()}i&2&&($r(o.inlineStyles),Oe(o.root?o.cx("rootList"):o.cx("submenu")),E("id",o.menuId+"_list")("tabindex",o.tabindex),Ge("aria-label",o.ariaLabel)("aria-labelledBy",o.ariaLabelledBy)("aria-activedescendant",o.focusedItemId)("aria-orientation","vertical")("data-pc-section","menu"),T(2),E("ngForOf",o.items))},dependencies:[t,On,Gc,Fr,Lo,vs,Pp,Bs,Foe,Ul,dz,gy,NP,In],encapsulation:2})}return t})(),yS=(()=>{class t extends oo{overlayService;set model(e){this._model=e,this._processedItems=this.createProcessedItems(this._model||[])}get model(){return this._model}popup;style;styleClass;breakpoint="960px";autoZIndex=!0;baseZIndex=0;autoDisplay=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";id;ariaLabel;ariaLabelledBy;disabled=!1;tabindex=0;appendTo=mo(void 0);onShow=new ve;onHide=new ve;rootmenu;containerViewChild;submenuIconTemplate;itemTemplate;templates;$appendTo=bo(()=>this.appendTo()||this.config.overlayAppendTo());container;outsideClickListener;resizeListener;scrollHandler;target;relatedTarget;visible;relativeAlign;dirty=!1;focused=!1;activeItemPath=Zn([]);number=Zn(0);focusedItemInfo=Zn({index:-1,level:0,parentKey:"",item:null});searchValue="";searchTimeout;_processedItems;_model;_componentStyle=re(mhe);matchMediaListener;query;queryMatches;_submenuIconTemplate;_itemTemplate;get visibleItems(){let e=this.activeItemPath().find(i=>i.key===this.focusedItemInfo().parentKey);return e?e.items:this.processedItems}get processedItems(){return(!this._processedItems||!this._processedItems.length)&&(this._processedItems=this.createProcessedItems(this.model||[])),this._processedItems}get focusedItemId(){let e=this.focusedItemInfo();return e.item?.id?e.item.id:e.index!==-1?`${this.id}${Kr(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,od(()=>{let i=this.activeItemPath();Kr(i)?(this.bindOutsideClickListener(),this.bindResizeListener()):(this.unbindOutsideClickListener(),this.unbindResizeListener())})}ngOnInit(){super.ngOnInit(),this.bindMatchMediaListener(),this.id=this.id||Vr("pn_id_")}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"submenuicon":this._submenuIconTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}bindMatchMediaListener(){if(ps(this.platformId)&&!this.matchMediaListener){let e=window.matchMedia(`(max-width: ${this.breakpoint})`);this.query=e,this.queryMatches=e.matches,this.matchMediaListener=()=>{this.queryMatches=e.matches},e.addEventListener("change",this.matchMediaListener)}}unbindMatchMediaListener(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)}createProcessedItems(e,i=0,o={},r=""){let s=[];return e&&e.forEach((d,m)=>{let v=(r!==""?r+"_":"")+m,w={item:d,index:m,level:i,key:v,parent:o,parentKey:r};w.items=this.createProcessedItems(d.items,i+1,w,v),s.push(w)}),s}getItemProp(e,i){return e?rm(e[i]):void 0}getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isProcessedItemGroup(e){return e&&Kr(e.items)}isSelected(e){return this.activeItemPath().some(i=>i.key===e.key)}isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)}isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)&&this.isItemVisible(e.item)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemSeparator(e){return this.getItemProp(e,"separator")}isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())}isProccessedItemGroup(e){return e&&Kr(e.items)}onOverlayClick(e){this.popup&&this.overlayService.add({originalEvent:e,target:this.el.nativeElement})}onItemClick(e){let{originalEvent:i,processedItem:o}=e,r=this.isProcessedItemGroup(o),s=wc(o.parent);if(this.isSelected(o)){let{index:m,key:v,level:w,parentKey:O,item:N}=o;this.activeItemPath.set(this.activeItemPath().filter(V=>v!==V.key&&v.startsWith(V.key))),this.focusedItemInfo.set({index:m,level:w,parentKey:O,item:N}),this.dirty=!0,ss(this.rootmenu.sublistViewChild.nativeElement)}else if(r)this.onItemChange(e);else{let m=s?o:this.activeItemPath().find(v=>v.parentKey==="");this.hide(i),this.changeFocusedItemIndex(i,m?m.index:-1),ss(this.rootmenu.sublistViewChild.nativeElement)}}onItemMouseEnter(e){Xg()?this.onItemChange({event:e,processedItem:e.processedItem,focus:this.autoDisplay},"hover"):this.dirty&&this.onItemChange(e,"hover")}onKeyDown(e){let i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!i&&ZI(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let i=this.focusedItemInfo().index!==-1?this.findNextItemIndex(this.focusedItemInfo().index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,i),e.preventDefault()}onArrowRightKey(e){let i=this.visibleItems[this.focusedItemInfo().index],o=this.isProccessedItemGroup(i),r=i?.item;o&&(this.onItemChange({originalEvent:e,processedItem:i}),this.focusedItemInfo.set({index:-1,parentKey:i.key,item:r}),this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}onArrowUpKey(e){if(e.altKey){if(this.focusedItemInfo().index!==-1){let i=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(i)&&this.onItemChange({originalEvent:e,processedItem:i})}this.popup&&this.hide(e,!0),e.preventDefault()}else{let i=this.focusedItemInfo().index!==-1?this.findPrevItemIndex(this.focusedItemInfo().index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,i),e.preventDefault()}}onArrowLeftKey(e){let i=this.visibleItems[this.focusedItemInfo().index];if(!i){e.preventDefault();return}let o=this.activeItemPath().find(d=>d.key===i.parentKey);wc(i.parent)||(this.focusedItemInfo.set({index:-1,parentKey:o?o.parentKey:"",item:i.item}),this.searchValue="",this.onArrowDownKey(e));let s=this.activeItemPath().filter(d=>d.parentKey!==this.focusedItemInfo().parentKey);this.activeItemPath.set(s),e.preventDefault()}onHomeKey(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()}onEndKey(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}onEscapeKey(e){this.hide(e,!0),this.focusedItemInfo().index=this.findFirstFocusedItemIndex(),e.preventDefault()}onTabKey(e){if(this.focusedItemInfo().index!==-1){let i=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(i)&&this.onItemChange({originalEvent:e,processedItem:i})}this.hide()}onEnterKey(e){if(this.focusedItemInfo().index!==-1){let i=zo(this.rootmenu.el.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),o=i&&zo(i,'a[data-pc-section="action"]');if(o?o.click():i&&i.click(),!this.popup){let r=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(r)&&(this.focusedItemInfo().index=this.findFirstFocusedItemIndex())}}e.preventDefault()}onItemChange(e,i){let{processedItem:o,isFocus:r}=e;if(wc(o))return;let{index:s,key:d,level:m,parentKey:v,items:w,item:O}=o,N=Kr(w),V=this.activeItemPath().filter($=>$.parentKey!==v&&$.parentKey!==d);N&&V.push(o),this.focusedItemInfo.set({index:s,level:m,parentKey:v,item:O}),N&&(this.dirty=!0),r&&ss(this.rootmenu.sublistViewChild.nativeElement),!(i==="hover"&&this.queryMatches)&&this.activeItemPath.set(V)}onMenuFocus(e){this.focused=!0,this.focusedItemInfo().index===-1&&this.popup}onMenuBlur(e){this.focused=!1,this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.searchValue="",this.dirty=!1}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.popup&&(this.container=e.element,this.moveOnTop(),this.onShow.emit({}),DP(this.containerViewChild.nativeElement,{position:"absolute",top:0}),this.attrSelector&&this.container.setAttribute(this.attrSelector,""),this.appendOverlay(),this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),ss(this.rootmenu.sublistViewChild.nativeElement),this.scrollInView());break;case"void":this.onOverlayHide(),this.onHide.emit({});break}}alignOverlay(){this.relativeAlign?xK(this.container,this.target):EP(this.container,this.target),qc(this.target)>qc(this.container)&&(this.container.style.minWidth=qc(this.target)+"px")}onOverlayAnimationEnd(e){switch(e.toState){case"void":Nc.clear(e.element);break}}appendOverlay(){this.$appendTo()&&this.$appendTo()!=="self"&&(this.$appendTo()==="body"?this.renderer.appendChild(this.document.body,this.container):Zv(this.$appendTo(),this.container))}restoreOverlayAppend(){this.container&&this.$appendTo()!=="self"&&this.renderer.appendChild(this.el.nativeElement,this.container)}moveOnTop(){this.autoZIndex&&Nc.set("menu",this.container,this.baseZIndex+this.config.zIndex.menu)}hide(e,i){this.popup&&(this.onHide.emit({}),this.visible=!1),this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:""}),i&&ss(this.relatedTarget||this.target||this.rootmenu.sublistViewChild.nativeElement),this.dirty=!1}toggle(e){this.visible?this.hide(e,!0):this.show(e)}show(e,i){this.popup&&(this.visible=!0,this.target=this.target||e.currentTarget,this.relatedTarget=e.relatedTarget||null,this.relativeAlign=e?.relativeAlign||null),this.focusedItemInfo.set({index:-1,level:0,parentKey:""}),i&&ss(this.rootmenu.sublistViewChild.nativeElement),this.cd.markForCheck()}searchItems(e,i){this.searchValue=(this.searchValue||"")+i;let o=-1,r=!1;return this.focusedItemInfo().index!==-1?(o=this.visibleItems.slice(this.focusedItemInfo().index).findIndex(s=>this.isItemMatched(s)),o=o===-1?this.visibleItems.slice(0,this.focusedItemInfo().index).findIndex(s=>this.isItemMatched(s)):o+this.focusedItemInfo().index):o=this.visibleItems.findIndex(s=>this.isItemMatched(s)),o!==-1&&(r=!0),o===-1&&this.focusedItemInfo().index===-1&&(o=this.findFirstFocusedItemIndex()),o!==-1&&this.changeFocusedItemIndex(e,o),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),r}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return Gp(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let i=e>0?Gp(this.visibleItems.slice(0,e),o=>this.isValidItem(o)):-1;return i>-1?i:e}findNextItemIndex(e){let i=ethis.isValidItem(o)):-1;return i>-1?i+e+1:e}findFirstFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e}findFirstItemIndex(){return this.visibleItems.findIndex(e=>this.isValidItem(e))}findSelectedItemIndex(){return this.visibleItems.findIndex(e=>this.isValidSelectedItem(e))}changeFocusedItemIndex(e,i){if(this.focusedItemInfo().index!==i){let o=this.focusedItemInfo();this.focusedItemInfo.set(mt(be({},o),{item:this.visibleItems[i].item,index:i})),this.scrollInView()}}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedItemId,o=zo(this.rootmenu.el.nativeElement,`li[id="${i}"]`);o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new m0(this.target,e=>{this.visible&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&(this.scrollHandler.unbindScrollListener(),this.scrollHandler=null)}bindResizeListener(){ps(this.platformId)&&(this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{Xg()||this.hide(e,!0)})))}bindOutsideClickListener(){ps(this.platformId)&&(this.outsideClickListener||(this.outsideClickListener=this.renderer.listen(this.document,"click",e=>{let i=this.containerViewChild&&!this.containerViewChild.nativeElement.contains(e.target),o=this.popup?!(this.target&&(this.target===e.target||this.target.contains(e.target))):!0;i&&o&&this.hide()})))}unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)}unbindResizeListener(){this.resizeListener&&(this.resizeListener(),this.resizeListener=null)}onOverlayHide(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.cd.destroyed||(this.target=null)}ngOnDestroy(){this.popup&&(this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&Nc.clear(this.container),this.restoreOverlayAppend(),this.onOverlayHide()),this.unbindMatchMediaListener(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(_e(Jg))};static \u0275cmp=ne({type:t,selectors:[["p-tieredMenu"],["p-tieredmenu"],["p-tiered-menu"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,mAt,4),xt(r,fAt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.submenuIconTemplate=s.first),Le(s=Ne())&&(o.itemTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(gAt,5),Ri(_At,5)),i&2){let r;Le(r=Ne())&&(o.rootmenu=r.first),Le(r=Ne())&&(o.containerViewChild=r.first)}},inputs:{model:"model",popup:[2,"popup","popup",je],style:"style",styleClass:"styleClass",breakpoint:"breakpoint",autoZIndex:[2,"autoZIndex","autoZIndex",je],baseZIndex:[2,"baseZIndex","baseZIndex",ln],autoDisplay:[2,"autoDisplay","autoDisplay",je],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",id:"id",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",disabled:[2,"disabled","disabled",je],tabindex:[2,"tabindex","tabindex",ln],appendTo:[1,"appendTo"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[jt([mhe]),ft],decls:1,vars:1,consts:[["container",""],["rootmenu",""],[3,"id","class","ngStyle","click",4,"ngIf"],[3,"click","id","ngStyle"],[3,"itemClick","menuFocus","menuBlur","menuKeydown","itemMouseEnter","root","items","itemTemplate","menuId","tabindex","ariaLabel","ariaLabelledBy","baseZIndex","autoZIndex","autoDisplay","popup","focusedItemId","activeItemPath"]],template:function(i,o){i&1&&ee(0,bAt,4,26,"div",2),i&2&&E("ngIf",!o.popup||o.visible)},dependencies:[On,Fr,vs,wAt,Pp,dz,In],encapsulation:2,data:{animation:[xh("overlayAnimation",[Rc(":enter",[al({opacity:0,transform:"scaleY(0.8)"}),uc("{{showTransitionParams}}")]),Rc(":leave",[uc("{{hideTransitionParams}}",al({opacity:0}))])])]},changeDetection:0})}return t})();var uM=class{static msalInstance(n){return new p5(n.msalConfig.publicClientApplication)}static msalInterceptorConfig(n){let e=new Map;return n.msalConfig.protectedResources.forEach(i=>e.set(i.uri,i.scopes)),{interactionType:lr.Redirect,protectedResourceMap:e}}static msalGuardConfig(n){return{interactionType:n.msalConfig.guardConfig.interactionType==="redirect"?lr.Redirect:lr.Popup,authRequest:n.msalConfig.guardConfig.authRequest,loginFailedRoute:n.msalConfig.guardConfig?.loginFailedRoute??"sys-login-failed"}}};var Xt=class{constructor(n,e){this.fabKey=n,this.name=e}};new Xt("1500","Allgemeinchirurgie");new Xt("2900","Allgemeine Psychiatrie");new Xt("2700","Augenheilkunde");new Xt("0600","Endokrinologie");new Xt("2400","Frauenheilkunde und Geburtshilfe");new Xt("0700","Gastroenterologie");new Xt("1800","Gef\xE4\xDFchirurgie");new Xt("0200","Geriatrie");new Xt("2600","Hals-, Nasen-, Ohrenheilkunde");new Xt("1551","Handchirurgie");new Xt("2100","Herzchirurgie");new Xt("0500","H\xE4matologie und internistische Onkologie");new Xt("0100","Innere Medizin");new Xt("3600","Intensivmedizin");new Xt("0300","Kardiologie");new Xt("1700","Neurochirurgie");new Xt("2800","Neurologie");new Xt("2316","Orthop\xE4die und Unfallchirurgie");new Xt("1900","Plastische Chirurgie");new Xt("0800","Pneumologie");new Xt("3100","Psychosomatik/Psychotherapie");new Xt("1000","P\xE4diatrie");new Xt("3300","Strahlenheilkunde");new Xt("2000","Thoraxchirurgie");new Xt("2200","Urologie");new Xt("2500","Geburtshilfe");var SAt=[new Xt("1500","Allgemeinchirurgie"),new Xt("2900","Allgemeine Psychiatrie"),new Xt("2700","Augenheilkunde"),new Xt("3400","Dermatologie"),new Xt("0600","Endokrinologie"),new Xt("2400","Frauenheilkunde und Geburtshilfe"),new Xt("0700","Gastroenterologie"),new Xt("1800","Gef\xE4\xDFchirurgie"),new Xt("0200","Geriatrie"),new Xt("2600","Hals-, Nasen-, Ohrenheilkunde"),new Xt("1551","Handchirurgie"),new Xt("2100","Herzchirurgie"),new Xt("0500","H\xE4matologie und internistische Onkologie"),new Xt("0100","Innere Medizin"),new Xt("3600","Intensivmedizin"),new Xt("0300","Kardiologie"),new Xt("3000","Kinder- und Jugendpsychiatrie"),new Xt("1300","Kinderchirurgie"),new Xt("1100","Kinderkardiologie"),new Xt("1400","Lungen- und Bronchialheilkunde"),new Xt("1200","Neonatologie"),new Xt("0400","Nephrologie"),new Xt("1700","Neurochirurgie"),new Xt("2800","Neurologie"),new Xt("3200","Nuklearmedizin"),new Xt("2300","Orthop\xE4die"),new Xt("2316","Orthop\xE4die und Unfallchirurgie"),new Xt("1900","Plastische Chirurgie"),new Xt("0800","Pneumologie"),new Xt("3100","Psychosomatik/Psychotherapie"),new Xt("1000","P\xE4diatrie"),new Xt("0900","Rheumatologie"),new Xt("3753","Schmerztherapie"),new Xt("0000","Sonstige"),new Xt("3700","Sonstige Fachabteilung"),new Xt("3300","Strahlenheilkunde"),new Xt("2000","Thoraxchirurgie"),new Xt("1600","Unfallchirurgie"),new Xt("2200","Urologie"),new Xt("3500","Zahn- und Kieferheilkunde, Mund- und Kieferchirurgie"),new Xt("2500","davon Geburtshilfe")],TAt=[new Xt("0000","Unbekannt"),new Xt("0100","Innere Medizin"),new Xt("2400","Frauenheilkunde"),new Xt("2500","Geburtshilfe"),new Xt("0200","Geriatrie"),new Xt("0300","Kardiologie"),new Xt("0400","Nephrologie"),new Xt("0500","H\xE4matologie und internistische Onkologie"),new Xt("0600","Endokrinologie"),new Xt("0700","Gastroenterologie"),new Xt("0800","Pneumologie"),new Xt("0900","Rheumatologie"),new Xt("1000","P\xE4diatrie"),new Xt("1100","Kinderkardiologie"),new Xt("1200","Neonatologie"),new Xt("1300","Kinderchirurgie"),new Xt("1400","Lungen- und Bronchialheilkunde"),new Xt("1500","Allgemeinchirurgie"),new Xt("1600","Unfallchirurgie"),new Xt("1700","Neurochirurgie"),new Xt("1800","Gef\xE4\xDFchirurgie"),new Xt("1900","Plastische Chirurgie"),new Xt("2000","Thoraxchirurgie"),new Xt("2100","Herzchirurgie"),new Xt("2200","Urologie"),new Xt("2300","Orthop\xE4die"),new Xt("2600","Hals-, Nasen-, Ohrenheilkunde"),new Xt("2700","Augenheilkunde"),new Xt("2800","Neurologie"),new Xt("2900","Allgemeine Psychiatrie"),new Xt("3000","Kinder- und Jugendpsychiatrie"),new Xt("3100","Psychosomatik/Psychotherapie"),new Xt("3200","Nuklearmedizin"),new Xt("3300","Strahlenheilkunde"),new Xt("3400","Dermatologie"),new Xt("3500","Zahn- und Kieferheilkunde, Mund- und Kieferchirurgie"),new Xt("3600","Intensivmedizin"),new Xt("3700","Sonstige Fachabteilung"),new Xt("2316","Orthop\xE4die und Unfallchirurgie"),new Xt("0104","Innere Medizin/Schwerpunkt Nephrologie"),new Xt("0105","Innere Medizin/Schwerpunkt H\xE4matologie und internistische Onkologie"),new Xt("0106","Innere Medizin/Schwerpunkt Endokrinologie"),new Xt("0107","Innere Medizin/Schwerpunkt Gastroenterologie"),new Xt("0108","Innere Medizin/Schwerpunkt Pneumologie"),new Xt("0109","Innere Medizin/Schwerpunkt Rheumatologie"),new Xt("0114","Innere Medizin/Schwerpunkt Lungen- und Bronchialheilkunde"),new Xt("0150","Innere Medizin/Tumorforschung"),new Xt("0151","Innere Medizin/Schwerpunkt Coloproktologie"),new Xt("0152","Innere Medizin/Schwerpunkt Infektionskrankheiten"),new Xt("0153","Innere Medizin/Schwerpunkt Diabetes"),new Xt("0154","Innere Medizin/Schwerpunkt Naturheilkunde"),new Xt("0224","Geriatrie/Schwerpunkt Frauenheilkunde"),new Xt("0260","Geriatrie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Xt("0261","Geriatrie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Xt("0410","Nephrologie/Schwerpunkt P\xE4diatrie"),new Xt("0436","Nephrologie/Intensivmedizin"),new Xt("0510","H\xE4matologie und internistische Onkologie/Schwerpunkt P\xE4diatrie"),new Xt("0524","H\xE4matologie und internistische Onkologie/Schwerpunkt Frauenheilkunde"),new Xt("0533","H\xE4matologie und internistische Onkologie/Schwerpunkt Strahlenheilkunde"),new Xt("0607","Endokrinologie/Schwerpunkt Gastroenterologie"),new Xt("0610","Endokrinologie/Schwerpunkt P\xE4diatrie"),new Xt("0706","Gastroenterologie/Schwerpunkt Endokrinologie"),new Xt("0710","Gastroenterologie/Schwerpunkt P\xE4diatrie"),new Xt("0910","Rheumatologie/Schwerpunkt P\xE4diatrie"),new Xt("1004","P\xE4diatrie/Schwerpunkt Nephrologie"),new Xt("1005","P\xE4diatrie/Schwerpunkt H\xE4matologie und internistische Onkologie"),new Xt("1006","P\xE4diatrie/Schwerpunkt Endokrinologie "),new Xt("3750","Angiologie"),new Xt("0156","Innere Medizin/Schwerpunkt Schlaganfallpatienten"),new Xt("1007","P\xE4diatrie/Schwerpunkt Gastroenterologie"),new Xt("1009","P\xE4diatrie/Schwerpunkt Rheumatologie"),new Xt("1011","P\xE4diatrie/Schwerpunkt Kinderkardiologie"),new Xt("1012","P\xE4diatrie/Schwerpunkt Neonatologie"),new Xt("1014","P\xE4diatrie/Schwerpunkt Lungen- und Bronchialheilkunde"),new Xt("1028","P\xE4diatrie/Schwerpunkt Kinderneurologie"),new Xt("1050","P\xE4diatrie/Schwerpunkt Perinatalmedizin"),new Xt("1051","Langzeitbereich Kinder"),new Xt("1136","Kinderkardiologie/Schwerpunkt Intensivmedizin"),new Xt("1410","Lungen- und Bronchialheilkunde/Schwerpunkt P\xE4diatrie"),new Xt("1513","Allgemeine Chirurgie/Schwerpunkt Kinderchirurgie"),new Xt("1516","Allgemeine Chirurgie/Schwerpunkt Unfallchirurgie"),new Xt("1518","Allgemeine Chirurgie/Schwerpunkt Gef\xE4\xDFchirurgie"),new Xt("1519","Allgemeine Chirurgie/Schwerpunkt Plastische Chirurgie"),new Xt("1520","Allgemeine Chirurgie/Schwerpunkt Thoraxchirurgie"),new Xt("1523","Chirurgie/Schwerpunkt Orthop\xE4die"),new Xt("1550","Allgemeine Chirurgie/Schwerpunkt Abdominal- und Gef\xE4\xDFchirurgie"),new Xt("1551","Allgemeine Chirurgie/Schwerpunkt Handchirurgie"),new Xt("2021","Thoraxchirurgie/Schwerpunkt Herzchirurgie"),new Xt("2036","Thoraxchirurgie/Intensivmedizin"),new Xt("2050","Thoraxchirurgie/Schwerpunkt Herzchirurgie Intensivmedizin"),new Xt("2120","Herzchirurgie/Schwerpunkt Thoraxchirurgie"),new Xt("2150","Herzchirurgie/Schwerpunkt Thoraxchirurgie Intensivmedizin"),new Xt("2309","Orthop\xE4die/Schwerpunkt Rheumatologie"),new Xt("2315","Orthop\xE4die/Schwerpunkt Chirurgie"),new Xt("2402","Frauenheilkunde/Schwerpunkt Geriatrie"),new Xt("2405","Frauenheilkunde/Schwerpunkt H\xE4matologie und internistische Onkologie"),new Xt("2406","Frauenheilkunde/Schwerpunkt Endokrinologie"),new Xt("2810","Neurologie/Schwerpunkt P\xE4diatrie"),new Xt("2928","Allgemeine Psychiatrie/Schwerpunkt Neurologie"),new Xt("2930","Allgemeine Psychiatrie/Schwerpunkt Kinder- und Jugendpsychiatrie"),new Xt("0103","Innere Medizin/Schwerpunkt Kardiologie"),new Xt("2931","Allgemeine Psychiatrie/Schwerpunkt Psychosomatik/Psychotherapie"),new Xt("2950","Allgemeine Psychiatrie/Schwerpunkt Suchtbehandlung"),new Xt("2951","Allgemeine Psychiatrie/Schwerpunkt Gerontopsychiatrie"),new Xt("2952","Allgemeine Psychiatrie/Schwerpunkt Forensische Behandlung"),new Xt("2953","Allgemeine Psychiatrie/Schwerpunkt Suchtbehandlung, Tagesklinik"),new Xt("2954","Allgemeine Psychiatrie/Schwerpunkt Suchtbehandlung, Nachtklinik"),new Xt("2955","Allgemeine Psychiatrie/Schwerpunkt Gerontopsychiatrie, Tagesklinik"),new Xt("2956","Allgemeine Psychiatrie/Schwerpunkt Gerontopsychiatrie, Nachtklinik"),new Xt("2960","Allgemeine Psychiatrie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Xt("2961","Allgemeine Psychiatrie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Xt("3060","Kinder- und Jugendpsychiatrie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Xt("3061","Kinder- und Jugendpsychiatrie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Xt("3160","Psychosomatik/Psychotherapie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Xt("3161","Psychosomatik/Psychotherapie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Xt("3233","Nuklearmedizin/Schwerpunkt Strahlenheilkunde"),new Xt("3305","Strahlenheilkunde/Schwerpunkt H\xE4matologie und internistische Onkologie"),new Xt("3350","Strahlenheilkunde/Schwerpunkt Radiologie"),new Xt("3460","Dermatologie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Xt("3601","Intensivmedizin/Schwerpunkt Innere Medizin"),new Xt("3603","Intensivmedizin/Schwerpunkt Kardiologie"),new Xt("3610","Intensivmedizin/Schwerpunkt P\xE4diatrie"),new Xt("3617","Intensivmedizin/Schwerpunkt Neurochirurgie"),new Xt("3618","Intensivmedizin/Schwerpunkt Chirurgie"),new Xt("3621","Intensivmedizin/Schwerpunkt Herzchirurgie"),new Xt("3622","Intensivmedizin/Schwerpunkt Urologie"),new Xt("3624","Intensivmedizin/Schwerpunkt Frauenheilkunde und Geburtshilfe"),new Xt("3626","Intensivmedizin/Schwerpunkt Hals-, Nasen-, Ohrenheilkunde"),new Xt("3628","Intensivmedizin/Schwerpunkt Neurologie"),new Xt("3650","Operative Intensivmedizin/Schwerpunkt Chirurgie"),new Xt("3651","Intensivmedizin/Thorax-Herzchirurgie"),new Xt("3652","Intensivmedizin/Herz-Thoraxchirurgie"),new Xt("3751","Radiologie"),new Xt("3752","Palliativmedizin"),new Xt("3753","Schmerztherapie"),new Xt("3754","Heiltherapeutische Abteilung"),new Xt("3755","Wirbels\xE4ulenchirurgie"),new Xt("3756","Suchtmedizin"),new Xt("3757","Visceralchirurgie"),new Xt("1536","Allgemeine Chirurgie/Intensivmedizin"),new Xt("2136","Herzchirurgie/Intensivmedizin"),new Xt("2856","Neurologie/Schwerpunkt Schlaganfallpatienten")];var IAt={id:"USER",displayName:"File-Center",type:"other",navigation:{path:["/user","downloads"]},permissions:null},EAt={id:"HELP_PAGES",displayName:"Dokumentation",type:"other",permissions:null,navigation:{externalLink:"https://bindoc.atlassian.net/wiki/spaces/HP/overview"}},ALe=[IAt,EAt];var pf="https://www.bindoc.de/online-meeting";var DAt={id:"HOME",displayName:"Home",type:"tool",permissions:null,navigation:{path:["/home"]}},AAt={id:"OPERATING_NUMBERS",displayName:"Kennzahlen-Benchmarking",type:"tool",permissions:["OPERATING_NUMBERS:BASE"],navigation:{path:["/operating-numbers","clinics"],disabledLink:pf}},kAt={id:"CLINIC_BROWSER",displayName:"Klinik-Browser",type:"tool",permissions:null,navigation:{path:["/clinics"]}},MAt={id:"CODE_BROWSER",displayName:"Code-Browser",type:"tool",permissions:null,navigation:{path:null,children:[{title:"ICD",path:["/code-browser","ICD-10-GM"]},{title:"OPS",path:["/code-browser","OPS"]},{title:"DRG",path:["/code-browser","G-DRG"]}]}},OAt={id:"PROJECTION",displayName:"Marktprognosen",type:"tool",permissions:["PROJECTION:BASE"],navigation:{path:["/projection"],disabledLink:pf}},RAt={id:"GEOGRAPHIC",displayName:"Geo-Analyse",type:"tool",permissions:null,navigation:{path:["/geographic"],disabledLink:pf}},FAt={id:"POTENTIAL",displayName:"Potenzialanalyse",type:"tool",permissions:["POTENTIAL:BASE"],navigation:{path:["/potential"],disabledLink:pf}},PAt={id:"DRG_PROFIT_LOSS_ANALYSIS",displayName:"DRG Benchmarking",type:"tool",permissions:["DRG_PROFIT_LOSS_ANALYSIS:BASE"],navigation:{path:["/drg-profit-loss-analysis"],disabledLink:pf}},LAt={id:"COMPETITOR_ANALYSIS",displayName:"Wettbewerbsanalyse",type:"tool",permissions:["COMPETITOR_ANALYSIS:BASE"],navigation:{path:["/competitors-analysis"],disabledLink:pf}},NAt={id:"VIRTUAL_CLINIC_REFERRAL",displayName:"Einweiseranalyse",type:"tool",permissions:["VIRTUAL_CLINIC_REFERRAL:BASE","VIRTUAL_CLINIC_REFERRAL:MAIL"],navigation:{path:null,disabledLink:pf,children:[{title:"Karte",path:["/virtual-clinic-referral","map"]},{title:"Dashboard",path:["/virtual-clinic-referral","dashboard"]},{title:"Management",path:["/virtual-clinic-referral","management"]},{title:"Import",path:["/virtual-clinic-referral","import"]}]}},BAt={id:"CUBE",displayName:"Cube",type:"tool",permissions:["CUBE:BASE","CUBE:CREATE_DASHBOARD"],navigation:{path:["/cube"],disabledLink:pf}},VAt={id:"BUSINESS_CASE",displayName:"Business Case",type:"tool",permissions:["BUSINESS_CASE:BASE"],navigation:{path:["/business-case"],disabledLink:pf}},zAt={id:"SCENARIO_ANALYSIS_CLINIC_LOCATIONS_CLOSING",displayName:"Szenarioanalyse",type:"tool",permissions:["SCENARIO_ANALYSIS_CLINIC_LOCATIONS_CLOSING:BASE"],navigation:{path:["/scenario-analysis"],disabledLink:pf}},UAt={id:"DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING",displayName:"Versorgungsanalyse",type:"tool",permissions:["DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:BASE","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:INEK_DATASOURCE","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_BB","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_BE","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_BW","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_BY","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_HB","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_HE","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_HH","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_MV","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_NI","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_NW","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_RP","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_SL","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_SN","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_ST","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_SH","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_TH","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:CUSTOM_SAARLAND_DATASOURCE"],navigation:{path:null,disabledLink:pf,children:[{title:"Simulation",path:["/demand-analysis"]},{title:"Kalkulation",path:["/demand-analysis/vv"]}]}},kLe=[DAt,AAt,kAt,MAt,OAt,RAt,FAt,PAt,LAt,NAt,BAt,VAt,zAt,UAt];var HAt={id:"MARKET",displayName:"M\xE4rkte",type:"resource",navigation:{path:["/markets"]},permissions:null},jAt={id:"VIRTUAL_CLINIC",displayName:"Virtuelle Kliniken",type:"resource",navigation:{path:["/virtual-clinics"]},permissions:["VIRTUAL_CLINIC:CREATE","VIRTUAL_CLINIC:EDIT_ADDRESS","VIRTUAL_CLINIC:EDIT_STAFFING","VIRTUAL_CLINIC:EDIT_ADDITIONAL_INFO","VIRTUAL_CLINIC:VIEW_FULLY_INPATIENT_CASES"]},GAt={id:"VIRTUAL_BENCHMARKING_GROUP",displayName:"Virtuelle Benchmarking-Gruppen",type:"resource",navigation:{path:["/virtual-benchmarking-groups"]},permissions:null},$At={id:"CLINICS_FILTER",displayName:"Klinik-Filter",type:"resource",navigation:{path:["/clinics-filters"]},permissions:null},qAt={id:"CODE_SPECTRUM",displayName:"Ziffer-Spektra",type:"resource",navigation:{path:["/code-spectra"]},permissions:null},MLe=[HAt,jAt,$At,qAt,GAt];var OLe=[...kLe,...MLe,...ALe];var fhe=(()=>{class t extends dr{constructor(e,i){super(),this._httpClient=e,this._envService=i,this._cache=B1(0,60*1e3).pipe(Mn(()=>this._fetchFeatureStates()),du(1))}ngOnDestroy(){this.unsubscribeAll()}getFeatureStatus(e){return this._cache.pipe(vt(i=>{let o=Object.keys(i);return e.forEach(r=>{o.includes(r)||(i[r]=!0)}),i}))}_fetchFeatureStates(){let e=`${this._envService.load("BD_FRONTEND_CONFIG_RESOURCE_URL")}/config/feature/status`;return this._httpClient.post(e,OLe.map(i=>i.id))}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ghe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:11,vars:1,consts:[[1,"bd-container"],[1,"flex","flex-row","justify-center"],[3,"inline"],[1,"bd-container-inner","mat-typography"],[1,"mat-title"]],template:function(i,o){i&1&&(ce(0,"mat-toolbar"),k(1,"div",0)(2,"div",1)(3,"div")(4,"mat-icon",2),Q(5,"engineering"),D()()()(),k(6,"div",3)(7,"h1",4),Q(8,"Wir \xFCberarbeiten diesen Bereich gerade f\xFCr Sie"),D(),k(9,"p"),Q(10," Danke f\xFCr Ihr Verst\xE4ndnis! Wir beeilen uns, damit Sie so schnell wie m\xF6glich wieder wie gewohnt darauf zugreifen k\xF6nnen. Bis dahin k\xF6nnen Sie gerne unseren Support kontaktieren. "),D()()),i&2&&(T(4),E("inline",!0))},dependencies:[oE,UP,$o,mr],styles:["mat-icon.mat-icon-inline[_ngcontent-%COMP%]{font-size:100px}h1.mat-title[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{text-align:center}"]})}}return t})();var RLe=(()=>{class t{constructor(e,i){this._featureStateService=e,this._router=i}canActivate(e){let i=e.data.featureId;return i?this._featureStateService.getFeatureStatus([i]).pipe(vt(o=>o[i]),vt(o=>o||this._router.parseUrl("/sys-feature-maintenance"))):this._router.parseUrl("/sys-feature-maintenance")}canActivateChild(e){let i=e.data.featureId;return i?this._featureStateService.getFeatureStatus([i]).pipe(vt(o=>o[i]),vt(o=>o||this._router.parseUrl("/sys-feature-maintenance"))):this._router.parseUrl("/sys-feature-maintenance")}static{this.\u0275fac=function(i){return new(i||t)(di(fhe),di(dl))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var WAt="sys-feature-maintenance",YAt={path:WAt,component:ghe},vQ=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=_i({providers:[RLe],imports:[Pp.forChild([YAt]),oE,$o,ghe,Pp]})}}return t})();var _he=new fi("tracking.service"),yhe=(()=>{class t{constructor(e){if(this._trackers=[],this._trackers=[],e&&e.length>0)for(let i of e)this._trackers.push(i);else console.log("no tracker loaded")}addAuthenticatedUserContext(e){this._trackers.forEach(i=>i.addAuthenticatedUserContext(e))}removeAuthenticatedUserContext(){this._trackers.forEach(e=>e.removeAuthenticatedUserContext())}trackException(e){this._trackers.forEach(i=>i.trackException(e))}trackEvent(e,i){this._trackers.forEach(o=>o.trackEvent(e,i))}init(e){this._trackers.forEach(i=>i.init(e))}destroy(){this._trackers.forEach(e=>e.destroy())}static{this.\u0275fac=function(i){return new(i||t)(di(_he,8))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ey=(()=>{class t extends dr{constructor(e,i,o){super(),this._authenticationService=e,this._userConsentService=i,this._userTrackingService=o,this.consent$=new pi,this.authenticated$=new Gs(!1),this.currentUser=new pi,this.accountInfo=null}init(){let e=this._authenticationService.authentication$.pipe(Vo(r=>{r||(this.accountInfo=null),this._onAuthenticatedChange(r)})).subscribe(r=>{this.authenticated$.next(r)}),i=this._userConsentService.userConsent$.pipe(rp((r,s)=>r.equals(s)),Vo(r=>{console.debug("onConsentChange",r),this._onConsentChange(r)})).subscribe(r=>{this.consent$.next(r)}),o=this._authenticationService.accountInfo$.subscribe(r=>{this.currentUser.next(r),this.accountInfo=r});this._subs.push(e,i,o)}_onConsentChange(e){e.consent.tracking?this._userTrackingService.init(this.accountInfo):this._userTrackingService.destroy()}_onAuthenticatedChange(e){e?this._userTrackingService.addAuthenticatedUserContext(this.accountInfo):this._userTrackingService.removeAuthenticatedUserContext()}static{this.\u0275fac=function(i){return new(i||t)(di(vp),di(ILe),di(yhe))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var PLe={accept:"*"};var LLe=` .p-message { border-radius: dt('message.border.radius'); outline-width: dt('message.border.width'); outline-style: solid; } .p-message-content { display: flex; align-items: center; padding: dt('message.content.padding'); gap: dt('message.content.gap'); height: 100%; } .p-message-icon { flex-shrink: 0; } .p-message-close-button { display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-inline-start: auto; overflow: hidden; position: relative; width: dt('message.close.button.width'); height: dt('message.close.button.height'); border-radius: dt('message.close.button.border.radius'); background: transparent; transition: background dt('message.transition.duration'), color dt('message.transition.duration'), outline-color dt('message.transition.duration'), box-shadow dt('message.transition.duration'), opacity 0.3s; outline-color: transparent; color: inherit; padding: 0; border: none; cursor: pointer; user-select: none; } .p-message-close-icon { font-size: dt('message.close.icon.size'); width: dt('message.close.icon.size'); height: dt('message.close.icon.size'); } .p-message-close-button:focus-visible { outline-width: dt('message.close.button.focus.ring.width'); outline-style: dt('message.close.button.focus.ring.style'); outline-offset: dt('message.close.button.focus.ring.offset'); } .p-message-info { background: dt('message.info.background'); outline-color: dt('message.info.border.color'); color: dt('message.info.color'); box-shadow: dt('message.info.shadow'); } .p-message-info .p-message-close-button:focus-visible { outline-color: dt('message.info.close.button.focus.ring.color'); box-shadow: dt('message.info.close.button.focus.ring.shadow'); } .p-message-info .p-message-close-button:hover { background: dt('message.info.close.button.hover.background'); } .p-message-info.p-message-outlined { color: dt('message.info.outlined.color'); outline-color: dt('message.info.outlined.border.color'); } .p-message-info.p-message-simple { color: dt('message.info.simple.color'); } .p-message-success { background: dt('message.success.background'); outline-color: dt('message.success.border.color'); color: dt('message.success.color'); box-shadow: dt('message.success.shadow'); } .p-message-success .p-message-close-button:focus-visible { outline-color: dt('message.success.close.button.focus.ring.color'); box-shadow: dt('message.success.close.button.focus.ring.shadow'); } .p-message-success .p-message-close-button:hover { background: dt('message.success.close.button.hover.background'); } .p-message-success.p-message-outlined { color: dt('message.success.outlined.color'); outline-color: dt('message.success.outlined.border.color'); } .p-message-success.p-message-simple { color: dt('message.success.simple.color'); } .p-message-warn { background: dt('message.warn.background'); outline-color: dt('message.warn.border.color'); color: dt('message.warn.color'); box-shadow: dt('message.warn.shadow'); } .p-message-warn .p-message-close-button:focus-visible { outline-color: dt('message.warn.close.button.focus.ring.color'); box-shadow: dt('message.warn.close.button.focus.ring.shadow'); } .p-message-warn .p-message-close-button:hover { background: dt('message.warn.close.button.hover.background'); } .p-message-warn.p-message-outlined { color: dt('message.warn.outlined.color'); outline-color: dt('message.warn.outlined.border.color'); } .p-message-warn.p-message-simple { color: dt('message.warn.simple.color'); } .p-message-error { background: dt('message.error.background'); outline-color: dt('message.error.border.color'); color: dt('message.error.color'); box-shadow: dt('message.error.shadow'); } .p-message-error .p-message-close-button:focus-visible { outline-color: dt('message.error.close.button.focus.ring.color'); box-shadow: dt('message.error.close.button.focus.ring.shadow'); } .p-message-error .p-message-close-button:hover { background: dt('message.error.close.button.hover.background'); } .p-message-error.p-message-outlined { color: dt('message.error.outlined.color'); outline-color: dt('message.error.outlined.border.color'); } .p-message-error.p-message-simple { color: dt('message.error.simple.color'); } .p-message-secondary { background: dt('message.secondary.background'); outline-color: dt('message.secondary.border.color'); color: dt('message.secondary.color'); box-shadow: dt('message.secondary.shadow'); } .p-message-secondary .p-message-close-button:focus-visible { outline-color: dt('message.secondary.close.button.focus.ring.color'); box-shadow: dt('message.secondary.close.button.focus.ring.shadow'); } .p-message-secondary .p-message-close-button:hover { background: dt('message.secondary.close.button.hover.background'); } .p-message-secondary.p-message-outlined { color: dt('message.secondary.outlined.color'); outline-color: dt('message.secondary.outlined.border.color'); } .p-message-secondary.p-message-simple { color: dt('message.secondary.simple.color'); } .p-message-contrast { background: dt('message.contrast.background'); outline-color: dt('message.contrast.border.color'); color: dt('message.contrast.color'); box-shadow: dt('message.contrast.shadow'); } .p-message-contrast .p-message-close-button:focus-visible { outline-color: dt('message.contrast.close.button.focus.ring.color'); box-shadow: dt('message.contrast.close.button.focus.ring.shadow'); } .p-message-contrast .p-message-close-button:hover { background: dt('message.contrast.close.button.hover.background'); } .p-message-contrast.p-message-outlined { color: dt('message.contrast.outlined.color'); outline-color: dt('message.contrast.outlined.border.color'); } .p-message-contrast.p-message-simple { color: dt('message.contrast.simple.color'); } .p-message-text { font-size: dt('message.text.font.size'); font-weight: dt('message.text.font.weight'); } .p-message-icon { font-size: dt('message.icon.size'); width: dt('message.icon.size'); height: dt('message.icon.size'); } .p-message-enter-from { opacity: 0; } .p-message-enter-active { transition: opacity 0.3s; } .p-message.p-message-leave-from { max-height: 1000px; } .p-message.p-message-leave-to { max-height: 0; opacity: 0; margin: 0; } .p-message-leave-active { overflow: hidden; transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin 0.3s; } .p-message-leave-active .p-message-close-button { opacity: 0; } .p-message-sm .p-message-content { padding: dt('message.content.sm.padding'); } .p-message-sm .p-message-text { font-size: dt('message.text.sm.font.size'); } .p-message-sm .p-message-icon { font-size: dt('message.icon.sm.size'); width: dt('message.icon.sm.size'); height: dt('message.icon.sm.size'); } .p-message-sm .p-message-close-icon { font-size: dt('message.close.icon.sm.size'); width: dt('message.close.icon.sm.size'); height: dt('message.close.icon.sm.size'); } .p-message-lg .p-message-content { padding: dt('message.content.lg.padding'); } .p-message-lg .p-message-text { font-size: dt('message.text.lg.font.size'); } .p-message-lg .p-message-icon { font-size: dt('message.icon.lg.size'); width: dt('message.icon.lg.size'); height: dt('message.icon.lg.size'); } .p-message-lg .p-message-close-icon { font-size: dt('message.close.icon.lg.size'); width: dt('message.close.icon.lg.size'); height: dt('message.close.icon.lg.size'); } .p-message-outlined { background: transparent; outline-width: dt('message.outlined.border.width'); } .p-message-simple { background: transparent; outline-color: transparent; box-shadow: none; } .p-message-simple .p-message-content { padding: dt('message.simple.content.padding'); } .p-message-outlined .p-message-close-button:hover, .p-message-simple .p-message-close-button:hover { background: transparent; } `;var ZAt=["container"],XAt=["icon"],JAt=["closeicon"],ekt=["*"],tkt=(t,n)=>({showTransitionParams:t,hideTransitionParams:n}),ikt=t=>({value:"visible()",params:t}),nkt=t=>({closeCallback:t});function okt(t,n){t&1&&ui(0)}function rkt(t,n){if(t&1&&ee(0,okt,1,0,"ng-container",7),t&2){let e=P(2);E("ngTemplateOutlet",e.iconTemplate||e.iconTemplate)}}function skt(t,n){if(t&1&&ce(0,"i"),t&2){let e=P(2);Oe(e.cn(e.cx("icon"),e.icon))}}function akt(t,n){if(t&1&&ce(0,"span",9),t&2){let e=P(3);E("ngClass",e.cx("text"))("innerHTML",e.text,yR)}}function lkt(t,n){if(t&1&&(k(0,"div"),ee(1,akt,1,2,"span",8),D()),t&2){let e=P(2);T(),E("ngIf",!e.escape)}}function ckt(t,n){if(t&1&&(k(0,"span",5),Q(1),D()),t&2){let e=P(3);E("ngClass",e.cx("text")),T(),dt(e.text)}}function dkt(t,n){if(t&1&&ee(0,ckt,2,2,"span",10),t&2){let e=P(2);E("ngIf",e.escape&&e.text)}}function ukt(t,n){t&1&&ui(0)}function pkt(t,n){if(t&1&&ee(0,ukt,1,0,"ng-container",11),t&2){let e=P(2);E("ngTemplateOutlet",e.containerTemplate||e.containerTemplate)("ngTemplateOutletContext",ki(2,nkt,e.close.bind(e)))}}function hkt(t,n){if(t&1&&(k(0,"span",5),pn(1),D()),t&2){let e=P(2);E("ngClass",e.cx("text"))}}function mkt(t,n){if(t&1&&ce(0,"i",5),t&2){let e=P(3);Oe(e.cn(e.cx("closeIcon"),e.closeIcon)),E("ngClass",e.closeIcon)}}function fkt(t,n){t&1&&ui(0)}function gkt(t,n){if(t&1&&ee(0,fkt,1,0,"ng-container",7),t&2){let e=P(3);E("ngTemplateOutlet",e.closeIconTemplate||e._closeIconTemplate)}}function _kt(t,n){if(t&1&&(si(),ce(0,"svg",15)),t&2){let e=P(3);Oe(e.cx("closeIcon"))}}function ykt(t,n){if(t&1){let e=tt();k(0,"button",12),ie("click",function(o){se(e);let r=P(2);return ae(r.close(o))}),qe(1,mkt,1,3,"i",13),qe(2,gkt,1,1,"ng-container"),qe(3,_kt,1,2,":svg:svg",14),D()}if(t&2){let e=P(2);Oe(e.cx("closeButton")),Ge("aria-label",e.closeAriaLabel),T(),Ke(e.closeIcon?1:-1),T(),Ke(e.closeIconTemplate||e._closeIconTemplate?2:-1),T(),Ke(!e.closeIconTemplate&&!e._closeIconTemplate&&!e.closeIcon?3:-1)}}function vkt(t,n){if(t&1&&(k(0,"div",2)(1,"div"),qe(2,rkt,1,1,"ng-container"),qe(3,skt,1,2,"i",3),ee(4,lkt,2,1,"div",4)(5,dkt,1,1,"ng-template",null,0,Pt),qe(7,pkt,1,4,"ng-container")(8,hkt,2,1,"span",5),qe(9,ykt,4,6,"button",6),D()()),t&2){let e=ti(6),i=P();Oe(i.cn(i.cx("root"),i.styleClass)),E("@messageAnimation",ki(16,ikt,Eo(13,tkt,i.showTransitionOptions,i.hideTransitionOptions))),Ge("aria-live","polite")("role","alert"),T(),Oe(i.cx("content")),T(),Ke(i.iconTemplate||i._iconTemplate?2:-1),T(),Ke(i.icon?3:-1),T(),E("ngIf",!i.escape)("ngIfElse",e),T(3),Ke(i.containerTemplate||i._containerTemplate?7:8),T(2),Ke(i.closable?9:-1)}}var bkt={root:({instance:t})=>["p-message p-component p-message-"+t.severity,"p-message-"+t.variant,{"p-message-sm":t.size==="small","p-message-lg":t.size==="large"}],content:"p-message-content",icon:"p-message-icon",text:"p-message-text",closeButton:"p-message-close-button",closeIcon:"p-message-close-icon"},NLe=(()=>{class t extends io{name="message";theme=LLe;classes=bkt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var vS=(()=>{class t extends oo{severity="info";text;escape=!0;style;styleClass;closable=!1;icon;closeIcon;life;showTransitionOptions="300ms ease-out";hideTransitionOptions="200ms cubic-bezier(0.86, 0, 0.07, 1)";size;variant;onClose=new ve;get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}visible=Zn(!0);_componentStyle=re(NLe);containerTemplate;iconTemplate;closeIconTemplate;templates;_containerTemplate;_iconTemplate;_closeIconTemplate;ngOnInit(){super.ngOnInit(),this.life&&setTimeout(()=>{this.visible.set(!1)},this.life)}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"container":this._containerTemplate=e.template;break;case"icon":this._iconTemplate=e.template;break;case"closeicon":this._closeIconTemplate=e.template;break}})}close(e){this.visible.set(!1),this.onClose.emit({originalEvent:e})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-message"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,ZAt,4),xt(r,XAt,4),xt(r,JAt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.containerTemplate=s.first),Le(s=Ne())&&(o.iconTemplate=s.first),Le(s=Ne())&&(o.closeIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},inputs:{severity:"severity",text:"text",escape:[2,"escape","escape",je],style:"style",styleClass:"styleClass",closable:[2,"closable","closable",je],icon:"icon",closeIcon:"closeIcon",life:"life",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",size:"size",variant:"variant"},outputs:{onClose:"onClose"},features:[jt([NLe]),ft],ngContentSelectors:ekt,decls:1,vars:1,consts:[["escapeOut",""],[1,"p-message","p-component",3,"class"],[1,"p-message","p-component"],[3,"class"],[4,"ngIf","ngIfElse"],[3,"ngClass"],["pRipple","","type","button",3,"class"],[4,"ngTemplateOutlet"],[3,"ngClass","innerHTML",4,"ngIf"],[3,"ngClass","innerHTML"],[3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pRipple","","type","button",3,"click"],[3,"class","ngClass"],["data-p-icon","times",3,"class"],["data-p-icon","times"]],template:function(i,o){i&1&&(Nn(),qe(0,vkt,10,18,"div",1)),i&2&&Ke(o.visible()?0:-1)},dependencies:[On,Ns,Fr,Lo,am,Ul,In],encapsulation:2,data:{animation:[xh("messageAnimation",[Rc(":enter",[al({opacity:0,transform:"translateY(-25%)"}),uc("{{showTransitionParams}}")]),Rc(":leave",[uc("{{hideTransitionParams}}",al({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0})}return t})(),BLe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[vS,In,In]})}return t})();var xkt=["content"],wkt=t=>({$implicit:t});function Skt(t,n){if(t&1&&(k(0,"div"),Q(1),D()),t&2){let e=P(2);Ir("display",e.value!=null&&e.value!==0?"flex":"none"),Ge("data-pc-section","label"),T(),_d("",e.value,"",e.unit)}}function Tkt(t,n){t&1&&ui(0)}function Ikt(t,n){if(t&1&&(k(0,"div")(1,"div"),ee(2,Skt,2,5,"div",2)(3,Tkt,1,0,"ng-container",3),D()()),t&2){let e=P();Oe(e.cn(e.cx("value"),e.valueStyleClass)),Ir("width",e.value+"%")("display","flex")("background",e.color),Ge("data-pc-section","value"),T(),Oe(e.cx("label")),T(),E("ngIf",e.showValue&&!e.contentTemplate&&!e._contentTemplate),T(),E("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",ki(14,wkt,e.value))}}function Ekt(t,n){if(t&1&&ce(0,"div"),t&2){let e=P();Oe(e.cn(e.cx("value"),e.valueStyleClass)),Ir("background",e.color),Ge("data-pc-section","value")}}var Dkt={root:({instance:t})=>["p-progressbar p-component",{"p-progressbar-determinate":t.mode=="determinate","p-progressbar-indeterminate":t.mode=="indeterminate"}],value:"p-progressbar-value",label:"p-progressbar-label"},VLe=(()=>{class t extends io{name="progressbar";theme=OK;classes=Dkt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var zLe=(()=>{class t extends oo{value;showValue=!0;styleClass;valueStyleClass;unit="%";mode="determinate";color;contentTemplate;_componentStyle=re(VLe);templates;_contentTemplate;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template}})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-progressBar"],["p-progressbar"],["p-progress-bar"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,xkt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.contentTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},hostVars:8,hostBindings:function(i,o){i&2&&(Ge("aria-valuemin",0)("aria-valuenow",o.value)("aria-valuemax",100)("data-pc-name","progressbar")("data-pc-section","root")("aria-level",o.value+o.unit),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{value:[2,"value","value",ln],showValue:[2,"showValue","showValue",je],styleClass:"styleClass",valueStyleClass:"valueStyleClass",unit:"unit",mode:"mode",color:"color"},features:[jt([VLe]),ft],decls:2,vars:2,consts:[[3,"class","width","display","background",4,"ngIf"],[3,"class","background",4,"ngIf"],[3,"display",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&ee(0,Ikt,4,16,"div",0)(1,Ekt,1,5,"div",1),i&2&&(E("ngIf",o.mode==="determinate"),T(),E("ngIf",o.mode==="indeterminate"))},dependencies:[On,Fr,Lo,In],encapsulation:2,changeDetection:0})}return t})();var ULe=` .p-fileupload input[type='file'] { display: none; } .p-fileupload-advanced { border: 1px solid dt('fileupload.border.color'); border-radius: dt('fileupload.border.radius'); background: dt('fileupload.background'); color: dt('fileupload.color'); } .p-fileupload-header { display: flex; align-items: center; padding: dt('fileupload.header.padding'); background: dt('fileupload.header.background'); color: dt('fileupload.header.color'); border-style: solid; border-width: dt('fileupload.header.border.width'); border-color: dt('fileupload.header.border.color'); border-radius: dt('fileupload.header.border.radius'); gap: dt('fileupload.header.gap'); } .p-fileupload-content { border: 1px solid transparent; display: flex; flex-direction: column; gap: dt('fileupload.content.gap'); transition: border-color dt('fileupload.transition.duration'); padding: dt('fileupload.content.padding'); } .p-fileupload-content .p-progressbar { width: 100%; height: dt('fileupload.progressbar.height'); } .p-fileupload-file-list { display: flex; flex-direction: column; gap: dt('fileupload.filelist.gap'); } .p-fileupload-file { display: flex; flex-wrap: wrap; align-items: center; padding: dt('fileupload.file.padding'); border-block-end: 1px solid dt('fileupload.file.border.color'); gap: dt('fileupload.file.gap'); } .p-fileupload-file:last-child { border-block-end: 0; } .p-fileupload-file-info { display: flex; flex-direction: column; gap: dt('fileupload.file.info.gap'); } .p-fileupload-file-thumbnail { flex-shrink: 0; } .p-fileupload-file-actions { margin-inline-start: auto; } .p-fileupload-highlight { border: 1px dashed dt('fileupload.content.highlight.border.color'); } .p-fileupload-basic .p-message { margin-block-end: dt('fileupload.basic.gap'); } .p-fileupload-basic-content { display: flex; flex-wrap: wrap; align-items: center; gap: dt('fileupload.basic.gap'); } `;var Akt=["pFileContent",""],kkt=(t,n,e)=>({class:t,file:n,index:e}),Mkt=(t,n)=>(n==null?null:n.name)+"-"+t;function Okt(t,n){}function Rkt(t,n){t&1&&ee(0,Okt,0,0,"ng-template")}function Fkt(t,n){if(t&1&&ee(0,Rkt,1,0,null,6),t&2){let e=P().class,i=P(),o=i.$implicit,r=i.$index,s=P();E("ngTemplateOutlet",s.fileRemoveIconTemplate())("ngTemplateOutletContext",$d(2,kkt,e,o,r))}}function Pkt(t,n){if(t&1&&(si(),ce(0,"svg",7)),t&2){let e=P().class;Oe(e),Ge("aria-hidden",!0)}}function Lkt(t,n){if(t&1&&qe(0,Fkt,1,6)(1,Pkt,1,3,":svg:svg",5),t&2){let e=P(2);Ke(e.fileRemoveIconTemplate()?0:1)}}function Nkt(t,n){if(t&1){let e=tt();k(0,"div"),ce(1,"img",2),k(2,"div")(3,"div"),Q(4),D(),k(5,"span"),Q(6),D()(),ce(7,"p-badge",3),k(8,"div")(9,"p-button",4),ie("onClick",function(o){let r=se(e).$index,s=P();return ae(s.onRemoveClick(o,r))}),ee(10,Lkt,2,1,"ng-template",null,0,Pt),D()()()}if(t&2){let e=n.$implicit,i=P();Oe(i.cx("file")),T(),Oe(i.cx("fileThumbnail")),E("src",e.objectURL,dc)("width",i.previewWidth()),Ge("alt",e.name),T(),Oe(i.cx("fileInfo")),T(),Oe(i.cx("fileName")),T(),dt(e.name),T(),Oe(i.cx("fileSize")),T(),dt(i.formatSize(e.size)),T(),Oe(i.cx("pcFileBadge")),E("value",i.badgeValue())("severity",i.badgeSeverity()),T(),Oe(i.cx("fileActions")),T(),E("styleClass",i.cx("pcFileRemoveButton"))}}var Bkt=["file"],Vkt=["header"],HLe=["content"],zkt=["toolbar"],Ukt=["chooseicon"],Hkt=["filelabel"],jkt=["uploadicon"],Gkt=["cancelicon"],$kt=["empty"],qkt=["advancedfileinput"],Kkt=["basicfileinput"],Wkt=(t,n,e,i,o)=>({$implicit:t,uploadedFiles:n,chooseCallback:e,clearCallback:i,uploadCallback:o}),Ykt=(t,n,e,i,o,r,s,d)=>({$implicit:t,uploadedFiles:n,chooseCallback:e,clearCallback:i,removeUploadedFileCallback:o,removeFileCallback:r,progress:s,messages:d}),Qkt=t=>({$implicit:t});function Zkt(t,n){if(t&1&&ce(0,"span"),t&2){let e=P(4);Oe(e.chooseIcon),Ge("aria-label",!0)("data-pc-section","chooseicon")}}function Xkt(t,n){t&1&&(si(),ce(0,"svg",15)),t&2&&Ge("aria-label",!0)("data-pc-section","chooseicon")}function Jkt(t,n){}function e2t(t,n){t&1&&ee(0,Jkt,0,0,"ng-template")}function t2t(t,n){if(t&1&&(k(0,"span"),ee(1,e2t,1,0,null,10),D()),t&2){let e=P(5);Ge("aria-label",!0)("data-pc-section","chooseicon"),T(),E("ngTemplateOutlet",e.chooseIconTemplate||e._chooseIconTemplate)}}function i2t(t,n){if(t&1&&(Di(0),ee(1,Xkt,1,2,"svg",14)(2,t2t,2,3,"span",8),Ai()),t&2){let e=P(4);T(),E("ngIf",!e.chooseIconTemplate&&!e._chooseIconTemplate),T(),E("ngIf",e.chooseIconTemplate||e._chooseIconTemplate)}}function n2t(t,n){if(t&1&&ee(0,Zkt,1,4,"span",5)(1,i2t,3,2,"ng-container",8),t&2){let e=P(3);E("ngIf",e.chooseIcon),T(),E("ngIf",!e.chooseIcon)}}function o2t(t,n){if(t&1&&ce(0,"span",18),t&2){let e=P(5);E("ngClass",e.uploadIcon),Ge("aria-hidden",!0)}}function r2t(t,n){t&1&&(si(),ce(0,"svg",20))}function s2t(t,n){}function a2t(t,n){t&1&&ee(0,s2t,0,0,"ng-template")}function l2t(t,n){if(t&1&&(k(0,"span"),ee(1,a2t,1,0,null,10),D()),t&2){let e=P(6);Ge("aria-hidden",!0),T(),E("ngTemplateOutlet",e.uploadIconTemplate||e._uploadIconTemplate)}}function c2t(t,n){if(t&1&&(Di(0),ee(1,r2t,1,0,"svg",19)(2,l2t,2,2,"span",8),Ai()),t&2){let e=P(5);T(),E("ngIf",!e.uploadIconTemplate&&!e._uploadIconTemplate),T(),E("ngIf",e.uploadIconTemplate||e._uploadIconTemplate)}}function d2t(t,n){if(t&1&&ee(0,o2t,1,2,"span",17)(1,c2t,3,2,"ng-container",8),t&2){let e=P(4);E("ngIf",e.uploadIcon),T(),E("ngIf",!e.uploadIcon)}}function u2t(t,n){if(t&1){let e=tt();k(0,"p-button",16),ie("onClick",function(){se(e);let o=P(3);return ae(o.upload())}),ee(1,d2t,2,2,"ng-template",null,2,Pt),D()}if(t&2){let e=P(3);E("label",e.uploadButtonLabel)("disabled",!e.hasFiles()||e.isFileLimitExceeded())("styleClass",e.cn(e.cx("pcUploadButton"),e.uploadStyleClass))("buttonProps",e.uploadButtonProps)}}function p2t(t,n){if(t&1&&ce(0,"span",18),t&2){let e=P(5);E("ngClass",e.cancelIcon)}}function h2t(t,n){t&1&&(si(),ce(0,"svg",22)),t&2&&Ge("aria-hidden",!0)}function m2t(t,n){}function f2t(t,n){t&1&&ee(0,m2t,0,0,"ng-template")}function g2t(t,n){if(t&1&&(k(0,"span"),ee(1,f2t,1,0,null,10),D()),t&2){let e=P(6);Ge("aria-hidden",!0),T(),E("ngTemplateOutlet",e.cancelIconTemplate||e._cancelIconTemplate)}}function _2t(t,n){if(t&1&&(Di(0),ee(1,h2t,1,1,"svg",21)(2,g2t,2,2,"span",8),Ai()),t&2){let e=P(5);T(),E("ngIf",!e.cancelIconTemplate&&!e._cancelIconTemplate),T(),E("ngIf",e.cancelIconTemplate||e._cancelIconTemplate)}}function y2t(t,n){if(t&1&&ee(0,p2t,1,1,"span",17)(1,_2t,3,2,"ng-container",8),t&2){let e=P(4);E("ngIf",e.cancelIcon),T(),E("ngIf",!e.cancelIcon)}}function v2t(t,n){if(t&1){let e=tt();k(0,"p-button",16),ie("onClick",function(){se(e);let o=P(3);return ae(o.clear())}),ee(1,y2t,2,2,"ng-template",null,2,Pt),D()}if(t&2){let e=P(3);E("label",e.cancelButtonLabel)("disabled",!e.hasFiles()||e.uploading)("styleClass",e.cn(e.cx("pcCancelButton"),e.cancelStyleClass))("buttonProps",e.cancelButtonProps)}}function b2t(t,n){if(t&1){let e=tt();Di(0),k(1,"p-button",12),ie("focus",function(){se(e);let o=P(2);return ae(o.onFocus())})("blur",function(){se(e);let o=P(2);return ae(o.onBlur())})("onClick",function(){se(e);let o=P(2);return ae(o.choose())})("keydown.enter",function(){se(e);let o=P(2);return ae(o.choose())}),k(2,"input",7,0),ie("change",function(o){se(e);let r=P(2);return ae(r.onFileSelect(o))}),D(),ee(4,n2t,2,2,"ng-template",null,2,Pt),D(),ee(6,u2t,3,4,"p-button",13)(7,v2t,3,4,"p-button",13),Ai()}if(t&2){let e=P(2);T(),E("styleClass",e.cn(e.cx("pcChooseButton"),e.chooseStyleClass))("disabled",e.disabled||e.isChooseDisabled())("label",e.chooseButtonLabel)("buttonProps",e.chooseButtonProps),Ge("data-pc-section","choosebutton"),T(),E("multiple",e.multiple)("accept",e.accept)("disabled",e.disabled||e.isChooseDisabled()),Ge("aria-label",e.browseFilesLabel)("title","")("data-pc-section","input"),T(4),E("ngIf",!e.auto&&e.showUploadButton),T(),E("ngIf",!e.auto&&e.showCancelButton)}}function C2t(t,n){t&1&&ui(0)}function x2t(t,n){t&1&&ui(0)}function w2t(t,n){t&1&&ui(0)}function S2t(t,n){if(t&1&&ee(0,w2t,1,0,"ng-container",9),t&2){let e=P(2);E("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",rne(2,Ykt,e.files,e.uploadedFiles,e.choose.bind(e),e.clear.bind(e),e.removeUploadedFile.bind(e),e.remove.bind(e),e.progress,e.msgs))}}function T2t(t,n){if(t&1&&ce(0,"p-progressbar",26),t&2){let e=P(3);E("value",e.progress)("showValue",!1)}}function I2t(t,n){if(t&1&&ce(0,"p-message",24),t&2){let e=n.$implicit;E("severity",e.severity)("text",e.text)}}function E2t(t,n){}function D2t(t,n){if(t&1){let e=tt();k(0,"div",29),ie("onRemove",function(o){se(e);let r=P(4);return ae(r.onRemoveClick(o))}),D()}if(t&2){let e=P(4);E("files",e.files)("badgeValue",e.pendingLabel)("previewWidth",e.previewWidth)("fileRemoveIconTemplate",e.cancelIconTemplate||e._cancelIconTemplate)}}function A2t(t,n){if(t&1&&(k(0,"div"),ee(1,E2t,0,0,"ng-template",27),qe(2,D2t,1,4,"div",28),D()),t&2){let e=P(3);Oe(e.cx("fileList")),T(),E("ngForOf",e.files)("ngForTemplate",e.fileTemplate||e._fileTemplate),T(),Ke(!e.fileTemplate&&!e._fileTemplate?2:-1)}}function k2t(t,n){}function M2t(t,n){if(t&1){let e=tt();k(0,"div",31),ie("onRemove",function(o){se(e);let r=P(4);return ae(r.onRemoveUploadedFileClick(o))}),D()}if(t&2){let e=P(4);E("files",e.uploadedFiles)("badgeValue",e.completedLabel())("previewWidth",e.previewWidth)("fileRemoveIconTemplate",e.cancelIconTemplate||e._cancelIconTemplate)}}function O2t(t,n){if(t&1&&(k(0,"div"),ee(1,k2t,0,0,"ng-template",27),qe(2,M2t,1,4,"div",30),D()),t&2){let e=P(3);Oe(e.cx("fileList")),T(),E("ngForOf",e.uploadedFiles)("ngForTemplate",e.fileTemplate||e._fileTemplate),T(),Ke(!e.fileTemplate&&!e._fileTemplate?2:-1)}}function R2t(t,n){if(t&1&&(ee(0,T2t,1,2,"p-progressbar",23),lo(1,I2t,1,2,"p-message",24,jo),qe(3,A2t,3,5,"div",25),qe(4,O2t,3,5,"div",25)),t&2){let e=P(2);E("ngIf",e.hasFiles()),T(),co(e.msgs),T(2),Ke(e.hasFiles()?3:-1),T(),Ke(e.hasUploadedFiles()?4:-1)}}function F2t(t,n){t&1&&ui(0)}function P2t(t,n){if(t&1&&ee(0,F2t,1,0,"ng-container",10),t&2){let e=P(2);E("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function L2t(t,n){if(t&1){let e=tt();k(0,"div",6)(1,"input",7,0),ie("change",function(o){se(e);let r=P();return ae(r.onFileSelect(o))}),D(),k(3,"div"),ee(4,b2t,8,13,"ng-container",8)(5,C2t,1,0,"ng-container",9)(6,x2t,1,0,"ng-container",10),D(),k(7,"div",11,1),ie("dragenter",function(o){se(e);let r=P();return ae(r.onDragEnter(o))})("dragleave",function(o){se(e);let r=P();return ae(r.onDragLeave(o))})("drop",function(o){se(e);let r=P();return ae(r.onDrop(o))}),qe(9,S2t,1,11,"ng-container")(10,R2t,5,3),qe(11,P2t,1,1,"ng-container"),D()()}if(t&2){let e=P();Oe(e.cn(e.cx("root"),e.styleClass)),E("ngStyle",e.style),Ge("data-pc-name","fileupload")("data-pc-section","root"),T(),Ir("display","none"),E("multiple",e.multiple)("accept",e.accept)("disabled",e.disabled||e.isChooseDisabled()),Ge("aria-label",e.browseFilesLabel)("title","")("data-pc-section","input"),T(2),Oe(e.cx("header")),T(),E("ngIf",!e.headerTemplate&&!e._headerTemplate),T(),E("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",FA(24,Wkt,e.files,e.uploadedFiles,e.choose.bind(e),e.clear.bind(e),e.upload.bind(e))),T(),E("ngTemplateOutlet",e.toolbarTemplate||e._toolbarTemplate),T(),Oe(e.cx("content")),Ge("data-pc-section","content"),T(2),Ke(e.contentTemplate||e._contentTemplate?9:10),T(2),Ke((e.emptyTemplate||e._emptyTemplate)&&!e.hasFiles()&&!e.hasUploadedFiles()?11:-1)}}function N2t(t,n){if(t&1&&ce(0,"p-message",24),t&2){let e=n.$implicit;E("severity",e.severity)("text",e.text)}}function B2t(t,n){if(t&1&&ce(0,"span",35),t&2){let e=P(4);E("ngClass",e.uploadIcon)}}function V2t(t,n){t&1&&(si(),ce(0,"svg",20)),t&2&&Oe("p-button-icon p-button-icon-left")}function z2t(t,n){}function U2t(t,n){t&1&&ee(0,z2t,0,0,"ng-template")}function H2t(t,n){if(t&1&&(k(0,"span",38),ee(1,U2t,1,0,null,10),D()),t&2){let e=P(5);T(),E("ngTemplateOutlet",e._uploadIconTemplate||e.uploadIconTemplate)}}function j2t(t,n){if(t&1&&(Di(0),ee(1,V2t,1,2,"svg",36)(2,H2t,2,1,"span",37),Ai()),t&2){let e=P(4);T(),E("ngIf",!e.uploadIconTemplate&&!e._uploadIconTemplate),T(),E("ngIf",e._uploadIconTemplate||e.uploadIconTemplate)}}function G2t(t,n){if(t&1&&ee(0,B2t,1,1,"span",34)(1,j2t,3,2,"ng-container",8),t&2){let e=P(3);E("ngIf",e.uploadIcon),T(),E("ngIf",!e.uploadIcon)}}function $2t(t,n){if(t&1&&ce(0,"span",40),t&2){let e=P(4);E("ngClass",e.chooseIcon)}}function q2t(t,n){t&1&&(si(),ce(0,"svg",15)),t&2&&Ge("data-pc-section","uploadicon")}function K2t(t,n){}function W2t(t,n){t&1&&ee(0,K2t,0,0,"ng-template")}function Y2t(t,n){if(t&1&&(Di(0),ee(1,q2t,1,1,"svg",14)(2,W2t,1,0,null,10),Ai()),t&2){let e=P(4);T(),E("ngIf",!e.chooseIconTemplate&&!e._chooseIconTemplate),T(),E("ngTemplateOutlet",e.chooseIconTemplate||e._chooseIconTemplate)}}function Q2t(t,n){if(t&1&&ee(0,$2t,1,1,"span",39)(1,Y2t,3,2,"ng-container",8),t&2){let e=P(3);E("ngIf",e.chooseIcon),T(),E("ngIf",!e.chooseIcon)}}function Z2t(t,n){if(t&1&&qe(0,G2t,2,2)(1,Q2t,2,2),t&2){let e=P(2);Ke(e.hasFiles()&&!e.auto?0:1)}}function X2t(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(3);T(),Qi(" ",e.basicFileChosenLabel()," ")}}function J2t(t,n){t&1&&ui(0)}function eMt(t,n){if(t&1&&ee(0,J2t,1,0,"ng-container",9),t&2){let e=P(3);E("ngTemplateOutlet",e.fileLabelTemplate||e._fileLabelTemplate)("ngTemplateOutletContext",ki(2,Qkt,e.files))}}function tMt(t,n){if(t&1&&qe(0,X2t,2,1,"span")(1,eMt,1,4,"ng-container"),t&2){let e=P(2);Ke(!e.fileLabelTemplate&&!e._fileLabelTemplate?0:1)}}function iMt(t,n){if(t&1){let e=tt();k(0,"div"),lo(1,N2t,1,2,"p-message",24,jo),k(3,"div")(4,"p-button",32),ie("onClick",function(){se(e);let o=P();return ae(o.onBasicUploaderClick())})("keydown",function(o){se(e);let r=P();return ae(r.onBasicKeydown(o))}),ee(5,Z2t,2,1,"ng-template",null,2,Pt),k(7,"input",33,3),ie("change",function(o){se(e);let r=P();return ae(r.onFileSelect(o))})("focus",function(){se(e);let o=P();return ae(o.onFocus())})("blur",function(){se(e);let o=P();return ae(o.onBlur())}),D()(),qe(9,tMt,2,1),D()()}if(t&2){let e=P();Oe(e.cn(e.cx("root"),e.styleClass)),Ge("data-pc-name","fileupload"),T(),co(e.msgs),T(2),Oe(e.cx("basicContent")),T(),$r(e.style),E("styleClass",e.cn(e.cx("pcChooseButton"),e.chooseStyleClass))("disabled",e.disabled)("label",e.chooseButtonLabel)("buttonProps",e.chooseButtonProps),T(3),E("accept",e.accept)("multiple",e.multiple)("disabled",e.disabled),Ge("aria-label",e.browseFilesLabel)("data-pc-section","input"),T(2),Ke(e.auto?-1:9)}}var nMt={root:({instance:t})=>`p-fileupload p-fileupload-${t.mode} p-component`,header:"p-fileupload-header",pcChooseButton:"p-fileupload-choose-button",pcUploadButton:"p-fileupload-upload-button",pcCancelButton:"p-fileupload-cancel-button",content:"p-fileupload-content",fileList:"p-fileupload-file-list",file:"p-fileupload-file",fileThumbnail:"p-fileupload-file-thumbnail",fileInfo:"p-fileupload-file-info",fileName:"p-fileupload-file-name",fileSize:"p-fileupload-file-size",pcFileBadge:"p-fileupload-file-badge",fileActions:"p-fileupload-file-actions",pcFileRemoveButton:"p-fileupload-file-remove-button",basicContent:"p-fileupload-basic-content"},bQ=(()=>{class t extends io{name="fileupload";theme=ULe;classes=nMt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var oMt=(()=>{class t extends oo{_componentStyle=re(bQ);onRemove=o1e();files=mo();badgeSeverity=mo("warn");badgeValue=mo();previewWidth=mo(50);fileRemoveIconTemplate=mo();onRemoveClick(e,i){this.onRemove.emit({event:e,index:i})}formatSize(e){let r=this.config.getTranslation(el.FILE_SIZE_TYPES);if(e===0)return`0 ${r[0]}`;let s=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,s)).toFixed(3)} ${r[s]}`}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["","pFileContent",""]],inputs:{files:[1,"files"],badgeSeverity:[1,"badgeSeverity"],badgeValue:[1,"badgeValue"],previewWidth:[1,"previewWidth"],fileRemoveIconTemplate:[1,"fileRemoveIconTemplate"]},outputs:{onRemove:"onRemove"},features:[jt([bQ]),ft],attrs:Akt,decls:2,vars:0,consts:[["icon",""],[3,"class"],["role","presentation",3,"src","width"],[3,"value","severity"],["text","","rounded","","severity","danger",3,"onClick","styleClass"],["data-p-icon","times",3,"class"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","times"]],template:function(i,o){i&1&&lo(0,Nkt,12,22,"div",1,Mkt),i&2&&co(o.files())},dependencies:[On,Lo,jw,ja,am],encapsulation:2,changeDetection:0})}return t})(),CQ=(()=>{class t extends oo{name;url;method="post";multiple;accept;disabled;auto;withCredentials;maxFileSize;invalidFileSizeMessageSummary="{0}: Invalid file size, ";invalidFileSizeMessageDetail="maximum upload size is {0}.";invalidFileTypeMessageSummary="{0}: Invalid file type, ";invalidFileTypeMessageDetail="allowed file types: {0}.";invalidFileLimitMessageDetail="limit is {0} at most.";invalidFileLimitMessageSummary="Maximum number of files exceeded, ";style;styleClass;previewWidth=50;chooseLabel;uploadLabel;cancelLabel;chooseIcon;uploadIcon;cancelIcon;showUploadButton=!0;showCancelButton=!0;mode="advanced";headers;customUpload;fileLimit;uploadStyleClass;cancelStyleClass;removeStyleClass;chooseStyleClass;chooseButtonProps;uploadButtonProps={severity:"secondary"};cancelButtonProps={severity:"secondary"};onBeforeUpload=new ve;onSend=new ve;onUpload=new ve;onError=new ve;onClear=new ve;onRemove=new ve;onSelect=new ve;onProgress=new ve;uploadHandler=new ve;onImageError=new ve;onRemoveUploadedFile=new ve;fileTemplate;headerTemplate;contentTemplate;toolbarTemplate;chooseIconTemplate;fileLabelTemplate;uploadIconTemplate;cancelIconTemplate;emptyTemplate;advancedFileInput;basicFileInput;content;set files(e){this._files=[];for(let i=0;i{this.cd.markForCheck()})}ngAfterViewInit(){super.ngAfterViewInit(),ps(this.platformId)&&this.mode==="advanced"&&this.zone.runOutsideAngular(()=>{this.content&&(this.dragOverListener=this.renderer.listen(this.content.nativeElement,"dragover",this.onDragOver.bind(this)))})}_headerTemplate;_contentTemplate;_toolbarTemplate;_chooseIconTemplate;_uploadIconTemplate;_cancelIconTemplate;_emptyTemplate;_fileTemplate;_fileLabelTemplate;templates;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"header":this._headerTemplate=e.template;break;case"file":this._fileTemplate=e.template;break;case"content":this._contentTemplate=e.template;break;case"toolbar":this._toolbarTemplate=e.template;break;case"chooseicon":this._chooseIconTemplate=e.template;break;case"uploadicon":this._uploadIconTemplate=e.template;break;case"cancelicon":this._cancelIconTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"filelabel":this._fileLabelTemplate=e.template;break;default:this._fileTemplate=e.template;break}})}basicFileChosenLabel(){return this.auto?this.chooseButtonLabel:this.hasFiles()?this.files&&this.files.length===1?this.files[0].name:this.config.getTranslation("fileChosenMessage")?.replace("{0}",this.files.length):this.config.getTranslation("noFileChosenMessage")||""}completedLabel(){return this.config.getTranslation("completed")||""}getTranslation(e){return this.config.getTranslation(e)}choose(){this.advancedFileInput?.nativeElement.click()}onFileSelect(e){if(e.type!=="drop"&&this.isIE11()&&this.duplicateIEEvent){this.duplicateIEEvent=!1;return}this.multiple||(this.files=[]),this.msgs=[],this.files=this.files||[];let i=e.dataTransfer?e.dataTransfer.files:e.target.files;for(let o=0;othis.maxFileSize){let i=`${this.invalidFileSizeMessageSummary.replace("{0}",e.name)} ${this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}`;return this.msgs.push({severity:"error",text:i}),!1}return!0}isFileTypeValid(e){let i=this.accept?.split(",").map(o=>o.trim());for(let o of i)if(this.isWildcard(o)?this.getTypeClass(e.type)===this.getTypeClass(o):e.type==o||this.getFileExtension(e).toLowerCase()===o.toLowerCase())return!0;return!1}getTypeClass(e){return e.substring(0,e.indexOf("/"))}isWildcard(e){return e.indexOf("*")!==-1}getFileExtension(e){return"."+e.name.split(".").pop()}isImage(e){return/^image\//.test(e.type)}onImageLoad(e){window.URL.revokeObjectURL(e.src)}uploader(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.uploadHandler.emit({files:this.files}),this.cd.markForCheck();else{this.uploading=!0,this.msgs=[];let e=new FormData;this.onBeforeUpload.emit({formData:e});for(let i=0;i{switch(i.type){case Dv.Sent:this.onSend.emit({originalEvent:i,formData:e});break;case Dv.Response:this.uploading=!1,this.progress=0,i.status>=200&&i.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:i,files:this.files})):this.onError.emit({files:this.files}),this.uploadedFiles=[...this.uploadedFiles,...this.files],this.clear();break;case Dv.UploadProgress:{i.loaded&&(this.progress=Math.round(i.loaded*100/i.total)),this.onProgress.emit({originalEvent:i,progress:this.progress});break}}this.cd.markForCheck()},i=>{this.uploading=!1,this.onError.emit({files:this.files,error:i})})}}onRemoveClick(e){let{event:i,index:o}=e;this.hasFiles()&&this.remove(i,o)}onRemoveUploadedFileClick(e){let{event:i,index:o}=e;this.hasUploadedFiles()&&this.removeUploadedFile(o)}clear(){this.files=[],this.onClear.emit(),this.clearInputElement(),this.msgs=[],this.cd.markForCheck()}remove(e,i){this.clearInputElement(),this.onRemove.emit({originalEvent:e,file:this.files[i]}),this.files.splice(i,1),this.checkFileLimit(this.files)}removeUploadedFile(e){let i=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=[...this.uploadedFiles],this.onRemoveUploadedFile.emit({file:i,files:this.uploadedFiles})}isFileLimitExceeded(){let i=this.auto?this.files.length:this.files.length+this.uploadedFileCount;return this.fileLimit&&this.fileLimit<=i&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit0&&this.fileLimit&&this.fileLimit!o.text.includes(this.invalidFileLimitMessageSummary))}clearInputElement(){this.advancedFileInput&&this.advancedFileInput.nativeElement&&(this.advancedFileInput.nativeElement.value=""),this.basicFileInput&&this.basicFileInput.nativeElement&&(this.basicFileInput.nativeElement.value="")}clearIEInput(){this.advancedFileInput&&this.advancedFileInput.nativeElement&&(this.duplicateIEEvent=!0,this.advancedFileInput.nativeElement.value="")}hasFiles(){return this.files&&this.files.length>0}hasUploadedFiles(){return this.uploadedFiles&&this.uploadedFiles.length>0}onDragEnter(e){this.disabled||(e.stopPropagation(),e.preventDefault())}onDragOver(e){this.disabled||(ac(this.content?.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,e.stopPropagation(),e.preventDefault())}onDragLeave(e){this.disabled||Fd(this.content?.nativeElement,"p-fileupload-highlight")}onDrop(e){if(!this.disabled){Fd(this.content?.nativeElement,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault();let i=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||i&&i.length===1)&&this.onFileSelect(e)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(e){let r=this.getTranslation(el.FILE_SIZE_TYPES);if(e===0)return`0 ${r[0]}`;let s=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,s)).toFixed(3)} ${r[s]}`}upload(){this.hasFiles()&&this.uploader()}onBasicUploaderClick(){this.basicFileInput?.nativeElement.click()}onBasicKeydown(e){switch(e.code){case"Space":case"Enter":this.onBasicUploaderClick(),e.preventDefault();break}}imageError(e){this.onImageError.emit(e)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(el.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(el.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(el.CANCEL)}get browseFilesLabel(){return this.config.getTranslation(el.ARIA)[el.BROWSE_FILES]}get pendingLabel(){return this.config.getTranslation(el.PENDING)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.dragOverListener&&(this.dragOverListener(),this.dragOverListener=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-fileupload"],["p-fileUpload"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Bkt,4),xt(r,Vkt,4),xt(r,HLe,4),xt(r,zkt,4),xt(r,Ukt,4),xt(r,Hkt,4),xt(r,jkt,4),xt(r,Gkt,4),xt(r,$kt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.fileTemplate=s.first),Le(s=Ne())&&(o.headerTemplate=s.first),Le(s=Ne())&&(o.contentTemplate=s.first),Le(s=Ne())&&(o.toolbarTemplate=s.first),Le(s=Ne())&&(o.chooseIconTemplate=s.first),Le(s=Ne())&&(o.fileLabelTemplate=s.first),Le(s=Ne())&&(o.uploadIconTemplate=s.first),Le(s=Ne())&&(o.cancelIconTemplate=s.first),Le(s=Ne())&&(o.emptyTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(qkt,5),Ri(Kkt,5),Ri(HLe,5)),i&2){let r;Le(r=Ne())&&(o.advancedFileInput=r.first),Le(r=Ne())&&(o.basicFileInput=r.first),Le(r=Ne())&&(o.content=r.first)}},inputs:{name:"name",url:"url",method:"method",multiple:[2,"multiple","multiple",je],accept:"accept",disabled:[2,"disabled","disabled",je],auto:[2,"auto","auto",je],withCredentials:[2,"withCredentials","withCredentials",je],maxFileSize:[2,"maxFileSize","maxFileSize",ln],invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:[2,"previewWidth","previewWidth",ln],chooseLabel:"chooseLabel",uploadLabel:"uploadLabel",cancelLabel:"cancelLabel",chooseIcon:"chooseIcon",uploadIcon:"uploadIcon",cancelIcon:"cancelIcon",showUploadButton:[2,"showUploadButton","showUploadButton",je],showCancelButton:[2,"showCancelButton","showCancelButton",je],mode:"mode",headers:"headers",customUpload:[2,"customUpload","customUpload",je],fileLimit:[2,"fileLimit","fileLimit",e=>ln(e,null)],uploadStyleClass:"uploadStyleClass",cancelStyleClass:"cancelStyleClass",removeStyleClass:"removeStyleClass",chooseStyleClass:"chooseStyleClass",chooseButtonProps:"chooseButtonProps",uploadButtonProps:"uploadButtonProps",cancelButtonProps:"cancelButtonProps",files:"files"},outputs:{onBeforeUpload:"onBeforeUpload",onSend:"onSend",onUpload:"onUpload",onError:"onError",onClear:"onClear",onRemove:"onRemove",onSelect:"onSelect",onProgress:"onProgress",uploadHandler:"uploadHandler",onImageError:"onImageError",onRemoveUploadedFile:"onRemoveUploadedFile"},features:[jt([bQ]),ft],decls:2,vars:2,consts:[["advancedfileinput",""],["content",""],["icon",""],["basicfileinput",""],[3,"class","ngStyle",4,"ngIf"],[3,"class",4,"ngIf"],[3,"ngStyle"],["type","file",3,"change","multiple","accept","disabled"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],[3,"dragenter","dragleave","drop"],[3,"focus","blur","onClick","keydown.enter","styleClass","disabled","label","buttonProps"],[3,"label","disabled","styleClass","buttonProps","onClick",4,"ngIf"],["data-p-icon","plus",4,"ngIf"],["data-p-icon","plus"],[3,"onClick","label","disabled","styleClass","buttonProps"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-p-icon","upload",4,"ngIf"],["data-p-icon","upload"],["data-p-icon","times",4,"ngIf"],["data-p-icon","times"],[3,"value","showValue",4,"ngIf"],[3,"severity","text"],[3,"class"],[3,"value","showValue"],["ngFor","",3,"ngForOf","ngForTemplate"],["pFileContent","",3,"files","badgeValue","previewWidth","fileRemoveIconTemplate"],["pFileContent","",3,"onRemove","files","badgeValue","previewWidth","fileRemoveIconTemplate"],["pFileContent","","badgeSeverity","success",3,"files","badgeValue","previewWidth","fileRemoveIconTemplate"],["pFileContent","","badgeSeverity","success",3,"onRemove","files","badgeValue","previewWidth","fileRemoveIconTemplate"],[3,"onClick","keydown","styleClass","disabled","label","buttonProps"],["type","file",3,"change","focus","blur","accept","multiple","disabled"],["class","p-button-icon p-button-icon-left",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left",3,"ngClass"],["data-p-icon","upload",3,"class",4,"ngIf"],["class","p-button-icon p-button-icon-left",4,"ngIf"],[1,"p-button-icon","p-button-icon-left"],["class","p-button-icon p-button-icon-left pi",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left","pi",3,"ngClass"]],template:function(i,o){i&1&&ee(0,L2t,12,30,"div",4)(1,iMt,10,17,"div",5),i&2&&(E("ngIf",o.mode==="advanced"),T(),E("ngIf",o.mode==="basic"))},dependencies:[On,Ns,Gc,Fr,Lo,vs,ja,zLe,vS,UK,lke,am,In,oMt],encapsulation:2,changeDetection:0})}return t})();function rMt(t,n){if(t&1){let e=tt();k(0,"div")(1,"p-fileupload",1),ie("onSelect",function(o){se(e);let r=P();return ae(r.onFileSelect(o))}),D()()}if(t&2){let e=P();T(),E("accept",e.config.accept)("auto",!0)}}function sMt(t,n){if(t&1){let e=tt();k(0,"div",0)(1,"div",2)(2,"span",3),Q(3),D()(),k(4,"div",4)(5,"button",5),ie("click",function(){se(e);let o=P();return ae(o.onFileRemove())}),k(6,"mat-icon"),Q(7,"delete"),D()()()()}if(t&2){let e=P();T(3),dt(e.file.name)}}var jLe=(()=>{class t{constructor(){this.config=PLe,this.disabled=!1,this.fileChange=new ve}onFileSelect(e){let i=e.files;i.length>0&&this._setFile(i[0])}onFileRemove(){this._setFile(null)}_setFile(e){this.file=e,this.fileChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-ui-file-input"]],inputs:{file:"file",config:"config",disabled:"disabled"},outputs:{fileChange:"fileChange"},decls:2,vars:1,consts:()=>{let e;return e=$localize`Auswählen`,[[1,"flex","flex-row","gap-6","file-info"],["mode","basic","name","file-select","chooseIcon","pi pi-upload","chooseLabel",e,3,"onSelect","accept","auto"],[1,"flex-1"],[1,"filename","mat-body-2"],[1,"basis-10"],["mat-icon-button","","color","accent",3,"click"]]},template:function(i,o){i&1&&qe(0,rMt,2,2,"div")(1,sMt,8,1,"div",0),i&2&&Ke(o.file?1:0)},dependencies:[Tn,xl,$o,mr,CQ],styles:[".filename[_ngcontent-%COMP%]{line-height:40px;font-weight:700}.file-info[_ngcontent-%COMP%]{background-color:#f5f5f5;border:1px solid #ddd;border-radius:4px;padding:8px 12px;align-items:center}"]})}}return t})();var MU=(()=>{class t{constructor(){this.labels=[],this.labelsChange=new ve,this.inputControl=new yr([]),this.suggestions=[],this.inputControl.valueChanges.subscribe(e=>this.labelsChange.emit(e))}ngOnInit(){this.labels&&this.inputControl.patchValue(this.labels)}ngOnChanges(e){e.labelOptions&&e.labelOptions.currentValue&&(this.suggestions=[...this.labelOptions])}onCompleteMethod(e){let i=[...this.labelOptions??[]];e.query.length===0?this.suggestions=[...i]:this.suggestions=[e.query,...i.filter(o=>o.toLowerCase().includes(e.query.toLowerCase()))]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-ui-labels-input"]],inputs:{labels:"labels",labelOptions:"labelOptions"},outputs:{labelsChange:"labelsChange"},features:[Ot],decls:4,vars:3,consts:[["multiple","","fluid","","variant","filled","inputId","labels-input",3,"completeMethod","formControl","suggestions","typeahead"],["for","labels-input"]],template:function(i,o){i&1&&(k(0,"p-iftalabel")(1,"p-autoComplete",0),ie("completeMethod",function(s){return o.onCompleteMethod(s)}),D(),k(2,"label",1),Q(3,"Labels"),D()()),i&2&&(T(),E("formControl",o.inputControl)("suggestions",o.suggestions)("typeahead",!0))},dependencies:[xr,no,zl,Th,as],encapsulation:2})}}return t})();var GLe=(()=>{class t{constructor(){this.formChange=new ve,this.fileInputConfig={accept:"*"}}onFileSelect(e){this.form.file=e,this.formChange.emit(this.form)}onLabelsChange(e){this.form.labels=e,this.formChange.emit(this.form)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-user-files-new-dialog-form"]],inputs:{form:"form"},outputs:{formChange:"formChange"},decls:12,vars:2,consts:[[1,"form-part"],[1,"mat-subtitle-1"],[3,"fileChange","config"],[3,"labelsChange","labels"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div")(2,"span",1),Q(3,"Datei Auswahl"),D()(),k(4,"div")(5,"bd-ui-file-input",2),ie("fileChange",function(s){return o.onFileSelect(s)}),D()()(),k(6,"div",0)(7,"div")(8,"span",1),Q(9,"Datei Labels"),D()(),k(10,"div")(11,"bd-ui-labels-input",3),ie("labelsChange",function(s){return o.onLabelsChange(s)}),D()()()),i&2&&(T(5),E("config",o.fileInputConfig),T(6),E("labels",o.form.labels))},dependencies:[jLe,MU],styles:[".form-part[_ngcontent-%COMP%]{margin:24px 0}"]})}}return t})();var xQ=class{constructor(n){this._baseUrl=n}crud(){return`${this._baseUrl}/`}};var Lx=class extends b0{constructor(n,e,i,o){super(n,e,i),this._httpClient=o,this._api=new xQ(this.getBaseUrl())}availableLabels(){let n=`${this._api.crud()}files/labels/available`;return this._httpClient.get(n)}create(n,e){throw new Error("Method not implemented.")}upload(n,e){let i=`${this._api.crud()}files/create`,o=new FormData;if(e){let r=new Pr({fromObject:{labels:e}});i=i.concat("?").concat(r.toString())}return o.append("file",n),this._httpClient.post(i,o)}downloadFile(n){let e=`${this._api.crud()}files/${n}/download`;return this._httpClient.get(e,{responseType:"blob"})}findAll(n,e,i=new BE){let o=`${this._api.crud()}files/`;return this._httpClient.post(o,{condition:i})}findById(n){let e=`${this._api.crud()}files/${n}`;return this._httpClient.get(e)}update(n,e,i=null){let o=`${this._api.crud()}files/${n.id}/update`;return this._httpClient.put(o,{labels:i}).pipe(Mn(()=>cu))}};function aMt(t,n){if(t&1){let e=tt();k(0,"bd-user-files-new-dialog-form",7),ie("formChange",function(o){se(e);let r=P();return ae(r.onFormChange(o))}),D()}if(t&2){let e=P();E("form",e.form)}}var $Le=(()=>{class t{constructor(e,i){this._dialogRef=e,this._fileService=i,this.upload$=new hi,this.form={file:null,labels:[]},this.isValid=!1}onFormChange(e){this.form=e,this.isValid=!!this.form&&!!this.form.file}upload(){this.upload$.next(Gt.LOADING),this._fileService.upload(this.form.file,this.form.labels).subscribe(e=>{this.upload$.next(Gt.SUCCESS),this._dialogRef.close(e)})}static{this.\u0275fac=function(i){return new(i||t)(_e(oy),_e(Lx))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-user-files-new-dialog"]],decls:13,vars:5,consts:[["initTpl",""],["mat-dialog-title",""],["mat-dialog-content",""],[3,"initTemplate","loadItem"],["mat-dialog-actions","",3,"align"],["mat-button","",3,"mat-dialog-close"],["mat-raised-button","","color","accent",3,"click","disabled"],[3,"formChange","form"]],template:function(i,o){if(i&1){let r=tt();k(0,"div")(1,"span",1),Q(2,"Datei hochladen"),D()(),k(3,"div",2),ce(4,"bd-loader",3),D(),k(5,"div",4)(6,"button",5),Q(7,"Abbrechen"),D(),Di(8),k(9,"button",6),ie("click",function(){return se(r),ae(o.upload())}),Q(10," Hochladen "),D(),Ai(),D(),ee(11,aMt,1,1,"ng-template",null,0,Pt)}if(i&2){let r=ti(12);T(4),E("initTemplate",r)("loadItem",o.upload$),T(),E("align","end"),T(),E("mat-dialog-close",null),T(3),E("disabled",!o.isValid)}},dependencies:[Aw,Hv,Kn,jv,Tn,yo,Dw,GLe],encapsulation:2})}}return t})();var qLe=(()=>{class t{constructor(e,i){this._dialog=e,this._responsiveDialogService=i,this.created=new ve}openNewDialog(){let e=this._responsiveDialogService.config();this._dialog.open($Le,e).afterClosed().pipe(Sn(1),wn(i=>!!i)).subscribe(i=>{this.created.emit(i)})}static{this.\u0275fac=function(i){return new(i||t)(_e(Yg),_e(kw))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-user-downloads-new"]],outputs:{created:"created"},decls:2,vars:0,consts:[["mat-raised-button","","color","accent",3,"click"]],template:function(i,o){i&1&&(k(0,"button",0),ie("click",function(){return o.openNewDialog()}),Q(1," Neue Datei hochladen "),D())},dependencies:[Tn,yo],encapsulation:2})}}return t})();function lMt(t,n){if(t&1&&ce(0,"bd-resources-list",6),t&2){let e=P(2);E("resources",e.files)("options",e.listOptions)}}function cMt(t,n){t&1&&ce(0,"bd-message-empty",7)}function dMt(t,n){if(t&1&&(k(0,"div",2),qe(1,lMt,1,2,"bd-resources-list",6),qe(2,cMt,1,0,"bd-message-empty",7),D()),t&2){let e=P();T(),Ke((e.files==null?null:e.files.length)>0?1:-1),T(),Ke((e.files==null?null:e.files.length)===0?2:-1)}}var KLe=(()=>{class t{constructor(e,i){this._userFilesService=e,this._environmentService=i,this.loading$=new pi(1),this.listOptions=mt(be({},GL),{detailLinkFnc:o=>["/user","files",o.id],showLabelsColumn:!0}),this.p21ImportUrl=this._environmentService.load("AYS_VIRTUAL_CLINIC_P21_IMPORT_APP")+"/new"}ngOnInit(){this._fetchFiles()}onFileCreated(e){this.files=[e,...this.files]}_fetchFiles(){this.loading$.next(Gt.LOADING),this._userFilesService.findAll(null,null).subscribe(e=>{this.files=e,this.loading$.next(Gt.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(_e(Lx),_e(qr))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:11,vars:3,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[1,"bd-container"],[1,"flex","flex-row-reverse","gap-6"],[3,"created"],["mat-raised-button","","color","accent","target","_blank",3,"href"],[3,"resources","options"],["message","Keine Dateien gefunden"]],template:function(i,o){if(i&1){let r=tt();k(0,"bd-toolbar")(1,"span"),Q(2,"File-Center"),D()(),ce(3,"bd-loader",1),k(4,"div",2)(5,"div",3)(6,"bd-user-downloads-new",4),ie("created",function(d){return se(r),ae(o.onFileCreated(d))}),D(),k(7,"a",5),Q(8," Struktur- und Leistungsdaten hochladen "),D()()(),ee(9,dMt,3,2,"ng-template",null,0,Pt)}if(i&2){let r=ti(10);T(3),E("loadItem",o.loading$)("successTemplate",r),T(4),E("href",o.p21ImportUrl,dc)}},dependencies:[Ga,Kn,qLe,P2,Rl,Tn,yo],encapsulation:2})}}return t})();var ZLe=Ap(CU());var wQ=class{constructor(n){this._environmentService=n}base(){return this._environmentService.load("BD_PERMISSION_RESOURCE_URL")}findAllPermissions(){return`${this.base()}/features/`}};var OU=(()=>{class t{constructor(e,i,o){this._httpClient=e,this._environmentService=i,this._authService=o,this._featurePermissionSessionStorageKey="bd.config.BD_FEATURE_PERMISSIONS",this._store=new wQ(this._environmentService),this._authService.accountInfo$.subscribe(()=>this._clearPermissions())}getPermissions(e=!1){let i=sessionStorage.getItem(this._featurePermissionSessionStorageKey);return i&&!e?ci(JSON.parse(i)):(this._currentlyFetching||(this._clearPermissions(),this._currentlyFetching=this._fetchAllPermissions().pipe(Vo(o=>this._storePermissions(o)),du(1))),this._currentlyFetching)}containsPermission(e){return this._fetchAllPermissionsAndCheck(e)}_fetchAllPermissionsAndCheck(e){return this.getPermissions().pipe(vt(i=>e.every(o=>i.indexOf(o)!==-1)))}_fetchAllPermissions(){let e=this._store.findAllPermissions();return this._httpClient.get(e)}_storePermissions(e){return sessionStorage.setItem(this._featurePermissionSessionStorageKey,JSON.stringify(e)),e}_clearPermissions(){sessionStorage.removeItem(this._featurePermissionSessionStorageKey)}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr),di(vp))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var SQ=class{constructor(n){this._environmentService=n}base(){return this._environmentService.load("BD_PERMISSION_RESOURCE_URL")}archive(n,e){return`${this.base()}/archive/${n}/${e}`}sharedResourceWithPermission(n,e,i){return`${this.base()}/shared/${n}/${e}/${i}`}sharedResources(n){return`${this.base()}/shared/${n}`}};var pM=(()=>{class t{constructor(e,i){this._httpClient=e,this._environmentService=i,this._cache={},this._store=new SQ(this._environmentService)}hasPermission(e,i,o){let r=this._getKey(i,e,o),s=this._cache[r];if(!s){let d=this._store.sharedResourceWithPermission(e,i,o);s=this._httpClient.get(d).toPromise().then(()=>!0).catch(()=>!1),this._cache[r]=s}return s}archive(e,i){let o=this._store.archive(e,i);return this._httpClient.delete(o)}sharedResources(e,i="READ",o="CREATOR"){let r=this._store.sharedResources(e),s=new Pr;return s=s.set("minPermission",i),s=s.set("maxPermission",o),this._httpClient.get(r,{params:s})}_getKey(e,i,o){return`${e}_${i}_${o}`}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var bMt=()=>["/user","files"];function CMt(t,n){if(t&1&&(k(0,"span",5),Q(1),Xn(2,"date"),D()),t&2){let e=P();T(),dt(Ls(2,1,e.userFile.createdDate,"short"))}}function xMt(t,n){if(t&1&&ce(0,"p-chip",10),t&2){let e=n.$implicit;E("label",e)}}function wMt(t,n){if(t&1&&(k(0,"div",9),lo(1,xMt,1,1,"p-chip",10,jo),D()),t&2){let e=P(2);T(),co(e.userFile.labels)}}function SMt(t,n){if(t&1&&(k(0,"div",3)(1,"div",4)(2,"span",5),Q(3,"Labels:"),D()(),k(4,"div",0),qe(5,wMt,3,0,"div",9),D()()),t&2){let e=P();T(5),Ke(e.userFile.labels?5:-1)}}var XLe=(()=>{class t{constructor(e,i,o,r){this._activatedRoute=e,this._fileService=i,this._permissionService=o,this._router=r,this.resourceInfoMenuConfig={showDeleteButton:!0,showEditButton:!1},this._activatedRoute.params.pipe(wn(s=>!!s.fileId),Mn(s=>this._fileService.findById(s.fileId))).subscribe(s=>{this.userFile=s})}delete(){this._permissionService.archive(ko.FILE,this.userFile.id).pipe(Sn(1)).subscribe(()=>{this._router.navigate(["/user","files"])})}downloadFile(){this._fileService.downloadFile(this.userFile.id).subscribe(e=>{ZLe.saveAs(e,this.userFile.name)})}static{this.\u0275fac=function(i){return new(i||t)(_e(vl),_e(Lx),_e(pM),_e(dl))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-user-file-details"]],decls:18,vars:8,consts:[[1,"flex-1"],[3,"deleteResource","resource","config"],[1,"bd-container-inner"],[1,"flex","flex-row"],[1,"basis-1/5"],[1,"mat-body-1"],[1,"flex","flex-row-reverse","gap-6"],["mat-raised-button","","color","accent",3,"click","disabled"],["mat-button","",3,"routerLink"],[1,"card","flex","items-center","gap-2","flex-wrap"],[3,"label"]],template:function(i,o){i&1&&(k(0,"bd-toolbar")(1,"span",0),Q(2),D(),k(3,"bd-resources-info-menu",1),ie("deleteResource",function(){return o.delete()}),D()(),k(4,"div",2)(5,"div",3)(6,"div",4)(7,"span",5),Q(8,"Erstellt:"),D()(),k(9,"div",0),qe(10,CMt,3,4,"span",5),D()(),qe(11,SMt,6,1,"div",3),ce(12,"mat-divider"),k(13,"div",6)(14,"button",7),ie("click",function(){return o.downloadFile()}),Q(15," Herunterladen "),D(),k(16,"a",8),Q(17,"Zur \xDCbersicht"),D()()()),i&2&&(T(2),dt(o.userFile==null?null:o.userFile.name),T(),E("resource",o.userFile)("config",o.resourceInfoMenuConfig),T(7),Ke(o.userFile?10:-1),T(),Ke(o.userFile!=null&&o.userFile.labels?11:-1),T(3),E("disabled",!o.userFile),T(2),E("routerLink",uo(7,bMt)))},dependencies:[Ga,jL,il,Gl,Tn,yo,Bs,QP,qf],styles:["mat-divider[_ngcontent-%COMP%]{margin:24px 0}"]})}}return t})();var TMt=[{path:"downloads",redirectTo:"files"},{path:"files",children:[{path:"",pathMatch:"full",component:KLe,canActivate:[Od],data:{pageTitle:kd.title("File-Center")}},{path:":fileId",component:XLe,canActivate:[Od],data:{pageTitle:kd.title("File-Center")}}]}],gKn=Pp.forChild(TMt);var TQ=class{constructor(n,e,i,o,r,s){this._hubspotFormService=n,this._input=e,this._config=i,this._authenticated=o,this._fileService=r,this._contact=s,this._updateIsValid()}export(){let n;this._authenticated?n=nr(this._input.data.getExport()):(this._config.authenticationStrategy==="contact"?n=this._exportContact():this._config.authenticationStrategy==="reduce"&&(n=this._exportReduced()),this._input.saveInDownloadCenter=!1);let e=n.pipe(Mn(i=>{let o=this._getExportConverter(i);return nr(o.process())}));return this._input.saveInDownloadCenter&&(e=e.pipe(Mn(i=>{let o=new File([i.result],`${this._input.filename}.${this._input.exportType}`);return this._fileService.upload(o,this._input.labels||[]).pipe(vt(()=>i))}))),e}_exportContact(){let n=this.config.authenticationStrategyConfig;return this._hubspotFormService.sendForm(n.portalId,n.formId,this._contact?.toRequestBody(),this._contact?.data.privacyConsent,window.location.href,`Export ${this._input.filename}`).pipe(Mn(()=>nr(this._input.data.getExport())))}_exportReduced(){return nr(this._input.data.getExport()).pipe(vt(n=>{let e=this.config.authenticationStrategyConfig.resultSetCount;return Array.isArray(n)?mt(be({},n[0]),{data:n[0].data.slice(0,e)}):mt(be({},n),{data:n.data.slice(0,e)})}))}_getExportConverter(n){let e=h2e.getPreferredLocale(),i;if(this._input.exportType==="csv"){if(Array.isArray(n))throw new Error("CSV converter can not handle more than one BdExportAsFileDataSheet");i=new _Q(Promise.resolve(n),e,this._input.filename)}else this._input.exportType==="xlsx"&&(i=new gQ(Promise.resolve(n),e,this._input.filename));return i}_updateIsValid(){let n=!0;(!this._exportInputIsValid()||!this.authenticated&&this._config.authenticationStrategy==="contact"&&(!this._contact||!this._contact.dataIsValid()))&&(n=!1),this.isValid=n}_exportInputIsValid(){return!!this._input.exportType&&!!this._input.data&&!!this._input.filename}get input(){return this._input}set input(n){this._input=n,this._updateIsValid()}get config(){return this._config}set config(n){this._config=n,this._updateIsValid()}get authenticated(){return this._authenticated}set authenticated(n){this._authenticated=n,this._updateIsValid()}get contact(){return this._contact}set contact(n){this._contact=n,this._updateIsValid()}};var iNe=Ap(CU());var JLe=(()=>{class t{constructor(e){this._http=e}sendForm(e,i,o,r,s,d){o=o.filter(O=>!!O.value);let m=`https://api.hsforms.com/submissions/v3/integration/submit/${e}/${i}`,v=this._getCookie("hubspotutk"),w={pageUri:s,pageName:d};return v&&(w.hutk=v),this._http.post(m,{fields:o,context:w,legalConsentOptions:{consent:{consentToProcess:!0,text:"Indem Sie unten auf \u201EEinsenden\u201C klicken, stimmen Sie zu, dass BinDoc die oben angegebenen pers\xF6nlichen Daten speichert und verarbeitet, um Ihnen die angeforderten Inhalte bereitzustellen.",communications:[{value:r,subscriptionTypeId:5651662,text:"Ich stimme zu, andere Benachrichtigungen von BinDoc zu erhalten."}]}}})}_getCookie(e){let i=document.cookie.split(";"),o=i.length,r=`${e}=`,s;for(let d=0;d[];function OMt(t,n){if(t&1){let e=tt();k(0,"bd-ui-labels-input",6),ie("labelsChange",function(o){se(e);let r=P(2);return ae(r.onLabelsChange(o))}),D()}if(t&2){let e=P(2);E("labels",e.input.labels||uo(1,MMt))}}function RMt(t,n){if(t&1&&(k(0,"div")(1,"mat-checkbox",4),Q(2,"Zus\xE4tzlich im File-Center ablegen "),D()(),qe(3,OMt,1,2,"bd-ui-labels-input",5)),t&2){let e=P();T(),E("formControl",e.saveInDownloadCenterFormControl),T(2),Ke(e.input.saveInDownloadCenter?3:-1)}}var eNe=(()=>{class t{constructor(){this.inputChange=new ve,this.exportTypeConfig={id:"export-type-select",selectLabel:"Typ",resetOption:!1,option:{sortFnc:(e,i)=>e.label.localeCompare(i.label),uniqueFnc:e=>e.value,searchOptionAccessor:e=>e.label}},this.fileNameFormControl=new yr(null,Ys.required),this.exportTypeOptions=vc,this.saveInDownloadCenterFormControl=new yr(!1),this.fileNameFormControl.valueChanges.pipe(id(500)).subscribe(e=>{this.input.filename=e,this.inputChange.emit(this.input)}),this.saveInDownloadCenterFormControl.valueChanges.subscribe(e=>{this.input.saveInDownloadCenter=e,e||(this.input.labels=[]),this.inputChange.emit(this.input)})}ngOnInit(){this.config&&this.config.form&&this.config.form.defaultLabels&&(this.input.labels=this.config.form.defaultLabels),this.config&&this.config.form.availableExportTypes&&(this.exportTypeOptions=ci(this.config.form.availableExportTypes.map(e=>({value:e,label:e==="csv"?"CSV":"XLSX (Excel)"}))))}ngOnChanges(e){e.input&&this._onInputChange(),e.authenticated&&this._onAuthenticatedChange()}onExportTypeChange(e){this.input.exportType=e.value,this.inputChange.emit(this.input)}onLabelsChange(e){this.input.labels=e,this.inputChange.emit(this.input)}_onAuthenticatedChange(){this.authenticated||(this.input.saveInDownloadCenter=!1,this.input.labels=[])}_onInputChange(){this._setFileNameFormControl(),this._setSaveInDownloadCenterFormControl(),this.input&&this.input.exportType&&(this.exportTypeInitial={value:this.input.exportType,label:""})}_setFileNameFormControl(){this.fileNameFormControl.setValue(this.input.filename)}_setSaveInDownloadCenterFormControl(){this.saveInDownloadCenterFormControl.setValue(this.input.saveInDownloadCenter)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-export-as-file-dialog-form"]],inputs:{input:"input",config:"config",authenticated:"authenticated"},outputs:{inputChange:"inputChange"},features:[Ot],decls:11,vars:6,consts:[[1,"export-form"],[3,"selection","config","selectOptions","initialSelection"],["type","text","matInput","","data-test","export-file-name",3,"formControl"],["matSuffix",""],[3,"formControl"],[3,"labels"],[3,"labelsChange","labels"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div")(2,"bd-ui-single-select",1),ie("selection",function(s){return o.onExportTypeChange(s)}),D()(),k(3,"div")(4,"mat-form-field")(5,"mat-label"),Q(6,"Name"),D(),ce(7,"input",2),k(8,"span",3),Q(9),D()()(),qe(10,RMt,4,2),D()),i&2&&(T(2),E("config",o.exportTypeConfig)("selectOptions",o.exportTypeOptions)("initialSelection",o.exportTypeInitial),T(5),E("formControl",o.fileNameFormControl),T(2),Qi(".",o.input.exportType),T(),Ke(o.authenticated?10:-1))},dependencies:[Ra,rs,Ol,mp,xr,Ml,no,zl,pl,Fa,nf,hm,MU,jl],encapsulation:2})}}return t})();var IQ=class{constructor(n){this.data=n}dataIsValid(){return!!this.data.email&&!!this.data.firstname&&!!this.data.lastname&&this.data.privacyConsent}toRequestBody(){let n=[];return n.push({name:"email",value:this.data.email}),this.data.company&&n.push({name:"company",value:this.data.company}),n.push({name:"lastname",value:this.data.lastname}),n.push({name:"firstname",value:this.data.firstname}),n.push({name:"mobilephone",value:this.data.mobilephone}),n}};function FMt(t,n){t&1&&(k(0,"mat-error"),Q(1," Bitte geben Sie ihren Vorname an"),D())}function PMt(t,n){t&1&&(k(0,"mat-error"),Q(1," Bitte geben Sie ihren Nachname an"),D())}function LMt(t,n){t&1&&(k(0,"mat-error"),Q(1," Ung\xFCltige Email-Adresse"),D())}function NMt(t,n){t&1&&(k(0,"mat-error"),Q(1," Bitte geben Sie eine Email an"),D())}function BMt(t,n){t&1&&(k(0,"mat-error"),Q(1," Ung\xFCltige Nummer"),D())}function VMt(t,n){t&1&&(k(0,"mat-error"),Q(1," Mindestens 7 Stellen"),D())}function zMt(t,n){t&1&&(k(0,"mat-error"),Q(1," Maximal 20 Stellen"),D())}var tNe=(()=>{class t{constructor(){this.contact=new IQ({company:null,firstname:null,lastname:null,email:null,mobilephone:null,privacyConsent:!0}),this.contactChange=new ve,this.form=new hu({email:new yr(null,[Ys.email,Ys.required]),firstname:new yr(null,[Ys.required]),lastname:new yr(null,[Ys.required]),company:new yr(null,[]),mobilephone:new MEe(null,[Ys.minLength(7),Ys.maxLength(20)]),privacyConsent:new yr(!0,[Ys.requiredTrue])}),this.form.valueChanges.subscribe(e=>{this.contact.data=e,this.contactChange.emit(this.contact)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-export-as-file-dialog-form-hubspot-contact"]],inputs:{contact:"contact"},outputs:{contactChange:"contactChange"},decls:50,vars:8,consts:[[3,"formGroup"],[1,"flex","flex-col","gap-2"],[1,"flex-1"],["matInput","","type","text","formControlName","company"],[1,"flex","flex-row","gap-6"],["matInput","","type","text","formControlName","firstname","required",""],["matInput","","type","text","formControlName","lastname","required",""],["matInput","","type","email","formControlName","email","required",""],[1,"basis-1/2"],["matInput","","type","tel","formControlName","mobilephone"],[1,"mat-body"],["formControlName","privacyConsent"]],template:function(i,o){i&1&&(k(0,"form",0)(1,"div",1)(2,"div",2)(3,"mat-form-field")(4,"mat-label"),Q(5,"Firma"),D(),ce(6,"input",3),D()(),k(7,"div",2)(8,"div",4)(9,"div",2)(10,"mat-form-field")(11,"mat-label"),Q(12,"Vorname"),D(),ce(13,"input",5),qe(14,FMt,2,0,"mat-error"),D()(),k(15,"div",2)(16,"mat-form-field")(17,"mat-label"),Q(18,"Nachname"),D(),ce(19,"input",6),qe(20,PMt,2,0,"mat-error"),D()()()(),k(21,"div",2)(22,"mat-form-field")(23,"mat-label"),Q(24,"Email"),D(),ce(25,"input",7),qe(26,LMt,2,0,"mat-error"),qe(27,NMt,2,0,"mat-error"),D()(),k(28,"div",2)(29,"div",4)(30,"div",8)(31,"mat-form-field")(32,"mat-label"),Q(33,"Telefon"),D(),ce(34,"input",9),qe(35,BMt,2,0,"mat-error"),qe(36,VMt,2,0,"mat-error"),qe(37,zMt,2,0,"mat-error"),D()()()(),k(38,"div",2)(39,"span",10),Q(40,"BinDoc verpflichtet sich, Ihre Privatsph\xE4re zu sch\xFCtzen und zu respektieren. Wir verwenden Ihre pers\xF6nlichen Daten nur zur Verwaltung Ihres Kontos und zur Bereitstellung der von Ihnen angeforderten Produkte und Dienstleistungen. Von Zeit zu Zeit m\xF6chten wir Sie \xFCber unsere Produkte und Dienstleistungen sowie andere Inhalte, die f\xFCr Sie von Interesse sein k\xF6nnten, informieren. Wenn Sie damit einverstanden sind, dass wir Sie zu diesem Zweck kontaktieren, geben Sie bitte unten an, wie Sie von uns kontaktiert werden m\xF6chten: "),D()(),k(41,"div",2)(42,"mat-checkbox",11),Q(43," Ich stimme zu, andere Benachrichtigungen von BinDoc zu erhalten. "),D()(),k(44,"div",2)(45,"span",10),Q(46,"Sie k\xF6nnen diese Benachrichtigungen jederzeit abbestellen. Weitere Informationen zum Abbestellen, zu unseren Datenschutzverfahren und dazu, wie wir Ihre Privatsph\xE4re sch\xFCtzen und respektieren, finden Sie in unserer Datenschutzrichtlinie."),D()(),k(47,"div",2)(48,"span",10),Q(49,"Indem Sie unten auf \u201EExport anfordern\u201C klicken, stimmen Sie zu, dass BinDoc die oben angegebenen pers\xF6nlichen Daten speichert und verarbeitet, um Ihnen die angeforderten Inhalte bereitzustellen."),D()()()()),i&2&&(E("formGroup",o.form),T(14),Ke(o.form.get("firstname").hasError("required")?14:-1),T(6),Ke(o.form.get("lastname").hasError("required")?20:-1),T(6),Ke(o.form.get("email").hasError("email")&&!o.form.get("email").hasError("required")?26:-1),T(),Ke(o.form.get("email").hasError("required")?27:-1),T(8),Ke(o.form.get("mobilephone").hasError("number")?35:-1),T(),Ke(o.form.get("mobilephone").hasError("minlength")?36:-1),T(),Ke(o.form.get("mobilephone").hasError("maxlength")?37:-1))},dependencies:[xr,$m,Ml,no,Gm,qv,zu,l0,Ra,rs,Ol,J$,pl,Fa,nf,hm],encapsulation:2})}}return t})();function UMt(t,n){if(t&1&&(k(0,"div")(1,"div",7)(2,"div",8)(3,"div",9)(4,"mat-icon"),Q(5,"info_outline"),D()(),k(6,"div",10)(7,"span",11),Q(8),k(9,"a",12),Q(10,"Kontaktieren Sie unseren Vertrieb"),D()()()()()()),t&2){let e=P(2);T(8),Qi("Der Export ist begrenzt auf ",e.config.authenticationStrategyConfig==null?null:e.config.authenticationStrategyConfig.resultSetCount," Zeilen. Bitte melden Sie sich an, um den Export ohne Limit durchzuf\xFChren oder ")}}function HMt(t,n){if(t&1){let e=tt();k(0,"div",13)(1,"bd-export-as-file-dialog-form-hubspot-contact",14),ie("contactChange",function(o){se(e);let r=P(2);return ae(r.onContactChange(o))}),D()(),ce(2,"mat-divider")}}function jMt(t,n){if(t&1){let e=tt();qe(0,UMt,11,1,"div"),qe(1,HMt,3,0),k(2,"div")(3,"bd-export-as-file-dialog-form",3),ie("inputChange",function(o){se(e);let r=P();return ae(r.onInputChange(o))}),D()(),k(4,"div",4)(5,"button",5),ie("click",function(){se(e);let o=P();return ae(o.abort())}),Q(6,"Abbrechen"),D(),k(7,"button",6),ie("click",function(){se(e);let o=P();return ae(o.onExportClick())}),Q(8," Exportieren "),D()()}if(t&2){let e=P();Ke(e.config.authenticationStrategy==="reduce"&&!e.exportHandler.authenticated?0:-1),T(),Ke(e.config.authenticationStrategy==="contact"&&!e.exportHandler.authenticated?1:-1),T(2),E("input",e.exportHandler.input)("config",e.config)("authenticated",e.exportHandler.authenticated),T(4),E("disabled",!e.exportHandler.isValid)}}function GMt(t,n){if(t&1){let e=tt();k(0,"p",15),Q(1," Es ist ein Fehler w\xE4hrend dem Export aufgetreten, der Export konnte nicht erstellt werden "),D(),k(2,"div",4)(3,"button",16),ie("click",function(){se(e);let o=P();return ae(o.abort())}),Q(4," Abbrechen "),D()()}}var nNe=(()=>{class t{constructor(e,i,o,r,s){this._dialogRef=i,this._currentUserService=o,this._hubspotFormService=r,this._fileService=s,this.loading$=new hi,e.data.input.exportType=e.data.input.exportType??"xlsx",this.config=e.data.config??hg,this._currentUserService.authenticated$.pipe(Sn(1)).subscribe(d=>{this.exportHandler=new TQ(this._hubspotFormService,e.data.input,this.config,d,this._fileService)})}abort(){this._dialogRef.close()}onContactChange(e){this.exportHandler.contact=e}onInputChange(e){this.exportHandler.input=e}onExportClick(){this.loading$.next(Gt.LOADING),this.exportHandler.export().subscribe({next:e=>{e.errors?(this.loading$.next(Gt.ERROR),console.error(e.errors)):(this.loading$.next(Gt.SUCCESS),(0,iNe.saveAs)(e.result,`${this.exportHandler.input.filename}.${this.exportHandler.input.exportType}`),this._dialogRef.close())},error:e=>{console.error(e),this.loading$.next(Gt.ERROR)}})}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es),_e(Ey),_e(JLe),_e(Lx,8))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-export-as-file-dialog"]],decls:6,vars:3,consts:[["formTpl",""],["errorTpl",""],[3,"loadItem","initTemplate","errorTemplate"],[3,"inputChange","input","config","authenticated"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-raised-button","","color","accent","data-test","export-submit",3,"click","disabled"],[1,"info-box"],[1,"flex","flex-row","gap-6"],[1,"basis-10"],[1,"flex-1"],[1,"mat-body-2"],["href","https://www.bindoc.de/online-meeting","target","_blank"],[1,"contact-form"],[3,"contactChange"],[1,"mat-body-1"],["mat-button","","data-test","export-abort",3,"click"]],template:function(i,o){if(i&1&&(k(0,"div"),ce(1,"bd-loader",2),D(),ee(2,jMt,9,6,"ng-template",null,0,Pt)(4,GMt,5,0,"ng-template",null,1,Pt)),i&2){let r=ti(3),s=ti(5);T(),E("loadItem",o.loading$)("initTemplate",r)("errorTemplate",s)}},dependencies:[Kn,$o,mr,tNe,il,Gl,eNe,Tn,yo],styles:[".contact-form[_ngcontent-%COMP%], .export-form[_ngcontent-%COMP%]{padding:24px 0}"]})}}return t})();function $Mt(t,n){if(t&1){let e=tt();k(0,"div")(1,"button",0),ie("click",function(){se(e);let o=P();return ae(o.onClick())}),k(2,"mat-icon"),Q(3,"save"),D()()()}if(t&2){let e=P();T(),E("data-test",e.exportConfig.trigger.dataTestKey)("color",e.exportConfig.trigger.color)("matTooltip",e.exportConfig.trigger.tooltipText)}}var Sd=(()=>{class t extends dr{constructor(e,i){super(),this._dialogService=e,this._currentUserService=i,this.config=hg,this.exportConfig=hg;let o=this._currentUserService.authenticated$.subscribe(r=>{this._authenticated=r,this._updateShowTrigger(r)});this._subs.push(o)}ngOnInit(){this.config&&(this.exportConfig=JSON.parse(JSON.stringify(this.config)))}ngOnDestroy(){this.unsubscribeAll()}onClick(){let e={filename:this.filename,data:this.data,labels:null,exportType:"xlsx",saveInDownloadCenter:!1},i=mt(be({},ju),{header:"Export",data:{input:e,config:this.config,authenticated:this._authenticated}});this._dialogService.open(nNe,i)}_updateShowTrigger(e){this.exportConfig.authenticationStrategy==="always"&&!e&&(this.showTrigger=!1),this.showTrigger=!0}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo),_e(Ey))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-export-as-file"]],inputs:{data:"data",filename:"filename",config:"config"},features:[jt([Mo]),ft],decls:1,vars:1,consts:[["mat-icon-button","",3,"click","data-test","color","matTooltip"]],template:function(i,o){i&1&&qe(0,$Mt,4,3,"div"),i&2&&Ke(o.showTrigger?0:-1)},dependencies:[Tn,xl,Hp,Up,$o,mr,Lp],encapsulation:2})}}return t})();var oNe=` .p-tabs { display: flex; flex-direction: column; } .p-tablist { display: flex; position: relative; overflow: hidden; } .p-tablist-viewport { overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior: contain auto; } .p-tablist-viewport::-webkit-scrollbar { display: none; } .p-tablist-tab-list { position: relative; display: flex; background: dt('tabs.tablist.background'); border-style: solid; border-color: dt('tabs.tablist.border.color'); border-width: dt('tabs.tablist.border.width'); } .p-tablist-content { flex-grow: 1; } .p-tablist-nav-button { all: unset; position: absolute !important; flex-shrink: 0; inset-block-start: 0; z-index: 2; height: 100%; display: flex; align-items: center; justify-content: center; background: dt('tabs.nav.button.background'); color: dt('tabs.nav.button.color'); width: dt('tabs.nav.button.width'); transition: color dt('tabs.transition.duration'), outline-color dt('tabs.transition.duration'), box-shadow dt('tabs.transition.duration'); box-shadow: dt('tabs.nav.button.shadow'); outline-color: transparent; cursor: pointer; } .p-tablist-nav-button:focus-visible { z-index: 1; box-shadow: dt('tabs.nav.button.focus.ring.shadow'); outline: dt('tabs.nav.button.focus.ring.width') dt('tabs.nav.button.focus.ring.style') dt('tabs.nav.button.focus.ring.color'); outline-offset: dt('tabs.nav.button.focus.ring.offset'); } .p-tablist-nav-button:hover { color: dt('tabs.nav.button.hover.color'); } .p-tablist-prev-button { inset-inline-start: 0; } .p-tablist-next-button { inset-inline-end: 0; } .p-tablist-prev-button:dir(rtl), .p-tablist-next-button:dir(rtl) { transform: rotate(180deg); } .p-tab { flex-shrink: 0; cursor: pointer; user-select: none; position: relative; border-style: solid; white-space: nowrap; gap: dt('tabs.tab.gap'); background: dt('tabs.tab.background'); border-width: dt('tabs.tab.border.width'); border-color: dt('tabs.tab.border.color'); color: dt('tabs.tab.color'); padding: dt('tabs.tab.padding'); font-weight: dt('tabs.tab.font.weight'); transition: background dt('tabs.transition.duration'), border-color dt('tabs.transition.duration'), color dt('tabs.transition.duration'), outline-color dt('tabs.transition.duration'), box-shadow dt('tabs.transition.duration'); margin: dt('tabs.tab.margin'); outline-color: transparent; } .p-tab:not(.p-disabled):focus-visible { z-index: 1; box-shadow: dt('tabs.tab.focus.ring.shadow'); outline: dt('tabs.tab.focus.ring.width') dt('tabs.tab.focus.ring.style') dt('tabs.tab.focus.ring.color'); outline-offset: dt('tabs.tab.focus.ring.offset'); } .p-tab:not(.p-tab-active):not(.p-disabled):hover { background: dt('tabs.tab.hover.background'); border-color: dt('tabs.tab.hover.border.color'); color: dt('tabs.tab.hover.color'); } .p-tab-active { background: dt('tabs.tab.active.background'); border-color: dt('tabs.tab.active.border.color'); color: dt('tabs.tab.active.color'); } .p-tabpanels { background: dt('tabs.tabpanel.background'); color: dt('tabs.tabpanel.color'); padding: dt('tabs.tabpanel.padding'); outline: 0 none; } .p-tabpanel:focus-visible { box-shadow: dt('tabs.tabpanel.focus.ring.shadow'); outline: dt('tabs.tabpanel.focus.ring.width') dt('tabs.tabpanel.focus.ring.style') dt('tabs.tabpanel.focus.ring.color'); outline-offset: dt('tabs.tabpanel.focus.ring.offset'); } .p-tablist-active-bar { z-index: 1; display: block; position: absolute; inset-block-end: dt('tabs.active.bar.bottom'); height: dt('tabs.active.bar.height'); background: dt('tabs.active.bar.background'); transition: 250ms cubic-bezier(0.35, 0, 0.25, 1); } `;var qMt=["previcon"],KMt=["nexticon"],WMt=["content"],YMt=["prevButton"],QMt=["nextButton"],ZMt=["inkbar"],XMt=["tabs"],FU=["*"];function JMt(t,n){t&1&&ui(0)}function eOt(t,n){if(t&1&&ee(0,JMt,1,0,"ng-container",11),t&2){let e=P(2);E("ngTemplateOutlet",e.prevIconTemplate||e._prevIconTemplate)}}function tOt(t,n){t&1&&(si(),ce(0,"svg",10))}function iOt(t,n){if(t&1){let e=tt();k(0,"button",9,3),ie("click",function(){se(e);let o=P();return ae(o.onPrevButtonClick())}),qe(2,eOt,1,1,"ng-container")(3,tOt,1,0,":svg:svg",10),D()}if(t&2){let e=P();Oe(e.cx("prevButton")),Ge("aria-label",e.prevButtonAriaLabel)("tabindex",e.tabindex())("data-pc-group-section","navigator"),T(2),Ke(e.prevIconTemplate||e._prevIconTemplate?2:3)}}function nOt(t,n){t&1&&ui(0)}function oOt(t,n){if(t&1&&ee(0,nOt,1,0,"ng-container",11),t&2){let e=P(2);E("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function rOt(t,n){t&1&&(si(),ce(0,"svg",12))}function sOt(t,n){if(t&1){let e=tt();k(0,"button",9,4),ie("click",function(){se(e);let o=P();return ae(o.onNextButtonClick())}),qe(2,oOt,1,1,"ng-container")(3,rOt,1,0,":svg:svg",12),D()}if(t&2){let e=P();Oe(e.cx("nextButton")),Ge("aria-label",e.nextButtonAriaLabel)("tabindex",e.tabindex())("data-pc-group-section","navigator"),T(2),Ke(e.nextIconTemplate||e._nextIconTemplate?2:3)}}function aOt(t,n){t&1&&pn(0)}var lOt={root:({instance:t})=>["p-tabs p-component",{"p-tabs-scrollable":t.scrollable()}]},rNe=(()=>{class t extends io{name="tabs";theme=oNe;classes=lOt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var cOt={root:"p-tablist",content:"p-tablist-content p-tablist-viewport",tabList:"p-tablist-tab-list",activeBar:"p-tablist-active-bar",prevButton:"p-tablist-prev-button p-tablist-nav-button",nextButton:"p-tablist-next-button p-tablist-nav-button"},sNe=(()=>{class t extends io{name="tablist";classes=cOt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var Dy=(()=>{class t extends oo{prevIconTemplate;nextIconTemplate;templates;content;prevButton;nextButton;inkbar;tabs;pcTabs=re(Ko(()=>m_));isPrevButtonEnabled=Zn(!1);isNextButtonEnabled=Zn(!1);resizeObserver;showNavigators=bo(()=>this.pcTabs.showNavigators());tabindex=bo(()=>this.pcTabs.tabindex());scrollable=bo(()=>this.pcTabs.scrollable());_componentStyle=re(sNe);constructor(){super(),od(()=>{this.pcTabs.value(),ps(this.platformId)&&setTimeout(()=>{this.updateInkBar()})})}get prevButtonAriaLabel(){return this.config.translation.aria.previous}get nextButtonAriaLabel(){return this.config.translation.aria.next}ngAfterViewInit(){super.ngAfterViewInit(),this.showNavigators()&&ps(this.platformId)&&(this.updateButtonState(),this.bindResizeObserver())}_prevIconTemplate;_nextIconTemplate;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"previcon":this._prevIconTemplate=e.template;break;case"nexticon":this._nextIconTemplate=e.template;break}})}ngOnDestroy(){this.unbindResizeObserver(),super.ngOnDestroy()}onScroll(e){this.showNavigators()&&this.updateButtonState(),e.preventDefault()}onPrevButtonClick(){let e=this.content.nativeElement,i=ng(e),o=Math.abs(e.scrollLeft)-i,r=o<=0?0:o;e.scrollLeft=IP(e)?-1*r:r}onNextButtonClick(){let e=this.content.nativeElement,i=ng(e)-this.getVisibleButtonWidths(),o=e.scrollLeft+i,r=e.scrollWidth-i,s=o>=r?r:o;e.scrollLeft=IP(e)?-1*s:s}updateButtonState(){let e=this.content?.nativeElement,i=this.el?.nativeElement,{scrollWidth:o,offsetWidth:r}=e,s=Math.abs(e.scrollLeft),d=ng(e);this.isPrevButtonEnabled.set(s!==0),this.isNextButtonEnabled.set(i.offsetWidth>=r&&s!==o-d)}updateInkBar(){let e=this.content?.nativeElement,i=this.inkbar?.nativeElement,o=this.tabs?.nativeElement,r=zo(e,'[data-pc-name="tab"][data-p-active="true"]');i&&(i.style.width=qc(r)+"px",i.style.left=Zg(r).left-Zg(o).left+"px")}getVisibleButtonWidths(){let e=this.prevButton?.nativeElement,i=this.nextButton?.nativeElement;return[e,i].reduce((o,r)=>r?o+ng(r):o,0)}bindResizeObserver(){this.resizeObserver=new ResizeObserver(()=>this.updateButtonState()),this.resizeObserver.observe(this.el.nativeElement)}unbindResizeObserver(){this.resizeObserver&&(this.resizeObserver.unobserve(this.el.nativeElement),this.resizeObserver=null)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["p-tablist"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,qMt,4),xt(r,KMt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.prevIconTemplate=s.first),Le(s=Ne())&&(o.nextIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(WMt,5),Ri(YMt,5),Ri(QMt,5),Ri(ZMt,5),Ri(XMt,5)),i&2){let r;Le(r=Ne())&&(o.content=r.first),Le(r=Ne())&&(o.prevButton=r.first),Le(r=Ne())&&(o.nextButton=r.first),Le(r=Ne())&&(o.inkbar=r.first),Le(r=Ne())&&(o.tabs=r.first)}},hostVars:3,hostBindings:function(i,o){i&2&&(Ge("data-pc-name","tablist"),Oe(o.cx("root")))},features:[jt([sNe]),ft],ngContentSelectors:FU,decls:9,vars:9,consts:[["content",""],["tabs",""],["inkbar",""],["prevButton",""],["nextButton",""],["type","button","pRipple","",3,"class"],[3,"scroll"],["role","tablist"],["role","presentation"],["type","button","pRipple","",3,"click"],["data-p-icon","chevron-left"],[4,"ngTemplateOutlet"],["data-p-icon","chevron-right"]],template:function(i,o){if(i&1){let r=tt();Nn(),qe(0,iOt,4,6,"button",5),k(1,"div",6,0),ie("scroll",function(d){return se(r),ae(o.onScroll(d))}),k(3,"div",7,1),pn(5),ce(6,"span",8,2),D()(),qe(8,sOt,4,6,"button",5)}i&2&&(Ke(o.showNavigators()&&o.isPrevButtonEnabled()?0:-1),T(),Oe(o.cx("content")),T(2),Oe(o.cx("tabList")),T(3),Oe(o.cx("activeBar")),Ge("data-pc-section","inkbar"),T(2),Ke(o.showNavigators()&&o.isNextButtonEnabled()?8:-1))},dependencies:[On,Lo,VK,Gw,hke,Ul,In],encapsulation:2,changeDetection:0})}return t})(),dOt={root:({instance:t})=>["p-tab",{"p-tab-active":t.active(),"p-disabled":t.disabled()}]},aNe=(()=>{class t extends io{name="tab";classes=dOt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var hb=(()=>{class t extends oo{value=X0();disabled=mo(!1,{transform:je});pcTabs=re(Ko(()=>m_));pcTabList=re(Ko(()=>Dy));el=re(Bn);_componentStyle=re(aNe);ripple=bo(()=>this.config.ripple());id=bo(()=>`${this.pcTabs.id()}_tab_${this.value()}`);ariaControls=bo(()=>`${this.pcTabs.id()}_tabpanel_${this.value()}`);active=bo(()=>Sc(this.pcTabs.value(),this.value()));tabindex=bo(()=>this.active()?this.pcTabs.tabindex():-1);mutationObserver;onFocus(e){this.pcTabs.selectOnFocus()&&this.changeActiveValue()}onClick(e){this.changeActiveValue()}onKeyDown(e){switch(e.code){case"ArrowRight":this.onArrowRightKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":case"Space":this.onEnterKey(e);break;default:break}e.stopPropagation()}ngAfterViewInit(){super.ngAfterViewInit(),this.bindMutationObserver()}onArrowRightKey(e){let i=this.findNextTab(e.currentTarget);i?this.changeFocusedTab(e,i):this.onHomeKey(e),e.preventDefault()}onArrowLeftKey(e){let i=this.findPrevTab(e.currentTarget);i?this.changeFocusedTab(e,i):this.onEndKey(e),e.preventDefault()}onHomeKey(e){let i=this.findFirstTab();this.changeFocusedTab(e,i),e.preventDefault()}onEndKey(e){let i=this.findLastTab();this.changeFocusedTab(e,i),e.preventDefault()}onPageDownKey(e){this.scrollInView(this.findLastTab()),e.preventDefault()}onPageUpKey(e){this.scrollInView(this.findFirstTab()),e.preventDefault()}onEnterKey(e){this.changeActiveValue(),e.preventDefault()}findNextTab(e,i=!1){let o=i?e:e.nextElementSibling;return o?p0(o,"data-p-disabled")||p0(o,"data-pc-section")==="inkbar"?this.findNextTab(o):o:null}findPrevTab(e,i=!1){let o=i?e:e.previousElementSibling;return o?p0(o,"data-p-disabled")||p0(o,"data-pc-section")==="inkbar"?this.findPrevTab(o):o:null}findFirstTab(){return this.findNextTab(this.pcTabList?.tabs?.nativeElement?.firstElementChild,!0)}findLastTab(){return this.findPrevTab(this.pcTabList?.tabs?.nativeElement?.lastElementChild,!0)}changeActiveValue(){this.pcTabs.updateValue(this.value())}changeFocusedTab(e,i){ss(i),this.scrollInView(i)}scrollInView(e){e?.scrollIntoView?.({block:"nearest"})}bindMutationObserver(){ps(this.platformId)&&(this.mutationObserver=new MutationObserver(e=>{e.forEach(()=>{this.active()&&this.pcTabList?.updateInkBar()})}),this.mutationObserver.observe(this.el.nativeElement,{childList:!0,characterData:!0,subtree:!0}))}unbindMutationObserver(){this.mutationObserver.disconnect()}ngOnDestroy(){this.mutationObserver&&this.unbindMutationObserver(),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-tab"]],hostVars:10,hostBindings:function(i,o){i&1&&ie("focus",function(s){return o.onFocus(s)})("click",function(s){return o.onClick(s)})("keydown",function(s){return o.onKeyDown(s)}),i&2&&(Ge("data-pc-name","tab")("id",o.id())("aria-controls",o.ariaControls())("role","tab")("aria-selected",o.active())("data-p-disabled",o.disabled())("data-p-active",o.active())("tabindex",o.tabindex()),Oe(o.cx("root")))},inputs:{value:[1,"value"],disabled:[1,"disabled"]},outputs:{value:"valueChange"},features:[jt([aNe]),X1([Ul]),ft],ngContentSelectors:FU,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On,In],encapsulation:2,changeDetection:0})}return t})(),uOt={root:({instance:t})=>["p-tabpanel",{"p-tabpanel-active":t.active()}]},lNe=(()=>{class t extends io{name="tabpanel";classes=uOt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var mb=(()=>{class t extends oo{pcTabs=re(Ko(()=>m_));value=X0(void 0);id=bo(()=>`${this.pcTabs.id()}_tabpanel_${this.value()}`);ariaLabelledby=bo(()=>`${this.pcTabs.id()}_tab_${this.value()}`);active=bo(()=>Sc(this.pcTabs.value(),this.value()));_componentStyle=re(lNe);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-tabpanel"]],hostVars:7,hostBindings:function(i,o){i&2&&(Ge("data-pc-name","tabpanel")("id",o.id())("role","tabpanel")("aria-labelledby",o.ariaLabelledby())("data-p-active",o.active()),Oe(o.cx("root")))},inputs:{value:[1,"value"]},outputs:{value:"valueChange"},features:[jt([lNe]),ft],ngContentSelectors:FU,decls:1,vars:1,template:function(i,o){i&1&&(Nn(),qe(0,aOt,1,0)),i&2&&Ke(o.active()?0:-1)},dependencies:[On],encapsulation:2,changeDetection:0})}return t})(),pOt={root:"p-tabpanels"},cNe=(()=>{class t extends io{name="tabpanels";classes=pOt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var fb=(()=>{class t extends oo{_componentStyle=re(cNe);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-tabpanels"]],hostVars:4,hostBindings:function(i,o){i&2&&(Ge("data-pc-name","tabpanels")("role","presentation"),Oe(o.cx("root")))},features:[jt([cNe]),ft],ngContentSelectors:FU,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On],encapsulation:2,changeDetection:0})}return t})(),m_=(()=>{class t extends oo{value=X0(void 0);scrollable=mo(!1,{transform:je});lazy=mo(!1,{transform:je});selectOnFocus=mo(!1,{transform:je});showNavigators=mo(!0,{transform:je});tabindex=mo(0,{transform:ln});id=Zn(Vr("pn_id_"));_componentStyle=re(rNe);updateValue(e){this.value.update(()=>e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-tabs"]],hostVars:4,hostBindings:function(i,o){i&2&&(Ge("data-pc-name","tabs")("id",o.id()),Oe(o.cx("root")))},inputs:{value:[1,"value"],scrollable:[1,"scrollable"],lazy:[1,"lazy"],selectOnFocus:[1,"selectOnFocus"],showNavigators:[1,"showNavigators"],tabindex:[1,"tabindex"]},outputs:{value:"valueChange"},features:[jt([rNe]),ft],ngContentSelectors:FU,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On],encapsulation:2,changeDetection:0})}return t})(),DN=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[m_,fb,mb,Dy,hb]})}return t})();var AQ=class{constructor(n){this._environmentService=n}index(){return`${this._environmentService.load("BD_DISTRICT_URL")}/base_rates/`}};var dNe=(()=>{class t{static _fromObj(e){return{year:parseInt(e.year,10),value:e.baseRate,state:{id:e.stateId,name:jP.find(i=>i.id===e.stateId)?.name??null}}}constructor(e,i){this._httpClient=e,this._environmentService=i,this._store=new AQ(this._environmentService)}index(){let e;return this._baseRates?e=Promise.resolve(this._baseRates):e=Wl(this._fetch().pipe(vt(i=>this._parseBaseRatesResponse(i)),Vo(i=>this._baseRates=i))),e}_fetch(){let e=this._store.index();return this._httpClient.get(e)}_parseBaseRatesResponse(e){let i={};return Object.keys(e).forEach(o=>{let r=e[o];i[o]=r.map(s=>t._fromObj(s))}),i}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function yOt(t,n){if(t&1&&(k(0,"span",11),Q(1),Xn(2,"currency"),D()),t&2){let e=P(2);T(),dt(sne(2,1,e.baseRate.value,"EUR","symbol"))}}function vOt(t,n){t&1&&(k(0,"span",11),Q(1,"n/a"),D())}function bOt(t,n){if(t&1){let e=tt();k(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",4)(4,"p-iftalabel")(5,"p-select",6),ie("onChange",function(o){se(e);let r=P();return ae(r.onYearChange(o))}),D(),k(6,"label",7),Q(7,"Jahr"),D()()(),k(8,"div",4)(9,"bd-ui-single-select",8),ie("selection",function(o){se(e);let r=P();return ae(r.onStateChange(o))}),D()()()(),k(10,"div",4)(11,"div",9)(12,"span",10),Q(13,"Basisfallwert: "),D(),k(14,"div",10),qe(15,yOt,3,5,"span",11),qe(16,vOt,2,0,"span",11),D()()()()}if(t&2){let e=P();T(5),E("required",!0)("options",e.yearOptions)("ngModel",e.baseRate.year),T(4),E("config",e.config)("selectOptions",e.stateOptions)("initialSelection",e.initialState),T(6),Ke(e.baseRate.value?15:-1),T(),Ke(e.baseRate.value?-1:16)}}var uNe=(()=>{class t{constructor(e){this._baseRateService=e,this.baseRate={},this.stateSelectOptions={includeBund:!0,resetOption:!1},this.baseRateChange=new ve,this.config={selectLabel:"Bundesland",option:{sortFnc:(i,o)=>i.name.localeCompare(o.name),uniqueFnc:i=>i.id.toString(),searchOptionAccessor:i=>i.name}},this.loading$=new pi(1),this.stateOptions=vc}ngOnInit(){this.loading$.next(Gt.LOADING),this.baseRate&&this.baseRate.state&&(this.initialState=this.baseRate.state),this.stateOptions=ci(this.stateSelectOptions.includeBund?jP:qw),this._fetchBaseRates().then(()=>this._onInputChanges()).then(()=>this.loading$.next(Gt.SUCCESS))}ngOnChanges(e){this.baseRateData&&e.baseRate&&e.baseRate.currentValue&&this._onInputChanges()}onYearChange(e){this.baseRate.year=parseInt(e.value,10),this._onInputChanges()}onStateChange(e){this.baseRate.state=e,this._onInputChanges()}_fetchBaseRates(){return this._baseRateService.index().then(e=>{this.baseRateData=e,this.yearOptions=Object.keys(e).map(i=>parseInt(i,10)).reverse()})}_onInputChanges(){this.baseRate?(this.baseRate.year&&this.baseRate.state?this.baseRate.value=this._getBaseRateValue(this.baseRate.year,this.baseRate.state.id):this.baseRate.value=null,this.baseRateChange.emit(this.baseRate)):this.baseRate={}}_getBaseRateValue(e,i){let o=this.baseRateData[e.toString()]||null,r=null;return o&&o.forEach(s=>{s.state.id===i&&(r=s.value)}),r}static{this.\u0275fac=function(i){return new(i||t)(_e(dNe))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-drg-base-rate"]],inputs:{baseRate:"baseRate",stateSelectOptions:"stateSelectOptions"},outputs:{baseRateChange:"baseRateChange"},features:[Ot],decls:4,vars:2,consts:[["successTpl",""],[1,"base-rate"],[3,"loadItem","successTemplate"],[1,"flex","flex-col","xl:flex-row","gap-0","xl:gap-6","items-start","xl:items-center"],[1,"flex-1"],[1,"flex","flex-col","sm:flex-row","gap-0","sm:gap-6","items-start","sm:items-center"],["inputId","drg-base-rate-year-select","fluid","","variant","filled",1,"mb-4",3,"onChange","required","options","ngModel"],["for","drg-base-rate-year-select"],[3,"selection","config","selectOptions","initialSelection"],[1,"flex","flex-row","base-rate--result"],[1,"mat-subheading-2"],["data-test","drg-base-rate-result"]],template:function(i,o){if(i&1&&(k(0,"div",1),ce(1,"bd-loader",2),D(),ee(2,bOt,17,8,"ng-template",null,0,Pt)),i&2){let r=ti(3);T(),E("loadItem",o.loading$)("successTemplate",r)}},dependencies:[Kn,as,Ql,hr,no,qv,Lr,jl,Une],styles:[".base-rate--result[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;margin-right:8px}"]})}}return t})();var COt=["input"],xOt=["formField"],wOt=["*"],kQ=class{source;value;constructor(n,e){this.source=n,this.value=e}},SOt={provide:Ea,useExisting:Ko(()=>gb),multi:!0},pNe=new fi("MatRadioGroup"),TOt=new fi("mat-radio-default-options",{providedIn:"root",factory:IOt});function IOt(){return{color:"accent",disabledInteractive:!1}}var gb=(()=>{class t{_changeDetector=re(Gi);_value=null;_name=re(ul).getId("mat-radio-group-");_selected=null;_isInitialized=!1;_labelPosition="after";_disabled=!1;_required=!1;_buttonChanges;_controlValueAccessorChangeFn=()=>{};onTouched=()=>{};change=new ve;_radios;color;get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition=e==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=e,this._markRadiosForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markRadiosForCheck()}_disabledInteractive=!1;constructor(){}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(e=>e===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){let e=this._selected!==null&&this._selected.value===this._value;this._radios&&!e&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new kQ(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["mat-radio-group"]],contentQueries:function(i,o,r){if(i&1&&xt(r,Ay,5),i&2){let s;Le(s=Ne())&&(o._radios=s)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",je],required:[2,"required","required",je],disabledInteractive:[2,"disabledInteractive","disabledInteractive",je]},outputs:{change:"change"},exportAs:["matRadioGroup"],features:[jt([SOt,{provide:pNe,useExisting:t}])]})}return t})(),Ay=(()=>{class t{_elementRef=re(Bn);_changeDetector=re(Gi);_focusMonitor=re(gh);_radioDispatcher=re(xae);_defaultOptions=re(TOt,{optional:!0});_ngZone=re(_n);_renderer=re(Ps);_uniqueId=re(ul).getId("mat-radio-");_cleanupClick;id=this._uniqueId;name;ariaLabel;ariaLabelledby;ariaDescribedby;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}_labelPosition;get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(e)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){e!==this._required&&this._changeDetector.markForCheck(),this._required=e}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(e){this._color=e}_color;get disabledInteractive(){return this._disabledInteractive||this.radioGroup!==null&&this.radioGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new ve;radioGroup;get inputId(){return`${this.id||this._uniqueId}-input`}_checked=!1;_disabled;_required;_value=null;_removeUniqueSelectionListener=()=>{};_previousTabIndex;_inputElement;_rippleTrigger;_noopAnimations=Cl();_injector=re(Oo);constructor(){re(kl).load(hp);let e=re(pNe,{optional:!0}),i=re(new Bm("tabindex"),{optional:!0});this.radioGroup=e,this._disabledInteractive=this._defaultOptions?.disabledInteractive??!1,i&&(this.tabIndex=ln(i,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._cleanupClick=this._renderer.listen(this._inputElement.nativeElement,"click",this._onInputClick)})}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new kQ(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_onInputClick=e=>{this.disabled&&this.disabledInteractive&&e.preventDefault()};_updateTabIndex(){let e=this.radioGroup,i;if(!e||!e.selected||this.disabled?i=this.tabIndex:i=e.selected===this?this.tabIndex:-1,i!==this._previousTabIndex){let o=this._inputElement?.nativeElement;o&&(o.setAttribute("tabindex",i+""),this._previousTabIndex=i,Ou(()=>{queueMicrotask(()=>{e&&e.selected&&e.selected!==this&&document.activeElement===o&&(e.selected?._inputElement.nativeElement.focus(),document.activeElement===o&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-radio-button"]],viewQuery:function(i,o){if(i&1&&(Ri(COt,5),Ri(xOt,7,Bn)),i&2){let r;Le(r=Ne())&&(o._inputElement=r.first),Le(r=Ne())&&(o._rippleTrigger=r.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(i,o){i&1&&ie("focus",function(){return o._inputElement.nativeElement.focus()}),i&2&&(Ge("id",o.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),Vn("mat-primary",o.color==="primary")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("mat-mdc-radio-checked",o.checked)("mat-mdc-radio-disabled",o.disabled)("mat-mdc-radio-disabled-interactive",o.disabledInteractive)("_mat-animation-noopable",o._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",je],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:ln(e)],checked:[2,"checked","checked",je],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",je],required:[2,"required","required",je],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",je]},outputs:{change:"change"},exportAs:["matRadioButton"],ngContentSelectors:wOt,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio","aria-invalid","false",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,o){if(i&1){let r=tt();Nn(),k(0,"div",2,0)(2,"div",3)(3,"div",4),ie("click",function(d){return se(r),ae(o._onTouchTargetClick(d))}),D(),k(4,"input",5,1),ie("change",function(d){return se(r),ae(o._onInputInteraction(d))}),D(),k(6,"div",6),ce(7,"div",7)(8,"div",8),D(),k(9,"div",9),ce(10,"div",10),D()(),k(11,"label",11),pn(12),D()()}i&2&&(E("labelPosition",o.labelPosition),T(2),Vn("mdc-radio--disabled",o.disabled),T(2),E("id",o.inputId)("checked",o.checked)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),Ge("name",o.name)("value",o.value)("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledby)("aria-describedby",o.ariaDescribedby)("aria-disabled",o.disabled&&o.disabledInteractive?"true":null),T(5),E("matRippleTrigger",o._rippleTrigger.nativeElement)("matRippleDisabled",o._isRippleDisabled())("matRippleCentered",!0),T(2),E("for",o.inputId))},dependencies:[im,fP],styles:[`.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mat-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:not([disabled])~.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-hover-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-pressed-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mat-radio-state-layer-size, 40px);height:var(--mat-radio-state-layer-size, 40px);top:calc(-1*(var(--mat-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mat-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0);border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),background-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}@media(forced-colors: active){.mat-mdc-radio-button .mdc-radio__inner-circle{background-color:CanvasText !important}}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mat-radio-state-layer-size, 40px);height:var(--mat-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface, currentColor));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-focus-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface, currentColor));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple>.mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio>.mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:var(--mat-radio-touch-target-size, 48px);width:var(--mat-radio-touch-target-size, 48px);transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)} `],encapsulation:2,changeDetection:0})}return t})(),Nx=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,Qg,Ay,Br]})}return t})();function EOt(t,n){if(t&1){let e=tt();k(0,"mat-radio-button",2),ie("click",function(){let o=se(e).$implicit,r=P();return ae(r.onCodeTypeSelect(o))}),k(1,"span"),Q(2),D()()}if(t&2){let e=n.$implicit;E("value",e)("data-test","code-coding-system-select-"+e),T(2),dt(e)}}var hNe=(()=>{class t{constructor(){this.codingSystemOptions=["ICD-10-GM","OPS","G-DRG"],this.codingSystemChange=new ve}onCodeTypeSelect(e){this.codingSystemChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-coding-system-select"]],inputs:{codingSystem:"codingSystem",codingSystemOptions:"codingSystemOptions"},outputs:{codingSystemChange:"codingSystemChange"},decls:3,vars:1,consts:[["data-test","code-coding-system-select",3,"value"],[3,"value","data-test"],[3,"click","value","data-test"]],template:function(i,o){i&1&&(k(0,"mat-radio-group",0),lo(1,EOt,3,3,"mat-radio-button",1,jo),D()),i&2&&(E("value",o.codingSystem),T(),co(o.codingSystemOptions))},dependencies:[Nx,gb,Ay,Lp],encapsulation:2})}}return t})();var xhe=(()=>{class t{constructor(){this.codingSystemOptions=["ICD-10-GM","OPS","G-DRG"],this.codingSystemChange=new ve,this.config={id:"code-coding-system-select",selectLabel:"Kodierung",emitEventOnInitialSelection:!0,option:{sortFnc:(e,i)=>e.localeCompare(i),searchOptionAccessor:e=>e,uniqueFnc:e=>e}},this.options=vc}ngOnInit(){this.options=ci(this.codingSystemOptions)}onCodingSystemSelect(e){this.codingSystemChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-coding-system-select-inline"]],inputs:{codingSystem:"codingSystem",codingSystemOptions:"codingSystemOptions"},outputs:{codingSystemChange:"codingSystemChange"},decls:1,vars:3,consts:[[3,"selection","config","initialSelection","selectOptions"]],template:function(i,o){i&1&&(k(0,"bd-ui-single-select",0),ie("selection",function(s){return o.onCodingSystemSelect(s)}),D()),i&2&&E("config",o.config)("initialSelection",o.codingSystem)("selectOptions",o.options)},dependencies:[jl],encapsulation:2})}}return t})();var MQ=class t{static fromObj(n,e){return new t(new zs(e.content.code.name,void 0,n,"specific"),e.content.year,e.content.sum,e.content.percentageByAgmId,e.additionalInformation.text)}constructor(n,e,i,o,r){this.code=n,this.year=e,this.sum=i,this.percentageByAgmId=o,this.additionalInformation=r}};var $u=(()=>{class t{static toQueryParams(e){function i(o){return`${o.codingSystem}--${o.hierarchyElementType}--${o.name}`}return{codes:e.map(o=>i(o))}}static fromQueryParams(e){return e.has("codes")?e.getAll("codes").map(i=>{let o=i.split("--");return new zs(o[2],void 0,o[0],o[1])}):[]}constructor(e,i){this._httpClient=e,this._environmentService=i,this._codeCache={},this._codeStore=new bU(this._environmentService)}get$(e,i,o=new Pr){if(o.keys().length>0)return this._get(e,i,o);if(this._codeCache[e]){let r=this._codeCache[e][i];if(r)return r.pipe(vt(s=>s.clone()))}else this._codeCache[e]={};return this._codeCache[e][i]=this._get(e,i,o).pipe(vt(r=>r.clone()),du(1)),this._codeCache[e][i]}getAll(e,i,o=new Pr){let r=this._codeStore.codingSystem(e),s;return e==="G-DRG"?s=this._httpClient.post(r,i,{params:o}).pipe(vt(d=>{let m={};return Object.keys(d).forEach(v=>{let w=d[v];m[v]=new YP(w.drgCode.name,w.drgCode.description,w.drgCode.year,w.mainDepartment)}),m})):s=this._httpClient.post(r,i,{params:o}).pipe(vt(d=>{let m={};return Object.keys(d).forEach(v=>{m[v]=zs.fromObject(d[v])}),m})),s.pipe(Vo(d=>{Object.keys(d).forEach(m=>{this._addToCache(e,m,d[m])})})),s}children(e,i,o){let r=this._codeStore.children(e),s={codes:i};return o&&(s={codes:i,numberOfDigits:o}),this._httpClient.post(r,s).pipe(vt(d=>d.map(zs.fromObject)))}find(e,i,o,r,s=new Pr){let d=this._codeStore.codingSystem(e);return i&&(s=s.set("query",i)),o&&(s=s.set("numberOfDigits",o.toString())),r&&(s=s.set("limit",r)),this._httpClient.get(d,{params:s}).pipe(vt(m=>m.map(v=>mt(be({},v),{codingSystem:e})).map(v=>zs.fromObject(v))),Vo(m=>{m.forEach(v=>{this._addToCache(e,v.name,v)})}))}getAgeGroupDistribution(e,i,o=new Pr){let r=this._codeStore.codeAgeGroupDistribution(e,i);return this._httpClient.get(r,{params:o}).pipe(vt(s=>MQ.fromObj(e,s)))}prevalence(e,i,o=new Pr){let r=this._codeStore.codePrevalence(e,i);return this._httpClient.get(r,{params:o}).pipe(vt(s=>{let d={additionalInformation:s.additionalInformation,prevalencePerAdId:{}};return Object.keys(s.prevalencePerAdId).forEach(m=>{d.prevalencePerAdId[m]=mt(be({},s.prevalencePerAdId[m]),{code:zs.fromObject(s.prevalencePerAdId[m].code)})}),d}))}getCasesTimeSeries(e,i,o=new Pr){let r=`${this._codeStore.codeByCodeName(e,i)}/cases/timeseries`;return this._httpClient.get(r,{params:o})}getPatientMigration(e,i,o,r){return this._fetchPatientMigration(e,i,o,r)}treePath(e,i){let o=this._codeStore.treeParent(e,i),r=s=>{let d;return s.hasParent&&s.parent&&(d=r(s.parent)),{type:e,data:g0.fromObject(s),parent:d,key:s.name,label:s.name,leaf:s.nodeType==="external"}};return this._httpClient.get(o).pipe(vt(s=>r(s)))}treeChildren(e,i,o){let r=i?this._codeStore.treeChildren(e):this._codeStore.codeGroup(e);return i?this._httpClient.post(r,{values:[i],year:o}).pipe(vt(s=>s[i]),vt(s=>s.map(d=>({data:g0.fromObject(d),type:d.codingSystem,key:d.name,label:`${d.name} - ${d.description}`,leaf:d.nodeType==="external"})))):this._httpClient.get(r).pipe(vt(s=>s.map(d=>({data:g0.fromObject(d),type:d.codingSystem,key:d.name,label:`${d.name} - ${d.description}`,leaf:d.nodeType==="external"}))))}static reverse(e){return e.parent?(e.parent.children=[e],this.reverse(e.parent)):e}_get(e,i,o){let r=this._codeStore.codeByCodeName(e,i);return this._httpClient.get(r,{params:o}).pipe(vt(s=>g0.fromObject(s)))}_fetchPatientMigration(e,i,o,r){let s=`${this._codeStore.codingSystem(e)}patient-migration`,d={year:o?.toString(),codes:i.map(m=>({name:m,codingSystem:e,hierarchyElementType:"specific"})),administrativeDistrictIds:r?.map(m=>m.getNumericValue())};return this._httpClient.post(s,d)}_addToCache(e,i,o){this._codeCache[e]||(this._codeCache[e]={}),this._codeCache[e][i]=ci(o)}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var fNe={viewState:"responsive"};var OQ=class{constructor(n){this._codeService=n,this.isValid=!1,this.code$=new pi,this.loading$=new pi(Gt.INIT)}resolve(n,e){return this.loading$.next(Gt.LOADING),Wl(this._codeService.get$(n,e)).then(i=>{switch(i.name=e,n){case"OPS":case"PROCEDURE-AT":case"ICD-10-GM":case"ICD-10-AT":case"G-DRG":{this.isValid=!0;break}default:{this.isValid=!1;break}}return this.code$.next(i),this.loading$.next(Gt.SUCCESS),i}).catch(i=>(console.error(i),this.isValid=!1,this.loading$.next(Gt.ERROR),null))}};var gNe=(()=>{class t{static _getCodePath(e){return["/code-browser",e.codingSystem,e.name]}constructor(e){this._environmentService=e}get(e,i){return i.target==="_self"?ci(this.internal(e)):ci(this.external(e))}internal(e){return t._getCodePath(e)}external(e,i="ANALYTICS_APP_URL"){return this._environmentService.load(i)+t._getCodePath(e).join("/")}static{this.\u0275fac=function(i){return new(i||t)(di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function AOt(t,n){if(t&1&&(k(0,"bd-link-internal",0)(1,"mat-icon",1),Q(2,"open_in_new"),D()()),t&2){let e=P(2);E("link",e.asType(e.link))}}function kOt(t,n){if(t&1&&(k(0,"bd-link-external",0)(1,"mat-icon",1),Q(2,"open_in_new"),D()()),t&2){let e=P(2);E("link",e.asType(e.link))}}function MOt(t,n){if(t&1&&(qe(0,AOt,3,1,"bd-link-internal",0),qe(1,kOt,3,1,"bd-link-external",0)),t&2){let e=P();Ke(e.options.target==="_self"?0:-1),T(),Ke(e.options.target==="_blank"?1:-1)}}var RQ=(()=>{class t{constructor(e,i){this._codeLinkService=e,this._cdr=i,this.options=hq,this.link=null}ngOnChanges(e){e.code&&this._onCodeChange(e.code)}asType(e){return e}_onCodeChange(e){e.currentValue&&this._codeLinkService.get(e.currentValue,this.options).subscribe(i=>{this.link=i,this._cdr.detectChanges()})}static{this.\u0275fac=function(i){return new(i||t)(_e(gNe),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-icon-link"]],inputs:{code:"code",options:"options"},features:[Ot],decls:1,vars:1,consts:[[3,"link"],["color","accent"]],template:function(i,o){i&1&&qe(0,MOt,2,2),i&2&&Ke(o.link?0:-1)},dependencies:[pq,$o,mr,uq],encapsulation:2,changeDetection:0})}}return t})();function OOt(t,n){if(t&1&&(k(0,"div",3)(1,"p",4),Q(2),D()(),k(3,"div",5),ce(4,"ays-code-icon-link",6),D()),t&2){let e=P();T(2),Qi(" ",e.code.description," "),T(2),E("code",e.code)("options",e.linkOptions)}}var _Ne=(()=>{class t{constructor(e,i){this.ref=e,this._config=i,this.linkOptions={target:"_blank"},this.code=this._config.data?.code}static{this.\u0275fac=function(i){return new(i||t)(_e(es),_e(Us))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:5,vars:1,consts:[[1,"flex","flex-row","gap-6","items-center"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],[1,"flex-1"],[1,"mat-body"],[1,"basis-10"],[3,"code","options"]],template:function(i,o){i&1&&(k(0,"div",0),qe(1,OOt,5,3),D(),k(2,"div",1)(3,"button",2),ie("click",function(){return o.ref.close()}),Q(4,"Schlie\xDFen"),D()()),i&2&&(T(),Ke(o.code?1:-1))},dependencies:[RQ,Tn,yo],encapsulation:2})}}return t})();var yNe=(()=>{class t{constructor(e){this._dialogService=e}ngOnInit(){this.resolver.code$.subscribe(e=>this.code=e)}openDialog(){let e=mt(be({},ju),{header:this.code.name,data:{code:this.code}});this._dialogService.open(_Ne,e)}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-info-dialog-button"]],inputs:{codeName:"codeName",resolver:"resolver",options:"options"},features:[jt([Mo])],decls:4,vars:2,consts:[["mat-button","","color","accent",3,"click","disabled"]],template:function(i,o){i&1&&(k(0,"div")(1,"button",0),ie("click",function(){return o.openDialog()}),k(2,"span"),Q(3),D()()()),i&2&&(T(),E("disabled",!o.resolver.isValid),T(2),dt((o.code==null?null:o.code.name)||o.codeName))},dependencies:[Tn,yo],encapsulation:2})}}return t})();var vNe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-loading-indicator-list-item"]],decls:6,vars:1,consts:[[1,"flex","flex-row","gap-6","items-center"],[1,"basis-24"],[3,"height"],[1,"flex-1"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1),ce(2,"p-skeleton",2),D(),k(3,"div",3),ce(4,"p-skeleton")(5,"p-skeleton"),D()()),i&2&&(T(2),E("height","36px"))},dependencies:[of,mm],encapsulation:2})}}return t})();function ROt(t,n){if(t&1&&(k(0,"div"),ce(1,"ays-code-icon-link",10),D()),t&2){let e=P(2);T(),E("code",e.code)("options",e.linkOptions)}}function FOt(t,n){if(t&1&&(k(0,"div",4)(1,"div",5)(2,"span",6),Q(3),D()(),k(4,"div",7)(5,"div",8)(6,"div",7)(7,"span",9),Q(8),D()(),qe(9,ROt,2,2,"div"),D()()()),t&2){let e=P();T(3),dt(e.code.name),T(5),dt(e.code==null?null:e.code.description),T(),Ke(e.resolver.isValid?9:-1)}}function POt(t,n){if(t&1&&(k(0,"div",11)(1,"div",5)(2,"span",6),Q(3),D()(),k(4,"div",7)(5,"span",9),Q(6,"n/a"),D()()()),t&2){let e=P();T(3),dt(e.codeName)}}function LOt(t,n){t&1&&ce(0,"ays-code-loading-indicator-list-item")}var bNe=(()=>{class t{constructor(){this.linkOptions={target:"_blank"}}ngOnInit(){this.resolver.code$.pipe(Sn(1)).subscribe(e=>this.code=e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-info-inline"]],inputs:{codeName:"codeName",resolver:"resolver",options:"options"},decls:7,vars:4,consts:[["resultTpl",""],["errorTpl",""],["loadingIndicatorTpl",""],[3,"loadItem","customLoadingTemplate","successTemplate","errorTemplate"],[1,"flex","flex-row","gap-6"],[1,"basis-24"],[1,"mat-body-2"],[1,"flex-1"],[1,"flex","flex-col","lg:flex-row"],[1,"mat-body-1"],[3,"code","options"],[1,"flex","flex-row","gap-6","items-center"]],template:function(i,o){if(i&1&&(ce(0,"bd-loader",3),ee(1,FOt,10,3,"ng-template",null,0,Pt)(3,POt,7,1,"ng-template",null,1,Pt)(5,LOt,1,0,"ng-template",null,2,Pt)),i&2){let r=ti(2),s=ti(4),d=ti(6);E("loadItem",o.resolver.loading$)("customLoadingTemplate",d)("successTemplate",r)("errorTemplate",s)}},dependencies:[Kn,RQ,vNe],encapsulation:2})}}return t})();function NOt(t,n){if(t&1&&ce(0,"ays-code-info-inline",0),t&2){let e=P();E("resolver",e.resolver)("codeName",e.name)("options",e.options)}}function BOt(t,n){if(t&1&&ce(0,"ays-code-info-dialog-button",0),t&2){let e=P();E("resolver",e.resolver)("codeName",e.name)("options",e.options)}}var CNe=(()=>{class t extends dr{constructor(e,i,o){super(),this._breakpointObserver=e,this._codeService=i,this._cdr=o,this.options=fNe,this.resolver=new OQ(this._codeService)}ngOnChanges(e){e.name&&e.codingSystem&&this._onCodeChange(),e.options&&this._onOptionsChange()}ngOnDestroy(){this._responsiveSub&&this._responsiveSub.unsubscribe()}_onOptionsChange(){this.options.viewState==="responsive"?this._initResponsiveListener():this._setActiveViewState(this.options.viewState)}_onCodeChange(){this.resolver.resolve(this.codingSystem,this.name).then(()=>this._cdr.detectChanges())}_initResponsiveListener(){this._responsiveSub&&(this._responsiveSub.unsubscribe(),this._responsiveSub=null),this._responsiveSub=this._breakpointObserver.observe([tm.Large,tm.XLarge,tm.Medium]).subscribe(e=>this._setActiveViewState(e.matches?"inline":"dialog"))}_setActiveViewState(e){this.activeViewState=e,this._cdr.markForCheck()}static{this.\u0275fac=function(i){return new(i||t)(_e(s0),_e($u),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-info"]],inputs:{codingSystem:"codingSystem",name:"name",options:"options"},features:[ft,Ot],decls:2,vars:1,consts:[[3,"resolver","codeName","options"]],template:function(i,o){i&1&&qe(0,NOt,1,3,"ays-code-info-inline",0)(1,BOt,1,3,"ays-code-info-dialog-button",0),i&2&&Ke(o.activeViewState==="inline"?0:1)},dependencies:[bNe,yNe],encapsulation:2,changeDetection:0})}}return t})();function VOt(t,n){if(t&1){let e=tt();k(0,"div",3)(1,"ays-code-spectrum-select-inline-includes",6),ie("includesChange",function(o){se(e);let r=P();return ae(r.onFieldChange("includes",o))}),D()()}if(t&2){let e=P();T(),E("includes",e.selectHandler==null?null:e.selectHandler.codeSpectrumSelect.includes)}}function zOt(t,n){if(t&1){let e=tt();k(0,"div",4)(1,"ays-code-coding-system-select-inline",7),ie("codingSystemChange",function(o){se(e);let r=P();return ae(r.onFieldChange("codingSystem",o))}),D()()}if(t&2){let e=P();T(),E("codingSystem",e.selectHandler==null||e.selectHandler.codeSpectrumSelect==null?null:e.selectHandler.codeSpectrumSelect.codingSystem)("codingSystemOptions",e.selectHandler==null||e.selectHandler.options==null?null:e.selectHandler.options.codingSystems)}}function UOt(t,n){if(t&1){let e=tt();k(0,"div",1)(1,"ays-code-spectrum-select-inline-code-type-specification",8),ie("codeTypeSpecificationChange",function(o){se(e);let r=P();return ae(r.onFieldChange("codeTypeSpecification",o))}),D()()}if(t&2){let e=P();T(),E("codingSystem",e.selectHandler==null||e.selectHandler.codeSpectrumSelect==null?null:e.selectHandler.codeSpectrumSelect.codingSystem)("codeTypeSpecification",e.selectHandler==null||e.selectHandler.codeSpectrumSelect==null?null:e.selectHandler.codeSpectrumSelect.codeTypeSpecification)}}function HOt(t,n){if(t&1){let e=tt();k(0,"div",1)(1,"ays-code-spectrum-select-inline-grouper-version",9),ie("grouperVersionYearChange",function(o){se(e);let r=P();return ae(r.onGrouperVersionChange(o))}),D()()}if(t&2){let e=P();T(),E("grouperVersionYear",e.codeSpectrumSelect.grouperVersionYear)}}function jOt(t,n){if(t&1){let e=tt();k(0,"div",4)(1,"ays-code-spectrum-select-inline-matching-specification",10),ie("matchingSpecificationChange",function(o){se(e);let r=P();return ae(r.onFieldChange("matching",o))}),D()()}if(t&2){let e=P();T(),E("matchingSpecification",e.selectHandler.codeSpectrumSelect.matching)("codeTypeSpecification",e.selectHandler.codeSpectrumSelect.codeTypeSpecification)}}function GOt(t,n){if(t&1){let e=tt();k(0,"div",1)(1,"ays-code-spectrum-select-inline-code-type-classifications",11),ie("codeTypeClassificationChange",function(o){se(e);let r=P();return ae(r.onFieldChange("codeTypeClassification",o))}),D()()}if(t&2){let e=P();T(),E("codingSystem",e.selectHandler==null||e.selectHandler.codeSpectrumSelect==null?null:e.selectHandler.codeSpectrumSelect.codingSystem)("matchingSpecification",e.selectHandler==null||e.selectHandler.codeSpectrumSelect==null?null:e.selectHandler.codeSpectrumSelect.matching)("codeTypeClassification",e.selectHandler==null||e.selectHandler.codeSpectrumSelect==null?null:e.selectHandler.codeSpectrumSelect.codeTypeClassification)("codeTypeClassificationOptions",e.selectHandler==null?null:e.selectHandler.codeTypeClassificationOptions)}}var xNe=(()=>{class t extends dr{constructor(){super(...arguments),this.options=TN,this.optionsInlineSelect=yU,this.codeSpectrumSelectChange=new ve,this.selectHandler=new vU,this.codeSpectraSelects=[],this.resourceName=ko.CODE_SPECTRUM}ngOnInit(){this.selectHandler=new vU(this.codeSpectrumSelect,this.options);let e=this.selectHandler.update$.subscribe(i=>{console.log("UPDATE from handler",JSON.stringify(i)),this.codeSpectrumSelectChange.emit(i),i.codeSpectrumIds&&i.codeSpectrumIds.length>0?this.codeSpectraSelects=i.codeSpectrumIds.map(o=>({id:o,resource:null})):i.codeSpectra&&i.codeSpectra.length>0?this.codeSpectraSelects=i.codeSpectra.map(o=>({id:o.id,resource:o})):this.codeSpectraSelects=[]});this.codeSpectrumSelect&&this.selectHandler.update$.next(this.codeSpectrumSelect),this._subs.push(e)}ngOnChanges(e){e.options&&e.options.currentValue&&this._onOptionsChange(),e.codeSpectrumSelect&&e.codeSpectrumSelect.currentValue&&(this.selectHandler.codeSpectrumSelect=this.codeSpectrumSelect)}ngOnDestroy(){this.unsubscribeAll()}onFieldChange(e,i){this.selectHandler.updateCodeSpectraSelect(e,i)}onGrouperVersionChange(e){e===-1?this.onFieldChange("grouperVersionYear",void 0):this.onFieldChange("grouperVersionYear",e)}_onOptionsChange(){this.selectHandler&&(this.selectHandler.options=this.options)}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})()}static{this.\u0275cmp=ne({type:t,selectors:[["ays-code-spectrum-select-inline-multiple"]],inputs:{codeSpectrumSelect:"codeSpectrumSelect",options:"options",optionsInlineSelect:"optionsInlineSelect"},outputs:{codeSpectrumSelectChange:"codeSpectrumSelectChange"},features:[ft,Ot],decls:12,vars:9,consts:[[1,"flex","flex-col"],[1,"flex-1"],[1,"flex","flex-row","gap-2"],[1,"flex-1","w-36"],[1,"flex-1","w-24"],[3,"resourceSelectChange","resourceName","resourceSelects","config"],[3,"includesChange","includes"],[3,"codingSystemChange","codingSystem","codingSystemOptions"],[3,"codeTypeSpecificationChange","codingSystem","codeTypeSpecification"],[3,"grouperVersionYearChange","grouperVersionYear"],[3,"matchingSpecificationChange","matchingSpecification","codeTypeSpecification"],[3,"codeTypeClassificationChange","codingSystem","matchingSpecification","codeTypeClassification","codeTypeClassificationOptions"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"div",2),qe(3,VOt,2,1,"div",3),qe(4,zOt,2,2,"div",4),D()(),qe(5,UOt,2,2,"div",1),qe(6,HOt,2,1,"div",1),k(7,"div",1)(8,"bd-resources-select-inline-multiple",5),ie("resourceSelectChange",function(s){return o.onFieldChange("codeSpectra",s)}),D()(),k(9,"div",2),qe(10,jOt,2,2,"div",4),qe(11,GOt,2,4,"div",1),D()()),i&2&&(T(3),Ke(o.options.includesExcludesSelection?3:-1),T(),Ke(o.options.codingSystems.length>1?4:-1),T(),Ke(o.options.codeTypeSpecification&&o.selectHandler&&o.selectHandler.codeSpectrumSelect&&o.selectHandler.codeSpectrumSelect.codingSystem!=="G-DRG"?5:-1),T(),Ke(o.options.grouperVersionYear&&o.selectHandler.codeSpectrumSelect.codingSystem==="G-DRG"?6:-1),T(2),E("resourceName",o.resourceName)("resourceSelects",o.codeSpectraSelects)("config",o.optionsInlineSelect),T(2),Ke(o.options.matchingSpecification&&o.selectHandler&&o.selectHandler.codeSpectrumSelect&&o.selectHandler.codeSpectrumSelect.codingSystem!=="G-DRG"?10:-1),T(),Ke(o.options.codeTypeClassifications==="selectable"?11:-1))},dependencies:[kpe,WPe,KPe,qPe,dS,YPe,xhe],encapsulation:2,changeDetection:0})}}return t})();var Hs=class extends b0{constructor(n,e,i,o,r,s){super(n,e,i),this._registeredFilter=o,this._httpClient=r,this._codeSpectrumService=s,this._api=new pQ(this.getBaseUrl(),e.load(n.API_TOKENS.RESULT))}static newDefaultClinicFilter(){return new uf(null,null,null,null,null,new x0([]))}findAll(n,e){let i=this._api.crud(),o=new Pr;return n&&(o=o.append("minPermission",n)),e&&(o=o.append("maxPermission",e)),this._httpClient.get(i,{params:o}).pipe(Mn(r=>{let s=r.map(d=>uf.fromObj(d,this._registeredFilter));return nr(Promise.all(s))}))}findById(n){let e=this._api.findById(n);return this._cache.cacheObservable(this.key(n),this._httpClient.get(e).pipe(Mn(i=>uf.fromObj(i,this._registeredFilter)),du(1)))}create(n){let e=this._api.crud();return nr(n.toRequestFormat({codeSpectra:new dM(this._codeSpectrumService)})).pipe(Mn(i=>this._httpClient.post(e,i)),Mn(i=>uf.fromObj(i,this._registeredFilter)))}update(n){this.deleteCacheForKey(n.id);let e=this._api.crud();return nr(n.toRequestFormat({codeSpectra:new dM(this._codeSpectrumService)})).pipe(Mn(i=>this._httpClient.put(e,i)),vt(()=>null))}result(n,e=Cd){let i=this._api.result(),o=$a.and(n.expression.clone(),new Ty(e));return nr(o.toCondition({clinicIds:new cM(e),codeSpectra:new dM(this._codeSpectrumService)})).pipe(Mn(r=>this._httpClient.post(i,r)),vt(r=>r.map(s=>(s.clinic.id=ga.fromObj(s.clinic.id),s.clinic.address=Ih.fromObject(s.clinic.address),s))))}staffingByClinicsFilter(n,e=new Pr,i=Cd){let o=this._api.staffingByClinicsFilter(),r=$a.and(n.expression.clone(),new Ty(i));return nr(r.toCondition({codeSpectra:new dM(this._codeSpectrumService),clinicIds:new cM(i)})).pipe(Mn(s=>this._httpClient.post(o,s,{params:e})),vt(s=>Pw.responseToPage(s,$Y.fromObjArr)))}caseNumbersByClinicsFilter(n,e=new Pr,i=Cd){let o=this._api.caseNumbersByClinicsFilter(),r=$a.and(n.expression.clone(),new Ty(i));return nr(r.toCondition({codeSpectra:new dM(this._codeSpectrumService),clinicIds:new cM(i)})).pipe(Mn(s=>this._httpClient.post(o,s,{params:e})),vt(s=>Pw.responseToPage(s,qY.fromObjArr)))}export(n,e=Cd){let i=this._api.export(),o=$a.and(n.expression.clone(),new Ty(e));return nr(o.toCondition({codeSpectra:new dM(this._codeSpectrumService),clinicIds:new cM(e)})).pipe(Mn(r=>this._httpClient.post(i,r)),vt(r=>KY.fromObjArr(r))).toPromise()}};var wNe=(()=>{class t{constructor(e){this._clinicsFilterService=e}resolve(e){let i=e.params.clinicsFilterId;return this._clinicsFilterService.findById(i)}static{this.\u0275fac=function(i){return new(i||t)(di(Hs))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var SNe={showNameField:!0};var AN=class{constructor(n,e,i){this.id=n,this.data=e,this.isValid=i}};var FQ=Ap(che());var bp=class t{constructor(){this._processSource=new hi}static createSchemaFile(n){let e=[],i=n.columnDefinitions,o={};i.forEach(d=>o[d.fieldName]=`${d.displayName}_1`),e.push(o);let r={};i.forEach(d=>r[d.fieldName]=`${d.displayName}_2`),e.push(r);let s={};return i.forEach(d=>s[d.fieldName]=`${d.displayName}_2`),e.push(s),(0,FQ.unparse)(e,{delimiter:";",header:!0})}static isNumber(n){return n!=null&&n!==""&&!isNaN(Number(n.toString()))}static validateRow(n,e,i){if(!i)return Promise.resolve(new AN(n,e.map(r=>({value:r,valid:!0})),!0));if(e.lengthr.validationFnc?UO(r.validationFnc(e[s],e))?Wl(r.validationFnc(e[s],e)):Promise.resolve(r.validationFnc(e[s],e)):Promise.resolve(!0));return Promise.all(o).then(r=>new AN(n,e.map((s,d)=>({value:s,valid:r[d]})),r.every(s=>s)))}static removeDuplicateRows(n){return n.filter((e,i,o)=>!o.filter((r,s)=>this._isEqualRow(e,r)&&sr)})}static applyMappingOnRow(n,e){return Object.keys(n).map(i=>parseInt(i)).map(i=>mt(be({},n[i]),{originalIndex:i})).map(i=>{let o=e.length-1>=(i.rowIndex??e.length),r=!i.shouldBeEmpty&&i.rowIndex!==null;return o&&r?e[i.rowIndex]:""})}static _isEqualRow(n,e){return JSON.stringify(n)===JSON.stringify(e)}static _isEmptyRow(n){return n.every(e=>e==null||e==="")}static _validateChunk(n,e,i,o,r){return bt(this,null,function*(){let s=r.length,d=yield Promise.all(e.map((m,v)=>t.validateRow(s+v,m,o)));return r.push(...d),d!==void 0&&i.length?this._validateChunk(n,i.splice(0,n),i,o,r):Promise.resolve(r)})}process(n,e,i={delimiter:";"}){let o=[];return(0,FQ.parse)(n,{delimiter:i.delimiter,step:r=>{e?o.push(t.applyMappingOnRow(e,r.data)):o.push(r.data)},complete:()=>this._onParseComplete(o,n.name),error:r=>this._onParseError(r)}),this._processSource.asObservable()}_onParseComplete(n,e){let i=n.filter(o=>!t._isEmptyRow(o));this._processSource.next({originalFileName:e,data:i})}_onParseError(n){this._processSource.error(n)}};function KOt(t,n){if(t&1&&(k(0,"div",3)(1,"mat-form-field")(2,"mat-label"),Q(3),D(),ce(4,"input",7),D()()),t&2){let e=n.$implicit,i=P();T(3),dt(i.getPlaceholderBy(e)),T(),E("formControlName",e)}}var TNe=(()=>{class t{constructor(e,i){this._dialogRef=e,this.data=i,this.formGroup=new hu({})}ngOnInit(){this.definition=this.data.config.columnDefinitions.map((e,i)=>({ctrlName:`${e.fieldName}Ctrl`,placeholder:e.displayName,editable:e.editable,value:this.data.row.data[i].value})),this.definition.forEach(e=>{let i=new yr({value:e.value,disabled:!e.editable},Ys.required);this.formGroup.addControl(e.ctrlName,i)})}getControls(){return Object.keys(this.formGroup.controls)}getPlaceholderBy(e){let i=this.definition.find(o=>o.ctrlName===e).placeholder||"";return i.startsWith("Spalte")?i:`Spalte ${i}`}submit(){let e=this.data.row;this.definition.forEach((i,o)=>{this.data.row.data[o]={value:this.formGroup.get(i.ctrlName).value,valid:!1}}),this._dialogRef.close(e)}static{this.\u0275fac=function(i){return new(i||t)(_e(oy),_e(XC))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:12,vars:4,consts:[["matDialogTitle",""],[3,"ngSubmit","formGroup"],[1,"flex","flex-col"],[1,"flex-1"],[3,"align"],["type","button","mat-button","",3,"mat-dialog-close"],["type","submit","color","accent","mat-raised-button","",3,"disabled"],["matInput","",3,"formControlName"]],template:function(i,o){i&1&&(k(0,"h1",0),Q(1,"Zeile bearbeiten"),D(),k(2,"form",1),ie("ngSubmit",function(){return o.submit()}),k(3,"mat-dialog-content")(4,"div",2),lo(5,KOt,5,2,"div",3,jo),D()(),k(7,"mat-dialog-actions",4)(8,"button",5),Q(9," Abbrechen "),D(),k(10,"button",6),Q(11," \xC4nderungen \xFCbernehmen "),D()()()),i&2&&(T(2),E("formGroup",o.formGroup),T(3),co(o.getControls()),T(2),E("align","end"),T(),E("mat-dialog-close",null),T(2),E("disabled",o.formGroup.invalid||o.formGroup.pristine))},dependencies:[Aw,xr,$m,Ml,no,Gm,zu,l0,Hv,Ra,rs,Ol,pl,Fa,jv,Tn,yo,Dw],encapsulation:2})}}return t})();var WOt=()=>[5,10,25,50],YOt=()=>({"min-width":"50rem"}),QOt=t=>({"invalid-cell":t}),INe=(t,n)=>n.fieldName;function ZOt(t,n){if(t&1&&(k(0,"th"),Q(1),D()),t&2){let e=n.$implicit;T(),Qi(" ",e.displayName," ")}}function XOt(t,n){if(t&1&&(k(0,"tr")(1,"th",3)(2,"div",4)(3,"mat-icon"),Q(4,"error_outline"),D(),ce(5,"p-sortIcon",5),D()(),lo(6,ZOt,2,1,"th",null,INe),ce(8,"th",6),D()),t&2){let e=n.$implicit;T(6),co(e)}}function JOt(t,n){t&1&&(k(0,"mat-icon",8),Q(1,"error_outline "),D())}function eRt(t,n){if(t&1&&(k(0,"td"),Q(1),D()),t&2){let e=n.$implicit,i=n.$index,o=P().$implicit,r=P();Oe(ki(3,QOt,!o.data[i].valid)),T(),Qi(" ",r.getValueForColumn(e.fieldName,o)," ")}}function tRt(t,n){if(t&1){let e=tt();k(0,"button",13),ie("click",function(){se(e);let o=P().$implicit,r=P();return ae(r.editRow(o))}),k(1,"mat-icon"),Q(2,"edit"),D()()}}function iRt(t,n){if(t&1){let e=tt();k(0,"tr")(1,"td",7),qe(2,JOt,2,0,"mat-icon",8),D(),lo(3,eRt,2,5,"td",9,INe),k(5,"td",6)(6,"div",10),qe(7,tRt,3,0,"button",11),k(8,"button",12),ie("click",function(){let o=se(e).$implicit,r=P();return ae(r.removeRow(o))}),k(9,"mat-icon"),Q(10,"delete"),D()()()()()}if(t&2){let e=n.$implicit,i=n.columns,o=P();T(2),Ke(e.isValid?-1:2),T(),co(i),T(4),Ke(o.editModeEnabled?7:-1)}}var whe=(()=>{class t{constructor(e,i){this._dialog=e,this._responsiveDialogService=i,this.rowsChange=new ve,this.displayedColumns=[],this.editModeEnabled=!1,this._mapping={}}ngOnInit(){this.columnCount=this.config?.columnDefinitions.length||this.rows[0]?.data?.length,this.columnDefinitions=this.config?.columnDefinitions?.map(e=>({fieldName:e.fieldName,displayName:e.displayName,editable:e.editable}))||this._createColumnDefinition(this.rows[0]),this.editModeEnabled=this.config.columnDefinitions.map(e=>e.editable).filter(e=>!!e).some(e=>e),this._updateMapping(),this.displayedColumns=this.columnDefinitions}editRow(e){let i=this._responsiveDialogService.config();i.data={row:JSON.parse(JSON.stringify(e)),config:this.config},this._dialog.open(TNe,i).afterClosed().pipe(wn(o=>!!o)).subscribe(o=>{o&&(this.rows=this.rows.filter(r=>r.id!==o.id).concat(o).sort((r,s)=>r.id-s.id),this.rowsChange.emit(this.rows))})}removeRow(e){this.rows=this.rows.filter(i=>i.id!==e.id),this.rowsChange.emit(this.rows)}getValueForColumn(e,i){return i.data[this._mapping[e]]?.value}_createColumnDefinition(e){let i=[];return e?.data?.forEach(o=>{if(o.value.length===0){console.warn(`Column ${o} cannot be accept, is empty`);return}if(i.some(r=>r.fieldName===o.value)){console.warn(`Column ${o} exists already, skip this`);return}i.push({fieldName:o.value,displayName:o.value,editable:!1})}),i}_updateMapping(){this.columnDefinitions.forEach((e,i)=>this._mapping[e.fieldName]=i)}static{this.\u0275fac=function(i){return new(i||t)(_e(Yg),_e(kw))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-csv-import-result-table"]],inputs:{config:"config",rows:"rows"},outputs:{rowsChange:"rowsChange"},decls:3,vars:9,consts:[["dataKey","id","sortField","isValid","currentPageReportTemplate","{first} - {last} von {totalRecords}","styleClass","p-datatable-gridlines p-datatable-sm",3,"columns","value","paginator","rows","rowsPerPageOptions","showCurrentPageReport","tableStyle"],["pTemplate","header"],["pTemplate","body"],["pSortableColumn","isValid",1,"mat-column-error-indicator"],[1,"flex","flex-row","items-center"],["field","isValid"],[1,"mat-column-options"],[1,"mat-column-error-indicator"],["matTooltip","Fehler in diese Zeile",1,"mat-warn"],[3,"class"],[1,"flex","flex-row","gap-2"],["mat-icon-button","","matTooltip","Zeile bearbeiten","color","accent"],["mat-icon-button","","matTooltip","Zeile l\xF6schen","color","accent",3,"click"],["mat-icon-button","","matTooltip","Zeile bearbeiten","color","accent",3,"click"]],template:function(i,o){i&1&&(k(0,"p-table",0),ee(1,XOt,9,0,"ng-template",1)(2,iRt,11,2,"ng-template",2),D()),i&2&&E("columns",o.displayedColumns)("value",o.rows)("paginator",!0)("rows",10)("rowsPerPageOptions",uo(7,WOt))("showCurrentPageReport",!0)("tableStyle",uo(8,YOt))},dependencies:[hc,hl,so,ME,OE,$o,mr,Tn,xl,Hp,Up],styles:[".invalid-cell[_ngcontent-%COMP%]{color:var(--mdc-filled-text-field-error-label-text-color)}.mat-column-error-indicator[_ngcontent-%COMP%]{width:48px}.mat-column-options[_ngcontent-%COMP%]{width:100px;text-align:right}"]})}}return t})();function nRt(t,n){if(t&1&&(k(0,"p-message",2),Q(1),D()),t&2){let e=P();T(),_d(" ",e.resultStats.invalidRows," von ",e.resultStats.totalRows," Zeilen sind fehlerhaft. Bitte entfernen Sie die Fehler oder importieren Sie eine andere Datei. ")}}function oRt(t,n){if(t&1){let e=tt();k(0,"bd-csv-import-result-table",8),ie("rowsChange",function(o){se(e);let r=P(2);return ae(r.onRowsChange(o))}),D()}if(t&2){let e=P(2);E("config",e.config)("rows",e.result)}}function rRt(t,n){if(t&1&&qe(0,oRt,1,2,"bd-csv-import-result-table",7),t&2){let e=P();Ke((e.result==null?null:e.result.length)>0?0:-1)}}var ENe=(()=>{class t{constructor(){this.dataChange=new ve,this.resetFile=new ve,this.loading$=new pi(1),this.result=[]}ngOnInit(){this.loading$.next(Gt.LOADING),bp.validate(this.data,this.config).then(e=>this.onRowsChange(e)).then(()=>{this.loading$.next(Gt.SUCCESS)}).catch(()=>this.loading$.next(Gt.ERROR))}onRowsChange(e){this.result=e,this._validateResult(),this.resultStats.hasErrors||this.emit()}emit(){let e=this.result.map(i=>i.data.map(o=>o.value));this.dataChange.emit(e)}onReset(){this.resetFile.emit(!0)}_validateResult(){let e=this.result.filter(i=>!i.isValid).length;this.resultStats={invalidRows:e,totalRows:this.result.length,hasErrors:e>0}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-csv-import-result"]],inputs:{config:"config",data:"data"},outputs:{dataChange:"dataChange",resetFile:"resetFile"},decls:11,vars:3,consts:[["successTpl",""],[1,"mat-subheading-2"],["severity","error"],[3,"loadItem","successTemplate"],[1,"flex","flex-row-reverse"],[1,"flex-none"],["mat-button","",3,"click"],[3,"config","rows"],[3,"rowsChange","config","rows"]],template:function(i,o){if(i&1){let r=tt();k(0,"span",1),Q(1,"Gefundene Daten"),D(),qe(2,nRt,2,2,"p-message",2),ce(3,"bd-loader",3),ee(4,rRt,1,1,"ng-template",null,0,Pt),k(6,"div")(7,"div",4)(8,"div",5)(9,"button",6),ie("click",function(){return se(r),ae(o.onReset())}),Q(10,"Andere Datei ausw\xE4hlen"),D()()()()}if(i&2){let r=ti(5);T(2),Ke(o.resultStats!=null&&o.resultStats.hasErrors?2:-1),T(),E("loadItem",o.loading$)("successTemplate",r)}},dependencies:[Kn,whe,Tn,yo,BLe,vS],encapsulation:2})}}return t})();var DNe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,Br]})}return t})();var ANe=` .p-steplist { position: relative; display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 0; list-style-type: none; overflow-x: auto; } .p-step { position: relative; display: flex; flex: 1 1 auto; align-items: center; gap: dt('stepper.step.gap'); padding: dt('stepper.step.padding'); } .p-step:last-of-type { flex: initial; } .p-step-header { border: 0 none; display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; transition: background dt('stepper.transition.duration'), color dt('stepper.transition.duration'), border-color dt('stepper.transition.duration'), outline-color dt('stepper.transition.duration'), box-shadow dt('stepper.transition.duration'); border-radius: dt('stepper.step.header.border.radius'); outline-color: transparent; background: transparent; padding: dt('stepper.step.header.padding'); gap: dt('stepper.step.header.gap'); } .p-step-header:focus-visible { box-shadow: dt('stepper.step.header.focus.ring.shadow'); outline: dt('stepper.step.header.focus.ring.width') dt('stepper.step.header.focus.ring.style') dt('stepper.step.header.focus.ring.color'); outline-offset: dt('stepper.step.header.focus.ring.offset'); } .p-stepper.p-stepper-readonly .p-step { cursor: auto; } .p-step-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; color: dt('stepper.step.title.color'); font-weight: dt('stepper.step.title.font.weight'); transition: background dt('stepper.transition.duration'), color dt('stepper.transition.duration'), border-color dt('stepper.transition.duration'), box-shadow dt('stepper.transition.duration'), outline-color dt('stepper.transition.duration'); } .p-step-number { display: flex; align-items: center; justify-content: center; color: dt('stepper.step.number.color'); border: 2px solid dt('stepper.step.number.border.color'); background: dt('stepper.step.number.background'); min-width: dt('stepper.step.number.size'); height: dt('stepper.step.number.size'); line-height: dt('stepper.step.number.size'); font-size: dt('stepper.step.number.font.size'); z-index: 1; border-radius: dt('stepper.step.number.border.radius'); position: relative; font-weight: dt('stepper.step.number.font.weight'); } .p-step-number::after { content: ' '; position: absolute; width: 100%; height: 100%; border-radius: dt('stepper.step.number.border.radius'); box-shadow: dt('stepper.step.number.shadow'); } .p-step-active .p-step-header { cursor: default; } .p-step-active .p-step-number { background: dt('stepper.step.number.active.background'); border-color: dt('stepper.step.number.active.border.color'); color: dt('stepper.step.number.active.color'); } .p-step-active .p-step-title { color: dt('stepper.step.title.active.color'); } .p-step:not(.p-disabled):focus-visible { outline: dt('focus.ring.width') dt('focus.ring.style') dt('focus.ring.color'); outline-offset: dt('focus.ring.offset'); } .p-step:has(~ .p-step-active) .p-stepper-separator { background: dt('stepper.separator.active.background'); } .p-stepper-separator { flex: 1 1 0; background: dt('stepper.separator.background'); width: 100%; height: dt('stepper.separator.size'); transition: background dt('stepper.transition.duration'), color dt('stepper.transition.duration'), border-color dt('stepper.transition.duration'), box-shadow dt('stepper.transition.duration'), outline-color dt('stepper.transition.duration'); } .p-steppanels { padding: dt('stepper.steppanels.padding'); } .p-steppanel { background: dt('stepper.steppanel.background'); color: dt('stepper.steppanel.color'); } .p-stepper:has(.p-stepitem) { display: flex; flex-direction: column; } .p-stepitem { display: flex; flex-direction: column; flex: initial; } .p-stepitem.p-stepitem-active { flex: 1 1 auto; } .p-stepitem .p-step { flex: initial; } .p-stepitem .p-steppanel-content { width: 100%; padding: dt('stepper.steppanel.padding'); margin-inline-start: 1rem; } .p-stepitem .p-steppanel { display: flex; flex: 1 1 auto; } .p-stepitem .p-stepper-separator { flex: 0 0 auto; width: dt('stepper.separator.size'); height: auto; margin: dt('stepper.separator.margin'); position: relative; left: calc(-1 * dt('stepper.separator.size')); } .p-stepitem .p-stepper-separator:dir(rtl) { left: calc(-9 * dt('stepper.separator.size')); } .p-stepitem:has(~ .p-stepitem-active) .p-stepper-separator { background: dt('stepper.separator.active.background'); } .p-stepitem:last-of-type .p-steppanel { padding-inline-start: dt('stepper.step.number.size'); } `;var kN=["*"],NNe=["content"],BNe=(t,n,e)=>({activateCallback:t,value:n,active:e});function sRt(t,n){t&1&&ce(0,"p-stepper-separator")}function aRt(t,n){if(t&1){let e=tt();k(0,"button",0),ie("click",function(){se(e);let o=P();return ae(o.onStepClick())}),k(1,"span"),Q(2),D(),k(3,"span"),pn(4),D()(),qe(5,sRt,1,0,"p-stepper-separator")}if(t&2){let e=P();Oe(e.cx("header")),E("tabindex",e.isStepDisabled()?-1:void 0)("disabled",e.isStepDisabled()),Ge("id",e.id())("role","tab")("aria-controls",e.ariaControls()),T(),Oe(e.cx("number")),T(),dt(e.value()),T(),Oe(e.cx("title")),T(2),Ke(e.isSeparatorVisible()?5:-1)}}function lRt(t,n){t&1&&ui(0)}function cRt(t,n){t&1&&ce(0,"p-stepper-separator")}function dRt(t,n){if(t&1&&(ee(0,lRt,1,0,"ng-container",1),qe(1,cRt,1,0,"p-stepper-separator")),t&2){let e=P();E("ngTemplateOutlet",e.content||e._contentTemplate)("ngTemplateOutletContext",$d(3,BNe,e.onStepClick.bind(e),e.value(),e.active())),T(),Ke(e.isSeparatorVisible()?1:-1)}}var kNe=t=>({transitionParams:t}),uRt=t=>({value:"visible",params:t}),pRt=t=>({value:"hidden",params:t});function hRt(t,n){t&1&&ce(0,"p-stepper-separator")}function mRt(t,n){t&1&&ui(0)}function fRt(t,n){if(t&1&&ee(0,mRt,1,0,"ng-container",0),t&2){let e=P();E("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",$d(2,BNe,e.updateValue.bind(e),e.value(),e.active()))}}var gRt={root:({instance:t})=>["p-stepitem",{"p-stepitem-active":t.isActive()}]},MNe=(()=>{class t extends io{name="stepitem";classes=gRt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var _Rt={root:"p-steplist"},ONe=(()=>{class t extends io{name="steplist";classes=_Rt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var yRt={root:"p-steppanels"},RNe=(()=>{class t extends io{name="steppanel";classes=yRt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var vRt={root:({instance:t})=>["p-steppanel",{"p-steppanel-active":t.isVertical()&&t.active()}],content:"p-steppanel-content"},FNe=(()=>{class t extends io{name="steppanel";classes=vRt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var bRt=` ${ANe} /* For PrimeNG */ .p-steppanel:not(.p-steppanel-active) > .p-steppanel-content, .p-steppanel-content.ng-animating { overflow: hidden; } `,CRt={root:({instance:t})=>["p-stepper p-component",{"p-readonly":t.linear()}],separator:"p-stepper-separator"},PQ=(()=>{class t extends io{name="stepper";theme=bRt;classes=CRt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var xRt={root:({instance:t})=>["p-step",{"p-step-active":t.active(),"p-disabled":t.isStepDisabled()}],header:"p-step-header",number:"p-step-number",title:"p-step-title"},PNe=(()=>{class t extends io{name="step";classes=xRt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var LQ=(()=>{class t extends oo{steps=W9(Ko(()=>YE));_componentStyle=re(ONe);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-step-list"]],contentQueries:function(i,o,r){i&1&&Y_(r,o.steps,YE,4),i&2&&Z0()},hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.cx("root"))},features:[jt([ONe]),ft],ngContentSelectors:kN,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On],encapsulation:2,changeDetection:0})}return t})(),VNe=(()=>{class t extends oo{_componentStyle=re(PQ);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-stepper-separator"]],hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.cx("separator"))},features:[jt([PQ]),ft],ngContentSelectors:kN,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On],encapsulation:2,changeDetection:0})}return t})(),LNe=(()=>{class t extends oo{pcStepper=re(Ko(()=>LU));value=X0();isActive=bo(()=>this.pcStepper.value()===this.value());step=ew(Ko(()=>YE));stepPanel=ew(Ko(()=>NQ));constructor(){super(),od(()=>{this.step().value.set(this.value())}),od(()=>{this.stepPanel().value.set(this.value())})}_componentStyle=re(MNe);static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["p-step-item"]],contentQueries:function(i,o,r){i&1&&(Y_(r,o.step,YE,5),Y_(r,o.stepPanel,NQ,5)),i&2&&Z0(2)},hostVars:3,hostBindings:function(i,o){i&2&&(Ge("data-p-active",o.isActive()),Oe(o.cx("root")))},inputs:{value:[1,"value"]},outputs:{value:"valueChange"},features:[jt([MNe]),ft],ngContentSelectors:kN,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On],encapsulation:2,changeDetection:0})}return t})(),YE=(()=>{class t extends oo{pcStepper=re(Ko(()=>LU));value=X0();disabled=mo(!1,{transform:e=>m2(e)});active=bo(()=>this.pcStepper.isStepActive(this.value()));isStepDisabled=bo(()=>!this.active()&&(this.pcStepper.linear()||this.disabled()));id=bo(()=>`${this.pcStepper.id()}_step_${this.value()}`);ariaControls=bo(()=>`${this.pcStepper.id()}_steppanel_${this.value()}`);isSeparatorVisible=bo(()=>{if(this.pcStepper.stepList()){let e=this.pcStepper.stepList().steps(),i=e.indexOf(this),o=e.length;return i!==o-1}else return!1});content;templates;_contentTemplate;_componentStyle=re(PNe);ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break}})}onStepClick(){this.pcStepper.updateValue(this.value())}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-step"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,NNe,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.content=s.first),Le(s=Ne())&&(o.templates=s)}},hostVars:7,hostBindings:function(i,o){i&2&&(Ge("aria-current",o.active()?"step":void 0)("role","presentation")("data-p-active",o.active())("data-p-disabled",o.isStepDisabled())("data-pc-name","step"),Oe(o.cx("root")))},inputs:{value:[1,"value"],disabled:[1,"disabled"]},outputs:{value:"valueChange"},features:[jt([PNe]),ft],ngContentSelectors:kN,decls:2,vars:1,consts:[["type","button",3,"click","tabindex","disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&(Nn(),qe(0,aRt,6,13)(1,dRt,2,7)),i&2&&Ke(!o.content&&!o._contentTemplate?0:1)},dependencies:[On,Lo,VNe,In],encapsulation:2,changeDetection:0})}return t})(),NQ=(()=>{class t extends oo{pcStepper=re(Ko(()=>LU));transitionOptions=bo(()=>this.pcStepper.transitionOptions());value=X0(void 0);active=bo(()=>this.pcStepper.value()===this.value());visible=Zn(this.active());isVisible=bo(()=>this.active()||this.isVertical()&&this.visible());ariaControls=bo(()=>`${this.pcStepper.id()}_step_${this.value()}`);id=bo(()=>`${this.pcStepper.id()}_steppanel_${this.value()}`);isVertical=bo(()=>this.pcStepper.stepItems().length>0);isSeparatorVisible=bo(()=>{if(this.pcStepper.stepItems()){let e=this.pcStepper.stepItems().length,i=Xd(this.pcStepper.el.nativeElement,'[data-pc-name="steppanel"]');return Pd(this.el.nativeElement,i)!==e-1}});contentTemplate;templates;_contentTemplate;_componentStyle=re(FNe);ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break}})}onAnimationStart(e){e.toState==="visible"&&this.visible.set(!0)}onAnimationEnd(e){e.toState==="hidden"&&this.visible.set(!1)}updateValue(e){this.pcStepper.updateValue(e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-step-panel"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,NNe,5),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.contentTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},hostVars:7,hostBindings:function(i,o){i&2&&(Ge("role","tabpanel")("aria-controls",o.ariaControls())("id",o.id())("data-p-active",o.active())("data-pc-name","steppanel"),Oe(o.cx("root")))},inputs:{value:[1,"value"]},outputs:{value:"valueChange"},features:[jt([FNe]),ft],decls:3,vars:13,consts:[[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&(qe(0,hRt,1,0,"p-stepper-separator"),k(1,"div"),ie("@content.start",function(s){return o.onAnimationStart(s)})("@content.done",function(s){return o.onAnimationEnd(s)}),qe(2,fRt,1,6,"ng-container"),D()),i&2&&(Ke(o.isSeparatorVisible()?0:-1),T(),Oe(o.cx("content")),E("@content",o.isVertical()?o.active()?ki(7,uRt,ki(5,kNe,o.transitionOptions())):ki(11,pRt,ki(9,kNe,o.transitionOptions())):void 0),T(),Ke(o.isVisible()?2:-1))},dependencies:[On,Lo,VNe,In],encapsulation:2,data:{animation:[xh("content",[u0("hidden",al({height:"0"})),u0("visible",al({height:"*"})),Rc("visible <=> hidden",[uc("400ms cubic-bezier(0.86, 0, 0.07, 1)")]),Rc("void => *",uc(0))])]},changeDetection:0})}return t})(),zNe=(()=>{class t extends oo{_componentStyle=re(RNe);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-step-panels"]],hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.cx("root"))},features:[jt([RNe]),ft],ngContentSelectors:kN,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On,In],encapsulation:2,changeDetection:0})}return t})(),LU=(()=>{class t extends oo{value=X0(void 0);linear=mo(!1,{transform:e=>m2(e)});transitionOptions=mo("400ms cubic-bezier(0.86, 0, 0.07, 1)");_componentStyle=re(PQ);id=Zn(Vr("pn_id_"));stepItems=W9(LNe);steps=W9(YE);stepList=ew(LQ);updateValue(e){this.value.set(e)}isStepActive(e){return this.value()===e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-stepper"]],contentQueries:function(i,o,r){i&1&&(Y_(r,o.stepItems,LNe,4),Y_(r,o.steps,YE,4),Y_(r,o.stepList,LQ,5)),i&2&&Z0(3)},hostVars:4,hostBindings:function(i,o){i&2&&(Ge("role","tablist")("id",o.id()),Oe(o.cx("root")))},inputs:{value:[1,"value"],linear:[1,"linear"],transitionOptions:[1,"transitionOptions"]},outputs:{value:"valueChange"},features:[jt([PQ]),ft],ngContentSelectors:kN,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On,In],encapsulation:2,changeDetection:0})}return t})();var GNe=Ap(CU());function wRt(t,n){t&1&&(k(0,"tr")(1,"th",5),Q(2,"SPALTEN\xDCBERSCHRIFT AUS DATEI"),D(),k(3,"th",6),Q(4,"DATEN-VORSCHAU"),D(),k(5,"th",7),Q(6,"ZUGEORDNET"),D(),k(7,"th"),Q(8,"EIGENSCHAFT"),D()())}function SRt(t,n){if(t&1&&(k(0,"span",9),Q(1),D(),ce(2,"br")),t&2){let e=n.$implicit;T(),dt(e)}}function TRt(t,n){t&1&&(k(0,"mat-icon"),Q(1,"check_circle"),D())}function IRt(t,n){t&1&&(k(0,"small"),Q(1,"Spalte mehrfach ausgew\xE4hlt"),D())}function ERt(t,n){if(t&1){let e=tt();k(0,"tr")(1,"td",5),Q(2),D(),k(3,"td",6),lo(4,SRt,3,1,null,null,dV),D(),k(6,"td",7),qe(7,TRt,2,0,"mat-icon"),D(),k(8,"td")(9,"p-select",8),ie("onChange",function(o){let r=se(e).$implicit,s=P(2);return ae(s.onMappingChange(r,o.value))}),D(),qe(10,IRt,2,0,"small"),D()()}if(t&2){let e=n.$implicit,i=P(2);T(2),dt(e.headerValue),T(2),co(e.previewInformation),T(3),Ke(e.mapped?7:-1),T(2),Oe(i.mappingError[e.mappingFieldName]?"ng-invalid ng-dirty":""),E("ngModel",e.mappingFieldName)("options",i.config.columnDefinitions),T(),Ke(i.mappingError[e.mappingFieldName]?10:-1)}}function DRt(t,n){if(t&1&&(k(0,"p-table",4),ee(1,wRt,9,0,"ng-template",null,1,Pt)(3,ERt,11,7,"ng-template",null,2,Pt),D()),t&2){let e=P();E("value",e.data)}}var UNe=(()=>{class t{constructor(){this.mappingChange=new ve,this.loading$=new pi(1),this.mappingErrors=!1,this.mapping={},this.mappingError={},this.data=[]}ngOnInit(){this._init(this.rawFile)}onMappingChange(e,i){i?(e.mappingFieldName=i,e.mapped=!0):(e.mapped=!1,e.mappingFieldName=null),this._updateMapping()}hasMappingErrors(){let e=this.data.map(d=>d.mappingFieldName).filter(d=>d).length,i=this.data.map(d=>d.mappingFieldName).filter(d=>d),o=i.filter((d,m,v)=>v.indexOf(d)===m).length;this.mappingError={},this._findDuplicates(i).forEach(d=>this.mappingError[d]=!0);let r=Object.keys(this.mappingError).length>0;return!(e===o)||r}_init(e){this.loading$.next(Gt.LOADING),new bp().process(e,null).subscribe(i=>{let o=i.data.slice(0,4),r=o[0].map((d,m)=>{let v=o[0][m],w=this._guessColumnFromHeaderValue(v,m);return{headerValue:v,mappingFieldName:w.columnDefinition?w.columnDefinition.fieldName:null,previewInformation:o.slice(1).map(O=>O[m]).filter(O=>!!O),fileIndex:m,mapped:w.exactMatch}}),s=[];this.config.columnDefinitions.length>i.data[0].length&&(s=this.config.columnDefinitions.filter(d=>!r.find(m=>m.mappingFieldName===d.fieldName)).map((d,m)=>({fileIndex:m+r.length+1,mapped:!1,mappingFieldName:d.fieldName,previewInformation:[],headerValue:""}))),this.data=[...r,...s],this._updateMapping(),this.loading$.next(Gt.SUCCESS)})}_findDuplicates(e){return e.filter((i,o)=>e.indexOf(i)!==o)}_updateMapping(){this.mapping={},this.config.columnDefinitions.forEach((e,i)=>{let o=this.data.find(r=>r.mappingFieldName===e.fieldName);this.mapping[i]={rowIndex:o?o.fileIndex:null,columnFieldName:e.fieldName,shouldBeEmpty:!o}}),this.mappingErrors=this.hasMappingErrors(),this.mappingChange.emit({mappingErrors:this.mappingErrors,mapping:this.mapping})}_guessColumnFromHeaderValue(e,i){let o=this.config.columnDefinitions.find(s=>s.fieldName.toLowerCase()===e.toLowerCase());if(o)return{exactMatch:!0,columnDefinition:o};let r=this.config.columnDefinitions.find(s=>s.fieldName.toLowerCase().includes(e.toLowerCase()));return r?{exactMatch:!1,columnDefinition:r}:i<=this.config.columnDefinitions.length?{exactMatch:!1,columnDefinition:this.config.columnDefinitions[i]}:{exactMatch:!1,columnDefinition:null}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-csv-import-mapping"]],inputs:{config:"config",originalFileName:"originalFileName",rawFile:"rawFile"},outputs:{mappingChange:"mappingChange"},decls:4,vars:2,consts:[["successTpl",""],["header",""],["body",""],[3,"loadItem","successTemplate"],[3,"value"],[1,"mat-column-headerValue"],[1,"mat-column-previewInformation"],[1,"mat-column-mapped"],["fluid","","variant","filled","optionLabel","displayName","optionValue","fieldName","dataKey","fieldName","showClear","",3,"onChange","ngModel","options"],[1,"mat-caption"]],template:function(i,o){if(i&1&&(k(0,"div"),ce(1,"bd-loader",3),D(),ee(2,DRt,5,1,"ng-template",null,0,Pt)),i&2){let r=ti(3);T(),E("loadItem",o.loading$)("successTemplate",r)}},dependencies:[Kn,Tn,$o,mr,Ra,hc,hl,Ql,hr,no,Lr],styles:[".mat-column-headerValue[_ngcontent-%COMP%]{width:15%}.mat-column-previewInformation[_ngcontent-%COMP%]{width:30%}.mat-column-mapped[_ngcontent-%COMP%]{width:100px}"],changeDetection:0})}}return t})();var HNe=` .p-divider-horizontal { display: flex; width: 100%; position: relative; align-items: center; margin: dt('divider.horizontal.margin'); padding: dt('divider.horizontal.padding'); } .p-divider-horizontal:before { position: absolute; display: block; inset-block-start: 50%; inset-inline-start: 0; width: 100%; content: ''; border-block-start: 1px solid dt('divider.border.color'); } .p-divider-horizontal .p-divider-content { padding: dt('divider.horizontal.content.padding'); } .p-divider-vertical { min-height: 100%; display: flex; position: relative; justify-content: center; margin: dt('divider.vertical.margin'); padding: dt('divider.vertical.padding'); } .p-divider-vertical:before { position: absolute; display: block; inset-block-start: 0; inset-inline-start: 50%; height: 100%; content: ''; border-inline-start: 1px solid dt('divider.border.color'); } .p-divider.p-divider-vertical .p-divider-content { padding: dt('divider.vertical.content.padding'); } .p-divider-content { z-index: 1; background: dt('divider.content.background'); color: dt('divider.content.color'); } .p-divider-solid.p-divider-horizontal:before { border-block-start-style: solid; } .p-divider-solid.p-divider-vertical:before { border-inline-start-style: solid; } .p-divider-dashed.p-divider-horizontal:before { border-block-start-style: dashed; } .p-divider-dashed.p-divider-vertical:before { border-inline-start-style: dashed; } .p-divider-dotted.p-divider-horizontal:before { border-block-start-style: dotted; } .p-divider-dotted.p-divider-vertical:before { border-inline-start-style: dotted; } .p-divider-left:dir(rtl), .p-divider-right:dir(rtl) { flex-direction: row-reverse; } `;var ARt=["*"],kRt={root:({instance:t})=>({justifyContent:t.layout==="horizontal"?t.align==="center"||t.align==null?"center":t.align==="left"?"flex-start":t.align==="right"?"flex-end":null:null,alignItems:t.layout==="vertical"?t.align==="center"||t.align==null?"center":t.align==="top"?"flex-start":t.align==="bottom"?"flex-end":null:null})},MRt={root:({instance:t})=>["p-divider p-component","p-divider-"+t.layout,"p-divider-"+t.type,{"p-divider-left":t.layout==="horizontal"&&(!t.align||t.align==="left")},{"p-divider-center":t.layout==="horizontal"&&t.align==="center"},{"p-divider-right":t.layout==="horizontal"&&t.align==="right"},{"p-divider-top":t.layout==="vertical"&&t.align==="top"},{"p-divider-center":t.layout==="vertical"&&(!t.align||t.align==="center")},{"p-divider-bottom":t.layout==="vertical"&&t.align==="bottom"}],content:"p-divider-content"},jNe=(()=>{class t extends io{name="divider";theme=HNe;classes=MRt;inlineStyles=kRt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var BQ=(()=>{class t extends oo{styleClass;layout="horizontal";type="solid";align;_componentStyle=re(jNe);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-divider"]],hostAttrs:["data-pc-name","divider","role","separator"],hostVars:5,hostBindings:function(i,o){i&2&&(Ge("aria-orientation",o.layout),$r(o.sx("root")),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{styleClass:"styleClass",layout:"layout",type:"type",align:"align"},features:[jt([jNe]),ft],ngContentSelectors:ARt,decls:2,vars:2,template:function(i,o){i&1&&(Nn(),k(0,"div"),pn(1),D()),i&2&&Oe(o.cx("content"))},dependencies:[On,In],encapsulation:2,changeDetection:0})}return t})();function ORt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(2);T(),dt(e.rawFile.name)}}function RRt(t,n){if(t&1){let e=tt();k(0,"div",10)(1,"p-button",13),ie("onClick",function(){se(e);let o=P(2);return ae(o.downloadSchemaFile())}),Q(2," Vorlage herunterladen "),D()()}t&2&&(T(),E("outlined",!0))}function FRt(t,n){if(t&1){let e=tt();k(0,"div",4)(1,"div",5)(2,"div",6)(3,"p-fileupload",7),ie("onSelect",function(o){se(e);let r=P();return ae(r.onFileChange(o))}),D(),qe(4,ORt,2,1,"span"),D()(),k(5,"div",8)(6,"p-divider",9)(7,"b"),Q(8,"oder"),D()()(),k(9,"div",5),ce(10,"p-tree",3),qe(11,RRt,3,1,"div",10),D()(),k(12,"div",11)(13,"p-button",12),ie("onClick",function(){let o=se(e).activateCallback;return ae(o(2))}),Q(14,"Weiter "),D()()}if(t&2){let e=P();T(3),E("auto",!0),T(),Ke(e.rawFile?4:-1),T(6),E("value",e.treeNode),T(),Ke(e.config?11:-1),T(2),E("disabled",!e.rawFile)("raised",!0)}}function PRt(t,n){if(t&1){let e=tt();k(0,"bd-csv-import-mapping",14),ie("mappingChange",function(o){se(e);let r=P();return ae(r.onMappingChange(o))}),D(),k(1,"div",11)(2,"p-button",12),ie("onClick",function(){se(e);let o=P();return ae(o.process())}),Q(3,"Weiter "),D()()}if(t&2){let e=P();E("rawFile",e.rawFile)("config",e.config)("originalFileName",e.rawFile.name),T(2),E("disabled",e.mapping.mappingErrors)("raised",!0)}}function LRt(t,n){if(t&1&&ce(0,"bd-loader",15),t&2){let e=P(),i=ti(19);E("loadItem",e.loading$)("successTemplate",i)}}function NRt(t,n){if(t&1){let e=tt();k(0,"bd-csv-import-result",17),ie("resetFile",function(){se(e);let o=P(2);return ae(o.onReset())})("dataChange",function(o){se(e);let r=P(2);return ae(r.onDataChanged(o))}),D()}if(t&2){let e=P(2);E("data",e.importResult.data)("config",e.config)}}function BRt(t,n){if(t&1&&qe(0,NRt,1,2,"bd-csv-import-result",16),t&2){let e=P();Ke(e.importResult.data?0:-1)}}var $Ne=(()=>{class t{constructor(){this.inputChange=new ve,this.loading$=new pi(1),this.step=1,this.mapping={mappingErrors:!0,mapping:{}}}ngOnInit(){this.treeNode=[{label:`${this.config.columnDefinitions.length} Spalten`,children:this.config.columnDefinitions.map(e=>({label:e.fieldName,children:[{label:`\xDCberschrift: ${e.displayName}`},...e.explanation?e.explanation.map(i=>({label:i})):[]]}))}]}onFileChange(e){this.rawFile=e.currentFiles[0]}onMappingChange(e){this.mapping=e}process(){this.step=3,this.loading$.next(Gt.LOADING),new bp().process(this.rawFile,this.mapping.mapping).subscribe({next:e=>{this.importResult=e,this.loading$.next(Gt.SUCCESS)},error:()=>this.loading$.next(Gt.ERROR)})}onReset(){this.rawFile=null,this.importResult=null,this.step=1,this.loading$.next(Gt.INIT)}onDataChanged(e){this.inputChange.emit({data:e,originalFileName:this.importResult.originalFileName})}downloadSchemaFile(){let e=bp.createSchemaFile(this.config),i=new Blob(["\uFEFF"+e],{type:"text/csv;charset=utf-8"});(0,GNe.saveAs)(i,"Vorlage.csv")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-csv-import"]],inputs:{config:"config"},outputs:{inputChange:"inputChange"},decls:20,vars:8,consts:[["content",""],["successTpl",""],[3,"value","linear"],[3,"value"],[1,"flex","flex-row","gap-4"],[1,"flex-1"],[1,"flex","items-center","justify-center"],["mode","basic","chooseIcon","pi pi-upload","accept",".csv","chooseLabel","Datei ausw\xE4hlen",3,"onSelect","auto"],[1,"w-full","md:w-2/12"],["layout","vertical"],[1,"flex-none"],[1,"flex","flex-row","justify-end"],[3,"onClick","disabled","raised"],["severity","secondary",3,"onClick","outlined"],[3,"mappingChange","rawFile","config","originalFileName"],[3,"loadItem","successTemplate"],[3,"data","config"],[3,"resetFile","dataChange","data","config"]],template:function(i,o){i&1&&(k(0,"p-stepper",2)(1,"p-step-list")(2,"p-step",3),Q(3,"Datei"),D(),k(4,"p-step",3),Q(5,"Zuordnung"),D(),k(6,"p-step",3),Q(7,"Ergebnis"),D()(),k(8,"p-step-panels")(9,"p-step-panel",3),ee(10,FRt,15,6,"ng-template",null,0,Pt),D(),k(12,"p-step-panel",3),ee(13,PRt,4,5,"ng-template",null,0,Pt),D(),k(15,"p-step-panel",3),ee(16,LRt,1,2,"ng-template",null,0,Pt),D()()(),ee(18,BRt,1,1,"ng-template",null,1,Pt)),i&2&&(E("value",o.step)("linear",!0),T(2),E("value",1),T(2),E("value",2),T(2),E("value",3),T(3),E("value",1),T(3),E("value",2),T(3),E("value",3))},dependencies:[ENe,DNe,Eke,LU,LQ,YE,zNe,NQ,CQ,c_,ja,UNe,BQ,Kn],encapsulation:2})}}return t})();var VQ=(()=>{class t{constructor(e,i){this.config=e,this.ref=i}onInputChanged(e){this.importResult=e}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:5,vars:3,consts:[[1,"flex","flex-col","gap-4"],[3,"inputChange","config"],[1,"flex","flex-row","gap-4","justify-end"],["label","Abbrechen","severity","secondary",3,"onClick","outlined"],["label","Daten \xFCbernehmen",3,"onClick","disabled"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"bd-csv-import",1),ie("inputChange",function(s){return o.onInputChanged(s)}),D(),k(2,"div",2)(3,"p-button",3),ie("onClick",function(){return o.ref.close()}),D(),k(4,"p-button",4),ie("onClick",function(){return o.ref.close(o.importResult)}),D()()()),i&2&&(T(),E("config",o.config.data==null?null:o.config.data.importConfig),T(2),E("outlined",!0),T(),E("disabled",!o.importResult))},dependencies:[$Ne,ja],encapsulation:2})}}return t})();var QE=(()=>{class t{constructor(e){this._dialogService=e,this.inputChange=new ve}onOpenDialog(){let e=mt(be({},rc),{header:"CSV-Datei importieren",data:{importConfig:this.config}});this._dialogService.open(VQ,e).onClose.pipe(wn(i=>!!i)).subscribe(i=>this.inputChange.emit(i))}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-csv-import-file-button"]],inputs:{config:"config"},outputs:{inputChange:"inputChange"},features:[jt([Mo])],decls:1,vars:1,consts:[["pTooltip","CSV-Datei importieren","icon","pi pi-file-import",3,"onClick","text"]],template:function(i,o){i&1&&(k(0,"p-button",0),ie("onClick",function(){return o.onOpenDialog()}),D()),i&2&&E("text",!0)},dependencies:[ja,gy],encapsulation:2})}}return t})();var qNe=(()=>{class t extends dr{constructor(e,i,o){super(),this.ref=i,this._cdr=o,this.selection=new nm(!0,[],!0,(r,s)=>vo.equals(r,s,()=>r.value===s.value)),this.selectionCopy=[],this.csvImportConfig={title:"CSV-Datei",columnDefinitions:[{fieldName:"Landkreis",displayName:"Landkreis",validationFnc:r=>bp.isNumber(r)}]},this._subs.push(this.selection.changed.subscribe(r=>{this.selectionCopy=[...r.source.selected.map(s=>s.clone())],this._cdr.markForCheck()})),e&&e.data&&e.data.administrativeDistrictIds&&e.data.administrativeDistrictIds.length>0&&this.selection.setSelection(...e.data.administrativeDistrictIds.map(r=>r.clone()))}ngOnDestroy(){this.unsubscribeAll()}onSelectedAdministrativeDistrictsChange(e){let i=[...e.map(o=>o.clone())];Ui.equals(this.selection.selected,i,(o,r)=>vo.equals(o,r,()=>o.value===r.value))||this.selection.setSelection(...i)}onAddAdministrativeDistrict(e){this.selection.select(e.id)}onCsvImport(e){this.selection.select(...e.data.map(i=>i[0]).map(i=>Yo.createFromString(i)))}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],features:[ft],decls:20,vars:3,consts:[[1,"flex","flex-row","gap-6"],[1,"flex-1"],[3,"selectedAdministrativeDistrictsChange","selectedAdministrativeDistrictIds"],[1,"flex","flex-row","gap-6","items-center"],["placeholderText","Landkreis hinzuf\xFCgen",3,"administrativeDistrictSelect"],[3,"inputChange","config"],[3,"administrativeDistrictIdsChange","administrativeDistrictIds"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-raised-button","","color","accent",3,"click"]],template:function(i,o){i&1&&(k(0,"div")(1,"div",0)(2,"div",1)(3,"bd-maps-administrative-district-ids-map-selection",2),ie("selectedAdministrativeDistrictsChange",function(s){return o.onSelectedAdministrativeDistrictsChange(s)}),D()(),k(4,"div",1)(5,"div")(6,"div")(7,"div",3)(8,"div",1)(9,"div")(10,"bd-administrative-district-autocomplete",4),ie("administrativeDistrictSelect",function(s){return o.onAddAdministrativeDistrict(s)}),D()()(),k(11,"div")(12,"bd-csv-import-file-button",5),ie("inputChange",function(s){return o.onCsvImport(s)}),D()()()(),k(13,"div")(14,"bd-maps-administrative-district-ids-list",6),ie("administrativeDistrictIdsChange",function(s){return o.onSelectedAdministrativeDistrictsChange(s)}),D()()()()()(),k(15,"div",7)(16,"button",8),ie("click",function(){return o.ref.close()}),Q(17,"Abbrechen"),D(),k(18,"button",9),ie("click",function(){return o.ref.close(o.selectionCopy)}),Q(19," \xDCbernehmen "),D()()),i&2&&(T(3),E("selectedAdministrativeDistrictIds",o.selectionCopy),T(9),E("config",o.csvImportConfig),T(2),E("administrativeDistrictIds",o.selectionCopy))},dependencies:[PY,yW,QE,gx,Tn,yo],encapsulation:2})}}return t})();var VRt=["*"];function zRt(t,n){t&1&&pn(0)}var She=(()=>{class t{_elementRef=re(Bn);constructor(){}focus(){this._elementRef.nativeElement.focus()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]})}return t})(),The=(()=>{class t{template=re(jc);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","cdkStepLabel",""]]})}return t})();var hM={NUMBER:"number",EDIT:"edit",DONE:"done",ERROR:"error"},URt=new fi("STEPPER_GLOBAL_OPTIONS"),zQ=(()=>{class t{_stepperOptions;_stepper=re(NU);_displayDefaultIndicatorType;stepLabel;_childForms;content;stepControl;get interacted(){return this._interacted()}set interacted(e){this._interacted.set(e)}_interacted=Zn(!1);interactedStream=new ve;label;errorMessage;ariaLabel;ariaLabelledby;get state(){return this._state()}set state(e){this._state.set(e)}_state=Zn(void 0);get editable(){return this._editable()}set editable(e){this._editable.set(e)}_editable=Zn(!0);optional=!1;get completed(){let e=this._completedOverride(),i=this._interacted();return e??(i&&(!this.stepControl||this.stepControl.valid))}set completed(e){this._completedOverride.set(e)}_completedOverride=Zn(null);index=Zn(-1);isSelected=bo(()=>this._stepper.selectedIndex===this.index());indicatorType=bo(()=>{let e=this.isSelected(),i=this.completed,o=this._state()??hM.NUMBER,r=this._editable();return this._showError()&&this.hasError&&!e?hM.ERROR:this._displayDefaultIndicatorType?!i||e?hM.NUMBER:r?hM.EDIT:hM.DONE:i&&!e?hM.DONE:i&&e?o:r&&e?hM.EDIT:o});isNavigable=bo(()=>{let e=this.isSelected();return this.completed||e||!this._stepper.linear});get hasError(){let e=this._customError();return e??this._getDefaultError()}set hasError(e){this._customError.set(e)}_customError=Zn(null);_getDefaultError(){return this.interacted&&!!this.stepControl?.invalid}constructor(){let e=re(URt,{optional:!0});this._stepperOptions=e||{},this._displayDefaultIndicatorType=this._stepperOptions.displayDefaultIndicatorType!==!1}select(){this._stepper.selected=this}reset(){this._interacted.set(!1),this._completedOverride()!=null&&this._completedOverride.set(!1),this._customError()!=null&&this._customError.set(!1),this.stepControl&&(this._childForms?.forEach(e=>e.resetForm?.()),this.stepControl.reset())}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this._interacted()||(this._interacted.set(!0),this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??this._customError()!=null}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["cdk-step"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,The,5),xt(r,Gv,5)),i&2){let s;Le(s=Ne())&&(o.stepLabel=s.first),Le(s=Ne())&&(o._childForms=s)}},viewQuery:function(i,o){if(i&1&&Ri(jc,7),i&2){let r;Le(r=Ne())&&(o.content=r.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],state:"state",editable:[2,"editable","editable",je],optional:[2,"optional","optional",je],completed:[2,"completed","completed",je],hasError:[2,"hasError","hasError",je]},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[Ot],ngContentSelectors:VRt,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),CR(0,zRt,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}return t})(),NU=(()=>{class t{_dir=re(ad,{optional:!0});_changeDetectorRef=re(Gi);_elementRef=re(Bn);_destroyed=new hi;_keyManager;_steps;steps=new Hg;_stepHeader;_sortedHeaders=new Hg;linear=!1;get selectedIndex(){return this._selectedIndex()}set selectedIndex(e){this._steps?(this._isValidIndex(e),this.selectedIndex!==e&&(this.selected?._markAsInteracted(),!this._anyControlsInvalidOrPending(e)&&(e>=this.selectedIndex||this.steps.toArray()[e].editable)&&this._updateSelectedItemIndex(e))):this._selectedIndex.set(e)}_selectedIndex=Zn(0);get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(e){this.selectedIndex=e&&this.steps?this.steps.toArray().indexOf(e):-1}selectionChange=new ve;selectedIndexChange=new ve;_groupId=re(ul).getId("cdk-stepper-");get orientation(){return this._orientation}set orientation(e){this._orientation=e,this._keyManager&&this._keyManager.withVerticalOrientation(e==="vertical")}_orientation="horizontal";constructor(){}ngAfterContentInit(){this._steps.changes.pipe(rl(this._steps),cs(this._destroyed)).subscribe(e=>{this.steps.reset(e.filter(i=>i._stepper===this)),this.steps.forEach((i,o)=>i.index.set(o)),this.steps.notifyOnChanges()})}ngAfterViewInit(){if(this._stepHeader.changes.pipe(rl(this._stepHeader),cs(this._destroyed)).subscribe(e=>{this._sortedHeaders.reset(e.toArray().sort((i,o)=>i._elementRef.nativeElement.compareDocumentPosition(o._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new e2(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation(this._orientation==="vertical"),this._keyManager.updateActiveItem(this.selectedIndex),(this._dir?this._dir.change:ci()).pipe(rl(this._layoutDirection()),cs(this._destroyed)).subscribe(e=>this._keyManager?.withHorizontalOrientation(e)),this._keyManager.updateActiveItem(this.selectedIndex),this.steps.changes.subscribe(()=>{this.selected||this._selectedIndex.set(Math.max(this.selectedIndex-1,0))}),this._isValidIndex(this.selectedIndex)||this._selectedIndex.set(0),this.linear&&this.selectedIndex>0){let e=this.steps.toArray().slice(0,this._selectedIndex());for(let i of e)i._markAsInteracted()}}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex()+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex()-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(e=>e.reset()),this._stateChanged()}_getStepLabelId(e){return`${this._groupId}-label-${e}`}_getStepContentId(e){return`${this._groupId}-content-${e}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(e){let i=e-this._selectedIndex();return i<0?this._layoutDirection()==="rtl"?"next":"previous":i>0?this._layoutDirection()==="rtl"?"previous":"next":"current"}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex()}_updateSelectedItemIndex(e){let i=this.steps.toArray(),o=this._selectedIndex();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:o,selectedStep:i[e],previouslySelectedStep:i[o]}),this._keyManager&&(this._containsFocus()?this._keyManager.setActiveItem(e):this._keyManager.updateActiveItem(e)),this._selectedIndex.set(e),this.selectedIndexChange.emit(e),this._stateChanged()}_onKeydown(e){let i=pu(e),o=e.keyCode,r=this._keyManager;r?.activeItemIndex!=null&&!i&&(o===32||o===13)?(this.selectedIndex=r.activeItemIndex,e.preventDefault()):r?.setFocusOrigin("keyboard").onKeydown(e)}_anyControlsInvalidOrPending(e){return this.linear&&e>=0?this.steps.toArray().slice(0,e).some(i=>{let o=i.stepControl;return(o?o.invalid||o.pending||!i.interacted:!i.completed)&&!i.optional&&!i._completedOverride()}):!1}_layoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_containsFocus(){let e=this._elementRef.nativeElement,i=LI();return e===i||e.contains(i)}_isValidIndex(e){return e>-1&&(!this.steps||e{class t{_stepper=re(NU);type="submit";constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(i,o){i&1&&ie("click",function(){return o._stepper.next()}),i&2&&Rr("type",o.type)},inputs:{type:"type"}})}return t})();var HRt=(t,n,e)=>({index:t,active:n,optional:e});function jRt(t,n){if(t&1&&ui(0,2),t&2){let e=P();E("ngTemplateOutlet",e.iconOverrides[e.state])("ngTemplateOutletContext",$d(2,HRt,e.index,e.active,e.optional))}}function GRt(t,n){if(t&1&&(k(0,"span",7),Q(1),D()),t&2){let e=P(2);T(),dt(e._getDefaultTextForState(e.state))}}function $Rt(t,n){if(t&1&&(k(0,"span",8),Q(1),D()),t&2){let e=P(3);T(),dt(e._intl.completedLabel)}}function qRt(t,n){if(t&1&&(k(0,"span",8),Q(1),D()),t&2){let e=P(3);T(),dt(e._intl.editableLabel)}}function KRt(t,n){if(t&1&&(qe(0,$Rt,2,1,"span",8)(1,qRt,2,1,"span",8),k(2,"mat-icon",7),Q(3),D()),t&2){let e=P(2);Ke(e.state==="done"?0:e.state==="edit"?1:-1),T(3),dt(e._getDefaultTextForState(e.state))}}function WRt(t,n){if(t&1&&qe(0,GRt,2,1,"span",7)(1,KRt,4,2),t&2){let e,i=P();Ke((e=i.state)==="number"?0:1)}}function YRt(t,n){t&1&&(k(0,"div",4),ui(1,9),D()),t&2&&(T(),E("ngTemplateOutlet",n.template))}function QRt(t,n){if(t&1&&(k(0,"div",4),Q(1),D()),t&2){let e=P();T(),dt(e.label)}}function ZRt(t,n){if(t&1&&(k(0,"div",5),Q(1),D()),t&2){let e=P();T(),dt(e._intl.optionalLabel)}}function XRt(t,n){if(t&1&&(k(0,"div",6),Q(1),D()),t&2){let e=P();T(),dt(e.errorMessage)}}var YNe=["*"];function JRt(t,n){}function eFt(t,n){if(t&1&&(pn(0),ee(1,JRt,0,0,"ng-template",0)),t&2){let e=P();T(),E("cdkPortalOutlet",e._portal)}}var tFt=["animatedContainer"],QNe=t=>({step:t});function iFt(t,n){t&1&&pn(0)}function nFt(t,n){t&1&&ce(0,"div",7)}function oFt(t,n){if(t&1&&(ui(0,6),qe(1,nFt,1,0,"div",7)),t&2){let e=n.$implicit,i=n.$index,o=n.$count;P(2);let r=ti(4);E("ngTemplateOutlet",r)("ngTemplateOutletContext",ki(3,QNe,e)),T(),Ke(i!==o-1?1:-1)}}function rFt(t,n){if(t&1&&(k(0,"div",8,1),ui(2,9),D()),t&2){let e=n.$implicit,i=n.$index,o=P(2);Oe("mat-horizontal-stepper-content-"+o._getAnimationDirection(i)),E("id",o._getStepContentId(i)),Ge("aria-labelledby",o._getStepLabelId(i))("inert",o.selectedIndex===i?null:""),T(2),E("ngTemplateOutlet",e.content)}}function sFt(t,n){if(t&1&&(k(0,"div",2)(1,"div",3),lo(2,oFt,2,5,null,null,jo),D(),k(4,"div",4),lo(5,rFt,3,6,"div",5,jo),D()()),t&2){let e=P();T(2),co(e.steps),T(3),co(e.steps)}}function aFt(t,n){if(t&1&&(k(0,"div",10),ui(1,6),k(2,"div",11,1)(4,"div",12)(5,"div",13),ui(6,9),D()()()()),t&2){let e=n.$implicit,i=n.$index,o=n.$index,r=n.$count,s=P(2),d=ti(4);T(),E("ngTemplateOutlet",d)("ngTemplateOutletContext",ki(10,QNe,e)),T(),Vn("mat-stepper-vertical-line",o!==r-1)("mat-vertical-content-container-active",s.selectedIndex===i),Ge("inert",s.selectedIndex===i?null:""),T(2),E("id",s._getStepContentId(i)),Ge("aria-labelledby",s._getStepLabelId(i)),T(2),E("ngTemplateOutlet",e.content)}}function lFt(t,n){if(t&1&&lo(0,aFt,7,12,"div",10,jo),t&2){let e=P();co(e.steps)}}function cFt(t,n){if(t&1){let e=tt();k(0,"mat-step-header",14),ie("click",function(){let o=se(e).step;return ae(o.select())})("keydown",function(o){se(e);let r=P();return ae(r._onKeydown(o))}),D()}if(t&2){let e=n.step,i=P();Vn("mat-horizontal-stepper-header",i.orientation==="horizontal")("mat-vertical-stepper-header",i.orientation==="vertical"),E("tabIndex",i._getFocusIndex()===e.index()?0:-1)("id",i._getStepLabelId(e.index()))("index",e.index())("state",e.indicatorType())("label",e.stepLabel||e.label)("selected",e.isSelected())("active",e.isNavigable())("optional",e.optional)("errorMessage",e.errorMessage)("iconOverrides",i._iconOverrides)("disableRipple",i.disableRipple||!e.isNavigable())("color",e.color||i.color),Ge("aria-posinset",e.index()+1)("aria-setsize",i.steps.length)("aria-controls",i._getStepContentId(e.index()))("aria-selected",e.isSelected())("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null)("aria-disabled",e.isNavigable()?null:!0)}}var Ihe=(()=>{class t extends The{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["","matStepLabel",""]],features:[ft]})}return t})(),dFt=(()=>{class t{changes=new hi;optionalLabel="Optional";completedLabel="Completed";editableLabel="Editable";static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var WNe=(()=>{class t extends She{_intl=re(dFt);_focusMonitor=re(gh);_intlSubscription;state;label;errorMessage;iconOverrides;index;selected;active;optional;disableRipple;color;constructor(){super();let e=re(kl);e.load(hp),e.load(BI);let i=re(Gi);this._intlSubscription=this._intl.changes.subscribe(()=>i.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,i){e?this._focusMonitor.focusVia(this._elementRef,e,i):this._elementRef.nativeElement.focus(i)}_stringLabel(){return this.label instanceof Ihe?null:this.label}_templateLabel(){return this.label instanceof Ihe?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getDefaultTextForState(e){return e=="number"?`${this.index+1}`:e=="edit"?"create":e=="error"?"warning":e}_hasEmptyLabel(){return!this._stringLabel()&&!this._templateLabel()&&!this._hasOptionalLabel()&&!this._hasErrorLabel()}_hasOptionalLabel(){return this.optional&&this.state!=="error"}_hasErrorLabel(){return this.state==="error"}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],hostVars:4,hostBindings:function(i,o){i&2&&(Oe("mat-"+(o.color||"primary")),Vn("mat-step-header-empty-label",o._hasEmptyLabel()))},inputs:{state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple",color:"color"},features:[ft],decls:10,vars:17,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-step-label"],[1,"mat-step-text-label"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[3,"ngTemplateOutlet"]],template:function(i,o){if(i&1&&(ce(0,"div",0),k(1,"div")(2,"div",1),qe(3,jRt,1,6,"ng-container",2)(4,WRt,2,1),D()(),k(5,"div",3),qe(6,YRt,2,1,"div",4)(7,QRt,2,1,"div",4),qe(8,ZRt,2,1,"div",5),qe(9,XRt,2,1,"div",6),D()),i&2){let r;E("matRippleTrigger",o._getHostElement())("matRippleDisabled",o.disableRipple),T(),Oe(wR("mat-step-icon-state-",o.state," mat-step-icon")),Vn("mat-step-icon-selected",o.selected),T(2),Ke(o.iconOverrides&&o.iconOverrides[o.state]?3:4),T(2),Vn("mat-step-label-active",o.active)("mat-step-label-selected",o.selected)("mat-step-label-error",o.state=="error"),T(),Ke((r=o._templateLabel())?6:o._stringLabel()?7:-1,r),T(2),Ke(o._hasOptionalLabel()?8:-1),T(),Ke(o._hasErrorLabel()?9:-1)}},dependencies:[im,Lo,mr],styles:[`.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.mat-step-header:hover[aria-disabled=true]{cursor:default}.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:var(--mat-stepper-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent));border-radius:var(--mat-stepper-header-hover-state-layer-shape, var(--mat-sys-corner-medium))}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused{background-color:var(--mat-stepper-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));border-radius:var(--mat-stepper-header-focus-state-layer-shape, var(--mat-sys-corner-medium))}@media(hover: none){.mat-step-header:hover{background:none}}@media(forced-colors: active){.mat-step-header{outline:solid 1px}.mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.mat-step-header[aria-disabled=true]{outline-color:GrayText}.mat-step-header[aria-disabled=true] .mat-step-label,.mat-step-header[aria-disabled=true] .mat-step-icon,.mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}}.mat-step-optional{font-size:12px;color:var(--mat-stepper-header-optional-label-text-color, var(--mat-sys-on-surface-variant))}.mat-step-sub-label-error{font-size:12px;font-weight:normal}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative;color:var(--mat-stepper-header-icon-foreground-color, var(--mat-sys-surface));background-color:var(--mat-stepper-header-icon-background-color, var(--mat-sys-on-surface-variant))}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error{background-color:var(--mat-stepper-header-error-state-icon-background-color, transparent);color:var(--mat-stepper-header-error-state-icon-foreground-color, var(--mat-sys-error))}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle;font-family:var(--mat-stepper-header-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-stepper-header-label-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-stepper-header-label-text-weight, var(--mat-sys-title-small-weight));color:var(--mat-stepper-header-label-text-color, var(--mat-sys-on-surface-variant))}.mat-step-label.mat-step-label-active{color:var(--mat-stepper-header-selected-state-label-text-color, var(--mat-sys-on-surface-variant))}.mat-step-label.mat-step-label-error{color:var(--mat-stepper-header-error-state-label-text-color, var(--mat-sys-error));font-size:var(--mat-stepper-header-error-state-label-text-size, var(--mat-sys-title-small-size))}.mat-step-label.mat-step-label-selected{font-size:var(--mat-stepper-header-selected-state-label-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-stepper-header-selected-state-label-text-weight, var(--mat-sys-title-small-weight))}.mat-step-header-empty-label .mat-step-label{min-width:0}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-step-icon-selected{background-color:var(--mat-stepper-header-selected-state-icon-background-color, var(--mat-sys-primary));color:var(--mat-stepper-header-selected-state-icon-foreground-color, var(--mat-sys-on-primary))}.mat-step-icon-state-done{background-color:var(--mat-stepper-header-done-state-icon-background-color, var(--mat-sys-primary));color:var(--mat-stepper-header-done-state-icon-foreground-color, var(--mat-sys-on-primary))}.mat-step-icon-state-edit{background-color:var(--mat-stepper-header-edit-state-icon-background-color, var(--mat-sys-primary));color:var(--mat-stepper-header-edit-state-icon-foreground-color, var(--mat-sys-on-primary))} `],encapsulation:2,changeDetection:0})}return t})(),uFt=(()=>{class t{templateRef=re(jc);name;constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:[0,"matStepperIcon","name"]}})}return t})(),pFt=(()=>{class t{_template=re(jc);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["ng-template","matStepContent",""]]})}return t})(),BU=(()=>{class t extends zQ{_errorStateMatcher=re(o2,{skipSelf:!0});_viewContainerRef=re(nc);_isSelected=Xr.EMPTY;stepLabel=void 0;color;_lazyContent;_portal;ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe(Mn(()=>this._stepper.selectionChange.pipe(vt(e=>e.selectedStep===this),rl(this._stepper.selected===this)))).subscribe(e=>{e&&this._lazyContent&&!this._portal&&(this._portal=new Nv(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(e,i){let o=this._errorStateMatcher.isErrorState(e,i),r=!!(e&&e.invalid&&this.interacted);return o||r}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["mat-step"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,Ihe,5),xt(r,pFt,5)),i&2){let s;Le(s=Ne())&&(o.stepLabel=s.first),Le(s=Ne())&&(o._lazyContent=s.first)}},hostAttrs:["hidden",""],inputs:{color:"color"},exportAs:["matStep"],features:[jt([{provide:o2,useExisting:t},{provide:zQ,useExisting:t}]),ft],ngContentSelectors:YNe,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(i,o){i&1&&(Nn(),ee(0,eFt,2,1,"ng-template"))},dependencies:[r0],encapsulation:2,changeDetection:0})}return t})(),UQ=(()=>{class t extends NU{_ngZone=re(_n);_renderer=re(Ps);_animationsDisabled=Cl();_cleanupTransition;_isAnimating=Zn(!1);_stepHeader=void 0;_animatedContainers;_steps=void 0;steps=new Hg;_icons;animationDone=new ve;disableRipple;color;labelPosition="end";headerPosition="top";_iconOverrides={};get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e)?e+"ms":e}_animationDuration="";_isServer=!re(ba).isBrowser;constructor(){super();let i=re(Bn).nativeElement.nodeName.toLowerCase();this.orientation=i==="mat-vertical-stepper"?"vertical":"horizontal"}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:e,templateRef:i})=>this._iconOverrides[e]=i),this.steps.changes.pipe(cs(this._destroyed)).subscribe(()=>this._stateChanged()),this.selectedIndexChange.pipe(cs(this._destroyed)).subscribe(()=>{let e=this._getAnimationDuration();e==="0ms"||e==="0s"?this._onAnimationDone():this._isAnimating.set(!0)}),this._ngZone.runOutsideAngular(()=>{this._animationsDisabled||setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-stepper-animations-enabled"),this._cleanupTransition=this._renderer.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionend)},200)})}ngAfterViewInit(){if(super.ngAfterViewInit(),typeof queueMicrotask=="function"){let e=!1;this._animatedContainers.changes.pipe(rl(null),cs(this._destroyed)).subscribe(()=>queueMicrotask(()=>{e||(e=!0,this.animationDone.emit()),this._stateChanged()}))}}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransition?.()}_getAnimationDuration(){return this._animationsDisabled?"0ms":this.animationDuration?this.animationDuration:this.orientation==="horizontal"?"500ms":"225ms"}_handleTransitionend=e=>{let i=e.target;if(!i)return;let o=this.orientation==="horizontal"&&e.propertyName==="transform"&&i.classList.contains("mat-horizontal-stepper-content-current"),r=this.orientation==="vertical"&&e.propertyName==="grid-template-rows"&&i.classList.contains("mat-vertical-content-container-active");(o||r)&&this._animatedContainers.find(d=>d.nativeElement===i)&&this._onAnimationDone()};_onAnimationDone(){this._isAnimating.set(!1),this.animationDone.emit()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(i,o,r){if(i&1&&(xt(r,BU,5),xt(r,uFt,5)),i&2){let s;Le(s=Ne())&&(o._steps=s),Le(s=Ne())&&(o._icons=s)}},viewQuery:function(i,o){if(i&1&&(Ri(WNe,5),Ri(tFt,5)),i&2){let r;Le(r=Ne())&&(o._stepHeader=r),Le(r=Ne())&&(o._animatedContainers=r)}},hostAttrs:["role","tablist"],hostVars:15,hostBindings:function(i,o){i&2&&(Ge("aria-orientation",o.orientation),Ir("--mat-stepper-animation-duration",o._getAnimationDuration()),Vn("mat-stepper-horizontal",o.orientation==="horizontal")("mat-stepper-vertical",o.orientation==="vertical")("mat-stepper-label-position-end",o.orientation==="horizontal"&&o.labelPosition=="end")("mat-stepper-label-position-bottom",o.orientation==="horizontal"&&o.labelPosition=="bottom")("mat-stepper-header-position-bottom",o.headerPosition==="bottom")("mat-stepper-animating",o._isAnimating()))},inputs:{disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],features:[jt([{provide:NU,useExisting:t}]),ft],ngContentSelectors:YNe,decls:5,vars:2,consts:[["stepTemplate",""],["animatedContainer",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[1,"mat-horizontal-content-container"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id","class"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"click","keydown","tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color"]],template:function(i,o){if(i&1&&(Nn(),qe(0,iFt,1,0),qe(1,sFt,7,0,"div",2)(2,lFt,2,0),ee(3,cFt,1,23,"ng-template",null,0,Pt)),i&2){let r;Ke(o._isServer?0:-1),T(),Ke((r=o.orientation)==="horizontal"?1:r==="vertical"?2:-1)}},dependencies:[Lo,WNe],styles:[`.mat-stepper-vertical,.mat-stepper-horizontal{display:block;font-family:var(--mat-stepper-container-text-font, var(--mat-sys-body-medium-font));background:var(--mat-stepper-container-color, var(--mat-sys-surface))}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px;border-top-color:var(--mat-stepper-line-color, var(--mat-sys-outline))}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:calc(calc((var(--mat-stepper-header-height, 72px) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;overflow:hidden;align-items:center;padding:0 24px;height:var(--mat-stepper-header-height, 72px)}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-horizontal-stepper-header.mat-step-header-empty-label .mat-step-icon{margin:0}.mat-horizontal-stepper-header::before,.mat-horizontal-stepper-header::after{border-top-color:var(--mat-stepper-line-color, var(--mat-sys-outline))}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{padding:calc((var(--mat-stepper-header-height, 72px) - 24px) / 2) 24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::after{top:calc(calc((var(--mat-stepper-header-height, 72px) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px;padding:calc((var(--mat-stepper-header-height, 72px) - 24px) / 2) 24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{visibility:hidden;overflow:hidden;outline:0;height:0}.mat-stepper-animations-enabled .mat-horizontal-stepper-content{transition:transform var(--mat-stepper-animation-duration, 0) cubic-bezier(0.35, 0, 0.25, 1)}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-previous{transform:translate3d(-100%, 0, 0)}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-next{transform:translate3d(100%, 0, 0)}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-current{visibility:visible;transform:none;height:auto}.mat-stepper-horizontal:not(.mat-stepper-animating) .mat-horizontal-stepper-content.mat-horizontal-stepper-content-current{overflow:visible}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}@media(forced-colors: active){.mat-horizontal-content-container{outline:solid 1px}}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{display:grid;grid-template-rows:0fr;grid-template-columns:100%;margin-left:36px;border:0;position:relative}.mat-stepper-animations-enabled .mat-vertical-content-container{transition:grid-template-rows var(--mat-stepper-animation-duration, 0) cubic-bezier(0.4, 0, 0.2, 1)}.mat-vertical-content-container.mat-vertical-content-container-active{grid-template-rows:1fr}.mat-step:last-child .mat-vertical-content-container{border:none}@media(forced-colors: active){.mat-vertical-content-container{outline:solid 1px}}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}@supports not (grid-template-rows: 0fr){.mat-vertical-content-container{height:0}.mat-vertical-content-container.mat-vertical-content-container-active{height:auto}}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid;border-left-color:var(--mat-stepper-line-color, var(--mat-sys-outline));top:calc(8px - calc((var(--mat-stepper-header-height, 72px) - 24px) / 2));bottom:calc(8px - calc((var(--mat-stepper-header-height, 72px) - 24px) / 2))}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0;visibility:hidden}.mat-stepper-animations-enabled .mat-vertical-stepper-content{transition:visibility var(--mat-stepper-animation-duration, 0) linear}.mat-vertical-content-container-active>.mat-vertical-stepper-content{visibility:visible}.mat-vertical-content{padding:0 24px 24px 24px} `],encapsulation:2,changeDetection:0})}return t})(),HQ=(()=>{class t extends KNe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275dir=rn({type:t,selectors:[["button","matStepperNext",""]],hostAttrs:[1,"mat-stepper-next"],hostVars:1,hostBindings:function(i,o){i&2&&Rr("type",o.type)},features:[ft]})}return t})();var mFt="aop",ZNe={type:"aop",category:"case",displayName:{de:"AOP Kriterien"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new MN(t.aopVersionYear,t.abschnitt1??null,t.abschnitt2??null,t.abschnitt1Oder2??null,t.icdNichtAmbulant??null,t.opsStationaer??null,t.funktionseinschraenkungen??null,t.pflegegrad??null,t.beatmung??null,t.altersgrenze??null,t.beidseitig??null,t.ophthalm??null,t.aop??null))},fromCondition(t){return Promise.resolve(new MN(t.aopVersionYear,t.abschnitt1??null,t.abschnitt2??null,t.abschnitt1Oder2??null,t.icdNichtAmbulant??null,t.opsStationaer??null,t.funktionseinschraenkungen??null,t.pflegegrad??null,t.beatmung??null,t.altersgrenze??null,t.beidseitig??null,t.ophthalm??null,t.aop??null))},newInstance(){return Promise.resolve(new MN(MN.DEFAULT_AOP_VERSION_YEAR,null,null,!0,!0,!0,!0,!0,!0,!0,!0,!0,null))}},MN=(()=>{class t extends hn{static{this.DEFAULT_AOP_VERSION_YEAR=2025}static{this.Specification=ZNe}constructor(e,i=null,o=null,r=null,s=null,d=null,m=null,v=null,w=null,O=null,N=null,V=null,$=null){super(ZNe.type),this._aopVersionYear=e,this._abschnitt1=i,this._abschnitt2=o,this._abschnitt1Oder2=r,this._icdNichtAmbulant=s,this._opsStationaer=d,this._funktionseinschraenkungen=m,this._pflegegrad=v,this._beatmung=w,this._altersgrenze=O,this._beidseitig=N,this._ophthalm=V,this._aop=$}clone(){return new t(this._aopVersionYear,this._abschnitt1,this._abschnitt2,this._abschnitt1Oder2,this._icdNichtAmbulant,this._opsStationaer,this._funktionseinschraenkungen,this._pflegegrad,this._beatmung,this._altersgrenze,this._beidseitig,this._ophthalm,this._aop)}equals(e){return super.equals(e)&&this._aopVersionYear===e._aopVersionYear&&this._abschnitt1===e.abschnitt1&&this._abschnitt2===e.abschnitt2&&this._abschnitt1Oder2===e.abschnitt1Oder2&&this._icdNichtAmbulant===e.icdNichtAmbulant&&this._opsStationaer===e.opsStationaer&&this._funktionseinschraenkungen===e.funktionseinschraenkungen&&this._pflegegrad===e.pflegegrad&&this._beatmung===e.beatmung&&this._altersgrenze===e.altersgrenze&&this._beidseitig===e.beidseitig&&this._ophthalm===e.ophthalm&&this._aop===e.aop}valid(){return!!this._aopVersionYear}validationToText(){return""}toCondition(){return Promise.resolve(new Dhe(this._aopVersionYear,this._abschnitt1,this._abschnitt2,this._abschnitt1Oder2,this._icdNichtAmbulant,this._opsStationaer,this._funktionseinschraenkungen,this._pflegegrad,this._beatmung,this._altersgrenze,this._beidseitig,this._ophthalm,this._aop))}toJSON(){return{type:this.type,aopVersionYear:this._aopVersionYear,abschnitt1:this._abschnitt1,abschnitt2:this._abschnitt2,abschnitt1Oder2:this._abschnitt1Oder2,icdNichtAmbulant:this._icdNichtAmbulant,opsStationaer:this._opsStationaer,funktionseinschraenkungen:this._funktionseinschraenkungen,pflegegrad:this._pflegegrad,beatmung:this._beatmung,altersgrenze:this._altersgrenze,beidseitig:this._beidseitig,ophthalm:this._ophthalm,aop:this._aop}}toText(){return"AOP Kriterien"}toValue(){return this}get abschnitt1(){return this._abschnitt1}set abschnitt1(e){this._abschnitt1=e}get abschnitt2(){return this._abschnitt2}set abschnitt2(e){this._abschnitt2=e}get icdNichtAmbulant(){return this._icdNichtAmbulant}set icdNichtAmbulant(e){this._icdNichtAmbulant=e}get opsStationaer(){return this._opsStationaer}set opsStationaer(e){this._opsStationaer=e}get funktionseinschraenkungen(){return this._funktionseinschraenkungen}set funktionseinschraenkungen(e){this._funktionseinschraenkungen=e}get pflegegrad(){return this._pflegegrad}set pflegegrad(e){this._pflegegrad=e}get beatmung(){return this._beatmung}set beatmung(e){this._beatmung=e}get altersgrenze(){return this._altersgrenze}set altersgrenze(e){this._altersgrenze=e}get beidseitig(){return this._beidseitig}set beidseitig(e){this._beidseitig=e}get ophthalm(){return this._ophthalm}set ophthalm(e){this._ophthalm=e}get aopVersionYear(){return this._aopVersionYear}set aopVersionYear(e){this._aopVersionYear=e}get abschnitt1Oder2(){return this._abschnitt1Oder2}set abschnitt1Oder2(e){this._abschnitt1Oder2=e}get aop(){return this._aop}set aop(e){this._aop=e}}return t})(),Dhe=class extends na{constructor(n,e,i,o,r,s,d,m,v,w,O,N,V){super(mFt),this.aopVersionYear=n,this.abschnitt1=e,this.abschnitt2=i,this.abschnitt1Oder2=o,this.icdNichtAmbulant=r,this.opsStationaer=s,this.funktionseinschraenkungen=d,this.pflegegrad=m,this.beatmung=v,this.altersgrenze=w,this.beidseitig=O,this.ophthalm=N,this.aop=V}toJSON(){return{[this.id]:{aopVersionYear:this.aopVersionYear,abschnitt1:this.abschnitt1,abschnitt2:this.abschnitt2,abschnitt1Oder2:this.abschnitt1Oder2,icdNichtAmbulant:this.icdNichtAmbulant,opsStationaer:this.opsStationaer,funktionseinschraenkungen:this.funktionseinschraenkungen,pflegegrad:this.pflegegrad,beatmung:this.beatmung,altersgrenze:this.altersgrenze,beidseitig:this.beidseitig,ophthalm:this.ophthalm,aop:this.aop}}}};var fFt="hartmannGroup",XNe={type:"hartmannCodeGroupIds",category:"case",displayName:{de:"Hartmann Gruppen"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new VU(t.hartmannCodeGroupIds))},fromCondition(t){return Promise.resolve(new VU(t.includes))},newInstance(){return Promise.resolve(new VU([]))}},VU=(()=>{class t extends hn{static{this.Specification=XNe}constructor(e){super(XNe.type),this.hartmannCodeGroupIds=e}clone(){return new t([...this.hartmannCodeGroupIds])}equals(e){return super.equals(e)&&Ui.equals(this.hartmannCodeGroupIds,e.hartmannCodeGroupIds)}validationToText(){return this.hartmannCodeGroupIds.length===0?"Mindestens eine Hartmann Gruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Ahe(this.hartmannCodeGroupIds,[]))}toJSON(){return{type:this.type,hartmannCodeGroupIds:this.hartmannCodeGroupIds}}toText(){return this.hartmannCodeGroupIds.length===1?"eine Hartmann Gruppe":`${this.hartmannCodeGroupIds.length} Hartmann Gruppen`}toValue(){return this.hartmannCodeGroupIds}}return t})(),Ahe=class extends ho{constructor(n,e){super(fFt,n,e)}};var zU=class t{static fromObject(n={}){return new t(n.einschlussKriterien??null,n.k1DrgStationaer??null,n.k2OpsStationaer??null,n.k3StationaereBehandlungBeatmung??null,n.k5IcdBetreuungsbedarf??null,n.k6IcdStationaer??null,n.k6sErhoehterAufwand??null,n.k7Pccl??null,n.k8Pflegegrade??null,n.kSharpAlter??null)}constructor(n,e,i,o,r,s,d,m,v,w){this._einschlussKriterien=n,this._k1DrgStationaer=e,this._k2OpsStationaer=i,this._k3StationaereBehandlungBeatmung=o,this._k5IcdBetreuungsbedarf=r,this._k6IcdStationaer=s,this._k6sErhoehterAufwand=d,this._k7Pccl=m,this._k8Pflegegrade=v,this._kSharpAlter=w}clone(){return new t(this._einschlussKriterien,this._k1DrgStationaer,this._k2OpsStationaer,this._k3StationaereBehandlungBeatmung,this._k5IcdBetreuungsbedarf,this._k6IcdStationaer,this._k6sErhoehterAufwand,this._k7Pccl,this._k8Pflegegrade,this._kSharpAlter)}equals(n){return!!n&&this._einschlussKriterien===n._einschlussKriterien&&this._k1DrgStationaer===n.k1DrgStationaer&&this._k2OpsStationaer===n.k2OpsStationaer&&this._k3StationaereBehandlungBeatmung===n.k3StationaereBehandlungBeatmung&&this._k5IcdBetreuungsbedarf===n.k5IcdBetreuungsbedarf&&this._k6IcdStationaer===n.k6IcdStationaer&&this._k6sErhoehterAufwand===n.k6sErhoehterAufwand&&this._k7Pccl===n.k7Pccl&&this._k8Pflegegrade===n.k8Pflegegrade&&this._kSharpAlter===n.kSharpAlter}toJSON(){return{einschlussKriterien:this._einschlussKriterien,k1DrgStationaer:this._k1DrgStationaer,k2OpsStationaer:this._k2OpsStationaer,k3StationaereBehandlungBeatmung:this._k3StationaereBehandlungBeatmung,k5IcdBetreuungsbedarf:this._k5IcdBetreuungsbedarf,k6IcdStationaer:this._k6IcdStationaer,k6sErhoehterAufwand:this._k6sErhoehterAufwand,k7Pccl:this._k7Pccl,k8Pflegegrade:this._k8Pflegegrade,kSharpAlter:this._kSharpAlter}}set einschlussKriterien(n){this._einschlussKriterien=n}set k1DrgStationaer(n){this._k1DrgStationaer=n}set k2OpsStationaer(n){this._k2OpsStationaer=n}set k3StationaereBehandlungBeatmung(n){this._k3StationaereBehandlungBeatmung=n}set k6IcdStationaer(n){this._k6IcdStationaer=n}set k5IcdBetreuungsbedarf(n){this._k5IcdBetreuungsbedarf=n}set k8Pflegegrade(n){this._k8Pflegegrade=n}set k6sErhoehterAufwand(n){this._k6sErhoehterAufwand=n}get einschlussKriterien(){return this._einschlussKriterien}get k1DrgStationaer(){return this._k1DrgStationaer}get k2OpsStationaer(){return this._k2OpsStationaer}get k3StationaereBehandlungBeatmung(){return this._k3StationaereBehandlungBeatmung}get k6IcdStationaer(){return this._k6IcdStationaer}get k5IcdBetreuungsbedarf(){return this._k5IcdBetreuungsbedarf}get k8Pflegegrade(){return this._k8Pflegegrade}get k6sErhoehterAufwand(){return this._k6sErhoehterAufwand}get kSharpAlter(){return this._kSharpAlter}set kSharpAlter(n){this._kSharpAlter=n}get k7Pccl(){return this._k7Pccl}set k7Pccl(n){this._k7Pccl=n}};var gFt="iges",JNe={type:"iges",category:"case",displayName:{de:"IGES Kriterien"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new UU(zU.fromObject(t.iges)))},fromCondition(t){return Promise.resolve(new UU(zU.fromObject(t)))},newInstance(){return Promise.resolve(new UU(null))}},UU=(()=>{class t extends hn{static{this.Specification=JNe}constructor(e){super(JNe.type),this._iges=e}clone(){let e=this._iges?this._iges.clone():null;return new t(e)}equals(e){return super.equals(e)&&vo.equals(this._iges,e._iges,(i,o)=>i.equals(o))}toCondition(){return Promise.resolve(new khe(this._iges.einschlussKriterien,this._iges.k1DrgStationaer,this._iges.k2OpsStationaer,this._iges.k3StationaereBehandlungBeatmung,this._iges.k5IcdBetreuungsbedarf,this._iges.k6IcdStationaer,this._iges.k6sErhoehterAufwand,this._iges.k7Pccl,this._iges.k8Pflegegrade,this._iges.kSharpAlter))}validationToText(){return"IGES Kriterien ausw\xE4hlen"}toJSON(){return{type:this.type,iges:this._iges}}toText(){return"IGES Kriterien"}toValue(){return this._iges}}return t})(),khe=class extends na{constructor(n,e,i,o,r,s,d,m,v,w){super(gFt),this.einschlussKriterien=n,this.k1DrgStationaer=e,this.k2OpsStationaer=i,this.k3StationaereBehandlungBeatmung=o,this.k5IcdBetreuungsbedarf=r,this.k6IcdStationaer=s,this.k6sErhoehterAufwand=d,this.k7Pccl=m,this.k8Pflegegrade=v,this.kSharpAlter=w}toJSON(){return{[this.id]:{einschlussKriterien:this.einschlussKriterien,k1DrgStationaer:this.k1DrgStationaer,k2OpsStationaer:this.k2OpsStationaer,k3StationaereBehandlungBeatmung:this.k3StationaereBehandlungBeatmung,k6IcdStationaer:this.k6IcdStationaer,k5IcdBetreuungsbedarf:this.k5IcdBetreuungsbedarf,k8Pflegegrade:this.k8Pflegegrade,k6sErhoehterAufwand:this.k6sErhoehterAufwand,k7Pccl:this.k7Pccl,kSharpAlter:this.kSharpAlter}}}};var _Ft="pccl",e3e={type:"pccl",category:"case",displayName:{de:"PCCL Kriterium"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new HU(t.pccl))},fromCondition(t){return Promise.resolve(new HU(t.includes))},newInstance(){return Promise.resolve(new HU([]))}},HU=(()=>{class t extends hn{static{this.Specification=e3e}constructor(e){super(e3e.type),this.pccl=e}clone(){return new t([...this.pccl])}equals(e){return super.equals(e)&&Ui.equals(this.pccl,e.pccl)}validationToText(){return this.pccl.length===0?"Mindestens ein PCCL Kriterium ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Mhe(this.pccl,[]))}toJSON(){return{type:this.type,pccl:this.pccl}}toText(){return this.pccl.length===1?"ein PCCL Kriterium":`${this.pccl.length} PCCL Kriterien`}toValue(){return this.pccl}}return t})(),Mhe=class extends ho{constructor(n,e){super(_Ft,n,e)}};var yFt="fullyInpatientCaseOperatingNumberValue",t3e={type:"operatingNumberFilter",category:"case",displayName:{de:"Kennzahl-Filter"},sortingIndex:9,occurrence:"multiple",fromObject(t){return Promise.resolve(new jU(t.operatingNumberId,t.value,t.comparison))},fromCondition(t){return Promise.resolve(new jU(t.operatingNumberId,t.value,t.comparison))},newInstance(){return Promise.resolve(new jU("counts","0","EQUAL"))}},jU=(()=>{class t extends hn{static{this.Specification=t3e}constructor(e,i,o){super(t3e.type),this.operatingNumberId=e,this.value=i,this.comparison=o}clone(){return new t(this.operatingNumberId,this.value,this.comparison)}equals(e){return super.equals(e)&&vo.equals(this.value,e.value)&&vo.equals(this.operatingNumberId,e.operatingNumberId)&&vo.equals(this.comparison,e.comparison)}valid(){return!!this.operatingNumberId&&!!this.value&&this.value.match("^-?\\d+[.,]?\\d*$")&&!!this.comparison}validationToText(){return this.operatingNumberId?this.comparison?Number.isInteger(this.value)?"":"Wert ausw\xE4hlen":"Vergleich ausw\xE4hlen":"Kennzahl ausw\xE4hlen"}toCondition(){return Promise.resolve(new Ohe(this.operatingNumberId,this.value,this.comparison))}toJSON(){return{type:this.type,comparison:this.comparison,value:this.value.toString(),operatingNumberId:this.operatingNumberId}}toText(){let e;switch(this.comparison){case"EQUAL":{e="gleich";break}case"GREATER":{e="gr\xF6\xDFer als";break}case"GREATER_OR_EQUAL":{e="gr\xF6\xDFer oder gleich";break}case"LESS":{e="kleiner als";break}case"LESS_OR_EQUAL":{e="kleiner oder gleich";break}}return`Kennzahl ist ${e} ${this.value}`}toValue(){return{comparison:this.comparison,operatingNumberId:this.operatingNumberId,value:this.value}}}return t})(),Ohe=class extends na{constructor(n,e,i){super(yFt),this.operatingNumberId=n,this.value=e,this.comparison=i}toJSON(){return{[this.id]:{operatingNumberId:this.operatingNumberId,value:this.value.replace(",","."),comparison:this.comparison}}}};var ON=class t{static fromObject(n={}){return new t(n.hybridDrgVersionYear,n.ops_p115f_a1_s1_n2_sgb??null,n.icdNichtAmbulant??null,n.opsStationaer??null,n.funktionseinschraenkungen??null,n.pflegegrad??null,n.beatmung??null,n.altersgrenze??null,n.beidseitig??null,n.ophthalm??null,n.belegungstage_lt_2??null,n.pccl_lt_3??null,n.keine_neubildungen??null)}constructor(n=2025,e=!0,i=!0,o=!0,r=!0,s=!0,d=!0,m=!0,v=!0,w=!0,O=!0,N=!0,V=!0){this._hybridDrgVersionYear=n,this._ops_p115f_a1_s1_n2_sgb=e,this._icdNichtAmbulant=i,this._opsStationaer=o,this._funktionseinschraenkungen=r,this._pflegegrad=s,this._beatmung=d,this._altersgrenze=m,this._beidseitig=v,this._ophthalm=w,this._belegungstage_lt_2=O,this._pccl_lt_3=N,this._keine_neubildungen=V}clone(){return new t(this._hybridDrgVersionYear,this._ops_p115f_a1_s1_n2_sgb,this._icdNichtAmbulant,this._opsStationaer,this._funktionseinschraenkungen,this._pflegegrad,this._beatmung,this._altersgrenze,this._beidseitig,this._ophthalm,this._belegungstage_lt_2,this._pccl_lt_3,this._keine_neubildungen)}equals(n){return!!n&&vo.equals(this._hybridDrgVersionYear,n._hybridDrgVersionYear)&&this._ops_p115f_a1_s1_n2_sgb===n._ops_p115f_a1_s1_n2_sgb&&this._icdNichtAmbulant===n.icdNichtAmbulant&&this._opsStationaer===n.opsStationaer&&this._funktionseinschraenkungen===n.funktionseinschraenkungen&&this._pflegegrad===n.pflegegrad&&this._beatmung===n.beatmung&&this._altersgrenze===n.altersgrenze&&this._beidseitig===n.beidseitig&&this._ophthalm===n.ophthalm&&this._belegungstage_lt_2===n.belegungstage_lt_2&&this._pccl_lt_3===n.pccl_lt_3&&this._keine_neubildungen===n.keine_neubildungen}toJSON(){return{hybridDrgVersionYear:this._hybridDrgVersionYear,ops_p115f_a1_s1_n2_sgb:this._ops_p115f_a1_s1_n2_sgb,icdNichtAmbulant:this._icdNichtAmbulant,opsStationaer:this._opsStationaer,funktionseinschraenkungen:this._funktionseinschraenkungen,pflegegrad:this._pflegegrad,beatmung:this._beatmung,altersgrenze:this._altersgrenze,beidseitig:this._beidseitig,ophthalm:this._ophthalm,belegungstage_lt_2:this._belegungstage_lt_2,pccl_lt_3:this._pccl_lt_3,keine_neubildungen:this._keine_neubildungen}}get hybridDrgVersionYear(){return this._hybridDrgVersionYear}set hybridDrgVersionYear(n){this._hybridDrgVersionYear=n}get ops_p115f_a1_s1_n2_sgb(){return this._ops_p115f_a1_s1_n2_sgb}set ops_p115f_a1_s1_n2_sgb(n){this._ops_p115f_a1_s1_n2_sgb=n}get icdNichtAmbulant(){return this._icdNichtAmbulant}set icdNichtAmbulant(n){this._icdNichtAmbulant=n}get opsStationaer(){return this._opsStationaer}set opsStationaer(n){this._opsStationaer=n}get funktionseinschraenkungen(){return this._funktionseinschraenkungen}set funktionseinschraenkungen(n){this._funktionseinschraenkungen=n}get pflegegrad(){return this._pflegegrad}set pflegegrad(n){this._pflegegrad=n}get beatmung(){return this._beatmung}set beatmung(n){this._beatmung=n}get altersgrenze(){return this._altersgrenze}set altersgrenze(n){this._altersgrenze=n}get beidseitig(){return this._beidseitig}set beidseitig(n){this._beidseitig=n}get ophthalm(){return this._ophthalm}set ophthalm(n){this._ophthalm=n}get belegungstage_lt_2(){return this._belegungstage_lt_2}set belegungstage_lt_2(n){this._belegungstage_lt_2=n}get pccl_lt_3(){return this._pccl_lt_3}set pccl_lt_3(n){this._pccl_lt_3=n}get keine_neubildungen(){return this._keine_neubildungen}set keine_neubildungen(n){this._keine_neubildungen=n}};var vFt="hybridDrg",i3e={type:"hybridDrg",category:"case",displayName:{de:"Hybrid DRG"},sortingIndex:10,occurrence:"single",fromObject(t){return Promise.resolve(new GU(ON.fromObject(t.hybridDrg)))},fromCondition(t){return Promise.resolve(new GU(ON.fromObject(t)))},newInstance(){return Promise.resolve(new GU(new ON))}},GU=(()=>{class t extends hn{static{this.Specification=i3e}constructor(e){super(i3e.type),this._hybridDrg=e}clone(){let e=this._hybridDrg?this._hybridDrg.clone():null;return new t(e)}equals(e){return e&&super.equals(e)&&this._hybridDrg.equals(e._hybridDrg)}toCondition(){return Promise.resolve(new Rhe(this._hybridDrg.hybridDrgVersionYear,this._hybridDrg.ops_p115f_a1_s1_n2_sgb,this._hybridDrg.icdNichtAmbulant,this._hybridDrg.opsStationaer,this._hybridDrg.funktionseinschraenkungen,this._hybridDrg.pflegegrad,this._hybridDrg.beatmung,this._hybridDrg.altersgrenze,this._hybridDrg.beidseitig,this._hybridDrg.ophthalm,this._hybridDrg.belegungstage_lt_2,this._hybridDrg.pccl_lt_3,this._hybridDrg.keine_neubildungen))}validationToText(){return"Hybrid DRG Kriterien ausw\xE4hlen"}toJSON(){return{type:this.type,hybridDrg:this._hybridDrg.toJSON()}}toText(){return"Hybrid DRG Kriterien"}toValue(){return this._hybridDrg}}return t})(),Rhe=class extends na{constructor(n=2025,e,i=null,o=null,r=null,s=null,d=null,m=null,v=null,w=null,O=null,N=null,V=null){super(vFt),this._hybridDrgVersionYear=n,this._ops_p115f_a1_s1_n2_sgb=e,this._icdNichtAmbulant=i,this._opsStationaer=o,this._funktionseinschraenkungen=r,this._pflegegrad=s,this._beatmung=d,this._altersgrenze=m,this._beidseitig=v,this._ophthalm=w,this._belegungstage_lt_2=O,this._pccl_lt_3=N,this._keine_neubildungen=V}toJSON(){return{[this.id]:{hybridDrgVersionYear:this._hybridDrgVersionYear,ops_p115f_a1_s1_n2_sgb:this._ops_p115f_a1_s1_n2_sgb,icdNichtAmbulant:this._icdNichtAmbulant,opsStationaer:this._opsStationaer,funktionseinschraenkungen:this._funktionseinschraenkungen,pflegegrad:this._pflegegrad,beatmung:this._beatmung,altersgrenze:this._altersgrenze,beidseitig:this._beidseitig,ophthalm:this._ophthalm,belegungstage_lt_2:this._belegungstage_lt_2,pccl_lt_3:this._pccl_lt_3,keine_neubildungen:this._keine_neubildungen}}}};var bFt="intuitiveFotCategory",n3e={type:"intuitiveFotCategory",category:"case",displayName:{de:"Intuitive File of Truth Category",en:"Intuitive File of Truth Category"},sortingIndex:8,occurrence:"single",newInstance(){return Promise.resolve(new $U([],null))},fromCondition(t){return Promise.resolve(new $U(t.includes?t.includes:null,t.excludes?t.excludes:null))},fromObject(t){return Promise.resolve(new $U(t.includes?t.includes:null,t.excludes?t.excludes:null))}},$U=(()=>{class t extends hn{static{this.Specification=n3e}constructor(e,i){super(n3e.type),this.includes=e,this.excludes=i}clone(){return new t(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new Fhe(this.includes,this.excludes))}toJSON(){return{type:this.type,includes:this.includes?this.includes:null,excludes:this.excludes?this.excludes:null}}toValue(){return{includes:this.includes,excludes:this.excludes}}valid(){return this.includes&&this.includes.length>0||this.excludes&&this.excludes.length>0}validationToText(){return!this.includes&&!this.excludes||this.includes&&this.includes.length===0||this.excludes&&this.excludes.length===0?"Mindestens eine Intuitive File of Truth Category ausw\xE4hlen":""}toText(){return!this.includes&&!this.excludes?"":this.excludes?this.excludes.length===1?"eine Intuitive File of Truth Category":`${this.excludes.length} Intuitive File of Truth Categories`:this.includes.length===1?"eine Intuitive File of Truth Category":`${this.includes.length} Intuitive File of Truth Categories`}}return t})(),Fhe=class extends ho{constructor(n,e){super(bFt,n,e)}};var CFt="intuitiveFotProcedureName",o3e={type:"intuitiveFotProcedureName",category:"case",displayName:{de:"Intuitive File of Truth Procedure Name",en:"Intuitive File of Truth Procedure Name"},sortingIndex:8,occurrence:"single",newInstance(){return Promise.resolve(new qU([],null))},fromCondition(t){return Promise.resolve(new qU(t.includes?t.includes:null,t.excludes?t.excludes:null))},fromObject(t){return Promise.resolve(new qU(t.includes?t.includes:null,t.excludes?t.excludes:null))}},qU=(()=>{class t extends hn{static{this.Specification=o3e}constructor(e,i){super(o3e.type),this.includes=e,this.excludes=i}clone(){return new t(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new Phe(this.includes,this.excludes))}toJSON(){return{type:this.type,includes:this.includes?this.includes:null,excludes:this.excludes?this.excludes:null}}toValue(){return{includes:this.includes,excludes:this.excludes}}valid(){return this.includes&&this.includes.length>0||this.excludes&&this.excludes.length>0}validationToText(){return!this.includes&&!this.excludes||this.includes&&this.includes.length===0||this.excludes&&this.excludes.length===0?"Mindestens eine Intuitive File of Truth Procedure Name ausw\xE4hlen":""}toText(){return!this.includes&&!this.excludes?"":this.excludes?this.excludes.length===1?"ein Intuitive File of Truth Procedure Name":`${this.excludes.length} Intuitive File of Truth Procedure Names`:this.includes.length===1?"ein Intuitive File of Truth Procedure Name":`${this.includes.length} Intuitive File of Truth Procedure Names`}}return t})(),Phe=class extends ho{constructor(n,e){super(CFt,n,e)}};var xFt="intuitiveFotProcedureSubject",r3e={type:"intuitiveFotProcedureSubject",category:"case",displayName:{de:"Intuitive File of Truth Procedure Subject",en:"Intuitive File of Truth Procedure Subject"},sortingIndex:8,occurrence:"single",newInstance(){return Promise.resolve(new KU([],null))},fromCondition(t){return Promise.resolve(new KU(t.includes?t.includes:null,t.excludes?t.excludes:null))},fromObject(t){return Promise.resolve(new KU(t.includes?t.includes:null,t.excludes?t.excludes:null))}},KU=(()=>{class t extends hn{static{this.Specification=r3e}constructor(e,i){super(r3e.type),this.includes=e,this.excludes=i}clone(){return new t(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new Lhe(this.includes,this.excludes))}toJSON(){return{type:this.type,includes:this.includes?this.includes:null,excludes:this.excludes?this.excludes:null}}toValue(){return{includes:this.includes,excludes:this.excludes}}valid(){return this.includes&&this.includes.length>0||this.excludes&&this.excludes.length>0}validationToText(){return!this.includes&&!this.excludes||this.includes&&this.includes.length===0||this.excludes&&this.excludes.length===0?"Mindestens eine Intuitive File of Truth Procedure Subject ausw\xE4hlen":""}toText(){return!this.includes&&!this.excludes?"":this.excludes?this.excludes.length===1?"ein Intuitive File of Truth Procedure Subject":`${this.excludes.length} Intuitive File of Truth Procedure Subjects`:this.includes.length===1?"ein Intuitive File of Truth Procedure Subject":`${this.includes.length} Intuitive File of Truth Procedure Subjects`}}return t})(),Lhe=class extends ho{constructor(n,e){super(xFt,n,e)}};var wFt="intuitiveFotTypeOfEntry",s3e={type:"intuitiveFotTypeOfEntry",category:"case",displayName:{de:"Intuitive File of Truth Type of Entry",en:"Intuitive File of Truth Type of Entry"},sortingIndex:8,occurrence:"single",newInstance(){return Promise.resolve(new WU([],null))},fromCondition(t){return Promise.resolve(new WU(t.includes?t.includes:null,t.excludes?t.excludes:null))},fromObject(t){return Promise.resolve(new WU(t.includes?t.includes:null,t.excludes?t.excludes:null))}},WU=(()=>{class t extends hn{static{this.Specification=s3e}constructor(e,i){super(s3e.type),this.includes=e,this.excludes=i}clone(){return new t(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new Nhe(this.includes,this.excludes))}toJSON(){return{type:this.type,includes:this.includes?this.includes:null,excludes:this.excludes?this.excludes:null}}toValue(){return{includes:this.includes,excludes:this.excludes}}valid(){return this.includes&&this.includes.length>0||this.excludes&&this.excludes.length>0}validationToText(){return!this.includes&&!this.excludes||this.includes&&this.includes.length===0||this.excludes&&this.excludes.length===0?"Mindestens eine Intuitive File of Truth Type of Entry ausw\xE4hlen":""}toText(){return!this.includes&&!this.excludes?"":this.excludes?this.excludes.length===1?"eine Intuitive File of Truth Type of Entry":`${this.excludes.length} Intuitive File of Truth Type of Entries`:this.includes.length===1?"eine Intuitive File of Truth Type of Entry":`${this.includes.length} Intuitive File of Truth Type of Entries`}}return t})(),Nhe=class extends ho{constructor(n,e){super(wFt,n,e)}};var Bhe=class t extends Iy{static{this.SPECIFICATIONS=[{specification:bN.Specification},{specification:MN.Specification},{specification:VU.Specification,permissions:["HARTMANN_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:UU.Specification},{specification:GU.Specification},{specification:HU.Specification},{specification:lf.Specification},{specification:Ox.Specification},{specification:pb.Specification},{specification:df.Specification},{specification:h_.Specification},{specification:cf.Specification},{specification:B2.Specification},{specification:VE.Specification},{specification:lN.Specification},{specification:fN.Specification},{specification:GE.Specification},{specification:nN.Specification},{specification:Q2.Specification},{specification:oM.Specification},{specification:gN.Specification},{specification:sM.Specification},{specification:jU.Specification},{specification:dN.Specification},{specification:U2.Specification},{specification:Z2.Specification},{specification:$U.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:qU.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:KU.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:WU.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]}]}static fromObject(n,e){return bt(this,null,function*(){return $a.fromObject(n.expression,e).then(i=>new t(i))})}constructor(n=$a.EMPTY()){super("fully-inpatient-cases-filter",n)}clone(){return new t(this.expression.clone())}overrideClone(n){return new t(this.expression.overrideClone(n))}onUpdateVirtualClinicId(n){this.expression=$a.withoutType(this.expression,aM)}};var Vhe=class t extends Iy{static{this.TYPES=[{specification:Ty.Specification},{specification:lM.Specification},{specification:W2.Specification},{specification:pS.Specification},{specification:q2.Specification}]}static fromObject(n,e){return $a.fromObject(n.expression,e).then(i=>new t(i))}constructor(n=$a.EMPTY()){super("clinics-filter",n)}clone(){return new t(this.expression.clone())}overrideClone(n){return new t(this.expression.overrideClone(n))}};var jQ=class t{static of(n,e,i){let o={};return n.groupedValues.forEach(r=>{let s={},d=r.aggregated/n.aggregatedValue,m=e[r.label.key]?e[r.label.key].displayName():"n/a";r.groupedValues.forEach(v=>{let w=i[v.label.key]?i[v.label.key].getDisplayName():v.label.shortDisplayName;s[v.label.key]={count:v.value,name:w}}),o[r.label.key]={count:r.aggregated,name:m,percentage:d,postalCodes:s}}),new t(o)}constructor(n){this.patientCount=n,this.init(),this.postalCodeLayerData=this.data.reduce((e,i)=>(i.children.forEach(o=>e[o.postalCode]=o.total),e),{})}init(){let n=Object.keys(this.patientCount);this.data=n.map(e=>{let i=this.patientCount[e],o={adId:e,name:i.name},r=Object.keys(i.postalCodes);return o.children=r.map(s=>{let d=i.postalCodes[s];return{postalCode:s,name:d.name,total:d.count}}).sort((s,d)=>{let m=0;return s.total>d.total?m=-1:s.totals+d.total,0),o}).sort((e,i)=>{let o=0;return e.total>i.total?o=-1:e.totaliN.fromObjArr(r)))}findById(n){let e=this._api.virtualClinicById(n);return this._cache.cacheObservable(this.key(n),this._httpClient.get(e).pipe(vt(iN.fromObj),vt(i=>i.clone())))}create(n){let e=this._api.virtualClinics();return this._httpClient.post(e,n).pipe(vt(iN.fromObj))}update(n){this.deleteCacheForKey(n.id);let e=this._api.virtualClinicById(n.id);return this._httpClient.post(e,n).pipe(vt(()=>null))}getSpecialtyDepartments(n,e){let i=this._api.specialtyDepartments(n);return e&&(i=this._api.specialtyDepartment(n,e)),this._httpClient.get(i).pipe(vt(z2.fromObjArr))}khtgLeistungsgruppen(){let n=this._api.leistungsgruppenKHTG();return this._cache.cacheObservable(n,this._httpClient.get(n))}fileOfTruthCategories(){let n=`${this._api.fileOfTruth()}/categories`;return this._cache.cacheObservable("fileOfTruthCategories",this._httpClient.get(n))}fileOfTruthTypeOfEntries(){let n=`${this._api.fileOfTruth()}/type-of-entries`;return this._cache.cacheObservable("fileOfTruthTypeOfEntries",this._httpClient.get(n))}fileOfTruthProcedureSubjects(){let n=`${this._api.fileOfTruth()}/categories/procedure-subjects`;return this._cache.cacheObservable("fileOfTruthProcedureSubjects",this._httpClient.get(n))}fileOfTruthProcedureNames(){let n=`${this._api.fileOfTruth()}/categories/procedure-names`;return this._cache.cacheObservable("fileOfTruthProcedureNames",this._httpClient.get(n))}saveAddress(n,e){let i=this._api.address(n),o=mt(be({},e),{administrativeDistrictId:e?.administrativeDistrictId?.getNumericValue()});return this._httpClient.post(i,o).pipe(Vo(()=>this.deleteCacheForKey(n)),vt(r=>k6.fromObject(r)))}getCaseNumber(n,e,i){let o=this._api.caseNumbers(n);e&&(o=`${this._api.specialtyDepartment(n,e)}case-number`);let r=new Pr;return i&&(r=r.append("year",String(i))),this._httpClient.get(o,{params:r}).pipe(vt(O6.fromObjArr)).toPromise()}saveCaseNumber(n){let e=this._api.caseNumbers(n.virtualClinicId);return this._httpClient.post(e,n).pipe(vt(O6.fromObj)).toPromise()}deleteCaseNumber(n,e){let i=this._api.caseNumbers(n),o=new Pr;return e&&(o=o.append("year",String(e))),this._httpClient.delete(i,{params:o}).toPromise()}getStaffing(n,e,i){let o=this._api.staffing(n);e&&(o=`${this._api.specialtyDepartment(n,e)}staffing`);let r=new Pr;return i&&(r=r.append("year",String(i))),this._httpClient.get(o,{params:r}).pipe(vt(M6.fromObjArr)).toPromise()}saveStaffing(n){let e=this._api.staffing(n.virtualClinicId);return this._httpClient.post(e,n).pipe(vt(M6.fromObj)).toPromise()}deleteStaffing(n,e){let i=this._api.staffing(n),o=new Pr;return e&&(o=o.append("year",String(e))),this._httpClient.delete(i,{params:o}).toPromise()}saveSpecialtyDepartment(n){let e=this._api.specialtyDepartments(n.virtualClinicId);return this._httpClient.post(e,n).pipe(vt(i=>z2.fromObj(i))).toPromise()}deleteSpecialtyDepartment(n,e){let i=this._api.specialtyDepartment(n,e);return this._httpClient.delete(i).toPromise()}getFullyInpatientCases(n,e,i=new Gu){let o=this._api.fullyInpatientCases(n),r={condition:i.toJSON()};return this._httpClient.post(o,r,{params:sy.toHttpParams(e)}).pipe(vt(s=>Pw.responseToPage(s,d=>A6.fromObjArr(d))))}getFullyInpatientCase(n,e){let i=this._api.fullyInpatientCase(n,e);return this._httpClient.get(i).pipe(vt(o=>A6.fromObj(o)))}getAnnualAccounts(n,e){let i=this._api.annualAccount(n),o=new Pr;return e&&(o=o.append("year",String(e))),this._httpClient.get(i,{params:o}).pipe(vt(cQ.fromObjArr)).toPromise()}saveAnnualAccount(n){let e=this._api.annualAccount(n.virtualClinicId);return this._httpClient.post(e,n).toPromise()}deleteAnnualAccounts(n,e){let i=this._api.annualAccount(n),o=new Pr;return e&&(o=o.append("year",String(e))),this._httpClient.delete(i,{params:o}).toPromise()}getAdditionalInfo(n,e){let i=this._api.additionalInfo(n),o=new Pr;return e&&(o=o.append("year",String(e))),this._httpClient.get(i,{params:o}).pipe(vt(lQ.fromObjArr)).toPromise()}saveAdditionalInfo(n){let e=this._api.additionalInfo(n.virtualClinicId);return this._httpClient.post(e,n).toPromise()}deleteAdditionalInfo(n,e){let i=this._api.additionalInfo(n),o=new Pr;return e&&(o=o.append("year",String(e))),this._httpClient.delete(i,{params:o}).toPromise()}getRelatedVirtualClinics(n){let e=this._api.relatedVirtualClinics(n);return this._httpClient.get(e)}getKoStImports(n){let e=this._api.kostImports(n);return this._httpClient.get(e).pipe(vt(i=>i.map(o=>aQ.fromObj(o))))}patientsByAdministrativeDistricts(n,e){let i={type:"VirtualClinicOperatingNumberSingle",virtualClinicId:n,groupBy:[{fieldName:"administrativeDistrict",aggregation:{name:"SUM"},sort:{sortBy:"LABEL",direction:"DESC"}},{fieldName:"postalCode",aggregation:{name:"SUM"},sort:{sortBy:"LABEL",direction:"DESC"}}],term:{type:"fullyInpatientCaseOperatingNumber",operatingNumberId:"counts",condition:e.toJSON()}};return this._virtualClinicAnalysisService.resolve({REQ:i}).pipe(vt(o=>{if(o.requests.REQ.statusType==="error")throw new Error(o.requests.REQ.errors[0].text.de);if(o.requests.REQ.statusType==="warning")throw new Error(o.requests.REQ.warning[0].text.de);return o}),Yl(o=>{let r=[],s=[];return o.requests.REQ.groupedValues.forEach(d=>{r.push(d.label.key),d.groupedValues.forEach(m=>{s.push(m.label.key)})}),tc([this._postalCodeService.findAll(s,"FIRST"),this._districtService.findAll(r.map(d=>Yo.createFromString(d)))]).pipe(vt(d=>({virtualClinicAnalysisResponse:o,postalCodesMapping:d[0],administrativeDistrictMapping:d[1]})))}),vt(o=>jQ.of(o.virtualClinicAnalysisResponse.requests.REQ,o.administrativeDistrictMapping,o.postalCodesMapping)))}};var IFt=t=>["/virtual-clinics",t.id];var EFt=()=>!1,RN={detailLinkFnc:IFt,disableFnc:EFt,filterFnc:u_,resourceNameTitle:"Virtuelle Klinik",emptyResourcesText:"Keine Virtuellen Kliniken gespeichert",selectOnInit:"first",minPermission:"READ",maxPermission:"CREATOR",resetOption:!1};var l3e=(()=>{class t{constructor(){this.options=RN,this.virtualClinicSelect=new ve,this.resourceName=ko.VIRTUAL_CLINIC,this.resourceSelect=null}ngOnChanges(e){e.virtualClinicId&&e.virtualClinicId.currentValue&&this.virtualClinicId&&(this.resourceSelect={id:this.virtualClinicId})}onVirtualClinicSelect(e){this.virtualClinicSelect.emit(e?.resource)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-virtual-clinic-select-inline"]],inputs:{virtualClinicId:"virtualClinicId",options:"options",resourceName:"resourceName"},outputs:{virtualClinicSelect:"virtualClinicSelect"},features:[Ot],decls:1,vars:3,consts:[[3,"resourceSelectChange","resourceSelect","resourceName","config"]],template:function(i,o){i&1&&(k(0,"bd-resources-select-inline-single",0),ie("resourceSelectChange",function(s){return o.onVirtualClinicSelect(s)}),D()),i&2&&E("resourceSelect",o.resourceSelect)("resourceName",o.resourceName)("config",o.options)},dependencies:[m6],encapsulation:2})}}return t})();var c3e=(()=>{class t{constructor(e){this._virtualClinicService=e,this.selectedSpecialtyDepartmentIds=[],this.specialtyDepartmentSelect=new ve,this.config={id:"virtual-clinic-specialty-departments-inline-multiple-select",selectLabel:"Fachabteilungen",option:{sortFnc:(i,o)=>this.sortFnc(i,o),uniqueFnc:i=>i.id,searchOptionAccessor:i=>`${i.fabKey} ${i.name}`,searchOptionDisplayName:i=>i?.name??i.fabKey}},this.initialSpecialtyDepartments=[],this.specialtyDepartmentOptions=vc,this._newVirtualClinicChange=new hi}ngOnChanges(e){e.virtualClinicId&&(e.virtualClinicId.currentValue?(this._newVirtualClinicChange.next(e.virtualClinicId.currentValue),this._fetch()):this.specialtyDepartmentOptions=ci([])),e.selectedSpecialtyDepartmentIds&&(this.initialSpecialtyDepartments=this.selectedSpecialtyDepartmentIds.map(i=>new z2(null,i)))}setSpecialtyDepartments(e){this.specialtyDepartmentSelect.emit(e)}_fetch(){this.specialtyDepartmentOptions=vB(nr(this._virtualClinicService.getSpecialtyDepartments(this.virtualClinicId)),this._newVirtualClinicChange.asObservable()).pipe(Mn(e=>e instanceof Array?ci(e):ci([])))}sortFnc(e,i){return!!e&&!!i&&e?.name?.localeCompare(i?.name)}static{this.\u0275fac=function(i){return new(i||t)(_e(hf))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-virtual-clinic-specialty-departments-inline-multiple-select"]],inputs:{virtualClinicId:"virtualClinicId",selectedSpecialtyDepartmentIds:"selectedSpecialtyDepartmentIds"},outputs:{specialtyDepartmentSelect:"specialtyDepartmentSelect"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","initialSelection","selectOptions"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.setSpecialtyDepartments(s)}),D()),i&2&&E("config",o.config)("initialSelection",o.initialSpecialtyDepartments)("selectOptions",o.specialtyDepartmentOptions)},dependencies:[_a],encapsulation:2})}}return t})();function DFt(t,n){if(t&1&&(k(0,"mat-option",1),Q(1),D()),t&2){let e=n.$implicit;E("value",e),T(),Qi(" ",e," ")}}var d3e=(()=>{class t{constructor(){this.yearSelect=new ve,this.yearOptions=[]}ngOnChanges(e){e.virtualClinic&&(e.virtualClinic.currentValue?this._onVirtualClinicChange(e.virtualClinic):(this.selectedYear=null,this.yearOptions=[]))}onYearSelect(e){this.selectedYear=e,this.yearSelect.emit(e)}_onVirtualClinicChange(e){e.currentValue&&this.virtualClinic.clinicInformation?.dismissalDateRange&&(this.yearOptions=this.virtualClinic.clinicInformation.dismissalDateRange.getYears(),this.onYearSelect(this.yearOptions[this.yearOptions.length-1]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-virtual-clinic-structural-select-year"]],inputs:{virtualClinic:"virtualClinic"},outputs:{yearSelect:"yearSelect"},features:[Ot],decls:6,vars:1,consts:[["data-test","virtual-clinic-structural-select-year",3,"valueChange","value"],[3,"value"]],template:function(i,o){i&1&&(k(0,"mat-form-field")(1,"mat-label"),Q(2,"Jahr"),D(),k(3,"mat-select",0),ie("valueChange",function(s){return o.onYearSelect(s)}),lo(4,DFt,2,2,"mat-option",1,jo),D()()),i&2&&(T(3),E("value",o.selectedYear),T(),co(o.yearOptions))},dependencies:[Ra,rs,Ol,Kv,c0,bh,ry],encapsulation:2})}}return t})();function AFt(t,n){if(t&1){let e=tt();k(0,"ays-virtual-clinic-specialty-departments-inline-multiple-select",6),ie("specialtyDepartmentSelect",function(o){se(e);let r=P(2);return ae(r.onSpecialtyDepartmentChange(o))}),D()}if(t&2){let e=P(2);E("virtualClinicId",e.selection.virtualClinic.id)}}function kFt(t,n){t&1&&ce(0,"p-skeleton",4)}function MFt(t,n){if(t&1&&(k(0,"div",1),qe(1,AFt,1,1,"ays-virtual-clinic-specialty-departments-inline-multiple-select",5)(2,kFt,1,0,"p-skeleton",4),D()),t&2){let e=P();T(),Ke(e.selection!=null&&e.selection.virtualClinic?1:2)}}function OFt(t,n){if(t&1){let e=tt();k(0,"ays-virtual-clinic-structural-select-year",7),ie("yearSelect",function(o){se(e);let r=P();return ae(r.onYearChange(o))}),D()}if(t&2){let e=P();E("virtualClinic",e.selection.virtualClinic)}}function RFt(t,n){t&1&&ce(0,"p-skeleton",4)}var qQ=(()=>{class t{constructor(){this.withSpecialtyDepartment=!0,this.selectionChange=new ve,this.virtualClinicSelectOptions=mt(be({},RN),{selectOnInit:"none"})}ngOnInit(){this.selection=this.selection??{}}onVirtualClinicChange(e){this.selection={virtualClinic:e,specialtyDepartments:null,year:null},this._onSelectionChange()}onSpecialtyDepartmentChange(e){this.selection.specialtyDepartments=e,this._onSelectionChange()}onYearChange(e){this.selection.year=e,this._onSelectionChange()}_onSelectionChange(){this._selectionIsValid()&&this.selectionChange.emit(this.selection)}_selectionIsValid(){return this.withSpecialtyDepartment?!!this.selection.virtualClinic&&!!this.selection.specialtyDepartments&&!!this.selection.year:!!this.selection.virtualClinic&&!!this.selection.year}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-virtual-clinic-structural-select"]],inputs:{selection:"selection",withSpecialtyDepartment:"withSpecialtyDepartment"},outputs:{selectionChange:"selectionChange"},decls:7,vars:3,consts:[[1,"flex","flex-row","gap-6"],[1,"flex-1"],[3,"virtualClinicSelect","options"],[3,"virtualClinic"],["height","100%"],[3,"virtualClinicId"],[3,"specialtyDepartmentSelect","virtualClinicId"],[3,"yearSelect","virtualClinic"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"ays-virtual-clinic-select-inline",2),ie("virtualClinicSelect",function(s){return o.onVirtualClinicChange(s)}),D()(),qe(3,MFt,3,1,"div",1),k(4,"div",1),qe(5,OFt,1,1,"ays-virtual-clinic-structural-select-year",3)(6,RFt,1,0,"p-skeleton",4),D()()),i&2&&(T(2),E("options",o.virtualClinicSelectOptions),T(),Ke(o.withSpecialtyDepartment?3:-1),T(2),Ke(o.selection.virtualClinic?5:6))},dependencies:[l3e,c3e,d3e,of,mm,On],encapsulation:2})}}return t})();var u3e=Ap(Kw());var FFt=()=>({"min-width":"50rem"}),PFt=()=>[5,10,20];function LFt(t,n){t&1&&(k(0,"div",13)(1,"div",14),ce(2,"p-skeleton"),D(),k(3,"div",14),ce(4,"p-skeleton"),D()())}function NFt(t,n){t&1&&(k(0,"tr")(1,"th",21),ce(2,"p-tableHeaderCheckbox"),D(),k(3,"th"),Q(4,"Landkreis"),D(),k(5,"th",22),Q(6,"Anzahl F\xE4lle (Anteil)"),D()())}function BFt(t,n){if(t&1&&(k(0,"tr")(1,"td"),ce(2,"p-tableCheckbox",23),D(),k(3,"td"),Q(4),Xn(5,"administrativeDistrict"),Xn(6,"async"),D(),k(7,"td",22),Q(8),Xn(9,"number"),Xn(10,"percent"),D()()),t&2){let e,i=n.$implicit,o=P(2);T(2),E("value",i),T(2),Qi(" ",(e=Nr(6,6,Nr(5,4,i)))==null?null:e.displayName()," "),T(4),_d(" ",Nr(9,8,o.patientDistributionById(i).count)," (",Nr(10,10,o.patientDistributionById(i).percentage),") ")}}function VFt(t,n){if(t&1){let e=tt();k(0,"div",13)(1,"div",14)(2,"div",15)(3,"bd-map",16),ie("mapLoaded",function(o){se(e);let r=P();return ae(r.onMapLoaded(o))})("mapClick",function(o){se(e);let r=P();return ae(r.onMapClick(o))}),D(),ce(4,"bd-map-legend",17),D()(),k(5,"div",14)(6,"p-table",18),ie("selectionChange",function(o){se(e);let r=P();return ae(r.onSelectedAdministrativeDistrictsChange(o))}),ee(7,NFt,7,0,"ng-template",19)(8,BFt,11,12,"ng-template",20),D()()()}if(t&2){let e=P();T(3),E("mapOptions",e.mapOptions),T(),E("controller",e.mapController),T(2),E("value",e.administrativeDistrictIds)("tableStyle",uo(8,FFt))("paginator",!0)("rows",10)("rowsPerPageOptions",uo(9,PFt))("selection",e.selectionCopy)}}var p3e=(()=>{class t{constructor(e,i,o,r){this.ref=e,this._cdr=i,this._virtualClinicService=o,this._districtService=r,this.mapOptions=mt(be({},lm),{style:"mapbox://styles/mapbox/light-v11"}),this.loading$=new pi(1),this.virtualClinicSelectionCtrl=new yr(null,Ys.required),this.administrativeDistrictIds=[],this.mapController=new Jd,this.colorFactory=new Qw(new Cs("hsl(120, 100%, 50%)")),this.selection=new nm(!0,[],!0,(d,m)=>vo.equals(d,m,()=>d.value===m.value)),this.selectionCopy=[],this._selectionLayer=new tL("selection",{layerId:$w.id,highlightLayerId:HP.id,sourceId:rE,displayName:"Auswahl"});let s=new JP;s.displayName="Anzahl Patienten pro Landkreis",this._districtLayer=new eL("districts",s,this._districtService),this._districtLayer.colorFactory$.next(this.colorFactory),this.mapController.registerLayer(this._districtLayer),this.mapController.registerLayer(this._selectionLayer),this.selection.changed.subscribe(d=>{this._selectionLayer.selection.setSelection(...d.source.selected),this.selectionCopy=[...d.source.selected.map(m=>m.clone())]}),this._selectionLayer.selection.changed.subscribe(d=>{this.onSelectedAdministrativeDistrictsChange(d.source.selected)})}onVirtualClinicSelectionChange(e){this.virtualClinicSelectionCtrl.patchValue(e)}onStepChange(e){e.selectedIndex===0&&(this.virtualClinicAddress=null,this.selectionCopy=[],this.selection.clear(),this._patientDistribution=null),e.selectedIndex===1&&this._onVirtualClinicSelect(this.virtualClinicSelectionCtrl.getRawValue())}onMapLoaded(e){this.map=e,this.mapController.addMapRef(e),this._applyAddressMarker()}onMapClick(e){this._selectionLayer.click(e)}patientDistributionById(e){return this._patientDistribution.patientCount[e.getNumericValue()]}onSelectedAdministrativeDistrictsChange(e){let i=[...e.map(o=>o.clone())];Ui.equals(this.selection.selected,i,(o,r)=>vo.equals(o,r,()=>o.value===r.value))||(this.selection.setSelection(...i),this._cdr.markForCheck())}_applyAddressMarker(){if(this.virtualClinicAddress){let e={lng:this.virtualClinicAddress.location[0],lat:this.virtualClinicAddress.location[1]};this.map.setCenter(e),new u3e.Marker({color:"black"}).setLngLat(e).addTo(this.map)}}_onVirtualClinicSelect(e){e.virtualClinic.address&&e.virtualClinic.address.location?this.virtualClinicAddress=new Ih(e.virtualClinic.address.street,e.virtualClinic.address.postalCode,e.virtualClinic.address.city,e.virtualClinic.address.location):this.virtualClinicAddress=null,e.virtualClinic&&e.year?this._setPatientsByAdministrativeDistricts(e):this.loading$.next(Gt.INIT)}_setPatientsByAdministrativeDistricts(e){this.loading$.next(Gt.LOADING),this._virtualClinicService.patientsByAdministrativeDistricts(e.virtualClinic.id,new ub([e.year],null)).subscribe({next:i=>{this._patientDistribution=i,this.administrativeDistrictIds=i.data.map(r=>Yo.create(r.adId));let o={};Object.keys(this._patientDistribution.patientCount).map(r=>{let s=Yo.createFromString(r);o[s.value]=this._patientDistribution.patientCount[s.getNumericValue()].count}),this._districtLayer.data$.next(o),this.loading$.next(Gt.SUCCESS)},error:i=>{console.error(i),this.loading$.next(Gt.ERROR)}})}static{this.\u0275fac=function(i){return new(i||t)(_e(es),_e(Gi),_e(hf),_e(Hu))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],features:[jt([iw,Ta])],decls:22,vars:7,consts:[["loadingTpl",""],["successTpl",""],[3,"selectionChange","linear"],["label","Virtuelle Klinik",3,"stepControl"],[1,"bd-container"],[3,"selectionChange","withSpecialtyDepartment"],[1,"flex","flex-row-reverse","gap-6"],["mat-raised-button","","color","accent","matStepperNext","",3,"disabled"],["mat-button","",3,"click"],["label","Landkreise"],[1,"flex","flex-col","gap-6"],[3,"loadItem","successTemplate","customLoadingTemplate"],["mat-raised-button","","color","accent",3,"click"],[1,"flex","flex-row","gap-6"],[1,"flex-1"],[1,"map-wrapper"],[3,"mapLoaded","mapClick","mapOptions"],[3,"controller"],["dataKey","value","selectionMode","multiple",3,"selectionChange","value","tableStyle","paginator","rows","rowsPerPageOptions","selection"],["pTemplate","header"],["pTemplate","body"],[2,"width","4rem"],[1,"text-right"],[3,"value"]],template:function(i,o){if(i&1){let r=tt();k(0,"div")(1,"mat-horizontal-stepper",2),ie("selectionChange",function(d){return se(r),ae(o.onStepChange(d))}),k(2,"mat-step",3)(3,"div",4)(4,"ays-virtual-clinic-structural-select",5),ie("selectionChange",function(d){return se(r),ae(o.onVirtualClinicSelectionChange(d))}),D()(),k(5,"div",6)(6,"button",7),Q(7," Landkreise ausw\xE4hlen "),D(),k(8,"button",8),ie("click",function(){return se(r),ae(o.ref.close())}),Q(9,"Abbrechen"),D()()(),k(10,"mat-step",9)(11,"div",10),ce(12,"bd-loader",11),k(13,"div",6)(14,"button",12),ie("click",function(){return se(r),ae(o.ref.close(o.selectionCopy))}),Q(15," \xDCbernehmen "),D(),k(16,"button",8),ie("click",function(){return se(r),ae(o.ref.close())}),Q(17,"Abbrechen"),D()()(),ee(18,LFt,5,0,"ng-template",null,0,Pt)(20,VFt,9,10,"ng-template",null,1,Pt),D()()()}if(i&2){let r=ti(19),s=ti(21);T(),E("linear",!0),T(),E("stepControl",o.virtualClinicSelectionCtrl),T(2),E("withSpecialtyDepartment",!1),T(2),E("disabled",o.virtualClinicSelectionCtrl.invalid),T(6),E("loadItem",o.loading$)("successTemplate",s)("customLoadingTemplate",r)}},dependencies:[UQ,BU,xr,qQ,HQ,yo,hc,hl,so,NL,BL,Kn,of,mm,eu,Yp,iw,Ta,fx,qd],styles:[".map-wrapper[_ngcontent-%COMP%]{position:relative;height:100%}"]})}}return t})();var h3e=` .p-splitbutton { display: inline-flex; position: relative; border-radius: dt('splitbutton.border.radius'); } .p-splitbutton-button.p-button { border-start-end-radius: 0; border-end-end-radius: 0; border-inline-end: 0 none; } .p-splitbutton-button.p-button:focus-visible, .p-splitbutton-dropdown.p-button:focus-visible { z-index: 1; } .p-splitbutton-button.p-button:not(:disabled):hover, .p-splitbutton-button.p-button:not(:disabled):active { border-inline-end: 0 none; } .p-splitbutton-dropdown.p-button { border-start-start-radius: 0; border-end-start-radius: 0; } .p-splitbutton .p-menu { min-width: 100%; } .p-splitbutton-fluid { display: flex; } .p-splitbutton-rounded .p-splitbutton-dropdown.p-button { border-start-end-radius: dt('splitbutton.rounded.border.radius'); border-end-end-radius: dt('splitbutton.rounded.border.radius'); } .p-splitbutton-rounded .p-splitbutton-button.p-button { border-start-start-radius: dt('splitbutton.rounded.border.radius'); border-end-start-radius: dt('splitbutton.rounded.border.radius'); } .p-splitbutton-raised { box-shadow: dt('splitbutton.raised.shadow'); } `;var zFt=["content"],UFt=["dropdownicon"],HFt=["defaultbtn"],jFt=["menu"];function GFt(t,n){t&1&&ui(0)}function $Ft(t,n){if(t&1){let e=tt();Di(0),k(1,"button",8),ie("click",function(o){se(e);let r=P();return ae(r.onDefaultButtonClick(o))}),ee(2,GFt,1,0,"ng-container",9),D(),Ai()}if(t&2){let e=P();T(),Oe(e.cx("pcButton")),E("severity",e.severity)("text",e.text)("outlined",e.outlined)("size",e.size)("icon",e.icon)("iconPos",e.iconPos)("disabled",e.disabled)("pAutoFocus",e.autofocus)("pTooltip",e.tooltip)("tooltipOptions",e.tooltipOptions),Ge("tabindex",e.tabindex)("aria-label",(e.buttonProps==null?null:e.buttonProps.ariaLabel)||e.label),T(),E("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)}}function qFt(t,n){if(t&1){let e=tt();k(0,"button",10,2),ie("click",function(o){se(e);let r=P();return ae(r.onDefaultButtonClick(o))}),D()}if(t&2){let e=P();Oe(e.cx("pcButton")),E("severity",e.severity)("text",e.text)("outlined",e.outlined)("size",e.size)("icon",e.icon)("iconPos",e.iconPos)("label",e.label)("disabled",e.buttonDisabled)("pAutoFocus",e.autofocus)("pTooltip",e.tooltip)("tooltipOptions",e.tooltipOptions),Ge("tabindex",e.tabindex)("aria-label",e.buttonProps==null?null:e.buttonProps.ariaLabel)}}function KFt(t,n){if(t&1&&ce(0,"span"),t&2){let e=P();Oe(e.dropdownIcon)}}function WFt(t,n){t&1&&(si(),ce(0,"svg",12))}function YFt(t,n){}function QFt(t,n){t&1&&ee(0,YFt,0,0,"ng-template")}function ZFt(t,n){if(t&1&&(Di(0),ee(1,WFt,1,0,"svg",11)(2,QFt,1,0,null,9),Ai()),t&2){let e=P();T(),E("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),T(),E("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}var XFt={root:({instance:t})=>["p-splitbutton p-component",{"p-splitbutton-raised":t.raised,"p-splitbutton-rounded":t.rounded,"p-splitbutton-outlined":t.outlined,"p-splitbutton-text":t.text,[`p-splitbutton-${t.size==="small"?"sm":"lg"}`]:t.size}],pcButton:"p-splitbutton-button",pcDropdown:"p-splitbutton-dropdown p-button-icon-only"},m3e=(()=>{class t extends io{name="splitbutton";theme=h3e;classes=XFt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var KQ=(()=>{class t extends oo{model;severity;raised=!1;rounded=!1;text=!1;outlined=!1;size=null;plain=!1;icon;iconPos="left";label;tooltip;tooltipOptions;styleClass;menuStyle;menuStyleClass;dropdownIcon;appendTo="body";dir;expandAriaLabel;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";buttonProps;menuButtonProps;autofocus;set disabled(e){this._disabled=e,this.buttonDisabled=e,this.menuButtonDisabled=e}get disabled(){return this._disabled}tabindex;menuButtonDisabled=!1;buttonDisabled=!1;onClick=new ve;onMenuHide=new ve;onMenuShow=new ve;onDropdownClick=new ve;buttonViewChild;menu;contentTemplate;dropdownIconTemplate;templates;ariaId;isExpanded=Zn(!1);_disabled;_componentStyle=re(m3e);_contentTemplate;_dropdownIconTemplate;ngOnInit(){super.ngOnInit(),this.ariaId=Vr("pn_id_")}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}onDefaultButtonClick(e){this.onClick.emit(e),this.menu.hide()}onDropdownButtonClick(e){this.onDropdownClick.emit(e),this.menu?.toggle({currentTarget:this.el?.nativeElement,relativeAlign:this.appendTo==null})}onDropdownButtonKeydown(e){(e.code==="ArrowDown"||e.code==="ArrowUp")&&(this.onDropdownButtonClick(),e.preventDefault())}onHide(){this.isExpanded.set(!1),this.onMenuHide.emit()}onShow(){this.isExpanded.set(!0),this.onMenuShow.emit()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-splitbutton"],["p-splitButton"],["p-split-button"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,zFt,4),xt(r,UFt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.contentTemplate=s.first),Le(s=Ne())&&(o.dropdownIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(HFt,5),Ri(jFt,5)),i&2){let r;Le(r=Ne())&&(o.buttonViewChild=r.first),Le(r=Ne())&&(o.menu=r.first)}},hostVars:2,hostBindings:function(i,o){i&2&&Oe(o.cn(o.cx("root"),o.styleClass))},inputs:{model:"model",severity:"severity",raised:[2,"raised","raised",je],rounded:[2,"rounded","rounded",je],text:[2,"text","text",je],outlined:[2,"outlined","outlined",je],size:"size",plain:[2,"plain","plain",je],icon:"icon",iconPos:"iconPos",label:"label",tooltip:"tooltip",tooltipOptions:"tooltipOptions",styleClass:"styleClass",menuStyle:"menuStyle",menuStyleClass:"menuStyleClass",dropdownIcon:"dropdownIcon",appendTo:"appendTo",dir:"dir",expandAriaLabel:"expandAriaLabel",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",buttonProps:"buttonProps",menuButtonProps:"menuButtonProps",autofocus:[2,"autofocus","autofocus",je],disabled:[2,"disabled","disabled",je],tabindex:[2,"tabindex","tabindex",ln],menuButtonDisabled:[2,"menuButtonDisabled","menuButtonDisabled",je],buttonDisabled:[2,"buttonDisabled","buttonDisabled",je]},outputs:{onClick:"onClick",onMenuHide:"onMenuHide",onMenuShow:"onMenuShow",onDropdownClick:"onDropdownClick"},features:[jt([m3e]),ft],decls:8,vars:24,consts:[["defaultButton",""],["menu",""],["defaultbtn",""],[4,"ngIf","ngIfElse"],["type","button","pButton","","pRipple","",3,"click","keydown","size","severity","text","outlined","disabled"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"onHide","onShow","id","popup","model","styleClass","appendTo","showTransitionOptions","hideTransitionOptions"],["type","button","pButton","","pRipple","",3,"click","severity","text","outlined","size","icon","iconPos","disabled","pAutoFocus","pTooltip","tooltipOptions"],[4,"ngTemplateOutlet"],["type","button","pButton","","pRipple","",3,"click","severity","text","outlined","size","icon","iconPos","label","disabled","pAutoFocus","pTooltip","tooltipOptions"],["data-p-icon","chevron-down",4,"ngIf"],["data-p-icon","chevron-down"]],template:function(i,o){if(i&1){let r=tt();ee(0,$Ft,3,15,"ng-container",3)(1,qFt,2,15,"ng-template",null,0,Pt),k(3,"button",4),ie("click",function(d){return se(r),ae(o.onDropdownButtonClick(d))})("keydown",function(d){return se(r),ae(o.onDropdownButtonKeydown(d))}),ee(4,KFt,1,2,"span",5)(5,ZFt,3,2,"ng-container",6),D(),k(6,"p-tieredmenu",7,1),ie("onHide",function(){return se(r),ae(o.onHide())})("onShow",function(){return se(r),ae(o.onShow())}),D()}if(i&2){let r=ti(2);E("ngIf",o.contentTemplate||o._contentTemplate)("ngIfElse",r),T(3),Oe(o.cx("pcDropdown")),E("size",o.size)("severity",o.severity)("text",o.text)("outlined",o.outlined)("disabled",o.menuButtonDisabled),Ge("aria-label",(o.menuButtonProps==null?null:o.menuButtonProps.ariaLabel)||o.expandAriaLabel)("aria-haspopup",(o.menuButtonProps==null?null:o.menuButtonProps.ariaHasPopup)||!0)("aria-expanded",(o.menuButtonProps==null?null:o.menuButtonProps.ariaExpanded)||o.isExpanded())("aria-controls",(o.menuButtonProps==null?null:o.menuButtonProps.ariaControls)||o.ariaId),T(),E("ngIf",o.dropdownIcon),T(),E("ngIf",!o.dropdownIcon),T(),$r(o.menuStyle),E("id",o.ariaId)("popup",!0)("model",o.model)("styleClass",o.menuStyleClass)("appendTo",o.appendTo)("showTransitionOptions",o.showTransitionOptions)("hideTransitionOptions",o.hideTransitionOptions)}},dependencies:[On,Fr,Lo,GK,yS,fp,sm,Ul,dz,gy,In],encapsulation:2,changeDetection:0})}return t})();var f3e=(()=>{class t{constructor(e){this._dialogService=e,this.pluginChange=new ve,this.menuItems=[{label:"Von virtueller Klinik importieren",command:()=>this.openVirtualClinicImportDialog()}],this.administrativeDistrictIds=[]}ngOnInit(){this.administrativeDistrictIds=this.plugin.toValue()??[]}openEditDialog(){let e=mt(be({},rc),{header:"Landkreise bearbeiten",data:{administrativeDistrictIds:this.administrativeDistrictIds.slice()}});this._dialogService.open(qNe,e).onClose.pipe(Sn(1),wn(i=>!!i&&i.length>0)).subscribe(i=>this.onAdministrativeDistrictIdsChange(i))}openVirtualClinicImportDialog(){let e=mt(be({},rc),{header:"Landkreise von Virtueller Klinik importieren"});this._dialogService.open(p3e,e).onClose.pipe(Sn(1)).subscribe(o=>{o&&o.length>0&&this.onAdministrativeDistrictIdsChange(o)})}onAdministrativeDistrictIdsChange(e){this.administrativeDistrictIds=[...e.map(i=>i.clone())],this.pluginChange.emit(new lf(e))}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-administrative-district-ids"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo])],decls:3,vars:3,consts:[[3,"administrativeDistrictIdsChange","administrativeDistrictIds"],[1,"flex","flex-row-reverse"],["label","Landkreise bearbeiten","data-test","filter-condition-form-administrative-district-ids-menu-button","appendTo","body","size","small",3,"onClick","model","outlined"]],template:function(i,o){i&1&&(k(0,"bd-maps-administrative-district-ids-list",0),ie("administrativeDistrictIdsChange",function(s){return o.onAdministrativeDistrictIdsChange(s)}),D(),k(1,"div",1)(2,"p-split-button",2),ie("onClick",function(){return o.openEditDialog()}),D()()),i&2&&(E("administrativeDistrictIds",o.administrativeDistrictIds),T(2),E("model",o.menuItems)("outlined",!0))},dependencies:[gx,KQ],encapsulation:2})}}return t})();function JFt(t,n){if(t&1&&(k(0,"mat-hint"),Q(1),D()),t&2){let e=P();T(),dt(e.plugin==null?null:e.plugin.validationToText())}}var g3e=(()=>{class t extends dr{constructor(e,i,o,r){super(),this._cdr=e,this._dialogService=i,this._statesService=o,this._administrativeRegionService=r,this.pluginValid=!0,this.pluginChange=new ve,this.selection=[],this.displayText=""}ngOnChanges(e){e.plugin&&this._updateSelection(this.plugin.toValue())}ngOnDestroy(){this.unsubscribeAll()}edit(e){e.stopPropagation();let i=mt(be({},rc),{header:"Regierungsbezirke bearbeiten",data:{selection:this.selection,stateOptions$:o=>this._statesService.findAdministrativeRegionIds(o),displayName$:o=>this._administrativeRegionService.findOne(o).pipe(vt(r=>r.name))}});this._subs.push(this._dialogService.open(VY,i).onClose.pipe(wn(o=>!!o)).subscribe(o=>{this._updateSelection(o?.selection),this.pluginChange.emit(this.plugin.clone())}))}_updateSelection(e){this.plugin=new wy(e),this.selection=[...e],this.displayText=this.plugin.toText(),this._cdr.markForCheck()}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e(Mo),_e(jY),_e(Rde))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-administrative-region-id"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo]),ft,Ot],decls:5,vars:4,consts:[["matInput","","placeholder","Regierungsbezirke",3,"click","value"],["matSuffix",""]],template:function(i,o){i&1&&(k(0,"mat-form-field")(1,"input",0),ie("click",function(s){return o.edit(s)}),D(),k(2,"mat-icon",1),Q(3,"arrow_drop_down"),D(),qe(4,JFt,2,1,"mat-hint"),D()),i&2&&(Vn("custom-invalid",!o.pluginValid),T(),E("value",o.displayText),T(3),Ke(o.pluginValid?-1:4))},dependencies:[pl,Fa,rs,mu,mp,$o,mr],encapsulation:2,changeDetection:0})}}return t})();var FN=class{constructor(n){this._environmentService=n}index(){return`${this._environmentService.load("AYS_CLINIC_RESOURCE_URL")}/`}searchByGeo(){return`${this.index()}by-distance/`}clinic(n){return`${this.index()}by-id/${n.ik}/${n.sn}`}clinicLocations(n){return`${this.clinic(n)}/locations`}clinicBeds(n){return`${this.clinic(n)}/beds`}clinicCaseNumbers(n){return`${this.clinic(n)}/case-numbers`}clinicStaffing(n){return`${this.clinic(n)}/staffings`}cases(n){return`${this.clinic(n)}/G-DRG`}handDisinfectionUsage(n){return`${this.clinic(n)}/hand-disinfection-usage`}clinicSpecialtyDepartments(n){return`${this.clinic(n)}/specialty-departments/`}specialtyDepartment(n){return`${this.clinic(n)}/specialty-departments/${n.key}`}specialtyDepartmentCaseNumbers(n){return`${this.specialtyDepartment(n)}/case-numbers`}specialtyDepartmentCodes(n,e,i){let o=`${this.specialtyDepartment(n)}/${e}`;return i?`${o}?pageable`:o}specialtyDepartmentStaffing(n){return`${this.specialtyDepartment(n)}/staffings`}availableClinicLevels(){return`${this.index()}levels/available/`}availableSpecialEquipment(){return`${this.index().replace("/clinics","")}special-equipment/available`}bmgCriteriaDetails(n,e){return`${this.clinic(n)}/bmg-criteria/${e}/details`}bmgCriteriaOverview(){return`${this.index()}by-condition/bmg-criteria/overview`}};var _3e=t=>xW.fromObj(t),PN=t=>{let n=Ih.fromObject(t.address);return{id:ga.fromObj(t.id),address:n,name:t.name}},y3e=t=>({geometry:t.geometry,clinic:PN(t.clinic)}),v3e=t=>({mainLocation:t.mainLocation?ga.fromObj(t.mainLocation):null,childLocations:t.childLocations&&t.childLocations.length>0?t.childLocations.map(n=>ga.fromObj(n)):null,otherLocations:t.otherLocations&&t.otherLocations.length>0?t.otherLocations.map(n=>ga.fromObj(n)):null});var cl=(()=>{class t{constructor(e,i){this._httpClient=e,this._environmentService=i,this._store=new FN(this._environmentService)}search(e,i=PN,o=()=>!0){let r=this._store.index(),s=new Pr().set("q",e);return this._httpClient.get(r,{params:s}).pipe(vt(d=>d.map(m=>i(m))),vt(d=>d.filter(m=>o(m))))}searchByDistance(e,i,o=3e4,r=null,s=y3e,d=()=>!0){let m=this._store.searchByGeo(),v=`[${i.toString()}, ${e.toString()}]`,w=new Pr;return w=w.set("center",v),w=w.set("distance",o.toString()),r&&(w=w.appendAll({years:r.map(O=>O.toString())})),this._httpClient.get(m,{params:w}).pipe(vt(O=>O.map(N=>s(N))),vt(O=>O.filter(N=>d(N))))}get(e,i=_3e){let o=this._store.clinic(e),r=new Pr;return e.year&&(r=r.append("year",e.year)),this._httpClient.get(o,{params:r}).pipe(vt(s=>i(s)))}getAll(e,i=PN){let o=this._store.index(),r=new RE(e,null);return this._httpClient.post(o,r).pipe(vt(s=>s.map(d=>i(d.clinic))))}beds(e){let i=this._store.clinicBeds(e);return this._httpClient.get(i)}caseNumbers(e){let i=this._store.clinicCaseNumbers(e);return this._httpClient.get(i)}locations(e,i=v3e){let o=this._store.clinicLocations(e);return this._httpClient.get(o).pipe(vt(r=>i(r)))}staffing(e){let i=this._store.clinicStaffing(e);return this._httpClient.get(i).pipe(vt(mE.fromObject))}cases(e,i=bq.DEFAULT){let o=this._store.cases(e);return this._httpClient.get(o,{params:i.toHttpParams()}).pipe(vt(r=>Pw.responseToPage(r,s=>s.map(d=>y2.fromObj(d)))))}handDisinfectionUsage(e){let i=this._store.handDisinfectionUsage(e);return this._httpClient.get(i)}availableClinicLevels(){let e=this._store.availableClinicLevels();return this._httpClient.get(e).pipe(vt(i=>mt(be({},i),{information:mt(be({},i.information),{date:new Date(i.information.date)})})))}bmgCriteriaDetails(e,i){let o=this._store.bmgCriteriaDetails(e,i);return this._httpClient.get(o)}bmgCriteriaOverview(e){let i=this._store.bmgCriteriaOverview(),o=new Gu([new RE(e,null)]);return this._httpClient.post(i,o.toJSON())}availableSpecialEquipment(){let e=this._store.availableSpecialEquipment();return this._httpClient.get(e)}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var x3e=(()=>{class t{static _getClinicPath(e){return["/clinics","single",e.ik,e.sn]}constructor(e){this._environmentService=e}get(e,i){let o;return i.target==="_self"?o=this.internal(e):o=this.external(e),o}internal(e){return t._getClinicPath(e)}external(e){return this._environmentService.load("ANALYTICS_APP_URL")+t._getClinicPath(e).join("/")}static{this.\u0275fac=function(i){return new(i||t)(di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function tPt(t,n){if(t&1&&(k(0,"bd-link-internal",0)(1,"mat-icon",1),Q(2,"open_in_new"),D()()),t&2){let e=P();E("link",e.asType(e.link))}}function iPt(t,n){if(t&1&&(k(0,"bd-link-external",0)(1,"mat-icon",1),Q(2,"open_in_new"),D()()),t&2){let e=P();E("link",e.asType(e.link))}}var ZE=(()=>{class t{constructor(e){this._clinicLinkService=e,this.options=hq,this.link=null}ngOnChanges(e){e.clinicId&&this._onClinicIdChange(e.clinicId)}asType(e){return e}_onClinicIdChange(e){e.currentValue&&(this.link=this._clinicLinkService.get(e.currentValue,this.options))}static{this.\u0275fac=function(i){return new(i||t)(_e(x3e))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-icon-link"]],inputs:{clinicId:"clinicId",options:"options"},features:[Ot],decls:2,vars:2,consts:[[3,"link"],["color","accent"]],template:function(i,o){i&1&&(qe(0,tPt,3,1,"bd-link-internal",0),qe(1,iPt,3,1,"bd-link-external",0)),i&2&&(Ke(o.options.target==="_self"?0:-1),T(),Ke(o.options.target==="_blank"?1:-1))},dependencies:[pq,$o,mr,uq],encapsulation:2})}}return t})();function nPt(t,n){if(t&1){let e=tt();k(0,"div",4)(1,"div",5)(2,"span",6),Q(3),D()(),k(4,"div",7)(5,"span",8),Q(6),D()(),k(7,"div")(8,"button",9),ie("click",function(){se(e);let o=P();return ae(o.onRemove())}),k(9,"mat-icon"),Q(10,"delete_outline"),D()()()()}if(t&2){let e=P();T(3),dt(e.clinic.name),T(3),_d("(IK: ",e.clinicId.ik,", SN: ",e.clinicId.sn,")")}}function oPt(t,n){if(t&1&&(k(0,"div",4)(1,"div",5)(2,"span",6),Q(3,"n/a"),D()(),k(4,"div",7)(5,"span",8),Q(6),D()(),k(7,"div")(8,"button",10)(9,"mat-icon"),Q(10,"delete_outline"),D()()()()),t&2){let e=P();T(6),_d("(IK: ",e.clinicId.ik,", SN: ",e.clinicId.sn,")")}}function rPt(t,n){t&1&&(k(0,"div",4)(1,"div",5),ce(2,"p-skeleton",11),D(),k(3,"div",7),ce(4,"p-skeleton",11),D(),k(5,"div"),ce(6,"p-skeleton"),D()()),t&2&&(T(2),E("width","100%"),T(2),E("width","100%"))}var w3e=(()=>{class t extends dr{constructor(e){super(),this._clinicService=e,this.remove=new ve,this.loading$=new pi(1)}ngOnInit(){this.clinicId&&(this.loading$.next(Gt.LOADING),this._subs.push(this._clinicService.get(this.clinicId).subscribe({next:e=>{this.clinic=e,this.loading$.next(Gt.SUCCESS)},error:()=>{this.loading$.next(Gt.ERROR)}})))}ngOnDestroy(){this.unsubscribeAll()}onRemove(){this.remove.emit(!0)}static{this.\u0275fac=function(i){return new(i||t)(_e(cl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-ids-list-item"]],inputs:{clinicId:"clinicId"},outputs:{remove:"remove"},features:[ft],decls:7,vars:3,consts:[["clinicTpl",""],["errorTpl",""],["loadingIndicatorTpl",""],[3,"loadItem","customLoadingTemplate","successTemplate"],[1,"flex","flex-row","gap-6","items-center"],[1,"flex-1"],[1,"mat-body-1"],[1,"basis-48","invisible","xl:visible"],[1,"mat-caption"],["mat-icon-button","","color","accent",3,"click"],["mat-icon-button","","color","accent","disabled","true"],[3,"width"]],template:function(i,o){if(i&1&&(ce(0,"bd-loader",3),ee(1,nPt,11,3,"ng-template",null,0,Pt)(3,oPt,11,2,"ng-template",null,1,Pt)(5,rPt,7,2,"ng-template",null,2,Pt)),i&2){let r=ti(2),s=ti(6);E("loadItem",o.loading$)("customLoadingTemplate",s)("successTemplate",r)}},dependencies:[Kn,Tn,xl,$o,mr,of,mm],encapsulation:2})}}return t})();function sPt(t,n){if(t&1){let e=tt();k(0,"ays-clinic-ids-list-item",3),ie("remove",function(){let o=se(e),r=o.$implicit,s=o.$index,d=P();return ae(d.onRemove(r,s))}),D()}if(t&2){let e=n.$implicit;E("clinicId",e)}}function aPt(t,n){if(t&1){let e=tt();k(0,"mat-paginator",4),ie("page",function(o){se(e);let r=P();return ae(r.onPageEvent(o))}),D()}if(t&2){let e=P();E("hidePageSize",!0)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("length",e.clinicIds.length)}}var WQ=(()=>{class t{constructor(){this.clinicIdsChange=new ve,this.pageIndex=0,this.pageSize=10}ngOnChanges(e){e.clinicIds&&this._updateDisplayClinic()}onPageEvent(e){this.pageIndex=e.pageIndex,this._updateDisplayClinic()}onRemove(e,i){let o=this.clinicIds.indexOf(e);this.clinicIds.splice(o,1),this.displayClinicIds.splice(i,1),this.clinicIdsChange.emit(this.clinicIds),this._updateDisplayClinic()}_updateDisplayClinic(){let e=this.pageIndex*this.pageSize,i=e+this.pageSize;this.displayClinicIds=this.clinicIds.slice(e,i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-id-list"]],inputs:{clinicIds:"clinicIds"},outputs:{clinicIdsChange:"clinicIdsChange"},features:[Ot],decls:4,vars:1,consts:[[1,"filter-clinic-ids-list"],[3,"clinicId"],[3,"hidePageSize","pageSize","pageIndex","length"],[3,"remove","clinicId"],[3,"page","hidePageSize","pageSize","pageIndex","length"]],template:function(i,o){i&1&&(k(0,"div",0),lo(1,sPt,1,1,"ays-clinic-ids-list-item",1,jo),D(),qe(3,aPt,1,4,"mat-paginator",2)),i&2&&(T(),co(o.displayClinicIds),T(2),Ke((o.clinicIds==null?null:o.clinicIds.length)>5?3:-1))},dependencies:[w3e,tx,Wv],styles:[".filter-clinic-ids-list[_ngcontent-%COMP%]{margin:0 24px}"]})}}return t})();var XE=(()=>{class t{transform(e){return Bx[e]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=Dd({name:"staffingType",type:t,pure:!0})}}return t})(),Bx=(function(t){return t.enrolledNurses="Gesundheits Krankenpfleger",t.enrolledChildrenNurses="Gesundheits Kinderkrankenpfleger",t.geriatricNurses="Altenpfleger",t.NURSING_ASSISTANTS="Pflegeassistenten",t.licensedPracticalNurses="Krankenpflegehelfer",t.hospitalPorters="Pflegehelfer",t.deliveryNurses="Entbindungspfleger",t.scrubNurses="Operationstechnische Assistenten",t.inpatientDocs="Beleg\xE4rzte",t.docsWithoutInpatientDocs="\xC4rzte ohne Beleg\xE4rzte",t.medicalSpecialists="Fach\xE4rzte",t.nonSpecialists="Assistenz\xE4rzte",t})(Bx||{});var LN=(()=>{class t{transform(e){let i;switch(e){case 1:i="Klein (< 100 Betten)";break;case 2:i="Mittel (100 - 200 Betten)";break;case 3:i="Gro\xDF (200 - 500 Betten)";break;case 4:i="Sehr Gro\xDF (> 500 Betten)";break;default:i="n/a"}return i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=Dd({name:"displayClinicSize",type:t,pure:!0})}}return t})();var Wc=(()=>{class t{transform(e){let i;switch(e){case"public":i="\xD6ffentlich";break;case"private":i="Privat";break;case"nonprofit":i="Freigemeinn\xFCtzig";break;default:i=e&&e.length>0?e:"n/a"}return i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=Dd({name:"displayClinicType",type:t,pure:!0})}}return t})();var lPt=()=>["80"];function cPt(t,n){if(t&1&&(k(0,"div",3)(1,"span",4),Q(2),Xn(3,"truncate"),D(),k(4,"span",5),Q(5),D(),k(6,"span",5),Q(7),D()()),t&2){let e=n.$implicit;T(2),dt(Ls(3,3,e.name,uo(6,lPt))),T(3),dt(e==null||e.id==null?null:e.id.sn),T(2),dt(e==null||e.address==null?null:e.address.toString())}}var Vx=(()=>{class t{constructor(e,i){this._clinicService=e,this._cdr=i,this.placeholderText="Klinik suchen",this.clinicSelect=new ve,this.suggestions=[]}onClinicSelect(e){this.clinicSelect.emit(e.value)}onCompleteMethod(e){this._clinicService.search(e.query,i=>PN(i),this.filterClinicFn).subscribe(i=>{this.suggestions=i,this._cdr.markForCheck()})}static{this.\u0275fac=function(i){return new(i||t)(_e(cl),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-select"]],inputs:{placeholderText:"placeholderText",filterClinicFn:"filterClinicFn"},outputs:{clinicSelect:"clinicSelect"},decls:6,vars:5,consts:[["item",""],["inputId","clinic-select","dataKey","id.sn","optionLabel","name","fluid","","variant","filled",3,"completeMethod","onSelect","suggestions","placeholder","showClear","delay"],["for","clinic-select"],[1,"flex","items-center","gap-2"],[1,"font-semibold"],[1,""]],template:function(i,o){if(i&1){let r=tt();k(0,"p-iftalabel")(1,"p-auto-complete",1),ie("completeMethod",function(d){return se(r),ae(o.onCompleteMethod(d))})("onSelect",function(d){return se(r),ae(o.onClinicSelect(d))}),ee(2,cPt,8,7,"ng-template",null,0,Pt),D(),k(4,"label",2),Q(5),D()()}i&2&&(T(),E("suggestions",o.suggestions)("placeholder",o.placeholderText)("showClear",!0)("delay",500),T(4),dt(o.placeholderText))},dependencies:[x2e,Th,as,Boe],encapsulation:2})}}return t})();function jhe(t){let n=t.cloneNode(!0),e=n.querySelectorAll("[id]"),i=t.nodeName.toLowerCase();n.removeAttribute("id");for(let o=0;o=i&&e<=o&&n>=r&&n<=s}function uPt(t,n){let e=n.leftt.right,o=n.topt.bottom;return e||i||o||r}function XU(t,n,e){t.top+=n,t.bottom=t.top+t.height,t.left+=e,t.right=t.left+t.width}function E3e(t,n,e,i){let{top:o,right:r,bottom:s,left:d,width:m,height:v}=t,w=m*n,O=v*n;return i>o-O&&id-w&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Qhe(e)})})}handleScroll(n){let e=pp(n),i=this.positions.get(e);if(!i)return null;let o=i.scrollPosition,r,s;if(e===this._document){let v=this.getViewportScrollPosition();r=v.top,s=v.left}else r=e.scrollTop,s=e.scrollLeft;let d=o.top-r,m=o.left-s;return this.positions.forEach((v,w)=>{v.clientRect&&e!==w&&e.contains(w)&&XU(v.clientRect,d,m)}),o.top=r,o.left=s,{top:d,left:m}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function B3e(t,n){let e=t.rootNodes;if(e.length===1&&e[0].nodeType===n.ELEMENT_NODE)return e[0];let i=n.createElement("div");return e.forEach(o=>i.appendChild(o)),i}function Zhe(t,n,e){for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];o?t.setProperty(i,o,e?.has(i)?"important":""):t.removeProperty(i)}return t}function NN(t,n){let e=n?"":"none";Zhe(t.style,{"touch-action":n?"":"none","-webkit-user-drag":n?"":"none","-webkit-tap-highlight-color":n?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function D3e(t,n,e){Zhe(t.style,{position:n?"":"fixed",top:n?"":"0",opacity:n?"":"0",left:n?"":"-999em"},e)}function QQ(t,n){return n&&n!="none"?t+" "+n:t}function A3e(t,n){t.style.width=`${n.width}px`,t.style.height=`${n.height}px`,t.style.transform=JU(n.left,n.top)}function JU(t,n){return`translate3d(${Math.round(t)}px, ${Math.round(n)}px, 0)`}function k3e(t){let n=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*n}function pPt(t){let n=getComputedStyle(t),e=Uhe(n,"transition-property"),i=e.find(d=>d==="transform"||d==="all");if(!i)return 0;let o=e.indexOf(i),r=Uhe(n,"transition-duration"),s=Uhe(n,"transition-delay");return k3e(r[o])+k3e(s[o])}function Uhe(t,n){return t.getPropertyValue(n).split(",").map(i=>i.trim())}var hPt=new Set(["position"]),$he=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(n,e,i,o,r,s,d,m,v,w){this._document=n,this._rootElement=e,this._direction=i,this._initialDomRect=o,this._previewTemplate=r,this._previewClass=s,this._pickupPositionOnPage=d,this._initialTransform=m,this._zIndex=v,this._renderer=w}attach(n){this._preview=this._createPreview(),n.appendChild(this._preview),M3e(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(n){this._preview.style.transform=n}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(n){this._preview.classList.add(n)}getTransitionDuration(){return pPt(this._preview)}addEventListener(n,e){return this._renderer.listen(this._preview,n,e)}_createPreview(){let n=this._previewTemplate,e=this._previewClass,i=n?n.template:null,o;if(i&&n){let r=n.matchSize?this._initialDomRect:null,s=n.viewContainer.createEmbeddedView(i,n.context);s.detectChanges(),o=B3e(s,this._document),this._previewEmbeddedView=s,n.matchSize?A3e(o,r):o.style.transform=JU(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else o=jhe(this._rootElement),A3e(o,this._initialDomRect),this._initialTransform&&(o.style.transform=this._initialTransform);return Zhe(o.style,{"pointer-events":"none",margin:M3e(o)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},hPt),NN(o,!1),o.classList.add("cdk-drag-preview"),o.setAttribute("popover","manual"),o.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(r=>o.classList.add(r)):o.classList.add(e)),o}};function M3e(t){return"showPopover"in t}var mPt={passive:!0},O3e={passive:!1},fPt={passive:!1,capture:!0},gPt=800,R3e="cdk-drag-placeholder",F3e=new Set(["position"]),qhe=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Zn(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new hi;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=Xr.EMPTY;_pointerUpSubscription=Xr.EMPTY;_scrollSubscription=Xr.EMPTY;_resizeSubscription=Xr.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(n){n!==this._disabled&&(this._disabled=n,this._toggleNativeDragInteractions(),this._handles.forEach(e=>NN(e,n)))}_disabled=!1;beforeStarted=new hi;started=new hi;released=new hi;ended=new hi;entered=new hi;exited=new hi;dropped=new hi;moved=this._moveEvents;data;constrainPosition;constructor(n,e,i,o,r,s,d){this._config=e,this._document=i,this._ngZone=o,this._viewportRuler=r,this._dragDropRegistry=s,this._renderer=d,this.withRootElement(n).withParent(e.parentDragRef||null),this._parentPositions=new YQ(i),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(n){this._handles=n.map(i=>Rd(i)),this._handles.forEach(i=>NN(i,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(n){return this._previewTemplate=n,this}withPlaceholderTemplate(n){return this._placeholderTemplate=n,this}withRootElement(n){let e=Rd(n);if(e!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(e,"mousedown",this._pointerDown,O3e),i.listen(e,"touchstart",this._pointerDown,mPt),i.listen(e,"dragstart",this._nativeDragStart,O3e)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(n){return this._boundaryElement=n?Rd(n):null,this._resizeSubscription.unsubscribe(),n&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(n){return this._parentDragRef=n,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&uPt(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let n=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),i=0,o=0;e.leftn.right&&(i=n.right-e.right),e.topn.bottom&&(o=n.bottom-e.bottom);let r=this._activeTransform.x,s=this._activeTransform.y,d=r+i,m=s+o;this._rootElement.style.transform=JU(d,m),this._activeTransform={x:d,y:m},this._passiveTransform={x:d,y:m}}}disableHandle(n){!this._disabledHandles.has(n)&&this._handles.indexOf(n)>-1&&(this._disabledHandles.add(n),NN(n,!0))}enableHandle(n){this._disabledHandles.has(n)&&(this._disabledHandles.delete(n),NN(n,this.disabled))}withDirection(n){return this._direction=n,this}_withDropContainer(n){this._dropContainer=n}getFreeDragPosition(){let n=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:n.x,y:n.y}}setFreeDragPosition(n){return this._activeTransform={x:0,y:0},this._passiveTransform.x=n.x,this._passiveTransform.y=n.y,this._dropContainer||this._applyRootElementTransform(n.x,n.y),this}withPreviewContainer(n){return this._previewContainer=n,this}_sortFromLastPointerPosition(){let n=this._lastKnownPointerPosition;n&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(n),n)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=n=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(n);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,n)}else this.disabled||this._initializeDragSequence(this._rootElement,n)};_pointerMove=n=>{let e=this._getPointerPositionOnPage(n);if(!this._hasStartedDragging()){let o=Math.abs(e.x-this._pickupPositionOnPage.x),r=Math.abs(e.y-this._pickupPositionOnPage.y);if(o+r>=this._config.dragStartThreshold){let d=Date.now()>=this._dragStartTime+this._getDragStartDelay(n),m=this._dropContainer;if(!d){this._endDragSequence(n);return}(!m||!m.isDragging()&&!m.isReceiving())&&(n.cancelable&&n.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(n)))}return}n.cancelable&&n.preventDefault();let i=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else{let o=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=i.x-o.x+this._passiveTransform.x,r.y=i.y-o.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:n,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=n=>{this._endDragSequence(n)};_endDragSequence(n){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:n}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(n),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(n);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:n})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(n){QU(n)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),i=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",_Pt,fPt)}),i){let o=this._rootElement,r=o.parentNode,s=this._placeholder=this._createPlaceholderElement(),d=this._marker=this._marker||this._document.createComment("");r.insertBefore(d,o),this._initialTransform=o.style.transform||"",this._preview=new $he(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,e)),D3e(o,!1,F3e),this._document.body.appendChild(r.replaceChild(s,o)),this.started.next({source:this,event:n}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:n}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(n,e){this._parentDragRef&&e.stopPropagation();let i=this.isDragging(),o=QU(e),r=!o&&e.button!==0,s=this._rootElement,d=pp(e),m=!o&&this._lastTouchEventTime&&this._lastTouchEventTime+gPt>Date.now(),v=o?Sw(e):ww(e);if(d&&d.draggable&&e.type==="mousedown"&&e.preventDefault(),i||r||m||v)return;if(this._handles.length){let N=s.style;this._rootElementTapHighlight=N.webkitTapHighlightColor||"",N.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(N=>this._updateOnScroll(N)),this._boundaryElement&&(this._boundaryRect=Qhe(this._boundaryElement));let w=this._previewTemplate;this._pickupPositionInElement=w&&w.template&&!w.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,n,e);let O=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:O.x,y:O.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(n){D3e(this._rootElement,!0,F3e),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,i=e.getItemIndex(this),o=this._getPointerPositionOnPage(n),r=this._getDragDistance(o),s=e._isOverContainer(o.x,o.y);this.ended.next({source:this,distance:r,dropPoint:o,event:n}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:r,dropPoint:o,event:n}),e.drop(this,i,this._initialIndex,this._initialContainer,s,r,o,n),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:n,y:e},{x:i,y:o}){let r=this._initialContainer._getSiblingContainerFromPosition(this,n,e);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(n,e)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{let s=this._dropContainer.getItemIndex(this),d=this._dropContainer.getItemAtIndex(s+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,d),this._dropContainer=r,this._dropContainer.enter(this,n,e,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,o),this._dropContainer._sortItem(this,n,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(n,e):this._applyPreviewTransform(n-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let n=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(n.left,n.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let o=d=>{(!d||this._preview&&pp(d)===this._preview.element&&d.propertyName==="transform")&&(s(),i(),clearTimeout(r))},r=setTimeout(o,e*1.5),s=this._preview.addEventListener("transitionend",o)}))}_createPlaceholderElement(){let n=this._placeholderTemplate,e=n?n.template:null,i;return e?(this._placeholderRef=n.viewContainer.createEmbeddedView(e,n.context),this._placeholderRef.detectChanges(),i=B3e(this._placeholderRef,this._document)):i=jhe(this._rootElement),i.style.pointerEvents="none",i.classList.add(R3e),i}_getPointerPositionInElement(n,e,i){let o=e===this._rootElement?null:e,r=o?o.getBoundingClientRect():n,s=QU(i)?i.targetTouches[0]:i,d=this._getViewportScrollPosition(),m=s.pageX-r.left-d.left,v=s.pageY-r.top-d.top;return{x:r.left-n.left+m,y:r.top-n.top+v}}_getPointerPositionOnPage(n){let e=this._getViewportScrollPosition(),i=QU(n)?n.touches[0]||n.changedTouches[0]||{pageX:0,pageY:0}:n,o=i.pageX-e.left,r=i.pageY-e.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let d=this._ownerSVGElement.createSVGPoint();return d.x=o,d.y=r,d.matrixTransform(s.inverse())}}return{x:o,y:r}}_getConstrainedPointerPosition(n){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:o}=this.constrainPosition?this.constrainPosition(n,this,this._initialDomRect,this._pickupPositionInElement):n;if(this.lockAxis==="x"||e==="x"?o=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,d=this._boundaryRect,{width:m,height:v}=this._getPreviewRect(),w=d.top+s,O=d.bottom-(v-s),N=d.left+r,V=d.right-(m-r);i=P3e(i,N,V),o=P3e(o,w,O)}return{x:i,y:o}}_updatePointerDirectionDelta(n){let{x:e,y:i}=n,o=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-r.x),d=Math.abs(i-r.y);return s>this._config.pointerDirectionChangeThreshold&&(o.x=e>r.x?1:-1,r.x=e),d>this._config.pointerDirectionChangeThreshold&&(o.y=i>r.y?1:-1,r.y=i),o}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let n=this._handles.length>0||!this.isDragging();n!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=n,NN(this._rootElement,n))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(n=>n()),this._rootElementCleanups=void 0}_applyRootElementTransform(n,e){let i=1/this.scale,o=JU(n*i,e*i),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=QQ(o,this._initialTransform)}_applyPreviewTransform(n,e){let i=this._previewTemplate?.template?void 0:this._initialTransform,o=JU(n,e);this._preview.setTransform(QQ(o,i))}_getDragDistance(n){let e=this._pickupPositionOnPage;return e?{x:n.x-e.x,y:n.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:n,y:e}=this._passiveTransform;if(n===0&&e===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),o=this._boundaryElement.getBoundingClientRect();if(o.width===0&&o.height===0||i.width===0&&i.height===0)return;let r=o.left-i.left,s=i.right-o.right,d=o.top-i.top,m=i.bottom-o.bottom;o.width>i.width?(r>0&&(n+=r),s>0&&(n-=s)):n=0,o.height>i.height?(d>0&&(e+=d),m>0&&(e-=m)):e=0,(n!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:n})}_getDragStartDelay(n){let e=this.dragStartDelay;return typeof e=="number"?e:QU(n)?e.touch:e?e.mouse:0}_updateOnScroll(n){let e=this._parentPositions.handleScroll(n);if(e){let i=pp(n);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&XU(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=$k(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(n,e){let i=this._previewContainer||"global";if(i==="parent")return n;if(i==="global"){let o=this._document;return e||o.fullscreenElement||o.webkitFullscreenElement||o.mozFullScreenElement||o.msFullscreenElement||o.body}return Rd(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=n=>{if(this._handles.length){let e=this._getTargetHandle(n);e&&!this._disabledHandles.has(e)&&!this.disabled&&n.preventDefault()}else this.disabled||n.preventDefault()};_getTargetHandle(n){return this._handles.find(e=>n.target&&(n.target===e||e.contains(n.target)))}_conditionallyInsertAnchor(n,e,i){if(n===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let o=this._anchor??=jhe(this._placeholder);o.classList.remove(R3e),o.classList.add("cdk-drag-anchor"),o.style.transform="",i?i.before(o):Rd(e.element).appendChild(o)}}};function P3e(t,n,e){return Math.max(n,Math.min(e,t))}function QU(t){return t.type[0]==="t"}function _Pt(t){t.preventDefault()}function e8(t,n,e){let i=ZQ(n,t.length-1),o=ZQ(e,t.length-1);if(i===o)return;let r=t[i],s=o0)return null;let d=this.orientation==="horizontal",m=r.findIndex(W=>W.drag===n),v=r[s],w=r[m].clientRect,O=v.clientRect,N=m>s?1:-1,V=this._getItemOffsetPx(w,O,N),$=this._getSiblingOffsetPx(m,r,N),q=r.slice();return e8(r,m,s),r.forEach((W,te)=>{if(q[te]===W)return;let fe=W.drag===n,xe=fe?V:$,Fe=fe?n.getPlaceholderElement():W.drag.getRootElement();W.offset+=xe;let Re=Math.round(W.offset*(1/W.drag.scale));d?(Fe.style.transform=QQ(`translate3d(${Re}px, 0, 0)`,W.initialTransform),XU(W.clientRect,0,xe)):(Fe.style.transform=QQ(`translate3d(0, ${Re}px, 0)`,W.initialTransform),XU(W.clientRect,xe,0))}),this._previousSwap.overlaps=Ghe(O,e,i),this._previousSwap.drag=v.drag,this._previousSwap.delta=d?o.x:o.y,{previousIndex:m,currentIndex:s}}enter(n,e,i,o){let r=o==null||o<0?this._getItemIndexFromPointerPosition(n,e,i):o,s=this._activeDraggables,d=s.indexOf(n),m=n.getPlaceholderElement(),v=s[r];if(v===n&&(v=s[r+1]),!v&&(r==null||r===-1||r-1&&s.splice(d,1),v&&!this._dragDropRegistry.isDragging(v)){let w=v.getRootElement();w.parentElement.insertBefore(m,w),s.splice(r,0,n)}else this._element.appendChild(m),s.push(n);m.style.transform="",this._cacheItemPositions()}withItems(n){this._activeDraggables=n.slice(),this._cacheItemPositions()}withSortPredicate(n){this._sortPredicate=n}reset(){this._activeDraggables?.forEach(n=>{let e=n.getRootElement();if(e){let i=this._itemPositions.find(o=>o.drag===n)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(n){return this._getVisualItemPositions().findIndex(e=>e.drag===n)}getItemAtIndex(n){return this._getVisualItemPositions()[n]?.drag||null}updateOnScroll(n,e){this._itemPositions.forEach(({clientRect:i})=>{XU(i,n,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(n){this._element=n}_cacheItemPositions(){let n=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:Qhe(i)}}).sort((e,i)=>n?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(n,e,i){let o=this.orientation==="horizontal",r=o?e.left-n.left:e.top-n.top;return i===-1&&(r+=o?e.width-n.width:e.height-n.height),r}_getSiblingOffsetPx(n,e,i){let o=this.orientation==="horizontal",r=e[n].clientRect,s=e[n+i*-1],d=r[o?"width":"height"]*i;if(s){let m=o?"left":"top",v=o?"right":"bottom";i===-1?d-=s.clientRect[m]-r[v]:d+=r[m]-s.clientRect[v]}return d}_shouldEnterAsFirstChild(n,e){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,o=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let s=i[i.length-1].clientRect;return o?n>=s.right:e>=s.bottom}else{let s=i[0].clientRect;return o?n<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(n,e,i,o){let r=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:d,clientRect:m})=>{if(d===n)return!1;if(o){let v=r?o.x:o.y;if(d===this._previousSwap.drag&&this._previousSwap.overlaps&&v===this._previousSwap.delta)return!1}return r?e>=Math.floor(m.left)&&e=Math.floor(m.top)&&im?w.after(v):w.before(v),e8(this._activeItems,m,r);let O=this._getRootNode().elementFromPoint(e,i);return s.deltaX=o.x,s.deltaY=o.y,s.drag=d,s.overlaps=w===O||w.contains(O),{previousIndex:m,currentIndex:r}}enter(n,e,i,o){let r=this._activeItems.indexOf(n);r>-1&&this._activeItems.splice(r,1);let s=o==null||o<0?this._getItemIndexFromPointerPosition(n,e,i):o;s===-1&&(s=this._getClosestItemIndexToPointer(n,e,i));let d=this._activeItems[s];d&&!this._dragDropRegistry.isDragging(d)?(this._activeItems.splice(s,0,n),d.getRootElement().before(n.getPlaceholderElement())):(this._activeItems.push(n),this._element.appendChild(n.getPlaceholderElement()))}withItems(n){this._activeItems=n.slice()}withSortPredicate(n){this._sortPredicate=n}reset(){let n=this._element,e=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[o,r]=this._relatedNodes[i];o.parentNode===n&&o.nextSibling!==r&&(r===null?n.appendChild(o):r.parentNode===n&&n.insertBefore(o,r))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(n){return this._activeItems.indexOf(n)}getItemAtIndex(n){return this._activeItems[n]||null}updateOnScroll(){this._activeItems.forEach(n=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(n){n!==this._element&&(this._element=n,this._rootNode=void 0)}_getItemIndexFromPointerPosition(n,e,i){let o=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(i)),r=o?this._activeItems.findIndex(s=>{let d=s.getRootElement();return o===d||d.contains(o)}):-1;return r===-1||!this._sortPredicate(r,n)?-1:r}_getRootNode(){return this._rootNode||(this._rootNode=$k(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(n,e,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let o=1/0,r=-1;for(let s=0;s!0;sortPredicate=()=>!0;beforeStarted=new hi;entered=new hi;exited=new hi;dropped=new hi;sorted=new hi;receivingStarted=new hi;receivingStopped=new hi;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=Xr.EMPTY;_verticalScrollDirection=ky.NONE;_horizontalScrollDirection=mg.NONE;_scrollNode;_stopScrollTimers=new hi;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(n,e,i,o,r){this._dragDropRegistry=e,this._ngZone=o,this._viewportRuler=r;let s=this.element=Rd(n);this._document=i,this.withOrientation("vertical").withElementContainer(s),e.registerDropContainer(this),this._parentPositions=new YQ(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(n,e,i,o){this._draggingStarted(),o==null&&this.sortingDisabled&&(o=this._draggables.indexOf(n)),this._sortStrategy.enter(n,e,i,o),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:n,container:this,currentIndex:this.getItemIndex(n)})}exit(n){this._reset(),this.exited.next({item:n,container:this})}drop(n,e,i,o,r,s,d,m={}){this._reset(),this.dropped.next({item:n,currentIndex:e,previousIndex:i,container:this,previousContainer:o,isPointerOverContainer:r,distance:s,dropPoint:d,event:m})}withItems(n){let e=this._draggables;return this._draggables=n,n.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(o=>o.isDragging()).every(o=>n.indexOf(o)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(n){return this._direction=n,this._sortStrategy instanceof XQ&&(this._sortStrategy.direction=n),this}connectedTo(n){return this._siblings=n.slice(),this}withOrientation(n){if(n==="mixed")this._sortStrategy=new Khe(this._document,this._dragDropRegistry);else{let e=new XQ(this._dragDropRegistry);e.direction=this._direction,e.orientation=n,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,i)=>this.sortPredicate(e,i,this)),this}withScrollableParents(n){let e=this._container;return this._scrollableElements=n.indexOf(e)===-1?[e,...n]:n.slice(),this}withElementContainer(n){if(n===this._container)return this;let e=Rd(this.element),i=this._scrollableElements.indexOf(this._container),o=this._scrollableElements.indexOf(n);return i>-1&&this._scrollableElements.splice(i,1),o>-1&&this._scrollableElements.splice(o,1),this._sortStrategy&&this._sortStrategy.withElementContainer(n),this._cachedShadowRoot=null,this._scrollableElements.unshift(n),this._container=n,this}getScrollableParents(){return this._scrollableElements}getItemIndex(n){return this._isDragging?this._sortStrategy.getItemIndex(n):this._draggables.indexOf(n)}getItemAtIndex(n){return this._isDragging?this._sortStrategy.getItemAtIndex(n):this._draggables[n]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(n,e,i,o){if(this.sortingDisabled||!this._domRect||!E3e(this._domRect,L3e,e,i))return;let r=this._sortStrategy.sort(n,e,i,o);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:n})}_startScrollingIfNecessary(n,e){if(this.autoScrollDisabled)return;let i,o=ky.NONE,r=mg.NONE;if(this._parentPositions.positions.forEach((s,d)=>{d===this._document||!s.clientRect||i||E3e(s.clientRect,L3e,n,e)&&([o,r]=yPt(d,s.clientRect,this._direction,n,e),(o||r)&&(i=d))}),!o&&!r){let{width:s,height:d}=this._viewportRuler.getViewportSize(),m={width:s,height:d,top:0,right:s,bottom:d,left:0};o=z3e(m,e),r=U3e(m,n),i=window}i&&(o!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=o,this._horizontalScrollDirection=r,this._scrollNode=i,(o||r)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let n=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=n.msScrollSnapType||n.scrollSnapType||"",n.scrollSnapType=n.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let n=this._container.style;n.scrollSnapType=n.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),GT(0,r7).pipe(cs(this._stopScrollTimers)).subscribe(()=>{let n=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===ky.UP?n.scrollBy(0,-e):this._verticalScrollDirection===ky.DOWN&&n.scrollBy(0,e),this._horizontalScrollDirection===mg.LEFT?n.scrollBy(-e,0):this._horizontalScrollDirection===mg.RIGHT&&n.scrollBy(e,0)})};_isOverContainer(n,e){return this._domRect!=null&&Ghe(this._domRect,n,e)}_getSiblingContainerFromPosition(n,e,i){return this._siblings.find(o=>o._canReceive(n,e,i))}_canReceive(n,e,i){if(!this._domRect||!Ghe(this._domRect,e,i)||!this.enterPredicate(n,this))return!1;let o=this._getShadowRoot().elementFromPoint(e,i);return o?o===this._container||this._container.contains(o):!1}_startReceiving(n,e){let i=this._activeSiblings;!i.has(n)&&e.every(o=>this.enterPredicate(o,this)||this._draggables.indexOf(o)>-1)&&(i.add(n),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:n,receiver:this,items:e}))}_stopReceiving(n){this._activeSiblings.delete(n),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:n,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(n=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(n);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let n=$k(this._container);this._cachedShadowRoot=n||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let n=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,n))}};function z3e(t,n){let{top:e,bottom:i,height:o}=t,r=o*V3e;return n>=e-r&&n<=e+r?ky.UP:n>=i-r&&n<=i+r?ky.DOWN:ky.NONE}function U3e(t,n){let{left:e,right:i,width:o}=t,r=o*V3e;return n>=e-r&&n<=e+r?mg.LEFT:n>=i-r&&n<=i+r?mg.RIGHT:mg.NONE}function yPt(t,n,e,i,o){let r=z3e(n,o),s=U3e(n,i),d=ky.NONE,m=mg.NONE;if(r){let v=t.scrollTop;r===ky.UP?v>0&&(d=ky.UP):t.scrollHeight-v>t.clientHeight&&(d=ky.DOWN)}if(s){let v=t.scrollLeft;e==="rtl"?s===mg.RIGHT?v<0&&(m=mg.RIGHT):t.scrollWidth+v>t.clientWidth&&(m=mg.LEFT):s===mg.LEFT?v>0&&(m=mg.LEFT):t.scrollWidth-v>t.clientWidth&&(m=mg.RIGHT)}return[d,m]}var ZU={capture:!0},Hhe={passive:!1,capture:!0},vPt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,o){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important} `],encapsulation:2,changeDetection:0})}return t})(),H3e=(()=>{class t{_ngZone=re(_n);_document=re(Ao);_styleLoader=re(kl);_renderer=re(bc).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new hi;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Zn([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new hi;pointerUp=new hi;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,Hhe)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,i){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(vPt),this._activeDragInstances.update(o=>[...o,e]),this._activeDragInstances().length===1)){let o=i.type.startsWith("touch"),r=d=>this.pointerUp.next(d),s=[["scroll",d=>this._scroll.next(d),ZU],["selectstart",this._preventDefaultWhileDragging,Hhe]];o?s.push(["touchend",r,ZU],["touchcancel",r,ZU]):s.push(["mouseup",r,ZU]),o||s.push(["mousemove",d=>this.pointerMove.next(d),Hhe]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=s.map(([d,m,v])=>this._renderer.listen(this._document,d,m,v))})}}stopDragging(e){this._activeDragInstances.update(i=>{let o=i.indexOf(e);return o>-1?(i.splice(o,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let i=[this._scroll];return e&&e!==this._document&&i.push(new Cr(o=>this._ngZone.runOutsideAngular(()=>{let r=this._renderer.listen(e,"scroll",s=>{this._activeDragInstances().length&&o.next(s)},ZU);return()=>{r()}}))),ku(...i)}registerDirectiveNode(e,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,i)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),bPt={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Jhe=(()=>{class t{_document=re(Ao);_ngZone=re(_n);_viewportRuler=re(zv);_dragDropRegistry=re(H3e);_renderer=re(bc).createRenderer(null,null);constructor(){}createDrag(e,i=bPt){return new qhe(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(e){return new Whe(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),N3e=new fi("CDK_DRAG_PARENT");var CPt=new fi("CdkDragHandle");var JQ=new fi("CDK_DRAG_CONFIG"),j3e=new fi("CdkDropList"),G3e=(()=>{class t{element=re(Bn);dropContainer=re(j3e,{optional:!0,skipSelf:!0});_ngZone=re(_n);_viewContainerRef=re(nc);_dir=re(ad,{optional:!0});_changeDetectorRef=re(Gi);_selfHandle=re(CPt,{optional:!0,self:!0});_parentDrag=re(N3e,{optional:!0,skipSelf:!0});_dragDropRegistry=re(H3e);_destroyed=new hi;_handles=new Gs([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new ve;released=new ve;ended=new ve;entered=new ve;exited=new ve;dropped=new ve;moved=new Cr(e=>{let i=this._dragRef.moved.pipe(vt(o=>({source:this,pointerPosition:o.pointerPosition,event:o.event,delta:o.delta,distance:o.distance}))).subscribe(e);return()=>{i.unsubscribe()}});_injector=re(Oo);constructor(){let e=this.dropContainer,i=re(JQ,{optional:!0}),o=re(Jhe);this._dragRef=o.createDrag(this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),e&&(e.addItem(this),e._dropListRef.beforeStarted.pipe(cs(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){Ou(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let i=e.rootElementSelector,o=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,o&&!o.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let i=this._handles.getValue();i.push(e),this._handles.next(i)}_removeHandle(e){let i=this._handles.getValue(),o=i.indexOf(e);o>-1&&(i.splice(o,1),this._handles.next(i))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,i=e;this.rootElementSelector&&(i=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):Rd(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let i=this._dir,o=this.dragStartDelay,r=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof o=="object"&&o?o:jm(o),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe(Sn(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let o=this._dragDropRegistry.getDragDirectiveForNode(i);if(o){e.withParent(o._dragRef);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(e){let{lockAxis:i,dragStartDelay:o,constrainPosition:r,previewClass:s,boundaryElement:d,draggingDisabled:m,rootElementSelector:v,previewContainer:w}=e;this.disabled=m??!1,this.dragStartDelay=o||0,this.lockAxis=i||null,r&&(this.constrainPosition=r),s&&(this.previewClass=s),d&&(this.boundaryElement=d),v&&(this.rootElementSelector=v),w&&(this.previewContainer=w)}_setupHandlesListener(){this._handles.pipe(Vo(e=>{let i=e.map(o=>o.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),Mn(e=>ku(...e.map(i=>i._stateChanges.pipe(rl(i))))),cs(this._destroyed)).subscribe(e=>{let i=this._dragRef,o=e.element.nativeElement;e.disabled?i.disableHandle(o):i.enableHandle(o)})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,o){i&2&&Vn("cdk-drag-disabled",o.disabled)("cdk-drag-dragging",o._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",je],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",ln]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[jt([{provide:N3e,useExisting:t}]),Ot]})}return t})(),Yhe=new fi("CdkDropListGroup"),$3e=(()=>{class t{_items=new Set;disabled=!1;ngOnDestroy(){this._items.clear()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","cdkDropListGroup",""]],inputs:{disabled:[2,"cdkDropListGroupDisabled","disabled",je]},exportAs:["cdkDropListGroup"],features:[jt([{provide:Yhe,useExisting:t}])]})}return t})(),q3e=(()=>{class t{element=re(Bn);_changeDetectorRef=re(Gi);_scrollDispatcher=re(ZC);_dir=re(ad,{optional:!0});_group=re(Yhe,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new hi;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=re(ul).getId("cdk-drop-list-");lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e}_disabled;sortingDisabled;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled;autoScrollStep;elementContainerSelector;hasAnchor;dropped=new ve;entered=new ve;exited=new ve;sorted=new ve;_unsortedItems=new Set;constructor(){let e=re(Jhe),i=re(JQ,{optional:!0});this._dropListRef=e.createDropList(this.element),this._dropListRef.data=this,i&&this._assignDefaults(i),this._dropListRef.enterPredicate=(o,r)=>this.enterPredicate(o.data,r.data),this._dropListRef.sortPredicate=(o,r,s)=>this.sortPredicate(o,r.data,s.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(e){this._unsortedItems.add(e),e._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(e){if(this._unsortedItems.delete(e),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(e._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(rl(this._dir.value),cs(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{let i=VI(this.connectedTo).map(o=>{if(typeof o=="string"){let r=t._dropLists.find(s=>s.id===o);return r}return o});if(this._group&&this._group._items.forEach(o=>{i.indexOf(o)===-1&&i.push(o)}),!this._scrollableParentsResolved){let o=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(r=>r.getElementRef().nativeElement);this._dropListRef.withScrollableParents(o),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let o=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(o)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=jm(this.autoScrollStep,2),e.hasAnchor=this.hasAnchor,e.connectedTo(i.filter(o=>o&&o!==this).map(o=>o._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),ku(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:i,draggingDisabled:o,sortingDisabled:r,listAutoScrollDisabled:s,listOrientation:d}=e;this.disabled=o??!1,this.sortingDisabled=r??!1,this.autoScrollDisabled=s??!1,this.orientation=d||"vertical",this.lockAxis=i||null}_syncItemsWithRef(e){this._latestSortedRefs=e,this._dropListRef.withItems(e)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,o){i&2&&(Ge("id",o.id),Vn("cdk-drop-list-disabled",o.disabled)("cdk-drop-list-dragging",o._dropListRef.isDragging())("cdk-drop-list-receiving",o._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",je],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",je],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",je],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",je]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[jt([{provide:Yhe,useValue:void 0},{provide:j3e,useExisting:t}])]})}return t})();var eZ=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:[Jhe],imports:[Vv]})}return t})();var W3e=` .p-listbox { display: block; background: dt('listbox.background'); color: dt('listbox.color'); border: 1px solid dt('listbox.border.color'); border-radius: dt('listbox.border.radius'); transition: background dt('listbox.transition.duration'), color dt('listbox.transition.duration'), border-color dt('listbox.transition.duration'), box-shadow dt('listbox.transition.duration'), outline-color dt('listbox.transition.duration'); outline-color: transparent; box-shadow: dt('listbox.shadow'); } .p-listbox.p-disabled { opacity: 1; background: dt('listbox.disabled.background'); color: dt('listbox.disabled.color'); } .p-listbox.p-disabled .p-listbox-option { color: dt('listbox.disabled.color'); } .p-listbox.p-invalid { border-color: dt('listbox.invalid.border.color'); } .p-listbox-header { padding: dt('listbox.list.header.padding'); } .p-listbox-filter { width: 100%; } .p-listbox-list-container { overflow: auto; } .p-listbox-list { list-style-type: none; margin: 0; padding: dt('listbox.list.padding'); outline: 0 none; display: flex; flex-direction: column; gap: dt('listbox.list.gap'); } .p-listbox-option { display: flex; align-items: center; cursor: pointer; position: relative; overflow: hidden; padding: dt('listbox.option.padding'); border: 0 none; border-radius: dt('listbox.option.border.radius'); color: dt('listbox.option.color'); transition: background dt('listbox.transition.duration'), color dt('listbox.transition.duration'), border-color dt('listbox.transition.duration'), box-shadow dt('listbox.transition.duration'), outline-color dt('listbox.transition.duration'); } .p-listbox-striped li:nth-child(even of .p-listbox-option) { background: dt('listbox.option.striped.background'); } .p-listbox .p-listbox-list .p-listbox-option.p-listbox-option-selected { background: dt('listbox.option.selected.background'); color: dt('listbox.option.selected.color'); } .p-listbox:not(.p-disabled) .p-listbox-option.p-listbox-option-selected.p-focus { background: dt('listbox.option.selected.focus.background'); color: dt('listbox.option.selected.focus.color'); } .p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled).p-focus { background: dt('listbox.option.focus.background'); color: dt('listbox.option.focus.color'); } .p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled):hover { background: dt('listbox.option.focus.background'); color: dt('listbox.option.focus.color'); } .p-listbox-option-blank-icon { flex-shrink: 0; } .p-listbox-option-check-icon { position: relative; flex-shrink: 0; margin-inline-start: dt('listbox.checkmark.gutter.start'); margin-inline-end: dt('listbox.checkmark.gutter.end'); color: dt('listbox.checkmark.color'); } .p-listbox-option-group { margin: 0; padding: dt('listbox.option.group.padding'); color: dt('listbox.option.group.color'); background: dt('listbox.option.group.background'); font-weight: dt('listbox.option.group.font.weight'); } .p-listbox-empty-message { padding: dt('listbox.empty.message.padding'); } .p-listbox-fluid { width: 100%; } `;var xPt=["item"],wPt=["group"],SPt=["header"],Y3e=["filter"],TPt=["footer"],IPt=["emptyfilter"],EPt=["empty"],DPt=["filtericon"],APt=["checkicon"],kPt=["checkmark"],MPt=["loader"],OPt=["headerchkbox"],RPt=["lastHiddenFocusableElement"],FPt=["firstHiddenFocusableElement"],PPt=["scroller"],LPt=["list"],NPt=["container"],BPt=[[["p-header"]],[["p-footer"]]],VPt=["p-header","p-footer"],tZ=(t,n)=>({$implicit:t,options:n}),eme=t=>({$implicit:t}),Z3e=t=>({options:t}),X3e=()=>[],tme=t=>({height:t}),zPt=()=>({}),UPt=(t,n,e)=>({option:t,i:n,scrollerOptions:e}),HPt=(t,n,e,i)=>({$implicit:t,index:n,selected:e,disabled:i}),jPt=t=>({implicit:t});function GPt(t,n){t&1&&ui(0)}function $Pt(t,n){if(t&1&&(k(0,"div"),pn(1),ee(2,GPt,1,0,"ng-container",20),D()),t&2){let e=P();Oe(e.cx("header")),T(2),E("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",Eo(4,tZ,e.modelValue(),e.visibleOptions()))}}function qPt(t,n){}function KPt(t,n){t&1&&ee(0,qPt,0,0,"ng-template")}function WPt(t,n){if(t&1&&ee(0,KPt,1,0,null,20),t&2){let e=P(4);E("ngTemplateOutlet",e.checkIconTemplate||e._checkIconTemplate)("ngTemplateOutletContext",ki(2,eme,e.allSelected()))}}function YPt(t,n){t&1&&(Di(0),ee(1,WPt,1,4,"ng-template",null,5,Pt),Ai())}function QPt(t,n){if(t&1){let e=tt();k(0,"p-checkbox",23,4),ie("onChange",function(o){se(e);let r=P(2);return ae(r.onToggleAll(o))}),ee(2,YPt,3,0,"ng-container",17),D()}if(t&2){let e=P(2);Oe(e.cx("optionCheckIcon")),E("ngModel",e.allSelected())("disabled",e.$disabled())("tabindex",-1)("variant",e.config.inputStyle()==="filled"||e.config.inputVariant()==="filled"?"filled":"outlined")("binary",!0),Ge("aria-label",e.toggleAllAriaLabel),T(2),E("ngIf",e.checkIconTemplate||e._checkIconTemplate)}}function ZPt(t,n){t&1&&ui(0)}function XPt(t,n){if(t&1&&(Di(0),ee(1,ZPt,1,0,"ng-container",20),Ai()),t&2){let e=P(2);T(),E("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",ki(2,Z3e,e.filterOptions))}}function JPt(t,n){t&1&&(si(),ce(0,"svg",27)),t&2&&Ge("aria-hidden",!0)}function eLt(t,n){}function tLt(t,n){t&1&&ee(0,eLt,0,0,"ng-template")}function iLt(t,n){if(t&1&&(k(0,"span"),ee(1,tLt,1,0,null,28),D()),t&2){let e=P(4);Ge("aria-hidden",!0),T(),E("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function nLt(t,n){if(t&1){let e=tt();k(0,"p-iconfield")(1,"input",25,6),ie("input",function(o){se(e);let r=P(3);return ae(r.onFilterChange(o))})("keydown",function(o){se(e);let r=P(3);return ae(r.onFilterKeyDown(o))})("blur",function(o){se(e);let r=P(3);return ae(r.onFilterBlur(o))}),D(),k(3,"p-inputicon"),ee(4,JPt,1,1,"svg",26)(5,iLt,2,2,"span",17),D()()}if(t&2){let e=P(3);T(),Oe(e.cx("pcFilter")),E("value",e._filterValue()||""),Ge("disabled",e.$disabled()?"":void 0)("aria-owns",e.id+"_list")("aria-activedescendant",e.focusedOptionId)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)("tabindex",!e.$disabled()&&!e.focused?e.tabindex:-1),T(3),E("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),T(),E("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function oLt(t,n){if(t&1&&(qe(0,nLt,6,11,"p-iconfield"),k(1,"span",24),Q(2),D()),t&2){let e=P(2);Ke(e.filter?0:-1),T(),Ge("aria-live","polite")("data-p-hidden-accessible",!0),T(),Qi(" ",e.filterResultMessageText," ")}}function rLt(t,n){if(t&1&&(k(0,"div"),ee(1,QPt,3,9,"p-checkbox",21)(2,XPt,2,4,"ng-container",22)(3,oLt,3,4,"ng-template",null,3,Pt),D()),t&2){let e=ti(4),i=P();Oe(i.cx("header")),T(),E("ngIf",i.checkbox&&i.multiple),T(),E("ngIf",i.filterTemplate||i._filterTemplate)("ngIfElse",e)}}function sLt(t,n){if(t&1&&Q(0),t&2){let e=P(2);Qi(" ",e.emptyFilterMessageText," ")}}function aLt(t,n){t&1&&ui(0,null,7)}function lLt(t,n){if(t&1&&ee(0,aLt,2,0,"ng-container",28),t&2){let e=P(2);E("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e._emptyTemplate||e.emptyTemplate)}}function cLt(t,n){if(t&1){let e=tt();k(0,"div",29),ie("cdkDropListDropped",function(o){se(e);let r=P();return ae(r.drop(o))}),qe(1,sLt,1,1)(2,lLt,1,1,"ng-container"),D()}if(t&2){let e=P();Oe(e.cx("emptyMessage")),E("cdkDropListData",uo(4,X3e)),T(),Ke(!e.emptyFilterTemplate&&!e._emptyFilterTemplate&&!e._emptyTemplate&&!e.emptyTemplate?1:2)}}function dLt(t,n){if(t&1&&Q(0),t&2){let e=P(2);Qi(" ",e.emptyMessage," ")}}function uLt(t,n){t&1&&ui(0,null,8)}function pLt(t,n){if(t&1&&ee(0,uLt,2,0,"ng-container",28),t&2){let e=P(2);E("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function hLt(t,n){if(t&1){let e=tt();k(0,"div",29),ie("cdkDropListDropped",function(o){se(e);let r=P();return ae(r.drop(o))}),qe(1,dLt,1,1)(2,pLt,1,1,"ng-container"),D()}if(t&2){let e=P();Oe(e.cx("emptyMessage")),E("cdkDropListData",uo(4,X3e)),T(),Ke(!e.emptyTemplate&&!e._emptyTemplate?1:2)}}function mLt(t,n){t&1&&ui(0)}function fLt(t,n){if(t&1&&ee(0,mLt,1,0,"ng-container",20),t&2){let e=n.$implicit,i=n.options;P(2);let o=ti(3);E("ngTemplateOutlet",o)("ngTemplateOutletContext",Eo(2,tZ,e,i))}}function gLt(t,n){t&1&&ui(0)}function _Lt(t,n){if(t&1&&ee(0,gLt,1,0,"ng-container",20),t&2){let e=n.options,i=P(4);E("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",ki(2,Z3e,e))}}function yLt(t,n){t&1&&ee(0,_Lt,1,4,"ng-template",null,12,Pt)}function vLt(t,n){if(t&1){let e=tt();k(0,"p-scroller",31,10),ie("onLazyLoad",function(o){se(e);let r=P(2);return ae(r.onLazyLoad.emit(o))}),ee(2,fLt,1,5,"ng-template",null,11,Pt),qe(4,yLt,2,0),D()}if(t&2){let e=P(2);$r(ki(9,tme,e.scrollHeight)),E("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions)("tabindex",e.scrollerTabIndex),T(4),Ke(e.loaderTemplate||e._loaderTemplate?4:-1)}}function bLt(t,n){t&1&&ui(0)}function CLt(t,n){if(t&1&&(Di(0),ee(1,bLt,1,0,"ng-container",20),Ai()),t&2){P();let e=ti(3),i=P();T(),E("ngTemplateOutlet",e)("ngTemplateOutletContext",Eo(3,tZ,i.visibleOptions(),uo(2,zPt)))}}function xLt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(2).$implicit,i=P(3);T(),dt(i.getOptionGroupLabel(e.optionGroup))}}function wLt(t,n){t&1&&ui(0)}function SLt(t,n){if(t&1&&(Di(0),k(1,"li",34),ee(2,xLt,2,1,"span",17)(3,wLt,1,0,"ng-container",20),D(),Ai()),t&2){let e=P(),i=e.$implicit,o=e.index,r=P().options,s=P(2);T(),Oe(s.cx("optionGroup")),E("ngStyle",ki(9,tme,r.itemSize+"px"))("cdkDragData",i)("cdkDragDisabled",!s.dragdrop),Ge("id",s.id+"_"+s.getOptionIndex(o,r)),T(),E("ngIf",!s.groupTemplate&&!s._groupTemplate),T(),E("ngTemplateOutlet",s.groupTemplate||s._groupTemplate)("ngTemplateOutletContext",ki(11,eme,i.optionGroup))}}function TLt(t,n){}function ILt(t,n){t&1&&ee(0,TLt,0,0,"ng-template")}function ELt(t,n){if(t&1&&ee(0,ILt,1,0,null,20),t&2){let e=P(4).$implicit,i=P(3);E("ngTemplateOutlet",i.checkIconTemplate||i._checkIconTemplate)("ngTemplateOutletContext",ki(2,eme,i.isSelected(e)))}}function DLt(t,n){t&1&&(Di(0),ee(1,ELt,1,4,"ng-template",null,5,Pt),Ai())}function ALt(t,n){if(t&1&&(k(0,"p-checkbox",37),ee(1,DLt,3,0,"ng-container",17),D()),t&2){let e=P(2).$implicit,i=P(3);Oe(i.cx("optionCheckIcon")),E("ngModel",i.isSelected(e))("readonly",!0)("disabled",i.$disabled()||i.isOptionDisabled(e))("tabindex",-1)("variant",i.config.inputStyle()==="filled"||i.config.inputVariant()==="filled"?"filled":"outlined")("binary",!0),T(),E("ngIf",i.checkIconTemplate||i._checkIconTemplate)}}function kLt(t,n){if(t&1&&(si(),ce(0,"svg",40)),t&2){let e=P(7);Oe(e.cx("optionBlankIcon"))}}function MLt(t,n){if(t&1&&(si(),ce(0,"svg",41)),t&2){let e=P(7);Oe(e.cx("optionCheckIcon"))}}function OLt(t,n){if(t&1&&(Di(0),ee(1,kLt,1,2,"svg",38)(2,MLt,1,2,"svg",39),Ai()),t&2){let e=P(3).$implicit,i=P(3);T(),E("ngIf",!i.isSelected(e)),T(),E("ngIf",i.isSelected(e))}}function RLt(t,n){t&1&&ui(0)}function FLt(t,n){if(t&1&&(Di(0),ee(1,OLt,3,2,"ng-container",17)(2,RLt,1,0,"ng-container",20),Ai()),t&2){let e=P(2).$implicit,i=P(3);T(),E("ngIf",!i.checkmarkTemplate&&!i._checkmarkTemplate),T(),E("ngTemplateOutlet",i.checkmarkTemplate||i._checkmarkTemplate)("ngTemplateOutletContext",ki(3,jPt,i.isSelected(e)))}}function PLt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P(2).$implicit,i=P(3);T(),dt(i.getOptionLabel(e))}}function LLt(t,n){t&1&&ui(0)}function NLt(t,n){if(t&1){let e=tt();Di(0),k(1,"li",35),ie("click",function(o){se(e);let r=P(),s=r.$implicit,d=r.index,m=P().options,v=P(2);return ae(v.onOptionSelect(o,s,v.getOptionIndex(d,m)))})("dblclick",function(o){se(e);let r=P().$implicit,s=P(3);return ae(s.onOptionDoubleClick(o,r))})("mousedown",function(o){se(e);let r=P().index,s=P().options,d=P(2);return ae(d.onOptionMouseDown(o,d.getOptionIndex(r,s)))})("mouseenter",function(o){se(e);let r=P().index,s=P().options,d=P(2);return ae(d.onOptionMouseEnter(o,d.getOptionIndex(r,s)))})("touchend",function(){se(e);let o=P(4);return ae(o.onOptionTouchEnd())}),ee(2,ALt,2,9,"p-checkbox",36)(3,FLt,3,5,"ng-container",17)(4,PLt,2,1,"span",17)(5,LLt,1,0,"ng-container",20),D(),Ai()}if(t&2){let e=P(),i=e.$implicit,o=e.index,r=P().options,s=P(2);T(),Oe(s.cx("option",$d(18,UPt,i,o,r))),E("ngStyle",ki(22,tme,r.itemSize+"px"))("cdkDragData",i)("cdkDragDisabled",!s.dragdrop),Ge("id",s.id+"_"+s.getOptionIndex(o,r))("aria-label",s.getOptionLabel(i))("aria-selected",s.isSelected(i))("aria-disabled",s.isOptionDisabled(i))("aria-setsize",s.ariaSetSize)("ariaPosInset",s.getAriaPosInset(s.getOptionIndex(o,r)))("data-pc-section","item")("data-p-selected",s.isSelected(i)),T(),E("ngIf",s.checkbox&&s.multiple),T(),E("ngIf",s.checkmark),T(),E("ngIf",!s.itemTemplate&&!s._itemTemplate),T(),E("ngTemplateOutlet",s.itemTemplate||s._itemTemplate)("ngTemplateOutletContext",Sv(24,HPt,i,s.getOptionIndex(o,r),s.isSelected(i),s.isOptionDisabled(i)))}}function BLt(t,n){if(t&1&&ee(0,SLt,4,13,"ng-container",17)(1,NLt,6,29,"ng-container",17),t&2){let e=n.$implicit,i=P(3);E("ngIf",i.isOptionGroup(e)),T(),E("ngIf",!i.isOptionGroup(e))}}function VLt(t,n){if(t&1){let e=tt();k(0,"ul",32),ie("focus",function(o){se(e);let r=P(2);return ae(r.onListFocus(o))})("blur",function(o){se(e);let r=P(2);return ae(r.onListBlur(o))})("keydown",function(o){se(e);let r=P(2);return ae(r.onListKeyDown(o))})("cdkDropListDropped",function(o){se(e);let r=P(2);return ae(r.drop(o))}),ee(1,BLt,2,2,"ng-template",33),D()}if(t&2){let e=n.$implicit,i=n.options,o=P(2);$r(i.contentStyle),Oe(o.cx("list")),E("id",o.id+"_list")("tabindex",-1)("ngClass",i.contentStyleClass)("cdkDropListData",e),Ge("aria-multiselectable",!0)("aria-activedescendant",o.focused?o.focusedOptionId:void 0)("aria-label",o.ariaLabel)("aria-disabled",o.$disabled()),T(),E("ngForOf",e)}}function zLt(t,n){if(t&1&&ee(0,vLt,5,11,"p-scroller",30)(1,CLt,2,6,"ng-container",17)(2,VLt,2,13,"ng-template",null,9,Pt),t&2){let e=P();E("ngIf",e.virtualScroll),T(),E("ngIf",!e.virtualScroll)}}function ULt(t,n){t&1&&ui(0)}function HLt(t,n){if(t&1&&(k(0,"div"),pn(1,1),ee(2,ULt,1,0,"ng-container",20),D()),t&2){let e=P();T(2),E("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)("ngTemplateOutletContext",Eo(2,tZ,e.modelValue(),e.visibleOptions()))}}function jLt(t,n){if(t&1&&(k(0,"span",19),Q(1),D()),t&2){let e=P();T(),Qi(" ",e.emptyMessage," ")}}var GLt=` ${W3e} /* For PrimeNG */ .p-listbox.ng-invalid.ng-dirty { border-color: dt('listbox.invalid.border.color'); } .p-listbox-header { display: flex; align-items: center; } .p-listbox-header > .p-iconfield { flex-grow: 1; } `,$Lt={root:({instance:t})=>["p-listbox p-component",{"p-listbox-striped":t.striped,"p-disabled":t.$disabled(),"p-invalid":t.invalid(),"p-listbox-fluid":t.fluid()}],header:"p-listbox-header",pcFilter:"p-listbox-filter",listContainer:"p-listbox-list-container",list:"p-listbox-list",optionGroup:"p-listbox-option-group",option:({instance:t,option:n,i:e,scrollerOptions:i})=>["p-listbox-option",{"p-listbox-option-selected":t.isSelected(n)&&t.highlightOnSelect,"p-focus":t.focusedOptionIndex()===t.getOptionIndex(e,i),"p-disabled":t.isOptionDisabled(n)}],optionCheckIcon:"p-listbox-option-check-icon",optionBlankIcon:"p-listbox-option-blank-icon",emptyMessage:"p-listbox-empty-message"},Q3e=(()=>{class t extends io{name="listbox";theme=GLt;classes=$Lt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var qLt={provide:Ea,useExisting:Ko(()=>ime),multi:!0},ime=(()=>{class t extends Wm{filterService;id;searchMessage;emptySelectionMessage;selectionMessage;autoOptionFocus=!0;ariaLabel;selectOnFocus;searchLocale;focusOnHover=!0;filterMessage;filterFields;lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;scrollHeight="14rem";tabindex=0;multiple;styleClass;listStyle;listStyleClass;readonly;checkbox=!1;filter=!1;filterBy;filterMatchMode="contains";filterLocale;metaKeySelection=!1;dataKey;showToggleAll=!0;optionLabel;optionValue;optionGroupChildren="items";optionGroupLabel="label";optionDisabled;ariaFilterLabel;filterPlaceHolder;emptyFilterMessage;emptyMessage;group;get options(){return this._options()}set options(e){this._options.set(e)}get filterValue(){return this._filterValue()}set filterValue(e){this._filterValue.set(e)}get selectAll(){return this._selectAll}set selectAll(e){this._selectAll=e}striped=!1;highlightOnSelect=!0;checkmark=!1;dragdrop=!1;fluid=mo(void 0,{transform:je});onChange=new ve;onClick=new ve;onDblClick=new ve;onFilter=new ve;onFocus=new ve;onBlur=new ve;onSelectAllChange=new ve;onLazyLoad=new ve;onDrop=new ve;headerCheckboxViewChild;filterViewChild;lastHiddenFocusableElement;firstHiddenFocusableElement;scroller;listViewChild;containerViewChild;headerFacet;footerFacet;itemTemplate;groupTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;filterIconTemplate;checkIconTemplate;checkmarkTemplate;loaderTemplate;templates;_itemTemplate;_groupTemplate;_headerTemplate;_filterTemplate;_footerTemplate;_emptyFilterTemplate;_emptyTemplate;_filterIconTemplate;_checkIconTemplate;_checkmarkTemplate;_loaderTemplate;_filterValue=Zn(null);_filteredOptions;filterOptions;filtered;value;optionTouched;focus;headerCheckboxFocus;translationSubscription;focused;scrollerTabIndex="0";_componentStyle=re(Q3e);get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}get filterResultMessageText(){return Kr(this.visibleOptions())?this.filterMessageText.replaceAll("{0}",this.visibleOptions().length):this.emptyFilterMessageText}get filterMessageText(){return this.filterMessage||this.config.translation.searchMessage||""}get searchMessageText(){return this.searchMessage||this.config.translation.searchMessage||""}get emptyFilterMessageText(){return this.emptyFilterMessage||this.config.translation.emptySearchMessage||this.config.translation.emptyFilterMessage||""}get selectionMessageText(){return this.selectionMessage||this.config.translation.selectionMessage||""}get emptySelectionMessageText(){return this.emptySelectionMessage||this.config.translation.emptySelectionMessage||""}get selectedMessageText(){return this.hasSelectedOption()?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue().length:"1"):this.emptySelectionMessageText}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}get virtualScrollerDisabled(){return!this.virtualScroll}get searchFields(){return this.filterBy?.split(",")||this.filterFields||[this.optionLabel]}get toggleAllAriaLabel(){return this.config.translation.aria?this.config.translation.aria[this.allSelected()?"selectAll":"unselectAll"]:void 0}searchValue;searchTimeout;_selectAll=null;_options=Zn(null);startRangeIndex=Zn(-1);focusedOptionIndex=Zn(-1);onHostFocusOut(e){this.onFocusout(e)}visibleOptions=bo(()=>{let e=this.group?this.flatOptions(this._options()):this._options()||[];return this._filterValue()?this.filterService.filter(e,this.searchFields,this._filterValue(),this.filterMatchMode,this.filterLocale):e});constructor(e){super(),this.filterService=e}ngOnInit(){super.ngOnInit(),this.id=this.id||Vr("pn_id_"),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterChange(e),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break;case"group":this._groupTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"filter":this._filterTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"emptyfilter":this._emptyFilterTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"checkicon":this._checkIconTemplate=e.template;break;case"checkmark":this._checkmarkTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}flatOptions(e){return(e||[]).reduce((i,o,r)=>{i.push({optionGroup:o,group:!0,index:r});let s=this.getOptionGroupChildren(o);return s&&s.forEach(d=>i.push(d)),i},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()&&!this.multiple){let e=this.findFirstFocusedOptionIndex();this.focusedOptionIndex.set(e),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()])}}updateModel(e,i){this.value=e,this.writeModelValue(e),this.onModelChange(e),this.onChange.emit({originalEvent:i,value:this.value})}removeOption(e){return this.modelValue().filter(i=>!Sc(i,this.getOptionValue(e),this.equalityKey()))}onOptionSelect(e,i,o=-1){this.$disabled()||this.isOptionDisabled(i)||this.readonly||(e&&this.onClick.emit({originalEvent:e,option:i,value:this.value}),this.multiple?this.onOptionSelectMultiple(e,i):this.onOptionSelectSingle(e,i),this.optionTouched=!1,o!==-1&&this.focusedOptionIndex.set(o))}onOptionSelectMultiple(e,i){let o=this.isSelected(i),r=null;if(this.optionTouched?!1:this.metaKeySelection){let d=e.metaKey||e.ctrlKey;o?r=d?this.removeOption(i):[this.getOptionValue(i)]:(r=d?this.modelValue()||[]:[],r=[...r,this.getOptionValue(i)])}else r=o?this.removeOption(i):[...this.modelValue()||[],this.getOptionValue(i)];this.updateModel(r,e)}onOptionSelectSingle(e,i){let o=this.isSelected(i),r=!1,s=null;if(this.optionTouched?!1:this.metaKeySelection){let m=e.metaKey||e.ctrlKey;o?m&&(s=null,r=!0):(s=this.getOptionValue(i),r=!0)}else s=o?null:this.getOptionValue(i),r=!0;r&&this.updateModel(s,e)}onOptionSelectRange(e,i=-1,o=-1){if(i===-1&&(i=this.findNearestSelectedOptionIndex(o,!0)),o===-1&&(o=this.findNearestSelectedOptionIndex(i)),i!==-1&&o!==-1){let r=Math.min(i,o),s=Math.max(i,o),d=this.visibleOptions().slice(r,s+1).filter(m=>this.isValidOption(m)).map(m=>this.getOptionValue(m));this.updateModel(d,e)}}onToggleAll(e){if(!(this.$disabled()||this.readonly))if(ss(this.headerCheckboxViewChild.nativeElement),this.selectAll!==null)this.onSelectAllChange.emit({originalEvent:e,checked:!this.allSelected()});else{let i=this.allSelected()?[]:this.visibleOptions().filter(o=>this.isValidOption(o)).map(o=>this.getOptionValue(o));this.updateModel(i,e),this.onChange.emit({originalEvent:e,value:this.value})}}allSelected(){return this.selectAll!==null?this.selectAll:Kr(this.visibleOptions())&&this.visibleOptions().every(e=>this.isOptionGroup(e)||this.isOptionDisabled(e)||this.isSelected(e))}onOptionTouchEnd(){this.$disabled()||(this.optionTouched=!0)}onOptionMouseDown(e,i){this.changeFocusedOptionIndex(e,i)}onOptionMouseEnter(e,i){this.focusOnHover&&this.focused&&this.changeFocusedOptionIndex(e,i)}onOptionDoubleClick(e,i){this.$disabled()||this.isOptionDisabled(i)||this.readonly||this.onDblClick.emit({originalEvent:e,option:i,value:this.value})}onFirstHiddenFocus(e){ss(this.listViewChild?.nativeElement);let i=Vw(this.el.nativeElement,':not([data-p-hidden-focusable="true"])');this.lastHiddenFocusableElement.nativeElement.tabIndex=wc(i)?"-1":void 0,this.firstHiddenFocusableElement.nativeElement.tabIndex=-1}onLastHiddenFocus(e){if(e.relatedTarget===this.listViewChild?.nativeElement){let o=Vw(this.el.nativeElement,":not(.p-hidden-focusable)");ss(o),this.firstHiddenFocusableElement.nativeElement.tabIndex=void 0}else ss(this.firstHiddenFocusableElement.nativeElement);this.lastHiddenFocusableElement.nativeElement.tabIndex=-1}onFocusout(e){!this.el.nativeElement.contains(e.relatedTarget)&&this.lastHiddenFocusableElement&&this.firstHiddenFocusableElement&&(this.firstHiddenFocusableElement.nativeElement.tabIndex=this.lastHiddenFocusableElement.nativeElement.tabIndex=void 0,this.scrollerTabIndex="0")}onListFocus(e){this.focused=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.findSelectedOptionIndex();this.focusedOptionIndex.set(i),this.scrollInView(i),this.onFocus.emit(e),this.scrollerTabIndex="-1"}onListBlur(e){this.focused=!1,this.focusedOptionIndex.set(-1),this.startRangeIndex.set(-1),this.searchValue="",this.onBlur.emit(e)}onHeaderCheckboxKeyDown(e){if(this.$disabled()){e.preventDefault();return}switch(e.code){case"Space":this.onToggleAll(e);break;case"Enter":this.onToggleAll(e);break;case"Tab":this.onHeaderCheckboxTabKeyDown(e);break;default:break}}onHeaderCheckboxTabKeyDown(e){ss(this.listViewChild?.nativeElement),e.preventDefault()}onFilterChange(e){let i=e.target.value?.trim();this._filterValue.set(i),this.focusedOptionIndex.set(-1),this.startRangeIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0)}onFilterBlur(e){this.focusedOptionIndex.set(-1),this.startRangeIndex.set(-1)}onListKeyDown(e){let i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":case"NumpadEnter":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey();break;default:if(this.multiple&&e.code==="KeyA"&&i){let o=this.visibleOptions().filter(r=>this.isValidOption(r)).map(r=>this.getOptionValue(r));this.updateModel(o,e),e.preventDefault();break}!i&&ZI(e.key)&&(this.searchOptions(e,e.key),e.preventDefault());break}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey();break;default:break}}onArrowDownKey(e){let i=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex(),i),this.changeFocusedOptionIndex(e,i),e.preventDefault()}onArrowUpKey(e){let i=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,i,this.startRangeIndex()),this.changeFocusedOptionIndex(e,i),e.preventDefault()}onArrowLeftKey(e,i=!1){i&&this.focusedOptionIndex.set(-1)}onHomeKey(e,i=!1){if(i)e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex.set(-1);else{let o=e.metaKey||e.ctrlKey,r=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&o&&this.onOptionSelectRange(e,r,this.startRangeIndex()),this.changeFocusedOptionIndex(e,r)}e.preventDefault()}onEndKey(e,i=!1){if(i){let o=e.currentTarget,r=o.value.length;o.setSelectionRange(r,r),this.focusedOptionIndex.set(-1)}else{let o=e.metaKey||e.ctrlKey,r=this.findLastOptionIndex();this.multiple&&e.shiftKey&&o&&this.onOptionSelectRange(e,this.startRangeIndex(),r),this.changeFocusedOptionIndex(e,r)}e.preventDefault()}onPageDownKey(e){this.scrollInView(0),e.preventDefault()}onPageUpKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onEnterKey(e){this.focusedOptionIndex()!==-1&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex()):this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()])),e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}onShiftKey(){let e=this.focusedOptionIndex();this.startRangeIndex.set(e)}getOptionGroupChildren(e){return this.optionGroupChildren?bs(e,this.optionGroupChildren):e.items}getOptionGroupLabel(e){return this.optionGroupLabel?bs(e,this.optionGroupLabel):e&&e.label!==void 0?e.label:e}getOptionLabel(e){return this.optionLabel?bs(e,this.optionLabel):e.label!=null?e.label:e}getOptionIndex(e,i){return this.virtualScrollerDisabled?e:i&&i.getItemOptions(e).index}getOptionValue(e){return this.optionValue?bs(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(i=>this.isOptionGroup(i)).length:e)+1}hasSelectedOption(){return Kr(this.modelValue())}isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group}changeFocusedOptionIndex(e,i){this.focusedOptionIndex()!==i&&(this.focusedOptionIndex.set(i),this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions()[i]))}searchOptions(e,i){this.searchValue=(this.searchValue||"")+i;let o=-1,r=!1;return this.focusedOptionIndex()!==-1?(o=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)),o=o===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)):o+this.focusedOptionIndex()):o=this.visibleOptions().findIndex(s=>this.isOptionMatched(s)),o!==-1&&(r=!0),o===-1&&this.focusedOptionIndex()===-1&&(o=this.findFirstFocusedOptionIndex()),o!==-1&&this.changeFocusedOptionIndex(e,o),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),r}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedOptionId,o=zo(this.listViewChild?.nativeElement,`li[id="${i}"]`);o?o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroll&&this.scroller.scrollToIndex(e!==-1?e:this.focusedOptionIndex())}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findLastOptionIndex(){return Gp(this.visibleOptions(),e=>this.isValidOption(e))}findFirstFocusedOptionIndex(){let e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findLastFocusedOptionIndex(){let e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findLastSelectedOptionIndex(){return this.hasSelectedOption()?Gp(this.visibleOptions(),e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let i=ethis.isValidOption(o)):-1;return i>-1?i+e+1:e}findNextSelectedOptionIndex(e){let i=this.hasSelectedOption()&&ethis.isValidSelectedOption(o)):-1;return i>-1?i+e+1:-1}findPrevSelectedOptionIndex(e){let i=this.hasSelectedOption()&&e>0?Gp(this.visibleOptions().slice(0,e),o=>this.isValidSelectedOption(o)):-1;return i>-1?i:-1}findFirstSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findPrevOptionIndex(e){let i=e>0?Gp(this.visibleOptions().slice(0,e),o=>this.isValidOption(o)):-1;return i>-1?i:e}findSelectedOptionIndex(){if(this.$filled)if(this.multiple)for(let e=this.modelValue().length-1;e>=0;e--){let i=this.modelValue()[e],o=this.visibleOptions().findIndex(r=>this.isValidSelectedOption(r)&&this.isEquals(i,this.getOptionValue(r)));if(o>-1)return o}else return this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e));return-1}findNearestSelectedOptionIndex(e,i=!1){let o=-1;return this.hasSelectedOption()&&(i?(o=this.findPrevSelectedOptionIndex(e),o=o===-1?this.findNextSelectedOptionIndex(e):o):(o=this.findNextSelectedOptionIndex(e),o=o===-1?this.findPrevSelectedOptionIndex(e):o)),o>-1?o:e}equalityKey(){return this.optionValue?null:this.dataKey}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}isOptionDisabled(e){return SK(this.optionDisabled)?this.optionDisabled(e):this.optionDisabled?bs(e,this.optionDisabled):!1}isEquals(e,i){return Sc(e,i,this.equalityKey())}isSelected(e){let i=this.getOptionValue(e);return this.multiple?(this.modelValue()||[]).some(o=>this.isEquals(o,i)):this.isEquals(this.modelValue(),i)}isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isEmpty(){return!this._options()?.length||!this.visibleOptions()?.length}hasFilter(){return this._filterValue()&&this._filterValue().trim().length>0}resetFilter(){this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this._filterValue.set(null)}drop(e){e&&this.onDrop.emit(e)}writeControlValue(e,i){this.value=e,i(this.value),this.cd.markForCheck()}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(_e(fy))};static \u0275cmp=ne({type:t,selectors:[["p-listbox"],["p-listBox"],["p-list-box"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,DK,5),xt(r,AK,5),xt(r,xPt,4),xt(r,wPt,4),xt(r,SPt,4),xt(r,Y3e,4),xt(r,TPt,4),xt(r,IPt,4),xt(r,EPt,4),xt(r,DPt,4),xt(r,APt,4),xt(r,kPt,4),xt(r,MPt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.headerFacet=s.first),Le(s=Ne())&&(o.footerFacet=s.first),Le(s=Ne())&&(o.itemTemplate=s.first),Le(s=Ne())&&(o.groupTemplate=s.first),Le(s=Ne())&&(o.headerTemplate=s.first),Le(s=Ne())&&(o.filterTemplate=s.first),Le(s=Ne())&&(o.footerTemplate=s.first),Le(s=Ne())&&(o.emptyFilterTemplate=s.first),Le(s=Ne())&&(o.emptyTemplate=s.first),Le(s=Ne())&&(o.filterIconTemplate=s.first),Le(s=Ne())&&(o.checkIconTemplate=s.first),Le(s=Ne())&&(o.checkmarkTemplate=s.first),Le(s=Ne())&&(o.loaderTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(OPt,5),Ri(Y3e,5),Ri(RPt,5),Ri(FPt,5),Ri(PPt,5),Ri(LPt,5),Ri(NPt,5)),i&2){let r;Le(r=Ne())&&(o.headerCheckboxViewChild=r.first),Le(r=Ne())&&(o.filterViewChild=r.first),Le(r=Ne())&&(o.lastHiddenFocusableElement=r.first),Le(r=Ne())&&(o.firstHiddenFocusableElement=r.first),Le(r=Ne())&&(o.scroller=r.first),Le(r=Ne())&&(o.listViewChild=r.first),Le(r=Ne())&&(o.containerViewChild=r.first)}},hostVars:3,hostBindings:function(i,o){i&1&&ie("focusout",function(s){return o.onHostFocusOut(s)}),i&2&&(Ge("id",o.id),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{id:"id",searchMessage:"searchMessage",emptySelectionMessage:"emptySelectionMessage",selectionMessage:"selectionMessage",autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",je],ariaLabel:"ariaLabel",selectOnFocus:[2,"selectOnFocus","selectOnFocus",je],searchLocale:[2,"searchLocale","searchLocale",je],focusOnHover:[2,"focusOnHover","focusOnHover",je],filterMessage:"filterMessage",filterFields:"filterFields",lazy:[2,"lazy","lazy",je],virtualScroll:[2,"virtualScroll","virtualScroll",je],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",ln],virtualScrollOptions:"virtualScrollOptions",scrollHeight:"scrollHeight",tabindex:[2,"tabindex","tabindex",ln],multiple:[2,"multiple","multiple",je],styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:[2,"readonly","readonly",je],checkbox:[2,"checkbox","checkbox",je],filter:[2,"filter","filter",je],filterBy:"filterBy",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:[2,"metaKeySelection","metaKeySelection",je],dataKey:"dataKey",showToggleAll:[2,"showToggleAll","showToggleAll",je],optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:[2,"group","group",je],options:"options",filterValue:"filterValue",selectAll:"selectAll",striped:[2,"striped","striped",je],highlightOnSelect:[2,"highlightOnSelect","highlightOnSelect",je],checkmark:[2,"checkmark","checkmark",je],dragdrop:[2,"dragdrop","dragdrop",je],fluid:[1,"fluid"]},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onSelectAllChange:"onSelectAllChange",onLazyLoad:"onLazyLoad",onDrop:"onDrop"},features:[jt([qLt,Q3e,{provide:JQ,useValue:{zIndex:1200}}]),ft],ngContentSelectors:VPt,decls:15,vars:15,consts:[["firstHiddenFocusableElement",""],["container",""],["lastHiddenFocusableElement",""],["builtInFilterElement",""],["headerchkbox",""],["icon",""],["filterInput",""],["emptyFilter",""],["empty",""],["buildInItems",""],["scroller",""],["content",""],["loader",""],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus","tabindex"],[3,"class",4,"ngIf"],[3,"ngStyle"],["cdkDropList","",3,"class","cdkDropListData"],[4,"ngIf"],["role","status","aria-live","polite","class","p-hidden-accessible",4,"ngIf"],["role","status","aria-live","polite",1,"p-hidden-accessible"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"class","ngModel","disabled","tabindex","variant","binary","onChange",4,"ngIf"],[4,"ngIf","ngIfElse"],[3,"onChange","ngModel","disabled","tabindex","variant","binary"],["role","status",1,"p-hidden-accessible"],["pInputText","","type","text","role","searchbox",3,"input","keydown","blur","value"],["data-p-icon","search",4,"ngIf"],["data-p-icon","search"],[4,"ngTemplateOutlet"],["cdkDropList","",3,"cdkDropListDropped","cdkDropListData"],[3,"items","style","itemSize","autoSize","lazy","options","tabindex","onLazyLoad",4,"ngIf"],[3,"onLazyLoad","items","itemSize","autoSize","lazy","options","tabindex"],["role","listbox","cdkDropList","",3,"focus","blur","keydown","cdkDropListDropped","id","tabindex","ngClass","cdkDropListData"],["ngFor","",3,"ngForOf"],["role","option","cdkDrag","",3,"ngStyle","cdkDragData","cdkDragDisabled"],["pRipple","","role","option","cdkDrag","",3,"click","dblclick","mousedown","mouseenter","touchend","ngStyle","cdkDragData","cdkDragDisabled"],[3,"class","ngModel","readonly","disabled","tabindex","variant","binary",4,"ngIf"],[3,"ngModel","readonly","disabled","tabindex","variant","binary"],["data-p-icon","blank",3,"class",4,"ngIf"],["data-p-icon","check",3,"class",4,"ngIf"],["data-p-icon","blank"],["data-p-icon","check"]],template:function(i,o){if(i&1){let r=tt();Nn(BPt),k(0,"span",13,0),ie("focus",function(d){return se(r),ae(o.onFirstHiddenFocus(d))}),D(),ee(2,$Pt,3,7,"div",14)(3,rLt,5,5,"div",14),k(4,"div",15,1),qe(6,cLt,3,5,"div",16)(7,hLt,3,5,"div",16)(8,zLt,4,2),D(),ee(9,HLt,3,5,"div",17)(10,jLt,2,1,"span",18),k(11,"span",19),Q(12),D(),k(13,"span",13,2),ie("focus",function(d){return se(r),ae(o.onLastHiddenFocus(d))}),D()}i&2&&(E("tabindex",o.$disabled()?-1:o.tabindex),Ge("data-p-hidden-focusable",!0),T(2),E("ngIf",o.headerFacet||o.headerTemplate||o._headerTemplate),T(),E("ngIf",o.checkbox&&o.multiple&&o.showToggleAll||o.filter),T(),Oe(o.cn(o.cx("listContainer"),o.listStyleClass)),Ir("max-height",o.virtualScroll?"auto":o.scrollHeight||"auto"),E("ngStyle",o.listStyle),T(2),Ke(o.hasFilter()&&o.isEmpty()?6:!o.hasFilter()&&o.isEmpty()?7:8),T(3),E("ngIf",o.footerFacet||o.footerTemplate||o._footerTemplate),T(),E("ngIf",o.isEmpty()),T(2),Qi(" ",o.selectedMessageText," "),T(),E("tabindex",o.$disabled()?-1:o.tabindex),Ge("data-p-hidden-focusable",!0))},dependencies:[On,Ns,Gc,Fr,Lo,vs,Ul,Ym,lx,JI,dg,sx,ax,fu,BK,hr,no,Lr,In,eZ,q3e,G3e],encapsulation:2,changeDetection:0})}return t})();var J3e=` .p-picklist { display: flex; gap: dt('picklist.gap'); } .p-picklist-controls { display: flex; flex-direction: column; justify-content: center; gap: dt('picklist.controls.gap'); } .p-picklist-list-container { flex: 1 1 50%; } .p-picklist .p-listbox { height: 100%; } `;var KLt=["item"],WLt=["sourceHeader"],YLt=["targetHeader"],eBe=["sourceFilter"],tBe=["targetFilter"],QLt=["emptymessagesource"],ZLt=["emptyfiltermessagesource"],XLt=["emptymessagetarget"],JLt=["emptyfiltermessagetarget"],eNt=["moveupicon"],tNt=["movetopicon"],iNt=["movedownicon"],nNt=["movebottomicon"],oNt=["movetotargeticon"],rNt=["movealltotargeticon"],sNt=["movetosourceicon"],aNt=["movealltosourceicon"],lNt=["targetfiltericon"],cNt=["sourcefiltericon"],dNt=["sourcelist"],uNt=["targetlist"],iZ=t=>({$implicit:t}),nBe=t=>({options:t}),oBe=(t,n,e,i)=>({$implicit:t,index:n,selected:e,disabled:i});function pNt(t,n){t&1&&(si(),ce(0,"svg",18)),t&2&&Ge("data-pc-section","moveupicon")}function hNt(t,n){}function mNt(t,n){t&1&&ee(0,hNt,0,0,"ng-template")}function fNt(t,n){t&1&&(si(),ce(0,"svg",19)),t&2&&Ge("data-pc-section","movetopicon")}function gNt(t,n){}function _Nt(t,n){t&1&&ee(0,gNt,0,0,"ng-template")}function yNt(t,n){t&1&&(si(),ce(0,"svg",20)),t&2&&Ge("data-pc-section","movedownicon")}function vNt(t,n){}function bNt(t,n){t&1&&ee(0,vNt,0,0,"ng-template")}function CNt(t,n){t&1&&(si(),ce(0,"svg",21)),t&2&&Ge("data-pc-section","movebottomicon")}function xNt(t,n){}function wNt(t,n){t&1&&ee(0,xNt,0,0,"ng-template")}function SNt(t,n){if(t&1){let e=tt();k(0,"div")(1,"button",11),ie("click",function(){se(e);let o=P(),r=ti(4);return ae(o.moveUp(r,o.source,o.selectedItemsSource,o.onSourceReorder,o.SOURCE_LIST))}),ee(2,pNt,1,1,"svg",13)(3,mNt,1,0,null,14),D(),k(4,"button",11),ie("click",function(){se(e);let o=P(),r=ti(4);return ae(o.moveTop(r,o.source,o.selectedItemsSource,o.onSourceReorder,o.SOURCE_LIST))}),ee(5,fNt,1,1,"svg",15)(6,_Nt,1,0,null,14),D(),k(7,"button",11),ie("click",function(){se(e);let o=P(),r=ti(4);return ae(o.moveDown(r,o.source,o.selectedItemsSource,o.onSourceReorder,o.SOURCE_LIST))}),ee(8,yNt,1,1,"svg",16)(9,bNt,1,0,null,14),D(),k(10,"button",11),ie("click",function(){se(e);let o=P(),r=ti(4);return ae(o.moveBottom(r,o.source,o.selectedItemsSource,o.onSourceReorder,o.SOURCE_LIST))}),ee(11,CNt,1,1,"svg",17)(12,wNt,1,0,null,14),D()()}if(t&2){let e=P();Oe(e.cx("sourceControls")),Ge("data-pc-section","sourceControls")("data-pc-group-section","controls"),T(),E("disabled",e.sourceMoveDisabled())("buttonProps",e.getButtonProps("moveup")),Ge("aria-label",e.moveUpAriaLabel)("data-pc-section","sourceMoveUpButton"),T(),E("ngIf",!e.moveUpIconTemplate&&!e._moveUpIconTemplate),T(),E("ngTemplateOutlet",e.moveUpIconTemplate||e._moveUpIconTemplate),T(),E("disabled",e.sourceMoveDisabled())("buttonProps",e.getButtonProps("movetop")),Ge("aria-label",e.moveTopAriaLabel)("data-pc-section","sourceMoveTopButton"),T(),E("ngIf",!e.moveTopIconTemplate&&!e._moveTopIconTemplate),T(),E("ngTemplateOutlet",e.moveTopIconTemplate||e._moveTopIconTemplate),T(),E("disabled",e.sourceMoveDisabled())("buttonProps",e.getButtonProps("movedown")),Ge("aria-label",e.moveDownAriaLabel)("data-pc-section","sourceMoveDownButton"),T(),E("ngIf",!e.moveDownIconTemplate&&!e._moveDownIconTemplate),T(),E("ngTemplateOutlet",e.moveDownIconTemplate||e._moveDownIconTemplate),T(),E("disabled",e.sourceMoveDisabled())("buttonProps",e.getButtonProps("movebottom")),Ge("aria-label",e.moveBottomAriaLabel)("data-pc-section","sourceMoveBottomButton"),T(),E("ngIf",!e.moveBottomIconTemplate||e._moveBottomIconTemplate),T(),E("ngTemplateOutlet",e.moveBottomIconTemplate||e._moveBottomIconTemplate)}}function TNt(t,n){if(t&1&&(k(0,"div"),Q(1),D()),t&2){let e=P(3);T(),dt(e.sourceHeader)}}function INt(t,n){}function ENt(t,n){t&1&&ee(0,INt,0,0,"ng-template")}function DNt(t,n){if(t&1&&ee(0,TNt,2,1,"div",10)(1,ENt,1,0,null,14),t&2){let e=P(2);E("ngIf",!e.sourceHeaderTemplate&&!e._sourceHeaderTemplate),T(),E("ngTemplateOutlet",e.sourceHeaderTemplate||e._sourceHeaderTemplate)}}function ANt(t,n){t&1&&(Di(0),ee(1,DNt,2,2,"ng-template",null,2,Pt),Ai())}function kNt(t,n){}function MNt(t,n){t&1&&ee(0,kNt,0,0,"ng-template")}function ONt(t,n){if(t&1&&ee(0,MNt,1,0,null,12),t&2){let e=P(2);E("ngTemplateOutlet",e.sourceFilterTemplate||e._sourceFilterTemplate)("ngTemplateOutletContext",ki(2,nBe,e.sourceFilterOptions))}}function RNt(t,n){t&1&&(Di(0),ee(1,ONt,1,4,"ng-template",null,3,Pt),Ai())}function FNt(t,n){t&1&&ui(0)}function PNt(t,n){if(t&1&&(Di(0),ee(1,FNt,1,0,"ng-container",14),Ai()),t&2){let e=P();T(),E("ngTemplateOutlet",e.sourceFilterIconTemplate||e._sourceFilterIconTemplate)}}function LNt(t,n){t&1&&ui(0)}function NNt(t,n){if(t&1&&ee(0,LNt,1,0,"ng-container",12),t&2){let e=n.$implicit,i=n.index,o=n.selected,r=n.disabled,s=P(2);E("ngTemplateOutlet",s.itemTemplate||s._itemTemplate)("ngTemplateOutletContext",Sv(2,oBe,e,i,o,r))}}function BNt(t,n){t&1&&(Di(0),ee(1,NNt,1,7,"ng-template",null,4,Pt),Ai())}function VNt(t,n){t&1&&ui(0)}function zNt(t,n){if(t&1&&ee(0,VNt,1,0,"ng-container",14),t&2){let e=P(2);E("ngTemplateOutlet",e.emptyMessageSourceTemplate||e._emptyMessageSourceTemplate)}}function UNt(t,n){t&1&&(Di(0),ee(1,zNt,1,1,"ng-template",null,5,Pt),Ai())}function HNt(t,n){t&1&&ui(0)}function jNt(t,n){if(t&1&&ee(0,HNt,1,0,"ng-container",14),t&2){let e=P(2);E("ngTemplateOutlet",e.emptyFilterMessageSourceTemplate||e._emptyFilterMessageSourceTemplate)}}function GNt(t,n){t&1&&(Di(0),ee(1,jNt,1,1,"ng-template",null,6,Pt),Ai())}function $Nt(t,n){t&1&&(si(),ce(0,"svg",23)),t&2&&Ge("data-pc-section","movetotargeticon")}function qNt(t,n){t&1&&(si(),ce(0,"svg",20)),t&2&&Ge("data-pc-section","movetotargeticon")}function KNt(t,n){if(t&1&&(Di(0),ee(1,$Nt,1,1,"svg",22)(2,qNt,1,1,"svg",16),Ai()),t&2){let e=P();T(),E("ngIf",!e.viewChanged),T(),E("ngIf",e.viewChanged)}}function WNt(t,n){}function YNt(t,n){t&1&&ee(0,WNt,0,0,"ng-template")}function QNt(t,n){t&1&&(si(),ce(0,"svg",25)),t&2&&Ge("data-pc-section","movealltotargeticon")}function ZNt(t,n){t&1&&(si(),ce(0,"svg",21)),t&2&&Ge("data-pc-section","movealltotargeticon")}function XNt(t,n){if(t&1&&(Di(0),ee(1,QNt,1,1,"svg",24)(2,ZNt,1,1,"svg",17),Ai()),t&2){let e=P();T(),E("ngIf",!e.viewChanged),T(),E("ngIf",e.viewChanged)}}function JNt(t,n){}function e3t(t,n){t&1&&ee(0,JNt,0,0,"ng-template")}function t3t(t,n){t&1&&(si(),ce(0,"svg",27)),t&2&&Ge("data-pc-section","movedownsourceticon")}function i3t(t,n){t&1&&(si(),ce(0,"svg",18)),t&2&&Ge("data-pc-section","movedownsourceticon")}function n3t(t,n){if(t&1&&(Di(0),ee(1,t3t,1,1,"svg",26)(2,i3t,1,1,"svg",13),Ai()),t&2){let e=P();T(),E("ngIf",!e.viewChanged),T(),E("ngIf",e.viewChanged)}}function o3t(t,n){}function r3t(t,n){t&1&&ee(0,o3t,0,0,"ng-template")}function s3t(t,n){t&1&&(si(),ce(0,"svg",29)),t&2&&Ge("data-pc-section","movealltosourceticon")}function a3t(t,n){t&1&&(si(),ce(0,"svg",19)),t&2&&Ge("data-pc-section","movealltosourceticon")}function l3t(t,n){if(t&1&&(Di(0),ee(1,s3t,1,1,"svg",28)(2,a3t,1,1,"svg",15),Ai()),t&2){let e=P();T(),E("ngIf",!e.viewChanged),T(),E("ngIf",e.viewChanged)}}function c3t(t,n){}function d3t(t,n){t&1&&ee(0,c3t,0,0,"ng-template")}function u3t(t,n){if(t&1&&(k(0,"div"),Q(1),D()),t&2){let e=P(3);T(),dt(e.targetHeader)}}function p3t(t,n){}function h3t(t,n){t&1&&ee(0,p3t,0,0,"ng-template")}function m3t(t,n){if(t&1&&ee(0,u3t,2,1,"div",10)(1,h3t,1,0,null,14),t&2){let e=P(2);E("ngIf",!e.targetHeaderTemplate&&!e._targetHeaderTemplate),T(),E("ngTemplateOutlet",e.targetHeaderTemplate||e._targetHeaderTemplate)}}function f3t(t,n){t&1&&(Di(0),ee(1,m3t,2,2,"ng-template",null,2,Pt),Ai())}function g3t(t,n){}function _3t(t,n){t&1&&ee(0,g3t,0,0,"ng-template")}function y3t(t,n){if(t&1&&ee(0,_3t,1,0,null,12),t&2){let e=P(2);E("ngTemplateOutlet",e.targetFilterTemplate||e._targetFilterTemplate)("ngTemplateOutletContext",ki(2,nBe,e.targetFilterOptions))}}function v3t(t,n){t&1&&(Di(0),ee(1,y3t,1,4,"ng-template",null,3,Pt),Ai())}function b3t(t,n){t&1&&ui(0)}function C3t(t,n){if(t&1&&(Di(0),ee(1,b3t,1,0,"ng-container",14),Ai()),t&2){let e=P();T(),E("ngTemplateOutlet",e.targetFilterIconTemplate||e._targetFilterIconTemplate)}}function x3t(t,n){t&1&&ui(0)}function w3t(t,n){if(t&1&&ee(0,x3t,1,0,"ng-container",12),t&2){let e=n.$implicit,i=n.index,o=n.selected,r=n.disabled,s=P(2);E("ngTemplateOutlet",s.itemTemplate||s._itemTemplate)("ngTemplateOutletContext",Sv(2,oBe,e,i,o,r))}}function S3t(t,n){t&1&&(Di(0),ee(1,w3t,1,7,"ng-template",null,4,Pt),Ai())}function T3t(t,n){t&1&&ui(0)}function I3t(t,n){if(t&1&&ee(0,T3t,1,0,"ng-container",14),t&2){let e=P(2);E("ngTemplateOutlet",e.emptyMessageTargetTemplate||e._emptyMessageTargetTemplate)}}function E3t(t,n){t&1&&(Di(0),ee(1,I3t,1,1,"ng-template",null,5,Pt),Ai())}function D3t(t,n){t&1&&ui(0)}function A3t(t,n){if(t&1&&ee(0,D3t,1,0,"ng-container",14),t&2){let e=P(2);E("ngTemplateOutlet",e.emptyFilterMessageTargetTemplate||e._emptyFilterMessageTargetTemplate)}}function k3t(t,n){t&1&&(Di(0),ee(1,A3t,1,1,"ng-template",null,6,Pt),Ai())}function M3t(t,n){t&1&&(si(),ce(0,"svg",18)),t&2&&Ge("data-pc-section","moveupicon")}function O3t(t,n){}function R3t(t,n){t&1&&ee(0,O3t,0,0,"ng-template")}function F3t(t,n){t&1&&(si(),ce(0,"svg",19)),t&2&&Ge("data-pc-section","movetopicon")}function P3t(t,n){}function L3t(t,n){t&1&&ee(0,P3t,0,0,"ng-template")}function N3t(t,n){t&1&&(si(),ce(0,"svg",20)),t&2&&Ge("data-pc-section","movedownicon")}function B3t(t,n){}function V3t(t,n){t&1&&ee(0,B3t,0,0,"ng-template")}function z3t(t,n){t&1&&(si(),ce(0,"svg",21)),t&2&&Ge("data-pc-section","movebottomicon")}function U3t(t,n){}function H3t(t,n){t&1&&ee(0,U3t,0,0,"ng-template")}function j3t(t,n){if(t&1){let e=tt();k(0,"div")(1,"button",30),ie("click",function(){se(e);let o=P(),r=ti(26);return ae(o.moveUp(r,o.target,o.selectedItemsTarget,o.onTargetReorder,o.TARGET_LIST))}),ee(2,M3t,1,1,"svg",13)(3,R3t,1,0,null,14),D(),k(4,"button",11),ie("click",function(){se(e);let o=P(),r=ti(26);return ae(o.moveTop(r,o.target,o.selectedItemsTarget,o.onTargetReorder,o.TARGET_LIST))}),ee(5,F3t,1,1,"svg",15)(6,L3t,1,0,null,14),D(),k(7,"button",11),ie("click",function(){se(e);let o=P(),r=ti(26);return ae(o.moveDown(r,o.target,o.selectedItemsTarget,o.onTargetReorder,o.TARGET_LIST))}),ee(8,N3t,1,1,"svg",16)(9,V3t,1,0,null,14),D(),k(10,"button",11),ie("click",function(){se(e);let o=P(),r=ti(26);return ae(o.moveBottom(r,o.target,o.selectedItemsTarget,o.onTargetReorder,o.TARGET_LIST))}),ee(11,z3t,1,1,"svg",17)(12,H3t,1,0,null,14),D()()}if(t&2){let e=P();Oe(e.cx("targetControls")),Ge("data-pc-section","targetControls")("data-pc-group-section","controls"),T(),E("disabled",e.targetMoveDisabled())("buttonProps",e.getButtonProps("moveup")),Ge("aria-label",e.moveUpAriaLabel)("data-pc-section","targetMoveUpButton"),T(),E("ngIf",!e.moveUpIconTemplate&&!e._moveUpIconTemplate),T(),E("ngTemplateOutlet",e.moveUpIconTemplate||e._moveUpIconTemplate),T(),E("disabled",e.targetMoveDisabled())("buttonProps",e.getButtonProps("movetop")),Ge("aria-label",e.moveTopAriaLabel)("data-pc-section","targetMoveTopButton"),T(),E("ngIf",!e.moveTopIconTemplate&&!e._moveTopIconTemplate),T(),E("ngTemplateOutlet",e.moveTopIconTemplate||e.moveTopIconTemplate),T(),E("disabled",e.targetMoveDisabled())("buttonProps",e.getButtonProps("movedown")),Ge("aria-label",e.moveDownAriaLabel)("data-pc-section","targetMoveDownButton"),T(),E("ngIf",!e.moveDownIconTemplate&&!e._moveDownIconTemplate),T(),E("ngTemplateOutlet",e.moveDownIconTemplate||e._moveDownIconTemplate),T(),E("disabled",e.targetMoveDisabled())("buttonProps",e.getButtonProps("movebottom")),Ge("aria-label",e.moveBottomAriaLabel)("data-pc-section","targetMoveBottomButton"),T(),E("ngIf",!e.moveBottomIconTemplate&&!e._moveBottomIconTemplate),T(),E("ngTemplateOutlet",e.moveBottomIconTemplate||e._moveBottomIconTemplate)}}var G3t={root:()=>["p-picklist p-component"],sourceControls:"p-picklist-controls p-picklist-source-controls",sourceListContainer:"p-picklist-list-container p-picklist-source-list-container",transferControls:"p-picklist-controls p-picklist-transfer-controls",targetListContainer:"p-picklist-list-container p-picklist-target-list-container",targetControls:"p-picklist-controls p-picklist-target-controls"},iBe=(()=>{class t extends io{name="picklist";theme=J3e;classes=G3t;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var rBe=(()=>{class t extends oo{source;target;sourceHeader;tabindex=0;rightButtonAriaLabel;leftButtonAriaLabel;allRightButtonAriaLabel;allLeftButtonAriaLabel;upButtonAriaLabel;downButtonAriaLabel;topButtonAriaLabel;bottomButtonAriaLabel;sourceAriaLabel;targetAriaLabel;targetHeader;responsive;filterBy;filterLocale;trackBy=(e,i)=>i;sourceTrackBy;targetTrackBy;showSourceFilter=!0;showTargetFilter=!0;metaKeySelection=!1;dragdrop=!1;style;styleClass;sourceStyle;targetStyle;showSourceControls=!0;showTargetControls=!0;sourceFilterPlaceholder;targetFilterPlaceholder;disabled;sourceOptionDisabled;targetOptionDisabled;ariaSourceFilterLabel;ariaTargetFilterLabel;filterMatchMode="contains";stripedRows;keepSelection=!1;scrollHeight="14rem";autoOptionFocus=!0;buttonProps={severity:"secondary"};moveUpButtonProps;moveTopButtonProps;moveDownButtonProps;moveBottomButtonProps;moveToTargetProps;moveAllToTargetProps;moveToSourceProps;moveAllToSourceProps;get breakpoint(){return this._breakpoint}set breakpoint(e){e!==this._breakpoint&&(this._breakpoint=e,ps(this.platformId)&&(this.destroyMedia(),this.initMedia()))}onMoveToSource=new ve;onMoveAllToSource=new ve;onMoveAllToTarget=new ve;onMoveToTarget=new ve;onSourceReorder=new ve;onTargetReorder=new ve;onSourceSelect=new ve;onTargetSelect=new ve;onSourceFilter=new ve;onTargetFilter=new ve;onFocus=new ve;onBlur=new ve;listViewSourceChild;listViewTargetChild;sourceFilterViewChild;targetFilterViewChild;getButtonProps(e){switch(e){case"moveup":return be(be({},this.buttonProps),this.moveUpButtonProps);case"movetop":return be(be({},this.buttonProps),this.moveTopButtonProps);case"movedown":return be(be({},this.buttonProps),this.moveDownButtonProps);case"movebottom":return be(be({},this.buttonProps),this.moveBottomButtonProps);case"movetotarget":return be(be({},this.buttonProps),this.moveToTargetProps);case"movealltotarget":return be(be({},this.buttonProps),this.moveAllToTargetProps);case"movetosource":return be(be({},this.buttonProps),this.moveToSourceProps);case"movealltosource":return be(be({},this.buttonProps),this.moveAllToSourceProps);default:return this.buttonProps}}get moveUpAriaLabel(){return this.upButtonAriaLabel?this.upButtonAriaLabel:this.config.translation.aria?this.config.translation.aria.moveUp:void 0}get moveTopAriaLabel(){return this.topButtonAriaLabel?this.topButtonAriaLabel:this.config.translation.aria?this.config.translation.aria.moveTop:void 0}get moveDownAriaLabel(){return this.downButtonAriaLabel?this.downButtonAriaLabel:this.config.translation.aria?this.config.translation.aria.moveDown:void 0}get moveBottomAriaLabel(){return this.bottomButtonAriaLabel?this.bottomButtonAriaLabel:this.config.translation.aria?this.config.translation.aria.moveDown:void 0}get moveToTargetAriaLabel(){return this.rightButtonAriaLabel?this.rightButtonAriaLabel:this.config.translation.aria?this.config.translation.aria.moveToTarget:void 0}get moveAllToTargetAriaLabel(){return this.allRightButtonAriaLabel?this.allRightButtonAriaLabel:this.config.translation.aria?this.config.translation.aria.moveAllToTarget:void 0}get moveToSourceAriaLabel(){return this.leftButtonAriaLabel?this.leftButtonAriaLabel:this.config.translation.aria?this.config.translation.aria.moveToSource:void 0}get moveAllToSourceAriaLabel(){return this.allLeftButtonAriaLabel?this.allLeftButtonAriaLabel:this.config.translation.aria?this.config.translation.aria.moveAllToSource:void 0}get idSource(){return this.id+"_source"}get idTarget(){return this.id+"_target"}_breakpoint="960px";visibleOptionsSource;visibleOptionsTarget;selectedItemsSource=[];selectedItemsTarget=[];reorderedListElement;movedUp;movedDown;itemTouched;styleElement;id=Vr("pn_id_");filterValueSource;filterValueTarget;fromListType;sourceFilterOptions;targetFilterOptions;SOURCE_LIST=-1;TARGET_LIST=1;window;media;viewChanged;_componentStyle=re(iBe);mediaChangeListener;filterService=re(fy);ngOnInit(){super.ngOnInit(),this.responsive&&(this.createStyle(),this.initMedia()),this.filterBy&&(this.sourceFilterOptions={filter:e=>this.filterSource(e),reset:()=>this.resetSourceFilter()},this.targetFilterOptions={filter:e=>this.filterTarget(e),reset:()=>this.resetTargetFilter()})}itemTemplate;sourceHeaderTemplate;targetHeaderTemplate;sourceFilterTemplate;targetFilterTemplate;emptyMessageSourceTemplate;emptyFilterMessageSourceTemplate;emptyMessageTargetTemplate;emptyFilterMessageTargetTemplate;moveUpIconTemplate;moveTopIconTemplate;moveDownIconTemplate;moveBottomIconTemplate;moveToTargetIconTemplate;moveAllToTargetIconTemplate;moveToSourceIconTemplate;moveAllToSourceIconTemplate;targetFilterIconTemplate;sourceFilterIconTemplate;templates;_itemTemplate;_sourceHeaderTemplate;_targetHeaderTemplate;_sourceFilterTemplate;_targetFilterTemplate;_emptyMessageSourceTemplate;_emptyFilterMessageSourceTemplate;_emptyMessageTargetTemplate;_emptyFilterMessageTargetTemplate;_moveUpIconTemplate;_moveTopIconTemplate;_moveDownIconTemplate;_moveBottomIconTemplate;_moveToTargetIconTemplate;_moveAllToTargetIconTemplate;_moveToSourceIconTemplate;_moveAllToSourceIconTemplate;_targetFilterIconTemplate;_sourceFilterIconTemplate;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break;case"option":this._itemTemplate=e.template;break;case"sourceHeader":this._sourceHeaderTemplate=e.template;break;case"targetHeader":this._targetHeaderTemplate=e.template;break;case"sourceFilter":this._sourceFilterTemplate=e.template;break;case"targetFilter":this._targetFilterTemplate=e.template;break;case"emptymessagesource":this._emptyMessageSourceTemplate=e.template;break;case"emptyfiltermessagesource":this._emptyFilterMessageSourceTemplate=e.template;break;case"emptymessagetarget":this._emptyMessageTargetTemplate=e.template;break;case"emptyfiltermessagetarget":this._emptyFilterMessageTargetTemplate=e.template;break;case"moveupicon":this._moveUpIconTemplate=e.template;break;case"movetopicon":this._moveTopIconTemplate=e.template;break;case"movedownicon":this._moveDownIconTemplate=e.template;break;case"movebottomicon":this._moveBottomIconTemplate=e.template;break;case"movetotargeticon":this._moveToTargetIconTemplate=e.template;break;case"movealltotargeticon":this._moveAllToTargetIconTemplate=e.template;break;case"movetosourceicon":this._moveToSourceIconTemplate=e.template;break;case"movealltosourceicon":this._moveAllToSourceIconTemplate=e.template;break;case"targetfiltericon":this._targetFilterIconTemplate=e.template;break;case"sourcefiltericon":this._sourceFilterIconTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}onChangeSelection(e,i){this.setSelectionList(i,e.value),(i===this.SOURCE_LIST?this.onSourceSelect:this.onTargetSelect).emit({originalEvent:e.originalEvent,items:e.value})}onSourceItemDblClick(){this.disabled||(this.moveRight(),this.triggerChangeDetection())}onTargetItemDblClick(){this.disabled||(this.moveLeft(),this.triggerChangeDetection())}onFilter(e,i){let o=e.target.value;i===this.SOURCE_LIST?this.filterSource(o):i===this.TARGET_LIST&&this.filterTarget(o)}filterSource(e=""){this.filterValueSource=e.trim().toLocaleLowerCase(this.filterLocale),this.filter(this.source,this.SOURCE_LIST),this.onSourceFilter.emit({query:this.filterValueSource,value:this.visibleOptionsSource})}filterTarget(e=""){this.filterValueTarget=e.trim().toLocaleLowerCase(this.filterLocale),this.filter(this.target,this.TARGET_LIST),this.onTargetFilter.emit({query:this.filterValueTarget,value:this.visibleOptionsTarget})}filter(e,i){let o=this.filterBy.split(",");i===this.SOURCE_LIST?(this.visibleOptionsSource=this.filterService.filter(e,o,this.filterValueSource,this.filterMatchMode,this.filterLocale),this.onSourceFilter.emit({query:this.filterValueSource,value:this.visibleOptionsSource})):i===this.TARGET_LIST&&(this.visibleOptionsTarget=this.filterService.filter(e,o,this.filterValueTarget,this.filterMatchMode,this.filterLocale),this.onTargetFilter.emit({query:this.filterValueTarget,value:this.visibleOptionsTarget}))}isItemVisible(e,i){return i==this.SOURCE_LIST?this.isVisibleInList(this.visibleOptionsSource,e,this.filterValueSource):this.isVisibleInList(this.visibleOptionsTarget,e,this.filterValueTarget)}isEmpty(e){return e==this.SOURCE_LIST?this.filterValueSource?!this.visibleOptionsSource||this.visibleOptionsSource.length===0:!this.source||this.source.length===0:this.filterValueTarget?!this.visibleOptionsTarget||this.visibleOptionsTarget.length===0:!this.target||this.target.length===0}isVisibleInList(e,i,o){if(o&&o.trim().length){for(let r=0;rPd(o,i)-Pd(r,i))}triggerChangeDetection(){this.source=[...this.source],this.target=[...this.target]}moveUp(e,i,o,r,s){if(o&&o.length){o=this.sortByIndexInList(o,i);for(let d=0;d=0;d--){let m=o[d],v=Pd(m,i);if(v!=i.length-1){let w=i[v],O=i[v+1];i[v+1]=w,i[v]=O}else break}this.dragdrop&&(this.filterValueSource&&s===this.SOURCE_LIST||this.filterValueTarget&&s===this.TARGET_LIST)&&this.filter(i,s),this.movedDown=!0,this.reorderedListElement=e,r.emit({items:o}),this.triggerChangeDetection()}}moveBottom(e,i,o,r,s){if(o&&o.length){o=this.sortByIndexInList(o,i);for(let d=o.length-1;d>=0;d--){let m=o[d],v=Pd(m,i);if(v!=i.length-1){let w=i.splice(v,1)[0];i.push(w)}else break}this.dragdrop&&(this.filterValueSource&&s===this.SOURCE_LIST||this.filterValueTarget&&s===this.TARGET_LIST)&&this.filter(i,s),e.scrollTop=e.scrollHeight,r.emit({items:o}),this.triggerChangeDetection()}}moveRight(){if(this.selectedItemsSource&&this.selectedItemsSource.length){let e=[...this.selectedItemsSource];for(let i=0;ie.includes(r));return o!==void 0?e.indexOf(o):-1}getVisibleList(e){return e===this.SOURCE_LIST?this.visibleOptionsSource&&this.visibleOptionsSource.length>0?this.visibleOptionsSource:this.source&&this.source.length>0?this.source:null:this.visibleOptionsTarget&&this.visibleOptionsTarget.length>0?this.visibleOptionsTarget:this.target&&this.target.length>0?this.target:null}setSelectionList(e,i){e===this.SOURCE_LIST?this.selectedItemsSource=i:this.selectedItemsTarget=i}getDropIndexes(e,i,o,r,s){let d,m;return o===this.SOURCE_LIST?(d=r?this.filterValueTarget?Pd(s,this.target):e:this.filterValueSource?Pd(s,this.source):e,m=this.filterValueSource?this.findFilteredCurrentIndex(this.visibleOptionsSource,i,this.source):i):(d=r?this.filterValueSource?Pd(s,this.source):e:this.filterValueTarget?Pd(s,this.target):e,m=this.filterValueTarget?this.findFilteredCurrentIndex(this.visibleOptionsTarget,i,this.target):i),{previousIndex:d,currentIndex:m}}findFilteredCurrentIndex(e,i,o){return e.length===i?Pd(e[i-1],o)+1:Pd(e[i],o)}resetSourceFilter(){this.visibleOptionsSource=null,this.filterValueSource=null,this.sourceFilterViewChild&&(this.sourceFilterViewChild.nativeElement.value="")}resetTargetFilter(){this.visibleOptionsTarget=null,this.filterValueTarget=null,this.targetFilterViewChild&&(this.targetFilterViewChild.nativeElement.value="")}resetFilter(){this.resetSourceFilter(),this.resetTargetFilter()}initMedia(){ps(this.platformId)&&(this.media=this.document.defaultView.matchMedia(`(max-width: ${this.breakpoint})`),this.viewChanged=this.media.matches,this.bindMediaChangeListener())}destroyMedia(){this.unbindMediaChangeListener()}bindMediaChangeListener(){this.media&&!this.mediaChangeListener&&(this.mediaChangeListener=this.renderer.listen(this.media,"change",e=>{this.viewChanged=e.matches,this.cd.markForCheck()}))}unbindMediaChangeListener(){this.mediaChangeListener&&(this.mediaChangeListener(),this.mediaChangeListener=null)}createStyle(){if(ps(this.platformId)&&!this.styleElement){this.renderer.setAttribute(this.el.nativeElement.children[0],this.id,""),this.styleElement=this.renderer.createElement("style"),this.renderer.setAttribute(this.styleElement,"type","text/css"),Xv(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement);let e=` @media screen and (max-width: ${this.breakpoint}) { .p-picklist[${this.id}] { flex-direction: column; } .p-picklist[${this.id}] .p-picklist-controls { flex-direction: row; } }`;this.renderer.setProperty(this.styleElement,"innerHTML",e),Xv(this.styleElement,"nonce",this.config?.csp()?.nonce)}}sourceMoveDisabled(){if(this.disabled||!this.selectedItemsSource.length)return!0}targetMoveDisabled(){if(this.disabled||!this.selectedItemsTarget.length)return!0}moveRightDisabled(){return this.disabled||wc(this.selectedItemsSource)}moveLeftDisabled(){return this.disabled||wc(this.selectedItemsTarget)}moveAllRightDisabled(){return this.disabled||wc(this.source)}moveAllLeftDisabled(){return this.disabled||wc(this.target)}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.destroyStyle(),this.destroyMedia(),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-pickList"],["p-picklist"],["p-pick-list"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,KLt,4),xt(r,WLt,4),xt(r,YLt,4),xt(r,eBe,4),xt(r,tBe,4),xt(r,QLt,4),xt(r,ZLt,4),xt(r,XLt,4),xt(r,JLt,4),xt(r,eNt,4),xt(r,tNt,4),xt(r,iNt,4),xt(r,nNt,4),xt(r,oNt,4),xt(r,rNt,4),xt(r,sNt,4),xt(r,aNt,4),xt(r,lNt,4),xt(r,cNt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o.itemTemplate=s.first),Le(s=Ne())&&(o.sourceHeaderTemplate=s.first),Le(s=Ne())&&(o.targetHeaderTemplate=s.first),Le(s=Ne())&&(o.sourceFilterTemplate=s.first),Le(s=Ne())&&(o.targetFilterTemplate=s.first),Le(s=Ne())&&(o.emptyMessageSourceTemplate=s.first),Le(s=Ne())&&(o.emptyFilterMessageSourceTemplate=s.first),Le(s=Ne())&&(o.emptyMessageTargetTemplate=s.first),Le(s=Ne())&&(o.emptyFilterMessageTargetTemplate=s.first),Le(s=Ne())&&(o.moveUpIconTemplate=s.first),Le(s=Ne())&&(o.moveTopIconTemplate=s.first),Le(s=Ne())&&(o.moveDownIconTemplate=s.first),Le(s=Ne())&&(o.moveBottomIconTemplate=s.first),Le(s=Ne())&&(o.moveToTargetIconTemplate=s.first),Le(s=Ne())&&(o.moveAllToTargetIconTemplate=s.first),Le(s=Ne())&&(o.moveToSourceIconTemplate=s.first),Le(s=Ne())&&(o.moveAllToSourceIconTemplate=s.first),Le(s=Ne())&&(o.targetFilterIconTemplate=s.first),Le(s=Ne())&&(o.sourceFilterIconTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(dNt,5),Ri(uNt,5),Ri(eBe,5),Ri(tBe,5)),i&2){let r;Le(r=Ne())&&(o.listViewSourceChild=r.first),Le(r=Ne())&&(o.listViewTargetChild=r.first),Le(r=Ne())&&(o.sourceFilterViewChild=r.first),Le(r=Ne())&&(o.targetFilterViewChild=r.first)}},inputs:{source:"source",target:"target",sourceHeader:"sourceHeader",tabindex:[2,"tabindex","tabindex",ln],rightButtonAriaLabel:"rightButtonAriaLabel",leftButtonAriaLabel:"leftButtonAriaLabel",allRightButtonAriaLabel:"allRightButtonAriaLabel",allLeftButtonAriaLabel:"allLeftButtonAriaLabel",upButtonAriaLabel:"upButtonAriaLabel",downButtonAriaLabel:"downButtonAriaLabel",topButtonAriaLabel:"topButtonAriaLabel",bottomButtonAriaLabel:"bottomButtonAriaLabel",sourceAriaLabel:"sourceAriaLabel",targetAriaLabel:"targetAriaLabel",targetHeader:"targetHeader",responsive:[2,"responsive","responsive",je],filterBy:"filterBy",filterLocale:"filterLocale",trackBy:"trackBy",sourceTrackBy:"sourceTrackBy",targetTrackBy:"targetTrackBy",showSourceFilter:[2,"showSourceFilter","showSourceFilter",je],showTargetFilter:[2,"showTargetFilter","showTargetFilter",je],metaKeySelection:[2,"metaKeySelection","metaKeySelection",je],dragdrop:[2,"dragdrop","dragdrop",je],style:"style",styleClass:"styleClass",sourceStyle:"sourceStyle",targetStyle:"targetStyle",showSourceControls:[2,"showSourceControls","showSourceControls",je],showTargetControls:[2,"showTargetControls","showTargetControls",je],sourceFilterPlaceholder:"sourceFilterPlaceholder",targetFilterPlaceholder:"targetFilterPlaceholder",disabled:[2,"disabled","disabled",je],sourceOptionDisabled:"sourceOptionDisabled",targetOptionDisabled:"targetOptionDisabled",ariaSourceFilterLabel:"ariaSourceFilterLabel",ariaTargetFilterLabel:"ariaTargetFilterLabel",filterMatchMode:"filterMatchMode",stripedRows:[2,"stripedRows","stripedRows",je],keepSelection:[2,"keepSelection","keepSelection",je],scrollHeight:"scrollHeight",autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",je],buttonProps:"buttonProps",moveUpButtonProps:"moveUpButtonProps",moveTopButtonProps:"moveTopButtonProps",moveDownButtonProps:"moveDownButtonProps",moveBottomButtonProps:"moveBottomButtonProps",moveToTargetProps:"moveToTargetProps",moveAllToTargetProps:"moveAllToTargetProps",moveToSourceProps:"moveToSourceProps",moveAllToSourceProps:"moveAllToSourceProps",breakpoint:"breakpoint"},outputs:{onMoveToSource:"onMoveToSource",onMoveAllToSource:"onMoveAllToSource",onMoveAllToTarget:"onMoveAllToTarget",onMoveToTarget:"onMoveToTarget",onSourceReorder:"onSourceReorder",onTargetReorder:"onTargetReorder",onSourceSelect:"onSourceSelect",onTargetSelect:"onTargetSelect",onSourceFilter:"onSourceFilter",onTargetFilter:"onTargetFilter",onFocus:"onFocus",onBlur:"onBlur"},features:[jt([iBe]),ft],decls:34,vars:105,consts:[["sourcelist",""],["targetlist",""],["header",""],["filter",""],["item",""],["empty",""],["emptyfilter",""],["cdkDropListGroup","",3,"ngStyle"],[3,"class",4,"ngIf"],["optionLabel","name",3,"ngModelChange","onFocus","onBlur","onChange","onDblClick","onDrop","onFilter","ariaLabel","multiple","options","ngModel","id","listStyle","striped","tabindex","disabled","optionDisabled","metaKeySelection","scrollHeight","autoOptionFocus","filter","filterBy","filterLocale","filterMatchMode","filterPlaceHolder","dragdrop"],[4,"ngIf"],["type","button","pButton","","pRipple","","severity","secondary",3,"click","disabled","buttonProps"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","angle-up","pButtonIcon","",4,"ngIf"],[4,"ngTemplateOutlet"],["data-p-icon","angle-double-up","pButtonIcon","",4,"ngIf"],["data-p-icon","angle-down","pButtonIcon","",4,"ngIf"],["data-p-icon","angle-double-down","pButtonIcon","",4,"ngIf"],["data-p-icon","angle-up","pButtonIcon",""],["data-p-icon","angle-double-up","pButtonIcon",""],["data-p-icon","angle-down","pButtonIcon",""],["data-p-icon","angle-double-down","pButtonIcon",""],["data-p-icon","angle-right","pButtonIcon","",4,"ngIf"],["data-p-icon","angle-right","pButtonIcon",""],["data-p-icon","angle-double-right","pButtonIcon","",4,"ngIf"],["data-p-icon","angle-double-right","pButtonIcon",""],["data-p-icon","angle-left","pButtonIcon","",4,"ngIf"],["data-p-icon","angle-left","pButtonIcon",""],["data-p-icon","angle-double-left","pButtonIcon","",4,"ngIf"],["data-p-icon","angle-double-left","pButtonIcon",""],["type","button","pButton","","pRipple","","severity","secondary",1,"p-button-icon-only",3,"click","disabled","buttonProps"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",7),ee(1,SNt,13,28,"div",8),k(2,"div")(3,"p-listbox",9,0),hh("ngModelChange",function(d){return se(r),Xh(o.selectedItemsSource,d)||(o.selectedItemsSource=d),ae(d)}),ie("onFocus",function(d){return se(r),ae(o.onListFocus(d,o.SOURCE_LIST))})("onBlur",function(d){return se(r),ae(o.onListBlur(d,o.SOURCE_LIST))})("onChange",function(d){return se(r),ae(o.onChangeSelection(d,o.SOURCE_LIST))})("onDblClick",function(){return se(r),ae(o.onSourceItemDblClick())})("onDrop",function(d){return se(r),ae(o.onDrop(d,o.SOURCE_LIST))})("onFilter",function(d){return se(r),ae(o.onFilter(d.originalEvent,o.SOURCE_LIST))}),ee(5,ANt,3,0,"ng-container",10)(6,RNt,3,0,"ng-container",10)(7,PNt,2,1,"ng-container",10)(8,BNt,3,0,"ng-container",10)(9,UNt,3,0,"ng-container",10)(10,GNt,3,0,"ng-container",10),D()(),k(11,"div")(12,"button",11),ie("click",function(){return se(r),ae(o.moveRight())}),ee(13,KNt,3,2,"ng-container",10)(14,YNt,1,0,null,12),D(),k(15,"button",11),ie("click",function(){return se(r),ae(o.moveAllRight())}),ee(16,XNt,3,2,"ng-container",10)(17,e3t,1,0,null,12),D(),k(18,"button",11),ie("click",function(){return se(r),ae(o.moveLeft())}),ee(19,n3t,3,2,"ng-container",10)(20,r3t,1,0,null,12),D(),k(21,"button",11),ie("click",function(){return se(r),ae(o.moveAllLeft())}),ee(22,l3t,3,2,"ng-container",10)(23,d3t,1,0,null,12),D()(),k(24,"div")(25,"p-listbox",9,1),hh("ngModelChange",function(d){return se(r),Xh(o.selectedItemsTarget,d)||(o.selectedItemsTarget=d),ae(d)}),ie("onFocus",function(d){return se(r),ae(o.onListFocus(d,o.TARGET_LIST))})("onBlur",function(d){return se(r),ae(o.onListBlur(d,o.TARGET_LIST))})("onChange",function(d){return se(r),ae(o.onChangeSelection(d,o.TARGET_LIST))})("onDblClick",function(){return se(r),ae(o.onTargetItemDblClick())})("onDrop",function(d){return se(r),ae(o.onDrop(d,o.TARGET_LIST))})("onFilter",function(d){return se(r),ae(o.onFilter(d.originalEvent,o.TARGET_LIST))}),ee(27,f3t,3,0,"ng-container",10)(28,v3t,3,0,"ng-container",10)(29,C3t,2,1,"ng-container",10)(30,S3t,3,0,"ng-container",10)(31,E3t,3,0,"ng-container",10)(32,k3t,3,0,"ng-container",10),D()(),ee(33,j3t,13,28,"div",8),D()}i&2&&(Oe(o.cn(o.cx("root"),o.styleClass)),E("ngStyle",o.style),Ge("data-pc-name","picklist")("data-pc-section","root"),T(),E("ngIf",o.showSourceControls),T(),Oe(o.cx("sourceListContainer")),Ge("data-pc-section","sourceWrapper")("data-pc-group-section","listWrapper"),T(),Cc("ariaLabel",o.sourceAriaLabel),E("multiple",!0)("options",o.source),ph("ngModel",o.selectedItemsSource),E("id",o.idSource+"_list")("listStyle",o.sourceStyle)("striped",o.stripedRows)("tabindex",o.tabindex)("disabled",o.disabled)("optionDisabled",o.sourceOptionDisabled)("metaKeySelection",o.metaKeySelection)("scrollHeight",o.scrollHeight)("autoOptionFocus",o.autoOptionFocus)("filter",o.filterBy)("filterBy",o.filterBy)("filterLocale",o.filterLocale)("filterMatchMode",o.filterMatchMode)("filterPlaceHolder",o.sourceFilterPlaceholder)("dragdrop",o.dragdrop),T(2),E("ngIf",o.sourceHeaderTemplate||o._sourceHeaderTemplate||o.sourceHeader),T(),E("ngIf",o.sourceFilterTemplate||o._sourceFilterTemplate),T(),E("ngIf",o.sourceFilterIconTemplate||o._sourceFilterIconTemplate),T(),E("ngIf",o.itemTemplate||o._itemTemplate),T(),E("ngIf",o.emptyMessageSourceTemplate||o._emptyMessageSourceTemplate),T(),E("ngIf",o.emptyFilterMessageSourceTemplate||o._emptyFilterMessageSourceTemplate),T(),Oe(o.cx("targetControls")),Ge("data-pc-section","buttons")("data-pc-group-section","controls"),T(),E("disabled",o.moveRightDisabled())("buttonProps",o.getButtonProps("movetotarget")),Ge("aria-label",o.moveToTargetAriaLabel)("data-pc-section","moveToTargetButton"),T(),E("ngIf",!o.moveToTargetIconTemplate&&!o._moveToTargetIconTemplate),T(),E("ngTemplateOutlet",o.moveToTargetIconTemplate||o._moveToTargetIconTemplate)("ngTemplateOutletContext",ki(97,iZ,o.viewChanged)),T(),E("disabled",o.moveAllRightDisabled())("buttonProps",o.getButtonProps("movealltotarget")),Ge("aria-label",o.moveAllToTargetAriaLabel)("data-pc-section","moveAllToTargetButton"),T(),E("ngIf",!o.moveAllToTargetIconTemplate&&!o._moveAllToTargetIconTemplate),T(),E("ngTemplateOutlet",o.moveAllToTargetIconTemplate||o._moveAllToTargetIconTemplate)("ngTemplateOutletContext",ki(99,iZ,o.viewChanged)),T(),E("disabled",o.moveLeftDisabled())("buttonProps",o.getButtonProps("movetosource")),Ge("aria-label",o.moveToSourceAriaLabel)("data-pc-section","moveToSourceButton"),T(),E("ngIf",!o.moveToSourceIconTemplate&&!o._moveToSourceIconTemplate),T(),E("ngTemplateOutlet",o.moveToSourceIconTemplate||o._moveToSourceIconTemplate)("ngTemplateOutletContext",ki(101,iZ,o.viewChanged)),T(),E("disabled",o.moveAllLeftDisabled())("buttonProps",o.getButtonProps("movealltosource")),Ge("aria-label",o.moveAllToSourceAriaLabel)("data-pc-section","moveAllToSourceButton"),T(),E("ngIf",!o.moveAllToSourceIconTemplate&&!o._moveAllToSourceIconTemplate),T(),E("ngTemplateOutlet",o.moveAllToSourceIconTemplate||o._moveAllToSourceIconTemplate)("ngTemplateOutletContext",ki(103,iZ,o.viewChanged)),T(),Oe(o.cx("targetListContainer")),Ge("data-pc-section","targetWrapper")("data-pc-group-section","listwrapper"),T(),Cc("ariaLabel",o.targetAriaLabel),E("multiple",!0)("options",o.target),ph("ngModel",o.selectedItemsTarget),E("id",o.idTarget+"_list")("listStyle",o.targetStyle)("striped",o.stripedRows)("tabindex",o.tabindex)("disabled",o.disabled)("optionDisabled",o.targetOptionDisabled)("metaKeySelection",o.metaKeySelection)("scrollHeight",o.scrollHeight)("autoOptionFocus",o.autoOptionFocus)("filter",o.filterBy)("filterBy",o.filterBy)("filterLocale",o.filterLocale)("filterMatchMode",o.filterMatchMode)("filterPlaceHolder",o.targetFilterPlaceholder)("dragdrop",o.dragdrop),T(2),E("ngIf",o.targetHeaderTemplate||o._targetHeaderTemplate||o.targetHeader),T(),E("ngIf",o.targetFilterTemplate||o._targetFilterTemplate),T(),E("ngIf",o.targetFilterIconTemplate||o._targetFilterIconTemplate),T(),E("ngIf",o.itemTemplate||o._itemTemplate),T(),E("ngIf",o.emptyMessageTargetTemplate||o._emptyMessageTargetTemplate),T(),E("ngIf",o.emptyFilterMessageTargetTemplate||o._emptyFilterMessageTargetTemplate),T(),E("ngIf",o.showTargetControls))},dependencies:[On,Fr,Lo,vs,$K,GK,jK,Ul,eZ,$3e,tke,RK,FK,ike,PK,LK,NP,NK,ime,hr,no,Lr,In],encapsulation:2,changeDetection:0})}return t})();var sBe=(()=>{class t{constructor(e,i){this.ref=i,this.selectedAdministrativeDistrictIds=[],this.csvImportConfig={title:"CSV-Datei",columnDefinitions:[{fieldName:"Landkreis",displayName:"Landkreis",validationFnc:o=>bp.isNumber(o)}]},e.data&&e.data.administrativeDistrictIds&&e.data.administrativeDistrictIds.length>0&&(this.selectedAdministrativeDistrictIds=e.data.administrativeDistrictIds.slice())}onAdministrativeDistrictIdsChange(e){this.selectedAdministrativeDistrictIds=e}onSelectedAdministrativeDistrictsChange(e){this.selectedAdministrativeDistrictIds=e}onSelectedAdministrativeDistrict(e){let i=e.id;this.selectedAdministrativeDistrictIds=this.selectedAdministrativeDistrictIds.slice().filter(o=>o!==i).concat(i)}onCsvImport(e){this.selectedAdministrativeDistrictIds=this.selectedAdministrativeDistrictIds.concat(e.data.map(i=>i[0]).map(i=>Yo.createFromString(i)).filter(i=>this.selectedAdministrativeDistrictIds.every(o=>o!==i)))}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[[1,"flex","flex-row","gap-6"],[1,"flex-1"],[3,"selectedAdministrativeDistrictsChange","selectedAdministrativeDistrictIds"],[1,"flex","flex-col"],["placeholderText","Landkreis hinzuf\xFCgen",3,"administrativeDistrictSelect"],[3,"inputChange","config"],[3,"administrativeDistrictIdsChange","administrativeDistrictIds"],[1,"flex","flex-row","gap-4","justify-end"],["label","Abbrechen","severity","secondary",3,"onClick","outlined"],["label","\xDCbernehmen",3,"onClick"]],template:function(i,o){i&1&&(k(0,"div")(1,"div",0)(2,"div",1)(3,"bd-maps-administrative-district-ids-map-selection",2),ie("selectedAdministrativeDistrictsChange",function(s){return o.onSelectedAdministrativeDistrictsChange(s)}),D()(),k(4,"div",1)(5,"div",3)(6,"div",1)(7,"div",0)(8,"div",1)(9,"bd-administrative-district-autocomplete",4),ie("administrativeDistrictSelect",function(s){return o.onSelectedAdministrativeDistrict(s)}),D()(),k(10,"div")(11,"bd-csv-import-file-button",5),ie("inputChange",function(s){return o.onCsvImport(s)}),D()()()(),k(12,"div",1)(13,"bd-maps-administrative-district-ids-list",6),ie("administrativeDistrictIdsChange",function(s){return o.onAdministrativeDistrictIdsChange(s)}),D()()()()()(),k(14,"div",7)(15,"p-button",8),ie("onClick",function(){return o.ref.close()}),D(),k(16,"p-button",9),ie("onClick",function(){return o.ref.close(o.selectedAdministrativeDistrictIds)}),D()()),i&2&&(T(3),E("selectedAdministrativeDistrictIds",o.selectedAdministrativeDistrictIds),T(8),E("config",o.csvImportConfig),T(2),E("administrativeDistrictIds",o.selectedAdministrativeDistrictIds),T(2),E("outlined",!0))},dependencies:[QE,gx,yW,PY,ja],encapsulation:2})}}return t})();var aBe=(()=>{class t{constructor(e,i){this.ref=i,this.selectedPostalCodes=[],this.csvImportConfig={title:"CSV-Datei",columnDefinitions:[{fieldName:"Postleitzahl",displayName:"Postleitzahl",validationFnc:o=>bp.isNumber(o)}]},e.data&&e.data.postalCodes&&e.data.postalCodes.length>0&&(this.selectedPostalCodes=e.data.postalCodes.slice())}onSelectedPostalCodesChange(e){this.selectedPostalCodes=e}onSelectedPostalCode(e){this.selectedPostalCodes=this.selectedPostalCodes.slice().filter(i=>i!==e.postalCode).concat(e.postalCode)}onCsvImport(e){this.selectedPostalCodes=this.selectedPostalCodes.concat(e.data.map(i=>i[0]).filter(i=>this.selectedPostalCodes.every(o=>o!==i)))}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:17,vars:5,consts:[[1,"flex","flex-row","gap-6"],[1,"flex-1"],[3,"selectedPostalCodesChange","selectedPostalCodes"],[1,"flex","flex-col"],["placeholderText","Postleitzahl hinzuf\xFCgen",3,"postalCodeSelect"],[1,"basis-10"],[3,"inputChange","config"],[3,"postalCodesChange","postalCodes","postalCodeResolveStrategy"],[1,"flex","flex-row","gap-4","justify-end"],["label","Abbrechen","severity","secondary",3,"onClick","outlined"],["label","\xDCbernehmen",3,"onClick"]],template:function(i,o){i&1&&(k(0,"div")(1,"div",0)(2,"div",1)(3,"bd-maps-postal-codes-map-selection",2),ie("selectedPostalCodesChange",function(s){return o.onSelectedPostalCodesChange(s)}),D()(),k(4,"div",1)(5,"div",3)(6,"div",1)(7,"div",0)(8,"div",1)(9,"bd-postal-code-autocomplete",4),ie("postalCodeSelect",function(s){return o.onSelectedPostalCode(s)}),D()(),k(10,"div",5)(11,"bd-csv-import-file-button",6),ie("inputChange",function(s){return o.onCsvImport(s)}),D()()()(),k(12,"div",1)(13,"bd-maps-postal-codes-list",7),ie("postalCodesChange",function(s){return o.onSelectedPostalCodesChange(s)}),D()()()()()(),k(14,"div",8)(15,"p-button",9),ie("onClick",function(){return o.ref.close()}),D(),k(16,"p-button",10),ie("onClick",function(){return o.ref.close(o.selectedPostalCodes)}),D()()),i&2&&(T(3),E("selectedPostalCodes",o.selectedPostalCodes),T(8),E("config",o.csvImportConfig),T(2),E("postalCodes",o.selectedPostalCodes)("postalCodeResolveStrategy","DETAIL"),T(2),E("outlined",!0))},dependencies:[QE,Tx,kY,mY,ja],encapsulation:2})}}return t})();var lBe=` .p-slider { display: block; position: relative; background: dt('slider.track.background'); border-radius: dt('slider.track.border.radius'); } .p-slider-handle { cursor: grab; touch-action: none; user-select: none; display: flex; justify-content: center; align-items: center; height: dt('slider.handle.height'); width: dt('slider.handle.width'); background: dt('slider.handle.background'); border-radius: dt('slider.handle.border.radius'); transition: background dt('slider.transition.duration'), color dt('slider.transition.duration'), border-color dt('slider.transition.duration'), box-shadow dt('slider.transition.duration'), outline-color dt('slider.transition.duration'); outline-color: transparent; } .p-slider-handle::before { content: ''; width: dt('slider.handle.content.width'); height: dt('slider.handle.content.height'); display: block; background: dt('slider.handle.content.background'); border-radius: dt('slider.handle.content.border.radius'); box-shadow: dt('slider.handle.content.shadow'); transition: background dt('slider.transition.duration'); } .p-slider:not(.p-disabled) .p-slider-handle:hover { background: dt('slider.handle.hover.background'); } .p-slider:not(.p-disabled) .p-slider-handle:hover::before { background: dt('slider.handle.content.hover.background'); } .p-slider-handle:focus-visible { box-shadow: dt('slider.handle.focus.ring.shadow'); outline: dt('slider.handle.focus.ring.width') dt('slider.handle.focus.ring.style') dt('slider.handle.focus.ring.color'); outline-offset: dt('slider.handle.focus.ring.offset'); } .p-slider-range { display: block; background: dt('slider.range.background'); border-radius: dt('slider.track.border.radius'); } .p-slider.p-slider-horizontal { height: dt('slider.track.size'); } .p-slider-horizontal .p-slider-range { inset-block-start: 0; inset-inline-start: 0; height: 100%; } .p-slider-horizontal .p-slider-handle { inset-block-start: 50%; margin-block-start: calc(-1 * calc(dt('slider.handle.height') / 2)); margin-inline-start: calc(-1 * calc(dt('slider.handle.width') / 2)); } .p-slider-vertical { min-height: 100px; width: dt('slider.track.size'); } .p-slider-vertical .p-slider-handle { inset-inline-start: 50%; margin-inline-start: calc(-1 * calc(dt('slider.handle.width') / 2)); margin-block-end: calc(-1 * calc(dt('slider.handle.height') / 2)); } .p-slider-vertical .p-slider-range { inset-block-end: 0; inset-inline-start: 0; width: 100%; } `;var $3t=["sliderHandle"],q3t=["sliderHandleStart"],K3t=["sliderHandleEnd"],W3t=(t,n)=>({position:"absolute","inset-inline-start":t,width:n}),Y3t=(t,n)=>({position:"absolute",bottom:t,height:n}),Q3t=t=>({position:"absolute",height:t}),Z3t=t=>({position:"absolute",width:t}),nme=(t,n)=>({position:"absolute","inset-inline-start":t,bottom:n});function X3t(t,n){if(t&1&&ce(0,"span",7),t&2){let e=P();Oe(e.cx("range")),E("ngStyle",Eo(4,W3t,e.offset!==null&&e.offset!==void 0?e.offset+"%":e.handleValues[0]+"%",e.diff?e.diff+"%":e.handleValues[1]-e.handleValues[0]+"%")),Ge("data-pc-section","range")}}function J3t(t,n){if(t&1&&ce(0,"span",7),t&2){let e=P();Oe(e.cx("range")),E("ngStyle",Eo(4,Y3t,e.offset!==null&&e.offset!==void 0?e.offset+"%":e.handleValues[0]+"%",e.diff?e.diff+"%":e.handleValues[1]-e.handleValues[0]+"%")),Ge("data-pc-section","range")}}function eBt(t,n){if(t&1&&ce(0,"span",7),t&2){let e=P();Oe(e.cx("range")),E("ngStyle",ki(4,Q3t,e.handleValue+"%")),Ge("data-pc-section","range")}}function tBt(t,n){if(t&1&&ce(0,"span",7),t&2){let e=P();Oe(e.cx("range")),E("ngStyle",ki(4,Z3t,e.handleValue+"%")),Ge("data-pc-section","range")}}function iBt(t,n){if(t&1){let e=tt();k(0,"span",8,0),ie("touchstart",function(o){se(e);let r=P();return ae(r.onDragStart(o))})("touchmove",function(o){se(e);let r=P();return ae(r.onDrag(o))})("touchend",function(o){se(e);let r=P();return ae(r.onDragEnd(o))})("mousedown",function(o){se(e);let r=P();return ae(r.onMouseDown(o))})("keydown",function(o){se(e);let r=P();return ae(r.onKeyDown(o))}),D()}if(t&2){let e=P();Oe(e.cx("handle")),Ir("transition",e.dragging?"none":null),E("ngStyle",Eo(14,nme,e.orientation=="horizontal"?e.handleValue+"%":null,e.orientation=="vertical"?e.handleValue+"%":null))("pAutoFocus",e.autofocus),Ge("tabindex",e.$disabled()?null:e.tabindex)("aria-valuemin",e.min)("aria-valuenow",e.value)("aria-valuemax",e.max)("aria-labelledby",e.ariaLabelledBy)("aria-label",e.ariaLabel)("aria-orientation",e.orientation)("data-pc-section","handle")}}function nBt(t,n){if(t&1){let e=tt();k(0,"span",9,1),ie("keydown",function(o){se(e);let r=P();return ae(r.onKeyDown(o,0))})("mousedown",function(o){se(e);let r=P();return ae(r.onMouseDown(o,0))})("touchstart",function(o){se(e);let r=P();return ae(r.onDragStart(o,0))})("touchmove",function(o){se(e);let r=P();return ae(r.onDrag(o))})("touchend",function(o){se(e);let r=P();return ae(r.onDragEnd(o))}),D()}if(t&2){let e=P();Oe(e.cn(e.cx("handle"),e.handleIndex==0&&"p-slider-handle-active")),Ir("transition",e.dragging?"none":null),E("ngStyle",Eo(14,nme,e.rangeStartLeft,e.rangeStartBottom))("pAutoFocus",e.autofocus),Ge("tabindex",e.$disabled()?null:e.tabindex)("aria-valuemin",e.min)("aria-valuenow",e.value?e.value[0]:null)("aria-valuemax",e.max)("aria-labelledby",e.ariaLabelledBy)("aria-label",e.ariaLabel)("aria-orientation",e.orientation)("data-pc-section","startHandler")}}function oBt(t,n){if(t&1){let e=tt();k(0,"span",10,2),ie("keydown",function(o){se(e);let r=P();return ae(r.onKeyDown(o,1))})("mousedown",function(o){se(e);let r=P();return ae(r.onMouseDown(o,1))})("touchstart",function(o){se(e);let r=P();return ae(r.onDragStart(o,1))})("touchmove",function(o){se(e);let r=P();return ae(r.onDrag(o))})("touchend",function(o){se(e);let r=P();return ae(r.onDragEnd(o))}),D()}if(t&2){let e=P();Oe(e.cn(e.cx("handle"),e.handleIndex==1&&"p-slider-handle-active")),Ir("transition",e.dragging?"none":null),E("ngStyle",Eo(13,nme,e.rangeEndLeft,e.rangeEndBottom)),Ge("tabindex",e.$disabled()?null:e.tabindex)("aria-valuemin",e.min)("aria-valuenow",e.value?e.value[1]:null)("aria-valuemax",e.max)("aria-labelledby",e.ariaLabelledBy)("aria-label",e.ariaLabel)("aria-orientation",e.orientation)("data-pc-section","endHandler")}}var rBt={handle:{position:"absolute"},range:{position:"absolute"}},sBt={root:({instance:t})=>["p-slider p-component",{"p-disabled":t.$disabled(),"p-invalid":t.invalid(),"p-slider-horizontal":t.orientation==="horizontal","p-slider-vertical":t.orientation==="vertical","p-slider-animate":t.animate}],range:"p-slider-range",handle:"p-slider-handle"},cBe=(()=>{class t extends io{name="slider";theme=lBe;classes=sBt;inlineStyles=rBt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var aBt={provide:Ea,useExisting:Ko(()=>t8),multi:!0},t8=(()=>{class t extends Wm{animate;min=0;max=100;orientation="horizontal";step;range;styleClass;ariaLabel;ariaLabelledBy;tabindex=0;autofocus;onChange=new ve;onSlideEnd=new ve;sliderHandle;sliderHandleStart;sliderHandleEnd;_componentStyle=re(cBe);value;values;handleValue;handleValues=[];diff;offset;bottom;dragging;dragListener;mouseupListener;initX;initY;barWidth;barHeight;sliderHandleClick;handleIndex=0;startHandleValue;startx;starty;ngZone=re(_n);onHostClick(e){this.onBarClick(e)}onMouseDown(e,i){this.$disabled()||(this.dragging=!0,this.updateDomData(),this.sliderHandleClick=!0,this.range&&this.handleValues&&this.handleValues[0]===this.max?this.handleIndex=0:this.handleIndex=i,this.bindDragListeners(),e.target.focus(),e.preventDefault(),this.animate&&Fd(this.el.nativeElement,"p-slider-animate"))}onDragStart(e,i){if(!this.$disabled()){var o=e.changedTouches[0];this.startHandleValue=this.range?this.handleValues[i]:this.handleValue,this.dragging=!0,this.range&&this.handleValues&&this.handleValues[0]===this.max?this.handleIndex=0:this.handleIndex=i,this.orientation==="horizontal"?(this.startx=parseInt(o.clientX,10),this.barWidth=this.el.nativeElement.offsetWidth):(this.starty=parseInt(o.clientY,10),this.barHeight=this.el.nativeElement.offsetHeight),this.animate&&Fd(this.el.nativeElement,"p-slider-animate"),e.preventDefault()}}onDrag(e){if(!this.$disabled()){var i=e.changedTouches[0],o=0;this.orientation==="horizontal"?o=Math.floor((parseInt(i.clientX,10)-this.startx)*100/this.barWidth)+this.startHandleValue:o=Math.floor((this.starty-parseInt(i.clientY,10))*100/this.barHeight)+this.startHandleValue,this.setValueFromHandle(e,o),e.preventDefault()}}onDragEnd(e){this.$disabled()||(this.dragging=!1,this.range?this.onSlideEnd.emit({originalEvent:e,values:this.values}):this.onSlideEnd.emit({originalEvent:e,value:this.value}),this.animate&&ac(this.el.nativeElement,"p-slider-animate"),e.preventDefault())}onBarClick(e){this.$disabled()||(this.sliderHandleClick||(this.updateDomData(),this.handleChange(e),this.range?this.onSlideEnd.emit({originalEvent:e,values:this.values}):this.onSlideEnd.emit({originalEvent:e,value:this.value})),this.sliderHandleClick=!1)}onKeyDown(e,i){switch(this.handleIndex=i,e.code){case"ArrowDown":case"ArrowLeft":this.decrementValue(e,i),e.preventDefault();break;case"ArrowUp":case"ArrowRight":this.incrementValue(e,i),e.preventDefault();break;case"PageDown":this.decrementValue(e,i,!0),e.preventDefault();break;case"PageUp":this.incrementValue(e,i,!0),e.preventDefault();break;case"Home":this.updateValue(this.min,e),e.preventDefault();break;case"End":this.updateValue(this.max,e),e.preventDefault();break;default:break}}decrementValue(e,i,o=!1){let r;this.range?this.step?r=this.values[i]-this.step:r=this.values[i]-1:this.step?r=this.value-this.step:!this.step&&o?r=this.value-10:r=this.value-1,this.updateValue(r,e),e.preventDefault()}incrementValue(e,i,o=!1){let r;this.range?this.step?r=this.values[i]+this.step:r=this.values[i]+1:this.step?r=this.value+this.step:!this.step&&o?r=this.value+10:r=this.value+1,this.updateValue(r,e),e.preventDefault()}handleChange(e){let i=this.calculateHandleValue(e);this.setValueFromHandle(e,i)}bindDragListeners(){ps(this.platformId)&&this.ngZone.runOutsideAngular(()=>{let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.dragListener||(this.dragListener=this.renderer.listen(e,"mousemove",i=>{this.dragging&&this.ngZone.run(()=>{this.handleChange(i)})})),this.mouseupListener||(this.mouseupListener=this.renderer.listen(e,"mouseup",i=>{this.dragging&&(this.dragging=!1,this.ngZone.run(()=>{this.range?this.onSlideEnd.emit({originalEvent:i,values:this.values}):this.onSlideEnd.emit({originalEvent:i,value:this.value}),this.animate&&ac(this.el.nativeElement,"p-slider-animate")}))}))})}unbindDragListeners(){this.dragListener&&(this.dragListener(),this.dragListener=null),this.mouseupListener&&(this.mouseupListener(),this.mouseupListener=null)}setValueFromHandle(e,i){let o=this.getValueFromHandle(i);this.range?this.step?this.handleStepChange(o,this.values[this.handleIndex]):(this.handleValues[this.handleIndex]=i,this.updateValue(o,e)):this.step?this.handleStepChange(o,this.value):(this.handleValue=i,this.updateValue(o,e)),this.cd.markForCheck()}handleStepChange(e,i){let o=e-i,r=i,s=this.step;o<0?r=i+Math.ceil(e/s-i/s)*s:o>0&&(r=i+Math.floor(e/s-i/s)*s),this.updateValue(r),this.updateHandleValue()}get rangeStartLeft(){return this.isVertical()?null:this.handleValues[0]>100?"100%":this.handleValues[0]+"%"}get rangeStartBottom(){return this.isVertical()?this.handleValues[0]+"%":"auto"}get rangeEndLeft(){return this.isVertical()?null:this.handleValues[1]+"%"}get rangeEndBottom(){return this.isVertical()?this.handleValues[1]+"%":"auto"}isVertical(){return this.orientation==="vertical"}updateDomData(){let e=this.el.nativeElement.getBoundingClientRect();this.initX=e.left+ez(),this.initY=e.top+tz(),this.barWidth=this.el.nativeElement.offsetWidth,this.barHeight=this.el.nativeElement.offsetHeight}calculateHandleValue(e){return this.orientation==="horizontal"?IP(this.el.nativeElement)?(this.initX+this.barWidth-e.pageX)*100/this.barWidth:(e.pageX-this.initX)*100/this.barWidth:(this.initY+this.barHeight-e.pageY)*100/this.barHeight}updateHandleValue(){this.range?(this.handleValues[0]=(this.values[0]this.max?100:this.values[1]-this.min)*100/(this.max-this.min)):this.valuethis.max?this.handleValue=100:this.handleValue=(this.value-this.min)*100/(this.max-this.min),this.step&&this.updateDiffAndOffset()}updateDiffAndOffset(){this.diff=this.getDiff(),this.offset=this.getOffset()}getDiff(){return Math.abs(this.handleValues[0]-this.handleValues[1])}getOffset(){return Math.min(this.handleValues[0],this.handleValues[1])}updateValue(e,i){if(this.range){let o=e;this.handleIndex==0?(othis.values[1]&&o>this.max&&(o=this.max,this.handleValues[0]=100),this.sliderHandleStart?.nativeElement.focus()):(o>this.max?(o=this.max,this.handleValues[1]=100,this.offset=this.handleValues[1]):othis.max&&(e=this.max,this.handleValue=100),this.value=this.getNormalizedValue(e),this.onModelChange(this.value),this.onChange.emit({event:i,value:this.value}),this.sliderHandle?.nativeElement.focus();this.updateHandleValue()}getValueFromHandle(e){return(this.max-this.min)*(e/100)+this.min}getDecimalsCount(e){return e&&Math.floor(e)!==e&&e.toString().split(".")[1].length||0}getNormalizedValue(e){let i=this.getDecimalsCount(this.step);return i>0?+parseFloat(e.toString()).toFixed(i):Math.floor(e)}ngOnDestroy(){this.unbindDragListeners(),super.ngOnDestroy()}get minVal(){return Math.min(this.values[1],this.values[0])}get maxVal(){return Math.max(this.values[1],this.values[0])}writeControlValue(e){this.range?this.values=e||[0,0]:this.value=e||0,this.updateHandleValue(),this.updateDiffAndOffset(),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-slider"]],viewQuery:function(i,o){if(i&1&&(Ri($3t,5),Ri(q3t,5),Ri(K3t,5)),i&2){let r;Le(r=Ne())&&(o.sliderHandle=r.first),Le(r=Ne())&&(o.sliderHandleStart=r.first),Le(r=Ne())&&(o.sliderHandleEnd=r.first)}},hostVars:4,hostBindings:function(i,o){i&1&&ie("click",function(s){return o.onHostClick(s)}),i&2&&(Ge("data-pc-name","slider")("data-pc-section","root"),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{animate:[2,"animate","animate",je],min:[2,"min","min",ln],max:[2,"max","max",ln],orientation:"orientation",step:[2,"step","step",ln],range:[2,"range","range",je],styleClass:"styleClass",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",tabindex:[2,"tabindex","tabindex",ln],autofocus:[2,"autofocus","autofocus",je]},outputs:{onChange:"onChange",onSlideEnd:"onSlideEnd"},features:[jt([aBt,cBe]),ft],decls:7,vars:7,consts:[["sliderHandle",""],["sliderHandleStart",""],["sliderHandleEnd",""],[3,"class","ngStyle",4,"ngIf"],["role","slider",3,"class","transition","ngStyle","pAutoFocus","touchstart","touchmove","touchend","mousedown","keydown",4,"ngIf"],["role","slider",3,"transition","class","ngStyle","pAutoFocus","keydown","mousedown","touchstart","touchmove","touchend",4,"ngIf"],["role","slider",3,"transition","class","ngStyle","keydown","mousedown","touchstart","touchmove","touchend",4,"ngIf"],[3,"ngStyle"],["role","slider",3,"touchstart","touchmove","touchend","mousedown","keydown","ngStyle","pAutoFocus"],["role","slider",3,"keydown","mousedown","touchstart","touchmove","touchend","ngStyle","pAutoFocus"],["role","slider",3,"keydown","mousedown","touchstart","touchmove","touchend","ngStyle"]],template:function(i,o){i&1&&ee(0,X3t,1,7,"span",3)(1,J3t,1,7,"span",3)(2,eBt,1,6,"span",3)(3,tBt,1,6,"span",3)(4,iBt,2,17,"span",4)(5,nBt,2,17,"span",5)(6,oBt,2,16,"span",6),i&2&&(E("ngIf",o.range&&o.orientation=="horizontal"),T(),E("ngIf",o.range&&o.orientation=="vertical"),T(),E("ngIf",!o.range&&o.orientation=="vertical"),T(),E("ngIf",!o.range&&o.orientation=="horizontal"),T(),E("ngIf",!o.range),T(),E("ngIf",o.range),T(),E("ngIf",o.range))},dependencies:[On,Fr,vs,fp,In],encapsulation:2,changeDetection:0})}return t})();function lBt(t,n){t&1&&(k(0,"div",18),ce(1,"bd-message-empty",19),D())}function cBt(t,n){if(t&1){let e=tt();k(0,"ays-clinic-id-list",20),ie("clinicIdsChange",function(o){se(e);let r=P();return ae(r.onClinicIdSelectionChange(o))}),D()}if(t&2){let e=P();E("clinicIds",e.result)}}var dBe=(()=>{class t{constructor(e,i){this.ref=e,this._cdr=i,this.loading$=new pi(1),this.result=[],this.radiusInKilometer=25,this.mapController=new Jd,this._drivingTimeLayer=new UL("drivingTime",{displayName:"Distanz",sourceId:"drivingTime"}),this._selectionLayer=new HL,this.mapController.registerLayer(this._drivingTimeLayer),this.mapController.registerLayer(this._selectionLayer),this._selectionLayer.selection.changed.subscribe(o=>{this.result=[...o.source.selected.map(r=>r.clone())],this.loading$.next(Gt.SUCCESS)})}onClinicSelect(e){this.clinic=e,this.coordinates=[e.address.location[0],e.address.location[1]],this._drivingTimeLayer.updateCoordinates(this.coordinates),this._loading()}onRadiusChange(e){this.radiusInKilometer=e,this._drivingTimeLayer.updateRadiusInKilometer(e),this._loading()}onMapLoaded(e){this.mapController.addMapRef(e),this._drivingTimeLayer.bounds$.subscribe(i=>{this._selectionLayer.onChangedBounds(i)})}onMapClick(e){this._selectionLayer.click(e)}onClinicIdSelectionChange(e){this.result=[...e.map(i=>i.clone())],this._selectionLayer.selection.clear(!1),this._selectionLayer.selection.select(...e.map(i=>i.clone())),this._cdr.markForCheck()}onSubmit(){this.ref.close(this._selectionLayer.selection.selected)}_loading(){this.coordinates&&this.radiusInKilometer&&this.loading$.next(Gt.LOADING)}static{this.\u0275fac=function(i){return new(i||t)(_e(es),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:30,vars:11,consts:[["initTpl",""],["successTpl",""],[1,"flex","flex-col","gap-4"],[1,"flex-1"],[1,"flex","flex-col","md:flex-row","gap-0","md:gap-4","items-center"],[3,"clinicSelect"],[1,"mb-4"],["data-test","clinic-select-import-via-geographic-distance-radius",1,"w-full","mt-2","mb-2",3,"onChange","ngModel","min","max","step"],[1,"flex","flex-row","justify-between"],[1,"text-sm"],[1,"flex","flex-row","gap-4"],[1,"map-container"],[3,"mapLoaded","mapClick"],[3,"controller"],[3,"loadItem","successTemplate","initTemplate"],[1,"flex","flex-row","gap-4","justify-end"],["label","Abbrechen","severity","secondary",3,"onClick","outlined"],["label","Importieren",3,"click","disabled"],[1,"bd-container"],["icon","info","message","Bitte Klinik und Distanz ausw\xE4hlen"],[3,"clinicIdsChange","clinicIds"]],template:function(i,o){if(i&1){let r=tt();k(0,"div")(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",3)(5,"ays-clinic-select",5),ie("clinicSelect",function(d){return se(r),ae(o.onClinicSelect(d))}),D()(),k(6,"div",3)(7,"span",6),Q(8),D(),k(9,"p-slider",7),ie("onChange",function(d){return se(r),ae(o.onRadiusChange(d.value))}),D(),k(10,"div",8)(11,"span",9),Q(12,"0 km"),D(),k(13,"span",9),Q(14,"100 km"),D()()()()(),k(15,"div",3)(16,"div",10)(17,"div",3)(18,"div",11)(19,"bd-map",12),ie("mapLoaded",function(d){return se(r),ae(o.onMapLoaded(d))})("mapClick",function(d){return se(r),ae(o.onMapClick(d))}),D(),ce(20,"bd-map-legend",13),D()(),k(21,"div",3),ce(22,"bd-loader",14),D()()()()(),k(23,"div",15)(24,"p-button",16),ie("onClick",function(){return se(r),ae(o.ref.close())}),D(),k(25,"p-button",17),ie("click",function(){return se(r),ae(o.onSubmit())}),D()(),ee(26,lBt,2,0,"ng-template",null,0,Pt)(28,cBt,1,1,"ng-template",null,1,Pt)}if(i&2){let r=ti(27),s=ti(29);T(8),Qi("Distanz ",o.radiusInKilometer," km"),T(),E("ngModel",o.radiusInKilometer)("min",0)("max",100)("step",1),T(11),E("controller",o.mapController),T(2),E("loadItem",o.loading$)("successTemplate",s)("initTemplate",r),T(2),E("outlined",!0),T(),E("disabled",!o.result||o.result.length===0)}},dependencies:[WQ,Vx,Kn,eu,Yp,Rl,hr,no,Lr,ja,t8],styles:[".map-container[_ngcontent-%COMP%]{height:450px;position:relative}"]})}}return t})();function dBt(t,n){t&1&&(k(0,"div",18),ce(1,"bd-message-empty",19),D())}function uBt(t,n){if(t&1){let e=tt();k(0,"ays-clinic-id-list",20),ie("clinicIdsChange",function(o){se(e);let r=P();return ae(r.onClinicIdSelectionChange(o))}),D()}if(t&2){let e=P();E("clinicIds",e.result)}}var uBe=(()=>{class t{constructor(e,i,o){this.ref=e,this._cdr=i,this._isochroneService=o,this.loading$=new pi(1),this.result=[],this.drivingTime=10,this.mapController=new Jd,this._selectionLayer=new HL,this._isochroneLayer=new zL("drivingTime",{displayName:"Fahrzeit",sourceId:"drivingTime"},this._isochroneService),this.mapController.registerLayer(this._isochroneLayer),this.mapController.registerLayer(this._selectionLayer),this._selectionLayer.selection.changed.subscribe(r=>{this.result=[...r.source.selected.map(s=>s.clone())],this.loading$.next(Gt.SUCCESS)})}onClinicSelect(e){this.clinic=e,this.coordinates=[e.address.location[0],e.address.location[1]],this._isochroneLayer.updateCoordinates(this.coordinates),this._loading()}onDrivingTimeChange(e){this.drivingTime=e,this._isochroneLayer.updateDrivingTime(e),this._loading()}onMapLoaded(e){this.mapController.addMapRef(e),this._isochroneLayer.bounds$.subscribe(i=>{this._selectionLayer.onChangedBounds(i)})}onMapClick(e){this._selectionLayer.click(e)}onClinicIdSelectionChange(e){this.result=[...e.map(i=>i.clone())],this._selectionLayer.selection.clear(!1),this._selectionLayer.selection.select(...e.map(i=>i.clone())),this._cdr.markForCheck()}onSubmit(){this.ref.close(this._selectionLayer.selection.selected)}_loading(){this.coordinates&&this.drivingTime&&this.loading$.next(Gt.LOADING)}static{this.\u0275fac=function(i){return new(i||t)(_e(es),_e(Gi),_e(GY))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:30,vars:11,consts:[["initTpl",""],["successTpl",""],[1,"flex","flex-col","gap-4"],[1,"flex-1"],[1,"flex","flex-col","md:flex-row","gap-0","md:gap-4","items-center"],[3,"clinicSelect"],[1,"mb-4"],["data-test","clinic-select-import-via-driving-time-time",1,"w-full","mt-2","mb-2",3,"onChange","ngModel","min","max","step"],[1,"flex","flex-row","justify-between"],[1,"text-sm"],[1,"flex","flex-row","gap-4"],[1,"map-container"],[3,"mapLoaded","mapClick"],[3,"controller"],[3,"loadItem","successTemplate","initTemplate"],[1,"flex","flex-row","gap-4","justify-end"],["label","Abbrechen","severity","secondary",3,"onClick","outlined"],["label","Importieren",3,"onClick","disabled"],[1,"bd-container"],["icon","info","message","Bitte Klinik und Fahrzeit ausw\xE4hlen"],[3,"clinicIdsChange","clinicIds"]],template:function(i,o){if(i&1){let r=tt();k(0,"div")(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",3)(5,"ays-clinic-select",5),ie("clinicSelect",function(d){return se(r),ae(o.onClinicSelect(d))}),D()(),k(6,"div",3)(7,"span",6),Q(8),D(),k(9,"p-slider",7),ie("onChange",function(d){return se(r),ae(o.onDrivingTimeChange(d.value))}),D(),k(10,"div",8)(11,"span",9),Q(12,"0 min"),D(),k(13,"span",9),Q(14,"60 min"),D()()()()(),k(15,"div",3)(16,"div",10)(17,"div",3)(18,"div",11)(19,"bd-map",12),ie("mapLoaded",function(d){return se(r),ae(o.onMapLoaded(d))})("mapClick",function(d){return se(r),ae(o.onMapClick(d))}),D(),ce(20,"bd-map-legend",13),D()(),k(21,"div",3),ce(22,"bd-loader",14),D()()()()(),k(23,"div",15)(24,"p-button",16),ie("onClick",function(){return se(r),ae(o.ref.close())}),D(),k(25,"p-button",17),ie("onClick",function(){return se(r),ae(o.onSubmit())}),D()(),ee(26,dBt,2,0,"ng-template",null,0,Pt)(28,uBt,1,1,"ng-template",null,1,Pt)}if(i&2){let r=ti(27),s=ti(29);T(8),Qi("Fahrzeit ",o.drivingTime," min"),T(),E("ngModel",o.drivingTime)("min",0)("max",60)("step",1),T(11),E("controller",o.mapController),T(2),E("loadItem",o.loading$)("successTemplate",s)("initTemplate",r),T(2),E("outlined",!0),T(),E("disabled",!o.result||o.result.length===0)}},dependencies:[Vx,eu,Yp,Kn,Rl,WQ,t8,hr,no,Lr,ja],styles:[".map-container[_ngcontent-%COMP%]{height:450px;position:relative}"]})}}return t})();function pBt(t,n){if(t&1&&(k(0,"div",14)(1,"span",15),Q(2),D(),k(3,"div",16)(4,"span",17),Q(5),D(),k(6,"span",17),Q(7),D()()()),t&2){let e=n.$implicit;T(2),dt(e.name),T(3),Qi("",e.id.sn,","),T(2),dt(e.address.toString())}}function hBt(t,n){t&1&&(k(0,"span",15),Q(1,"Verf\xFCgbare Kliniken in Deutschland"),D())}function mBt(t,n){if(t&1&&(k(0,"span",15),Q(1),D()),t&2){let e=P(2);T(),Qi("Auswahl f\xFCr ",e.titleText)}}function fBt(t,n){if(t&1){let e=tt();k(0,"div",4)(1,"div",5)(2,"p-button",6),ie("click",function(o){se(e);let r=ti(4);return ae(r.toggle(o))}),D(),ce(3,"p-tieredMenu",7,1),D(),k(5,"div",8)(6,"div",9)(7,"p-pick-list",10,2),ie("onMoveToTarget",function(){se(e);let o=ti(8),r=P();return ae(r.onSearchSelectionChange(o.target))})("onMoveAllToTarget",function(){se(e);let o=ti(8),r=P();return ae(r.onSearchSelectionChange(o.target))})("onMoveToSource",function(){se(e);let o=ti(8),r=P();return ae(r.onSearchSelectionChange(o.target))})("onMoveAllToSource",function(){se(e);let o=ti(8),r=P();return ae(r.onSearchSelectionChange(o.target))}),ee(9,pBt,8,3,"ng-template",11)(10,hBt,2,0,"ng-template",12)(11,mBt,2,1,"ng-template",13),D()()()()}if(t&2){let e=P();T(3),E("model",e.menuItems)("popup",!0),T(4),E("source",e.allPossibleClinics)("sourceHeader","Auswahl f\xFCr "+e.titleText)("sourceStyle",e.sourceStyle)("trackBy",e.trackBy)("target",e.selection)("targetStyle",e.targetStyle)("showSourceControls",!1)("showTargetControls",!1)}}var ome=(()=>{class t{constructor(e,i,o){this._clinicService=e,this._clinicsFilterService=i,this._dialogService=o,this.titleText="Filter",this.initialSelection=[],this.filterClinicFn=()=>!0,this.selectionChange=new ve,this.sourceStyle={height:"30rem",display:"block"},this.targetStyle={height:"30rem",display:"block",border:"3px solid var(--p-primary-color)","border-radius":"var(--p-listbox-border-radius)"},this.loading$=new pi(Gt.LOADING),this.notification=null,this.selection=[],this.allPossibleClinics=[],this.csvImportConfig={title:"CSV-Datei",columnDefinitions:[{fieldName:"IK",displayName:"IK-Nummer",explanation:["Erste Spalte: IK-Nummer (Institutionskennzeichen)"],validationFnc:r=>bp.isNumber(r)},{fieldName:"SN",displayName:"SN-Nummer",explanation:["Zweite Spalte: SN-Nummer"],validationFnc:(r,s)=>ci(s).pipe(vt(d=>{if(bp.isNumber(r))return d;throw Error("not a number")}),bB(1500),lh(d=>this._clinicService.get(new ga(d[0],d[1]))),vt(d=>!!d),Gd(()=>ci(!1)))}]},this.menuItems=[{label:"Import aus CSV-Datei",command:()=>this._dialogService.open(VQ,mt(be({},ju),{header:"CSV-Datei",data:{importConfig:this.csvImportConfig}})).onClose.subscribe(r=>this.onCsvImport(r))},{label:"Import aus Landkreisen",command:()=>this.importClinicsByAdministrativeDistricts()},{label:"Import aus Postleitzahlen",command:()=>this.importClinicsByPostalCodes()},{label:"Import \xFCber Distanz",command:()=>this.importViaClinicDistance()},{label:"Import \xFCber Fahrzeit",command:()=>this.importViaClinicDrivingTime()}]}ngOnChanges(e){e.initialSelection&&this._loadSelectionAndAllPossibleClinicsWithoutSelection(e.initialSelection.currentValue??[]).subscribe(i=>{this.selection=i.selection,this.selectionChange.emit(this.selection),this.allPossibleClinics=i.allPossibleClinicsWithoutSelection,this.notification=i.notification,this.loading$.next(Gt.SUCCESS)})}trackBy(e){return e.id.sn}onSearchSelectionChange(e){this.selectionChange.emit(e)}_loadSelectionAndAllPossibleClinicsWithoutSelection(e){return this.loading$.next(Gt.LOADING),this._clinicService.search("").pipe(vt(i=>i.filter(o=>this.filterClinicFn(o))),vt(i=>{let o=[],r=[],s=e.map(m=>`${m.ik}_${m.sn}`),d;if(i.forEach(m=>{s.includes(`${m.id.ik}_${m.id.sn}`)?o.push(m):r.push(m)}),o.length!==e.length){let m=Math.abs(o.length-e.length);d=`Die Klinikmenge enth\xE4lt Kliniken, die f\xFCr das Jahr ${Cd} nicht mehr existieren. ${m} Kliniken sind nicht mehr aktuell.`}else d=null;return{selection:o,allPossibleClinicsWithoutSelection:r,notification:d}}))}onCsvImport(e){this._addToSelection(e.data.map(i=>ga.fromString(`${i[0]}_${i[1]}`)))}importClinicsByAdministrativeDistricts(){let e=mt(be({},ju),{header:"Landkreise ausw\xE4hlen",data:{administrativeDistrictIds:[]}});this._dialogService.open(sBe,e).onClose.pipe(vt(i=>i?this._createFilterForSelectedAdministrativeDistrictIds(i):null),Mn(i=>i?this._clinicsFilterService.result(i):ci([]))).subscribe(i=>this._addToSelection(i.map(o=>o.clinic.id)))}importClinicsByPostalCodes(){let e=mt(be({},ju),{header:"Postleitzahlen ausw\xE4hlen",data:{postalCodes:[]}});this._dialogService.open(aBe,e).onClose.pipe(vt(i=>i?this._createFilterForSelectedPostalCodes(i):null),Mn(i=>i?this._clinicsFilterService.result(i):ci([]))).subscribe(i=>this._addToSelection(i.map(o=>o.clinic.id)))}importViaClinicDistance(){let e=mt(be({},ju),{header:"Kliniken \xFCber Distanz importieren"});this._dialogService.open(dBe,e).onClose.pipe(Sn(1)).subscribe({next:i=>{i&&this._addToSelection(i)}})}importViaClinicDrivingTime(){let e=mt(be({},ju),{header:"Kliniken \xFCber Fahrzeit importieren"});this._dialogService.open(uBe,e).onClose.pipe(Sn(1)).subscribe(i=>{i&&this._addToSelection(i)})}_addToSelection(e){this.loading$.next(Gt.LOADING),this._loadSelectionAndAllPossibleClinicsWithoutSelection(Ui.unique(this.selection.map(i=>i.id).concat(e),i=>i.sn)).subscribe(i=>{this.selection=i.selection,this.selectionChange.emit(this.selection),this.allPossibleClinics=i.allPossibleClinicsWithoutSelection,this.notification=i.notification,this.loading$.next(Gt.SUCCESS)})}_createFilterForSelectedAdministrativeDistrictIds(e){return new uf(null,null,null,null,null,new lf(e))}_createFilterForSelectedPostalCodes(e){return new uf(null,null,null,null,null,new df(e))}static{this.\u0275fac=function(i){return new(i||t)(_e(cl),_e(Hs),_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-select-list"]],inputs:{titleText:"titleText",initialSelection:"initialSelection",filterClinicFn:"filterClinicFn"},outputs:{selectionChange:"selectionChange"},features:[jt([Mo]),Ot],decls:3,vars:2,consts:[["successTpl",""],["menu",""],["list",""],[3,"loadItem","successTemplate"],[1,"flex","flex-col","gap-4"],[1,"flex","flex-row","justify-end"],["label","Importieren","severity","secondary","outlined","",3,"click"],[3,"model","popup"],[1,"flex","flex-row","gap-6"],[1,"flex-1"],["targetHeader","Alle Kliniken Deutschlands","filterBy","name,nameOfOwner,id.ik,id.sn,address.street,address.city","scrollHeight","22rem",3,"onMoveToTarget","onMoveAllToTarget","onMoveToSource","onMoveAllToSource","source","sourceHeader","sourceStyle","trackBy","target","targetStyle","showSourceControls","showTargetControls"],["pTemplate","item"],["pTemplate","sourceHeader"],["pTemplate","targetHeader"],[1,"flex","flex-col"],[1,"font-bold"],[1,"flex","flex-row","gap-2"],[1,"font-light"]],template:function(i,o){if(i&1&&(ce(0,"bd-loader",3),ee(1,fBt,12,10,"ng-template",null,0,Pt)),i&2){let r=ti(2);E("loadItem",o.loading$)("successTemplate",r)}},dependencies:[Kn,rBe,so,ja,yS],encapsulation:2})}}return t})();var mM=class t extends ga{static fromObj(n){let e=n.clinicId;return new t(e.ik,e.sn,n.key,n.year)}constructor(n,e,i,o){super(n,e,o),this.ik=n,this.sn=e,this.key=i,this.year=o}},i8=class t{static fromObjArr(n){return n.map(t.fromObj)}static fromObj(n){return new t(mM.fromObj(n.id),n.name,n.fabKey,n.fullyInpatientCases,n.semiInpatientCases)}constructor(n,e,i,o,r){this.id=n,this.name=e,this.fabKey=i,this.fullyInpatientCases=o,this.semiInpatientCases=r}};var gm=(()=>{class t{constructor(e,i){this._httpClient=e,this._environmentService=i,this._store=new FN(this._environmentService)}get(e){let i=this._store.specialtyDepartment(e);return this._httpClient.get(i).pipe(vt(i8.fromObj))}getByClinicId(e){let i=this._store.clinicSpecialtyDepartments(e);return this._httpClient.get(i).pipe(vt(o=>i8.fromObjArr(o)))}caseNumbers(e){let i=this._store.specialtyDepartmentCaseNumbers(e);return this._httpClient.get(i)}codes(e,i,o){let r=new Pr;return r=r.set("page",o.pageIndex.toString()),r=r.set("size","10"),this._fetchCodes(e,i,r)}codesWithParams(e,i,o){return this._fetchCodes(e,i,o)}_fetchCodes(e,i,o){let r=i==="ICD-10-GM"||i==="OPS",s=this._store.specialtyDepartmentCodes(e,i,r);return this._httpClient.get(s,{params:o}).pipe(vt(d=>i==="ICD-10-GM"||i==="OPS"?(d.content=y2.fromObjArr(d.content),d):y2.fromObjArr(d)))}staffing(e){let i=this._store.specialtyDepartmentStaffing(e);return this._httpClient.get(i).pipe(vt(mE.fromObject))}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var nZ=class{constructor(n){this._environmentService=n}indexResource(){return`${this._environmentService.load("AYS_FAB_RESOURCE_URL")}/`}byFabKeyResource(n){return`${this.indexResource()}${n}`}};var qu=(()=>{class t{constructor(e,i){this._http=e,this._environmentService=i,this._store=new nZ(this._environmentService)}index(){let e=this._store.indexResource();return this._http.get(e).pipe(vt(i=>i.map(o=>new Xt(o.fabKey,o.name))))}get(e){let i=this._store.byFabKeyResource(e);return this._http.get(i).pipe(Sn(1),vt(o=>new Xt(o.fabKey,o.name)))}getAll(e){let i=e.map(o=>nr(this.get(o)).pipe(Gd(()=>ci(null))));return tc(i).pipe(vt(o=>o.filter(r=>!!r).reduce((r,s)=>(r[s.fabKey]=s,r),{})))}static{this.\u0275fac=function(i){return new(i||t)(di(Ia),di(qr))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var pBe=(()=>{class t{constructor(e){this._fabService=e}transform(e){return this._fabService.get(e).pipe(vt(i=>i.name))}static{this.\u0275fac=function(i){return new(i||t)(_e(qu,16))}}static{this.\u0275pipe=Dd({name:"fabKey",type:t,pure:!0})}}return t})();var As=class{constructor(n,e){this.specialityName=n,this.specialityId=e}parent(){let n=this.specialityId.slice(0,3).concat("0");return _Bt.find(e=>e.specialityId===n)}},_Bt=[new As("Allgemeinchirurgie","1000"),new As("Allgemeinmedizin","1100"),new As("An\xE4sthesiologie","1200"),new As("Arbeitsmedizin","1300"),new As("Augenheilkunde","1400"),new As("Biochemie","1500"),new As("Diagnostische Radiologie","1600"),new As("Frauenheilkunde und Geburtshilfe","1700"),new As("Gef\xE4\xDFchirurgie","1800"),new As("Hals-Nasen-Ohrenheilkunde","1900"),new As("Haut- und Geschlechtskrankheiten","2000"),new As("Herzchirurgie","2100"),new As("Humangenetik","2200"),new As("Hygiene und Umweltmedizin","2300"),new As("Innere Medizin","2400"),new As("Angiologie","2401"),new As("Endokrinologie und Diabetologie","2402"),new As("Gastroenterologie","2403"),new As("Geriatrie","2404"),new As("H\xE4matologie und Onkologie","2405"),new As("Kardiologie","2406"),new As("Nephrologie","2407"),new As("Pneumologie","2408"),new As("Rheumatologie","2409"),new As("Mund-Kiefer-Gesichtschirurgie","2500"),new As("Kinderheilkunde / Kinder- und Jugendmedizin","2600"),new As("Kinderchirurgie","2700"),new As("Pharmakologie und Toxikologie","2800"),new As("Laboratoriumsmedizin","2900"),new As("Mikrobiologie","3000"),new As("Neurochirurgie","3100"),new As("Neurologie","3200"),new As("Neurologie und Psychiatrie","3300"),new As("Neuropathologie","3400"),new As("Nuklearmedizin","3500"),new As("Orthop\xE4die und Unfallchirurgie","3600"),new As("Pathologie","3700"),new As("Phoniatrie und P\xE4daudiologie","3800"),new As("Physikalische und Rehabilitative Medizin","3900"),new As("Plastische Chirurgie","4000"),new As("Psychiatrie und Psychotherapie","4100"),new As("Rechtsmedizin","4200"),new As("Strahlentherapie","4300"),new As("Thoraxchirurgie","4400"),new As("Transfusionsmedizin","4500"),new As("Urologie","4600"),new As("Virologie","4700"),new As("Viszeralchirurgie","4800")];var ws=class{constructor(n,e,i,o,r){this.specialityName=n,this.children=e,this.level=i,this.expandable=o,this.specialityId=r}},yBt=[new ws("Allgemeinchirurgie",[],0,!1,"1000"),new ws("Allgemeinmedizin",[],0,!1,"1100"),new ws("An\xE4sthesiologie",[],0,!1,"1200"),new ws("Arbeitsmedizin",[],0,!1,"1300"),new ws("Augenheilkunde",[],0,!1,"1400"),new ws("Biochemie",[],0,!1,"1500"),new ws("Diagnostische Radiologie",[],0,!1,"1600"),new ws("Frauenheilkunde und Geburtshilfe",[],0,!1,"1700"),new ws("Gef\xE4\xDFchirurgie",[],0,!1,"1800"),new ws("Hals-Nasen-Ohrenheilkunde",[],0,!1,"1900"),new ws("Haut- und Geschlechtskrankheiten",[],0,!1,"2000"),new ws("Herzchirurgie",[],0,!1,"2100"),new ws("Humangenetik",[],0,!1,"2200"),new ws("Hygiene und Umweltmedizin",[],0,!1,"2300"),new ws("Innere Medizin",[new ws("Angiologie",[],1,!1,"2401"),new ws("Endokrinologie und Diabetologie",[],1,!1,"2402"),new ws("Gastroenterologie",[],1,!1,"2403"),new ws("Geriatrie",[],1,!1,"2404"),new ws("H\xE4matologie und Onkologie",[],1,!1,"2405"),new ws("Kardiologie",[],1,!1,"2406"),new ws("Nephrologie",[],1,!1,"2407"),new ws("Pneumologie",[],1,!1,"2408"),new ws("Rheumatologie",[],1,!1,"2409")],0,!0,"2400"),new ws("Mund-Kiefer-Gesichtschirurgie",[],0,!1,"2500"),new ws("Kinderheilkunde / Kinder- und Jugendmedizin",[],0,!1,"2600"),new ws("Kinderchirurgie",[],0,!1,"2700"),new ws("Pharmakologie und Toxikologie",[],0,!1,"2800"),new ws("Laboratoriumsmedizin",[],0,!1,"2900"),new ws("Mikrobiologie",[],0,!1,"3000"),new ws("Neurochirurgie",[],0,!1,"3100"),new ws("Neurologie",[],0,!1,"3200"),new ws("Neurologie und Psychiatrie",[],0,!1,"3300"),new ws("Neuropathologie",[],0,!1,"3400"),new ws("Nuklearmedizin",[],0,!1,"3500"),new ws("Orthop\xE4die und Unfallchirurgie",[],0,!1,"3600"),new ws("Pathologie",[],0,!1,"3700"),new ws("Phoniatrie und P\xE4daudiologie",[],0,!1,"3800"),new ws("Physikalische und Rehabilitative Medizin",[],0,!1,"3900"),new ws("Plastische Chirurgie",[],0,!1,"4000"),new ws("Psychiatrie und Psychotherapie",[],0,!1,"4100"),new ws("Rechtsmedizin",[],0,!1,"4200"),new ws("Strahlentherapie",[],0,!1,"4300"),new ws("Thoraxchirurgie",[],0,!1,"4400"),new ws("Transfusionsmedizin",[],0,!1,"4500"),new ws("Urologie",[],0,!1,"4600"),new ws("Virologie",[],0,!1,"4700"),new ws("Viszeralchirurgie",[],0,!1,"4800")];function CBt(t,n){if(t&1){let e=tt();k(0,"bd-interval-relative-input",1),ie("relativeIntervalChange",function(o){se(e);let r=P();return ae(r.onIntervalChange(o))}),D()}if(t&2){let e=P();E("relativeInterval",e.timeSelection==null?null:e.timeSelection.intervalRelative)}}function xBt(t,n){if(t&1){let e=tt();k(0,"bd-interval-relative-input-inline",2),ie("relativeIntervalChange",function(o){se(e);let r=P();return ae(r.onIntervalChange(o))})("moreOptionsChange",function(){se(e);let o=P();return ae(o.moreOptionsChange.emit())}),D()}if(t&2){let e=P();E("relativeInterval",e.timeSelection==null?null:e.timeSelection.intervalRelative)}}var oZ=(()=>{class t{constructor(){this.inputType="form",this.timeSelectionChange=new ve,this.moreOptionsChange=new ve}onIntervalChange(e){this.timeSelection?this.timeSelection.intervalRelative=e:this.timeSelection=new Nw(e),this.timeSelectionChange.emit(this.timeSelection)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-virtual-clinic-analysis-time-selection-relative"]],inputs:{inputType:"inputType",timeSelection:"timeSelection"},outputs:{timeSelectionChange:"timeSelectionChange",moreOptionsChange:"moreOptionsChange"},decls:2,vars:2,consts:[[3,"relativeInterval"],[3,"relativeIntervalChange","relativeInterval"],[3,"relativeIntervalChange","moreOptionsChange","relativeInterval"]],template:function(i,o){i&1&&(qe(0,CBt,1,1,"bd-interval-relative-input",0),qe(1,xBt,1,1,"bd-interval-relative-input-inline",0)),i&2&&(Ke(o.inputType==="form"?0:-1),T(),Ke(o.inputType==="inline"?1:-1))},dependencies:[Wke,Xke],encapsulation:2})}}return t})();var rZ=(()=>{class t{constructor(){this.timeSelectionChange=new ve,this.moreOptionsChange=new ve}onIntervalChange(e){this.timeSelection?this.timeSelection.interval=e:this.timeSelection=new hy(e),this.timeSelectionChange.emit(this.timeSelection)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-virtual-clinic-analysis-time-selection-calendric"]],inputs:{timeSelection:"timeSelection"},outputs:{timeSelectionChange:"timeSelectionChange",moreOptionsChange:"moreOptionsChange"},decls:1,vars:1,consts:[[3,"intervalChange","moreOptionsChange","interval"]],template:function(i,o){i&1&&(k(0,"bd-interval-calendric-input",0),ie("intervalChange",function(s){return o.onIntervalChange(s)})("moreOptionsChange",function(){return o.moreOptionsChange.emit()}),D()),i&2&&E("interval",o.timeSelection==null?null:o.timeSelection.interval)},dependencies:[Dke],encapsulation:2})}}return t})();function wBt(t,n){if(t&1){let e=tt();k(0,"ays-virtual-clinic-analysis-time-selection-calendric",6),ie("timeSelectionChange",function(o){se(e);let r=P();return ae(r.onTimeSelectionChange(o))}),D()}if(t&2){let e=P();E("timeSelection",e.timeSelectionAsCalendric(e.timeSelection))}}function SBt(t,n){if(t&1){let e=tt();k(0,"ays-virtual-clinic-analysis-time-selection-relative",6),ie("timeSelectionChange",function(o){se(e);let r=P();return ae(r.onTimeSelectionChange(o))}),D()}if(t&2){let e=P();E("timeSelection",e.timeSelectionAsRelative(e.timeSelection))}}var hBe=(()=>{class t{constructor(){this.placeholderText="Zeitraum",this.timeSelectionChange=new ve,this.typeOptions=[{type:"relative",displayName:"Relativ"},{type:"calendric",displayName:"Kalendarisch"}]}onTimeSelectionChange(e){this.timeSelection=e,this.timeSelectionChange.emit(e)}onTimeSelectionTypeChange(e){let i;e==="calendric"?i=new hy(jp.byUnit("previous-year")):i=new Nw(new Ch({temporalUnit:"year",count:1},{temporalUnit:"year",count:1})),this.onTimeSelectionChange(i)}timeSelectionAsCalendric(e){return e}timeSelectionAsRelative(e){return e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-virtual-clinic-analysis-time-selection-dialog-form"]],inputs:{placeholderText:"placeholderText",timeSelection:"timeSelection"},outputs:{timeSelectionChange:"timeSelectionChange"},decls:9,vars:5,consts:[[1,"flex","flex-col","lg:flex-row","gap-0","lg:gap-6","items-center"],[1,"flex-1/4"],["inputId","virtual-clinic-analysis-time-selection-type-select","fluid","","variant","filled","optionLabel","displayName","optionValue","type",3,"onChange","options","ngModel"],["for","virtual-clinic-analysis-time-selection-type-select"],[1,"flex-1"],[3,"timeSelection"],[3,"timeSelectionChange","timeSelection"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"p-iftalabel")(3,"p-select",2),ie("onChange",function(s){return o.onTimeSelectionTypeChange(s.value)}),D(),k(4,"label",3),Q(5),D()()(),k(6,"div",4),qe(7,wBt,1,1,"ays-virtual-clinic-analysis-time-selection-calendric",5),qe(8,SBt,1,1,"ays-virtual-clinic-analysis-time-selection-relative",5),D()()),i&2&&(T(3),E("options",o.typeOptions)("ngModel",o.timeSelection==null?null:o.timeSelection.type),T(2),dt(o.placeholderText),T(2),Ke((o.timeSelection==null?null:o.timeSelection.type)==="calendric"?7:-1),T(),Ke((o.timeSelection==null?null:o.timeSelection.type)==="relative"?8:-1))},dependencies:[Ra,rZ,oZ,as,Ql,hr,no,Lr],encapsulation:2})}}return t})();function TBt(t,n){if(t&1){let e=tt();k(0,"ays-virtual-clinic-analysis-time-selection-dialog-form",11),ie("timeSelectionChange",function(o){se(e);let r=P(2);return ae(r.onTimeSelectionChange("timeSelectionComparison",o))}),D()}if(t&2){let e=P(2);E("timeSelection",e.config.data.timeSelectionComparison)}}function IBt(t,n){if(t&1){let e=tt();k(0,"div",3),ce(1,"mat-divider"),D(),k(2,"div",3)(3,"span",4),Q(4,"Vergleichszeitraum"),D(),qe(5,TBt,1,1,"ays-virtual-clinic-analysis-time-selection-dialog-form",9),D(),k(6,"div",3)(7,"mat-slide-toggle",10),ie("change",function(o){se(e);let r=P();return ae(r.onShowTimeSelectionComparisonChange(o))}),Q(8," Vergleichszeitraum anzeigen "),D()()}if(t&2){let e=P();T(5),Ke(e.config.data.timeSelectionComparison?5:-1),T(2),E("checked",!!e.config.data.timeSelectionComparison)}}function EBt(t,n){if(t&1&&(k(0,"div",3),ce(1,"mat-divider"),D(),k(2,"div",3)(3,"span",4),Q(4,"Verf\xFCgbarer Zeitraum"),D(),ce(5,"bd-loader",12),D()),t&2){let e=P(),i=ti(17),o=ti(19);T(5),E("loadItem",e.loadingAvailableDateRangeInfo$)("successTemplate",i)("customLoadingTemplate",o)}}function DBt(t,n){if(t&1){let e=tt();k(0,"div")(1,"button",8),ie("click",function(){se(e);let o=P(2);return ae(o.useAvailableDateRangeInfo("timeSelectionComparison"))}),Q(2," Als Vergleichszeitraum festlegen "),D()()}}function ABt(t,n){if(t&1){let e=tt();k(0,"div")(1,"div",13)(2,"span",14),Q(3),D(),k(4,"div")(5,"button",8),ie("click",function(){se(e);let o=P();return ae(o.useAvailableDateRangeInfo("timeSelection"))}),Q(6),D()(),qe(7,DBt,3,0,"div"),D()()}if(t&2){let e=P();T(3),dt(e.availableDateRangeInfo.toCompactDateString()),T(3),Qi(" Als ",e.config.data.timeSelectionComparison?"Analyse Zeitraum":"Zeitraum"," festlegen "),T(),Ke(e.config.data.enableTimeSelectionComparison?7:-1)}}function kBt(t,n){t&1&&(k(0,"div",18),ce(1,"p-skeleton",17),D())}function MBt(t,n){if(t&1&&(k(0,"div",15)(1,"div",13)(2,"div"),ce(3,"p-skeleton",16),D(),k(4,"div"),ce(5,"p-skeleton",17),D(),qe(6,kBt,2,0,"div",18),D()()),t&2){let e=P();T(6),Ke(e.config.data.enableTimeSelectionComparison?6:-1)}}var mBe=(()=>{class t{constructor(e,i){this.ref=e,this.config=i,this.loadingAvailableDateRangeInfo$=new pi(1)}ngOnInit(){this.config.data.availableDateRangeInfo&&(this.loadingAvailableDateRangeInfo$.next(Gt.LOADING),this.config.data.availableDateRangeInfo.subscribe({next:e=>{this.availableDateRangeInfo=e,this.loadingAvailableDateRangeInfo$.next(Gt.SUCCESS)},error:()=>this.loadingAvailableDateRangeInfo$.next(Gt.ERROR)}))}onTimeSelectionChange(e,i){this.config.data[e]=i}onShowTimeSelectionComparisonChange(e){e.checked?this.config.data.timeSelectionComparison=new Nw(new Ch({temporalUnit:"year",count:1},{temporalUnit:"year",count:1})):this.config.data.timeSelectionComparison=null}useAvailableDateRangeInfo(e){this.onTimeSelectionChange(e,new hy(this.availableDateRangeInfo))}static{this.\u0275fac=function(i){return new(i||t)(_e(es),_e(Us))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-virtual-clinic-analysis-time-selection-dialog"]],decls:20,vars:5,consts:[["successTpl",""],["loadingTpl",""],[1,"flex","flex-col","gap-6"],[1,"flex-1"],[1,"mat-subheading-2"],[3,"timeSelectionChange","placeholderText","timeSelection"],[1,"flex","flex-row-reverse","gap-6"],["mat-raised-button","","color","accent",3,"click"],["mat-button","",3,"click"],["placeholderText","Vergleichszeitraum",3,"timeSelection"],[3,"change","checked"],["placeholderText","Vergleichszeitraum",3,"timeSelectionChange","timeSelection"],[3,"loadItem","successTemplate","customLoadingTemplate"],[1,"flex","flex-col","lg:flex-row","gap-0","lg:gap-6","items-center","lg:items-stretch"],[1,"flex-1","mat-body"],[1,"bd-container"],["height","36px"],["width","140px","height","36px"],[1,"basis-1/4"]],template:function(i,o){if(i&1){let r=tt();k(0,"div")(1,"div",2)(2,"div",3)(3,"span",4),Q(4),D(),k(5,"ays-virtual-clinic-analysis-time-selection-dialog-form",5),ie("timeSelectionChange",function(d){return se(r),ae(o.onTimeSelectionChange("timeSelection",d))}),D()(),qe(6,IBt,9,2),qe(7,EBt,6,3),k(8,"div",3)(9,"div",6)(10,"div")(11,"button",7),ie("click",function(){return se(r),ae(o.ref.close(o.config.data))}),Q(12," Zeitraum \xFCbernehmen "),D()(),k(13,"div")(14,"button",8),ie("click",function(){return se(r),ae(o.ref.close(null))}),Q(15,"Abbrechen"),D()()()()()(),ee(16,ABt,8,3,"ng-template",null,0,Pt)(18,MBt,7,1,"ng-template",null,1,Pt)}i&2&&(T(4),dt(o.config.data.enableTimeSelectionComparison?"Analyse Zeitraum":"Zeitraum"),T(),E("placeholderText",o.config.data.enableTimeSelectionComparison?"Analyse Zeitraum":"Zeitraum")("timeSelection",o.config.data.timeSelection),T(),Ke(o.config.data.enableTimeSelectionComparison?6:-1),T(),Ke(o.config.data.availableDateRangeInfo?7:-1))},dependencies:[hBe,il,Gl,Jke,Qae,Kn,Tn,yo,of,mm],encapsulation:2})}}return t})();function OBt(t,n){t&1&&(k(0,"span",2),Q(1,"Analyse Zeitraum"),D())}function RBt(t,n){if(t&1){let e=tt();k(0,"ays-virtual-clinic-analysis-time-selection-calendric",5),ie("timeSelectionChange",function(o){se(e);let r=P();return ae(r.onTimeSelectionChange(o))})("moreOptionsChange",function(){se(e);let o=P();return ae(o.onOpenSettingsDialog())}),D()}if(t&2){let e=P();E("timeSelection",e.asCalendric(e.timeSelection))}}function FBt(t,n){if(t&1){let e=tt();k(0,"ays-virtual-clinic-analysis-time-selection-relative",6),ie("timeSelectionChange",function(o){se(e);let r=P();return ae(r.onTimeSelectionChange(o))})("moreOptionsChange",function(){se(e);let o=P();return ae(o.onOpenSettingsDialog())}),D()}if(t&2){let e=P();E("timeSelection",e.asRelative(e.timeSelection))}}function PBt(t,n){if(t&1){let e=tt();k(0,"ays-virtual-clinic-analysis-time-selection-calendric",7),ie("timeSelectionChange",function(o){se(e);let r=P();return ae(r.onTimeSelectionChange(o))})("moreOptionsChange",function(){se(e);let o=P();return ae(o.onOpenSettingsDialog())}),D()}}function LBt(t,n){if(t&1){let e=tt();k(0,"ays-virtual-clinic-analysis-time-selection-calendric",5),ie("timeSelectionChange",function(o){se(e);let r=P(2);return ae(r.onTimeSelectionComparisonChange(o))})("moreOptionsChange",function(){se(e);let o=P(2);return ae(o.onOpenSettingsDialog())}),D()}if(t&2){let e=P(2);E("timeSelection",e.asCalendric(e.timeSelectionComparison))}}function NBt(t,n){if(t&1){let e=tt();k(0,"ays-virtual-clinic-analysis-time-selection-relative",6),ie("timeSelectionChange",function(o){se(e);let r=P(2);return ae(r.onTimeSelectionComparisonChange(o))})("moreOptionsChange",function(){se(e);let o=P(2);return ae(o.onOpenSettingsDialog())}),D()}if(t&2){let e=P(2);E("timeSelection",e.asRelative(e.timeSelectionComparison))}}function BBt(t,n){if(t&1&&(k(0,"div",1)(1,"span",2),Q(2,"Vergleichszeitraum"),D(),qe(3,LBt,1,1,"ays-virtual-clinic-analysis-time-selection-calendric",3),qe(4,NBt,1,1,"ays-virtual-clinic-analysis-time-selection-relative",4),D()),t&2){let e=P();T(3),Ke((e.timeSelectionComparison==null?null:e.timeSelectionComparison.type)==="calendric"?3:-1),T(),Ke((e.timeSelectionComparison==null?null:e.timeSelectionComparison.type)==="relative"?4:-1)}}var fBe=(()=>{class t{constructor(e){this._dialogService=e,this.enableTimeSelectionComparison=!1,this.timeSelectionChange=new ve,this.timeSelectionComparisonChange=new ve}onTimeSelectionChange(e){this.timeSelection=e.clone(),this.timeSelectionChange.emit(e.clone())}onTimeSelectionComparisonChange(e){this.timeSelectionComparison=e.clone(),this.timeSelectionComparisonChange.emit(e.clone())}onOpenSettingsDialog(){let e=mt(be({},rc),{header:"Zeitraum festlegen",data:{timeSelection:this.timeSelection?.clone(),timeSelectionComparison:this.timeSelectionComparison?.clone(),availableDateRangeInfo:this.availableDateRangeInfo,enableTimeSelectionComparison:this.enableTimeSelectionComparison}});this._dialogService.open(mBe,e).onClose.pipe(wn(i=>!!i)).subscribe(i=>{this.onTimeSelectionChange(i?.timeSelection),this.onTimeSelectionComparisonChange(i?.timeSelectionComparison)})}asCalendric(e){return e}asRelative(e){return e}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-virtual-clinic-analysis-time-selection"]],inputs:{enableTimeSelectionComparison:"enableTimeSelectionComparison",timeSelection:"timeSelection",timeSelectionComparison:"timeSelectionComparison",availableDateRangeInfo:"availableDateRangeInfo"},outputs:{timeSelectionChange:"timeSelectionChange",timeSelectionComparisonChange:"timeSelectionComparisonChange"},features:[jt([qf,Mo])],decls:7,vars:3,consts:[[1,"flex","flex-row"],[1,"flex-1"],[1,"mat-caption"],[3,"timeSelection"],["inputType","inline",3,"timeSelection"],[3,"timeSelectionChange","moreOptionsChange","timeSelection"],["inputType","inline",3,"timeSelectionChange","moreOptionsChange","timeSelection"],[3,"timeSelectionChange","moreOptionsChange"]],template:function(i,o){if(i&1&&(k(0,"div",0)(1,"div",1),qe(2,OBt,2,0,"span",2),qe(3,RBt,1,1,"ays-virtual-clinic-analysis-time-selection-calendric",3)(4,FBt,1,1,"ays-virtual-clinic-analysis-time-selection-relative",4)(5,PBt,1,0,"ays-virtual-clinic-analysis-time-selection-calendric"),D(),qe(6,BBt,5,2,"div",1),D()),i&2){let r;T(2),Ke(o.enableTimeSelectionComparison?2:-1),T(),Ke((r=o.timeSelection==null?null:o.timeSelection.type)==="calendric"?3:r==="relative"?4:5),T(3),Ke(o.enableTimeSelectionComparison&&o.timeSelectionComparison?6:-1)}},dependencies:[rZ,oZ,Tn,$o],encapsulation:2})}}return t})();var zr=new fi("FILTER_REGISTRATION");var gBe=(()=>{class t{constructor(e){this.clinicSizePipe=e,this.pluginChange=new ve,this.config={id:"clinic-size-select",selectLabel:"Klinik Gr\xF6\xDFe",valid$:new pi(1),option:{sortFnc:(i,o)=>i.clinicSize-o.clinicSize,uniqueFnc:i=>i.clinicSize.toString(),searchOptionAccessor:i=>i.displayName}},this.initial=[],this.options=ci([{clinicSize:_x.SMALL,displayName:this.clinicSizePipe.transform(_x.SMALL)},{clinicSize:_x.MEDIUM,displayName:this.clinicSizePipe.transform(_x.MEDIUM)},{clinicSize:_x.LARGE,displayName:this.clinicSizePipe.transform(_x.LARGE)},{clinicSize:_x.EXTRA_LARGE,displayName:this.clinicSizePipe.transform(_x.EXTRA_LARGE)}])}ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({clinicSize:e,displayName:this.clinicSizePipe.transform(e)}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onSizeChange(e){this.pluginChange.emit(new q2([...e.map(i=>i.clinicSize)]))}static{this.\u0275fac=function(i){return new(i||t)(_e(LN))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-clinic-size"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([LN]),Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onSizeChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.initial)},dependencies:[_a],encapsulation:2})}}return t})();var _Be=(()=>{class t{constructor(e){this.clinicTypePipe=e,this.pluginChange=new ve,this.config={selectLabel:"Tr\xE4gerart",valid$:new pi(1),option:{sortFnc:(i,o)=>i.clinicType.localeCompare(o.clinicType),uniqueFnc:i=>i.clinicType,searchOptionAccessor:i=>i.displayName}},this.initial=[],this.options=ci([{clinicType:Xw.PUBLIC,displayName:this.clinicTypePipe.transform(Xw.PUBLIC)},{clinicType:Xw.PRIVATE,displayName:this.clinicTypePipe.transform(Xw.PRIVATE)},{clinicType:Xw.NONPROFIT,displayName:this.clinicTypePipe.transform(Xw.NONPROFIT)}])}ngOnInit(){this.initial=this.plugin.toValue().map(e=>({clinicType:e,displayName:this.clinicTypePipe.transform(e)}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onClinicTypeChange(e){this.pluginChange.emit(new pS([...e.map(i=>i.clinicType)]))}static{this.\u0275fac=function(i){return new(i||t)(_e(Wc))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-clinic-type"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Wc]),Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onClinicTypeChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.initial)},dependencies:[_a],encapsulation:2})}}return t})();var yBe=(()=>{class t{constructor(){this.pluginChange=new ve}onTimeSelectionChange(e){this.pluginChange.emit(new lN(e))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-dismissal-date"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:1,vars:1,consts:[[3,"timeSelectionChange","timeSelection"]],template:function(i,o){i&1&&(k(0,"ays-virtual-clinic-analysis-time-selection",0),ie("timeSelectionChange",function(s){return o.onTimeSelectionChange(s)}),D()),i&2&&E("timeSelection",o.plugin.toValue())},dependencies:[fBe],encapsulation:2})}}return t})();var vBe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"Jahr",valid$:new pi(1),option:{sortFnc:(i,o)=>o-i,uniqueFnc:i=>i.toString(),searchOptionAccessor:i=>i.toString()}};let e=new Date().getFullYear();this.options=ci(new Array(10).fill(null).map((i,o)=>e-o))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onSelectionChange(e){this.pluginChange.emit(new Ty(e))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-dismissal-year"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-single-select",0),ie("selection",function(s){return o.onSelectionChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.plugin==null?null:o.plugin.toValue())},dependencies:[jl],encapsulation:2})}}return t})();var bBe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"Jahr",valid$:new pi(1),option:{sortFnc:(i,o)=>o-i,uniqueFnc:i=>i.toString(),searchOptionAccessor:i=>i.toString()}};let e=new Date().getFullYear();this.options=ci(new Array(10).fill(null).map((i,o)=>e-o))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onSelectionChange(e){this.pluginChange.emit(new K6(e))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-dismissal-years"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onSelectionChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.plugin==null?null:o.plugin.toValue())},dependencies:[_a],encapsulation:2})}}return t})();function VBt(t,n){if(t&1){let e=tt();k(0,"p-tree",5),ie("selectionChange",function(o){se(e);let r=P();return ae(r.onSelection(o))}),D()}if(t&2){let e=P();E("value",e.nodes)("selection",e.treeSelection)("propagateSelectionUp",!0)("filter",!0)}}var CBe=(()=>{class t{constructor(e,i){this.ref=i,this.loading$=new pi(1),this.nodes=[],this.treeSelection=[],this.selection=[],this.loading$.next(Gt.LOADING),this.selection=e.data.selection,this.treeSelection=e.data.selection.map(o=>({type:"fabKey",key:o})),e.data.options.subscribe(o=>{this.nodes=o.sort((r,s)=>r.sortingIndex-s.sortingIndex).map(r=>{let s=r.options.some(d=>e.data.selection.includes(d.fabKey));return{type:"group",key:r.name,label:r.name,selectable:!1,partialSelected:s,leaf:!1,children:r.options.map(d=>({type:"fabKey",key:d.fabKey,label:`${d.fabKey} - ${d.name}`,leaf:!0,selectable:!0}))}}),this.loading$.next(Gt.SUCCESS)})}onSelection(e){Array.isArray(e)?(this.treeSelection=e,this.selection=e.map(i=>i.key)):(this.treeSelection=[e],this.selection=[e.key])}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:9,vars:3,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-button","","color","accent",3,"click","disabled"],["selectionMode","checkbox","filterMode","strict","filterPlaceholder","Suche nach \xA7301 Fachabteilungsschl\xFCssel","filterBy","key,label","emptyMessage","Keine \xA7301 Fachabteilungsschl\xFCssel gefunden",3,"selectionChange","value","selection","propagateSelectionUp","filter"]],template:function(i,o){if(i&1){let r=tt();k(0,"div"),ce(1,"bd-loader",1),D(),k(2,"div",2)(3,"button",3),ie("click",function(){return se(r),ae(o.ref.close())}),Q(4,"Abbrechen"),D(),k(5,"button",4),ie("click",function(){return se(r),ae(o.ref.close(o.selection))}),Q(6," \xDCbernehmen "),D()(),ee(7,VBt,1,4,"ng-template",null,0,Pt)}if(i&2){let r=ti(8);T(),E("loadItem",o.loading$)("successTemplate",r),T(4),E("disabled",!o.selection)}},dependencies:[Kn,Tn,yo,Cy,c_],encapsulation:2,changeDetection:0})}}return t})();var xBe=(()=>{class t{constructor(e,i){this._fabService=e,this._virtualClinicService=i,this.virtualClinicSpecificFabKeyGroups={},this.generalFabKeyGroups=this._generalFabKeyGroups().pipe(du(1))}virtualClinicFabKeyGroup(e){return this.virtualClinicSpecificFabKeyGroups[e]||(this.virtualClinicSpecificFabKeyGroups[e]=this._virtualClinicFabKeyGroup(e).pipe(du(1))),this.virtualClinicSpecificFabKeyGroups[e]}_generalFabKeyGroups(){return this._fabService.index().pipe(vt(e=>({name:"Allgemein",disabled:!1,options:e.sort((i,o)=>i.fabKey.localeCompare(o.fabKey)),sortingIndex:100})))}_virtualClinicFabKeyGroup(e){return this._virtualClinicService?tc([this._fabService.index(),this._virtualClinicService.findById(e).pipe(Mn(i=>nr(this._virtualClinicService.getSpecialtyDepartments(e)).pipe(vt(o=>({specialtyDepartments:o,virtualClinic:i})))))]).pipe(vt(i=>({generalFabKeys:i[0],virtualClinicObj:i[1]})),vt(i=>{let o=Ui.unique(i.virtualClinicObj.specialtyDepartments,r=>r.fabKey).map(r=>{let s=i.generalFabKeys.find(d=>d.fabKey===r.fabKey);return new Xt(r.fabKey,s?.name??r?.name??`Fachabteilung ${r.fabKey}`)}).sort((r,s)=>r.fabKey.localeCompare(s.fabKey));return{name:i.virtualClinicObj.virtualClinic.name,disabled:!1,options:o,sortingIndex:1}})):this._generalFabKeyGroups()}static{this.\u0275fac=function(i){return new(i||t)(di(qu),di(hf,8))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function UBt(t,n){if(t&1&&(k(0,"mat-hint"),Q(1),D()),t&2){let e=P();T(),dt(e.plugin==null?null:e.plugin.validationToText())}}var wBe=(()=>{class t{constructor(e,i,o){this._dialogService=e,this._cdr=i,this._fabKeyCacheService=o,this.pluginConfig={virtualClinicIds:[],mode:"AUTOMATIC"},this.pluginChange=new ve,this.displayValue="",this._fabKeys=[]}ngOnChanges(e){e.plugin&&(this._fabKeys=this.plugin.toValue(),this._onFabKeysChanged())}openEditDialog(e){e.stopPropagation();let i=mt(be({},rc),{header:"\xA7301 Fachabteilungsschl\xFCssel",data:{options:this.fetchOptions(),selection:[...this._fabKeys]}});this._dialogService.open(CBe,i).onClose.pipe(wn(o=>!!o)).subscribe(o=>{this.onSelectionChange(o)})}onSelectionChange(e){Ui.equals(this._fabKeys,e)||(this._fabKeys=[...e],this._onFabKeysChanged(),this.pluginChange.emit(new cf([...e])))}fetchOptions(){let e=ci([]),i=ci([]);switch(this.pluginConfig.mode){case"ONLY_GENERAL_FAB_KEYS":{i=this._generalFabKeyGroups();break}case"ONLY_VIRTUAL_CLINIC_FAB_KEYS":{e=this._virtualClinicFabKeyGroups();break}default:{e=this._virtualClinicFabKeyGroups(),i=this._generalFabKeyGroups();break}}return tc([i,e]).pipe(vt(o=>o.reduce((r,s)=>[...r,...s])))}_onFabKeysChanged(){this._fabKeys.length===1?this._fabKeyCacheService.generalFabKeyGroups.pipe(vt(e=>e.options),vt(e=>e.find(i=>i.fabKey===this._fabKeys[0])),vt(e=>e?`${e.fabKey} - ${e.name}`:this._fabKeys[0])).subscribe(e=>{this.displayValue=e,this._cdr.markForCheck()}):this._fabKeys.length>1?this._fabKeyCacheService.generalFabKeyGroups.pipe(vt(e=>e.options),vt(e=>e.find(i=>i.fabKey===this._fabKeys[0])),vt(e=>e?`${e.fabKey} - ${e.name}`:this._fabKeys[0])).subscribe(e=>{this.displayValue=`${e} und ${this._fabKeys.length-1} weitere`,this._cdr.markForCheck()}):(this.displayValue="",this._cdr.markForCheck())}_virtualClinicFabKeyGroups(){return this.pluginConfig.virtualClinicIds&&this.pluginConfig.virtualClinicIds.length>0?tc(this.pluginConfig.virtualClinicIds.map(e=>this._virtualClinicFabKeyGroup(e))):ci([])}_virtualClinicFabKeyGroup(e){return this._fabKeyCacheService.virtualClinicFabKeyGroup(e)}_generalFabKeyGroups(){return this._fabKeyCacheService.generalFabKeyGroups.pipe(vt(e=>[e]))}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo),_e(Gi),_e(xBe))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-fab-keys"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo]),Ot],decls:5,vars:5,consts:[["matInput","","placeholder","\xA7301 Fachabteilungsschl\xFCssel",3,"click","value","readonly"],["matSuffix",""]],template:function(i,o){i&1&&(k(0,"mat-form-field")(1,"input",0),ie("click",function(s){return o.openEditDialog(s)}),D(),k(2,"mat-icon",1),Q(3,"arrow_drop_down"),D(),qe(4,UBt,2,1,"mat-hint"),D()),i&2&&(Vn("custom-invalid",!o.pluginValid),T(),E("value",o.displayValue)("readonly",!0),T(3),Ke(o.pluginValid?-1:4))},dependencies:[Ra,rs,mu,mp,pl,Fa,$o,mr],encapsulation:2,changeDetection:0})}}return t})();var HBt=["*"],SBe=(()=>{class t{constructor(e){this._cdr=e,this.expressionTitle="",this.allowedNewCombinations=["or","and"],this.expressionFn=new ve,this.items=[{label:"L\xF6schen",icon:"pi pi-trash",command:()=>this.deleteExpression()},{label:"Kombinieren",icon:"pi pi-plus",items:[{label:`${this.expressionTitle} UND weitere`,command:()=>this.asAndCombination()},{label:`${this.expressionTitle} ODER weitere`,command:()=>this.asOrCombination()}]}]}asAndCombination(){this.expressionFn.emit(e=>new x0([e])),this._cdr.markForCheck()}asOrCombination(){this.expressionFn.emit(e=>new Mx([e])),this._cdr.markForCheck()}deleteExpression(){this.expression=null,this.expressionFn.emit(()=>null)}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-plugin-wrapper"]],inputs:{expression:"expression",expressionTitle:"expressionTitle",allowedNewCombinations:"allowedNewCombinations"},outputs:{expressionFn:"expressionFn"},ngContentSelectors:HBt,decls:9,vars:5,consts:[["button",""],["menu",""],[1,"flex","flex-row","group","items-center"],[1,"flex-1"],[1,"mat-body"],["icon","pi pi-ellipsis-v",3,"click","rounded","text"],["appendTo","body","id","filter-condition-plugin-menu",3,"model","popup"]],template:function(i,o){if(i&1){let r=tt();Nn(),k(0,"div",2)(1,"div",3)(2,"div",4),Q(3),D(),pn(4),D(),k(5,"p-button",5,0),ie("click",function(d){se(r);let m=ti(8);return ae(m.toggle(d))}),D(),ce(7,"p-tieredMenu",6,1),D()}i&2&&(T(3),dt(o.expressionTitle),T(2),E("rounded",!0)("text",!0),T(2),E("model",o.items)("popup",!0))},dependencies:[yS,ja],encapsulation:2,changeDetection:0})}}return t})();var GCo=new fi("FILTER_CONDITION_FORM_DATA"),JE=class extends dr{constructor(n){super(),this._formData=n,this.possiblePluginTypes=[],this.expressionConfig={},this.expressionChange$=new hi,this.expressionValueChange$=new hi,this.expressionConfig=n.expressionConfig,this.possiblePluginTypes=n.possiblePluginTypes}init(n){this.expression=n}};var TBe=(()=>{class t{constructor(e){this._cdr=e,this.possiblePluginTypes=[],this.typeAdded=new ve,this.config={selectLabel:"weitere Filter hinzuf\xFCgen",resetOption:!1,optionGroup:{uniqueFnc:i=>i.name,sortFnc:(i,o)=>!i||!o?i?-1:1:i.name.localeCompare(o.name),searchOptionAccessor:i=>i.name},option:{uniqueFnc:i=>i.type,sortFnc:(i,o)=>i.sortingIndex===o.sortingIndex?i.name.localeCompare(o.name):i.sortingIndex-o.sortingIndex,searchOptionAccessor:i=>i.name}}}ngOnChanges(e){this._updateOptions()}_updateOptions(){let e=this.expression.expression.map(d=>d.type),i=[],o=this.possiblePluginTypes.filter(d=>d.category==="person").filter(d=>this._filterPluginBy(d,e)).map(d=>({name:d.displayName.de,type:d.type,sortingIndex:d.sortingIndex})),r=this.possiblePluginTypes.filter(d=>d.category==="case").filter(d=>this._filterPluginBy(d,e)).map(d=>({name:d.displayName.de,type:d.type,sortingIndex:d.sortingIndex})),s=this.possiblePluginTypes.filter(d=>d.category==="clinic").filter(d=>this._filterPluginBy(d,e)).map(d=>({name:d.displayName.de,type:d.type,sortingIndex:d.sortingIndex}));o.length>0&&i.push({name:"Geografische Merkmale",options:o}),r.length>0&&i.push({name:"Falldaten",options:r}),s.length>0&&i.push({name:"Klinik",options:s}),this.selectOptions=ci(i),this._cdr.markForCheck()}onNewPluginTypeSelected(e){this.typeAdded.emit(e.type)}_filterPluginBy(e,i){return this.expression.kind==="AND"?e.occurrence==="multiple"||!i.includes(e.type):!0}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-add-wizard"]],inputs:{expression:"expression",possiblePluginTypes:"possiblePluginTypes"},outputs:{typeAdded:"typeAdded"},features:[Ot],decls:6,vars:3,consts:[[1,"flex-1","opacity-20","hover:opacity-100"],[1,"flex","flex-row","gap-2","items-center"],[1,"flex-none","w-12","mat-body"],[1,"flex-grow"],[3,"selection","config","selectOptions"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"div",2),Q(3),D(),k(4,"div",3)(5,"bd-ui-single-select-option-group",4),ie("selection",function(s){return o.onNewPluginTypeSelected(s)}),D()()()()),i&2&&(T(3),dt(o.expression.kindToText()),T(2),E("config",o.config)("selectOptions",o.selectOptions))},dependencies:[NRe],encapsulation:2,changeDetection:0})}}return t})();function jBt(t,n){}function GBt(t,n){if(t&1){let e=tt();ee(0,jBt,0,0,"ng-template",2),ie("attached",function(o){se(e);let r=P();return ae(r.onPortalComponentAttached(o))})}if(t&2){let e=P();E("cdkPortalOutlet",e.componentPortal)}}var sZ=(()=>{class t extends JE{constructor(e,i){super(e),this._cdr=i,this.loading$=new pi(1),this.componentPortal=void 0,this._ref$=new hi,this.loading$.next(Gt.LOADING),this._subs.push(this._ref$.pipe(Mn(o=>o.expressionChange$)).subscribe(o=>{this.loading$.next(Gt.LOADING),o?(this.expression=o.clone(),this._createPortal(be({},this._formData))):(this.expression=$a.EMPTY(),this.loading$.next(Gt.SUCCESS)),this.expressionChange$.next(o)})),this._subs.push(this._ref$.pipe(Mn(o=>o.expressionValueChange$)).subscribe(o=>{this.expressionValueChange$.next(o)}))}ngOnInit(){this._createPortal(this._formData)}ngOnDestroy(){this.unsubscribeAll()}onPortalComponentAttached(e){let i=e.instance;i.init(this.expression.clone()),this._ref$.next(i),this._cdr.markForCheck()}_createPortal(e){console.debug("_createPortal",this.expression.type),this.expression.type==="combination"?this.componentPortal=new tg(aZ,void 0,Oo.create({providers:[{provide:"FILTER_CONDITION_FORM_DATA",useValue:e}]})):this.componentPortal=new tg(this._formData.pluginFormComponent,void 0,Oo.create({providers:[{provide:"FILTER_CONDITION_FORM_DATA",useValue:e}]})),this.loading$.next(Gt.SUCCESS),this._cdr.markForCheck()}static{this.\u0275fac=function(i){return new(i||t)(_e("FILTER_CONDITION_FORM_DATA"),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],features:[ft],decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"attached","cdkPortalOutlet"]],template:function(i,o){if(i&1&&(ce(0,"bd-loader",1),ee(1,GBt,1,1,"ng-template",null,0,Pt)),i&2){let r=ti(2);E("loadItem",o.loading$)("successTemplate",r)}},dependencies:[Wg,r0,Kn],encapsulation:2,changeDetection:0})}}return t})();function $Bt(t,n){}function qBt(t,n){if(t&1){let e=tt();k(0,"div",1)(1,"div",3)(2,"div",4),Q(3),D(),k(4,"div",5),ee(5,$Bt,0,0,"ng-template",6),ie("attached",function(o){let r=se(e),s=r.$implicit,d=r.$index,m=P();return ae(m.attachChildPortal(o,d,s))}),D()()()}if(t&2){let e=n.$index,i=P();T(3),Qi(" ",e===0?"":i.expression.kindToText()," "),T(2),E("cdkPortalOutlet",i.genericChildComponent)}}var aZ=(()=>{class t extends JE{constructor(e,i,o){super(e),this._filterConditionMapping=i,this._cdr=o,this.expression={},this.expressionValid=!0,this.shadowCopyExpression=[],this.genericChildComponent=new tg(sZ,void 0,Oo.create({providers:[{provide:"FILTER_CONDITION_FORM_DATA",useValue:this._formData}]}))}ngOnDestroy(){this.unsubscribeAll()}init(e){super.init(e),this._updateValidState(this.expression),this.shadowCopyExpression=e.clone().expression,this._cdr.markForCheck()}attachChildPortal(e,i,o){let r=e.instance;r.expression=o,this._subs.push(r.expressionChange$.subscribe(s=>{console.debug("[child] expressionChange",s),this._onChildExpressionChange(i,s),this._cdr.markForCheck()})),this._subs.push(r.expressionValueChange$.subscribe(s=>{console.debug("[child] expressionValueChange",s),this._onChildExpressionValueChange(i,s),this._cdr.markForCheck()}))}onNewPluginTypeSelected(e){let i=this._filterConditionMapping.find(o=>o.filterType===e);i?i.filterConditionPluginSpecification.newInstance().then(o=>{this.expression.expression.push(o),this.expression=this.expression.clone(),this._updateValidState(this.expression),this.expressionChange$.next(this.expression.clone())}):console.debug("new plugin type not registered",e,this._filterConditionMapping)}_onChildExpressionValueChange(e,i){this.expression.expression[e]=i.clone(),this.expressionValueChange$.next(this.expression.clone()),this._updateValidState(this.expression)}_onChildExpressionChange(e,i){i?this.expression.expression[e]=i.clone():this.expression.expression.splice(e,1),this.expression.expression.length===0?this.expressionChange$.next(null):this.expressionChange$.next(this.expression.clone()),this._updateValidState(this.expression)}_updateValidState(e){this.expressionValid=e.valid()}static{this.\u0275fac=function(i){return new(i||t)(_e("FILTER_CONDITION_FORM_DATA"),_e(zr),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-combination-form"]],features:[ft],decls:4,vars:4,consts:[[1,"filter-expression","filter-expression-combination","flex","flex-col","gap-2"],[1,"flex-1"],[3,"typeAdded","expression","possiblePluginTypes"],[1,"flex","flex-row","gap-2"],[1,"flex-none","w-12","mat-body"],[1,"flex-grow"],[3,"attached","cdkPortalOutlet"]],template:function(i,o){i&1&&(k(0,"div",0),lo(1,qBt,6,2,"div",1,jo),k(3,"filter-condition-add-wizard",2),ie("typeAdded",function(s){return o.onNewPluginTypeSelected(s)}),D()()),i&2&&(Vn("filter-expression-combination-invalid",!o.expressionValid),T(),co(o.shadowCopyExpression),T(2),E("expression",o.expression)("possiblePluginTypes",o.possiblePluginTypes))},dependencies:[TBe,Wg,r0],styles:[".filter-expression-combination[_ngcontent-%COMP%]{border-left-color:var(--p-divider-border-color);border-left-style:solid;border-left-width:1px;border-top-color:transparent;border-top-style:solid;border-top-width:1px;border-bottom-color:transparent;border-bottom-style:solid;border-bottom-width:1px;padding-left:20px;padding-top:4px;padding-bottom:4px}.filter-expression-combination-invalid[_ngcontent-%COMP%]{border-left-color:var(--p-form-field-invalid-border-color)!important;border-left-style:dashed!important}.filter-expression-combination[_ngcontent-%COMP%]:hover:not(:has(.filter-expression-combination:hover)){border-left-color:orange;border-top:1px dashed orange;border-bottom:1px dashed orange}.filter-expression-combination-invalid[_ngcontent-%COMP%]:hover:not(:has(.filter-expression-combination-invalid:hover)){border-left-color:var(--p-form-field-invalid-border-color);border-top:1px dashed var(--p-form-field-invalid-border-color);border-bottom:1px dashed var(--p-form-field-invalid-border-color)}"],changeDetection:0})}}return t})();var KBt=["container"],IBe=(()=>{class t{constructor(e,i){this._registeredFilter=e,this._cdr=i,this.possiblePluginTypes=[],this.expressionConfig={},this.allowedNewCombinations=["or","and"],this.expressionChange=new ve,this.expressionValueChange=new ve,this.expressionTitle="",this.expressionValid=!0,this.vcr=PA("container",{read:nc}),this._currentExpression=null}ngOnInit(){this.expressionValid=this.expression.valid(),this._currentExpression=this.expression.clone();let e=this._findFilterRegistrationByType(this.expression.type);if(e){this.expressionTitle=e.filterConditionPluginSpecification.displayName.de;let i=this._getComponentImplementation(),o=Q9(i),r=this.expressionConfig[e.filterType];this._componentRef=this.vcr().createComponent(i),this._componentRef.setInput("plugin",this.expression),this._componentRef.setInput("pluginValid",this.expressionValid),r&&this._componentRef.setInput("pluginConfig",r),this.virtualClinicId&&o.inputs.some(d=>d.propName==="virtualClinicId")&&this._componentRef.setInput("virtualClinicId",this.virtualClinicId),this._componentRef.instance.pluginChange.subscribe(s=>{this.onExpressionValueChange(s),this.expressionValid=s.valid(),this._currentExpression=s.clone(),this._componentRef.setInput("pluginValid",this.expressionValid)})}}ngOnDestroy(){this.vcr().clear()}onExpressionFn(e=null){this.expressionChange.emit(e(this._currentExpression))}onExpressionValueChange(e){this.expressionValueChange.emit(e)}_getComponentImplementation(){switch(this.expression.type){case"combination":return aZ;default:{let e=this._findFilterRegistrationByType(this.expression.type);return e?e.filterConditionComponent:null}}}_findFilterRegistrationByType(e){return this._registeredFilter.filter(i=>this.possiblePluginTypes.some(o=>o.type===i.filterType)).find(i=>i.filterType===e)}static{this.\u0275fac=function(i){return new(i||t)(_e(zr),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-common-form"]],viewQuery:function(i,o){i&1&&oI(o.vcr,KBt,5,nc),i&2&&Z0()},inputs:{virtualClinicId:"virtualClinicId",expression:"expression",possiblePluginTypes:"possiblePluginTypes",expressionConfig:"expressionConfig",allowedNewCombinations:"allowedNewCombinations"},outputs:{expressionChange:"expressionChange",expressionValueChange:"expressionValueChange"},decls:4,vars:5,consts:[["container",""],[1,"filter-expression-plugin"],[3,"expressionFn","expression","allowedNewCombinations","expressionTitle"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",1)(1,"filter-condition-plugin-wrapper",2),ie("expressionFn",function(d){return se(r),ae(o.onExpressionFn(d))}),ui(2,null,0),D()()}i&2&&(Vn("filter-expression-plugin-invalid",!o.expressionValid),T(),E("expression",o.expression)("allowedNewCombinations",o.allowedNewCombinations)("expressionTitle",o.expressionTitle))},dependencies:[SBe],styles:[".filter-expression-plugin[_ngcontent-%COMP%]{border-left-color:transparent;border-left-style:solid;border-left-width:3px;padding-left:4px}.filter-expression-plugin-invalid[_ngcontent-%COMP%]{border-left-color:var(--p-form-field-invalid-border-color);border-left-style:dashed}"],changeDetection:0})}}return t})();function WBt(t,n){if(t&1&&(k(0,"small",2),Q(1),D()),t&2){let e=P();E("id",e.pluginId),T(),dt(e.pluginValidationMessage)}}var EBe=(()=>{class t{constructor(){this.pluginId="filter-condition-expression-plugin-summary",this.pluginSummary="",this.pluginValidationMessage=null,this.pluginChangeClick=new ve}onEditPlugin(e){e.stopPropagation(),this.pluginChangeClick.emit()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-expression-plugin-summary"]],inputs:{pluginId:"pluginId",pluginValid:"pluginValid",pluginSummary:"pluginSummary",pluginValidationMessage:"pluginValidationMessage"},outputs:{pluginChangeClick:"pluginChangeClick"},decls:5,vars:5,consts:[["pInputText","","variant","filled","fluid","","readonly","",1,"mb-4","cursor-pointer",3,"click","id","invalid","ngModel"],["variant","text","icon","pi pi-angle-down",3,"onClick","severity"],[1,"font-light","text-xs",3,"id"]],template:function(i,o){i&1&&(k(0,"p-inputgroup")(1,"input",0),ie("click",function(s){return o.onEditPlugin(s)}),D(),k(2,"p-inputgroup-addon")(3,"p-button",1),ie("onClick",function(s){return o.onEditPlugin(s)}),D()()(),qe(4,WBt,2,2,"small",2)),i&2&&(T(),E("id",o.pluginId)("invalid",!o.pluginValid)("ngModel",o.pluginSummary),T(2),E("severity",o.pluginValid?"secondary":"danger"),T(),Ke(o.pluginValidationMessage?4:-1))},dependencies:[ja,nE,iE,fu,xr,Ml,no,hr,Lr],encapsulation:2})}}return t})();var DBe=` .p-accordionpanel { display: flex; flex-direction: column; border-style: solid; border-width: dt('accordion.panel.border.width'); border-color: dt('accordion.panel.border.color'); } .p-accordionheader { all: unset; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: dt('accordion.header.padding'); color: dt('accordion.header.color'); background: dt('accordion.header.background'); border-style: solid; border-width: dt('accordion.header.border.width'); border-color: dt('accordion.header.border.color'); font-weight: dt('accordion.header.font.weight'); border-radius: dt('accordion.header.border.radius'); transition: background dt('accordion.transition.duration'), color dt('accordion.transition.duration'), outline-color dt('accordion.transition.duration'), box-shadow dt('accordion.transition.duration'); outline-color: transparent; } .p-accordionpanel:first-child > .p-accordionheader { border-width: dt('accordion.header.first.border.width'); border-start-start-radius: dt('accordion.header.first.top.border.radius'); border-start-end-radius: dt('accordion.header.first.top.border.radius'); } .p-accordionpanel:last-child > .p-accordionheader { border-end-start-radius: dt('accordion.header.last.bottom.border.radius'); border-end-end-radius: dt('accordion.header.last.bottom.border.radius'); } .p-accordionpanel:last-child.p-accordionpanel-active > .p-accordionheader { border-end-start-radius: dt('accordion.header.last.active.bottom.border.radius'); border-end-end-radius: dt('accordion.header.last.active.bottom.border.radius'); } .p-accordionheader-toggle-icon { color: dt('accordion.header.toggle.icon.color'); } .p-accordionpanel:not(.p-disabled) .p-accordionheader:focus-visible { box-shadow: dt('accordion.header.focus.ring.shadow'); outline: dt('accordion.header.focus.ring.width') dt('accordion.header.focus.ring.style') dt('accordion.header.focus.ring.color'); outline-offset: dt('accordion.header.focus.ring.offset'); } .p-accordionpanel:not(.p-accordionpanel-active):not(.p-disabled) > .p-accordionheader:hover { background: dt('accordion.header.hover.background'); color: dt('accordion.header.hover.color'); } .p-accordionpanel:not(.p-accordionpanel-active):not(.p-disabled) .p-accordionheader:hover .p-accordionheader-toggle-icon { color: dt('accordion.header.toggle.icon.hover.color'); } .p-accordionpanel:not(.p-disabled).p-accordionpanel-active > .p-accordionheader { background: dt('accordion.header.active.background'); color: dt('accordion.header.active.color'); } .p-accordionpanel:not(.p-disabled).p-accordionpanel-active > .p-accordionheader .p-accordionheader-toggle-icon { color: dt('accordion.header.toggle.icon.active.color'); } .p-accordionpanel:not(.p-disabled).p-accordionpanel-active > .p-accordionheader:hover { background: dt('accordion.header.active.hover.background'); color: dt('accordion.header.active.hover.color'); } .p-accordionpanel:not(.p-disabled).p-accordionpanel-active > .p-accordionheader:hover .p-accordionheader-toggle-icon { color: dt('accordion.header.toggle.icon.active.hover.color'); } .p-accordioncontent-content { border-style: solid; border-width: dt('accordion.content.border.width'); border-color: dt('accordion.content.border.color'); background-color: dt('accordion.content.background'); color: dt('accordion.content.color'); padding: dt('accordion.content.padding'); } `;var lZ=["*"],YBt=["toggleicon"],QBt=t=>({active:t});function ZBt(t,n){}function XBt(t,n){t&1&&ee(0,ZBt,0,0,"ng-template")}function JBt(t,n){if(t&1&&ee(0,XBt,1,0,null,0),t&2){let e=P();E("ngTemplateOutlet",e.toggleicon)("ngTemplateOutletContext",ki(2,QBt,e.active()))}}function eVt(t,n){if(t&1&&ce(0,"span",4),t&2){let e=P(3);Oe(e.pcAccordion.collapseIcon),E("ngClass",e.pcAccordion.iconClass),Ge("aria-hidden",!0)}}function tVt(t,n){if(t&1&&(si(),ce(0,"svg",5)),t&2){let e=P(3);Oe(e.pcAccordion.iconClass),Ge("aria-hidden",!0)}}function iVt(t,n){if(t&1&&(Di(0),ee(1,eVt,1,4,"span",2)(2,tVt,1,3,"svg",3),Ai()),t&2){let e=P(2);T(),E("ngIf",e.pcAccordion.collapseIcon),T(),E("ngIf",!e.pcAccordion.collapseIcon)}}function nVt(t,n){if(t&1&&ce(0,"span",4),t&2){let e=P(3);Oe(e.pcAccordion.expandIcon),E("ngClass",e.pcAccordion.iconClass),Ge("aria-hidden",!0)}}function oVt(t,n){if(t&1&&(si(),ce(0,"svg",7)),t&2){let e=P(3);Oe(e.pcAccordion.iconClass),Ge("aria-hidden",!0)}}function rVt(t,n){if(t&1&&(Di(0),ee(1,nVt,1,4,"span",2)(2,oVt,1,3,"svg",6),Ai()),t&2){let e=P(2);T(),E("ngIf",e.pcAccordion.expandIcon),T(),E("ngIf",!e.pcAccordion.expandIcon)}}function sVt(t,n){if(t&1&&ee(0,iVt,3,2,"ng-container",1)(1,rVt,3,2,"ng-container",1),t&2){let e=P();E("ngIf",e.active()),T(),E("ngIf",!e.active())}}var ABe=t=>({transitionParams:t}),aVt=t=>({value:"visible",params:t}),lVt=t=>({value:"hidden",params:t}),cVt=` ${DBe} /*For PrimeNG*/ .p-accordionpanel:not(.p-accordionpanel-active) > .p-accordioncontent, .p-accordioncontent-content.ng-animating { overflow: hidden; } .p-accordionheader-toggle-icon.icon-start { order: -1; } .p-accordionheader:has(.p-accordionheader-toggle-icon.icon-start) { justify-content: flex-start; gap: dt('accordion.header.padding'); } .p-accordioncontent.ng-animating { overflow: hidden; } `,dVt={root:"p-accordion p-component",panel:({instance:t})=>["p-accordionpanel",{"p-accordionpanel-active":t.active(),"p-disabled":t.disabled()}],header:"p-accordionheader",toggleicon:"p-accordionheader-toggle-icon",contentContainer:"p-accordioncontent",content:"p-accordioncontent-content"},eD=(()=>{class t extends io{name="accordion";theme=cVt;classes=dVt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var fM=(()=>{class t extends oo{pcAccordion=re(Ko(()=>tD));value=X0(void 0);disabled=mo(!1,{transform:e=>m2(e)});active=bo(()=>this.pcAccordion.multiple()?this.valueEquals(this.pcAccordion.value(),this.value()):this.pcAccordion.value()===this.value());valueEquals(e,i){return Array.isArray(e)?e.includes(i):e===i}_componentStyle=re(eD);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-accordion-panel"],["p-accordionpanel"]],hostVars:5,hostBindings:function(i,o){i&2&&(Ge("data-pc-name","accordionpanel")("data-p-disabled",o.disabled())("data-p-active",o.active()),Oe(o.cx("panel")))},inputs:{value:[1,"value"],disabled:[1,"disabled"]},outputs:{value:"valueChange"},features:[jt([eD]),ft],ngContentSelectors:lZ,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On],encapsulation:2,changeDetection:0})}return t})(),n8=(()=>{class t extends oo{pcAccordion=re(Ko(()=>tD));pcAccordionPanel=re(Ko(()=>fM));id=bo(()=>`${this.pcAccordion.id()}_accordionheader_${this.pcAccordionPanel.value()}`);active=bo(()=>this.pcAccordionPanel.active());disabled=bo(()=>this.pcAccordionPanel.disabled());ariaControls=bo(()=>`${this.pcAccordion.id()}_accordioncontent_${this.pcAccordionPanel.value()}`);toggleicon;onClick(e){let i=this.active();this.changeActiveValue();let o=this.active(),r=this.pcAccordionPanel.value();!i&&o?this.pcAccordion.onOpen.emit({originalEvent:e,index:r}):i&&!o&&this.pcAccordion.onClose.emit({originalEvent:e,index:r})}onFocus(){this.pcAccordion.selectOnFocus()&&this.changeActiveValue()}onKeydown(e){switch(e.code){case"ArrowDown":this.arrowDownKey(e);break;case"ArrowUp":this.arrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":case"Space":case"NumpadEnter":this.onEnterKey(e);break;default:break}}_componentStyle=re(eD);changeActiveValue(){this.pcAccordion.updateValue(this.pcAccordionPanel.value())}findPanel(e){return e?.closest('[data-pc-name="accordionpanel"]')}findHeader(e){return zo(e,'[data-pc-name="accordionheader"]')}findNextPanel(e,i=!1){let o=i?e:e.nextElementSibling;return o?p0(o,"data-p-disabled")?this.findNextPanel(o):this.findHeader(o):null}findPrevPanel(e,i=!1){let o=i?e:e.previousElementSibling;return o?p0(o,"data-p-disabled")?this.findPrevPanel(o):this.findHeader(o):null}findFirstPanel(){return this.findNextPanel(this.pcAccordion.el.nativeElement.firstElementChild,!0)}findLastPanel(){return this.findPrevPanel(this.pcAccordion.el.nativeElement.lastElementChild,!0)}changeFocusedPanel(e,i){ss(i)}arrowDownKey(e){let i=this.findNextPanel(this.findPanel(e.currentTarget));i?this.changeFocusedPanel(e,i):this.onHomeKey(e),e.preventDefault()}arrowUpKey(e){let i=this.findPrevPanel(this.findPanel(e.currentTarget));i?this.changeFocusedPanel(e,i):this.onEndKey(e),e.preventDefault()}onHomeKey(e){let i=this.findFirstPanel();this.changeFocusedPanel(e,i),e.preventDefault()}onEndKey(e){let i=this.findLastPanel();this.changeFocusedPanel(e,i),e.preventDefault()}onEnterKey(e){this.changeActiveValue(),e.preventDefault()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-accordion-header"],["p-accordionheader"]],contentQueries:function(i,o,r){if(i&1&&xt(r,YBt,5),i&2){let s;Le(s=Ne())&&(o.toggleicon=s.first)}},hostVars:13,hostBindings:function(i,o){i&1&&ie("click",function(s){return o.onClick(s)})("focus",function(s){return o.onFocus(s)})("keydown",function(s){return o.onKeydown(s)}),i&2&&(Ge("id",o.id())("aria-expanded",o.active())("aria-controls",o.ariaControls())("aria-disabled",o.disabled())("role","button")("tabindex",o.disabled()?"-1":"0")("data-p-active",o.active())("data-p-disabled",o.disabled())("data-pc-name","accordionheader"),Oe(o.cx("header")),Ir("user-select","none"))},features:[jt([eD]),X1([Ul]),ft],ngContentSelectors:lZ,decls:3,vars:1,consts:[[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf"],[3,"class","ngClass",4,"ngIf"],["data-p-icon","chevron-up",3,"class",4,"ngIf"],[3,"ngClass"],["data-p-icon","chevron-up"],["data-p-icon","chevron-down",3,"class",4,"ngIf"],["data-p-icon","chevron-down"]],template:function(i,o){i&1&&(Nn(),pn(0),qe(1,JBt,1,4)(2,sVt,2,2)),i&2&&(T(),Ke(o.toggleicon?1:2))},dependencies:[On,Ns,Fr,Lo,sm,zK],encapsulation:2,changeDetection:0})}return t})(),o8=(()=>{class t extends oo{pcAccordion=re(Ko(()=>tD));pcAccordionPanel=re(Ko(()=>fM));active=bo(()=>this.pcAccordionPanel.active());ariaLabelledby=bo(()=>`${this.pcAccordion.id()}_accordionheader_${this.pcAccordionPanel.value()}`);id=bo(()=>`${this.pcAccordion.id()}_accordioncontent_${this.pcAccordionPanel.value()}`);_componentStyle=re(eD);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-accordion-content"],["p-accordioncontent"]],hostVars:7,hostBindings:function(i,o){i&2&&(Ge("id",o.id())("role","region")("data-pc-name","accordioncontent")("data-p-active",o.active())("aria-labelledby",o.ariaLabelledby()),Oe(o.cx("contentContainer")))},features:[jt([eD]),ft],ngContentSelectors:lZ,decls:2,vars:11,template:function(i,o){i&1&&(Nn(),k(0,"div"),pn(1),D()),i&2&&(Oe(o.cx("content")),E("@content",o.active()?ki(5,aVt,ki(3,ABe,o.pcAccordion.transitionOptions)):ki(9,lVt,ki(7,ABe,o.pcAccordion.transitionOptions))))},dependencies:[On],encapsulation:2,data:{animation:[xh("content",[u0("hidden",al({height:"0",paddingBlockStart:"0",paddingBlockEnd:"0",borderBlockStartWidth:"0",borderBlockEndWidth:"0",visibility:"hidden"})),u0("visible",al({height:"*"})),Rc("visible <=> hidden",[uc("{{transitionParams}}")]),Rc("void => *",uc(0))])]},changeDetection:0})}return t})(),tD=(()=>{class t extends oo{value=X0(void 0);multiple=mo(!1,{transform:e=>m2(e)});styleClass;expandIcon;collapseIcon;selectOnFocus=mo(!1,{transform:e=>m2(e)});transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)";onClose=new ve;onOpen=new ve;id=Zn(Vr("pn_id_"));_componentStyle=re(eD);onKeydown(e){switch(e.code){case"ArrowDown":this.onTabArrowDownKey(e);break;case"ArrowUp":this.onTabArrowUpKey(e);break;case"Home":e.shiftKey||this.onTabHomeKey(e);break;case"End":e.shiftKey||this.onTabEndKey(e);break}}onTabArrowDownKey(e){let i=this.findNextHeaderAction(e.target.parentElement);i?this.changeFocusedTab(i):this.onTabHomeKey(e),e.preventDefault()}onTabArrowUpKey(e){let i=this.findPrevHeaderAction(e.target.parentElement);i?this.changeFocusedTab(i):this.onTabEndKey(e),e.preventDefault()}onTabHomeKey(e){let i=this.findFirstHeaderAction();this.changeFocusedTab(i),e.preventDefault()}changeFocusedTab(e){e&&ss(e)}findNextHeaderAction(e,i=!1){let o=i?e:e.nextElementSibling,r=zo(o,'[data-pc-section="accordionheader"]');return r?p0(r,"data-p-disabled")?this.findNextHeaderAction(r.parentElement):zo(r.parentElement,'[data-pc-section="accordionheader"]'):null}findPrevHeaderAction(e,i=!1){let o=i?e:e.previousElementSibling,r=zo(o,'[data-pc-section="accordionheader"]');return r?p0(r,"data-p-disabled")?this.findPrevHeaderAction(r.parentElement):zo(r.parentElement,'[data-pc-section="accordionheader"]'):null}findFirstHeaderAction(){let e=this.el.nativeElement.firstElementChild;return this.findNextHeaderAction(e,!0)}findLastHeaderAction(){let e=this.el.nativeElement.lastElementChild;return this.findPrevHeaderAction(e,!0)}onTabEndKey(e){let i=this.findLastHeaderAction();this.changeFocusedTab(i),e.preventDefault()}getBlockableElement(){return this.el.nativeElement.children[0]}updateValue(e){let i=this.value();if(this.multiple()){let o=Array.isArray(i)?[...i]:[],r=o.indexOf(e);r!==-1?o.splice(r,1):o.push(e),this.value.set(o)}else i===e?this.value.set(void 0):this.value.set(e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-accordion"]],hostVars:2,hostBindings:function(i,o){i&1&&ie("keydown",function(s){return o.onKeydown(s)}),i&2&&Oe(o.cn(o.cx("root"),o.styleClass))},inputs:{value:[1,"value"],multiple:[1,"multiple"],styleClass:"styleClass",expandIcon:"expandIcon",collapseIcon:"collapseIcon",selectOnFocus:[1,"selectOnFocus"],transitionOptions:"transitionOptions"},outputs:{value:"valueChange",onClose:"onClose",onOpen:"onOpen"},features:[jt([eD]),ft],ngContentSelectors:lZ,decls:1,vars:0,template:function(i,o){i&1&&(Nn(),pn(0))},dependencies:[On,In],encapsulation:2,changeDetection:0})}return t})(),cZ=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[tD,In,fM,n8,o8,In]})}return t})();var uVt=["colgroup"],pVt=["caption"],hVt=["header"],mVt=["body"],fVt=["footer"],gVt=["summary"],_Vt=["emptymessage"],yVt=["paginatorleft"],vVt=["paginatorright"],bVt=["paginatordropdownitem"],CVt=["frozenheader"],xVt=["frozenbody"],wVt=["frozenfooter"],SVt=["frozencolgroup"],TVt=["loadingicon"],IVt=["reorderindicatorupicon"],EVt=["reorderindicatordownicon"],DVt=["sorticon"],AVt=["checkboxicon"],kVt=["headercheckboxicon"],MVt=["togglericon"],OVt=["paginatorfirstpagelinkicon"],RVt=["paginatorlastpagelinkicon"],FVt=["paginatorpreviouspagelinkicon"],PVt=["paginatornextpagelinkicon"],LVt=["loader"],NVt=["resizeHelper"],BVt=["reorderIndicatorUp"],VVt=["reorderIndicatorDown"],zVt=["table"],UVt=["scrollableView"],HVt=["scrollableFrozenView"],CS=t=>({$implicit:t}),jVt=(t,n)=>({left:t,width:n}),GVt=(t,n)=>[t,n],$Vt=t=>({width:t});function qVt(t,n){if(t&1&&ce(0,"i"),t&2){let e=P(2);Oe(e.cn(e.cx("loadingIcon"),"pi-spin"+e.loadingIcon))}}function KVt(t,n){if(t&1&&(si(),ce(0,"svg",11)),t&2){let e=P(3);Oe(e.cx("loadingIcon")),E("spin",!0)}}function WVt(t,n){}function YVt(t,n){t&1&&ee(0,WVt,0,0,"ng-template")}function QVt(t,n){if(t&1&&(k(0,"span"),ee(1,YVt,1,0,null,12),D()),t&2){let e=P(3);Oe(e.cx("loadingIcon")),T(),E("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function ZVt(t,n){if(t&1&&(Di(0),ee(1,KVt,1,3,"svg",10)(2,QVt,2,3,"span",6),Ai()),t&2){let e=P(2);T(),E("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),T(),E("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function XVt(t,n){if(t&1&&(k(0,"div")(1,"div"),ee(2,qVt,1,2,"i",6)(3,ZVt,3,2,"ng-container",9),D()()),t&2){let e=P();Oe(e.cx("loading")),T(),Oe(e.cx("mask")),T(),E("ngIf",e.loadingIcon),T(),E("ngIf",!e.loadingIcon)}}function JVt(t,n){t&1&&ui(0)}function e4t(t,n){if(t&1&&(k(0,"div"),ee(1,JVt,1,0,"ng-container",12),D()),t&2){let e=P();Oe(e.cx("header")),T(),E("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function t4t(t,n){t&1&&ui(0)}function i4t(t,n){if(t&1&&ee(0,t4t,1,0,"ng-container",12),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function n4t(t,n){t&1&&ee(0,i4t,1,1,"ng-template",14)}function o4t(t,n){t&1&&ui(0)}function r4t(t,n){if(t&1&&ee(0,o4t,1,0,"ng-container",12),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function s4t(t,n){t&1&&ee(0,r4t,1,1,"ng-template",15)}function a4t(t,n){t&1&&ui(0)}function l4t(t,n){if(t&1&&ee(0,a4t,1,0,"ng-container",12),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function c4t(t,n){t&1&&ee(0,l4t,1,1,"ng-template",16)}function d4t(t,n){t&1&&ui(0)}function u4t(t,n){if(t&1&&ee(0,d4t,1,0,"ng-container",12),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function p4t(t,n){t&1&&ee(0,u4t,1,1,"ng-template",17)}function h4t(t,n){if(t&1){let e=tt();k(0,"p-paginator",13),ie("onPageChange",function(o){se(e);let r=P();return ae(r.onPageChange(o))}),ee(1,n4t,1,0,null,9)(2,s4t,1,0,null,9)(3,c4t,1,0,null,9)(4,p4t,1,0,null,9),D()}if(t&2){let e=P();E("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("styleClass",e.cx("pcPaginator"))("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate??e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate??e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate??e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)("locale",e.paginatorLocale),T(),E("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),T(),E("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),T(),E("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),T(),E("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function m4t(t,n){t&1&&ui(0)}function f4t(t,n){t&1&&ui(0)}function g4t(t,n){t&1&&ui(0)}function _4t(t,n){if(t&1&&(k(0,"div")(1,"table",18,0),ee(3,m4t,1,0,"ng-container",19),k(4,"thead",20),ee(5,f4t,1,0,"ng-container",19),D(),ce(6,"tbody",21),k(7,"tfoot",20),ee(8,g4t,1,0,"ng-container",19),D()()()),t&2){let e=P();Oe(e.cx("wrapper")),T(),E("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),T(2),E("ngTemplateOutlet",e.colGroupTemplate||e._colGroupTemplate)("ngTemplateOutletContext",ki(18,CS,e.columns)),T(),Oe(e.cx("thead")),T(),E("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",ki(20,CS,e.columns)),T(),Oe(e.cx("tbody")),E("pTreeTableBody",e.columns)("pTreeTableBodyTemplate",e.bodyTemplate??e._bodyTemplate),T(),Oe(e.cx("tfoot")),T(),E("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)("ngTemplateOutletContext",ki(22,CS,e.columns))}}function y4t(t,n){if(t&1&&ce(0,"div",24,2),t&2){let e=P(2);E("ngClass",Eo(5,GVt,e.cx("scrollableView"),e.cx("frozenView")))("ttScrollableView",e.frozenColumns)("frozen",!0)("ngStyle",ki(8,$Vt,e.frozenWidth))("scrollHeight",e.scrollHeight)}}function v4t(t,n){if(t&1&&(k(0,"div"),ee(1,y4t,2,10,"div",22),ce(2,"div",23,1),D()),t&2){let e=P();Oe(e.cx("scrollableWrapper")),T(),E("ngIf",e.frozenColumns||e.frozenBodyTemplate||e._frozenBodyTemplate),T(),Oe(e.cx("scrollableView")),E("ttScrollableView",e.columns)("frozen",!1)("scrollHeight",e.scrollHeight)("ngStyle",Eo(9,jVt,e.frozenWidth,"calc(100% - "+e.frozenWidth+")"))}}function b4t(t,n){t&1&&ui(0)}function C4t(t,n){if(t&1&&ee(0,b4t,1,0,"ng-container",12),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function x4t(t,n){t&1&&ee(0,C4t,1,1,"ng-template",14)}function w4t(t,n){t&1&&ui(0)}function S4t(t,n){if(t&1&&ee(0,w4t,1,0,"ng-container",12),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function T4t(t,n){t&1&&ee(0,S4t,1,1,"ng-template",15)}function I4t(t,n){t&1&&ui(0)}function E4t(t,n){if(t&1&&ee(0,I4t,1,0,"ng-container",12),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function D4t(t,n){t&1&&ee(0,E4t,1,1,"ng-template",16)}function A4t(t,n){t&1&&ui(0)}function k4t(t,n){if(t&1&&ee(0,A4t,1,0,"ng-container",12),t&2){let e=P(3);E("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function M4t(t,n){t&1&&ee(0,k4t,1,1,"ng-template",17)}function O4t(t,n){if(t&1){let e=tt();k(0,"p-paginator",13),ie("onPageChange",function(o){se(e);let r=P();return ae(r.onPageChange(o))}),ee(1,x4t,1,0,null,9)(2,T4t,1,0,null,9)(3,D4t,1,0,null,9)(4,M4t,1,0,null,9),D()}if(t&2){let e=P();E("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("styleClass",e.cx("pcPaginator"))("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate??e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate??e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate??e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)("locale",e.paginatorLocale),T(),E("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),T(),E("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),T(),E("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),T(),E("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function R4t(t,n){t&1&&ui(0)}function F4t(t,n){if(t&1&&(k(0,"div"),ee(1,R4t,1,0,"ng-container",12),D()),t&2){let e=P();Oe(e.cx("footer")),T(),E("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function P4t(t,n){if(t&1&&ce(0,"div",null,3),t&2){let e=P();Oe(e.cx("columnResizerHelper")),Ir("display","none")}}function L4t(t,n){t&1&&(si(),ce(0,"svg",26))}function N4t(t,n){}function B4t(t,n){t&1&&ee(0,N4t,0,0,"ng-template")}function V4t(t,n){if(t&1&&(k(0,"span",null,4),ee(2,L4t,1,0,"svg",25)(3,B4t,1,0,null,12),D()),t&2){let e=P();Oe(e.cx("reorderIndicatorUp")),Ir("display","none"),T(2),E("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),T(),E("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function z4t(t,n){t&1&&(si(),ce(0,"svg",28))}function U4t(t,n){}function H4t(t,n){t&1&&ee(0,U4t,0,0,"ng-template")}function j4t(t,n){if(t&1&&(k(0,"span",null,5),ee(2,z4t,1,0,"svg",27)(3,H4t,1,0,null,12),D()),t&2){let e=P();Oe(e.cx("reorderIndicatorDown")),Ir("display","none"),T(2),E("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),T(),E("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var G4t=["pTreeTableBody",""],$4t=(t,n,e,i)=>({$implicit:t,node:n,rowData:e,columns:i}),q4t=(t,n)=>({$implicit:t,frozen:n});function K4t(t,n){t&1&&ui(0)}function W4t(t,n){if(t&1&&(Di(0),ee(1,K4t,1,0,"ng-container",2),Ai()),t&2){let e=P().$implicit,i=P();T(),E("ngTemplateOutlet",i.template)("ngTemplateOutletContext",Sv(2,$4t,e,e.node,e.node.data,i.columns))}}function Y4t(t,n){if(t&1&&ee(0,W4t,2,7,"ng-container",1),t&2){let e=n.$implicit;E("ngIf",e.visible)}}function Q4t(t,n){t&1&&ui(0)}function Z4t(t,n){if(t&1&&(Di(0),ee(1,Q4t,1,0,"ng-container",2),Ai()),t&2){let e=P();T(),E("ngTemplateOutlet",e.tt.emptyMessageTemplate)("ngTemplateOutletContext",Eo(2,q4t,e.columns,e.frozen))}}var X4t=["scrollHeader"],J4t=["scrollHeaderBox"],e5t=["scrollBody"],t5t=["scrollTable"],i5t=["loadingTable"],n5t=["scrollFooter"],o5t=["scrollFooterBox"],r5t=["scrollableAligner"],s5t=["scroller"],a5t=["ttScrollableView",""],l5t=t=>({height:t}),MBe=(t,n)=>({$implicit:t,options:n}),c5t=t=>({options:t}),d5t=(t,n)=>({"max-height":t,"overflow-y":n}),u5t=()=>({});function p5t(t,n){t&1&&ui(0)}function h5t(t,n){t&1&&ui(0)}function m5t(t,n){t&1&&ui(0)}function f5t(t,n){if(t&1&&ee(0,m5t,1,0,"ng-container",12),t&2){let e=n.$implicit,i=n.options;P(2);let o=ti(11);E("ngTemplateOutlet",o)("ngTemplateOutletContext",Eo(2,MBe,e,i))}}function g5t(t,n){t&1&&ui(0)}function _5t(t,n){if(t&1&&ee(0,g5t,1,0,"ng-container",12),t&2){let e=n.options,i=P(3);E("ngTemplateOutlet",i.tt.loaderTemplate||i.tt._loaderTemplate)("ngTemplateOutletContext",ki(2,c5t,e))}}function y5t(t,n){t&1&&(Di(0),ee(1,_5t,1,4,"ng-template",null,5,Pt),Ai())}function v5t(t,n){if(t&1){let e=tt();k(0,"p-scroller",17,3),ie("onLazyLoad",function(o){se(e);let r=P();return ae(r.tt.onLazyItemLoad(o))}),ee(2,f5t,1,5,"ng-template",null,4,Pt)(4,y5t,3,0,"ng-container",15),D()}if(t&2){let e=P();$r(ki(9,l5t,e.tt.scrollHeight!=="flex"?e.tt.scrollHeight:void 0)),E("items",e.tt.serializedValue)("styleClass",e.cx("scrollableBody"))("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.tt.virtualScrollItemSize||e.tt._virtualRowHeight)("lazy",e.tt.lazy)("options",e.tt.virtualScrollOptions),T(4),E("ngIf",e.tt.loaderTemplate||e.tt._loaderTemplate)}}function b5t(t,n){t&1&&ui(0)}function C5t(t,n){if(t&1&&(Di(0),k(1,"div",11,6),ee(3,b5t,1,0,"ng-container",12),D(),Ai()),t&2){let e=P(),i=ti(11);T(),Oe(e.cx("scrollableBody")),E("ngStyle",Eo(5,d5t,e.tt.scrollHeight!=="flex"?e.scrollHeight:void 0,!e.frozen&&e.tt.scrollHeight?"scroll":void 0)),T(2),E("ngTemplateOutlet",i)("ngTemplateOutletContext",Eo(9,MBe,e.serializedValue,uo(8,u5t)))}}function x5t(t,n){t&1&&ui(0)}function w5t(t,n){t&1&&ce(0,"div",null,8),t&2&&Ir("background-color","transparent")}function S5t(t,n){if(t&1&&(k(0,"table",18,7),ee(2,x5t,1,0,"ng-container",12),ce(3,"tbody",19),D(),ee(4,w5t,2,2,"div",20)),t&2){let e=n.$implicit,i=n.options,o=P();$r(i.contentStyle),Oe(o.tt.tableStyleClass),E("ngClass",i.contentStyleClass)("ngStyle",o.tt.tableStyle),T(2),E("ngTemplateOutlet",o.frozen?o.tt.frozenColGroupTemplate||o.tt._frozenColGroupTemplate||o.tt.colGroupTemplate||o.tt._colGroupTemplate:o.tt.colGroupTemplate||o.tt._colGroupTemplate)("ngTemplateOutletContext",ki(15,CS,o.columns)),T(),Oe(o.cx("tbody")),E("pTreeTableBody",o.columns)("pTreeTableBodyTemplate",o.frozen?o.tt.frozenBodyTemplate||o.tt._frozenBodyTemplate||o.tt.bodyTemplate||o.tt._bodyTemplate:o.tt.bodyTemplate||o.tt._bodyTemplate)("serializedNodes",e)("frozen",o.frozen),T(),E("ngIf",o.frozen)}}function T5t(t,n){t&1&&ui(0)}function I5t(t,n){t&1&&ui(0)}function E5t(t,n){if(t&1&&(k(0,"div",null,9)(2,"div",null,10)(4,"table",21),ee(5,T5t,1,0,"ng-container",12),k(6,"tfoot",13),ee(7,I5t,1,0,"ng-container",12),D()()()()),t&2){let e=P();Oe(e.cx("scrollableFooter")),T(2),Oe(e.cx("scrollableFooterBox")),T(2),Oe(e.cx("scrollableFooterTable")),E("ngClass",e.tt.tableStyleClass)("ngStyle",e.tt.tableStyle),T(),E("ngTemplateOutlet",e.frozen?e.tt.frozenColGroupTemplate||e.tt._frozenColGroupTemplate||e.tt.colGroupTemplate||e.tt._colGroupTemplate:e.tt.colGroupTemplate||e.tt._colGroupTemplate)("ngTemplateOutletContext",ki(14,CS,e.columns)),T(),Oe(e.cx("tfoot")),T(),E("ngTemplateOutlet",e.frozen?e.tt.frozenFooterTemplate||e.tt._frozenFooterTemplate||e.tt.footerTemplate||e.tt._footerTemplate:e.tt.footerTemplate||e.tt._footerTemplate)("ngTemplateOutletContext",ki(16,CS,e.columns))}}var D5t=(t,n)=>({$implicit:t,partialSelected:n});function A5t(t,n){}function k5t(t,n){t&1&&ee(0,A5t,0,0,"ng-template")}function M5t(t,n){if(t&1&&ee(0,k5t,1,0,null,3),t&2){let e=P(2);E("ngTemplateOutlet",e.tt.checkboxIconTemplate||e.tt._checkboxIconTemplate)("ngTemplateOutletContext",Eo(2,D5t,e.checked,e.partialChecked))}}function O5t(t,n){t&1&&(Di(0),ee(1,M5t,1,5,"ng-template",2),Ai())}function R5t(t,n){t&1&&(si(),ce(0,"svg",5)),t&2&&Ge("aria-hidden",!0)}function F5t(t,n){t&1&&(si(),ce(0,"svg",6)),t&2&&Ge("aria-hidden",!0)}function P5t(t,n){if(t&1&&(Di(0),ee(1,R5t,1,1,"svg",3)(2,F5t,1,1,"svg",4),Ai()),t&2){let e=P();T(),E("ngIf",e.rowNode.node.expanded),T(),E("ngIf",!e.rowNode.node.expanded)}}function L5t(t,n){}function N5t(t,n){t&1&&ee(0,L5t,0,0,"ng-template")}var B5t=` /* For PrimeNG */ .p-treetable { position: relative; } .p-treetable table { border-collapse: collapse; width: 100%; table-layout: fixed; } .p-treetable .p-sortable-column { cursor: pointer; user-select: none; } .p-treetable .p-sortable-column .p-column-title, .p-treetable .p-sortable-column .p-sortable-column-icon, .p-treetable .p-sortable-column .p-sortable-column-badge { vertical-align: middle; } .p-treetable-sort-icon { color: dt('treetable.sort.icon.color'); font-size: dt('treetable.sort.icon.size'); width: dt('treetable.sort.icon.size'); height: dt('treetable.sort.icon.size'); transition: color dt('treetable.transition.duration'); } .p-treetable .p-sortable-column .p-sortable-column-badge { display: inline-flex; align-items: center; justify-content: center; } .p-treetable-auto-layout>.p-treetable-wrapper { overflow-x: auto; } .p-treetable-auto-layout>.p-treetable-wrapper>table { table-layout: auto; } .p-treetable-hoverable-rows .p-treetable-tbody>tr { cursor: pointer; } .p-treetable-toggler { cursor: pointer; user-select: none; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; overflow: hidden; position: relative; } /* Scrollable */ .p-treetable-scrollable-wrapper { position: relative; } .p-treetable-scrollable-header, .p-treetable-scrollable-footer { overflow: hidden; flex-shrink: 0; } .p-treetable-scrollable-body { overflow: auto; position: relative; } .p-treetable-virtual-table { position: absolute; } /* Frozen Columns */ .p-treetable-frozen-view .p-treetable-scrollable-body { overflow: hidden; } .p-treetable-frozen-view>.p-treetable-scrollable-body>table>.p-treetable-tbody>tr>td:last-child { border-right: 0 none; } .p-treetable-unfrozen-view { position: absolute; top: 0; } /* Flex Scrollable */ .p-treetable-flex-scrollable { display: flex; flex-direction: column; flex: 1; height: 100%; } .p-treetable-flex-scrollable .p-treetable-scrollable-wrapper, .p-treetable-flex-scrollable .p-treetable-scrollable-view { display: flex; flex-direction: column; flex: 1; height: 100%; } .p-treetable-flex-scrollable .p-treetable-virtual-scrollable-body { flex: 1; } /* Resizable */ .p-treetable-resizable>.p-treetable-wrapper { overflow-x: auto; } .p-treetable-resizable .p-treetable-thead>tr>th, .p-treetable-resizable .p-treetable-tfoot>tr>td, .p-treetable-resizable .p-treetable-tbody>tr>td { overflow: hidden; } .p-treetable-resizable .p-resizable-column { background-clip: padding-box; position: relative; } .p-treetable-resizable-fit .p-resizable-column:last-child .p-column-resizer { display: none; } .p-treetable .p-column-resizer { display: block; position: absolute; top: 0; right: 0; margin: 0; width: dt('treetable.column.resizer.width'); height: 100%; padding: 0px; cursor: col-resize; border: 1px solid transparent; } .p-treetable .p-column-resizer-helper { width: dt('treetable.resize.indicator.width'); position: absolute; z-index: 10; display: none; background: dt('treetable.resize.indicator.color'); } .p-treetable .p-row-editor-init, .p-treetable .p-row-editor-save, .p-treetable .p-row-editor-cancel { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; position: relative; } /* Reorder */ .p-treetable-reorder-indicator-up, .p-treetable-reorder-indicator-down { position: absolute; display: none; } [ttReorderableColumn] { cursor: move; } /* Loader */ .p-treetable-mask { position: absolute !important; display: flex; align-items: center; justify-content: center; z-index: 2; } .p-treetable-loading-icon { font-size: dt('treetable.loading.icon.size'); width: dt('treetable.loading.icon.size'); height: dt('treetable.loading.icon.size'); } /* Virtual Scroll */ .p-treetable .p-scroller-loading { transform: none !important; min-height: 0; position: sticky; top: 0; left: 0; } .p-treetable .p-paginator-top { border-color: dt('treetable.paginator.top.border.color'); border-style: solid; border-width: dt('treetable.paginator.top.border.width'); } .p-treetable .p-paginator-bottom { border-color: dt('treetable.paginator.bottom.border.color'); border-style: solid; border-width: dt('treetable.paginator.bottom.border.width'); } .p-treetable .p-treetable-header { background: dt('treetable.header.background'); color: dt('treetable.header.color'); border-color: dt('treetable.header.border.color'); border-style: solid; border-width: dt('treetable.header.border.width'); padding: dt('treetable.header.padding'); font-weight: dt('treetable.column.title.font.weight'); } .p-treetable .p-treetable-footer { background: dt('treetable.footer.background'); color: dt('treetable.footer.color'); border-color: dt('treetable.footer.border.color'); border-style: solid; border-width: dt('treetable.footer.border.width'); padding: dt('treetable.footer.padding'); font-weight: dt('treetable.column.footer.font.weight'); } .p-treetable .p-treetable-thead>tr>th { padding: dt('treetable.header.cell.padding'); background: dt('treetable.header.cell.background'); border-color: dt('treetable.header.cell.border.color'); border-style: solid; border-width: 0 0 1px 0; color: dt('treetable.header.cell.color'); font-weight: dt('treetable.column.title.font.weight'); text-align: start; transition: background dt('treetable.transition.duration'), color dt('treetable.transition.duration'), border-color dt('treetable.transition.duration'), outline-color dt('treetable.transition.duration'), box-shadow dt('treetable.transition.duration'); } .p-treetable .p-treetable-tfoot>tr>td { text-align: start; padding: dt('treetable.footer.cell.padding'); border-color: dt('treetable.footer.cell.border.color'); border-style: solid; border-width: 0 0 1px 0; color: dt('treetable.footer.cell.color'); background: dt('treetable.footer.cell.background'); font-weight: dt('treetable.column.footer.font.weight'); } .p-treetable .p-sortable-column { cursor: pointer; user-select: none; outline-color: transparent; vertical-align: middle; } .p-treetable .p-sortable-column .p-sortable-column-icon { color: dt('treetable.sort.icon.color'); transition: color dt('treetable.transition.duration'); } .p-treetable .p-sortable-column:not(.p-treetable-column-sorted):hover { background: dt('treetable.header.cell.hover.background'); color: dt('treetable.header.cell.hover.color'); } .p-treetable .p-sortable-column:not(.p-treetable-column-sorted):hover .p-sortable-column-icon { color: dt('treetable.sort.icon.hover.color'); } .p-treetable .p-sortable-column.p-treetable-column-sorted { background: dt('treetable.header.cell.selected.background'); color: dt('treetable.header.cell.selected.color'); } .p-treetable .p-sortable-column.p-treetable-column-sorted .p-sortable-column-icon { color: dt('treetable.header.cell.selected.color'); } .p-treetable .p-sortable-column:focus-visible { box-shadow: dt('treetable.header.cell.focus.ring.shadow'); outline: dt('treetable.header.cell.focus.ring.width') dt('treetable.header.cell.focus.ring.style') dt('treetable.header.cell.focus.ring.color'); outline-offset: dt('treetable.header.cell.focus.ring.offset'); } .p-treetable-hoverable .p-treetable-selectable-row { cursor: pointer; } .p-treetable .p-treetable-tbody > tr { outline-color: transparent; background: dt('treetable.row.background'); color: dt('treetable.row.color'); transition: background dt('treetable.transition.duration'), color dt('treetable.transition.duration'), border-color dt('treetable.transition.duration'), outline-color dt('treetable.transition.duration'), box-shadow dt('treetable.transition.duration'); } .p-treetable .p-treetable-tbody>tr>td { text-align: start; border-color: dt('treetable.body.cell.border.color'); border-style: solid; border-width: 0 0 1px 0; padding: dt('treetable.body.cell.padding'); } .p-treetable .p-treetable-tbody>tr>td .p-treetable-toggler { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; position: relative; width: dt('treetable.node.toggle.button.size'); height: dt('treetable.node.toggle.button.size'); color: dt('treetable.node.toggle.button.color'); border: 0 none; background: transparent; cursor: pointer; border-radius: dt('treetable.node.toggle.button.border.radius'); transition: background dt('treetable.transition.duration'), color dt('treetable.transition.duration'), border-color dt('treetable.transition.duration'), outline-color dt('treetable.transition.duration'), box-shadow dt('treetable.transition.duration'); outline-color: transparent; user-select: none; } .p-treetable .p-treetable-tbody>tr>td .p-treetable-toggler:enabled:hover { color: dt('treetable.node.toggle.button.hover.color'); background: dt('treetable.node.toggle.button.hover.background'); } .p-treetable .p-treetable-tbody>tr>tr.treetable-row-selected .p-treetable-toggler:hover { background: dt('treetable.node.toggle.button.selected.hover.background'); color: dt('treetable.node.toggle.button.selected.hover.color'); } .p-treetable .p-treetable-tbody>tr>td .p-treetable-toggler:focus-visible { box-shadow: dt('treetable.node.toggle.button.focus.ring.shadow'); outline: dt('treetable.node.toggle.button.focus.ring.width') dt('treetable.node.toggle.button.focus.ring.style') dt('treetable.node.toggle.button.focus.ring.color'); outline-offset: dt('treetable.node.toggle.button.focus.ring.offset'); } .p-treetable .p-treetable-tbody>tr.p-treetable-row-selected { background: dt('treetable.row.selected.background'); color: dt('treetable.row.selected.color'); } .p-treetable-tbody > tr:focus-visible, .p-treetable-tbody > tr.p-treetable-contextmenu-row-selected { box-shadow: dt('treetable.row.focus.ring.shadow'); outline: dt('treetable.row.focus.ring.width') dt('treetable.row.focus.ring.style') dt('treetable.row.focus.ring.color'); outline-offset: dt('treetable.row.focus.ring.offset'); } .p-treetable .p-treetable-tbody>tr.p-treetable-row-selected .p-treetable-toggler { color: inherit; } .p-treetable .p-treetable-tbody>tr.p-treetable-row-selected .p-treetable-toggler:hover { background: dt('treetable.node.toggle.button.selected.hover.background'); color: dt('treetable.node.toggle.button.selected.hover.color'); } .p-treetable.p-treetable-hoverable-rows .p-treetable-tbody>tr:not(.p-treetable-row-selected):hover { background: dt('treetable.row.hover.background'); color: dt('treetable.row.hover.color'); } .p-treetable-gridlines .p-treetable-header { border-width: 1px 1px 0 1px; } .p-treetable-gridlines .p-treetable-footer { border-width: 0 1px 1px 1px; } .p-treetable-gridlines .p-treetable-paginator-top { border-width: 1px 1px 0 1px; } .p-treetable-gridlines .p-treetable-paginator-bottom { border-width: 0 1px 1px 1px; } .p-treetable-gridlines .p-treetable-thead > tr > th { border-width: 1px 0 1px 1px; } .p-treetable-gridlines .p-treetable-thead > tr > th:last-child { border-width: 1px; } .p-treetable-gridlines .p-treetable-tbody > tr > td { border-width: 1px 0 0 1px; } .p-treetable-gridlines .p-treetable-tbody > tr > td:last-child { border-width: 1px 1px 0 1px; } .p-treetable-gridlines .p-treetable-tbody > tr:last-child > td { border-width: 1px 0 1px 1px; } .p-treetable-gridlines .p-treetable-tbody > tr:last-child > td:last-child { border-width: 1px; } .p-treetable-gridlines .p-treetable-tfoot > tr > td { border-width: 1px 0 1px 1px; } .p-treetable-gridlines .p-treetable-tfoot > tr > td:last-child { border-width: 1px 1px 1px 1px; } .p-treetable.p-treetable-gridlines .p-treetable-thead + .p-treetable-tfoot > tr > td { border-width: 0 0 1px 1px; } .p-treetable.p-treetable-gridlines .p-treetable-thead + .p-treetable-tfoot > tr > td:last-child { border-width: 0 1px 1px 1px; } .p-treetable.p-treetable-gridlines:has(.p-treetable-thead):has(.p-treetable-tbody) .p-treetable-tbody > tr > td { border-width: 0 0 1px 1px; } .p-treetable.p-treetable-gridlines:has(.p-treetable-thead):has(.p-treetable-tbody) .p-treetable-tbody > tr > td:last-child { border-width: 0 1px 1px 1px; } .p-treetable.p-treetable-gridlines:has(.p-treetable-tbody):has(.p-treetable-tfoot) .p-treetable-tbody > tr:last-child > td { border-width: 0 0 0 1px; } .p-treetable.p-treetable-gridlines:has(.p-treetable-tbody):has(.p-treetable-tfoot) .p-treetable-tbody > tr:last-child > td:last-child { border-width: 0 1px 0 1px; } .p-treetable.p-treetable-sm .p-treetable-header { padding: 0.65625rem 0.875rem; } .p-treetable.p-treetable-sm .p-treetable-thead>tr>th { padding: 0.375rem 0.5rem; } .p-treetable.p-treetable-sm .p-treetable-tbody>tr>td { padding: 0.375rem 0.5rem; } .p-treetable.p-treetable-sm .p-treetable-tfoot>tr>td { padding: 0.375rem 0.5rem; } .p-treetable.p-treetable-sm .p-treetable-footer { padding: 0.375rem 0.5rem; } .p-treetable.p-treetable-lg .p-treetable-header { padding: 0.9375rem 1.25rem; } .p-treetable.p-treetable-lg .p-treetable-thead>tr>th { padding: 0.9375rem 1.25rem; } .p-treetable.p-treetable-lg .p-treetable-tbody>tr>td { padding: 0.9375rem 1.25rem; } .p-treetable.p-treetable-lg .p-treetable-tfoot>tr>td { padding: 0.9375rem 1.25rem; } .p-treetable.p-treetable-lg .p-treetable-footer { padding: 0.9375rem 1.25rem; } p-treetabletoggler + p-treetablecheckbox .p-checkbox, p-treetable-toggler + p-treetable-checkbox .p-checkbox, p-tree-table-toggler + p-tree-table-checkbox .p-checkbox { vertical-align: middle; } p-treetabletoggler + p-treetablecheckbox + span, p-treetable-toggler + p-treetable-checkbox + span, p-tree-table-toggler + p-tree-table-checkbox + span { vertical-align: middle; } p-treetable-sort-icon { display: inline-flex; align-items: center; gap: dt('treetable.header.cell.gap'); } `,V5t={root:({instance:t})=>["p-treetable p-component",{"p-treetable-gridlines":t.showGridlines,"p-treetable-hoverable-rows":t.rowHover||t.selectionMode==="single"||t.selectionMode==="multiple","p-treetable-auto-layout":t.autoLayout,"p-treetable-resizable":t.resizableColumns,"p-treetable-resizable-fit":t.resizableColumns&&t.columnResizeMode==="fit","p-treetable-flex-scrollable":t.scrollable&&t.scrollHeight==="flex"}],loading:"p-treetable-loading",mask:"p-treetable-mask p-overlay-mask",loadingIcon:"p-treetable-loading-icon",header:"p-treetable-header",pcPaginator:({instance:t})=>["p-treetable-paginator-"+t.paginatorPosition,t.paginatorStyleClass],tableContainer:"p-treetable-table-container",table:({instance:t})=>({"p-treetable-table":!0,"p-treetable-scrollable-table":t.scrollable,"p-treetable-resizable-table":t.resizableColumns,"p-treetable-resizable-table-fit":t.resizableColumns&&t.columnResizeMode==="fit"}),thead:"p-treetable-thead",sortableColumn:({instance:t})=>({"p-sortable-column":t.isEnabled(),"p-treetable-column-sorted":t.sorted}),sortableColumnIcon:"p-treetable-sort-icon",sortableColumnBadge:"p-sortable-column-badge",columnResizer:"p-treetable-column-resizer",columnHeaderContent:"p-treetable-column-header-content",columnTitle:"p-treetable-column-title",sortIcon:"p-treetable-sort-icon",pcSortBadge:"p-treetable-sort-badge",tbody:"p-treetable-tbody",row:({instance:t})=>({"p-treetable-row-selected":t.selected}),contextMenuRow:({instance:t})=>({"p-treetable-contextmenu-row-selected":t.selected}),toggler:"p-treetable-toggler",nodeToggleButton:"p-treetable-node-toggle-button",nodeToggleIcon:"p-treetable-node-toggle-icon",pcNodeCheckbox:"p-treetable-node-checkbox",tfoot:"p-treetable-tfoot",footerCell:({instance:t})=>({"p-treetable-frozen-column":t.columnProp("frozen")}),footer:"p-treetable-footer",columnResizeIndicator:"p-treetable-column-resize-indicator",wrapper:"p-treetable-wrapper",scrollableWrapper:"p-treetable-scrollable-wrapper",scrollableView:"p-treetable-scrollable-view",frozenView:"p-treetable-frozen-view",columnResizerHelper:"p-column-resizer-helper",reorderIndicatorUp:"p-treetable-reorder-indicator-up",reorderIndicatorDown:"p-treetable-reorder-indicator-down",scrollableHeader:"p-treetable-scrollable-header",scrollableHeaderBox:"p-treetable-scrollable-header-box",scrollableHeaderTable:"p-treetable-scrollable-header-table",scrollableBody:"p-treetable-scrollable-body",scrollableFooter:"p-treetable-scrollable-footer",scrollableFooterBox:"p-treetable-scrollable-footer-box",scrollableFooterTable:"p-treetable-scrollable-footer-table"},My=(()=>{class t extends io{name="treetable";theme=B5t;classes=V5t;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();var r8=(()=>{class t{sortSource=new hi;selectionSource=new hi;contextMenuSource=new hi;uiUpdateSource=new hi;totalRecordsSource=new hi;sortSource$=this.sortSource.asObservable();selectionSource$=this.selectionSource.asObservable();contextMenuSource$=this.contextMenuSource.asObservable();uiUpdateSource$=this.uiUpdateSource.asObservable();totalRecordsSource$=this.totalRecordsSource.asObservable();onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onUIUpdate(e){this.uiUpdateSource.next(e)}onTotalRecordsChange(e){this.totalRecordsSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),f_=(()=>{class t extends oo{_componentStyle=re(My);columns;styleClass;tableStyle;tableStyleClass;autoLayout;lazy=!1;lazyLoadOnInit=!0;paginator;rows;first=0;pageLinks=5;rowsPerPageOptions;alwaysShowPaginator=!0;paginatorPosition="bottom";paginatorStyleClass;paginatorDropdownAppendTo;currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showJumpToPageDropdown;showFirstLastIcon=!0;showPageLinks=!0;defaultSortOrder=1;sortMode="single";resetPageOnSort=!0;customSort;selectionMode;contextMenuSelection;contextMenuSelectionMode="separate";dataKey;metaKeySelection=!1;compareSelectionBy="deepEquals";rowHover;loading;loadingIcon;showLoader=!0;scrollable;scrollHeight;virtualScroll;virtualScrollItemSize;virtualScrollOptions;virtualScrollDelay=150;frozenWidth;frozenColumns;resizableColumns;columnResizeMode="fit";reorderableColumns;contextMenu;rowTrackBy=(e,i)=>i;filters={};globalFilterFields;filterDelay=300;filterMode="lenient";filterLocale;paginatorLocale;get totalRecords(){return this._totalRecords}set totalRecords(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)}get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get value(){return this._value}set value(e){this._value=e}get virtualRowHeight(){return this._virtualRowHeight}set virtualRowHeight(e){this._virtualRowHeight=e,console.log("The virtualRowHeight property is deprecated, use virtualScrollItemSize property instead.")}get selectionKeys(){return this._selectionKeys}set selectionKeys(e){this._selectionKeys=e,this.selectionKeysChange.emit(this._selectionKeys)}showGridlines=!1;selectionChange=new ve;contextMenuSelectionChange=new ve;onFilter=new ve;onNodeExpand=new ve;onNodeCollapse=new ve;onPage=new ve;onSort=new ve;onLazyLoad=new ve;sortFunction=new ve;onColResize=new ve;onColReorder=new ve;onNodeSelect=new ve;onNodeUnselect=new ve;onContextMenuSelect=new ve;onHeaderCheckboxToggle=new ve;onEditInit=new ve;onEditComplete=new ve;onEditCancel=new ve;selectionKeysChange=new ve;resizeHelperViewChild;reorderIndicatorUpViewChild;reorderIndicatorDownViewChild;tableViewChild;scrollableViewChild;scrollableFrozenViewChild;_value=[];_virtualRowHeight=28;_selectionKeys;serializedValue;_totalRecords=0;_multiSortMeta;_sortField;_sortOrder=1;filteredNodes;filterTimeout;_colGroupTemplate;colGroupTemplate;_captionTemplate;captionTemplate;_headerTemplate;headerTemplate;_bodyTemplate;bodyTemplate;_footerTemplate;footerTemplate;_summaryTemplate;summaryTemplate;_emptyMessageTemplate;emptyMessageTemplate;_paginatorLeftTemplate;paginatorLeftTemplate;_paginatorRightTemplate;paginatorRightTemplate;_paginatorDropdownItemTemplate;paginatorDropdownItemTemplate;_frozenHeaderTemplate;frozenHeaderTemplate;_frozenBodyTemplate;frozenBodyTemplate;_frozenFooterTemplate;frozenFooterTemplate;_frozenColGroupTemplate;frozenColGroupTemplate;_loadingIconTemplate;loadingIconTemplate;_reorderIndicatorUpIconTemplate;reorderIndicatorUpIconTemplate;_reorderIndicatorDownIconTemplate;reorderIndicatorDownIconTemplate;_sortIconTemplate;sortIconTemplate;_checkboxIconTemplate;checkboxIconTemplate;_headerCheckboxIconTemplate;headerCheckboxIconTemplate;_togglerIconTemplate;togglerIconTemplate;_paginatorFirstPageLinkIconTemplate;paginatorFirstPageLinkIconTemplate;_paginatorLastPageLinkIconTemplate;paginatorLastPageLinkIconTemplate;_paginatorPreviousPageLinkIconTemplate;paginatorPreviousPageLinkIconTemplate;_paginatorNextPageLinkIconTemplate;paginatorNextPageLinkIconTemplate;_loaderTemplate;loaderTemplate;lastResizerHelperX;reorderIconWidth;reorderIconHeight;draggedColumn;dropPosition;preventSelectionSetterPropagation;_selection;selectedKeys={};rowTouched;editingCell;editingCellData;editingCellField;editingCellClick;documentEditListener;initialized;toggleRowIndex;ngOnInit(){super.ngOnInit(),this.lazy&&this.lazyLoadOnInit&&!this.virtualScroll&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.initialized=!0}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"reorderindicatorupicon":this.reorderIndicatorUpIconTemplate=e.template;break;case"reorderindicatordownicon":this.reorderIndicatorDownIconTemplate=e.template;break;case"sorticon":this.sortIconTemplate=e.template;break;case"checkboxicon":this.checkboxIconTemplate=e.template;break;case"headercheckboxicon":this.headerCheckboxIconTemplate=e.template;break;case"togglericon":this.togglerIconTemplate=e.template;break;case"paginatorfirstpagelinkicon":this.paginatorFirstPageLinkIconTemplate=e.template;break;case"paginatorlastpagelinkicon":this.paginatorLastPageLinkIconTemplate=e.template;break;case"paginatorpreviouspagelinkicon":this.paginatorPreviousPageLinkIconTemplate=e.template;break;case"paginatornextpagelinkicon":this.paginatorNextPageLinkIconTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break}})}filterService=re(fy);tableService=re(r8);zone=re(_n);ngOnChanges(e){super.ngOnChanges(e),e.value&&(this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._value?this._value.length:0,this.sortMode=="single"&&this.sortField?this.sortSingle():this.sortMode=="multiple"&&this.multiSortMeta?this.sortMultiple():this.hasFilter()&&this._filter()),this.updateSerializedValue(),this.tableService.onUIUpdate(this.value)),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,this.sortMode==="multiple"&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateselectedKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1)}updateSerializedValue(){this.serializedValue=[],this.paginator?this.serializePageNodes():this.serializeNodes(null,this.filteredNodes||this.value,0,!0)}serializeNodes(e,i,o,r){if(i&&i.length)for(let s of i){s.parent=e;let d={node:s,parent:e,level:o,visible:r&&(e?e.expanded:!0)};this.serializedValue.push(d),d.visible&&s.expanded&&this.serializeNodes(s,s.children,o+1,d.visible)}}serializePageNodes(){let e=this.filteredNodes||this.value;if(this.serializedValue=[],e&&e.length){let i=this.lazy?0:this.first;for(let o=i;o{let r=bs(i.data,this.sortField),s=bs(o.data,this.sortField),d=null;return r==null&&s!=null?d=-1:r!=null&&s==null?d=1:r==null&&s==null?d=0:typeof r=="string"&&typeof s=="string"?d=r.localeCompare(s,void 0,{numeric:!0}):d=rs?1:0,this.sortOrder*d});for(let i of e)this.sortNodes(i.children)}}sortMultiple(){this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.sortMultipleNodes(this.value),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.updateSerializedValue(),this.tableService.onSort(this.multiSortMeta))}sortMultipleNodes(e){if(!(!e||e.length===0)){this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):e.sort((i,o)=>this.multisortField(i,o,this.multiSortMeta,0));for(let i of e)this.sortMultipleNodes(i.children)}}multisortField(e,i,o,r){if(wc(this.multiSortMeta)||wc(o[r]))return 0;let s=bs(e.data,o[r].field),d=bs(i.data,o[r].field),m=null;if(s==null&&d!=null?m=-1:s!=null&&d==null?m=1:s==null&&d==null&&(m=0),typeof s=="string"||s instanceof String){if(s.localeCompare&&s!=d)return o[r].order*s.localeCompare(d,void 0,{numeric:!0})}else m=sr?this.multisortField(e,i,o,r+1):0:o[r].order*m}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let i=0;ithis.cd.detectChanges()}}onLazyItemLoad(e){this.onLazyLoad.emit(mt(be(be({},this.createLazyLoadMetadata()),e),{rows:e.last-e.first}))}resetScrollTop(){this.virtualScroll?this.scrollToVirtualIndex(0):this.scrollTo({top:0})}scrollToVirtualIndex(e){this.scrollableViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e),this.scrollableFrozenViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e)}scrollTo(e){this.scrollableViewChild&&this.scrollableViewChild.scrollTo(e),this.scrollableFrozenViewChild&&this.scrollableViewChild.scrollTo(e)}isEmpty(){let e=this.filteredNodes||this.value;return e==null||e.length==0}getBlockableElement(){return this.el.nativeElement.children[0]}onColumnResizeBegin(e){let i=Zg(this.el?.nativeElement).left;this.lastResizerHelperX=e.pageX-i+this.el?.nativeElement.scrollLeft,e.preventDefault()}onColumnResize(e){let i=Zg(this.el?.nativeElement).left;ac(this.el?.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.el?.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",this.resizeHelperViewChild.nativeElement.style.left=e.pageX-i+this.el?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(e,i){let o=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,r=i.offsetWidth,s=r+o,d=i.style.minWidth||15;if(r+o>parseInt(d)){if(this.columnResizeMode==="fit"){let m=i.nextElementSibling;for(;!m.offsetParent;)m=m.nextElementSibling;if(m){let v=m.offsetWidth-o,w=m.style.minWidth||15;if(s>15&&v>parseInt(w))if(this.scrollable){let O=this.findParentScrollableView(i),N=zo(O,".p-treetable-scrollable-body table")||zo(O,".p-scroller-viewport table"),V=zo(O,"table.p-treetable-scrollable-header-table"),$=zo(O,"table.p-treetable-scrollable-footer-table"),q=rx(i);this.resizeColGroup(V,q,s,v),this.resizeColGroup(N,q,s,v),this.resizeColGroup($,q,s,v)}else i.style.width=s+"px",m&&(m.style.width=v+"px")}}else if(this.columnResizeMode==="expand")if(this.scrollable){let m=this.findParentScrollableView(i),v=zo(m,".p-treetable-scrollable-body")||zo(m,".p-scroller-viewport"),w=zo(m,".p-treetable-scrollable-header"),O=zo(m,".p-treetable-scrollable-footer"),N=zo(m,".p-treetable-scrollable-body table")||zo(m,".p-scroller-viewport table"),V=zo(m,"table.p-treetable-scrollable-header-table"),$=zo(m,"table.p-treetable-scrollable-footer-table");N.style.width=N.offsetWidth+o+"px",V.style.width=V.offsetWidth+o+"px",$&&($.style.width=$.offsetWidth+o+"px");let q=rx(i),W=i?N.offsetWidth+o:s,te=i?V.offsetWidth+o:s,fe=this.el?.nativeElement.offsetWidth>=W,xe=(Fe,Re,Se,ke)=>{Fe&&Re&&(Fe.style.width=ke?Se+J5(v)+"px":"auto",Re.style.width=Se+"px")};xe(v,N,W,fe),xe(w,V,te,fe),xe(O,$,te,fe),this.resizeColGroup(V,q,s,null),this.resizeColGroup(N,q,s,null),this.resizeColGroup($,q,s,null)}else{this.tableViewChild.nativeElement.style.width=this.tableViewChild?.nativeElement.offsetWidth+o+"px",i.style.width=s+"px";let m=this.tableViewChild?.nativeElement.style.width;this.el.nativeElement.style.width=m+"px"}this.onColResize.emit({element:i,delta:o})}this.resizeHelperViewChild.nativeElement.style.display="none",Fd(this.el?.nativeElement,"p-unselectable-text")}findParentScrollableView(e){if(e){let i=e.parentElement;for(;i&&!Fc(i,"p-treetable-scrollable-view");)i=i.parentElement;return i}else return null}resizeColGroup(e,i,o,r){if(e){let s=e.children[0].nodeName==="COLGROUP"?e.children[0]:null;if(s){let d=s.children[i],m=d.nextElementSibling;d.style.width=o+"px",m&&r&&(m.style.width=r+"px")}else throw"Scrollable tables require a colgroup to support resizable columns"}}onColumnDragStart(e,i){this.reorderIconWidth=Lae(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=Pae(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=i,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,i){if(this.reorderableColumns&&this.draggedColumn&&i){e.preventDefault();let o=Zg(this.el?.nativeElement),r=Zg(i);if(this.draggedColumn!=i){let s=r.left-o.left,d=o.top-r.top,m=r.left+i.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=r.top-o.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=r.top-o.top+i.offsetHeight+"px",e.pageX>m?(this.reorderIndicatorUpViewChild.nativeElement.style.left=s+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=s+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=s-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=s-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")}onColumnDrop(e,i){if(e.preventDefault(),this.draggedColumn){let o=tr.indexWithinGroup(this.draggedColumn,"ttreorderablecolumn"),r=tr.indexWithinGroup(i,"ttreorderablecolumn"),s=o!=r;s&&(r-o==1&&this.dropPosition===-1||o-r==1&&this.dropPosition===1)&&(s=!1),s&&ro&&this.dropPosition===-1&&(r=r-1),s&&(OAe(this.columns,o,r),this.onColReorder.emit({dragIndex:o,dropIndex:r,columns:this.columns})),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}handleRowClick(e){let i=e.originalEvent.target.nodeName;if(!(i=="INPUT"||i=="BUTTON"||i=="A"||Fc(e.originalEvent.target,"p-clickable"))){if(this.selectionMode){this.preventSelectionSetterPropagation=!0;let o=e.rowNode,r=this.isSelected(o.node),s=this.rowTouched?!1:this.metaKeySelection,d=this.dataKey?String(bs(o.node.data,this.dataKey)):null;if(s){let m=e.originalEvent,v=m.metaKey||m.ctrlKey;if(r&&v){if(this.isSingleSelectionMode())this._selection=null,this.selectedKeys={},this.selectionChange.emit(null);else{let w=this.findIndexInSelection(o.node);this._selection=this.selection.filter((O,N)=>N!=w),this.selectionChange.emit(this.selection),d&&delete this.selectedKeys[d]}this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:o.node,type:"row"})}else this.isSingleSelectionMode()?(this._selection=o.node,this.selectionChange.emit(o.node),d&&(this.selectedKeys={},this.selectedKeys[d]=1)):this.isMultipleSelectionMode()&&(v?this._selection=this.selection||[]:(this._selection=[],this.selectedKeys={}),this._selection=[...this.selection,o.node],this.selectionChange.emit(this.selection),d&&(this.selectedKeys[d]=1)),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:o.node,type:"row",index:e.rowIndex})}else if(this.selectionMode==="single")r?(this._selection=null,this.selectedKeys={},this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:o.node,type:"row"})):(this._selection=o.node,this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:o.node,type:"row",index:e.rowIndex}),d&&(this.selectedKeys={},this.selectedKeys[d]=1));else if(this.selectionMode==="multiple")if(r){let m=this.findIndexInSelection(o.node);this._selection=this.selection.filter((v,w)=>w!=m),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:o.node,type:"row"}),d&&delete this.selectedKeys[d]}else this._selection=this.selection?[...this.selection,o.node]:[o.node],this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:o.node,type:"row",index:e.rowIndex}),d&&(this.selectedKeys[d]=1);this.tableService.onSelectionChange()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let i=e.rowNode.node;if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=i,this.contextMenuSelectionChange.emit(i),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:i}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(i);else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let o=this.isSelected(i),r=this.dataKey?String(bs(i.data,this.dataKey)):null;o||(this.isSingleSelectionMode()?(this.selection=i,this.selectionChange.emit(i)):this.isMultipleSelectionMode()&&(this.selection=[i],this.selectionChange.emit(this.selection)),r&&(this.selectedKeys[r]=1)),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:i})}}}toggleNodeWithCheckbox(e){this.selection=this.selection||[],this.preventSelectionSetterPropagation=!0;let i=e.rowNode.node;this.isSelected(i)?(this.propagateSelectionDown(i,!1),e.rowNode.parent&&this.propagateSelectionUp(i.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:i})):(this.propagateSelectionDown(i,!0),e.rowNode.parent&&this.propagateSelectionUp(i.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:i})),this.tableService.onSelectionChange()}toggleNodesWithCheckbox(e,i){let o=this.filteredNodes||this.value;this._selection=i&&o?o.slice():[],this.toggleAll(i),i||(this._selection=[],this.selectedKeys={}),this.preventSelectionSetterPropagation=!0,this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:i})}toggleAll(e){let i=this.filteredNodes||this.value;if(this.selectionKeys){if(i&&i.length){for(let o of i)this.propagateDown(o,e);this.selectionKeysChange.emit(this.selectionKeys)}}else if(i&&i.length)for(let o of i)this.propagateSelectionDown(o,e)}propagateSelectionUp(e,i){if(e.children&&e.children.length){let r=0,s=!1,d=this.dataKey?String(bs(e.data,this.dataKey)):null;for(let m of e.children)this.isSelected(m)?r++:m.partialSelected&&(s=!0);if(i&&r==e.children.length)this._selection=[...this.selection||[],e],e.partialSelected=!1,d&&(this.selectedKeys[d]=1);else{if(!i){let m=this.findIndexInSelection(e);m>=0&&(this._selection=this.selection.filter((v,w)=>w!=m),d&&delete this.selectedKeys[d])}s||r>0&&r!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}}let o=e.parent;e.checked=i,o&&this.propagateSelectionUp(o,i)}propagateSelectionDown(e,i){let o=this.findIndexInSelection(e),r=this.dataKey?String(bs(e.data,this.dataKey)):null;if(i&&o==-1?(this._selection=[...this.selection||[],e],r&&(this.selectedKeys[r]=1)):!i&&o>-1&&(this._selection=this.selection.filter((s,d)=>d!=o),r&&delete this.selectedKeys[r]),e.partialSelected=!1,e.checked=i,e.children&&e.children.length)for(let s of e.children)this.propagateSelectionDown(s,i)}isSelected(e){return e&&this.selection?this.dataKey?e.hasOwnProperty("checked")?e.checked:this.selectedKeys[bs(e.data,this.dataKey)]!==void 0:Array.isArray(this.selection)?this.findIndexInSelection(e)>-1:this.equals(e,this.selection):!1}isNodeSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]?.checked===!0:!1}isNodePartialSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]?.partialChecked===!0:!1}nodeKey(e){return bs(e,this.dataKey)||bs(e?.data,this.dataKey)}toggleCheckbox(e){let{rowNode:i,check:o,originalEvent:r}=e,s=i.node;this.selectionKeys?(this.propagateDown(s,o),s.parent&&this.propagateUp(s.parent,o),this.selectionKeysChange.emit(this.selectionKeys)):this.toggleNodeWithCheckbox({originalEvent:r,rowNode:i}),this.tableService.onSelectionChange()}propagateDown(e,i){if(i?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:delete this.selectionKeys[this.nodeKey(e)],e.children&&e.children.length)for(let o of e.children)this.propagateDown(o,i)}propagateUp(e,i){let o=0,r=!1;for(let d of e.children)this.selectionKeys[this.nodeKey(d)]&&this.selectionKeys[this.nodeKey(d)].checked?o++:this.selectionKeys[this.nodeKey(d)]&&this.selectionKeys[this.nodeKey(d)].partialChecked&&(r=!0);i&&o===e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:(i||delete this.selectionKeys[this.nodeKey(e)],r||o>0&&o!==e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!0}:this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!1});let s=e.parent;s&&this.propagateUp(s,i)}findIndexInSelection(e){let i=-1;if(this.selection&&this.selection.length){for(let o=0;o{this._filter(),this.filterTimeout=null},this.filterDelay)}filterGlobal(e,i){this.filter(e,"global",i)}isFilterBlank(e){return e!=null?!!(typeof e=="string"&&e.trim().length==0||Array.isArray(e)&&e.length==0):!0}_filter(){if(this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(!this.hasFilter())this.filteredNodes=null,this.paginator&&(this.totalRecords=this.value?this.value.length:0);else{let i;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");i=this.globalFilterFields||this.columns}this.filteredNodes=[];let o=this.filterMode==="strict",r=!1;for(let s of this.value){let d=be({},s),m=!0,v=!1,w;for(let N in this.filters)if(this.filters.hasOwnProperty(N)&&N!=="global"){let V=this.filters[N],$=N,q=V.value,W=V.matchMode||"startsWith",te=this.filterService.filters[W];if(w={filterField:$,filterValue:q,filterConstraint:te,isStrictMode:o},(o&&!(this.findFilteredNodes(d,w)||this.isFilterMatched(d,w))||!o&&!(this.isFilterMatched(d,w)||this.findFilteredNodes(d,w)))&&(m=!1),!m)break}if(this.filters.global&&!v&&i){let N=be({},d),V,$=this.filters.global.value,q=this.filterService.filters[this.filters.global.matchMode];w={filterField:V,filterValue:$,filterConstraint:q,isStrictMode:o,globalFilterFieldsArray:i},(o&&(this.findFilteredNodes(N,w)||this.isFilterMatched(N,w))||!o&&(this.isFilterMatched(N,w)||this.findFilteredNodes(N,w)))&&(v=!0,d=N)}let O=m;this.filters.global&&(O=m&&v),O&&this.filteredNodes.push(d),r=r||!m||v||m&&this.filteredNodes.length>0||!v&&this.filteredNodes.length===0}r||(this.filteredNodes=null),this.paginator&&(this.totalRecords=this.filteredNodes?this.filteredNodes.length:this.value?this.value.length:0)}this.cd.markForCheck()}this.first=0;let e=this.filteredNodes||this.value;this.onFilter.emit({filters:this.filters,filteredValue:e}),this.tableService.onUIUpdate(e),this.updateSerializedValue(),this.scrollable&&this.resetScrollTop()}findFilteredNodes(e,i){if(e){let o=!1;if(e.children){let r=[...e.children];e.children=[];for(let s of r){let d=be({},s);this.isFilterMatched(d,i)&&(o=!0,e.children.push(d))}}if(o)return!0}}isFilterMatched(e,i){let{filterField:o,filterValue:r,filterConstraint:s,isStrictMode:d,globalFilterFieldsArray:m}=i,v=!1,w=O=>s(bs(e.data,O),r,this.filterLocale);return v=m?.length?m.some(O=>w(O.field||O)):w(o),(!v||d&&!this.isNodeLeaf(e))&&(v=this.findFilteredNodes(e,{filterField:o,filterValue:r,filterConstraint:s,isStrictMode:d,globalFilterFieldsArray:m})||v),v}isNodeLeaf(e){return e.leaf===!1?!1:!(e.children&&e.children.length)}hasFilter(){let e=!0;for(let i in this.filters)if(this.filters.hasOwnProperty(i)){e=!1;break}return!e}reset(){this._sortField=null,this._sortOrder=1,this._multiSortMeta=null,this.tableService.onSort(null),this.filteredNodes=null,this.filters={},this.first=0,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.totalRecords=this._value?this._value.length:0}updateEditingCell(e,i,o){this.editingCell=e,this.editingCellData=i,this.editingCellField=o,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&Xd(this.editingCell,".ng-invalid.ng-dirty").length===0}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=this.renderer.listen(this.document,"click",e=>{this.editingCell&&!this.editingCellClick&&this.isEditingCellValid()&&(Fd(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData}),this.editingCellField=null,this.editingCellData=null,this.unbindDocumentEditListener()),this.editingCellClick=!1}))}unbindDocumentEditListener(){this.documentEditListener&&(this.documentEditListener(),this.documentEditListener=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.editingCellField=null,this.editingCellData=null,this.initialized=null,super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})();static \u0275cmp=ne({type:t,selectors:[["p-treeTable"],["p-treetable"],["p-tree-table"]],contentQueries:function(i,o,r){if(i&1&&(xt(r,uVt,4),xt(r,pVt,4),xt(r,hVt,4),xt(r,mVt,4),xt(r,fVt,4),xt(r,gVt,4),xt(r,_Vt,4),xt(r,yVt,4),xt(r,vVt,4),xt(r,bVt,4),xt(r,CVt,4),xt(r,xVt,4),xt(r,wVt,4),xt(r,SVt,4),xt(r,TVt,4),xt(r,IVt,4),xt(r,EVt,4),xt(r,DVt,4),xt(r,AVt,4),xt(r,kVt,4),xt(r,MVt,4),xt(r,OVt,4),xt(r,RVt,4),xt(r,FVt,4),xt(r,PVt,4),xt(r,LVt,4),xt(r,so,4)),i&2){let s;Le(s=Ne())&&(o._colGroupTemplate=s.first),Le(s=Ne())&&(o._captionTemplate=s.first),Le(s=Ne())&&(o._headerTemplate=s.first),Le(s=Ne())&&(o._bodyTemplate=s.first),Le(s=Ne())&&(o._footerTemplate=s.first),Le(s=Ne())&&(o._summaryTemplate=s.first),Le(s=Ne())&&(o._emptyMessageTemplate=s.first),Le(s=Ne())&&(o._paginatorLeftTemplate=s.first),Le(s=Ne())&&(o._paginatorRightTemplate=s.first),Le(s=Ne())&&(o._paginatorDropdownItemTemplate=s.first),Le(s=Ne())&&(o._frozenHeaderTemplate=s.first),Le(s=Ne())&&(o._frozenBodyTemplate=s.first),Le(s=Ne())&&(o._frozenFooterTemplate=s.first),Le(s=Ne())&&(o._frozenColGroupTemplate=s.first),Le(s=Ne())&&(o._loadingIconTemplate=s.first),Le(s=Ne())&&(o._reorderIndicatorUpIconTemplate=s.first),Le(s=Ne())&&(o._reorderIndicatorDownIconTemplate=s.first),Le(s=Ne())&&(o._sortIconTemplate=s.first),Le(s=Ne())&&(o._checkboxIconTemplate=s.first),Le(s=Ne())&&(o._headerCheckboxIconTemplate=s.first),Le(s=Ne())&&(o._togglerIconTemplate=s.first),Le(s=Ne())&&(o._paginatorFirstPageLinkIconTemplate=s.first),Le(s=Ne())&&(o._paginatorLastPageLinkIconTemplate=s.first),Le(s=Ne())&&(o._paginatorPreviousPageLinkIconTemplate=s.first),Le(s=Ne())&&(o._paginatorNextPageLinkIconTemplate=s.first),Le(s=Ne())&&(o._loaderTemplate=s.first),Le(s=Ne())&&(o.templates=s)}},viewQuery:function(i,o){if(i&1&&(Ri(NVt,5),Ri(BVt,5),Ri(VVt,5),Ri(zVt,5),Ri(UVt,5),Ri(HVt,5)),i&2){let r;Le(r=Ne())&&(o.resizeHelperViewChild=r.first),Le(r=Ne())&&(o.reorderIndicatorUpViewChild=r.first),Le(r=Ne())&&(o.reorderIndicatorDownViewChild=r.first),Le(r=Ne())&&(o.tableViewChild=r.first),Le(r=Ne())&&(o.scrollableViewChild=r.first),Le(r=Ne())&&(o.scrollableFrozenViewChild=r.first)}},hostVars:3,hostBindings:function(i,o){i&2&&(Ge("data-scrollselectors",".p-treetable-scrollable-body"),Oe(o.cn(o.cx("root"),o.styleClass)))},inputs:{columns:"columns",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",autoLayout:[2,"autoLayout","autoLayout",je],lazy:[2,"lazy","lazy",je],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",je],paginator:[2,"paginator","paginator",je],rows:[2,"rows","rows",ln],first:[2,"first","first",ln],pageLinks:[2,"pageLinks","pageLinks",ln],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",je],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",je],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",je],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",je],showPageLinks:[2,"showPageLinks","showPageLinks",je],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",ln],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",je],customSort:[2,"customSort","customSort",je],selectionMode:"selectionMode",contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",je],compareSelectionBy:"compareSelectionBy",rowHover:[2,"rowHover","rowHover",je],loading:[2,"loading","loading",je],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",je],scrollable:[2,"scrollable","scrollable",je],scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",je],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",ln],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",ln],frozenWidth:"frozenWidth",frozenColumns:"frozenColumns",resizableColumns:[2,"resizableColumns","resizableColumns",je],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",je],contextMenu:"contextMenu",rowTrackBy:"rowTrackBy",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",ln],filterMode:"filterMode",filterLocale:"filterLocale",paginatorLocale:"paginatorLocale",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",value:"value",virtualRowHeight:"virtualRowHeight",selectionKeys:"selectionKeys",showGridlines:[2,"showGridlines","showGridlines",je]},outputs:{selectionChange:"selectionChange",contextMenuSelectionChange:"contextMenuSelectionChange",onFilter:"onFilter",onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onPage:"onPage",onSort:"onSort",onLazyLoad:"onLazyLoad",sortFunction:"sortFunction",onColResize:"onColResize",onColReorder:"onColReorder",onNodeSelect:"onNodeSelect",onNodeUnselect:"onNodeUnselect",onContextMenuSelect:"onContextMenuSelect",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",selectionKeysChange:"selectionKeysChange"},standalone:!1,features:[jt([r8,My]),ft,Ot],decls:10,vars:10,consts:[["table",""],["scrollableView",""],["scrollableFrozenView",""],["resizeHelper",""],["reorderIndicatorUp",""],["reorderIndicatorDown",""],[3,"class",4,"ngIf"],[3,"rows","first","totalRecords","pageLinkSize","styleClass","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","appendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","locale","onPageChange",4,"ngIf"],[3,"class","display",4,"ngIf"],[4,"ngIf"],["data-p-icon","spinner",3,"spin","class",4,"ngIf"],["data-p-icon","spinner",3,"spin"],[4,"ngTemplateOutlet"],[3,"onPageChange","rows","first","totalRecords","pageLinkSize","styleClass","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","appendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","locale"],["pTemplate","firstpagelinkicon"],["pTemplate","previouspagelinkicon"],["pTemplate","lastpagelinkicon"],["pTemplate","nextpagelinkicon"],["role","table",3,"ngClass","ngStyle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","rowgroup"],["role","rowgroup",3,"pTreeTableBody","pTreeTableBodyTemplate"],[3,"ngClass","ttScrollableView","frozen","ngStyle","scrollHeight",4,"ngIf"],[3,"ttScrollableView","frozen","scrollHeight","ngStyle"],[3,"ngClass","ttScrollableView","frozen","ngStyle","scrollHeight"],["data-p-icon","arrow-down",4,"ngIf"],["data-p-icon","arrow-down"],["data-p-icon","arrow-up",4,"ngIf"],["data-p-icon","arrow-up"]],template:function(i,o){i&1&&ee(0,XVt,4,6,"div",6)(1,e4t,2,3,"div",6)(2,h4t,5,21,"p-paginator",7)(3,_4t,9,24,"div",6)(4,v4t,4,12,"div",6)(5,O4t,5,21,"p-paginator",7)(6,F4t,2,3,"div",6)(7,P4t,2,4,"div",8)(8,V4t,4,6,"span",8)(9,j4t,4,6,"span",8),i&2&&(E("ngIf",o.loading&&o.showLoader),T(),E("ngIf",o.captionTemplate||o._captionTemplate),T(),E("ngIf",o.paginator&&(o.paginatorPosition==="top"||o.paginatorPosition=="both")),T(),E("ngIf",!o.scrollable),T(),E("ngIf",o.scrollable),T(),E("ngIf",o.paginator&&(o.paginatorPosition==="bottom"||o.paginatorPosition=="both")),T(),E("ngIf",o.summaryTemplate||o._summaryTemplate),T(),E("ngIf",o.resizableColumns),T(),E("ngIf",o.reorderableColumns),T(),E("ngIf",o.reorderableColumns))},dependencies:()=>[Ns,Fr,Lo,vs,aS,so,og,BP,VP,z5t,OBe],encapsulation:2})}return t})(),OBe=(()=>{class t{tt;treeTableService;cd;columns;template;frozen;serializedNodes;scrollerOptions;subscription;constructor(e,i,o){this.tt=e,this.treeTableService=i,this.cd=o,this.subscription=this.tt.tableService.uiUpdateSource$.subscribe(()=>{this.tt.virtualScroll&&this.cd.detectChanges()})}getScrollerOption(e,i){return this.tt.virtualScroll?(i=i||this.scrollerOptions,i?i[e]:null):null}getRowIndex(e){let i=this.getScrollerOption("getItemOptions");return i?i(e).index:e}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(_e(f_),_e(r8),_e(Gi))};static \u0275cmp=ne({type:t,selectors:[["","pTreeTableBody",""]],inputs:{columns:[0,"pTreeTableBody","columns"],template:[0,"pTreeTableBodyTemplate","template"],frozen:[2,"frozen","frozen",je],serializedNodes:"serializedNodes",scrollerOptions:"scrollerOptions"},standalone:!1,attrs:G4t,decls:2,vars:3,consts:[["ngFor","",3,"ngForOf","ngForTrackBy"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&ee(0,Y4t,1,1,"ng-template",0)(1,Z4t,2,5,"ng-container",1),i&2&&(E("ngForOf",o.serializedNodes||o.tt.serializedValue)("ngForTrackBy",o.tt.rowTrackBy),T(),E("ngIf",o.tt.isEmpty()))},dependencies:[Gc,Fr,Lo],encapsulation:2})}return t})(),z5t=(()=>{class t extends oo{tt;el;zone;columns;frozen;scrollHeaderViewChild;scrollHeaderBoxViewChild;scrollBodyViewChild;scrollTableViewChild;scrollLoadingTableViewChild;scrollFooterViewChild;scrollFooterBoxViewChild;scrollableAlignerViewChild;scroller;headerScrollListener;bodyScrollListener;footerScrollListener;frozenSiblingBody;totalRecordsSubscription;_scrollHeight;preventBodyScrollPropagation;_componentStyle=re(My);get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e,e!=null&&(e.includes("%")||e.includes("calc"))&&console.log('Percentage scroll height calculation is removed in favor of the more performant CSS based flex mode, use scrollHeight="flex" instead.')}constructor(e,i,o){super(),this.tt=e,this.el=i,this.zone=o}ngAfterViewInit(){if(super.ngAfterViewInit(),ps(this.platformId)){if(this.frozen)this.scrollableAlignerViewChild&&this.scrollableAlignerViewChild.nativeElement&&(this.scrollableAlignerViewChild.nativeElement.style.height=mAe()+"px");else{(this.tt.frozenColumns||this.tt.frozenBodyTemplate||this.tt._frozenBodyTemplate)&&ac(this.el.nativeElement,"p-treetable-unfrozen-view");let e=this.el.nativeElement.previousElementSibling;if(e&&(this.tt.virtualScroll?this.frozenSiblingBody=zo(e,".p-scroller-viewport"):this.frozenSiblingBody=zo(e,".p-treetable-scrollable-body")),this.scrollHeight){let i=J5();this.scrollHeaderBoxViewChild.nativeElement.style.paddingRight=i+"px",this.scrollFooterBoxViewChild&&this.scrollFooterBoxViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.paddingRight=i+"px")}}this.bindEvents()}}bindEvents(){ps(this.platformId)&&this.zone.runOutsideAngular(()=>{this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.headerScrollListener=this.renderer.listen(this.scrollHeaderBoxViewChild?.nativeElement,"scroll",this.onHeaderScroll.bind(this))),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.footerScrollListener=this.renderer.listen(this.scrollFooterViewChild.nativeElement,"scroll",this.onFooterScroll.bind(this))),this.frozen||(this.tt.virtualScroll?this.bodyScrollListener=this.renderer.listen((this.scroller?.getElementRef()).nativeElement,"scroll",this.onBodyScroll.bind(this)):this.bodyScrollListener=this.renderer.listen(this.scrollBodyViewChild?.nativeElement,"scroll",this.onBodyScroll.bind(this)))})}unbindEvents(){ps(this.platformId)&&(this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&this.headerScrollListener&&(this.headerScrollListener(),this.headerScrollListener=null),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&this.footerScrollListener&&(this.footerScrollListener(),this.footerScrollListener=null),this.scrollBodyViewChild&&this.scrollBodyViewChild.nativeElement&&this.bodyScrollListener&&(this.bodyScrollListener(),this.bodyScrollListener=null),this.scroller&&this.scroller.getElementRef()&&this.bodyScrollListener&&(this.bodyScrollListener(),this.bodyScrollListener=null))}onHeaderScroll(){let e=this.scrollHeaderViewChild?.nativeElement.scrollLeft;this.scrollBodyViewChild.nativeElement.scrollLeft=e,this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterViewChild.nativeElement.scrollLeft=e),this.preventBodyScrollPropagation=!0}onFooterScroll(){let e=this.scrollFooterViewChild?.nativeElement.scrollLeft;this.scrollBodyViewChild.nativeElement.scrollLeft=e,this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderViewChild.nativeElement.scrollLeft=e),this.preventBodyScrollPropagation=!0}onBodyScroll(e){if(this.preventBodyScrollPropagation){this.preventBodyScrollPropagation=!1;return}this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft=-1*e.target.scrollLeft+"px"),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.marginLeft=-1*e.target.scrollLeft+"px"),this.frozenSiblingBody&&(this.frozenSiblingBody.scrollTop=e.target.scrollTop)}scrollToVirtualIndex(e){this.scroller&&this.scroller.scrollToIndex(e)}scrollTo(e){this.scroller?this.scroller.scrollTo(e):this.scrollBodyViewChild?.nativeElement.scrollTo?this.scrollBodyViewChild.nativeElement.scrollTo(e):(this.scrollBodyViewChild.nativeElement.scrollLeft=e.left,this.scrollBodyViewChild.nativeElement.scrollTop=e.top)}ngOnDestroy(){super.ngOnDestroy(),this.unbindEvents(),this.frozenSiblingBody=null}static \u0275fac=function(i){return new(i||t)(_e(f_),_e(Bn),_e(_n))};static \u0275cmp=ne({type:t,selectors:[["","ttScrollableView",""]],viewQuery:function(i,o){if(i&1&&(Ri(X4t,5),Ri(J4t,5),Ri(e5t,5),Ri(t5t,5),Ri(i5t,5),Ri(n5t,5),Ri(o5t,5),Ri(r5t,5),Ri(s5t,5)),i&2){let r;Le(r=Ne())&&(o.scrollHeaderViewChild=r.first),Le(r=Ne())&&(o.scrollHeaderBoxViewChild=r.first),Le(r=Ne())&&(o.scrollBodyViewChild=r.first),Le(r=Ne())&&(o.scrollTableViewChild=r.first),Le(r=Ne())&&(o.scrollLoadingTableViewChild=r.first),Le(r=Ne())&&(o.scrollFooterViewChild=r.first),Le(r=Ne())&&(o.scrollFooterBoxViewChild=r.first),Le(r=Ne())&&(o.scrollableAlignerViewChild=r.first),Le(r=Ne())&&(o.scroller=r.first)}},inputs:{columns:[0,"ttScrollableView","columns"],frozen:[2,"frozen","frozen",je],scrollHeight:"scrollHeight"},standalone:!1,features:[jt([My]),ft],attrs:a5t,decls:13,vars:20,consts:[["scrollHeader",""],["scrollHeaderBox",""],["buildInItems",""],["scroller",""],["content",""],["loader",""],["scrollBody",""],["scrollTable",""],["scrollableAligner",""],["scrollFooter",""],["scrollFooterBox",""],[3,"ngStyle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","rowgroup"],[3,"items","styleClass","style","scrollHeight","itemSize","lazy","options","onLazyLoad",4,"ngIf"],[4,"ngIf"],[3,"class",4,"ngIf"],[3,"onLazyLoad","items","styleClass","scrollHeight","itemSize","lazy","options"],["role","table",3,"ngClass","ngStyle"],["role","rowgroup",3,"pTreeTableBody","pTreeTableBodyTemplate","serializedNodes","frozen"],[3,"background-color",4,"ngIf"],[3,"ngClass","ngStyle"]],template:function(i,o){i&1&&(k(0,"div",null,0)(2,"div",null,1)(4,"table",11),ee(5,p5t,1,0,"ng-container",12),k(6,"thead",13),ee(7,h5t,1,0,"ng-container",12),D()()()(),ee(8,v5t,5,11,"p-scroller",14)(9,C5t,4,12,"ng-container",15)(10,S5t,5,17,"ng-template",null,2,Pt)(12,E5t,8,18,"div",16)),i&2&&(Oe(o.cx("scrollableHeader")),T(2),Oe(o.cx("scrollableHeaderBox")),T(2),Oe(o.cn(o.cx("scrollableHeaderTable"),o.tt.tableStyleClass)),E("ngStyle",o.tt.tableStyle),T(),E("ngTemplateOutlet",o.frozen?o.tt.frozenColGroupTemplate||o.tt._frozenColGroupTemplate||o.tt.colGroupTemplate||o.tt._colGroupTemplate:o.tt.colGroupTemplate||o.tt._colGroupTemplate)("ngTemplateOutletContext",ki(16,CS,o.columns)),T(),Oe(o.cx("thead")),T(),E("ngTemplateOutlet",o.frozen?o.tt.frozenHeaderTemplate||o.tt._frozenHeaderTemplate||o.tt.headerTemplate||o.tt._headerTemplate:o.tt.headerTemplate||o.tt._headerTemplate)("ngTemplateOutletContext",ki(18,CS,o.columns)),T(),E("ngIf",o.tt.virtualScroll),T(),E("ngIf",!o.tt.virtualScroll),T(3),E("ngIf",o.tt.footerTemplate||o.tt._footerTemplate))},dependencies:()=>[Ns,Fr,Lo,vs,Ym,OBe],encapsulation:2})}return t})();var RBe=(()=>{class t extends oo{tt;tableService;rowNode;ttSelectableRowDisabled;selected;subscription;_componentStyle=re(My);constructor(e,i){super(),this.tt=e,this.tableService=i,this.isEnabled()&&(this.subscription=this.tt.tableService.selectionSource$.subscribe(()=>{this.selected=this.tt.isSelected(this.rowNode.node)}))}ngOnInit(){super.ngOnInit(),this.isEnabled()&&(this.selected=this.tt.isSelected(this.rowNode.node))}onClick(e){this.isEnabled()&&this.tt.handleRowClick({originalEvent:e,rowNode:this.rowNode})}onKeyDown(e){switch(e.code){case"Enter":case"Space":this.onEnterKey(e);break;default:break}}onTouchEnd(e){this.isEnabled()&&this.tt.handleRowTouchEnd(e)}onEnterKey(e){this.tt.selectionMode==="checkbox"?this.tt.toggleNodeWithCheckbox({originalEvent:e,rowNode:this.rowNode}):this.onClick(e),e.preventDefault()}isEnabled(){return this.ttSelectableRowDisabled!==!0}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(_e(f_),_e(r8))};static \u0275dir=rn({type:t,selectors:[["","ttSelectableRow",""]],hostVars:3,hostBindings:function(i,o){i&1&&ie("click",function(s){return o.onClick(s)})("keydown",function(s){return o.onKeyDown(s)})("touchend",function(s){return o.onTouchEnd(s)}),i&2&&(Ge("aria-checked",o.selected),Oe(o.cx("row")))},inputs:{rowNode:[0,"ttSelectableRow","rowNode"],ttSelectableRowDisabled:[2,"ttSelectableRowDisabled","ttSelectableRowDisabled",je]},standalone:!1,features:[jt([My]),ft]})}return t})();var BN=(()=>{class t extends oo{tt;tableService;cd;disabled;rowNode;checked;partialChecked;focused;subscription;_componentStyle=re(My);constructor(e,i,o){super(),this.tt=e,this.tableService=i,this.cd=o,this.subscription=this.tt.tableService.selectionSource$.subscribe(()=>{this.tt.selectionKeys?(this.checked=this.tt.isNodeSelected(this.rowNode.node),this.partialChecked=this.tt.isNodePartialSelected(this.rowNode.node)):(this.checked=this.tt.isSelected(this.rowNode.node),this.partialChecked=this.rowNode.node.partialSelected),this.cd.markForCheck()})}ngOnInit(){super.ngOnInit(),this.tt.selectionKeys?(this.checked=this.tt.isNodeSelected(this.rowNode.node),this.partialChecked=this.tt.isNodePartialSelected(this.rowNode.node)):(this.checked=this.tt.isSelected(this.rowNode.node),this.partialChecked=this.rowNode.node.partialSelected)}onClick(e){if(!this.disabled)if(this.tt.selectionKeys){let i=!this.checked;this.tt.toggleCheckbox({originalEvent:e,check:i,rowNode:this.rowNode})}else this.tt.toggleNodeWithCheckbox({originalEvent:e,rowNode:this.rowNode});fAe()}onFocus(){this.focused=!0}onBlur(){this.focused=!1}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(_e(f_),_e(r8),_e(Gi))};static \u0275cmp=ne({type:t,selectors:[["p-treeTableCheckbox"],["p-treetable-checkbox"],["p-tree-table-checkbox"]],inputs:{disabled:[2,"disabled","disabled",je],rowNode:[0,"value","rowNode"]},standalone:!1,features:[jt([My]),ft],decls:2,vars:7,consts:[[3,"onChange","ngModel","binary","disabled","indeterminate","styleClass","tabIndex"],[4,"ngIf"],["pTemplate","icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&(k(0,"p-checkbox",0),ie("onChange",function(s){return o.onClick(s)}),ee(1,O5t,2,0,"ng-container",1),D()),i&2&&(E("ngModel",o.checked)("binary",!0)("disabled",o.disabled)("indeterminate",o.partialChecked)("styleClass",o.cx("pcNodeCheckbox"))("tabIndex",-1),T(),E("ngIf",o.tt.checkboxIconTemplate||o.tt._checkboxIconTemplate))},dependencies:()=>[Fr,Lo,so,dg,no,Lr],encapsulation:2,changeDetection:0})}return t})();var iD=(()=>{class t extends oo{tt;el;zone;get level(){return this.rowNode?.level+1}get styleClass(){return this.rowNode?.node.styleClass||""}get expanded(){return this.rowNode?.node.expanded}rowNode;_componentStyle=re(My);constructor(e,i,o){super(),this.tt=e,this.el=i,this.zone=o}onKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"Tab":this.onTabKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;default:break}}onArrowDownKey(e){let i=this.el?.nativeElement?.nextElementSibling;i&&this.focusRowChange(e.currentTarget,i),e.preventDefault()}onArrowUpKey(e){let i=this.el?.nativeElement?.previousElementSibling;i&&this.focusRowChange(e.currentTarget,i),e.preventDefault()}onArrowRightKey(e){let i=e.currentTarget;!(zo(i,"button").style.visibility==="hidden")&&!this.expanded&&this.rowNode.node.children&&(this.expand(e),i.tabIndex=-1),e.preventDefault()}onArrowLeftKey(e){let i=this.tt.el?.nativeElement,o=Xd(i,'[aria-expanded="true"]'),r=o[o.length-1];this.expanded&&this.collapse(e),r&&(this.tt.toggleRowIndex=rx(r)),this.restoreFocus(),e.preventDefault()}onHomeKey(e){let i=zo(this.tt.el?.nativeElement,`tr[aria-level="${this.level}"]`);i&&ss(i),e.preventDefault()}onEndKey(e){let i=Xd(this.tt.el?.nativeElement,`tr[aria-level="${this.level}"]`),o=i[i.length-1];ss(o),e.preventDefault()}onTabKey(e){let i=this.el.nativeElement?[...Xd(this.el.nativeElement.parentNode,"tr")]:void 0;if(i&&Kr(i)){let o=i.some(r=>p0(r,"data-p-highlight")||r.getAttribute("aria-checked")==="true");if(i.forEach(r=>{r.tabIndex=-1}),o){let r=i.filter(s=>p0(s,"data-p-highlight")||s.getAttribute("aria-checked")==="true");r[0].tabIndex=0;return}i[0].tabIndex=0}}expand(e){this.tt.toggleRowIndex=rx(this.el.nativeElement),this.rowNode.node.expanded=!0,this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),this.rowNode.node.children?this.restoreFocus(this.tt.toggleRowIndex+1):this.restoreFocus(),this.tt.onNodeExpand.emit({originalEvent:e,node:this.rowNode.node})}collapse(e){this.rowNode.node.expanded=!1,this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),this.tt.onNodeCollapse.emit({originalEvent:e,node:this.rowNode.node})}focusRowChange(e,i,o){e.tabIndex="-1",i.tabIndex="0",ss(i)}restoreFocus(e){this.zone.runOutsideAngular(()=>{setTimeout(()=>{let i=this.tt.el?.nativeElement,o=zo(i,".p-treetable-tbody").children[e||this.tt.toggleRowIndex],r=[...Xd(i,"tr")];r&&r.forEach(s=>{o.isSameNode(s)||(s.tabIndex=-1)}),o&&(o.tabIndex=0,o.focus())},25)})}static \u0275fac=function(i){return new(i||t)(_e(f_),_e(Bn),_e(_n))};static \u0275dir=rn({type:t,selectors:[["","ttRow",""]],hostVars:7,hostBindings:function(i,o){i&1&&ie("keydown",function(s){return o.onKeyDown(s)}),i&2&&(Rr("tabIndex","0")("role",o.row),Ge("aria-expanded",o.expanded)("aria-level",o.level)("data-pc-section",o.row),Oe("p-element "+o.styleClass))},inputs:{rowNode:[0,"ttRow","rowNode"]},standalone:!1,features:[jt([My]),ft]})}return t})(),nD=(()=>{class t extends oo{tt;rowNode;_componentStyle=re(My);constructor(e){super(),this.tt=e}get toggleButtonAriaLabel(){return this.config.translation?this.rowNode.expanded?this.config.translation.aria.collapseRow:this.config.translation.aria.expandRow:void 0}onClick(e){this.rowNode.node.expanded=!this.rowNode.node.expanded,this.rowNode.node.expanded?this.tt.onNodeExpand.emit({originalEvent:e,node:this.rowNode.node}):this.tt.onNodeCollapse.emit({originalEvent:e,node:this.rowNode.node}),this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),e.preventDefault()}static \u0275fac=function(i){return new(i||t)(_e(f_))};static \u0275cmp=ne({type:t,selectors:[["p-treeTableToggler"],["p-treetabletoggler"],["p-treetable-toggler"]],inputs:{rowNode:"rowNode"},standalone:!1,features:[jt([My]),ft],decls:3,vars:14,consts:[["type","button","tabindex","-1","pRipple","",3,"click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","chevron-down",4,"ngIf"],["data-p-icon","chevron-right",4,"ngIf"],["data-p-icon","chevron-down"],["data-p-icon","chevron-right"]],template:function(i,o){i&1&&(k(0,"button",0),ie("click",function(s){return o.onClick(s)}),ee(1,P5t,3,2,"ng-container",1)(2,N5t,1,0,null,2),D()),i&2&&(Oe(o.cx("toggler")),Ir("visibility",o.rowNode.node.leaf===!1||o.rowNode.node.children&&o.rowNode.node.children.length?"visible":"hidden")("margin-inline-start",o.rowNode.level*16+"px"),Ge("data-pc-section","rowtoggler")("data-pc-group-section","rowactionbutton")("aria-label",o.toggleButtonAriaLabel),T(),E("ngIf",!o.tt.togglerIconTemplate&&!o.tt._togglerIconTemplate),T(),E("ngTemplateOutlet",o.tt.togglerIconTemplate||o.tt._togglerIconTemplate)("ngTemplateOutletContext",ki(12,CS,o.rowNode.node.expanded)))},dependencies:()=>[Fr,Lo,Ul,sm,Gw],encapsulation:2})}return t})(),oD=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[On,kE,Ym,og,BP,VP,az,cz,lz,LP,sx,sm,Gw,dg,In,hr,In]})}return t})();var FBe=(()=>{class t{constructor(){this.drivingTime=10,this.drivingTimeChange=new ve}onDrivingTimeChange(e){this.drivingTime=e,this.drivingTimeChange.emit(e)}displayWith(e){return`${e}min`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-isochrone-selection-driving-time-selector"]],inputs:{drivingTime:"drivingTime"},outputs:{drivingTimeChange:"drivingTimeChange"},decls:4,vars:6,consts:[[1,"mat-caption"],[3,"max","step","discrete","displayWith"],["matSliderThumb","",3,"valueChange","ngModel"]],template:function(i,o){i&1&&(k(0,"span",0),Q(1),D(),k(2,"mat-slider",1)(3,"input",2),ie("valueChange",function(s){return o.onDrivingTimeChange(s)}),D()()),i&2&&(T(),Qi("Fahrzeit ",o.drivingTime," min"),T(),E("max",60)("step",1)("discrete",!0)("displayWith",o.displayWith),T(),E("ngModel",o.drivingTime))},dependencies:[tq,eq,V5,xr,Ml,no,hr,Lr],styles:["mat-slider[_ngcontent-%COMP%]{width:80%}"]})}}return t})();var PBe=(()=>{class t{constructor(e){this.drivingTime=10,this.postalCodesSelection=[],this.mostlyInRange=!1,this.postalCodesSelectionChange=new ve,this.possiblePostalCodesChange=new ve,this.mapController=new Jd,this._selectionLayer=new Ex("selection",{layerId:e_.id,highlightLayerId:nb.id,sourceId:e_.id,displayName:"Auswahl"}),this._isochroneLayer=new zL("isochrone",{sourceId:"isochrone-source",displayName:"Fahrzeit"},e),this.mapController.registerLayer(this._isochroneLayer),this.mapController.registerLayer(this._selectionLayer),this._isochroneLayer.bounds$.subscribe(i=>{this._selectionLayer.onChangedBounds(i)}),this._selectionLayer.possibleSelection$.subscribe(i=>this.possiblePostalCodesChange.emit(i)),this._selectionLayer.selection.changed.subscribe(i=>this.postalCodesSelectionChange.emit(i.source.selected))}ngOnChanges(e){e.coordinates&&e.coordinates.currentValue&&this._isochroneLayer.updateCoordinates(this.coordinates),e.drivingTime&&e.drivingTime.currentValue&&this._isochroneLayer.updateDrivingTime(this.drivingTime),e.postalCodesSelection&&this._selectionLayer.selection.setSelection(...this.postalCodesSelection),e.mostlyInRange&&this._selectionLayer.updateMostlyInRange(this.mostlyInRange)}onMapLoad(e){this.mapController.addMapRef(e)}onMapClick(e){this._selectionLayer.click(e)}static{this.\u0275fac=function(i){return new(i||t)(_e(GY))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-isochrone-selection-postal-codes"]],inputs:{coordinates:"coordinates",drivingTime:"drivingTime",postalCodesSelection:"postalCodesSelection",mostlyInRange:"mostlyInRange"},outputs:{postalCodesSelectionChange:"postalCodesSelectionChange",possiblePostalCodesChange:"possiblePostalCodesChange"},features:[Ot],decls:3,vars:1,consts:[[1,"map-container"],[3,"mapLoaded","mapClick"],[3,"controller"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"bd-map",1),ie("mapLoaded",function(s){return o.onMapLoad(s)})("mapClick",function(s){return o.onMapClick(s)}),D(),ce(2,"bd-map-legend",2),D()),i&2&&(T(2),E("controller",o.mapController))},dependencies:[eu,Yp],styles:[".map-container[_ngcontent-%COMP%]{height:450px;position:relative}"]})}}return t})();var LBe=(()=>{class t{constructor(){this.distanceInKilometer=25,this.postalCodesSelection=[],this.mostlyInRange=!1,this.postalCodesSelectionChange=new ve,this.possiblePostalCodesChange=new ve,this.mapController=new Jd,this._drivingTimeLayer=new UL("drivingTime",{displayName:"Entfernung",sourceId:"drivingTime"}),this._selectionLayer=new Ex("selection",{layerId:e_.id,highlightLayerId:nb.id,sourceId:dx,displayName:"Auswahl"}),this.mapController.registerLayer(this._drivingTimeLayer),this.mapController.registerLayer(this._selectionLayer),this._selectionLayer.selection.changed.subscribe(e=>this.postalCodesSelectionChange.emit(e.source.selected)),this._selectionLayer.possibleSelection$.subscribe(e=>this.possiblePostalCodesChange.emit(e)),this._drivingTimeLayer.bounds$.subscribe(e=>this._selectionLayer.onChangedBounds(e))}ngOnChanges(e){e.coordinates&&e.coordinates.currentValue&&this._drivingTimeLayer.updateCoordinates(this.coordinates),e.distanceInKilometer&&e.distanceInKilometer.currentValue&&this._drivingTimeLayer.updateRadiusInKilometer(this.distanceInKilometer),e.mostlyInRange&&this._selectionLayer.updateMostlyInRange(this.mostlyInRange),e.postalCodesSelection&&this._selectionLayer.selection.setSelection(...this.postalCodesSelection)}onMapLoaded(e){this.mapController.addMapRef(e)}onMapClick(e){this._selectionLayer.click(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-geographic-distance-selection"]],inputs:{coordinates:"coordinates",distanceInKilometer:"distanceInKilometer",postalCodesSelection:"postalCodesSelection",mostlyInRange:"mostlyInRange"},outputs:{postalCodesSelectionChange:"postalCodesSelectionChange",possiblePostalCodesChange:"possiblePostalCodesChange"},features:[Ot],decls:3,vars:1,consts:[[1,"map-container"],[3,"mapLoaded","mapClick"],[3,"controller"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"bd-map",1),ie("mapLoaded",function(s){return o.onMapLoaded(s)})("mapClick",function(s){return o.onMapClick(s)}),D(),ce(2,"bd-map-legend",2),D()),i&2&&(T(2),E("controller",o.mapController))},dependencies:[eu,Yp],styles:[".map-container[_ngcontent-%COMP%]{height:450px;position:relative}"]})}}return t})();var uZ=class{constructor(n,e){this._baseUrl=n,this._resultUrl=e}index(){return`${this._baseUrl}/markets`}byMarketId(n){return`${this.index()}/${n}`}transform(){return`${this._resultUrl}/market/transform`}population(){return`${this._resultUrl}/projection/populations`}detailsTimeSeries(){return`${this._resultUrl}/timeseries/`}};var xS=class t{static fromObject(n={},e){let i=n.createdDate?new Date(n.createdDate):null,o=n.modifiedDate?new Date(n.modifiedDate):null,r=Promise.resolve(S0.EMPTY());return n.condition&&(r=$a.fromConditionJson(n.condition,e)),r.then(s=>new t(n.id,n.name,i,o,n.highestPermission,s))}constructor(n=null,e=null,i,o,r,s){this.id=n,this.name=e,this.createdDate=i,this.modifiedDate=o,this.highestPermission=r,this.condition=s,this.resourceName=ko.MARKET}equals(n){return vo.equals(this.id,n.id)}clone(){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.condition.clone())}toRequestFormat(){return this.condition.toCondition({})?.then(n=>({id:this.id,name:this.name,createdDate:this.createdDate,modifiedDate:this.modifiedDate,highestPermission:this.highestPermission,condition:n}))}},S0=class t extends Iy{static{this.TYPES=[{specification:df.Specification},{specification:h_.Specification},{specification:lf.Specification},{specification:wy.Specification},{specification:Sy.Specification},{specification:eM.Specification},{specification:J2.Specification}]}static EMPTY(){return new Mx([])}constructor(n=t.EMPTY()){super("market-filter",n)}clone(){return new t(this.expression.clone())}overrideClone(n){return new t(this.expression.overrideClone(n))}};var gM={1:"Im Alter von 0 bis unter 1 Jahr",2:"Im Alter von 1 bis unter 5 Jahren",3:"Im Alter von 5 bis unter 10 Jahren",4:"Im Alter von 10 bis unter 15 Jahren",5:"Im Alter von 15 bis unter 20 Jahren",6:"Im Alter von 20 bis unter 25 Jahren",7:"Im Alter von 25 bis unter 30 Jahren",8:"Im Alter von 30 bis unter 35 Jahren",9:"Im Alter von 35 bis unter 40 Jahren",10:"Im Alter von 40 bis unter 45 Jahren",11:"Im Alter von 45 bis unter 50 Jahren",12:"Im Alter von 50 bis unter 55 Jahren",13:"Im Alter von 55 bis unter 60 Jahren",14:"Im Alter von 60 bis unter 65 Jahren",15:"Im Alter von 65 bis unter 70 Jahren",16:"Im Alter von 70 bis unter 75 Jahren",17:"Im Alter von 75 bis unter 80 Jahren",18:"Im Alter von 80 bis unter 85 Jahren",19:"Im Alter von 85 bis unter 90 Jahren",20:"Im Alter von 90 bis unter 95 Jahren",21:"95 Jahre und \xE4lter",22:"Alter unbekannt"},NBe={1:"#e1fffa",2:"#c2fff5",3:"#a4fff0",4:"#85ffeb",5:"#67ffe6",6:"#48ffe1",7:"#2affdc",8:"#0cffd7",9:"#00ecc5",10:"#00ceac",11:"#00af92",12:"#00856f",13:"#007965",14:"#006d5b",15:"#006151",16:"#005547",17:"#00493d",18:"#003c32",19:"#003028",20:"#00241e",21:"#001814",22:"#000c0a"};var BBe=class t extends Iy{static{this.BASE_TYPES=[{specification:df.Specification},{specification:lf.Specification},{specification:wy.Specification},{specification:Sy.Specification},{specification:h_.Specification},{specification:Ox.Specification},{specification:$E.Specification}]}static{this.CODING_SYSTEM_TYPES={"ICD-10-GM":[{specification:HE.Specification},{specification:jE.Specification},{specification:mS.Specification}],OPS:[{specification:qE.Specification},{specification:KE.Specification},{specification:gS.Specification},{specification:fS.Specification}],"G-DRG":[{specification:hS.Specification},{specification:UE.Specification},{specification:cf.Specification}]}}constructor(n=$a.EMPTY()){super("projection-analysis-filter",n)}clone(){return new t(this.expression.clone())}overrideClone(n){return new t(this.expression.overrideClone(n))}};var VN=class t{static sort(n,e,i){if(!e&&!i)return 0;let o=0,r=0;if(n.field==="alphabetic")return e.shortDisplayName.localeCompare(i.shortDisplayName);if(o=i.timeSeries[n.field],r=e.timeSeries[n.field],o-r!==0)switch(n.sortOrder){case"desc":return o-r;case"asc":return r-o}if(n.field!=="alphabetic")if(i&&i.shortDisplayName)switch(n.sortOrder){case"desc":return i.shortDisplayName.localeCompare(e.shortDisplayName);case"asc":return e.shortDisplayName.localeCompare(i.shortDisplayName)}else switch(n.sortOrder){case"desc":return i.key.localeCompare(e.key);case"asc":return e.key.localeCompare(i.key)}else return this.sort(new t(n.field,n.sortOrder),e,i)}constructor(n,e,i,o){this.field=n,this.sortOrder=e,this.displayTriggerName=i,this.displayName=o}toString(){return this.field}clone(){return new t(this.field,this.sortOrder,this.displayTriggerName,this.displayName)}};var pZ=class t{static{this.defaultGroupBy=[{fieldName:"administrativeDistrictId",sort:new VN(2023 .toString(),"desc",`Fallzahlen ${2023}`,`Fallzahlen ${2023}`),parameters:[]}]}constructor(n,e,i){this.marketIds=n,this.groupBy=e,this.codingSystem=i}clone(){let n=this.marketIds?this.marketIds.slice():null;return new t(n,JSON.parse(JSON.stringify(this.groupBy)),this.codingSystem)}equals(n){let e=vo.equals(this.codingSystem,n.codingSystem),i=Ui.equals(this.marketIds,n.marketIds),o=Ui.equals(this.groupBy,n.groupBy,(r,s)=>r.fieldName===s.fieldName);return e&&i&&o}isValid(){let n=this.marketIds&&this.marketIds.length>0,e=this.groupBy&&this.groupBy.length>0;return n&&e&&!!this.codingSystem}},pSo=new pZ([],pZ.defaultGroupBy,"ICD-10-GM");var zN=class t{static{this.defaultGroupBy={fieldName:"administrativeDistrictId",sort:new VN(2023 .toString(),"desc",`Fallzahlen ${2023}`,`Fallzahlen ${2023}`),parameters:[]}}static{this.defaultViewMode={name:"10-Jahres-Trend",key:"10years",scope:"trend"}}static{this.defaultColorFactory=new bz(new Cs("#00ff00"),new Cs("#ff0000"))}constructor(n,e,i){this.groupBy=n,this.viewMode=e,this.colorFactory=i}clone(){return new t(JSON.parse(JSON.stringify(this.groupBy)),this.viewMode,this.colorFactory.clone())}},_So=new zN(zN.defaultGroupBy,zN.defaultViewMode,zN.defaultColorFactory);var VBe="peopleCount",U5t="peopleChaneRate",mZ=[...Array.from(Array(22).keys()).map(t=>t+1)],hZ=class t{static fromObjArr(n){let e=n.map(i=>new rme(i.year,i.people,i.calculated,i.ageMap));return new t(e)}constructor(n){this.years=n,this.tBaseYear=null,this.t20=null,this.t25=null,this.t30=null,this.tBaseYear=this._setGrowthRateData(2023 .toString()),this.t20=this._setGrowthRateData("2020"),this.t25=this._setGrowthRateData("2025"),this.t30=this._setGrowthRateData("2030")}getYear(n){let e=this.years.filter(i=>i.year===n);return e.length>0?e[0]:null}getChartDataSets(){return[this._getChangeRateDataSet(),this._getRealChartDataSet(),this._getCalculatedChartDataSet()]}getAgeMapChartDataSets(){return Object.keys(gM).map(n=>parseInt(n,10)).map(n=>this._getAgeMapChartDataSet(n))}getLabels(){return this.years.map(n=>n.year)}_setGrowthRateData(n){let e=this.getYear(n),i;return e?i={value:e.people,displayName:e.year}:i={value:null,displayName:n},i}_getCalculatedChartDataSet(){return{data:this._getYears(!0).map(i=>i?i.people:null),label:"Prognose",backgroundColor:"#009179",stack:"1",yAxisID:VBe}}_getChangeRateDataSet(){return{type:"line",data:this.years.map((e,i)=>{let o=this.years[i-1];return o?(e.people/o.people-1)*100:null}),label:"\xC4nderungsrate",backgroundColor:"#ffa600",borderColor:"#ffa600",fill:!1,yAxisID:U5t}}_getRealChartDataSet(){return{data:this._getYears(!1).map(i=>i?i.people:null),label:"Real",backgroundColor:"#1a5e7d",stack:"1",yAxisID:VBe}}_getAgeMapChartDataSet(n){return{data:this.years.map(i=>i.ageMap).map(i=>i[n]||0),label:gM[n],backgroundColor:NBe[n],stack:"Stack AgeMap"}}_getYears(n){return this.years.map(e=>e.calculated===n?e:null)}},rme=class{constructor(n,e,i,o){this.year=n,this.people=e,this.calculated=i,this.ageMap=o}};var Eh=class extends b0{constructor(n,e,i,o,r){super(n,e,i),this._registeredFilter=o,this._httpClient=r,this._api=new uZ(this.getBaseUrl(),e.load(n.API_TOKENS.RESULT))}findById(n){let e=this._api.byMarketId(n);return this._cache.cacheObservable(this.key(n),this._httpClient.get(e).pipe(Mn(i=>nr(xS.fromObject(i,this._registeredFilter))),du(1)))}findAll(n,e){let i=this._api.index(),o=new Pr;return n&&(o=o.append("minPermission",n)),e&&(o=o.append("maxPermission",e)),this._httpClient.get(i,{params:o}).pipe(Mn(r=>tc(r.map(s=>nr(xS.fromObject(s,this._registeredFilter)))).pipe(q_([]))))}create(n){let e=this._api.index();return nr(n.toRequestFormat()).pipe(Mn(i=>this._httpClient.post(e,i)),Mn(i=>nr(xS.fromObject(i,this._registeredFilter))))}update(n){this.deleteCacheForKey(n.id);let e=this._api.byMarketId(n.id);return nr(n.toRequestFormat()).pipe(Mn(i=>this._httpClient.put(e,i)))}findByIds(n){let e=n.map(i=>{let o=this._api.byMarketId(i);return this._httpClient.get(o).pipe(Mn(r=>nr(xS.fromObject(r,this._registeredFilter))))});return tc(e)}transform(n,e){let i=this._api.transform(),o={marketIds:n,groupBy:e};return this._httpClient.post(i,o)}detailsTimeSeries(n,e,i,o){let r=this._api.detailsTimeSeries(),s={codingSystem:n,condition:new Gu,baseRate:i,markets:[]};return o&&o.length>0&&s.condition.conditions.push(new X6(o.map(d=>d.fabKey),null)),this.transform([e.id],[{value:"postalCode"}]).pipe(vt(d=>d[e.id]),vt(d=>(s.markets=[{id:e.id,name:e.name,postalCodes:d.map(m=>m.label)}],s)),Mn(d=>this._httpClient.post(r,d)))}getPopulation(n){let e=this._api.population(),i={market:n};return this._httpClient.post(e,i).pipe(vt(o=>hZ.fromObjArr(o)))}};var H5t=t=>!t,j5t=t=>["/markets",t.id],fZ={disableFnc:Ax,detailLinkFnc:kx,filterFnc:u_,emptyResourcesText:"Keine M\xE4rkte gefunden",resourceNameTitle:"Markt",selectOnInit:"first",resetOption:!0},zBe={emptyResourcesText:"Keine M\xE4rkte gefunden",detailLinkFnc:j5t,disableFnc:H5t,filterFnc:u_};var G5t=()=>({"min-width":"50rem"});function $5t(t,n){if(t&1&&(k(0,"th",5),Q(1),D()),t&2){let e=n.$implicit,i=P(3);E("pTooltip",i.getAgeGroupMarketIdClassification(e)),T(),Qi(" ",i.getHeaderCellTitle(e)," ")}}function q5t(t,n){if(t&1&&(k(0,"tr")(1,"th"),Q(2,"Jahr"),D(),lo(3,$5t,2,2,"th",5,jo),k(5,"th"),Q(6,"Gesamt"),D()()),t&2){let e=P(2);T(3),co(e.displayedAgeGroupMarketIds)}}function K5t(t,n){if(t&1&&(k(0,"td"),Q(1),Xn(2,"number"),D()),t&2){let e=n.$implicit,i=P().$implicit;T(),dt(Nr(2,1,i.ageMap[e]||0))}}function W5t(t,n){if(t&1&&(k(0,"tr")(1,"td"),Q(2),D(),lo(3,K5t,3,3,"td",null,jo),k(5,"td"),Q(6),Xn(7,"number"),D()()),t&2){let e=n.$implicit,i=P(2);T(2),dt(e.year),T(),co(i.displayedAgeGroupMarketIds),T(3),dt(Nr(7,2,e.people))}}function Y5t(t,n){if(t&1&&(k(0,"div",2)(1,"div",3)(2,"p-table",4),ee(3,q5t,7,0,"ng-template",null,0,Pt)(5,W5t,8,4,"ng-template",null,1,Pt),D()()()),t&2){let e=P();T(2),E("value",e.population.years)("tableStyle",uo(2,G5t))}}var UBe=(()=>{class t{constructor(){this.displayedAgeGroupMarketIds=[],this.ageGroupMarketIds=mZ}ngOnInit(){this.displayedAgeGroupMarketIds=this.ageGroupMarketIds.filter(e=>e<21)}getAgeGroupMarketIdClassification(e){return gM[e]}getHeaderCellTitle(e){let i=e*5-5;return i===0&&(i=1),e===21?"95...":e===22?"unbekannt":`< ${i} J`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-population-ages-table"]],inputs:{population:"population"},decls:1,vars:1,consts:[["header",""],["body",""],[1,"population-ages"],[1,"population-ages-table"],["stripedRows","",3,"value","tableStyle"],[1,"right",3,"pTooltip"]],template:function(i,o){i&1&&qe(0,Y5t,7,3,"div",2),i&2&&Ke(o.population?0:-1)},dependencies:[hc,hl,gy,Ta],styles:[".right[_ngcontent-%COMP%]{text-align:right}.population-ages[_ngcontent-%COMP%]{overflow-x:auto;max-width:calc(100vw - 96px)}.population-ages-table[_ngcontent-%COMP%]{min-width:1500px;width:100%}"]})}}return t})();var HBe=(()=>{class t{constructor(e){this._sanitizer=e}ngOnChanges(e){e.watermarkOptions&&(this.watermarkImage=this._sanitizer.bypassSecurityTrustResourceUrl(this.watermarkOptions.config.background_image))}backgroundPositionStyle(){return this.watermarkOptions.config.background_position==="left"?`left: ${this.watermarkOptions.config.background_position_offset}`:`right: ${this.watermarkOptions.config.background_position_offset}`}static{this.\u0275fac=function(i){return new(i||t)(_e(VA))}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-chart-option-watermark"]],inputs:{watermarkOptions:"watermarkOptions"},features:[Ot],decls:1,vars:7,consts:[["alt","Copyright BinDoc GmbH",1,"watermark-container",3,"src"]],template:function(i,o){i&1&&to(0,"img",0),i&2&&($r(o.backgroundPositionStyle()),Ir("height",o.watermarkOptions.config.height)("width",o.watermarkOptions.config.width),Rr("src",o.watermarkImage,dc))},styles:[".watermark-container[_ngcontent-%COMP%]{opacity:.3;top:40px;position:absolute;height:100px;width:150px}"]})}}return t})();var jBe={enabled:!1,config:{background_image:null,background_position:null,background_position_offset:null,height:null,width:null}};var Q5t=["chartCanvas"];function Z5t(t,n){if(t&1&&ce(0,"bd-chart-option-watermark",2),t&2){let e=P();E("watermarkOptions",e.watermarkOptions)}}var Cp=(()=>{class t{constructor(){this.canvasId="canvas",this.watermarkOptions=jBe,this.chartChange=new ve,lb.register(...rRe)}ngOnChanges(e){e.chartConfig&&this._draw()}ngOnDestroy(){this._chart.destroy()}_draw(){this._chart&&this._chart.destroy();let e=this.chartCanvas.nativeElement.getContext("2d");this._chart=new lb(e,this.chartConfig),this.chartChange.emit(this._chart)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["bd-chart-canvas"]],viewQuery:function(i,o){if(i&1&&Ri(Q5t,7),i&2){let r;Le(r=Ne())&&(o.chartCanvas=r.first)}},inputs:{canvasId:"canvasId",chartConfig:"chartConfig",watermarkOptions:"watermarkOptions"},outputs:{chartChange:"chartChange"},features:[Ot],decls:4,vars:2,consts:[["chartCanvas",""],[1,"chart-container"],[3,"watermarkOptions"],[3,"contextmenu","id"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",1),qe(1,Z5t,1,1,"bd-chart-option-watermark",2),k(2,"canvas",3,0),ie("contextmenu",function(d){return se(r),ae(d.preventDefault())}),D()()}i&2&&(T(),Ke(o.watermarkOptions.enabled?1:-1),T(),E("id",o.canvasId))},dependencies:[HBe],styles:[".chart-container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}"]})}}return t})();var GBe=(()=>{class t{constructor(e){this._breakpointObserver=e,this._setOptions()}ngOnChanges(e){e.population&&e.population.currentValue&&this._onPopulationChange(e.population.currentValue)}_setOptions(){this._chartOptions={maintainAspectRatio:!1,scales:{x:{stacked:!0},y:mt(be({},C2),{stacked:!0,beginAtZero:!0})},plugins:{tooltip:mt(be({},_u),{position:"average"}),legend:{display:!this._breakpointObserver.isMatched([tm.XSmall,tm.Small]),position:this._breakpointObserver.isMatched(tm.Large)?"right":"bottom",reverse:this._breakpointObserver.isMatched(tm.Large)}}}}_onPopulationChange(e){this.chartConfig={type:"bar",data:{labels:e.getLabels(),datasets:e.getAgeMapChartDataSets()},options:this._chartOptions}}static{this.\u0275fac=function(i){return new(i||t)(_e(s0))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-population-ages-chart"]],inputs:{population:"population"},features:[Ot],decls:2,vars:1,consts:[[1,"chart-container"],[3,"chartConfig"]],template:function(i,o){i&1&&(k(0,"div",0),ce(1,"bd-chart-canvas",1),D()),i&2&&(T(),E("chartConfig",o.chartConfig))},dependencies:[Cp],styles:[".chart-container[_ngcontent-%COMP%]{height:800px}"]})}}return t})();var gZ=class extends Sh{constructor(n){super(),this._population=n,this.ageGroupMarketIds=mZ}getExport(){return Promise.resolve({data:this._population.years.map(n=>this._getDataOfYear(n)),fields:["Jahr"].concat(this.ageGroupMarketIds.map(n=>gM[n]))})}_getDataOfYear(n){let e=[{value:n.year,type:"string"}];return this.ageGroupMarketIds.map(i=>n.ageMap[i]||0).forEach(i=>e.push({value:i,type:"number"})),e}};var $Be=(()=>{class t{ngOnInit(){this.exportMarketDetailsAges=new gZ(this.population)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-population-export-ages"]],inputs:{population:"population"},decls:1,vars:1,consts:[["filename","Bev\xF6lkerungsentwicklung-Altersgruppen",3,"data"]],template:function(i,o){i&1&&ce(0,"bd-export-as-file",0),i&2&&E("data",o.exportMarketDetailsAges)},dependencies:[Sd],encapsulation:2})}}return t})();function X5t(t,n){if(t&1&&(k(0,"div",0)(1,"div",1)(2,"div",2),ce(3,"bd-growth-rate",3),D(),k(4,"div",2),ce(5,"bd-growth-rate",3),D()()()),t&2){let e=P();T(3),E("comparator",e.population.t25)("base",e.population.tBaseYear)("config",e.growthRateConfig),T(2),E("comparator",e.population.t30)("base",e.population.tBaseYear)("config",e.growthRateConfig)}}var qBe=(()=>{class t{constructor(){this.growthRateConfig={type:"relative",labelClass:"mat-title",rateClass:"mat-subheading",format:"1.2-2"}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-population-total-table"]],inputs:{population:"population"},decls:1,vars:1,consts:[[1,"growth-info"],[1,"flex","flex-col","md:flex-row","justify-around"],[1,"flex-1"],[3,"comparator","base","config"]],template:function(i,o){i&1&&qe(0,X5t,6,6,"div",0),i&2&&Ke(o.population?0:-1)},dependencies:[oEe],styles:[".growth-info[_ngcontent-%COMP%]{padding:24px 0}"]})}}return t})();var _Z=(()=>{class t{constructor(){this._setOptions()}ngOnChanges(e){e.population&&e.population.currentValue&&this._onPopulationChange(e.population.currentValue)}_setOptions(){this._chartOptions={maintainAspectRatio:!1,scales:{peopleCount:mt(be({},C2),{beginAtZero:!0,title:{display:!0,text:"Bev\xF6lkerung"},axis:"y"}),peopleChaneRate:mt(be({},C2),{title:{display:!0,text:"\xC4nderungsrate (%)"},position:"right",axis:"y"})},plugins:{tooltip:_u}}}_onPopulationChange(e){this.chartConfig={type:"bar",data:{labels:e.getLabels(),datasets:e.getChartDataSets()},options:this._chartOptions}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-population-total-chart"]],inputs:{population:"population"},features:[Ot],decls:2,vars:1,consts:[[1,"chart-container"],[3,"chartConfig"]],template:function(i,o){i&1&&(k(0,"div",0),ce(1,"bd-chart-canvas",1),D()),i&2&&(T(),E("chartConfig",o.chartConfig))},dependencies:[Cp],styles:[".chart-container[_ngcontent-%COMP%]{height:400px}"]})}}return t})();var yZ=class extends Sh{constructor(n){super(),this._population=n}getExport(){let n=this._population.years.map(e=>[{value:e.year,type:"string"},{value:e.people,type:"number"}]);return Promise.resolve({data:n,fields:["Jahr","Bev\xF6lkerung"]})}},s8=class extends Sh{constructor(n,e,i,o){super(),this.view=n,this._transformNodes=e,this._postalCodeService=i,this._districtService=o}getExport(){switch(this.view){case"postalCodes":return Wl(this._postalCodeService.findAll(this._transformNodes.map(n=>n.label),"SUMMARY").pipe(vt(n=>({fields:["Postleitzahl","Name"],data:Object.keys(n).map(e=>[{type:"string",value:e},{type:"string",value:n[e].name}])}))));case"administrativeDistricts":return Wl(this._districtService.findAll(this._transformNodes.map(n=>n.label).map(n=>Yo.create(n))).pipe(vt(n=>({fields:["Landkreis","Name"],data:Object.keys(n).map(e=>[{type:"string",value:e},{type:"string",value:n[e].displayName()}])}))))}}};var KBe=(()=>{class t{constructor(){this.exportConfig=mt(be({},hg),{form:{defaultLabels:["Markt"],availableExportTypes:["csv","xlsx"]}})}ngOnInit(){this.exportMarketPopulation=new yZ(this.population)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-population-export"]],inputs:{population:"population"},decls:1,vars:2,consts:[["filename","Bev\xF6lkerungsentwicklung",3,"data","config"]],template:function(i,o){i&1&&ce(0,"bd-export-as-file",0),i&2&&E("data",o.exportMarketPopulation)("config",o.exportConfig)},dependencies:[Sd],encapsulation:2})}}return t})();var J5t=t=>["/markets",t];function ezt(t,n){if(t&1&&(k(0,"bd-chip-dummy"),Q(1),Xn(2,"administrativeDistrict"),Xn(3,"async"),D()),t&2){let e,i=n.$implicit;T(),Qi(" ",(e=Nr(3,3,Nr(2,1,i)))==null?null:e.displayName()," ")}}function tzt(t,n){if(t&1&&(k(0,"mat-option",6),Q(1),Xn(2,"administrativeDistrict"),Xn(3,"async"),D()),t&2){let e,i=n.$implicit;E("value",i),T(),Qi(" ",(e=Nr(3,4,Nr(2,2,i)))==null?null:e.displayName()," ")}}function izt(t,n){if(t&1&&(k(0,"a",12),Q(1," Zur\xFCck zur Prognose "),D()),t&2){let e=P(2);E("routerLink",e.returnToProjectionUrl)}}function nzt(t,n){if(t&1&&(k(0,"div",4)(1,"mat-form-field")(2,"mat-label"),Q(3,"Landkreise"),D(),k(4,"mat-select",5)(5,"mat-select-trigger"),lo(6,ezt,4,5,"bd-chip-dummy",null,jo),D(),lo(8,tzt,4,6,"mat-option",6,jo),D()()(),k(10,"div",4)(11,"div",7)(12,"div",8),Q(13,"Bev\xF6lkerungsentwicklung"),D(),k(14,"div"),ce(15,"ays-market-population-export",9),D()(),k(16,"div"),ce(17,"ays-market-population-total-chart",9),D(),k(18,"div"),ce(19,"ays-market-population-total-table",9),D()(),ce(20,"mat-divider"),k(21,"div",10)(22,"div",7)(23,"div",8),Q(24,"Altersgruppen"),D(),k(25,"div"),ce(26,"ays-market-population-export-ages",9),D()(),k(27,"div"),ce(28,"ays-market-population-ages-chart",9),D()(),ce(29,"mat-divider"),k(30,"div")(31,"div",4),ce(32,"ays-market-population-ages-table",9),D()(),k(33,"div",10)(34,"div",11)(35,"a",12),Q(36," Zur\xFCck zur \xDCbersicht "),D(),qe(37,izt,2,1,"a",12),D()()),t&2){let e=n.$implicit,i=P();T(4),E("formControl",i.selectFormCtrl)("compareWith",i.compareFn)("multiple",!0),T(2),co(i.selectFormCtrl.value),T(2),co(i.allAdministrativeDistrictIds),T(7),E("population",i.population),T(2),E("population",i.population),T(2),E("population",i.population),T(7),E("population",i.population),T(2),E("population",e),T(4),E("population",e),T(3),E("routerLink",ki(11,J5t,i.market.id)),T(2),Ke(i.returnToProjectionUrl?37:-1)}}var WBe=(()=>{class t{constructor(e,i){this._activatedRoute=e,this._marketService=i,this.allAdministrativeDistrictIds=[],this.selectFormCtrl=new yr(null,[]),this.loading$=new Gs(Gt.INIT),this.helpButtonOptions=d_}ngOnInit(){this._activatedRoute.params.subscribe(e=>this._onParamsChanged(e)),this._activatedRoute.queryParams.subscribe(e=>{e.projectionUrl&&(this.returnToProjectionUrl=e.projectionUrl)}),this.selectFormCtrl.valueChanges.pipe(id(1500)).subscribe(e=>this.onAdministrativeDistrictChange(e))}onAdministrativeDistrictChange(e){this.loading$.next(Gt.LOADING),this._fetch(this.market,e).subscribe(i=>{this.population=i.population,this.loading$.next(Gt.SUCCESS)})}compareFn(e,i){return!!e&&!!i&&e.value===i.value}_onParamsChanged(e){e.marketId&&(this.loading$.next(Gt.LOADING),this._marketService.findById(e.marketId).pipe(Vo(i=>this.market=i),Mn(i=>this._fetch(i))).subscribe(i=>{this.population=i.population,this.allAdministrativeDistrictIds=i.administrativeDistrictIds,this.selectFormCtrl.patchValue(this.allAdministrativeDistrictIds,{emitEvent:!1}),this.loading$.next(Gt.SUCCESS)}))}_fetch(e,i){return this.loading$.next(Gt.LOADING),this._marketService.transform([e.id],[{value:"administrativeDistrictId"},{value:"postalCode"}]).pipe(vt(o=>o[this.market.id]),Mn(o=>{let r=o;return i&&(r=o.filter(s=>!!i.find(d=>d.value===Yo.create(s.label).value))),this._marketService.getPopulation({id:this.market.id,name:this.market.name,postalCodes:r.map(s=>s.children??[]).flat().map(s=>s.label)}).pipe(vt(s=>({population:s,administrativeDistrictIds:o.map(d=>Yo.create(d.label))})))}))}static{this.\u0275fac=function(i){return new(i||t)(_e(vl),_e(Eh))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:7,vars:5,consts:[["populationTpl",""],[1,"flex-1"],["key","ays_market",3,"options"],[3,"loadItem","successTemplate","successTemplateContext"],[1,"bd-container"],[3,"formControl","compareWith","multiple"],[3,"value"],[1,"flex","flex-row","gap-6","items-center"],[1,"flex-1","mat-headline"],[3,"population"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse","gap-6"],["mat-button","","color","accent",3,"routerLink"]],template:function(i,o){if(i&1&&(k(0,"bd-toolbar")(1,"span",1),Q(2),D(),ce(3,"bd-help-button",2),D(),ce(4,"bd-loader",3),ee(5,nzt,38,13,"ng-template",null,0,Pt)),i&2){let r=ti(6);T(2),Qi("Bev\xF6lkerung ",o.market==null?null:o.market.name),T(),E("options",o.helpButtonOptions),T(),E("loadItem",o.loading$)("successTemplate",r)("successTemplateContext",o.population)}},dependencies:[Ga,af,Kn,Ra,rs,Ol,Kv,c0,Tae,bh,xr,no,zl,$Te,ry,KBe,_Z,qBe,il,Gl,$Be,GBe,UBe,Tn,yo,Bs,fx,qd],encapsulation:2})}}return t})();var vZ=class extends Sh{constructor(n){super(),this._rows=n}getExport(){let n={sheetName:"Markt-Trends",fields:["Jahr","Anzahl F\xE4lle","Umsatz","Casemix","CMI"],data:this._rows.map(e=>[{value:e.year,type:"string"},{value:e.count,type:"number"},{value:e.amount,type:"number"},{value:e.casemix,type:"number"},{value:e.cmi,type:"number"}])};return Promise.resolve(n)}};function ozt(t,n){t&1&&(k(0,"tr")(1,"th"),Q(2,"Jahr"),D(),k(3,"th"),Q(4,"Anzahl F\xE4lle"),D(),k(5,"th"),Q(6,"Umsatz"),D(),k(7,"th"),Q(8,"Casemix"),D(),k(9,"th"),Q(10,"CMI"),D()())}function rzt(t,n){if(t&1&&(k(0,"tr")(1,"td"),Q(2),D(),k(3,"td"),Q(4),Xn(5,"number"),D(),k(6,"td"),Q(7),Xn(8,"number"),D(),k(9,"td"),Q(10),Xn(11,"number"),D(),k(12,"td"),Q(13),Xn(14,"number"),D()()),t&2){let e=n.$implicit;T(2),dt(e.year),T(2),dt(Ls(5,5,e.count,"1.0-0")),T(3),dt(Ls(8,8,e.amount,"1.0-0")),T(3),dt(Ls(11,11,e.casemix,"1.0-0")),T(3),dt(Ls(14,14,e.cmi,"1.2-2"))}}var YBe=(()=>{class t{constructor(){this.exportConfig=mt(be({},hg),{form:{availableExportTypes:["xlsx","csv"],defaultLabels:["Markt"]}})}ngOnInit(){this.exportFileName=`Trends-${this.market.name}`||"Markt-Trends"}ngOnChanges(e){e.response&&this._setTableRows()}_setTableRows(){let e=Object.keys(this.response.entity).sort();this.rows=e.map(i=>be({year:i},this.response.entity[i])),this.export=new vZ(this.rows)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-details-time-series-table"]],inputs:{market:"market",response:"response"},features:[Ot],decls:6,vars:3,consts:[[1,"flex","flex-row","justify-end"],[1,"flex-grow-0"],[3,"filename","data"],[3,"value"],["pTemplate","header"],["pTemplate","body"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1),ce(2,"bd-export-as-file",2),D()(),k(3,"p-table",3),ee(4,ozt,11,0,"ng-template",4)(5,rzt,15,17,"ng-template",5),D()),i&2&&(T(2),E("filename",o.exportFileName)("data",o.export),T(),E("value",o.rows))},dependencies:[Sd,hc,hl,so,In,Ta],encapsulation:2})}}return t})();function szt(t,n){if(t&1&&(k(0,"div",0),ce(1,"bd-chart-canvas",1),D()),t&2){let e=n.$implicit,i=P(2);T(),E("chartConfig",i.chartConfigurations[e])}}function azt(t,n){if(t&1&&lo(0,szt,2,1,"div",0,jo),t&2){let e=P();co(e.datasetFields)}}var QBe=(()=>{class t{constructor(){this.datasetFields=["count","amount","casemix","cmi"],this.datasetFieldOptions={count:{displayName:"Anzahl F\xE4lle",color:g2[0]},amount:{displayName:"Umsatz",color:g2[1]},casemix:{displayName:"Casemix",color:g2[2]},cmi:{displayName:"CMI",color:g2[3]}}}ngOnChanges(e){e.response&&this._setChartConfigurations()}_setChartConfigurations(){let e=Object.keys(this.response.entity).sort();this.chartConfigurations=this.datasetFields.reduce((i,o)=>(i[o]={type:"line",data:{labels:e,datasets:[{type:"line",label:this.datasetFieldOptions[o].displayName,data:e.map(r=>this.response.entity[r][o]),borderColor:this.datasetFieldOptions[o].color,pointBackgroundColor:this.datasetFieldOptions[o].color,pointBorderColor:this.datasetFieldOptions[o].color,backgroundColor:this.datasetFieldOptions[o].color}]},options:{plugins:{tooltip:_u},responsive:!0,maintainAspectRatio:!1,scales:{y:{beginAtZero:!0}}}},i),{})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-details-time-series-chart"]],inputs:{response:"response"},features:[Ot],decls:1,vars:1,consts:[[1,"chart-container"],[3,"chartConfig"]],template:function(i,o){i&1&&qe(0,azt,2,0),i&2&&Ke(o.chartConfigurations?0:-1)},dependencies:[Cp],styles:[".chart-container[_ngcontent-%COMP%]{margin:24px 0;max-height:400px}"]})}}return t})();var ZBe=(()=>{class t{constructor(e){this._fabService=e,this.fabsChange=new ve,this.multiSelectConfig={selectLabel:"\xA7301 Fachabteilungsschl\xFCssel",option:{uniqueFnc:i=>i.fabKey,sortFnc:(i,o)=>i.fabKey.localeCompare(o.fabKey),searchOptionAccessor:i=>`${i.name} ${i.fabKey}`,searchOptionDisplayName:i=>`${i.fabKey} - ${i.name}`}},this.fabOptions=this._fabService.index().pipe(Sn(1),vt(i=>{let o=i.findIndex(r=>r.fabKey==="0000");return o>-1&&i.splice(o,1),i}))}static{this.\u0275fac=function(i){return new(i||t)(_e(qu))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-details-time-series-filter-fab"]],inputs:{fabs:"fabs"},outputs:{fabsChange:"fabsChange"},decls:1,vars:3,consts:[[3,"selection","config","initialSelection","selectOptions"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.fabsChange.emit(s)}),D()),i&2&&E("config",o.multiSelectConfig)("initialSelection",o.fabs)("selectOptions",o.fabOptions)},dependencies:[_a],encapsulation:2})}}return t})();function lzt(t,n){if(t&1){let e=tt();k(0,"div",3)(1,"div")(2,"span",4),Q(3,"Basisfallwert"),D()(),k(4,"ays-drg-base-rate",8),ie("baseRateChange",function(o){se(e);let r=P();return ae(r.onBaseRateChange(o))}),D()()}if(t&2){let e=P();T(4),E("baseRate",e.baseRate)}}function czt(t,n){if(t&1&&ce(0,"ays-market-details-time-series-chart",9)(1,"ays-market-details-time-series-table",10),t&2){let e=P();E("response",e.response),T(),E("response",e.response)("market",e.market)}}var XBe=(()=>{class t{constructor(e,i){this._marketService=e,this._fabService=i,this.loading$=new hi,this.codingSystem="G-DRG",this._fabs=null,this._fabService.index().pipe(Sn(1),vt(o=>o.sort((r,s)=>r.fabKey.localeCompare(s.fabKey)))).subscribe(o=>{this.fabOptions=o})}ngOnInit(){let e=8;this.market?this._marketService.transform([this.market.id],[{value:"administrativeDistrictId"}]).pipe(vt(i=>i[this.market.id])).subscribe(i=>{e=i.map(r=>Yo.create(r.label)).map(r=>r.getStateId()).sort()[0]||8,this.baseRate={state:rg.byId(e),year:mle}}):this.baseRate={state:rg.byId(e),year:mle}}onCodingSystemChange(e){this.codingSystem=e,this._fetchTimeSeries()}onBaseRateChange(e){this.baseRate=e,this._fetchTimeSeries()}onFabsChange(e){this._fabs=e,this._fetchTimeSeries()}_fetchTimeSeries(){this.market&&this.baseRate&&this.baseRate.value&&this.codingSystem&&(this.loading$.next(Gt.LOADING),this._marketService.detailsTimeSeries(this.codingSystem,this.market,this.baseRate.value,this._fabs).pipe(Sn(1)).subscribe(e=>{this.response=e,this.loading$.next(Gt.SUCCESS)}))}static{this.\u0275fac=function(i){return new(i||t)(_e(Eh),_e(qu))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-details-time-series"]],inputs:{market:"market"},decls:18,vars:4,consts:[["trendResponseTpl",""],[1,"bd-container-inner"],[1,"flex","flex-col","gap-4"],[1,"flex-1"],[1,"mat-body-1"],[3,"codingSystemChange","codingSystem"],[3,"fabsChange"],[3,"loadItem","successTemplate"],[3,"baseRateChange","baseRate"],[3,"response"],[3,"response","market"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",1)(1,"div",2)(2,"div",3)(3,"div")(4,"span",4),Q(5,"Ziffer Typ"),D()(),k(6,"ays-code-coding-system-select",5),ie("codingSystemChange",function(d){return se(r),ae(o.onCodingSystemChange(d))}),D()(),k(7,"div",3)(8,"div")(9,"span",4),Q(10,"Filter"),D()(),k(11,"ays-market-details-time-series-filter-fab",6),ie("fabsChange",function(d){return se(r),ae(o.onFabsChange(d))}),D()()(),qe(12,lzt,5,1,"div",3),D(),k(13,"div"),ce(14,"bd-loader",7),ee(15,czt,2,3,"ng-template",null,0,Pt),D(),ce(17,"div",1)}if(i&2){let r=ti(16);T(6),E("codingSystem",o.codingSystem),T(6),Ke(o.codingSystem==="G-DRG"?12:-1),T(2),E("loadItem",o.loading$)("successTemplate",r)}},dependencies:[ZBe,uNe,Kn,QBe,YBe,hNe],encapsulation:2})}}return t})();var JBe=(()=>{class t{constructor(e,i,o){this._postalCodeService=e,this._administrativeDistrictService=i,this._marketService=o,this.mapOptions=mt(be({},lm),{style:"mapbox://styles/mapbox/light-v11",bounds:ob,center:void 0,maxZoom:10}),this.exportConfig=mt(be({},hg),{form:{defaultLabels:["Markt"],availableExportTypes:["csv","xlsx"]}}),this.view="postalCodes",this.mapController=new Jd,this._colorFactory=new px({low:new Cs("#452a71"),high:new Cs("#452a71")}),this._postalCodeLayer=new R2("postalCodes",new O2,this._postalCodeService),this._postalCodeLayer.colorFactory$.next(this._colorFactory),this._postalCodeLayer.legend={showInLegend:!1},this._administrativeDistrictsLayer=new eL("administrativeDistricts",new JP,this._administrativeDistrictService),this._administrativeDistrictsLayer.colorFactory$.next(this._colorFactory),this._administrativeDistrictsLayer.legend={showInLegend:!1},this.mapController.registerLayer(this._postalCodeLayer),this.mapController.registerLayer(this._administrativeDistrictsLayer),this.mapController.followBoundsOf(this._postalCodeLayer.layerControlId)}ngOnInit(){this._activatePostalCodesLayer()}onMapLoaded(e){this.mapController.addMapRef(e)}onViewChange(e){switch(this.view=e,this.view){case"postalCodes":{this._activatePostalCodesLayer();break}case"administrativeDistricts":{this._activateAdministrativeDistrictsLayer();break}}}_activatePostalCodesLayer(){this.mapController.setActive("administrativeDistricts",!1),this.mapController.setActive("postalCodes",!0),this.mapController.followBoundsOf(this._postalCodeLayer.layerControlId),this._marketService.transform([this.market.id],[{value:"postalCode"}]).subscribe(e=>{let i={},o=e[this.market.id];this.export=new s8("postalCodes",o,this._postalCodeService,this._administrativeDistrictService),o.forEach(r=>i[r.label]=1),this._postalCodeLayer.data$.next(i)})}_activateAdministrativeDistrictsLayer(){this.mapController.setActive("postalCodes",!1),this.mapController.setActive("administrativeDistricts",!0),this.mapController.followBoundsOf(this._administrativeDistrictsLayer.layerControlId),this._marketService.transform([this.market.id],[{value:"administrativeDistrictId"}]).subscribe(e=>{let i={},o=e[this.market.id];this.export=new s8("administrativeDistricts",o,this._postalCodeService,this._administrativeDistrictService),o.forEach(r=>i[Yo.create(r.label).value]=1),this._administrativeDistrictsLayer.data$.next(i)})}static{this.\u0275fac=function(i){return new(i||t)(_e(lg),_e(Hu),_e(Eh))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-details-overview"]],inputs:{market:"market"},decls:19,vars:5,consts:[[1,"flex","flex-col","lg:flex-row"],[1,"flex-1","m-4"],[3,"expression"],[1,"flex-1"],[1,"flex","flex-row"],[3,"valueChange","value"],["value","administrativeDistricts"],["value","postalCodes"],["filename","Markt",3,"config","data"],[1,"market-details-overview-map-container"],[3,"mapLoaded","mapOptions"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"div"),ce(3,"filter-condition-expression-show",2),D()(),k(4,"div",3)(5,"div",4)(6,"div",3)(7,"mat-form-field")(8,"mat-label"),Q(9,"Darstellung"),D(),k(10,"mat-select",5),ie("valueChange",function(s){return o.onViewChange(s)}),k(11,"mat-option",6),Q(12,"Markt als Landkreise "),D(),k(13,"mat-option",7),Q(14,"Markt als Postleitzahlen "),D()()()(),k(15,"div"),ce(16,"bd-export-as-file",8),D()(),k(17,"div",9)(18,"bd-map",10),ie("mapLoaded",function(s){return o.onMapLoaded(s)}),D()()()()),i&2&&(T(3),E("expression",o.market.condition),T(7),E("value",o.view),T(6),E("config",o.exportConfig)("data",o.export),T(2),E("mapOptions",o.mapOptions))},dependencies:[eu,c0,rs,bh,Ol,Sd,bZ],styles:[".market-details-overview-map-container[_ngcontent-%COMP%]{height:500px;position:relative}"]})}}return t})();var eVe=(()=>{class t{constructor(e,i){this._permissionResourcesService=e,this._router=i}delete(){this._permissionResourcesService.archive(ko.MARKET,this.market.id).pipe(Sn(1)).subscribe(()=>this._router.navigate(["/markets"]))}edit(){this._router.navigate(["/markets",this.market.id,"edit"])}static{this.\u0275fac=function(i){return new(i||t)(_e(pM),_e(dl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-details-header"]],inputs:{market:"market"},decls:5,vars:2,consts:[[1,"toolbar-spacer"],["helpKey","ays_market",3,"deleteResource","editResource","resource"]],template:function(i,o){i&1&&(k(0,"bd-toolbar")(1,"span"),Q(2),D(),ce(3,"span",0),k(4,"bd-resources-info-menu",1),ie("deleteResource",function(){return o.delete()})("editResource",function(){return o.edit()}),D()()),i&2&&(T(2),dt(o.market==null?null:o.market.name),T(2),E("resource",o.market))},dependencies:[Ga,jL],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}}return t})();var dzt=()=>["/markets"];function uzt(t,n){if(t&1){let e=tt();ce(0,"ays-market-details-header",5),k(1,"p-tabs",6),hh("valueChange",function(o){se(e);let r=P();return Xh(r.activeTabIndex,o)||(r.activeTabIndex=o),ae(o)}),k(2,"p-tablist")(3,"p-tab",7),Q(4,"\xDCbersicht"),D(),k(5,"p-tab",8),Q(6,"Trends"),D(),k(7,"p-tab",9),Q(8,"Bev\xF6lkerung"),D()(),k(9,"p-tabpanels")(10,"p-tabpanel",7)(11,"div",10),ce(12,"ays-market-details-overview",5),D()(),k(13,"p-tabpanel",8)(14,"div",10),ce(15,"ays-market-details-time-series",5),D()(),k(16,"p-tabpanel",9)(17,"div",2)(18,"div",11),Q(19,"Bev\xF6lkerungsentwicklung"),D(),k(20,"div"),ce(21,"ays-market-population-total-chart",12),D(),k(22,"div",3)(23,"a",13),Q(24,"Details"),D()()()()()()}if(t&2){let e=P();E("market",e.market),T(),ph("value",e.activeTabIndex),T(11),E("market",e.market),T(3),E("market",e.market),T(6),E("population",e.population)}}var tVe=(()=>{class t{constructor(e,i,o){this._router=e,this._activatedRoute=i,this._marketService=o,this.loading$=new pi(1),this.activeTabIndex=Zn("0"),yc([this._activatedRoute.params,this._activatedRoute.queryParams]).pipe(vt(([r,s])=>be(be({},r),s))).subscribe(r=>this._onParamsChanged(r)),od(()=>{let r=this.activeTabIndex();this._router.navigate([],{relativeTo:this._activatedRoute,queryParams:{activeTabIndex:r},queryParamsHandling:"merge"})})}_onParamsChanged(e){e.activeTabIndex&&this.activeTabIndex.set(e.activeTabIndex.toString()),e.marketId&&(this.loading$.next(Gt.LOADING),this._marketService.findById(e.marketId).pipe(Vo(i=>this._initMarket(i)),Mn(i=>this._marketService.transform([i.id],[{value:"postalCode"}]).pipe(vt(o=>o[i.id]),vt(o=>mt(be({},i),{postalCodes:o.map(r=>r.label)})))),Mn(i=>this._marketService.getPopulation(i))).subscribe(i=>{this.population=i,this.loading$.next(Gt.SUCCESS)}))}_initMarket(e){this.market=e}static{this.\u0275fac=function(i){return new(i||t)(_e(dl),_e(vl),_e(Eh))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:7,vars:4,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"routerLink"],[3,"market"],[3,"valueChange","value"],["value","0"],["value","1"],["value","2"],[1,"bd-container"],[1,"mat-headline"],[3,"population"],["routerLink","population","mat-button","","color","accent"]],template:function(i,o){if(i&1&&(ce(0,"bd-loader",1),ee(1,uzt,25,5,"ng-template",null,0,Pt),k(3,"div",2)(4,"div",3)(5,"button",4),Q(6," \xDCbersicht "),D()()()),i&2){let r=ti(2);E("loadItem",o.loading$)("successTemplate",r),T(5),E("routerLink",uo(3,dzt))}},dependencies:[Kn,eVe,DN,m_,fb,mb,Dy,hb,il,JBe,XBe,_Z,Tn,yo,Bs],encapsulation:2})}}return t})();var iVe=(()=>{class t{constructor(){this.filterChange=new ve,this.possiblePluginTypeDefinition=S0.TYPES,this.expressionConfig={[cf.Specification.type]:{virtualClinicIds:[],mode:"ONLY_GENERAL_FAB_KEYS"}}}onExpressionChange(e){let i=this.filter?this.filter.clone():new S0;i.expression=e?e.clone():S0.EMPTY(),this.filterChange.emit(i)}onExpressionValueChange(e){let i=this.filter?this.filter.clone():new S0;i.expression=e,this.filterChange.emit(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-filter-form-filter"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},decls:1,vars:3,consts:[[3,"expressionChange","expressionValueChange","expression","possiblePluginTypeDefinition","expressionConfig"]],template:function(i,o){i&1&&(k(0,"filter-condition-form",0),ie("expressionChange",function(s){return o.onExpressionChange(s)})("expressionValueChange",function(s){return o.onExpressionValueChange(s)}),D()),i&2&&E("expression",o.filter.expression)("possiblePluginTypeDefinition",o.possiblePluginTypeDefinition)("expressionConfig",o.expressionConfig)},dependencies:[CZ],encapsulation:2})}}return t})();var xZ=(()=>{class t{constructor(){this.marketChanged=new ve,this.marketFilter=new S0}ngOnInit(){this.market.condition&&(this.marketFilter=new S0(this.market.condition.clone()))}onNameChanged(e){this.market.name=e,this._marketChange()}onMarketFilterChange(e){this.market.condition=e.expression.clone(),this._marketChange()}_marketChange(){this.marketChanged.emit(this.market.clone())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-form"]],inputs:{market:"market"},outputs:{marketChanged:"marketChanged"},decls:9,vars:2,consts:[[1,"bd-container-inner"],["matInput","","required","","placeholder","Name","data-test","market-name",3,"ngModelChange","ngModel"],[3,"filterChange","filter"]],template:function(i,o){i&1&&(k(0,"div")(1,"div",0)(2,"mat-form-field")(3,"mat-label"),Q(4,"Name"),D(),k(5,"input",1),ie("ngModelChange",function(s){return o.onNameChanged(s)}),D()()(),ce(6,"mat-divider"),k(7,"div",0)(8,"ays-market-filter-form-filter",2),ie("filterChange",function(s){return o.onMarketFilterChange(s)}),D()()()),i&2&&(T(5),E("ngModel",o.market.name),T(3),E("filter",o.marketFilter))},dependencies:[Ra,rs,Ol,pl,Fa,xr,Ml,no,qv,hr,Lr,il,Gl,iVe],encapsulation:2})}}return t})();function pzt(t,n){if(t&1){let e=tt();k(0,"ays-market-form",7),ie("marketChanged",function(o){se(e);let r=P();return ae(r.onMarketChange(o))}),D(),ce(1,"mat-divider")}if(t&2){let e=P();E("market",e.market)}}function hzt(t,n){t&1&&(k(0,"div",3),ce(1,"bd-message-empty",8),D())}var nVe=(()=>{class t{constructor(e,i,o,r){this.location=e,this._marketService=i,this._router=o,this._activatedRoute=r,this.loading$=new pi(1),this._sub=this._activatedRoute.params.subscribe(s=>this._onParamsChange(s))}ngOnDestroy(){this._sub&&this._sub.unsubscribe()}onMarketChange(e){this.market=e}onSubmit(){this.loading$.next(Gt.LOADING),this._marketService.update(this.market).pipe(Sn(1)).subscribe({next:()=>{this.loading$.next(Gt.SUCCESS),this._router.navigate(["/markets",this.market.id])},error:()=>this.loading$.next(Gt.ERROR)})}_onParamsChange(e){let i=e.marketId;i?(this.loading$.next(Gt.LOADING),this._marketService.findById(i).pipe(Sn(1)).subscribe({next:o=>{this.market=o,this.loading$.next(Gt.SUCCESS)},error:()=>this.loading$.next(Gt.ERROR)})):this.loading$.next(Gt.ERROR)}static{this.\u0275fac=function(i){return new(i||t)(_e(Vm),_e(Eh),_e(dl),_e(vl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:16,vars:4,consts:[["marketFormTpl",""],["errorTpl",""],[3,"loadItem","successTemplate","errorTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse","gap-6"],["mat-raised-button","","color","accent","data-test","market-form-submit",3,"click","disabled"],["mat-button","","color","accent","data-test","market-form-abort",3,"click"],[3,"marketChanged","market"],["icon","error","message","Ein Fehler ist aufgetreten, der Vorgang wurde abgebrochen"]],template:function(i,o){if(i&1){let r=tt();k(0,"div")(1,"bd-toolbar"),Q(2," Markt bearbeiten"),D(),ce(3,"bd-loader",2),k(4,"div",3)(5,"div",4)(6,"button",5),ie("click",function(){return se(r),ae(o.onSubmit())}),k(7,"span"),Q(8,"Speichern"),D()(),k(9,"button",6),ie("click",function(){return se(r),ae(o.location.back())}),k(10,"span"),Q(11,"Abbrechen"),D()()()()(),ee(12,pzt,2,1,"ng-template",null,0,Pt)(14,hzt,2,0,"ng-template",null,1,Pt)}if(i&2){let r=ti(13),s=ti(15);T(3),E("loadItem",o.loading$)("successTemplate",r)("errorTemplate",s),T(3),E("disabled",!(!(o.market==null||o.market.condition==null)&&o.market.condition.valid()))}},dependencies:[Ga,Kn,Tn,yo,xZ,il,Gl,Rl],encapsulation:2})}}return t})();var mzt=()=>["/markets"];function fzt(t,n){if(t&1){let e=tt();k(0,"ays-market-form",6),ie("marketChanged",function(o){se(e);let r=P();return ae(r.onMarketChange(o))}),D(),ce(1,"mat-divider")}if(t&2){let e=P();E("market",e.market)}}var oVe=(()=>{class t{constructor(e,i){this._marketService=e,this._router=i,this.loading$=new pi(1),this.market=new xS(null,null,null,null,null,S0.EMPTY()),this.marketForm=new hu({nameCtrl:new yr(null,[Ys.required]),expressionValidCtrl:new yr(!1,[Ys.requiredTrue])})}onMarketChange(e){this.market=e,this.marketForm.patchValue({nameCtrl:e.name,expressionValidCtrl:e.condition.valid()})}onSubmit(){this.loading$.next(Gt.LOADING),this._marketService.create(this.market).pipe(Sn(1)).subscribe(e=>{this._router.navigate(["markets",e.id])})}static{this.\u0275fac=function(i){return new(i||t)(_e(Eh),_e(dl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:14,vars:5,consts:[["marketFormTpl",""],[3,"loadItem","initTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse","gap-6"],["mat-raised-button","","color","accent","data-test","market-form-submit",3,"click","disabled"],["mat-button","","data-test","market-form-abort",3,"routerLink"],[3,"marketChanged","market"]],template:function(i,o){if(i&1){let r=tt();k(0,"bd-toolbar"),Q(1," Neuen Markt erstellen"),D(),ce(2,"bd-loader",1)(3,"mat-divider"),k(4,"div",2)(5,"div",3)(6,"button",4),ie("click",function(){return se(r),ae(o.onSubmit())}),k(7,"span"),Q(8,"Speichern"),D()(),k(9,"a",5)(10,"span"),Q(11,"Abbrechen"),D()()()(),ee(12,fzt,2,1,"ng-template",null,0,Pt)}if(i&2){let r=ti(13);T(2),E("loadItem",o.loading$)("initTemplate",r),T(4),E("disabled",o.marketForm.invalid),T(3),E("routerLink",uo(4,mzt))}},dependencies:[Ga,Kn,il,Gl,Tn,yo,Bs,xZ],encapsulation:2})}}return t})();var gzt=()=>["/markets","new"];function _zt(t,n){if(t&1&&ce(0,"bd-resources-list",10),t&2){let e=P();E("resources",e.markets)("options",e.resourceListOptions)}}function yzt(t,n){t&1&&ce(0,"bd-resources-list-loading")}function vzt(t,n){t&1&&ce(0,"bd-message-empty",11)}var rVe=(()=>{class t{constructor(e){this._marketService=e,this.helpButtonOptions=d_,this.resourceListOptions=zBe,this.loading$=new pi(1)}ngOnInit(){this.loading$.next(Gt.LOADING),this._marketService.findAll().subscribe({next:e=>{this.markets=e,this.loading$.next(Gt.SUCCESS)},error:()=>{this.loading$.next(Gt.ERROR)}})}static{this.\u0275fac=function(i){return new(i||t)(_e(Eh))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-market-list"]],decls:16,vars:7,consts:[["successTpl",""],["loadingTpl",""],["errorTpl",""],[1,"flex-1"],["key","ays_market",3,"options"],[1,"bd-container"],[3,"loadItem","successTemplate","customLoadingTemplate","errorTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse"],["mat-raised-button","","color","accent",3,"routerLink"],[3,"resources","options"],["message","Ein Fehler ist aufgetreten, der Vorgang wurde abgebrochen"]],template:function(i,o){if(i&1&&(k(0,"bd-toolbar")(1,"span",3),Q(2,"M\xE4rkte"),D(),ce(3,"bd-help-button",4),D(),k(4,"div",5),ce(5,"bd-loader",6),D(),k(6,"div",7)(7,"div",8)(8,"a",9),Q(9,"Neuen Markt erstellen"),D()()(),ee(10,_zt,1,2,"ng-template",null,0,Pt)(12,yzt,1,0,"ng-template",null,1,Pt)(14,vzt,1,0,"ng-template",null,2,Pt)),i&2){let r=ti(11),s=ti(13),d=ti(15);T(3),E("options",o.helpButtonOptions),T(2),E("loadItem",o.loading$)("successTemplate",r)("customLoadingTemplate",s)("errorTemplate",d),T(3),E("routerLink",uo(6,gzt))}},dependencies:[Ga,af,Kn,Tn,yo,Bs,P2,$L,Rl],encapsulation:2})}}return t})();var bzt=[{path:"new",component:oVe,data:{pageTitle:kd.title("Markt erstellen")},canActivate:[Od]},{path:":marketId",children:[{path:"",pathMatch:"full",component:tVe,canActivate:[Od]},{path:"edit",component:nVe,canActivate:[Od]},{path:"population",component:WBe,canActivate:[Od]}]},{path:"",pathMatch:"full",component:rVe,canActivate:[Od],data:{pageTitle:kd.title("M\xE4rkte")}}],PAo=Pp.forChild(bzt);function Czt(t,n){t&1&&(k(0,"div",21),ce(1,"bd-message-empty",22),D())}function xzt(t,n){t&1&&(k(0,"tr"),ce(1,"th"),D())}function wzt(t,n){if(t&1&&(Q(0),Xn(1,"administrativeDistrict"),Xn(2,"async")),t&2){let e,i=P().$implicit;Qi(" ",((e=Nr(2,3,Nr(1,1,i.node.data)))==null?null:e.displayName())||i.node.key," ")}}function Szt(t,n){if(t&1&&(Q(0),Xn(1,"postalCode"),Xn(2,"async")),t&2){let e=P().$implicit;_d(" ",e.node.data," ",Nr(2,5,Ls(1,2,e.node.data,"FIRST"))," ")}}function Tzt(t,n){if(t&1&&(k(0,"tr",26)(1,"td"),ce(2,"p-treeTableToggler",27)(3,"p-treeTableCheckbox",28),qe(4,wzt,3,5),qe(5,Szt,3,7),D()()),t&2){let e=n.$implicit;E("ttRow",e),T(2),E("rowNode",e),T(),E("value",e),T(),Ke(e.node.type==="administrativeDistrict"?4:-1),T(),Ke(e.node.type==="postalCode"?5:-1)}}function Izt(t,n){if(t&1){let e=tt();k(0,"p-treeTable",23),ie("selectionKeysChange",function(o){se(e);let r=P();return ae(r.onNodeKeySelection(o))}),ee(1,xzt,2,0,"ng-template",24)(2,Tzt,6,5,"ng-template",25),D()}if(t&2){let e=P();E("value",e.nodes)("selectionKeys",e.selectionKeys)}}var sVe=(()=>{class t{constructor(e,i,o,r){this.dialogRef=i,this._postalCodeService=o,this._cdr=r,this.loading$=new pi(1),this.nodes=[],this.postalCodesSelection=[],this.selectionKeys={},this.radiusInKilometer=25,this.mostlyInRange=!0,e.data&&(this.radiusInKilometer=e.data.value||25,this.coordinates=e.data.coordinate)}onClinicSelect(e){this.clinic=e,this.coordinates=[e.address.location[0],e.address.location[1]],this._loading()}onRadiusChange(e){this.radiusInKilometer=e,this._loading()}onMostlyInRangeChange(e){this.mostlyInRange=e.checked,this._loading()}onPostalCodesSelectionChange(e){this.postalCodesSelection=[...e];let i={};e.forEach(o=>{let r=this._createPostalCodeNode(o);i[r.key]={checked:!0,partialChecked:!1};let s=this.nodes.find(d=>d.type==="administrativeDistrict"&&d.children.some(m=>m.key===r.key));if(s){let d=s.children.every(m=>Object.keys(this.selectionKeys).includes(m.key));i[s.key]={partialChecked:!d,checked:d}}}),this.selectionKeys=JSON.parse(JSON.stringify(i)),this._cdr.markForCheck()}onQueryPostalCodesChange(e){this._postalCodeService.findAll(e,"FIRST").pipe(vt(i=>{let o={};return Object.keys(i).map(r=>{let s=i[r],d=Yo.createFromNumber(s.administrativeDistrictId);o[d.value]?o[d.value].push(r):o[d.value]=[r]}),o})).subscribe(i=>{this.nodes=Object.keys(i).map(o=>{let r=this._createDistrictNode(o);return r.children=i[o].map(s=>this._createPostalCodeNode(s)),r}),this.loading$.next(Gt.SUCCESS)})}onNodeKeySelection(e){this.postalCodesSelection=Object.keys(e).map(i=>t._keyToNode(i,this.nodes)).filter(i=>i.type==="postalCode").map(i=>i.data)}onSubmit(){this.dialogRef.close({value:this.radiusInKilometer,coordinate:this.coordinates,administrativeDistricts:Object.keys(this.selectionKeys).map(e=>t._keyToNode(e,this.nodes)).filter(e=>e.type==="administrativeDistrict").map(e=>e.data),postalCodes:Object.keys(this.selectionKeys).map(e=>t._keyToNode(e,this.nodes)).filter(e=>e.type==="postalCode").map(e=>e.data),clinicId:this.clinic.id})}_loading(){this.coordinates&&this.radiusInKilometer&&this.loading$.next(Gt.LOADING)}_createDistrictNode(e){return{type:"administrativeDistrict",data:Yo.createFromString(e),key:`administrativeDistrict_${e}`}}_createPostalCodeNode(e){return{type:"postalCode",data:e,key:`postalCode_${e}`}}static _keyToNode(e,i){let o;return i.forEach(r=>{r.key===e&&(o=r),!o&&r.children&&r.children.length>0&&(o=this._keyToNode(e,r.children))}),o}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es),_e(lg),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:37,vars:15,consts:[["initTpl",""],["successTpl",""],[1,"flex","flex-col"],[1,"flex-1"],[1,"flex","flex-col","md:flex-row","gap-0","md:gap-2","items-center"],[1,"flex-1","basis-1/2"],[3,"clinicSelect"],[1,"flex-1","basis-1/4"],[1,"flex-1","mat-caption"],[3,"max","min","step","discrete"],["matSliderThumb","",3,"valueChange","ngModel"],[1,"flex","flex-row"],[3,"change","checked"],[1,"flex-none"],["mat-icon-button","","matTooltip","Es werden nur PLZ-Bereiche beachtet, die sich gr\xF6\xDFenteils im Analyse Bereich befinden"],[1,"flex","flex-row","gap-2"],[3,"postalCodesSelectionChange","possiblePostalCodesChange","coordinates","distanceInKilometer","postalCodesSelection","mostlyInRange"],[3,"loadItem","successTemplate","initTemplate"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-raised-button","","color","accent",3,"click","disabled"],[1,"bd-container"],["icon","info","message","Bitte Klinik und Distanz ausw\xE4hlen"],["selectionMode","checkbox","dataKey","key",3,"selectionKeysChange","value","selectionKeys"],["pTemplate","header"],["pTemplate","body"],[3,"ttRow"],[3,"rowNode"],[3,"value"]],template:function(i,o){if(i&1){let r=tt();k(0,"div")(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"ays-clinic-select",6),ie("clinicSelect",function(d){return se(r),ae(o.onClinicSelect(d))}),D()(),k(6,"div",7)(7,"div",2)(8,"span",8),Q(9),D(),k(10,"div",3)(11,"mat-slider",9)(12,"input",10),ie("valueChange",function(d){return se(r),ae(o.onRadiusChange(d))}),D()()()()(),k(13,"div",7)(14,"div",11)(15,"div",3)(16,"mat-checkbox",12),ie("change",function(d){return se(r),ae(o.onMostlyInRangeChange(d))}),Q(17," Randgebiete ausschlie\xDFen "),D()(),k(18,"div",13)(19,"button",14)(20,"mat-icon"),Q(21,"info"),D()()()()()()(),k(22,"div",3)(23,"div",15)(24,"div",3)(25,"ays-market-geographic-distance-selection",16),ie("postalCodesSelectionChange",function(d){return se(r),ae(o.onPostalCodesSelectionChange(d))})("possiblePostalCodesChange",function(d){return se(r),ae(o.onQueryPostalCodesChange(d))}),D()(),k(26,"div",3),ce(27,"bd-loader",17),D()()()()(),k(28,"div",18)(29,"button",19),ie("click",function(){return se(r),ae(o.dialogRef.close())}),Q(30,"Abbrechen"),D(),k(31,"button",20),ie("click",function(){return se(r),ae(o.onSubmit())}),Q(32," Importieren "),D()(),ee(33,Czt,2,0,"ng-template",null,0,Pt)(35,Izt,3,2,"ng-template",null,1,Pt)}if(i&2){let r=ti(34),s=ti(36);T(9),Qi("Distanz ",o.radiusInKilometer," km"),T(2),E("max",100)("min",0)("step",1)("discrete",!0),T(),E("ngModel",o.radiusInKilometer),T(4),E("checked",o.mostlyInRange),T(9),E("coordinates",o.coordinates)("distanceInKilometer",o.radiusInKilometer)("postalCodesSelection",o.postalCodesSelection)("mostlyInRange",o.mostlyInRange),T(2),E("loadItem",o.loading$)("successTemplate",s)("initTemplate",r),T(4),E("disabled",!o.postalCodesSelection||o.postalCodesSelection.length===0)}},dependencies:[Vx,tq,eq,V5,hr,Ml,no,Lr,nf,hm,Tn,yo,xl,Hp,Up,$o,mr,LBe,Kn,Rl,oD,f_,so,nD,iD,BN,fx,DL,qd],styles:["mat-slider[_ngcontent-%COMP%]{width:80%}"]})}}return t})();function Ezt(t,n){if(t&1&&(k(0,"span",3),Q(1),D(),k(2,"p-accordion",4)(3,"p-accordion-panel")(4,"p-accordion-header"),Q(5),D(),k(6,"p-accordion-content")(7,"div"),ce(8,"bd-maps-administrative-district-ids-list",5),D()()(),k(9,"p-accordion-panel")(10,"p-accordion-header"),Q(11),D(),k(12,"p-accordion-content")(13,"div"),ce(14,"bd-maps-postal-codes-list",6),D()()()()),t&2){let e=P();T(),dt(e.displayText),T(),E("multiple",!0),T(3),Qi(" ",(e.value==null?null:e.value.administrativeDistricts.length)+" Landkreise"," "),T(3),E("administrativeDistrictIds",e.value.administrativeDistricts),T(3),Qi(" ",(e.value==null?null:e.value.postalCodes.length)+" Postleitzahlen"," "),T(3),E("postalCodes",e.value.postalCodes)}}function Dzt(t,n){t&1&&ce(0,"bd-message-empty",0)}var aVe=(()=>{class t extends dr{constructor(e,i,o){super(),this._dialogService=e,this._cdr=i,this._clinicService=o,this.pluginChange=new ve,this.value=null}ngOnChanges(){this.displayText=this.plugin.toText(),this._update(this.plugin.toValue())}ngOnDestroy(){this.unsubscribeAll()}edit(e){e.stopPropagation();let i=mt(be({},rc),{header:"Bereiche \xFCber Distanz importieren",data:this.value}),o=this._dialogService.open(sVe,i).onClose.pipe(Sn(1),wn(r=>!!r)).subscribe(r=>{this._update(r),this.plugin=new J2(r.coordinate,r.value,r.clinicId.clone(),[...r.administrativeDistricts.map(s=>s.clone())],[...r.postalCodes]),this.pluginChange.emit(this.plugin.clone())});this._subs.push(o)}_update(e){this.value=e,this.value.clinicId?this._clinicService.get(this.value.clinicId).subscribe(i=>{this.displayText=`Auswahl Bereiche um ${i.name} (SN: ${i.id.sn}, ${i.address.toString()}), die in ${this.value.value}km erreichbar sind`,this._cdr.markForCheck()}):(this.displayText=`Auswahl Bereiche um Klinik, die in ${this.value.value}km erreichbar sind`,this._cdr.markForCheck())}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo),_e(Gi),_e(cl))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-geo-parts-by-distance-around-clinic-id"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo]),ft,Ot],decls:5,vars:1,consts:[["message","Keine Klinik ausgew\xE4hlt"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"click"],[1,"mat-body"],[3,"multiple"],[3,"administrativeDistrictIds"],[3,"postalCodes"]],template:function(i,o){i&1&&(qe(0,Ezt,15,6)(1,Dzt,1,0,"bd-message-empty",0),k(2,"div",1)(3,"button",2),ie("click",function(s){return o.edit(s)}),Q(4," Distanz bearbeiten "),D()()),i&2&&Ke(o.value!=null&&o.value.coordinate?0:1)},dependencies:[cZ,tD,fM,n8,o8,gx,Tx,yo,Rl],encapsulation:2})}}return t})();var lVe=(()=>{class t{constructor(){this.pluginConfig={inlierTypeOptions:["OUTLIER_SHORT_STAY","INLIER","OUTLIER_LONG_STAY","UNKNOWN"]},this.pluginChange=new ve,this.config={selectLabel:"Verweildauer",resetOption:!1,valid$:new pi(1),option:{sortFnc:(e,i)=>e.inlierType.localeCompare(i.inlierType),uniqueFnc:e=>e.inlierType,searchOptionAccessor:e=>e.displayName}},this.inlierTypeOptions=vc}ngOnInit(){this.plugin&&this.plugin.valid()&&(this.initial={inlierType:this.plugin.toValue(),displayName:mx[this.plugin.toValue()]}),this.pluginConfig&&this.pluginConfig.inlierTypeOptions?this.inlierTypeOptions=ci(this.pluginConfig.inlierTypeOptions.map(e=>({inlierType:e,displayName:mx[e]}))):this.inlierTypeOptions=ci(Object.keys(mx).map(e=>({inlierType:e,displayName:mx[e]})))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onInlierTypeChange(e){this.pluginChange.emit(new nU(e.inlierType))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-inlier-type"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-single-select",0),ie("selection",function(s){return o.onInlierTypeChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.inlierTypeOptions)("initialSelection",o.initial)},dependencies:[jl],encapsulation:2})}}return t})();var cVe=(()=>{class t{constructor(){this.pluginConfig={inlierTypeOptions:["OUTLIER_SHORT_STAY","INLIER","OUTLIER_LONG_STAY","UNKNOWN"]},this.pluginChange=new ve,this.config={selectLabel:"Verweildauer",valid$:new pi(1),option:{sortFnc:(e,i)=>e.inlierType.localeCompare(i.inlierType),uniqueFnc:e=>e.inlierType,searchOptionAccessor:e=>e.displayName}},this.inlierTypeOptions=vc}ngOnInit(){this.plugin&&this.plugin.valid()&&(this.initial=this.plugin.toValue().map(e=>({inlierType:e,displayName:mx[e]}))),this.pluginConfig&&this.pluginConfig.inlierTypeOptions?this.inlierTypeOptions=ci(this.pluginConfig.inlierTypeOptions.map(e=>({inlierType:e,displayName:mx[e]}))):this.inlierTypeOptions=ci(Object.keys(mx).map(e=>({inlierType:e,displayName:mx[e]})))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onInlierTypeChange(e){this.pluginChange.emit(new fN([...e.map(i=>i.inlierType)]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-inlier-types"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onInlierTypeChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.inlierTypeOptions)("initialSelection",o.initial)},dependencies:[_a],encapsulation:2})}}return t})();var dVe=(()=>{class t{constructor(e){this._virtualClinicService=e}leistungsgruppen(){return this._leistungsgruppen$||(this._leistungsgruppen$=new pi(1),this._virtualClinicService.khtgLeistungsgruppen().subscribe({next:e=>this._leistungsgruppen$?.next(e),error:e=>this._leistungsgruppen$?.error(e)})),this._leistungsgruppen$.asObservable()}static{this.\u0275fac=function(i){return new(i||t)(di(hf))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var kzt=()=>["key","displayName.de"];function Mzt(t,n){if(t&1){let e=tt();k(0,"div",11)(1,"p-iconfield",12)(2,"p-inputicon"),ce(3,"i",13),D(),k(4,"input",14),ie("input",function(o){se(e),P();let r=ti(1);return ae(r.filterGlobal(o.target.value,"contains"))}),D()()()}}function Ozt(t,n){t&1&&(k(0,"tr")(1,"th",15),ce(2,"p-tableHeaderCheckbox"),D(),k(3,"th"),Q(4,"ID"),D(),k(5,"th"),Q(6,"Name"),D()())}function Rzt(t,n){if(t&1&&(k(0,"tr")(1,"td"),ce(2,"p-tableCheckbox",16),D(),k(3,"td"),Q(4),D(),k(5,"td"),Q(6),D()()),t&2){let e=n.$implicit,i=P(2);T(2),E("value",e),T(2),dt(e.key),T(2),dt(e.displayName[i.locale])}}function Fzt(t,n){if(t&1){let e=tt();k(0,"p-table",8,1),ie("selectionChange",function(o){se(e);let r=P();return ae(r.updateSelection(o))}),ee(2,Mzt,5,0,"ng-template",null,2,Pt)(4,Ozt,7,0,"ng-template",9)(5,Rzt,7,3,"ng-template",10),D()}if(t&2){let e=P();E("value",e.leistungsgruppen)("selection",e.selectedLeistungsgruppen)("globalFilterFields",uo(3,kzt))}}var uVe=(()=>{class t{constructor(e,i,o,r){this.locale=i,this.ref=o,this._leistungsgruppenCache=r,this.loading$=new pi(1),this.selection=[],this.loading$.next(Gt.LOADING),this.selection=e.data.selection}ngOnInit(){this._leistungsgruppenCache.leistungsgruppen().pipe(Sn(1)).subscribe(e=>{this.leistungsgruppen=e,this.selectedLeistungsgruppen=e.filter(i=>this.selection.includes(i.key)),this.loading$.next(Gt.SUCCESS)})}updateSelection(e){this.selectedLeistungsgruppen=e,this.selection=e.map(i=>i.key)}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(cp),_e(es),_e(dVe))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:9,vars:3,consts:[["successTpl",""],["table",""],["caption",""],[1,"flex","flex-col","gap-4"],[3,"loadItem","successTemplate"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-raised-button","","color","accent",3,"click","disabled"],["dataKey","key",3,"selectionChange","value","selection","globalFilterFields"],["pTemplate","header"],["pTemplate","body"],[1,"flex"],["iconPosition","left",1,"basis-1/3","ml-auto"],[1,"pi","pi-search"],["pInputText","","type","text","fluid","","placeholder","Suche nach Leistungsgruppe",3,"input"],[2,"width","4rem"],[3,"value"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",3),ce(1,"bd-loader",4),k(2,"div",5)(3,"button",6),ie("click",function(){return se(r),ae(o.ref.close())}),Q(4,"Abbrechen"),D(),k(5,"button",7),ie("click",function(){return se(r),ae(o.ref.close(o.selection))}),Q(6," \xDCbernehmen "),D()()(),ee(7,Fzt,6,4,"ng-template",null,0,Pt)}if(i&2){let r=ti(8);T(),E("loadItem",o.loading$)("successTemplate",r),T(4),E("disabled",!o.selection)}},dependencies:[Kn,Tn,yo,Cy,so,hc,hl,NL,BL,ax,lx,fu],encapsulation:2})}}return t})();function Pzt(t,n){if(t&1&&(k(0,"mat-hint"),Q(1),D()),t&2){let e=P();T(),dt(e.plugin==null?null:e.plugin.validationToText())}}var pVe=(()=>{class t{constructor(e){this._dialogService=e,this.pluginChange=new ve,this.displayValue="",this._leistungsgruppen=[]}ngOnChanges(e){e.plugin&&(this._leistungsgruppen=this.plugin.toValue(),this.displayValue=this.plugin.toText())}openEditDialog(e){e.stopPropagation();let i=mt(be({},rc),{header:"KHTG Leistungsgruppen",data:{selection:[...this._leistungsgruppen]}});this._dialogService.open(uVe,i).onClose.pipe(wn(o=>!!o)).subscribe(o=>{this.onSelectionChange(o)})}onSelectionChange(e){Ui.equals(this._leistungsgruppen,e)||(this._leistungsgruppen=[...e],this.plugin=new gN([...e]),this.pluginChange.emit(this.plugin.clone()),this.displayValue=this.plugin.toText())}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-khtg-leistungsgruppen"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo]),Ot],decls:5,vars:5,consts:[["matInput","","placeholder","KHTG Leistungsgruppen",3,"click","value","readonly"],["matSuffix",""]],template:function(i,o){i&1&&(k(0,"mat-form-field")(1,"input",0),ie("click",function(s){return o.openEditDialog(s)}),D(),k(2,"mat-icon",1),Q(3,"arrow_drop_down"),D(),qe(4,Pzt,2,1,"mat-hint"),D()),i&2&&(Vn("custom-invalid",!o.pluginValid),T(),E("value",o.displayValue)("readonly",!0),T(3),Ke(o.pluginValid?-1:4))},dependencies:[rs,mr,Fa,mp,mu],encapsulation:2})}}return t})();var hVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"Versorgungsstufe",valid$:new pi(1),option:{sortFnc:(e,i)=>e.medicalCareLevel.localeCompare(i.medicalCareLevel),uniqueFnc:e=>e.medicalCareLevel,searchOptionAccessor:e=>e.displayName}},this.options=ci([{medicalCareLevel:yx.BASIC_REGULAR_PROVIDER,displayName:b2[yx.BASIC_REGULAR_PROVIDER]},{medicalCareLevel:yx.FOCUS_PROVIDER,displayName:b2[yx.FOCUS_PROVIDER]},{medicalCareLevel:yx.SPECIALIZED_HOSPITAL,displayName:b2[yx.SPECIALIZED_HOSPITAL]},{medicalCareLevel:yx.MAXIMUM_PROVIDER,displayName:b2[yx.MAXIMUM_PROVIDER]}])}ngOnInit(){this.initial=this.plugin.toValue().map(e=>({medicalCareLevel:e,displayName:b2[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onMedicalCareLevelChange(e){this.pluginChange.emit(new B6([...e.map(i=>i.medicalCareLevel)]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-medical-care-level"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[["data-test","virtual-clinic-analysis-medical-care-level-selection",3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onMedicalCareLevelChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.initial)},dependencies:[_a],encapsulation:2})}}return t})();var mVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"Universit\xE4ten",valid$:new pi(1),resetOption:!0,option:{sortFnc:(e,i)=>e.clinicUniversityType.localeCompare(i.clinicUniversityType),uniqueFnc:e=>e.clinicUniversityType,searchOptionAccessor:e=>e.displayName}},this.options=ci([{clinicUniversityType:y0.WITH_UNIVERSITIES,displayName:rL[y0.WITH_UNIVERSITIES]},{clinicUniversityType:y0.WITHOUT_UNIVERSITIES,displayName:rL[y0.WITHOUT_UNIVERSITIES]},{clinicUniversityType:y0.ONLY_UNIVERSITIES,displayName:rL[y0.ONLY_UNIVERSITIES]}])}ngOnChanges(e){e.plugin&&(this.initial=this.plugin&&this.plugin.toValue()?{clinicUniversityType:this.plugin.toValue(),displayName:rL[this.plugin.toValue()]}:void 0),e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid,errorMessage:this.plugin.validationToText()})}onUniversityTypeChange(e){this.pluginChange.emit(new W2(e?e.clinicUniversityType:null))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-university-type"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-single-select",0),ie("selection",function(s){return o.onUniversityTypeChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.initial)},dependencies:[jl],encapsulation:2})}}return t})();var fVe=(()=>{class t extends JE{constructor(e,i){super(i),this._cdr=e,this.virtualClinicId=i.virtualClinicId}onExpressionChange(e){this.expressionChange$.next(e)}onExpressionValueChange(e){this.expressionValueChange$.next(e)}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e("FILTER_CONDITION_FORM_DATA"))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],features:[ft],decls:1,vars:4,consts:[[3,"expressionChange","expressionValueChange","expression","expressionConfig","possiblePluginTypes","virtualClinicId"]],template:function(i,o){i&1&&(k(0,"filter-condition-common-form",0),ie("expressionChange",function(s){return o.onExpressionChange(s)})("expressionValueChange",function(s){return o.onExpressionValueChange(s)}),D()),i&2&&E("expression",o.expression)("expressionConfig",o.expressionConfig)("possiblePluginTypes",o.possiblePluginTypes)("virtualClinicId",o.virtualClinicId)},dependencies:[IBe],encapsulation:2,changeDetection:0})}}return t})();function Lzt(t,n){}var CZ=(()=>{class t{constructor(e,i,o){this._authenticationService=e,this._permissionService=i,this._cdr=o,this.possiblePluginTypeDefinition=[],this.expressionConfig={},this.expressionChange=new ve,this.expressionValueChange=new ve,this.loading$=new pi(1),this.pluginFormComponent=fVe,this._initialExpression$=new pi(1),this._possiblePluginTypes$=new pi(1),yc([this._initialExpression$.pipe(rp((r,s)=>$a.equals(r,s)),wn(r=>!$a.equals(r,this._currentExpression))),this._possiblePluginTypes$]).subscribe(r=>{console.debug("START FILTER SYSTEM",r[0]),this.portal&&this.portal.detach(),this.loading$.next(Gt.SUCCESS),this.portal=new tg(sZ,void 0,Oo.create({providers:[{provide:"FILTER_CONDITION_FORM_DATA",useValue:{expressionConfig:this.expressionConfig,virtualClinicId:this.virtualClinicId,possiblePluginTypes:r[1],pluginFormComponent:this.pluginFormComponent}}]})),this._cdr.markForCheck()})}ngOnInit(){this.loading$.next(Gt.LOADING),this._authenticationService.authentication$.pipe(Mn(e=>e?this._permissionService.getPermissions().pipe(vt(i=>({authenticated:e,permissions:i}))):ci({authenticated:e,permissions:[]}))).subscribe({next:e=>{let i=this.possiblePluginTypeDefinition.filter(o=>o.needsAuthentication?e.authenticated===o.needsAuthentication:!0).filter(o=>o.permissions?o.permissions.every(r=>e.permissions.includes(r)):!0).map(o=>o.specification);this._possiblePluginTypes$.next(i)},error:e=>{console.error("FilterConditionFormComponent",e),this.loading$.next(Gt.ERROR)}})}ngOnChanges(e){e.expression&&this._initialExpression$.next(this.expression.clone())}onAttached(e){e.onDestroy(()=>this._currentExpression=null);let i=e.instance;i.init(this.expression.clone()),i.expressionChange$.subscribe(o=>{o?this._currentExpression=o.clone():this._currentExpression=o,this.expressionChange.emit(o)}),i.expressionValueChange$.pipe(id(500)).subscribe(o=>{this._currentExpression=o.clone(),this.expressionValueChange.emit(o.clone())})}static{this.\u0275fac=function(i){return new(i||t)(_e(vp),_e(OU),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form"]],inputs:{expression:"expression",possiblePluginTypeDefinition:"possiblePluginTypeDefinition",expressionConfig:"expressionConfig",virtualClinicId:"virtualClinicId"},outputs:{expressionChange:"expressionChange",expressionValueChange:"expressionValueChange"},features:[Ot],decls:3,vars:3,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"attached","cdkPortalOutlet"]],template:function(i,o){if(i&1){let r=tt();ce(0,"bd-loader",1),ee(1,Lzt,0,0,"ng-template",2,0,Pt),ie("attached",function(d){return se(r),ae(o.onAttached(d))})}if(i&2){let r=ti(2);E("loadItem",o.loading$)("successTemplate",r),T(),E("cdkPortalOutlet",o.portal)}},dependencies:[Wg,r0,Kn],encapsulation:2,changeDetection:0})}}return t})();var Nzt=t=>({expressionText:t,expressionPadding:!1}),Bzt=(t,n,e)=>({"pl-4":t,"list-disc":n,"list-none":e}),gVe=t=>({text:t}),_Ve=t=>({expressionText:t,expressionPadding:!0});function Vzt(t,n){if(t&1&&Q(0),t&2){let e=P(2).$implicit;Qi(" ",e.kind," ")}}function zzt(t,n){if(t&1&&(k(0,"li"),qe(1,Vzt,1,1),ui(2,2),D()),t&2){let e=P(),i=e.$implicit,o=e.$index;P(2);let r=ti(4);T(),Ke(o!==0?1:-1),T(),E("ngTemplateOutlet",r)("ngTemplateOutletContext",ki(3,gVe,i.expressionText))}}function Uzt(t,n){t&1&&(k(0,"i"),Q(1,"keine weiteren Filter"),D())}function Hzt(t,n){if(t&1&&ui(0,2),t&2){let e=P(3).$implicit;P(2);let i=ti(4);E("ngTemplateOutlet",i)("ngTemplateOutletContext",ki(2,gVe,e.expressionText[0].expressionText))}}function jzt(t,n){if(t&1&&ui(0,2),t&2){let e=P(3).$implicit;P(2);let i=ti(2);E("ngTemplateOutlet",i)("ngTemplateOutletContext",ki(2,_Ve,e.expressionText[0].expressionText))}}function Gzt(t,n){if(t&1&&qe(0,Hzt,1,4,"ng-container",2)(1,jzt,1,4,"ng-container",2),t&2){let e=P(2).$implicit,i=P(2);Ke(i.isSimpleText(e.expressionText[0].expressionText)?0:1)}}function $zt(t,n){if(t&1&&ui(0,2),t&2){let e=P(2).$implicit;P(2);let i=ti(2);E("ngTemplateOutlet",i)("ngTemplateOutletContext",ki(2,_Ve,e.expressionText))}}function qzt(t,n){if(t&1&&(k(0,"li"),Q(1),qe(2,Uzt,2,0,"i"),qe(3,Gzt,2,1),qe(4,$zt,1,4,"ng-container",2),D()),t&2){let e=P(),i=e.$implicit,o=e.$index;T(),Qi(" ",o!==0?i.kind:null," "),T(),Ke(i.expressionText.length===0?2:-1),T(),Ke(i.expressionText.length===1?3:-1),T(),Ke(i.expressionText.length>1?4:-1)}}function Kzt(t,n){if(t&1&&(qe(0,zzt,3,5,"li"),qe(1,qzt,5,4,"li")),t&2){let e=n.$implicit,i=P(2);Ke(i.isSimpleText(e.expressionText)?0:-1),T(),Ke(i.isSimpleText(e.expressionText)?-1:1)}}function Wzt(t,n){if(t&1&&(k(0,"ul",3),lo(1,Kzt,2,2,null,null,jo),D()),t&2){let e=n.expressionText,i=n.expressionPadding;E("ngClass",$d(1,Bzt,i,i,!i)),T(),co(e)}}function Yzt(t,n){if(t&1&&(k(0,"b"),Q(1),D()),t&2){let e=n.text;T(),dt(e)}}var bZ=(()=>{class t{constructor(e){this._cdr=e,this.filterText=""}ngOnChanges(e){e.expression&&(this.filterText=$a.formatter(this.expression),this._cdr.markForCheck())}isSimpleText(e){return typeof e=="string"}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-expression-show"]],inputs:{expression:"expression"},features:[Ot],decls:5,vars:4,consts:[["expressionTpl",""],["pluginTpl",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"list-inside",3,"ngClass"]],template:function(i,o){if(i&1&&(ui(0,2),ee(1,Wzt,3,5,"ng-template",null,0,Pt)(3,Yzt,2,1,"ng-template",null,1,Pt)),i&2){let r=ti(2);E("ngTemplateOutlet",r)("ngTemplateOutletContext",ki(2,Nzt,o.filterText))}},dependencies:[Lo,Ns,On],encapsulation:2,changeDetection:0})}}return t})();var yVe=(()=>{class t{constructor(e){this._cdr=e,this.expressionEdit=new ve,this.expressionText="",this.expressionValid=!0}ngOnChanges(){this.expression&&(this.expressionText=this.expression.toText(),this.expressionValid=this.expression.valid(),this._cdr.markForCheck())}onEditExpression(e){e.stopPropagation(),this.expressionEdit.next()}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-expression-form-field"]],inputs:{expression:"expression"},outputs:{expressionEdit:"expressionEdit"},features:[Ot],decls:7,vars:3,consts:[[1,"mb-4"],["id","filter-condition-expression-form-field","pInputText","","variant","filled","fluid","","readonly","",1,"cursor-pointer",3,"click","invalid","ngModel"],["for","filter-condition-expression-form-field"],["variant","text","icon","pi pi-angle-down",3,"onClick","severity"]],template:function(i,o){i&1&&(k(0,"p-inputgroup",0)(1,"p-iftalabel")(2,"input",1),ie("click",function(s){return o.onEditExpression(s)}),D(),k(3,"label",2),Q(4,"Filter"),D()(),k(5,"p-inputgroup-addon")(6,"p-button",3),ie("onClick",function(s){return o.onEditExpression(s)}),D()()()),i&2&&(T(2),E("invalid",!o.expressionValid)("ngModel",o.expressionText),T(4),E("severity",o.expressionValid?"secondary":"danger"))},dependencies:[ja,nE,iE,fu,xr,Ml,no,hr,Lr,as],encapsulation:2,changeDetection:0})}}return t})();var vVe=(()=>{class t extends dr{constructor(e,i,o){super(),this.ref=e,this._config=i,this._cdr=o,this.selection=new nm(!0),this.selectionCopy=[],this.csvImportConfig={title:"CSV-Datei",columnDefinitions:[{fieldName:"Postleitzahl",displayName:"Postleitzahl",explanation:["5-stellige Postleitzahl"],validationFnc:r=>bp.isNumber(r)}]},this._subs.push(this.selection.changed.subscribe(r=>{this.selectionCopy=JSON.parse(JSON.stringify(r.source.selected)),this._cdr.markForCheck()})),this._config.data&&this._config.data.postalCodes&&this._config.data.postalCodes.length>0&&this.selection.setSelection(...this._config.data.postalCodes)}ngOnDestroy(){this.unsubscribeAll()}onSelectedPostalCodesChange(e){Ui.equals(this.selection.selected,e)||this.selection.setSelection(...JSON.parse(JSON.stringify(e)))}onSelectedPostalCode(e){this.selection.select(e.postalCode)}onCsvImport(e){this.selection.select(...e.data.map(i=>i[0]))}static{this.\u0275fac=function(i){return new(i||t)(_e(es),_e(Us),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],features:[ft],decls:20,vars:3,consts:[[1,"flex","flex-row","gap-6"],[1,"flex-1"],[3,"selectedPostalCodesChange","selectedPostalCodes"],[1,"flex","flex-row","gap-6","items-center"],["placeholderText","Postleitzahl hinzuf\xFCgen",3,"postalCodeSelect"],[3,"inputChange","config"],[3,"postalCodesChange","postalCodes"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-raised-button","","color","accent",3,"click"]],template:function(i,o){i&1&&(k(0,"div")(1,"div",0)(2,"div",1)(3,"bd-maps-postal-codes-map-selection",2),ie("selectedPostalCodesChange",function(s){return o.onSelectedPostalCodesChange(s)}),D()(),k(4,"div",1)(5,"div")(6,"div")(7,"div",3)(8,"div",1)(9,"div")(10,"bd-postal-code-autocomplete",4),ie("postalCodeSelect",function(s){return o.onSelectedPostalCode(s)}),D()()(),k(11,"div")(12,"bd-csv-import-file-button",5),ie("inputChange",function(s){return o.onCsvImport(s)}),D()()()(),k(13,"div")(14,"bd-maps-postal-codes-list",6),ie("postalCodesChange",function(s){return o.onSelectedPostalCodesChange(s)}),D()()()()()(),k(15,"div",7)(16,"button",8),ie("click",function(){return o.ref.close()}),Q(17,"Abbrechen"),D(),k(18,"button",9),ie("click",function(){return o.ref.close(o.selectionCopy)}),Q(19," \xDCbernehmen "),D()()),i&2&&(T(3),E("selectedPostalCodes",o.selectionCopy),T(9),E("config",o.csvImportConfig),T(2),E("postalCodes",o.selectionCopy))},dependencies:[kY,mY,QE,Tx,Tn,yo],encapsulation:2})}}return t})();var bVe=Ap(Kw());var Qzt=()=>({"min-width":"50rem"}),Zzt=()=>[5,10,20];function Xzt(t,n){t&1&&(k(0,"div",13)(1,"div",14),ce(2,"p-skeleton"),D(),k(3,"div",14),ce(4,"p-skeleton"),D()())}function Jzt(t,n){t&1&&(k(0,"tr"),ce(1,"th",21),k(2,"th"),Q(3,"Bereich"),D(),k(4,"th",22),Q(5,"Anzahl F\xE4lle (Anteil)"),D()())}function e6t(t,n){if(t&1&&(k(0,"tr",23)(1,"td",24),ce(2,"p-treeTableToggler",25)(3,"p-treeTableCheckbox",26),D(),k(4,"td"),Q(5),D(),k(6,"td",22),Q(7),Xn(8,"number"),Xn(9,"percent"),D()()),t&2){let e=n.$implicit,i=n.rowData;E("ttRow",e)("ttSelectableRow",e),T(2),E("rowNode",e),T(),E("value",e),T(2),Qi(" ",i.name," "),T(2),_d(" ",Nr(8,7,i.count)," (",Nr(9,9,i.percentage),") ")}}function t6t(t,n){if(t&1){let e=tt();k(0,"div",13)(1,"div",14)(2,"div",15)(3,"bd-map",16),ie("mapLoaded",function(o){se(e);let r=P();return ae(r.onMapLoaded(o))})("mapClick",function(o){se(e);let r=P();return ae(r.onMapClick(o))}),D(),ce(4,"bd-map-legend",17),D()(),k(5,"div",14)(6,"p-treeTable",18),ie("selectionKeysChange",function(o){se(e);let r=P();return ae(r.onTreeTableSelectionChange(o))}),ee(7,Jzt,6,0,"ng-template",19)(8,e6t,10,11,"ng-template",20),D()()()}if(t&2){let e=P();T(3),E("mapOptions",e.mapOptions),T(),E("controller",e.mapController),T(2),E("value",e.treeNodes)("tableStyle",uo(8,Qzt))("paginator",!0)("rows",10)("rowsPerPageOptions",uo(9,Zzt))("selectionKeys",e.selectionKeys)}}var CVe=(()=>{class t{constructor(e,i,o,r){this.ref=e,this._cdr=i,this._virtualClinicService=o,this._postalCodesService=r,this.mapOptions=mt(be({},lm),{style:"mapbox://styles/mapbox/light-v11"}),this.loading$=new pi(1),this.virtualClinicSelectionCtrl=new yr(null,Ys.required),this.treeNodes=[],this.mapController=new Jd,this.colorFactory=new Qw(new Cs("hsl(120, 100%, 50%)")),this.selection=new nm(!0,[],!0),this.selectionKeys={},this._selectionLayer=new Ex("selection",{layerId:e_.id,highlightLayerId:nb.id,sourceId:dx,displayName:"Auswahl"});let s=new O2;s.displayName="Anzahl Patienten pro Postleitzahl",this._postalCodesLayer=new R2("postalCodes",s,this._postalCodesService),this._postalCodesLayer.colorFactory$.next(this.colorFactory),this.mapController.registerLayer(this._postalCodesLayer),this.mapController.registerLayer(this._selectionLayer),this.selection.changed.subscribe(d=>{this._selectionLayer.selection.setSelection(...d.source.selected)}),this._selectionLayer.selection.changed.subscribe(d=>{Ui.equals(this.selection.selected,d.source.selected)||(this.selectionKeys={},d.source.selected.forEach(m=>{let v=`p-${m}`,w=this.treeNodes.find(O=>O.children.find(N=>N.key===m));w&&(this.selectionKeys[w.key]={checked:!1,partialChecked:!0}),this.selectionKeys[v]={checked:!0,partialChecked:!1}}),this.selectionKeys=JSON.parse(JSON.stringify(this.selectionKeys)),this._cdr.markForCheck())})}onVirtualClinicSelectionChange(e){this.virtualClinicSelectionCtrl.patchValue(e)}onStepChange(e){e.selectedIndex===0&&(this.virtualClinicAddress=null,this.selectionKeys={},this.selection.clear()),e.selectedIndex===1&&this._onVirtualClinicSelect(this.virtualClinicSelectionCtrl.getRawValue())}onMapLoaded(e){this.map=e,this.mapController.addMapRef(e),this._applyAddressMarker()}onMapClick(e){this._selectionLayer.click(e)}onTreeTableSelectionChange(e){this.selection.setSelection(...Object.keys(e).filter(i=>i.startsWith("p")).map(i=>i.slice(2)))}_applyAddressMarker(){if(this.virtualClinicAddress){let e={lng:this.virtualClinicAddress.location[0],lat:this.virtualClinicAddress.location[1]};this.map.setCenter(e),new bVe.Marker({color:"black"}).setLngLat(e).addTo(this.map)}}_onVirtualClinicSelect(e){e.virtualClinic.address&&e.virtualClinic.address.location?this.virtualClinicAddress=new Ih(e.virtualClinic.address.street,e.virtualClinic.address.postalCode,e.virtualClinic.address.city,e.virtualClinic.address.location):this.virtualClinicAddress=null,e.virtualClinic&&e.year?this._setPatientsByAdministrativeDistricts(e):this.loading$.next(Gt.INIT)}_setPatientsByAdministrativeDistricts(e){this.loading$.next(Gt.LOADING),this._virtualClinicService.patientsByAdministrativeDistricts(e.virtualClinic.id,new ub([e.year],null)).subscribe({next:i=>{let o=i.data.map(r=>r.total).reduce((r,s)=>r+s,0);this.treeNodes=i.data.map(r=>({key:`ad-${r.adId}`,type:"district",data:{dataKey:`ad-${r.adId}`,value:Yo.create(r.adId),count:i.patientCount[r.adId].count,percentage:i.patientCount[r.adId].percentage,name:r.name},children:r.children?.map(s=>({key:s.postalCode,type:"postalCode",data:{dataKey:`p-${s.postalCode}`,value:s.postalCode,count:i.postalCodeLayerData[s.postalCode],percentage:i.postalCodeLayerData[s.postalCode]/o,name:s.name}}))})),this._postalCodesLayer.data$.next(i.postalCodeLayerData),this.loading$.next(Gt.SUCCESS)},error:i=>{console.error(i),this.loading$.next(Gt.ERROR)}})}static{this.\u0275fac=function(i){return new(i||t)(_e(es),_e(Gi),_e(hf),_e(lg))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],features:[jt([iw,Ta])],decls:22,vars:7,consts:[["loadingTpl",""],["successTpl",""],[3,"selectionChange","linear"],["label","Virtuelle Klinik",3,"stepControl"],[1,"bd-container"],[3,"selectionChange","withSpecialtyDepartment"],[1,"flex","flex-row-reverse","gap-6"],["mat-raised-button","","color","accent","matStepperNext","",3,"disabled"],["mat-button","",3,"click"],["label","Postleitzahlen"],[1,"flex","flex-col","gap-6"],[3,"loadItem","successTemplate","customLoadingTemplate"],["mat-raised-button","","color","accent",3,"click"],[1,"flex","flex-row","gap-6"],[1,"flex-1"],[1,"map-wrapper"],[3,"mapLoaded","mapClick","mapOptions"],[3,"controller"],["dataKey","dataKey","selectionMode","checkbox",3,"selectionKeysChange","value","tableStyle","paginator","rows","rowsPerPageOptions","selectionKeys"],["pTemplate","header"],["pTemplate","body"],[2,"width","6rem"],[1,"text-right"],[3,"ttRow","ttSelectableRow"],[1,"flex","flex-row"],[3,"rowNode"],[3,"value"]],template:function(i,o){if(i&1){let r=tt();k(0,"div")(1,"mat-horizontal-stepper",2),ie("selectionChange",function(d){return se(r),ae(o.onStepChange(d))}),k(2,"mat-step",3)(3,"div",4)(4,"ays-virtual-clinic-structural-select",5),ie("selectionChange",function(d){return se(r),ae(o.onVirtualClinicSelectionChange(d))}),D()(),k(5,"div",6)(6,"button",7),Q(7," Postleitzahlen ausw\xE4hlen "),D(),k(8,"button",8),ie("click",function(){return se(r),ae(o.ref.close())}),Q(9,"Abbrechen"),D()()(),k(10,"mat-step",9)(11,"div",10),ce(12,"bd-loader",11),k(13,"div",6)(14,"button",12),ie("click",function(){return se(r),ae(o.ref.close(o.selection.selected))}),Q(15," \xDCbernehmen "),D(),k(16,"button",8),ie("click",function(){return se(r),ae(o.ref.close())}),Q(17,"Abbrechen"),D()()(),ee(18,Xzt,5,0,"ng-template",null,0,Pt)(20,t6t,9,10,"ng-template",null,1,Pt),D()()()}if(i&2){let r=ti(19),s=ti(21);T(),E("linear",!0),T(),E("stepControl",o.virtualClinicSelectionCtrl),T(2),E("withSpecialtyDepartment",!1),T(2),E("disabled",o.virtualClinicSelectionCtrl.invalid),T(6),E("loadItem",o.loading$)("successTemplate",s)("customLoadingTemplate",r)}},dependencies:[UQ,BU,xr,qQ,HQ,yo,Kn,of,mm,so,eu,Yp,oD,f_,nD,iD,RBe,BN,Ta,iw],styles:[".map-wrapper[_ngcontent-%COMP%]{position:relative;height:55vh}"]})}}return t})();var xVe=(()=>{class t{constructor(e){this._dialogService=e,this.pluginChange=new ve,this.menuItems=[{label:"Von virtueller Klinik importieren",command:()=>this.openVirtualClinicImportDialog()}],this.postalCodes=[]}ngOnInit(){this.postalCodes=this.plugin.toValue()??[]}openEditDialog(){let e=mt(be({},rc),{header:"Postleitzahlen bearbeiten",data:{postalCodes:this.postalCodes.slice()}});this._dialogService.open(vVe,e).onClose.pipe(Sn(1),wn(i=>!!i&&i.length>0)).subscribe(i=>this.updatePostalCodes(i))}openVirtualClinicImportDialog(){let e=mt(be({},rc),{header:"Postleitzahlen von Virtueller Klinik importieren"});this._dialogService.open(CVe,e).onClose.pipe(Sn(1),wn(i=>!!i&&i.length>0)).subscribe(i=>{this.updatePostalCodes(i)})}updatePostalCodes(e){Ui.equals(this.postalCodes,e)||(this.postalCodes=[...e],this.pluginChange.emit(new df([...e])))}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-postal-codes"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo])],decls:3,vars:3,consts:[[3,"postalCodesChange","postalCodes"],[1,"flex","flex-row-reverse"],["label","Postleitzahlen bearbeiten","data-test","filter-condition-form-postal-codes-menu-button","appendTo","body","size","small",3,"onClick","model","outlined"]],template:function(i,o){i&1&&(k(0,"bd-maps-postal-codes-list",0),ie("postalCodesChange",function(s){return o.updatePostalCodes(s)}),D(),k(1,"div",1)(2,"p-split-button",2),ie("onClick",function(){return o.openEditDialog()}),D()()),i&2&&(E("postalCodes",o.postalCodes.slice()),T(2),E("model",o.menuItems)("outlined",!0))},dependencies:[Tx,KQ],encapsulation:2})}}return t})();function i6t(t,n){if(t&1&&(k(0,"mat-hint"),Q(1),D()),t&2){let e=P();T(),dt(e.plugin==null?null:e.plugin.validationToText())}}var wVe=(()=>{class t extends dr{constructor(e,i,o,r){super(),this._cdr=e,this._dialogService=i,this._statesService=o,this._careServiceAreaService=r,this.pluginChange=new ve,this.selection=[],this.displayText=""}ngOnChanges(e){this.selection=this.plugin.toValue(),this.displayText=this.plugin.toText(),this._cdr.markForCheck()}ngOnDestroy(){this.unsubscribeAll()}edit(e){e.stopPropagation();let i=mt(be({},rc),{header:"Versorgungsgebiete bearbeiten",data:{selection:this.selection,stateOptions$:o=>this._statesService.findCareServiceAreaIds(o),displayName$:o=>this._careServiceAreaService.findOne(o).pipe(vt(r=>r.name))}});this._subs.push(this._dialogService.open(VY,i).onClose.pipe(wn(o=>!!o)).subscribe(o=>{this.selection=o?.selection,this.plugin=new Sy(o?.selection),this.displayText=this.plugin.toText(),this._cdr.markForCheck(),this.pluginChange.emit(this.plugin.clone())}))}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e(Mo),_e(jY),_e(Fde))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-care-service-area-ids"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo]),ft,Ot],decls:5,vars:4,consts:[["matInput","","placeholder","Versorgungsgebiete",3,"click","value"],["matSuffix",""]],template:function(i,o){i&1&&(k(0,"mat-form-field")(1,"input",0),ie("click",function(s){return o.edit(s)}),D(),k(2,"mat-icon",1),Q(3,"arrow_drop_down"),D(),qe(4,i6t,2,1,"mat-hint"),D()),i&2&&(Vn("custom-invalid",!o.pluginValid),T(),E("value",o.displayText),T(3),Ke(o.pluginValid?-1:4))},dependencies:[pl,Fa,rs,mu,mp,$o,mr],encapsulation:2,changeDetection:0})}}return t})();function n6t(t,n){t&1&&(k(0,"div",19),ce(1,"bd-message-empty",20),D())}function o6t(t,n){t&1&&(k(0,"tr"),ce(1,"th"),D())}function r6t(t,n){if(t&1&&(Q(0),Xn(1,"administrativeDistrict"),Xn(2,"async")),t&2){let e,i=P().$implicit;Qi(" ",((e=Nr(2,3,Nr(1,1,i.node.data)))==null?null:e.displayName())||i.node.key," ")}}function s6t(t,n){if(t&1&&(Q(0),Xn(1,"postalCode"),Xn(2,"async")),t&2){let e=P().$implicit;_d(" ",e.node.data," ",Nr(2,5,Ls(1,2,e.node.data,"FIRST"))," ")}}function a6t(t,n){if(t&1&&(k(0,"tr",24)(1,"td"),ce(2,"p-treeTableToggler",25)(3,"p-treeTableCheckbox",26),qe(4,r6t,3,5),qe(5,s6t,3,7),D()()),t&2){let e=n.$implicit;E("ttRow",e),T(2),E("rowNode",e),T(),E("value",e),T(),Ke(e.node.type==="administrativeDistrict"?4:-1),T(),Ke(e.node.type==="postalCode"?5:-1)}}function l6t(t,n){if(t&1){let e=tt();k(0,"p-treeTable",21),ie("selectionKeysChange",function(o){se(e);let r=P();return ae(r.onNodeKeySelection(o))}),ee(1,o6t,2,0,"ng-template",22)(2,a6t,6,5,"ng-template",23),D()}if(t&2){let e=P();E("value",e.nodes)("selectionKeys",e.selectionKeys)}}var SVe=(()=>{class t{constructor(e,i,o,r){this.ref=i,this._postalCodeService=o,this._cdr=r,this.loading$=new pi(1),this.nodes=[],this.postalCodesSelection=[],this.selectionKeys={},this.drivingTime=10,this.mostlyInRange=!0,e.data&&(this.drivingTime=e.data.value||10,this.coordinates=e.data.coordinate||null)}onClinicSelect(e){this.clinic=e,this.coordinates=[e.address.location[0],e.address.location[1]],this._loading()}onDrivingTimeChange(e){this.drivingTime=e,this._loading()}onMostlyInRangeChange(e){this.mostlyInRange=e.checked,this._loading()}onPostalCodesSelectionChange(e){this.postalCodesSelection=[...e];let i={};e.forEach(o=>{let r=this._createPostalCodeNode(o);i[r.key]={checked:!0,partialChecked:!1};let s=this.nodes.find(d=>d.type==="administrativeDistrict"&&d.children.some(m=>m.key===r.key));if(s){let d=s.children.every(m=>Object.keys(this.selectionKeys).includes(m.key));i[s.key]={partialChecked:!d,checked:d}}}),this.selectionKeys=JSON.parse(JSON.stringify(i)),this._cdr.markForCheck()}onNodeKeySelection(e){this.postalCodesSelection=Object.keys(e).map(i=>t._keyToNode(i,this.nodes)).filter(i=>i.type==="postalCode").map(i=>i.data)}onQueryPostalCodes(e){this._postalCodeService.findAll(e,"FIRST").pipe(vt(i=>{let o={};return Object.keys(i).map(r=>{let s=i[r],d=Yo.createFromNumber(s.administrativeDistrictId);o[d.value]?o[d.value].push(r):o[d.value]=[r]}),o})).subscribe(i=>{this.nodes=Object.keys(i).map(o=>{let r=this._createDistrictNode(o);return r.children=i[o].map(s=>this._createPostalCodeNode(s)),r}),this.loading$.next(Gt.SUCCESS)})}onSubmit(){this.ref.close({value:this.drivingTime,coordinate:this.coordinates,administrativeDistricts:Object.keys(this.selectionKeys).map(e=>t._keyToNode(e,this.nodes)).filter(e=>e.type==="administrativeDistrict").map(e=>e.data),postalCodes:Object.keys(this.selectionKeys).map(e=>t._keyToNode(e,this.nodes)).filter(e=>e.type==="postalCode").map(e=>e.data),clinicId:this.clinic.id})}_loading(){this.coordinates&&this.drivingTime&&this.loading$.next(Gt.LOADING)}_createDistrictNode(e){return{type:"administrativeDistrict",data:Yo.createFromString(e),key:`administrativeDistrict_${e}`}}_createPostalCodeNode(e){return{type:"postalCode",data:e,key:`postalCode_${e}`}}static _keyToNode(e,i){let o;return i.forEach(r=>{r.key===e&&(o=r),!o&&r.children&&r.children.length>0&&(o=this._keyToNode(e,r.children))}),o}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es),_e(lg),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:32,vars:10,consts:[["initTpl",""],["successTpl",""],[1,"flex","flex-col"],[1,"flex-1"],[1,"flex","flex-col","md:flex-row","gap-0","md:gap-2","items-center"],[1,"flex-1","basis-1/2"],[3,"clinicSelect"],[1,"flex-1","basis-1/4"],[3,"drivingTimeChange","drivingTime"],[1,"flex","flex-row"],[3,"change","checked"],[1,"flex-none"],["mat-icon-button","","matTooltip","Es werden nur PLZ-Bereiche beachtet, die sich gr\xF6\xDFenteils im Analyse Bereich befinden"],[1,"flex","flex-row","gap-2"],[3,"postalCodesSelectionChange","possiblePostalCodesChange","coordinates","drivingTime","mostlyInRange","postalCodesSelection"],[3,"loadItem","successTemplate","initTemplate"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-raised-button","","color","accent",3,"click","disabled"],[1,"bd-container"],["icon","info","message","Bitte Klinik und Fahrzeit ausw\xE4hlen"],["selectionMode","checkbox","dataKey","key",3,"selectionKeysChange","value","selectionKeys"],["pTemplate","header"],["pTemplate","body"],[3,"ttRow"],[3,"rowNode"],[3,"value"]],template:function(i,o){if(i&1){let r=tt();k(0,"div")(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"ays-clinic-select",6),ie("clinicSelect",function(d){return se(r),ae(o.onClinicSelect(d))}),D()(),k(6,"div",7)(7,"ays-market-isochrone-selection-driving-time-selector",8),ie("drivingTimeChange",function(d){return se(r),ae(o.onDrivingTimeChange(d))}),D()(),k(8,"div",7)(9,"div",9)(10,"div",3)(11,"mat-checkbox",10),ie("change",function(d){return se(r),ae(o.onMostlyInRangeChange(d))}),Q(12," Randgebiete ausschlie\xDFen "),D()(),k(13,"div",11)(14,"button",12)(15,"mat-icon"),Q(16,"info"),D()()()()()()(),k(17,"div",3)(18,"div",13)(19,"div",3)(20,"ays-market-isochrone-selection-postal-codes",14),ie("postalCodesSelectionChange",function(d){return se(r),ae(o.onPostalCodesSelectionChange(d))})("possiblePostalCodesChange",function(d){return se(r),ae(o.onQueryPostalCodes(d))}),D()(),k(21,"div",3),ce(22,"bd-loader",15),D()()()()(),k(23,"div",16)(24,"button",17),ie("click",function(){return se(r),ae(o.ref.close())}),Q(25,"Abbrechen"),D(),k(26,"button",18),ie("click",function(){return se(r),ae(o.onSubmit())}),Q(27," Importieren "),D()(),ee(28,n6t,2,0,"ng-template",null,0,Pt)(30,l6t,3,2,"ng-template",null,1,Pt)}if(i&2){let r=ti(29),s=ti(31);T(7),E("drivingTime",o.drivingTime),T(4),E("checked",o.mostlyInRange),T(9),E("coordinates",o.coordinates)("drivingTime",o.drivingTime)("mostlyInRange",o.mostlyInRange)("postalCodesSelection",o.postalCodesSelection),T(2),E("loadItem",o.loading$)("successTemplate",s)("initTemplate",r),T(4),E("disabled",!o.postalCodesSelection||o.postalCodesSelection.length===0)}},dependencies:[On,Vx,nf,hm,Tn,yo,xl,Hp,Up,$o,mr,Kn,Rl,oD,f_,so,nD,iD,BN,PBe,FBe,qd,fx,DL],encapsulation:2})}}return t})();function c6t(t,n){if(t&1&&(k(0,"span",3),Q(1),D(),k(2,"p-accordion",4)(3,"p-accordion-panel")(4,"p-accordion-header"),Q(5),D(),k(6,"p-accordion-content")(7,"div"),ce(8,"bd-maps-administrative-district-ids-list",5),D()()(),k(9,"p-accordion-panel")(10,"p-accordion-header"),Q(11),D(),k(12,"p-accordion-content")(13,"div"),ce(14,"bd-maps-postal-codes-list",6),D()()()()),t&2){let e=P();T(),dt(e.displayText),T(),E("multiple",!0),T(3),Qi(" ",(e.value==null?null:e.value.administrativeDistricts.length)+" Landkreise"," "),T(3),E("administrativeDistrictIds",e.value.administrativeDistricts),T(3),Qi(" ",(e.value==null?null:e.value.postalCodes.length)+" Postleitzahlen"," "),T(3),E("postalCodes",e.value.postalCodes)}}function d6t(t,n){t&1&&ce(0,"bd-message-empty",0)}var TVe=(()=>{class t extends dr{constructor(e,i,o){super(),this._dialogService=e,this._cdr=i,this._clinicService=o,this.pluginChange=new ve,this.value=null}ngOnChanges(){this.displayText=this.plugin.toText(),this._update(this.plugin.toValue())}ngOnDestroy(){this.unsubscribeAll()}edit(e){e.stopPropagation();let i=mt(be({},rc),{header:"Bereiche \xFCber Fahrzeit importieren",data:this.value}),o=this._dialogService.open(SVe,i).onClose.pipe(Sn(1),wn(r=>!!r)).subscribe(r=>{this._update(r),this.plugin=new eM(this.value.coordinate,this.value.value,this.value.clinicId?this.value.clinicId.clone():null,[...this.value.administrativeDistricts.map(s=>s.clone())],[...this.value.postalCodes]),this.pluginChange.emit(this.plugin.clone())});this._subs.push(o)}_update(e){this.value=e,this.value.clinicId?this._clinicService.get(this.value.clinicId).subscribe(i=>{this.displayText=`Auswahl Bereiche um ${i.name} (SN: ${i.id.sn}, ${i.address.toString()}), die in ${this.value.value} min erreichbar sind`,this._cdr.markForCheck()}):(this.displayText=`Auswahl Bereiche um Klinik, die in ${this.value.value} min erreichbar sind`,this._cdr.markForCheck())}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo),_e(Gi),_e(cl))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-geo-parts-by-driving-time-around-clinic-id"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo]),ft,Ot],decls:5,vars:1,consts:[["message","Keine Klinik ausgew\xE4hlt"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"click"],[1,"mat-body"],[3,"multiple"],[3,"administrativeDistrictIds"],[3,"postalCodes"]],template:function(i,o){i&1&&(qe(0,c6t,15,6)(1,d6t,1,0,"bd-message-empty",0),k(2,"div",1)(3,"button",2),ie("click",function(s){return o.edit(s)}),Q(4," Fahrzeit bearbeiten "),D()()),i&2&&Ke(o.value!=null&&o.value.coordinate?0:1)},dependencies:[cZ,tD,fM,n8,o8,gx,Tx,yo,Rl],encapsulation:2})}}return t})();var IVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"Bundesland",valid$:new pi(1),option:{sortFnc:(e,i)=>e.name.localeCompare(i.name),uniqueFnc:e=>e.id.toString(),searchOptionAccessor:e=>e.name}},this.options=ci(qw)}ngOnInit(){this.initial=this.plugin.toValue().map(e=>rg.byId(e))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onStatesChange(e){let i=e.map(o=>o.id);this.pluginChange.emit(new h_(i).clone())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-state-ids"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onStatesChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.initial)},dependencies:[_a],encapsulation:2})}}return t})();var EVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"Altersgruppe",option:{sortFnc:(e,i)=>e.ageGroupId-i.ageGroupId,uniqueFnc:e=>e.ageGroupId.toString(),searchOptionAccessor:e=>e.displayName},valid$:new pi(1)},this.initial=[],this.ageGroupOptions=ci(Object.keys(oQ).map(e=>({ageGroupId:parseInt(e,10),displayName:oQ[e]})))}ngOnInit(){this.initial=this.plugin.toValue().map(e=>({ageGroupId:e,displayName:oQ[e]}))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onAgeGroupsSelect(e){this.pluginChange.emit(new Ox([...e.map(i=>i.ageGroupId)]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-age-groups"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onAgeGroupsSelect(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.ageGroupOptions)("initialSelection",o.initial)},dependencies:[_a],encapsulation:2})}}return t})();var DVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.admissionCauseOptions=["E","Z","N","R","V","A","G","B"],this.config={selectLabel:"Aufnahmeanlass",option:{sortFnc:(e,i)=>this.sortFnc(e,i),uniqueFnc:e=>e.key,searchOptionAccessor:e=>this.searchOptionAccessor(e)},valid$:new pi(1)},this.initialSelection=[],this.selectOptions=ci(this.admissionCauseOptions.map(e=>this.withDescription(e))),this._selection=[]}ngOnInit(){this._selection=[...this.plugin.toValue()],this.config.valid$?.next({isValid:this.plugin.valid(),errorMessage:this.plugin.validationToText()}),this.initialSelection=this._selection.slice().map(e=>this.withDescription(e))}searchOptionAccessor(e){return e.description}sortFnc(e,i){return!!e&&!!i&&e.key.localeCompare(i.key)}onSelectionChange(e){if(!Ui.equals(this._selection,e.map(i=>i.key))){this._selection=e.map(o=>o.key);let i=new B2([...this._selection]);this.config.valid$?.next({isValid:i.valid(),errorMessage:i.validationToText()}),this.pluginChange.emit(i)}}withDescription(e){return{key:e,description:$Pe[e]}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-admission-cause"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onSelectionChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.selectOptions)("initialSelection",o.initialSelection)},dependencies:[_a],encapsulation:2,changeDetection:0})}}return t})();var AVe=(()=>{class t{constructor(e,i){this.ref=i,this.selection=[],e.data.plugin&&e.data.plugin.toValue().length>0&&(this.plugin=e.data.plugin.clone(),this.selection=e.data.plugin.toValue().map(o=>({type:"leaf",key:o}))),this.nodes=[this._createNode("01","Krankenhausbehandlung, vollstationa\u0308r"),this._createNode("02","Krankenhausbehandlung vollstationa\u0308r mit vorausgegangener vorstationa\u0308rer Behandlung"),this._createNode("03","Krankenhausbehandlung, teilstationa\u0308r"),this._createNode("04","Vorstationa\u0308re Behandlung ohne anschlie\xDFende vollstationa\u0308re Behandlung"),this._createNode("05","Stationa\u0308re Entbindung"),this._createNode("06","Geburt"),this._createNode("07","Wiederaufnahme wegen Komplikationen (Fallpauschale) nach KFPV 2003"),this._createNode("08","Stationa\u0308re Aufnahme zur Organentnahme"),this._createNode("10","Stationsa\u0308quivalente Behandlung"),this._createNode("12","Krankenhausbehandlung nach \xA7115f SGB V (Hybrid-DRG)")]}onSelectionChange(e){Array.isArray(e)?this.plugin=new VE(e.map(i=>i.key)):this.plugin=new VE([e.key])}_createNode(e,i){let o=Object.keys(lue).filter(d=>d.startsWith(e)).map(d=>({type:"leaf",key:d,label:lue[d]})),s=o.every(d=>this.selection.find(m=>m.key===d.key))?void 0:this.selection.map(d=>d.key).some(d=>d.startsWith(e));return{type:"node",key:e,label:i,children:o,partialSelected:s}}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:7,vars:4,consts:[["filterPlaceholder","Suche nach Aufnahmegrund",3,"selectionChange","value","selectionMode","selection","filter"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-raised-button","","color","accent",3,"click"]],template:function(i,o){i&1&&(k(0,"div")(1,"p-tree",0),ie("selectionChange",function(s){return o.onSelectionChange(s)}),D()(),k(2,"div",1)(3,"button",2),ie("click",function(){return o.ref.close()}),Q(4,"Abbrechen"),D(),k(5,"button",3),ie("click",function(){return o.ref.close(o.plugin)}),Q(6," \xDCbernehmen "),D()()),i&2&&(T(),E("value",o.nodes)("selectionMode","checkbox")("selection",o.selection)("filter",!0))},dependencies:[Cy,c_,yo],encapsulation:2})}}return t})();function u6t(t,n){if(t&1&&(k(0,"mat-hint"),Q(1),D()),t&2){let e=P();T(),dt(e.plugin==null?null:e.plugin.validationToText())}}var kVe=(()=>{class t{constructor(e){this._dialogService=e,this.pluginChange=new ve,this.displayValue=""}ngOnInit(){this.displayValue=this.plugin.toText()}openEditDialog(e){e.stopPropagation();let i=mt(be({},rc),{header:"Aufnahmegrund ausw\xE4hlen",data:{plugin:this.plugin}});this._dialogService.open(AVe,i).onClose.subscribe(o=>{o&&(this.plugin=o.clone(),this.displayValue=this.plugin.toText(),this.pluginValid=this.plugin.valid(),this.pluginChange.emit(o.clone()))})}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-admission-reason"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo])],decls:5,vars:4,consts:[["matInput","","placeholder","Aufnahmegrund","readonly","",3,"click","value"],["matSuffix",""]],template:function(i,o){i&1&&(k(0,"mat-form-field")(1,"input",0),ie("click",function(s){return o.openEditDialog(s)}),D(),k(2,"mat-icon",1),Q(3,"arrow_drop_down"),D(),qe(4,u6t,2,1,"mat-hint"),D()),i&2&&(Vn("custom-invalid",!o.pluginValid),T(),E("value",o.displayValue),T(3),Ke(o.pluginValid?-1:4))},dependencies:[rs,Fa,mr,mp,mu],encapsulation:2,changeDetection:0})}}return t})();function p6t(t,n){if(t&1&&(k(0,"mat-hint"),Q(1),D()),t&2){let e=P();T(),dt(e.plugin==null?null:e.plugin.validationToText())}}var MVe=(()=>{class t{constructor(){this.pluginValid=!0,this.pluginChange=new ve,this.form=new hu({minValue:new yr(null,[]),maxValue:new yr(null,[])})}ngOnInit(){this.plugin&&(this.pluginValid=this.plugin.valid(),this.form.patchValue({minValue:this.plugin.toValue().from,maxValue:this.plugin.toValue().to})),this.form.valueChanges.pipe(wn(()=>this.form.valid)).subscribe(e=>{let i=new nN(new V2(e.minValue,e.maxValue));this.pluginValid=i.valid(),this.pluginChange.emit(i)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-artificial-respiration-hours"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:16,vars:6,consts:[[3,"formGroup"],[1,"flex","flex-row","gap-2","items-center"],[1,"flex-grow","w-24"],["matInput","","formControlName","minValue","type","number"],[1,"w-12","text-center"],["matInput","","formControlName","maxValue","type","number"]],template:function(i,o){i&1&&(k(0,"form",0)(1,"div",1)(2,"div",2)(3,"mat-form-field")(4,"mat-label"),Q(5,"Min."),D(),ce(6,"input",3),qe(7,p6t,2,1,"mat-hint"),D()(),k(8,"div",4)(9,"span"),Q(10,"-"),D()(),k(11,"div",2)(12,"mat-form-field")(13,"mat-label"),Q(14,"Max."),D(),ce(15,"input",5),D()()()()),i&2&&(E("formGroup",o.form),T(3),Vn("custom-invalid",!o.pluginValid),T(4),Ke(o.pluginValid?-1:7),T(5),Vn("custom-invalid",!o.pluginValid))},dependencies:[xr,$m,Ml,Mw,no,Gm,zu,l0,Ra,rs,Ol,mu,pl,Fa],encapsulation:2})}}return t})();var OVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"Entgeltbereich",valid$:new pi(1),option:{sortFnc:(e,i)=>e.localeCompare(i),uniqueFnc:e=>e,searchOptionAccessor:e=>e.toString()}},this.chargeRealmOptions=ci(["DRG","HYB","PSY","PIA","BWD","BWH","BGD","BGH"]),this.initial=[]}ngOnInit(){this.plugin&&(this.initial=this.plugin.toValue())}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onValueChange(e){let i=new U2(e);this.plugin.equals(i)||(this.plugin=i.clone(),this.pluginChange.emit(i.clone()))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-charge-realm"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onValueChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.chargeRealmOptions)("initialSelection",o.initial)},dependencies:[_a],encapsulation:2})}}return t})();function h6t(t,n){t&1&&(k(0,"div",5)(1,"bd-flat-error"),Q(2,"Minimum ist gr\xF6\xDFer als Maximum !"),D()())}var RVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.form=new hu({fromCtrl:new yr(null,[Ys.min(0)]),toCtrl:new yr(null,[Ys.min(0)])},{validators:this._minimumShouldBeLessThenMaximumValidator}),this.form.valueChanges.pipe(wn(()=>this.form.valid)).subscribe(e=>{this.pluginChange.emit(new H2(e.fromCtrl,e.toCtrl))})}ngOnInit(){this.plugin&&(this.form.setErrors(this.pluginValid?{mismatch:!0}:null),this.form.patchValue({fromCtrl:this.plugin.toValue()?.from??null,toCtrl:this.plugin.toValue()?.to??null}))}_minimumShouldBeLessThenMaximumValidator(e){let i=e.get("fromCtrl").value,o=e.get("toCtrl").value;return i&&o?i<=o?null:{mismatch:!0}:null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-clinic-beds"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:13,vars:2,consts:[[3,"formGroup"],[1,"flex","flex-wrap","gap-2","items-center"],[1,"basis-40"],["matInput","","formControlName","fromCtrl","type","number"],["matInput","","formControlName","toCtrl","type","number"],[1,"basis-64"]],template:function(i,o){i&1&&(k(0,"form",0)(1,"div",1)(2,"div",2)(3,"mat-form-field")(4,"mat-label"),Q(5,"Min."),D(),ce(6,"input",3),D()(),k(7,"div",2)(8,"mat-form-field")(9,"mat-label"),Q(10,"Max."),D(),ce(11,"input",4),D()(),qe(12,h6t,3,0,"div",5),D()()),i&2&&(E("formGroup",o.form),T(12),Ke(o.form.hasError("mismatch")?12:-1))},dependencies:[A5,Ra,rs,Ol,pl,Fa,xr,$m,Ml,Mw,no,Gm,zu,l0],styles:[".mat-mdc-form-field-infix{width:100%}"]})}}return t})();var FVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.form=new hu({nrwServiceGroupCtrl:new yr(null,[Ys.required]),qualificationCtrl:new yr(!0,[Ys.required])}),this.options=ci(wd.filter(e=>e.isLeistungsgruppe())),this.config={selectLabel:"Leistungsgruppe",resetOption:!1,option:{uniqueFnc:e=>e.id,sortFnc:(e,i)=>parseFloat(e.id)-parseFloat(i.id),searchOptionAccessor:e=>e.name,searchOptionDisplayName:e=>`${e.id} - ${e.name}`}},this.form.valueChanges.pipe(wn(()=>this.form.valid)).subscribe(e=>{this.pluginChange.emit(new j2(e.nrwServiceGroupCtrl.id,e.qualificationCtrl))})}ngOnInit(){this.plugin&&this.plugin.toValue().nrwServiceGroupId&&this.form.patchValue({nrwServiceGroupCtrl:wd.find(e=>e.id===this.plugin.toValue().nrwServiceGroupId),qualificationCtrl:this.plugin.toValue().qualification})}onNrwServiceGroupSelection(e){this.form.patchValue({nrwServiceGroupCtrl:e})}onQualificationChange(e){this.form.patchValue({qualificationCtrl:e.checked})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-clinic-device-provision"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:7,vars:5,consts:[[3,"formGroup"],[1,"flex","flex-wrap","gap-2","items-center"],[1,"flex-grow","basis-64"],[3,"selection","selectOptions","config","initialSelection"],[1,"basis-64"],[3,"change","checked"]],template:function(i,o){i&1&&(k(0,"form",0)(1,"div",1)(2,"div",2)(3,"bd-ui-single-select",3),ie("selection",function(s){return o.onNrwServiceGroupSelection(s)}),D()(),k(4,"div",4)(5,"mat-checkbox",5),ie("change",function(s){return o.onQualificationChange(s)}),Q(6,"Qualifikation erf\xFCllt "),D()()()()),i&2&&(E("formGroup",o.form),T(3),E("selectOptions",o.options)("config",o.config)("initialSelection",o.form.controls.nrwServiceGroupCtrl.value),T(2),E("checked",o.form.controls.qualificationCtrl.value))},dependencies:[xr,$m,Gm,zu,jl,nf,hm],encapsulation:2})}}return t})();var PVe=(()=>{class t{constructor(e,i){this._clinicService=e,this._cdr=i,this.helpKey="ays_clinics_filter--clinic_level",this.helpLinkOptions={color:"accent",mode:"button"},this.pluginChange=new ve,this.clinicLevelOptions=[],this._clinicService.availableClinicLevels().pipe(Sn(1)).subscribe(o=>{this.clinicLevelOptions=Object.values(o.levels).map(r=>({id:r.id,displayName:r.displayName.de})),this.informationText=o.information.information.de,this.informationDate=o.information.date,this._cdr.markForCheck()})}ngOnInit(){this.plugin&&(this.clinicLevelIds=this.plugin.toValue().includes)}onClinicLevelIdsChange(e){Ui.equals(this.clinicLevelIds,e.value)||(this.plugin=new G2(e.value),this.pluginChange.emit(this.plugin.clone()))}static{this.\u0275fac=function(i){return new(i||t)(_e(cl),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-clinic-levels"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:17,vars:12,consts:[[1,"flex","flex-col","gap-2"],[1,"flex-1"],[1,"flex","flex-row","gap-2"],[1,"flex-1","mat-caption"],[1,"flex-none"],[3,"key","options"],["dataKey","id","optionLabel","displayName","optionValue","id","fluid","","variant","filled","inputId","clinic-levels-select","data-test","clinic-levels-select",3,"onChange","ngModel","options","filter"],["for","clinic-levels-select"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",1)(4,"div",0)(5,"span",3),Q(6),Xn(7,"date"),D(),k(8,"span",3),Q(9),D()()(),k(10,"div",4),ce(11,"bd-help-button",5),D()()(),k(12,"div",1)(13,"p-iftalabel")(14,"p-multiSelect",6),ie("onChange",function(s){return o.onClinicLevelIdsChange(s)}),D(),k(15,"label",7),Q(16),D()()()()),i&2&&(T(6),Qi("Informationsstand: ",Nr(7,10,o.informationDate)),T(3),dt(o.informationText),T(2),E("key",o.helpKey)("options",o.helpLinkOptions),T(3),Oe(o.pluginValid?"":"ng-invalid ng-dirty"),E("ngModel",o.clinicLevelIds)("options",o.clinicLevelOptions)("filter",!0),T(2),dt((o.plugin==null?null:o.plugin.validationToText())??"Versorgungslevel"))},dependencies:[af,as,Dx,hr,no,Lr,qf],encapsulation:2})}}return t})();var LVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.form=new hu({nrwServiceGroupCtrl:new yr(null,[Ys.required]),availabilityCtrl:new yr(!0,[Ys.required]),qualificationCtrl:new yr(!0,[Ys.required])}),this.options=ci(wd.filter(e=>e.isLeistungsgruppe())),this.config={selectLabel:"Leistungsgruppe",resetOption:!1,option:{uniqueFnc:e=>e.id,sortFnc:(e,i)=>parseFloat(e.id)-parseFloat(i.id),searchOptionAccessor:e=>e.name,searchOptionDisplayName:e=>`${e.id} - ${e.name}`}},this.form.valueChanges.pipe(wn(()=>this.form.valid)).subscribe(e=>{this.pluginChange.emit(new $2(e.nrwServiceGroupCtrl.id,e.qualificationCtrl,e.availabilityCtrl))})}ngOnInit(){this.plugin&&this.plugin.toValue().nrwServiceGroupId&&this.form.patchValue({nrwServiceGroupCtrl:wd.find(e=>e.id===this.plugin.toValue().nrwServiceGroupId),availabilityCtrl:this.plugin.toValue().availability,qualificationCtrl:this.plugin.toValue().qualification})}onNrwServiceGroupSelection(e){this.form.patchValue({nrwServiceGroupCtrl:e})}onAvailabilityChange(e){this.form.patchValue({availabilityCtrl:e.checked})}onQualificationChange(e){this.form.patchValue({qualificationCtrl:e.checked})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-clinic-physician-requirements"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:10,vars:6,consts:[[3,"formGroup"],[1,"flex","flex-wrap","gap-2","items-center"],[1,"flex-grow","basis-64"],[3,"selection","selectOptions","config","initialSelection"],[1,"basis-64"],[3,"change","checked"]],template:function(i,o){i&1&&(k(0,"form",0)(1,"div",1)(2,"div",2)(3,"bd-ui-single-select",3),ie("selection",function(s){return o.onNrwServiceGroupSelection(s)}),D()(),k(4,"div",4)(5,"mat-checkbox",5),ie("change",function(s){return o.onQualificationChange(s)}),Q(6,"Qualifikation erf\xFCllt "),D()(),k(7,"div",4)(8,"mat-checkbox",5),ie("change",function(s){return o.onAvailabilityChange(s)}),Q(9,"Verf\xFCgbarkeit erf\xFCllt "),D()()()()),i&2&&(E("formGroup",o.form),T(3),E("selectOptions",o.options)("config",o.config)("initialSelection",o.form.controls.nrwServiceGroupCtrl.value),T(2),E("checked",o.form.controls.qualificationCtrl.value),T(3),E("checked",o.form.controls.availabilityCtrl.value))},dependencies:[xr,$m,Gm,zu,jl,nf,hm],encapsulation:2})}}return t})();var NVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.excludes=[]}ngOnInit(){this.plugin&&(this.excludes=this.plugin.toValue().excludes)}onCheckboxChange(e){e.checked?this.excludes.push(99):this.excludes=this.excludes.filter(i=>i!==99),this.pluginChange.emit(new K2(this.excludes))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-clinic-sn"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:2,vars:1,consts:[[3,"change","checked"]],template:function(i,o){i&1&&(k(0,"mat-checkbox",0),ie("change",function(s){return o.onCheckboxChange(s)}),Q(1,"Gesamtberichte (99-Standorte) ausschlie\xDFen "),D()),i&2&&E("checked",o.excludes.includes(99))},dependencies:[nf,hm],encapsulation:2})}}return t})();var BVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.pluginConfig=mt(be({},TN),{resolveOnSelect:!0,codeTypeSpecification:!0,matchingSpecification:!0,codeTypeClassifications:{},includesExcludesSelection:!0,grouperVersionYear:!0}),this.resourceOptions=mt(be({},yU),{selectOnInit:"none",resetOption:!0})}ngOnChanges(e){if(e.plugin){let i=this.plugin.clone();this.codeSpectrumSelect={codingSystem:i.codingSystem,codeSpectrumIds:i.codeSpectrumIds,codeTypeSpecification:i.codeTypeSpecification,codeTypeClassification:i.codeTypeClassification,matching:i.matching,includes:i.includes,grouperVersionYear:i.grouperVersionYear}}}onCodeSpectrumSelect(e){let i=new pb(e.codeSpectrumIds,e.codingSystem,e.matching,e.codeTypeSpecification,e.codeTypeClassification,e.includes,e.grouperVersionYear);this.plugin.equals(i)||(this.plugin=i.clone(),this.pluginChange.emit(i.clone()))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-codes"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"codeSpectrumSelectChange","codeSpectrumSelect","options","optionsInlineSelect"]],template:function(i,o){i&1&&(k(0,"ays-code-spectrum-select-inline-multiple",0),ie("codeSpectrumSelectChange",function(s){return o.onCodeSpectrumSelect(s)}),D()),i&2&&E("codeSpectrumSelect",o.codeSpectrumSelect)("options",o.pluginConfig)("optionsInlineSelect",o.resourceOptions)},dependencies:[xNe],encapsulation:2})}}return t})();var VVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"Entlassgr\xFCnde",valid$:new pi(1),option:{sortFnc:(e,i)=>e.dismissionCause.localeCompare(i.dismissionCause),uniqueFnc:e=>e.dismissionCause,searchOptionAccessor:e=>e.displayName}},this.dismissionCauseOptions=ci(Object.keys(rQ).map(e=>({dismissionCause:e,displayName:rQ[e]}))),this.initial=[]}ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({dismissionCause:e,displayName:rQ[e]}))??[]}setDismissionCauses(e){this.pluginChange.emit(new Q2([...e.map(i=>i.dismissionCause)]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-dismission-cause"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.setDismissionCauses(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.dismissionCauseOptions)("initialSelection",o.initial)},dependencies:[_a],encapsulation:2})}}return t})();function m6t(t,n){if(t&1&&(k(0,"div",3)(1,"div",4)(2,"span",5),Q(3),D()(),k(4,"div",6)(5,"span",7),Q(6),D()()()),t&2){let e=n.$implicit;T(3),dt(e.name),T(3),dt(e.description)}}var zVe=(()=>{class t extends dr{constructor(e,i){super(),this._cdr=e,this._codeService=i,this.pluginChange=new ve,this.overlayOptions={mode:"overlay",appendTo:"body"},this.placeholderText="DRG-Ziffer",this.selectionCtrl=new yr(void 0),this.suggestions=[],this._subs.push(this.selectionCtrl.valueChanges.pipe(wn(o=>typeof o=="object"||o===null||o===void 0)).subscribe(o=>this.pluginChange.emit(new hS(o?[o.clone()]:[]))))}ngOnChanges(e){if(e.plugin)if(this.plugin){let i=this.plugin.toValue();i.length===1?this.selectionCtrl.setValue(i[0].clone()):this.selectionCtrl.reset(),this._cdr.markForCheck()}else this.onRemoveSelection()}ngOnDestroy(){this.unsubscribeAll()}onRemoveSelection(){this.selectionCtrl.reset(),this.suggestions=[],this._cdr.markForCheck()}searchCode(e){this._codeService.find("G-DRG",e.query).subscribe(i=>{this.suggestions=i,this._cdr.markForCheck()})}onClear(){this.onRemoveSelection(),this.pluginChange.emit(new hS([]))}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e($u))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-drg-code"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[ft,Ot],decls:6,vars:7,consts:[["item",""],["inputId","filter-condition-form-drg-code","optionLabel","name","fluid","","variant","filled",3,"completeMethod","onClear","formControl","suggestions","showClear","overlayOptions"],["for","filter-condition-form-drg-code"],[1,"flex","flex-row","gap-4"],[1,"basis-14"],[1,"mat-body-2"],[1,"flex-1"],[1,"mat-caption"]],template:function(i,o){if(i&1){let r=tt();k(0,"p-iftalabel")(1,"p-autoComplete",1),ie("completeMethod",function(d){return se(r),ae(o.searchCode(d))})("onClear",function(){return se(r),ae(o.onClear())}),ee(2,m6t,7,2,"ng-template",null,0,Pt),D(),k(4,"label",2),Q(5),D()()}i&2&&(T(),Oe(o.pluginValid?"":"ng-invalid ng-dirty"),E("formControl",o.selectionCtrl)("suggestions",o.suggestions)("showClear",!0)("overlayOptions",o.overlayOptions),T(4),dt(o.placeholderText))},dependencies:[Th,as,xr,no,zl],encapsulation:2,changeDetection:0})}}return t})();var UVe=(()=>{class t{constructor(e,i){this._cdr=e,this._codeService=i,this.pluginChange=new ve,this.config={emitEventOnInitialSelection:!1,selectLabel:"DRG-Kapitel",option:{sortFnc:(o,r)=>this.sortFnc(o,r),uniqueFnc:o=>o.name,searchOptionAccessor:o=>this.searchOptionAccessor(o),searchOptionDisplayName:o=>`${o.name} - ${o.description}`},valid$:new pi(1)},this.selectOptions=vc,this.selection=[],this.selectOptions=this._codeService.treeChildren("G-DRG").pipe(vt(o=>o.map(r=>r.data)))}ngOnChanges(e){e.plugin&&this._onPluginChanged(),e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onOptionsChange(e){let i=[];e.forEach(r=>{this.selection.indexOf(r.name)>-1&&i.push(r)}),this.initialSelection=i,Ui.equals(this.selection,i.map(r=>r.name))||this.onSelectionChange(i)}onSelectionChange(e){Ui.equals(this.selection,e.map(i=>i.name))||(this.selection=[...e.map(i=>i.name)],this.pluginChange.emit(new UE([...e])),this.initialSelection=void 0)}searchOptionAccessor(e){return`${e.name} ${e.description}`}sortFnc(e,i){return!e||!i?e?-1:1:e.name.localeCompare(i.name)}_onPluginChanged(){this.selection=[...this.plugin.toValue().map(e=>e.name)],this.selectOptions.subscribe(e=>{this.onOptionsChange(e),this._cdr.markForCheck()})}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e($u))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-drg-mdc"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onSelectionChange(s)})("optionsChange",function(s){return o.onOptionsChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.selectOptions)("initialSelection",o.initialSelection)},dependencies:[_a],encapsulation:2,changeDetection:0})}}return t})();var HVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"DRG vorhanden",valid$:new pi(1),option:{sortFnc:(e,i)=>e.displayName.localeCompare(i.displayName),uniqueFnc:e=>e.displayName,searchOptionAccessor:e=>e.displayName}},this.options=ci([{bool:!0,displayName:"Ja"},{bool:!1,displayName:"Nein"}])}ngOnInit(){this.plugin&&(this.initial={bool:this.plugin.toValue(),displayName:this.plugin.toValue()?"Ja":"Nein"})}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onValueChange(e){let i=new Z2(e.bool);this.plugin.equals(i)||(this.plugin=i.clone(),this.pluginChange.emit(i.clone()))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-drg-code-exists"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-single-select",0),ie("selection",function(s){return o.onValueChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.initial)},dependencies:[jl],encapsulation:2})}}return t})();var jVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"Erreichbarkeit innerhalb Fahrzeit",valid$:new pi(1),option:{sortFnc:(e,i)=>e.value.max-i.value.max,uniqueFnc:e=>e.value.max?.toString(),searchOptionAccessor:e=>e.displayName}},this.options=ci([0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240].map(e=>{let i=e+10;return{displayName:`${e} - ${i} Minuten`,value:{min:e,max:i}}}))}ngOnInit(){this.plugin&&(this.inital=this.plugin.toValue().map(e=>({value:e,displayName:`${e.min} - ${e.max} Minuten`})))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onSelectionChanged(e){this.plugin=new dN([...e.map(i=>i.value)]),this.pluginChange.emit(this.plugin.clone())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-driving-time"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onSelectionChanged(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.inital)},dependencies:[_a],encapsulation:2})}}return t})();function f6t(t,n){t&1&&(k(0,"div",5)(1,"bd-flat-error"),Q(2,"Minimum ist gr\xF6\xDFer als Maximum !"),D()())}var GVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.form=new hu({fromCtrl:new yr(null,[Ys.min(0)]),toCtrl:new yr(null,[Ys.min(0)])},{validators:this._minimumShouldBeLessThenMaximumValidator}),this.form.valueChanges.pipe(wn(e=>this.form.valid)).subscribe(e=>{this.pluginChange.emit(new X2(e.fromCtrl,e.toCtrl))})}ngOnInit(){this.plugin&&this.form.patchValue({fromCtrl:this.plugin.toValue()?.from??null,toCtrl:this.plugin.toValue()?.to??null})}_minimumShouldBeLessThenMaximumValidator(e){let i=e.get("fromCtrl").value,o=e.get("toCtrl").value;return i&&o?i<=o?null:{mismatch:!0}:null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-fully-inpatient-cases"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:13,vars:2,consts:[[3,"formGroup"],[1,"flex","flex-wrap","gap-2","items-center"],[1,"basis-40"],["matInput","","formControlName","fromCtrl","type","number"],["matInput","","formControlName","toCtrl","type","number"],[1,"basis-64"]],template:function(i,o){i&1&&(k(0,"form",0)(1,"div",1)(2,"div",2)(3,"mat-form-field")(4,"mat-label"),Q(5,"Min."),D(),ce(6,"input",3),D()(),k(7,"div",2)(8,"mat-form-field")(9,"mat-label"),Q(10,"Max."),D(),ce(11,"input",4),D()(),qe(12,f6t,3,0,"div",5),D()()),i&2&&(E("formGroup",o.form),T(12),Ke(o.form.hasError("mismatch")?12:-1))},dependencies:[pl,Fa,rs,Ol,xr,$m,Ml,Mw,no,Gm,zu,l0,A5],styles:[".mat-mdc-form-field-infix{width:100%}"]})}}return t})();var $Ve=(()=>{class t{constructor(){this.pluginChange=new ve,this.config=mt(be({},qL),{resourceNameTitle:"Benchmarking Gruppen"}),this.resourceSelects=[],this.resourceName=ko.VIRTUAL_CLINIC_BENCHMARKING_GROUP,this.virtualBenchmarkingGroupIds=[]}ngOnInit(){this.resourceSelects=[...this.plugin.toValue().map(e=>({id:e}))]}onVirtualClinicBenchmarkingGroup(e){Ui.equals(this.virtualBenchmarkingGroupIds,e.map(i=>i.id))||(this.virtualBenchmarkingGroupIds=e.map(i=>i.id),this.pluginChange.emit(new lM([...this.virtualBenchmarkingGroupIds])))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-virtual-benchmarking-group"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:1,vars:3,consts:[[3,"resourceSelectChange","resourceSelects","resourceName","config"]],template:function(i,o){i&1&&(k(0,"bd-resources-select-inline-multiple",0),ie("resourceSelectChange",function(s){return o.onVirtualClinicBenchmarkingGroup(s)}),D()),i&2&&E("resourceSelects",o.resourceSelects)("resourceName",o.resourceName)("config",o.config)},dependencies:[dS],encapsulation:2})}}return t})();var qVe=(()=>{class t{constructor(e){this._virtualClinicService=e,this.pluginChange=new ve,this.config={emitEventOnInitialSelection:!1,selectLabel:"Fachabteilung",option:{sortFnc:(i,o)=>this.sortFnc(i,o),uniqueFnc:i=>i.id,searchOptionAccessor:i=>this.searchOptionAccessor(i)},valid$:new pi(1)},this.selectOptions=vc,this.selection=[]}ngOnChanges(e){if(e.plugin&&this._onSpecialtyDepartmentsChanged(),e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid}),e.virtualClinicId){let i=!e.virtualClinicId.firstChange&&vo.equals(e.virtualClinicId.currentValue,e.virtualClinicId.currentValue);this._onVirtualClinicIdChanged(i)}}onOptionsChange(e){let i=[];e.forEach(r=>{this.selection.indexOf(r.id)>-1&&i.push(r)}),this.initialSelection=i,Ui.equals(this.selection,i.map(r=>r.id))||this.onSelectionChange(i)}onSelectionChange(e){if(!Ui.equals(this.selection,e.map(i=>i.id))){this.selection=[...e.map(o=>o.id)];let i=new sM([...e.map(o=>o.id)]);this.config.valid$.next({isValid:i.valid(),errorMessage:i.validationToText()}),this.pluginChange.emit(i),this.initialSelection=void 0}}searchOptionAccessor(e){return e.name}sortFnc(e,i){return e.fabKey.localeCompare(i.fabKey)}fetchOptions(){return nr(this._virtualClinicService.getSpecialtyDepartments(this.virtualClinicId))}_onVirtualClinicIdChanged(e=!1){this.selectOptions=this.fetchOptions(),e&&this.onSelectionChange([])}_onSpecialtyDepartmentsChanged(){this.selection=[...this.plugin.toValue()],this.selectOptions.subscribe(e=>{this.onOptionsChange(e)})}static{this.\u0275fac=function(i){return new(i||t)(_e(hf))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-specialty-department"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",virtualClinicId:"virtualClinicId"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onSelectionChange(s)})("optionsChange",function(s){return o.onOptionsChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.selectOptions)("initialSelection",o.initialSelection)},dependencies:[_a],encapsulation:2,changeDetection:0})}}return t})();function g6t(t,n){if(t&1&&(k(0,"div",3)(1,"div",4)(2,"span",5),Q(3),D()(),k(4,"div",6)(5,"span",7),Q(6),D()()()),t&2){let e=n.$implicit;T(3),dt(e.name),T(3),dt(e.description)}}var KVe=(()=>{class t{constructor(e,i){this._cdr=e,this._codeService=i,this.pluginChange=new ve,this.overlayOptions={mode:"overlay",appendTo:"body"},this.placeholderText="OPS 3-Steller Ziffer",this.selectionCtrl=new yr(void 0),this.suggestions=[],this.selectionCtrl.valueChanges.pipe(wn(o=>typeof o=="object"||o===null||o===void 0)).subscribe(o=>this.pluginChange.emit(new gS(o?[o.clone()]:[])))}ngOnChanges(e){if(e.plugin)if(this.plugin){let i=this.plugin.toValue();i.length===1?this.selectionCtrl.setValue(i[0].clone()):this.selectionCtrl.reset(),this._cdr.markForCheck()}else this.onRemoveSelection()}onRemoveSelection(){this.selectionCtrl.reset(),this.suggestions=[],this._cdr.markForCheck()}searchCode(e){this._codeService.find("OPS",e.query,3).subscribe(i=>{this.suggestions=i,this._cdr.markForCheck()})}onClear(){this.onRemoveSelection(),this.pluginChange.emit(new gS([]))}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e($u))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-ops-code-three-digits"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:6,vars:7,consts:[["item",""],["inputId","filter-condition-form-ops-code-three-digits","optionLabel","name","fluid","","variant","filled",3,"completeMethod","onClear","formControl","suggestions","showClear","overlayOptions"],["for","filter-condition-form-ops-code-three-digits"],[1,"flex","flex-row","gap-4"],[1,"basis-14"],[1,"mat-body-2"],[1,"flex-1"],[1,"mat-caption"]],template:function(i,o){if(i&1){let r=tt();k(0,"p-iftalabel")(1,"p-autoComplete",1),ie("completeMethod",function(d){return se(r),ae(o.searchCode(d))})("onClear",function(){return se(r),ae(o.onClear())}),ee(2,g6t,7,2,"ng-template",null,0,Pt),D(),k(4,"label",2),Q(5),D()()}i&2&&(T(),Oe(o.pluginValid?"":"ng-invalid ng-dirty"),E("formControl",o.selectionCtrl)("suggestions",o.suggestions)("showClear",!0)("overlayOptions",o.overlayOptions),T(4),dt(o.placeholderText))},dependencies:[xr,no,zl,Th,as],encapsulation:2,changeDetection:0})}}return t})();var WVe=(()=>{class t{constructor(e,i){this._cdr=e,this._codeService=i,this.pluginChange=new ve,this.config={emitEventOnInitialSelection:!1,selectLabel:"OPS-Gruppe",optionGroup:{sortFnc:(o,r)=>o.code.name.localeCompare(r.code.name),uniqueFnc:o=>o.code.name,searchOptionAccessor:o=>o.code.name},option:{sortFnc:(o,r)=>this.sortFnc(o,r),uniqueFnc:o=>o.name,searchOptionAccessor:o=>this.searchOptionAccessor(o),searchOptionDisplayName:o=>`${o.name} - ${o.description}`},valid$:new pi(1)},this.selectOptions=vc,this.selection=[],this.selectOptions=this._codeService.treeChildren("OPS").pipe(Mn(o=>tc(o.map(r=>this._codeService.treeChildren(r.data.codingSystem,r.data.name).pipe(vt(s=>({code:r.data,options:s.map(m=>g0.fromObject(m.data))})))))))}ngOnChanges(e){e.plugin&&this._onPluginChanged(),e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onOptionsChange(e){let i=[];e.forEach(r=>{r.options.forEach(s=>{this.selection.indexOf(s.name)>-1&&i.push(s)})}),this.initialSelection=i,Ui.equals(this.selection,i.map(r=>r.name))||this.onSelectionChange(i)}onSelectionChange(e){Ui.equals(this.selection,e.map(i=>i.name))||(this.selection=[...e.map(i=>i.name)],this.pluginChange.emit(new KE([...e])),this.initialSelection=void 0)}searchOptionAccessor(e){return`${e.name} ${e.description}`}sortFnc(e,i){return e.name.localeCompare(i.name)}_onPluginChanged(){this.selection=[...this.plugin.toValue().map(e=>e.name)],this.selectOptions.subscribe(e=>{this.onOptionsChange(e),this._cdr.markForCheck()})}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e($u))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-ops-code-group"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select-option-group",0),ie("selection",function(s){return o.onSelectionChange(s)})("optionsChange",function(s){return o.onOptionsChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.selectOptions)("initialSelection",o.initialSelection)},dependencies:[HY],encapsulation:2,changeDetection:0})}}return t})();function _6t(t,n){if(t&1&&(k(0,"div",3)(1,"div",4)(2,"span",5),Q(3),D()(),k(4,"div",6)(5,"span",7),Q(6),D()()()),t&2){let e=n.$implicit;T(3),dt(e.name),T(3),dt(e.description)}}var YVe=(()=>{class t extends dr{constructor(e,i){super(),this._cdr=e,this._codeService=i,this.pluginChange=new ve,this.overlayOptions={mode:"overlay",appendTo:"body"},this.placeholderText="OPS 4-Steller Ziffer",this.selectionCtrl=new yr(void 0),this.suggestions=[],this.selectionCtrl.valueChanges.pipe(wn(o=>typeof o=="object"||o===null||o===void 0)).subscribe(o=>this.pluginChange.emit(new fS(o?[o.clone()]:[])))}ngOnChanges(e){if(e.plugin)if(this.plugin){let i=this.plugin.toValue();i.length===1?this.selectionCtrl.setValue(i[0].clone()):this.selectionCtrl.reset(),this._cdr.markForCheck()}else this.onRemoveSelection()}ngOnDestroy(){this.unsubscribeAll()}onRemoveSelection(){this.selectionCtrl.reset(),this.suggestions=[],this._cdr.markForCheck()}searchCode(e){this._codeService.find("OPS",e.query,4).subscribe(i=>{this.suggestions=i,this._cdr.markForCheck()})}onClear(){this.onRemoveSelection(),this.pluginChange.emit(new fS([]))}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e($u))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-ops-code-four-digits"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[ft,Ot],decls:6,vars:7,consts:[["item",""],["inputId","filter-condition-form-ops-code-four-digits","optionLabel","name","fluid","","variant","filled",3,"completeMethod","onClear","formControl","suggestions","showClear","overlayOptions"],["for","filter-condition-form-ops-code-four-digits"],[1,"flex","flex-row","gap-4"],[1,"basis-14"],[1,"mat-body-2"],[1,"flex-1"],[1,"mat-caption"]],template:function(i,o){if(i&1){let r=tt();k(0,"p-iftalabel")(1,"p-autoComplete",1),ie("completeMethod",function(d){return se(r),ae(o.searchCode(d))})("onClear",function(){return se(r),ae(o.onClear())}),ee(2,_6t,7,2,"ng-template",null,0,Pt),D(),k(4,"label",2),Q(5),D()()}i&2&&(T(),Oe(o.pluginValid?"":"ng-invalid ng-dirty"),E("formControl",o.selectionCtrl)("suggestions",o.suggestions)("showClear",!0)("overlayOptions",o.overlayOptions),T(4),dt(o.placeholderText))},dependencies:[xr,no,zl,Th,as],encapsulation:2,changeDetection:0})}}return t})();var QVe=(()=>{class t{constructor(e,i){this._cdr=e,this._codeService=i,this.pluginChange=new ve,this.config={emitEventOnInitialSelection:!1,selectLabel:"OPS-Kapitel",option:{sortFnc:(o,r)=>this.sortFnc(o,r),uniqueFnc:o=>o.name,searchOptionAccessor:o=>this.searchOptionAccessor(o),searchOptionDisplayName:o=>`${o.name} - ${o.description}`},valid$:new pi(1)},this.selectOptions=vc,this.selection=[],this.selectOptions=this._codeService.treeChildren("OPS").pipe(vt(o=>o.map(r=>r.data)))}ngOnChanges(e){e.plugin&&this._onPluginChanged(),e.pluginValid&&this.config.valid$?.next({isValid:this.pluginValid})}onOptionsChange(e){let i=[];e.forEach(r=>{this.selection.indexOf(r.name)>-1&&i.push(r)}),this.initialSelection=i,Ui.equals(this.selection,i.map(r=>r.name))||this.onSelectionChange(i)}onSelectionChange(e){Ui.equals(this.selection,e.map(i=>i.name))||(this.selection=[...e.map(i=>i.name)],this.pluginChange.emit(new qE([...e])),this.initialSelection=void 0)}searchOptionAccessor(e){return`${e.name} ${e.description}`}sortFnc(e,i){return e.name.localeCompare(i.name)}_onPluginChanged(){this.selection=[...this.plugin.toValue().map(e=>e.name)],this.selectOptions.subscribe(e=>{this.onOptionsChange(e),this._cdr.markForCheck()})}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e($u))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-ops-code-chapter"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onSelectionChange(s)})("optionsChange",function(s){return o.onOptionsChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.selectOptions)("initialSelection",o.initialSelection)},dependencies:[_a],encapsulation:2,changeDetection:0})}}return t})();var wZ=(()=>{class t{constructor(e,i){this.config=e,this.ref=i,this.selection=[],this.nodes=[],this.treeSelection=[],this.selection=e.data.selection||[],this._initNodes()}onSelection(e){Array.isArray(e)?(this.treeSelection=e,this.selection=e.map(i=>i.data)):(this.treeSelection=[e],this.selection=[e.data])}selectAll(){this.selection=this.config.data.selectAll(),this._initNodes()}clear(){this.selection=[],this._initNodes()}_initNodes(){this.treeSelection=this.selection.map(e=>new tN(e,sQ[e])).map(e=>({type:e.isLeistungsbereich()?"nrwServiceArea":"nrwServiceGroup",key:e.id,label:`${e.id} ${e.name}`,data:e.id})),this.nodes=wd.filter(e=>e.isLeistungsbereich()).map(e=>{let i=e.children(),o=!1;return this.selection.length>0&&(o=this.selection.map(r=>new tN(r,sQ[r])).filter(r=>r.isLeistungsgruppe()).some(r=>r.parent()?.id===e.id)),{type:"nrwServiceArea",key:e.id,data:e.id,label:`${e.id} ${e.name}`,leaf:!this.config.data.nrwServiceGroupSelectable&&i.length>0,selectable:this.config.data.nrwServiceAreaSelectable,partialSelected:o,children:this.config.data.nrwServiceGroupSelectable?i.map(r=>({type:"nrwServiceGroup",key:r.id,data:r.id,label:`${r.id} ${r.name}`,leaf:!0,selectable:this.config.data.nrwServiceGroupSelectable})):void 0}})}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:14,vars:4,consts:[[1,"flex","flex-row","gap-6"],["mat-button","","color","accent",3,"click"],["selectionMode","checkbox",3,"selectionChange","value","selection","propagateSelectionUp"],[1,"flex","flex-row","justify-end","gap-4","w-full"],["mat-button","",3,"click"],["mat-button","","color","accent",3,"click","disabled"]],template:function(i,o){i&1&&(k(0,"div")(1,"div",0)(2,"div")(3,"button",1),ie("click",function(){return o.selectAll()}),Q(4," Alle ausw\xE4hlen "),D()(),k(5,"div")(6,"button",1),ie("click",function(){return o.clear()}),Q(7," Alle abw\xE4hlen "),D()()(),k(8,"p-tree",2),ie("selectionChange",function(s){return o.onSelection(s)}),D()(),k(9,"div",3)(10,"button",4),ie("click",function(){return o.ref.close()}),Q(11,"Abbrechen"),D(),k(12,"button",5),ie("click",function(){return o.ref.close(o.selection)}),Q(13," \xDCbernehmen "),D()()),i&2&&(T(8),E("value",o.nodes)("selection",o.treeSelection)("propagateSelectionUp",!0),T(4),E("disabled",!o.selection))},dependencies:[Tn,yo,Cy,c_],encapsulation:2,changeDetection:0})}}return t})();function y6t(t,n){if(t&1&&(k(0,"mat-hint"),Q(1),D()),t&2){let e=P();T(),dt(e.plugin==null?null:e.plugin.validationToText())}}var ZVe=(()=>{class t{constructor(e,i){this._dialog=e,this._cdr=i,this.pluginChange=new ve,this.displayValue="",this.nrwServiceGroupIds=[]}ngOnInit(){this.plugin&&(this.nrwServiceGroupIds=JSON.parse(JSON.stringify(this.plugin.toValue())),this._updateDisplayValue(JSON.parse(JSON.stringify(this.plugin.toValue()))))}openEditDialog(e){e.stopPropagation();let i=mt(be({},rc),{header:"NRW Leistungsgruppen",data:{selection:[...this.nrwServiceGroupIds],nrwServiceAreaSelectable:!1,nrwServiceGroupSelectable:!0,selectAll:()=>wd.filter(o=>o.isLeistungsgruppe()).map(o=>o.id)}});this._dialog.open(wZ,i).onClose.pipe(wn(o=>!!o)).subscribe(o=>{o=o.map(r=>wd.find(s=>s.id===r)).filter(r=>r.isLeistungsgruppe()).map(r=>r.id),this._updateDisplayValue(o),this._sendChange(o)})}_updateDisplayValue(e){if(e.length===0){this.displayValue="";return}if(e.length===wd.filter(o=>o.isLeistungsgruppe()).length){this.displayValue="Alle NRW Leistungsgruppen";return}let i=wd.find(o=>o.id===e[0]);e.length>1?this.displayValue=`${this._fullNrwServiceGroupName(i)} + ${e.length-1} weitere`:this.displayValue=this._fullNrwServiceGroupName(i),this._cdr.markForCheck()}_fullNrwServiceGroupName(e){return`${e.id} ${e.name}`}_sendChange(e){Ui.equals(this.nrwServiceGroupIds,e)||(this.nrwServiceGroupIds=JSON.parse(JSON.stringify([...e])),this.pluginChange.emit(new oM([...e])))}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-nrw-service-group"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo])],decls:5,vars:5,consts:[["matInput","","placeholder","NRW Leistungsgruppen",3,"click","value","readonly"],["matSuffix",""]],template:function(i,o){i&1&&(k(0,"mat-form-field")(1,"input",0),ie("click",function(s){return o.openEditDialog(s)}),D(),k(2,"mat-icon",1),Q(3,"arrow_drop_down"),D(),qe(4,y6t,2,1,"mat-hint"),D()),i&2&&(Vn("custom-invalid",!o.pluginValid),T(),E("value",o.displayValue)("readonly",!0),T(3),Ke(o.pluginValid?-1:4))},dependencies:[Ra,rs,mu,mp,pl,Fa,$o,mr],encapsulation:2,changeDetection:0})}}return t})();function v6t(t,n){if(t&1&&(k(0,"mat-hint"),Q(1),D()),t&2){let e=P();T(),dt(e.plugin==null?null:e.plugin.validationToText())}}var XVe=(()=>{class t{constructor(e,i){this._dialogService=e,this._cdr=i,this.pluginChange=new ve,this.displayValue="",this.nrwServiceGroupIds=[]}ngOnInit(){this.plugin&&(this.nrwServiceGroupIds=JSON.parse(JSON.stringify(this.plugin.toValue())),this._updateDisplayValue(JSON.parse(JSON.stringify(this.plugin.toValue()))))}openEditDialog(e){e.stopPropagation();let i=mt(be({},rc),{header:"NRW Leistungsbereiche",data:{selection:[...this.nrwServiceGroupIds],nrwServiceAreaSelectable:!0,nrwServiceGroupSelectable:!1,selectAll:()=>wd.filter(o=>o.isLeistungsbereich()).map(o=>o.id)}});this._dialogService.open(wZ,i).onClose.pipe(wn(o=>!!o)).subscribe(o=>{this._updateDisplayValue(o),this._sendChange(o)})}_updateDisplayValue(e){if(e.length===0){this.displayValue="";return}if(e.length===wd.filter(o=>o.isLeistungsbereich()).length){this.displayValue="Alle NRW Leistungsbereiche";return}let i=wd.find(o=>o.id===e[0]);e.length>1?this.displayValue=`${this._fullNrwServiceGroupName(i)} + ${e.length-1} weitere`:this.displayValue=this._fullNrwServiceGroupName(i),this._cdr.markForCheck()}_fullNrwServiceGroupName(e){return`${e.id} ${e.name}`}_sendChange(e){Ui.equals(this.nrwServiceGroupIds,e)||(this.nrwServiceGroupIds=JSON.parse(JSON.stringify([...e])),this.pluginChange.emit(new pU([...e])))}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-nrw-service-area"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo])],decls:5,vars:5,consts:[["matInput","","placeholder","NRW Leistungsbereiche",3,"click","value","readonly"],["matSuffix",""]],template:function(i,o){i&1&&(k(0,"mat-form-field")(1,"input",0),ie("click",function(s){return o.openEditDialog(s)}),D(),k(2,"mat-icon",1),Q(3,"arrow_drop_down"),D(),qe(4,v6t,2,1,"mat-hint"),D()),i&2&&(Vn("custom-invalid",!o.pluginValid),T(),E("value",o.displayValue)("readonly",!0),T(3),Ke(o.pluginValid?-1:4))},dependencies:[$o,mr,pl,Fa,rs,mu,mp],encapsulation:2})}}return t})();var JVe=(()=>{class t{constructor(){this.pluginChange=new ve,this.config=fZ,this.resourceName=ko.MARKET,this.marketSelects=[]}ngOnInit(){this.plugin&&(this.marketSelects=this.plugin.toValue().map(e=>({id:e})))}onMarketsSelectionChange(e){Ui.equals(this.marketSelects.map(i=>i.id),e.map(i=>i.id))||this.pluginChange.emit(new dU(e.map(i=>i.id)))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-market-id"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:1,vars:3,consts:[[3,"resourceSelectChange","resourceName","resourceSelects","config"]],template:function(i,o){i&1&&(k(0,"bd-resources-select-inline-multiple",0),ie("resourceSelectChange",function(s){return o.onMarketsSelectionChange(s)}),D()),i&2&&E("resourceName",o.resourceName)("resourceSelects",o.marketSelects)("config",o.config)},dependencies:[dS],encapsulation:2})}}return t})();var e4e=(()=>{class t{constructor(){this.pluginChange=new ve,this.resourceName=ko.MARKET,this.config=fZ,this.marketSelects=[]}ngOnInit(){this.plugin&&(this.marketSelects=this.plugin.toValue().map(e=>({id:e})))}onMarketsSelectionChange(e){this.pluginChange.emit(new bN(e.map(i=>i.id)))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-market-content"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:1,vars:3,consts:[[3,"resourceSelectChange","resourceSelects","resourceName","config"]],template:function(i,o){i&1&&(k(0,"bd-resources-select-inline-multiple",0),ie("resourceSelectChange",function(s){return o.onMarketsSelectionChange(s)}),D()),i&2&&E("resourceSelects",o.marketSelects)("resourceName",o.resourceName)("config",o.config)},dependencies:[dS],encapsulation:2})}}return t})();var t4e=(()=>{class t{constructor(e,i,o,r,s,d){this.ref=e,this._config=i,this._marketService=o,this._administrativeDistrictService=r,this._postalCodeService=s,this._cdr=d,this.loading=!1,this.loading$=new pi(1),this.nodes=[],this.treeSelection=[],this._markets=[],this._transformNodes={},this._allAdministrativeDistricts={},this._allPostalCodes={},this.loading$.subscribe(m=>this.loading=m===Gt.LOADING),this.loading$.next(Gt.LOADING),this._initialSelection(),tc(i.data.availableMarketIds.map(m=>this._marketService.findById(m))).pipe(q_(new Array),Vo(m=>this._markets=m),Mn(m=>this._marketService.transform(m.map(v=>v.id),[{value:"stateId"},{value:"administrativeDistrictId"},{value:"postalCode"}])),Vo(m=>this._transformNodes=m),Mn(m=>{let w=Object.values(m).flat().map(N=>N.children??[]).flat(),O=w.flat().map(N=>N.children??[]).flat();return tc([this._administrativeDistrictService.findAll(Ui.unique(w.map(N=>N.label).map(N=>Yo.create(N)),N=>N.value)),this._postalCodeService.findAll(Ui.unique(O.map(N=>N.label),N=>N),"DETAIL")])})).subscribe(m=>{this._allAdministrativeDistricts=m[0],this._allPostalCodes=m[1],this.nodes=Object.keys(this._transformNodes).map(v=>{let w=this._markets.find(N=>N.id===v),O=this._createStateNodes(this._transformNodes[v]);return{type:"market",key:w.id,label:`Markt "${w.name}"`,selectable:!0,children:O,leaf:!!O}}),this.loading$.next(Gt.SUCCESS),this._cdr.markForCheck()})}onSelectionChange(e){Array.isArray(e)?this.treeSelection=e:this.treeSelection=[e]}onSubmit(){let e=this.treeSelection.map(i=>this._nodeToResult(i)).reduce((i,o)=>({marketIds:[...i.marketIds,...o.marketIds],stateIds:[...i.stateIds,...o.stateIds],administrativeDistrictIds:[...i.administrativeDistrictIds,...o.administrativeDistrictIds],postalCodes:[...i.postalCodes,...o.postalCodes]}),{marketIds:[],stateIds:[],administrativeDistrictIds:[],postalCodes:[]});this.ref.close(e)}_nodeToResult(e){let i={marketIds:[],stateIds:[],administrativeDistrictIds:[],postalCodes:[]};switch(e.type){case"market":{i.marketIds.push(e.key);break}case"state":{i.stateIds.push(parseInt(e.key,10));break}case"administrativeDistrict":{i.administrativeDistrictIds.push(Yo.create(e.key));break}case"postalCode":{i.postalCodes.push(e.key);break}}if(e.children){let o=e.children.map(r=>this._nodeToResult(r)).reduce((r,s)=>({marketIds:[...r.marketIds,...s.marketIds],stateIds:[...r.stateIds,...s.stateIds],administrativeDistrictIds:[...r.administrativeDistrictIds,...s.administrativeDistrictIds],postalCodes:[...r.postalCodes,...s.postalCodes]}));i.marketIds=[...i.marketIds,...o.marketIds],i.stateIds=[...i.stateIds,...o.stateIds],i.administrativeDistrictIds=[...i.administrativeDistrictIds,...o.administrativeDistrictIds],i.postalCodes=[...i.postalCodes,...o.postalCodes]}return i}_initialSelection(){this._config.data.marketIds&&this._config.data.marketIds.forEach(e=>{this.treeSelection.push({type:"market",key:e})}),this._config.data.stateIds&&this._config.data.stateIds.forEach(e=>{this.treeSelection.push({type:"state",key:e.toString()})}),this._config.data.administrativeDistrictIds&&this._config.data.administrativeDistrictIds.forEach(e=>{this.treeSelection.push({type:"administrativeDistrict",key:e.value})}),this._config.data.postalCodes&&this._config.data.postalCodes.forEach(e=>{this.treeSelection.push({type:"postalCode",key:e})})}_createStateNodes(e){return e.map(i=>{let o=rg.byId(parseInt(i.label,10)),r;return i.children.length>0&&(r=this._createAdministrativeDistrictIdNodes(i.children,o)),{type:"state",key:o.id.toString(),selectable:!0,label:o.name,children:r,leaf:!!r}})}_createAdministrativeDistrictIdNodes(e,i=void 0){return e.filter(o=>i?Yo.create(o.label).getStateId()===i.id:!0).map(o=>{let r=Yo.create(o.label),s;return o.children.length>0&&(s=this._createPostalCodeNodes(o.children,i,r)),{type:"administrativeDistrict",key:r.value,selectable:!0,label:this._allAdministrativeDistricts[r.getNumericValue().toString()].displayName(),children:s,leaf:!!s}})}_createPostalCodeNodes(e,i=void 0,o=void 0){return e.map(r=>r.label).map(r=>this._allPostalCodes[r]).filter(r=>i?Yo.create(r.administrativeDistrictId)?.getStateId()===i.id:!0).filter(r=>o?r.administrativeDistrictId===o.getNumericValue():!0).map(r=>({type:"postalCode",key:r.postalCode,selectable:!0,label:r.getDisplayName()}))}static{this.\u0275fac=function(i){return new(i||t)(_e(es),_e(Us),_e(Eh),_e(Hu),_e(lg),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:7,vars:3,consts:[["selectionMode","checkbox",3,"selectionChange","value","loading","selection"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-raised-button","","color","accent",3,"click"]],template:function(i,o){i&1&&(k(0,"div")(1,"p-tree",0),ie("selectionChange",function(s){return o.onSelectionChange(s)}),D()(),k(2,"div",1)(3,"button",2),ie("click",function(){return o.ref.close()}),Q(4,"Abbrechen"),D(),k(5,"button",3),ie("click",function(){return o.onSubmit()}),Q(6," \xDCbernehmen "),D()()),i&2&&(T(),E("value",o.nodes)("loading",o.loading)("selection",o.treeSelection))},dependencies:[Cy,c_,Tn,yo],encapsulation:2,changeDetection:0})}}return t})();function b6t(t,n){if(t&1&&(k(0,"mat-hint"),Q(1),D()),t&2){let e=P();T(),dt(e.plugin==null?null:e.plugin.validationToText())}}var i4e=(()=>{class t{constructor(e){this._dialogService=e,this.pluginConfig={availableMarketIds:[]},this.pluginChange=new ve,this.displayText=""}ngOnInit(){this.displayText=this.plugin.toText()}edit(e){e.stopPropagation();let i=mt(be({},rc),{header:"Gebiete ausw\xE4hlen",data:mt(be({},this.plugin.toValue()),{availableMarketIds:this.pluginConfig.availableMarketIds})});this._dialogService.open(t4e,i).onClose.pipe(wn(o=>!!o)).subscribe(o=>{this.plugin=new $E(o.marketIds,o.stateIds,o.administrativeDistrictIds,o.postalCodes),this.displayText=this.plugin.toText(),this.pluginChange.emit(new $E(o.marketIds,o.stateIds,o.administrativeDistrictIds,o.postalCodes))})}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-market-content-selection"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo])],decls:5,vars:5,consts:[["matInput","","placeholder","M\xE4rkte",3,"click","readonly","value"],["matSuffix",""]],template:function(i,o){i&1&&(k(0,"mat-form-field")(1,"input",0),ie("click",function(s){return o.edit(s)}),D(),k(2,"mat-icon",1),Q(3,"arrow_drop_down"),D(),qe(4,b6t,2,1,"mat-hint"),D()),i&2&&(Vn("custom-invalid",!o.pluginValid),T(),E("readonly",!0)("value",o.displayText),T(3),Ke(o.pluginValid?-1:4))},dependencies:[Ra,rs,mu,mp,pl,Fa,$o,mr],encapsulation:2})}}return t})();var n4e=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"Versicherungsart",resetOption:!0,option:{uniqueFnc:e=>e.insuranceType,sortFnc:(e,i)=>e.displayName.localeCompare(i.displayName),searchOptionAccessor:e=>e.displayName},valid$:new pi(1)},this.selectOptions=ci([{insuranceType:"PRIVATE_HEALTH_INSURANCE",displayName:"Privat"},{insuranceType:"MANDATORY_HEALTH_INSURANCE",displayName:"Gesetzlich"}])}ngOnInit(){this.plugin.toValue()&&(this.initialSelection={insuranceType:this.plugin.toValue(),displayName:this.plugin.toValue()==="PRIVATE_HEALTH_INSURANCE"?"Privat":"Gesetzlich"})}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onInsuranceTypeChange(e){e?vo.equals(this.plugin.toValue(),e.insuranceType)||this.pluginChange.emit(new GE(e.insuranceType)):this.pluginChange.emit(new GE(null))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-insurance-type"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-single-select",0),ie("selection",function(s){return o.onInsuranceTypeChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.selectOptions)("initialSelection",o.initialSelection)},dependencies:[jl],encapsulation:2})}}return t})();var o4e=(()=>{class t{constructor(){this.pluginChange=new ve,this.config={selectLabel:"InEK Kalkulationskrankenh\xE4user",valid$:new pi(1),resetOption:!1,option:{sortFnc:(e,i)=>e.displayName.localeCompare(i.displayName),uniqueFnc:e=>e.displayName,searchOptionAccessor:e=>e.displayName}},this.options=ci([{bool:!0,displayName:"InEK Kalkulationskrankenh\xE4user einbeziehen"},{bool:!1,displayName:"InEK Kalkulationskrankenh\xE4user ausschlie\xDFen"}])}ngOnInit(){this.plugin&&(this.initial={bool:this.plugin.toValue(),displayName:this.plugin.toValue()?"InEK Kalkulationskrankenh\xE4user einbeziehen":"InEK Kalkulationskrankenh\xE4user ausschlie\xDFen"})}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onSelectionChanged(e){this.pluginChange.emit(new tM(e.bool))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-inek-calculation-location"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[["data-test","clinics-filter-form-inek-calculation-location-checkbox",3,"selection","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-single-select",0),ie("selection",function(s){return o.onSelectionChanged(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.options)("initialSelection",o.initial)},dependencies:[jl],encapsulation:2})}}return t})();var r4e=(()=>{class t{constructor(e,i){this._cdr=e,this._codeService=i,this.pluginChange=new ve,this.config={emitEventOnInitialSelection:!1,selectLabel:"ICD-Gruppe",optionGroup:{sortFnc:(o,r)=>o.code.name.localeCompare(r.code.name),uniqueFnc:o=>o.code.name,searchOptionAccessor:o=>o.code.name},option:{sortFnc:(o,r)=>this.sortFnc(o,r),uniqueFnc:o=>o.name,searchOptionAccessor:o=>this.searchOptionAccessor(o),searchOptionDisplayName:o=>`${o.name} - ${o.description}`},valid$:new pi(1)},this.selectOptions=vc,this.selection=[],this.selectOptions=this._codeService.treeChildren("ICD-10-GM").pipe(Mn(o=>tc(o.map(r=>this._codeService.treeChildren(r.data.codingSystem,r.data.name).pipe(vt(s=>({code:r.data,options:s.map(m=>m.data)})))))))}ngOnChanges(e){e.plugin&&this._onPluginChanged(),e.pluginValid&&this.config.valid$?.next({isValid:this.pluginValid})}onOptionsChange(e){let i=[];e.forEach(r=>{r.options.forEach(s=>{this.selection.indexOf(s.name)>-1&&i.push(s)})}),this.initialSelection=i,Ui.equals(this.selection,i.map(r=>r.name))||this.onSelectionChange(i)}onSelectionChange(e){Ui.equals(this.selection,e.map(i=>i.name))||(this.selection=[...e.map(i=>i.name)],this.pluginChange.emit(new jE([...e])),this.initialSelection=void 0)}searchOptionAccessor(e){return`${e.name} ${e.description}`}sortFnc(e,i){return!e||!i?e?-1:1:e.name.localeCompare(i.name)}_onPluginChanged(){this.selection=[...this.plugin.toValue().map(e=>e.name)],this.selectOptions.subscribe(e=>{this.onOptionsChange(e),this._cdr.markForCheck()})}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e($u))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-icd-10-gm-code-group"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select-option-group",0),ie("selection",function(s){return o.onSelectionChange(s)})("optionsChange",function(s){return o.onOptionsChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.selectOptions)("initialSelection",o.initialSelection)},dependencies:[HY],encapsulation:2,changeDetection:0})}}return t})();var s4e=(()=>{class t{constructor(e,i){this._cdr=e,this._codeService=i,this.pluginChange=new ve,this.config={emitEventOnInitialSelection:!1,selectLabel:"ICD-Kapitel",option:{sortFnc:(o,r)=>this.sortFnc(o,r),uniqueFnc:o=>o.name,searchOptionAccessor:o=>this.searchOptionAccessor(o),searchOptionDisplayName:o=>`${o.name} - ${o.description}`},valid$:new pi(1)},this.selectOptions=vc,this.selection=[],this.selectOptions=this._codeService.treeChildren("ICD-10-GM").pipe(vt(o=>o.map(r=>r.data)))}ngOnChanges(e){e.plugin&&this._onPluginChanged(),e.pluginValid&&this.config.valid$?.next({isValid:this.pluginValid})}onOptionsChange(e){let i=[];e.forEach(r=>{this.selection.indexOf(r.name)>-1&&i.push(r)}),this.initialSelection=i,Ui.equals(this.selection,i.map(r=>r.name))||this.onSelectionChange(i)}onSelectionChange(e){Ui.equals(this.selection,e.map(i=>i.name))||(this.selection=[...e.map(i=>i.name)],this.pluginChange.emit(new HE([...e])),this.initialSelection=void 0)}searchOptionAccessor(e){return`${e.name} ${e.description}`}sortFnc(e,i){return!e||!i?e?-1:1:e.name.localeCompare(i.name)}_onPluginChanged(){this.selection=[...this.plugin.toValue().map(e=>e.name)],this.selectOptions.subscribe(e=>{this.onOptionsChange(e),this._cdr.markForCheck()})}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e($u))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-icd-10-gm-code-chapter"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onSelectionChange(s)})("optionsChange",function(s){return o.onOptionsChange(s)}),D()),i&2&&E("config",o.config)("selectOptions",o.selectOptions)("initialSelection",o.initialSelection)},dependencies:[_a],encapsulation:2,changeDetection:0})}}return t})();function C6t(t,n){if(t&1&&(k(0,"div",3)(1,"div",4)(2,"span",5),Q(3),D()(),k(4,"div",6)(5,"span",7),Q(6),D()()()),t&2){let e=n.$implicit;T(3),dt(e.name),T(3),dt(e.description)}}var a4e=(()=>{class t{constructor(e,i){this._cdr=e,this._codeService=i,this.pluginChange=new ve,this.overlayOptions={mode:"overlay",appendTo:"body"},this.placeholderText="ICD-Ziffer",this.selectionCtrl=new yr(void 0),this.suggestions=[],this.selectionCtrl.valueChanges.pipe(wn(o=>typeof o=="object"||o===null||o===void 0)).subscribe(o=>this.pluginChange.emit(new mS(o?[o.clone()]:[])))}ngOnChanges(e){if(e.plugin)if(this.plugin){let i=this.plugin.toValue();i.length===1?this.selectionCtrl.setValue(i[0].clone()):this.selectionCtrl.reset(),this._cdr.markForCheck()}else this.onRemoveSelection()}onRemoveSelection(){this.selectionCtrl.reset(),this.suggestions=[],this._cdr.markForCheck()}searchCode(e){this._codeService.find("ICD-10-GM",e.query).subscribe(i=>{this.suggestions=i,this._cdr.markForCheck()})}onClear(){this.onRemoveSelection(),this.pluginChange.emit(new mS([]))}static{this.\u0275fac=function(i){return new(i||t)(_e(Gi),_e($u))}}static{this.\u0275cmp=ne({type:t,selectors:[["filter-condition-form-icd-10-gm-code"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:6,vars:7,consts:[["item",""],["inputId","filter-condition-form-icd-10-gm-code","optionLabel","name","fluid","","variant","filled",3,"completeMethod","onClear","formControl","suggestions","showClear","overlayOptions"],["for","filter-condition-form-icd-10-gm-code"],[1,"flex","flex-row","gap-4"],[1,"basis-14"],[1,"mat-body-2"],[1,"flex-1"],[1,"mat-caption"]],template:function(i,o){if(i&1){let r=tt();k(0,"p-iftalabel")(1,"p-autoComplete",1),ie("completeMethod",function(d){return se(r),ae(o.searchCode(d))})("onClear",function(){return se(r),ae(o.onClear())}),ee(2,C6t,7,2,"ng-template",null,0,Pt),D(),k(4,"label",2),Q(5),D()()}i&2&&(T(),Oe(o.pluginValid?"":"ng-invalid ng-dirty"),E("formControl",o.selectionCtrl)("suggestions",o.suggestions)("showClear",!0)("overlayOptions",o.overlayOptions),T(4),dt(o.placeholderText))},dependencies:[Th,as,xr,no,zl],encapsulation:2,changeDetection:0})}}return t})();var l4e=(()=>{class t{constructor(e){this._clinicService=e,this.pluginChange=new ve,this.config={id:"filter-condition-special-equipment-select",selectLabel:"Klinik-Ausstattung",valid$:new pi(1),option:{sortFnc:(i,o)=>i.displayName.localeCompare(o.displayName),uniqueFnc:i=>i.key,searchOptionAccessor:i=>i.displayName}},this.options=vc,this.options=this._clinicService.availableSpecialEquipment().pipe(vt(i=>i.map(o=>({key:o.key,displayName:o.description}))))}ngOnInit(){this.initialSelection=this.plugin.toValue().map(e=>({key:e,displayName:""}))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onSelectionChange(e){this.pluginChange.emit(new rM(e.map(i=>i.key)))}static{this.\u0275fac=function(i){return new(i||t)(_e(cl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ot],decls:1,vars:3,consts:[[3,"selection","config","initialSelection","selectOptions"]],template:function(i,o){i&1&&(k(0,"bd-ui-multi-select",0),ie("selection",function(s){return o.onSelectionChange(s)}),D()),i&2&&E("config",o.config)("initialSelection",o.initialSelection)("selectOptions",o.options)},dependencies:[_a],encapsulation:2})}}return t})();function sme(t,n){let e=Array(t);for(let i=0;i{class t extends $I{constructor(){super();let e=re(r2,{optional:!0});this.setLocale(e)}getYear(e){return Fq(e)}getMonth(e){return Rq(e)}getDate(e){return HDe(e)}getDayOfWeek(e){return jDe(e)}getMonthNames(e){let i=w6t[e];return sme(12,o=>this.format(new Date(2017,o,1),i))}getDateNames(){let e=typeof Intl<"u"?new Intl.DateTimeFormat(this.locale.code,{day:"numeric",timeZone:"utc"}):null;return sme(31,i=>{if(e){let o=new Date;return o.setUTCFullYear(2017,0,i+1),o.setUTCHours(0,0,0,0),e.format(o).replace(/[\u200e\u200f]/g,"")}return i+""})}getDayOfWeekNames(e){let i=S6t[e];return sme(7,o=>this.format(new Date(2017,0,o+1),i))}getYearName(e){return this.format(e,"y")}getFirstDayOfWeek(){return this.locale.options?.weekStartsOn??0}getNumDaysInMonth(e){return Oq(e)}clone(e){return new Date(e.getTime())}createDate(e,i,o){let r=new Date;return r.setFullYear(e,i,o),r.setHours(0,0,0,0),r.getMonth()!=i,r}today(){return new Date}parse(e,i){if(typeof e=="string"&&e.length>0){let o=kae(e);if(this.isValid(o))return o;let r=Array.isArray(i)?i:[i];if(!i.length)throw Error("Formats array must not be empty.");for(let s of r){let d=eAe(e,s,new Date,{locale:this.locale});if(this.isValid(d))return d}return this.invalid()}else{if(typeof e=="number")return new Date(e);if(e instanceof Date)return this.clone(e)}return null}format(e,i){if(!this.isValid(e))throw Error("DateFnsAdapter: Cannot format invalid date.");return UDe(e,i,{locale:this.locale})}addCalendarYears(e,i){return l2(e,i)}addCalendarMonths(e,i){return Yv(e,i)}addCalendarDays(e,i){return d0(e,i)}toIso8601(e){return Q5(e,{representation:"date"})}deserialize(e){if(typeof e=="string"){if(!e)return null;let i=kae(e);if(this.isValid(i))return i}return super.deserialize(e)}isDateInstance(e){return Tq(e)}isValid(e){return Iq(e)}invalid(){return new Date(NaN)}setTime(e,i,o,r){return nAe(this.clone(e),{hours:i,minutes:o,seconds:r,milliseconds:0})}getHours(e){return $De(e)}getMinutes(e){return KDe(e)}getSeconds(e){return WDe(e)}parseTime(e,i){return this.parse(e,i)}addSeconds(e,i){return Sq(e,i)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),lme={parse:{dateInput:"P",timeInput:"p"},display:{dateInput:"P",timeInput:"p",monthYearLabel:"LLL uuuu",dateA11yLabel:"PP",monthYearA11yLabel:"LLLL uuuu",timeOptionLabel:"p"}};function c4e(t=lme){return[{provide:$I,useClass:ame,deps:[r2]},{provide:z5,useValue:t}]}var d4e={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},u4e=(t,n,e)=>{let i,o=e?.addSuffix?d4e[t].withPreposition:d4e[t].standalone;return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",String(n)),e?.addSuffix?e.comparison&&e.comparison>0?"in "+i:"vor "+i:i};var T6t={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},I6t={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},E6t={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},p4e={date:KI({formats:T6t,defaultWidth:"full"}),time:KI({formats:I6t,defaultWidth:"full"}),dateTime:KI({formats:E6t,defaultWidth:"full"})};var D6t={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},h4e=(t,n,e,i)=>D6t[t];var A6t={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},k6t={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},cme={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},M6t={narrow:cme.narrow,abbreviated:["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:cme.wide},O6t={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},R6t={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},F6t={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},P6t=t=>Number(t)+".",m4e={ordinalNumber:P6t,era:cy({values:A6t,defaultWidth:"wide"}),quarter:cy({values:k6t,defaultWidth:"wide",argumentCallback:t=>t-1}),month:cy({values:cme,formattingValues:M6t,defaultWidth:"wide"}),day:cy({values:O6t,defaultWidth:"wide"}),dayPeriod:cy({values:R6t,defaultWidth:"wide",formattingValues:F6t,defaultFormattingWidth:"wide"})};var L6t=/^(\d+)(\.)?/i,N6t=/\d+/i,B6t={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},V6t={any:[/^v/i,/^n/i]},z6t={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},U6t={any:[/1/i,/2/i,/3/i,/4/i]},H6t={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},j6t={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},G6t={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},$6t={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},q6t={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},K6t={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},f4e={ordinalNumber:Eq({matchPattern:L6t,parsePattern:N6t,valueCallback:t=>parseInt(t)}),era:dy({matchPatterns:B6t,defaultMatchWidth:"wide",parsePatterns:V6t,defaultParseWidth:"any"}),quarter:dy({matchPatterns:z6t,defaultMatchWidth:"wide",parsePatterns:U6t,defaultParseWidth:"any",valueCallback:t=>t+1}),month:dy({matchPatterns:H6t,defaultMatchWidth:"wide",parsePatterns:j6t,defaultParseWidth:"any"}),day:dy({matchPatterns:G6t,defaultMatchWidth:"wide",parsePatterns:$6t,defaultParseWidth:"any"}),dayPeriod:dy({matchPatterns:q6t,defaultMatchWidth:"wide",parsePatterns:K6t,defaultParseWidth:"any"})};var g4e={code:"de",formatDistance:u4e,formatLong:p4e,formatRelative:h4e,localize:m4e,match:f4e,options:{weekStartsOn:1,firstWeekContainsDate:4}};function _4e(){return[c4e(),{provide:r2,useValue:g4e},{provide:z5,useValue:lme},{provide:$I,useClass:ame,deps:[r2]},{provide:zr,useValue:{filterType:XL.type,filterConditionId:Jde,filterConditionPluginSpecification:XL,filterConditionComponent:f3e},multi:!0},{provide:zr,useValue:{filterType:JL.type,filterConditionId:tue,filterConditionPluginSpecification:JL,filterConditionComponent:g3e},multi:!0},{provide:zr,useValue:{filterType:E6.type,filterConditionId:nue,filterConditionPluginSpecification:E6,filterConditionComponent:DVe},multi:!0},{provide:zr,useValue:{filterType:D6.type,filterConditionId:rue,filterConditionPluginSpecification:D6,filterConditionComponent:kVe},multi:!0},{provide:zr,useValue:{filterType:eN.type,filterConditionId:aue,filterConditionPluginSpecification:eN,filterConditionComponent:EVe},multi:!0},{provide:zr,useValue:{filterType:R6.type,filterConditionId:mue,filterConditionPluginSpecification:R6,filterConditionComponent:MVe},multi:!0},{provide:zr,useValue:{filterType:oN.type,filterConditionId:gue,filterConditionPluginSpecification:oN,filterConditionComponent:wVe},multi:!0},{provide:zr,useValue:{filterType:F6.type,filterConditionId:yue,filterConditionPluginSpecification:F6,filterConditionComponent:OVe},multi:!0},{provide:zr,useValue:{filterType:P6.type,filterConditionId:bue,filterConditionPluginSpecification:P6,filterConditionComponent:RVe},multi:!0},{provide:zr,useValue:{filterType:L6.type,filterConditionId:xue,filterConditionPluginSpecification:L6,filterConditionComponent:FVe},multi:!0},{provide:zr,useValue:{filterType:N6.type,filterConditionId:Sue,filterConditionPluginSpecification:N6,filterConditionComponent:PVe},multi:!0},{provide:zr,useValue:{filterType:z6.type,filterConditionId:Due,filterConditionPluginSpecification:z6,filterConditionComponent:LVe},multi:!0},{provide:zr,useValue:{filterType:U6.type,filterConditionId:kue,filterConditionPluginSpecification:U6,filterConditionComponent:gBe},multi:!0},{provide:zr,useValue:{filterType:H6.type,filterConditionId:Oue,filterConditionPluginSpecification:H6,filterConditionComponent:NVe},multi:!0},{provide:zr,useValue:{filterType:j6.type,filterConditionId:Fue,filterConditionPluginSpecification:j6,filterConditionComponent:_Be},multi:!0},{provide:zr,useValue:{filterType:Y2.type,filterConditionId:null,filterConditionPluginSpecification:Y2,filterConditionComponent:BVe},multi:!0},{provide:zr,useValue:{filterType:$6.type,filterConditionId:null,filterConditionPluginSpecification:$6,filterConditionComponent:yBe},multi:!0},{provide:zr,useValue:{filterType:q6.type,filterConditionId:null,filterConditionPluginSpecification:q6,filterConditionComponent:vBe},multi:!0},{provide:zr,useValue:{filterType:W6.type,filterConditionId:Xde,filterConditionPluginSpecification:W6,filterConditionComponent:bBe},multi:!0},{provide:zr,useValue:{filterType:Y6.type,filterConditionId:Vue,filterConditionPluginSpecification:Y6,filterConditionComponent:VVe},multi:!0},{provide:zr,useValue:{filterType:sN.type,filterConditionId:Nue,filterConditionPluginSpecification:sN,filterConditionComponent:zVe},multi:!0},{provide:zr,useValue:{filterType:cN.type,filterConditionId:jue,filterConditionPluginSpecification:cN,filterConditionComponent:UVe},multi:!0},{provide:zr,useValue:{filterType:Q6.type,filterConditionId:Uue,filterConditionPluginSpecification:Q6,filterConditionComponent:HVe},multi:!0},{provide:zr,useValue:{filterType:Z6.type,filterConditionId:null,filterConditionPluginSpecification:Z6,filterConditionComponent:jVe},multi:!0},{provide:zr,useValue:{filterType:uN.type,filterConditionId:Gue,filterConditionPluginSpecification:uN,filterConditionComponent:wBe},multi:!0},{provide:zr,useValue:{filterType:J6.type,filterConditionId:que,filterConditionPluginSpecification:J6,filterConditionComponent:GVe},multi:!0},{provide:zr,useValue:{filterType:eU.type,filterConditionId:Yue,filterConditionPluginSpecification:eU,filterConditionComponent:aVe},multi:!0},{provide:zr,useValue:{filterType:tU.type,filterConditionId:Xue,filterConditionPluginSpecification:tU,filterConditionComponent:TVe},multi:!0},{provide:zr,useValue:{filterType:mN.type,filterConditionId:ope,filterConditionPluginSpecification:mN,filterConditionComponent:a4e},multi:!0},{provide:zr,useValue:{filterType:pN.type,filterConditionId:epe,filterConditionPluginSpecification:pN,filterConditionComponent:s4e},multi:!0},{provide:zr,useValue:{filterType:hN.type,filterConditionId:ipe,filterConditionPluginSpecification:hN,filterConditionComponent:r4e},multi:!0},{provide:zr,useValue:{filterType:iU.type,filterConditionId:spe,filterConditionPluginSpecification:iU,filterConditionComponent:o4e},multi:!0},{provide:zr,useValue:{filterType:oU.type,filterConditionId:ape,filterConditionPluginSpecification:oU,filterConditionComponent:lVe},multi:!0},{provide:zr,useValue:{filterType:sU.type,filterConditionId:null,filterConditionPluginSpecification:sU,filterConditionComponent:cVe},multi:!0},{provide:zr,useValue:{filterType:aU.type,filterConditionId:cpe,filterConditionPluginSpecification:aU,filterConditionComponent:n4e},multi:!0},{provide:zr,useValue:{filterType:lU.type,filterConditionId:upe,filterConditionPluginSpecification:lU,filterConditionComponent:pVe},multi:!0},{provide:zr,useValue:{filterType:cU.type,filterConditionId:null,filterConditionPluginSpecification:cU,filterConditionComponent:e4e},multi:!0},{provide:zr,useValue:{filterType:vN.type,filterConditionId:null,filterConditionPluginSpecification:vN,filterConditionComponent:i4e},multi:!0},{provide:zr,useValue:{filterType:uU.type,filterConditionId:fpe,filterConditionPluginSpecification:uU,filterConditionComponent:JVe},multi:!0},{provide:zr,useValue:{filterType:V6.type,filterConditionId:Iue,filterConditionPluginSpecification:V6,filterConditionComponent:hVe},multi:!0},{provide:zr,useValue:{filterType:hU.type,filterConditionId:_pe,filterConditionPluginSpecification:hU,filterConditionComponent:XVe},multi:!0},{provide:zr,useValue:{filterType:mU.type,filterConditionId:vpe,filterConditionPluginSpecification:mU,filterConditionComponent:ZVe},multi:!0},{provide:zr,useValue:{filterType:CN.type,filterConditionId:Cpe,filterConditionPluginSpecification:CN,filterConditionComponent:QVe},multi:!0},{provide:zr,useValue:{filterType:xN.type,filterConditionId:null,filterConditionPluginSpecification:xN,filterConditionComponent:YVe},multi:!0},{provide:zr,useValue:{filterType:wN.type,filterConditionId:wpe,filterConditionPluginSpecification:wN,filterConditionComponent:WVe},multi:!0},{provide:zr,useValue:{filterType:SN.type,filterConditionId:null,filterConditionPluginSpecification:SN,filterConditionComponent:KVe},multi:!0},{provide:zr,useValue:{filterType:yN.type,filterConditionId:hpe,filterConditionPluginSpecification:yN,filterConditionComponent:xVe},multi:!0},{provide:zr,useValue:{filterType:aM.type,filterConditionId:Epe,filterConditionPluginSpecification:aM,filterConditionComponent:qVe},multi:!0},{provide:zr,useValue:{filterType:_N.type,filterConditionId:ppe,filterConditionPluginSpecification:_N,filterConditionComponent:IVe},multi:!0},{provide:zr,useValue:{filterType:G6.type,filterConditionId:Lue,filterConditionPluginSpecification:G6,filterConditionComponent:mVe},multi:!0},{provide:zr,useValue:{filterType:gU.type,filterConditionId:Ape,filterConditionPluginSpecification:gU,filterConditionComponent:$Ve},multi:!0},{provide:zr,useValue:{filterType:fU.type,filterConditionId:Tpe,filterConditionPluginSpecification:fU,filterConditionComponent:l4e},multi:!0}]}var SZ=(()=>{class t{constructor(){this.expressionChange=new ve,this.possiblePluginTypeDefinition=uf.SPECIFICATION,this.expressionConfig={[cf.Specification.type]:{virtualClinicIds:[],mode:"ONLY_GENERAL_FAB_KEYS"},[pb.Specification.type]:{codingSystems:["ICD-10-GM","OPS"],codeTypeClassifications:{"ICD-10-GM":rb["ICD-10-GM"][0],OPS:rb.OPS[2],"G-DRG":null},codeTypeSpecification:!1,resolveOnSelect:!1,matchingSpecification:!0,includesExcludesSelection:!1,grouperVersionYear:!1}}}onExpressionChange(e){this.expressionChange.emit(e?e.clone():$a.EMPTY())}onExpressionValueChange(e){this.expressionChange.emit(e.clone())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-form-expression"]],inputs:{expression:"expression"},outputs:{expressionChange:"expressionChange"},decls:1,vars:3,consts:[[3,"expressionChange","expressionValueChange","expression","possiblePluginTypeDefinition","expressionConfig"]],template:function(i,o){i&1&&(k(0,"filter-condition-form",0),ie("expressionChange",function(s){return o.onExpressionChange(s)})("expressionValueChange",function(s){return o.onExpressionValueChange(s)}),D()),i&2&&E("expression",o.expression)("possiblePluginTypeDefinition",o.possiblePluginTypeDefinition)("expressionConfig",o.expressionConfig)},dependencies:[CZ],encapsulation:2})}}return t})();function W6t(t,n){t&1&&(k(0,"div",2)(1,"mat-form-field")(2,"mat-label"),Q(3,"Name"),D(),ce(4,"input",9),D()(),ce(5,"mat-divider"))}var UN=(()=>{class t extends dr{constructor(){super(),this.formOptions=SNe,this.clinicsFilterSave=new ve,this.abortRouterLink=["/clinics-filters"],this.form=new hu({name:new yr(null,[Ys.required]),expression:new yr(Hs.newDefaultClinicFilter().expression,[Ys.required]),expressionValid:new yr(!0,[Ys.required,Ys.requiredTrue])})}ngOnInit(){this.formOptions.showNameField?this.form.controls.name.addValidators([Ys.required]):this.form.controls.name.clearValidators(),this.clinicsFilter.id&&(this.abortRouterLink=["/clinics-filters",this.clinicsFilter.id]),this.form.patchValue({name:this.clinicsFilter.name,expression:this.clinicsFilter.expression,expressionValid:this.clinicsFilter.expression.valid()})}ngOnDestroy(){this.unsubscribeAll()}submit(){if(this.clinicsFilter.id){let e=this.clinicsFilter.clone();e.name=this.form.value.name,e.expression=this.form.value.expression?.clone(),this.clinicsFilterSave.emit(e.clone())}else this.clinicsFilterSave.emit(new uf(void 0,this.form.value.name,void 0,void 0,void 0,this.form.value.expression))}onExpressionChange(e){this.form.patchValue({expression:e.clone(),expressionValid:e.valid()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-form"]],inputs:{clinicsFilter:"clinicsFilter",formOptions:"formOptions"},outputs:{clinicsFilterSave:"clinicsFilterSave"},features:[ft],decls:15,vars:5,consts:[[3,"ngSubmit","formGroup"],[1,"flex","flex-col","gap-4"],[1,"bd-container"],[3,"expressionChange","expression"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse","gap-2"],[1,"flex-none"],["mat-raised-button","","type","submit","color","accent","data-test","clinics-filter-form-submit-button",3,"disabled"],["mat-button","","data-test","clinics-filter-form-abort-button",3,"routerLink"],["matInput","","formControlName","name","placeholder","Name","data-test","clinis-filter-form-name","required",""]],template:function(i,o){i&1&&(k(0,"form",0),ie("ngSubmit",function(){return o.submit()}),k(1,"div",1),qe(2,W6t,6,0),k(3,"div",2)(4,"ays-clinics-filter-form-expression",3),ie("expressionChange",function(s){return o.onExpressionChange(s)}),D()(),k(5,"div",4)(6,"div",5)(7,"div",6)(8,"button",7)(9,"span"),Q(10,"Speichern"),D()()(),k(11,"div",6)(12,"a",8)(13,"span"),Q(14,"Abbrechen"),D()()()()()()()),i&2&&(E("formGroup",o.form),T(2),Ke(o.formOptions.showNameField?2:-1),T(2),E("expression",o.form.controls.expression.value),T(4),E("disabled",o.form.invalid),T(4),E("routerLink",o.abortRouterLink))},dependencies:[SZ,il,Gl,pl,Fa,rs,Ol,xr,$m,Ml,no,Gm,qv,zu,l0,yo,Bs],encapsulation:2})}}return t})();function Y6t(t,n){if(t&1){let e=tt();k(0,"ays-clinics-filter-form",5),ie("clinicsFilterSave",function(o){se(e);let r=P();return ae(r.onClinicsFilterSave(o))}),D()}if(t&2){let e=P();E("clinicsFilter",e.clinicsFilter)}}function Q6t(t,n){t&1&&(k(0,"div",6),ce(1,"bd-message-empty",7),D())}var y4e=(()=>{class t extends dr{constructor(e,i,o,r){super(),this._activatedRoute=e,this._clinicsFilterService=i,this._cdr=o,this._router=r,this.loading$=new pi(1),this.helpButtonOptions=d_}ngOnInit(){this.loading$.next(Gt.LOADING);let e=this._activatedRoute.params.subscribe(i=>this._onParamsChange(i));this._subs.push(e)}ngOnDestroy(){this.unsubscribeAll()}onClinicsFilterSave(e){this.loading$.next(Gt.LOADING),this._clinicsFilterService.update(e).pipe(Sn(1)).subscribe({next:()=>this._router.navigate(["/clinics-filters",this.clinicsFilter.id]),error:()=>this.loading$.next(Gt.ERROR)})}_onParamsChange(e){let i=e.clinicsFilterId;this.loading$.next(Gt.LOADING),this._clinicsFilterService.findById(i).pipe(Sn(1)).subscribe({next:o=>{this.clinicsFilter=o.clone(),this.loading$.next(Gt.SUCCESS),this._cdr.markForCheck()},error:()=>this.loading$.next(Gt.ERROR)})}static{this.\u0275fac=function(i){return new(i||t)(_e(vl),_e(Hs),_e(Gi),_e(dl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],features:[ft],decls:10,vars:4,consts:[["successTpl",""],["errorTpl",""],[1,"toolbar-spacer"],["key","ays_clinics_filter",3,"options"],[3,"loadItem","successTemplate","errorTemplate"],[3,"clinicsFilterSave","clinicsFilter"],[1,"bd-container-inner"],["icon","error","message","Ein Fehler ist aufgetreten, der Vorgang wurde abgebrochen"]],template:function(i,o){if(i&1&&(k(0,"bd-toolbar")(1,"span"),Q(2,"Klinik-Filter bearbeiten"),D(),ce(3,"span",2)(4,"bd-help-button",3),D(),ce(5,"bd-loader",4),ee(6,Y6t,1,1,"ng-template",null,0,Pt)(8,Q6t,2,0,"ng-template",null,1,Pt)),i&2){let r=ti(7),s=ti(9);T(4),E("options",o.helpButtonOptions),T(),E("loadItem",o.loading$)("successTemplate",r)("errorTemplate",s)}},dependencies:[Ga,af,Kn,xr,hr,UN,Tn,Rl],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"],changeDetection:0})}}return t})();function Z6t(t,n){if(t&1){let e=tt();k(0,"ays-clinics-filter-form",5),ie("clinicsFilterSave",function(o){se(e);let r=P();return ae(r.onClinicsFilterSave(o))}),D()}if(t&2){let e=P();E("clinicsFilter",e.clinicsFilter)}}function X6t(t,n){t&1&&(k(0,"div",6),ce(1,"bd-message-empty",7),D())}var v4e=(()=>{class t{constructor(e,i,o){this._activatedRoute=e,this._router=i,this._clinicsFilterService=o,this.helpButtonOptions=d_,this.loading$=new Gs(Gt.INIT),this.valid=!1,this.clinicsFilter=Hs.newDefaultClinicFilter()}ngOnInit(){this._activatedRoute.queryParams.subscribe({next:()=>this._initFromParams(),error:()=>this.loading$.next(Gt.ERROR)})}onClinicsFilterSave(e){this.loading$.next(Gt.LOADING),this._clinicsFilterService.create(e).pipe(Sn(1)).subscribe({next:i=>this._router.navigate(["/clinics-filters",i.id]),error:()=>this.loading$.next(Gt.ERROR)})}_initFromParams(){this.clinicsFilter=Hs.newDefaultClinicFilter()}static{this.\u0275fac=function(i){return new(i||t)(_e(vl),_e(dl),_e(Hs))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:10,vars:4,consts:[["initTpl",""],["errorTpl",""],[1,"toolbar-spacer"],["key","ays_clinics_filter",3,"options"],[3,"loadItem","initTemplate","errorTemplate"],[3,"clinicsFilterSave","clinicsFilter"],[1,"bd-container-inner"],["icon","error","message","Ein Fehler ist aufgetreten, der Vorgang wurde abgebrochen"]],template:function(i,o){if(i&1&&(k(0,"bd-toolbar")(1,"span"),Q(2,"Klinik-Filter erstellen"),D(),ce(3,"span",2)(4,"bd-help-button",3),D(),ce(5,"bd-loader",4),ee(6,Z6t,1,1,"ng-template",null,0,Pt)(8,X6t,2,0,"ng-template",null,1,Pt)),i&2){let r=ti(7),s=ti(9);T(4),E("options",o.helpButtonOptions),T(),E("loadItem",o.loading$)("initTemplate",r)("errorTemplate",s)}},dependencies:[Ga,af,xr,hr,UN,Tn,Kn,Rl],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}}return t})();var J6t=t=>!t,eUt=t=>["/clinics-filters",t.id],b4e={emptyResourcesText:"Keine Klinik-Filter gespeichert",detailLinkFnc:eUt,disableFnc:J6t,filterFnc:u_},C4e={detailLinkFnc:kx,disableFnc:Ax,filterFnc:u_,emptyResourcesText:"Keine Klinik-Filter gefunden",resourceNameTitle:"Klinik-Filter",selectOnInit:"first",resetOption:!1};var tUt=()=>["/clinics-filters","new"];function iUt(t,n){if(t&1&&ce(0,"bd-resources-list",9),t&2){let e=P();E("resources",e.clinicsFilters)("options",e.resourceListOptions)}}function nUt(t,n){t&1&&ce(0,"bd-resources-list-loading")}var x4e=(()=>{class t{constructor(e){this._clinicsFilterService=e,this.loading$=new pi(1),this.helpButtonOptions=d_,this.resourceListOptions=b4e}ngOnInit(){this.loading$.next(Gt.LOADING),this._clinicsFilterService.findAll().subscribe(e=>{this.clinicsFilters=e,this.loading$.next(Gt.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(_e(Hs))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[["successTpl",""],["loadingTpl",""],[1,"toolbar-spacer"],["key","ays_clinics_filter",3,"options"],[1,"bd-container"],[3,"loadItem","successTemplate","customLoadingTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse"],["mat-raised-button","","color","accent",3,"routerLink"],[3,"resources","options"]],template:function(i,o){if(i&1&&(k(0,"bd-toolbar")(1,"span"),Q(2,"Klinikfilter"),D(),ce(3,"span",2)(4,"bd-help-button",3),D(),k(5,"div",4),ce(6,"bd-loader",5),D(),ce(7,"mat-divider"),k(8,"div",6)(9,"div",7)(10,"div")(11,"a",8),Q(12,"Neuen Klinikfilter erstellen"),D()()()(),ee(13,iUt,1,2,"ng-template",null,0,Pt)(15,nUt,1,0,"ng-template",null,1,Pt)),i&2){let r=ti(14),s=ti(16);T(4),E("options",o.helpButtonOptions),T(2),E("loadItem",o.loading$)("successTemplate",r)("customLoadingTemplate",s),T(5),E("routerLink",uo(5,tUt))}},dependencies:[il,Gl,Tn,yo,$L,P2,Bs,Kn,Ga,af],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}}return t})();function oUt(t,n){t&1&&(k(0,"tr")(1,"th"),Q(2,"IK"),D(),k(3,"th"),Q(4,"Standort"),D(),k(5,"th"),Q(6,"Klinik"),D(),k(7,"th"),Q(8,"Adresse"),D(),k(9,"th",3),Q(10," Vollstation\xE4re F\xE4lle "),D(),k(11,"th",4),Q(12," Teilstation\xE4re F\xE4lle "),D(),k(13,"th",5),Q(14," Ambulante F\xE4lle "),D(),ce(15,"th",6),D())}function rUt(t,n){if(t&1&&(k(0,"tr")(1,"td"),Q(2),D(),k(3,"td"),Q(4),D(),k(5,"td"),Q(6),D(),k(7,"td"),Q(8),D(),k(9,"td",7),Q(10),Xn(11,"number"),D(),k(12,"td",7),Q(13),Xn(14,"number"),D(),k(15,"td",7),Q(16),Xn(17,"number"),D(),k(18,"td"),ce(19,"ays-clinic-icon-link",8),D()()),t&2){let e=n.$implicit,i=P();T(2),dt(e.clinic.id.ik),T(2),dt(e.clinic.id.sn),T(2),dt(e.clinic.name),T(2),dt(e.clinic.address.toString()),T(2),Qi(" ",Ls(11,8,e.caseNumbers.fullyInpatientCases[i.activeYear],"1.0-0")," "),T(3),Qi(" ",Ls(14,11,e.caseNumbers.semiInpatientCases[i.activeYear],"1.0-0")," "),T(3),Qi(" ",Ls(17,14,e.caseNumbers.outpatientCases[i.activeYear],"1.0-0")," "),T(3),E("clinicId",e.clinic.id)}}var w4e=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-case-numbers-table"]],inputs:{items:"items",activeYear:"activeYear"},decls:3,vars:1,consts:[[3,"value"],["pTemplate","header"],["pTemplate","body"],[1,"number-value","mat-column-fullyInpatientCases"],[1,"number-value","mat-column-semiInpatientCases"],[1,"number-value","mat-column-outpatientCases"],[1,"mat-column-clinicLink"],[1,"number-value"],[3,"clinicId"]],template:function(i,o){i&1&&(k(0,"p-table",0),ee(1,oUt,16,0,"ng-template",1)(2,rUt,20,17,"ng-template",2),D()),i&2&&E("value",o.items)},dependencies:[ZE,hc,hl,so,Ta],styles:[".number-value[_ngcontent-%COMP%]{text-align:right;flex-flow:row-reverse}.mat-column-fullyInpatientCases[_ngcontent-%COMP%], .mat-column-semiInpatientCases[_ngcontent-%COMP%], .mat-column-outpatientCases[_ngcontent-%COMP%]{width:150px}.mat-column-clinicLink[_ngcontent-%COMP%]{width:48px}"]})}}return t})();var S4e=(()=>{class t{constructor(){this.years=Jw,this.activeField="fullyInpatientCases",this.chartConfiguration={type:"line",options:{responsive:!0,maintainAspectRatio:!1,aspectRatio:12/3,scales:{y:C2},plugins:{tooltip:_u,legend:{position:"bottom"}}},data:null}}ngOnChanges(e){this._createDataSets()}onActiveFieldChange(e){this.activeField=e,this._createDataSets()}_createDataSets(){let e=this.items.map((i,o)=>{let r=i.caseNumbers[this.activeField],s=this._toChartData(r);return{label:i.clinic.name,data:s,backgroundColor:$P[o],borderColor:$P[o],fill:!1,borderWidth:2}});this.chartConfiguration.data={labels:this.years,datasets:e},this.chartConfiguration=JSON.parse(JSON.stringify(this.chartConfiguration))}_toChartData(e){return this.years.map(i=>e[i]!==void 0?e[i]:null)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-case-numbers-chart"]],inputs:{items:"items"},features:[Ot],decls:14,vars:7,consts:[[1,"bd-container-inner"],[3,"change"],[3,"value","checked"],[1,"chart-container"],[3,"chartConfig"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div")(2,"mat-radio-group",1),ie("change",function(s){return o.onActiveFieldChange(s.value)}),k(3,"mat-radio-button",2)(4,"span"),Q(5,"Vollstation\xE4re F\xE4lle"),D()(),k(6,"mat-radio-button",2)(7,"span"),Q(8,"Teilstation\xE4re F\xE4lle"),D()(),k(9,"mat-radio-button",2)(10,"span"),Q(11,"Ambulante F\xE4lle"),D()()()()(),k(12,"div",3),ce(13,"bd-chart-canvas",4),D()),i&2&&(T(3),E("value","fullyInpatientCases")("checked",o.activeField==="fullyInpatientCases"),T(3),E("value","semiInpatientCases")("checked",o.activeField==="semiInpatientCases"),T(3),E("value","outpatientCases")("checked",o.activeField==="outpatientCases"),T(4),E("chartConfig",o.chartConfiguration))},dependencies:[Nx,gb,Ay,Cp],styles:["mat-radio-group[_ngcontent-%COMP%]{float:right}.mat-radio-button[_ngcontent-%COMP%] ~ .mat-radio-button[_ngcontent-%COMP%]{margin-left:16px}.chart-container[_ngcontent-%COMP%]{height:300px}"]})}}return t})();var Ux=(()=>{class t{constructor(){this.selectedYear=Cd,this.placeholder="Jahr",this.yearChange=new ve,this.years=ci(Jw)}ngOnInit(){this.config={id:"clinics-filter-year-select",selectLabel:this.placeholder,option:{sortFnc:(e,i)=>e-i,uniqueFnc:e=>e.toString(),searchOptionAccessor:e=>e.toString()}}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-year-select"]],inputs:{selectedYear:"selectedYear",placeholder:"placeholder"},outputs:{yearChange:"yearChange"},decls:1,vars:3,consts:[[3,"selection","config","initialSelection","selectOptions"]],template:function(i,o){i&1&&(k(0,"bd-ui-single-select",0),ie("selection",function(s){return o.yearChange.emit(s)}),D()),i&2&&E("config",o.config)("initialSelection",o.selectedYear)("selectOptions",o.years)},dependencies:[jl],encapsulation:2})}}return t})();var Hx=class extends Sh{constructor(n,e,i,o,r,s){super(),this._clinicsFilterService=n,this._administrativeDistrictService=e,this._fabService=i,this._clinicsFilter=o,this._clinicsFilterYear=r,this._clinicTypePipe=s}getExport(){return Promise.all([Wl(this._administrativeDistrictService.find()),this._clinicsFilterService.export(this._clinicsFilter,this._clinicsFilterYear)]).then(n=>({administrativeDistricts:n[0],clinicsFilterExport:n[1]})).then(n=>({data:n.clinicsFilterExport.map(e=>this._getDataRow(e,n.administrativeDistricts)),fields:this._getFieldNames()}))}_getDataRow(n,e,i=null){let o=Yo.createFromNumber(n.address.administrativeDistrictId),r=e.find(d=>d.id.value===o.value),s=o?rg.byId(o.getStateId()):void 0;return[{value:n.id.ik.toString(),type:"string"},{value:n.id.sn.toString(),type:"string"},{value:n.name,type:"string"},{value:n.address.street,type:"string"},{value:n.address.postalCode,type:"string"},{value:n.address.city,type:"string"},{value:r?.displayName()??"",type:"string"},{value:s?.name??"",type:"string"},{value:n.beds,type:"number"},{value:this._clinicTypePipe.transform(n.type),type:"string"},{value:n.nameOfOwner,type:"string"},{value:n.clinicLevel?n.clinicLevel.displayName.de:"n/a",type:"string"},{value:n.isInekCalculationLocation?"ja":"nein",type:"string"}]}_getFieldNames(n=null){return["IK","SN","Name Klinik","Stra\xDFe","PLZ","Ort","Landkreis","Bundesland","Anzahl Betten","Tr\xE4gerart","Tr\xE4ger","Versorgungslevel","InEK Kalkulationskrankenhaus"]}};var TZ=class extends Hx{constructor(n,e,i,o,r,s){super(n,e,i,o,r,s)}getExport(){return Promise.all([Wl(this._administrativeDistrictService.find()),Wl(this._fabService.index()),this._clinicsFilterService.export(this._clinicsFilter,this._clinicsFilterYear)]).then(n=>({administrativeDistricts:n[0],fabs:n[1],clinicsFilterExports:n[2]})).then(n=>{let e=n.clinicsFilterExports.map(i=>Object.keys(i.specialtyDepartments)).reduce((i,o)=>Ui.unique([...i,...o],r=>r)).map(i=>{let o=n.fabs.find(r=>r.fabKey===i);return o||(o=new Xt("0000",`Unbekannt ${i}`)),o}).filter(i=>!!i).sort((i,o)=>!i||!o?i?-1:1:i.name.localeCompare(o.name));return{data:n.clinicsFilterExports.map(i=>this._getDataRow(i,n.administrativeDistricts,e)),fields:this._getFieldNames().concat(["Vollstation\xE4re F\xE4lle","Teilstation\xE4re F\xE4lle","Ambulante F\xE4lle"]).concat(e.map(i=>`FAB ${i.name} Vollstation\xE4re F\xE4lle`))}})}_getDataRow(n,e,i){let o=i.map(s=>n.specialtyDepartments[s.fabKey]?{value:n.specialtyDepartments[s.fabKey].reduce((m,v)=>({fullyInpatientCases:m.fullyInpatientCases+v.fullyInpatientCases,semiInpatientCases:m.semiInpatientCases+v.semiInpatientCases,specialtyDepartmentId:null,staffing:null})).fullyInpatientCases,type:"number"}:{value:null,type:"number"}),r=[{value:n.caseNumbers.fullyInpatientCases??0,type:"number"},{value:n.caseNumbers.semiInpatientCases??0,type:"number"},{value:n.caseNumbers.outpatientCases??0,type:"number"}];return super._getDataRow(n,e).concat(r).concat(o)}};var T4e=(()=>{class t{constructor(e,i,o,r){this._clinicsFilterService=e,this.clinicTypePipe=i,this._administrativeDistrictService=o,this._fabService=r,this.filename="Klinikfilter_Fallzahlen.csv"}ngOnChanges(){this.filename=`${this.clinicsFilter.name}_Fallzahlen_${this.clinicsFilterYear}`,this.export=new TZ(this._clinicsFilterService,this._administrativeDistrictService,this._fabService,this.clinicsFilter,this.clinicsFilterYear,this.clinicTypePipe)}static{this.\u0275fac=function(i){return new(i||t)(_e(Hs),_e(Wc),_e(Hu),_e(qu))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-case-numbers-export"]],inputs:{clinicsFilter:"clinicsFilter",clinicsFilterYear:"clinicsFilterYear"},features:[jt([Wc]),Ot],decls:1,vars:2,consts:[[3,"data","filename"]],template:function(i,o){i&1&&ce(0,"bd-export-as-file",0),i&2&&E("data",o.export)("filename",o.filename)},dependencies:[Sd],encapsulation:2})}}return t})();var sUt=()=>[10,20,30];function aUt(t,n){if(t&1){let e=tt();k(0,"div",8),ce(1,"ays-clinics-filter-details-case-numbers-table",10)(2,"ays-clinics-filter-details-case-numbers-chart",11),k(3,"div",12)(4,"p-paginator",13),ie("onPageChange",function(o){se(e);let r=P(2);return ae(r.onPageChange(o))}),D()()()}if(t&2){let e=P(2);T(),E("items",e.activeContent)("activeYear",e.selectedYear),T(),E("items",e.activeContent),T(2),E("first",e.paginator.first)("rows",e.paginator.pageSize)("totalRecords",e.paginator.totalRecords)("rowsPerPageOptions",uo(10,sUt))("showPageLinks",!1)("showFirstLastIcon",!1)("showCurrentPageReport",!0)}}function lUt(t,n){t&1&&(k(0,"span",9),Q(1,"Es wurden keine Kliniken f\xFCr den ausgew\xE4hlten Filter gefunden"),D())}function cUt(t,n){if(t&1&&qe(0,aUt,5,11,"div",8)(1,lUt,2,0,"span",9),t&2){let e=P();Ke(e.activeContent.length>0?0:1)}}function dUt(t,n){t&1&&(k(0,"span",9),Q(1,"Es wurden keine Kliniken f\xFCr den ausgew\xE4hlten Filter gefunden"),D())}var I4e=(()=>{class t{constructor(e){this._clinicsFilterService=e,this.loading$=new pi(1),this.activeContent=[],this.paginator=new sy(10,0),this.selectedYear=Cd}ngOnInit(){this.loading$.next(Gt.LOADING),this._fetchData({rows:this.paginator.pageSize,page:0})}onPageChange(e){this._fetchData(e)}onYearChanged(e){this.selectedYear=e,this._fetchData({rows:this.paginator.pageSize,page:0})}_fetchData(e){this.loading$.next(Gt.LOADING),this._clinicsFilterService.caseNumbersByClinicsFilter(this.clinicsFilter,sy.toHttpParams(e),this.selectedYear).subscribe({next:i=>{this.paginator.totalRecords=i.totalElements,this.paginator.first=i.pageable.offset,this.activeContent=i.content,this.loading$.next(Gt.SUCCESS)},error:()=>{this.loading$.next(Gt.ERROR)}})}static{this.\u0275fac=function(i){return new(i||t)(_e(Hs))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-case-numbers"]],inputs:{clinicsFilter:"clinicsFilter"},decls:13,vars:6,consts:[["successTpl",""],["empty",""],[1,"flex","flex-row","gap-6","items-center"],[1,"flex-1"],[1,"mat-title"],[3,"yearChange","selectedYear"],[3,"clinicsFilter","clinicsFilterYear"],[3,"loadItem","successTemplate","errorTemplate"],[1,"flex","flex-col","gap-4"],[1,"mat-body-1"],[3,"items","activeYear"],[3,"items"],[1,"flex","justify-end"],["currentPageReportTemplate","{first} - {last} von {totalRecords}",3,"onPageChange","first","rows","totalRecords","rowsPerPageOptions","showPageLinks","showFirstLastIcon","showCurrentPageReport"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",2)(1,"div",3)(2,"span",4),Q(3,"Fallzahlen"),D()(),k(4,"span")(5,"ays-clinics-filter-details-year-select",5),ie("yearChange",function(d){return se(r),ae(o.onYearChanged(d))}),D()(),k(6,"div"),ce(7,"ays-clinics-filter-details-case-numbers-export",6),D()(),ce(8,"bd-loader",7),ee(9,cUt,2,1,"ng-template",null,0,Pt)(11,dUt,2,0,"ng-template",null,1,Pt)}if(i&2){let r=ti(10),s=ti(12);T(5),E("selectedYear",o.selectedYear),T(2),E("clinicsFilter",o.clinicsFilter)("clinicsFilterYear",o.selectedYear),T(),E("loadItem",o.loading$)("successTemplate",r)("errorTemplate",s)}},dependencies:[w4e,S4e,Ux,T4e,Kn,kE,aS],encapsulation:2})}}return t})();var dme=(()=>{class t{constructor(e){this._clinicService=e}resolve(e){let i=e.params.clinicIk,o=e.params.clinicSn;return this._clinicService.get(new ga(i,o))}static{this.\u0275fac=function(i){return new(i||t)(di(cl))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var E4e=(()=>{class t{constructor(e){this._specialtyDepartmentService=e}resolve(e){let i=e.params.clinicIk,o=e.params.clinicSn,r=e.params.sdKey;return this._specialtyDepartmentService.get(new mM(i,o,r))}static{this.\u0275fac=function(i){return new(i||t)(di(gm))}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ume="bd.ays.clinic.search.history",IZ=(()=>{class t{deleteAll(){localStorage.removeItem(ume)}get(){return this._load()}push(e){let i=this._load().filter(o=>o.clinic.id.ik!==e.clinic.id.ik&&o.clinic.id.sn!==e.clinic.id.sn);i.push(e),this._store(i)}_store(e){let i=JSON.stringify(e);localStorage.setItem(ume,i)}_load(){let e=[],i=localStorage.getItem(ume);return i&&(e=JSON.parse(i).map(r=>(r.clinic.address=Ih.fromObject(r.clinic.address),r))),e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var uUt=(t,n)=>["/clinics","single",t,n];function pUt(t,n){if(t&1&&(k(0,"div",2)(1,"div",3)(2,"div",4)(3,"div")(4,"span",5),Q(5),D()(),k(6,"div")(7,"span",6),Q(8),D()()(),k(9,"div")(10,"a",7)(11,"mat-icon"),Q(12,"open_in_new"),D()()()()()),t&2){let e=n.$implicit;T(5),dt(e.clinic.name),T(3),dt(e.clinic.address),T(2),E("routerLink",Eo(3,uUt,e.clinic.id.ik,e.clinic.id.sn))}}function hUt(t,n){if(t&1){let e=tt();k(0,"div")(1,"div",8)(2,"button",9),ie("click",function(){se(e);let o=P();return ae(o.deleteHistory())}),Q(3," Historie l\xF6schen "),D()()()}}var A4e=(()=>{class t{constructor(e){this._historyService=e,this.history=this._historyService.get()}deleteHistory(){this._historyService.deleteAll(),this.history=[]}static{this.\u0275fac=function(i){return new(i||t)(_e(IZ))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-search-history"]],decls:7,vars:1,consts:[[1,"mat-subheading-2"],[1,"clinic-items"],[1,"clinic-item"],[1,"flex","flex-row"],[1,"flex-1"],[1,"mat-body-1"],[1,"mat-body-2"],["mat-icon-button","","color","accent",3,"routerLink"],[1,"flex","flex-row-reverse"],["mat-button","",3,"click"]],template:function(i,o){i&1&&(k(0,"div")(1,"span",0),Q(2,"Zuletzt gesucht"),D()(),k(3,"div",1),lo(4,pUt,13,6,"div",2,jo),qe(6,hUt,4,0,"div"),D()),i&2&&(T(4),co(o.history),T(2),Ke((o.history==null?null:o.history.length)>0?6:-1))},dependencies:[Tn,yo,xl,Bs,$o,mr],styles:[".clinic-items[_ngcontent-%COMP%]{padding:24px 12px}"]})}}return t})();var mUt=(t,n)=>["/clinics","single",t,n];function fUt(t,n){if(t&1&&(k(0,"div",8)(1,"div",9)(2,"div",10)(3,"div")(4,"span",2),Q(5),D()(),k(6,"div")(7,"span",11),Q(8),D()()(),k(9,"div")(10,"span",11),Q(11),Xn(12,"number"),D()(),k(13,"div")(14,"a",12)(15,"mat-icon"),Q(16,"open_in_new"),D()()()()()),t&2){let e=n.$implicit;T(5),dt(e.clinic.name),T(3),dt(e.clinic.address.toString()),T(3),Qi("",Ls(12,4,e.geometry.distance/1e3,"1.0-1")," km"),T(3),E("routerLink",Eo(7,mUt,e.clinic.id.ik,e.clinic.id.sn))}}function gUt(t,n){if(t&1&&(k(0,"div",6),lo(1,fUt,17,10,"div",8,jo),D()),t&2){let e=P(2);T(),co(e.clinics)}}function _Ut(t,n){t&1&&(k(0,"div",7)(1,"span",13),Q(2," Standort Zugriff f\xFCr Browser nicht aktiviert. "),D()())}function yUt(t,n){if(t&1&&qe(0,gUt,3,0,"div",6)(1,_Ut,3,0,"div",7),t&2){let e=P();Ke(e.position?0:1)}}var k4e=(()=>{class t{constructor(e){this._clinicService=e,this.loading$=new pi(1),this.activeDistance=0,this._distances={0:1e4,1:25e3,2:5e4}}ngOnInit(){this.loading$.next(Gt.LOADING),navigator.geolocation?navigator.geolocation.getCurrentPosition(e=>{this.position=e,this._updateClinics()},e=>{console.error("Geolocation is not supported by this browser.",e.message),this.loading$.next(Gt.SUCCESS)}):(console.error("Geolocation is not supported by this browser."),this.loading$.next(Gt.SUCCESS))}onSelectedDistanceChange(e){this._updateClinics(this._distances[e.value])}_updateClinics(e=this._distances[0]){this.loading$.next(Gt.LOADING),this.position?this._clinicService.searchByDistance(this.position.coords.latitude,this.position.coords.longitude,e).pipe(Sn(1)).subscribe(i=>{this.clinics=i,this.loading$.next(Gt.SUCCESS)}):this.loading$.next(Gt.SUCCESS)}static{this.\u0275fac=function(i){return new(i||t)(_e(cl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-search-geolocation"]],decls:19,vars:8,consts:[["successTpl",""],[1,"mat-subheading-2"],[1,"mat-body-1"],[3,"change"],[3,"value","checked"],[3,"loadItem","successTemplate"],[1,"clinic-items"],[1,"empty-container"],[1,"clinic-item"],[1,"flex","flex-row"],[1,"flex-1"],[1,"mat-body-2"],["mat-icon-button","","color","accent",3,"routerLink"],[1,"mat-caption"]],template:function(i,o){if(i&1){let r=tt();k(0,"div")(1,"span",1),Q(2,"Kliniken in Ihrer N\xE4he"),D()(),k(3,"div")(4,"span",2),Q(5,"Umkreis"),D(),k(6,"mat-radio-group",3),ie("change",function(d){return se(r),ae(o.onSelectedDistanceChange(d))}),k(7,"mat-radio-button",4)(8,"span"),Q(9,"10 Km"),D()(),k(10,"mat-radio-button",4)(11,"span"),Q(12,"25 Km"),D()(),k(13,"mat-radio-button",4)(14,"span"),Q(15,"50 Km"),D()()()(),ce(16,"bd-loader",5),ee(17,yUt,2,1,"ng-template",null,0,Pt)}if(i&2){let r=ti(18);T(7),E("value",0)("checked",o.activeDistance===0),T(3),E("value",1)("checked",o.activeDistance===1),T(3),E("value",2)("checked",o.activeDistance===2),T(3),E("loadItem",o.loading$)("successTemplate",r)}},dependencies:[Nx,gb,Ay,Kn,Tn,xl,Bs,$o,mr,Ta],styles:[".clinic-items[_ngcontent-%COMP%]{padding:24px 0}.clinic-item[_ngcontent-%COMP%]{margin:12px 0}.empty-container[_ngcontent-%COMP%]{padding:24px 0;color:#0000008a}"]})}}return t})();var M4e=(()=>{class t{constructor(e,i){this._router=e,this._historyService=i}onClinicSelect(e){this._historyService.push({clinic:e});let i=e.id,o=["/clinics","single",i.ik,i.sn];this._router.navigate(o).catch(console.error)}static{this.\u0275fac=function(i){return new(i||t)(_e(dl),_e(IZ))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-search-form"]],decls:1,vars:0,consts:[[3,"clinicSelect"]],template:function(i,o){i&1&&(k(0,"ays-clinic-select",0),ie("clinicSelect",function(s){return o.onClinicSelect(s)}),D())},dependencies:[Vx],encapsulation:2})}}return t})();var O4e=(()=>{class t{constructor(){this.helpButtonOptions=d_}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:15,vars:1,consts:[[1,"toolbar-spacer"],["key","ays_clinic_browser",3,"options"],[1,"content"],[1,"flex","flex-col","gap-4"],[1,"flex-1"],[1,"flex","flex-col","md:flex-row","gap-4"],[1,"flex-1","order-2","md:order-1"],[1,"flex-1","order-1","md:order-2"]],template:function(i,o){i&1&&(k(0,"bd-toolbar")(1,"span"),Q(2,"Klinik-Browser"),D(),ce(3,"div",0)(4,"bd-help-button",1),D(),k(5,"div",2)(6,"div",3)(7,"div",4),ce(8,"ays-clinic-search-form"),D(),k(9,"div",4)(10,"div",5)(11,"div",6),ce(12,"ays-clinic-search-geolocation"),D(),k(13,"div",7),ce(14,"ays-clinic-search-history"),D()()()()()),i&2&&(T(4),E("options",o.helpButtonOptions))},dependencies:[Ga,af,M4e,k4e,A4e],styles:[".content[_ngcontent-%COMP%]{padding:24px}.toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}}return t})();var vUt=()=>({notAuthenticatedStrategy:"disable"});function bUt(t,n){t&1&&(k(0,"tr")(1,"th",7),Q(2," Name "),ce(3,"p-sortIcon",8),D(),k(4,"th",9),Q(5," Fachbereich "),ce(6,"p-sortIcon",10),D(),k(7,"th",11),Q(8," Vollstation\xE4re F\xE4lle "),ce(9,"p-sortIcon",12),D(),k(10,"th",13),Q(11," Teilstation\xE4re F\xE4lle "),ce(12,"p-sortIcon",14),D(),ce(13,"th"),D())}function CUt(t,n){if(t&1&&(k(0,"tr")(1,"td"),Q(2),D(),k(3,"td"),Q(4),Xn(5,"fabKey"),Xn(6,"async"),D(),k(7,"td"),Q(8),Xn(9,"number"),D(),k(10,"td"),Q(11),Xn(12,"number"),D(),k(13,"td"),ce(14,"bd-conditional-authenticated-link",15),D()()),t&2){let e=n.$implicit,i=P(2);T(2),Qi(" ",e.name," "),T(2),Qi(" ",Nr(6,9,Nr(5,7,e.fabKey))," "),T(4),Qi(" ",Ls(9,11,e.fullyInpatientCases,"1.0-0")," "),T(3),Qi(" ",Ls(12,14,e.semiInpatientCases,"1.0-0")," "),T(3),E("link",i.createLink(e))("authenticated",i.authenticated)("config",uo(17,vUt))}}function xUt(t,n){if(t&1&&(k(0,"p-table",4),ee(1,bUt,14,0,"ng-template",5)(2,CUt,15,18,"ng-template",6),D()),t&2){let e=P();E("value",e.specialtyDepartments)("sortOrder",-1)}}function wUt(t,n){t&1&&(k(0,"span",16),Q(1,"Es wurden keine Fachabteilungen gefunden"),D())}var R4e=(()=>{class t{constructor(e){this._specialtyDepartmentService=e,this.authenticated=!1,this.loading$=new pi(1),this.specialtyDepartments=[]}ngOnChanges(e){e.clinicId&&e.clinicId.currentValue&&(this.loading$.next(Gt.LOADING),this._specialtyDepartmentService.getByClinicId(this.clinicId).subscribe({next:i=>{this.specialtyDepartments=i,this.loading$.next(Gt.SUCCESS)},error:()=>this.loading$.next(Gt.ERROR)}))}createLink(e){return{type:"icon",icon:"open_in_new",path:["departments",e.id.key]}}static{this.\u0275fac=function(i){return new(i||t)(_e(gm))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-specialty-departments"]],inputs:{clinicId:"clinicId",authenticated:"authenticated"},features:[Ot],decls:8,vars:3,consts:[["successTpl",""],["noResults",""],[1,"mat-headline-4"],[3,"loadItem","successTemplate","errorTemplate"],["dataKey","id.key","sortField","fullyInpatientCases",3,"value","sortOrder"],["pTemplate","header"],["pTemplate","body"],["pSortableColumn","name"],["field","name"],["pSortableColumn","fabKey"],["field","fabKey"],["pSortableColumn","fullyInpatientCases"],["field","fullyInpatientCases"],["pSortableColumn","semiInpatientCases"],["field","semiInpatientCases"],[3,"link","authenticated","config"],[1,"mat-caption"]],template:function(i,o){if(i&1&&(k(0,"div")(1,"span",2),Q(2,"Fachabteilungen"),D()(),ce(3,"bd-loader",3),ee(4,xUt,3,2,"ng-template",null,0,Pt)(6,wUt,2,0,"ng-template",null,1,Pt)),i&2){let r=ti(5),s=ti(7);T(3),E("loadItem",o.loading$)("successTemplate",r)("errorTemplate",s)}},dependencies:[Kn,JC,hc,hl,so,ME,OE,qd,Ta,pBe],encapsulation:2})}}return t})();function SUt(t,n){t&1&&(k(0,"tr")(1,"th"),Q(2,"Name"),D(),k(3,"th"),Q(4,"Leistungsgruppen Erf\xFCllt/Gesamt"),D(),k(5,"th"),Q(6,"Pr\xFCfung"),D()())}function TUt(t,n){t&1&&ce(0,"bd-color-select-example",5),t&2&&E("colorString","#38C477")}function IUt(t,n){t&1&&ce(0,"bd-color-select-example",5),t&2&&E("colorString","#F2543D")}function EUt(t,n){if(t&1&&(k(0,"tr",3)(1,"td"),ce(2,"p-treeTableToggler",4),Q(3),D(),k(4,"td"),Q(5),D(),k(6,"td"),qe(7,TUt,1,1,"bd-color-select-example",5),qe(8,IUt,1,1,"bd-color-select-example",5),D()()),t&2){let e=n.$implicit,i=n.rowData;E("ttRow",e),T(2),E("rowNode",e),T(),Qi(" ",i.name," "),T(2),_d(" ",i.serviceGroupCount.passed,"/",i.serviceGroupCount.total," "),T(2),Ke(i.serviceGroupCount.passed===i.serviceGroupCount.total?7:-1),T(),Ke(i.serviceGroupCount.passed!==i.serviceGroupCount.total?8:-1)}}var F4e=(()=>{class t{ngOnChanges(e){e.bmgCriteriaOverview&&this._buildTreeTableNodes(this.bmgCriteriaOverview)}_buildTreeTableNodes(e){this.treeTableNodes=e.reduce((i,o)=>{let r={label:o.scope.displayName,key:o.scope.id,data:{name:o.scope.displayName,serviceGroupCount:o.serviceGroupCount}};return r.children=o.categories.map(s=>({key:s.category.id,label:s.category.displayName,data:{name:s.category.displayName,serviceGroupCount:s.serviceGroupCount}})),i.push(r),i},[]),console.log(this.treeTableNodes)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-bmg-criteria-overview-table"]],inputs:{bmgCriteriaOverview:"bmgCriteriaOverview"},features:[Ot],decls:3,vars:2,consts:[[3,"value","autoLayout"],["pTemplate","header"],["pTemplate","body"],[3,"ttRow"],[3,"rowNode"],[3,"colorString"]],template:function(i,o){i&1&&(k(0,"p-treeTable",0),ee(1,SUt,7,0,"ng-template",1)(2,EUt,9,7,"ng-template",2),D()),i&2&&E("value",o.treeTableNodes)("autoLayout",!0)},dependencies:[oD,f_,so,nD,iD,In,lq],encapsulation:2})}}return t})();var DUt=()=>["/clinics","single","bmg-criteria"],AUt=(t,n)=>({type:"icon",icon:"open_in_new",path:t,queryParams:n}),kUt=()=>({notAuthenticatedStrategy:"disable"});function MUt(t,n){if(t&1&&ce(0,"bd-conditional-authenticated-link",3),t&2){let e=P();E("link",Eo(4,AUt,uo(3,DUt),e.detailLinkParams))("authenticated",e.authenticated)("config",uo(7,kUt))}}function OUt(t,n){t&1&&ce(0,"bd-message-empty",6)}function RUt(t,n){if(t&1&&ce(0,"ays-clinic-bmg-criteria-overview-table",7),t&2){let e=P(3);E("bmgCriteriaOverview",e.bmgCriteriaOverview)}}function FUt(t,n){if(t&1&&(qe(0,OUt,1,0,"bd-message-empty",6),qe(1,RUt,1,1,"ays-clinic-bmg-criteria-overview-table",7)),t&2){let e=P(2);Ke(e.bmgCriteriaOverview?-1:0),T(),Ke(e.bmgCriteriaOverview?1:-1)}}function PUt(t,n){if(t&1&&(ce(0,"bd-loader",5),ee(1,FUt,2,2,"ng-template",null,0,Pt)),t&2){let e=ti(2),i=P();E("loadItem",i.bmgCriteriaOverview$)("successTemplate",e)}}function LUt(t,n){t&1&&ce(0,"bd-message-empty",4),t&2&&E("message","Qualit\xE4tskriterien von Leistungsbereichen und -gruppen sind standortspezifisch und deswegen f\xFCr Gesamtberichte nicht verf\xFCgbar.")}var P4e=(()=>{class t{constructor(e){this._clinicService=e,this.parseInt=parseInt,this.bmgCriteriaOverview$=new hi}ngOnChanges(e){e.clinicId&&(this.detailLinkParams={ik:this.clinicId.ik,sn:this.clinicId.sn},this._fetchData())}_fetchData(){this.bmgCriteriaOverview$.next(Gt.LOADING),this._clinicService.bmgCriteriaOverview([this.clinicId]).subscribe(e=>{e.content&&e.content.length>0?this.bmgCriteriaOverview=e.content[0].overview:this.bmgCriteriaOverview=null,this.bmgCriteriaOverview$.next(Gt.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(_e(cl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-bmg-criteria-overview"]],inputs:{clinicId:"clinicId",year:"year",authenticated:"authenticated"},features:[Ot],decls:7,vars:2,consts:[["bmgCriteriaLoadedTpl",""],[1,"pb-4","flex","flex-row","gap-4","content-center"],[1,"mat-headline-4"],[3,"link","authenticated","config"],[3,"message"],[3,"loadItem","successTemplate"],["message","Keine Kriterien f\xFCr den Standort vorhanden."],[3,"bmgCriteriaOverview"]],template:function(i,o){i&1&&(k(0,"div",1)(1,"div")(2,"span",2),Q(3,"Qualit\xE4tskriterien von Leistungsbereichen und -gruppen"),D()(),qe(4,MUt,1,8,"bd-conditional-authenticated-link",3),D(),qe(5,PUt,3,2)(6,LUt,1,1,"bd-message-empty",4)),i&2&&(T(4),Ke(o.clinicId.sn!=="99"&&o.bmgCriteriaOverview?4:-1),T(),Ke(o.parseInt(o.clinicId.sn)!==99?5:6))},dependencies:[JC,Kn,Rl,F4e],encapsulation:2})}}return t})();var L4e=[{fieldName:"fullyInpatientCases",color:"rgb(66, 48, 117)",displayName:"Vollstation\xE4re F\xE4lle"},{fieldName:"semiInpatientCases",color:"rgb(125, 159, 54)",displayName:"Teilstation\xE4re F\xE4lle"},{fieldName:"outpatientCases",color:"rgb(170, 113, 57)",displayName:"Ambulante F\xE4lle"}];var HN=class{constructor(n,e){this._clinicService=n,this._specialtyDepartmentService=e,this.caseNumberConfigs=L4e,this.caseNumbers$=new pi(1)}_fetchCaseNumbers(n,e){this.caseNumbers$.next(Gt.LOADING);let i;n&&e?i=this._specialtyDepartmentService.caseNumbers(e):n&&(i=this._clinicService.caseNumbers(n)),i.subscribe(o=>{this.caseNumbers=o,this.caseNumbers$.next(Gt.SUCCESS)})}};var NUt=()=>["/clinics","single","case-numbers"],BUt=(t,n)=>({type:"icon",icon:"open_in_new",path:t,queryParams:n}),VUt=()=>({notAuthenticatedStrategy:"disable"});function zUt(t,n){if(t&1&&(k(0,"div",6)(1,"div",7)(2,"span",8),Q(3),Xn(4,"number"),D()(),k(5,"div",7)(6,"span",9),Q(7),D()()()),t&2){let e=P().$implicit,i=P(2);T(3),dt(i.caseNumbers[e.fieldName][i.year]?Nr(4,2,i.caseNumbers[e.fieldName][i.year]):"n/a"),T(4),dt(e.displayName)}}function UUt(t,n){if(t&1&&qe(0,zUt,8,4,"div",6),t&2){let e=n.$implicit,i=P(2);Ke(i.caseNumbers[e.fieldName]?0:-1)}}function HUt(t,n){if(t&1&&(k(0,"div",5),lo(1,UUt,1,1,null,null,jo),D()),t&2){let e=P();T(),co(e.caseNumberConfigs)}}var EZ=(()=>{class t extends HN{constructor(e,i){super(e,i)}ngOnChanges(e){(e.clinicId||e.specialtyDepartmentId)&&(this._fetchCaseNumbers(this.clinicId,this.specialtyDepartmentId),this.specialtyDepartmentId?this.detailLinkParams={ik:this.specialtyDepartmentId.ik,sn:this.specialtyDepartmentId.sn,specialtyDepartmentId:this.specialtyDepartmentId.key}:this.clinicId&&(this.detailLinkParams={ik:this.clinicId.ik,sn:this.clinicId.sn}))}static{this.\u0275fac=function(i){return new(i||t)(_e(cl),_e(gm))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-case-numbers-overview"]],inputs:{clinicId:"clinicId",specialtyDepartmentId:"specialtyDepartmentId",year:"year",authenticated:"authenticated"},features:[ft,Ot],decls:9,vars:10,consts:[["caseNumbersTpl",""],[1,"pb-4","flex","flex-row","gap-4","content-center"],[1,"mat-headline-4"],[3,"link","authenticated","config"],[3,"loadItem","successTemplate"],[1,"flex","flex-row","justify-center"],[1,"grow"],[1,"text-center"],[1,"mat-headline-3"],[1,"mat-headline-6"]],template:function(i,o){if(i&1&&(k(0,"div",1)(1,"div")(2,"span",2),Q(3,"Fallzahlen"),D()(),ce(4,"bd-conditional-authenticated-link",3),D(),k(5,"div"),ce(6,"bd-loader",4),D(),ee(7,HUt,3,0,"ng-template",null,0,Pt)),i&2){let r=ti(8);T(4),E("link",Eo(6,BUt,uo(5,NUt),o.detailLinkParams))("authenticated",o.authenticated)("config",uo(9,VUt)),T(2),E("loadItem",o.caseNumbers$)("successTemplate",r)}},dependencies:[JC,Kn,Ta],encapsulation:2})}}return t})();var jUt=()=>["/clinics","single","beds"],GUt=(t,n)=>({type:"icon",icon:"open_in_new",path:t,queryParams:n}),$Ut=()=>({notAuthenticatedStrategy:"disable"});function qUt(t,n){if(t&1&&ce(0,"bd-conditional-authenticated-link",3),t&2){let e=P();E("link",Eo(4,GUt,uo(3,jUt),e.detailLinkParams))("authenticated",e.authenticated)("config",uo(7,$Ut))}}function KUt(t,n){if(t&1&&(k(0,"div",6)(1,"div",7)(2,"div",8)(3,"span",9),Q(4),Xn(5,"number"),D()(),k(6,"div",8)(7,"span",10),Q(8,"Betten"),D()()()()),t&2){let e=P();T(4),dt(e.beds[e.year]?Nr(5,1,e.beds[e.year]):"n/a")}}var N4e=(()=>{class t{constructor(e){this._clinicService=e,this.beds$=new pi(1)}ngOnChanges(e){e.clinicId&&(this.detailLinkParams={ik:this.clinicId.ik,sn:this.clinicId.sn},this._fetchData())}_fetchData(){this.beds$.next(Gt.LOADING),this._clinicService.beds(this.clinicId).pipe(Sn(1)).subscribe(e=>{this.beds=e,this.beds$.next(Gt.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(_e(cl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-beds-overview"]],inputs:{clinicId:"clinicId",year:"year",authenticated:"authenticated"},features:[Ot],decls:9,vars:3,consts:[["bedsTpl",""],[1,"pb-4","flex","flex-row","gap-4","content-center"],[1,"mat-headline-4"],[3,"link","authenticated","config"],[1,"pb-8"],[3,"loadItem","successTemplate"],[1,"flex","flex-row","justify-center"],[1,"grow"],[1,"text-center"],[1,"mat-headline-3"],[1,"mat-headline-6"]],template:function(i,o){if(i&1&&(k(0,"div",1)(1,"div")(2,"span",2),Q(3,"Betten"),D()(),qe(4,qUt,1,8,"bd-conditional-authenticated-link",3),D(),k(5,"div",4),ce(6,"bd-loader",5),D(),ee(7,KUt,9,3,"ng-template",null,0,Pt)),i&2){let r=ti(8);T(4),Ke(o.detailLinkParams?4:-1),T(2),E("loadItem",o.beds$)("successTemplate",r)}},dependencies:[JC,Kn,Ta],encapsulation:2})}}return t})();var WUt=()=>["/clinics","single","staffing"],YUt=(t,n)=>({type:"icon",icon:"open_in_new",path:t,queryParams:n}),QUt=()=>({notAuthenticatedStrategy:"disable"});function ZUt(t,n){if(t&1&&(k(0,"div",6)(1,"div",7)(2,"div",8)(3,"span",9),Q(4),Xn(5,"number"),D()(),k(6,"div",8)(7,"span",10),Q(8,"\xC4rzte"),D()()(),k(9,"div",7)(10,"div",8)(11,"span",9),Q(12),Xn(13,"number"),D()(),k(14,"div",8)(15,"span",10),Q(16,"Pflegekr\xE4fte"),D()()()()),t&2){let e=P();T(4),dt(e.staffing.medical.total[e.year]?Nr(5,2,e.staffing.medical.total[e.year]):"n/a"),T(8),dt(e.staffing.nursing.total[e.year]?Nr(13,4,e.staffing.nursing.total[e.year]):"n/a")}}var DZ=(()=>{class t{constructor(e,i){this._clinicService=e,this._specialtyDepartmentService=i,this.staffing$=new pi(1)}ngOnChanges(e){(e.clinicId||e.specialtyDepartmentId)&&this._fetchStaffing()}_fetchStaffing(){this.staffing$.next(Gt.LOADING);let e;this.specialtyDepartmentId?(this.detailLinkParams={ik:this.specialtyDepartmentId.ik,sn:this.specialtyDepartmentId.sn,specialtyDepartmentId:this.specialtyDepartmentId.key},e=this._specialtyDepartmentService.staffing(this.specialtyDepartmentId)):this.clinicId&&(this.detailLinkParams={ik:this.clinicId.ik,sn:this.clinicId.sn},e=this._clinicService.staffing(this.clinicId)),e.subscribe(i=>{this.staffing=i,this.staffing$.next(Gt.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(_e(cl),_e(gm))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-staffing-overview"]],inputs:{clinicId:"clinicId",specialtyDepartmentId:"specialtyDepartmentId",year:"year",authenticated:"authenticated"},features:[Ot],decls:9,vars:10,consts:[["chartsTpl",""],[1,"pb-4","flex","flex-row","gap-4","content-center"],[1,"mat-headline-4"],[3,"link","authenticated","config"],[1,"pb-8"],[3,"loadItem","successTemplate"],[1,"flex","flex-row","justify-center"],[1,"grow"],[1,"text-center"],[1,"mat-headline-3"],[1,"mat-headline-6"]],template:function(i,o){if(i&1&&(k(0,"div",1)(1,"div")(2,"span",2),Q(3,"Personal"),D()(),ce(4,"bd-conditional-authenticated-link",3),D(),k(5,"div",4),ce(6,"bd-loader",5),ee(7,ZUt,17,6,"ng-template",null,0,Pt),D()),i&2){let r=ti(8);T(4),E("link",Eo(6,YUt,uo(5,WUt),o.detailLinkParams))("authenticated",o.authenticated)("config",uo(9,QUt)),T(2),E("loadItem",o.staffing$)("successTemplate",r)}},dependencies:[JC,Kn,Ta],encapsulation:2})}}return t})();var AZ=(t,n)=>["/clinics","single",t,n];function XUt(t,n){if(t&1&&(k(0,"a",5)(1,"span"),Q(2),D()()),t&2){let e=n.$implicit;E("routerLink",Eo(2,AZ,e.ik,e.sn)),T(2),Qi("Standort ",e.sn)}}function JUt(t,n){if(t&1&&(k(0,"div")(1,"div",6)(2,"a",5)(3,"span"),Q(4,"Gesamte Klinik"),D()()()()),t&2){let e=P(3);T(2),E("routerLink",Eo(1,AZ,e.locations.mainLocation.ik,e.locations.mainLocation.sn))}}function e8t(t,n){if(t&1&&(k(0,"div",3)(1,"span"),Q(2,"Weitere Standorte"),D()(),k(3,"div",4),lo(4,XUt,3,5,"a",5,jo),qe(6,JUt,5,4,"div"),D()),t&2){let e=P(2);T(4),co(e.locations.otherLocations),T(2),Ke(e.locations.mainLocation?6:-1)}}function t8t(t,n){if(t&1&&(k(0,"a",5)(1,"span"),Q(2),D()()),t&2){let e=n.$implicit;E("routerLink",Eo(2,AZ,e.ik,e.sn)),T(2),Qi("Standort ",e.sn)}}function i8t(t,n){if(t&1&&(k(0,"div",7)(1,"div",6)(2,"a",5)(3,"span"),Q(4,"Gesamte Klinik"),D()()()()),t&2){let e=P(3);T(2),E("routerLink",Eo(1,AZ,e.locations.mainLocation.ik,e.locations.mainLocation.sn))}}function n8t(t,n){if(t&1&&(k(0,"div",3)(1,"span"),Q(2,"Standorte"),D()(),k(3,"div",4),lo(4,t8t,3,5,"a",5,jo),qe(6,i8t,5,4,"div",7),D()),t&2){let e=P(2);T(4),co(e.locations.childLocations),T(2),Ke(e.locations.mainLocation?6:-1)}}function o8t(t,n){if(t&1&&(k(0,"div",2),qe(1,e8t,7,1),qe(2,n8t,7,1),D()),t&2){let e=P();T(),Ke(e.locations.otherLocations?1:-1),T(),Ke(e.locations.childLocations?2:-1)}}var B4e=(()=>{class t{constructor(e){this._clinicService=e,this.locations$=new pi(1)}ngOnChanges(e){e.activeLocationId&&e.activeLocationId.currentValue&&(this.locations$.next(Gt.LOADING),this._clinicService.locations(this.activeLocationId).pipe(Sn(1)).subscribe(i=>{this.locations=i,this.locations$.next(Gt.SUCCESS)}))}static{this.\u0275fac=function(i){return new(i||t)(_e(cl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-locations"]],inputs:{activeLocationId:"activeLocationId"},features:[Ot],decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[1,"bd-container-inner"],[1,"mat-caption"],[1,"flex","flex-row","gap-4","flex-wrap"],["mat-button","","color","accent",3,"routerLink"],[1,"flex","flex-row","justify-end"],[1,"grow"]],template:function(i,o){if(i&1&&(ce(0,"bd-loader",1),ee(1,o8t,3,2,"ng-template",null,0,Pt)),i&2){let r=ti(2);E("loadItem",o.locations$)("successTemplate",r)}},dependencies:[Kn,Tn,yo,Bs],encapsulation:2})}}return t})();var r8t=()=>["/geographic"],s8t=(t,n)=>({ik:t,sn:n});function a8t(t,n){if(t&1&&(k(0,"div",7)(1,"a",8),ce(2,"ays-static-map",9),D()()),t&2){let e=P();T(),E("routerLink",uo(4,r8t))("queryParams",Eo(5,s8t,e.clinic.id.ik,e.clinic.id.sn)),T(),E("points",e.points)("mapOptions",e.mapOptons)}}var V4e=(()=>{class t{constructor(){this.mapOptons=mt(be({},hW),{style:"mapbox://styles/mapbox/light-v11"})}ngOnChanges(e){e.clinic&&(this.points=this.clinic.address.location?[this.clinic.address.location]:null)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-header"]],inputs:{clinic:"clinic"},features:[Ot],decls:38,vars:13,consts:[[1,"flex","flex-col","md:flex-row"],[1,"md:w-1/2","order-2","md:order-1"],[1,"bd-container-inner","facts"],[1,"data"],[1,"mat-caption"],[1,"mat-body-1"],[3,"activeLocationId"],[1,"md:w-1/2","map-container","order-1","md:order-2"],[3,"routerLink","queryParams"],[3,"points","mapOptions"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),Q(5,"ID"),D(),k(6,"span",5),Q(7),D()(),k(8,"div",3)(9,"span",4),Q(10,"Tr\xE4gerart"),D(),k(11,"span",5),Q(12),Xn(13,"displayClinicType"),D()(),k(14,"div",3)(15,"span",4),Q(16,"Adresse"),D(),k(17,"span",5),Q(18),D()(),k(19,"div",3)(20,"span",4),Q(21,"Tr\xE4ger"),D(),k(22,"span",5),Q(23),D()(),k(24,"div",3)(25,"span",4),Q(26,"Gr\xF6\xDFe"),D(),k(27,"span",5),Q(28),Xn(29,"displayClinicSize"),D()(),k(30,"div",3)(31,"span",4),Q(32,"Versorgungslevel"),D(),k(33,"span",5),Q(34),D()()(),k(35,"div"),ce(36,"ays-clinic-locations",6),D()(),qe(37,a8t,3,8,"div",7),D()),i&2&&(T(7),_d("IK: ",o.clinic.id.ik," | SN : ",o.clinic.id.sn),T(5),dt(Nr(13,9,o.clinic.type)),T(6),dt(o.clinic.address.toString()),T(5),dt(o.clinic.nameOfOwner),T(5),dt(Nr(29,11,o.clinic.size)),T(6),dt(o.clinic.level.displayName.de),T(2),E("activeLocationId",o.clinic.id),T(),Ke(o.points?37:-1))},dependencies:[B4e,Bs,bPe,LN,Wc],styles:[".data[_ngcontent-%COMP%]{padding:4px 0}.data[_ngcontent-%COMP%] .mat-caption[_ngcontent-%COMP%]{display:inline-block;width:110px}.map-container[_ngcontent-%COMP%]{height:335px}"]})}}return t})();var l8t=()=>["/clinics"],z4e=(()=>{class t{constructor(e,i){this._activatedRoute=e,this._authenticationService=i,this.selectedYear=Cd.toString(),this.helpButtonOptions=d_,this._authenticationService.authentication$.subscribe(o=>{this.authenticated=o}),this._activatedRoute.data.subscribe(o=>this._onRouteDataChange(o))}_onRouteDataChange(e){this.clinic=e.clinic}static{this.\u0275fac=function(i){return new(i||t)(_e(vl),_e(vp))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-show"]],decls:27,vars:19,consts:[[1,"header"],[1,"toolbar-spacer"],["key","ays_clinic_browser",3,"options"],[3,"clinic"],[1,"bd-container"],[1,"flex","flex-col","md:flex-row","gap-4"],[1,"md:w-2/3"],[3,"clinicId","year","authenticated"],[1,"md:w-1/3"],[1,"bd-container-inner"],[3,"clinicId","authenticated"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"routerLink"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"bd-toolbar")(2,"div")(3,"span"),Q(4),D()(),ce(5,"div",1)(6,"bd-help-button",2),D()(),ce(7,"ays-clinic-header",3),k(8,"div",4)(9,"div",5)(10,"div",6),ce(11,"ays-clinic-staffing-overview",7),D(),k(12,"div",8),ce(13,"ays-clinic-beds-overview",7),D()()(),k(14,"div",9),ce(15,"ays-clinic-case-numbers-overview",7),D(),k(16,"div",9),ce(17,"ays-clinic-bmg-criteria-overview",7),D(),k(18,"div",9),ce(19,"ays-clinic-specialty-departments",10),D(),ce(20,"mat-divider"),k(21,"div",9)(22,"div",11)(23,"div")(24,"button",12)(25,"span"),Q(26,"Neue Suche"),D()()()()()),i&2&&(T(4),dt(o.clinic.name),T(2),E("options",o.helpButtonOptions),T(),E("clinic",o.clinic),T(4),E("clinicId",o.clinic.id)("year",o.selectedYear)("authenticated",o.authenticated),T(2),E("clinicId",o.clinic.id)("year",o.selectedYear)("authenticated",o.authenticated),T(2),E("clinicId",o.clinic.id)("year",o.selectedYear)("authenticated",o.authenticated),T(2),E("clinicId",o.clinic.id)("year",o.selectedYear)("authenticated",o.authenticated),T(2),E("clinicId",o.clinic.id)("authenticated",o.authenticated),T(5),E("routerLink",uo(18,l8t)))},dependencies:[Ga,af,V4e,DZ,N4e,EZ,P4e,R4e,il,Gl,Tn,yo,Bs],styles:[".bd-container-inner[_ngcontent-%COMP%] mat-divider[_ngcontent-%COMP%]{margin:24px 0}.toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}}return t})();var jN=class extends Sh{constructor(n,e,i,o){super(),this._specialtyDepartmentService=n,this._specialtyDepartmentId=e,this._codingSystem=i,this._totalCodeCount=o}getExport(){let n=new Pr;return n=n.set("size",this._totalCodeCount.toString()),n=n.set("page","0"),Wl(this._specialtyDepartmentService.codesWithParams(this._specialtyDepartmentId,this._codingSystem,n)).then(e=>(this._codingSystem==="G-DRG"?this._codeCounts=e:this._codeCounts=e.content,this._codeCounts)).then(e=>({data:e.map(i=>[{value:i.code.name,type:"string"},{value:Math.round(i.count),type:"number"}]),fields:["Ziffer","Anzahl"]}))}};function c8t(t,n){if(t&1&&(k(0,"div",0),ce(1,"bd-chart-canvas",1),D()),t&2){let e=P();T(),E("chartConfig",e.chartConfig)}}var kZ=(()=>{class t extends dr{constructor(){super(...arguments),this.codeCount=[]}ngOnInit(){this._updateChart(this.codeCount)}ngOnDestroy(){this.unsubscribeAll()}_updateChart(e){let i=[],o=[];this.hasData=!!e.length&&e.length>0,e.forEach(r=>{i.push(r.code.name),o.push(r.count<0?null:r.count)}),this.chartConfig={type:"bar",data:{labels:i,datasets:[{label:"Anzahl",backgroundColor:this.color,borderColor:this.color,data:o}]},options:{maintainAspectRatio:!1,plugins:{tooltip:be({},_u)}}}}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Rt(t)))(o||t)}})()}static{this.\u0275cmp=ne({type:t,selectors:[["ays-specialty-department-codes-chart"]],inputs:{codeCount:"codeCount",color:"color"},features:[ft],decls:1,vars:1,consts:[[1,"container"],[3,"chartConfig"]],template:function(i,o){i&1&&qe(0,c8t,2,1,"div",0),i&2&&Ke(o.hasData?0:-1)},dependencies:[Cp],styles:[".container[_ngcontent-%COMP%]{height:550px}"]})}}return t})();var U4e=(()=>{class t{transform(e){let i=new Ta("de-DE");return e<0?"Datenschutz (Anzahl < 4)":i.transform(e,"1.0-0")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=Dd({name:"codeCount",type:t,pure:!0})}}return t})();function d8t(t,n){t&1&&(k(0,"tr")(1,"th"),Q(2,"Ziffer"),D(),k(3,"th"),Q(4,"Anzahl"),D()())}function u8t(t,n){if(t&1&&(k(0,"tr")(1,"td"),ce(2,"ays-code-info",5),D(),k(3,"td"),Q(4),Xn(5,"codeCount"),D()()),t&2){let e=n.$implicit,i=P(2);T(2),E("name",e.code.name)("codingSystem",i.codingSystem)("options",i.codeInfoOptions),T(2),dt(Nr(5,4,e.count))}}function p8t(t,n){if(t&1&&(k(0,"p-table",1),ee(1,d8t,5,0,"ng-template",3)(2,u8t,6,6,"ng-template",4),D()),t&2){let e=P();E("value",e.codeCount)}}function h8t(t,n){t&1&&(k(0,"div",2)(1,"div",6)(2,"span",7),Q(3,"Keine Ziffern vorhanden"),D()()())}function m8t(t,n){t&1&&(k(0,"div",2)(1,"div",6)(2,"span",7),Q(3,"Keine Ziffern vorhanden"),D()()())}var MZ=(()=>{class t{constructor(){this.codeCount=[],this.codeInfoOptions={viewState:"dialog"}}ngOnInit(){this.hasData=this.codeCount.length>0}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-specialty-department-codes-table"]],inputs:{codeCount:"codeCount",codingSystem:"codingSystem"},decls:4,vars:1,consts:[["empty",""],["dataKey","row.code.name","styleClass","p-datatable-sm p-datatable-striped",3,"value"],[1,"flex","flex-row"],["pTemplate","header"],["pTemplate","body"],[3,"name","codingSystem","options"],[1,"empty-container"],[1,"mat-body-1"]],template:function(i,o){i&1&&(qe(0,p8t,3,1,"p-table",1)(1,h8t,4,0,"div",2),ee(2,m8t,4,0,"ng-template",null,0,Pt)),i&2&&Ke(o.hasData?0:1)},dependencies:[CNe,hc,hl,so,U4e],styles:[".empty-container[_ngcontent-%COMP%]{margin:64px 0}"]})}}return t})();function f8t(t,n){if(t&1&&(k(0,"div",8)(1,"div",3),ce(2,"ays-specialty-department-codes-table",9),D(),k(3,"div",3),ce(4,"ays-specialty-department-codes-chart",10),D()()),t&2){let e=P();T(2),E("codeCount",e.codeCount)("codingSystem",e.codingSystem),T(2),E("codeCount",e.codeCount)("color",e.color)}}var H4e=(()=>{class t extends dr{constructor(e){super(),this._specialtyDepartmentService=e,this.exportConfig=mt(be({},hg),{form:{defaultLabels:["Klinik-Browser"],availableExportTypes:["csv","xlsx"]}}),this.loading$=new pi(1),this.filterQuery="",this.resultsLength=0,this.codeCount=[],this._filterQueryChange$=new hi}ngOnInit(){this.loading$.next(Gt.LOADING),this.exportFilename=`Klinik-Browser_Fachabteilung_${this.codingSystem}`}ngAfterViewInit(){let e=ku(this.paginator.page,this._filterQueryChange$.asObservable().pipe(id(500))).pipe(rl({}),Vo(()=>this.loading$.next(Gt.LOADING)),Mn(()=>{let i=this.paginator||{pageIndex:0,pageSize:10},o=new Pr;return o=o.set("page",i.pageIndex.toString()),o=o.set("size",i.pageSize.toString()),this.filterQuery&&this.filterQuery.length>0&&(o=o.set("q",this.filterQuery)),this._specialtyDepartmentService.codesWithParams(this.specialtyDepartmentIdentifier,this.codingSystem,o)})).subscribe(i=>{this.paginator.length=i.totalElements,this.resultsLength=i.totalElements,this.codeCount=i.content,this.exportConverter=new jN(this._specialtyDepartmentService,this.specialtyDepartmentIdentifier,this.codingSystem,this.resultsLength),this.loading$.next(Gt.SUCCESS)},()=>this.loading$.next(Gt.ERROR));this._subs.push(e)}ngOnDestroy(){this.unsubscribeAll()}onFilterQueryChange(e){this.filterQuery=e,this._filterQueryChange$.next(e)}static{this.\u0275fac=function(i){return new(i||t)(_e(gm))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-specialty-department-codes-pageable"]],viewQuery:function(i,o){if(i&1&&Ri(Wv,5),i&2){let r;Le(r=Ne())&&(o.paginator=r.first)}},inputs:{specialtyDepartmentIdentifier:"specialtyDepartmentIdentifier",codingSystem:"codingSystem",color:"color"},features:[ft],decls:15,vars:8,consts:[["successTpl",""],[1,"flex","flex-col","gap-4"],[1,"flex","flex-row","gap-4"],[1,"flex-1"],["matInput","",3,"ngModelChange","ngModel"],[3,"data","config","filename"],[3,"loadItem","successTemplate"],[3,"length","pageSize"],[1,"flex","flex-col","md:flex-row","gap-4"],[3,"codeCount","codingSystem"],[3,"codeCount","color"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",1)(1,"div",2)(2,"div",3)(3,"mat-form-field")(4,"mat-label"),Q(5,"Suchen"),D(),k(6,"input",4),ie("ngModelChange",function(d){return se(r),ae(o.onFilterQueryChange(d))}),D()()(),k(7,"div"),ce(8,"bd-export-as-file",5),D()(),k(9,"div",3),ce(10,"bd-loader",6),D(),k(11,"div",3),ce(12,"mat-paginator",7),D()(),ee(13,f8t,5,4,"ng-template",null,0,Pt)}if(i&2){let r=ti(14);T(6),E("ngModel",o.filterQuery),T(2),E("data",o.exportConverter)("config",o.exportConfig)("filename",o.exportFilename),T(2),E("loadItem",o.loading$)("successTemplate",r),T(2),E("length",o.resultsLength)("pageSize",10)}},dependencies:[Ra,rs,Ol,pl,Fa,xr,Ml,no,hr,Lr,Sd,Kn,tx,Wv,MZ,kZ],styles:["mat-form-field[_ngcontent-%COMP%], mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}"]})}}return t})();function g8t(t,n){if(t&1&&(k(0,"div",5)(1,"div"),ce(2,"bd-export-as-file",6),D()(),k(3,"div",7)(4,"div",8),ce(5,"ays-specialty-department-codes-table",9),D(),k(6,"div",8),ce(7,"ays-specialty-department-codes-chart",10),D()()),t&2){let e=P();T(2),E("data",e.exportData),T(3),E("codeCount",e.codeCount)("codingSystem","G-DRG"),T(2),E("codeCount",e.codeCount)("color","rgba(137, 47, 102, 1)")}}var j4e=(()=>{class t extends dr{constructor(e){super(),this._specialtyDepartmentService=e,this.codeCount=[],this.loading$=new pi(1)}ngOnInit(){this.loading$.next(Gt.LOADING);let e=this._specialtyDepartmentService.codes(this.specialtyDepartmentIdentifier,"G-DRG",{pageSize:10,pageIndex:0}).subscribe(i=>{this.codeCount=i,this.exportData=new jN(this._specialtyDepartmentService,this.specialtyDepartmentIdentifier,"G-DRG",10),this.loading$.next(Gt.SUCCESS)},()=>this.loading$.next(Gt.ERROR));this._subs.push(e)}ngOnDestroy(){this.unsubscribeAll()}static{this.\u0275fac=function(i){return new(i||t)(_e(gm))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-specialty-department-codes"]],inputs:{specialtyDepartmentIdentifier:"specialtyDepartmentIdentifier"},features:[ft],decls:22,vars:8,consts:[["successTpl",""],[1,"mat-headline-4"],[1,"mat-headline-6"],[3,"specialtyDepartmentIdentifier","codingSystem","color"],[3,"loadItem","successTemplate"],[1,"flex","flex-row-reverse"],["filename","Export_DRG",3,"data"],[1,"flex","flex-col","md:flex-row","gap-4"],[1,"flex-1"],[3,"codeCount","codingSystem"],[3,"codeCount","color"]],template:function(i,o){if(i&1&&(k(0,"div")(1,"span",1),Q(2,"Fallspektrum"),D()(),k(3,"div")(4,"div")(5,"span",2),Q(6,"ICD"),D()(),k(7,"div"),ce(8,"ays-specialty-department-codes-pageable",3),D()(),k(9,"div")(10,"div")(11,"span",2),Q(12,"OPS"),D()(),k(13,"div"),ce(14,"ays-specialty-department-codes-pageable",3),D()(),k(15,"div")(16,"div")(17,"span",2),Q(18,"TOP 10: Berechnete DRGs"),D()(),ce(19,"bd-loader",4),ee(20,g8t,8,5,"ng-template",null,0,Pt),D()),i&2){let r=ti(21);T(8),E("specialtyDepartmentIdentifier",o.specialtyDepartmentIdentifier)("codingSystem","ICD-10-GM")("color","rgba(174, 153, 59, 1)"),T(6),E("specialtyDepartmentIdentifier",o.specialtyDepartmentIdentifier)("codingSystem","OPS")("color","rgba(36, 107, 102, 1)"),T(5),E("loadItem",o.loading$)("successTemplate",r)}},dependencies:[H4e,Kn,Sd,MZ,kZ],encapsulation:2})}}return t})();var _8t=(t,n)=>["/clinics","single",t,n],y8t=()=>["/clinics"],G4e=(()=>{class t extends dr{constructor(e,i){super(),this._activatedRoute=e,this._authenticationService=i,this.year=Cd.toString(),this._authenticationService.authentication$.subscribe(r=>{this.authenticated=r});let o=this._activatedRoute.data.subscribe(r=>this._onDataChange(r));this._subs.push(o)}ngOnDestroy(){this.unsubscribeAll()}_onDataChange(e){this.clinic=e.clinic,this.specialtyDepartment=e.specialtyDepartment}static{this.\u0275fac=function(i){return new(i||t)(_e(vl),_e(vp))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],features:[ft],decls:35,vars:19,consts:[[1,"header"],[1,"mat-caption"],[1,"mat-headline"],[1,"bd-container-inner"],[3,"clinicId","specialtyDepartmentId","year","authenticated"],[3,"specialtyDepartmentIdentifier"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"routerLink"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"bd-toolbar")(2,"div")(3,"div",1)(4,"span"),Q(5,"IK: "),D(),k(6,"span"),Q(7),D(),k(8,"span"),Q(9,"; SN: "),D(),k(10,"span"),Q(11),D()(),k(12,"div",1)(13,"span"),Q(14),D()(),k(15,"div",2)(16,"span"),Q(17),D()()()()(),k(18,"div",3),ce(19,"ays-clinic-case-numbers-overview",4),D(),k(20,"div",3),ce(21,"ays-clinic-staffing-overview",4),D(),k(22,"div",3),ce(23,"ays-specialty-department-codes",5),D(),ce(24,"mat-divider"),k(25,"div",3)(26,"div",6)(27,"div")(28,"a",7)(29,"span"),Q(30,"Zur Klinik"),D()()(),k(31,"div")(32,"a",7)(33,"span"),Q(34,"Neue Suche"),D()()()()()),i&2&&(T(7),dt(o.clinic.id.ik),T(4),dt(o.clinic.id.sn),T(3),dt(o.clinic.name),T(3),dt(o.specialtyDepartment.name),T(2),E("clinicId",o.clinic.id)("specialtyDepartmentId",o.specialtyDepartment.id)("year",o.year)("authenticated",o.authenticated),T(2),E("clinicId",o.clinic.id)("specialtyDepartmentId",o.specialtyDepartment.id)("year",o.year)("authenticated",o.authenticated),T(2),E("specialtyDepartmentIdentifier",o.specialtyDepartment.id),T(5),E("routerLink",Eo(15,_8t,o.clinic.id.ik,o.clinic.id.sn)),T(4),E("routerLink",uo(18,y8t)))},dependencies:[Ga,EZ,DZ,j4e,il,Gl,Tn,yo,Bs],styles:[".header[_ngcontent-%COMP%] mat-toolbar{height:96px}.bd-container-inner[_ngcontent-%COMP%] mat-divider[_ngcontent-%COMP%]{margin:24px 0}"]})}}return t})();var $4e=t=>[t];function v8t(t,n){if(t&1&&(Go(0,"div",4)(1,"span",5),Q(2),Ho()()),t&2){let e=P().$implicit;T(2),dt(e)}}function b8t(t,n){if(t&1&&qe(0,v8t,3,1,"div",4),t&2){let e=n.$implicit,i=P();Ke((i.data.total?i.data.total:ki(1,$4e,e)!==void 0)?0:-1)}}function C8t(t,n){if(t&1&&(Go(0,"span",6),Q(1),Xn(2,"number"),Ho()),t&2){let e=P(2).$implicit,i=P(2).$implicit,o=P();T(),dt(Ls(2,1,o.data[i][e],"1.0-1"))}}function x8t(t,n){if(t&1&&(Go(0,"div",4),qe(1,C8t,3,4,"span",6),Ho()),t&2){let e=P().$implicit,i=P(2).$implicit,o=P();T(),Ke(o.data[i]&&o.data[i][e]!==void 0?1:-1)}}function w8t(t,n){if(t&1&&qe(0,x8t,2,1,"div",4),t&2){let e=n.$implicit,i=P(3);Ke((i.data.total?i.data.total:ki(1,$4e,e)!==void 0)?0:-1)}}function S8t(t,n){if(t&1&&(Go(0,"div",0)(1,"div",1)(2,"span",2),Q(3),Xn(4,"staffingType"),Ho()(),lo(5,w8t,1,3,null,null,jo),Ho()),t&2){let e=P().$implicit,i=P();T(3),dt(Nr(4,1,e)),T(2),co(i.years)}}function T8t(t,n){if(t&1&&(Go(0,"div",3),qe(1,S8t,7,3,"div",0),Ho()),t&2){let e=n.$implicit,i=P();T(),Ke(i.subcategoriesToShow[e]?1:-1)}}var pme={showEmptySubcategory:!0},q4e=(()=>{class t{constructor(){this.options=pme,this.subcategoriesToShow={}}ngOnInit(){this.options.showEmptySubcategory?this.subcategoryNames.forEach(e=>this.subcategoriesToShow[e]=!0):this.subcategoryNames.forEach(e=>{let i=!1;this.years.forEach(o=>{i=this.data[e][o]!==void 0?!0:i||!1}),this.subcategoriesToShow[e]=i})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-staffing-subcategories"]],inputs:{years:"years",subcategoryNames:"subcategoryNames",data:"data",options:"options"},decls:8,vars:0,consts:[[1,"flex","flex-row","gap-4"],[1,"basis-56"],[1,"mat-body-strong"],[1,"pb-2"],[1,"flex-1"],[1,"mat-body-1"],[1,"mat-body-1","value"]],template:function(i,o){i&1&&(Go(0,"div",0)(1,"div",1)(2,"span",2),Q(3,"Jahr"),Ho()(),lo(4,b8t,1,3,null,null,jo),Ho(),lo(6,T8t,2,1,"div",3,jo)),i&2&&(T(4),co(o.years),T(2),co(o.subcategoryNames))},dependencies:[Ta,XE],encapsulation:2})}}return t})();var OZ=(()=>{class t{constructor(){this.viewControlChange=new ve}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-staffing-chart-control"]],outputs:{viewControlChange:"viewControlChange"},decls:11,vars:1,consts:[[3,"change"],[1,"flex","flex-row","gap-4"],["value","sum",3,"checked"],["value","subcategories"]],template:function(i,o){i&1&&(k(0,"div")(1,"mat-radio-group",0),ie("change",function(s){return o.viewControlChange.emit(s.value)}),k(2,"div",1)(3,"div")(4,"mat-radio-button",2)(5,"span"),Q(6,"Gesamt"),D()()(),k(7,"div")(8,"mat-radio-button",3)(9,"span"),Q(10,"Kategorien"),D()()()()()()),i&2&&(T(4),E("checked",!0))},dependencies:[Nx,gb,Ay],encapsulation:2})}}return t})();var K4e=(()=>{class t{constructor(){this.dataSets={}}ngOnChanges(e){e.medicalStaffing&&e.medicalStaffing.currentValue&&(this.dataSets.sum=[this.medicalStaffing.chartData("total"," \xC4rzte Gesamt","#AA5139")],this.activeDataSets=this.dataSets.sum,this._createSubcategoriesChartDataSet(),this.chartConfig=this._getChartConfiguration())}onViewControlChange(e){switch(e){case"sum":this.activeDataSets=this.dataSets.sum;break;case"subcategories":this.activeDataSets=this.dataSets.subcategories;break;default:this.activeDataSets=this.dataSets.sum}this.chartConfig=this._getChartConfiguration()}_getChartConfiguration(){return{type:"line",data:{labels:this.medicalStaffing.normalizedYears,datasets:this.activeDataSets},options:{maintainAspectRatio:!1,plugins:{tooltip:be({},_u)},scales:{y:{beginAtZero:!0}}}}}_createSubcategoriesChartDataSet(){this.dataSets.subcategories=[],I8t.forEach(e=>{this.medicalStaffing.hasData(e.fieldName)&&this.dataSets.subcategories.push(this.medicalStaffing.chartData(e.fieldName,e.label,e.color))})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-staffing-medical-chart"]],inputs:{medicalStaffing:"medicalStaffing"},features:[Ot],decls:3,vars:1,consts:[[3,"viewControlChange"],[1,"chart-container"],[3,"chartConfig"]],template:function(i,o){i&1&&(k(0,"ays-clinic-staffing-chart-control",0),ie("viewControlChange",function(s){return o.onViewControlChange(s)}),D(),k(1,"div",1),ce(2,"bd-chart-canvas",2),D()),i&2&&(T(2),E("chartConfig",o.chartConfig))},dependencies:[OZ,Cp],styles:[".chart-container[_ngcontent-%COMP%]{height:300px}"]})}}return t})(),I8t=[{fieldName:"nonSpecialists",label:"Assistenz\xE4rzte",color:"#AAA439"},{fieldName:"inpatientDocs",label:"Beleg\xE4rzte",color:"#512C73"},{fieldName:"medicalSpecialists",label:"Fach\xE4rzte",color:"#28794B"}];var W4e=(()=>{class t{constructor(){this.dataSets={}}ngOnChanges(e){e.nursingStaffing&&e.nursingStaffing.currentValue&&(this.dataSets.sum=[this.nursingStaffing.chartData("total","Pflege Gesamt","#AA5139")],this.activeDataSets=this.dataSets.sum,this._createSubcategoriesChartDataSet(),this.chartConfig=this._getChartConfiguration())}onViewControlChange(e){switch(e){case"sum":this.activeDataSets=this.dataSets.sum;break;case"subcategories":this.activeDataSets=this.dataSets.subcategories;break;default:this.activeDataSets=this.dataSets.sum}this.chartConfig=this._getChartConfiguration()}_getChartConfiguration(){return{type:"line",data:{labels:this.nursingStaffing.normalizedYears,datasets:this.activeDataSets},options:{maintainAspectRatio:!1,plugins:{tooltip:be({},_u)},scales:{y:{beginAtZero:!0}}}}}_createSubcategoriesChartDataSet(){this.dataSets.subcategories=[],E8t.forEach(e=>{this.nursingStaffing.hasData(e.fieldName)&&this.dataSets.subcategories.push(this.nursingStaffing.chartData(e.fieldName,e.label,e.color))})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-staffing-nursing-chart"]],inputs:{nursingStaffing:"nursingStaffing"},features:[Ot],decls:3,vars:1,consts:[[3,"viewControlChange"],[1,"chart-container"],[3,"chartConfig"]],template:function(i,o){i&1&&(k(0,"ays-clinic-staffing-chart-control",0),ie("viewControlChange",function(s){return o.onViewControlChange(s)}),D(),k(1,"div",1),ce(2,"bd-chart-canvas",2),D()),i&2&&(T(2),E("chartConfig",o.chartConfig))},dependencies:[OZ,Cp],styles:[".chart-container[_ngcontent-%COMP%]{height:300px}"]})}}return t})(),E8t=[{fieldName:"deliveryNurses",label:Bx.deliveryNurses,color:"#d2f53c"},{fieldName:"enrolledNurses",label:Bx.enrolledNurses,color:"#fabebe"},{fieldName:"enrolledChildrenNurses",label:Bx.enrolledChildrenNurses,color:"#008080"},{fieldName:"geriatricNurses",label:Bx.geriatricNurses,color:"#aa6e28"},{fieldName:"licensedPracticalNurses",label:Bx.licensedPracticalNurses,color:"#800000"},{fieldName:"hospitalPorters",label:Bx.hospitalPorters,color:"#46f0f0"},{fieldName:"scrubNurses",label:Bx.scrubNurses,color:"#000080"}];var g_=class{static getIdentifierFromParams(n){let e={};return n.ik&&n.sn&&(e.clinicId=new ga(n.ik,n.sn),n.specialtyDepartmentId&&(e.specialtyDepartmentId=new mM(n.ik,n.sn,n.specialtyDepartmentId))),e}static getBackRouterPath(n,e){let i=["/clinics"];return e?i=["/clinics","single",e.ik,e.sn,"departments",e.key]:n&&(i=["/clinics","single",n.ik,n.sn]),i}};function D8t(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P();T(),dt(" - "+e.clinic.name)}}function A8t(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P();T(),dt(": "+e.specialtyDepartment.name)}}function k8t(t,n){if(t&1&&(k(0,"div",17)(1,"span",18),Q(2),D()()),t&2){let e=P().$implicit;T(2),dt(e)}}function M8t(t,n){if(t&1&&qe(0,k8t,3,1,"div",17),t&2){let e=n.$implicit,i=P(2);Ke(i.staffing.medical.total[e]!==void 0?0:-1)}}function O8t(t,n){if(t&1&&(k(0,"div",17)(1,"span",18),Q(2),Xn(3,"number"),D()()),t&2){let e=P().$implicit,i=P(2);T(2),dt(Ls(3,1,i.staffing.medical.total[e],"1.0-1"))}}function R8t(t,n){if(t&1&&qe(0,O8t,4,4,"div",17),t&2){let e=n.$implicit,i=P(2);Ke(i.staffing.medical.total[e]!==void 0?0:-1)}}function F8t(t,n){if(t&1&&(k(0,"div",17)(1,"span",18),Q(2),D()()),t&2){let e=P().$implicit;T(2),dt(e)}}function P8t(t,n){if(t&1&&qe(0,F8t,3,1,"div",17),t&2){let e=n.$implicit,i=P(2);Ke(i.staffing.nursing.total[e]!==void 0?0:-1)}}function L8t(t,n){if(t&1&&(k(0,"div",17)(1,"span",18),Q(2),Xn(3,"number"),D()()),t&2){let e=P().$implicit,i=P(2);T(2),dt(Ls(3,1,i.staffing.nursing.total[e],"1.0-1"))}}function N8t(t,n){if(t&1&&qe(0,L8t,4,4,"div",17),t&2){let e=n.$implicit,i=P(2);Ke(i.staffing.nursing.total[e]!==void 0?0:-1)}}function B8t(t,n){if(t&1&&(k(0,"div")(1,"div",5)(2,"div",6)(3,"span",7),Q(4," \xC4rzte "),D()(),k(5,"div",8),ce(6,"ays-clinic-staffing-medical-chart",9),D(),k(7,"div",10)(8,"div",6)(9,"span",11),Q(10,"Gesamt"),D()(),k(11,"div",12)(12,"div",13)(13,"span",14),Q(14,"Jahr"),D()(),lo(15,M8t,1,1,null,null,jo),D(),k(17,"div",12)(18,"div",13)(19,"span",14),Q(20,"Anzahl"),D()(),lo(21,R8t,1,1,null,null,jo),D()(),k(23,"div")(24,"div",6)(25,"span",11),Q(26,"Kategorien"),D()(),ce(27,"ays-clinic-staffing-subcategories",15),D()(),k(28,"div")(29,"div",6)(30,"span",7),Q(31," Pflege "),D()(),k(32,"div",8),ce(33,"ays-clinic-staffing-nursing-chart",16),D(),k(34,"div",10)(35,"div",6)(36,"span",11),Q(37,"Gesamt"),D()(),k(38,"div",12)(39,"div",13)(40,"span",14),Q(41,"Jahr"),D()(),lo(42,P8t,1,1,null,null,jo),D(),k(44,"div",12)(45,"div",13)(46,"span",14),Q(47,"Anzahl"),D()(),lo(48,N8t,1,1,null,null,jo),D()(),k(50,"div")(51,"div",6)(52,"span",11),Q(53,"Kategorien"),D()(),ce(54,"ays-clinic-staffing-subcategories",15),D()()()),t&2){let e=P();T(6),E("medicalStaffing",e.staffing.medical),T(9),co(e.years),T(6),co(e.years),T(6),E("years",e.years)("subcategoryNames",e.medicalSubcategories)("data",e.staffing.medical)("options",e.options.subcategory),T(6),E("nursingStaffing",e.staffing.nursing),T(9),co(e.years),T(6),co(e.years),T(6),E("years",e.years)("subcategoryNames",e.nursingSubcategories)("data",e.staffing.nursing)("options",e.options.subcategory)}}var V8t={subcategory:pme},Y4e=(()=>{class t{constructor(e,i,o){this._activatedRoute=e,this._clinicService=i,this._specialtyDepartmentService=o,this.options=V8t,this.years=Jw,this.medicalSubcategories=["nonSpecialists","inpatientDocs","medicalSpecialists"],this.nursingSubcategories=["deliveryNurses","enrolledChildrenNurses","enrolledNurses","geriatricNurses","hospitalPorters","licensedPracticalNurses","scrubNurses"],this.staffing$=new pi,this._activatedRoute.queryParams.subscribe(r=>{let s=g_.getIdentifierFromParams(r);this._clinicId=s.clinicId,this._specialtyDepartmentId=s.specialtyDepartmentId,this._loadData(),this._loadStaffing(),this.backRouterPath=g_.getBackRouterPath(this._clinicId,this._specialtyDepartmentId)})}_loadData(){this._clinicId&&this._clinicService.get(this._clinicId).pipe(Sn(1)).subscribe(e=>{this.clinic=e}),this._specialtyDepartmentId&&this._specialtyDepartmentService.get(this._specialtyDepartmentId).pipe(Sn(1)).subscribe(e=>{this.specialtyDepartment=e})}_loadStaffing(){let e;this.staffing$.next(Gt.LOADING),this._specialtyDepartmentId?e=this._specialtyDepartmentService.staffing(this._specialtyDepartmentId):e=this._clinicService.staffing(this._clinicId),e.subscribe(i=>{this.staffing=i,this.staffing$.next(Gt.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(_e(vl),_e(cl),_e(gm))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-staffing-details"]],decls:14,vars:5,consts:[["successTpl",""],[1,"bd-container"],[3,"loadItem","successTemplate"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"routerLink"],[1,"pb-16"],[1,"pb-4"],[1,"mat-headline-4"],[1,"chart-container","mb-4"],[3,"medicalStaffing"],[1,"pb-8"],[1,"mat-headline-5"],[1,"flex","flex-row","gap-4"],[1,"basis-56"],[1,"mat-body-strong"],[3,"years","subcategoryNames","data","options"],[3,"nursingStaffing"],[1,"flex-1"],[1,"mat-body-1"]],template:function(i,o){if(i&1&&(k(0,"bd-toolbar")(1,"span"),Q(2,"Personal"),D(),qe(3,D8t,2,1,"span"),qe(4,A8t,2,1,"span"),D(),k(5,"div",1),ce(6,"bd-loader",2),D(),ee(7,B8t,55,10,"ng-template",null,0,Pt),ce(9,"mat-divider"),k(10,"div",1)(11,"div",3)(12,"a",4),Q(13,"Zur\xFCck"),D()()()),i&2){let r=ti(8);T(3),Ke(o.clinic?3:-1),T(),Ke(o.specialtyDepartment?4:-1),T(2),E("loadItem",o.staffing$)("successTemplate",r),T(6),E("routerLink",o.backRouterPath)}},dependencies:[Ga,Kn,K4e,q4e,W4e,il,Gl,Tn,yo,Bs,Ta],encapsulation:2})}}return t})();var z8t=()=>[5,10,20,25];function U8t(t,n){t&1&&(k(0,"tr")(1,"th"),Q(2,"IK"),D(),k(3,"th"),Q(4,"Standort"),D(),k(5,"th"),Q(6,"Name"),D(),k(7,"th"),Q(8,"Stra\xDFe"),D(),k(9,"th"),Q(10,"Postleitzahl"),D(),k(11,"th"),Q(12,"Ort"),D(),ce(13,"th"),D())}function H8t(t,n){if(t&1&&(k(0,"tr")(1,"td"),Q(2),D(),k(3,"td"),Q(4),D(),k(5,"td"),Q(6),D(),k(7,"td"),Q(8),D(),k(9,"td"),Q(10),D(),k(11,"td"),Q(12),D(),k(13,"td"),ce(14,"ays-clinic-icon-link",3),D()()),t&2){let e=n.$implicit,i=P();T(2),dt(e.clinic.id.ik),T(2),dt(e.clinic.id.sn),T(2),dt(e.clinic.name),T(2),dt(e.clinic.address.street),T(2),dt(e.clinic.address.postalCode),T(2),dt(e.clinic.address.city),T(2),E("clinicId",e.clinic.id)("options",i.clinicLinkOptions)}}var RZ=(()=>{class t{constructor(){this.clinicContainers=[],this.clinicLinkOptions={target:"_self"}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-container-list"]],inputs:{clinicContainers:"clinicContainers",clinicLinkOptions:"clinicLinkOptions"},decls:5,vars:7,consts:[["header",""],["body",""],["stripedRows","","dataKey","id.sn","currentPageReportTemplate","{first} - {last} von {totalRecords} Kliniken",3,"value","paginator","rows","rowsPerPageOptions","pageLinks","showCurrentPageReport"],[3,"clinicId","options"]],template:function(i,o){i&1&&(k(0,"p-table",2),ee(1,U8t,14,0,"ng-template",null,0,Pt)(3,H8t,15,8,"ng-template",null,1,Pt),D()),i&2&&E("value",o.clinicContainers)("paginator",!0)("rows",10)("rowsPerPageOptions",uo(6,z8t))("pageLinks",!1)("showCurrentPageReport",!0)},dependencies:[hc,hl,ZE],encapsulation:2,changeDetection:0})}}return t})();var Q4e=(()=>{class t{ngOnChanges(e){e.caseNumbers&&e.caseNumbers.currentValue&&this._updateChartConfig()}_updateChartConfig(){let e=Object.keys(this.caseNumbers),i=e.map(s=>this.caseNumbers[s]),o=[{label:this.title,data:i,backgroundColor:this.color,borderColor:this.color,fill:!1,tension:0,borderWidth:1}],r={maintainAspectRatio:!1,plugins:{tooltip:be({},_u)},scales:{y:{beginAtZero:!0}}};this.chartConfig={type:"line",data:{labels:e,datasets:o},options:r}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-case-numbers-chart"]],inputs:{caseNumbers:"caseNumbers",title:"title",color:"color"},features:[Ot],decls:1,vars:1,consts:[[3,"chartConfig"]],template:function(i,o){i&1&&ce(0,"bd-chart-canvas",0),i&2&&E("chartConfig",o.chartConfig)},dependencies:[Cp],encapsulation:2})}}return t})();function j8t(t,n){if(t&1&&(k(0,"div",3)(1,"div",4)(2,"span",9),Q(3),D()(),k(4,"div",6)(5,"span",9),Q(6),Xn(7,"number"),D()()()),t&2){let e=n.$implicit,i=P();T(3),dt(e),T(3),dt(Ls(7,2,i.caseNumbers[e],"1.0-0"))}}var Z4e=(()=>{class t{ngOnChanges(e){e.caseNumbers&&(this.labels=Object.keys(this.caseNumbers))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-case-numbers-data"]],inputs:{caseNumbers:"caseNumbers",title:"title",color:"color"},features:[Ot],decls:16,vars:4,consts:[[1,"mat-subheading-2"],[1,"flex","flex-col","sm:flex-row"],[1,"basis-1/3"],[1,"flex","flex-row","gap-4"],[1,"basis-20"],[1,"mat-caption"],[1,"flex-1"],[1,"basis-2/3"],[3,"caseNumbers","title","color"],[1,"mat-body-1"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"span"),Q(2),D()(),k(3,"div",1)(4,"div",2)(5,"div",3)(6,"div",4)(7,"span",5),Q(8,"Jahr"),D()(),k(9,"div",6)(10,"span",5),Q(11,"F\xE4lle"),D()()(),lo(12,j8t,8,5,"div",3,jo),D(),k(14,"div",7),ce(15,"ays-clinic-case-numbers-chart",8),D()()),i&2&&(T(2),dt(o.title),T(10),co(o.labels),T(3),E("caseNumbers",o.caseNumbers)("title",o.title)("color",o.color))},dependencies:[Q4e,Ta],encapsulation:2})}}return t})();function G8t(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P();T(),dt(" - "+e.clinic.name)}}function $8t(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P();T(),dt(": "+e.specialtyDepartment.name)}}function q8t(t,n){if(t&1&&(k(0,"div",6),ce(1,"ays-clinic-case-numbers-data",7),D()),t&2){let e=P().$implicit,i=P(2);T(),E("title",e.displayName)("caseNumbers",i.caseNumbers[e.fieldName])("color",e.color)}}function K8t(t,n){if(t&1&&qe(0,q8t,2,3,"div",6),t&2){let e=n.$implicit,i=P(2);Ke(i.caseNumbers[e.fieldName]?0:-1)}}function W8t(t,n){if(t&1&&(k(0,"div",5),lo(1,K8t,1,1,null,null,jo),D()),t&2){let e=P();T(),co(e.caseNumberConfigs)}}var X4e=(()=>{class t extends HN{constructor(e,i,o){super(i,o),this._activatedRoute=e,this._activatedRoute.queryParams.subscribe(r=>{let s=g_.getIdentifierFromParams(r);this._fetchCaseNumbers(s.clinicId,s.specialtyDepartmentId),this._loadData(s.clinicId,s.specialtyDepartmentId),this.backRouterPath=g_.getBackRouterPath(s.clinicId,s.specialtyDepartmentId)})}_loadData(e,i){e&&this._clinicService.get(e).pipe(Sn(1)).subscribe(o=>{this.clinic=o}),i&&this._specialtyDepartmentService.get(i).pipe(Sn(1)).subscribe(o=>{this.specialtyDepartment=o})}static{this.\u0275fac=function(i){return new(i||t)(_e(vl),_e(cl),_e(gm))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-case-numbers"]],features:[ft],decls:14,vars:5,consts:[["successTpl",""],[1,"bd-container"],[3,"loadItem","successTemplate"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"routerLink"],[1,"flex","flex-col","gap-6"],[1,"flex-1"],[3,"title","caseNumbers","color"]],template:function(i,o){if(i&1&&(k(0,"bd-toolbar")(1,"span"),Q(2,"Fallzahlen"),D(),qe(3,G8t,2,1,"span"),qe(4,$8t,2,1,"span"),D(),k(5,"div",1),ce(6,"bd-loader",2),D(),ee(7,W8t,3,0,"ng-template",null,0,Pt),ce(9,"mat-divider"),k(10,"div",1)(11,"div",3)(12,"a",4),Q(13,"Zur\xFCck"),D()()()),i&2){let r=ti(8);T(3),Ke(o.clinic?3:-1),T(),Ke(o.specialtyDepartment?4:-1),T(2),E("loadItem",o.caseNumbers$)("successTemplate",r),T(6),E("routerLink",o.backRouterPath)}},dependencies:[Ga,Kn,Z4e,il,Gl,Tn,yo,Bs],encapsulation:2})}}return t})();var J4e=(()=>{class t{constructor(){this._color="rgb(66, 48, 117)"}ngOnInit(){this._updateChartConfig(this.beds)}_updateChartConfig(e){let i=Object.keys(e),o=[{label:"Betten",data:i.map(r=>e[r]),borderColor:this._color,fill:!1,tension:0,borderWidth:1}];this.chartConfig={type:"line",data:{datasets:o,labels:i},options:{maintainAspectRatio:!1,plugins:{tooltip:be({},_u)}}}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-beds-chart"]],inputs:{beds:"beds"},decls:1,vars:1,consts:[[3,"chartConfig"]],template:function(i,o){i&1&&ce(0,"bd-chart-canvas",0),i&2&&E("chartConfig",o.chartConfig)},dependencies:[Cp],encapsulation:2})}}return t})();function Y8t(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P();T(),dt(" - "+e.clinic.name)}}function Q8t(t,n){if(t&1&&(k(0,"div",9)(1,"div",10)(2,"span",14),Q(3),D()(),k(4,"div",6)(5,"span",14),Q(6),Xn(7,"number"),D()()()),t&2){let e=n.$implicit,i=P(2);T(3),dt(e),T(3),dt(Ls(7,2,i.beds[e],"1.0-0"))}}function Z8t(t,n){if(t&1&&(k(0,"div",5)(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9)(5,"div",10)(6,"span",11),Q(7,"Jahr"),D()(),k(8,"div",6)(9,"span",11),Q(10,"Betten"),D()()(),lo(11,Q8t,8,5,"div",9,jo),D(),k(13,"div",12),ce(14,"ays-clinic-beds-chart",13),D()()()()),t&2){let e=P();T(11),co(e.years),T(3),E("beds",e.beds)}}var e5e=(()=>{class t{constructor(e,i){this._activatedRoute=e,this._clinicService=i,this.loading$=new pi(1),this._activatedRoute.queryParams.subscribe(o=>{let r=g_.getIdentifierFromParams(o);this.clinicId=r.clinicId,this.backRouterPath=g_.getBackRouterPath(this.clinicId,null),this._fetchClinic(),this._fetchData()})}_fetchClinic(){this._clinicService.get(this.clinicId).pipe(Sn(1)).subscribe(e=>{this.clinic=e})}_fetchData(){this.loading$.next(Gt.LOADING),this._clinicService.beds(this.clinicId).pipe(Sn(1)).subscribe(e=>{this.years=Object.keys(e),this.beds=e,this.loading$.next(Gt.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(_e(vl),_e(cl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-beds-details"]],decls:13,vars:4,consts:[["successTpl",""],[1,"bd-container"],[3,"loadItem","successTemplate"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"routerLink"],[1,"flex","flex-row"],[1,"flex-1"],[1,"flex","flex-col","sm:flex-row"],[1,"basis-1/3"],[1,"flex","flex-row","gap-4"],[1,"basis-20"],[1,"mat-caption"],[1,"basis-2/3"],[3,"beds"],[1,"mat-body-1"]],template:function(i,o){if(i&1&&(k(0,"bd-toolbar")(1,"span"),Q(2,"Betten"),D(),qe(3,Y8t,2,1,"span"),D(),k(4,"div",1),ce(5,"bd-loader",2),D(),ee(6,Z8t,15,1,"ng-template",null,0,Pt),ce(8,"mat-divider"),k(9,"div",1)(10,"div",3)(11,"a",4),Q(12,"Zur\xFCck"),D()()()),i&2){let r=ti(7);T(3),Ke(o.clinic?3:-1),T(2),E("loadItem",o.loading$)("successTemplate",r),T(6),E("routerLink",o.backRouterPath)}},dependencies:[Ga,Kn,J4e,il,Gl,Tn,yo,Bs,Ta],encapsulation:2})}}return t})();var FZ=class extends Sh{constructor(n,e){super(),this._scope=n,this._table=e,console.log(e)}getExport(){return Promise.resolve({sheetName:"Export",data:this._getDataRows(),fields:this._getFields()})}_getFields(){let n=[];return this._table.categories.forEach(e=>{n.push(`${e.displayName} Voraussetzungen`),n.push(`${e.displayName} Pr\xFCfung`),n.push(`${e.displayName} Begr\xFCndung`)}),["Leistungsbereich","Leistungsgruppe"].concat(n)}_getDataRows(){return this._table.rows.map(n=>{let e=[{value:this._scope.displayName,type:"string"},{value:`${n.serviceGroup.lgNr} ${n.serviceGroup.displayName}`,type:"string"}];return this._table.categories.forEach(i=>{if(e.push({value:n.criteria[i.id].requirements.main.join("; "),type:"string"}),e.push({value:n.criteria[i.id].passed,type:"boolean"}),n.criteria[i.id].failureReason){let o=n.criteria[i.id].failureReason.details&&n.criteria[i.id].failureReason.details.length>0?n.criteria[i.id].failureReason.details.join("; "):n.criteria[i.id].failureReason.reason;e.push({value:o,type:"string"})}else e.push({value:"",type:"string"})}),e})}};function X8t(t,n){if(t&1&&(k(0,"p",3),Q(1),D()),t&2){let e=n.$implicit;T(),dt(e)}}var t5e=(()=>{class t{constructor(e){this.data=e,this.failureReason=e.failureReason}static{this.\u0275fac=function(i){return new(i||t)(_e(XC))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-bmg-criteria-details-table-failure-reason-dialog"]],decls:13,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[1,"mat-body-strong"],[1,"mat-body-1"],["mat-dialog-actions","",3,"align"],["mat-button","","color","accent","mat-dialog-close",""]],template:function(i,o){i&1&&(k(0,"div",0)(1,"span"),Q(2,"Begr\xFCndung"),D()(),k(3,"div",1)(4,"div")(5,"span",2),Q(6),D()(),k(7,"div"),lo(8,X8t,2,1,"p",3,jo),D()(),k(10,"div",4)(11,"button",5),Q(12,"Schlie\xDFen"),D()()),i&2&&(T(6),dt(o.failureReason.reason),T(2),co(o.failureReason.details),T(2),E("align","end"))},dependencies:[Aw,Hv,jv,Tn,yo,Dw],encapsulation:2})}}return t})();var i5e=(()=>{class t{constructor(e,i){this._dialog=e,this._responsiveDialogService=i}openDialog(){let e=this._responsiveDialogService.config();e.data={failureReason:this.failureReason},this._dialog.open(t5e,e)}static{this.\u0275fac=function(i){return new(i||t)(_e(Yg),_e(kw))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-bmg-criteria-details-table-failure-reason-dialog-trigger"]],inputs:{failureReason:"failureReason"},decls:3,vars:0,consts:[["mat-icon-button","","color","accent",3,"click"]],template:function(i,o){i&1&&(k(0,"button",0),ie("click",function(){return o.openDialog()}),k(1,"mat-icon"),Q(2,"open_in_new"),D()())},dependencies:[Tn,xl,$o,mr],encapsulation:2})}}return t})();var J8t=()=>({"min-width":"50rem"});function eHt(t,n){if(t&1&&(k(0,"th",9),Q(1),D()),t&2){let e=n.$implicit;E("colSpan",3),T(),dt(e.displayName)}}function tHt(t,n){t&1&&(k(0,"th"),Q(1,"Vorraussetzungen"),D(),k(2,"th"),Q(3,"Pr\xFCfung"),D(),k(4,"th"),Q(5,"Begr\xFCndung"),D())}function iHt(t,n){if(t&1&&(k(0,"tr")(1,"th",8),Q(2,"Name"),D(),k(3,"th",9),Q(4,"Kriterien"),D()(),k(5,"tr"),lo(6,eHt,2,2,"th",9,jo),D(),k(8,"tr"),lo(9,tHt,6,0,null,null,jo),D()),t&2){let e=P();T(3),E("colSpan",e.categories.length*3),T(3),co(e.categories),T(3),co(e.categories)}}function nHt(t,n){t&1&&ce(0,"bd-color-select-example",11),t&2&&E("colorString","#38C477")}function oHt(t,n){t&1&&ce(0,"bd-color-select-example",11),t&2&&E("colorString","#F2543D")}function rHt(t,n){if(t&1&&(k(0,"td"),ce(1,"ays-clinic-bmg-criteria-details-table-failure-reason-dialog-trigger",12),D()),t&2){let e=P().$implicit,i=P().$implicit;T(),E("failureReason",i.criteria[e.id]==null?null:i.criteria[e.id].failureReason)}}function sHt(t,n){if(t&1&&(k(0,"td",10),Q(1),D(),k(2,"td"),qe(3,nHt,1,1,"bd-color-select-example",11),qe(4,oHt,1,1,"bd-color-select-example",11),D(),k(5,"td"),qe(6,rHt,2,1,"td"),D()),t&2){let e=n.$implicit,i=P().$implicit;T(),Qi(" ",(i.criteria[e.id]==null?null:i.criteria[e.id].requirements.main)||"n/a"," "),T(2),Ke(i.criteria[e.id]!=null&&i.criteria[e.id].passed?3:-1),T(),Ke(i.criteria[e.id]!=null&&i.criteria[e.id].passed?-1:4),T(2),Ke(i.criteria[e.id]!=null&&i.criteria[e.id].passed?-1:6)}}function aHt(t,n){if(t&1&&(k(0,"tr")(1,"td"),Q(2),D(),lo(3,sHt,7,4,null,null,jo),D()),t&2){let e=n.$implicit,i=P();T(2),Qi(" ",e.serviceGroup.lgNr+" "+e.serviceGroup.displayName," "),T(),co(i.categories)}}var n5e=(()=>{class t{constructor(){this.queryFormControl=new yr(null),this.passedFilterFormControl=new yr(null),this._filterPassed=null,this.queryFormControl.valueChanges.pipe(id(500)).subscribe(e=>{this.query=e,this._filterRows()}),this.passedFilterFormControl.valueChanges.subscribe(e=>{this._onFilterPassedChange(e)})}ngOnChanges(e){e.rows&&this._filterRows()}_onFilterPassedChange(e){this._filterPassed=e,this._filterRows()}_filterRows(){this.displayedRows=this.rows.filter(e=>{let i=!0;if(this.query&&(i=i&&e.serviceGroup.displayName.toLowerCase().includes(this.query.toLowerCase())),this._filterPassed!==null){let o;this._filterPassed?o=this.categories.reduce((r,s)=>{let d=e.criteria[s.id]?.passed;return r&&d},!0):o=!this.categories.reduce((r,s)=>{let d=e.criteria[s.id]?.passed;return r&&d},!0),i=i&&o}return i})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-bmg-criteria-details-table"]],inputs:{categories:"categories",rows:"rows"},features:[Ot],decls:20,vars:8,consts:[[1,"flex","flex-row","gap-4"],[1,"grow"],["matInput","",3,"formControl"],[3,"formControl"],[3,"value"],[3,"value","tableStyle"],["pTemplate","header"],["pTemplate","body"],["rowspan","6"],[3,"colSpan"],[1,"mat-caption"],[3,"colorString"],[3,"failureReason"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1)(2,"mat-form-field")(3,"mat-label"),Q(4,"Suche"),D(),ce(5,"input",2),D()(),k(6,"div")(7,"mat-form-field")(8,"mat-label"),Q(9,"Pr\xFCfung"),D(),k(10,"mat-select",3)(11,"mat-option",4),Q(12," Alle"),D(),k(13,"mat-option",4),Q(14," Erf\xFCllt"),D(),k(15,"mat-option",4),Q(16," Nicht Erf\xFCllt"),D()()()()(),k(17,"p-table",5),ee(18,iHt,11,1,"ng-template",6)(19,aHt,5,1,"ng-template",7),D()),i&2&&(T(5),E("formControl",o.queryFormControl),T(5),E("formControl",o.passedFilterFormControl),T(),E("value",null),T(2),E("value",!0),T(2),E("value",!1),T(2),E("value",o.displayedRows)("tableStyle",uo(7,J8t)))},dependencies:[Ra,rs,Ol,pl,Fa,xr,Ml,no,zl,Kv,c0,bh,ry,hc,hl,so,In,lq,i5e],encapsulation:2})}}return t})();function lHt(t,n){if(t&1&&(k(0,"span"),Q(1),D()),t&2){let e=P();T(),dt(" - "+e.clinic.name)}}function cHt(t,n){if(t&1&&(k(0,"mat-option",3),Q(1),D()),t&2){let e=n.$implicit;E("value",e.id),T(),Qi(" ",e.displayName," ")}}function dHt(t,n){if(t&1&&(k(0,"div",7),ce(1,"bd-export-as-file",8),D(),ce(2,"ays-clinic-bmg-criteria-details-table",9)),t&2){let e=P();T(),E("data",e.export.data)("filename",e.export.filename),T(),E("categories",e.table.categories)("rows",e.table.rows)}}var o5e=(()=>{class t{constructor(e,i){this._activatedRoute=e,this._clinicService=i,this.loading$=new hi,this.scopeOptions=[],this._activatedRoute.queryParams.pipe(vt(o=>{let r=g_.getIdentifierFromParams(o);return this._clinicId=r.clinicId,this.backRouterPath=g_.getBackRouterPath(r.clinicId,null),r.clinicId}),Mn(o=>this._clinicService.get(o).pipe(Vo(r=>this.clinic=r),vt(()=>o))),Mn(o=>this._fetchBmgCriteriaOverview(o))).subscribe(o=>{this.selectedScopeId=o[0].id,this._fetchBmgCriteriaDetails(o[0].id)})}onScopeSelect(e){this._fetchBmgCriteriaDetails(e)}_fetchBmgCriteriaOverview(e){return this._clinicService.bmgCriteriaOverview([e]).pipe(Sn(1),vt(i=>(this.scopeOptions=i.content[0].overview.map(o=>o.scope),this.scopeOptions)))}_fetchBmgCriteriaDetails(e){this.loading$.next(Gt.LOADING),this._clinicService.bmgCriteriaDetails(this._clinicId,e).subscribe(i=>{this._createTableData(i);let o=this.scopeOptions.find(r=>r.id===e);this.export={data:new FZ(o,this.table),filename:`${this.clinic.name} - ${o.displayName}.xlsx`},this.loading$.next(Gt.SUCCESS)})}_createTableData(e){let i=e[0].serviceGroupCriteria[0].criteria.map(r=>r.category),o=e.reduce((r,s)=>r.concat(s.serviceGroupCriteria),[]).map(r=>({serviceGroup:r.serviceGroup,criteria:r.criteria.reduce((s,d)=>(s[d.category.id]=d,s),{})}));this.table={rows:o,categories:i}}static{this.\u0275fac=function(i){return new(i||t)(_e(vl),_e(cl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinic-bmg-criteria-details"]],decls:21,vars:5,consts:[["successTpl",""],[1,"bd-container"],[3,"valueChange","value"],[3,"value"],[3,"loadItem","successTemplate"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"routerLink"],[1,"flex","flex-row","justify-end"],[3,"data","filename"],[3,"categories","rows"]],template:function(i,o){if(i&1){let r=tt();k(0,"bd-toolbar")(1,"span"),Q(2,"Qualit\xE4tskriterien von Leistungsbereichen und -gruppen"),D(),qe(3,lHt,2,1,"span"),D(),k(4,"div",1)(5,"div")(6,"mat-form-field")(7,"mat-label"),Q(8,"Bereich"),D(),k(9,"mat-select",2),ie("valueChange",function(d){return se(r),ae(o.onScopeSelect(d))}),lo(10,cHt,2,2,"mat-option",3,jo),D()()(),k(12,"div"),ce(13,"bd-loader",4),D()(),ee(14,dHt,3,4,"ng-template",null,0,Pt),ce(16,"mat-divider"),k(17,"div",1)(18,"div",5)(19,"a",6),Q(20,"Zur\xFCck"),D()()()}if(i&2){let r=ti(15);T(3),Ke(o.clinic?3:-1),T(6),E("value",o.selectedScopeId),T(),co(o.scopeOptions),T(3),E("loadItem",o.loading$)("successTemplate",r),T(6),E("routerLink",o.backRouterPath)}},dependencies:[Ga,Ra,rs,Ol,Kv,c0,bh,ry,Kn,Sd,n5e,il,Gl,Tn,yo,Bs],encapsulation:2})}}return t})();var uHt=[{path:"home",component:O4e,data:{pageTitle:kd.title("Kliniken")}},{path:"single",data:{pageTitle:kd.title("Kliniken")},children:[{path:"staffing",canActivate:[Od],component:Y4e},{path:"case-numbers",canActivate:[Od],component:X4e},{path:"beds",canActivate:[Od],component:e5e},{path:"bmg-criteria",canActivate:[Od],component:o5e},{path:":clinicIk",children:[{path:":clinicSn",children:[{path:"",pathMatch:"full",component:z4e,resolve:{clinic:dme}},{path:"departments",canActivate:[Od],data:{pageTitle:kd.title("Klinik - Fachabteilungen")},children:[{path:":sdKey",component:G4e,canActivate:[Od],resolve:{clinic:dme,specialtyDepartment:E4e}}]}]}]}]},{path:"**",redirectTo:"home"}];var r5e=(()=>{class t{constructor(e,i,o,r){this._clinicTypePipe=e,this._clinicsFilterService=i,this._fabService=o,this._administrativeDistrictService=r,this.filename="Klinikfilter_Ergebnismenge"}ngOnChanges(){this.filename=`${this.clinicsFilter.name}_Ergebnismenge_${this.clinicsFilterYear}`,this.export=new Hx(this._clinicsFilterService,this._administrativeDistrictService,this._fabService,this.clinicsFilter,this.clinicsFilterYear,this._clinicTypePipe)}static{this.\u0275fac=function(i){return new(i||t)(_e(Wc),_e(Hs),_e(qu),_e(Hu))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-result-export"]],inputs:{clinicsFilter:"clinicsFilter",clinicsFilterYear:"clinicsFilterYear"},features:[jt([Wc]),Ot],decls:1,vars:2,consts:[[3,"data","filename"]],template:function(i,o){i&1&&ce(0,"bd-export-as-file",0),i&2&&E("data",o.export)("filename",o.filename)},dependencies:[Sd],encapsulation:2})}}return t})();function pHt(t,n){if(t&1&&ce(0,"ays-clinics-container-list",7),t&2){let e=P(2);E("clinicContainers",e.clinicContainers)}}function hHt(t,n){t&1&&(k(0,"span",8),Q(1,"Es wurden keine Kliniken f\xFCr den ausgew\xE4hlten Filter gefunden"),D())}function mHt(t,n){if(t&1&&(k(0,"div"),qe(1,pHt,1,1,"ays-clinics-container-list",7)(2,hHt,2,0,"span",8),D()),t&2){let e=P();T(),Ke(e.clinicContainers&&e.clinicContainers.length>0?1:2)}}function fHt(t,n){t&1&&ce(0,"bd-message-empty",9)}var s5e=(()=>{class t{constructor(e,i){this._clinicsFilterService=e,this._cdr=i,this.loading$=new pi(1),this.selectedYear=Cd}ngOnInit(){this._fetch()}onYearChanged(e){this.selectedYear=e,this._fetch()}_fetch(){this.loading$.next(Gt.LOADING),this._clinicsFilterService.result(this.filter,this.selectedYear).subscribe({next:e=>{this.clinicContainers=e,this.loading$.next(Gt.SUCCESS),this._cdr.markForCheck()},error:()=>{this.loading$.next(Gt.ERROR)}})}static{this.\u0275fac=function(i){return new(i||t)(_e(Hs),_e(Gi))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-result"]],inputs:{filter:"filter"},decls:12,vars:6,consts:[["successTpl",""],["errorTpl",""],[1,"flex","flex-row","gap-6","items-center"],[1,"flex-1","mat-title"],[3,"yearChange","selectedYear"],[3,"clinicsFilter","clinicsFilterYear"],[3,"loadItem","successTemplate","errorTemplate"],[3,"clinicContainers"],[1,"mat-body-1"],["icon","error","message","Es ist ein Fehler aufgetreten, der Vorgang wurde abgebrochen"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",2)(1,"span",3),Q(2,"Ergebnismenge"),D(),k(3,"span")(4,"ays-clinics-filter-details-year-select",4),ie("yearChange",function(d){return se(r),ae(o.onYearChanged(d))}),D()(),k(5,"div"),ce(6,"ays-clinics-filter-details-result-export",5),D()(),ce(7,"bd-loader",6),ee(8,mHt,3,1,"ng-template",null,0,Pt)(10,fHt,1,0,"ng-template",null,1,Pt)}if(i&2){let r=ti(9),s=ti(11);T(4),E("selectedYear",o.selectedYear),T(2),E("clinicsFilter",o.filter)("clinicsFilterYear",o.selectedYear),T(),E("loadItem",o.loading$)("successTemplate",r)("errorTemplate",s)}},dependencies:[Rl,RZ,Kn,r5e,Ux],encapsulation:2,changeDetection:0})}}return t})();function gHt(t,n){if(t&1){let e=tt();k(0,"mat-radio-group",8),ie("change",function(o){se(e);let r=P();return ae(r.onActiveFieldChange(o))}),k(1,"mat-radio-button",9)(2,"span"),Q(3,"\xC4rzte (Gesamt)"),D()(),k(4,"mat-radio-button",9)(5,"span"),Q(6,"Pflege (Gesamt)"),D()()()}if(t&2){let e=P();E("value",e.activeField),T(),E("value","medical")("checked",e.activeField==="medical"),T(3),E("value","nursing")("checked",e.activeField==="nursing")}}function _Ht(t,n){if(t&1&&(k(0,"mat-radio-button",9)(1,"span"),Q(2),Xn(3,"staffingType"),D()()),t&2){let e=n.$implicit,i=P(2);E("value",e)("checked",i.activeField===e),T(2),dt(Nr(3,3,e))}}function yHt(t,n){if(t&1){let e=tt();k(0,"mat-radio-group",10),ie("change",function(o){se(e);let r=P();return ae(r.onActiveFieldChange(o))}),lo(1,_Ht,4,5,"mat-radio-button",9,jo),D()}if(t&2){let e=P();E("value",e.activeField),T(),co(e.possibleFields.medical)}}function vHt(t,n){if(t&1&&(k(0,"mat-radio-button",9)(1,"span"),Q(2),Xn(3,"staffingType"),D()()),t&2){let e=n.$implicit,i=P(2);E("value",e)("checked",i.activeField===e),T(2),dt(Nr(3,3,e))}}function bHt(t,n){if(t&1){let e=tt();k(0,"mat-radio-group",11),ie("change",function(o){se(e);let r=P();return ae(r.onActiveFieldChange(o))}),lo(1,vHt,4,5,"mat-radio-button",9,jo),D()}if(t&2){let e=P();E("value",e.activeField),T(),co(e.possibleFields.nursing)}}var a5e=(()=>{class t{constructor(){this.items=[],this.fieldMap={total:a8.total[0],medical:a8.medical[0],nursing:a8.nursing[0]},this.possibleFields={medical:a8.medical,nursing:a8.nursing},this.activeField="medical"}ngOnInit(){this.onViewStateChange(this.viewState)}ngOnChanges(e){e.viewState&&!e.viewState.firstChange&&this.onViewStateChange(e.viewState.currentValue)}onActiveFieldChange(e){this.activeField=e.value,this._createDataSets(),this._createChartConfig()}onViewStateChange(e){this.activeField=this.fieldMap[e],this.updateChartDisplay()}updateChartDisplay(){this._createDataSets(),this._createChartConfig()}_createDataSets(){return this.items.map((e,i)=>{let o=this._getItemData(e),r=this._toChartData(o);return{label:e.clinic.name,data:r,backgroundColor:$P[i],borderColor:$P[i],fill:!1,borderWidth:2}})}_createChartConfig(){this.chartConfig={type:"line",data:{datasets:this._createDataSets(),labels:Jw.map(e=>e.toString())},options:{responsive:!0,maintainAspectRatio:!1,aspectRatio:12/3,plugins:{tooltip:_u,legend:{position:"bottom"}}}}}_getItemData(e){let i;return this.viewState==="total"?i=e.staffing[this.activeField].total:this.viewState==="medical"?i=e.staffing.medical[this.activeField]:this.viewState==="nursing"&&(i=e.staffing.nursing[this.activeField]),i}_toChartData(e){return Jw.map(i=>e[i]!==void 0?e[i]:null)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-staffing-chart"]],inputs:{items:"items",year:"year",viewState:"viewState"},features:[Ot],decls:9,vars:2,consts:[[1,"bd-container"],[1,"flex","flex-col"],[1,"flex-1"],["name","total-group",3,"value"],["name","medical-group",3,"value"],["name","nursing-group",3,"value"],[1,"chart-container"],[3,"chartConfig"],["name","total-group",3,"change","value"],[3,"value","checked"],["name","medical-group",3,"change","value"],["name","nursing-group",3,"change","value"]],template:function(i,o){if(i&1&&(k(0,"div",0)(1,"div",1)(2,"div",2),qe(3,gHt,7,5,"mat-radio-group",3)(4,yHt,3,1,"mat-radio-group",4)(5,bHt,3,1,"mat-radio-group",5),D(),k(6,"div",2)(7,"div",6),ce(8,"bd-chart-canvas",7),D()()()()),i&2){let r;T(3),Ke((r=o.viewState)==="total"?3:r==="medical"?4:r==="nursing"?5:-1),T(5),E("chartConfig",o.chartConfig)}},dependencies:[Nx,gb,Ay,Cp,XE],styles:["mat-radio-group[_ngcontent-%COMP%]{float:right}.mat-radio-button[_ngcontent-%COMP%] ~ .mat-radio-button[_ngcontent-%COMP%]{margin-left:16px}.chart-container[_ngcontent-%COMP%]{height:300px}"]})}}return t})(),a8={total:["medical","nursing"],medical:["inpatientDocs","medicalSpecialists","nonSpecialists"],nursing:["deliveryNurses","enrolledChildrenNurses","enrolledNurses","geriatricNurses","hospitalPorters","licensedPracticalNurses"]};var l5e=(t,n)=>n.headerKey;function CHt(t,n){if(t&1&&(k(0,"th"),Q(1),D()),t&2){let e=n.$implicit;Oe(e.cssClasses),T(),dt(e.headerDisplayName)}}function xHt(t,n){if(t&1&&(k(0,"tr"),lo(1,CHt,2,3,"th",3,l5e),ce(3,"th"),D()),t&2){let e=P();T(),co(e.columns)}}function wHt(t,n){if(t&1&&(k(0,"td"),Q(1),D()),t&2){let e=n.$implicit,i=P().$implicit;Oe(e.cssClasses),T(),dt(e.valueFn(i))}}function SHt(t,n){if(t&1&&(k(0,"tr"),lo(1,wHt,2,3,"td",3,l5e),k(3,"td"),ce(4,"ays-clinic-icon-link",4),D()()),t&2){let e=n.$implicit,i=P();T(),co(i.columns),T(3),E("clinicId",e.clinic.id)}}var c5e=(()=>{class t{constructor(e,i){this._staffingTypePipe=e,this._decimalPipe=i,this.items=[],this.columns=[]}ngOnChanges(e){e.viewState&&e.viewState.currentValue&&this._updateColumns(this.viewState)}_updateColumns(e){let i=[{headerKey:"clinicIK",headerDisplayName:"IK",cssClasses:[],sortable:!1,sortIndex:0,valueFn:o=>o.clinic.id.ik,footerFn:()=>null},{headerKey:"clinicSN",headerDisplayName:"Standort",cssClasses:[],sortable:!1,sortIndex:1,valueFn:o=>o.clinic.id.sn,footerFn:()=>null},{headerKey:"clinic",headerDisplayName:"Klinik",cssClasses:[],sortable:!1,sortIndex:2,valueFn:o=>o.clinic.name,footerFn:()=>null},{headerKey:"address",headerDisplayName:"Adresse",cssClasses:[],sortable:!1,sortIndex:2,valueFn:o=>o.clinic.address.toString(),footerFn:()=>null}];switch(e){case"medical":{this.columns=[...i,{headerKey:"inpatientDocs",headerDisplayName:this._staffingTypePipe.transform("inpatientDocs"),cssClasses:["number-value","mat-column-inpatientDocs"],sortable:!1,sortIndex:10,footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.medical.inpatientDocs[this.year],"1.0-2")},{headerKey:"medicalSpecialists",headerDisplayName:this._staffingTypePipe.transform("medicalSpecialists"),cssClasses:["number-value","mat-column-medicalSpecialists"],sortable:!1,sortIndex:11,footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.medical.medicalSpecialists[this.year],"1.0-2")},{headerKey:"nonSpecialists",headerDisplayName:this._staffingTypePipe.transform("nonSpecialists"),cssClasses:["number-value","mat-column-nonSpecialists"],sortable:!1,sortIndex:12,footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.medical.nonSpecialists[this.year],"1.0-2")}];break}case"nursing":{this.columns=[...i,{headerKey:"deliveryNurses",headerDisplayName:this._staffingTypePipe.transform("deliveryNurses"),sortIndex:10,sortable:!1,cssClasses:["number-value","mat-column-deliveryNurses"],footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.nursing.deliveryNurses[this.year],"1.0-2")},{headerKey:"enrolledChildrenNurses",headerDisplayName:this._staffingTypePipe.transform("enrolledChildrenNurses"),sortIndex:11,sortable:!1,cssClasses:["number-value","mat-column-enrolledChildrenNurses"],footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.nursing.enrolledChildrenNurses[this.year],"1.0-2")},{headerKey:"enrolledNurses",headerDisplayName:this._staffingTypePipe.transform("enrolledNurses"),sortIndex:12,sortable:!1,cssClasses:["number-value","mat-column-enrolledNurses"],footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.nursing.enrolledNurses[this.year],"1.0-2")},{headerKey:"geriatricNurses",headerDisplayName:this._staffingTypePipe.transform("geriatricNurses"),sortIndex:13,sortable:!1,cssClasses:["number-value","mat-column-geriatricNurses"],footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.nursing.geriatricNurses[this.year],"1.0-2")},{headerKey:"hospitalPorters",headerDisplayName:this._staffingTypePipe.transform("hospitalPorters"),sortIndex:14,sortable:!1,cssClasses:["number-value","mat-column-hospitalPorters"],footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.nursing.hospitalPorters[this.year],"1.0-2")},{headerKey:"licensedPracticalNurses",headerDisplayName:this._staffingTypePipe.transform("licensedPracticalNurses"),sortIndex:15,sortable:!1,cssClasses:["number-value","mat-column-licensedPracticalNurses"],footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.nursing.licensedPracticalNurses[this.year],"1.0-2")}];break}case"total":{this.columns=[...i,{headerKey:"medicalTotal",headerDisplayName:"\xC4rzte (Gesamt)",sortable:!1,sortIndex:10,cssClasses:["number-value","mat-column-medicalTotal"],footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.medical.total[this.year],"1.0-2")},{headerKey:"nursingTotal",headerDisplayName:"Pflege (Gesamt)",sortable:!1,sortIndex:11,cssClasses:["number-value","mat-column-nursingTotal"],footerFn:()=>null,valueFn:o=>this._decimalPipe.transform(o.staffing.nursing.total[this.year],"1.0-2")}];break}}}static{this.\u0275fac=function(i){return new(i||t)(_e(XE),_e(Ta))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-staffing-table"]],inputs:{items:"items",viewState:"viewState",year:"year"},features:[jt([XE,Ta]),Ot],decls:3,vars:1,consts:[[3,"value"],["pTemplate","header"],["pTemplate","body"],[3,"class"],[3,"clinicId"]],template:function(i,o){i&1&&(k(0,"p-table",0),ee(1,xHt,4,0,"ng-template",1)(2,SHt,5,1,"ng-template",2),D()),i&2&&E("value",o.items)},dependencies:[Tn,$o,ZE,hc,hl,so],styles:[".number-value[_ngcontent-%COMP%]{text-align:right;flex-flow:row-reverse}.mat-column-medicalTotal[_ngcontent-%COMP%], .mat-column-nursingTotal[_ngcontent-%COMP%], .mat-column-inpatientDocs[_ngcontent-%COMP%], .mat-column-medicalSpecialists[_ngcontent-%COMP%], .mat-column-nonSpecialists[_ngcontent-%COMP%]{width:150px}.mat-column-deliveryNurses[_ngcontent-%COMP%]{width:110px}.mat-column-enrolledChildrenNurses[_ngcontent-%COMP%], .mat-column-enrolledNurses[_ngcontent-%COMP%]{width:120px}.mat-column-geriatricNurses[_ngcontent-%COMP%], .mat-column-hospitalPorters[_ngcontent-%COMP%]{width:100px}.mat-column-licensedPracticalNurses[_ngcontent-%COMP%]{width:120px}.mat-column-clinicLink[_ngcontent-%COMP%]{width:48px}"]})}}return t})();var PZ=class extends Hx{constructor(n,e,i,o,r,s){super(n,e,i,o,r,s)}getExport(){return Promise.all([Wl(this._administrativeDistrictService.find()),Wl(this._fabService.index()),this._clinicsFilterService.export(this._clinicsFilter,this._clinicsFilterYear)]).then(n=>({administrativeDistricts:n[0],fabs:n[1],clinicsFilterExports:n[2]})).then(n=>{let e=n.clinicsFilterExports.map(i=>Object.keys(i.specialtyDepartments)).reduce((i,o)=>Ui.unique([...i,...o],r=>r)).map(i=>n.fabs.find(o=>o.fabKey===i)).sort((i,o)=>!i||!o?i?-1:1:i.name.localeCompare(o.name));return{data:n.clinicsFilterExports.map(i=>this._getDataRow(i,n.administrativeDistricts,e)),fields:this._getFieldNames(e)}})}_getFieldNames(n){let e=n.map(i=>[`FAB ${i?i.name:"Unbekannt"} \xC4rzte Gesamt`,`FAB ${i?i.name:"Unbekannt"} Pflege Gesamt`]).reduce((i,o)=>i.concat(o));return super._getFieldNames().concat(["\xC4rzte Gesamt","Beleg\xE4rzte","Fach\xE4rzte","Assistenz\xE4rzte","Pflege Gesamt","Entbindungspfleger","Gesundheits Kinderkrankenpfleger","Gesundheits Krankenpfleger","Altenpfleger","Pflegehelfer","Krankenpflegehelfer"]).concat(e)}_getDataRow(n,e,i){let o=i.map(s=>{let d=[{value:null,type:"number"},{value:null,type:"number"}];if(s||(s=new Xt("0000","Unbekannt")),n.specialtyDepartments[s.fabKey]){let m=n.specialtyDepartments[s.fabKey].map(w=>this._getMedicalTotal(w.staffing)).reduce((w,O)=>w+O,0),v=n.specialtyDepartments[s.fabKey].map(w=>this._getNursingTotal(w.staffing)).reduce((w,O)=>w+O,0);d=[{value:m,type:"number"},{value:v,type:"number"}]}return d}).reduce((s,d)=>s.concat(d),[]),r=[{value:this._getMedicalTotal(n.staffing),type:"number"},{value:n.staffing.medical.inpatientDocs??0,type:"number"},{value:n.staffing.medical.docsWithoutInpatientDocs.medicalSpecialists??0,type:"number"},{value:n.staffing.medical.docsWithoutInpatientDocs.nonSpecialists??0,type:"number"},{value:this._getNursingTotal(n.staffing),type:"number"},{value:n.staffing.nursing.deliveryNurses??0,type:"number"},{value:n.staffing.nursing.enrolledChildrenNurses??0,type:"number"},{value:n.staffing.nursing.enrolledNurses??0,type:"number"},{value:n.staffing.nursing.geriatricNurses??0,type:"number"},{value:n.staffing.nursing.hospitalPorters??0,type:"number"},{value:n.staffing.nursing.licensedPracticalNurses??0,type:"number"}];return super._getDataRow(n,e).concat(r).concat(o)}_getNursingTotal(n){return(n.nursing.deliveryNurses??0)+(n.nursing.nursingAssistants??0)+(n.nursing.enrolledNurses??0)+(n.nursing.scrubNurses??0)+(n.nursing.geriatricNurses??0)+(n.nursing.enrolledChildrenNurses??0)+(n.nursing.hospitalPorters??0)+(n.nursing.licensedPracticalNurses??0)}_getMedicalTotal(n){return(n.medical.inpatientDocs??0)+(n.medical.docsWithoutInpatientDocs?.total??0)}};var d5e={total:"Gesamt",medical:"\xC4rzte",nursing:"Pflege"};var u5e=(()=>{class t{constructor(e,i,o,r){this._clinicsFilterService=e,this._administrativeDistrictService=i,this._fabService=o,this.clinicTypePipe=r,this.filename="Klinikfilter_Personal.csv"}ngOnChanges(){this.filename=`${this.clinicsFilter.name}_Personal_${d5e[this.viewState]}_${this.clinicsFilterYear}`,this.export=new PZ(this._clinicsFilterService,this._administrativeDistrictService,this._fabService,this.clinicsFilter,this.clinicsFilterYear,this.clinicTypePipe)}static{this.\u0275fac=function(i){return new(i||t)(_e(Hs),_e(Hu),_e(qu),_e(Wc))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-staffing-export"]],inputs:{clinicsFilter:"clinicsFilter",clinicsFilterYear:"clinicsFilterYear",viewState:"viewState"},features:[jt([Wc]),Ot],decls:1,vars:2,consts:[[3,"data","filename"]],template:function(i,o){i&1&&ce(0,"bd-export-as-file",0),i&2&&E("data",o.export)("filename",o.filename)},dependencies:[Sd],encapsulation:2})}}return t})();var hme=()=>[10,20,30];function THt(t,n){if(t&1){let e=tt();k(0,"div",11)(1,"div"),ce(2,"ays-clinics-filter-details-staffing-table",13),D(),k(3,"div"),ce(4,"ays-clinics-filter-details-staffing-chart",13),D(),k(5,"div",14)(6,"p-paginator",15),ie("onPageChange",function(o){se(e);let r=P(2);return ae(r.onPageChange(o))}),D()()()}if(t&2){let e=P(2);T(2),E("items",e.items)("viewState",e.viewState)("year",e.selectedYear),T(2),E("items",e.items)("viewState",e.viewState)("year",e.selectedYear),T(2),E("first",e.paginator.first)("rows",e.paginator.pageSize)("totalRecords",e.paginator.totalRecords)("rowsPerPageOptions",uo(13,hme))("showPageLinks",!1)("showFirstLastIcon",!1)("showCurrentPageReport",!0)}}function IHt(t,n){t&1&&(k(0,"span",12),Q(1,"Es wurden keine Kliniken f\xFCr den ausgew\xE4hlten Filter gefunden"),D())}function EHt(t,n){if(t&1){let e=tt();k(0,"div",11)(1,"div"),ce(2,"ays-clinics-filter-details-staffing-table",13),D(),k(3,"div"),ce(4,"ays-clinics-filter-details-staffing-chart",13),D(),k(5,"div",14)(6,"p-paginator",15),ie("onPageChange",function(o){se(e);let r=P(2);return ae(r.onPageChange(o))}),D()()()}if(t&2){let e=P(2);T(2),E("items",e.items)("viewState",e.viewState)("year",e.selectedYear),T(2),E("items",e.items)("viewState",e.viewState)("year",e.selectedYear),T(2),E("first",e.paginator.first)("rows",e.paginator.pageSize)("totalRecords",e.paginator.totalRecords)("rowsPerPageOptions",uo(13,hme))("showPageLinks",!1)("showFirstLastIcon",!1)("showCurrentPageReport",!0)}}function DHt(t,n){t&1&&(k(0,"span",12),Q(1,"Es wurden keine Kliniken f\xFCr den ausgew\xE4hlten Filter gefunden"),D())}function AHt(t,n){if(t&1){let e=tt();k(0,"div",11)(1,"div"),ce(2,"ays-clinics-filter-details-staffing-table",13),D(),k(3,"div"),ce(4,"ays-clinics-filter-details-staffing-chart",13),D(),k(5,"div",14)(6,"p-paginator",15),ie("onPageChange",function(o){se(e);let r=P(2);return ae(r.onPageChange(o))}),D()()()}if(t&2){let e=P(2);T(2),E("items",e.items)("viewState",e.viewState)("year",e.selectedYear),T(2),E("items",e.items)("viewState",e.viewState)("year",e.selectedYear),T(2),E("first",e.paginator.first)("rows",e.paginator.pageSize)("totalRecords",e.paginator.totalRecords)("rowsPerPageOptions",uo(13,hme))("showPageLinks",!1)("showFirstLastIcon",!1)("showCurrentPageReport",!0)}}function kHt(t,n){t&1&&(k(0,"span",12),Q(1,"Es wurden keine Kliniken f\xFCr den ausgew\xE4hlten Filter gefunden"),D())}function MHt(t,n){if(t&1){let e=tt();k(0,"p-tabs",7),ie("valueChange",function(o){se(e);let r=P();return ae(r.onViewStateChange(o))}),k(1,"p-tablist")(2,"p-tab",8),Q(3,"Gesamt"),D(),k(4,"p-tab",9),Q(5,"\xC4rzte"),D(),k(6,"p-tab",10),Q(7,"Pflege"),D()(),k(8,"p-tabpanels")(9,"p-tabpanel",8),qe(10,THt,7,14,"div",11)(11,IHt,2,0,"span",12),D(),k(12,"p-tabpanel",9),qe(13,EHt,7,14,"div",11)(14,DHt,2,0,"span",12),D(),k(15,"p-tabpanel",10),qe(16,AHt,7,14,"div",11)(17,kHt,2,0,"span",12),D()()()}if(t&2){let e=P();T(10),Ke(e.items.length>0?10:11),T(3),Ke(e.items.length>0?13:14),T(3),Ke(e.items.length>0?16:17)}}function OHt(t,n){t&1&&(k(0,"span",12),Q(1,"Es wurden keine Kliniken f\xFCr den ausgew\xE4hlten Filter gefunden"),D())}var p5e=(()=>{class t{constructor(e){this._clinicsFilterService=e,this.loading$=new pi(1),this.viewStateIndex=0,this.viewState="total",this.items=[],this.selectedYear=Cd,this.paginator=new sy(10,0),this._viewStates=["total","medical","nursing"]}ngOnInit(){this._fetchData({rows:this.paginator.pageSize,page:0})}onPageChange(e){this._fetchData(e)}onViewStateChange(e){this.viewStateIndex=e,this.viewState=this._viewStates[e]}onYearChanged(e){this.selectedYear=e,this._fetchData({rows:this.paginator.pageSize,page:0})}_fetchData(e){this.loading$.next(Gt.LOADING),this._clinicsFilterService.staffingByClinicsFilter(this.clinicsFilter,sy.toHttpParams(e),this.selectedYear).subscribe({next:i=>{this.paginator.totalRecords=i.totalElements,this.paginator.first=i.pageable.offset,this.items=i.content,this.loading$.next(Gt.SUCCESS)},error:i=>{console.error(i),this.loading$.next(Gt.ERROR)}})}static{this.\u0275fac=function(i){return new(i||t)(_e(Hs))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-staffing"]],inputs:{clinicsFilter:"clinicsFilter"},decls:12,vars:7,consts:[["successTpl",""],["empty",""],[1,"flex","flex-row","gap-6","items-center"],[1,"flex-1","mat-title"],[3,"yearChange","selectedYear"],[3,"clinicsFilter","clinicsFilterYear","viewState"],[3,"loadItem","successTemplate","errorTemplate"],["value","0",3,"valueChange"],["value","0"],["value","1"],["value","2"],[1,"flex","flex-col"],[1,"mat-body-1"],[3,"items","viewState","year"],[1,"flex","justify-end"],["currentPageReportTemplate","{first} - {last} von {totalRecords}",3,"onPageChange","first","rows","totalRecords","rowsPerPageOptions","showPageLinks","showFirstLastIcon","showCurrentPageReport"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",2)(1,"span",3),Q(2,"Personal"),D(),k(3,"span")(4,"ays-clinics-filter-details-year-select",4),ie("yearChange",function(d){return se(r),ae(o.onYearChanged(d))}),D()(),k(5,"div"),ce(6,"ays-clinics-filter-details-staffing-export",5),D()(),ce(7,"bd-loader",6),ee(8,MHt,18,3,"ng-template",null,0,Pt)(10,OHt,2,0,"ng-template",null,1,Pt)}if(i&2){let r=ti(9),s=ti(11);T(4),E("selectedYear",o.selectedYear),T(2),E("clinicsFilter",o.clinicsFilter)("clinicsFilterYear",o.selectedYear)("viewState",o.viewState),T(),E("loadItem",o.loading$)("successTemplate",r)("errorTemplate",s)}},dependencies:[Ux,u5e,Kn,c5e,a5e,DN,m_,fb,mb,Dy,hb,kE,aS],encapsulation:2})}}return t})();var h5e=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-filter"]],inputs:{clinicsFilter:"clinicsFilter",clinicsFilterYear:"clinicsFilterYear"},decls:1,vars:1,consts:[[3,"expression"]],template:function(i,o){i&1&&ce(0,"filter-condition-expression-show",0),i&2&&E("expression",o.clinicsFilter.expression)},dependencies:[bZ],encapsulation:2,changeDetection:0})}}return t})();var m5e=(()=>{class t{constructor(){this.selectedYear=Cd}onYearChanged(e){this.selectedYear=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-show-overview"]],inputs:{filter:"filter"},decls:7,vars:3,consts:[[1,"flex","flex-row","gap-6","items-center"],[1,"flex-1","mat-title"],[3,"yearChange","selectedYear"],[3,"clinicsFilter","clinicsFilterYear"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"span",1),Q(2,"\xDCbersicht"),D(),k(3,"span")(4,"ays-clinics-filter-details-year-select",2),ie("yearChange",function(s){return o.onYearChanged(s)}),D()()(),k(5,"div"),ce(6,"ays-clinics-filter-details-filter",3),D()),i&2&&(T(4),E("selectedYear",o.selectedYear),T(2),E("clinicsFilter",o.filter)("clinicsFilterYear",o.selectedYear))},dependencies:[Ux,h5e],encapsulation:2})}}return t})();var f5e=(()=>{class t{constructor(e,i){this._permissionService=e,this._router=i}delete(){this._permissionService.archive(ko.CLINICS_FILTER,this.clinicsFilter.id).pipe(Sn(1)).subscribe(()=>this._router.navigate(["/clinics-filters"]))}edit(){this._router.navigate(["/clinics-filters",this.clinicsFilter.id,"edit"]).catch(console.error)}static{this.\u0275fac=function(i){return new(i||t)(_e(pM),_e(dl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-header"]],inputs:{clinicsFilter:"clinicsFilter"},decls:5,vars:2,consts:[[1,"flex-1"],["helpKey","ays_clinics_filter",3,"deleteResource","editResource","resource"]],template:function(i,o){i&1&&(k(0,"bd-toolbar")(1,"span",0),Q(2),D(),k(3,"div")(4,"bd-resources-info-menu",1),ie("deleteResource",function(){return o.delete()})("editResource",function(){return o.edit()}),D()()()),i&2&&(T(2),dt(o.clinicsFilter==null?null:o.clinicsFilter.name),T(2),E("resource",o.clinicsFilter))},dependencies:[Ga,jL],encapsulation:2})}}return t})();var RHt=()=>[5,10,25,50],FHt=()=>({"min-width":"60rem"}),g5e=(t,n)=>n.id;function PHt(t,n){if(t&1&&(k(0,"th",10),Q(1),D()),t&2){let e=n.$implicit;E("matTooltip",e.displayName),T(),Qi(" ",e.id," ")}}function LHt(t,n){if(t&1&&(k(0,"tr")(1,"th",3),Q(2," IK "),ce(3,"p-sortIcon",4),D(),k(4,"th",5),Q(5," Standort "),ce(6,"p-sortIcon",6),D(),k(7,"th",7),Q(8," Klinik "),ce(9,"p-sortIcon",8),D(),k(10,"th",9),Q(11,"Adresse"),D(),lo(12,PHt,2,2,"th",10,g5e),ce(14,"th"),D()),t&2){let e=P();T(12),co(e.dynamicColumns)}}function NHt(t,n){if(t&1&&ce(0,"td"),t&2){let e=n.$implicit,i=P().$implicit;Oe(e.fn(i))}}function BHt(t,n){if(t&1&&(k(0,"tr")(1,"td",9),Q(2),D(),k(3,"td",9),Q(4),D(),k(5,"td",9),Q(6),D(),k(7,"td",9),Q(8),D(),lo(9,NHt,1,2,"td",11,g5e),k(11,"td"),ce(12,"ays-clinic-icon-link",12),D()()),t&2){let e=n.$implicit,i=P();T(2),dt(e.id.ik),T(2),dt(e.id.sn),T(2),dt(e.name),T(2),dt(e.address.toString()),T(),co(i.dynamicColumns),T(3),E("clinicId",e.id)}}var _5e=(()=>{class t{constructor(){this.data=[],this.bmgCriteriaView="physicianRequirements",this.dynamicColumns=[]}ngOnChanges(e){e.data&&e.data.currentValue&&this.onBmgCriteriaViewChange(this.bmgCriteriaView),e.bmgCriteriaView&&this.onBmgCriteriaViewChange(e.bmgCriteriaView.currentValue)}onBmgCriteriaViewChange(e){switch(this.bmgCriteriaView=e,this.bmgCriteriaView){case"deviceProvision":{this._deviceProvision();break}case"physicianRequirements":{this._physicianRequirements();break}}}onSortChange(e){switch(e.field){case"ik":{this.data=this.data.sort((i,o)=>e.order===1?i.id.ik.localeCompare(o.id.ik):o.id.ik.localeCompare(i.id.ik));break}case"sn":{this.data=this.data.sort((i,o)=>e.order===1?i.id.sn.localeCompare(o.id.sn):o.id.sn.localeCompare(i.id.sn));break}case"clinicName":{this.data=this.data.sort((i,o)=>e.order===1?i.name.localeCompare(o.name):o.name.localeCompare(i.name));break}}}_deviceProvision(){this.dynamicColumns=wd.filter(e=>e.isLeistungsgruppe()).map(e=>({id:e.id,displayName:`${e.id} ${e.name}`,fn:i=>{let o=i.bmgCriteriaOverview.find(r=>r.lgNr===e.id);return o?o.deviceProvision?"accomplished":"not-accomplished":""}}))}_physicianRequirements(){this.dynamicColumns=wd.filter(e=>e.isLeistungsgruppe()).map(e=>({id:e.id,displayName:`${e.id} ${e.name}`,fn:i=>{let o=i.bmgCriteriaOverview.find(r=>r.lgNr===e.id);if(o){let r=o.physicianRequirements.availability,s=o.physicianRequirements.qualification;return[r,s].every(d=>d)?"accomplished":[r,s].every(d=>!d)?"not-accomplished":"partial-accomplished"}else return""}}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-quality-criteria-table"]],inputs:{data:"data",bmgCriteriaView:"bmgCriteriaView"},features:[Ot],decls:3,vars:10,consts:[["currentPageReportTemplate","{first} - {last} von {totalRecords}","styleClass","p-datatable-sm",3,"sortFunction","value","paginator","rows","showCurrentPageReport","rowsPerPageOptions","tableStyle","scrollable","customSort"],["pTemplate","header"],["pTemplate","body"],["pFrozenColumn","","pSortableColumn","ik"],["field","ik"],["pFrozenColumn","","pSortableColumn","sn",2,"min-width","150px"],["field","sn"],["pFrozenColumn","","pSortableColumn","clinicName",2,"min-width","250px"],["field","clinicName"],["pFrozenColumn",""],[2,"min-width","65px",3,"matTooltip"],[3,"class"],[3,"clinicId"]],template:function(i,o){i&1&&(k(0,"p-table",0),ie("sortFunction",function(s){return o.onSortChange(s)}),ee(1,LHt,15,0,"ng-template",1)(2,BHt,13,5,"ng-template",2),D()),i&2&&E("value",o.data)("paginator",!0)("rows",10)("showCurrentPageReport",!0)("rowsPerPageOptions",uo(8,RHt))("tableStyle",uo(9,FHt))("scrollable",!0)("customSort",!0)},dependencies:[Hp,Up,ZE,hc,hl,so,ME,gPe,OE],styles:[".accomplished[_ngcontent-%COMP%]{background-color:green;width:100%;height:100%}.partial-accomplished[_ngcontent-%COMP%]{width:100%;height:100%;background:linear-gradient(to bottom right,green 0% 50%,red 50% 100%)}.not-accomplished[_ngcontent-%COMP%]{background-color:red;width:100%;height:100%}"]})}}return t})();var LZ=class extends Hx{constructor(n,e,i,o,r,s,d){super(n,e,i,o,r,s),this._bmgCriteriaView=d}_getFieldNames(){let n=wd.filter(e=>e.isLeistungsgruppe()).map(e=>this._bmgCriteriaView==="deviceProvision"?[`${e.id} ${e.name} Vorhaltung Ger\xE4te`]:[`${e.id} ${e.name} Qualifikation`,`${e.id} ${e.name} Verf\xFCgbarkeit`]).reduce((e,i)=>e.concat(i));return super._getFieldNames().concat(n)}_getDataRow(n,e){let i=wd.filter(o=>o.isLeistungsgruppe()).map(o=>{let r=n.bmgCriteriaOverview.find(d=>d.lgNr===o.id),s=[];return this._bmgCriteriaView==="deviceProvision"?r?s.push({type:"string",value:r.deviceProvision?"erf\xFCllt":"nicht erf\xFCllt"}):s.push({type:"string",value:""}):r?(s.push({type:"string",value:r.physicianRequirements.qualification?"erf\xFCllt":"nicht erf\xFCllt"}),s.push({type:"string",value:r.physicianRequirements.availability?"erf\xFCllt":"nicht erf\xFCllt"})):(s.push({type:"string",value:""}),s.push({type:"string",value:""})),s}).reduce((o,r)=>o.concat(r));return super._getDataRow(n,e).concat(i)}};var y5e=(()=>{class t{constructor(e,i,o,r){this._clinicsFilterService=e,this.clinicTypePipe=i,this._administrativeDistrictService=o,this._fabService=r,this.bmgCriteriaView="physicianRequirements",this.filename="Klinikfilter_Qualit\xE4tskriterien.csv"}ngOnChanges(){this.filename=`${this.clinicsFilter.name}_Qualit\xE4tskriterien_${this.clinicsFilterYear}`,this.export=new LZ(this._clinicsFilterService,this._administrativeDistrictService,this._fabService,this.clinicsFilter,this.clinicsFilterYear,this.clinicTypePipe,this.bmgCriteriaView)}static{this.\u0275fac=function(i){return new(i||t)(_e(Hs),_e(Wc),_e(Hu),_e(qu))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-quality-criteria-export"]],inputs:{clinicsFilter:"clinicsFilter",clinicsFilterYear:"clinicsFilterYear",bmgCriteriaView:"bmgCriteriaView"},features:[jt([Wc]),Ot],decls:1,vars:2,consts:[[3,"data","filename"]],template:function(i,o){i&1&&ce(0,"bd-export-as-file",0),i&2&&E("data",o.export)("filename",o.filename)},dependencies:[Sd],encapsulation:2})}}return t})();var VHt=["button"],zHt=["*"];function UHt(t,n){if(t&1&&(k(0,"div",2),ce(1,"mat-pseudo-checkbox",6),D()),t&2){let e=P();T(),E("disabled",e.disabled)}}var v5e=new fi("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:HHt});function HHt(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var b5e=new fi("MatButtonToggleGroup"),jHt={provide:Ea,useExisting:Ko(()=>mme),multi:!0},NZ=class{source;value;constructor(n,e){this.source=n,this.value=e}},mme=(()=>{class t{_changeDetector=re(Gi);_dir=re(ad,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}_name=re(ul).getId("mat-button-toggle-group-");vertical;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(i=>i.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new ve;get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new ve;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(e){this._hideMultipleSelectionIndicator=e,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let e=re(v5e,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this.hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new nm(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked)),this.multiple||this._initializeTabIndex()}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_keydown(e){if(this.multiple||this.disabled||pu(e))return;let o=e.target.id,r=this._buttonToggles.toArray().findIndex(d=>d.buttonId===o),s=null;switch(e.keyCode){case 32:case 13:s=this._buttonToggles.get(r)||null;break;case 38:s=this._getNextButton(r,-1);break;case 37:s=this._getNextButton(r,this.dir==="ltr"?-1:1);break;case 40:s=this._getNextButton(r,1);break;case 39:s=this._getNextButton(r,this.dir==="ltr"?1:-1);break;default:return}s&&(e.preventDefault(),s._onButtonClick(),s.focus())}_emitChangeEvent(e){let i=new NZ(e,this.value);this._rawValue=i.value,this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(e,i,o=!1,r=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?i?this._selectionModel.select(e):this._selectionModel.deselect(e):r=!0,r?Promise.resolve().then(()=>this._updateModelValue(e,o)):this._updateModelValue(e,o)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(i=>e.value!=null&&i===e.value):e.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(e=>{e.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let e=0;ethis._selectValue(o,i))):(this._clearSelection(),this._selectValue(e,i)),!this.multiple&&i.every(o=>o.tabIndex===-1)){for(let o of i)if(!o.disabled){o.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,i){for(let o of i)if(o.value===e){o.checked=!0,this._selectionModel.select(o),this.multiple||(o.tabIndex=0);break}}_updateModelValue(e,i){i&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(i){return new(i||t)};static \u0275dir=rn({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(i,o,r){if(i&1&&xt(r,BZ,5),i&2){let s;Le(s=Ne())&&(o._buttonToggles=s)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(i,o){i&1&&ie("keydown",function(s){return o._keydown(s)}),i&2&&(Ge("role",o.multiple?"group":"radiogroup")("aria-disabled",o.disabled),Vn("mat-button-toggle-vertical",o.vertical)("mat-button-toggle-group-appearance-standard",o.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",je],value:"value",multiple:[2,"multiple","multiple",je],disabled:[2,"disabled","disabled",je],disabledInteractive:[2,"disabledInteractive","disabledInteractive",je],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",je],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",je]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[jt([jHt,{provide:b5e,useExisting:t}])]})}return t})(),BZ=(()=>{class t{_changeDetectorRef=re(Gi);_elementRef=re(Bn);_focusMonitor=re(gh);_idGenerator=re(ul);_animationDisabled=Cl();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(e){this._tabIndex.set(e)}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=e}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new ve;constructor(){re(kl).load(hp);let e=re(b5e,{optional:!0}),i=re(new Bm("tabindex"),{optional:!0})||"",o=re(v5e,{optional:!0});this._tabIndex=Zn(parseInt(i)||0),this.buttonToggleGroup=e,this.appearance=o&&o.appearance?o.appearance:"standard",this.disabledInteractive=o?.disabledInteractive??!1}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){if(this.disabled)return;let e=this.isSingleSelector()?!0:!this._checked;if(e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let i=this.buttonToggleGroup._buttonToggles.find(o=>o.tabIndex===0);i&&(i.tabIndex=-1),this.tabIndex=0}this.change.emit(new NZ(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=ne({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(i,o){if(i&1&&Ri(VHt,5),i&2){let r;Le(r=Ne())&&(o._buttonElement=r.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(i,o){i&1&&ie("focus",function(){return o.focus()}),i&2&&(Ge("aria-label",null)("aria-labelledby",null)("id",o.id)("name",null),Vn("mat-button-toggle-standalone",!o.buttonToggleGroup)("mat-button-toggle-checked",o.checked)("mat-button-toggle-disabled",o.disabled)("mat-button-toggle-disabled-interactive",o.disabledInteractive)("mat-button-toggle-appearance-standard",o.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",je],appearance:"appearance",checked:[2,"checked","checked",je],disabled:[2,"disabled","disabled",je],disabledInteractive:[2,"disabledInteractive","disabledInteractive",je]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:zHt,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(i,o){if(i&1){let r=tt();Nn(),k(0,"button",1,0),ie("click",function(){return se(r),ae(o._onButtonClick())}),qe(2,UHt,2,1,"div",2),k(3,"span",3),pn(4),D()(),ce(5,"span",4)(6,"span",5)}if(i&2){let r=ti(1);E("id",o.buttonId)("disabled",o.disabled&&!o.disabledInteractive||null),Ge("role",o.isSingleSelector()?"radio":"button")("tabindex",o.disabled&&!o.disabledInteractive?-1:o.tabIndex)("aria-pressed",o.isSingleSelector()?null:o.checked)("aria-checked",o.isSingleSelector()?o.checked:null)("name",o._getButtonName())("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledby)("aria-disabled",o.disabled&&o.disabledInteractive?"true":null),T(2),Ke(o.buttonToggleGroup&&(!o.buttonToggleGroup.multiple&&!o.buttonToggleGroup.hideSingleSelectionIndicator||o.buttonToggleGroup.multiple&&!o.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),T(4),E("matRippleTrigger",r)("matRippleDisabled",o.disableRipple||o.disabled)}},dependencies:[im,iq],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))} `],encapsulation:2,changeDetection:0})}return t})(),C5e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({imports:[Br,Qg,BZ,Br]})}return t})();function $Ht(t,n){if(t&1&&ce(0,"ays-clinics-filter-details-quality-criteria-table",12),t&2){let e=P();E("bmgCriteriaView",e.bmgCriteriaView)("data",e.data)}}function qHt(t,n){t&1&&(k(0,"span",13),Q(1,"Es wurden keine Kliniken f\xFCr den ausgew\xE4hlten Filter gefunden"),D())}var x5e=(()=>{class t{constructor(e){this._clinicsFilterService=e,this.loading$=new pi(1),this.data=[],this.selectedYear=Cd,this.bmgCriteriaView="physicianRequirements"}ngOnInit(){this._fetchData()}onYearChanged(e){this.selectedYear=e,this._fetchData()}_fetchData(){this.loading$.next(Gt.LOADING),this._clinicsFilterService.export(this.clinicsFilter,this.selectedYear).then(e=>{this.data=e,this.loading$.next(Gt.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(_e(Hs))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-details-quality-criteria"]],inputs:{clinicsFilter:"clinicsFilter"},decls:18,vars:8,consts:[["successTpl",""],["empty",""],[1,"flex","flex-row","gap-6"],[1,"flex-1","mat-title"],[1,"flex-none"],[3,"valueChange","value"],["value","deviceProvision"],["value","physicianRequirements"],[1,"flex-none","basis-20"],[3,"yearChange","selectedYear"],[3,"clinicsFilter","clinicsFilterYear","bmgCriteriaView"],[3,"loadItem","successTemplate","errorTemplate"],[3,"bmgCriteriaView","data"],[1,"mat-body-1"]],template:function(i,o){if(i&1){let r=tt();k(0,"div",2)(1,"span",3),Q(2,"Qualit\xE4tskriterien"),D(),k(3,"div",4)(4,"mat-button-toggle-group",5),ie("valueChange",function(d){return se(r),ae(o.bmgCriteriaView=d)}),k(5,"mat-button-toggle",6),Q(6,"Ger\xE4tevorhaltung "),D(),k(7,"mat-button-toggle",7),Q(8,"Fach\xE4rztliche Vorgaben "),D()()(),k(9,"span",8)(10,"ays-clinics-filter-details-year-select",9),ie("yearChange",function(d){return se(r),ae(o.onYearChanged(d))}),D()(),k(11,"div",8),ce(12,"ays-clinics-filter-details-quality-criteria-export",10),D()(),ce(13,"bd-loader",11),ee(14,$Ht,1,2,"ng-template",null,0,Pt)(16,qHt,2,0,"ng-template",null,1,Pt)}if(i&2){let r=ti(15),s=ti(17);T(4),E("value",o.bmgCriteriaView),T(6),E("selectedYear",o.selectedYear),T(2),E("clinicsFilter",o.clinicsFilter)("clinicsFilterYear",o.selectedYear)("bmgCriteriaView",o.bmgCriteriaView),T(),E("loadItem",o.loading$)("successTemplate",r)("errorTemplate",s)}},dependencies:[Ux,Kn,_5e,y5e,C5e,mme,BZ],encapsulation:2})}}return t})();var KHt=()=>["/clinics-filters"];function WHt(t,n){if(t&1&&(k(0,"p-tabpanel",8)(1,"div",9),ce(2,"ays-clinics-filter-show-overview",10),D()()),t&2){let e=P(2);E("value",0),T(2),E("filter",e.clinicsFilter)}}function YHt(t,n){if(t&1&&(k(0,"p-tabpanel",8)(1,"div",9),ce(2,"ays-clinics-filter-details-result",10),D()()),t&2){let e=P(2);E("value",1),T(2),E("filter",e.clinicsFilter)}}function QHt(t,n){if(t&1&&(k(0,"p-tabpanel",8)(1,"div",9),ce(2,"ays-clinics-filter-details-case-numbers",1),D()()),t&2){let e=P(2);E("value",2),T(2),E("clinicsFilter",e.clinicsFilter)}}function ZHt(t,n){if(t&1&&(k(0,"p-tabpanel",8)(1,"div",9),ce(2,"ays-clinics-filter-details-staffing",1),D()()),t&2){let e=P(2);E("value",3),T(2),E("clinicsFilter",e.clinicsFilter)}}function XHt(t,n){if(t&1&&(k(0,"p-tabpanel",8)(1,"div",9),ce(2,"ays-clinics-filter-details-quality-criteria",1),D()()),t&2){let e=P(2);E("value",4),T(2),E("clinicsFilter",e.clinicsFilter)}}function JHt(t,n){if(t&1){let e=tt();k(0,"p-tabs",7),ie("valueChange",function(o){se(e);let r=P();return ae(r.tabIndex=o)}),k(1,"p-tablist")(2,"p-tab",8),Q(3,"\xDCbersicht"),D(),k(4,"p-tab",8),Q(5,"Ergebnismenge"),D(),k(6,"p-tab",8),Q(7,"Fallzahlen"),D(),k(8,"p-tab",8),Q(9,"Personal"),D(),k(10,"p-tab",8),Q(11,"Qualit\xE4tskriterien"),D()(),k(12,"p-tabpanels"),qe(13,WHt,3,2,"p-tabpanel",8),qe(14,YHt,3,2,"p-tabpanel",8),qe(15,QHt,3,2,"p-tabpanel",8),qe(16,ZHt,3,2,"p-tabpanel",8),qe(17,XHt,3,2,"p-tabpanel",8),D()(),ce(18,"mat-divider")}if(t&2){let e=P();E("value",e.tabIndex),T(2),E("value",0),T(2),E("value",1),T(2),E("value",2),T(2),E("value",3),T(2),E("value",4),T(3),Ke(e.tabIndex===0?13:-1),T(),Ke(e.tabIndex===1?14:-1),T(),Ke(e.tabIndex===2?15:-1),T(),Ke(e.tabIndex===3?16:-1),T(),Ke(e.tabIndex===4?17:-1)}}var w5e=(()=>{class t extends dr{constructor(e){super(),this._activatedRoute=e,this.tabIndex=0,this.loading$=new pi(1),this.loading$.next(Gt.LOADING);let i=this._activatedRoute.data.subscribe(o=>this._onRouteDataChange(o));this._subs.push(i)}ngOnDestroy(){this.unsubscribeAll()}_onRouteDataChange(e){this.clinicsFilter=e.clinicsFilter,this.loading$.next(Gt.SUCCESS)}static{this.\u0275fac=function(i){return new(i||t)(_e(vl))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-show"]],features:[ft],decls:10,vars:5,consts:[["successTpl",""],[3,"clinicsFilter"],[3,"loadItem","successTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse"],[1,"flex-none"],["mat-button","","color","accent",3,"routerLink"],[3,"valueChange","value"],[3,"value"],[1,"bd-container"],[3,"filter"]],template:function(i,o){if(i&1&&(ce(0,"ays-clinics-filter-details-header",1)(1,"bd-loader",2),k(2,"div",3)(3,"div",4)(4,"div",5)(5,"a",6)(6,"span"),Q(7,"Zur \xDCbersicht"),D()()()()(),ee(8,JHt,19,11,"ng-template",null,0,Pt)),i&2){let r=ti(9);E("clinicsFilter",o.clinicsFilter),T(),E("loadItem",o.loading$)("successTemplate",r),T(4),E("routerLink",uo(4,KHt))}},dependencies:[I4e,f5e,p5e,m5e,x5e,s5e,Kn,Tn,yo,il,Gl,Bs,DN,m_,fb,mb,Dy,hb],encapsulation:2})}}return t})();var e7t=[{path:"",pathMatch:"full",component:x4e,canActivate:[Od],data:{pageTitle:kd.title("Klinik-Filter")}},{path:"new",component:v4e,canActivate:[Od],data:{pageTitle:kd.title("Klinik-Filter")}},{path:":clinicsFilterId",data:{pageTitle:kd.title("Klinik-Filter")},children:[{path:"",pathMatch:"full",component:w5e,canActivate:[Od],resolve:{clinicsFilter:wNe}},{path:"edit",component:y4e,canActivate:[Od]}]}];function t7t(t,n){if(t&1&&(k(0,"p-message",1),Q(1),D()),t&2){let e=P();T(),dt(e.notification)}}var S5e=(()=>{class t{constructor(e,i){this.config=e,this.ref=i,this.loading$=new pi(1),this.notification=null,this.includes=[],this.excludes=[]}onIncludeSelectionChange(e){this.includes=[...e.map(i=>({id:i.id.clone(),address:i.address.clone(),name:i.name}))],this._validate()}onExcludeSelectionChange(e){this.excludes=[...e.map(i=>({id:i.id.clone(),address:i.address.clone(),name:i.name}))],this._validate()}submit(){this.ref.close({includes:this.includes.map(e=>e.id),excludes:this.excludes.map(e=>e.id)})}_validate(){let e=this.includes.map(o=>o.id.sn),i=this.excludes.map(o=>o.id.sn);e.some(o=>i.includes(o))?this.notification="Eine oder mehrere Kliniken sind in der Basis- und Ausschluss-Menge enthalten, bitte korrigieren":this.notification=null}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],features:[jt([Mo])],decls:20,vars:8,consts:[[1,"flex","flex-col","gap-4"],["severity","error"],["value","include"],[3,"value"],["value","exclude"],["titleText","Basismenge",3,"selectionChange","initialSelection"],["titleText","Ausschluss-Menge",3,"selectionChange","initialSelection"],[1,"flex","flex-row","gap-4","justify-end"],["severity","secondary",3,"click","outlined"],["data-test","clinics-filter-form-clinic-import-button",3,"onClick","raised","disabled"]],template:function(i,o){i&1&&(k(0,"div",0),qe(1,t7t,2,1,"p-message",1),k(2,"p-tabs",2)(3,"p-tablist")(4,"p-tab",2),Q(5," Basismenge "),ce(6,"p-badge",3),D(),k(7,"p-tab",4),Q(8," Ausschluss-Menge "),ce(9,"p-badge",3),D()(),k(10,"p-tabpanels")(11,"p-tabpanel",2)(12,"ays-clinic-select-list",5),ie("selectionChange",function(s){return o.onIncludeSelectionChange(s)}),D()(),k(13,"p-tabpanel",4)(14,"ays-clinic-select-list",6),ie("selectionChange",function(s){return o.onExcludeSelectionChange(s)}),D()()()(),k(15,"div",7)(16,"p-button",8),ie("click",function(){return o.ref.close()}),Q(17,"Abbrechen "),D(),k(18,"p-button",9),ie("onClick",function(){return o.submit()}),Q(19," Klinken \xFCbernehmen "),D()()()),i&2&&(T(),Ke(o.notification?1:-1),T(5),E("value",o.includes==null?null:o.includes.length),T(3),E("value",o.excludes==null?null:o.excludes.length),T(3),E("initialSelection",o.config.data==null?null:o.config.data.includes),T(2),E("initialSelection",o.config.data==null?null:o.config.data.excludes),T(2),E("outlined",!0),T(2),E("raised",!0)("disabled",o.includes.length===0&&o.excludes.length===0||o.notification))},dependencies:[$o,Tn,pY,vS,ja,m_,Dy,hb,fb,mb,ome,jw],encapsulation:2})}}return t})();var i7t={editable:!0},T5e=(()=>{class t{constructor(e){this._dialogService=e,this.pluginConfig=i7t,this.pluginChange=new ve,this.text="Alle Kliniken werden als Basismenge genutzt",this.errorMessage=null}ngOnChanges(e){e.plugin&&this._update(this.plugin),e.pluginValid&&(this.errorMessage=this.pluginValid?null:this.plugin.validationToText())}openEditDialog(){let e=mt(be({},ju),{header:"Kliniken ausw\xE4hlen",data:{includes:this.plugin.includes,excludes:this.plugin.excludes}});this._dialogService.open(S5e,e).onClose.pipe(wn(i=>!!i)).subscribe(i=>{this._update(new Rx(i.includes,i.excludes)),this.pluginChange.emit(new Rx(i.includes,i.excludes))})}_update(e){this.text="",this.plugin=e.clone(),e.includes?.length>0?this.text=`${e.includes?.length} Kliniken als Basismenge`:this.text="Alle Kliniken werden als Basismenge genutzt",e.excludes?.length>0&&(this.text=this.text.concat(`, ${e.excludes?.length} Kliniken werden ausgeschlossen`))}static{this.\u0275fac=function(i){return new(i||t)(_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-condition-form-clinic-ids"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[jt([Mo]),Ot],decls:1,vars:3,consts:[["pluginId","clinics-filter-condition-form-clinic-ids",3,"pluginChangeClick","pluginValid","pluginSummary","pluginValidationMessage"]],template:function(i,o){i&1&&(k(0,"filter-condition-expression-plugin-summary",0),ie("pluginChangeClick",function(){return o.openEditDialog()}),D()),i&2&&E("pluginValid",o.pluginValid)("pluginSummary",o.text)("pluginValidationMessage",o.errorMessage)},dependencies:[EBe],encapsulation:2,changeDetection:0})}}return t})();var I5e=(()=>{class t{constructor(e,i){this.config=e,this.ref=i,this.expression=e.data?.expression.clone()}onExpressionChanged(e){this.expression=e.clone()}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:5,vars:3,consts:[[1,"p-4"],[3,"expressionChange","expression"],[1,"flex","flex-row","gap-4","justify-end"],["label","Abbrechen","severity","secondary",3,"onClick","outlined"],["label","\xDCbernehmen",3,"onClick","disabled"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"ays-clinics-filter-form-expression",1),ie("expressionChange",function(s){return o.onExpressionChanged(s)}),D()(),k(2,"div",2)(3,"p-button",3),ie("onClick",function(){return o.ref.close()}),D(),k(4,"p-button",4),ie("onClick",function(){return o.ref.close(o.expression.clone())}),D()()),i&2&&(T(),E("expression",o.config.data==null?null:o.config.data.expression),T(2),E("outlined",!0),T(),E("disabled",!o.expression.valid()))},dependencies:[SZ,ja],encapsulation:2})}}return t})();var E5e=(()=>{class t{constructor(){this.options=C4e,this.clinicsFilterSelect=new ve,this.resourceName=ko.CLINICS_FILTER}ngOnChanges(e){e.clinicsFilterId&&(this.selectedClinicsFilters={id:this.clinicsFilterId})}onClinicsFilterSelect(e){let i=e?.resource?e.resource.clone():null;this.clinicsFilterSelect.emit(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-clinics-filter-select-inline"]],inputs:{clinicsFilterId:"clinicsFilterId",options:"options"},outputs:{clinicsFilterSelect:"clinicsFilterSelect"},features:[Ot],decls:1,vars:3,consts:[[3,"resourceSelectChange","config","resourceSelect","resourceName"]],template:function(i,o){i&1&&(k(0,"bd-resources-select-inline-single",0),ie("resourceSelectChange",function(s){return o.onClinicsFilterSelect(s)}),D()),i&2&&E("config",o.options)("resourceSelect",o.selectedClinicsFilters)("resourceName",o.resourceName)},dependencies:[m6],encapsulation:2})}}return t})();var GN=(()=>{class t{constructor(){this._clinicsFilter=new Gs(Hs.newDefaultClinicFilter()),this._clinicsResult=new pi(1),this.clinicsFilter$=this._clinicsFilter.asObservable().pipe(rp((e,i)=>e.equals(i))),this.clinicsFilterResult$=this._clinicsResult.asObservable()}updateClinicsFilter(e){this._clinicsFilter.next(e)}updateClinicsFilterResult(e){this._clinicsResult.next(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var D5e=(()=>{class t{constructor(e,i){this.ref=i,this.clinicsFilter=e.data?.clinicsFilter.clone()}onClinicFilterChange(e){this.clinicsFilter=e.clone()}static{this.\u0275fac=function(i){return new(i||t)(_e(Us),_e(es))}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:5,vars:2,consts:[[1,"flex","flex-col"],[3,"clinicsFilterSave","clinicsFilter"],[1,"flex","flex-row","gap-4","justify-end"],["label","Abbrechen","severity","secondary",3,"onClick","outlined"],["label","Speichern",3,"onClick"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"ays-clinics-filter-form",1),ie("clinicsFilterSave",function(s){return o.onClinicFilterChange(s)}),D(),k(2,"div",2)(3,"p-button",3),ie("onClick",function(){return o.ref.close()}),D(),k(4,"p-button",4),ie("onClick",function(){return o.ref.close(o.clinicsFilter)}),D()()()),i&2&&(T(),E("clinicsFilter",o.clinicsFilter),T(2),E("outlined",!0))},dependencies:[UN,ja],encapsulation:2})}}return t})();function n7t(t,n){t&1&&(k(0,"p-message",3),Q(1,"Ein Fehler ist aufgetreten, der Vorgang wurde abgebrochen "),D())}function o7t(t,n){if(t&1){let e=tt();k(0,"div",8)(1,"p-divider",9)(2,"b"),Q(3,"oder"),D()()(),k(4,"div",7)(5,"ays-clinics-filter-select-inline",10),ie("clinicsFilterSelect",function(o){se(e);let r=P(3);return ae(r.onClinicsFilterChange(o))}),D()()}}function r7t(t,n){if(t&1){let e=tt();k(0,"div",7)(1,"p-button",11),ie("click",function(o){se(e);let r=ti(3);return ae(r.toggle(o))}),D(),ce(2,"p-tieredMenu",12,1),D()}if(t&2){let e=P(3);T(),E("raised",!1)("outlined",!0),T(),E("model",e.items)("popup",!0)}}function s7t(t,n){if(t&1&&qe(0,o7t,6,0)(1,r7t,4,4,"div",7),t&2){let e=P(2);Ke(e.showWizard?0:1)}}function a7t(t,n){if(t&1){let e=tt();k(0,"div",4)(1,"div",5)(2,"filter-condition-expression-form-field",6),ie("expressionEdit",function(){se(e);let o=P();return ae(o.onEditExpression())}),D()(),qe(3,s7t,2,1),D()}if(t&2){let e=P();T(2),E("expression",e.clinicsFilter.expression),T(),Ke(e.authentication?3:-1)}}var A5e=(()=>{class t{constructor(e,i,o,r){this._geographicAnalysisService=e,this._authentificationService=i,this._clinicsFilterService=o,this._dialogService=r,this.resourceName=ko.CLINICS_FILTER,this.loading$=new pi(1),this.showWizard=!0,this.showErrorMessage=!1,this.authentication=!1,this.clinicsFilter=Hs.newDefaultClinicFilter(),this.items=[],this._geographicAnalysisService.updateClinicsFilter(Hs.newDefaultClinicFilter()),this._authentificationService.authentication$.subscribe(s=>this.authentication=s),this._geographicAnalysisService.clinicsFilter$.pipe(Vo(s=>{this.loading$.next(Gt.INIT),this.showErrorMessage=!1,this.clinicsFilter=s.clone(),s.id?this.items=[{label:`Klinik-Filter '${this.clinicsFilter.name}' \xFCberschreiben`,command:()=>this._updateExistingClinicFilter()},{label:"Klinik-Filter erstellen",command:()=>this._saveAsNewClinicFilter()},{separator:!0},{label:"Filter zur\xFCcksetzen",command:()=>this.reset()}]:this.items=[{label:"Klinik-Filter erstellen",command:()=>this._saveAsNewClinicFilter()},{separator:!0},{label:"Filter zur\xFCcksetzen",command:()=>this.reset()}]}),wn(s=>s.expression.valid()),id(500),Mn(s=>this._clinicsFilterService.result(s).pipe(Gd(()=>(this.showErrorMessage=!0,ci([])))))).subscribe({next:s=>{this._geographicAnalysisService.updateClinicsFilterResult(s)},error:()=>{this.showErrorMessage=!0}})}onEditExpression(){let e=mt(be({},ju),{header:"Filter Einstellung",data:{expression:this.clinicsFilter.expression.clone()}});this._dialogService.open(I5e,e).onClose.pipe(wn(i=>!!i)).subscribe(i=>this._onExpressionChange(i.clone()))}onClinicsFilterChange(e){this.loading$.next(Gt.LOADING),this.showWizard=!1,this.clinicsFilter=e.clone(),this._geographicAnalysisService.updateClinicsFilter(e.clone())}reset(){this.loading$.next(Gt.INIT),this.clinicsFilter=Hs.newDefaultClinicFilter(),this._geographicAnalysisService.updateClinicsFilter(Hs.newDefaultClinicFilter()),this.showWizard=!0,this.items=[]}_onExpressionChange(e){this.showWizard=!1,this.clinicsFilter.expression=e.clone(),this._geographicAnalysisService.updateClinicsFilter(this.clinicsFilter.clone())}_saveAsNewClinicFilter(){this.loading$.next(Gt.LOADING);let e=mt(be({},ju),{header:"Klinik-Filter speichern",data:{clinicsFilter:this.clinicsFilter.clone()}});this._dialogService.open(D5e,e).onClose.pipe(Vo(()=>this.loading$.next(Gt.INIT)),wn(i=>!!i),Mn(i=>this._clinicsFilterService.create(i))).subscribe(i=>this.onClinicsFilterChange(i))}_updateExistingClinicFilter(){this.loading$.next(Gt.LOADING),this._clinicsFilterService.update(this.clinicsFilter).subscribe(()=>this.loading$.next(Gt.INIT))}static{this.\u0275fac=function(i){return new(i||t)(_e(GN),_e(vp),_e(Hs),_e(Mo))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-geographic-analysis-header"]],features:[jt([Mo])],decls:4,vars:3,consts:[["initTpl",""],["menu",""],[3,"loadItem","initTemplate"],["severity","error","variant","text"],[1,"flex","flex-row","gap-4","m-4"],[1,"basis-2/3"],[3,"expressionEdit","expression"],[1,"flex-1"],[1,"w-12"],["layout","vertical"],[3,"clinicsFilterSelect"],["label","Speichern","severity","secondary",3,"click","raised","outlined"],["appendTo","body",3,"model","popup"]],template:function(i,o){if(i&1&&(ce(0,"bd-loader",2),qe(1,n7t,2,0,"p-message",3),ee(2,a7t,4,2,"ng-template",null,0,Pt)),i&2){let r=ti(3);E("loadItem",o.loading$)("initTemplate",r),T(),Ke(o.showErrorMessage?1:-1)}},dependencies:[BQ,E5e,Kn,yVe,ja,yS,vS],encapsulation:2})}}return t})();var VZ=class extends Sh{constructor(n,e,i,o){super(),this._clinicsFilterService=n,this._administrativeDistrictService=e,this._clinicTypePipe=i,this._clinics=o}getExport(){return bt(this,null,function*(){let n=yield this._fetchData();return{data:n.exports.map(e=>this._getDataRow(e,n.administrativeDistricts)),fields:this._getFieldNames()}})}_fetchData(){return bt(this,null,function*(){let n=new uf;n.expression=new x0([new K2([99]),new Rx(this._clinics.map(r=>r.clinic.id),[])]);let e=yield this._clinicsFilterService.export(n,Cd),i=e.map(r=>Yo.create(r.address.administrativeDistrictId)),o=yield Wl(this._administrativeDistrictService.findAll(i));return{exports:e,administrativeDistricts:o}})}_getDataRow(n,e){let i=Yo.createFromNumber(n.address.administrativeDistrictId),o=e[i.toString()],r=i?rg.byId(i.getStateId()):void 0;return[{value:n.id.ik.toString(),type:"string"},{value:n.id.sn.toString(),type:"string"},{value:n.name,type:"string"},{value:n.address.street,type:"string"},{value:n.address.postalCode,type:"string"},{value:n.address.city,type:"string"},{value:o?.displayName()??"",type:"string"},{value:r?.name??"",type:"string"},{value:n.beds,type:"number"},{value:this._clinicTypePipe.transform(n.type),type:"string"},{value:n.nameOfOwner,type:"string"},{value:n.clinicLevel?n.clinicLevel.displayName.de:"n/a",type:"string"},{value:n.isInekCalculationLocation?"ja":"nein",type:"string"}]}_getFieldNames(){return["IK","SN","Name Klinik","Stra\xDFe","PLZ","Ort","Landkreis","Bundesland","Anzahl Betten","Tr\xE4gerart","Tr\xE4ger","Versorgungslevel","InEK Kalkulationskrankenhaus"]}};function l7t(t,n){if(t&1&&(k(0,"div",1)(1,"div",2),ce(2,"bd-export-as-file",3),D()(),ce(3,"ays-clinics-container-list",4)),t&2){let e=P();T(2),E("data",e.clinicListExport)("filename",e.exportFilename)("config",e.exportConfig),T(),E("clinicContainers",e.clinics)("clinicLinkOptions",e.linkOptions)}}function c7t(t,n){t&1&&(k(0,"div",0),ce(1,"bd-message-empty",5),D()),t&2&&(T(),E("message","Ihr Filter enth\xE4lt keine Kliniken."))}var k5e=(()=>{class t{constructor(e,i,o,r,s){this._authenticationService=e,this._geographicAnalysisService=i,this._clinicsFilterService=o,this._administrativeDistrictService=r,this._clinicTypePipe=s,this.clinics=[],this.authenticated=!1,this.linkOptions={target:"_blank"},this.exportConfig=mt(be({},hg),{authenticationStrategy:"reduce",authenticationStrategyConfig:{resultSetCount:50},form:{defaultLabels:["Geo-Analyse"],availableExportTypes:["csv","xlsx"]}}),this.exportFilename="Geo-Analyse-Kliniken",this._authenticationService.authentication$.subscribe(d=>this.authenticated=d),this._geographicAnalysisService.clinicsFilterResult$.subscribe(d=>{this.clinics=d,this.clinicListExport=new VZ(this._clinicsFilterService,this._administrativeDistrictService,this._clinicTypePipe,this.clinics)})}static{this.\u0275fac=function(i){return new(i||t)(_e(vp),_e(GN),_e(Hs),_e(Hu),_e(Wc))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-geographic-analysis-clinics-list"]],features:[jt([Wc])],decls:2,vars:1,consts:[[1,"bd-container"],[1,"flex","flex-row-reverse"],[1,"flex-none"],[3,"data","filename","config"],[3,"clinicContainers","clinicLinkOptions"],[3,"message"]],template:function(i,o){i&1&&qe(0,l7t,4,5)(1,c7t,2,1,"div",0),i&2&&Ke(o.clinics&&o.clinics.length>0?0:1)},dependencies:[Sd,Rl,RZ],encapsulation:2})}}return t})();var M5e=Ap(Kw());var zZ=class extends wz{constructor(){super(...arguments),this._iconColor="#46256f",this._iconKey="marker-with-dot"}image(){return{imageName:"geo",svg:_2.findByIdAndFillWithColor(this._iconKey,new Cs(this._iconColor))?.value}}layer(){return{id:this._layerId(),type:"symbol",source:this.config.sourceId,layout:{"icon-image":"geo","icon-size":1,"icon-ignore-placement":!0,"icon-allow-overlap":!0,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-anchor":"top-left"},filter:["==",["get","itemActive"],!0],paint:{"icon-color":["get","colorAsHex"]}}}applyLegendConfig(n,e){this.config.legend?.action&&(n.legend={action:{title:"Kliniken Ansicht",component:this.config.legend.action.component,data:this.config.legend.action.dataFn(e),commands:[this._textFieldCommand(this.mapRef),this._textSizeCommand(this.mapRef),this._textAnchorCommand(this.mapRef),this._iconNameCommand(),this._iconColorCommand(),this._iconSizeCommand(this.mapRef)]}})}_iconSizeCommand(n){return{commandId:"icon-size",displayName:"Symbol Gr\xF6\xDFe",currentOption:{key:n.getLayoutProperty(this.layer().id,"icon-size")?n.getLayoutProperty(this.layer().id,"icon-size").toString():"0"},options:[{key:"0",value:0,displayName:"Nicht sichtbar"},{key:"0.5",value:.5,displayName:"halb so gro\xDF"},{key:"1",value:1,displayName:"Normal"},{key:"1.5",value:1.5,displayName:"1,5 mal so gro\xDF"},{key:"2",value:2,displayName:"2 mal so gro\xDF"}],commandFn:(e,i)=>e.setLayoutProperty(this._layerId(),"icon-size",i.value)}}_iconNameCommand(){return{commandId:"icon-name",displayName:"Symbol",currentOption:_2.findByIdAndFillWithColor(this._iconKey,new Cs),options:_2.findAllAndFillWithColor(),optionsType:"single-select-with-icon",commandFn:(n,e)=>{this._iconKey=e.key,this._updateIconImage(e.key,this._iconColor,n)}}}_iconColorCommand(){return{commandId:"icon-color",displayName:"Symbol Farbe",currentOption:{key:this._iconColor},options:[],optionsType:"color-select",commandFn:(n,e)=>{this._iconColor=e.value,this._updateIconImage(this._iconKey,this._iconColor,n)}}}_updateIconImage(n,e,i){let o=this.image()?.imageName,r=new Image(20,20),s=_2.findByIdAndFillWithColor(n,new Cs(e))?.value;r.onload=()=>i.updateImage(o,r),r.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`}};function d7t(t,n){t&1&&(k(0,"div",5),ce(1,"mat-progress-spinner",6),D()),t&2&&(T(),E("strokeWidth",6))}var O5e=(()=>{class t extends dr{constructor(e){super(),this._geographicAnalysisService=e,this.loading=!1,this.mapController=new Jd,this._clinicsLayer=new zZ("clinics",{displayName:"Kliniken",sourceId:"clinics",legend:{showInLegend:!0,action:{component:yPe,dataFn:i=>({data:i,layerDisplayName:"Kliniken"})}},popup:{popupType:"default",messagePrefix:null,messageFnc:null,titleFnc:i=>i.properties.itemName}}),this.mapOptions=be({},lm),this.mapController.registerLayer(this._clinicsLayer),this._subs.push(this._geographicAnalysisService.clinicsFilter$.subscribe(()=>this.loading=!0)),this._subs.push(this._geographicAnalysisService.clinicsFilterResult$.subscribe(i=>{this._updateClinics(i),this.loading=!1}))}ngOnDestroy(){this.unsubscribeAll()}onMapLoad(e){e.addControl(new M5e.FullscreenControl,"top-left"),this.mapController.addMapRef(e)}onMapOptionsChanged(e){this.mapOptions=JSON.parse(JSON.stringify(e))}_updateClinics(e){let i=e.filter(o=>o.clinic.address.location).map(o=>wh({type:"Point",coordinates:o.clinic.address.location},{itemKey:o.clinic.id.toString(),itemName:o.clinic.name,itemActive:!0,colorAsHex:"#3FB1CE"}));this._clinicsLayer.updateData(bd(i))}static{this.\u0275fac=function(i){return new(i||t)(_e(GN))}}static{this.\u0275cmp=ne({type:t,selectors:[["ays-geographic-analysis-map"]],features:[ft],decls:7,vars:5,consts:[[1,"ays-geographic-map-container"],[1,"map-container"],[3,"mapLoaded","mapOptions"],[3,"mapboxOptionsChange","controller","mapboxOptions"],[3,"controller"],[1,"idle-overlay","flex","flex-row","items-center","justify-center"],["mode","indeterminate",3,"strokeWidth"]],template:function(i,o){i&1&&(k(0,"div")(1,"div",0)(2,"div",1)(3,"bd-map",2),ie("mapLoaded",function(s){return o.onMapLoad(s)}),D()(),k(4,"bd-map-global-control",3),ie("mapboxOptionsChange",function(s){return o.onMapOptionsChanged(s)}),D(),ce(5,"bd-map-legend",4),qe(6,d7t,2,1,"div",5),D()()),i&2&&(T(3),E("mapOptions",o.mapOptions),T(),E("controller",o.mapController)("mapboxOptions",o.mapOptions),T(),E("controller",o.mapController),T(),Ke(o.loading?6:-1))},dependencies:[eu,$o,Tn,Yp,ode,_q],styles:[".ays-geographic-map-container[_ngcontent-%COMP%]{display:block;width:calc(var(--bd-app-container-width) - 1.25rem - 1.25rem);height:calc(100vh - 295px);position:absolute}.ays-geographic-map-container[_ngcontent-%COMP%] .map-container[_ngcontent-%COMP%]{height:inherit;width:inherit}.ays-geographic-map-container[_ngcontent-%COMP%] .idle-overlay[_ngcontent-%COMP%]{position:absolute;top:0;z-index:3;width:100%;height:100%;background-color:#00000012}"]})}}return t})();var R5e=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=ne({type:t,selectors:[["ng-component"]],decls:18,vars:0,consts:[[1,"flex","flex-col","gap-4"],[1,"flex-1"],["value","0"],["value","1"]],template:function(i,o){i&1&&(k(0,"div",0)(1,"div",1),ce(2,"ays-geographic-analysis-header"),D(),k(3,"div",1)(4,"p-tabs",2)(5,"p-tablist")(6,"p-tab",2),Q(7,"Karte"),D(),k(8,"p-tab",3),Q(9,"Tabelle"),D()(),k(10,"p-tabpanels")(11,"p-tabpanel",2)(12,"div")(13,"div"),ce(14,"ays-geographic-analysis-map"),D()()(),k(15,"p-tabpanel",3)(16,"div"),ce(17,"ays-geographic-analysis-clinics-list"),D()()()()()())},dependencies:[A5e,k5e,hb,m_,Dy,fb,mb,O5e],encapsulation:2})}}return t})();var F5e=[{path:"",pathMatch:"full",component:R5e,data:{pageTitle:kd.title("Geographische Analyse")}}];var u7t=Pp.forChild(F5e),P5e=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=_i({imports:[u7t,Pp]})}}return t})();var L5e=(()=>{class t{constructor(e){e.init()}static{this.\u0275fac=function(i){return new(i||t)(di(kd))}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=_i({providers:[NA,qu,kd],imports:[hhe,vQ,P$,uhe.forRoot(),hz,Kse,hz]})}}return t})();function f7t(t){let n=t,e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return e===1&&i===0?1:5}var N5e=["de",[["AM","PM"]],void 0,[["S","M","D","M","D","F","S"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["S","M","D","M","D","F","S"],["So","Mo","Di","Mi","Do","Fr","Sa"],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["v. Chr.","n. Chr."]],1,[6,0],["dd.MM.yy","dd.MM.y","d. MMMM y","EEEE, d. MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} 'um' {0}",void 0],[",",".",";","%","+","-","E","\xB7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","Euro",{ATS:["\xF6S"],AUD:["AU$","$"],BGM:["BGK"],BGO:["BGJ"],BYN:[void 0,"\u0440."],CUC:[void 0,"Cub$"],DEM:["DM"],FKP:[void 0,"Fl\xA3"],GHS:[void 0,"\u20B5"],GNF:[void 0,"F.G."],KMF:[void 0,"FC"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],RWF:[void 0,"F.Rw"],SYP:[],THB:["\u0E3F"],TWD:["NT$"],XXX:[],ZMW:[void 0,"K"]},"ltr",f7t];function B5e(t){return new mn(3e3,!1)}function g7t(){return new mn(3100,!1)}function _7t(){return new mn(3101,!1)}function y7t(t){return new mn(3001,!1)}function v7t(t){return new mn(3003,!1)}function b7t(t){return new mn(3004,!1)}function z5e(t,n){return new mn(3005,!1)}function U5e(){return new mn(3006,!1)}function H5e(){return new mn(3007,!1)}function j5e(t,n){return new mn(3008,!1)}function G5e(t){return new mn(3002,!1)}function $5e(t,n,e,i,o){return new mn(3010,!1)}function q5e(){return new mn(3011,!1)}function K5e(){return new mn(3012,!1)}function W5e(){return new mn(3200,!1)}function Y5e(){return new mn(3202,!1)}function Q5e(){return new mn(3013,!1)}function Z5e(t){return new mn(3014,!1)}function X5e(t){return new mn(3015,!1)}function J5e(t){return new mn(3016,!1)}function eze(t,n){return new mn(3404,!1)}function C7t(t){return new mn(3502,!1)}function tze(t){return new mn(3503,!1)}function ize(){return new mn(3300,!1)}function nze(t){return new mn(3504,!1)}function oze(t){return new mn(3301,!1)}function rze(t,n){return new mn(3302,!1)}function sze(t){return new mn(3303,!1)}function aze(t,n){return new mn(3400,!1)}function lze(t){return new mn(3401,!1)}function cze(t){return new mn(3402,!1)}function dze(t,n){return new mn(3505,!1)}function wS(t){switch(t.length){case 0:return new ix;case 1:return t[0];default:return new p2(t)}}function vme(t,n,e=new Map,i=new Map){let o=[],r=[],s=-1,d=null;if(n.forEach(m=>{let v=m.get("offset"),w=v==s,O=w&&d||new Map;m.forEach((N,V)=>{let $=V,q=N;if(V!=="offset")switch($=t.normalizePropertyName($,o),q){case SP:q=e.get(V);break;case my:q=i.get(V);break;default:q=t.normalizeStyleValue(V,$,q,o);break}O.set($,q)}),w||r.push(O),d=O,s=v}),o.length)throw C7t(o);return r}function UZ(t,n,e,i){switch(n){case"start":t.onStart(()=>i(e&&gme(e,"start",t)));break;case"done":t.onDone(()=>i(e&&gme(e,"done",t)));break;case"destroy":t.onDestroy(()=>i(e&&gme(e,"destroy",t)));break}}function gme(t,n,e){let i=e.totalTime,o=!!e.disabled,r=HZ(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,i??t.totalTime,o),s=t._data;return s!=null&&(r._data=s),r}function HZ(t,n,e,i,o="",r=0,s){return{element:t,triggerName:n,fromState:e,toState:i,phaseName:o,totalTime:r,disabled:!!s}}function __(t,n,e){let i=t.get(n);return i||t.set(n,i=e),i}function bme(t){let n=t.indexOf(":"),e=t.substring(1,n),i=t.slice(n+1);return[e,i]}var x7t=typeof document>"u"?null:document.documentElement;function jZ(t){let n=t.parentNode||t.host||null;return n===x7t?null:n}function w7t(t){return t.substring(1,6)=="ebkit"}var yM=null,V5e=!1;function uze(t){yM||(yM=S7t()||{},V5e=yM.style?"WebkitAppearance"in yM.style:!1);let n=!0;return yM.style&&!w7t(t)&&(n=t in yM.style,!n&&V5e&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in yM.style)),n}function S7t(){return typeof document<"u"?document.body:null}function Cme(t,n){for(;n;){if(n===t)return!0;n=jZ(n)}return!1}function xme(t,n,e){if(e)return Array.from(t.querySelectorAll(n));let i=t.querySelector(n);return i?[i]:[]}var T7t=1e3,wme="{{",I7t="}}",Sme="ng-enter",GZ="ng-leave",l8="ng-trigger",c8=".ng-trigger",Tme="ng-animating",$Z=".ng-animating";function jx(t){if(typeof t=="number")return t;let n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:_me(parseFloat(n[1]),n[2])}function _me(t,n){switch(n){case"s":return t*T7t;default:return t}}function d8(t,n,e){return t.hasOwnProperty("duration")?t:D7t(t,n,e)}var E7t=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function D7t(t,n,e){let i,o=0,r="";if(typeof t=="string"){let s=t.match(E7t);if(s===null)return n.push(B5e(t)),{duration:0,delay:0,easing:""};i=_me(parseFloat(s[1]),s[2]);let d=s[3];d!=null&&(o=_me(parseFloat(d),s[4]));let m=s[5];m&&(r=m)}else i=t;if(!e){let s=!1,d=n.length;i<0&&(n.push(g7t()),s=!0),o<0&&(n.push(_7t()),s=!0),s&&n.splice(d,0,B5e(t))}return{duration:i,delay:o,easing:r}}function pze(t){return t.length?t[0]instanceof Map?t:t.map(n=>new Map(Object.entries(n))):[]}function _b(t,n,e){n.forEach((i,o)=>{let r=qZ(o);e&&!e.has(o)&&e.set(o,t.style[r]),t.style[r]=i})}function rD(t,n){n.forEach((e,i)=>{let o=qZ(i);t.style[o]=""})}function $N(t){return Array.isArray(t)?t.length==1?t[0]:lAe(t):t}function hze(t,n,e){let i=n.params||{},o=Ime(t);o.length&&o.forEach(r=>{i.hasOwnProperty(r)||e.push(y7t(r))})}var yme=new RegExp(`${wme}\\s*(.+?)\\s*${I7t}`,"g");function Ime(t){let n=[];if(typeof t=="string"){let e;for(;e=yme.exec(t);)n.push(e[1]);yme.lastIndex=0}return n}function qN(t,n,e){let i=`${t}`,o=i.replace(yme,(r,s)=>{let d=n[s];return d==null&&(e.push(v7t(s)),d=""),d.toString()});return o==i?t:o}var A7t=/-+([a-z0-9])/g;function qZ(t){return t.replace(A7t,(...n)=>n[1].toUpperCase())}function mze(t,n){return t===0||n===0}function fze(t,n,e){if(e.size&&n.length){let i=n[0],o=[];if(e.forEach((r,s)=>{i.has(s)||o.push(s),i.set(s,r)}),o.length)for(let r=1;rs.set(d,KZ(t,d)))}}return n}function y_(t,n,e){switch(n.type){case Qs.Trigger:return t.visitTrigger(n,e);case Qs.State:return t.visitState(n,e);case Qs.Transition:return t.visitTransition(n,e);case Qs.Sequence:return t.visitSequence(n,e);case Qs.Group:return t.visitGroup(n,e);case Qs.Animate:return t.visitAnimate(n,e);case Qs.Keyframes:return t.visitKeyframes(n,e);case Qs.Style:return t.visitStyle(n,e);case Qs.Reference:return t.visitReference(n,e);case Qs.AnimateChild:return t.visitAnimateChild(n,e);case Qs.AnimateRef:return t.visitAnimateRef(n,e);case Qs.Query:return t.visitQuery(n,e);case Qs.Stagger:return t.visitStagger(n,e);default:throw b7t(n.type)}}function KZ(t,n){return window.getComputedStyle(t)[n]}var jme=(()=>{class t{validateStyleProperty(e){return uze(e)}containsElement(e,i){return Cme(e,i)}getParentElement(e){return jZ(e)}query(e,i,o){return xme(e,i,o)}computeStyle(e,i,o){return o||""}animate(e,i,o,r,s,d=[],m){return new ix(o,r)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})(),bM=class{static NOOP=new jme},CM=class{};var k7t=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),XZ=class extends CM{normalizePropertyName(n,e){return qZ(n)}normalizeStyleValue(n,e,i,o){let r="",s=i.toString().trim();if(k7t.has(e)&&i!==0&&i!=="0")if(typeof i=="number")r="px";else{let d=i.match(/^[+-]?[\d\.]+([a-z]*)$/);d&&d[1].length==0&&o.push(z5e(n,i))}return s+r}};var JZ="*";function M7t(t,n){let e=[];return typeof t=="string"?t.split(/\s*,\s*/).forEach(i=>O7t(i,e,n)):e.push(t),e}function O7t(t,n,e){if(t[0]==":"){let m=R7t(t,e);if(typeof m=="function"){n.push(m);return}t=m}let i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(i==null||i.length<4)return e.push(X5e(t)),n;let o=i[1],r=i[2],s=i[3];n.push(gze(o,s));let d=o==JZ&&s==JZ;r[0]=="<"&&!d&&n.push(gze(s,o))}function R7t(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}var WZ=new Set(["true","1"]),YZ=new Set(["false","0"]);function gze(t,n){let e=WZ.has(t)||YZ.has(t),i=WZ.has(n)||YZ.has(n);return(o,r)=>{let s=t==JZ||t==o,d=n==JZ||n==r;return!s&&e&&typeof o=="boolean"&&(s=o?WZ.has(t):YZ.has(t)),!d&&i&&typeof r=="boolean"&&(d=r?WZ.has(n):YZ.has(n)),s&&d}}var Ize=":self",F7t=new RegExp(`s*${Ize}s*,?`,"g");function Eze(t,n,e,i){return new Ome(t).build(n,e,i)}var _ze="",Ome=class{_driver;constructor(n){this._driver=n}build(n,e,i){let o=new Rme(e);return this._resetContextStyleTimingState(o),y_(this,$N(n),o)}_resetContextStyleTimingState(n){n.currentQuerySelector=_ze,n.collectedStyles=new Map,n.collectedStyles.set(_ze,new Map),n.currentTime=0}visitTrigger(n,e){let i=e.queryCount=0,o=e.depCount=0,r=[],s=[];return n.name.charAt(0)=="@"&&e.errors.push(U5e()),n.definitions.forEach(d=>{if(this._resetContextStyleTimingState(e),d.type==Qs.State){let m=d,v=m.name;v.toString().split(/\s*,\s*/).forEach(w=>{m.name=w,r.push(this.visitState(m,e))}),m.name=v}else if(d.type==Qs.Transition){let m=this.visitTransition(d,e);i+=m.queryCount,o+=m.depCount,s.push(m)}else e.errors.push(H5e())}),{type:Qs.Trigger,name:n.name,states:r,transitions:s,queryCount:i,depCount:o,options:null}}visitState(n,e){let i=this.visitStyle(n.styles,e),o=n.options&&n.options.params||null;if(i.containsDynamicStyles){let r=new Set,s=o||{};i.styles.forEach(d=>{d instanceof Map&&d.forEach(m=>{Ime(m).forEach(v=>{s.hasOwnProperty(v)||r.add(v)})})}),r.size&&e.errors.push(j5e(n.name,[...r.values()]))}return{type:Qs.State,name:n.name,style:i,options:o?{params:o}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;let i=y_(this,$N(n.animation),e),o=M7t(n.expr,e.errors);return{type:Qs.Transition,matchers:o,animation:i,queryCount:e.queryCount,depCount:e.depCount,options:vM(n.options)}}visitSequence(n,e){return{type:Qs.Sequence,steps:n.steps.map(i=>y_(this,i,e)),options:vM(n.options)}}visitGroup(n,e){let i=e.currentTime,o=0,r=n.steps.map(s=>{e.currentTime=i;let d=y_(this,s,e);return o=Math.max(o,e.currentTime),d});return e.currentTime=o,{type:Qs.Group,steps:r,options:vM(n.options)}}visitAnimate(n,e){let i=B7t(n.timings,e.errors);e.currentAnimateTimings=i;let o,r=n.styles?n.styles:al({});if(r.type==Qs.Keyframes)o=this.visitKeyframes(r,e);else{let s=n.styles,d=!1;if(!s){d=!0;let v={};i.easing&&(v.easing=i.easing),s=al(v)}e.currentTime+=i.duration+i.delay;let m=this.visitStyle(s,e);m.isEmptyStep=d,o=m}return e.currentAnimateTimings=null,{type:Qs.Animate,timings:i,style:o,options:null}}visitStyle(n,e){let i=this._makeStyleAst(n,e);return this._validateStyleAst(i,e),i}_makeStyleAst(n,e){let i=[],o=Array.isArray(n.styles)?n.styles:[n.styles];for(let d of o)typeof d=="string"?d===my?i.push(d):e.errors.push(G5e(d)):i.push(new Map(Object.entries(d)));let r=!1,s=null;return i.forEach(d=>{if(d instanceof Map&&(d.has("easing")&&(s=d.get("easing"),d.delete("easing")),!r)){for(let m of d.values())if(m.toString().indexOf(wme)>=0){r=!0;break}}}),{type:Qs.Style,styles:i,easing:s,offset:n.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(n,e){let i=e.currentAnimateTimings,o=e.currentTime,r=e.currentTime;i&&r>0&&(r-=i.duration+i.delay),n.styles.forEach(s=>{typeof s!="string"&&s.forEach((d,m)=>{let v=e.collectedStyles.get(e.currentQuerySelector),w=v.get(m),O=!0;w&&(r!=o&&r>=w.startTime&&o<=w.endTime&&(e.errors.push($5e(m,w.startTime,w.endTime,r,o)),O=!1),r=w.startTime),O&&v.set(m,{startTime:r,endTime:o}),e.options&&hze(d,e.options,e.errors)})})}visitKeyframes(n,e){let i={type:Qs.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(q5e()),i;let o=1,r=0,s=[],d=!1,m=!1,v=0,w=n.steps.map(te=>{let fe=this._makeStyleAst(te,e),xe=fe.offset!=null?fe.offset:N7t(fe.styles),Fe=0;return xe!=null&&(r++,Fe=fe.offset=xe),m=m||Fe<0||Fe>1,d=d||Fe0&&r{let xe=N>0?fe==V?1:N*fe:s[fe],Fe=xe*W;e.currentTime=$+q.delay+Fe,q.duration=Fe,this._validateStyleAst(te,e),te.offset=xe,i.styles.push(te)}),i}visitReference(n,e){return{type:Qs.Reference,animation:y_(this,$N(n.animation),e),options:vM(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:Qs.AnimateChild,options:vM(n.options)}}visitAnimateRef(n,e){return{type:Qs.AnimateRef,animation:this.visitReference(n.animation,e),options:vM(n.options)}}visitQuery(n,e){let i=e.currentQuerySelector,o=n.options||{};e.queryCount++,e.currentQuery=n;let[r,s]=P7t(n.selector);e.currentQuerySelector=i.length?i+" "+r:r,__(e.collectedStyles,e.currentQuerySelector,new Map);let d=y_(this,$N(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:Qs.Query,selector:r,limit:o.limit||0,optional:!!o.optional,includeSelf:s,animation:d,originalSelector:n.selector,options:vM(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(Q5e());let i=n.timings==="full"?{duration:0,delay:0,easing:"full"}:d8(n.timings,e.errors,!0);return{type:Qs.Stagger,animation:y_(this,$N(n.animation),e),timings:i,options:null}}};function P7t(t){let n=!!t.split(/\s*,\s*/).find(e=>e==Ize);return n&&(t=t.replace(F7t,"")),t=t.replace(/@\*/g,c8).replace(/@\w+/g,e=>c8+"-"+e.slice(1)).replace(/:animating/g,$Z),[t,n]}function L7t(t){return t?be({},t):null}var Rme=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(n){this.errors=n}};function N7t(t){if(typeof t=="string")return null;let n=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){let i=e;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){let e=t;n=parseFloat(e.get("offset")),e.delete("offset")}return n}function B7t(t,n){if(t.hasOwnProperty("duration"))return t;if(typeof t=="number"){let r=d8(t,n).duration;return Eme(r,0,"")}let e=t;if(e.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=Eme(0,0,"");return r.dynamic=!0,r.strValue=e,r}let o=d8(e,n);return Eme(o.duration,o.delay,o.easing)}function vM(t){return t?(t=be({},t),t.params&&(t.params=L7t(t.params))):t={},t}function Eme(t,n,e){return{duration:t,delay:n,easing:e}}function Gme(t,n,e,i,o,r,s=null,d=!1){return{type:1,element:t,keyframes:n,preStyleProps:e,postStyleProps:i,duration:o,delay:r,totalTime:o+r,easing:s,subTimeline:d}}var p8=class{_map=new Map;get(n){return this._map.get(n)||[]}append(n,e){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}},V7t=1,z7t=":enter",U7t=new RegExp(z7t,"g"),H7t=":leave",j7t=new RegExp(H7t,"g");function Dze(t,n,e,i,o,r=new Map,s=new Map,d,m,v=[]){return new Fme().buildKeyframes(t,n,e,i,o,r,s,d,m,v)}var Fme=class{buildKeyframes(n,e,i,o,r,s,d,m,v,w=[]){v=v||new p8;let O=new Pme(n,e,v,o,r,w,[]);O.options=m;let N=m.delay?jx(m.delay):0;O.currentTimeline.delayNextStep(N),O.currentTimeline.setStyles([s],null,O.errors,m),y_(this,i,O);let V=O.timelines.filter($=>$.containsAnimation());if(V.length&&d.size){let $;for(let q=V.length-1;q>=0;q--){let W=V[q];if(W.element===e){$=W;break}}$&&!$.allowOnlyTimelineStyles()&&$.setStyles([d],null,O.errors,m)}return V.length?V.map($=>$.buildKeyframes()):[Gme(e,[],[],[],0,N,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){let i=e.subInstructions.get(e.element);if(i){let o=e.createSubContext(n.options),r=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,o,o.options);r!=s&&e.transformIntoNewTimeline(s)}e.previousNode=n}visitAnimateRef(n,e){let i=e.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,i),this.visitReference(n.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,i){for(let o of n){let r=o?.delay;if(r){let s=typeof r=="number"?r:jx(qN(r,o?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(n,e,i){let r=e.currentTimeline.currentTime,s=i.duration!=null?jx(i.duration):null,d=i.delay!=null?jx(i.delay):null;return s!==0&&n.forEach(m=>{let v=e.appendInstructionToTimeline(m,s,d);r=Math.max(r,v.duration+v.delay)}),r}visitReference(n,e){e.updateOptions(n.options,!0),y_(this,n.animation,e),e.previousNode=n}visitSequence(n,e){let i=e.subContextCount,o=e,r=n.options;if(r&&(r.params||r.delay)&&(o=e.createSubContext(r),o.transformIntoNewTimeline(),r.delay!=null)){o.previousNode.type==Qs.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=eX);let s=jx(r.delay);o.delayNextStep(s)}n.steps.length&&(n.steps.forEach(s=>y_(this,s,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>i&&o.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){let i=[],o=e.currentTimeline.currentTime,r=n.options&&n.options.delay?jx(n.options.delay):0;n.steps.forEach(s=>{let d=e.createSubContext(n.options);r&&d.delayNextStep(r),y_(this,s,d),o=Math.max(o,d.currentTimeline.currentTime),i.push(d.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(o),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){let i=n.strValue,o=e.params?qN(i,e.params,e.errors):i;return d8(o,e.errors)}else return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){let i=e.currentAnimateTimings=this._visitTiming(n.timings,e),o=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),o.snapshotCurrentStyles());let r=n.style;r.type==Qs.Keyframes?this.visitKeyframes(r,e):(e.incrementTime(i.duration),this.visitStyle(r,e),o.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){let i=e.currentTimeline,o=e.currentAnimateTimings;!o&&i.hasCurrentStyleProperties()&&i.forwardFrame();let r=o&&o.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(r):i.setStyles(n.styles,r,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){let i=e.currentAnimateTimings,o=e.currentTimeline.duration,r=i.duration,d=e.createSubContext().currentTimeline;d.easing=i.easing,n.styles.forEach(m=>{let v=m.offset||0;d.forwardTime(v*r),d.setStyles(m.styles,m.easing,e.errors,e.options),d.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(d),e.transformIntoNewTimeline(o+r),e.previousNode=n}visitQuery(n,e){let i=e.currentTimeline.currentTime,o=n.options||{},r=o.delay?jx(o.delay):0;r&&(e.previousNode.type===Qs.Style||i==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=eX);let s=i,d=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!o.optional,e.errors);e.currentQueryTotal=d.length;let m=null;d.forEach((v,w)=>{e.currentQueryIndex=w;let O=e.createSubContext(n.options,v);r&&O.delayNextStep(r),v===e.element&&(m=O.currentTimeline),y_(this,n.animation,O),O.currentTimeline.applyStylesToKeyframe();let N=O.currentTimeline.currentTime;s=Math.max(s,N)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),m&&(e.currentTimeline.mergeTimelineCollectedStyles(m),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){let i=e.parentContext,o=e.currentTimeline,r=n.timings,s=Math.abs(r.duration),d=s*(e.currentQueryTotal-1),m=s*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":m=d-m;break;case"full":m=i.currentStaggerTime;break}let w=e.currentTimeline;m&&w.delayNextStep(m);let O=w.currentTime;y_(this,n.animation,e),e.previousNode=n,i.currentStaggerTime=o.currentTime-O+(o.startTime-i.currentTimeline.startTime)}},eX={},Pme=class t{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=eX;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(n,e,i,o,r,s,d,m){this._driver=n,this.element=e,this.subInstructions=i,this._enterClassName=o,this._leaveClassName=r,this.errors=s,this.timelines=d,this.currentTimeline=m||new tX(this._driver,e,0),d.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;let i=n,o=this.options;i.duration!=null&&(o.duration=jx(i.duration)),i.delay!=null&&(o.delay=jx(i.delay));let r=i.params;if(r){let s=o.params;s||(s=this.options.params={}),Object.keys(r).forEach(d=>{(!e||!s.hasOwnProperty(d))&&(s[d]=qN(r[d],s,this.errors))})}}_copyOptions(){let n={};if(this.options){let e=this.options.params;if(e){let i=n.params={};Object.keys(e).forEach(o=>{i[o]=e[o]})}}return n}createSubContext(n=null,e,i){let o=e||this.element,r=new t(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,i||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(n),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(n){return this.previousNode=eX,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,i){let o={duration:e??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},r=new Lme(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,o,n.stretchStartingKeyframe);return this.timelines.push(r),o}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,i,o,r,s){let d=[];if(o&&d.push(this.element),n.length>0){n=n.replace(U7t,"."+this._enterClassName),n=n.replace(j7t,"."+this._leaveClassName);let m=i!=1,v=this._driver.query(this.element,n,m);i!==0&&(v=i<0?v.slice(v.length+i,v.length):v.slice(0,i)),d.push(...v)}return!r&&d.length==0&&s.push(Z5e(e)),d}},tX=class t{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(n,e,i,o){this._driver=n,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=o,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new t(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=V7t,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||my),this._currentKeyframe.set(e,my);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,i,o){e&&this._previousKeyframe.set("easing",e);let r=o&&o.params||{},s=G7t(n,this._globalTimelineStyles);for(let[d,m]of s){let v=qN(m,r,i);this._pendingStyles.set(d,v),this._localTimelineStyles.has(d)||this._backFill.set(d,this._globalTimelineStyles.get(d)??my),this._updateStyle(d,v)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,i)=>{let o=this._styleSummary.get(i);(!o||e.time>o.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let n=new Set,e=new Set,i=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((d,m)=>{let v=new Map([...this._backFill,...d]);v.forEach((w,O)=>{w===SP?n.add(O):w===my&&e.add(O)}),i||v.set("offset",m/this.duration),o.push(v)});let r=[...n.values()],s=[...e.values()];if(i){let d=o[0],m=new Map(d);d.set("offset",0),m.set("offset",1),o=[d,m]}return Gme(this.element,o,r,s,this.duration,this.startTime,this.easing,!1)}},Lme=class extends tX{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(n,e,i,o,r,s,d=!1){super(n,e,s.delay),this.keyframes=i,this.preStyleProps=o,this.postStyleProps=r,this._stretchStartingKeyframe=d,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:i,easing:o}=this.timings;if(this._stretchStartingKeyframe&&e){let r=[],s=i+e,d=e/s,m=new Map(n[0]);m.set("offset",0),r.push(m);let v=new Map(n[0]);v.set("offset",yze(d)),r.push(v);let w=n.length-1;for(let O=1;O<=w;O++){let N=new Map(n[O]),V=N.get("offset"),$=e+V*i;N.set("offset",yze($/s)),r.push(N)}i=s,e=0,o="",n=r}return Gme(this.element,n,this.preStyleProps,this.postStyleProps,i,e,o,!0)}};function yze(t,n=3){let e=Math.pow(10,n-1);return Math.round(t*e)/e}function G7t(t,n){let e=new Map,i;return t.forEach(o=>{if(o==="*"){i??=n.keys();for(let r of i)e.set(r,my)}else for(let[r,s]of o)e.set(r,s)}),e}function vze(t,n,e,i,o,r,s,d,m,v,w,O,N){return{type:0,element:t,triggerName:n,isRemovalTransition:o,fromState:e,fromStyles:r,toState:i,toStyles:s,timelines:d,queriedElements:m,preStyleProps:v,postStyleProps:w,totalTime:O,errors:N}}var Dme={},iX=class{_triggerName;ast;_stateStyles;constructor(n,e,i){this._triggerName=n,this.ast=e,this._stateStyles=i}match(n,e,i,o){return $7t(this.ast.matchers,n,e,i,o)}buildStyles(n,e,i){let o=this._stateStyles.get("*");return n!==void 0&&(o=this._stateStyles.get(n?.toString())||o),o?o.buildStyles(e,i):new Map}build(n,e,i,o,r,s,d,m,v,w){let O=[],N=this.ast.options&&this.ast.options.params||Dme,V=d&&d.params||Dme,$=this.buildStyles(i,V,O),q=m&&m.params||Dme,W=this.buildStyles(o,q,O),te=new Set,fe=new Map,xe=new Map,Fe=o==="void",Re={params:Aze(q,N),delay:this.ast.options?.delay},Se=w?[]:Dze(n,e,this.ast.animation,r,s,$,W,Re,v,O),ke=0;return Se.forEach(Xe=>{ke=Math.max(Xe.duration+Xe.delay,ke)}),O.length?vze(e,this._triggerName,i,o,Fe,$,W,[],[],fe,xe,ke,O):(Se.forEach(Xe=>{let yt=Xe.element,We=__(fe,yt,new Set);Xe.preStyleProps.forEach(we=>We.add(we));let Et=__(xe,yt,new Set);Xe.postStyleProps.forEach(we=>Et.add(we)),yt!==e&&te.add(yt)}),vze(e,this._triggerName,i,o,Fe,$,W,Se,[...te.values()],fe,xe,ke))}};function $7t(t,n,e,i,o){return t.some(r=>r(n,e,i,o))}function Aze(t,n){let e=be({},n);return Object.entries(t).forEach(([i,o])=>{o!=null&&(e[i]=o)}),e}var Nme=class{styles;defaultParams;normalizer;constructor(n,e,i){this.styles=n,this.defaultParams=e,this.normalizer=i}buildStyles(n,e){let i=new Map,o=Aze(n,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((s,d)=>{s&&(s=qN(s,o,e));let m=this.normalizer.normalizePropertyName(d,e);s=this.normalizer.normalizeStyleValue(d,m,s,e),i.set(d,s)})}),i}};function q7t(t,n,e){return new Bme(t,n,e)}var Bme=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(n,e,i){this.name=n,this.ast=e,this._normalizer=i,e.states.forEach(o=>{let r=o.options&&o.options.params||{};this.states.set(o.name,new Nme(o.style,r,i))}),bze(this.states,"true","1"),bze(this.states,"false","0"),e.transitions.forEach(o=>{this.transitionFactories.push(new iX(n,o,this.states))}),this.fallbackTransition=K7t(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,i,o){return this.transitionFactories.find(s=>s.match(n,e,i,o))||null}matchStyles(n,e,i){return this.fallbackTransition.buildStyles(n,e,i)}};function K7t(t,n,e){let i=[(s,d)=>!0],o={type:Qs.Sequence,steps:[],options:null},r={type:Qs.Transition,animation:o,matchers:i,options:null,queryCount:0,depCount:0};return new iX(t,r,n)}function bze(t,n,e){t.has(n)?t.has(e)||t.set(e,t.get(n)):t.has(e)&&t.set(n,t.get(e))}var W7t=new p8,Vme=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i}register(n,e){let i=[],o=[],r=Eze(this._driver,e,i,o);if(i.length)throw tze(i);this._animations.set(n,r)}_buildPlayer(n,e,i){let o=n.element,r=vme(this._normalizer,n.keyframes,e,i);return this._driver.animate(o,r,n.duration,n.delay,n.easing,[],!0)}create(n,e,i={}){let o=[],r=this._animations.get(n),s,d=new Map;if(r?(s=Dze(this._driver,e,r,Sme,GZ,new Map,new Map,i,W7t,o),s.forEach(w=>{let O=__(d,w.element,new Map);w.postStyleProps.forEach(N=>O.set(N,null))})):(o.push(ize()),s=[]),o.length)throw nze(o);d.forEach((w,O)=>{w.forEach((N,V)=>{w.set(V,this._driver.computeStyle(O,V,my))})});let m=s.map(w=>{let O=d.get(w.element);return this._buildPlayer(w,new Map,O)}),v=wS(m);return this._playersById.set(n,v),v.onDestroy(()=>this.destroy(n)),this.players.push(v),v}destroy(n){let e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);let i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(n){let e=this._playersById.get(n);if(!e)throw oze(n);return e}listen(n,e,i,o){let r=HZ(e,"","","");return UZ(this._getPlayer(n),i,r,o),()=>{}}command(n,e,i,o){if(i=="register"){this.register(n,o[0]);return}if(i=="create"){let s=o[0]||{};this.create(n,e,s);return}let r=this._getPlayer(n);switch(i){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(o[0]));break;case"destroy":this.destroy(n);break}}},Cze="ng-animate-queued",Y7t=".ng-animate-queued",Ame="ng-animate-disabled",Q7t=".ng-animate-disabled",Z7t="ng-star-inserted",X7t=".ng-star-inserted",J7t=[],kze={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},e9t={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},yb="__ng_removed",h8=class{namespaceId;value;options;get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;let i=n&&n.hasOwnProperty("value"),o=i?n.value:n;if(this.value=i9t(o),i){let r=n,{value:s}=r,d=Vf(r,["value"]);this.options=d}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){let e=n.params;if(e){let i=this.options.params;Object.keys(e).forEach(o=>{i[o]==null&&(i[o]=e[o])})}}},u8="void",kme=new h8(u8),zme=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(n,e,i){this.id=n,this.hostElement=e,this._engine=i,this._hostClassName="ng-tns-"+n,Oy(e,this._hostClassName)}listen(n,e,i,o){if(!this._triggers.has(e))throw rze(i,e);if(i==null||i.length==0)throw sze(e);if(!n9t(i))throw aze(i,e);let r=__(this._elementListeners,n,[]),s={name:e,phase:i,callback:o};r.push(s);let d=__(this._engine.statesByElement,n,new Map);return d.has(e)||(Oy(n,l8),Oy(n,l8+"-"+e),d.set(e,kme)),()=>{this._engine.afterFlush(()=>{let m=r.indexOf(s);m>=0&&r.splice(m,1),this._triggers.has(e)||d.delete(e)})}}register(n,e){return this._triggers.has(n)?!1:(this._triggers.set(n,e),!0)}_getTrigger(n){let e=this._triggers.get(n);if(!e)throw lze(n);return e}trigger(n,e,i,o=!0){let r=this._getTrigger(e),s=new m8(this.id,e,n),d=this._engine.statesByElement.get(n);d||(Oy(n,l8),Oy(n,l8+"-"+e),this._engine.statesByElement.set(n,d=new Map));let m=d.get(e),v=new h8(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&m&&v.absorbOptions(m.options),d.set(e,v),m||(m=kme),!(v.value===u8)&&m.value===v.value){if(!s9t(m.params,v.params)){let q=[],W=r.matchStyles(m.value,m.params,q),te=r.matchStyles(v.value,v.params,q);q.length?this._engine.reportError(q):this._engine.afterFlush(()=>{rD(n,W),_b(n,te)})}return}let N=__(this._engine.playersByElement,n,[]);N.forEach(q=>{q.namespaceId==this.id&&q.triggerName==e&&q.queued&&q.destroy()});let V=r.matchTransition(m.value,v.value,n,v.params),$=!1;if(!V){if(!o)return;V=r.fallbackTransition,$=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:V,fromState:m,toState:v,player:s,isFallbackTransition:$}),$||(Oy(n,Cze),s.onStart(()=>{KN(n,Cze)})),s.onDone(()=>{let q=this.players.indexOf(s);q>=0&&this.players.splice(q,1);let W=this._engine.playersByElement.get(n);if(W){let te=W.indexOf(s);te>=0&&W.splice(te,1)}}),this.players.push(s),N.push(s),s}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(o=>o.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);let e=this._engine.playersByElement.get(n);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){let i=this._engine.driver.query(n,c8,!0);i.forEach(o=>{if(o[yb])return;let r=this._engine.fetchNamespacesByElement(o);r.size?r.forEach(s=>s.triggerLeaveAnimation(o,e,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(n,e,i,o){let r=this._engine.statesByElement.get(n),s=new Map;if(r){let d=[];if(r.forEach((m,v)=>{if(s.set(v,m.value),this._triggers.has(v)){let w=this.trigger(n,v,u8,o);w&&d.push(w)}}),d.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,s),i&&wS(d).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){let e=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(e&&i){let o=new Set;e.forEach(r=>{let s=r.name;if(o.has(s))return;o.add(s);let m=this._triggers.get(s).fallbackTransition,v=i.get(s)||kme,w=new h8(u8),O=new m8(this.id,s,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:s,transition:m,fromState:v,toState:w,player:O,isFallbackTransition:!0})})}}removeNode(n,e){let i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let o=!1;if(i.totalAnimations){let r=i.players.length?i.playersByQueriedElement.get(n):[];if(r&&r.length)o=!0;else{let s=n;for(;s=s.parentNode;)if(i.statesByElement.get(s)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(n),o)i.markElementAsRemoved(this.id,n,!1,e);else{let r=n[yb];(!r||r===kze)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,e))}}insertNode(n,e){Oy(n,this._hostClassName)}drainQueuedTransitions(n){let e=[];return this._queue.forEach(i=>{let o=i.player;if(o.destroyed)return;let r=i.element,s=this._elementListeners.get(r);s&&s.forEach(d=>{if(d.name==i.triggerName){let m=HZ(r,i.triggerName,i.fromState.value,i.toState.value);m._data=n,UZ(i.player,d.phase,m,d.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):e.push(i)}),this._queue=[],e.sort((i,o)=>{let r=i.transition.ast.depCount,s=o.transition.ast.depCount;return r==0||s==0?r-s:this._engine.driver.containsElement(i.element,o.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}},Ume=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(n,e)=>{};_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,i){this.bodyNode=n,this.driver=e,this._normalizer=i}get queuedPlayers(){let n=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,e){let i=new zme(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,e){let i=this._namespaceList,o=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,d=this.driver.getParentElement(e);for(;d;){let m=o.get(d);if(m){let v=i.indexOf(m);i.splice(v+1,0,n),s=!0;break}d=this.driver.getParentElement(d)}s||i.unshift(n)}else i.push(n);return o.set(e,n),n}register(n,e){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,e)),i}registerTrigger(n,e,i){let o=this._namespaceLookup[n];o&&o.register(e,i)&&this.totalAnimations++}destroy(n,e){n&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let i=this._fetchNamespace(n);this.namespacesByHostElement.delete(i.hostElement);let o=this._namespaceList.indexOf(i);o>=0&&this._namespaceList.splice(o,1),i.destroy(e),delete this._namespaceLookup[n]}))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){let e=new Set,i=this.statesByElement.get(n);if(i){for(let o of i.values())if(o.namespaceId){let r=this._fetchNamespace(o.namespaceId);r&&e.add(r)}}return e}trigger(n,e,i,o){if(QZ(e)){let r=this._fetchNamespace(n);if(r)return r.trigger(e,i,o),!0}return!1}insertNode(n,e,i,o){if(!QZ(e))return;let r=e[yb];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(n){let s=this._fetchNamespace(n);s&&s.insertNode(e,i)}o&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Oy(n,Ame)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),KN(n,Ame))}removeNode(n,e,i){if(QZ(e)){let o=n?this._fetchNamespace(n):null;o?o.removeNode(e,i):this.markElementAsRemoved(n,e,!1,i);let r=this.namespacesByHostElement.get(e);r&&r.id!==n&&r.removeNode(e,i)}else this._onRemovalComplete(e,i)}markElementAsRemoved(n,e,i,o,r){this.collectedLeaveElements.push(e),e[yb]={namespaceId:n,setForRemoval:o,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:r}}listen(n,e,i,o,r){return QZ(e)?this._fetchNamespace(n).listen(e,i,o,r):()=>{}}_buildInstruction(n,e,i,o,r){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,o,n.fromState.options,n.toState.options,e,r)}destroyInnerAnimations(n){let e=this.driver.query(n,c8,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(n,$Z,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){let e=this.playersByElement.get(n);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){let e=this.playersByQueriedElement.get(n);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return wS(this.players).onDone(()=>n());n()})}processLeaveNode(n){let e=n[yb];if(e&&e.setForRemoval){if(n[yb]=kze,e.namespaceId){this.destroyInnerAnimations(n);let i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(Ame)&&this.markElementAsDisabled(n,!1),this.driver.query(n,Q7t,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,o)=>this._balanceNamespaceList(i,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],e.length?wS(e).onDone(()=>{i.forEach(o=>o())}):i.forEach(o=>o())}}reportError(n){throw cze(n)}_flushAnimations(n,e){let i=new p8,o=[],r=new Map,s=[],d=new Map,m=new Map,v=new Map,w=new Set;this.disabledNodes.forEach(li=>{w.add(li);let zt=this.driver.query(li,Y7t,!0);for(let Bi=0;Bi{let Bi=Sme+q++;$.set(zt,Bi),li.forEach(wt=>Oy(wt,Bi))});let W=[],te=new Set,fe=new Set;for(let li=0;lite.add(wt)):fe.add(zt))}let xe=new Map,Fe=Sze(N,Array.from(te));Fe.forEach((li,zt)=>{let Bi=GZ+q++;xe.set(zt,Bi),li.forEach(wt=>Oy(wt,Bi))}),n.push(()=>{V.forEach((li,zt)=>{let Bi=$.get(zt);li.forEach(wt=>KN(wt,Bi))}),Fe.forEach((li,zt)=>{let Bi=xe.get(zt);li.forEach(wt=>KN(wt,Bi))}),W.forEach(li=>{this.processLeaveNode(li)})});let Re=[],Se=[];for(let li=this._namespaceList.length-1;li>=0;li--)this._namespaceList[li].drainQueuedTransitions(e).forEach(Bi=>{let wt=Bi.player,Lt=Bi.element;if(Re.push(wt),this.collectedEnterElements.length){let zn=Lt[yb];if(zn&&zn.setForMove){if(zn.previousTriggersValues&&zn.previousTriggersValues.has(Bi.triggerName)){let Co=zn.previousTriggersValues.get(Bi.triggerName),ro=this.statesByElement.get(Bi.element);if(ro&&ro.has(Bi.triggerName)){let pr=ro.get(Bi.triggerName);pr.value=Co,ro.set(Bi.triggerName,pr)}}wt.destroy();return}}let Yi=!O||!this.driver.containsElement(O,Lt),fn=xe.get(Lt),tn=$.get(Lt),vn=this._buildInstruction(Bi,i,tn,fn,Yi);if(vn.errors&&vn.errors.length){Se.push(vn);return}if(Yi){wt.onStart(()=>rD(Lt,vn.fromStyles)),wt.onDestroy(()=>_b(Lt,vn.toStyles)),o.push(wt);return}if(Bi.isFallbackTransition){wt.onStart(()=>rD(Lt,vn.fromStyles)),wt.onDestroy(()=>_b(Lt,vn.toStyles)),o.push(wt);return}let Fo=[];vn.timelines.forEach(zn=>{zn.stretchStartingKeyframe=!0,this.disabledNodes.has(zn.element)||Fo.push(zn)}),vn.timelines=Fo,i.append(Lt,vn.timelines);let Cn={instruction:vn,player:wt,element:Lt};s.push(Cn),vn.queriedElements.forEach(zn=>__(d,zn,[]).push(wt)),vn.preStyleProps.forEach((zn,Co)=>{if(zn.size){let ro=m.get(Co);ro||m.set(Co,ro=new Set),zn.forEach((pr,Qr)=>ro.add(Qr))}}),vn.postStyleProps.forEach((zn,Co)=>{let ro=v.get(Co);ro||v.set(Co,ro=new Set),zn.forEach((pr,Qr)=>ro.add(Qr))})});if(Se.length){let li=[];Se.forEach(zt=>{li.push(dze(zt.triggerName,zt.errors))}),Re.forEach(zt=>zt.destroy()),this.reportError(li)}let ke=new Map,Xe=new Map;s.forEach(li=>{let zt=li.element;i.has(zt)&&(Xe.set(zt,zt),this._beforeAnimationBuild(li.player.namespaceId,li.instruction,ke))}),o.forEach(li=>{let zt=li.element;this._getPreviousPlayers(zt,!1,li.namespaceId,li.triggerName,null).forEach(wt=>{__(ke,zt,[]).push(wt),wt.destroy()})});let yt=W.filter(li=>Tze(li,m,v)),We=new Map;wze(We,this.driver,fe,v,my).forEach(li=>{Tze(li,m,v)&&yt.push(li)});let we=new Map;V.forEach((li,zt)=>{wze(we,this.driver,new Set(li),m,SP)}),yt.forEach(li=>{let zt=We.get(li),Bi=we.get(li);We.set(li,new Map([...zt?.entries()??[],...Bi?.entries()??[]]))});let Qt=[],Xi=[],ei={};s.forEach(li=>{let{element:zt,player:Bi,instruction:wt}=li;if(i.has(zt)){if(w.has(zt)){Bi.onDestroy(()=>_b(zt,wt.toStyles)),Bi.disabled=!0,Bi.overrideTotalTime(wt.totalTime),o.push(Bi);return}let Lt=ei;if(Xe.size>1){let fn=zt,tn=[];for(;fn=fn.parentNode;){let vn=Xe.get(fn);if(vn){Lt=vn;break}tn.push(fn)}tn.forEach(vn=>Xe.set(vn,Lt))}let Yi=this._buildAnimation(Bi.namespaceId,wt,ke,r,we,We);if(Bi.setRealPlayer(Yi),Lt===ei)Qt.push(Bi);else{let fn=this.playersByElement.get(Lt);fn&&fn.length&&(Bi.parentPlayer=wS(fn)),o.push(Bi)}}else rD(zt,wt.fromStyles),Bi.onDestroy(()=>_b(zt,wt.toStyles)),Xi.push(Bi),w.has(zt)&&o.push(Bi)}),Xi.forEach(li=>{let zt=r.get(li.element);if(zt&&zt.length){let Bi=wS(zt);li.setRealPlayer(Bi)}}),o.forEach(li=>{li.parentPlayer?li.syncPlayerEvents(li.parentPlayer):li.destroy()});for(let li=0;li!Yi.destroyed);Lt.length?o9t(this,zt,Lt):this.processLeaveNode(zt)}return W.length=0,Qt.forEach(li=>{this.players.push(li),li.onDone(()=>{li.destroy();let zt=this.players.indexOf(li);this.players.splice(zt,1)}),li.play()}),Qt}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,i,o,r){let s=[];if(e){let d=this.playersByQueriedElement.get(n);d&&(s=d)}else{let d=this.playersByElement.get(n);if(d){let m=!r||r==u8;d.forEach(v=>{v.queued||!m&&v.triggerName!=o||s.push(v)})}}return(i||o)&&(s=s.filter(d=>!(i&&i!=d.namespaceId||o&&o!=d.triggerName))),s}_beforeAnimationBuild(n,e,i){let o=e.triggerName,r=e.element,s=e.isRemovalTransition?void 0:n,d=e.isRemovalTransition?void 0:o;for(let m of e.timelines){let v=m.element,w=v!==r,O=__(i,v,[]);this._getPreviousPlayers(v,w,s,d,e.toState).forEach(V=>{let $=V.getRealPlayer();$.beforeDestroy&&$.beforeDestroy(),V.destroy(),O.push(V)})}rD(r,e.fromStyles)}_buildAnimation(n,e,i,o,r,s){let d=e.triggerName,m=e.element,v=[],w=new Set,O=new Set,N=e.timelines.map($=>{let q=$.element;w.add(q);let W=q[yb];if(W&&W.removedBeforeQueried)return new ix($.duration,$.delay);let te=q!==m,fe=r9t((i.get(q)||J7t).map(ke=>ke.getRealPlayer())).filter(ke=>{let Xe=ke;return Xe.element?Xe.element===q:!1}),xe=r.get(q),Fe=s.get(q),Re=vme(this._normalizer,$.keyframes,xe,Fe),Se=this._buildPlayer($,Re,fe);if($.subTimeline&&o&&O.add(q),te){let ke=new m8(n,d,q);ke.setRealPlayer(Se),v.push(ke)}return Se});v.forEach($=>{__(this.playersByQueriedElement,$.element,[]).push($),$.onDone(()=>t9t(this.playersByQueriedElement,$.element,$))}),w.forEach($=>Oy($,Tme));let V=wS(N);return V.onDestroy(()=>{w.forEach($=>KN($,Tme)),_b(m,e.toStyles)}),O.forEach($=>{__(o,$,[]).push(V)}),V}_buildPlayer(n,e,i){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,i):new ix(n.duration,n.delay)}},m8=class{namespaceId;triggerName;element;_player=new ix;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(n,e,i){this.namespaceId=n,this.triggerName=e,this.element=i}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,i)=>{e.forEach(o=>UZ(n,i,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){let e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){__(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){let e=this._player;e.triggerCallback&&e.triggerCallback(n)}};function t9t(t,n,e){let i=t.get(n);if(i){if(i.length){let o=i.indexOf(e);i.splice(o,1)}i.length==0&&t.delete(n)}return i}function i9t(t){return t??null}function QZ(t){return t&&t.nodeType===1}function n9t(t){return t=="start"||t=="done"}function xze(t,n){let e=t.style.display;return t.style.display=n??"none",e}function wze(t,n,e,i,o){let r=[];e.forEach(m=>r.push(xze(m)));let s=[];i.forEach((m,v)=>{let w=new Map;m.forEach(O=>{let N=n.computeStyle(v,O,o);w.set(O,N),(!N||N.length==0)&&(v[yb]=e9t,s.push(v))}),t.set(v,w)});let d=0;return e.forEach(m=>xze(m,r[d++])),s}function Sze(t,n){let e=new Map;if(t.forEach(d=>e.set(d,[])),n.length==0)return e;let i=1,o=new Set(n),r=new Map;function s(d){if(!d)return i;let m=r.get(d);if(m)return m;let v=d.parentNode;return e.has(v)?m=v:o.has(v)?m=i:m=s(v),r.set(d,m),m}return n.forEach(d=>{let m=s(d);m!==i&&e.get(m).push(d)}),e}function Oy(t,n){t.classList?.add(n)}function KN(t,n){t.classList?.remove(n)}function o9t(t,n,e){wS(e).onDone(()=>t.processLeaveNode(n))}function r9t(t){let n=[];return Mze(t,n),n}function Mze(t,n){for(let e=0;eo.add(r)):n.set(t,i),e.delete(t),!0}var WN=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(n,e)=>{};constructor(n,e,i){this._driver=e,this._normalizer=i,this._transitionEngine=new Ume(n.body,e,i),this._timelineEngine=new Vme(n.body,e,i),this._transitionEngine.onRemovalComplete=(o,r)=>this.onRemovalComplete(o,r)}registerTrigger(n,e,i,o,r){let s=n+"-"+o,d=this._triggerCache[s];if(!d){let m=[],v=[],w=Eze(this._driver,r,m,v);if(m.length)throw eze(o,m);d=q7t(o,w,this._normalizer),this._triggerCache[s]=d}this._transitionEngine.registerTrigger(e,o,d)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,i,o){this._transitionEngine.insertNode(n,e,i,o)}onRemove(n,e,i){this._transitionEngine.removeNode(n,e,i)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,i,o){if(i.charAt(0)=="@"){let[r,s]=bme(i),d=o;this._timelineEngine.command(r,e,s,d)}else this._transitionEngine.trigger(n,e,i,o)}listen(n,e,i,o,r){if(i.charAt(0)=="@"){let[s,d]=bme(i);return this._timelineEngine.listen(s,e,d,r)}return this._transitionEngine.listen(n,e,i,o,r)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(n){this._transitionEngine.afterFlushAnimationsDone(n)}};function a9t(t,n){let e=null,i=null;return Array.isArray(n)&&n.length?(e=Mme(n[0]),n.length>1&&(i=Mme(n[n.length-1]))):n instanceof Map&&(e=Mme(n)),e||i?new l9t(t,e,i):null}var l9t=(()=>{class t{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,i,o){this._element=e,this._startStyles=i,this._endStyles=o;let r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&_b(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(_b(this._element,this._initialStyles),this._endStyles&&(_b(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(rD(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(rD(this._element,this._endStyles),this._endStyles=null),_b(this._element,this._initialStyles),this._state=3)}}return t})();function Mme(t){let n=null;return t.forEach((e,i)=>{c9t(i)&&(n=n||new Map,n.set(i,e))}),n}function c9t(t){return t==="display"||t==="position"}var nX=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(n,e,i,o){this.element=n,this.keyframes=e,this.options=i,this._specialStyles=o,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map;let e=()=>this._onFinish();this.domPlayer.addEventListener("finish",e),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",e)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){let e=[];return n.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(n,e,i){return n.animate(this._convertKeyframesToObject(e),i)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,o)=>{o!=="offset"&&n.set(o,this._finished?i:KZ(this.element,o))}),this.currentSnapshot=n}triggerCallback(n){let e=n==="start"?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},oX=class{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}containsElement(n,e){return Cme(n,e)}getParentElement(n){return jZ(n)}query(n,e,i){return xme(n,e,i)}computeStyle(n,e,i){return KZ(n,e)}animate(n,e,i,o,r,s=[]){let d=o==0?"both":"forwards",m={duration:i,delay:o,fill:d};r&&(m.easing=r);let v=new Map,w=s.filter(V=>V instanceof nX);mze(i,o)&&w.forEach(V=>{V.currentSnapshot.forEach(($,q)=>v.set(q,$))});let O=pze(e).map(V=>new Map(V));O=fze(n,O,v);let N=a9t(n,O);return new nX(n,O,m,N)}};var ZZ="@",Oze="@.disabled",rX=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(n,e,i,o){this.namespaceId=n,this.delegate=e,this.engine=i,this._onDestroy=o}get data(){return this.delegate.data}destroyNode(n){this.delegate.destroyNode?.(n)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,i,o=!0){this.delegate.insertBefore(n,e,i),this.engine.onInsert(this.namespaceId,e,n,o)}removeChild(n,e,i){this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,i,o){this.delegate.setAttribute(n,e,i,o)}removeAttribute(n,e,i){this.delegate.removeAttribute(n,e,i)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,i,o){this.delegate.setStyle(n,e,i,o)}removeStyle(n,e,i){this.delegate.removeStyle(n,e,i)}setProperty(n,e,i){e.charAt(0)==ZZ&&e==Oze?this.disableAnimations(n,!!i):this.delegate.setProperty(n,e,i)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,i,o){return this.delegate.listen(n,e,i,o)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}},Hme=class extends rX{factory;constructor(n,e,i,o,r){super(e,i,o,r),this.factory=n,this.namespaceId=e}setProperty(n,e,i){e.charAt(0)==ZZ?e.charAt(1)=="."&&e==Oze?(i=i===void 0?!0:!!i,this.disableAnimations(n,i)):this.engine.process(this.namespaceId,n,e.slice(1),i):this.delegate.setProperty(n,e,i)}listen(n,e,i,o){if(e.charAt(0)==ZZ){let r=d9t(n),s=e.slice(1),d="";return s.charAt(0)!=ZZ&&([s,d]=u9t(s)),this.engine.listen(this.namespaceId,r,s,d,m=>{let v=m._data||-1;this.factory.scheduleListenerCallback(v,i,m)})}return this.delegate.listen(n,e,i,o)}};function d9t(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}function u9t(t){let n=t.indexOf("."),e=t.substring(0,n),i=t.slice(n+1);return[e,i]}var sX=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(n,e,i){this.delegate=n,this.engine=e,this._zone=i,e.onRemovalComplete=(o,r)=>{r?.removeChild(null,o)}}createRenderer(n,e){let o=this.delegate.createRenderer(n,e);if(!n||!e?.data?.animation){let v=this._rendererCache,w=v.get(o);if(!w){let O=()=>v.delete(o);w=new rX("",o,this.engine,O),v.set(o,w)}return w}let r=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,n);let d=v=>{Array.isArray(v)?v.forEach(d):this.engine.registerTrigger(r,s,n,v.name,v)};return e.data.animation.forEach(d),new Hme(this,s,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(n,e,i){if(n>=0&&ne(i));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(r=>{let[s,d]=r;s(d)}),this._animationCallbacksBuffer=[]})}),o.push([e,i])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(n){this.engine.flush(),this.delegate.componentReplaced?.(n)}};var h9t=(()=>{class t extends WN{constructor(e,i,o){super(e,i,o)}ngOnDestroy(){this.flush()}static \u0275fac=function(i){return new(i||t)(di(Ao),di(bM),di(CM))};static \u0275prov=lt({token:t,factory:t.\u0275fac})}return t})();function m9t(){return new XZ}function f9t(t,n,e){return new sX(t,n,e)}var Fze=[{provide:CM,useFactory:m9t},{provide:WN,useClass:h9t},{provide:bc,useFactory:f9t,deps:[IV,WN,_n]}],g9t=[{provide:bM,useClass:jme},{provide:tI,useValue:"NoopAnimations"},...Fze],Rze=[{provide:bM,useFactory:()=>new oX},{provide:tI,useFactory:()=>"BrowserAnimations"},...Fze],Pze=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?g9t:Rze}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=_i({providers:Rze,imports:[DV]})}return t})();var y9t=Ap(Lze());var v9t={transitionDuration:"{transition.duration}"},b9t={borderWidth:"0",borderColor:"{content.border.color}"},C9t={color:"{text.color}",hoverColor:"{text.color}",activeColor:"{text.color}",activeHoverColor:"{text.color}",padding:"1.25rem",fontWeight:"600",borderRadius:"0",borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",hoverBackground:"{content.hover.background}",activeBackground:"{content.background}",activeHoverBackground:"{content.background}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"},toggleIcon:{color:"{text.muted.color}",hoverColor:"{text.muted.color}",activeColor:"{text.muted.color}",activeHoverColor:"{text.muted.color}"},first:{topBorderRadius:"{content.border.radius}",borderWidth:"0"},last:{bottomBorderRadius:"{content.border.radius}",activeBottomBorderRadius:"0"}},x9t={borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",color:"{text.color}",padding:"0 1.25rem 1.25rem 1.25rem"},w9t=` .p-accordionpanel { box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); transition: margin dt('accordion.transition.duration'); } .p-accordionpanel-active { margin: 1rem 0; } .p-accordionpanel:first-child { border-top-left-radius: dt('content.border.radius'); border-top-right-radius: dt('content.border.radius'); margin-top: 0; } .p-accordionpanel:last-child { border-bottom-left-radius: dt('content.border.radius'); border-bottom-right-radius: dt('content.border.radius'); margin-bottom: 0; } .p-accordionpanel:not(.p-disabled) .p-accordionheader:focus-visible { background: dt('navigation.item.active.background'); } `,$me={root:v9t,panel:b9t,header:C9t,content:x9t,css:w9t};var S9t={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}"},T9t={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},I9t={padding:"{list.padding}",gap:"{list.gap}"},E9t={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},D9t={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},A9t={width:"3rem",sm:{width:"2.5rem"},lg:{width:"3.5rem"},borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",borderRadius:"{form.field.border.radius}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},k9t={borderRadius:"{border.radius.sm}"},M9t={padding:"{list.option.padding}"},O9t={light:{chip:{focusBackground:"{surface.300}",focusColor:"{surface.950}"},dropdown:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}"}},dark:{chip:{focusBackground:"{surface.600}",focusColor:"{surface.0}"},dropdown:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}"}}},R9t=` .p-autocomplete-dropdown:focus-visible { background: dt('autocomplete.dropdown.hover.background'); border-color: dt('autocomplete.dropdown.hover.border.color'); color: dt('autocomplete.dropdown.hover.color'); } .p-variant-filled.p-autocomplete-input-multiple { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border: 1px solid transparent; background: dt('autocomplete.filled.background') no-repeat; background-image: linear-gradient(to bottom, dt('autocomplete.focus.border.color'), dt('autocomplete.focus.border.color')), linear-gradient(to bottom, dt('autocomplete.border.color'), dt('autocomplete.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); } .p-autocomplete:not(.p-disabled):hover .p-variant-filled.p-autocomplete-input-multiple { background: dt('autocomplete.filled.hover.background') no-repeat; background-image: linear-gradient(to bottom, dt('autocomplete.focus.border.color'), dt('autocomplete.focus.border.color')), linear-gradient(to bottom, dt('autocomplete.hover.border.color'), dt('autocomplete.hover.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-autocomplete:not(.p-disabled).p-focus .p-variant-filled.p-autocomplete-input-multiple { outline: 0 none; background: dt('autocomplete.filled.focus.background') no-repeat; background-image: linear-gradient(to bottom, dt('autocomplete.focus.border.color'), dt('autocomplete.focus.border.color')), linear-gradient(to bottom, dt('autocomplete.border.color'), dt('autocomplete.border.color')); background-size: 100% 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-autocomplete:not(.p-disabled).p-focus:hover .p-variant-filled.p-autocomplete-input-multiple { background-image: linear-gradient(to bottom, dt('autocomplete.focus.border.color'), dt('autocomplete.focus.border.color')), linear-gradient(to bottom, dt('autocomplete.hover.border.color'), dt('autocomplete.hover.border.color')); } .p-autocomplete.p-invalid .p-autocomplete-input-multiple { background-image: linear-gradient(to bottom, dt('autocomplete.invalid.border.color'), dt('autocomplete.invalid.border.color')), linear-gradient(to bottom, dt('autocomplete.invalid.border.color'), dt('autocomplete.invalid.border.color')); } .p-autocomplete.p-invalid.p-focus .p-autocomplete-input-multiple { background-image: linear-gradient(to bottom, dt('autocomplete.invalid.border.color'), dt('autocomplete.invalid.border.color')), linear-gradient(to bottom, dt('autocomplete.invalid.border.color'), dt('autocomplete.invalid.border.color')); } .p-autocomplete-option { transition: none; } `,qme={root:S9t,overlay:T9t,list:I9t,option:E9t,optionGroup:D9t,dropdown:A9t,chip:k9t,emptyMessage:M9t,colorScheme:O9t,css:R9t};var F9t={width:"2rem",height:"2rem",fontSize:"1rem",background:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},P9t={size:"1rem"},L9t={borderColor:"{content.background}",offset:"-0.75rem"},N9t={width:"3rem",height:"3rem",fontSize:"1.5rem",icon:{size:"1.5rem"},group:{offset:"-1rem"}},B9t={width:"4rem",height:"4rem",fontSize:"2rem",icon:{size:"2rem"},group:{offset:"-1.5rem"}};var Kme={root:F9t,icon:P9t,group:L9t,lg:N9t,xl:B9t,css:""};var V9t={borderRadius:"{border.radius.md}",padding:"0 0.5rem",fontSize:"0.75rem",fontWeight:"700",minWidth:"1.5rem",height:"1.5rem"},z9t={size:"0.5rem"},U9t={fontSize:"0.625rem",minWidth:"1.25rem",height:"1.25rem"},H9t={fontSize:"0.875rem",minWidth:"1.75rem",height:"1.75rem"},j9t={fontSize:"1rem",minWidth:"2rem",height:"2rem"},G9t={light:{primary:{background:"{primary.color}",color:"{primary.contrast.color}"},secondary:{background:"{surface.100}",color:"{surface.600}"},success:{background:"{green.500}",color:"{surface.0}"},info:{background:"{sky.500}",color:"{surface.0}"},warn:{background:"{orange.500}",color:"{surface.0}"},danger:{background:"{red.500}",color:"{surface.0}"},contrast:{background:"{surface.950}",color:"{surface.0}"}},dark:{primary:{background:"{primary.color}",color:"{primary.contrast.color}"},secondary:{background:"{surface.800}",color:"{surface.300}"},success:{background:"{green.400}",color:"{green.950}"},info:{background:"{sky.400}",color:"{sky.950}"},warn:{background:"{orange.400}",color:"{orange.950}"},danger:{background:"{red.400}",color:"{red.950}"},contrast:{background:"{surface.0}",color:"{surface.950}"}}};var Wme={root:V9t,dot:z9t,sm:U9t,lg:H9t,xl:j9t,colorScheme:G9t,css:""};var $9t={borderRadius:{none:"0",xs:"2px",sm:"4px",md:"6px",lg:"8px",xl:"12px"},emerald:{50:"#E8F6F1",100:"#C5EBE1",200:"#9EDFCF",300:"#76D3BD",400:"#58C9AF",500:"#3BBFA1",600:"#35AF94",700:"#2D9B83",800:"#268873",900:"#1A6657",950:"#0d3329"},green:{50:"#E8F5E9",100:"#C8E6C9",200:"#A5D6A7",300:"#81C784",400:"#66BB6A",500:"#4CAF50",600:"#43A047",700:"#388E3C",800:"#2E7D32",900:"#1B5E20",950:"#0e2f10"},lime:{50:"#F9FBE7",100:"#F0F4C3",200:"#E6EE9C",300:"#DCE775",400:"#D4E157",500:"#CDDC39",600:"#C0CA33",700:"#AFB42B",800:"#9E9D24",900:"#827717",950:"#413c0c"},red:{50:"#FFEBEE",100:"#FFCDD2",200:"#EF9A9A",300:"#E57373",400:"#EF5350",500:"#F44336",600:"#E53935",700:"#D32F2F",800:"#C62828",900:"#B71C1C",950:"#5c0e0e"},orange:{50:"#FFF3E0",100:"#FFE0B2",200:"#FFCC80",300:"#FFB74D",400:"#FFA726",500:"#FF9800",600:"#FB8C00",700:"#F57C00",800:"#EF6C00",900:"#E65100",950:"#732900"},amber:{50:"#FFF8E1",100:"#FFECB3",200:"#FFE082",300:"#FFD54F",400:"#FFCA28",500:"#FFC107",600:"#FFB300",700:"#FFA000",800:"#FF8F00",900:"#FF6F00",950:"#803800"},yellow:{50:"#FFFDE7",100:"#FFF9C4",200:"#FFF59D",300:"#FFF176",400:"#FFEE58",500:"#FFEB3B",600:"#FDD835",700:"#FBC02D",800:"#F9A825",900:"#F57F17",950:"#7b400c"},teal:{50:"#E0F2F1",100:"#B2DFDB",200:"#80CBC4",300:"#4DB6AC",400:"#26A69A",500:"#009688",600:"#00897B",700:"#00796B",800:"#00695C",900:"#004D40",950:"#002720"},cyan:{50:"#E0F7FA",100:"#B2EBF2",200:"#80DEEA",300:"#4DD0E1",400:"#26C6DA",500:"#00BCD4",600:"#00ACC1",700:"#0097A7",800:"#00838F",900:"#006064",950:"#003032"},sky:{50:"#E1F5FE",100:"#B3E5FC",200:"#81D4FA",300:"#4FC3F7",400:"#29B6F6",500:"#03A9F4",600:"#039BE5",700:"#0288D1",800:"#0277BD",900:"#01579B",950:"#012c4e"},blue:{50:"#E3F2FD",100:"#BBDEFB",200:"#90CAF9",300:"#64B5F6",400:"#42A5F5",500:"#2196F3",600:"#1E88E5",700:"#1976D2",800:"#1565C0",900:"#0D47A1",950:"#072451"},indigo:{50:"#E8EAF6",100:"#C5CAE9",200:"#9FA8DA",300:"#7986CB",400:"#5C6BC0",500:"#3F51B5",600:"#3949AB",700:"#303F9F",800:"#283593",900:"#1A237E",950:"#0d123f"},violet:{50:"#EDE7F6",100:"#D1C4E9",200:"#B39DDB",300:"#9575CD",400:"#7E57C2",500:"#673AB7",600:"#5E35B1",700:"#512DA8",800:"#4527A0",900:"#311B92",950:"#190e49"},purple:{50:"#F3E5F5",100:"#E1BEE7",200:"#CE93D8",300:"#BA68C8",400:"#AB47BC",500:"#9C27B0",600:"#8E24AA",700:"#7B1FA2",800:"#6A1B9A",900:"#4A148C",950:"#250a46"},fuchsia:{50:"#FDE6F3",100:"#FBC1E3",200:"#F897D1",300:"#F56DBF",400:"#F34DB2",500:"#F12DA5",600:"#E0289D",700:"#CC2392",800:"#B81E88",900:"#951777",950:"#4b0c3c"},pink:{50:"#FCE4EC",100:"#F8BBD0",200:"#F48FB1",300:"#F06292",400:"#EC407A",500:"#E91E63",600:"#D81B60",700:"#C2185B",800:"#AD1457",900:"#880E4F",950:"#440728"},rose:{50:"#FFF0F0",100:"#FFD9D9",200:"#FFC0C0",300:"#FFA7A7",400:"#FF8E8E",500:"#FF7575",600:"#FF5252",700:"#FF3838",800:"#F71C1C",900:"#D50000",950:"#3E0000"},slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"}},q9t={transitionDuration:"0.2s",focusRing:{width:"0",style:"none",color:"unset",offset:"0"},disabledOpacity:"0.38",iconSize:"1rem",anchorGutter:"0",primary:{50:"{emerald.50}",100:"{emerald.100}",200:"{emerald.200}",300:"{emerald.300}",400:"{emerald.400}",500:"{emerald.500}",600:"{emerald.600}",700:"{emerald.700}",800:"{emerald.800}",900:"{emerald.900}",950:"{emerald.950}"},formField:{paddingX:"0.75rem",paddingY:"0.75rem",sm:{fontSize:"0.875rem",paddingX:"0.625rem",paddingY:"0.625rem"},lg:{fontSize:"1.125rem",paddingX:"0.825rem",paddingY:"0.825rem"},borderRadius:"{border.radius.sm}",focusRing:{width:"2px",style:"solid",color:"{primary.color}",offset:"-2px",shadow:"none"},transitionDuration:"{transition.duration}"},list:{padding:"0.5rem 0",gap:"0",header:{padding:"0.75rem 1rem"},option:{padding:"0.75rem 1rem",borderRadius:"{border.radius.none}"},optionGroup:{padding:"0.75rem 1rem",fontWeight:"700"}},content:{borderRadius:"{border.radius.sm}"},mask:{transitionDuration:"0.15s"},navigation:{list:{padding:"0.5rem 0",gap:"0"},item:{padding:"0.75rem 1rem",borderRadius:"{border.radius.none}",gap:"0.5rem"},submenuLabel:{padding:"0.75rem 1rem",fontWeight:"700"},submenuIcon:{size:"0.875rem"}},overlay:{select:{borderRadius:"{border.radius.sm}",shadow:"0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12)"},popover:{borderRadius:"{border.radius.sm}",padding:"1rem",shadow:"0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12)"},modal:{borderRadius:"{border.radius.sm}",padding:"1.5rem",shadow:"0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12)"},navigation:{shadow:"0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12)"}},colorScheme:{light:{focusRing:{shadow:"0 0 1px 4px {surface.200}"},surface:{0:"#ffffff",50:"{slate.50}",100:"{slate.100}",200:"{slate.200}",300:"{slate.300}",400:"{slate.400}",500:"{slate.500}",600:"{slate.600}",700:"{slate.700}",800:"{slate.800}",900:"{slate.900}",950:"{slate.950}"},primary:{color:"{primary.500}",contrastColor:"#ffffff",hoverColor:"{primary.400}",activeColor:"{primary.300}"},highlight:{background:"color-mix(in srgb, {primary.color}, transparent 88%)",focusBackground:"color-mix(in srgb, {primary.color}, transparent 76%)",color:"{primary.700}",focusColor:"{primary.800}"},mask:{background:"rgba(0,0,0,0.32)",color:"{surface.200}"},formField:{background:"{surface.0}",disabledBackground:"{surface.300}",filledBackground:"{surface.100}",filledHoverBackground:"{surface.200}",filledFocusBackground:"{surface.100}",borderColor:"{surface.400}",hoverBorderColor:"{surface.900}",focusBorderColor:"{primary.color}",invalidBorderColor:"{red.800}",color:"{surface.900}",disabledColor:"{surface.600}",placeholderColor:"{surface.600}",invalidPlaceholderColor:"{red.800}",floatLabelColor:"{surface.600}",floatLabelFocusColor:"{primary.600}",floatLabelActiveColor:"{surface.600}",floatLabelInvalidColor:"{form.field.invalid.placeholder.color}",iconColor:"{surface.600}",shadow:"none"},text:{color:"{surface.900}",hoverColor:"{surface.900}",mutedColor:"{surface.600}",hoverMutedColor:"{surface.600}"},content:{background:"{surface.0}",hoverBackground:"{surface.100}",borderColor:"{surface.300}",color:"{text.color}",hoverColor:"{text.hover.color}"},overlay:{select:{background:"{surface.0}",borderColor:"{surface.0}",color:"{text.color}"},popover:{background:"{surface.0}",borderColor:"{surface.0}",color:"{text.color}"},modal:{background:"{surface.0}",borderColor:"{surface.0}",color:"{text.color}"}},list:{option:{focusBackground:"{surface.100}",selectedBackground:"{highlight.background}",selectedFocusBackground:"{highlight.focus.background}",color:"{text.color}",focusColor:"{text.hover.color}",selectedColor:"{highlight.color}",selectedFocusColor:"{highlight.focus.color}",icon:{color:"{surface.600}",focusColor:"{surface.600}"}},optionGroup:{background:"transparent",color:"{text.color}"}},navigation:{item:{focusBackground:"{surface.100}",activeBackground:"{surface.200}",color:"{text.color}",focusColor:"{text.hover.color}",activeColor:"{text.hover.color}",icon:{color:"{surface.600}",focusColor:"{surface.600}",activeColor:"{surface.600}"}},submenuLabel:{background:"transparent",color:"{text.color}"},submenuIcon:{color:"{surface.600}",focusColor:"{surface.600}",activeColor:"{surface.600}"}}},dark:{focusRing:{shadow:"0 0 1px 4px {surface.700}"},surface:{0:"#ffffff",50:"{zinc.50}",100:"{zinc.100}",200:"{zinc.200}",300:"{zinc.300}",400:"{zinc.400}",500:"{zinc.500}",600:"{zinc.600}",700:"{zinc.700}",800:"{zinc.800}",900:"{zinc.900}",950:"{zinc.950}"},primary:{color:"{primary.400}",contrastColor:"{surface.900}",hoverColor:"{primary.300}",activeColor:"{primary.200}"},highlight:{background:"color-mix(in srgb, {primary.400}, transparent 84%)",focusBackground:"color-mix(in srgb, {primary.400}, transparent 76%)",color:"rgba(255,255,255,.87)",focusColor:"rgba(255,255,255,.87)"},mask:{background:"rgba(0,0,0,0.6)",color:"{surface.200}"},formField:{background:"{surface.950}",disabledBackground:"{surface.700}",filledBackground:"{surface.800}",filledHoverBackground:"{surface.700}",filledFocusBackground:"{surface.800}",borderColor:"{surface.600}",hoverBorderColor:"{surface.400}",focusBorderColor:"{primary.color}",invalidBorderColor:"{red.300}",color:"{surface.0}",disabledColor:"{surface.400}",placeholderColor:"{surface.400}",invalidPlaceholderColor:"{red.300}",floatLabelColor:"{surface.400}",floatLabelFocusColor:"{primary.color}",floatLabelActiveColor:"{surface.400}",floatLabelInvalidColor:"{form.field.invalid.placeholder.color}",iconColor:"{surface.400}",shadow:"none"},text:{color:"{surface.0}",hoverColor:"{surface.0}",mutedColor:"{surface.400}",hoverMutedColor:"{surface.400}"},content:{background:"{surface.900}",hoverBackground:"{surface.800}",borderColor:"{surface.700}",color:"{text.color}",hoverColor:"{text.hover.color}"},overlay:{select:{background:"{surface.900}",borderColor:"{surface.900}",color:"{text.color}"},popover:{background:"{surface.900}",borderColor:"{surface.900}",color:"{text.color}"},modal:{background:"{surface.900}",borderColor:"{surface.900}",color:"{text.color}"}},list:{option:{focusBackground:"{surface.800}",selectedBackground:"{highlight.background}",selectedFocusBackground:"{highlight.focus.background}",color:"{text.color}",focusColor:"{text.hover.color}",selectedColor:"{highlight.color}",selectedFocusColor:"{highlight.focus.color}",icon:{color:"{surface.400}",focusColor:"{surface.400}"}},optionGroup:{background:"transparent",color:"{text.muted.color}"}},navigation:{item:{focusBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{text.color}",focusColor:"{text.hover.color}",activeColor:"{text.hover.color}",icon:{color:"{surface.400}",focusColor:"{surface.400}",activeColor:"{surface.400}"}},submenuLabel:{background:"transparent",color:"{text.muted.color}"},submenuIcon:{color:"{surface.400}",focusColor:"{surface.400}",activeColor:"{surface.400}"}}}}},Yme={primitive:$9t,semantic:q9t};var K9t={borderRadius:"{content.border.radius}"};var Qme={root:K9t,css:""};var W9t={padding:"1rem",background:"{content.background}",gap:"0.5rem",transitionDuration:"{transition.duration}"},Y9t={color:"{text.muted.color}",hoverColor:"{text.color}",borderRadius:"{content.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",hoverColor:"{navigation.item.icon.focus.color}"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},Q9t={color:"{navigation.item.icon.color}"};var Zme={root:W9t,item:Y9t,separator:Q9t,css:""};var Z9t={borderRadius:"{form.field.border.radius}",roundedBorderRadius:"2rem",gap:"0.5rem",paddingX:"1rem",paddingY:"0.625rem",iconOnlyWidth:"3rem",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}",iconOnlyWidth:"2.5rem"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}",iconOnlyWidth:"3.5rem"},label:{fontWeight:"500"},raisedShadow:"0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12)",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"},badgeSize:"1rem",transitionDuration:"{form.field.transition.duration}"},X9t={light:{root:{primary:{background:"{primary.color}",hoverBackground:"{primary.hover.color}",activeBackground:"{primary.active.color}",borderColor:"{primary.color}",hoverBorderColor:"{primary.hover.color}",activeBorderColor:"{primary.active.color}",color:"{primary.contrast.color}",hoverColor:"{primary.contrast.color}",activeColor:"{primary.contrast.color}",focusRing:{color:"{primary.color}",shadow:"none"}},secondary:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",borderColor:"{surface.100}",hoverBorderColor:"{surface.200}",activeBorderColor:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}",focusRing:{color:"{surface.600}",shadow:"none"}},info:{background:"{sky.500}",hoverBackground:"{sky.400}",activeBackground:"{sky.300}",borderColor:"{sky.500}",hoverBorderColor:"{sky.400}",activeBorderColor:"{sky.300}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{sky.500}",shadow:"none"}},success:{background:"{green.500}",hoverBackground:"{green.400}",activeBackground:"{green.300}",borderColor:"{green.500}",hoverBorderColor:"{green.400}",activeBorderColor:"{green.300}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{green.500}",shadow:"none"}},warn:{background:"{orange.500}",hoverBackground:"{orange.400}",activeBackground:"{orange.300}",borderColor:"{orange.500}",hoverBorderColor:"{orange.400}",activeBorderColor:"{orange.300}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{orange.500}",shadow:"none"}},help:{background:"{purple.500}",hoverBackground:"{purple.400}",activeBackground:"{purple.300}",borderColor:"{purple.500}",hoverBorderColor:"{purple.400}",activeBorderColor:"{purple.300}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{purple.500}",shadow:"none"}},danger:{background:"{red.500}",hoverBackground:"{red.400}",activeBackground:"{red.300}",borderColor:"{red.500}",hoverBorderColor:"{red.400}",activeBorderColor:"{red.300}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{red.500}",shadow:"none"}},contrast:{background:"{surface.950}",hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{surface.950}",hoverBorderColor:"{surface.800}",activeBorderColor:"{surface.700}",color:"{surface.0}",hoverColor:"{surface.0}",activeColor:"{surface.0}",focusRing:{color:"{surface.950}",shadow:"none"}}},outlined:{primary:{hoverBackground:"{primary.50}",activeBackground:"{primary.100}",borderColor:"{primary.color}",color:"{primary.color}"},secondary:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.600}",color:"{surface.600}"},success:{hoverBackground:"{green.50}",activeBackground:"{green.100}",borderColor:"{green.500}",color:"{green.500}"},info:{hoverBackground:"{sky.50}",activeBackground:"{sky.100}",borderColor:"{sky.500}",color:"{sky.500}"},warn:{hoverBackground:"{orange.50}",activeBackground:"{orange.100}",borderColor:"{orange.500}",color:"{orange.500}"},help:{hoverBackground:"{purple.50}",activeBackground:"{purple.100}",borderColor:"{purple.500}",color:"{purple.500}"},danger:{hoverBackground:"{red.50}",activeBackground:"{red.100}",borderColor:"{red.500}",color:"{red.500}"},contrast:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.950}",color:"{surface.950}"},plain:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.900}",color:"{surface.900}"}},text:{primary:{hoverBackground:"{primary.50}",activeBackground:"{primary.100}",color:"{primary.color}"},secondary:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.600}"},success:{hoverBackground:"{green.50}",activeBackground:"{green.100}",color:"{green.500}"},info:{hoverBackground:"{sky.50}",activeBackground:"{sky.100}",color:"{sky.500}"},warn:{hoverBackground:"{orange.50}",activeBackground:"{orange.100}",color:"{orange.500}"},help:{hoverBackground:"{purple.50}",activeBackground:"{purple.100}",color:"{purple.500}"},danger:{hoverBackground:"{red.50}",activeBackground:"{red.100}",color:"{red.500}"},contrast:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.950}"},plain:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.900}"}},link:{color:"{primary.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"}},dark:{root:{primary:{background:"{primary.color}",hoverBackground:"{primary.hover.color}",activeBackground:"{primary.active.color}",borderColor:"{primary.color}",hoverBorderColor:"{primary.hover.color}",activeBorderColor:"{primary.active.color}",color:"{primary.contrast.color}",hoverColor:"{primary.contrast.color}",activeColor:"{primary.contrast.color}",focusRing:{color:"{primary.color}",shadow:"none"}},secondary:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",borderColor:"{surface.800}",hoverBorderColor:"{surface.700}",activeBorderColor:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}",focusRing:{color:"{surface.300}",shadow:"none"}},info:{background:"{sky.400}",hoverBackground:"{sky.300}",activeBackground:"{sky.200}",borderColor:"{sky.400}",hoverBorderColor:"{sky.300}",activeBorderColor:"{sky.200}",color:"{sky.950}",hoverColor:"{sky.950}",activeColor:"{sky.950}",focusRing:{color:"{sky.400}",shadow:"none"}},success:{background:"{green.400}",hoverBackground:"{green.300}",activeBackground:"{green.200}",borderColor:"{green.400}",hoverBorderColor:"{green.300}",activeBorderColor:"{green.200}",color:"{green.950}",hoverColor:"{green.950}",activeColor:"{green.950}",focusRing:{color:"{green.400}",shadow:"none"}},warn:{background:"{orange.400}",hoverBackground:"{orange.300}",activeBackground:"{orange.200}",borderColor:"{orange.400}",hoverBorderColor:"{orange.300}",activeBorderColor:"{orange.200}",color:"{orange.950}",hoverColor:"{orange.950}",activeColor:"{orange.950}",focusRing:{color:"{orange.400}",shadow:"none"}},help:{background:"{purple.400}",hoverBackground:"{purple.300}",activeBackground:"{purple.200}",borderColor:"{purple.400}",hoverBorderColor:"{purple.300}",activeBorderColor:"{purple.200}",color:"{purple.950}",hoverColor:"{purple.950}",activeColor:"{purple.950}",focusRing:{color:"{purple.400}",shadow:"none"}},danger:{background:"{red.400}",hoverBackground:"{red.300}",activeBackground:"{red.200}",borderColor:"{red.400}",hoverBorderColor:"{red.300}",activeBorderColor:"{red.200}",color:"{red.950}",hoverColor:"{red.950}",activeColor:"{red.950}",focusRing:{color:"{red.400}",shadow:"none"}},contrast:{background:"{surface.0}",hoverBackground:"{surface.100}",activeBackground:"{surface.200}",borderColor:"{surface.0}",hoverBorderColor:"{surface.100}",activeBorderColor:"{surface.200}",color:"{surface.950}",hoverColor:"{surface.950}",activeColor:"{surface.950}",focusRing:{color:"{surface.0}",shadow:"none"}}},outlined:{primary:{hoverBackground:"color-mix(in srgb, {primary.color}, transparent 96%)",activeBackground:"color-mix(in srgb, {primary.color}, transparent 84%)",borderColor:"{primary.700}",color:"{primary.color}"},secondary:{hoverBackground:"rgba(255,255,255,0.04)",activeBackground:"rgba(255,255,255,0.16)",borderColor:"{surface.700}",color:"{surface.400}"},success:{hoverBackground:"color-mix(in srgb, {green.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {green.400}, transparent 84%)",borderColor:"{green.700}",color:"{green.400}"},info:{hoverBackground:"color-mix(in srgb, {sky.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {sky.400}, transparent 84%)",borderColor:"{sky.700}",color:"{sky.400}"},warn:{hoverBackground:"color-mix(in srgb, {orange.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {orange.400}, transparent 84%)",borderColor:"{orange.700}",color:"{orange.400}"},help:{hoverBackground:"color-mix(in srgb, {purple.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {purple.400}, transparent 84%)",borderColor:"{purple.700}",color:"{purple.400}"},danger:{hoverBackground:"color-mix(in srgb, {red.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {red.400}, transparent 84%)",borderColor:"{red.700}",color:"{red.400}"},contrast:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{surface.500}",color:"{surface.0}"},plain:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{surface.600}",color:"{surface.0}"}},text:{primary:{hoverBackground:"color-mix(in srgb, {primary.color}, transparent 96%)",activeBackground:"color-mix(in srgb, {primary.color}, transparent 84%)",color:"{primary.color}"},secondary:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.400}"},success:{hoverBackground:"color-mix(in srgb, {green.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {green.400}, transparent 84%)",color:"{green.400}"},info:{hoverBackground:"color-mix(in srgb, {sky.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {sky.400}, transparent 84%)",color:"{sky.400}"},warn:{hoverBackground:"color-mix(in srgb, {orange.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {orange.400}, transparent 84%)",color:"{orange.400}"},help:{hoverBackground:"color-mix(in srgb, {purple.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {purple.400}, transparent 84%)",color:"{purple.400}"},danger:{hoverBackground:"color-mix(in srgb, {red.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {red.400}, transparent 84%)",color:"{red.400}"},contrast:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.0}"},plain:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.0}"}},link:{color:"{primary.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"}}},J9t=` .p-button:focus-visible { background: dt('button.primary.active.background'); border-color: dt('button.primary.active.background'); } .p-button-secondary:focus-visible { background: dt('button.secondary.active.background'); border-color: dt('button.secondary.active.background'); } .p-button-success:focus-visible { background: dt('button.success.active.background'); border-color: dt('button.success.active.background'); } .p-button-info:focus-visible { background: dt('button.info.active.background'); border-color: dt('button.info.active.background'); } .p-button-warn:focus-visible { background: dt('button.warn.active.background'); border-color: dt('button.warn.active.background'); } .p-button-help:focus-visible { background: dt('button.help.active.background'); border-color: dt('button.help.active.background'); } .p-button-danger:focus-visible { background: dt('button.danger.active.background'); border-color: dt('button.danger.active.background'); } .p-button-contrast:focus-visible { background: dt('button.contrast.active.background'); border-color: dt('button.contrast.active.background'); } .p-button-link:focus-visible { background: color-mix(in srgb, dt('primary.color'), transparent 84%); border-color: transparent; } .p-button-text:focus-visible { background: dt('button.text.primary.active.background'); border-color: transparent; } .p-button-secondary.p-button-text:focus-visible { background: dt('button.text.secondary.active.background'); border-color: transparent; } .p-button-success.p-button-text:focus-visible { background: dt('button.text.success.active.background'); border-color: transparent; } .p-button-info.p-button-text:focus-visible { background: dt('button.text.info.active.background'); border-color: transparent; } .p-button-warn.p-button-text:focus-visible { background: dt('button.text.warn.active.background'); border-color: transparent; } .p-button-help.p-button-text:focus-visible { background: dt('button.text.help.active.background'); border-color: transparent; } .p-button-danger.p-button-text:focus-visible { background: dt('button.text.danger.active.background'); border-color: transparent; } .p-button-contrast.p-button-text:focus-visible { background: dt('button.text.contrast.active.background'); border-color: transparent; } .p-button-plain.p-button-text:focus-visible { background: dt('button.text.plain.active.background'); border-color: transparent; } .p-button-outlined:focus-visible { background: dt('button.outlined.primary.active.background'); } .p-button-secondary.p-button-outlined:focus-visible { background: dt('button.outlined.secondary.active.background'); border-color: dt('button.outlined.secondary.border.color'); } .p-button-success.p-button-outlined:focus-visible { background: dt('button.outlined.success.active.background'); } .p-button-info.p-button-outlined:focus-visible { background: dt('button.outlined.info.active.background'); } .p-button-warn.p-button-outlined:focus-visible { background: dt('button.outlined.warn.active.background'); } .p-button-help.p-button-outlined:focus-visible { background: dt('button.outlined.help.active.background'); } .p-button-danger.p-button-outlined:focus-visible { background: dt('button.outlined.danger.active.background'); } .p-button-contrast.p-button-outlined:focus-visible { background: dt('button.outlined.contrast.active.background'); } .p-button-plain.p-button-outlined:focus-visible { background: dt('button.outlined.plain.active.background'); } `,Xme={root:Z9t,colorScheme:X9t,css:J9t};var ejt={background:"{content.background}",borderRadius:"{content.border.radius}",color:"{content.color}",shadow:"0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12)"},tjt={padding:"1.5rem",gap:"0.75rem"},ijt={gap:"0.5rem"},njt={fontSize:"1.25rem",fontWeight:"500"},ojt={color:"{text.muted.color}"};var Jme={root:ejt,body:tjt,caption:ijt,title:njt,subtitle:ojt,css:""};var rjt={transitionDuration:"{transition.duration}"},sjt={gap:"0.25rem"},ajt={padding:"1rem",gap:"1rem"},ljt={width:"1.25rem",height:"1.25rem",borderRadius:"50%",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},cjt={light:{indicator:{background:"{surface.200}",hoverBackground:"{surface.300}",activeBackground:"{primary.color}"}},dark:{indicator:{background:"{surface.700}",hoverBackground:"{surface.600}",activeBackground:"{primary.color}"}}},djt=` .p-carousel-indicator-button:hover { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('text.color'), transparent 96%); } .p-carousel-indicator-button:focus-visible { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('text.color'), transparent 96%); } .p-carousel-indicator-active .p-carousel-indicator-button:hover { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('carousel.indicator.active.background'), transparent 92%); } .p-carousel-indicator-active .p-carousel-indicator-button:focus-visible { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('carousel.indicator.active.background'), transparent 84%); } `,efe={root:rjt,content:sjt,indicatorList:ajt,indicator:ljt,colorScheme:cjt,css:djt};var ujt={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},pjt={width:"2.5rem",color:"{form.field.icon.color}"},hjt={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},mjt={padding:"{list.padding}",gap:"{list.gap}",mobileIndent:"1rem"},fjt={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}",icon:{color:"{list.option.icon.color}",focusColor:"{list.option.icon.focus.color}",size:"0.875rem"}},gjt={color:"{form.field.icon.color}"},_jt=` .p-cascadeselect.p-variant-filled { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border: 1px solid transparent; background: dt('cascadeselect.filled.background') no-repeat; background-image: linear-gradient(to bottom, dt('cascadeselect.focus.border.color'), dt('cascadeselect.focus.border.color')), linear-gradient(to bottom, dt('cascadeselect.border.color'), dt('cascadeselect.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); } .p-cascadeselect.p-variant-filled:not(.p-disabled):hover { background: dt('cascadeselect.filled.hover.background') no-repeat; background-image: linear-gradient(to bottom, dt('cascadeselect.focus.border.color'), dt('cascadeselect.focus.border.color')), linear-gradient(to bottom, dt('cascadeselect.hover.border.color'), dt('cascadeselect.hover.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-cascadeselect.p-variant-filled:not(.p-disabled).p-focus { outline: 0 none; background: dt('cascadeselect.filled.focus.background') no-repeat; background-image: linear-gradient(to bottom, dt('cascadeselect.focus.border.color'), dt('cascadeselect.focus.border.color')), linear-gradient(to bottom, dt('cascadeselect.border.color'), dt('cascadeselect.border.color')); background-size: 100% 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-cascadeselect.p-variant-filled:not(.p-disabled).p-focus:hover { background-image: linear-gradient(to bottom, dt('cascadeselect.focus.border.color'), dt('cascadeselect.focus.border.color')), linear-gradient(to bottom, dt('cascadeselect.hover.border.color'), dt('cascadeselect.hover.border.color')); } .p-cascadeselect.p-variant-filled.p-invalid { background-image: linear-gradient(to bottom, dt('cascadeselect.invalid.border.color'), dt('cascadeselect.invalid.border.color')), linear-gradient(to bottom, dt('cascadeselect.invalid.border.color'), dt('cascadeselect.invalid.border.color')); } .p-cascadeselect.p-variant-filled.p-invalid:not(.p-disabled).p-focus { background-image: linear-gradient(to bottom, dt('cascadeselect.invalid.border.color'), dt('cascadeselect.invalid.border.color')), linear-gradient(to bottom, dt('cascadeselect.invalid.border.color'), dt('cascadeselect.invalid.border.color')); } .p-cascadeselect-option { transition: none; } `,tfe={root:ujt,dropdown:pjt,overlay:hjt,list:mjt,option:fjt,clearIcon:gjt,css:_jt};var yjt={borderRadius:"{border.radius.xs}",width:"18px",height:"18px",background:"{form.field.background}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.color}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",checkedBorderColor:"{primary.color}",checkedHoverBorderColor:"{primary.color}",checkedFocusBorderColor:"{primary.color}",checkedDisabledBorderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",shadow:"{form.field.shadow}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"},transitionDuration:"{form.field.transition.duration}",sm:{width:"14px",height:"14px"},lg:{width:"22px",height:"22px"}},vjt={size:"0.875rem",color:"{form.field.color}",checkedColor:"{primary.contrast.color}",checkedHoverColor:"{primary.contrast.color}",disabledColor:"{form.field.disabled.color}",sm:{size:"0.75rem"},lg:{size:"1rem"}},bjt=` .p-checkbox { border-radius: 50%; transition: box-shadow dt('checkbox.transition.duration'); } .p-checkbox-box { border-width: 2px; } .p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('text.color'), transparent 96%); } .p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('text.color'), transparent 88%); } .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('checkbox.checked.background'), transparent 92%); } .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('checkbox.checked.background'), transparent 84%); } .p-checkbox-checked .p-checkbox-box:before { content: ""; position: absolute; top: var(--p-md-check-icon-t); left: 2px; border-right: 2px solid transparent; border-bottom: 2px solid transparent; transform: rotate(45deg); transform-origin: 0% 100%; animation: p-md-check 125ms 50ms linear forwards; } .p-checkbox-checked .p-checkbox-icon { display: none; } .p-checkbox { --p-md-check-icon-t: 10px; --p-md-check-icon-w: 6px; --p-md-check-icon-h: 12px; } .p-checkbox-sm { --p-md-check-icon-t: 8px; --p-md-check-icon-w: 4px; --p-md-check-icon-h: 10px; } .p-checkbox-lg { --p-md-check-icon-t: 12px; --p-md-check-icon-w: 8px; --p-md-check-icon-h: 16px; } @keyframes p-md-check { 0%{ width: 0; height: 0; border-color: dt('checkbox.icon.checked.color'); transform: translate3d(0,0,0) rotate(45deg); } 33%{ width: var(--p-md-check-icon-w); height: 0; transform: translate3d(0,0,0) rotate(45deg); } 100%{ width: var(--p-md-check-icon-w); height: var(--p-md-check-icon-h); border-color: dt('checkbox.icon.checked.color'); transform: translate3d(0,calc(-1 * var(--p-md-check-icon-h)),0) rotate(45deg); } } `,ife={root:yjt,icon:vjt,css:bjt};var Cjt={borderRadius:"2rem",paddingX:"0.75rem",paddingY:"0.75rem",gap:"0.5rem",transitionDuration:"{transition.duration}"},xjt={width:"2.25rem",height:"2.25rem"},wjt={size:"1rem"},Sjt={size:"1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}"}},Tjt={light:{root:{background:"{surface.200}",color:"{surface.900}"},icon:{color:"{surface.600}"},removeIcon:{color:"{surface.600}",focusRing:{shadow:"0 0 1px 4px {surface.300}"}}},dark:{root:{background:"{surface.700}",color:"{surface.0}"},icon:{color:"{surface.0}"},removeIcon:{color:"{surface.0}",focusRing:{shadow:"0 0 1px 4px {surface.600}"}}}};var nfe={root:Cjt,image:xjt,icon:wjt,removeIcon:Sjt,colorScheme:Tjt,css:""};var Ijt={transitionDuration:"{transition.duration}"},Ejt={width:"2rem",height:"2rem",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},Djt={shadow:"{overlay.popover.shadow}",borderRadius:"{overlay.popover.borderRadius}"},Ajt={light:{panel:{background:"{surface.800}",borderColor:"{surface.900}"},handle:{color:"{surface.0}"}},dark:{panel:{background:"{surface.900}",borderColor:"{surface.700}"},handle:{color:"{surface.0}"}}};var ofe={root:Ijt,preview:Ejt,panel:Djt,colorScheme:Ajt,css:""};var kjt={size:"2rem",color:"{overlay.modal.color}"},Mjt={gap:"1rem"};var rfe={icon:kjt,content:Mjt,css:""};var Ojt={background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",color:"{overlay.popover.color}",borderRadius:"{overlay.popover.border.radius}",shadow:"{overlay.popover.shadow}",gutter:"10px",arrowOffset:"1.25rem"},Rjt={padding:"{overlay.popover.padding}",gap:"1rem"},Fjt={size:"1.5rem",color:"{overlay.popover.color}"},Pjt={gap:"0.5rem",padding:"0 {overlay.popover.padding} {overlay.popover.padding} {overlay.popover.padding}"};var sfe={root:Ojt,content:Rjt,icon:Fjt,footer:Pjt,css:""};var Ljt={background:"{content.background}",borderColor:"transparent",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},Njt={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},Bjt={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},Vjt={mobileIndent:"1rem"},zjt={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},Ujt={borderColor:"{content.border.color}"};var afe={root:Ljt,list:Njt,item:Bjt,submenu:Vjt,submenuIcon:zjt,separator:Ujt,css:""};var Hjt={transitionDuration:"{transition.duration}"},jjt={background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},Gjt={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{datatable.border.color}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",gap:"0.5rem",padding:"0.75rem 1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},$jt={fontWeight:"600"},qjt={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},Kjt={borderColor:"{datatable.border.color}",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},Wjt={background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},Yjt={fontWeight:"600"},Qjt={background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},Zjt={color:"{primary.color}"},Xjt={width:"0.5rem"},Jjt={width:"1px",color:"{primary.color}"},eGt={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",size:"0.875rem"},tGt={size:"2rem"},iGt={hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",selectedHoverColor:"{primary.color}",size:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},nGt={inlineGap:"0.5rem",overlaySelect:{background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},overlayPopover:{background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",borderRadius:"{overlay.popover.border.radius}",color:"{overlay.popover.color}",shadow:"{overlay.popover.shadow}",padding:"{overlay.popover.padding}",gap:"0.5rem"},rule:{borderColor:"{content.border.color}"},constraintList:{padding:"{list.padding}",gap:"{list.gap}"},constraint:{focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",separator:{borderColor:"{content.border.color}"},padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"}},oGt={borderColor:"{datatable.border.color}",borderWidth:"0 0 1px 0"},rGt={borderColor:"{datatable.border.color}",borderWidth:"0 0 1px 0"},sGt={light:{root:{borderColor:"{content.border.color}"},row:{stripedBackground:"{surface.50}"},bodyCell:{selectedBorderColor:"{primary.100}"}},dark:{root:{borderColor:"{surface.800}"},row:{stripedBackground:"{surface.950}"},bodyCell:{selectedBorderColor:"{primary.900}"}}},aGt=` .p-datatable-header-cell, .p-datatable-tbody > tr { transition: none; } `,lfe={root:Hjt,header:jjt,headerCell:Gjt,columnTitle:$jt,row:qjt,bodyCell:Kjt,footerCell:Wjt,columnFooter:Yjt,footer:Qjt,dropPoint:Zjt,columnResizer:Xjt,resizeIndicator:Jjt,sortIcon:eGt,loadingIcon:tGt,rowToggleButton:iGt,filter:nGt,paginatorTop:oGt,paginatorBottom:rGt,colorScheme:sGt,css:aGt};var lGt={borderColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0"},cGt={background:"{content.background}",color:"{content.color}",borderColor:"{content.border.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",borderRadius:"0"},dGt={background:"{content.background}",color:"{content.color}",borderColor:"transparent",borderWidth:"0",padding:"0",borderRadius:"0"},uGt={background:"{content.background}",color:"{content.color}",borderColor:"{content.border.color}",borderWidth:"1px 0 0 0",padding:"0.75rem 1rem",borderRadius:"0"},pGt={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},hGt={borderColor:"{content.border.color}",borderWidth:"1px 0 0 0"};var cfe={root:lGt,header:cGt,content:dGt,footer:uGt,paginatorTop:pGt,paginatorBottom:hGt,css:""};var mGt={transitionDuration:"{transition.duration}"},fGt={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.popover.shadow}",padding:"0.5rem"},gGt={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",padding:"0 0 0.5rem 0"},_Gt={gap:"0.5rem",fontWeight:"700"},yGt={width:"3rem",sm:{width:"2.5rem"},lg:{width:"3.5rem"},borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",borderRadius:"{form.field.border.radius}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},vGt={color:"{form.field.icon.color}"},bGt={hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",padding:"0.5rem 0.75rem",borderRadius:"{content.border.radius}"},CGt={hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",padding:"0.5rem 0.75rem",borderRadius:"{content.border.radius}"},xGt={borderColor:"{content.border.color}",gap:"{overlay.popover.padding}"},wGt={margin:"0.5rem 0 0 0"},SGt={padding:"0.5rem",fontWeight:"700",color:"{content.color}"},TGt={hoverBackground:"{content.hover.background}",selectedBackground:"{primary.color}",rangeSelectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{primary.contrast.color}",rangeSelectedColor:"{highlight.color}",width:"2.5rem",height:"2.5rem",borderRadius:"50%",padding:"0.125rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},IGt={margin:"0.5rem 0 0 0"},EGt={padding:"0.625rem",borderRadius:"{content.border.radius}"},DGt={margin:"0.5rem 0 0 0"},AGt={padding:"0.625rem",borderRadius:"{content.border.radius}"},kGt={padding:"0.5rem 0 0 0",borderColor:"{content.border.color}"},MGt={padding:"0.5rem 0 0 0",borderColor:"{content.border.color}",gap:"0.5rem",buttonGap:"0.25rem"},OGt={light:{dropdown:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}"},today:{background:"{surface.200}",color:"{surface.900}"}},dark:{dropdown:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}"},today:{background:"{surface.700}",color:"{surface.0}"}}},RGt=` .p-datepicker-header { justify-content: start; } .p-datepicker-title { order: 1; } .p-datepicker-prev-button { order: 2; margin-inline-start: auto; } .p-datepicker-next-button { order: 2; margin-inline-start: 0.5rem; } .p-datepicker-select-month:focus-visible { background: dt('datepicker.select.month.hover.background'); color: dt('datepicker.select.month.hover.color'); outline: 0 none; } .p-datepicker-select-year:focus-visible { background: dt('datepicker.select.year.hover.background'); color: dt('datepicker.select.year.hover.color'); outline: 0 none; } .p-datepicker-dropdown:focus-visible { outline: 0 none; background: dt('datepicker.dropdown.hover.background'); border-color: dt('datepicker.dropdown.hover.border.color'); color: dt('datepicker.dropdown.hover.color'); } `,dfe={root:mGt,panel:fGt,header:gGt,title:_Gt,dropdown:yGt,inputIcon:vGt,selectMonth:bGt,selectYear:CGt,group:xGt,dayView:wGt,weekDay:SGt,date:TGt,monthView:IGt,month:EGt,yearView:DGt,year:AGt,buttonbar:kGt,timePicker:MGt,colorScheme:OGt,css:RGt};var FGt={background:"{overlay.modal.background}",borderColor:"{overlay.modal.border.color}",color:"{overlay.modal.color}",borderRadius:"{overlay.modal.border.radius}",shadow:"{overlay.modal.shadow}"},PGt={padding:"{overlay.modal.padding}",gap:"0.5rem"},LGt={fontSize:"1.25rem",fontWeight:"600"},NGt={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}"},BGt={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}",gap:"0.5rem"};var ufe={root:FGt,header:PGt,title:LGt,content:NGt,footer:BGt,css:""};var VGt={borderColor:"{content.border.color}"},zGt={background:"{content.background}",color:"{text.color}"},UGt={margin:"1rem 0",padding:"0 1rem",content:{padding:"0 0.5rem"}},HGt={margin:"0 1rem",padding:"0.5rem 0",content:{padding:"0.5rem 0"}};var pfe={root:VGt,content:zGt,horizontal:UGt,vertical:HGt,css:""};var jGt={background:"rgba(255, 255, 255, 0.1)",borderColor:"rgba(255, 255, 255, 0.2)",padding:"0.5rem",borderRadius:"{border.radius.xl}"},GGt={borderRadius:"{content.border.radius}",padding:"0.5rem",size:"3rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}};var hfe={root:jGt,item:GGt,css:""};var $Gt={background:"{overlay.modal.background}",borderColor:"{overlay.modal.border.color}",color:"{overlay.modal.color}",shadow:"{overlay.modal.shadow}"},qGt={padding:"{overlay.modal.padding}"},KGt={fontSize:"1.5rem",fontWeight:"600"},WGt={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}"},YGt={padding:"{overlay.modal.padding}"};var mfe={root:$Gt,header:qGt,title:KGt,content:WGt,footer:YGt,css:""};var QGt={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}"},ZGt={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},XGt={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}",padding:"{list.padding}"},JGt={focusBackground:"{list.option.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},e$t={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},t$t=` .p-editor .p-editor-toolbar { padding: 0.75rem } `,ffe={toolbar:QGt,toolbarItem:ZGt,overlay:XGt,overlayOption:JGt,content:e$t,css:t$t};var i$t={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",padding:"0 1.25rem 1.25rem 1.25rem",transitionDuration:"{transition.duration}"},n$t={background:"{content.background}",hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",borderRadius:"{content.border.radius}",borderWidth:"1px",borderColor:"transparent",padding:"0.75rem 1rem",gap:"0.5rem",fontWeight:"600",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},o$t={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}"},r$t={padding:"0"},s$t=` .p-fieldset-toggle-button:focus-visible { background: dt('navigation.item.active.background'); } `,gfe={root:i$t,legend:n$t,toggleIcon:o$t,content:r$t,css:s$t};var a$t={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",transitionDuration:"{transition.duration}"},l$t={background:"transparent",color:"{text.color}",padding:"1.25rem",borderColor:"unset",borderWidth:"0",borderRadius:"0",gap:"0.5rem"},c$t={highlightBorderColor:"{primary.color}",padding:"0 1.25rem 1.25rem 1.25rem",gap:"1rem"},d$t={padding:"1rem",gap:"1rem",borderColor:"{content.border.color}",info:{gap:"0.5rem"}},u$t={gap:"0.5rem"},p$t={height:"0.25rem"},h$t={gap:"0.5rem"};var _fe={root:a$t,header:l$t,content:c$t,file:d$t,fileList:u$t,progressbar:p$t,basic:h$t,css:""};var m$t={color:"{form.field.float.label.color}",focusColor:"{form.field.float.label.focus.color}",activeColor:"{form.field.float.label.active.color}",invalidColor:"{form.field.float.label.invalid.color}",transitionDuration:"0.2s",positionX:"{form.field.padding.x}",positionY:"{form.field.padding.y}",fontWeight:"500",active:{fontSize:"0.75rem",fontWeight:"400"}},f$t={active:{top:"-1.25rem"}},g$t={input:{paddingTop:"1.5rem",paddingBottom:"0.5rem"},active:{top:"0.5rem"}},_$t={borderRadius:"{border.radius.xs}",active:{background:"{form.field.background}",padding:"0 0.125rem"}};var yfe={root:m$t,over:f$t,in:g$t,on:_$t,css:""};var y$t={borderWidth:"1px",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",transitionDuration:"{transition.duration}"},v$t={background:"rgba(255, 255, 255, 0.1)",hoverBackground:"rgba(255, 255, 255, 0.2)",color:"{surface.100}",hoverColor:"{surface.0}",size:"3rem",gutter:"0.5rem",prev:{borderRadius:"50%"},next:{borderRadius:"50%"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},b$t={size:"1.5rem"},C$t={background:"{content.background}",padding:"1rem 0.25rem"},x$t={size:"2rem",borderRadius:"50%",gutter:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},w$t={size:"1rem"},S$t={background:"rgba(0, 0, 0, 0.5)",color:"{surface.100}",padding:"1rem"},T$t={gap:"0.5rem",padding:"1rem"},I$t={width:"1rem",height:"1rem",activeBackground:"{primary.color}",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},E$t={background:"rgba(0, 0, 0, 0.5)"},D$t={background:"rgba(255, 255, 255, 0.4)",hoverBackground:"rgba(255, 255, 255, 0.6)",activeBackground:"rgba(255, 255, 255, 0.9)"},A$t={size:"3rem",gutter:"0.5rem",background:"rgba(255, 255, 255, 0.1)",hoverBackground:"rgba(255, 255, 255, 0.2)",color:"{surface.50}",hoverColor:"{surface.0}",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},k$t={size:"1.5rem"},M$t={light:{thumbnailNavButton:{hoverBackground:"{surface.100}",color:"{surface.600}",hoverColor:"{surface.700}"},indicatorButton:{background:"{surface.200}",hoverBackground:"{surface.300}"}},dark:{thumbnailNavButton:{hoverBackground:"{surface.700}",color:"{surface.400}",hoverColor:"{surface.0}"},indicatorButton:{background:"{surface.700}",hoverBackground:"{surface.600}"}}};var vfe={root:y$t,navButton:v$t,navIcon:b$t,thumbnailsContent:C$t,thumbnailNavButton:x$t,thumbnailNavButtonIcon:w$t,caption:S$t,indicatorList:T$t,indicatorButton:I$t,insetIndicatorList:E$t,insetIndicatorButton:D$t,closeButton:A$t,closeButtonIcon:k$t,colorScheme:M$t,css:""};var O$t={color:"{form.field.icon.color}"};var bfe={icon:O$t,css:""};var R$t={color:"{form.field.float.label.color}",focusColor:"{form.field.float.label.focus.color}",invalidColor:"{form.field.float.label.invalid.color}",transitionDuration:"0.2s",positionX:"{form.field.padding.x}",top:"0.5rem",fontSize:"0.75rem",fontWeight:"400"},F$t={paddingTop:"1.5rem",paddingBottom:"0.5rem"};var Cfe={root:R$t,input:F$t,css:""};var P$t={transitionDuration:"{transition.duration}"},L$t={icon:{size:"1.5rem"},mask:{background:"{mask.background}",color:"{mask.color}"}},N$t={position:{left:"auto",right:"1rem",top:"1rem",bottom:"auto"},blur:"8px",background:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.2)",borderWidth:"1px",borderRadius:"30px",padding:".5rem",gap:"0.5rem"},B$t={hoverBackground:"rgba(255,255,255,0.1)",color:"{surface.50}",hoverColor:"{surface.0}",size:"3rem",iconSize:"1.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}};var xfe={root:P$t,preview:L$t,toolbar:N$t,action:B$t,css:""};var V$t={size:"20px",hoverSize:"40px",background:"rgba(255,255,255,0.4)",hoverBackground:"rgba(255,255,255,0.6)",borderColor:"unset",hoverBorderColor:"unset",borderWidth:"0",borderRadius:"50%",transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"rgba(255,255,255,0.3)",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}};var wfe={handle:V$t,css:""};var z$t={padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{content.border.radius}",gap:"0.5rem"},U$t={fontWeight:"500"},H$t={size:"1rem"},j$t={light:{info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)"},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)"},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)"},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)"},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)"},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)"}},dark:{info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)"},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)"},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)"},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)"},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)"},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)"}}};var Sfe={root:z$t,text:U$t,icon:H$t,colorScheme:j$t,css:""};var G$t={padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{transition.duration}"},$$t={hoverBackground:"{content.hover.background}",hoverColor:"{content.hover.color}"};var Tfe={root:G$t,display:$$t,css:""};var q$t={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}"},K$t={borderRadius:"{border.radius.sm}"},W$t={light:{chip:{focusBackground:"{surface.200}",color:"{surface.800}"}},dark:{chip:{focusBackground:"{surface.700}",color:"{surface.0}"}}};var Ife={root:q$t,chip:K$t,colorScheme:W$t,css:""};var Y$t={background:"{form.field.background}",borderColor:"{form.field.border.color}",color:"{form.field.icon.color}",borderRadius:"{form.field.border.radius}",padding:"0.75rem",minWidth:"3rem"},Q$t=` .p-inputgroup:has(.p-variant-filled) .p-inputgroupaddon { border-block-start-color: dt('inputtext.filled.background'); border-inline-color: dt('inputtext.filled.background'); background: dt('inputtext.filled.background') no-repeat; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } `,Efe={addon:Y$t,css:Q$t};var Z$t={transitionDuration:"{transition.duration}"},X$t={width:"3rem",borderRadius:"{form.field.border.radius}",verticalPadding:"{form.field.padding.y}"},J$t={light:{button:{background:"transparent",hoverBackground:"{surface.100}",activeBackground:"{surface.200}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",color:"{surface.400}",hoverColor:"{surface.500}",activeColor:"{surface.600}"}},dark:{button:{background:"transparent",hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",color:"{surface.400}",hoverColor:"{surface.300}",activeColor:"{surface.200}"}}},eqt=` .p-inputnumber-stacked .p-inputnumber-button-group { top: 2px; right: 2px; height: calc(100% - 4px); } .p-inputnumber-horizontal:has(.p-variant-filled) .p-inputnumber-button { border-block-start-color: dt('inputtext.filled.background'); border-inline-color: dt('inputtext.filled.background'); background: dt('inputtext.filled.background') no-repeat; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } .p-inputnumber-vertical:has(.p-variant-filled) .p-inputnumber-button { border-block-color: dt('inputtext.filled.background'); border-inline-color: dt('inputtext.filled.background'); background: dt('inputtext.filled.background') no-repeat; } .p-inputnumber-vertical:has(.p-variant-filled) .p-inputnumber-increment-button { border-block-end: 1px solid dt('inputtext.border.color') } `,Dfe={root:Z$t,button:X$t,colorScheme:J$t,css:eqt};var tqt={gap:"0.5rem"},iqt={width:"3rem",sm:{width:"2.5rem"},lg:{width:"3.5rem"}};var Afe={root:tqt,input:iqt,css:""};var nqt={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},oqt=` .p-inputtext.p-variant-filled { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border: 1px solid transparent; background: dt('inputtext.filled.background') no-repeat; background-image: linear-gradient(to bottom, dt('inputtext.focus.border.color'), dt('inputtext.focus.border.color')), linear-gradient(to bottom, dt('inputtext.border.color'), dt('inputtext.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); } .p-inputtext.p-variant-filled:enabled:hover { background: dt('inputtext.filled.hover.background') no-repeat; background-image: linear-gradient(to bottom, dt('inputtext.focus.border.color'), dt('inputtext.focus.border.color')), linear-gradient(to bottom, dt('inputtext.hover.border.color'), dt('inputtext.hover.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-inputtext.p-variant-filled:enabled:focus { outline: 0 none; background: dt('inputtext.filled.focus.background') no-repeat; background-image: linear-gradient(to bottom, dt('inputtext.focus.border.color'), dt('inputtext.focus.border.color')), linear-gradient(to bottom, dt('inputtext.border.color'), dt('inputtext.border.color')); background-size: 100% 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-inputtext.p-variant-filled:enabled:hover:focus { background-image: linear-gradient(to bottom, dt('inputtext.focus.border.color'), dt('inputtext.focus.border.color')), linear-gradient(to bottom, dt('inputtext.hover.border.color'), dt('inputtext.hover.border.color')); } .p-inputtext.p-variant-filled.p-invalid { background-image: linear-gradient(to bottom, dt('inputtext.invalid.border.color'), dt('inputtext.invalid.border.color')), linear-gradient(to bottom, dt('inputtext.invalid.border.color'), dt('inputtext.invalid.border.color')); } .p-inputtext.p-variant-filled.p-invalid:enabled:focus { background-image: linear-gradient(to bottom, dt('inputtext.invalid.border.color'), dt('inputtext.invalid.border.color')), linear-gradient(to bottom, dt('inputtext.invalid.border.color'), dt('inputtext.invalid.border.color')); } .p-inputtext.p-variant-filled:disabled { background: dt('inputtext.disabled.background') no-repeat; background-image: linear-gradient(to bottom, dt('inputtext.border.color'), dt('inputtext.border.color')), linear-gradient(to bottom, dt('inputtext.border.color'), dt('inputtext.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } `,kfe={root:nqt,css:oqt};var rqt={transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},sqt={background:"{primary.color}"},aqt={background:"{content.border.color}"},lqt={color:"{text.muted.color}"};var Mfe={root:rqt,value:sqt,range:aqt,text:lqt,css:""};var cqt={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",borderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",shadow:"{form.field.shadow}",borderRadius:"{form.field.border.radius}",transitionDuration:"{form.field.transition.duration}"},dqt={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},uqt={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},pqt={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},hqt={color:"{list.option.color}",gutterStart:"-0.375rem",gutterEnd:"0.375rem"},mqt={padding:"{list.option.padding}"},fqt={light:{option:{stripedBackground:"{surface.50}"}},dark:{option:{stripedBackground:"{surface.900}"}}},gqt=` .p-listbox-option { transition: none; } `,Ofe={root:cqt,list:dqt,option:uqt,optionGroup:pqt,checkmark:hqt,emptyMessage:mqt,colorScheme:fqt,css:gqt};var _qt={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",verticalOrientation:{padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},horizontalOrientation:{padding:"0.5rem 0.75rem",gap:"0.5rem"},transitionDuration:"{transition.duration}"},yqt={borderRadius:"{content.border.radius}",padding:"{navigation.item.padding}"},vqt={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},bqt={padding:"0",background:"{content.background}",borderColor:"transparent",borderRadius:"{content.border.radius}",color:"{content.color}",shadow:"{overlay.navigation.shadow}",gap:"0.5rem"},Cqt={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},xqt={padding:"{navigation.submenu.label.padding}",fontWeight:"{navigation.submenu.label.font.weight}",background:"{navigation.submenu.label.background.}",color:"{navigation.submenu.label.color}"},wqt={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},Sqt={borderColor:"{content.border.color}"},Tqt={borderRadius:"50%",size:"2.5rem",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",hoverBackground:"{content.hover.background}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},Iqt=` .p-megamenu-button:focus-visible { background: dt('navigation.item.active.background'); } `,Rfe={root:_qt,baseItem:yqt,item:vqt,overlay:bqt,submenu:Cqt,submenuLabel:xqt,submenuIcon:wqt,separator:Sqt,mobileButton:Tqt,css:Iqt};var Eqt={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},Dqt={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},Aqt={focusBackground:"{navigation.item.focus.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}"}},kqt={padding:"{navigation.submenu.label.padding}",fontWeight:"{navigation.submenu.label.font.weight}",background:"{navigation.submenu.label.background}",color:"{navigation.submenu.label.color}"},Mqt={borderColor:"{content.border.color}"},Oqt=` .p-menu-overlay { border-color: transparent; } `,Ffe={root:Eqt,list:Dqt,item:Aqt,submenuLabel:kqt,separator:Mqt,css:Oqt};var Rqt={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",padding:"0.5rem 0.75rem",transitionDuration:"{transition.duration}"},Fqt={borderRadius:"{content.border.radius}",padding:"{navigation.item.padding}"},Pqt={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},Lqt={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}",background:"{content.background}",borderColor:"transparent",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",mobileIndent:"1rem",icon:{size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"}},Nqt={borderColor:"{content.border.color}"},Bqt={borderRadius:"50%",size:"2.5rem",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",hoverBackground:"{content.hover.background}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},Vqt=` .p-menubar-button:focus-visible { background: dt('navigation.item.active.background'); } `,Pfe={root:Rqt,baseItem:Fqt,item:Pqt,submenu:Lqt,separator:Nqt,mobileButton:Bqt,css:Vqt};var zqt={borderRadius:"{content.border.radius}",borderWidth:"0",transitionDuration:"{transition.duration}"},Uqt={padding:"1rem 1.25rem",gap:"0.5rem",sm:{padding:"0.625rem 0.625rem"},lg:{padding:"0.825rem 0.825rem"}},Hqt={fontSize:"1rem",fontWeight:"500",sm:{fontSize:"0.875rem"},lg:{fontSize:"1.125rem"}},jqt={size:"1.25rem",sm:{size:"1rem"},lg:{size:"1.5rem"}},Gqt={width:"2rem",height:"2rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"}},$qt={size:"1rem",sm:{size:"0.875rem"},lg:{size:"1.125rem"}},qqt={root:{borderWidth:"1px"}},Kqt={content:{padding:"0"}},Wqt={light:{info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",shadow:"none",closeButton:{hoverBackground:"{blue.100}",focusRing:{color:"{blue.600}",shadow:"none"}},outlined:{color:"{blue.600}",borderColor:"{blue.600}"},simple:{color:"{blue.600}"}},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",shadow:"none",closeButton:{hoverBackground:"{green.100}",focusRing:{color:"{green.600}",shadow:"none"}},outlined:{color:"{green.600}",borderColor:"{green.600}"},simple:{color:"{green.600}"}},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.900}",shadow:"none",closeButton:{hoverBackground:"{yellow.100}",focusRing:{color:"{yellow.600}",shadow:"none"}},outlined:{color:"{yellow.900}",borderColor:"{yellow.900}"},simple:{color:"{yellow.900}"}},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",shadow:"none",closeButton:{hoverBackground:"{red.100}",focusRing:{color:"{red.600}",shadow:"none"}},outlined:{color:"{red.600}",borderColor:"{red.600}"},simple:{color:"{red.600}"}},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",shadow:"none",closeButton:{hoverBackground:"{surface.200}",focusRing:{color:"{surface.600}",shadow:"none"}},outlined:{color:"{surface.600}",borderColor:"{surface.600}"},simple:{color:"{surface.600}"}},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",shadow:"none",closeButton:{hoverBackground:"{surface.800}",focusRing:{color:"{surface.50}",shadow:"none"}},outlined:{color:"{surface.950}",borderColor:"{surface.950}"},simple:{color:"{surface.950}"}}},dark:{info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",shadow:"none",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{blue.500}",shadow:"none"}},outlined:{color:"{blue.500}",borderColor:"{blue.500}"},simple:{color:"{blue.500}"}},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",shadow:"none",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{green.500}",shadow:"none"}},outlined:{color:"{green.500}",borderColor:"{green.500}"},simple:{color:"{green.500}"}},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",shadow:"none",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{yellow.500}",shadow:"none"}},outlined:{color:"{yellow.500}",borderColor:"{yellow.500}"},simple:{color:"{yellow.500}"}},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",shadow:"none",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{red.500}",shadow:"none"}},outlined:{color:"{red.500}",borderColor:"{red.500}"},simple:{color:"{red.500}"}},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",shadow:"none",closeButton:{hoverBackground:"{surface.700}",focusRing:{color:"{surface.300}",shadow:"none"}},outlined:{color:"{surface.400}",borderColor:"{surface.400}"},simple:{color:"{surface.400}"}},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",shadow:"none",closeButton:{hoverBackground:"{surface.100}",focusRing:{color:"{surface.950}",shadow:"none"}},outlined:{color:"{surface.0}",borderColor:"{surface.0}"},simple:{color:"{surface.0}"}}}};var Lfe={root:zqt,content:Uqt,text:Hqt,icon:jqt,closeButton:Gqt,closeIcon:$qt,outlined:qqt,simple:Kqt,colorScheme:Wqt,css:""};var Yqt={borderRadius:"{content.border.radius}",gap:"1rem"},Qqt={background:"{content.border.color}",size:"0.5rem"},Zqt={gap:"0.5rem"},Xqt={size:"0.5rem"},Jqt={size:"1rem"},eKt={verticalGap:"0.5rem",horizontalGap:"1rem"};var Nfe={root:Yqt,meters:Qqt,label:Zqt,labelMarker:Xqt,labelIcon:Jqt,labelList:eKt,css:""};var tKt={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},iKt={width:"2.5rem",color:"{form.field.icon.color}"},nKt={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},oKt={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},rKt={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}",gap:"0.75rem"},sKt={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},aKt={color:"{form.field.icon.color}"},lKt={borderRadius:"{border.radius.sm}"},cKt={padding:"{list.option.padding}"},dKt=` .p-multiselect.p-variant-filled { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border: 1px solid transparent; background: dt('multiselect.filled.background') no-repeat; background-image: linear-gradient(to bottom, dt('multiselect.focus.border.color'), dt('multiselect.focus.border.color')), linear-gradient(to bottom, dt('multiselect.border.color'), dt('multiselect.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); } .p-multiselect.p-variant-filled:not(.p-disabled):hover { background: dt('multiselect.filled.hover.background') no-repeat; background-image: linear-gradient(to bottom, dt('multiselect.focus.border.color'), dt('multiselect.focus.border.color')), linear-gradient(to bottom, dt('multiselect.hover.border.color'), dt('multiselect.hover.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-multiselect.p-variant-filled:not(.p-disabled).p-focus { outline: 0 none; background: dt('multiselect.filled.focus.background') no-repeat; background-image: linear-gradient(to bottom, dt('multiselect.focus.border.color'), dt('multiselect.focus.border.color')), linear-gradient(to bottom, dt('multiselect.border.color'), dt('multiselect.border.color')); background-size: 100% 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-multiselect.p-variant-filled:not(.p-disabled).p-focus:hover { background-image: linear-gradient(to bottom, dt('multiselect.focus.border.color'), dt('multiselect.focus.border.color')), linear-gradient(to bottom, dt('multiselect.hover.border.color'), dt('multiselect.hover.border.color')); } .p-multiselect.p-variant-filled.p-invalid { background-image: linear-gradient(to bottom, dt('multiselect.invalid.border.color'), dt('multiselect.invalid.border.color')), linear-gradient(to bottom, dt('multiselect.invalid.border.color'), dt('multiselect.invalid.border.color')); } .p-multiselect.p-variant-filled.p-invalid:not(.p-disabled).p-focus { background-image: linear-gradient(to bottom, dt('multiselect.invalid.border.color'), dt('multiselect.invalid.border.color')), linear-gradient(to bottom, dt('multiselect.invalid.border.color'), dt('multiselect.invalid.border.color')); } .p-multiselect-option { transition: none; } `,Bfe={root:tKt,dropdown:iKt,overlay:nKt,list:oKt,option:rKt,optionGroup:sKt,chip:lKt,clearIcon:aKt,emptyMessage:cKt,css:dKt};var uKt={gap:"1.125rem"},pKt={gap:"0.5rem"};var Vfe={root:uKt,controls:pKt,css:""};var hKt={gutter:"0.75rem",transitionDuration:"{transition.duration}"},mKt={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{content.border.color}",color:"{content.color}",selectedColor:"{highlight.color}",hoverColor:"{content.hover.color}",padding:"1rem 1.25rem",toggleablePadding:"1rem 1.25rem 1.5rem 1.25rem",borderRadius:"{content.border.radius}"},fKt={background:"{content.background}",hoverBackground:"{content.hover.background}",borderColor:"{content.border.color}",color:"{text.muted.color}",hoverColor:"{text.color}",size:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},gKt={color:"{content.border.color}",borderRadius:"{content.border.radius}",height:"24px"};var zfe={root:hKt,node:mKt,nodeToggleButton:fKt,connector:gKt,css:""};var _Kt={outline:{width:"2px",color:"{content.background}"}};var Ufe={root:_Kt,css:""};var yKt={padding:"0.5rem 1rem",gap:"0.25rem",borderRadius:"{content.border.radius}",background:"{content.background}",color:"{content.color}",transitionDuration:"{transition.duration}"},vKt={background:"transparent",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedColor:"{highlight.color}",width:"2.5rem",height:"2.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},bKt={color:"{text.muted.color}"},CKt={maxWidth:"2.5rem"};var Hfe={root:yKt,navButton:vKt,currentPageReport:bKt,jumpToPageInput:CKt,css:""};var xKt={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},wKt={background:"transparent",color:"{text.color}",padding:"1.25rem",borderColor:"{content.border.color}",borderWidth:"0",borderRadius:"0"},SKt={padding:"0.5rem 1.25rem"},TKt={fontWeight:"600"},IKt={padding:"0 1.25rem 1.25rem 1.25rem"},EKt={padding:"0 1.25rem 1.25rem 1.25rem"};var jfe={root:xKt,header:wKt,toggleableHeader:SKt,title:TKt,content:IKt,footer:EKt,css:""};var DKt={gap:"0",transitionDuration:"{transition.duration}"},AKt={background:"{content.background}",borderColor:"{content.border.color}",borderWidth:"0",color:"{content.color}",padding:"0",borderRadius:"0",first:{borderWidth:"0",topBorderRadius:"{content.border.radius}"},last:{borderWidth:"0",bottomBorderRadius:"{content.border.radius}"}},kKt={focusBackground:"{navigation.item.focus.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",gap:"0.5rem",padding:"{navigation.item.padding}",borderRadius:"{content.border.radius}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}"}},MKt={indent:"1rem"},OKt={color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}"},RKt=` .p-panelmenu-panel { box-shadow: 0 0 0 1px dt('panelmenu.panel.border.color'); transition: margin dt('panelmenu.transition.duration'); } .p-panelmenu-panel:has(.p-panelmenu-header-active) { margin: 1rem 0; } .p-panelmenu-panel:first-child { border-top-left-radius: dt('content.border.radius'); border-top-right-radius: dt('content.border.radius'); margin-top: 0; } .p-panelmenu-panel:last-child { border-bottom-left-radius: dt('content.border.radius'); border-bottom-right-radius: dt('content.border.radius'); margin-bottom: 0; } .p-accordionpanel:not(.p-disabled) .p-accordionheader:focus-visible { background: dt('navigation.item.active.background'); } `,Gfe={root:DKt,panel:AKt,item:kKt,submenu:MKt,submenuIcon:OKt,css:RKt};var FKt={background:"{content.border.color}",borderRadius:"{content.border.radius}",height:".75rem"},PKt={color:"{form.field.icon.color}"},LKt={background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",borderRadius:"{overlay.popover.border.radius}",color:"{overlay.popover.color}",padding:"{overlay.popover.padding}",shadow:"{overlay.popover.shadow}"},NKt={gap:"0.5rem"},BKt={light:{strength:{weakBackground:"{red.500}",mediumBackground:"{amber.500}",strongBackground:"{green.500}"}},dark:{strength:{weakBackground:"{red.400}",mediumBackground:"{amber.400}",strongBackground:"{green.400}"}}};var $fe={meter:FKt,icon:PKt,overlay:LKt,content:NKt,colorScheme:BKt,css:""};var VKt={gap:"1.125rem"},zKt={gap:"0.5rem"};var qfe={root:VKt,controls:zKt,css:""};var UKt={background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",color:"{overlay.popover.color}",borderRadius:"{overlay.popover.border.radius}",shadow:"{overlay.popover.shadow}",gutter:"10px",arrowOffset:"1.25rem"},HKt={padding:"{overlay.popover.padding}"};var Kfe={root:UKt,content:HKt,css:""};var jKt={background:"{content.border.color}",borderRadius:"{content.border.radius}",height:"1rem"},GKt={background:"{primary.color}"},$Kt={color:"{primary.contrast.color}",fontSize:"0.75rem",fontWeight:"600"};var Wfe={root:jKt,value:GKt,label:$Kt,css:""};var qKt={light:{root:{colorOne:"{red.500}",colorTwo:"{blue.500}",colorThree:"{green.500}",colorFour:"{yellow.500}"}},dark:{root:{colorOne:"{red.400}",colorTwo:"{blue.400}",colorThree:"{green.400}",colorFour:"{yellow.400}"}}};var Yfe={colorScheme:qKt,css:""};var KKt={width:"20px",height:"20px",background:"{form.field.background}",checkedBackground:"{primary.contrast.color}",checkedHoverBackground:"{primary.contrast.color}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",checkedBorderColor:"{primary.color}",checkedHoverBorderColor:"{primary.color}",checkedFocusBorderColor:"{primary.color}",checkedDisabledBorderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",shadow:"{form.field.shadow}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"},transitionDuration:"{form.field.transition.duration}",sm:{width:"16px",height:"16px"},lg:{width:"24px",height:"24px"}},WKt={size:"10px",checkedColor:"{primary.color}",checkedHoverColor:"{primary.color}",disabledColor:"{form.field.disabled.color}",sm:{size:"8px"},lg:{size:"12px"}};var Qfe={root:KKt,icon:WKt};var YKt={gap:"0.5rem",transitionDuration:"{transition.duration}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},QKt={size:"1.125rem",color:"{text.muted.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"},ZKt=` .p-rating:not(.p-disabled):not(.p-readonly) .p-rating-option:hover { background: color-mix(in srgb, dt('rating.icon.color'), transparent 96%); box-shadow: 0 0 1px 8px color-mix(in srgb, dt('rating.icon.color'), transparent 96%); } .p-rating:not(.p-disabled):not(.p-readonly) .p-rating-option-active:hover { background: color-mix(in srgb, dt('rating.icon.active.color'), transparent 92%); box-shadow: 0 0 1px 8px color-mix(in srgb, dt('rating.icon.active.color'), transparent 92%); } .p-rating-option.p-focus-visible { background: color-mix(in srgb, dt('rating.icon.active.color'), transparent 84%); box-shadow: 0 0 1px 8px color-mix(in srgb, dt('rating.icon.active.color'), transparent 84%); } `,Zfe={root:YKt,icon:QKt,css:ZKt};var XKt={light:{root:{background:"rgba(0,0,0,0.1)"}},dark:{root:{background:"rgba(255,255,255,0.3)"}}};var Xfe={colorScheme:XKt,css:""};var JKt={transitionDuration:"{transition.duration}"},eWt={size:"9px",borderRadius:"{border.radius.sm}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},tWt={light:{bar:{background:"{surface.200}"}},dark:{bar:{background:"{surface.700}"}}};var Jfe={root:JKt,bar:eWt,colorScheme:tWt,css:""};var iWt={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},nWt={width:"2.5rem",color:"{form.field.icon.color}"},oWt={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},rWt={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},sWt={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},aWt={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},lWt={color:"{form.field.icon.color}"},cWt={color:"{list.option.color}",gutterStart:"-0.375rem",gutterEnd:"0.375rem"},dWt={padding:"{list.option.padding}"},uWt=` .p-select.p-variant-filled { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border: 1px solid transparent; background: dt('select.filled.background') no-repeat; background-image: linear-gradient(to bottom, dt('select.focus.border.color'), dt('select.focus.border.color')), linear-gradient(to bottom, dt('select.border.color'), dt('select.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); } .p-select.p-variant-filled:not(.p-disabled):hover { background: dt('select.filled.hover.background') no-repeat; background-image: linear-gradient(to bottom, dt('select.focus.border.color'), dt('select.focus.border.color')), linear-gradient(to bottom, dt('select.hover.border.color'), dt('select.hover.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-select.p-variant-filled:not(.p-disabled).p-focus { outline: 0 none; background: dt('select.filled.focus.background') no-repeat; background-image: linear-gradient(to bottom, dt('select.focus.border.color'), dt('select.focus.border.color')), linear-gradient(to bottom, dt('select.border.color'), dt('select.border.color')); background-size: 100% 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-select.p-variant-filled:not(.p-disabled).p-focus:hover { background-image: linear-gradient(to bottom, dt('select.focus.border.color'), dt('select.focus.border.color')), linear-gradient(to bottom, dt('select.hover.border.color'), dt('select.hover.border.color')); } .p-select.p-variant-filled.p-invalid { background-image: linear-gradient(to bottom, dt('select.invalid.border.color'), dt('select.invalid.border.color')), linear-gradient(to bottom, dt('select.invalid.border.color'), dt('select.invalid.border.color')); } .p-select.p-variant-filled.p-invalid:not(.p-disabled).p-focus { background-image: linear-gradient(to bottom, dt('select.invalid.border.color'), dt('select.invalid.border.color')), linear-gradient(to bottom, dt('select.invalid.border.color'), dt('select.invalid.border.color')); } .p-select-option { transition: none; } `,ege={root:iWt,dropdown:nWt,overlay:oWt,list:rWt,option:sWt,optionGroup:aWt,clearIcon:lWt,checkmark:cWt,emptyMessage:dWt,css:uWt};var pWt={borderRadius:"{form.field.border.radius}"},hWt={light:{root:{invalidBorderColor:"{form.field.invalid.border.color}"}},dark:{root:{invalidBorderColor:"{form.field.invalid.border.color}"}}};var tge={root:pWt,colorScheme:hWt,css:""};var mWt={borderRadius:"{content.border.radius}"},fWt={light:{root:{background:"{surface.200}",animationBackground:"rgba(255,255,255,0.4)"}},dark:{root:{background:"rgba(255, 255, 255, 0.06)",animationBackground:"rgba(255, 255, 255, 0.04)"}}};var ige={root:mWt,colorScheme:fWt,css:""};var gWt={transitionDuration:"{transition.duration}"},_Wt={background:"{content.border.color}",borderRadius:"{border.radius.xs}",size:"2px"},yWt={background:"{primary.color}"},vWt={width:"18px",height:"18px",borderRadius:"50%",background:"{primary.color}",hoverBackground:"{primary.color}",content:{borderRadius:"50%",background:"{primary.color}",hoverBackground:"{primary.color}",width:"18px",height:"18px",shadow:"0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12)"},focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},bWt=` .p-slider-handle { transition: box-shadow dt('slider.transition.duration'); } .p-slider:not(.p-disabled) .p-slider-handle:hover { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('slider.handle.background'), transparent 92%); } .p-slider-handle:focus-visible, .p-slider:not(.p-disabled) .p-slider-handle:focus:hover { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('slider.handle.background'), transparent 84%); } `,nge={root:gWt,track:_Wt,range:yWt,handle:vWt,css:bWt};var CWt={gap:"0.5rem",transitionDuration:"{transition.duration}"};var oge={root:CWt,css:""};var xWt={borderRadius:"{form.field.border.radius}",roundedBorderRadius:"2rem",raisedShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)"};var rge={root:xWt,css:""};var wWt={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",transitionDuration:"{transition.duration}"},SWt={background:"{content.border.color}"},TWt={size:"24px",background:"transparent",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}};var sge={root:wWt,gutter:SWt,handle:TWt,css:""};var IWt={transitionDuration:"{transition.duration}"},EWt={background:"{content.border.color}",activeBackground:"{primary.color}",margin:"0 0 0 1.625rem",size:"2px"},DWt={padding:"0.5rem",gap:"1rem"},AWt={padding:"0.75rem 1rem",borderRadius:"{content.border.radius}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"},gap:"0.5rem"},kWt={color:"{text.muted.color}",activeColor:"{text.color}",fontWeight:"500"},MWt={activeBackground:"{primary.color}",activeBorderColor:"{primary.color}",activeColor:"{primary.contrast.color}",size:"2rem",fontSize:"1.143rem",fontWeight:"500",borderRadius:"50%",shadow:"none"},OWt={padding:"0.875rem 0.5rem 1.125rem 0.5rem"},RWt={background:"{content.background}",color:"{content.color}",padding:"0",indent:"1rem"},FWt={light:{stepNumber:{background:"{surface.400}",borderColor:"{surface.400}",color:"{surface.0}"}},dark:{stepNumber:{background:"{surface.200}",borderColor:"{surface.200}",color:"{surface.900}"}}},PWt=` .p-step-header:focus-visible { background: dt('navigation.item.active.background'); } `,age={root:IWt,separator:EWt,step:DWt,stepHeader:AWt,stepTitle:kWt,stepNumber:MWt,steppanels:OWt,steppanel:RWt,colorScheme:FWt,css:PWt};var LWt={transitionDuration:"{transition.duration}"},NWt={background:"{content.border.color}"},BWt={borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},gap:"0.5rem"},VWt={color:"{text.muted.color}",activeColor:"{primary.color}",fontWeight:"500"},zWt={background:"{content.background}",activeBackground:"{content.background}",borderColor:"{content.border.color}",activeBorderColor:"{content.border.color}",color:"{text.muted.color}",activeColor:"{primary.color}",size:"2rem",fontSize:"1.143rem",fontWeight:"500",borderRadius:"50%",shadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)"};var lge={root:LWt,separator:NWt,itemLink:BWt,itemLabel:VWt,itemNumber:zWt,css:""};var UWt={transitionDuration:"{transition.duration}"},HWt={borderWidth:"0 0 1px 0",background:"{content.background}",borderColor:"{content.border.color}"},jWt={background:"transparent",hoverBackground:"transparent",activeBackground:"transparent",borderWidth:"0 0 1px 0",borderColor:"{content.border.color}",hoverBorderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}",padding:"1rem 1.125rem",fontWeight:"600",margin:"0 0 -1px 0",gap:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},GWt={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},$Wt={height:"1px",bottom:"-1px",background:"{primary.color}"};var cge={root:UWt,tablist:HWt,item:jWt,itemIcon:GWt,activeBar:$Wt,css:""};var qWt={transitionDuration:"{transition.duration}"},KWt={borderWidth:"0 0 1px 0",background:"{content.background}",borderColor:"{content.border.color}"},WWt={background:"transparent",hoverBackground:"{content.hover.background}",activeBackground:"transparent",borderWidth:"0 0 1px 0",borderColor:"{content.border.color}",hoverBorderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.color}",hoverColor:"{text.color}",activeColor:"{primary.color}",padding:"1rem 1.25rem",fontWeight:"600",margin:"0 0 -1px 0",gap:"0.5rem",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},YWt={background:"{content.background}",color:"{content.color}",padding:"1.25rem 1.25rem 1.25rem 1.25rem",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},QWt={background:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",width:"3rem",shadow:"none",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},ZWt={height:"2px",bottom:"-1px",background:"{primary.color}"},XWt=` .p-tabs-scrollable .p-tab { flex-grow: 0 } .p-tab-active { --p-ripple-background: color-mix(in srgb, dt('primary.color'), transparent 90%); } .p-tab:not(.p-disabled):focus-visible { background: dt('navigation.item.active.background'); } .p-tablist-nav-button:focus-visible { background: dt('navigation.item.active.background'); } `,dge={root:qWt,tablist:KWt,tab:WWt,tabpanel:YWt,navButton:QWt,activeBar:ZWt,css:XWt};var JWt={transitionDuration:"{transition.duration}"},eYt={background:"{content.background}",borderColor:"{content.border.color}"},tYt={borderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},iYt={background:"{content.background}",color:"{content.color}"},nYt={background:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}"},oYt={light:{navButton:{shadow:"0px 0px 10px 50px rgba(255, 255, 255, 0.6)"}},dark:{navButton:{shadow:"0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)"}}};var uge={root:JWt,tabList:eYt,tab:tYt,tabPanel:iYt,navButton:nYt,colorScheme:oYt,css:""};var rYt={fontSize:"0.875rem",fontWeight:"700",padding:"0.25rem 0.5rem",gap:"0.25rem",borderRadius:"{content.border.radius}",roundedBorderRadius:"{border.radius.xl}"},sYt={size:"0.75rem"},aYt={light:{primary:{background:"{primary.color}",color:"{primary.contrast.color}"},secondary:{background:"{surface.100}",color:"{surface.600}"},success:{background:"{green.500}",color:"{surface.0}"},info:{background:"{sky.500}",color:"{surface.0}"},warn:{background:"{orange.500}",color:"{surface.0}"},danger:{background:"{red.500}",color:"{surface.0}"},contrast:{background:"{surface.950}",color:"{surface.0}"}},dark:{primary:{background:"{primary.color}",color:"{primary.contrast.color}"},secondary:{background:"{surface.800}",color:"{surface.300}"},success:{background:"{green.400}",color:"{green.950}"},info:{background:"{sky.400}",color:"{sky.950}"},warn:{background:"{orange.400}",color:"{orange.950}"},danger:{background:"{red.400}",color:"{red.950}"},contrast:{background:"{surface.0}",color:"{surface.950}"}}};var pge={root:rYt,icon:sYt,colorScheme:aYt,css:""};var lYt={background:"{form.field.background}",borderColor:"{form.field.border.color}",color:"{form.field.color}",height:"18rem",padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{form.field.border.radius}"},cYt={gap:"0.25rem"},dYt={margin:"2px 0"};var hge={root:lYt,prompt:cYt,commandResponse:dYt,css:""};var uYt={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},pYt=` .p-textarea.p-variant-filled { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border: 1px solid transparent; background: dt('textarea.filled.background') no-repeat; background-image: linear-gradient(to bottom, dt('textarea.focus.border.color'), dt('textarea.focus.border.color')), linear-gradient(to bottom, dt('textarea.border.color'), dt('textarea.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); } .p-textarea.p-variant-filled:enabled:hover { background: dt('textarea.filled.hover.background') no-repeat; background-image: linear-gradient(to bottom, dt('textarea.focus.border.color'), dt('textarea.focus.border.color')), linear-gradient(to bottom, dt('textarea.hover.border.color'), dt('textarea.hover.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-textarea.p-variant-filled:enabled:focus { outline: 0 none; background: dt('textarea.filled.focus.background') no-repeat; background-image: linear-gradient(to bottom, dt('textarea.focus.border.color'), dt('textarea.focus.border.color')), linear-gradient(to bottom, dt('textarea.border.color'), dt('textarea.border.color')); background-size: 100% 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-textarea.p-variant-filled:enabled:hover:focus { background-image: linear-gradient(to bottom, dt('textarea.focus.border.color'), dt('textarea.focus.border.color')), linear-gradient(to bottom, dt('textarea.hover.border.color'), dt('textarea.hover.border.color')); } .p-textarea.p-variant-filled.p-invalid { background-image: linear-gradient(to bottom, dt('textarea.invalid.border.color'), dt('textarea.invalid.border.color')), linear-gradient(to bottom, dt('textarea.invalid.border.color'), dt('textarea.invalid.border.color')); } .p-textarea.p-variant-filled.p-invalid:enabled:focus { background-image: linear-gradient(to bottom, dt('textarea.invalid.border.color'), dt('textarea.invalid.border.color')), linear-gradient(to bottom, dt('textarea.invalid.border.color'), dt('textarea.invalid.border.color')); } `,mge={root:uYt,css:pYt};var hYt={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},mYt={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},fYt={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},gYt={mobileIndent:"1rem"},_Yt={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},yYt={borderColor:"{content.border.color}"},vYt=` .p-tieredmenu-overlay { border-color: transparent; } `,fge={root:hYt,list:mYt,item:fYt,submenu:gYt,submenuIcon:_Yt,separator:yYt,css:vYt};var bYt={minHeight:"5rem"},CYt={eventContent:{padding:"1rem 0"}},xYt={eventContent:{padding:"0 1rem"}},wYt={size:"1.5rem",borderRadius:"50%",borderWidth:"2px",background:"{primary.color}",content:{borderRadius:"50%",size:"0",background:"{primary.color}",insetShadow:"none"}},SYt={color:"{content.border.color}",size:"2px"},TYt={light:{eventMarker:{borderColor:"{surface.0}"}},dark:{eventMarker:{borderColor:"{surface.900}"}}};var gge={event:bYt,horizontal:CYt,vertical:xYt,eventMarker:wYt,eventConnector:SYt,colorScheme:TYt,css:""};var IYt={width:"25rem",borderRadius:"{content.border.radius}",borderWidth:"0",transitionDuration:"{transition.duration}"},EYt={size:"1.25rem"},DYt={padding:"{overlay.popover.padding}",gap:"0.5rem"},AYt={gap:"0.5rem"},kYt={fontWeight:"500",fontSize:"1rem"},MYt={fontWeight:"500",fontSize:"0.875rem"},OYt={width:"2rem",height:"2rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"}},RYt={size:"1rem"},FYt={light:{root:{blur:"0"},info:{background:"{blue.50}",borderColor:"{blue.200}",color:"{blue.600}",detailColor:"{surface.700}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"{blue.100}",focusRing:{color:"{blue.600}",shadow:"none"}}},success:{background:"{green.50}",borderColor:"{green.200}",color:"{green.600}",detailColor:"{surface.700}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"{green.100}",focusRing:{color:"{green.600}",shadow:"none"}}},warn:{background:"{yellow.50}",borderColor:"{yellow.200}",color:"{yellow.900}",detailColor:"{surface.700}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"{yellow.100}",focusRing:{color:"{yellow.600}",shadow:"none"}}},error:{background:"{red.50}",borderColor:"{red.200}",color:"{red.600}",detailColor:"{surface.700}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"{red.100}",focusRing:{color:"{red.600}",shadow:"none"}}},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",detailColor:"{surface.700}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"{surface.200}",focusRing:{color:"{surface.600}",shadow:"none"}}},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",detailColor:"{surface.0}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"{surface.800}",focusRing:{color:"{surface.50}",shadow:"none"}}}},dark:{root:{blur:"10px"},info:{background:"color-mix(in srgb, {blue.500}, transparent 36%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{surface.0}",detailColor:"{blue.100}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{blue.500}",shadow:"none"}}},success:{background:"color-mix(in srgb, {green.500}, transparent 36%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{surface.0}",detailColor:"{green.100}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{green.500}",shadow:"none"}}},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 36%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{surface.0}",detailColor:"{yellow.50}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{yellow.500}",shadow:"none"}}},error:{background:"color-mix(in srgb, {red.500}, transparent 36%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{surface.0}",detailColor:"{red.100}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{red.500}",shadow:"none"}}},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",detailColor:"{surface.0}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"{surface.700}",focusRing:{color:"{surface.300}",shadow:"none"}}},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",detailColor:"{surface.950}",shadow:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",closeButton:{hoverBackground:"{surface.100}",focusRing:{color:"{surface.950}",shadow:"none"}}}}};var _ge={root:IYt,icon:EYt,content:DYt,text:AYt,summary:kYt,detail:MYt,closeButton:OYt,closeIcon:RYt,colorScheme:FYt,css:""};var PYt={padding:"0.75rem 1rem",borderRadius:"{form.field.border.radius}",gap:"0.5rem",fontWeight:"500",background:"{form.field.background}",borderColor:"{form.field.border.color}",color:"{form.field.color}",hoverColor:"{form.field.color}",checkedColor:"{form.field.color}",checkedBorderColor:"{form.field.border.color}",disabledBackground:"{form.field.disabled.background}",disabledBorderColor:"{form.field.disabled.background}",disabledColor:"{form.field.disabled.color}",invalidBorderColor:"{form.field.invalid.border.color}",focusRing:{width:"0",style:"none",offset:"0",color:"unset",shadow:"none"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",padding:"0.625rem 0.75rem"},lg:{fontSize:"{form.field.lg.font.size}",padding:"0.875rem 1.25rem"}},LYt={color:"{text.muted.color}",hoverColor:"{text.muted.color}",checkedColor:"{text.muted.color}",disabledColor:"{form.field.disabled.color}"},NYt={checkedBackground:"transparent",checkedShadow:"none",padding:"0",borderRadius:"0",sm:{padding:"0"},lg:{padding:"0"}},BYt={light:{root:{hoverBackground:"{surface.100}",checkedBackground:"{surface.200}"}},dark:{root:{hoverBackground:"{surface.800}",checkedBackground:"{surface.700}"}}},VYt=` .p-togglebutton:focus-visible { background: dt('togglebutton.hover.background'); } `,yge={root:PYt,icon:LYt,content:NYt,colorScheme:BYt,css:VYt};var zYt={width:"2.75rem",height:"1rem",borderRadius:"30px",gap:"0px",shadow:"none",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"},borderWidth:"1px",borderColor:"transparent",hoverBorderColor:"transparent",checkedBorderColor:"transparent",checkedHoverBorderColor:"transparent",invalidBorderColor:"{form.field.invalid.border.color}",transitionDuration:"{form.field.transition.duration}",slideDuration:"0.2s"},UYt={borderRadius:"50%",size:"1.5rem"},HYt={light:{root:{background:"{surface.300}",disabledBackground:"{surface.400}",hoverBackground:"{surface.300}",checkedBackground:"{primary.200}",checkedHoverBackground:"{primary.200}"},handle:{background:"{surface.0}",disabledBackground:"{surface.200}",hoverBackground:"{surface.0}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",checkedColor:"{primary.contrast.color}",checkedHoverColor:"{primary.contrast.color}"}},dark:{root:{background:"{surface.700}",disabledBackground:"{surface.600}",hoverBackground:"{surface.700}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.color}"},handle:{background:"{surface.400}",disabledBackground:"{surface.500}",hoverBackground:"{surface.300}",checkedBackground:"{primary.200}",checkedHoverBackground:"{primary.200}",color:"{surface.800}",hoverColor:"{surface.900}",checkedColor:"{primary.contrast.color}",checkedHoverColor:"{primary.contrast.color}"}}},jYt=` .p-toggleswitch-handle { box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); } .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-handle { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('text.color'), transparent 96%), 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); } .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-handle { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('text.color'), transparent 88%), 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); } .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-handle { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('toggleswitch.handle.checked.background'), transparent 92%), 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); } .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible).p-toggleswitch-checked .p-toggleswitch-handle { box-shadow: 0 0 1px 10px color-mix(in srgb, dt('toggleswitch.handle.checked.background'), transparent 84%), 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); } `,vge={root:zYt,handle:UYt,colorScheme:HYt,css:jYt};var GYt={color:"{content.color}",borderRadius:"{content.border.radius}",gap:"0.5rem",padding:"1rem"},$Yt={light:{root:{background:"{surface.100}",borderColor:"{surface.100}"}},dark:{root:{background:"{surface.800}",borderColor:"{surface.800}"}}};var bge={root:GYt,colorScheme:$Yt,css:""};var qYt={background:"{surface.600}",color:"{surface.0}",maxWidth:"12.5rem",gutter:"0.25rem",shadow:"{overlay.popover.shadow}",padding:"0.5rem 0.75rem",borderRadius:"{overlay.popover.border.radius}"};var Cge={root:qYt,css:""};var KYt={background:"{content.background}",color:"{content.color}",padding:"1rem",gap:"2px",indent:"2rem",transitionDuration:"{transition.duration}"},WYt={padding:"0.5rem 0.75rem",borderRadius:"{border.radius.xs}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{text.color}",hoverColor:"{text.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},gap:"0.5rem"},YYt={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedColor:"{highlight.color}"},QYt={borderRadius:"50%",size:"2rem",hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedHoverColor:"{primary.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},ZYt={size:"2rem"},XYt={margin:"0 0 0.75rem 0"},JYt=` .p-tree-node-content { transition: none; } `,xge={root:KYt,node:WYt,nodeIcon:YYt,nodeToggleButton:QYt,loadingIcon:ZYt,filter:XYt,css:JYt};var eQt={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},tQt={width:"2.5rem",color:"{form.field.icon.color}"},iQt={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},nQt={padding:"{list.padding}"},oQt={padding:"{list.option.padding}"},rQt={borderRadius:"{border.radius.sm}"},sQt={color:"{form.field.icon.color}"},aQt=` .p-treeselect.p-variant-filled { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border: 1px solid transparent; background: dt('treeselect.filled.background') no-repeat; background-image: linear-gradient(to bottom, dt('treeselect.focus.border.color'), dt('treeselect.focus.border.color')), linear-gradient(to bottom, dt('treeselect.border.color'), dt('treeselect.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); } .p-treeselect.p-variant-filled:not(.p-disabled):hover { background: dt('treeselect.filled.hover.background') no-repeat; background-image: linear-gradient(to bottom, dt('treeselect.focus.border.color'), dt('treeselect.focus.border.color')), linear-gradient(to bottom, dt('treeselect.hover.border.color'), dt('treeselect.hover.border.color')); background-size: 0 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-treeselect.p-variant-filled:not(.p-disabled).p-focus { outline: 0 none; background: dt('treeselect.filled.focus.background') no-repeat; background-image: linear-gradient(to bottom, dt('treeselect.focus.border.color'), dt('treeselect.focus.border.color')), linear-gradient(to bottom, dt('treeselect.border.color'), dt('treeselect.border.color')); background-size: 100% 2px, 100% 1px; background-position: 50% 100%, 50% 100%; background-origin: border-box; border-color: transparent; } .p-treeselect.p-variant-filled:not(.p-disabled).p-focus:hover { background-image: linear-gradient(to bottom, dt('treeselect.focus.border.color'), dt('treeselect.focus.border.color')), linear-gradient(to bottom, dt('treeselect.hover.border.color'), dt('treeselect.hover.border.color')); } .p-treeselect.p-variant-filled.p-invalid { background-image: linear-gradient(to bottom, dt('treeselect.invalid.border.color'), dt('treeselect.invalid.border.color')), linear-gradient(to bottom, dt('treeselect.invalid.border.color'), dt('treeselect.invalid.border.color')); } .p-treeselect.p-variant-filled.p-invalid:not(.p-disabled).p-focus { background-image: linear-gradient(to bottom, dt('treeselect.invalid.border.color'), dt('treeselect.invalid.border.color')), linear-gradient(to bottom, dt('treeselect.invalid.border.color'), dt('treeselect.invalid.border.color')); } `,wge={root:eQt,dropdown:tQt,overlay:iQt,tree:nQt,emptyMessage:oQt,chip:rQt,clearIcon:sQt,css:aQt};var lQt={transitionDuration:"{transition.duration}"},cQt={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},dQt={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{treetable.border.color}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",gap:"0.5rem",padding:"0.75rem 1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},uQt={fontWeight:"600"},pQt={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},hQt={borderColor:"{treetable.border.color}",padding:"0.75rem 1rem",gap:"0.5rem"},mQt={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",padding:"0.75rem 1rem"},fQt={fontWeight:"600"},gQt={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},_Qt={width:"0.5rem"},yQt={width:"1px",color:"{primary.color}"},vQt={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",size:"0.875rem"},bQt={size:"2rem"},CQt={hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",selectedHoverColor:"{primary.color}",size:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},xQt={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},wQt={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},SQt={light:{root:{borderColor:"{content.border.color}"},bodyCell:{selectedBorderColor:"{primary.100}"}},dark:{root:{borderColor:"{surface.800}"},bodyCell:{selectedBorderColor:"{primary.900}"}}};var Sge={root:lQt,header:cQt,headerCell:dQt,columnTitle:uQt,row:pQt,bodyCell:hQt,footerCell:mQt,columnFooter:fQt,footer:gQt,columnResizer:_Qt,resizeIndicator:yQt,sortIcon:vQt,loadingIcon:bQt,nodeToggleButton:CQt,paginatorTop:xQt,paginatorBottom:wQt,colorScheme:SQt};var TQt={mask:{background:"{content.background}",color:"{text.muted.color}"},icon:{size:"2rem"}};var Tge={loader:TQt,css:""};var QN=mt(be({},Yme),{components:{accordion:$me,autocomplete:qme,avatar:Kme,badge:Wme,blockui:Qme,breadcrumb:Zme,button:Xme,datepicker:dfe,card:Jme,carousel:efe,cascadeselect:tfe,checkbox:ife,chip:nfe,colorpicker:ofe,confirmdialog:rfe,confirmpopup:sfe,contextmenu:afe,dataview:cfe,datatable:lfe,dialog:ufe,divider:pfe,dock:hfe,drawer:mfe,editor:ffe,fieldset:gfe,fileupload:_fe,iftalabel:Cfe,floatlabel:yfe,galleria:vfe,iconfield:bfe,image:xfe,imagecompare:wfe,inlinemessage:Sfe,inplace:Tfe,inputchips:Ife,inputgroup:Efe,inputnumber:Dfe,inputotp:Afe,inputtext:kfe,knob:Mfe,listbox:Ofe,megamenu:Rfe,menu:Ffe,menubar:Pfe,message:Lfe,metergroup:Nfe,multiselect:Bfe,orderlist:Vfe,organizationchart:zfe,overlaybadge:Ufe,popover:Kfe,paginator:Hfe,password:$fe,panel:jfe,panelmenu:Gfe,picklist:qfe,progressbar:Wfe,progressspinner:Yfe,radiobutton:Qfe,rating:Zfe,ripple:Xfe,scrollpanel:Jfe,select:ege,selectbutton:tge,skeleton:ige,slider:nge,speeddial:oge,splitter:sge,splitbutton:rge,stepper:age,steps:lge,tabmenu:cge,tabs:dge,tabview:uge,textarea:mge,tieredmenu:fge,tag:pge,terminal:hge,timeline:gge,togglebutton:yge,toggleswitch:vge,tree:xge,treeselect:wge,treetable:Sge,toast:_ge,toolbar:bge,tooltip:Cge,virtualscroller:Tge}});var hcr=OP(QN,{semantic:{primary:{50:"{orange.50}",100:"{orange.100}",200:"{orange.200}",300:"{orange.300}",400:"{orange.400}",500:"{orange.500}",600:"{orange.600}",700:"{orange.700}",800:"{orange.800}",900:"{orange.900}",950:"{orange.950}"},colorScheme:{light:{surface:{0:"#ffffff",50:"{gray.50}",100:"{gray.100}",200:"{gray.200}",300:"{gray.300}",400:"{gray.400}",500:"{gray.500}",600:"{gray.600}",700:"{gray.700}",800:"{gray.800}",900:"{gray.900}",950:"{gray.950}"}}}},components:{toolbar:{css:({dt:t})=>` .p-toolbar { background: var(--p-surface-200); } `},button:{colorScheme:{light:{}}}}});var Nze={accept:"Ja",after:"Nach",addRule:"Neue Regel",apply:"\xDCbernehmen",firstDayOfWeek:1,startsWith:"Startet mit",dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],today:"Heute",monthNames:["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],chooseMonth:"W\xE4hle Monat",nextMonth:"N\xE4chstes Monat",prevMonth:"Vorheriges Monat"};var IQt=OP(QN,{semantic:{primary:{50:"{orange.50}",100:"{orange.100}",200:"{orange.200}",300:"{orange.300}",400:"{orange.400}",500:"{orange.500}",600:"{orange.600}",700:"{orange.700}",800:"{orange.800}",900:"{orange.900}",950:"{orange.950}"},colorScheme:{light:{primary:{contrastColor:"#000000"},surface:{0:"#ffffff",50:"{gray.50}",100:"{gray.100}",200:"{gray.200}",300:"{gray.300}",400:"{gray.400}",500:"{gray.500}",600:"{gray.600}",700:"{gray.700}",800:"{gray.800}",900:"{gray.900}",950:"{gray.950}"}}}},components:{button:{css:({dt:t})=>` .p-dialog-maximize-button { background: transparent; border-color: transparent; color: ${t("button-text-secondary-color")}; } `},panel:{css:({dt:t})=>` .p-panel { border-color: transparent; } `},toolbar:{css:({dt:t})=>` .p-toolbar { background: var(--p-surface-200); } `},menubar:{css:({dt:t})=>` .p-menubar { border-color: #fff; border-radius: 0; } `}}}),Bze={theme:{preset:IQt,options:{darkModeSelector:".not-existing-dark-mode-selector"}},overlayAppendTo:"body",overlayOptions:{mode:"overlay",appendTo:"body"},inputVariant:"filled",translation:Nze};var xcr=OP(QN,{semantic:{primary:{50:"{slate.50}",100:"{slate.100}",200:"{slate.200}",300:"{slate.300}",400:"{slate.400}",500:"{slate.500}",600:"{slate.600}",700:"{slate.700}",800:"{slate.800}",900:"{slate.900}",950:"{slate.950}"},colorScheme:{light:{surface:{0:"#ffffff",50:"{gray.50}",100:"{gray.100}",200:"{gray.200}",300:"{gray.300}",400:"{gray.400}",500:"{gray.500}",600:"{gray.600}",700:"{gray.700}",800:"{gray.800}",900:"{gray.900}",950:"{gray.950}"}}}},components:{toolbar:{css:({dt:t})=>` .p-toolbar { background: var(--p-surface-200); } `},menubar:{css:({dt:t})=>` .p-menubar { border-color: #fff; border-radius: 0; } `}}});$1e(N5e);var Vze=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t,bootstrap:[mSe]})}static{this.\u0275inj=_i({providers:[{provide:cp,useValue:"de-DE"},{provide:"BD_PAGE_TITLE_BRAND",useValue:"BinDoc Geographische Analyse"},{provide:s2,useValue:YK},{provide:ex,useClass:H5},qAe(Bze),_4e(),{provide:zr,useValue:{filterType:_U.type,filterConditionId:zde,filterConditionPluginSpecification:_U,filterConditionComponent:T5e},multi:!0},{provide:Hs,deps:[zr,Ia,qr,WY,Fx],useFactory:(e,i,o,r,s)=>new Hs({API_TOKENS:{BASE:"AYS_CLINIC_FILTER_STORAGE_URL",RESULT:"AYS_CLINIC_RESOURCE_URL"}},o,r,e,i,s)},{provide:p6,useValue:{resourceName:ko.CLINICS_FILTER,resourceService:Hs},multi:!0},{provide:Fx,deps:[qr,WY,Ia],useFactory:(e,i,o)=>new Fx({API_TOKENS:{BASE:"AYS_CODE_SPECTRUM_STORAGE_URL"}},e,i,o)},{provide:p6,useValue:{resourceName:ko.CODE_SPECTRUM,resourceService:Fx},multi:!0}],imports:[L5e,Pp.forRoot(fSe,{initialNavigation:"enabledBlocking"}),P5e,DV,Pze]})}}return t})();var zze={production:!0,configRequestUrl:"/config/v2",configRequestMethod:"POST"};var Uze={id:"geographic-analysis-app",hostKey:"META_APP_URL",domain:"BINDOC",apiEndpointKeys:["AYS_BENCHMARKING_GROUP_RESOURCE_URL","AYS_CLINIC_FILTER_STORAGE_URL","AYS_CODE_SPECTRUM_STORAGE_URL","AYS_COMPETITORS_ANALYSIS_RESOURCE_URL","AYS_DRG_BENCHMARKING_URL","AYS_FAB_RESOURCE_URL","AYS_MARKET_STORAGE_URL","AYS_OPERATING_NUMBER_GROUPS_URL","AYS_OPERATING_NUMBER_URL","AYS_POTENTIAL_URL","AYS_PROFITABILITY_ANALYSIS_FORM_URL","AYS_PROJECTION_RESOURCE_URL","AYS_SCENARIO_ANALYSIS_RESOURCE_URL","AYS_VIRTUAL_CLINIC_ANALYSIS_URL","AYS_VIRTUAL_CLINIC_DRG_ACCOUNTING_RESOURCE_URL","AYS_VIRTUAL_CLINIC_REFERRAL_IMPORT_RESOURCE_URL","AYS_VIRTUAL_CLINIC_REFERRAL_RESOURCE_URL","AYS_VIRTUAL_CLINIC_RESOURCE_URL","BD_BUSINESS_CASE_RESOURCE_URL","BD_FILES_RESOURCE_URL","BD_PERMISSION_RESOURCE_URL","CUBE_DASHBOARD_URL","DRG_PROFIT_LOSS_ANALYSIS_RESOURCE_URL","INTUITIVE_PP_EXPORTS_API"],unprotectedApiEndpointKeys:["AYS_CODE_URL","BD_DISTRICT_URL","BD_FRONTEND_CONFIG_RESOURCE_URL","AYS_CLINIC_RESOURCE_URL"],variableKeys:["ANALYTICS_APP_URL","AYS_MAP_OPTIONS_STYLE_URL","AYS_VIRTUAL_CLINIC_P21_IMPORT_APP","AUTHENTICATION_AUTHORITY","AUTHENTICATION_PASSWORD_RESET_AUTHORITY","AUTHENTICATION_CLIENT_ID","BD_APPLICATION_INSIGHTS_KEY","BD_MAP_ACCESS_TOKEN_MAPBOX","BD_STAGING_BANNER","CODES_APP_URL","COOKIE_MANAGER_DOMAIN_ID"],helpKeys:["@analytics:geographic-analysis","@analytics:clinics-filter"]};g5.loadFrontendConfig(Uze,zze).then(t=>{let n=t,e=uM.msalInstance(n),i=uM.msalGuardConfig(n),o=uM.msalInterceptorConfig(n);(n.environment==="production"||n.environment==="staging")&&void 0,Jne([{provide:f5,useValue:e},{provide:h$,useValue:i},{provide:m$,useValue:o},{provide:f$,useValue:n},SLe(n)]).bootstrapModule(Vze).catch(r=>console.error(r))});